Add payment status
This commit is contained in:
@@ -9,6 +9,7 @@ use App\Repos\Order\OrderRepo;
|
||||
use App\Repos\System\Settings\Location\RegionRepo;
|
||||
use Laravel\Nova\Fields\Badge;
|
||||
use Laravel\Nova\Fields\BelongsTo;
|
||||
use Laravel\Nova\Fields\Boolean;
|
||||
use Laravel\Nova\Fields\DateTime;
|
||||
use Laravel\Nova\Fields\ID;
|
||||
use Laravel\Nova\Fields\Select;
|
||||
@@ -52,6 +53,8 @@ class CardOrderFieldsForIndex
|
||||
|
||||
Text::make(__('Phone'), 'phone'),
|
||||
|
||||
Boolean::make(__('Paid'), 'paid'),
|
||||
|
||||
Badge::make(__('Status'), 'status')
|
||||
->map(OrderRepo::statusClasses())
|
||||
->addTypes([
|
||||
|
||||
27
app/Repos/Payment/PaymentStatusRepo.php
Normal file
27
app/Repos/Payment/PaymentStatusRepo.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repos\Payment;
|
||||
|
||||
class PaymentStatusRepo
|
||||
{
|
||||
/**
|
||||
* Resource has been paid
|
||||
*/
|
||||
public const PAID = 'paid';
|
||||
|
||||
/**
|
||||
* Resource has not been paid
|
||||
*/
|
||||
public const UNPAID = 'unpaid';
|
||||
|
||||
/**
|
||||
* Payment statuses
|
||||
*/
|
||||
public static function values(): array
|
||||
{
|
||||
return [
|
||||
self::PAID => __('Paid'),
|
||||
self::UNPAID => __('Unpaid'),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -178,5 +178,7 @@
|
||||
"Notes": "Примечания",
|
||||
"Price": "Цена",
|
||||
"Active": "Активный",
|
||||
"Homepage": "Домашняя страница"
|
||||
"Homepage": "Домашняя страница",
|
||||
"Paid": "Оплачено",
|
||||
"Unpaid": "Не оплачено"
|
||||
}
|
||||
|
||||
@@ -277,5 +277,7 @@
|
||||
"Card pins": "Kart pin bukjalar",
|
||||
"Certificate of loan repayment": "Karzyň ýapylandygy barada güwanama almak",
|
||||
"Certificates of loan repayment": "Karzyň ýapylandygy barada güwanamalar",
|
||||
"Ready files": "Taýýar faýllar"
|
||||
"Ready files": "Taýýar faýllar",
|
||||
"Paid": "Tölenen",
|
||||
"Unpaid": "Tölenmedik"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user