Compare commits
5 Commits
main
...
cbe8950b40
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbe8950b40 | ||
|
|
5aa5496209 | ||
|
|
97b6561ad3 | ||
|
|
c9a0021bc3 | ||
|
|
a28c1d88ea |
@@ -350,22 +350,22 @@ class NovaSberPaymentOrder extends Resource
|
||||
public function actions(NovaRequest $request): array
|
||||
{
|
||||
return [
|
||||
MakeSberPaymentAction::make()
|
||||
->icon('credit-card')
|
||||
->sole()
|
||||
->canSee(function ($request) {
|
||||
/** @var \App\Modules\SberPaymentOrder\Models\SberPaymentOrder $resource */
|
||||
$resource = $this->resource;
|
||||
// MakeSberPaymentAction::make()
|
||||
// ->icon('credit-card')
|
||||
// ->sole()
|
||||
// ->canSee(function ($request) {
|
||||
// /** @var \App\Modules\SberPaymentOrder\Models\SberPaymentOrder $resource */
|
||||
// $resource = $this->resource;
|
||||
|
||||
if (in_array($resource->status, [
|
||||
OrderRepo::PENDING,
|
||||
OrderRepo::CANCELLED,
|
||||
])) {
|
||||
return false;
|
||||
}
|
||||
// if (in_array($resource->status, [
|
||||
// OrderRepo::PENDING,
|
||||
// OrderRepo::CANCELLED,
|
||||
// ])) {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
return true;
|
||||
}),
|
||||
// return true;
|
||||
// }),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ class VisaMasterPaymentOrderFieldsForDetail
|
||||
Text::make(__('Töleg ugradyjynyň goýum hasaby'), function () use ($resource) {
|
||||
return sprintf(
|
||||
'<strong>%s</strong>',
|
||||
number_format($resource->sender_deposit_account, 0, '', '')
|
||||
$resource->sender_deposit_account && is_numeric($resource->sender_deposit_account) ? number_format($resource->sender_deposit_account, 0, '', '') : '0'
|
||||
);
|
||||
})->asHtml(),
|
||||
|
||||
|
||||
@@ -382,13 +382,12 @@ class NovaVisaMasterPaymentOrder extends Resource
|
||||
$order = $this->resource;
|
||||
|
||||
if (in_array($order->status, [
|
||||
OrderRepo::PENDING,
|
||||
OrderRepo::CANCELLED,
|
||||
OrderRepo::COMPLETED,
|
||||
])) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -45,8 +45,14 @@ class MakePaymentNovaVisaMaster extends Action
|
||||
*/
|
||||
public function handle(ActionFields $fields, Collection $models): mixed
|
||||
{
|
||||
$payment_amount = $fields->get('payment_amount');
|
||||
$usd_payment = $fields->get('usd_payment');
|
||||
// $payment_amount = $fields->get('payment_amount');
|
||||
// $usd_payment = $fields->get('usd_payment');
|
||||
|
||||
$usd_to_tmt = floatval(CurrencyRate::where('currency_from', 'USD')->where('currency_to', 'TMT')->first('value')?->value);
|
||||
$max_value = number_format($usd_to_tmt * 250, 2);
|
||||
|
||||
$usd_payment = 250;
|
||||
$payment_amount = $usd_payment * $usd_to_tmt;
|
||||
|
||||
if (! $payment_amount || ! $usd_payment) {
|
||||
return Action::modal('modal-response', [
|
||||
@@ -122,6 +128,7 @@ class MakePaymentNovaVisaMaster extends Action
|
||||
}
|
||||
|
||||
$max_value = number_format($usd_to_tmt * 250, 2);
|
||||
$payment_amount = floatval(number_format($max_value, 2, '.', '')) + 115;
|
||||
|
||||
return [
|
||||
Heading::make(Blade::render(<<<HTML
|
||||
|
||||
@@ -107,7 +107,6 @@ class NovaMenuRepo
|
||||
MenuItem::resource(CurrencyRate::class)->canSee(fn() => NovaPermissionRepo::isAdmin() || NovaPermissionRepo::isCurrencyMaintainer()),
|
||||
MenuItem::resource(NovaVisaMasterSetting::class)->canSee(fn() => NovaPermissionRepo::isAdmin() || NovaPermissionRepo::isCurrencyMaintainer()),
|
||||
])->icon('currency-dollar')
|
||||
->canSee(NovaPermissionRepo::isCurrencyMaintainer())
|
||||
->collapsedByDefault(),
|
||||
|
||||
MenuSection::resource(OnlinePaymentHistoryResource::class)
|
||||
|
||||
@@ -99,10 +99,6 @@
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/anditsung/nova-locale-switcher"
|
||||
},
|
||||
"1": {
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/nurmuhammet-ali/nova-tabs"
|
||||
},
|
||||
"2": {
|
||||
"type": "path",
|
||||
"url": "./nova-components/NovaCustomHtml"
|
||||
|
||||
2250
composer.lock
generated
2250
composer.lock
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user