2022-06-01 10:15:55 +03:00
|
|
|
<x-layouts.admin>
|
|
|
|
<x-slot name="title">{{ trans('general.title.edit', ['type' => trans_choice('general.items', 1)]) }}</x-slot>
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-slot name="content">
|
|
|
|
<x-form.container>
|
|
|
|
<x-form id="item" method="PATCH" :route="['items.update', $item->id]" :model="$item">
|
|
|
|
<x-form.section>
|
|
|
|
<x-slot name="head">
|
|
|
|
<x-form.section.head title="{{ trans('general.general') }}" description="{{ trans('items.form_description.general') }}" />
|
|
|
|
</x-slot>
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-slot name="body">
|
|
|
|
<x-form.group.radio
|
|
|
|
name="type"
|
|
|
|
label="{{ trans_choice('general.types', 1) }}"
|
|
|
|
:options="[
|
|
|
|
'product' => trans_choice('general.products', 1),
|
|
|
|
'service' => trans_choice('general.services', 1)
|
|
|
|
]"
|
|
|
|
checked="{{ $item->type }}"
|
|
|
|
/>
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-form.group.text name="name" label="{{ trans('general.name') }}" />
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-form.group.category type="item" not-required />
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-form.group.textarea name="description" label="{{ trans('general.description') }}" not-required />
|
|
|
|
</x-slot>
|
|
|
|
</x-form.section>
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-form.section>
|
|
|
|
<x-slot name="head">
|
|
|
|
<x-form.section.head title="{{ trans('items.billing') }}" description="{{ trans('items.form_description.billing') }}" />
|
|
|
|
</x-slot>
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-slot name="body">
|
|
|
|
<x-form.group.checkbox name="sale_information" id="item-sale-information" :options="['sale' => trans('items.sale_information')]" @input="onInformation($event, 'sale')" form-group-class="sm:col-span-3" checkbox-class="sm:col-span-6" />
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-form.group.checkbox name="purchase_information" id="item-purchase-information" :options="['sale' => trans('items.purchase_information')]" @input="onInformation($event, 'purchase')" form-group-class="sm:col-span-3" checkbox-class="sm:col-span-6" />
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-form.group.text name="sale_price" label="{{ trans('items.sale_price') }}" v-bind:disabled="sale_information" />
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-form.group.text name="purchase_price" label="{{ trans('items.purchase_price') }}" v-bind:disabled="purchase_information" />
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-form.group.select multiple add-new name="tax_ids" label="{{ trans_choice('general.taxes', 1) }}" :options="$taxes" :selected="$item->tax_ids" not-required :path="route('modals.taxes.create')" :field="['key' => 'id', 'value' => 'title']" form-group-class="sm:col-span-3 el-select-tags-pl-38" />
|
|
|
|
</x-slot>
|
|
|
|
</x-form.section>
|
2020-01-27 22:41:08 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-form.group.switch name="enabled" label="{{ trans('general.enabled') }}" />
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
@can('update-common-items')
|
|
|
|
<x-form.section>
|
|
|
|
<x-slot name="foot">
|
|
|
|
<x-form.buttons cancel-route="items.index" />
|
|
|
|
</x-slot>
|
|
|
|
</x-form.section>
|
|
|
|
@endcan
|
|
|
|
</x-form>
|
|
|
|
</x-form.container>
|
|
|
|
</x-slot>
|
|
|
|
|
|
|
|
<x-script folder="common" file="items" />
|
|
|
|
</x-layouts.admin>
|