Skip to content

Commit

Permalink
fix(ux):Seperated reply and comment button
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivam327 committed Jul 19, 2023
1 parent 2849497 commit c17615c
Showing 1 changed file with 15 additions and 54 deletions.
69 changes: 15 additions & 54 deletions desk/src/pages/desk/ticket/editor/BottomSection.vue
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

View workflow job for this annotation

GitHub Actions / ESLint - Reviewdog

[eslint] reported by reviewdog 🐶 Replace `·v-model:attachments="editor.attachments"·:editor="editor.tiptap"·@content-cleared="clean"` with `⏎······v-model:attachments="editor.attachments"⏎······:editor="editor.tiptap"⏎······@content-cleared="clean"⏎····` Raw Output: {"ruleId":"prettier/prettier","severity":2,"message":"Replace `·v-model:attachments=\"editor.attachments\"·:editor=\"editor.tiptap\"·@content-cleared=\"clean\"` with `⏎······v-model:attachments=\"editor.attachments\"⏎······:editor=\"editor.tiptap\"⏎······@content-cleared=\"clean\"⏎····`","line":3,"column":22,"nodeType":null,"messageId":"replace","endLine":3,"endColumn":112,"fix":{"range":[41,131],"text":"\n v-model:attachments=\"editor.attachments\"\n :editor=\"editor.tiptap\"\n @content-cleared=\"clean\"\n "}}
<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

View workflow job for this annotation

GitHub Actions / ESLint - Reviewdog

[eslint] reported by reviewdog 🐶 Replace `·class="h-4·w-4·cursor-pointer·text-gray-700"·@click="showCannedResponses·=·true"` with `⏎············class="h-4·w-4·cursor-pointer·text-gray-700"⏎············@click="showCannedResponses·=·true"⏎·········` Raw Output: {"ruleId":"prettier/prettier","severity":2,"message":"Replace `·class=\"h-4·w-4·cursor-pointer·text-gray-700\"·@click=\"showCannedResponses·=·true\"` with `⏎············class=\"h-4·w-4·cursor-pointer·text-gray-700\"⏎············@click=\"showCannedResponses·=·true\"⏎·········`","line":6,"column":23,"nodeType":null,"messageId":"replace","endLine":6,"endColumn":104,"fix":{"range":[249,330],"text":"\n class=\"h-4 w-4 cursor-pointer text-gray-700\"\n @click=\"showCannedResponses = true\"\n "}}
</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

View workflow job for this annotation

GitHub Actions / ESLint - Reviewdog

[eslint] reported by reviewdog 🐶 Replace `·class="h-4·w-4·cursor-pointer·text-gray-700"·@click="showArticleResponse·=·true"` with `⏎············class="h-4·w-4·cursor-pointer·text-gray-700"⏎············@click="showArticleResponse·=·true"⏎·········` Raw Output: {"ruleId":"prettier/prettier","severity":2,"message":"Replace `·class=\"h-4·w-4·cursor-pointer·text-gray-700\"·@click=\"showArticleResponse·=·true\"` with `⏎············class=\"h-4·w-4·cursor-pointer·text-gray-700\"⏎············@click=\"showArticleResponse·=·true\"⏎·········`","line":9,"column":20,"nodeType":null,"messageId":"replace","endLine":9,"endColumn":101,"fix":{"range":[431,512],"text":"\n class=\"h-4 w-4 cursor-pointer text-gray-700\"\n @click=\"showArticleResponse = true\"\n "}}
</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

View workflow job for this annotation

GitHub Actions / ESLint - Reviewdog

[eslint] reported by reviewdog 🐶 Replace `·label="Comment"` with `⏎············label="Comment"⏎···········` Raw Output: {"ruleId":"prettier/prettier","severity":2,"message":"Replace `·label=\"Comment\"` with `⏎············label=\"Comment\"⏎···········`","line":14,"column":18,"nodeType":null,"messageId":"replace","endLine":14,"endColumn":34,"fix":{"range":[625,641],"text":"\n label=\"Comment\"\n "}}

Check warning on line 14 in desk/src/pages/desk/ticket/editor/BottomSection.vue

View workflow job for this annotation

GitHub Actions / ESLint - Reviewdog

[eslint] reported by reviewdog 🐶 Expected a linebreak before this attribute. Raw Output: {"ruleId":"vue/first-attribute-linebreak","severity":1,"message":"Expected a linebreak before this attribute.","line":14,"column":19,"nodeType":"VAttribute","messageId":"expected","endLine":14,"endColumn":34,"fix":{"range":[625,626],"text":"\n"}}
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

View workflow job for this annotation

GitHub Actions / ESLint - Reviewdog

