Merge pull request #2528 from CihanSenturk/master
Transaction send mail improvements
This commit is contained in:
commit
9d3e7a88be
@ -552,6 +552,7 @@ class Transaction extends Model
|
||||
} catch (\Exception $e) {}
|
||||
|
||||
try {
|
||||
if (! empty($this->contact) && $this->contact->email) {
|
||||
$actions[] = [
|
||||
'type' => 'button',
|
||||
'title' => trans('invoices.send_mail'),
|
||||
@ -563,6 +564,7 @@ class Transaction extends Model
|
||||
'@click' => 'onEmail("' . route('modals.transactions.emails.create', $this->id) . '")',
|
||||
],
|
||||
];
|
||||
}
|
||||
} catch (\Exception $e) {}
|
||||
|
||||
$actions[] = [
|
||||
|
@ -575,7 +575,7 @@ class Document extends Model
|
||||
} catch (\Exception $e) {}
|
||||
|
||||
try {
|
||||
if ($this->type == 'invoice') {
|
||||
if (! empty($this->contact) && $this->contact->email && $this->type == 'invoice') {
|
||||
$actions[] = [
|
||||
'type' => 'button',
|
||||
'title' => trans('invoices.send_mail'),
|
||||
|
@ -52,7 +52,7 @@ const app = new Vue({
|
||||
|
||||
this.component = Vue.component('add-new-component', (resolve, reject) => {
|
||||
resolve({
|
||||
template: '<div id="dynamic-email-component"><akaunting-modal-add-new modal-dialog-class="max-w-screen-lg" :show="email.modal" @submit="onSubmit" @cancel="onCancel" :buttons="email.buttons" :title="email.title" :is_component=true :message="email.html"></akaunting-modal-add-new></div>',
|
||||
template: '<div id="dynamic-email-component"><akaunting-modal-add-new modal-dialog-class="max-w-screen-md" :show="email.modal" @submit="onSubmit" @cancel="onCancel" :buttons="email.buttons" :title="email.title" :is_component=true :message="email.html"></akaunting-modal-add-new></div>',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<x-form.group.editor name="body" label="{{ trans('settings.email.templates.body') }}" :value="$notification->getBody()" rows="5" data-toggle="quill" form-group-class="sm:col-span-6 mb-0" />
|
||||
|
||||
<x-form.group.checkbox name="user_email" :options="['1' => trans('general.email_send_me', ['email' => user()->email])]" />
|
||||
<x-form.group.checkbox name="user_email" :options="['1' => trans('general.email_send_me', ['email' => user()->email])]" checkbox-class="col-span-6" />
|
||||
|
||||
<x-form.input.hidden name="transaction_id" :value="$transaction->id" />
|
||||
</x-slot>
|
||||
|
Loading…
x
Reference in New Issue
Block a user