mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
commit
1cc325f47a
@ -89,6 +89,15 @@ class UserFilters extends QueryFilters
|
||||
->where('account_id', auth()->user()->account_id);
|
||||
}
|
||||
|
||||
public function sending_users(string $value = ''): Builder
|
||||
{
|
||||
if (strlen($value) == 0 || $value != 'true') {
|
||||
return $this->builder;
|
||||
}
|
||||
|
||||
return $this->builder->whereNotNull('oauth_user_refresh_token');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude a list of user_ids, can pass multiple
|
||||
* user IDs by separating them with a comma.
|
||||
|
@ -682,8 +682,6 @@ class LoginController extends BaseController
|
||||
'email' => $socialite_user->getEmail(),
|
||||
'oauth_user_id' => $socialite_user->getId(),
|
||||
'oauth_provider_id' => $provider,
|
||||
// 'oauth_user_token' => $oauth_user_token,
|
||||
// 'oauth_user_refresh_token' => $socialite_user->refreshToken,
|
||||
];
|
||||
|
||||
$user->update($update_user);
|
||||
@ -699,7 +697,7 @@ class LoginController extends BaseController
|
||||
|
||||
$request_from_react = Cache::pull("react_redir:".auth()->user()?->account?->key);
|
||||
|
||||
if($request_from_react)
|
||||
// if($request_from_react)
|
||||
$redirect_url = config('ninja.react_url')."/#/settings/user_details/connect";
|
||||
|
||||
return redirect($redirect_url);
|
||||
@ -735,6 +733,10 @@ class LoginController extends BaseController
|
||||
nlog('user not found for oauth');
|
||||
}
|
||||
|
||||
return redirect('/#/');
|
||||
$redirect_url = config('ninja.react_url')."/#/settings/user_details/connect";
|
||||
|
||||
return redirect($redirect_url);
|
||||
|
||||
// return redirect('/#/');
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ class PreviewInvoiceRequest extends Request
|
||||
$input['line_items'] = isset($input['line_items']) ? $this->cleanItems($input['line_items']) : [];
|
||||
$input['amount'] = 0;
|
||||
$input['balance'] = 0;
|
||||
$input['number'] = ctrans('texts.live_preview').' #'.rand(0, 1000);
|
||||
$input['number'] = isset($input['number']) ? $input['number'] : ctrans('texts.live_preview').' #'.rand(0, 1000);
|
||||
|
||||
$this->replace($input);
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ class PreviewPurchaseOrderRequest extends Request
|
||||
$input['line_items'] = isset($input['line_items']) ? $this->cleanItems($input['line_items']) : [];
|
||||
$input['amount'] = 0;
|
||||
$input['balance'] = 0;
|
||||
$input['number'] = ctrans('texts.live_preview') . " #". rand(0, 1000);
|
||||
$input['number'] = isset($input['number']) ? $input['number'] : ctrans('texts.live_preview').' #'.rand(0, 1000); //30-06-2023
|
||||
|
||||
$this->replace($input);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ class GenericReportRequest extends Request
|
||||
'start_date' => 'bail|required_if:date_range,custom|nullable|date',
|
||||
'report_keys' => 'present|array',
|
||||
'send_email' => 'required|bool',
|
||||
'status' => 'sometimes|string|nullable|in:all,draft,sent,viewed,paid,unpaid,overdue',
|
||||
// 'status' => 'sometimes|string|nullable|in:all,draft,sent,viewed,paid,unpaid,overdue',
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ class iDeal
|
||||
'gateway_type_id' => GatewayType::IDEAL,
|
||||
];
|
||||
|
||||
$this->stripe->createPayment($data, Payment::STATUS_PENDING);
|
||||
$this->stripe->createPayment($data, Payment::STATUS_COMPLETED);
|
||||
|
||||
SystemLogger::dispatch(
|
||||
['response' => $this->stripe->payment_hash->data, 'data' => $data],
|
||||
|
@ -132,7 +132,7 @@
|
||||
}
|
||||
|
||||
#shipping-details {
|
||||
visibility: $show_shipping_address_visibility;
|
||||
opacity: $show_shipping_address_visibility;
|
||||
flex-direction: column;
|
||||
line-height: var(--line-height);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user