feat: add quarter field to company history items with localization support, enhancing data organization and user experience
This commit is contained in:
@@ -26,6 +26,16 @@ class CompanyHistoryItemForm
|
||||
];
|
||||
}
|
||||
|
||||
public static function quarterOptions(): array
|
||||
{
|
||||
return [
|
||||
'Q1' => __('company_history.quarter_q1'),
|
||||
'Q2' => __('company_history.quarter_q2'),
|
||||
'Q3' => __('company_history.quarter_q3'),
|
||||
'Q4' => __('company_history.quarter_q4'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function colorPresets(): array
|
||||
{
|
||||
return [
|
||||
@@ -52,6 +62,13 @@ class CompanyHistoryItemForm
|
||||
->minValue(1900)
|
||||
->maxValue(2100),
|
||||
|
||||
Select::make('quarter')
|
||||
->label(__('company_history.quarter_field'))
|
||||
->options(self::quarterOptions())
|
||||
->default('Q1')
|
||||
->required()
|
||||
->native(false),
|
||||
|
||||
TextInput::make('title')
|
||||
->label(__('company_history.title_field'))
|
||||
->required()
|
||||
|
||||
+7
-1
@@ -25,6 +25,12 @@ class CompanyHistoryItemsTable
|
||||
->sortable()
|
||||
->alignCenter(),
|
||||
|
||||
TextColumn::make('quarter')
|
||||
->label(__('company_history.quarter_field'))
|
||||
->badge()
|
||||
->sortable()
|
||||
->alignCenter(),
|
||||
|
||||
ColorColumn::make('color')
|
||||
->label(__('company_history.color_field')),
|
||||
|
||||
@@ -88,7 +94,7 @@ class CompanyHistoryItemsTable
|
||||
->label(__('company_history.force_delete')),
|
||||
]),
|
||||
])
|
||||
->defaultSort('sort_order', 'asc')
|
||||
->defaultSort('year', 'asc')
|
||||
->reorderable('sort_order');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user