1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Merge pull request #8590 from turbo124/v5-develop

iDeal notifications
This commit is contained in:
David Bomba 2023-07-02 08:16:08 +10:00 committed by GitHub
commit 1cc325f47a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 20 additions and 9 deletions

View File

@ -89,6 +89,15 @@ class UserFilters extends QueryFilters
->where('account_id', auth()->user()->account_id); ->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 * Exclude a list of user_ids, can pass multiple
* user IDs by separating them with a comma. * user IDs by separating them with a comma.

View File

@ -682,8 +682,6 @@ class LoginController extends BaseController
'email' => $socialite_user->getEmail(), 'email' => $socialite_user->getEmail(),
'oauth_user_id' => $socialite_user->getId(), 'oauth_user_id' => $socialite_user->getId(),
'oauth_provider_id' => $provider, 'oauth_provider_id' => $provider,
// 'oauth_user_token' => $oauth_user_token,
// 'oauth_user_refresh_token' => $socialite_user->refreshToken,
]; ];
$user->update($update_user); $user->update($update_user);
@ -699,7 +697,7 @@ class LoginController extends BaseController
$request_from_react = Cache::pull("react_redir:".auth()->user()?->account?->key); $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"; $redirect_url = config('ninja.react_url')."/#/settings/user_details/connect";
return redirect($redirect_url); return redirect($redirect_url);
@ -735,6 +733,10 @@ class LoginController extends BaseController
nlog('user not found for oauth'); nlog('user not found for oauth');
} }
return redirect('/#/'); $redirect_url = config('ninja.react_url')."/#/settings/user_details/connect";
return redirect($redirect_url);
// return redirect('/#/');
} }
} }

View File

@ -48,7 +48,7 @@ class PreviewInvoiceRequest extends Request
$input['line_items'] = isset($input['line_items']) ? $this->cleanItems($input['line_items']) : []; $input['line_items'] = isset($input['line_items']) ? $this->cleanItems($input['line_items']) : [];
$input['amount'] = 0; $input['amount'] = 0;
$input['balance'] = 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); $this->replace($input);
} }

View File

@ -48,7 +48,7 @@ class PreviewPurchaseOrderRequest extends Request
$input['line_items'] = isset($input['line_items']) ? $this->cleanItems($input['line_items']) : []; $input['line_items'] = isset($input['line_items']) ? $this->cleanItems($input['line_items']) : [];
$input['amount'] = 0; $input['amount'] = 0;
$input['balance'] = 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); $this->replace($input);
} }

View File

@ -33,7 +33,7 @@ class GenericReportRequest extends Request
'start_date' => 'bail|required_if:date_range,custom|nullable|date', 'start_date' => 'bail|required_if:date_range,custom|nullable|date',
'report_keys' => 'present|array', 'report_keys' => 'present|array',
'send_email' => 'required|bool', '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',
]; ];
} }

View File

@ -106,7 +106,7 @@ class iDeal
'gateway_type_id' => GatewayType::IDEAL, 'gateway_type_id' => GatewayType::IDEAL,
]; ];
$this->stripe->createPayment($data, Payment::STATUS_PENDING); $this->stripe->createPayment($data, Payment::STATUS_COMPLETED);
SystemLogger::dispatch( SystemLogger::dispatch(
['response' => $this->stripe->payment_hash->data, 'data' => $data], ['response' => $this->stripe->payment_hash->data, 'data' => $data],

View File

@ -132,7 +132,7 @@
} }
#shipping-details { #shipping-details {
visibility: $show_shipping_address_visibility; opacity: $show_shipping_address_visibility;
flex-direction: column; flex-direction: column;
line-height: var(--line-height); line-height: var(--line-height);
} }