This commit is contained in:
2024-04-30 23:24:35 +05:00
parent d53db60a20
commit 424c3f22d1
8 changed files with 7 additions and 25 deletions

View File

@@ -20,7 +20,6 @@ function isLocalIp(string $ip = ''): bool
/** /**
* Is turkmen ip * Is turkmen ip
* @param string $ip
*/ */
function isTurkmenIp(string $ip = ''): bool function isTurkmenIp(string $ip = ''): bool
{ {

View File

@@ -50,11 +50,7 @@ class OnlinePaymentController extends Controller
'password' => $resource->branch->billing_password, 'password' => $resource->branch->billing_password,
]); ]);
$payment_status = $response['depositAmount'] > 0; $payment_status = $response['ErrorCode'] == '0';
info([
'payment_status' => $payment_status
]);
if ($payment_status) { if ($payment_status) {
$resource->update([ $resource->update([

View File

@@ -4,7 +4,6 @@ namespace App\Nova\Actions;
use App\Repos\System\Locale\LocaleManagerRepo; use App\Repos\System\Locale\LocaleManagerRepo;
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Laravel\Nova\Actions\Action; use Laravel\Nova\Actions\Action;
@@ -18,10 +17,6 @@ class ExportTranslations extends Action
/** /**
* Perform the action on the given models. * Perform the action on the given models.
*
* @param \Laravel\Nova\Fields\ActionFields $fields
* @param \Illuminate\Support\Collection $models
* @return mixed
*/ */
public function handle(ActionFields $fields, Collection $models): mixed public function handle(ActionFields $fields, Collection $models): mixed
{ {
@@ -32,9 +27,6 @@ class ExportTranslations extends Action
/** /**
* Get the fields available on the action. * Get the fields available on the action.
*
* @param \Laravel\Nova\Http\Requests\NovaRequest $request
* @return array
*/ */
public function fields(NovaRequest $request): array public function fields(NovaRequest $request): array
{ {

View File

@@ -11,8 +11,8 @@ use App\Repos\System\Location\CountryRepo;
use App\Repos\System\Settings\Location\RegionRepo; use App\Repos\System\Settings\Location\RegionRepo;
use Laravel\Nova\Fields\Badge; use Laravel\Nova\Fields\Badge;
use Laravel\Nova\Fields\BelongsTo; use Laravel\Nova\Fields\BelongsTo;
use Laravel\Nova\Fields\Date;
use Laravel\Nova\Fields\Boolean; use Laravel\Nova\Fields\Boolean;
use Laravel\Nova\Fields\Date;
use Laravel\Nova\Fields\DateTime; use Laravel\Nova\Fields\DateTime;
use Laravel\Nova\Fields\ID; use Laravel\Nova\Fields\ID;
use Laravel\Nova\Fields\Image; use Laravel\Nova\Fields\Image;

View File

@@ -79,8 +79,6 @@ class LocaleManagerResource extends Resource
/** /**
* Get the actions available for the resource. * Get the actions available for the resource.
*
* @return array
*/ */
public function actions(NovaRequest $request): array public function actions(NovaRequest $request): array
{ {

View File

@@ -12,7 +12,6 @@ use Illuminate\Support\Facades\Gate;
use Laravel\Nova\Events\ServingNova; use Laravel\Nova\Events\ServingNova;
use Laravel\Nova\Fields\Date; use Laravel\Nova\Fields\Date;
use Laravel\Nova\Fields\DateTime; use Laravel\Nova\Fields\DateTime;
use Laravel\Nova\Fields\Filters\DateTimeFilter;
use Laravel\Nova\Menu\Menu; use Laravel\Nova\Menu\Menu;
use Laravel\Nova\Menu\MenuItem; use Laravel\Nova\Menu\MenuItem;
use Laravel\Nova\Nova; use Laravel\Nova\Nova;

View File

@@ -26,12 +26,10 @@ class OnlinePaymentRepo
/** /**
* Set price * Set price
*
* @param int|float|string $price
*/ */
public function getPrice(int|float|string $price): string public function getPrice(int|float|string $price): string
{ {
return number_format($price, 2, "", ""); return number_format($price, 2, '', '');
} }
/** /**

View File

@@ -63,7 +63,7 @@ class LocaleManagerRepo
*/ */
public function localeAppTranslationsDirectory(): string public function localeAppTranslationsDirectory(): string
{ {
return $this->localeAppPath . DIRECTORY_SEPARATOR . 'lang'; return $this->localeAppPath.DIRECTORY_SEPARATOR.'lang';
} }
/** /**
@@ -82,8 +82,8 @@ class LocaleManagerRepo
public function syncTranslationsWithLocaleApp(): self public function syncTranslationsWithLocaleApp(): self
{ {
$response = Http::acceptJson()->withHeaders([ $response = Http::acceptJson()->withHeaders([
'Api-Token' => $this->localeAppApiToken, 'Api-Token' => $this->localeAppApiToken,
]) ])
->retry( ->retry(
times: 3, times: 3,
sleepMilliseconds: 50, sleepMilliseconds: 50,
@@ -92,7 +92,7 @@ class LocaleManagerRepo
return true; return true;
}) })
->post( ->post(
url: $this->localeAppUrl . '/api/import-translations', url: $this->localeAppUrl.'/api/import-translations',
data: [] data: []
); );