|
17 | 17 | {{-- Page content --}} |
18 | 18 | @section('inputFields') |
19 | 19 |
|
20 | | -@include ('partials.forms.edit.name', ['translated_name' => trans('admin/components/table.title')]) |
21 | | -@include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id','category_type' => 'component']) |
| 20 | + <!-- Name --> |
| 21 | + <x-form-row name="name"> |
| 22 | + <x-form-label>{{ trans('general.name') }}</x-form-label> |
| 23 | + <x-form-input> |
| 24 | + <x-input.text |
| 25 | + required="true" |
| 26 | + :value="old('name', $item->name)" |
| 27 | + /> |
| 28 | + </x-form-input> |
| 29 | + </x-form-row> |
| 30 | + |
| 31 | + |
| 32 | + <!-- Category --> |
| 33 | + <x-form-row name="category_id"> |
| 34 | + <x-form-label>{{ trans('general.category') }}</x-form-label> |
| 35 | + <x-form-input modal_type="category" modal_id="category_select_id" category_type="component" new_model="\App\Models\Category::class"> |
| 36 | + <x-input.select2-ajax |
| 37 | + id="category_select_id" |
| 38 | + :data_placeholder="trans('general.select_asset')" |
| 39 | + :item="old('category_id', $item->category_id)" |
| 40 | + :new_button="true" |
| 41 | + :required="Helper::checkIfRequired($item, 'category_id')" |
| 42 | + :selected="old('category_id', $item->category_id)" |
| 43 | + data_endpoint="categories/component" |
| 44 | + item_model="\App\Models\Category" |
| 45 | + /> |
| 46 | + </x-form-input> |
| 47 | + </x-form-row> |
| 48 | + |
22 | 49 |
|
23 | 50 | <!-- QTY --> |
24 | 51 | <x-form-row name="qty"> |
|
49 | 76 | </x-form-row> |
50 | 77 |
|
51 | 78 | @include ('partials.forms.edit.serial', ['fieldname' => 'serial']) |
52 | | -@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id']) |
| 79 | + |
| 80 | + <!-- Manufacturer --> |
| 81 | + <x-form-row name="manufacturer_id"> |
| 82 | + <x-form-label>{{ trans('general.manufacturer') }}</x-form-label> |
| 83 | + <x-form-input modal_type="manufacturer" modal_id="manufacturer_select_id" new_model="\App\Models\Manufacturer::class"> |
| 84 | + <x-input.select2-ajax |
| 85 | + id="manufacturer_select_id" |
| 86 | + :data_placeholder="trans('general.manufacturer')" |
| 87 | + :item="old('manufacturer_id', $item->manufacturer_id)" |
| 88 | + :new_button="true" |
| 89 | + :required="Helper::checkIfRequired($item, 'manufacturer_id')" |
| 90 | + :selected="old('manufacturer_id', $item->manufacturer_id)" |
| 91 | + data_endpoint="manufacturers" |
| 92 | + item_model="\App\Models\Manufacturer" |
| 93 | + /> |
| 94 | + </x-form-input> |
| 95 | + </x-form-row> |
| 96 | + |
53 | 97 | @include ('partials.forms.edit.model_number') |
54 | 98 | @include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id']) |
55 | 99 | @include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id']) |
56 | 100 | @include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id']) |
57 | 101 | @include ('partials.forms.edit.order_number') |
58 | | -@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.purchase_date'),'fieldname' => 'purchase_date']) |
59 | | -@include ('partials.forms.edit.purchase_cost', ['unit_cost' => trans('general.unit_cost')]) |
60 | | -@include ('partials.forms.edit.notes') |
| 102 | + |
| 103 | +<!--- Purchase Date --> |
| 104 | +<x-form-row name="purchase_date"> |
| 105 | + <x-form-label>{{ trans('general.purchase_date') }}</x-form-label> |
| 106 | + <x-form-input> |
| 107 | + <x-input.datepicker :value="old('purchase_date', $item->purchase_date_for_datepicker)" /> |
| 108 | + </x-form-input> |
| 109 | +</x-form-row> |
| 110 | + |
| 111 | + |
| 112 | +<!-- Purchase Cost --> |
| 113 | +<x-form-row name="purchase_cost"> |
| 114 | + <x-form-label>{{ trans('general.unit_cost') }}</x-form-label> |
| 115 | + <x-form-input> |
| 116 | + <x-input.text |
| 117 | + type="number" |
| 118 | + :input_group_text="$snipeSettings->default_currency" |
| 119 | + :value="old('purchase_cost', $item->purchase_cost)" |
| 120 | + input_group_addon="left" |
| 121 | + input_max="99999999999999999.000" |
| 122 | + input_min="0" |
| 123 | + input_min="0.00" |
| 124 | + input_step="0.001" |
| 125 | + maxlength="25" |
| 126 | + /> |
| 127 | + </x-form-input> |
| 128 | +</x-form-row> |
| 129 | + |
| 130 | +<!-- Notes --> |
| 131 | +<x-form-row name="notes"> |
| 132 | + <x-form-label>{{ trans('general.notes') }}</x-form-label> |
| 133 | + <x-form-input> |
| 134 | + <x-input.textarea |
| 135 | + :value="old('notes', $item->notes)" |
| 136 | + placeholder="{{ trans('general.placeholders.notes') }}" |
| 137 | + /> |
| 138 | + </x-form-input> |
| 139 | +</x-form-row> |
| 140 | + |
61 | 141 | @include ('partials.forms.edit.image-upload', ['image_path' => app('components_upload_path')]) |
62 | 142 |
|
63 | 143 |
|
|
0 commit comments