wip
This commit is contained in:
@@ -61,13 +61,13 @@ class OnlinePaymentHistoryResource extends Resource
|
|||||||
Text::make('Desc', 'description'),
|
Text::make('Desc', 'description'),
|
||||||
|
|
||||||
Badge::make(__('Status'), 'paymentStatus')
|
Badge::make(__('Status'), 'paymentStatus')
|
||||||
->map(OrderRepo::statusClasses())
|
->map(OnlinePaymentRepo::statusClasses())
|
||||||
->addTypes([
|
->addTypes([
|
||||||
'primary' => 'dark:bg-gray-900 bg-gray-600 text-white',
|
'primary' => 'dark:bg-gray-900 bg-gray-600 text-white',
|
||||||
])
|
])
|
||||||
->labels(OrderRepo::statusValues())
|
->labels(OnlinePaymentRepo::statusValues())
|
||||||
->withIcons()
|
->withIcons()
|
||||||
->icons(OrderRepo::statusIcons())
|
->icons(OnlinePaymentRepo::statusIcons())
|
||||||
->sortable(),
|
->sortable(),
|
||||||
|
|
||||||
Text::make('username', 'username'),
|
Text::make('username', 'username'),
|
||||||
|
|||||||
@@ -41,6 +41,38 @@ class OnlinePaymentRepo
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tailwind
|
||||||
|
*
|
||||||
|
* @return array<string, string>
|
||||||
|
*/
|
||||||
|
public static function statusClasses(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
null => '-',
|
||||||
|
self::PENDING => 'warning',
|
||||||
|
self::PAID => 'success',
|
||||||
|
self::FAILED => 'danger',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Status icons
|
||||||
|
*
|
||||||
|
* @return array<string, string>
|
||||||
|
*/
|
||||||
|
public static function statusIcons(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
null => '-',
|
||||||
|
'success' => 'check-circle',
|
||||||
|
'info' => 'information-circle',
|
||||||
|
'primary' => 'clipboard-list',
|
||||||
|
'danger' => 'ban',
|
||||||
|
'warning' => 'exclamation-circle',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set price
|
* Set price
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user