translations added for ticket status
This commit is contained in:
parent
f1248a767a
commit
9174ac3697
|
|
@ -187,4 +187,7 @@ export const locale = {
|
|||
AUTH_CODE_SENT_TO_YOUR_EMAIL: `Biz siziň elektron poçtaňyza ulgama girmäge rugsat berýän kod ugratdyk`,
|
||||
|
||||
SELECT_CATEGORY: `Bölümi saýlaň`,
|
||||
|
||||
OPEN :"Açyk",
|
||||
CLOSED:"Ýapyk",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
<template>
|
||||
|
||||
<div style="max-width: 1024px;" class="m-auto">
|
||||
|
||||
<!-- BEGIN: FAQ Content -->
|
||||
|
|
@ -23,8 +22,6 @@
|
|||
</div>
|
||||
<!-- END: FAQ Content -->
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
|
@ -42,7 +39,7 @@ const fetchFAQs = async () => {
|
|||
try {
|
||||
isLoading.value = true;
|
||||
FAQs.value.splice(0);
|
||||
// await delay(2000)
|
||||
// await delay(5000)
|
||||
|
||||
const response = await fetchWrapper.get(`${baseUrl}/faqs`);
|
||||
|
||||
|
|
|
|||
|
|
@ -7,31 +7,26 @@
|
|||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
<div class="intro-y chat grid grid-cols-12 gap-5 mt-5">
|
||||
<!-- BEGIN: Chat Side Menu -->
|
||||
<div class="col-span-12 lg:col-span-4 2xl:col-span-3">
|
||||
<div class="chat__chat-list overflow-y-auto scrollbar-hidden pr-1 pt-1">
|
||||
<div
|
||||
v-for="(ticket, ticketKey) in ticketList"
|
||||
:key="ticketKey"
|
||||
<div v-for="(ticket, ticketKey) in ticketList" :key="ticketKey"
|
||||
class="intro-x cursor-pointer box relative flex items-center p-5"
|
||||
:class="[ {'mt-5': ticketKey}, active == ticket.id ? ['bg-slate-200', 'pointer-events-none'] : '' ]"
|
||||
@click.capture="goToTicket(ticket.id)"
|
||||
>
|
||||
:class="[{ 'mt-5': ticketKey }, active == ticket.id ? ['bg-slate-200', 'pointer-events-none'] : '']"
|
||||
@click.capture="goToTicket(ticket.id)">
|
||||
<div class="ml-2 overflow-hidden w-full">
|
||||
<div class="flex items-center justify-between">
|
||||
<a href="javascript:;" class="font-medium">{{ ticket.title }}</a>
|
||||
<div class="text-xs text-slate-400 ml-3">{{ $t('CREATED') }} {{ normalizeDate(ticket.created_at) }}</div>
|
||||
</div>
|
||||
<div class="w-full truncate text-slate-500 mt-0.5">
|
||||
{{ $t('STATUS') }}: {{ ticket.status }}
|
||||
{{ $t('STATUS') }}: {{ $t(ticket.status.toUpperCase()) }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="ticket.last_sender === 'admin'"
|
||||
class="w-5 h-5 flex items-center justify-center absolute top-0 right-0 text-xs text-white rounded-full bg-primary font-medium -mt-1 -mr-1"
|
||||
>
|
||||
<div v-if="ticket.last_sender === 'admin'"
|
||||
class="w-5 h-5 flex items-center justify-center absolute top-0 right-0 text-xs text-white rounded-full bg-primary font-medium -mt-1 -mr-1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -43,9 +38,7 @@
|
|||
<div class="chat__box box">
|
||||
<!-- BEGIN: Chat Active -->
|
||||
<div v-show="chatBox" class="h-full flex flex-col">
|
||||
<div
|
||||
class="flex flex-col sm:flex-row border-b border-slate-200/60 dark:border-darkmode-400 px-5 py-4"
|
||||
>
|
||||
<div class="flex flex-col sm:flex-row border-b border-slate-200/60 dark:border-darkmode-400 px-5 py-4">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3 mr-auto">
|
||||
<div class="font-medium text-base">{{ $t("TMEX_ADMINS_TEAM") }}</div>
|
||||
|
|
@ -56,9 +49,7 @@
|
|||
<template v-for="ticketMessage in ticketMessageList" :key="ticketMessage.id">
|
||||
<template v-if="ticketMessage.is_client">
|
||||
<div class="chat__box__text-box flex items-end float-right mb-4">
|
||||
<div
|
||||
class="bg-primary px-4 py-3 text-white rounded-l-md rounded-t-md"
|
||||
>
|
||||
<div class="bg-primary px-4 py-3 text-white rounded-l-md rounded-t-md">
|
||||
{{ ticketMessage.content }}
|
||||
<div class="mt-1 text-xs text-white text-opacity-80">
|
||||
{{ normalizeDate(ticketMessage.created_at) }}
|
||||
|
|
@ -69,9 +60,7 @@
|
|||
</template>
|
||||
<template v-else>
|
||||
<div class="chat__box__text-box flex items-end float-left mb-4">
|
||||
<div
|
||||
class="bg-slate-100 dark:bg-darkmode-400 px-4 py-3 text-slate-500 rounded-r-md rounded-t-md"
|
||||
>
|
||||
<div class="bg-slate-100 dark:bg-darkmode-400 px-4 py-3 text-slate-500 rounded-r-md rounded-t-md">
|
||||
{{ ticketMessage.content }}
|
||||
<div class="mt-1 text-xs text-slate-500">{{ normalizeDate(ticketMessage.created_at) }}</div>
|
||||
</div>
|
||||
|
|
@ -80,22 +69,14 @@
|
|||
</template>
|
||||
</template>
|
||||
</div>
|
||||
<div
|
||||
class="pt-4 pb-10 sm:py-4 flex items-center border-t border-slate-200/60 dark:border-darkmode-400"
|
||||
>
|
||||
<div class="pt-4 pb-10 sm:py-4 flex items-center border-t border-slate-200/60 dark:border-darkmode-400">
|
||||
<textarea
|
||||
class="chat__box__input form-control dark:bg-darkmode-600 h-16 resize-none border-transparent px-5 py-3 shadow-none focus:border-transparent focus:ring-0"
|
||||
rows="1"
|
||||
:placeholder=" $t('TYPE_TICKET_MESSAGE') "
|
||||
v-model="content"
|
||||
></textarea>
|
||||
rows="1" :placeholder="$t('TYPE_TICKET_MESSAGE')" v-model="content"></textarea>
|
||||
|
||||
<a
|
||||
href="javascript:;"
|
||||
<a href="javascript:;"
|
||||
class="w-8 h-8 sm:w-10 sm:h-10 block bg-primary text-white rounded-full flex-none flex items-center justify-center mr-5"
|
||||
:class="[ content === '' ? ['opacity-50', 'pointer-events-none'] : '' ]"
|
||||
@click="sendMessage"
|
||||
>
|
||||
:class="[content === '' ? ['opacity-50', 'pointer-events-none'] : '']" @click="sendMessage">
|
||||
<SendIcon class="w-4 h-4" />
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -106,11 +87,7 @@
|
|||
<div class="mx-auto text-center">
|
||||
<div class="mt-3">
|
||||
<div class="font-medium">
|
||||
<LoadingIcon
|
||||
icon="oval"
|
||||
color="#003197"
|
||||
class="w-20 h-20"
|
||||
/>
|
||||
<LoadingIcon icon="oval" color="#003197" class="w-20 h-20" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -119,20 +96,15 @@
|
|||
<!-- BEGIN: Chat Default -->
|
||||
<div v-show="!chatBox && !isTicketLoading" class="h-full flex items-center">
|
||||
<div class="mx-auto text-center">
|
||||
<div
|
||||
class="w-16 h-16 flex-none image-fit rounded-full overflow-hidden mx-auto"
|
||||
>
|
||||
<img
|
||||
alt="TMEX ICON"
|
||||
src="@/assets/images/fav_icon.svg"
|
||||
/>
|
||||
<div class="w-16 h-16 flex-none image-fit rounded-full overflow-hidden mx-auto">
|
||||
<img alt="TMEX ICON" src="@/assets/images/fav_icon.svg" />
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<div v-if="user" class="font-medium">
|
||||
{{ $t("SIMPLE_HELLO") }}, {{ user.firstname}} {{ user.lastname }}!
|
||||
{{ $t("SIMPLE_HELLO") }}, {{ user.firstname }} {{ user.lastname }}!
|
||||
</div>
|
||||
<div class="text-slate-500 mt-1" v-html="$t('PLEASE_SELECT_TICKET')">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -174,7 +146,7 @@ const onCreateTicket = () => router.push({ path: "/ticket-list/create" });
|
|||
const goToTicket = (ticketId) => router.push({ name: "ticket-list", query: { ticketId: ticketId } });
|
||||
|
||||
const showChatBox = async (ticketId) => {
|
||||
|
||||
|
||||
chatBox.value = false;
|
||||
isTicketLoading.value = true;
|
||||
|
||||
|
|
@ -195,9 +167,9 @@ const scrollToLastMessage = () => {
|
|||
};
|
||||
|
||||
const sendMessage = async () => {
|
||||
|
||||
|
||||
await ticketsStore.sendMessage(content.value, active.value);
|
||||
|
||||
|
||||
content.value = "";
|
||||
|
||||
scrollToLastMessage();
|
||||
|
|
@ -205,7 +177,7 @@ const sendMessage = async () => {
|
|||
|
||||
onBeforeMount(async () => {
|
||||
await ticketsStore.getTickets();
|
||||
if(route.query.ticketId) {
|
||||
if (route.query.ticketId) {
|
||||
showChatBox(route.query.ticketId);
|
||||
}
|
||||
});
|
||||
|
|
@ -213,12 +185,12 @@ onBeforeMount(async () => {
|
|||
watch(
|
||||
computed(() => route.query),
|
||||
() => {
|
||||
if(route.query.ticketId) {
|
||||
if (route.query.ticketId) {
|
||||
console.log(route.query);
|
||||
showChatBox(route.query.ticketId);
|
||||
|
||||
}
|
||||
//console.log(route.query.ticketId);
|
||||
//console.log(route.query.ticketId);
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue