Merge branch 'master' into user-works
This commit is contained in:
commit
a63b9938da
@ -43,13 +43,13 @@ class CreateContact extends Job implements HasOwner, HasSource, ShouldCreate
|
||||
throw new \Exception($message);
|
||||
}
|
||||
|
||||
$customer_role = Role::all()->filter(function ($role) {
|
||||
$customer_role_id = Role::all()->filter(function ($role) {
|
||||
return $role->hasPermission('read-client-portal');
|
||||
})->pluck('id')->toArray();
|
||||
})->pluck('id')->first();
|
||||
|
||||
$this->request->merge([
|
||||
'locale' => setting('default.locale', 'en-GB'),
|
||||
'roles' => $customer_role,
|
||||
'roles' => $customer_role_id,
|
||||
'companies' => [$this->request->get('company_id')],
|
||||
]);
|
||||
|
||||
|
@ -57,13 +57,13 @@ class UpdateContact extends Job implements ShouldUpdate
|
||||
throw new \Exception($message);
|
||||
}
|
||||
|
||||
$customer_role = Role::all()->filter(function ($role) {
|
||||
$customer_role_id = Role::all()->filter(function ($role) {
|
||||
return $role->hasPermission('read-client-portal');
|
||||
})->pluck('id')->toArray();
|
||||
})->pluck('id')->first();
|
||||
|
||||
$this->request->merge([
|
||||
'locale' => setting('default.locale', 'en-GB'),
|
||||
'roles' => $customer_role,
|
||||
'roles' => $customer_role_id,
|
||||
'companies' => [$this->request->get('company_id')],
|
||||
]);
|
||||
|
||||
|
@ -27,6 +27,7 @@ class Country extends Component
|
||||
*/
|
||||
public function __construct($code) {
|
||||
$this->code = $code;
|
||||
$this->country = trans('general.na');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -36,7 +37,9 @@ class Country extends Component
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
$this->country = trans('countries.' . $this->code);
|
||||
if (! empty($this->code)) {
|
||||
$this->country = trans('countries.' . $this->code);
|
||||
}
|
||||
|
||||
return view('components.index.country');
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 165 KiB |
@ -72,17 +72,18 @@
|
||||
<div class="flex items-center justify-center mt-5 gap-x-10">
|
||||
<base-button class="w-1/2 flex items-center justify-center px-6 py-1.5 text-base rounded-lg bg-transparent hover:bg-gray-100" @click="next()">{{ translations.company.skip }}</base-button>
|
||||
|
||||
<base-button
|
||||
<button
|
||||
type="submit"
|
||||
id="button"
|
||||
:disabled="button_loading"
|
||||
class="w-1/2 relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100"
|
||||
@click="onEditSave()"
|
||||
@click="onEditSave($event)"
|
||||
>
|
||||
<i v-if="button_loading" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"></i>
|
||||
<span :class="[{'opacity-0': button_loading}]">
|
||||
{{ translations.company.save }}
|
||||
</span>
|
||||
</base-button>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -254,7 +255,9 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
onEditSave() {
|
||||
onEditSave(event) {
|
||||
event.preventDefault();
|
||||
|
||||
FormData.prototype.appendRecursive = function (data, wrapper = null) {
|
||||
for (var name in data) {
|
||||
if (name == "previewElement" || name == "previewTemplate") {
|
||||
|
@ -91,16 +91,17 @@
|
||||
{{ translations.currencies.cancel }}
|
||||
</base-button>
|
||||
|
||||
<base-button
|
||||
<button
|
||||
type="submit"
|
||||
:disabled="button_loading"
|
||||
class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100"
|
||||
@click="onEditForm(item)"
|
||||
@click="onEditForm(item, $event)"
|
||||
>
|
||||
<i v-if="button_loading" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"></i>
|
||||
<span :class="[{'opacity-0': button_loading}]">
|
||||
{{ translations.currencies.save }}
|
||||
</span>
|
||||
</base-button>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@ -159,12 +160,12 @@
|
||||
{{ translations.currencies.cancel }}
|
||||
</base-button>
|
||||
|
||||
<base-button :disabled="button_loading" class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100" @click="onSubmitForm()">
|
||||
<button type="submit" :disabled="button_loading" class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100" @click="onSubmitForm($event)">
|
||||
<i v-if="button_loading" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"></i>
|
||||
<span :class="[{'opacity-0': button_loading}]">
|
||||
{{ translations.currencies.save }}
|
||||
</span>
|
||||
</base-button>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -293,7 +294,9 @@ export default {
|
||||
}, this);
|
||||
},
|
||||
|
||||
onEditForm(item) {
|
||||
onEditForm(item, event) {
|
||||
event.preventDefault();
|
||||
|
||||
this.onSubmitEvent(
|
||||
"PATCH",
|
||||
url + "/wizard/currencies/" + item.id,
|
||||
@ -303,7 +306,9 @@ export default {
|
||||
);
|
||||
},
|
||||
|
||||
onSubmitForm() {
|
||||
onSubmitForm(event) {
|
||||
event.preventDefault();
|
||||
|
||||
this.onSubmitEvent(
|
||||
"POST",
|
||||
url + "/wizard/currencies",
|
||||
|
@ -73,16 +73,17 @@
|
||||
{{ translations.taxes.cancel }}
|
||||
</base-button>
|
||||
|
||||
<base-button
|
||||
<button
|
||||
type="submit"
|
||||
:disabled="button_loading"
|
||||
class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100"
|
||||
@click="onEditForm(item)"
|
||||
@click="onEditForm(item, $event)"
|
||||
>
|
||||
<i v-if="button_loading" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"></i>
|
||||
<span :class="[{'opacity-0': button_loading}]">
|
||||
{{ translations.taxes.save }}
|
||||
</span>
|
||||
</base-button>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@ -131,12 +132,12 @@
|
||||
{{ translations.taxes.cancel }}
|
||||
</base-button>
|
||||
|
||||
<base-button :disabled="button_loading" class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100" @click="onSubmitForm()">
|
||||
<button type="submit" :disabled="button_loading" class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100" @click="onSubmitForm($event)">
|
||||
<i v-if="button_loading" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"></i>
|
||||
<span :class="[{'opacity-0': button_loading}]">
|
||||
{{ translations.taxes.save }}
|
||||
</span>
|
||||
</base-button>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -227,7 +228,9 @@ export default {
|
||||
this.onEjetItem(event, this.taxes, event.tax_id);
|
||||
},
|
||||
|
||||
onEditForm(item) {
|
||||
onEditForm(item, event) {
|
||||
event.preventDefault();
|
||||
|
||||
this.onSubmitEvent(
|
||||
"PATCH",
|
||||
url + "/wizard/taxes/" + item.id,
|
||||
@ -247,7 +250,9 @@ export default {
|
||||
this.add_taxes = true;
|
||||
},
|
||||
|
||||
onSubmitForm() {
|
||||
onSubmitForm(event) {
|
||||
event.preventDefault();
|
||||
|
||||
this.onSubmitEvent("POST", url + "/wizard/taxes", "type", this.taxes);
|
||||
|
||||
},
|
||||
|
@ -247,7 +247,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="relative__footer mt-6">
|
||||
<div class="mt-6">
|
||||
@if ($transactions->count())
|
||||
<div class="sm:col-span-6 flex items-center justify-end">
|
||||
<x-link
|
||||
|
@ -186,7 +186,7 @@
|
||||
</div>
|
||||
|
||||
@can('update-banking-reconciliations')
|
||||
<div class="relative__footer mt-6">
|
||||
<div class="mt-6">
|
||||
@if ($transactions->count())
|
||||
<div class="sm:col-span-6 flex items-center justify-end">
|
||||
<x-link
|
||||
|
@ -29,7 +29,7 @@
|
||||
<x-form.group.file name="import" dropzone-class="form-file" singleWidthClasses :options="['acceptedFiles' => '.xls,.xlsx']" form-group-class="mt-8" />
|
||||
</div>
|
||||
|
||||
<div class="relative__footer mt-8">
|
||||
<div class="mt-8">
|
||||
<div class="sm:col-span-6 flex items-center justify-end">
|
||||
@if (! empty($route))
|
||||
<a href="{{ route(\Str::replaceFirst('.import', '.index', $route)) }}" class="px-6 py-1.5 mr-2 hover:bg-gray-200 rounded-lg">
|
||||
|
@ -21,8 +21,6 @@
|
||||
@endif
|
||||
|
||||
@if (! empty($foot) && $foot->isNotEmpty())
|
||||
<div class="relative__footer">
|
||||
{!! $foot !!}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
@ -10,8 +10,6 @@
|
||||
@endif
|
||||
|
||||
@if (! empty($foot) && $foot->isNotEmpty())
|
||||
<div class="relative__footer">
|
||||
{!! $foot !!}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
@ -2,10 +2,6 @@
|
||||
|
||||
<div class="flex">
|
||||
<div class="w-full text-center">
|
||||
<div class="my-10">
|
||||
<img src="https://assets.akaunting.com/software/portal/finish.gif" alt="Get Started" />
|
||||
</div>
|
||||
|
||||
<div class="my-10">
|
||||
{{ trans('portal.create_your_invoice') }}
|
||||
</div>
|
||||
@ -15,5 +11,9 @@
|
||||
{{ trans('portal.get_started') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="my-10">
|
||||
<img src="https://assets.akaunting.com/software/portal/finish.gif" class="inline" alt="Get Started" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -21,8 +21,6 @@
|
||||
@endif
|
||||
|
||||
@if (! empty($foot) && $foot->isNotEmpty())
|
||||
<div class="relative__footer">
|
||||
{!! $foot !!}
|
||||
</div>
|
||||
!! $foot !!}
|
||||
@endif
|
||||
</div>
|
||||
|
@ -151,27 +151,31 @@
|
||||
<x-pagination :items="$invoices" />
|
||||
</x-index.container>
|
||||
@else
|
||||
<x-empty-page
|
||||
group="sales"
|
||||
page="invoices"
|
||||
hide-button-import
|
||||
:buttons="[
|
||||
[
|
||||
'url' => route('transactions.create', ['type' => 'income']),
|
||||
'permission' => 'create-sales-invoices',
|
||||
'text' => trans('general.title.new', ['type' => trans_choice('general.incomes', 1)]),
|
||||
'description' => trans('general.empty.actions.new', ['type' => trans_choice('general.incomes', 1)]),
|
||||
'active_badge' => false
|
||||
],
|
||||
[
|
||||
'url' => 'https://akaunting.com/premium-cloud',
|
||||
'permission' => 'create-sales-invoices',
|
||||
'text' => trans('import.title', ['type' => trans_choice('general.bank_transactions', 2)]),
|
||||
'description' => '',
|
||||
'active_badge' => false
|
||||
]
|
||||
]"
|
||||
/>
|
||||
<div class="flex">
|
||||
<div class="w-full text-center">
|
||||
<div class="my-10">
|
||||
{{ trans('portal.create_your_invoice') }}
|
||||
</div>
|
||||
|
||||
<div class="my-10">
|
||||
<a href="https://akaunting.com/lp/accounting-software?utm_source=invoice_index&utm_medium=software&utm_campaign=plg" class="bg-purple text-white px-3 py-1.5 mb-3 sm:mb-0 rounded-xl text-sm font-medium leading-6 hover:bg-purple-700">
|
||||
{{ trans('portal.get_started') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="my-10">
|
||||
<img src="https://assets.akaunting.com/software/portal/invoice.gif" class="inline" alt="Get Started" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('css')
|
||||
<style>
|
||||
.hide-empty-page {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
@endif
|
||||
</x-slot>
|
||||
|
||||
|
@ -59,34 +59,31 @@
|
||||
<x-pagination :items="$payments" />
|
||||
</x-index.container>
|
||||
@else
|
||||
<x-empty-page
|
||||
group="banking"
|
||||
page="transactions"
|
||||
hide-button-import
|
||||
:buttons="[
|
||||
[
|
||||
'url' => route('transactions.create', ['type' => 'income']),
|
||||
'permission' => 'create-banking-transactions',
|
||||
'text' => trans('general.title.new', ['type' => trans_choice('general.incomes', 1)]),
|
||||
'description' => trans('general.empty.actions.new', ['type' => trans_choice('general.incomes', 1)]),
|
||||
'active_badge' => false
|
||||
],
|
||||
[
|
||||
'url' => route('transactions.create', ['type' => 'expense']),
|
||||
'permission' => 'create-banking-transactions',
|
||||
'text' => trans('general.title.new', ['type' => trans_choice('general.expenses', 1)]),
|
||||
'description' => trans('general.empty.actions.new', ['type' => trans_choice('general.expenses', 1)]),
|
||||
'active_badge' => false
|
||||
],
|
||||
[
|
||||
'url' => 'https://akaunting.com/premium-cloud',
|
||||
'permission' => 'create-banking-transactions',
|
||||
'text' => trans('import.title', ['type' => trans_choice('general.bank_transactions', 2)]),
|
||||
'description' => '',
|
||||
'active_badge' => false
|
||||
]
|
||||
]"
|
||||
/>
|
||||
<div class="flex">
|
||||
<div class="w-full text-center">
|
||||
<div class="my-10">
|
||||
{{ trans('portal.create_your_invoice') }}
|
||||
</div>
|
||||
|
||||
<div class="my-10">
|
||||
<a href="https://akaunting.com/lp/accounting-software?utm_source=payment_index&utm_medium=software&utm_campaign=plg" class="bg-purple text-white px-3 py-1.5 mb-3 sm:mb-0 rounded-xl text-sm font-medium leading-6 hover:bg-purple-700">
|
||||
{{ trans('portal.get_started') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="my-10">
|
||||
<img src="https://assets.akaunting.com/software/portal/payment.gif" class="inline" alt="Get Started" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('css')
|
||||
<style>
|
||||
.hide-empty-page {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
@endif
|
||||
</x-slot>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user