Add payment status

This commit is contained in:
2024-03-31 05:38:05 +05:00
parent cf7b31e20e
commit 8d522bd4c1
4 changed files with 36 additions and 2 deletions

View File

@@ -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([

View 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'),
];
}
}

View File

@@ -178,5 +178,7 @@
"Notes": "Примечания",
"Price": "Цена",
"Active": "Активный",
"Homepage": "Домашняя страница"
"Homepage": "Домашняя страница",
"Paid": "Оплачено",
"Unpaid": "Не оплачено"
}

View File

@@ -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"
}