diff --git a/app/Http/Controllers/BaseController.php b/app/Http/Controllers/BaseController.php index 8e16e319bb51..f319791092be 100644 --- a/app/Http/Controllers/BaseController.php +++ b/app/Http/Controllers/BaseController.php @@ -913,8 +913,7 @@ class BaseController extends Controller $query->where('user_id', '=', auth()->user()->id); } elseif(in_array($this->entity_type, [Design::class, GroupSetting::class, PaymentTerm::class, TaskStatus::class])){ - nlog("inside"); - nlog($this->entity_type); + // nlog($this->entity_type); } else $query->where('user_id', '=', auth()->user()->id)->orWhere('assigned_user_id', auth()->user()->id); diff --git a/app/Http/Requests/Task/UpdateTaskRequest.php b/app/Http/Requests/Task/UpdateTaskRequest.php index 501861c48ed9..2046a5e8f868 100644 --- a/app/Http/Requests/Task/UpdateTaskRequest.php +++ b/app/Http/Requests/Task/UpdateTaskRequest.php @@ -29,7 +29,7 @@ class UpdateTaskRequest extends Request * @return bool */ public function authorize() : bool - { + {nlog("oioi"); //prevent locked tasks from updating if($this->task->invoice_id && $this->task->company->invoice_task_lock) return false; diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index ecaf942e9e37..695e4f0b34fa 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -649,6 +649,9 @@ class NinjaMailerJob implements ShouldQueue public function failed($exception = null) { + if($exception) + nlog($exception->getMessage()); + config(['queue.failed.driver' => null]); } diff --git a/app/Services/Email/MailBuild.php b/app/Services/Email/MailBuild.php index 222368dd3ab6..4117a9b72ff7 100644 --- a/app/Services/Email/MailBuild.php +++ b/app/Services/Email/MailBuild.php @@ -432,8 +432,6 @@ class MailBuild $pdf = ((new CreateRawPdf($this->mail_entity->invitation, $this->mail_entity->invitation->company->db))->handle()); - nlog($this->mail_entity->mail_object->attachments); - $this->mail_entity->mail_object->attachments = array_merge($this->mail_entity->mail_object->attachments, [['file' => base64_encode($pdf), 'name' => $this->mail_entity->invitation->{$this->mail_entity->mail_object->entity_string}->numberFormatter().'.pdf']]); if ($this->client->getSetting('document_email_attachment') !== false && $this->mail_entity->company->account->hasFeature(Account::FEATURE_DOCUMENTS)) { diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index ad80141063d7..c39afbdc67b8 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -147,7 +147,7 @@ class HtmlEngine $data['$invoice.datetime'] = &$data['$entity.datetime']; $data['$quote.datetime'] = &$data['$entity.datetime']; $data['$credit.datetime'] = &$data['$entity.datetime']; - $data['$payment_button'] = ['value' => ''.ctrans('texts.pay_now').'', 'label' => ctrans('texts.pay_now')]; + $data['$payment_button'] = ['value' => $this->buildViewButton($this->invitation->getPaymentLink(), ctrans('texts.pay_now')), 'label' => ctrans('texts.pay_now')]; $data['$payment_link'] = ['value' => $this->invitation->getPaymentLink(), 'label' => ctrans('texts.pay_now')]; $data['$payment_qrcode'] = ['value' => $this->invitation->getPaymentQrCode(), 'label' => ctrans('texts.pay_now')]; @@ -159,7 +159,7 @@ class HtmlEngine $data['$number_short'] = ['value' => $this->entity->number ?: ' ', 'label' => ctrans('texts.invoice_number_short')]; $data['$entity.terms'] = ['value' => Helpers::processReservedKeywords(\nl2br($this->entity->terms ?: ''), $this->client) ?: '', 'label' => ctrans('texts.invoice_terms')]; $data['$terms'] = &$data['$entity.terms']; - $data['$view_link'] = ['value' => ''.ctrans('texts.view_invoice').'', 'label' => ctrans('texts.view_invoice')]; + $data['$view_link'] = ['value' => $this->buildViewButton($this->invitation->getLink(), ctrans('texts.view_invoice')), 'label' => ctrans('texts.view_invoice')]; $data['$viewLink'] = &$data['$view_link']; $data['$viewButton'] = &$data['$view_link']; $data['$view_button'] = &$data['$view_link']; @@ -218,11 +218,11 @@ class HtmlEngine $data['$number_short'] = ['value' => $this->entity->number ?: '', 'label' => ctrans('texts.quote_number_short')]; $data['$entity.terms'] = ['value' => Helpers::processReservedKeywords(\nl2br($this->entity->terms ?: ''), $this->client) ?: '', 'label' => ctrans('texts.quote_terms')]; $data['$terms'] = &$data['$entity.terms']; - $data['$view_link'] = ['value' => ''.ctrans('texts.view_quote').'', 'label' => ctrans('texts.view_quote')]; + $data['$view_link'] = ['value' => $this->buildViewButton($this->invitation->getLink(), ctrans('texts.view_quote')), 'label' => ctrans('texts.view_quote')]; $data['$viewLink'] = &$data['$view_link']; $data['$viewButton'] = &$data['$view_link']; $data['$view_button'] = &$data['$view_link']; - $data['$approveButton'] = ['value' => ''.ctrans('texts.view_quote').'', 'label' => ctrans('texts.approve')]; + $data['$approveButton'] = ['value' => $this->buildViewButton($this->invitation->getLink(), ctrans('texts.view_quote')), 'label' => ctrans('texts.approve')]; $data['$view_url'] = ['value' => $this->invitation->getLink(), 'label' => ctrans('texts.view_quote')]; $data['$date'] = ['value' => $this->translateDate($this->entity->date, $this->client->date_format(), $this->client->locale()) ?: ' ', 'label' => ctrans('texts.quote_date')]; @@ -263,7 +263,7 @@ class HtmlEngine $data['$number_short'] = ['value' => $this->entity->number ?: '', 'label' => ctrans('texts.credit_number_short')]; $data['$entity.terms'] = ['value' => Helpers::processReservedKeywords(\nl2br($this->entity->terms ?: ''), $this->client) ?: '', 'label' => ctrans('texts.credit_terms')]; $data['$terms'] = &$data['$entity.terms']; - $data['$view_link'] = ['value' => ''.ctrans('texts.view_credit').'', 'label' => ctrans('texts.view_credit')]; + $data['$view_link'] = ['value' => $this->buildViewButton($this->invitation->getLink(), ctrans('texts.view_credit')), 'label' => ctrans('texts.view_credit')]; $data['$viewButton'] = &$data['$view_link']; $data['$view_button'] = &$data['$view_link']; $data['$viewLink'] = &$data['$view_link']; @@ -489,7 +489,7 @@ class HtmlEngine $data['$contact.last_name'] = ['value' => isset($this->contact) ? $this->contact->last_name : '', 'label' => ctrans('texts.last_name')]; - $data['$portal_button'] = ['value' => ''.ctrans('texts.view_client_portal').'', 'label' => ctrans('view_client_portal')]; + $data['$portal_button'] = ['value' => $this->buildViewButton($this->contact->getLoginLink().'?client_hash='.$this->client->client_hash, ctrans('texts.view_client_portal')), 'label' => ctrans('view_client_portal')]; $data['$contact.portal_button'] = &$data['$portal_button']; $data['$portalButton'] = &$data['$portal_button']; @@ -984,4 +984,24 @@ html { return $html; } + + /** + * buildViewButton + * + * @param string $link + * @param string $text + * @return string + */ + private function buildViewButton(string $link, string $text): string + { + return ' + + + + +
+ '. $text .' +
+ '; + } } diff --git a/resources/views/email/admin/download_credits.blade.php b/resources/views/email/admin/download_credits.blade.php index d408647715e1..f82acaa78ca5 100644 --- a/resources/views/email/admin/download_credits.blade.php +++ b/resources/views/email/admin/download_credits.blade.php @@ -3,8 +3,20 @@

{{ ctrans('texts.credits_backup_subject') }}

{{ ctrans('texts.download_timeframe') }}

- + + + + + + + +
+ + {{ ctrans('texts.download') }} + +
+ @endcomponent diff --git a/resources/views/email/admin/download_documents.blade.php b/resources/views/email/admin/download_documents.blade.php index a428452a1953..13300defede4 100644 --- a/resources/views/email/admin/download_documents.blade.php +++ b/resources/views/email/admin/download_documents.blade.php @@ -3,8 +3,19 @@

{{ ctrans('texts.document_download_subject') }}

{{ ctrans('texts.download_timeframe') }}

-
+ + + + + + + +
+ + {{ ctrans('texts.download') }} + +
@endcomponent diff --git a/resources/views/email/admin/download_files.blade.php b/resources/views/email/admin/download_files.blade.php index 292208a908b7..f556c3a7dd49 100644 --- a/resources/views/email/admin/download_files.blade.php +++ b/resources/views/email/admin/download_files.blade.php @@ -3,8 +3,15 @@

{{ ctrans('texts.download_backup_subject') }}

{{ ctrans('texts.download_timeframe') }}

-
- {{ ctrans('texts.download') }} - + + + + +
+ + {{ ctrans('texts.download') }} + +
+ @endcomponent diff --git a/resources/views/email/admin/download_invoices.blade.php b/resources/views/email/admin/download_invoices.blade.php index 5a3bbb14c483..14bb01ade58b 100644 --- a/resources/views/email/admin/download_invoices.blade.php +++ b/resources/views/email/admin/download_invoices.blade.php @@ -3,8 +3,19 @@

{{ ctrans('texts.invoices_backup_subject') }}

{{ ctrans('texts.download_timeframe') }}

- + + + + + + + +
+ + {{ ctrans('texts.download') }} + +
@endcomponent diff --git a/resources/views/email/admin/download_purchase_orders.blade.php b/resources/views/email/admin/download_purchase_orders.blade.php index ce40579d97ea..96e1a676ec8d 100644 --- a/resources/views/email/admin/download_purchase_orders.blade.php +++ b/resources/views/email/admin/download_purchase_orders.blade.php @@ -3,8 +3,19 @@

{{ ctrans('texts.purchase_orders_backup_subject') }}

{{ ctrans('texts.download_timeframe') }}

-
+ + + + + + + +
+ + {{ ctrans('texts.download') }} + +
@endcomponent diff --git a/resources/views/email/admin/download_quotes.blade.php b/resources/views/email/admin/download_quotes.blade.php index d98daec5ac63..ee033e75a5d6 100644 --- a/resources/views/email/admin/download_quotes.blade.php +++ b/resources/views/email/admin/download_quotes.blade.php @@ -2,9 +2,20 @@

{{ ctrans('texts.quotes_backup_subject') }}

{{ ctrans('texts.download_timeframe') }}

- + + + + + + +
+ + {{ ctrans('texts.download') }} + +
+
@endcomponent diff --git a/resources/views/email/admin/download_report.blade.php b/resources/views/email/admin/download_report.blade.php index c5b2c385ea3e..036757c5a376 100644 --- a/resources/views/email/admin/download_report.blade.php +++ b/resources/views/email/admin/download_report.blade.php @@ -3,5 +3,16 @@

{{ ctrans('texts.download_files') }}

{{ ctrans('texts.download_report_description') }}

+ + + + +
+ + {{ ctrans('texts.download') }} + +
+ + @endcomponent diff --git a/resources/views/email/admin/generic.blade.php b/resources/views/email/admin/generic.blade.php index 7985594ff734..ddc4a2d12ccb 100644 --- a/resources/views/email/admin/generic.blade.php +++ b/resources/views/email/admin/generic.blade.php @@ -27,7 +27,18 @@ @endisset @isset($url) -
{{ ctrans($button) }} + + + + + + +
+ + {{ ctrans($button) }} + +
+ @endisset @isset($signature) diff --git a/resources/views/email/admin/generic_email.blade.php b/resources/views/email/admin/generic_email.blade.php index d439347a7143..3813b3a42544 100644 --- a/resources/views/email/admin/generic_email.blade.php +++ b/resources/views/email/admin/generic_email.blade.php @@ -5,7 +5,15 @@ {{ ctrans("texts.{$body}") }} @isset($view_link) - {{{ $view_text }}} + + + + + +
+ {{ $view_text }} +
+ @endisset @isset($signature) diff --git a/resources/views/email/auth/verify.blade.php b/resources/views/email/auth/verify.blade.php index d975af40e3c5..4c3e94fe58c2 100644 --- a/resources/views/email/auth/verify.blade.php +++ b/resources/views/email/auth/verify.blade.php @@ -2,8 +2,20 @@

{{ ctrans('texts.confirmation_message') }}

- confirmation_code}") }}" target="_blank" class="button"> + + + + + + +
+ confirmation_code}") }}" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block;"> + {{ ctrans('texts.confirm') }} + +
+ +
@endcomponent diff --git a/resources/views/email/billing/passwordless-login.blade.php b/resources/views/email/billing/passwordless-login.blade.php index 6ab144802f7e..b9bb676770e9 100644 --- a/resources/views/email/billing/passwordless-login.blade.php +++ b/resources/views/email/billing/passwordless-login.blade.php @@ -3,6 +3,17 @@

