Merge branch 'master' of https://github.com/brkcvn/akaunting into form-elements

This commit is contained in:
Burak Civan
2022-07-04 10:15:27 +03:00
44 changed files with 935 additions and 192 deletions

View File

@@ -30,5 +30,22 @@ const app = new Vue({
form: new Form('company'),
bulk_action: new BulkAction('companies')
}
},
methods: {
// Form Submit
onSubmit() {
this.form.loading = true;
if (this.form.country === "") {
this.form.errors.set('country', [country_validation_required_message]);
this.form.loading = false;
return;
}
this.form.submit();
},
}
});

View File

@@ -696,7 +696,7 @@ const app = new Vue({
let payment = {
modal: false,
url: url + '/modals/documents/' + document_id + '/transactions/edit/' + transaction_id,
url: url + '/modals/documents/' + document_id + '/transactions/' + transaction_id + '/edit',
title: '',
html: '',
buttons:{}

View File

@@ -13,7 +13,7 @@
<div class="sm:col-span-3 grid gap-x-8 gap-y-6 {{ user()->id == $user->id ? 'grid-rows-3' : 'grid-rows-2' }}">
<x-form.group.text name="name" label="{{ trans('general.name') }}" />
<x-form.group.email name="email" label="{{ trans('general.email') }}" />
<x-form.group.email name="email" label="{{ trans('general.email') }}" ::disabled="{{ $user->hasPendingInvitation() ? 'true' : 'false' }}" />
@if (user()->id == $user->id)
<x-form.group.checkbox name="change_password" :options="['1' => trans('auth.change_password')]" form-group-class="sm:col-span-3" @input="onChangePassword($event)" />

View File

@@ -48,15 +48,11 @@
@foreach($users as $item)
<x-table.tr href="{{ route('users.edit', $item->id) }}">
<x-table.td class="ltr:pr-6 rtl:pl-6 hidden sm:table-cell" override="class">
@if (user()->id != $item->id)
<x-index.bulkaction.single
id="{{ $item->id }}"
name="{{ $item->name }}"
:disabled="($item->hasPendingInvitation() || $item->multiplexed) ? true : false"
/>
@else
<x-index.bulkaction.single id="{{ $item->id }}" name="{{ $item->name }}" disabled />
@endif
<x-index.bulkaction.single
id="{{ $item->id }}"
name="{{ $item->name }}"
:disabled="($item->hasPendingInvitation() || user()->id == $item->id) ? true : false"
/>
</x-table.td>
<x-table.td class="w-4/12 sm:w-5/12">

View File

@@ -44,7 +44,7 @@
</x-slot>
<x-slot name="body">
<x-form.group.textarea name="address" label="{{ trans('general.address') }}" v-model="form.address" />
<x-form.group.textarea name="address" label="{{ trans('general.address') }}" v-model="form.address" not-required />
<x-form.group.text name="city" label="{{ trans_choice('general.cities', 1) }}" value="{{ setting('company.city') }}" not-required />
@@ -65,5 +65,11 @@
</x-form.container>
</x-slot>
@push('scripts_end')
<script type="text/javascript">
var country_validation_required_message = "{{ trans('validation.required', ['attribute' => trans_choice('general.countries', 1)]) }}";
</script>
@endpush
<x-script folder="common" file="companies" />
</x-layouts.admin>

View File

@@ -69,5 +69,11 @@
</x-form.container>
</x-slot>
@push('scripts_end')
<script type="text/javascript">
var country_validation_required_message = "{{ trans('validation.required', ['attribute' => trans_choice('general.countries', 1)]) }}";
</script>
@endpush
<x-script folder="common" file="companies" />
</x-layouts.admin>

View File

@@ -24,7 +24,7 @@
@endif
@if (! $hideCountry)
<x-form.group.country form-group-class="sm:col-span-3 el-select-tags-pl-38" />
<x-form.group.country form-group-class="sm:col-span-3 el-select-tags-pl-38" not-required />
@endif
</x-slot>
</x-form.section>

View File

@@ -3,7 +3,8 @@
label="{!! trans_choice('general.countries', 1) !!}"
:options="trans('countries')"
:selected="setting('company.country')"
not-required
required="{{ $required }}"
not-required="{{ $notRequired }}"
model="form.country"
form-group-class="{{ $formGroupClass }}"
/>

View File

@@ -13,7 +13,7 @@
<div x-show="price_type == false" class="text-center text-sm mt-3 mb--2">
<span style="font-size: 12px;">
<span class="text-red">*</span> <a href="https://akaunting.com/features/why-akaunting-cloud?utm_source=app_show&utm_medium=software&utm_campaign={{ str_replace('-', '', $module->slug) }}" target="_blank">{!! trans('modules.information_monthly') !!}</a>
<span class="text-red">*</span> <a href="https://akaunting.com/features/why-akaunting-cloud?utm_source=software&utm_medium=app_show&utm_campaign={{ str_replace('-', '_', $module->slug) }}" target="_blank">{!! trans('modules.information_monthly') !!}</a>
</span>
</div>
@else

View File

@@ -7,7 +7,7 @@
</div>
<div class="my-10">
<a href="https://akaunting.com/lp/accounting-software?utm_source=invoice_payment&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">
<a href="https://akaunting.com/lp/accounting-software?utm_source=software&utm_medium=invoice_payment&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>

View File

@@ -72,7 +72,7 @@
<x-form.group.text name="state" label="{{ trans('general.state') }}" form-group-class="col-span-6" not-required />
<x-form.group.country form-group-class="col-span-6 el-select-tags-pl-38" />
<x-form.group.country form-group-class="col-span-6 el-select-tags-pl-38" not-required />
</div>
</div>

View File

@@ -72,7 +72,7 @@
<x-form.group.text name="state" label="{{ trans('general.state') }}" form-group-class="col-span-6" not-required />
<x-form.group.country form-group-class="col-span-6 el-select-tags-pl-38" />
<x-form.group.country form-group-class="col-span-6 el-select-tags-pl-38" not-required />
</div>
</div>

View File

@@ -1,4 +1,4 @@
<x-form id="form-transaction" :route="$route" :model="!empty($transaction) ? $transaction : false">
<x-form id="form-transaction" :method="$method" :route="$route" :model="!empty($transaction) ? $transaction : false">
<div class="rounded-xl px-5 py-3 mb-5 bg-red-100" v-if="typeof form.response !== 'undefined' && form.response.error">
<p class="text-sm mb-0 text-red-600" v-html="form.response.message"></p>
</div>
@@ -40,7 +40,7 @@
<div id="tab-general" data-tabs-content="general" x-show="active === 'general'">
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5">
<x-form.group.date name="paid_at" label="{{ trans('general.date') }}" icon="calendar_today" value="{{ Date::now()->toDateString() }}" show-date-format="{{ company_date_format() }}" date-format="Y-m-d" autocomplete="off" form-group-class="col-span-6" />
<x-form.group.date name="paid_at" label="{{ trans('general.date') }}" icon="calendar_today" value="{{ $document->paid_at }}" show-date-format="{{ company_date_format() }}" date-format="Y-m-d" autocomplete="off" form-group-class="col-span-6" />
<x-form.group.money name="amount" label="{{ trans('general.amount') }}" value="{{ $document->grand_total }}" autofocus="autofocus" :currency="$currency" dynamicCurrency="currency" form-group-class="col-span-6" />

View File

@@ -72,7 +72,7 @@
<x-form.group.text name="state" label="{{ trans('general.state') }}" form-group-class="col-span-6" not-required />
<x-form.group.country form-group-class="col-span-6 el-select-tags-pl-38" />
<x-form.group.country form-group-class="col-span-6 el-select-tags-pl-38" not-required />
</div>
</div>

View File

@@ -72,7 +72,7 @@
<x-form.group.text name="state" label="{{ trans('general.state') }}" form-group-class="col-span-6" not-required />
<x-form.group.country form-group-class="col-span-6 el-select-tags-pl-38" />
<x-form.group.country form-group-class="col-span-6 el-select-tags-pl-38" not-required />
</div>
</div>

View File

@@ -158,7 +158,7 @@
</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">
<a href="https://akaunting.com/lp/accounting-software?utm_source=software&utm_medium=invoice_index&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>

View File

@@ -35,7 +35,7 @@
@foreach($payments as $item)
<x-table.tr href="{{ route('portal.payments.show', $item->id) }}">
<x-table.td kind="action"></x-table.td>
<x-table.td class="w-4/12 sm:w-3/12">
<span class="font-bold"><x-date date="{{ $item->paid_at }}" /></span>
</x-table.td>
@@ -66,7 +66,7 @@
</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">
<a href="https://akaunting.com/lp/accounting-software?utm_source=software&utm_medium=payment_index&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>

View File

@@ -48,7 +48,7 @@
<x-form.group.locale />
<x-form.group.country :selected="$user->contact->country" />
<x-form.group.country :selected="$user->contact->country" not-required />
<x-form.group.text name="city" label="{{ trans_choice('general.cities', 1) }}" value="{{ $user->contact->city }}" not-required />