contact modal updated
This commit is contained in:
		| @@ -603,20 +603,18 @@ abstract class Form extends Component | ||||
|             return $textCreateNewContact; | ||||
|         } | ||||
|  | ||||
|         /* | ||||
|         $default_key = Str::plural(config('type.document.' . $type . '.contact_type'), 2); | ||||
|  | ||||
|         $translation = $this->getTextFromConfig($type, 'create_new_contact', $default_key, 'trans_choice'); | ||||
|  | ||||
|         if (!empty($translation)) { | ||||
|             return [ | ||||
|                 'general.form.add_new', | ||||
|                 'general.title.new', | ||||
|                 $translation, | ||||
|             ]; | ||||
|         } | ||||
|         */ | ||||
|  | ||||
|         return 'general.add_new'; | ||||
|         return 'general.title.add'; | ||||
|     } | ||||
|  | ||||
|     protected function getTextEditContact($type, $textEditContact) | ||||
|   | ||||
| @@ -132,8 +132,8 @@ class Contact extends Component | ||||
|  | ||||
|     protected function getTextCreateNewContact($type, $textCreateNewContact) | ||||
|     { | ||||
|         if (!empty($textCreateNewContact)) { | ||||
|             return $textCreateNewContact; | ||||
|         if (!empty($textCreateNewContact) && is_array($textCreateNewContact)) { | ||||
|             return trans($textCreateNewContact[0], ['type' => trans_choice($textCreateNewContact[1], 1)]); | ||||
|         } | ||||
|  | ||||
|         switch ($type) { | ||||
|   | ||||
| @@ -8,6 +8,18 @@ class Country extends Form | ||||
| { | ||||
|     public $type = 'country'; | ||||
|  | ||||
|     /** @var string */ | ||||
|     public $formGroupClass; | ||||
|  | ||||
|     /** | ||||
|      * Create a new component instance. | ||||
|      * | ||||
|      * @return void | ||||
|      */ | ||||
|     public function __construct(string $formGroupClass = 'sm:col-span-3') { | ||||
|         $this->formGroupClass = $formGroupClass; | ||||
|     } | ||||
|      | ||||
|     /** | ||||
|      * Get the view / contents that represent the component. | ||||
|      * | ||||
|   | ||||
| @@ -46,8 +46,9 @@ | ||||
|                             </div> | ||||
|                         </ul> | ||||
|  | ||||
|                         <div class="flex items-center justify-center h-11 text-center text-purple font-bold border border-l-0 border-r-0 border-b-0 rounded-bl-lg rounded-br-lg hover:bg-gray-100 cursor-pointer" tabindex="0" @click="onContactCreate"> | ||||
|                             <span class="text-sm"> {{ createNewContactText }} </span> | ||||
|                         <div class="flex items-center justify-center h-11 text-sm text-center text-purple font-bold border border-l-0 border-r-0 border-b-0 rounded-bl-lg rounded-br-lg hover:bg-gray-100 cursor-pointer" tabindex="0" @click="onContactCreate"> | ||||
|                             <span class="material-icons text-lg font-bold mr-1 mt-1">add</span> | ||||
|                             {{ createNewContactText }} | ||||
|                         </div> | ||||
|                     </div> | ||||
|                 </div> | ||||
| @@ -367,7 +368,7 @@ export default { | ||||
|  | ||||
|                 this.add_new_html = Vue.component('add-new-component', function (resolve, reject) { | ||||
|                     resolve({ | ||||
|                         template: '<div><akaunting-modal-add-new :show="add_new.show" @submit="onSubmit" @cancel="onCancel" :buttons="add_new.buttons" :title="add_new.text" :is_component=true :message="add_new.html"></akaunting-modal-add-new></div>', | ||||
|                         template: '<div><akaunting-modal-add-new modal-dialog-class="max-w-md" modal-position-top :show="add_new.show" @submit="onSubmit" @cancel="onCancel" :buttons="add_new.buttons" :title="add_new.text" :is_component=true :message="add_new.html"></akaunting-modal-add-new></div>', | ||||
|  | ||||
|                         components: { | ||||
|                             [Select.name]: Select, | ||||
| @@ -426,7 +427,7 @@ export default { | ||||
|  | ||||
|                 this.add_new_html = Vue.component('add-new-component', function (resolve, reject) { | ||||
|                     resolve({ | ||||
|                         template: '<div><akaunting-modal-add-new :show="add_new.show" @submit="onSubmit" @cancel="onCancel" :buttons="add_new.buttons" :title="add_new.text" :is_component=true :message="add_new.html"></akaunting-modal-add-new></div>', | ||||
|                         template: '<div><akaunting-modal-add-new modal-dialog-class="max-w-md" modal-position-top :show="add_new.show" @submit="onSubmit" @cancel="onCancel" :buttons="add_new.buttons" :title="add_new.text" :is_component=true :message="add_new.html"></akaunting-modal-add-new></div>', | ||||
|  | ||||
|                         components: { | ||||
|                             [Select.name]: Select, | ||||
|   | ||||
| @@ -14,7 +14,7 @@ | ||||
|     choose-different-contact-text="{{ is_array($textChooseDifferentContact) ? trans($textChooseDifferentContact[0], ['field' => Str::lower(trans_choice($textChooseDifferentContact[1], 1))]) : trans($textChooseDifferentContact) }}" | ||||
|     :add-new="{{ json_encode([ | ||||
|         'status' => true, | ||||
|         'text' => trans('general.add_new'), | ||||
|         'text' => is_array($textCreateNewContact) ? trans($textCreateNewContact[0], ['field' => trans_choice($textCreateNewContact[1], 1)]) : trans($textCreateNewContact), | ||||
|         'new_text' => trans('modules.new'), | ||||
|         'buttons' => [ | ||||
|             'cancel' => [ | ||||
|   | ||||
| @@ -1,18 +1,90 @@ | ||||
| <x-form id="form-create-customer" route="customers.store"> | ||||
|     <div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5"> | ||||
|         <x-form.group.text name="name" label="{{ trans('general.name') }}" /> | ||||
|     <div x-data="{ active: 'general' }"> | ||||
|         <div> | ||||
|             <div> | ||||
|                 <ul class="grid grid-cols-6"> | ||||
|                     <li class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link col-span-2" | ||||
|                         id="tab-general" | ||||
|                         data-id="tab-general" | ||||
|                         data-tabs="general" | ||||
|                         x-on:click="active = 'general'" | ||||
|                         x-bind:class="active != 'general' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'" | ||||
|                     > | ||||
|                         {{ trans('general.general') }} | ||||
|  | ||||
|         <x-form.group.text name="email" label="{{ trans('general.email') }}" not-required /> | ||||
|                         <span class="invalid-feedback block text-xs text-red whitespace-normal" v-if="form.errors.has('name')||form.errors.has('email')||form.errors.has('phone')||form.errors.has('tax_number')||form.errors.has('currency_code')"> | ||||
|                             {{ trans('general.validation_error') }} | ||||
|                         </span> | ||||
|                     </li> | ||||
|  | ||||
|         <x-form.group.text name="tax_number" label="{{ trans('general.tax_number') }}" not-required /> | ||||
|                     <li class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link col-span-2" | ||||
|                         id="tab-address" | ||||
|                         data-id="tab-address" | ||||
|                         data-tabs="address" | ||||
|                         x-on:click="active = 'address'" | ||||
|                         x-bind:class="active != 'address' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'" | ||||
|                     > | ||||
|                         {{ trans('general.address') }} | ||||
|  | ||||
|         <x-form.group.currency without-add-new /> | ||||
|                         <span class="invalid-feedback block text-xs text-red whitespace-normal" v-if="form.errors.has('address')||form.errors.has('city')||form.errors.has('zip_code')||form.errors.has('state')||form.errors.has('country')"> | ||||
|                             {{ trans('general.validation_error') }} | ||||
|                         </span> | ||||
|                     </li> | ||||
|  | ||||
|         <x-form.group.textarea name="address" label="{{ trans('general.address') }}" /> | ||||
|                     <li class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link col-span-2" | ||||
|                         id="tab-other" | ||||
|                         data-id="tab-other" | ||||
|                         data-tabs="other" | ||||
|                         x-on:click="active = 'other'" | ||||
|                         x-bind:class="active != 'other' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'" | ||||
|                     > | ||||
|                         {{ trans_choice('general.others', 1) }} | ||||
|  | ||||
|         <x-form.group.country /> | ||||
|                         <span class="invalid-feedback block text-xs text-red whitespace-normal" v-if="form.errors.has('website')||form.errors.has('reference')"> | ||||
|                             {{ trans('general.validation_error') }} | ||||
|                         </span> | ||||
|                     </li> | ||||
|                 </ul> | ||||
|             </div> | ||||
|         </div> | ||||
|  | ||||
|         <x-form.input.hidden name="type" value="customer" /> | ||||
|         <x-form.input.hidden name="enabled" value="1" /> | ||||
|         <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.text name="name" label="{{ trans('general.name') }}" form-group-class="col-span-6" /> | ||||
|  | ||||
|                 <x-form.group.text name="email" label="{{ trans('general.email') }}" form-group-class="col-span-6" not-required /> | ||||
|          | ||||
|                 <x-form.group.text name="phone" label="{{ trans('general.phone') }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <x-form.group.text name="tax_number" label="{{ trans('general.tax_number') }}" form-group-class="col-span-6" not-required /> | ||||
|          | ||||
|                 <x-form.group.currency without-add-new form-group-class="col-span-6" :add-new-text="trans_choice('general.currencies', 1)" /> | ||||
|             </div> | ||||
|         </div> | ||||
|          | ||||
|         <div id="tab-address" data-tabs-content="address" x-show="active === 'address'"> | ||||
|             <div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5">       | ||||
|                 <x-form.group.textarea name="address" label="{{ trans('general.address') }}" form-group-class="col-span-6" rows=2 not-required /> | ||||
|          | ||||
|                 <x-form.group.text name="city" label="{{ trans_choice('general.cities', 1) }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <x-form.group.text name="zip_code" label="{{ trans('general.zip_code') }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <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" /> | ||||
|             </div> | ||||
|         </div> | ||||
|  | ||||
|         <div id="tab-other" data-tabs-content="other" x-show="active === 'other'"> | ||||
|             <div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5"> | ||||
|                 <x-form.group.text name="website" label="{{ trans('general.website') }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <x-form.group.text name="reference" label="{{ trans('general.reference') }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <x-form.input.hidden name="type" value="customer" /> | ||||
|                 <x-form.input.hidden name="enabled" value="1" /> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| </x-form> | ||||
|   | ||||
| @@ -1,18 +1,90 @@ | ||||
| <x-form id="form-edit-customer" method="PATCH" :route="['customers.update', $customer->id]" :model="$customer"> | ||||
|     <div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5"> | ||||
|         <x-form.group.text name="name" label="{{ trans('general.name') }}" /> | ||||
|     <div x-data="{ active: 'general' }"> | ||||
|         <div> | ||||
|             <div> | ||||
|                 <ul class="grid grid-cols-6"> | ||||
|                     <li class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link col-span-2" | ||||
|                         id="tab-general" | ||||
|                         data-id="tab-general" | ||||
|                         data-tabs="general" | ||||
|                         x-on:click="active = 'general'" | ||||
|                         x-bind:class="active != 'general' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'" | ||||
|                     > | ||||
|                         {{ trans('general.general') }} | ||||
|  | ||||
|         <x-form.group.text name="email" label="{{ trans('general.email') }}" not-required /> | ||||
|                         <span class="invalid-feedback block text-xs text-red whitespace-normal" v-if="form.errors.has('name')||form.errors.has('email')||form.errors.has('phone')||form.errors.has('tax_number')||form.errors.has('currency_code')"> | ||||
|                             {{ trans('general.validation_error') }} | ||||
|                         </span> | ||||
|                     </li> | ||||
|  | ||||
|         <x-form.group.text name="tax_number" label="{{ trans('general.tax_number') }}" not-required /> | ||||
|                     <li class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link col-span-2" | ||||
|                         id="tab-address" | ||||
|                         data-id="tab-address" | ||||
|                         data-tabs="address" | ||||
|                         x-on:click="active = 'address'" | ||||
|                         x-bind:class="active != 'address' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'" | ||||
|                     > | ||||
|                         {{ trans('general.address') }} | ||||
|  | ||||
|         <x-form.group.currency without-add-new /> | ||||
|                         <span class="invalid-feedback block text-xs text-red whitespace-normal" v-if="form.errors.has('address')||form.errors.has('city')||form.errors.has('zip_code')||form.errors.has('state')||form.errors.has('country')"> | ||||
|                             {{ trans('general.validation_error') }} | ||||
|                         </span> | ||||
|                     </li> | ||||
|  | ||||
|         <x-form.group.textarea name="address" label="{{ trans('general.address') }}" /> | ||||
|                     <li class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link col-span-2" | ||||
|                         id="tab-other" | ||||
|                         data-id="tab-other" | ||||
|                         data-tabs="other" | ||||
|                         x-on:click="active = 'other'" | ||||
|                         x-bind:class="active != 'other' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'" | ||||
|                     > | ||||
|                         {{ trans_choice('general.others', 1) }} | ||||
|  | ||||
|         <x-form.group.country /> | ||||
|                         <span class="invalid-feedback block text-xs text-red whitespace-normal" v-if="form.errors.has('website')||form.errors.has('reference')"> | ||||
|                             {{ trans('general.validation_error') }} | ||||
|                         </span> | ||||
|                     </li> | ||||
|                 </ul> | ||||
|             </div> | ||||
|         </div> | ||||
|  | ||||
|         <x-form.input.hidden name="type" value="customer" /> | ||||
|         <x-form.input.hidden name="enabled" value="1" /> | ||||
|         <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.text name="name" label="{{ trans('general.name') }}" form-group-class="col-span-6" /> | ||||
|  | ||||
|                 <x-form.group.text name="email" label="{{ trans('general.email') }}" form-group-class="col-span-6" not-required /> | ||||
|          | ||||
|                 <x-form.group.text name="phone" label="{{ trans('general.phone') }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <x-form.group.text name="tax_number" label="{{ trans('general.tax_number') }}" form-group-class="col-span-6" not-required /> | ||||
|          | ||||
|                 <x-form.group.currency without-add-new form-group-class="col-span-6" /> | ||||
|             </div> | ||||
|         </div> | ||||
|          | ||||
|         <div id="tab-address" data-tabs-content="address" x-show="active === 'address'"> | ||||
|             <div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5">       | ||||
|                 <x-form.group.textarea name="address" label="{{ trans('general.address') }}" form-group-class="col-span-6" not-required /> | ||||
|          | ||||
|                 <x-form.group.text name="city" label="{{ trans_choice('general.cities', 1) }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <x-form.group.text name="zip_code" label="{{ trans('general.zip_code') }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <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" /> | ||||
|             </div> | ||||
|         </div> | ||||
|  | ||||
|         <div id="tab-other" data-tabs-content="other" x-show="active === 'other'"> | ||||
|             <div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5"> | ||||
|                 <x-form.group.text name="website" label="{{ trans('general.website') }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <x-form.group.text name="reference" label="{{ trans('general.reference') }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <x-form.input.hidden name="type" value="customer" /> | ||||
|                 <x-form.input.hidden name="enabled" value="1" /> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| </x-form> | ||||
|   | ||||
							
								
								
									
										90
									
								
								resources/views/modals/vendors/create.blade.php
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										90
									
								
								resources/views/modals/vendors/create.blade.php
									
									
									
									
										vendored
									
									
								
							| @@ -1,18 +1,90 @@ | ||||
| <x-form id="form-create-vendor" route="vendors.store"> | ||||
|     <div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5"> | ||||
|         <x-form.group.text name="name" label="{{ trans('general.name') }}" /> | ||||
|     <div x-data="{ active: 'general' }"> | ||||
|         <div> | ||||
|             <div> | ||||
|                 <ul class="grid grid-cols-6"> | ||||
|                     <li class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link col-span-2" | ||||
|                         id="tab-general" | ||||
|                         data-id="tab-general" | ||||
|                         data-tabs="general" | ||||
|                         x-on:click="active = 'general'" | ||||
|                         x-bind:class="active != 'general' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'" | ||||
|                     > | ||||
|                         {{ trans('general.general') }} | ||||
|  | ||||
|         <x-form.group.text name="email" label="{{ trans('general.email') }}" not-required /> | ||||
|                         <span class="invalid-feedback block text-xs text-red whitespace-normal" v-if="form.errors.has('name')||form.errors.has('email')||form.errors.has('phone')||form.errors.has('tax_number')||form.errors.has('currency_code')"> | ||||
|                             {{ trans('general.validation_error') }} | ||||
|                         </span> | ||||
|                     </li> | ||||
|  | ||||
|         <x-form.group.text name="tax_number" label="{{ trans('general.tax_number') }}" not-required /> | ||||
|                     <li class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link col-span-2" | ||||
|                         id="tab-address" | ||||
|                         data-id="tab-address" | ||||
|                         data-tabs="address" | ||||
|                         x-on:click="active = 'address'" | ||||
|                         x-bind:class="active != 'address' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'" | ||||
|                     > | ||||
|                         {{ trans('general.address') }} | ||||
|  | ||||
|         <x-form.group.currency without-add-new /> | ||||
|                         <span class="invalid-feedback block text-xs text-red whitespace-normal" v-if="form.errors.has('address')||form.errors.has('city')||form.errors.has('zip_code')||form.errors.has('state')||form.errors.has('country')"> | ||||
|                             {{ trans('general.validation_error') }} | ||||
|                         </span> | ||||
|                     </li> | ||||
|  | ||||
|         <x-form.group.textarea name="address" label="{{ trans('general.address') }}" /> | ||||
|                     <li class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link col-span-2" | ||||
|                         id="tab-other" | ||||
|                         data-id="tab-other" | ||||
|                         data-tabs="other" | ||||
|                         x-on:click="active = 'other'" | ||||
|                         x-bind:class="active != 'other' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'" | ||||
|                     > | ||||
|                         {{ trans_choice('general.others', 1) }} | ||||
|  | ||||
|         <x-form.group.country /> | ||||
|                         <span class="invalid-feedback block text-xs text-red whitespace-normal" v-if="form.errors.has('website')||form.errors.has('reference')"> | ||||
|                             {{ trans('general.validation_error') }} | ||||
|                         </span> | ||||
|                     </li> | ||||
|                 </ul> | ||||
|             </div> | ||||
|         </div> | ||||
|  | ||||
|         <x-form.input.hidden name="type" value="vendor" /> | ||||
|         <x-form.input.hidden name="enabled" value="1" /> | ||||
|         <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.text name="name" label="{{ trans('general.name') }}" form-group-class="col-span-6" /> | ||||
|  | ||||
|                 <x-form.group.text name="email" label="{{ trans('general.email') }}" form-group-class="col-span-6" not-required /> | ||||
|          | ||||
|                 <x-form.group.text name="phone" label="{{ trans('general.phone') }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <x-form.group.text name="tax_number" label="{{ trans('general.tax_number') }}" form-group-class="col-span-6" not-required /> | ||||
|          | ||||
|                 <x-form.group.currency without-add-new form-group-class="col-span-6" /> | ||||
|             </div> | ||||
|         </div> | ||||
|          | ||||
|         <div id="tab-address" data-tabs-content="address" x-show="active === 'address'"> | ||||
|             <div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5">       | ||||
|                 <x-form.group.textarea name="address" label="{{ trans('general.address') }}" form-group-class="col-span-6" not-required /> | ||||
|          | ||||
|                 <x-form.group.text name="city" label="{{ trans_choice('general.cities', 1) }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <x-form.group.text name="zip_code" label="{{ trans('general.zip_code') }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <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" /> | ||||
|             </div> | ||||
|         </div> | ||||
|  | ||||
|         <div id="tab-other" data-tabs-content="other" x-show="active === 'other'"> | ||||
|             <div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5"> | ||||
|                 <x-form.group.text name="website" label="{{ trans('general.website') }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <x-form.group.text name="reference" label="{{ trans('general.reference') }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <x-form.input.hidden name="type" value="vendor" /> | ||||
|                 <x-form.input.hidden name="enabled" value="1" /> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| </x-form> | ||||
|   | ||||
							
								
								
									
										90
									
								
								resources/views/modals/vendors/edit.blade.php
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										90
									
								
								resources/views/modals/vendors/edit.blade.php
									
									
									
									
										vendored
									
									
								
							| @@ -1,18 +1,90 @@ | ||||
| <x-form id="form-edit-vendor" method="PATCH" :route="['vendors.update', $vendor->id]" :model="$vendor"> | ||||
|     <div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5"> | ||||
|         <x-form.group.text name="name" label="{{ trans('general.name') }}" /> | ||||
|     <div x-data="{ active: 'general' }"> | ||||
|         <div> | ||||
|             <div> | ||||
|                 <ul class="grid grid-cols-6"> | ||||
|                     <li class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link col-span-2" | ||||
|                         id="tab-general" | ||||
|                         data-id="tab-general" | ||||
|                         data-tabs="general" | ||||
|                         x-on:click="active = 'general'" | ||||
|                         x-bind:class="active != 'general' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'" | ||||
|                     > | ||||
|                         {{ trans('general.general') }} | ||||
|  | ||||
|         <x-form.group.text name="email" label="{{ trans('general.email') }}" not-required /> | ||||
|                         <span class="invalid-feedback block text-xs text-red whitespace-normal" v-if="form.errors.has('name')||form.errors.has('email')||form.errors.has('phone')||form.errors.has('tax_number')||form.errors.has('currency_code')"> | ||||
|                             {{ trans('general.validation_error') }} | ||||
|                         </span> | ||||
|                     </li> | ||||
|  | ||||
|         <x-form.group.text name="tax_number" label="{{ trans('general.tax_number') }}" not-required /> | ||||
|                     <li class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link col-span-2" | ||||
|                         id="tab-address" | ||||
|                         data-id="tab-address" | ||||
|                         data-tabs="address" | ||||
|                         x-on:click="active = 'address'" | ||||
|                         x-bind:class="active != 'address' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'" | ||||
|                     > | ||||
|                         {{ trans('general.address') }} | ||||
|  | ||||
|         <x-form.group.currency without-add-new /> | ||||
|                         <span class="invalid-feedback block text-xs text-red whitespace-normal" v-if="form.errors.has('address')||form.errors.has('city')||form.errors.has('zip_code')||form.errors.has('state')||form.errors.has('country')"> | ||||
|                             {{ trans('general.validation_error') }} | ||||
|                         </span> | ||||
|                     </li> | ||||
|  | ||||
|         <x-form.group.textarea name="address" label="{{ trans('general.address') }}" /> | ||||
|                     <li class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link col-span-2" | ||||
|                         id="tab-other" | ||||
|                         data-id="tab-other" | ||||
|                         data-tabs="other" | ||||
|                         x-on:click="active = 'other'" | ||||
|                         x-bind:class="active != 'other' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'" | ||||
|                     > | ||||
|                         {{ trans_choice('general.others', 1) }} | ||||
|  | ||||
|         <x-form.group.country /> | ||||
|                         <span class="invalid-feedback block text-xs text-red whitespace-normal" v-if="form.errors.has('website')||form.errors.has('reference')"> | ||||
|                             {{ trans('general.validation_error') }} | ||||
|                         </span> | ||||
|                     </li> | ||||
|                 </ul> | ||||
|             </div> | ||||
|         </div> | ||||
|  | ||||
|         <x-form.input.hidden name="type" value="vendor" /> | ||||
|         <x-form.input.hidden name="enabled" value="1" /> | ||||
|         <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.text name="name" label="{{ trans('general.name') }}" form-group-class="col-span-6" /> | ||||
|  | ||||
|                 <x-form.group.text name="email" label="{{ trans('general.email') }}" form-group-class="col-span-6" not-required /> | ||||
|          | ||||
|                 <x-form.group.text name="phone" label="{{ trans('general.phone') }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <x-form.group.text name="tax_number" label="{{ trans('general.tax_number') }}" form-group-class="col-span-6" not-required /> | ||||
|          | ||||
|                 <x-form.group.currency without-add-new form-group-class="col-span-6" /> | ||||
|             </div> | ||||
|         </div> | ||||
|          | ||||
|         <div id="tab-address" data-tabs-content="address" x-show="active === 'address'"> | ||||
|             <div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5">       | ||||
|                 <x-form.group.textarea name="address" label="{{ trans('general.address') }}" form-group-class="col-span-6" not-required /> | ||||
|          | ||||
|                 <x-form.group.text name="city" label="{{ trans_choice('general.cities', 1) }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <x-form.group.text name="zip_code" label="{{ trans('general.zip_code') }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <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" /> | ||||
|             </div> | ||||
|         </div> | ||||
|  | ||||
|         <div id="tab-other" data-tabs-content="other" x-show="active === 'other'"> | ||||
|             <div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5"> | ||||
|                 <x-form.group.text name="website" label="{{ trans('general.website') }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <x-form.group.text name="reference" label="{{ trans('general.reference') }}" form-group-class="col-span-6" not-required /> | ||||
|  | ||||
|                 <x-form.input.hidden name="type" value="vendor" /> | ||||
|                 <x-form.input.hidden name="enabled" value="1" /> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| </x-form> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user