Compare commits

..

4 Commits

Author SHA1 Message Date
Mekan1206
e1ab8f7950 WIP 2026-05-13 22:27:51 +05:00
Mekan1206
1c32df52e7 test 2026-05-13 22:23:24 +05:00
Mekan1206
64f0ae35ef wip 2026-05-13 22:17:14 +05:00
Mekan1206
99b09dcc06 hide currency menu 2026-05-13 15:16:39 +05:00
7 changed files with 1138 additions and 1173 deletions

View File

@@ -350,22 +350,22 @@ class NovaSberPaymentOrder extends Resource
public function actions(NovaRequest $request): array public function actions(NovaRequest $request): array
{ {
return [ return [
// MakeSberPaymentAction::make() MakeSberPaymentAction::make()
// ->icon('credit-card') ->icon('credit-card')
// ->sole() ->sole()
// ->canSee(function ($request) { ->canSee(function ($request) {
// /** @var \App\Modules\SberPaymentOrder\Models\SberPaymentOrder $resource */ /** @var \App\Modules\SberPaymentOrder\Models\SberPaymentOrder $resource */
// $resource = $this->resource; $resource = $this->resource;
// if (in_array($resource->status, [ if (in_array($resource->status, [
// OrderRepo::PENDING, OrderRepo::PENDING,
// OrderRepo::CANCELLED, OrderRepo::CANCELLED,
// ])) { ])) {
// return false; return false;
// } }
// return true; return true;
// }), }),
]; ];
} }

View File

@@ -128,7 +128,7 @@ class VisaMasterPaymentOrderFieldsForDetail
Text::make(__('Töleg ugradyjynyň goýum hasaby'), function () use ($resource) { Text::make(__('Töleg ugradyjynyň goýum hasaby'), function () use ($resource) {
return sprintf( return sprintf(
'<strong>%s</strong>', '<strong>%s</strong>',
$resource->sender_deposit_account && is_numeric($resource->sender_deposit_account) ? number_format($resource->sender_deposit_account, 0, '', '') : '0' number_format($resource->sender_deposit_account, 0, '', '')
); );
})->asHtml(), })->asHtml(),

View File

@@ -382,12 +382,13 @@ class NovaVisaMasterPaymentOrder extends Resource
$order = $this->resource; $order = $this->resource;
if (in_array($order->status, [ if (in_array($order->status, [
OrderRepo::COMPLETED, OrderRepo::PENDING,
OrderRepo::CANCELLED,
])) { ])) {
return true; return false;
} }
return false; return true;
}), }),
]; ];
} }

View File

@@ -45,14 +45,8 @@ class MakePaymentNovaVisaMaster extends Action
*/ */
public function handle(ActionFields $fields, Collection $models): mixed public function handle(ActionFields $fields, Collection $models): mixed
{ {
// $payment_amount = $fields->get('payment_amount'); $payment_amount = $fields->get('payment_amount');
// $usd_payment = $fields->get('usd_payment'); $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) { if (! $payment_amount || ! $usd_payment) {
return Action::modal('modal-response', [ return Action::modal('modal-response', [
@@ -128,7 +122,6 @@ class MakePaymentNovaVisaMaster extends Action
} }
$max_value = number_format($usd_to_tmt * 250, 2); $max_value = number_format($usd_to_tmt * 250, 2);
$payment_amount = floatval(number_format($max_value, 2, '.', '')) + 115;
return [ return [
Heading::make(Blade::render(<<<HTML Heading::make(Blade::render(<<<HTML

View File

@@ -107,6 +107,7 @@ class NovaMenuRepo
MenuItem::resource(CurrencyRate::class)->canSee(fn() => NovaPermissionRepo::isAdmin() || NovaPermissionRepo::isCurrencyMaintainer()), MenuItem::resource(CurrencyRate::class)->canSee(fn() => NovaPermissionRepo::isAdmin() || NovaPermissionRepo::isCurrencyMaintainer()),
MenuItem::resource(NovaVisaMasterSetting::class)->canSee(fn() => NovaPermissionRepo::isAdmin() || NovaPermissionRepo::isCurrencyMaintainer()), MenuItem::resource(NovaVisaMasterSetting::class)->canSee(fn() => NovaPermissionRepo::isAdmin() || NovaPermissionRepo::isCurrencyMaintainer()),
])->icon('currency-dollar') ])->icon('currency-dollar')
->canSee(NovaPermissionRepo::isCurrencyMaintainer())
->collapsedByDefault(), ->collapsedByDefault(),
MenuSection::resource(OnlinePaymentHistoryResource::class) MenuSection::resource(OnlinePaymentHistoryResource::class)

View File

@@ -99,6 +99,10 @@
"type": "vcs", "type": "vcs",
"url": "https://github.com/anditsung/nova-locale-switcher" "url": "https://github.com/anditsung/nova-locale-switcher"
}, },
"1": {
"type": "vcs",
"url": "https://github.com/nurmuhammet-ali/nova-tabs"
},
"2": { "2": {
"type": "path", "type": "path",
"url": "./nova-components/NovaCustomHtml" "url": "./nova-components/NovaCustomHtml"

2258
composer.lock generated

File diff suppressed because it is too large Load Diff