diff --git a/app/Http/Controllers/ModalController.php b/app/Http/Controllers/ModalController.php index fab491a5f444..0067b8acb75f 100644 --- a/app/Http/Controllers/ModalController.php +++ b/app/Http/Controllers/ModalController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers; use App\Helpers\Helper; +use App\Models\AssetModel; class ModalController extends Controller { @@ -41,7 +42,11 @@ public function show ($type, $itemId = null) { if ($type == "statuslabel") { $view->with('statuslabel_types', Helper::statusTypeList()); - } + } + if ($type == "model") { + $view->with('depreciation_list', Helper::depreciationList()) + ->with('item', new AssetModel); + } if (in_array($type, ['kit-model', 'kit-license', 'kit-consumable', 'kit-accessory'])) { $view->with('kitId', $itemId); } diff --git a/resources/views/modals/model.blade.php b/resources/views/modals/model.blade.php index fb1650eee7d2..1f773bb6b60f 100644 --- a/resources/views/modals/model.blade.php +++ b/resources/views/modals/model.blade.php @@ -2,20 +2,29 @@ + @include('modals.partials.footer') + diff --git a/resources/views/modals/partials/categories-select.blade.php b/resources/views/modals/partials/categories-select.blade.php index 116a0808e9c4..e3e77afe63ac 100644 --- a/resources/views/modals/partials/categories-select.blade.php +++ b/resources/views/modals/partials/categories-select.blade.php @@ -3,7 +3,7 @@ $required = $required ?? ''; @endphp
-
+
diff --git a/resources/views/modals/partials/depreciation.blade.php b/resources/views/modals/partials/depreciation.blade.php new file mode 100644 index 000000000000..4e2fd47ad6f5 --- /dev/null +++ b/resources/views/modals/partials/depreciation.blade.php @@ -0,0 +1,11 @@ + +
+
+ +
+
+ {{ Form::select('depreciation_id', $depreciation_list , old('depreciation_id', $item->depreciation_id), array('class'=>'select2', 'style'=>'width:100%;', 'aria-label'=>'depreciation_id')) }} + {!! $errors->first('depreciation_id', '') !!} +
+
+ \ No newline at end of file diff --git a/resources/views/modals/partials/eol_months.blade.php b/resources/views/modals/partials/eol_months.blade.php new file mode 100644 index 000000000000..5035d1c9c566 --- /dev/null +++ b/resources/views/modals/partials/eol_months.blade.php @@ -0,0 +1,22 @@ + +
+
+ +
+
+
+ + + {{ trans('general.months') }} + +
+ {!! $errors->first('eol', '') !!} +
+
+ \ No newline at end of file diff --git a/resources/views/modals/partials/fieldset-select.blade.php b/resources/views/modals/partials/fieldset-select.blade.php index 3f4efc24b6d7..59ca5c3c7116 100644 --- a/resources/views/modals/partials/fieldset-select.blade.php +++ b/resources/views/modals/partials/fieldset-select.blade.php @@ -1,6 +1,6 @@
-
+
{{ Form::select('fieldset_id', Helper::customFieldsetList(),old('fieldset_id'), array('class'=>'select2', 'id'=>'modal-fieldset_id', 'style'=>'width:100%;')) }}
\ No newline at end of file diff --git a/resources/views/modals/partials/manufacturer-select.blade.php b/resources/views/modals/partials/manufacturer-select.blade.php index 810292067e45..3c951ad3925e 100644 --- a/resources/views/modals/partials/manufacturer-select.blade.php +++ b/resources/views/modals/partials/manufacturer-select.blade.php @@ -1,6 +1,6 @@
-
+
diff --git a/resources/views/modals/partials/minimum_quantity.blade.php b/resources/views/modals/partials/minimum_quantity.blade.php new file mode 100644 index 000000000000..460be92c95ac --- /dev/null +++ b/resources/views/modals/partials/minimum_quantity.blade.php @@ -0,0 +1,27 @@ + +
+
+ +
+
+ + {!! $errors->first('min_amt', '') !!} +
+
+ \ No newline at end of file diff --git a/resources/views/modals/partials/model-number.blade.php b/resources/views/modals/partials/model-number.blade.php index 2691f30d4882..0a9f1805ed13 100644 --- a/resources/views/modals/partials/model-number.blade.php +++ b/resources/views/modals/partials/model-number.blade.php @@ -1,6 +1,6 @@
-
+
\ No newline at end of file diff --git a/resources/views/modals/partials/name.blade.php b/resources/views/modals/partials/name.blade.php index 6a64ed525f16..1647852f7bab 100644 --- a/resources/views/modals/partials/name.blade.php +++ b/resources/views/modals/partials/name.blade.php @@ -3,7 +3,7 @@ $required = $required ?? ''; @endphp
-
diff --git a/resources/views/modals/partials/notes.blade.php b/resources/views/modals/partials/notes.blade.php new file mode 100644 index 000000000000..5d6a06cba80e --- /dev/null +++ b/resources/views/modals/partials/notes.blade.php @@ -0,0 +1,17 @@ + +
+
+ +
+
+ + {!! $errors->first('notes', '') !!} +
+
+ \ No newline at end of file diff --git a/resources/views/modals/partials/requestable.blade.php b/resources/views/modals/partials/requestable.blade.php new file mode 100644 index 000000000000..d844cd99f57c --- /dev/null +++ b/resources/views/modals/partials/requestable.blade.php @@ -0,0 +1,17 @@ + +
+
+
+ requestable) == '1' ? 'checked="checked"' : '' }} + style="margin-right: 10px;" + > + {{ $requestable_text }} +
+
+
+ \ No newline at end of file