-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from khalidmaquilang/dev
v2.3.0 - SI-79 | Hotfix | todays widget + SI-78 | Hotfix | remove currency + SI-75 | Hotfix | sale view fix + SI-74 | Feature | fix plan fields + SI-84 | Feature | add prefix and fix company resource + SI-80 | Feature | Added Scheduler to check expired subscriptions + SI-82 | Feature | added sentry + SI-64 | Feature | goods issue + SI-85 | Feature | able to display limit + SI-86 | Hotfix | fix inventory creation
- Loading branch information
Showing
73 changed files
with
2,867 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,3 +62,4 @@ AWS_BUCKET= | |
AWS_USE_PATH_STYLE_ENDPOINT=false | ||
|
||
VITE_APP_NAME="${APP_NAME}" | ||
SENTRY_LARAVEL_DSN= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## :rocket: Deployment | ||
- Run X, Y, Z on bas1 | ||
- Add the missing env variables | ||
|
||
## Migrations | ||
- 2021_07_23_214950_add_show_in_public_folder_column_to_contact_lists_table.php => `contact_lists` table | ||
- 2021_09_16_010719_alter_filters_table.php => `filters` table | ||
|
||
## Packages | ||
- Updated package A | ||
- Added package B | ||
|
||
## :memo: Changes | ||
**Change 1:** | ||
- What has changed? | ||
|
||
Add links and screenshots here | ||
|
||
<hr> | ||
|
||
**Change 2:** | ||
- What has changed? | ||
|
||
Add links and screenshots here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use App\Enums\SubscriptionStatusEnum; | ||
use App\Events\PrepareFreemium; | ||
use App\Services\SubscriptionService; | ||
use Illuminate\Console\Command; | ||
|
||
class CheckExpiredSubscriptions extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'app:check-expired-subscriptions'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = "This command checks for active subscriptions that have expired based on their `end_date`. Expired subscriptions are then marked as 'expired', and you can add additional logic here to handle notifications, access restrictions, or other relevant actions."; | ||
|
||
/** | ||
* Execute the console command. | ||
*/ | ||
public function handle(SubscriptionService $subscriptionService) | ||
{ | ||
$subscriptions = $subscriptionService->getExpiredSubscriptions(); | ||
foreach ($subscriptions as $subscription) { | ||
$subscription->status = SubscriptionStatusEnum::PAST_DUE; | ||
$subscription->save(); | ||
|
||
event(new PrepareFreemium($subscription->company)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace App\Enums; | ||
|
||
use Filament\Support\Contracts\HasColor; | ||
use Filament\Support\Contracts\HasLabel; | ||
|
||
enum GoodsIssueTypeEnum: string implements HasColor, HasLabel | ||
{ | ||
case SALE = 'sale'; | ||
case TRANSFER = 'transfer'; | ||
case WRITE_OFF = 'write_off'; | ||
case RTO = 'return_to_supplier'; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getLabel(): string | ||
{ | ||
return match ($this) { | ||
self::SALE => 'Sale', | ||
self::TRANSFER => 'Transfer', | ||
self::WRITE_OFF => 'Write Off', | ||
self::RTO => 'Return To Supplier', | ||
}; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getColor(): string | ||
{ | ||
return match ($this) { | ||
self::SALE => 'success', | ||
self::TRANSFER => 'info', | ||
self::WRITE_OFF => 'gray', | ||
self::RTO => 'danger', | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\Enums\GoodsIssueTypeEnum; | ||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Broadcasting\PrivateChannel; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class GoodsIssueCreated | ||
{ | ||
use Dispatchable, InteractsWithSockets, SerializesModels; | ||
|
||
/** | ||
* Create a new event instance. | ||
*/ | ||
public function __construct( | ||
public int $productId, | ||
public int $quantity, | ||
public int $userId, | ||
public GoodsIssueTypeEnum $type, | ||
public ?string $customerId = null, | ||
public ?string $supplierId = null, | ||
public string $referenceNumber = '', | ||
) { | ||
// | ||
} | ||
|
||
/** | ||
* Get the channels the event should broadcast on. | ||
* | ||
* @return array<int, \Illuminate\Broadcasting\Channel> | ||
*/ | ||
public function broadcastOn(): array | ||
{ | ||
return [ | ||
new PrivateChannel('channel-name'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\Models\Company; | ||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Broadcasting\PrivateChannel; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class PrepareFreemium | ||
{ | ||
use Dispatchable, InteractsWithSockets, SerializesModels; | ||
|
||
/** | ||
* Create a new event instance. | ||
*/ | ||
public function __construct(public Company $company) | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Get the channels the event should broadcast on. | ||
* | ||
* @return array<int, \Illuminate\Broadcasting\Channel> | ||
*/ | ||
public function broadcastOn(): array | ||
{ | ||
return [ | ||
new PrivateChannel('channel-name'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.