{{ ctrans('texts.login_link_requested_label') }}

{{ ctrans('texts.login_link_requested') }}

-
{{ ctrans('texts.login')}} + + + + + + +
+ + {{ ctrans('texts.login')}} + +
+ @endcomponent diff --git a/resources/views/email/client/generic.blade.php b/resources/views/email/client/generic.blade.php index da83af7bcb9d..f8ef4934dcc6 100644 --- a/resources/views/email/client/generic.blade.php +++ b/resources/views/email/client/generic.blade.php @@ -21,7 +21,18 @@ @endisset @isset($url) - {{ ctrans($button) }} + + + + + + +
+ + {{ ctrans($button) }} + +
+ @endisset @isset($signature) diff --git a/resources/views/email/components/button.blade.php b/resources/views/email/components/button.blade.php index 13d2f7159f67..405b0c3df97d 100644 --- a/resources/views/email/components/button.blade.php +++ b/resources/views/email/components/button.blade.php @@ -1,3 +1,12 @@ - + + + + + +
+ + {{ $slot }} + +
\ No newline at end of file diff --git a/resources/views/email/gateways/ach-verification-notification.blade.php b/resources/views/email/gateways/ach-verification-notification.blade.php index 765173d62e43..6c75d66bf454 100644 --- a/resources/views/email/gateways/ach-verification-notification.blade.php +++ b/resources/views/email/gateways/ach-verification-notification.blade.php @@ -3,6 +3,17 @@

