-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,30 @@ | ||
<template> | ||
<span> | ||
<TextEditorBottom | ||
v-model:attachments="editor.attachments" | ||
:editor="editor.tiptap" | ||
@content-cleared="clean" | ||
> | ||
<TextEditorBottom v-model:attachments="editor.attachments" :editor="editor.tiptap" @content-cleared="clean"> | ||
Check failure on line 3 in desk/src/pages/desk/ticket/editor/BottomSection.vue GitHub Actions / ESLint - Reviewdog
|
||
<template #actions-left> | ||
<div class="flex h-7 w-7 items-center justify-center"> | ||
<IconMessage | ||
class="h-4 w-4 cursor-pointer text-gray-700" | ||
@click="showCannedResponses = true" | ||
/> | ||
<IconMessage class="h-4 w-4 cursor-pointer text-gray-700" @click="showCannedResponses = true" /> | ||
Check failure on line 6 in desk/src/pages/desk/ticket/editor/BottomSection.vue GitHub Actions / ESLint - Reviewdog
|
||
</div> | ||
<div class="flex h-7 w-7 items-center justify-center"> | ||
<IconBook | ||
class="h-4 w-4 cursor-pointer text-gray-700" | ||
@click="showArticleResponse = true" | ||
/> | ||
<IconBook class="h-4 w-4 cursor-pointer text-gray-700" @click="showArticleResponse = true" /> | ||
Check failure on line 9 in desk/src/pages/desk/ticket/editor/BottomSection.vue GitHub Actions / ESLint - Reviewdog
|
||
</div> | ||
</template> | ||
<template #actions-right> | ||
<div class="flex"> | ||
<Button | ||
label="Reply" | ||
:disabled="isDisabled" | ||
class="rounded-r-none" | ||
theme="gray" | ||
variant="solid" | ||
@click="newCommunication" | ||
/> | ||
<Dropdown :options="dropdownOptions"> | ||
<template #default="{ open }"> | ||
<Button | ||
:icon="open ? 'chevron-up' : 'chevron-down'" | ||
:disabled="isDisabled" | ||
class="rounded-l-none" | ||
:class="{ | ||
'cursor-pointer': !isDisabled, | ||
}" | ||
theme="gray" | ||
variant="solid" | ||
/> | ||
</template> | ||
</Dropdown> | ||
<Button label="Comment" :disabled="isDisabled" | ||
Check failure on line 14 in desk/src/pages/desk/ticket/editor/BottomSection.vue GitHub Actions / ESLint - Reviewdog
Check warning on line 14 in desk/src/pages/desk/ticket/editor/BottomSection.vue GitHub Actions / ESLint - Reviewdog
|
||
class="m-1 flex h-8 cursor-pointer items-center justify-center rounded-lg bg-gray-900 px-2 py-1 hover:bg-gray-800" | ||
theme="gray" variant="solid" @click="newComment" /> | ||
Check failure on line 16 in desk/src/pages/desk/ticket/editor/BottomSection.vue GitHub Actions / ESLint - Reviewdog
|
||
|
||
<Button label="Reply" :disabled="isDisabled" | ||
Check failure on line 18 in desk/src/pages/desk/ticket/editor/BottomSection.vue GitHub Actions / ESLint - Reviewdog
Check warning on line 18 in desk/src/pages/desk/ticket/editor/BottomSection.vue GitHub Actions / ESLint - Reviewdog
|
||
class="m-1 flex h-8 cursor-pointer items-center justify-center rounded-lg bg-gray-900 px-2 py-1 hover:bg-gray-800" | ||
theme="red" variant="solid" @click="newCommunication" /> | ||
Check failure on line 20 in desk/src/pages/desk/ticket/editor/BottomSection.vue GitHub Actions / ESLint - Reviewdog
|
||
|
||
</div> | ||
</template> | ||
</TextEditorBottom> | ||
<ArticleResponses | ||
:show="showArticleResponse" | ||
@close="showArticleResponse = false" | ||
@contentVal="(val) => (editor.content = val)" | ||
/> | ||
<CannedResponses | ||
:show="showCannedResponses" | ||
@close="showCannedResponses = false" | ||
/> | ||
<ArticleResponses :show="showArticleResponse" @close="showArticleResponse = false" | ||
Check failure on line 25 in desk/src/pages/desk/ticket/editor/BottomSection.vue GitHub Actions / ESLint - Reviewdog
Check warning on line 25 in desk/src/pages/desk/ticket/editor/BottomSection.vue GitHub Actions / ESLint - Reviewdog
|
||
@contentVal="(val) => (editor.content = val)" /> | ||
Check warning on line 26 in desk/src/pages/desk/ticket/editor/BottomSection.vue GitHub Actions / ESLint - Reviewdog
Check failure on line 26 in desk/src/pages/desk/ticket/editor/BottomSection.vue GitHub Actions / ESLint - Reviewdog
|
||
<CannedResponses :show="showCannedResponses" @close="showCannedResponses = false" /> | ||
</span> | ||
</template> | ||
|
||
|
@@ -74,16 +44,7 @@ const authStore = useAuthStore(); | |
const { clean, editor, ticket } = useTicketStore(); | ||
const showArticleResponse = ref(false); | ||
const showCannedResponses = ref(false); | ||
const dropdownOptions = [ | ||
{ | ||
label: "Reply", | ||
onClick: () => newCommunication(), | ||
}, | ||
{ | ||
label: "Comment", | ||
onClick: () => newComment(), | ||
}, | ||
]; | ||
const insertRes = createResource({ | ||
url: "frappe.client.insert", | ||
|