Fix all page controllers and missing enums
- Update all controllers to pass required variables to views - Add MediaTypeEnum, OrderTypeEnum, TrackingActionTypeEnum enums - Fix RoleEnum, OrderStatusEnum completeness Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
33
app/Enums/MediaTypeEnum.php
Normal file
33
app/Enums/MediaTypeEnum.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum MediaTypeEnum: string
|
||||
{
|
||||
case ALL = 'all';
|
||||
case PASSPORT_CUSTOMER = 'passport_customer';
|
||||
case OBJECT_PHOTO = 'object_photo';
|
||||
case OBJECT_FILES = 'object_files';
|
||||
case CERTIFICATE = 'certificate';
|
||||
case APPRAISER_CERTIFICATE = 'appraiser_certificate';
|
||||
case INSURANCE_POLICY = 'insurance_policy';
|
||||
case COMPARES = 'compares';
|
||||
case PARTICIPATE_CERTIFICATE = 'participate_certificate';
|
||||
case ADDITIONAL = 'additional';
|
||||
|
||||
public static function getLabel(string $type): string
|
||||
{
|
||||
return match($type) {
|
||||
'passport_customer' => 'translation.passport-customer',
|
||||
'object_photo' => 'translation.object-photo',
|
||||
'object_files' => 'translation.object-files',
|
||||
'certificate' => 'translation.certificate',
|
||||
'appraiser_certificate' => 'translation.appraiser-certificate',
|
||||
'insurance_policy' => 'translation.insurance-policy',
|
||||
'compares' => 'translation.compares',
|
||||
'participate_certificate'=> 'translation.participate-certificate',
|
||||
'additional' => 'translation.additional',
|
||||
default => $type,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user