partial update create mutations

This commit is contained in:
2025-06-12 00:33:59 +07:00
parent 0b211915f1
commit a5e1348436
32 changed files with 2883 additions and 548 deletions

View File

@@ -0,0 +1,40 @@
<?php
namespace App\Enums;
enum MutationStatus: string
{
case PENDING = 'pending';
case SENT = 'sent';
case RECEIVED = 'received';
case APPROVED = 'approved';
case REJECTED = 'rejected';
case COMPLETED = 'completed';
case CANCELLED = 'cancelled';
public function label(): string
{
return match($this) {
self::PENDING => 'Menunggu Konfirmasi',
self::SENT => 'Terkirim ke Dealer',
self::RECEIVED => 'Diterima Dealer',
self::APPROVED => 'Disetujui',
self::REJECTED => 'Ditolak',
self::COMPLETED => 'Selesai',
self::CANCELLED => 'Dibatalkan',
};
}
public function color(): string
{
return match($this) {
self::PENDING => 'warning',
self::SENT => 'primary',
self::RECEIVED => 'info',
self::APPROVED => 'brand',
self::REJECTED => 'danger',
self::COMPLETED => 'success',
self::CANCELLED => 'secondary',
};
}
}