mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
I have no idea why this was necessary suddenly
This commit is contained in:
parent
b80b91514d
commit
26fd7f7e79
|
@ -42,8 +42,11 @@ class CustomFieldsetsController extends Controller
|
||||||
if ($cfset) {
|
if ($cfset) {
|
||||||
$custom_fields_list = ["" => "Add New Field to Fieldset"] + CustomField::pluck("name", "id")->toArray();
|
$custom_fields_list = ["" => "Add New Field to Fieldset"] + CustomField::pluck("name", "id")->toArray();
|
||||||
|
|
||||||
|
|
||||||
$maxid = 0;
|
$maxid = 0;
|
||||||
foreach ($cfset->fields() as $field) {
|
foreach ($cfset->fields() as $field) {
|
||||||
|
|
||||||
|
if ($field) {
|
||||||
if ($field->pivot->order > $maxid) {
|
if ($field->pivot->order > $maxid) {
|
||||||
$maxid=$field->pivot->order;
|
$maxid=$field->pivot->order;
|
||||||
}
|
}
|
||||||
|
@ -52,6 +55,8 @@ class CustomFieldsetsController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return view("custom_fields.fieldsets.view")
|
return view("custom_fields.fieldsets.view")
|
||||||
->with("custom_fieldset", $cfset)
|
->with("custom_fieldset", $cfset)
|
||||||
->with("maxid", $maxid+1)
|
->with("maxid", $maxid+1)
|
||||||
|
|
Loading…
Reference in a new issue