improved tenant identification

This commit is contained in:
Denis Duliçi
2021-04-16 00:59:43 +03:00
parent 9635e6be5d
commit 2b07442260
126 changed files with 1719 additions and 999 deletions

View File

@@ -43,7 +43,7 @@
@foreach($companies as $item)
<tr class="row align-items-center border-top-1">
<td class="col-sm-2 col-md-2 col-lg-1 col-xl-1 d-none d-sm-block">
@if ((session('company_id') != $item->id))
@if ((company_id() != $item->id))
{{ Form::bulkActionGroup($item->id, $item->name) }}
@else
{{ Form::bulkActionGroup($item->id, $item->name, ['disabled' => 'true']) }}
@@ -54,7 +54,7 @@
<td class="col-md-2 col-lg-2 col-xl-2 d-none d-md-block long-texts">{{ $item->email }}</td>
<td class="col-lg-2 col-xl-2 d-none d-lg-block">@date($item->created_at)</td>
<td class="col-xs-4 col-sm-3 col-md-2 col-lg-2 col-xl-2">
@if ((session('company_id') != $item->id) && user()->can('update-common-companies'))
@if ((company_id() != $item->id) && user()->can('update-common-companies'))
{{ Form::enabledGroup($item->id, $item->name, $item->enabled) }}
@else
@if ($item->enabled)

View File

@@ -23,7 +23,7 @@
@endif
@if (!$hideCompanyEdit)
<akaunting-company-edit company-id="{{ session('company_id') }}"
<akaunting-company-edit company-id="{{ company_id() }}"
button-text="{{ trans('settings.company.edit_your_business_address') }}"
tax-number-text="{{ trans('general.tax_number') }}"
:company="{{ json_encode($company) }}"

View File

@@ -13,7 +13,7 @@
<div class="card-body">
<p>{{ trans('errors.message.403') }}</p>
@php $landing_page = user() ? route(user()->landing_page) : route('login'); @endphp
@php $landing_page = user() ? user()->getLandingPageOfUser() : route('login'); @endphp
<a href="{{ $landing_page }}" class="btn btn-success">{{ trans('general.go_to_dashboard') }}</a>
</div>

View File

@@ -13,7 +13,7 @@
<div class="card-body">
<p>{{ trans('errors.message.404') }}</p>
@php $landing_page = user() ? route(user()->landing_page) : route('login'); @endphp
@php $landing_page = user() ? user()->getLandingPageOfUser() : route('login'); @endphp
<a href="{{ $landing_page }}" class="btn btn-success">{{ trans('general.go_to_dashboard') }}</a>
</div>

View File

@@ -13,7 +13,7 @@
<div class="card-body">
<p>{{ trans('errors.message.500') }}</p>
@php $landing_page = user() ? route(user()->landing_page) : route('login'); @endphp
@php $landing_page = user() ? user()->getLandingPageOfUser() : route('login'); @endphp
<a href="{{ $landing_page }}" class="btn btn-success">{{ trans('general.go_to_dashboard') }}</a>
</div>

View File

@@ -35,7 +35,7 @@
@livewireStyles
<script type="text/javascript"><!--
var url = '{{ url("/") }}';
var url = '{{ url("/" . company_id()) }}';
var app_url = '{{ config("app.url") }}';
var aka_currency = {!! !empty($currency) ? $currency : 'false' !!};
//--></script>