fixed faq bugs

This commit is contained in:
HAM!DREZA
2024-07-02 18:19:51 +03:30
parent a8e723ddf0
commit d2f71b6b14
21 changed files with 205 additions and 307 deletions
+9 -8
View File
@@ -17,7 +17,7 @@
<div class="flex flex-col flex-col-reverse pb-[10vw]">
<ul
class="space-y-[2vw] md:space-y-[0.5vw] mt-[0.5vw] border-b"
v-for="ticket in tickets"
v-for="ticket in tickets.result"
:key="ticket.id"
>
@@ -118,7 +118,7 @@
<div class="flex flex-col flex-col-reverse pb-[10vw]">
<ul
class="space-y-[2vw] md:space-y-[0.5vw] mt-[0.5vw] border-b"
v-for="ticket in tickets"
v-for="ticket in tickets.result"
:key="ticket.id"
v-show="ticket.status === 'active'"
>
@@ -212,7 +212,7 @@
<div class="flex flex-col flex-col-reverse pb-[10vw]">
<ul
class="space-y-[2vw] md:space-y-[0.5vw] mt-[0.5vw] border-b"
v-for="ticket in tickets"
v-for="ticket in tickets.result"
:key="ticket.id"
v-show="ticket.status !== 'active'"
>
@@ -383,7 +383,7 @@ const month = ref([])
const year = ref([])
const shamsi = ref([])
tickets.value.map(item =>{
tickets.value.result.map(item =>{
item = new Date(item.createdAt)
year.value.push(item.getFullYear())
month.value.push(item.getMonth() + 1)
@@ -442,13 +442,14 @@ const openTicket = async (data) => {
}
}
const {data: single, refresh: reload} = await useFetch("/api/ticket/id", {
method: "POST",
body: {
method: 'POST',
query: {
id: data,
},
});
ticketMessages.value.push(single.value);
reload()
loading.value = false;
};
const sendMessage = async (data, reload) => {
@@ -464,7 +465,7 @@ const sendMessage = async (data, reload) => {
});
content.value = "";
toast.success("تیکت جدید با موفقیت ثبت")
openTicket().reload()
openTicket().reload()
};