feat: update material_result handling in CuttingRequest, CuttingCreate, and CuttingEdit components

This commit is contained in:
Yoga Pangestu 2026-08-06 11:19:04 +07:00
parent 3ef948c47f
commit 1f39565754

View File

@ -22,10 +22,10 @@ public function rules(): array
'materials' => ['required', 'array', 'min:1'],
'materials.*.raw_material_price_id' => ['required', 'integer', 'exists:raw_material_prices,id'],
'materials.*.material_usage' => ['required', 'integer', 'min:1'],
'materials.*.material_result' => ['required', 'integer', 'min:1'],
'materials.*.combination_index' => ['nullable', 'integer', 'min:1'],
'materials.*.material_result' => ['required', 'integer'],
'materials.*.combination_index' => ['nullable', 'integer'],
'combinations' => ['nullable', 'array'],
'combinations.*.material_result' => ['nullable', 'integer', 'min:1'],
'combinations.*.material_result' => ['nullable', 'integer'],
'photo_key' => ['nullable', 'string', 'max:500'],
];
}