Merge pull request #9359 from turbo124/v5-develop

Updated translations and fixes for webhooks.
This commit is contained in:
David Bomba 2024-03-10 09:59:55 +11:00 committed by GitHub
commit 299eb94315
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 7106 additions and 6676 deletions

View File

@ -25,6 +25,10 @@ class SubscriptionPurchaseController extends Controller
{ {
App::setLocale($subscription->company->locale()); App::setLocale($subscription->company->locale());
if ($subscription->trashed()) {
return $this->render('generic.not_available', ['account' => $subscription->company->account, 'company' => $subscription->company]);
}
/* Make sure the contact is logged into the correct company for this subscription */ /* Make sure the contact is logged into the correct company for this subscription */
if (auth()->guard('contact')->user() && auth()->guard('contact')->user()->company_id != $subscription->company_id) { if (auth()->guard('contact')->user() && auth()->guard('contact')->user()->company_id != $subscription->company_id) {
auth()->guard('contact')->logout(); auth()->guard('contact')->logout();

View File

@ -21,7 +21,7 @@ class ProtectedDownloadController extends BaseController
public function index(Request $request, string $hash) public function index(Request $request, string $hash)
{ {
/** @var string $hashed_path */ /** @var string $hashed_path */
$hashed_path = Cache::pull($hash); $hashed_path = Cache::get($hash);
if (!$hashed_path) { if (!$hashed_path) {
throw new SystemError('File no longer available', 404); throw new SystemError('File no longer available', 404);

View File

@ -123,7 +123,7 @@ class WebhookSingle implements ShouldQueue
]); ]);
(new SystemLogger( (new SystemLogger(
array_merge((array) $response, $data), ['message' => $response->getBody()->getHeaders(), 'body' => $data],
SystemLog::CATEGORY_WEBHOOK, SystemLog::CATEGORY_WEBHOOK,
SystemLog::EVENT_WEBHOOK_SUCCESS, SystemLog::EVENT_WEBHOOK_SUCCESS,
SystemLog::TYPE_WEBHOOK_RESPONSE, SystemLog::TYPE_WEBHOOK_RESPONSE,
@ -136,7 +136,7 @@ class WebhookSingle implements ShouldQueue
nlog($e->getMessage()); nlog($e->getMessage());
(new SystemLogger( (new SystemLogger(
['message' => "Error connecting to ". $subscription->target_url], ['message' => "Error connecting to ". $subscription->target_url, 'body' => $data],
SystemLog::CATEGORY_WEBHOOK, SystemLog::CATEGORY_WEBHOOK,
SystemLog::EVENT_WEBHOOK_FAILURE, SystemLog::EVENT_WEBHOOK_FAILURE,
SystemLog::TYPE_WEBHOOK_RESPONSE, SystemLog::TYPE_WEBHOOK_RESPONSE,
@ -152,7 +152,7 @@ class WebhookSingle implements ShouldQueue
$message = "There was a problem when connecting to {$subscription->target_url} => status code ". $e->getResponse()->getStatusCode(). " This webhook call will be suspended until further action is taken."; $message = "There was a problem when connecting to {$subscription->target_url} => status code ". $e->getResponse()->getStatusCode(). " This webhook call will be suspended until further action is taken.";
(new SystemLogger( (new SystemLogger(
['message' => $message], ['message' => $message, 'body' => $data],
SystemLog::CATEGORY_WEBHOOK, SystemLog::CATEGORY_WEBHOOK,
SystemLog::EVENT_WEBHOOK_FAILURE, SystemLog::EVENT_WEBHOOK_FAILURE,
SystemLog::TYPE_WEBHOOK_RESPONSE, SystemLog::TYPE_WEBHOOK_RESPONSE,
@ -170,7 +170,7 @@ class WebhookSingle implements ShouldQueue
nlog($message); nlog($message);
(new SystemLogger( (new SystemLogger(
['message' => $message], ['message' => $message, 'body' => $data],
SystemLog::CATEGORY_WEBHOOK, SystemLog::CATEGORY_WEBHOOK,
SystemLog::EVENT_WEBHOOK_FAILURE, SystemLog::EVENT_WEBHOOK_FAILURE,
SystemLog::TYPE_WEBHOOK_RESPONSE, SystemLog::TYPE_WEBHOOK_RESPONSE,
@ -192,7 +192,7 @@ class WebhookSingle implements ShouldQueue
$message = "There was a problem when connecting to {$subscription->target_url} => status code ". $e->getResponse()->getStatusCode(). " no retry attempted."; $message = "There was a problem when connecting to {$subscription->target_url} => status code ". $e->getResponse()->getStatusCode(). " no retry attempted.";
(new SystemLogger( (new SystemLogger(
['message' => $message], ['message' => $message, 'body' => $data],
SystemLog::CATEGORY_WEBHOOK, SystemLog::CATEGORY_WEBHOOK,
SystemLog::EVENT_WEBHOOK_FAILURE, SystemLog::EVENT_WEBHOOK_FAILURE,
SystemLog::TYPE_WEBHOOK_RESPONSE, SystemLog::TYPE_WEBHOOK_RESPONSE,
@ -208,7 +208,7 @@ class WebhookSingle implements ShouldQueue
$error = json_decode($e->getResponse()->getBody()->getContents()); $error = json_decode($e->getResponse()->getBody()->getContents());
(new SystemLogger( (new SystemLogger(
['message' => $error], ['message' => $error, 'body' => $data],
SystemLog::CATEGORY_WEBHOOK, SystemLog::CATEGORY_WEBHOOK,
SystemLog::EVENT_WEBHOOK_FAILURE, SystemLog::EVENT_WEBHOOK_FAILURE,
SystemLog::TYPE_WEBHOOK_RESPONSE, SystemLog::TYPE_WEBHOOK_RESPONSE,
@ -220,7 +220,7 @@ class WebhookSingle implements ShouldQueue
$error = json_decode($e->getResponse()->getBody()->getContents()); $error = json_decode($e->getResponse()->getBody()->getContents());
(new SystemLogger( (new SystemLogger(
['message' => $error], ['message' => $error, 'body' => $data],
SystemLog::CATEGORY_WEBHOOK, SystemLog::CATEGORY_WEBHOOK,
SystemLog::EVENT_WEBHOOK_FAILURE, SystemLog::EVENT_WEBHOOK_FAILURE,
SystemLog::TYPE_WEBHOOK_RESPONSE, SystemLog::TYPE_WEBHOOK_RESPONSE,
@ -232,7 +232,7 @@ class WebhookSingle implements ShouldQueue
nlog($e->getCode()); nlog($e->getCode());
(new SystemLogger( (new SystemLogger(
$e->getMessage(), ['message' => $e->getMessage(), 'body' => $data],
SystemLog::CATEGORY_WEBHOOK, SystemLog::CATEGORY_WEBHOOK,
SystemLog::EVENT_WEBHOOK_FAILURE, SystemLog::EVENT_WEBHOOK_FAILURE,
SystemLog::TYPE_WEBHOOK_RESPONSE, SystemLog::TYPE_WEBHOOK_RESPONSE,

View File

@ -5249,8 +5249,8 @@ $lang = array(
'use_unapplied_payments_help' => 'Apply any payment balances prior to charging a payment method', 'use_unapplied_payments_help' => 'Apply any payment balances prior to charging a payment method',
'payment_terms_help' => 'The number of days after the invoice date that payment is due', 'payment_terms_help' => 'The number of days after the invoice date that payment is due',
'payment_type_help' => 'The default payment type to be used for payments', 'payment_type_help' => 'The default payment type to be used for payments',
'quote_valid_until' => 'The number of days that the quote is valid for', 'quote_valid_until_help' => 'The number of days that the quote is valid for',
'expense_payment_type' => 'The default expense payment type to be used', 'expense_payment_type_help' => 'The default expense payment type to be used',
); );
return $lang; return $lang;

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +1,32 @@
CompanyUser: CompanyUser:
properties: properties:
permissions: permissions:
description: 'The company user permissions' description: 'The user permissionsfor this company in a comma separated list'
type: string type: string
example: '[create_invoice]' example: 'create_invoice,create_client,view_client'
settings: settings:
description: 'Settings that are used for the frontend applications to store user preferences / metadata' description: 'Settings that are used for the flutter applications to store user preferences / metadata'
type: object type: object
readOnly: true
react_settings: react_settings:
description: 'Dedicated settings object for the react web application' description: 'Dedicated settings object for the react web application'
type: object type: object
readOnly: true
is_owner: is_owner:
description: 'Determines whether the user owns this company' description: 'Determines whether the user owns this company'
type: boolean type: boolean
example: true example: true
readOnly: true
is_admin: is_admin:
description: 'Determines whether the user is the admin of this company' description: 'Determines whether the user is the admin of this company'
type: boolean type: boolean
example: true example: true
readOnly: true
is_locked: is_locked:
description: 'Determines whether the users access to this company has been locked' description: 'Determines whether the users access to this company has been locked'
type: boolean type: boolean
example: true example: true
readOnly: true
updated_at: updated_at:
description: 'The last time the record was modified, format Unix Timestamp' description: 'The last time the record was modified, format Unix Timestamp'
type: integer type: integer

View File

@ -1,6 +1,6 @@
openapi: 3.0.0 openapi: 3.0.0
info: info:
title: 'Invoice Ninja API Reference - Where self host invoicing lives.' title: 'Invoice Ninja API Reference.'
description: | description: |
--- ---
<br> <br>
@ -15,7 +15,7 @@ info:
license: license:
name: 'Elastic License' name: 'Elastic License'
url: 'https://www.elastic.co/licensing/elastic-license' url: 'https://www.elastic.co/licensing/elastic-license'
version: 5.5.70 version: 5.8.34
servers: servers:
- -
url: 'https://demo.invoiceninja.com' url: 'https://demo.invoiceninja.com'

View File

@ -89,7 +89,14 @@ paths:
tags: tags:
- login - login
summary: "Attempts authentication" summary: "Attempts authentication"
description: "Returns a CompanyUser object on success" description: |
After authenticating with the API, the returned object is a CompanyUser object which is a bridge linking the user to the company.
The company user object itself contains the users permissions (admin/owner or fine grained permissions) You will most likely want to
also include in the response of this object both the company and the user object, this can be done by using the include parameter.
/api/v1/login?include=company,user
operationId: postLogin operationId: postLogin
parameters: parameters:
- $ref: "#/components/parameters/X-API-SECRET" - $ref: "#/components/parameters/X-API-SECRET"
@ -109,10 +116,19 @@ paths:
description: "The users email address." description: "The users email address."
type: string type: string
example: "demo@invoiceninja.com" example: "demo@invoiceninja.com"
required: true
password: password:
description: "The user password. Must meet minimum criteria ~ > 6 characters" description: "The user password. Must meet minimum criteria ~ > 6 characters"
type: string type: string
example: "Password0" example: "Password0"
required: true
one_time_password:
description: "The one time password if 2FA is enabled"
type: string
example: "123456"
required:
- email
- password
type: object type: object
responses: responses:
200: 200:
@ -127,13 +143,15 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/Client" $ref: "#/components/schemas/CompanyUser"
401: 401:
$ref: "#/components/responses/401" $ref: "#/components/responses/401"
403: 403:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX: 5XX:
description: 'Server error' description: 'Server error'
default: default:
@ -146,7 +164,8 @@ paths:
description: | description: |
Refreshes the dataset. Refreshes the dataset.
This endpoint can be used if you only need to access the most recent data from a certain point in time. This endpoint can be used if you only need to access the most recent data from a certain point in time. For example, if you only want to retrieve The
most recent data from the last time you accessed the system, you would pass the query parameter ?updated_at=1676173763. (unix timestamp)
operationId: refresh operationId: refresh
parameters: parameters:
- name: updated_at - name: updated_at
@ -182,6 +201,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/yodlee/refresh: /api/v1/yodlee/refresh:
@ -214,6 +237,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/bank_integrations: /api/v1/bank_integrations:
@ -264,6 +291,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
post: post:
@ -296,6 +327,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
"/api/v1/bank_integrations/{id}": "/api/v1/bank_integrations/{id}":
@ -337,6 +372,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
put: put:
@ -377,6 +416,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
delete: delete:
@ -413,6 +456,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
"/api/v1/bank_integrations/{id}/edit": "/api/v1/bank_integrations/{id}/edit":
@ -454,6 +501,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/bank_integrations/create: /api/v1/bank_integrations/create:
@ -487,6 +538,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/bank_integrations/bulk: /api/v1/bank_integrations/bulk:
@ -527,6 +582,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/bank_integrations/refresh_accounts: /api/v1/bank_integrations/refresh_accounts:
@ -560,6 +619,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/bank_integrations/remove_account/account_id: /api/v1/bank_integrations/remove_account/account_id:
@ -593,6 +656,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/bank_integrations/get_transactions/account_id: /api/v1/bank_integrations/get_transactions/account_id:
@ -626,6 +693,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/bank_transactions: /api/v1/bank_transactions:
@ -676,6 +747,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
post: post:
@ -708,6 +783,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
"/api/v1/bank_transactions/{id}": "/api/v1/bank_transactions/{id}":
@ -749,6 +828,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
put: put:
@ -789,6 +872,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
delete: delete:
@ -866,6 +953,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/bank_transactions/create: /api/v1/bank_transactions/create:
@ -899,6 +990,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/bank_transations/bulk: /api/v1/bank_transations/bulk:
@ -939,6 +1034,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/bank_transations/match: /api/v1/bank_transations/match:
@ -979,6 +1078,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/bank_transaction_rules: /api/v1/bank_transaction_rules:
@ -1029,6 +1132,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
post: post:
@ -1061,6 +1168,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
"/api/v1/bank_transaction_rules/{id}": "/api/v1/bank_transaction_rules/{id}":
@ -1102,6 +1213,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
put: put:
@ -1142,6 +1257,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
delete: delete:
@ -1178,6 +1297,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
"/api/v1/bank_transaction_rules/{id}/edit": "/api/v1/bank_transaction_rules/{id}/edit":
@ -1219,6 +1342,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/bank_transaction_rules/create: /api/v1/bank_transaction_rules/create:
@ -1252,6 +1379,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/bank_transation_rules/bulk: /api/v1/bank_transation_rules/bulk:
@ -1292,6 +1423,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/charts/totals: /api/v1/charts/totals:
@ -1326,6 +1461,10 @@ paths:
$ref: "#/components/headers/X-RateLimit-Limit" $ref: "#/components/headers/X-RateLimit-Limit"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
@ -1369,6 +1508,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
post: post:
@ -1401,6 +1544,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
"/api/v1/client_gateway_tokens/{id}": "/api/v1/client_gateway_tokens/{id}":
@ -1442,6 +1589,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
put: put:
@ -1482,6 +1633,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
delete: delete:
@ -1518,6 +1673,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
"/api/v1/client_gateway_tokens/{id}/edit": "/api/v1/client_gateway_tokens/{id}/edit":
@ -1559,6 +1718,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/client_gateway_tokens/create: /api/v1/client_gateway_tokens/create:
@ -1592,6 +1755,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
@ -1634,6 +1801,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
post: post:
@ -1666,6 +1837,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/companies/create: /api/v1/companies/create:
@ -1699,6 +1874,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
"/api/v1/companies/{id}": "/api/v1/companies/{id}":
@ -1740,6 +1919,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
put: put:
@ -1778,9 +1961,12 @@ paths:
$ref: "#/components/responses/401" $ref: "#/components/responses/401"
403: 403:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
delete: delete:
@ -1815,9 +2001,12 @@ paths:
$ref: "#/components/responses/401" $ref: "#/components/responses/401"
403: 403:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
"/api/v1/companies/{id}/edit": "/api/v1/companies/{id}/edit":
@ -1857,9 +2046,12 @@ paths:
$ref: "#/components/responses/401" $ref: "#/components/responses/401"
403: 403:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
"/api/v1/companies/{id}/upload": "/api/v1/companies/{id}/upload":
@ -1916,9 +2108,12 @@ paths:
$ref: "#/components/responses/401" $ref: "#/components/responses/401"
403: 403:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
"/api/v1/companies/{company}/default": "/api/v1/companies/{company}/default":
@ -1958,9 +2153,12 @@ paths:
$ref: "#/components/responses/401" $ref: "#/components/responses/401"
403: 403:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/company_gateways: /api/v1/company_gateways:
@ -2000,9 +2198,12 @@ paths:
$ref: "#/components/responses/401" $ref: "#/components/responses/401"
403: 403:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
post: post:
@ -2035,6 +2236,10 @@ paths:
$ref: "#/components/responses/403" $ref: "#/components/responses/403"
422: 422:
$ref: "#/components/responses/422" $ref: "#/components/responses/422"
429:
$ref: "#/components/responses/429"
5XX:
description: 'Server error'
default: default:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
/api/v1/company_gateways/create: /api/v1/company_gateways/create:

File diff suppressed because one or more lines are too long

1
public/build/assets/app-17bd8d2c.css vendored Normal file

File diff suppressed because one or more lines are too long

109
public/build/assets/app-b98bbdda.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@
] ]
}, },
"resources/js/app.js": { "resources/js/app.js": {
"file": "assets/app-01291e40.js", "file": "assets/app-b98bbdda.js",
"imports": [ "imports": [
"_index-08e160a7.js", "_index-08e160a7.js",
"__commonjsHelpers-725317a4.js" "__commonjsHelpers-725317a4.js"
@ -240,7 +240,7 @@
"src": "resources/js/setup/setup.js" "src": "resources/js/setup/setup.js"
}, },
"resources/sass/app.scss": { "resources/sass/app.scss": {
"file": "assets/app-ec429add.css", "file": "assets/app-17bd8d2c.css",
"isEntry": true, "isEntry": true,
"src": "resources/sass/app.scss" "src": "resources/sass/app.scss"
} }

View File

@ -82,7 +82,7 @@
<option value="none"></option> <option value="none"></option>
@foreach(App\Utils\TranslationHelper::getCountries() as $country) @foreach(App\Utils\TranslationHelper::getCountries() as $country)
<option <option
{{ $country == isset(auth()->user()->client->shipping_country->id) ? 'selected' : null }} value="{{ $country->id }}"> {{ $country = isset(auth()->guard('contact')->user()->client->shipping_country->id) ? 'selected' : null }} value="{{ $country->id }}">
{{ $country->iso_3166_2 }} {{ $country->iso_3166_2 }}
({{ $country->name }}) ({{ $country->name }})
</option> </option>

View File

@ -80,7 +80,7 @@
@component('portal.ninja2020.components.general.card-element-single') @component('portal.ninja2020.components.general.card-element-single')
<input type="checkbox" class="form-checkbox mr-1" name="accept_terms" id="accept-terms" required> <input type="checkbox" class="form-checkbox mr-1" name="accept_terms" id="accept-terms" required>
<label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->user()->company->present()->name, 'email' => auth('contact')->user()->client->company->settings->email]) }}</label> <label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->guard('contact')->user()->company->present()->name, 'email' => auth()->guard('contact')->user()->client->company->settings->email]) }}</label>
@endcomponent @endcomponent
<div class="bg-white px-4 py-5 flex justify-end"> <div class="bg-white px-4 py-5 flex justify-end">

View File

@ -82,7 +82,7 @@
@component('portal.ninja2020.components.general.card-element-single') @component('portal.ninja2020.components.general.card-element-single')
<input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required> <input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required>
<label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->user()->company->present()->name, 'email' => auth()->guard('contact')->user()->client->company->settings->email]) }}</label> <label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->guard('contact')->user()->company->present()->name, 'email' => auth()->guard('contact')->user()->client->company->settings->email]) }}</label>
@endcomponent @endcomponent
@component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'save-button']) @component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'save-button'])

View File

@ -59,7 +59,7 @@
@component('portal.ninja2020.components.general.card-element-single') @component('portal.ninja2020.components.general.card-element-single')
<input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required> <input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required>
<label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->user()->company->present()->name, 'email' => auth()->guard('contact')->user()->client->company->settings->email]) }}</label> <label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->guard('contact')->user()->company->present()->name, 'email' => auth()->guard('contact')->user()->client->company->settings->email]) }}</label>
@endcomponent @endcomponent
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.account_holder_name')]) @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.account_holder_name')])

View File

@ -70,7 +70,7 @@
@component('portal.ninja2020.components.general.card-element-single') @component('portal.ninja2020.components.general.card-element-single')
<input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required> <input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required>
<label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->user()->company->present()->name, 'email' => auth()->guard('contact')->user()->client->company->settings->email]) }}</label> <label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->guard('contact')->user()->company->present()->name, 'email' => auth()->guard('contact')->user()->client->company->settings->email]) }}</label>
@endcomponent @endcomponent
@component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'save-button']) @component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'save-button'])