[eslint] reported by reviewdog 🐶 Replace `·variant="solid"·@click="newComment"` with `⏎············variant="solid"⏎············@click="newComment"⏎·········` Raw Output: {"ruleId":"prettier/prettier","severity":2,"message":"Replace `·variant=\"solid\"·@click=\"newComment\"` with `⏎············variant=\"solid\"⏎············@click=\"newComment\"⏎·········`","line":16,"column":25,"nodeType":null,"messageId":"replace","endLine":16,"endColumn":61,"fix":{"range":[816,852],"text":"\n variant=\"solid\"\n @click=\"newComment\"\n "}}

<Button label="Reply" :disabled="isDisabled"

Check failure on line 18 in desk/src/pages/desk/ticket/editor/BottomSection.vue

View workflow job for this annotation

GitHub Actions / ESLint - Reviewdog

[eslint] reported by reviewdog 🐶 Replace `·label="Reply"` with `⏎············label="Reply"⏎···········` Raw Output: {"ruleId":"prettier/prettier","severity":2,"message":"Replace `·label=\"Reply\"` with `⏎············label=\"Reply\"⏎···········`","line":18,"column":18,"nodeType":null,"messageId":"replace","endLine":18,"endColumn":32,"fix":{"range":[874,888],"text":"\n label=\"Reply\"\n "}}

Check warning on line 18 in desk/src/pages/desk/ticket/editor/BottomSection.vue

View workflow job for this annotation

GitHub Actions / ESLint - Reviewdog

[eslint] reported by reviewdog 🐶 Expected a linebreak before this attribute. Raw Output: {"ruleId":"vue/first-attribute-linebreak","severity":1,"message":"Expected a linebreak before this attribute.","line":18,"column":19,"nodeType":"VAttribute","messageId":"expected","endLine":18,"endColumn":32,"fix":{"range":[874,875],"text":"\n"}}
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

View workflow job for this annotation

GitHub Actions / ESLint - Reviewdog

[eslint] reported by reviewdog 🐶 Replace `·variant="solid"·@click="newCommunication"·/>⏎` with `⏎············variant="solid"⏎············@click="newCommunication"⏎··········/>` Raw Output: {"ruleId":"prettier/prettier","severity":2,"message":"Replace `·variant=\"solid\"·@click=\"newCommunication\"·/>⏎` with `⏎············variant=\"solid\"⏎············@click=\"newCommunication\"⏎··········/>`","line":20,"column":24,"nodeType":null,"messageId":"replace","endLine":21,"endColumn":1,"fix":{"range":[1062,1108],"text":"\n variant=\"solid\"\n @click=\"newCommunication\"\n />"}}

</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

View workflow job for this annotation

GitHub Actions / ESLint - Reviewdog

[eslint] reported by reviewdog 🐶 Replace `·:show="showArticleResponse"` with `⏎······:show="showArticleResponse"⏎·····` Raw Output: {"ruleId":"prettier/prettier","severity":2,"message":"Replace `·:show=\"showArticleResponse\"` with `⏎······:show=\"showArticleResponse\"⏎·····`","line":25,"column":22,"nodeType":null,"messageId":"replace","endLine":25,"endColumn":50,"fix":{"range":[1187,1215],"text":"\n :show=\"showArticleResponse\"\n "}}

Check warning on line 25 in desk/src/pages/desk/ticket/editor/BottomSection.vue

View workflow job for this annotation

GitHub Actions / ESLint - Reviewdog

[eslint] reported by reviewdog 🐶 Expected a linebreak before this attribute. Raw Output: {"ruleId":"vue/first-attribute-linebreak","severity":1,"message":"Expected a linebreak before this attribute.","line":25,"column":23,"nodeType":"VAttribute","messageId":"expected","endLine":25,"endColumn":50,"fix":{"range":[1187,1188],"text":"\n"}}
@contentVal="(val) => (editor.content = val)" />

Check warning on line 26 in desk/src/pages/desk/ticket/editor/BottomSection.vue

View workflow job for this annotation

GitHub Actions / ESLint - Reviewdog

[eslint] reported by reviewdog 🐶 v-on event '@contentVal' must be hyphenated. Raw Output: {"ruleId":"vue/v-on-event-hyphenation","severity":1,"message":"v-on event '@contentVal' must be hyphenated.","line":26,"column":7,"nodeType":"VDirectiveKey","endLine":26,"endColumn":52}

Check failure on line 26 in desk/src/pages/desk/ticket/editor/BottomSection.vue

View workflow job for this annotation

GitHub Actions / ESLint - Reviewdog

[eslint] reported by reviewdog 🐶 Insert `⏎···` Raw Output: {"ruleId":"prettier/prettier","severity":2,"message":"Insert `⏎···`","line":26,"column":52,"nodeType":null,"messageId":"insert","endLine":26,"endColumn":52,"fix":{"range":[1304,1304],"text":"\n "}}
<CannedResponses :show="showCannedResponses" @close="showCannedResponses = false" />
</span>
</template>

Expand All @@ -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",
Expand Down

0 comments on commit c17615c

Please sign in to comment.