Enhance user role checks and update card order tabs visibility
- Updated the isSystemUser method to include currency maintainers in role checks. - Modified getTabs method in ListCardOrders to return an empty array for non-system users. - Added a dehydrate state function for Turkmen phone numbers in UserForm schema.
This commit is contained in:
1 parent
8e548126b2
commit
6a700fbd4b
4 files changed
+76
-1
No files matched your search
@@ -21,7 +21,12 @@ protected function getHeaderActions(): array
|
||||
|
||||
public function getTabs(): array
|
||||
{
|
||||
if (! user()->isSystemUser()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$data = [];
|
||||
|
||||
foreach (array_keys(OrderStatusRepository::statusClasses()) as $status) {
|
||||
if ($status === '') {
|
||||
$data[null] = Tab::make(__('All'));
|
||||
|
||||
@@ -32,6 +32,7 @@ public static function configure(Schema $schema): Schema
|
||||
->unique(ignoreRecord: true)
|
||||
->mask('99 99 99 99')
|
||||
->prefix('+993')
|
||||
->dehydrateStateUsing(fn($state) => unMaskTurkmenNumber($state))
|
||||
->rules([
|
||||
new PhoneNumberVerificationRule,
|
||||
])
|
||||
|
||||
Reference in new issue
Block a user