diff --git a/app/Settings/ReferralSettings.php b/app/Settings/ReferralSettings.php index e49fbaae..47d08646 100644 --- a/app/Settings/ReferralSettings.php +++ b/app/Settings/ReferralSettings.php @@ -6,7 +6,6 @@ use Spatie\LaravelSettings\Settings; class ReferralSettings extends Settings { - public string $allowed; public bool $always_give_commission; public bool $enabled; public ?float $reward; @@ -43,19 +42,10 @@ class ReferralSettings extends Settings { return [ 'category_icon' => 'fas fa-user-friends', - 'allowed' => [ - 'label' => 'Allowed', - 'type' => 'select', - 'description' => 'Who is allowed to see their referral-URL', - 'options' => [ - 'everyone' => 'Everyone', - 'clients' => 'Clients', - ], - ], 'always_give_commission' => [ 'label' => 'Always Give Commission', 'type' => 'boolean', - 'description' => 'Always give commission to the referrer.', + 'description' => 'Always give commission to the referrer or only on the first Purchase.', ], 'enabled' => [ 'label' => 'Enabled', diff --git a/database/settings/2023_02_01_182135_create_referral_settings.php b/database/settings/2023_02_01_182135_create_referral_settings.php index 8a2cde82..5727557b 100644 --- a/database/settings/2023_02_01_182135_create_referral_settings.php +++ b/database/settings/2023_02_01_182135_create_referral_settings.php @@ -10,7 +10,6 @@ class CreateReferralSettings extends SettingsMigration $table_exists = DB::table('settings_old')->exists(); // Get the user-set configuration values from the old table. - $this->migrator->add('referral.allowed', $table_exists ? $this->getOldValue('SETTINGS::REFERRAL::ALLOWED') : 'client'); $this->migrator->add('referral.always_give_commission', $table_exists ? $this->getOldValue('SETTINGS::REFERRAL::ALWAYS_GIVE_COMMISSION') : false); $this->migrator->add('referral.enabled', $table_exists ? $this->getOldValue('SETTINGS::REFERRAL::ENABLED') : false); $this->migrator->add('referral.reward', $table_exists ? $this->getOldValue('SETTINGS::REFERRAL::REWARD') : 100);