update users
This commit is contained in:
@@ -4,12 +4,10 @@ namespace App\Nova\Actions;
|
||||
|
||||
use App\Models\Payment\OnlinePaymentHistory;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Laravel\Nova\Actions\Action;
|
||||
use Laravel\Nova\Actions\ActionResponse;
|
||||
use Laravel\Nova\Fields\ActionFields;
|
||||
use Laravel\Nova\Http\Requests\NovaRequest;
|
||||
|
||||
@@ -38,10 +36,10 @@ class CheckOnlinePaymentStatus extends Action
|
||||
$item = $models->first();
|
||||
|
||||
$onlinePaymentResource = OnlinePaymentHistory::query()
|
||||
->where('online_paymantable_type', $this->paymantable_type)
|
||||
->where('online_paymantable_id', $item->id)
|
||||
->latest()
|
||||
->first();
|
||||
->where('online_paymantable_type', $this->paymantable_type)
|
||||
->where('online_paymantable_id', $item->id)
|
||||
->latest()
|
||||
->first();
|
||||
|
||||
if (! $onlinePaymentResource) {
|
||||
return Action::modal('modal-response', [
|
||||
|
||||
@@ -382,7 +382,7 @@ class CardOrder extends Resource
|
||||
public function actions(NovaRequest $request): array
|
||||
{
|
||||
return [
|
||||
(new RetryNovaCardOrderPayment())
|
||||
(new RetryNovaCardOrderPayment)
|
||||
->sole()
|
||||
->onlyOnDetail()
|
||||
->canSee(fn () => true)
|
||||
|
||||
@@ -44,7 +44,7 @@ class Client extends Resource
|
||||
* @var array<int, string>
|
||||
*/
|
||||
public static $search = [
|
||||
'id', 'name', 'email',
|
||||
'id', 'username', 'name', 'email', 'phone',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -99,7 +99,9 @@ class Client extends Resource
|
||||
NovaInputmask::make(__('Phone'), 'phone')
|
||||
->mask('+(\\9\\93)-99-99-99-99')
|
||||
->storeRawValue()
|
||||
->rules('nullable', 'integer', 'between:61000000, 71999999'),
|
||||
->rules('required', 'integer', 'between:61000000, 71999999')
|
||||
->creationRules('unique:users,phone')
|
||||
->updateRules('unique:users,phone,{{resourceId}}'),
|
||||
|
||||
Text::make(__('Email'), 'email')
|
||||
->sortable()
|
||||
|
||||
@@ -44,7 +44,7 @@ class Operator extends Resource
|
||||
* @var array<int, string>
|
||||
*/
|
||||
public static $search = [
|
||||
'id', 'name', 'email',
|
||||
'id', 'username', 'name', 'email', 'phone',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -135,7 +135,8 @@ class Operator extends Resource
|
||||
->canSeeWhen('isAdmin', $this),
|
||||
|
||||
BelongsToMany::make(__('Branches'), 'branches', Branch::class)
|
||||
->canSeeWhen('isAdmin', $this),
|
||||
->canSeeWhen('isAdmin', $this)
|
||||
->filterable(),
|
||||
|
||||
HasMany::make(__('Loan order'), 'loanOrders', LoanOrder::class),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user