feat: DB 연결 오버라이딩 및 대시보드 통계 위젯 추가
- DB 연결: 로컬/Docker 환경 오버라이딩 설정 (.env) - 테넌트 위젯: redirect 버그 수정 (TenantSelectorWidget) - 통계 위젯: 사용자/제품/자재/주문 카드 추가 (StatsOverviewWidget) - 리소스 한국어화: Product, Material 모델 레이블 추가 - 대시보드: 위젯 등록 및 캐시 최적화 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Api\V1\BomResolver;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ResolvePreviewRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'input_parameters' => ['required', 'array', 'min:1'],
|
||||
'input_parameters.*' => ['required'],
|
||||
'bom_template_id' => ['sometimes', 'integer', 'min:1'],
|
||||
'include_calculated_values' => ['boolean'],
|
||||
'include_bom_items' => ['boolean'],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get custom attribute names for validator errors.
|
||||
*/
|
||||
public function attributes(): array
|
||||
{
|
||||
return [
|
||||
'input_parameters' => __('validation.attributes.input_parameters'),
|
||||
'bom_template_id' => __('validation.attributes.bom_template_id'),
|
||||
'include_calculated_values' => __('validation.attributes.include_calculated_values'),
|
||||
'include_bom_items' => __('validation.attributes.include_bom_items'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare the data for validation.
|
||||
*/
|
||||
protected function prepareForValidation(): void
|
||||
{
|
||||
$this->merge([
|
||||
'include_calculated_values' => $this->boolean('include_calculated_values', true),
|
||||
'include_bom_items' => $this->boolean('include_bom_items', true),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user