From cc227b811497e6a698145765bc9cb964632cc0ac Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Thu, 13 Aug 2026 17:42:24 +0700 Subject: [PATCH] feat: update application settings by removing obsolete fields and adding new HR and homepage settings --- .../2026_06_11_085959_create_app_settings.php | 22 +++++- ...0502_remove_system_media_from_settings.php | 15 ---- ...7_000001_update_marketplace_fee_fields.php | 70 ------------------- .../2026_06_18_100000_create_hr_settings.php | 17 ----- ..._06_20_110000_create_homepage_settings.php | 23 ------ ...000_rename_deal_to_gallery_in_homepage.php | 18 ----- 6 files changed, 20 insertions(+), 145 deletions(-) delete mode 100644 database/settings/2026_06_11_120502_remove_system_media_from_settings.php delete mode 100644 database/settings/2026_06_17_000001_update_marketplace_fee_fields.php delete mode 100644 database/settings/2026_06_18_100000_create_hr_settings.php delete mode 100644 database/settings/2026_06_20_110000_create_homepage_settings.php delete mode 100644 database/settings/2026_06_20_120000_rename_deal_to_gallery_in_homepage.php diff --git a/database/settings/2026_06_11_085959_create_app_settings.php b/database/settings/2026_06_11_085959_create_app_settings.php index 6eeb8f3..a9142b1 100644 --- a/database/settings/2026_06_11_085959_create_app_settings.php +++ b/database/settings/2026_06_11_085959_create_app_settings.php @@ -14,8 +14,6 @@ public function up(): void $blueprint->add('about_app', ''); $blueprint->add('email', ''); $blueprint->add('phone', ''); - $blueprint->add('logo', ''); - $blueprint->add('login_cover', ''); }); $this->migrator->inGroup('social_media', function (SettingsBlueprint $blueprint): void { @@ -44,5 +42,25 @@ public function up(): void $blueprint->add('shopee_pre_order', MarketplaceFeeRule::defaultPercent(0.0)->toArray()); $blueprint->add('shopee_live_extra', MarketplaceFeeRule::defaultPercent(0.0)->toArray()); }); + + $this->migrator->inGroup('hr', function (SettingsBlueprint $blueprint): void { + $blueprint->add('scheduled_check_in_time', '08:00'); + $blueprint->add('scheduled_check_out_time', '17:00'); + $blueprint->add('late_penalty_amount', 0); + $blueprint->add('absent_penalty_amount', 0); + }); + + $this->migrator->inGroup('homepage', function (SettingsBlueprint $blueprint): void { + $blueprint->add('hero_image_url', 'https://images.unsplash.com/photo-1490481651871-ab68de25d43d?w=1000&auto=format&fit=crop&q=80'); + $blueprint->add('about_image_url', 'https://images.unsplash.com/photo-1595777457583-95e059d581b8?w=800&auto=format&fit=crop&q=80'); + $blueprint->add('gallery_images', [ + 'https://images.unsplash.com/photo-1595777457583-95e059d581b8?w=800&auto=format&fit=crop&q=80', + 'https://images.unsplash.com/photo-1572804013309-59a88b7e92f1?w=800&auto=format&fit=crop&q=80', + 'https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?w=800&auto=format&fit=crop&q=80', + 'https://images.unsplash.com/photo-1539109136881-3be0616acf4b?w=800&auto=format&fit=crop&q=80', + 'https://images.unsplash.com/photo-1496747611176-843222e1e57c?w=800&auto=format&fit=crop&q=80', + 'https://images.unsplash.com/photo-1509631179647-0177331693ae?w=800&auto=format&fit=crop&q=80', + ]); + }); } }; diff --git a/database/settings/2026_06_11_120502_remove_system_media_from_settings.php b/database/settings/2026_06_11_120502_remove_system_media_from_settings.php deleted file mode 100644 index d061e4f..0000000 --- a/database/settings/2026_06_11_120502_remove_system_media_from_settings.php +++ /dev/null @@ -1,15 +0,0 @@ -migrator->inGroup('system', function (SettingsBlueprint $blueprint): void { - $blueprint->delete('logo'); - $blueprint->delete('login_cover'); - }); - } -}; diff --git a/database/settings/2026_06_17_000001_update_marketplace_fee_fields.php b/database/settings/2026_06_17_000001_update_marketplace_fee_fields.php deleted file mode 100644 index c22dc98..0000000 --- a/database/settings/2026_06_17_000001_update_marketplace_fee_fields.php +++ /dev/null @@ -1,70 +0,0 @@ -migrator->inGroup('marketplace', function (SettingsBlueprint $blueprint): void { - $oldKeys = [ - 'tiktok_shop_admin_fee', - 'tiktok_shop_transaction_fee', - 'tiktok_shop_payment_fee', - 'tiktok_shop_affiliate_commission', - 'tiktok_shop_shipping_subsidy', - 'tiktok_shop_vat_rate', - 'shopee_commission_fee', - 'shopee_transaction_fee', - 'shopee_service_fee', - 'shopee_payment_fee', - 'shopee_affiliate_commission', - 'shopee_shipping_subsidy', - 'shopee_voucher_fee', - ]; - - $existing = DB::table('settings') - ->where('group', 'marketplace') - ->pluck('name') - ->toArray(); - - foreach ($oldKeys as $key) { - if (in_array($key, $existing)) { - $blueprint->delete($key); - } - } - - $newFields = [ - 'tiktok_shop_platform_commission', - 'tiktok_shop_logistics_service_fee', - 'tiktok_shop_dynamic_commission', - 'tiktok_shop_order_processing_fee', - 'tiktok_shop_affiliate', - 'tiktok_shop_pre_order_service_fee', - 'shopee_admin_fee', - 'shopee_program_fee', - 'shopee_shipping_savings', - 'shopee_premium', - 'shopee_service_fee', - 'shopee_order_processing_fee', - 'shopee_ams_commission_fee', - 'shopee_pre_order', - 'shopee_live_extra', - ]; - - $current = DB::table('settings') - ->where('group', 'marketplace') - ->pluck('name') - ->toArray(); - - foreach ($newFields as $key) { - if (! in_array($key, $current)) { - $blueprint->add($key, MarketplaceFeeRule::defaultPercent(0.0)->toArray()); - } - } - }); - } -}; diff --git a/database/settings/2026_06_18_100000_create_hr_settings.php b/database/settings/2026_06_18_100000_create_hr_settings.php deleted file mode 100644 index ad4e83e..0000000 --- a/database/settings/2026_06_18_100000_create_hr_settings.php +++ /dev/null @@ -1,17 +0,0 @@ -migrator->inGroup('hr', function (SettingsBlueprint $blueprint): void { - $blueprint->add('scheduled_check_in_time', '08:00'); - $blueprint->add('scheduled_check_out_time', '17:00'); - $blueprint->add('late_penalty_amount', 0); - $blueprint->add('absent_penalty_amount', 0); - }); - } -}; diff --git a/database/settings/2026_06_20_110000_create_homepage_settings.php b/database/settings/2026_06_20_110000_create_homepage_settings.php deleted file mode 100644 index 2141360..0000000 --- a/database/settings/2026_06_20_110000_create_homepage_settings.php +++ /dev/null @@ -1,23 +0,0 @@ -migrator->inGroup('homepage', function (SettingsBlueprint $blueprint): void { - $blueprint->add('hero_image_url', 'https://images.unsplash.com/photo-1490481651871-ab68de25d43d?w=1000&auto=format&fit=crop&q=80'); - $blueprint->add('about_image_url', 'https://images.unsplash.com/photo-1595777457583-95e059d581b8?w=800&auto=format&fit=crop&q=80'); - $blueprint->add('gallery_images', [ - 'https://images.unsplash.com/photo-1595777457583-95e059d581b8?w=800&auto=format&fit=crop&q=80', - 'https://images.unsplash.com/photo-1572804013309-59a88b7e92f1?w=800&auto=format&fit=crop&q=80', - 'https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?w=800&auto=format&fit=crop&q=80', - 'https://images.unsplash.com/photo-1539109136881-3be0616acf4b?w=800&auto=format&fit=crop&q=80', - 'https://images.unsplash.com/photo-1496747611176-843222e1e57c?w=800&auto=format&fit=crop&q=80', - 'https://images.unsplash.com/photo-1509631179647-0177331693ae?w=800&auto=format&fit=crop&q=80', - ]); - }); - } -}; diff --git a/database/settings/2026_06_20_120000_rename_deal_to_gallery_in_homepage.php b/database/settings/2026_06_20_120000_rename_deal_to_gallery_in_homepage.php deleted file mode 100644 index e9fa72c..0000000 --- a/database/settings/2026_06_20_120000_rename_deal_to_gallery_in_homepage.php +++ /dev/null @@ -1,18 +0,0 @@ -migrator->inGroup('homepage', function (SettingsBlueprint $blueprint): void { - $blueprint->delete('deal_badge'); - $blueprint->delete('deal_title'); - $blueprint->delete('deal_description'); - $blueprint->delete('deal_cta_text'); - $blueprint->delete('deal_images'); - }); - } -};