|
5 | 5 | title="New" |
6 | 6 | :current="route.name" |
7 | 7 | /> |
8 | | - <div v-if="template.data?.about" class="mx-5 my-3"> |
9 | | - <div class="prose-f" v-html="sanitize(template.data.about)" /> |
10 | | - </div> |
11 | | - <div class="grid grid-cols-1 gap-4 px-5 sm:grid-cols-3"> |
12 | | - <UniInput |
13 | | - v-for="field in visibleFields" |
14 | | - :key="field.fieldname" |
15 | | - :field="field" |
16 | | - :value="templateFields[field.fieldname]" |
17 | | - @change="templateFields[field.fieldname] = $event.value" |
18 | | - /> |
19 | | - </div> |
20 | | - <div class="m-5"> |
21 | | - <FormControl |
22 | | - v-model="subject" |
23 | | - type="text" |
24 | | - label="Subject*" |
25 | | - placeholder="A short description" |
26 | | - /> |
27 | | - </div> |
28 | | - <TicketNewArticles |
29 | | - v-if="isCustomerPortal" |
30 | | - :search="subject" |
31 | | - class="mx-5 mb-5" |
32 | | - /> |
33 | | - <div v-if="isCustomerPortal" class="mx-5 mb-5 h-full"> |
34 | | - <TicketTextEditor |
35 | | - v-show="subject.length > 2 || description.length > 0" |
36 | | - ref="editor" |
37 | | - v-model:attachments="attachments" |
38 | | - v-model:content="description" |
39 | | - placeholder="Detailed explanation" |
40 | | - expand |
| 8 | + <!-- Container --> |
| 9 | + <div class="max-w-screen-xl mx-5 flex flex-col gap-5 mb-5"> |
| 10 | + <div v-if="Boolean(template.data?.about)" class="mx-5 my-3"> |
| 11 | + {{ template.data.about }} |
| 12 | + <div class="prose-f" v-html="sanitize(template.data.about)" /> |
| 13 | + </div> |
| 14 | + <div |
| 15 | + class="grid grid-cols-1 gap-4 sm:grid-cols-3" |
| 16 | + v-if="Boolean(visibleFields)" |
41 | 17 | > |
42 | | - <template #bottom-right> |
43 | | - <Button |
44 | | - label="Submit" |
45 | | - theme="gray" |
46 | | - variant="solid" |
47 | | - :disabled=" |
48 | | - $refs.editor.editor.isEmpty || ticket.loading || !subject |
49 | | - " |
50 | | - @click="() => ticket.submit()" |
51 | | - /> |
52 | | - </template> |
53 | | - </TicketTextEditor> |
54 | | - <h4 |
55 | | - v-show="subject.length <= 2 && description.length === 0" |
56 | | - class="flex items-center justify-center text-lg text-gray-500" |
57 | | - > |
58 | | - Please enter a subject to continue |
59 | | - </h4> |
60 | | - </div> |
| 18 | + <UniInput |
| 19 | + v-for="field in visibleFields" |
| 20 | + :key="field.fieldname" |
| 21 | + :field="field" |
| 22 | + :value="templateFields[field.fieldname]" |
| 23 | + @change="templateFields[field.fieldname] = $event.value" |
| 24 | + /> |
| 25 | + </div> |
| 26 | + <div> |
| 27 | + <FormControl |
| 28 | + v-model="subject" |
| 29 | + type="text" |
| 30 | + label="Subject*" |
| 31 | + placeholder="A short description" |
| 32 | + /> |
| 33 | + </div> |
| 34 | + <TicketNewArticles v-if="isCustomerPortal" :search="subject" /> |
| 35 | + <div v-if="isCustomerPortal"> |
| 36 | + <TicketTextEditor |
| 37 | + v-show="subject.length > 2 || description.length > 0" |
| 38 | + ref="editor" |
| 39 | + v-model:attachments="attachments" |
| 40 | + v-model:content="description" |
| 41 | + placeholder="Detailed explanation" |
| 42 | + expand |
| 43 | + > |
| 44 | + <template #bottom-right> |
| 45 | + <Button |
| 46 | + label="Submit" |
| 47 | + theme="gray" |
| 48 | + variant="solid" |
| 49 | + :disabled=" |
| 50 | + $refs.editor.editor.isEmpty || ticket.loading || !subject |
| 51 | + " |
| 52 | + @click="() => ticket.submit()" |
| 53 | + /> |
| 54 | + </template> |
| 55 | + </TicketTextEditor> |
| 56 | + <h4 |
| 57 | + v-show="subject.length <= 2 && description.length === 0" |
| 58 | + class="text-lg text-gray-500" |
| 59 | + > |
| 60 | + Please enter a subject to continue |
| 61 | + </h4> |
| 62 | + </div> |
61 | 63 |
|
62 | | - <!-- for agent portal --> |
63 | | - <div v-else class="mx-5 mb-5 h-full"> |
64 | | - <TicketTextEditor |
65 | | - ref="editor" |
66 | | - v-model:attachments="attachments" |
67 | | - v-model:content="description" |
68 | | - placeholder="Detailed explanation" |
69 | | - expand |
70 | | - > |
71 | | - <template #bottom-right> |
72 | | - <Button |
73 | | - label="Submit" |
74 | | - theme="gray" |
75 | | - variant="solid" |
76 | | - :disabled=" |
77 | | - $refs.editor.editor.isEmpty || ticket.loading || !subject |
78 | | - " |
79 | | - @click="() => ticket.submit()" |
80 | | - /> |
81 | | - </template> |
82 | | - </TicketTextEditor> |
| 64 | + <!-- for agent portal --> |
| 65 | + <div v-else> |
| 66 | + <TicketTextEditor |
| 67 | + ref="editor" |
| 68 | + v-model:attachments="attachments" |
| 69 | + v-model:content="description" |
| 70 | + placeholder="Detailed explanation" |
| 71 | + expand |
| 72 | + > |
| 73 | + <template #bottom-right> |
| 74 | + <Button |
| 75 | + label="Submit" |
| 76 | + theme="gray" |
| 77 | + variant="solid" |
| 78 | + :disabled=" |
| 79 | + $refs.editor.editor.isEmpty || ticket.loading || !subject |
| 80 | + " |
| 81 | + @click="() => ticket.submit()" |
| 82 | + /> |
| 83 | + </template> |
| 84 | + </TicketTextEditor> |
| 85 | + </div> |
83 | 86 | </div> |
84 | 87 | </div> |
85 | 88 | </template> |
|
0 commit comments