fix handle error and add note for shippings receive approve and reject mutations

This commit is contained in:
2025-06-13 14:19:12 +07:00
parent b2bfd666a7
commit 2f5eff9e63
28 changed files with 13055 additions and 154 deletions

View File

@@ -37,4 +37,31 @@ enum MutationStatus: string
self::CANCELLED => 'secondary',
};
}
public function textColorClass(): string
{
return match($this->color()) {
'success' => 'text-success',
'warning' => 'text-warning',
'danger' => 'text-danger',
'info' => 'text-info',
'primary' => 'text-primary',
'brand' => 'text-primary',
'secondary' => 'text-muted',
default => 'text-dark'
};
}
public static function getOptions(): array
{
return [
self::PENDING->value => self::PENDING->label(),
self::SENT->value => self::SENT->label(),
self::RECEIVED->value => self::RECEIVED->label(),
self::APPROVED->value => self::APPROVED->label(),
self::REJECTED->value => self::REJECTED->label(),
self::COMPLETED->value => self::COMPLETED->label(),
self::CANCELLED->value => self::CANCELLED->label(),
];
}
}