{{ ctrans('texts.ach_verification_notification_label') }}

{{ ctrans('texts.ach_verification_notification') }}

-
{{ ctrans('texts.complete_verification') }} + + + + + + +
+ + {{ ctrans('texts.complete_verification') }} + +
+ @endcomponent diff --git a/resources/views/email/import/completed.blade.php b/resources/views/email/import/completed.blade.php index d4681962a1be..6883db8aceb1 100644 --- a/resources/views/email/import/completed.blade.php +++ b/resources/views/email/import/completed.blade.php @@ -96,7 +96,17 @@ @endif - {{ ctrans('texts.account_login')}} + + + + + + +
+ + {{ ctrans('texts.account_login') }} + +

{{ ctrans('texts.email_signature')}}

{{ ctrans('texts.email_from') }}

diff --git a/resources/views/email/import/csv_completed.blade.php b/resources/views/email/import/csv_completed.blade.php index 44f196105842..c61f56d2cde8 100644 --- a/resources/views/email/import/csv_completed.blade.php +++ b/resources/views/email/import/csv_completed.blade.php @@ -93,7 +93,17 @@ @endif - {{ ctrans('texts.account_login')}} + + + + + + +
+ + {{ ctrans('texts.account_login') }} + +

{{ ctrans('texts.email_signature')}}

