Codebase update

- Remove default pic assignments for unsold commodity notifications
- Check wabot credential complete first before notification blast, if incomplete no notification be sent
- Change migration column order for settings table, column group first
- Resolve error of not showing select after updating any PIC for selected day
This commit is contained in:
Afiq Hamzah
2024-06-10 18:32:02 +08:00
parent 3686fb93de
commit 119f6d6428
6 changed files with 176 additions and 58 deletions
@@ -12,6 +12,8 @@ class UnsoldCommodityNotificationSettingSeeders extends Seeder
*/
public function run()
{
Setting::where('group', 'unsold_commodity_notifications')->each(fn($x) => $x->delete());
$data = [
[
'key' => 'status',
@@ -39,43 +41,43 @@ class UnsoldCommodityNotificationSettingSeeders extends Seeder
],
[
'key' => 'pic_sunday',
'value' => '',
'value' => '[{}]',
'group' => 'unsold_commodity_notifications',
'description' => 'Person Incharge on Sunday',
],
[
'key' => 'pic_monday',
'value' => '',
'value' => '[{}]',
'group' => 'unsold_commodity_notifications',
'description' => 'Person Incharge on Monday',
],
[
'key' => 'pic_tuesday',
'value' => '',
'value' => '[{}]',
'group' => 'unsold_commodity_notifications',
'description' => 'Person Incharge on Tuesday',
],
[
'key' => 'pic_wednesday',
'value' => '',
'value' => '[{}]',
'group' => 'unsold_commodity_notifications',
'description' => 'Person Incharge on Wednesday',
],
[
'key' => 'pic_thursday',
'value' => '',
'value' => '[{}]',
'group' => 'unsold_commodity_notifications',
'description' => 'Person Incharge on Thursday',
],
[
'key' => 'pic_friday',
'value' => '',
'value' => '[{}]',
'group' => 'unsold_commodity_notifications',
'description' => 'Person Incharge on Friday',
],
[
'key' => 'pic_saturday',
'value' => '',
'value' => '[{}]',
'group' => 'unsold_commodity_notifications',
'description' => 'Person Incharge on Saturday',
],