Enhance product management and coupon features

- Added styling for input group add-ons and additional fields in SCSS.
- Updated shop coupon view to include a new column for usage count.
- Display coupon code and amount in order details if applicable.
- Improved product edit template to handle custom fields with required validation.
- Modified product save logic to include custom field requirements.
- Enhanced decimal normalization function for better input handling.
- Implemented checkbox normalization for form submissions.
- Updated custom fields in product templates to reflect required status.
- Fixed URL for fetching changelog updates.
This commit is contained in:
2025-08-19 20:35:24 +02:00
parent 325aabc0e8
commit 4897ef132a
16 changed files with 172 additions and 57 deletions

View File

@@ -12,11 +12,11 @@ $grid -> search = [
[ 'name' => 'Wysłany', 'db' => 'send', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ]
];
$grid -> columns_view = [
[
[
'name' => 'Lp.',
'th' => [ 'class' => 'g-lp' ],
'td' => [ 'class' => 'g-center' ],
'autoincrement' => true
'autoincrement' => true
], [
'name' => 'Aktywny',
'db' => 'status',
@@ -24,6 +24,11 @@ $grid -> columns_view = [
'td' => [ 'class' => 'g-center' ],
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
'sort' => true
], [
'name' => 'Użyto X razy',
'db' => 'used_count',
'td' => [ 'class' => 'g-center' ],
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
], [
'name' => 'Nazwa',
'db' => 'name',
@@ -60,22 +65,22 @@ $grid -> columns_view = [
'db' => 'date_used',
'td' => [ 'class' => 'g-center' ],
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ]
], [
'name' => 'Edytuj',
'action' => [ 'type' => 'edit', 'url' => '/admin/shop_coupon/coupon_edit/id=[id]' ],
], [
'name' => 'Edytuj',
'action' => [ 'type' => 'edit', 'url' => '/admin/shop_coupon/coupon_edit/id=[id]' ],
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
'td' => [ 'class' => 'g-center' ]
], [
'name' => 'Usuń',
'action' => [ 'type' => 'delete', 'url' => '/admin/shop_coupon/coupon_delete/id=[id]' ],
], [
'name' => 'Usuń',
'action' => [ 'type' => 'delete', 'url' => '/admin/shop_coupon/coupon_delete/id=[id]' ],
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
'td' => [ 'class' => 'g-center' ]
]
];
$grid -> buttons = [
[
'label' => 'Dodaj kupon',
'url' => '/admin/shop_coupon/coupon_edit/',
[
'label' => 'Dodaj kupon',
'url' => '/admin/shop_coupon/coupon_edit/',
'icon' => 'fa-plus-circle',
'class' => 'btn-success'
]