-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
email.blade.php
128 lines (113 loc) · 6.56 KB
/
email.blade.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<x-form id="form-email" :route="[$store_route, $invoice->id]">
<x-tabs active="general" class="grid grid-cols-2 auto-rows-max" override="class" ignore-hash>
<x-slot name="navs">
<x-tabs.nav id="general">
{{ trans('general.general') }}
</x-tabs.nav>
<x-tabs.nav id="attachments">
{{ trans_choice('general.attachments', 2) }}
</x-tabs.nav>
</x-slot>
<x-slot name="content">
<x-tabs.tab id="general">
<x-form.section>
<x-slot name="body">
<x-form.group.contact
name="to"
label="{{ trans('general.to') }}"
:type="$invoice->contact->type"
:options="$contacts"
:option_field="[
'key' => 'email',
'value' => 'email'
]"
:selected="[$invoice->contact->email]"
without-remote
without-add-new
multiple
form-group-class="sm:col-span-6"
/>
<x-form.group.text name="subject" label="{{ trans('settings.email.templates.subject') }}" value="{{ $notification->getSubject() }}" form-group-class="sm:col-span-6" />
<x-form.group.editor name="body" label="{{ trans('settings.email.templates.body') }}" :value="$notification->getBody()" rows="3" 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])]" checkbox-class="col-span-6" form-group-class="sm:col-span-6 -mb-8" />
<x-form.input.hidden name="document_id" :value="$invoice->id" />
</x-slot>
</x-form.section>
</x-tabs.tab>
<x-tabs.tab id="attachments">
<x-table>
<x-table.thead>
<x-table.tr class="flex items-center px-1">
<x-table.th class="w-1/12">
</x-table.th>
<x-table.th class="w-1/6">
</x-table.th>
<x-table.th class="w-4/6">
{{ trans('general.name') }}
</x-table.th>
<x-table.th class="w-1/6">
{{ trans('general.size') }}
</x-table.th>
</x-table.tr>
</x-table.thead>
<x-table.tbody>
<x-table.tr id="method-pdf">
<x-table.td class="w-1/12">
<input type="checkbox"
checked="checked"
id="attachment-pdf"
name="pdf"
value="1"
class="rounded-sm text-purple border-gray-300 cursor-pointer disabled:bg-gray-200 focus:outline-none focus:ring-transparent"
data-field="attachments"
@input="e => form.attachments[e.target.name] = e.target.checked | 0">
</x-table.td>
<x-table.td class="w-1/6">
<div class="avatar-attachment">
<span class="material-icons text-base">description</span>
</div>
</x-table.td>
<x-table.td class="w-4/6">
{{ trans('general.pdf_file', ['type' => trans_choice('general.invoices', 1)]) }}
</x-table.td>
<x-table.td class="w-1/6">
{{ trans('general.na') }}
</x-table.td>
</x-table.tr>
@if ($invoice->attachment)
@foreach($invoice->attachment as $attachment)
<x-table.tr id="method-{{ $attachment->id }}">
<x-table.td class="w-1/12">
<input type="checkbox"
id="attachment-{{ $attachment->id }}"
name="{{ $attachment->id }}"
class="rounded-sm text-purple border-gray-300 cursor-pointer disabled:bg-gray-200 focus:outline-none focus:ring-transparent"
data-field="attachments"
@input="e => form.attachments[e.target.name] = e.target.checked | 0">
</x-table.td>
<x-table.td class="w-1/6">
@if ($attachment->aggregate_type == 'image')
<div class="avatar-attachment">
<img src="{{ route('uploads.get', $attachment->id) }}" alt="{{ $attachment->basename }}" class="avatar-img h-full rounded object-cover">
</div>
@else
<div class="avatar-attachment">
<span class="material-icons text-base">attach_file</span>
</div>
@endif
</x-table.td>
<x-table.td class="w-4/6">
{{ $attachment->basename }}
</x-table.td>
<x-table.td class="w-1/6">
{{ ! is_int($attachment->size) ? '0 B' : $attachment->readableSize() }}
</x-table.td>
</x-table.tr>
@endforeach
@endif
</x-table.tbody>
</x-table>
</x-tabs.tab>
</x-slot>
</x-tabs>
</x-form>