complete progress section
This commit is contained in:
+7
-22
@@ -133,7 +133,7 @@
|
||||
<p
|
||||
class="text-[3.59vw] md:text-[1.055vw] font-[600] text-[#383E43]"
|
||||
>
|
||||
{{ tickets.data.value.length }}
|
||||
{{ tickets?.data.value.length }}
|
||||
تیکت
|
||||
</p>
|
||||
<p
|
||||
@@ -219,7 +219,7 @@
|
||||
</nuxt-link>
|
||||
</div>
|
||||
|
||||
<div v-if="lastTickets.length > 0" class="lastTickets mt-[20vw] md:mt-[2.917vw]">
|
||||
<div v-if="lastTickets?.length > 0" class="lastTickets mt-[20vw] md:mt-[2.917vw]">
|
||||
<div class="flex flex-col">
|
||||
<div class="flex justify-between items-center border-b pb-[0.733vw]">
|
||||
<p class="text-[4.038vw] md:text-[1.055vw] font-[500]">
|
||||
@@ -273,19 +273,7 @@
|
||||
مشاهده
|
||||
</nuxt-link>
|
||||
</div>
|
||||
<!-- <div class="flex justify-between items-center mt-[0.833vw] px-2">
|
||||
<p class="text-[3.19vw] md:text-[0.833vw] text-[#000]">
|
||||
طراحی سایت
|
||||
</p>
|
||||
<p class="text-[3.19vw] md:text-[0.833vw] text-[#878787]">
|
||||
1402/09/12
|
||||
</p>
|
||||
<p
|
||||
class="flex justify-center items-center text-[2.518vw] md:text-[0.658vw] px-[2.564vw] md:px-[0.417vw] py-[2.051vw] md:py-[0.521vw] text-[#2ED573] bg-[#2ED5731A] rounded-[2.051vw] md:rounded-[0.521vw]"
|
||||
>
|
||||
پاسخ داده شده
|
||||
</p>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -531,10 +519,11 @@
|
||||
|
||||
<script setup>
|
||||
const profileImage = useState('profileImage')
|
||||
const tickets = await useFetch("/api/ticket");
|
||||
const lastTickets = tickets.data.value.slice(-2);
|
||||
const tickets = await useFetch("/api/ticket/getTickets");
|
||||
console.log('tick',tickets.data);
|
||||
const lastTickets = tickets?.data?.value.slice(-2);
|
||||
const myCourses = await useFetch("/api/auth/me");
|
||||
const lastCourses = myCourses.data.value.course.slice(-2);
|
||||
const lastCourses = myCourses.data?.value.course.slice(-2);
|
||||
const balance = await useFetch("/api/user/balance");
|
||||
const { authUser } = useAuth();
|
||||
|
||||
@@ -548,12 +537,8 @@ const timeDifference = today.getTime() - pastDate.getTime();
|
||||
const dayDifference = timeDifference / (1000 * 3600 * 24);
|
||||
const roundDay = Math.ceil(dayDifference)
|
||||
|
||||
console.log(`تفاوت بین تاریخ امروز و تاریخ گذشته: ${roundDay} روز`);
|
||||
|
||||
|
||||
|
||||
console.log(today);
|
||||
console.log(today - authUser.value.createdAt);
|
||||
definePageMeta({
|
||||
middleware: "auth",
|
||||
});
|
||||
|
||||
@@ -11,13 +11,18 @@
|
||||
</div>
|
||||
</tab>
|
||||
<tab :name=tab2>
|
||||
محتوا دوم
|
||||
<div class="me-[4vw] grid grid-cols-1 md:grid-cols-3 mt-[6vw] md:mt-[1.25vw] gap-[1vw]">
|
||||
|
||||
<div v-for="item in myCourses.data.value.course" :key="item.id">
|
||||
<ProgressCard :item="item"/>
|
||||
</div>
|
||||
</div>
|
||||
</tab>
|
||||
<tab :name=tab3>
|
||||
<!-- <tab :name=tab3>
|
||||
محتوا سوم
|
||||
</tab>
|
||||
</tab> -->
|
||||
<tab :name=tab4>
|
||||
محتوا سوم
|
||||
|
||||
</tab>
|
||||
</tabs>
|
||||
</div>
|
||||
|
||||
@@ -184,6 +184,7 @@ const edit = async (formData) => {
|
||||
};
|
||||
//const token = getCookie(event, 'token');
|
||||
async function changePhoto(val) {
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append("directoryName", "test");
|
||||
formData.append("file", val.target.files[0]);
|
||||
|
||||
@@ -371,7 +371,7 @@ import {Tabs, Tab} from 'vue3-tabs-component';
|
||||
import { useToast } from 'vue-toastification'
|
||||
const toast = useToast()
|
||||
|
||||
const { data: tickets, refresh: load } = await useFetch("/api/ticket");
|
||||
const { data: tickets, refresh: load } = await useFetch("/api/ticket/getTickets");
|
||||
const loading = ref(false);
|
||||
const addTicketForm = ref(false);
|
||||
const subject = ref(null);
|
||||
@@ -413,7 +413,7 @@ const sendTicket = async () => {
|
||||
if (subject.value === null) {
|
||||
return toast.error("موضوع تیکت را وارد کنید")
|
||||
}
|
||||
const data = await useFetch("/api/ticket", {
|
||||
const data = await useFetch("/api/ticket/send", {
|
||||
method: "POST",
|
||||
body: {
|
||||
subject: subject.value,
|
||||
|
||||
Reference in New Issue
Block a user