View File

@ -70,7 +70,7 @@
@component('portal.ninja2020.components.general.card-element-single') @component('portal.ninja2020.components.general.card-element-single')
<input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required> <input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required>
<label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->user()->company->present()->name, 'email' => auth()->guard('contact')->user()->client->company->settings->email]) }}</label> <label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->guard('contact')->user()->company->present()->name, 'email' => auth()->guard('contact')->user()->client->company->settings->email]) }}</label>
@endcomponent @endcomponent
@component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'save-button']) @component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'save-button'])

View File

@ -17,7 +17,7 @@
@csrf @csrf
<button type="submit" onclick="setTimeout(() => this.disabled = true, 0); setTimeout(() => this.disabled = false, 5000); return true;" class="button button-primary bg-primary" name="action" value="download">{{ ctrans('texts.download') }}</button> <button type="submit" onclick="setTimeout(() => this.disabled = true, 0); setTimeout(() => this.disabled = false, 5000); return true;" class="button button-primary bg-primary" name="action" value="download">{{ ctrans('texts.download') }}</button>
@csrf @csrf
@if(!empty(auth()->user()->client->service()->getPaymentMethods(0))) @if(!empty(auth()->guard('contact')->user()->client->service()->getPaymentMethods(0)))
<button onclick="setTimeout(() => this.disabled = true, 0); return true;" type="submit" class="button button-primary bg-primary" name="action" value="payment">{{ ctrans('texts.pay_now') }}</button> <button onclick="setTimeout(() => this.disabled = true, 0); return true;" type="submit" class="button button-primary bg-primary" name="action" value="payment">{{ ctrans('texts.pay_now') }}</button>
@endif @endif
</form> </form>

View File

@ -54,7 +54,7 @@
{{ ctrans('texts.date_created') }} {{ ctrans('texts.date_created') }}
</dt> </dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2"> <dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $payment_method->formatDateTimestamp($payment_method->created_at, auth()->user()->client->date_format()) }} {{ $payment_method->formatDateTimestamp($payment_method->created_at, auth()->guard('contact')->user()->client->date_format()) }}
</dd> </dd>
</div> </div>
@endif @endif