coupon code system eingeführt. coupons werden vom super admin gemanaged. coupons werden mit paddle synchronisiert und dort validiert. plus: einige mobil-optimierungen im tenant admin pwa.
This commit is contained in:
23
app/Enums/CouponStatus.php
Normal file
23
app/Enums/CouponStatus.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum CouponStatus: string
|
||||
{
|
||||
case DRAFT = 'draft';
|
||||
case ACTIVE = 'active';
|
||||
case SCHEDULED = 'scheduled';
|
||||
case PAUSED = 'paused';
|
||||
case ARCHIVED = 'archived';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::DRAFT => __('Draft'),
|
||||
self::ACTIVE => __('Active'),
|
||||
self::SCHEDULED => __('Scheduled'),
|
||||
self::PAUSED => __('Paused'),
|
||||
self::ARCHIVED => __('Archived'),
|
||||
};
|
||||
}
|
||||
}
|
||||
19
app/Enums/CouponType.php
Normal file
19
app/Enums/CouponType.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum CouponType: string
|
||||
{
|
||||
case PERCENTAGE = 'percentage';
|
||||
case FLAT = 'flat';
|
||||
case FLAT_PER_SEAT = 'flat_per_seat';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::PERCENTAGE => __('Percentage'),
|
||||
self::FLAT => __('Flat amount'),
|
||||
self::FLAT_PER_SEAT => __('Flat per seat'),
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user