From 60259ee2845df4bd4a9dca93855701f1bbf5d550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 23 Jun 2023 11:08:29 +0300 Subject: [PATCH 1/4] document template logo styling --- .../views/components/documents/template/classic.blade.php | 4 ++-- .../views/components/documents/template/default.blade.php | 4 ++-- .../views/components/documents/template/modern.blade.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/views/components/documents/template/classic.blade.php b/resources/views/components/documents/template/classic.blade.php index 2ad04c78f..603763e8f 100644 --- a/resources/views/components/documents/template/classic.blade.php +++ b/resources/views/components/documents/template/classic.blade.php @@ -17,9 +17,9 @@ @stack('company_logo_input_start') @if (! $hideCompanyLogo) @if (!empty($document->contact->logo) && !empty($document->contact->logo->id)) - + @else - + @endif @endif @stack('company_logo_input_end') diff --git a/resources/views/components/documents/template/default.blade.php b/resources/views/components/documents/template/default.blade.php index 68a20be61..1187eb3f4 100644 --- a/resources/views/components/documents/template/default.blade.php +++ b/resources/views/components/documents/template/default.blade.php @@ -17,9 +17,9 @@ @stack('company_logo_input_start') @if (! $hideCompanyLogo) @if (! empty($document->contact->logo) && ! empty($document->contact->logo->id)) - + @else - + @endif @endif @stack('company_logo_input_end') diff --git a/resources/views/components/documents/template/modern.blade.php b/resources/views/components/documents/template/modern.blade.php index 97606584c..9ef940c1b 100644 --- a/resources/views/components/documents/template/modern.blade.php +++ b/resources/views/components/documents/template/modern.blade.php @@ -17,9 +17,9 @@ @stack('company_logo_input_start') @if (! $hideCompanyLogo) @if (! empty($document->contact->logo) && ! empty($document->contact->logo->id)) - {{ $document->contact_name }} + {{ $document->contact_name }} @else - {{ setting('company.name') }} + {{ setting('company.name') }} @endif @endif @stack('company_logo_input_end') From 1d68c7af5e6efcd33f364959a9f87fe4d3d72d49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 23 Jun 2023 11:23:14 +0300 Subject: [PATCH 2/4] Disable user issue fixed.. --- app/Listeners/Email/DisablePersonDueToInvalidEmail.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Listeners/Email/DisablePersonDueToInvalidEmail.php b/app/Listeners/Email/DisablePersonDueToInvalidEmail.php index 40f7e8ab5..395bfe302 100644 --- a/app/Listeners/Email/DisablePersonDueToInvalidEmail.php +++ b/app/Listeners/Email/DisablePersonDueToInvalidEmail.php @@ -36,6 +36,14 @@ class DisablePersonDueToInvalidEmail return; } + $companies = $event->user->companies; + + foreach ($companies as $company) { + if ($company->users->count() <= 1) { + return; + } + } + $event->user->enabled = false; $event->user->save(); } From 30a7e70cb904bcb472b3cc73f4d7f1cc5ac27130 Mon Sep 17 00:00:00 2001 From: Hardik Thakker Date: Sat, 24 Jun 2023 12:57:39 +0530 Subject: [PATCH 3/4] Using Prefix from ENV variable during installation - Currently, during installation, we do not take into account the database table name prefix from env variables during installation (if specified by the user we ignore it and we try to generate a random prefix) - For me putting that auto-generated random prefix back into environment variables failed after install, causing the installation to die, so I added it in env variables before hand, but that didn't help as we were ignoring it. --- app/Http/Controllers/Install/Database.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Install/Database.php b/app/Http/Controllers/Install/Database.php index aa5ecff3a..695d83a81 100644 --- a/app/Http/Controllers/Install/Database.php +++ b/app/Http/Controllers/Install/Database.php @@ -34,9 +34,10 @@ class Database extends Controller $database = $request['database']; $username = $request['username']; $password = $request['password']; + $prefix = config("database.connections.$connection.prefix", null); // Check database connection - if (!Installer::createDbTables($host, $port, $database, $username, $password)) { + if (!Installer::createDbTables($host, $port, $database, $username, $password, $prefix)) { $response = [ 'status' => null, 'success' => false, From 8a46abcdfc0ade33b164c34971beacb5cc5827b4 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 2 Jul 2023 23:13:09 -0300 Subject: [PATCH 4/4] Add description when fetch document item The endpoint GET /api/documents/{id} return a list of items but the item haven't the description. With this update will return the description of a item. Signed-off-by: Vitor Mattos --- app/Http/Resources/Document/DocumentItem.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Resources/Document/DocumentItem.php b/app/Http/Resources/Document/DocumentItem.php index f32047fd6..c74464459 100644 --- a/app/Http/Resources/Document/DocumentItem.php +++ b/app/Http/Resources/Document/DocumentItem.php @@ -22,6 +22,7 @@ class DocumentItem extends JsonResource 'document_id' => $this->document_id, 'item_id' => $this->item_id, 'name' => $this->name, + 'description' => $this->description, 'price' => $this->price, 'price_formatted' => money($this->price, $this->document->currency_code, true)->format(), 'total' => $this->total,