- Deleted `data-table-actions.vue` component as it is no longer needed. - Removed `CuttingResultPriceItem` type and related properties from `cutting.ts`. - Updated routes in `web.php` to eliminate stock verification routes and permissions. - Removed `StockTest.php` file and its associated tests for stock verification and management. - Adjusted `CuttingTest.php` to reflect changes in cutting results handling and removed references to product variants.
28 lines
700 B
PHP
28 lines
700 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Admin\Manage;
|
|
|
|
use App\Enums\Permission;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class CuttingDraftResultRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return $this->user()?->can(Permission::CUTTINGS_CREATE->value) ?? false;
|
|
}
|
|
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'product_name' => ['required', 'string', 'max:255'],
|
|
'cutting_result' => ['nullable', 'integer', 'min:1'],
|
|
'sample' => ['nullable', 'integer', 'min:0'],
|
|
'original_outside_sample' => ['nullable', 'integer', 'min:0'],
|
|
];
|
|
}
|
|
}
|