Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions desk/src/components/EmailEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,10 @@ const label = computed(() => {

const emit = defineEmits(["submit", "discard"]);

const newEmail = useStorage("emailBoxContent" + props.ticketId, null);
const newEmail = useStorage<null | string>(
"emailBoxContent" + props.ticketId,
null
);
const { updateOnboardingStep } = useOnboarding("helpdesk");
const { isManager } = useAuthStore();

Expand Down Expand Up @@ -272,8 +275,10 @@ const bcc = computed(() => (bccEmailsClone.value?.length ? true : false));
const ccInput = ref(null);
const bccInput = ref(null);

function applySavedReplies(template) {
newEmail.value = template;
function applySavedReplies(template: string) {
isContentEmpty(newEmail.value)
? (newEmail.value = template)
: (newEmail.value = newEmail.value + "\n" + template);
showSavedRepliesSelectorModal.value = false;
}

Expand Down
12 changes: 6 additions & 6 deletions desk/src/pages/SearchAgent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@
<div class="space-y-1">
<p class="text-ink-gray-6">
{{
__("{0} matches ({1}s)", [
searchResponse.summary.filtered_matches,
searchResponse.summary.duration,
])
__("{0} matches", [searchResponse.summary.filtered_matches])
}}
<span>
{{ __("({0}s)", [searchResponse.summary.duration]) }}
</span>
<span v-if="hasActiveFilters()">
{{
Expand Down Expand Up @@ -171,7 +171,7 @@
<div class="flex items-center">
<div
v-if="item.title"
class="text-base font-medium"
class="text-base font-medium truncate max-w-[60%]"
v-html="item.title"
/>
<div class="text-base font-medium" v-else>
Expand Down Expand Up @@ -211,6 +211,7 @@
import { LayoutHeader } from "@/components";
import SearchMultiSelect from "@/components/SearchMultiSelect.vue";
import { useShortcut } from "@/composables/shortcuts";
import { __ } from "@/translation";
import dayjs from "dayjs";
import {
Breadcrumbs,
Expand All @@ -221,7 +222,6 @@ import {
} from "frappe-ui";
import { computed, onMounted, ref, useTemplateRef, watch } from "vue";
import { useRoute, useRouter } from "vue-router";
import { __ } from "@/translation";
// Icons

// Type Definitions
Expand Down
11 changes: 5 additions & 6 deletions desk/src/pages/ticket/TicketCustomer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,12 @@ import TicketCustomerSidebar from "@/components/ticket/TicketCustomerSidebar.vue
import { setupCustomizations } from "@/composables/formCustomisation";
import { useActiveViewers } from "@/composables/realtime";
import { useScreenSize } from "@/composables/screen";
import { socket } from "@/socket";

import { useConfigStore } from "@/stores/config";
import { globalStore } from "@/stores/globalStore";
import { useTicketStatusStore } from "@/stores/ticketStatus";
import { __ } from "@/translation";
import { isContentEmpty, isCustomerPortal, uploadFunction } from "@/utils";
import LucideWarning from "~icons/lucide/triangle-alert";
import {
Alert,
Breadcrumbs,
Expand Down Expand Up @@ -122,7 +121,6 @@ interface P {
ticketId: string;
}
const router = useRouter();

const props = defineProps<P>();

const { getStatus } = useTicketStatusStore();
Expand Down Expand Up @@ -161,7 +159,7 @@ const showFeedbackDialog = ref(false);
const isExpanded = ref(false);

const { isMobileView } = useScreenSize();
const { $dialog } = globalStore();
const { $dialog, $socket } = globalStore();
const isDismissed = ref(false);

function getTodayKey() {
Expand Down Expand Up @@ -351,12 +349,13 @@ const showFeedback = computed(() => {
return hasAgentCommunication && isFeedbackMandatory;
});
const { startViewing, stopViewing } = useActiveViewers(props.ticketId);

onMounted(() => {
startViewing(props.ticketId);
document.title = props.ticketId;

socket.on("helpdesk:ticket-update", ({ ticket_id }) => {
if (ticket_id === props.ticketId) {
$socket.on("helpdesk:ticket-update", ({ ticket_id }) => {
if (ticket_id == props.ticketId) {
ticket.reload();
}
});
Expand Down
Loading