remove "allowed" on referral. its now a permission
This commit is contained in:
parent
f72447dfa1
commit
28afc71d7f
2 changed files with 1 additions and 12 deletions
|
@ -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',
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue