diff --git a/app/Events/User/UserWasCreated.php b/app/Events/User/UserWasCreated.php index 36268aa5d157..c4bba8784678 100644 --- a/app/Events/User/UserWasCreated.php +++ b/app/Events/User/UserWasCreated.php @@ -26,7 +26,7 @@ class UserWasCreated { use Dispatchable, InteractsWithSockets, SerializesModels; - public function __construct(public User $user, public User $creating_user, public Company $company, public array $event_vars) + public function __construct(public User $user, public User $creating_user, public Company $company, public array $event_vars, public $is_react = true) { } diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 472778eae359..4d2ad56329ad 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -90,6 +90,8 @@ class ForgotPasswordController extends Controller $account = Account::find($account_id); } - return $this->render('auth.passwords.request', ['root' => 'themes', 'account' => $account]); + $is_react = request()->has('react') ? true : false; + + return $this->render('auth.passwords.request', ['root' => 'themes', 'account' => $account, 'is_react' => $is_react]); } } diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index 2103971c5478..0cf124ebd900 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -70,6 +70,7 @@ class ResetPasswordController extends Controller $account = Account::first(); } + return $this->render('auth.passwords.reset', ['root' => 'themes', 'token' => $token, 'account' => $account, 'email' => $request->email]); } @@ -110,6 +111,9 @@ class ResetPasswordController extends Controller { auth()->logout(); + if(request()->has('react') || request()->hasHeader('X-React')) + return redirect(config('ninja.react_url').'/#/login'); + return redirect('/'); } @@ -126,10 +130,10 @@ class ResetPasswordController extends Controller return new JsonResponse(['message' => trans($response)], 200); } - if(Ninja::isHosted() && $request->hasHeader('X-React')){ - return redirect('https://app.invoicing.co/#/login'); + if($request->hasHeader('X-REACT') || $request->has('react')){ + return redirect(config('ninja.react_url').'/#/login'); } - elseif($request->hasHeader('X-React')) + else return redirect('/#/login'); return redirect($this->redirectPath()) diff --git a/app/Http/Controllers/StaticController.php b/app/Http/Controllers/StaticController.php index 1d2186090925..99b9a6e03972 100644 --- a/app/Http/Controllers/StaticController.php +++ b/app/Http/Controllers/StaticController.php @@ -56,7 +56,7 @@ class StaticController extends BaseController /** @var \App\Models\User $user */ $user = auth()->user(); - $response = Statics::company($user->company()->getLocale()); + $response = Statics::company($user->getLocale() ?? $user->company()->getLocale()); return response()->json($response, 200, ['Content-type'=> 'application/json; charset=utf-8'], JSON_PRETTY_PRINT); } diff --git a/app/Http/Controllers/Traits/VerifiesUserEmail.php b/app/Http/Controllers/Traits/VerifiesUserEmail.php index a161aa7cff9f..7b26c9de3962 100644 --- a/app/Http/Controllers/Traits/VerifiesUserEmail.php +++ b/app/Http/Controllers/Traits/VerifiesUserEmail.php @@ -42,7 +42,6 @@ trait VerifiesUserEmail } $user->email_verified_at = now(); - // $user->confirmation_code = null; //this prevented the form from showing validation errors. $user->save(); if (isset($user->oauth_user_id)) { @@ -69,7 +68,6 @@ trait VerifiesUserEmail $user = User::where('id', $this->decodePrimaryKey(request()->user_id))->firstOrFail(); $validator = Validator::make(request()->all(), [ - //'password' => ['required', 'min:6'], 'password' => 'min:6|required_with:password_confirmation|same:password_confirmation', 'password_confirmation' => 'min:6' ]); diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 80f7ef90a6b6..2c785dbc849e 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -109,9 +109,11 @@ class UserController extends BaseController $user_agent = request()->input('token_name') ?: request()->server('HTTP_USER_AGENT'); + $is_react = $request->hasHeader('X-React') ?? false; + $ct = (new CreateCompanyToken($company, $user, $user_agent))->handle(); - event(new UserWasCreated($user, auth()->user(), $company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null))); + event(new UserWasCreated($user, auth()->user(), $company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null), $is_react)); $user->setCompany($company); $user->company_id = $company->id; @@ -176,7 +178,7 @@ class UserController extends BaseController $user->oauth_user_token = null; $user->save(); - UserEmailChanged::dispatch($new_user, json_decode($old_user), $logged_in_user->company()); + UserEmailChanged::dispatch($new_user, json_decode($old_user), $logged_in_user->company(), $request->hasHeader('X-React')); } event(new UserWasUpdated($user, $logged_in_user, $logged_in_user->company(), Ninja::eventVars($logged_in_user->id))); @@ -292,7 +294,7 @@ class UserController extends BaseController /** @var \App\Models\User $logged_in_user */ $logged_in_user = auth()->user(); - $user->service()->invite($logged_in_user->company()); + $user->service()->invite($logged_in_user->company(), $request->hasHeader('X-REACT')); return response()->json(['message' => ctrans('texts.confirmation_resent')], 200); } @@ -310,7 +312,7 @@ class UserController extends BaseController /** @var \App\Models\User $logged_in_user */ $logged_in_user = auth()->user(); - $user->service()->invite($logged_in_user->company()); + $user->service()->invite($logged_in_user->company(), $request->hasHeader('X-REACT')); return response()->json(['message' => ctrans('texts.confirmation_resent')], 200); } diff --git a/app/Http/ValidationRules/Project/ValidProjectForClient.php b/app/Http/ValidationRules/Project/ValidProjectForClient.php index f887961626f2..46f3b1a8c881 100644 --- a/app/Http/ValidationRules/Project/ValidProjectForClient.php +++ b/app/Http/ValidationRules/Project/ValidProjectForClient.php @@ -44,18 +44,20 @@ class ValidProjectForClient implements Rule return true; } - // if (is_string($this->input['project_id'])) { - // $this->input['project_id'] = $this->decodePrimaryKey($this->input['project_id']); - // } + $project = Project::withTrashed()->find($this->input['project_id']); if (! $project) { $this->message = 'Project not found'; - return; } + if(!isset($this->input['client_id'])){ + $this->message = 'No Client ID provided.'; + return false; + } + return $project->client_id == $this->input['client_id']; } diff --git a/app/Jobs/User/CreateUser.php b/app/Jobs/User/CreateUser.php index 698f32b48ca4..397ccd8f0c36 100644 --- a/app/Jobs/User/CreateUser.php +++ b/app/Jobs/User/CreateUser.php @@ -81,7 +81,7 @@ class CreateUser ]); if (! Ninja::isSelfHost()) { - event(new UserWasCreated($user, $user, $this->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null))); + event(new UserWasCreated($user, $user, $this->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null), request()->hasHeader('X-REACT') ?? false)); } return $user; diff --git a/app/Jobs/User/UserEmailChanged.php b/app/Jobs/User/UserEmailChanged.php index f49718c916c4..9e56fe5a24ec 100644 --- a/app/Jobs/User/UserEmailChanged.php +++ b/app/Jobs/User/UserEmailChanged.php @@ -39,7 +39,7 @@ class UserEmailChanged implements ShouldQueue * @param \stdClass $old_user * @param \App\Models\Company $company */ - public function __construct(protected User $new_user, protected \stdClass $old_user, protected Company $company) + public function __construct(protected User $new_user, protected \stdClass $old_user, protected Company $company, protected bool $is_react = false) { $this->settings = $this->company->settings; } @@ -72,7 +72,7 @@ class UserEmailChanged implements ShouldQueue NinjaMailerJob::dispatch($nmo, true); - $this->new_user->service()->invite($this->company); + $this->new_user->service()->invite($this->company, $this->is_react); } private function getData() diff --git a/app/Listeners/SendVerificationNotification.php b/app/Listeners/SendVerificationNotification.php index d4c40f613d5f..2afc59e328e6 100644 --- a/app/Listeners/SendVerificationNotification.php +++ b/app/Listeners/SendVerificationNotification.php @@ -47,7 +47,7 @@ class SendVerificationNotification implements ShouldQueue { MultiDB::setDB($event->company->db); - $event->user->service()->invite($event->company); + $event->user->service()->invite($event->company, $event->is_react); if (Carbon::parse($event->company->created_at)->lt(now()->subDay())) { App::forgetInstance('translator'); diff --git a/app/Mail/Admin/ResetPasswordObject.php b/app/Mail/Admin/ResetPasswordObject.php index 4e3a5cc1ef52..2e5f9b90a52a 100644 --- a/app/Mail/Admin/ResetPasswordObject.php +++ b/app/Mail/Admin/ResetPasswordObject.php @@ -11,22 +11,16 @@ namespace App\Mail\Admin; +use App\Models\Company; +use App\Models\User; use App\Utils\Ninja; use Illuminate\Support\Facades\App; class ResetPasswordObject { - public $user; - public $token; - - public $company; - - public function __construct($token, $user, $company) + public function __construct(private string $token, protected User $user, protected Company $company, protected bool $is_react) { - $this->token = $token; - $this->user = $user; - $this->company = $company; } public function build() @@ -42,7 +36,7 @@ class ResetPasswordObject $data = [ 'title' => ctrans('texts.your_password_reset_link'), 'message' => ctrans('texts.reset_password'), - 'url' => route('password.reset', ['token' => $this->token, 'email' => $this->user->email]), + 'url' => route('password.reset', ['token' => $this->token, 'email' => $this->user->email, 'react' => $this->is_react ? 'true' : 'false']), 'button' => ctrans('texts.reset'), 'signature' => $this->company->settings->email_signature, 'settings' => $this->company->settings, diff --git a/app/Mail/Admin/VerifyUserObject.php b/app/Mail/Admin/VerifyUserObject.php index 1410a7eb50a6..283ce803da55 100644 --- a/app/Mail/Admin/VerifyUserObject.php +++ b/app/Mail/Admin/VerifyUserObject.php @@ -11,6 +11,8 @@ namespace App\Mail\Admin; +use App\Models\Company; +use App\Models\User; use App\Utils\Ninja; use App\Utils\Traits\MakesHash; use Illuminate\Support\Facades\App; @@ -19,14 +21,8 @@ class VerifyUserObject { use MakesHash; - public $user; - - public $company; - - public function __construct($user, $company) + public function __construct(public User $user, public Company $company, private bool $is_react = false) { - $this->user = $user; - $this->company = $company; } public function build() @@ -44,8 +40,9 @@ class VerifyUserObject $react_redirect = ''; - if(Ninja::isHosted()) { + if($this->is_react) { $react_redirect = '?react=true'; + nlog("is react"); } $data = [ diff --git a/app/Models/User.php b/app/Models/User.php index 98a11089042b..8b321a3c932e 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -19,6 +19,7 @@ use App\Utils\Traits\MakesHash; use App\Jobs\Mail\NinjaMailerJob; use App\Services\User\UserService; use App\Utils\Traits\UserSettings; +use Illuminate\Support\Facades\App; use App\Jobs\Mail\NinjaMailerObject; use App\Mail\Admin\ResetPasswordObject; use Illuminate\Database\Eloquent\Model; @@ -61,6 +62,7 @@ use Illuminate\Foundation\Auth\User as Authenticatable; * @property string|null $last_login * @property string|null $signature * @property string $password + * @property string $language_id * @property string|null $remember_token * @property string|null $custom_value1 * @property string|null $custom_value2 @@ -153,6 +155,7 @@ class User extends Authenticatable implements MustVerifyEmail 'custom_value4', 'is_deleted', 'shopify_user_id', + 'language_id', // 'oauth_user_token', // 'oauth_user_refresh_token', ]; @@ -633,15 +636,16 @@ class User extends Authenticatable implements MustVerifyEmail */ public function sendPasswordResetNotification($token) { + $is_react = request()->has('react') || request()->hasHeader('X-React') ? true : false; + $nmo = new NinjaMailerObject; - $nmo->mailable = new NinjaMailer((new ResetPasswordObject($token, $this, $this->account->default_company))->build()); + $nmo->mailable = new NinjaMailer((new ResetPasswordObject($token, $this, $this->account->default_company, $is_react))->build()); $nmo->to_user = $this; $nmo->settings = $this->account->default_company->settings; $nmo->company = $this->account->default_company; NinjaMailerJob::dispatch($nmo, true); - //$this->notify(new ResetPasswordNotification($token)); } public function service() @@ -649,6 +653,21 @@ class User extends Authenticatable implements MustVerifyEmail return new UserService($this); } + public function language() + { + return $this->belongsTo(Language::class); + } + + public function getLocale() + { + $locale = $this->language->locale ?? false; + + if($locale) + App::setLocale($locale); + + return $locale; + } + public function translate_entity() { return ctrans('texts.user'); diff --git a/app/Services/User/UserService.php b/app/Services/User/UserService.php index c6be461916de..7b6a996c1211 100644 --- a/app/Services/User/UserService.php +++ b/app/Services/User/UserService.php @@ -15,23 +15,22 @@ use App\Jobs\Mail\NinjaMailer; use App\Jobs\Mail\NinjaMailerJob; use App\Jobs\Mail\NinjaMailerObject; use App\Mail\Admin\VerifyUserObject; +use App\Models\Company; use App\Models\User; use App\Utils\Ninja; class UserService { - public $user; - - public function __construct(User $user) + public function __construct(public User $user) { - $this->user = $user; } - public function invite($company) + public function invite(Company $company, bool $is_react=true) { + try { $nmo = new NinjaMailerObject; - $nmo->mailable = new NinjaMailer((new VerifyUserObject($this->user, $company))->build()); + $nmo->mailable = new NinjaMailer((new VerifyUserObject($this->user, $company, $is_react))->build()); $nmo->company = $company; $nmo->to_user = $this->user; $nmo->settings = $company->settings; diff --git a/app/Transformers/UserTransformer.php b/app/Transformers/UserTransformer.php index 21321b0946d6..ffe029fbb0fe 100644 --- a/app/Transformers/UserTransformer.php +++ b/app/Transformers/UserTransformer.php @@ -62,7 +62,8 @@ class UserTransformer extends EntityTransformer 'google_2fa_secret' => (bool) $user->google_2fa_secret, 'has_password' => (bool) empty($user->password) ? false : true, 'oauth_user_token' => empty($user->oauth_user_token) ? '' : '***', - 'verified_phone_number' => (bool) $user->verified_phone_number + 'verified_phone_number' => (bool) $user->verified_phone_number, + 'language_id' => (string) $user->language_id ?? '', ]; } diff --git a/composer.lock b/composer.lock index 30cf5bf3f23b..d1741407d1ca 100644 --- a/composer.lock +++ b/composer.lock @@ -2487,16 +2487,16 @@ }, { "name": "google/apiclient-services", - "version": "v0.317.0", + "version": "v0.318.0", "source": { "type": "git", "url": "https://github.com/googleapis/google-api-php-client-services.git", - "reference": "a11658da6e5ba713e3d636544895bb0af3c27689" + "reference": "908a866797b9731352e650997112c8c3a0347ac5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/a11658da6e5ba713e3d636544895bb0af3c27689", - "reference": "a11658da6e5ba713e3d636544895bb0af3c27689", + "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/908a866797b9731352e650997112c8c3a0347ac5", + "reference": "908a866797b9731352e650997112c8c3a0347ac5", "shasum": "" }, "require": { @@ -2525,9 +2525,9 @@ ], "support": { "issues": "https://github.com/googleapis/google-api-php-client-services/issues", - "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.317.0" + "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.318.0" }, - "time": "2023-09-24T01:06:13+00:00" + "time": "2023-10-02T01:10:14+00:00" }, { "name": "google/auth", @@ -3397,16 +3397,16 @@ }, { "name": "horstoeko/zugferd", - "version": "v1.0.29", + "version": "v1.0.30", "source": { "type": "git", "url": "https://github.com/horstoeko/zugferd.git", - "reference": "9fb81e2e9a16d10bec8bf655484aae11bdca1997" + "reference": "b5e85651fe2e53eef82aa086c9245b7f5229433f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/horstoeko/zugferd/zipball/9fb81e2e9a16d10bec8bf655484aae11bdca1997", - "reference": "9fb81e2e9a16d10bec8bf655484aae11bdca1997", + "url": "https://api.github.com/repos/horstoeko/zugferd/zipball/b5e85651fe2e53eef82aa086c9245b7f5229433f", + "reference": "b5e85651fe2e53eef82aa086c9245b7f5229433f", "shasum": "" }, "require": { @@ -3464,9 +3464,9 @@ ], "support": { "issues": "https://github.com/horstoeko/zugferd/issues", - "source": "https://github.com/horstoeko/zugferd/tree/v1.0.29" + "source": "https://github.com/horstoeko/zugferd/tree/v1.0.30" }, - "time": "2023-09-23T06:15:04+00:00" + "time": "2023-09-30T13:42:02+00:00" }, { "name": "http-interop/http-factory-guzzle", @@ -10621,16 +10621,16 @@ }, { "name": "symfony/error-handler", - "version": "v6.3.2", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "85fd65ed295c4078367c784e8a5a6cee30348b7a" + "reference": "1f69476b64fb47105c06beef757766c376b548c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/85fd65ed295c4078367c784e8a5a6cee30348b7a", - "reference": "85fd65ed295c4078367c784e8a5a6cee30348b7a", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/1f69476b64fb47105c06beef757766c376b548c4", + "reference": "1f69476b64fb47105c06beef757766c376b548c4", "shasum": "" }, "require": { @@ -10675,7 +10675,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.3.2" + "source": "https://github.com/symfony/error-handler/tree/v6.3.5" }, "funding": [ { @@ -10691,7 +10691,7 @@ "type": "tidelift" } ], - "time": "2023-07-16T17:05:46+00:00" + "time": "2023-09-12T06:57:20+00:00" }, { "name": "symfony/event-dispatcher", @@ -10914,16 +10914,16 @@ }, { "name": "symfony/finder", - "version": "v6.3.3", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e" + "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9915db259f67d21eefee768c1abcf1cc61b1fc9e", - "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e", + "url": "https://api.github.com/repos/symfony/finder/zipball/a1b31d88c0e998168ca7792f222cbecee47428c4", + "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4", "shasum": "" }, "require": { @@ -10958,7 +10958,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.3.3" + "source": "https://github.com/symfony/finder/tree/v6.3.5" }, "funding": [ { @@ -10974,20 +10974,20 @@ "type": "tidelift" } ], - "time": "2023-07-31T08:31:44+00:00" + "time": "2023-09-26T12:56:25+00:00" }, { "name": "symfony/http-client", - "version": "v6.3.2", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "15f9f4bad62bfcbe48b5dedd866f04a08fc7ff00" + "reference": "213e564da4cbf61acc9728d97e666bcdb868c10d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/15f9f4bad62bfcbe48b5dedd866f04a08fc7ff00", - "reference": "15f9f4bad62bfcbe48b5dedd866f04a08fc7ff00", + "url": "https://api.github.com/repos/symfony/http-client/zipball/213e564da4cbf61acc9728d97e666bcdb868c10d", + "reference": "213e564da4cbf61acc9728d97e666bcdb868c10d", "shasum": "" }, "require": { @@ -11050,7 +11050,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v6.3.2" + "source": "https://github.com/symfony/http-client/tree/v6.3.5" }, "funding": [ { @@ -11066,7 +11066,7 @@ "type": "tidelift" } ], - "time": "2023-07-05T08:41:27+00:00" + "time": "2023-09-29T15:57:12+00:00" }, { "name": "symfony/http-client-contracts", @@ -11148,16 +11148,16 @@ }, { "name": "symfony/http-foundation", - "version": "v6.3.4", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "cac1556fdfdf6719668181974104e6fcfa60e844" + "reference": "b50f5e281d722cb0f4c296f908bacc3e2b721957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/cac1556fdfdf6719668181974104e6fcfa60e844", - "reference": "cac1556fdfdf6719668181974104e6fcfa60e844", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b50f5e281d722cb0f4c296f908bacc3e2b721957", + "reference": "b50f5e281d722cb0f4c296f908bacc3e2b721957", "shasum": "" }, "require": { @@ -11205,7 +11205,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.3.4" + "source": "https://github.com/symfony/http-foundation/tree/v6.3.5" }, "funding": [ { @@ -11221,20 +11221,20 @@ "type": "tidelift" } ], - "time": "2023-08-22T08:20:46+00:00" + "time": "2023-09-04T21:33:54+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.3.4", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "36abb425b4af863ae1fe54d8a8b8b4c76a2bccdb" + "reference": "9f991a964368bee8d883e8d57ced4fe9fff04dfc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/36abb425b4af863ae1fe54d8a8b8b4c76a2bccdb", - "reference": "36abb425b4af863ae1fe54d8a8b8b4c76a2bccdb", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9f991a964368bee8d883e8d57ced4fe9fff04dfc", + "reference": "9f991a964368bee8d883e8d57ced4fe9fff04dfc", "shasum": "" }, "require": { @@ -11318,7 +11318,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.3.4" + "source": "https://github.com/symfony/http-kernel/tree/v6.3.5" }, "funding": [ { @@ -11334,7 +11334,7 @@ "type": "tidelift" } ], - "time": "2023-08-26T13:54:49+00:00" + "time": "2023-09-30T06:37:04+00:00" }, { "name": "symfony/intl", @@ -11420,16 +11420,16 @@ }, { "name": "symfony/mailer", - "version": "v6.3.0", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "7b03d9be1dea29bfec0a6c7b603f5072a4c97435" + "reference": "d89611a7830d51b5e118bca38e390dea92f9ea06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/7b03d9be1dea29bfec0a6c7b603f5072a4c97435", - "reference": "7b03d9be1dea29bfec0a6c7b603f5072a4c97435", + "url": "https://api.github.com/repos/symfony/mailer/zipball/d89611a7830d51b5e118bca38e390dea92f9ea06", + "reference": "d89611a7830d51b5e118bca38e390dea92f9ea06", "shasum": "" }, "require": { @@ -11480,7 +11480,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.3.0" + "source": "https://github.com/symfony/mailer/tree/v6.3.5" }, "funding": [ { @@ -11496,20 +11496,20 @@ "type": "tidelift" } ], - "time": "2023-05-29T12:49:39+00:00" + "time": "2023-09-06T09:47:15+00:00" }, { "name": "symfony/mailgun-mailer", - "version": "v6.3.2", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/mailgun-mailer.git", - "reference": "df371e42a4c2a78a28c8de910f96949040e308fd" + "reference": "b467aba49c8240a71f7027c213d9d140ba1abce7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailgun-mailer/zipball/df371e42a4c2a78a28c8de910f96949040e308fd", - "reference": "df371e42a4c2a78a28c8de910f96949040e308fd", + "url": "https://api.github.com/repos/symfony/mailgun-mailer/zipball/b467aba49c8240a71f7027c213d9d140ba1abce7", + "reference": "b467aba49c8240a71f7027c213d9d140ba1abce7", "shasum": "" }, "require": { @@ -11549,7 +11549,7 @@ "description": "Symfony Mailgun Mailer Bridge", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailgun-mailer/tree/v6.3.2" + "source": "https://github.com/symfony/mailgun-mailer/tree/v6.3.5" }, "funding": [ { @@ -11565,20 +11565,20 @@ "type": "tidelift" } ], - "time": "2023-07-20T10:26:17+00:00" + "time": "2023-09-29T17:30:10+00:00" }, { "name": "symfony/mime", - "version": "v6.3.3", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "9a0cbd52baa5ba5a5b1f0cacc59466f194730f98" + "reference": "d5179eedf1cb2946dbd760475ebf05c251ef6a6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/9a0cbd52baa5ba5a5b1f0cacc59466f194730f98", - "reference": "9a0cbd52baa5ba5a5b1f0cacc59466f194730f98", + "url": "https://api.github.com/repos/symfony/mime/zipball/d5179eedf1cb2946dbd760475ebf05c251ef6a6e", + "reference": "d5179eedf1cb2946dbd760475ebf05c251ef6a6e", "shasum": "" }, "require": { @@ -11633,7 +11633,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.3.3" + "source": "https://github.com/symfony/mime/tree/v6.3.5" }, "funding": [ { @@ -11649,7 +11649,7 @@ "type": "tidelift" } ], - "time": "2023-07-31T07:08:24+00:00" + "time": "2023-09-29T06:59:36+00:00" }, { "name": "symfony/options-resolver", @@ -13010,16 +13010,16 @@ }, { "name": "symfony/routing", - "version": "v6.3.3", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "e7243039ab663822ff134fbc46099b5fdfa16f6a" + "reference": "82616e59acd3e3d9c916bba798326cb7796d7d31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/e7243039ab663822ff134fbc46099b5fdfa16f6a", - "reference": "e7243039ab663822ff134fbc46099b5fdfa16f6a", + "url": "https://api.github.com/repos/symfony/routing/zipball/82616e59acd3e3d9c916bba798326cb7796d7d31", + "reference": "82616e59acd3e3d9c916bba798326cb7796d7d31", "shasum": "" }, "require": { @@ -13073,7 +13073,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.3.3" + "source": "https://github.com/symfony/routing/tree/v6.3.5" }, "funding": [ { @@ -13089,7 +13089,7 @@ "type": "tidelift" } ], - "time": "2023-07-31T07:08:24+00:00" + "time": "2023-09-20T16:05:51+00:00" }, { "name": "symfony/service-contracts", @@ -13175,16 +13175,16 @@ }, { "name": "symfony/string", - "version": "v6.3.2", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "53d1a83225002635bca3482fcbf963001313fb68" + "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/53d1a83225002635bca3482fcbf963001313fb68", - "reference": "53d1a83225002635bca3482fcbf963001313fb68", + "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339", + "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339", "shasum": "" }, "require": { @@ -13241,7 +13241,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.2" + "source": "https://github.com/symfony/string/tree/v6.3.5" }, "funding": [ { @@ -13257,7 +13257,7 @@ "type": "tidelift" } ], - "time": "2023-07-05T08:41:27+00:00" + "time": "2023-09-18T10:38:32+00:00" }, { "name": "symfony/translation", @@ -13508,16 +13508,16 @@ }, { "name": "symfony/validator", - "version": "v6.3.4", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "0c8435154920b9bbe93bece675234c244cadf73b" + "reference": "48e815ba3b5eb72e632588dbf7ea2dc4e608ee47" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/0c8435154920b9bbe93bece675234c244cadf73b", - "reference": "0c8435154920b9bbe93bece675234c244cadf73b", + "url": "https://api.github.com/repos/symfony/validator/zipball/48e815ba3b5eb72e632588dbf7ea2dc4e608ee47", + "reference": "48e815ba3b5eb72e632588dbf7ea2dc4e608ee47", "shasum": "" }, "require": { @@ -13584,7 +13584,7 @@ "description": "Provides tools to validate values", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/validator/tree/v6.3.4" + "source": "https://github.com/symfony/validator/tree/v6.3.5" }, "funding": [ { @@ -13600,20 +13600,20 @@ "type": "tidelift" } ], - "time": "2023-08-17T15:49:05+00:00" + "time": "2023-09-29T07:41:15+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.3.4", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "2027be14f8ae8eae999ceadebcda5b4909b81d45" + "reference": "3d9999376be5fea8de47752837a3e1d1c5f69ef5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/2027be14f8ae8eae999ceadebcda5b4909b81d45", - "reference": "2027be14f8ae8eae999ceadebcda5b4909b81d45", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3d9999376be5fea8de47752837a3e1d1c5f69ef5", + "reference": "3d9999376be5fea8de47752837a3e1d1c5f69ef5", "shasum": "" }, "require": { @@ -13668,7 +13668,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.3.4" + "source": "https://github.com/symfony/var-dumper/tree/v6.3.5" }, "funding": [ { @@ -13684,7 +13684,7 @@ "type": "tidelift" } ], - "time": "2023-08-24T14:51:05+00:00" + "time": "2023-09-12T10:11:35+00:00" }, { "name": "symfony/yaml", @@ -13813,16 +13813,16 @@ }, { "name": "turbo124/beacon", - "version": "v1.5.1", + "version": "v1.5.2", "source": { "type": "git", "url": "https://github.com/turbo124/beacon.git", - "reference": "a737499198a3aff2d194d4f2a4c834257187d9b8" + "reference": "4f08b91d3f9326e42f664e667d84100dc8afe752" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/turbo124/beacon/zipball/a737499198a3aff2d194d4f2a4c834257187d9b8", - "reference": "a737499198a3aff2d194d4f2a4c834257187d9b8", + "url": "https://api.github.com/repos/turbo124/beacon/zipball/4f08b91d3f9326e42f664e667d84100dc8afe752", + "reference": "4f08b91d3f9326e42f664e667d84100dc8afe752", "shasum": "" }, "require": { @@ -13869,9 +13869,9 @@ "turbo124" ], "support": { - "source": "https://github.com/turbo124/beacon/tree/v1.5.1" + "source": "https://github.com/turbo124/beacon/tree/v1.5.2" }, - "time": "2023-09-24T07:20:04+00:00" + "time": "2023-10-01T07:13:02+00:00" }, { "name": "twilio/sdk", diff --git a/database/migrations/2023_10_01_102220_add_language_id_to_users_table.php b/database/migrations/2023_10_01_102220_add_language_id_to_users_table.php new file mode 100644 index 000000000000..41641462e831 --- /dev/null +++ b/database/migrations/2023_10_01_102220_add_language_id_to_users_table.php @@ -0,0 +1,26 @@ +string('language_id')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + + } +}; diff --git a/openapi/api-docs.yaml b/openapi/api-docs.yaml index 4cdf30e82228..d82f89702337 100644 --- a/openapi/api-docs.yaml +++ b/openapi/api-docs.yaml @@ -14306,29 +14306,46 @@ components: TaskStatus: properties: + id: + description: 'The task status hashed id' + type: string + example: Opnel5aKBz + readOnly: true name: description: 'The task status name' type: string example: Backlog + color: + description: 'The task status color - hex value' + type: string + example: '#000000' + task_status_order: + description: 'The order of the task status' + type: integer + example: '4' created_at: description: Timestamp type: number format: integer example: '134341234234' + readOnly: true is_deleted: description: 'A boolean flag determining if the task status has been deleted' type: boolean example: true + readOnly: true updated_at: description: Timestamp type: number format: integer example: '134341234234' + readOnly: true archived_at: description: Timestamp type: number format: integer example: '134341234234' + readOnly: true type: object TaxRate: properties: @@ -14336,6 +14353,7 @@ components: description: 'Thie hashed id of the tax' type: string example: Opnel5aKBz + readOnly: true name: description: 'The tax name' type: string @@ -16116,6 +16134,10 @@ components: description: 'The email signature for emails' type: string example: 'Bob Smith' + classification: + description: 'The classification for the company' + type: string + example: 'individual' type: object SystemLog: properties: @@ -17682,13 +17704,17 @@ components: type: string example: 'A wonder task to work on' duration: - description: 'The task duration' + description: 'The task duration in seconds' type: integer - example: '' + example: '3600' task_status_order: description: 'The order of the task' type: integer example: '4' + rate: + description: 'The task rate' + type: number + example: 10.00 custom_value1: description: 'A custom value' type: string @@ -17705,21 +17731,37 @@ components: description: 'A custom value' type: string example: INV-3343 + is_date_based: + description: 'Boolean flag determining if the task is date based' + type: boolean + example: true + calculated_start_date: + description: 'The calculated start date of the task' + type: string + example: '2022-10-10' + readOnly: true + invoice_documents: + description: "Boolean flags which determines whether to include the task documents on the invoice" + type: boolean + example: true created_at: description: Timestamp type: number format: integer example: '1434342123' + readOnly: true updated_at: description: Timestamp type: number format: integer example: '1434342123' + readOnly: true archived_at: description: Timestamp type: number format: integer example: '1434342123' + readOnly: true type: object ClientContact: properties: @@ -17888,6 +17930,7 @@ components: description: 'The hashed id of the vendor contact' type: string example: Opnel5aKBz + readOnly: true user_id: description: 'The hashed id of the user id' type: string @@ -17941,16 +17984,19 @@ components: type: number format: integer example: '134341234234' + readOnly: true updated_at: description: Timestamp type: number format: integer example: '134341234234' + readOnly: true deleted_at: description: Timestamp type: number format: integer example: '134341234234' + readOnly: true type: object Subscription: properties: @@ -18859,10 +18905,12 @@ components: description: 'The invoice hashed id' type: string example: Opnel5aKBz + readOnly: true user_id: description: 'The user hashed id' type: string example: Opnel5aKBz + readOnly: true assigned_user_id: description: 'The assigned user hashed id' type: string @@ -18871,6 +18919,7 @@ components: description: 'The company hashed id' type: string example: Opnel5aKBz + readOnly: true client_id: description: 'The client hashed id' type: string @@ -19078,6 +19127,20 @@ components: description: 'The project associated with this invoice' type: string example: Opnel5aKBz + auto_bill_tries: + description: 'The number of times the invoice has attempted to be auto billed' + type: integer + example: '1' + readOnly: true + auto_bill_enabled: + description: 'Boolean flag determining if the invoice is set to auto bill' + type: boolean + example: true + subscription_id: + description: 'The subscription associated with this invoice' + type: string + example: Opnel5aKBz + type: object ClientRequest: required: @@ -19217,134 +19280,160 @@ components: type: boolean example: false readOnly: true + classification: + description: 'The classification of the client' + type: string + example: 'individual' settings: $ref: '#/components/schemas/ClientSettings' type: object Vendor: properties: id: - description: 'The hashed id of the vendor' + description: 'The hashed id of the vendor. This is a unique identifier for the vendor.' type: string example: Opnel5aKBz + readOnly: true user_id: - description: 'The hashed id of the user who created the vendor' + description: 'The hashed id of the user who created the vendor. This is a unique identifier for the user.' type: string example: Opnel5aKBz assigned_user_id: - description: 'The hashed id of the assigned user to this vendor' + description: 'The hashed id of the assigned user to this vendor. This is a unique identifier for the user.' type: string example: Opnel5aKBz company_id: - description: 'The hashed id of the company' + description: 'The hashed id of the company. This is a unique identifier for the company.' type: string example: Opnel5aKBz client_id: - description: 'The hashed id of the client' + description: 'The hashed id of the client. This is a unique identifier for the client.' type: string example: Opnel5aKBz contacts: type: array items: $ref: '#/components/schemas/VendorContact' + description: 'An array of contacts associated with the vendor.' name: - description: 'The vendor name' + description: 'The name of the vendor.' type: string - example: 'Harry''s cafe de wheels' + example: 'Harry cafe de wheels' + classification: + description: 'The classification of the vendor.' + type: string + example: 'individual' website: - description: 'The website of the vendor' + description: 'The website of the vendor.' type: string example: www.harry.com private_notes: - description: 'The private notes of the vendor' + description: 'The private notes of the vendor. These notes are only visible to users with appropriate permissions.' type: string - example: 'Shhh, don''t tell the vendor' + example: 'Shhh, do not tell the vendor' industry_id: - description: 'The industry id of the vendor' + description: 'The industry id of the vendor. This is a unique identifier for the industry.' type: string example: '1' size_id: - description: ________ + description: 'The size id of the vendor. This is a unique identifier for the size of the vendor.' type: string example: '' address1: - description: ________ + description: 'The first line of the vendor''s address.' type: string example: '' address2: - description: ________ + description: 'The second line of the vendor''s address.' type: string example: '' city: - description: ________ + description: 'The city of the vendor''s address.' type: string example: '' state: - description: ________ + description: 'The state of the vendor''s address.' type: string example: '' postal_code: - description: ________ + description: 'The postal code of the vendor''s address.' type: string example: '' phone: - description: 'The client phone number' + description: 'The phone number of the vendor.' type: string example: 555-3434-3434 country_id: - description: ________ + description: 'The country id of the vendor. This is a unique identifier for the country.' type: string example: '' currency_id: - description: ________ + description: 'The currency id of the vendor. This is a unique identifier for the currency.' type: string example: '4' custom_value1: - description: ________ + description: 'The value of the first custom field for the vendor.' type: string example: '' custom_value2: - description: ________ + description: 'The value of the second custom field for the vendor.' type: string example: '' custom_value3: - description: ________ + description: 'The value of the third custom field for the vendor.' type: string example: '' custom_value4: - description: ________ + description: 'The value of the fourth custom field for the vendor.' type: string example: '' vat_number: - description: ________ + description: 'The VAT number of the vendor.' type: string example: '' id_number: - description: ________ + description: 'The ID number of the vendor.' type: string example: '' number: - description: ________ + description: 'The number of the vendor' type: string - example: '' + example: '11234' is_deleted: - description: ________ + description: 'Boolean flag determining if the vendor has been deleted' type: boolean example: true + language_id: + description: 'The language id of the vendor. This is a unique identifier for the language.' + type: string + example: '1' + vendor_hash: + description: 'The vendor hash of the vendor. This is a unique identifier for the vendor.' + type: string + example: 'aaa-sss-www' + readOnly: true + transaction_name: + description: 'The transaction name of the vendor.' + type: string + example: 'aaa-sss-www' last_login: description: Timestamp type: number format: integer example: '134341234234' + readOnly: true created_at: description: Timestamp type: number format: integer example: '134341234234' + readOnly: true updated_at: description: Timestamp type: number format: integer example: '134341234234' + readOnly: true settings: $ref: '#/components/schemas/CompanySettings' type: object @@ -20713,6 +20802,7 @@ components: description: 'The hashed id of the user' type: string example: Opnel5aKBz + readOnly: true first_name: description: 'The first name of the user' type: string @@ -20741,14 +20831,72 @@ components: description: 'The version of the invoice ninja terms that has been accepted by the user' type: string example: 1.0.1 + readOnly: true oauth_user_id: description: 'The provider id of the oauth entity' type: string example: jkhasdf789as6f675sdf768sdfs + readOnly: true oauth_provider_id: description: 'The oauth entity id' type: string example: google + readOnly: true + language_id: + description: 'The language id of the user' + type: string + example: 1 + verified_phone_number: + description: 'Boolean flag if the user has their phone verified. Required to settings up 2FA' + type: boolean + example: true + readOnly: true + sms_verification_code: + description: 'The sms verification code for the user. Required to settings up 2FA' + type: string + example: '123456' + readOnly: true + oauth_user_token_expiry: + description: 'The expiry date of the oauth token' + type: string + example: '2022-10-10' + readOnly: true + has_password: + description: 'Boolean flag determining if the user has a password' + type: boolean + example: true + readOnly: true + last_confirmed_email_address: + description: 'The last confirmed email address of the user' + type: string + example: 'bob@gmail.com' + readOnly: true + custom_value1: + description: 'A custom value' + type: string + example: 'Custom value 1' + custom_value2: + description: 'A custom value' + type: string + example: '$1000' + custom_value3: + description: 'A custom value' + type: string + example: 'Custom value 3' + custom_value4: + description: 'A custom value' + type: string + example: 'Custom value 4' + is_deleted: + description: 'Boolean flag determining if the user has been deleted' + type: boolean + example: true + readOnly: true + google_2fa_secret: + description: 'The google 2fa secret for the user' + type: string + example: '123456' + readOnly: true type: object Account: properties: diff --git a/openapi/components/schemas.yaml b/openapi/components/schemas.yaml index ae5e8b4c14c3..f95b31df334f 100644 --- a/openapi/components/schemas.yaml +++ b/openapi/components/schemas.yaml @@ -161,29 +161,46 @@ TaskStatus: properties: + id: + description: 'The task status hashed id' + type: string + example: Opnel5aKBz + readOnly: true name: description: 'The task status name' type: string example: Backlog + color: + description: 'The task status color - hex value' + type: string + example: '#000000' + task_status_order: + description: 'The order of the task status' + type: integer + example: '4' created_at: description: Timestamp type: number format: integer example: '134341234234' + readOnly: true is_deleted: description: 'A boolean flag determining if the task status has been deleted' type: boolean example: true + readOnly: true updated_at: description: Timestamp type: number format: integer example: '134341234234' + readOnly: true archived_at: description: Timestamp type: number format: integer example: '134341234234' + readOnly: true type: object TaxRate: properties: @@ -191,6 +208,7 @@ description: 'Thie hashed id of the tax' type: string example: Opnel5aKBz + readOnly: true name: description: 'The tax name' type: string diff --git a/openapi/components/schemas/client_request.yaml b/openapi/components/schemas/client_request.yaml index fe867aec84a8..6866d5ee4900 100644 --- a/openapi/components/schemas/client_request.yaml +++ b/openapi/components/schemas/client_request.yaml @@ -136,6 +136,10 @@ type: boolean example: false readOnly: true + classification: + description: 'The classification of the client' + type: string + example: 'individual' settings: $ref: '#/components/schemas/ClientSettings' type: object \ No newline at end of file diff --git a/openapi/components/schemas/company_settings.yaml b/openapi/components/schemas/company_settings.yaml index 5b671e5a4de5..15dc5bf8cd38 100644 --- a/openapi/components/schemas/company_settings.yaml +++ b/openapi/components/schemas/company_settings.yaml @@ -835,4 +835,8 @@ description: 'The email signature for emails' type: string example: 'Bob Smith' + classification: + description: 'The classification for the company' + type: string + example: 'individual' type: object \ No newline at end of file diff --git a/openapi/components/schemas/invoice.yaml b/openapi/components/schemas/invoice.yaml index bfe93d491ecc..6993aed7e6b4 100644 --- a/openapi/components/schemas/invoice.yaml +++ b/openapi/components/schemas/invoice.yaml @@ -4,10 +4,12 @@ description: 'The invoice hashed id' type: string example: Opnel5aKBz + readOnly: true user_id: description: 'The user hashed id' type: string example: Opnel5aKBz + readOnly: true assigned_user_id: description: 'The assigned user hashed id' type: string @@ -16,6 +18,7 @@ description: 'The company hashed id' type: string example: Opnel5aKBz + readOnly: true client_id: description: 'The client hashed id' type: string @@ -223,4 +226,18 @@ description: 'The project associated with this invoice' type: string example: Opnel5aKBz + auto_bill_tries: + description: 'The number of times the invoice has attempted to be auto billed' + type: integer + example: '1' + readOnly: true + auto_bill_enabled: + description: 'Boolean flag determining if the invoice is set to auto bill' + type: boolean + example: true + subscription_id: + description: 'The subscription associated with this invoice' + type: string + example: Opnel5aKBz + type: object \ No newline at end of file diff --git a/openapi/components/schemas/task.yaml b/openapi/components/schemas/task.yaml index a1968dc1d572..ec6089548bb1 100644 --- a/openapi/components/schemas/task.yaml +++ b/openapi/components/schemas/task.yaml @@ -53,13 +53,17 @@ type: string example: 'A wonder task to work on' duration: - description: 'The task duration' + description: 'The task duration in seconds' type: integer - example: '' + example: '3600' task_status_order: description: 'The order of the task' type: integer example: '4' + rate: + description: 'The task rate' + type: number + example: 10.00 custom_value1: description: 'A custom value' type: string @@ -76,19 +80,35 @@ description: 'A custom value' type: string example: INV-3343 + is_date_based: + description: 'Boolean flag determining if the task is date based' + type: boolean + example: true + calculated_start_date: + description: 'The calculated start date of the task' + type: string + example: '2022-10-10' + readOnly: true + invoice_documents: + description: "Boolean flags which determines whether to include the task documents on the invoice" + type: boolean + example: true created_at: description: Timestamp type: number format: integer example: '1434342123' + readOnly: true updated_at: description: Timestamp type: number format: integer example: '1434342123' + readOnly: true archived_at: description: Timestamp type: number format: integer example: '1434342123' + readOnly: true type: object \ No newline at end of file diff --git a/openapi/components/schemas/user.yaml b/openapi/components/schemas/user.yaml index 10c5fd6def26..cfb3f0a53a9c 100644 --- a/openapi/components/schemas/user.yaml +++ b/openapi/components/schemas/user.yaml @@ -4,6 +4,7 @@ description: 'The hashed id of the user' type: string example: Opnel5aKBz + readOnly: true first_name: description: 'The first name of the user' type: string @@ -32,12 +33,70 @@ description: 'The version of the invoice ninja terms that has been accepted by the user' type: string example: 1.0.1 + readOnly: true oauth_user_id: description: 'The provider id of the oauth entity' type: string example: jkhasdf789as6f675sdf768sdfs + readOnly: true oauth_provider_id: description: 'The oauth entity id' type: string example: google + readOnly: true + language_id: + description: 'The language id of the user' + type: string + example: 1 + verified_phone_number: + description: 'Boolean flag if the user has their phone verified. Required to settings up 2FA' + type: boolean + example: true + readOnly: true + sms_verification_code: + description: 'The sms verification code for the user. Required to settings up 2FA' + type: string + example: '123456' + readOnly: true + oauth_user_token_expiry: + description: 'The expiry date of the oauth token' + type: string + example: '2022-10-10' + readOnly: true + has_password: + description: 'Boolean flag determining if the user has a password' + type: boolean + example: true + readOnly: true + last_confirmed_email_address: + description: 'The last confirmed email address of the user' + type: string + example: 'bob@gmail.com' + readOnly: true + custom_value1: + description: 'A custom value' + type: string + example: 'Custom value 1' + custom_value2: + description: 'A custom value' + type: string + example: '$1000' + custom_value3: + description: 'A custom value' + type: string + example: 'Custom value 3' + custom_value4: + description: 'A custom value' + type: string + example: 'Custom value 4' + is_deleted: + description: 'Boolean flag determining if the user has been deleted' + type: boolean + example: true + readOnly: true + google_2fa_secret: + description: 'The google 2fa secret for the user' + type: string + example: '123456' + readOnly: true type: object \ No newline at end of file diff --git a/openapi/components/schemas/vendor.yaml b/openapi/components/schemas/vendor.yaml index 2d8413a6e0b9..1a600a20df01 100644 --- a/openapi/components/schemas/vendor.yaml +++ b/openapi/components/schemas/vendor.yaml @@ -1,128 +1,150 @@ Vendor: properties: id: - description: 'The hashed id of the vendor' + description: 'The hashed id of the vendor. This is a unique identifier for the vendor.' type: string example: Opnel5aKBz + readOnly: true user_id: - description: 'The hashed id of the user who created the vendor' + description: 'The hashed id of the user who created the vendor. This is a unique identifier for the user.' type: string example: Opnel5aKBz assigned_user_id: - description: 'The hashed id of the assigned user to this vendor' + description: 'The hashed id of the assigned user to this vendor. This is a unique identifier for the user.' type: string example: Opnel5aKBz company_id: - description: 'The hashed id of the company' + description: 'The hashed id of the company. This is a unique identifier for the company.' type: string example: Opnel5aKBz client_id: - description: 'The hashed id of the client' + description: 'The hashed id of the client. This is a unique identifier for the client.' type: string example: Opnel5aKBz contacts: type: array items: $ref: '#/components/schemas/VendorContact' + description: 'An array of contacts associated with the vendor.' name: - description: 'The vendor name' + description: 'The name of the vendor.' type: string - example: 'Harry''s cafe de wheels' + example: 'Harry cafe de wheels' + classification: + description: 'The classification of the vendor.' + type: string + example: 'individual' website: - description: 'The website of the vendor' + description: 'The website of the vendor.' type: string example: www.harry.com private_notes: - description: 'The private notes of the vendor' + description: 'The private notes of the vendor. These notes are only visible to users with appropriate permissions.' type: string - example: 'Shhh, don''t tell the vendor' + example: 'Shhh, do not tell the vendor' industry_id: - description: 'The industry id of the vendor' + description: 'The industry id of the vendor. This is a unique identifier for the industry.' type: string example: '1' size_id: - description: ________ + description: 'The size id of the vendor. This is a unique identifier for the size of the vendor.' type: string example: '' address1: - description: ________ + description: 'The first line of the vendor''s address.' type: string example: '' address2: - description: ________ + description: 'The second line of the vendor''s address.' type: string example: '' city: - description: ________ + description: 'The city of the vendor''s address.' type: string example: '' state: - description: ________ + description: 'The state of the vendor''s address.' type: string example: '' postal_code: - description: ________ + description: 'The postal code of the vendor''s address.' type: string example: '' phone: - description: 'The client phone number' + description: 'The phone number of the vendor.' type: string example: 555-3434-3434 country_id: - description: ________ + description: 'The country id of the vendor. This is a unique identifier for the country.' type: string example: '' currency_id: - description: ________ + description: 'The currency id of the vendor. This is a unique identifier for the currency.' type: string example: '4' custom_value1: - description: ________ + description: 'The value of the first custom field for the vendor.' type: string example: '' custom_value2: - description: ________ + description: 'The value of the second custom field for the vendor.' type: string example: '' custom_value3: - description: ________ + description: 'The value of the third custom field for the vendor.' type: string example: '' custom_value4: - description: ________ + description: 'The value of the fourth custom field for the vendor.' type: string example: '' vat_number: - description: ________ + description: 'The VAT number of the vendor.' type: string example: '' id_number: - description: ________ + description: 'The ID number of the vendor.' type: string example: '' number: - description: ________ + description: 'The number of the vendor' type: string - example: '' + example: '11234' is_deleted: - description: ________ + description: 'Boolean flag determining if the vendor has been deleted' type: boolean example: true + language_id: + description: 'The language id of the vendor. This is a unique identifier for the language.' + type: string + example: '1' + vendor_hash: + description: 'The vendor hash of the vendor. This is a unique identifier for the vendor.' + type: string + example: 'aaa-sss-www' + readOnly: true + transaction_name: + description: 'The transaction name of the vendor.' + type: string + example: 'aaa-sss-www' last_login: description: Timestamp type: number format: integer example: '134341234234' + readOnly: true created_at: description: Timestamp type: number format: integer example: '134341234234' + readOnly: true updated_at: description: Timestamp type: number format: integer example: '134341234234' + readOnly: true settings: $ref: '#/components/schemas/CompanySettings' type: object \ No newline at end of file diff --git a/openapi/components/schemas/vendor_contact.yaml b/openapi/components/schemas/vendor_contact.yaml index 6e9e6934c90f..b413a54576ca 100644 --- a/openapi/components/schemas/vendor_contact.yaml +++ b/openapi/components/schemas/vendor_contact.yaml @@ -4,6 +4,7 @@ description: 'The hashed id of the vendor contact' type: string example: Opnel5aKBz + readOnly: true user_id: description: 'The hashed id of the user id' type: string @@ -57,14 +58,17 @@ type: number format: integer example: '134341234234' + readOnly: true updated_at: description: Timestamp type: number format: integer example: '134341234234' + readOnly: true deleted_at: description: Timestamp type: number format: integer example: '134341234234' + readOnly: true type: object \ No newline at end of file diff --git a/resources/views/portal/ninja2020/auth/passwords/request.blade.php b/resources/views/portal/ninja2020/auth/passwords/request.blade.php index 444a883bee9a..f01dace279cf 100644 --- a/resources/views/portal/ninja2020/auth/passwords/request.blade.php +++ b/resources/views/portal/ninja2020/auth/passwords/request.blade.php @@ -36,6 +36,9 @@ @if($company && !is_null($company)) @endif + @if($is_react) + + @endif @csrf + @if(request()->has('react')) + + @endif