{{ ctrans('texts.email_from') }}

diff --git a/resources/views/email/migration/completed.blade.php b/resources/views/email/migration/completed.blade.php index a099f094953f..d6879ef6debd 100644 --- a/resources/views/email/migration/completed.blade.php +++ b/resources/views/email/migration/completed.blade.php @@ -2,10 +2,20 @@

{{ ctrans('texts.migration_completed')}}

{{ ctrans('texts.migration_completed_description')}}

- + + + + + +
+ + {{ ctrans('texts.account_login') }} + +
+

{{ ctrans('texts.email_signature')}}
{{ ctrans('texts.email_from') }}

diff --git a/resources/views/email/template/admin.blade.php b/resources/views/email/template/admin.blade.php index 7aecb654c82e..08fb36abe60c 100644 --- a/resources/views/email/template/admin.blade.php +++ b/resources/views/email/template/admin.blade.php @@ -68,9 +68,26 @@ .btn-white, [data-ogsc] .btn-white { background-color: #fefefe !important; + mso-padding-alt: 40px; + mso-border-alt: 40px solid #fefefe; + mso-padding-alt: 0; + mso-ansi-font-size:20px !important; + mso-line-height-alt:150%; + mso-border-left-alt: 20 #fefefe 0; + mso-border-right-alt: 20 #fefefe 0; } @endif + .btn-white { + mso-padding-alt: 40px; + mso-border-alt: 40px solid #fefefe; + mso-padding-alt: 0; + mso-ansi-font-size:20px !important; + mso-line-height-alt:150%; + mso-border-left-alt: 20 #FFFFFF 0; + mso-border-right-alt: 20 #FFFFFF 0; + } + /** Content-specific styles. **/ #content .button { display: inline-block; @@ -131,6 +148,12 @@ z-index:200 !important; position: fixed; } + + .new_button { + background-color: {{ $primary_color }}; + } + + @@ -139,8 +162,7 @@
- +
@@ -148,18 +170,9 @@
@@ -167,13 +180,20 @@ + + + + style="background-color: {{ $primary_color }}; ccborder-bottom-color: {{ $primary_color }};">
-
+
- - - - + alt_text
+ style="border: none; padding: 20px;"> {{ $slot }}
+ style="background-color: #242424; border: none;">

© {{ date('Y') }} Invoice Ninja, All Rights Reserved diff --git a/resources/views/email/template/client.blade.php b/resources/views/email/template/client.blade.php index b8e3fca9dbbc..45262ba2a858 100644 --- a/resources/views/email/template/client.blade.php +++ b/resources/views/email/template/client.blade.php @@ -117,6 +117,9 @@ color: inherit !important; } + .new_button { + background-color: {{ $primary_color }}; + } @@ -135,30 +138,22 @@
- +
+ +
-
+
- - - + alt_text
-
-
+
+ style="text-align: center; padding-top: 10px; padding-bottom: 25px; background-color: #f9f9f9; "> @isset($signature)

{!! nl2br($signature) !!} @@ -217,7 +218,7 @@

+ style="padding-top: 10px;padding-bottom: 10px; background-color: #242424; "> @if(isset($company)) @if($company->account->isPaid())

+ @if(\App\Utils\Ninja::isHosted()) + + + + @endif + @if(session()->has('message'))

{{ session('message') }}