11<script setup lang="ts">
2- import { ACCOUNT } from ' ~/libs/appwrite'
32import { useStatusQuery } from ' ~/query/use-status-query'
4- import { useAuthStore } from ' ~/store/auth.store'
5- import { useLoadingStore } from ' ~/store/loading.store'
63
74definePageMeta ({ layout: ' documents' })
85useHead ({ title: ' Documents | Jira software' })
96
10- const router = useRouter ()
11- const loadingStore = useLoadingStore ()
12- const authStore = useAuthStore ()
13-
14- onMounted (() => {
15- ACCOUNT .get ()
16- .then (response => {
17- loadingStore .set (false )
18- authStore .set ({
19- email: response .email ,
20- id: response .$id ,
21- name: response .name ,
22- status: response .status ,
23- })
24- })
25- .catch (() => router .push (' /auth' ))
26- })
27-
28- const { data, isLoading } = useStatusQuery ()
7+ const { data, isLoading, refetch } = useStatusQuery ()
298 </script >
309
3110<template >
3211 <div class =" grid grid-cols-4 gap-2 mt-12" v-if =" isLoading" >
33- <USkeleton class =" h-12 bg-gray-900" />
34- <USkeleton class =" h-12 bg-gray-900" />
35- <USkeleton class =" h-12 bg-gray-900" />
36- <USkeleton class =" h-12 bg-gray-900" />
12+ <USkeleton class =" h-12 dark: bg-gray-900 bg-gray-100 " />
13+ <USkeleton class =" h-12 dark: bg-gray-900 bg-gray-100 " />
14+ <USkeleton class =" h-12 dark: bg-gray-900 bg-gray-100 " />
15+ <USkeleton class =" h-12 dark: bg-gray-900 bg-gray-100 " />
3716
3817 <UiDealsLoader />
3918 <UiDealsLoader />
@@ -42,17 +21,21 @@ const { data, isLoading } = useStatusQuery()
4221 </div >
4322
4423 <div class =" grid grid-cols-4 gap-2 mt-12" v-else >
45- <div v-for =" item in data" :key =" item .id" >
24+ <div v-for =" column in data" :key =" column .id" >
4625 <UButton class =" w-full h-12" color =" blue" variant =" outline" >
4726 <div class =" flex items-center space-x-2" >
48- <span class =" font-bold" >{{ item.name }}</span >
49- <span class =" text-sm text-neutral-500" >{{ item.items.length }}</span >
27+ <span class =" font-bold" >{{ column.name }}</span >
28+ <span class =" text-sm text-neutral-500" >{{
29+ column.items.length
30+ }}</span >
5031 </div >
5132 </UButton >
5233
34+ <SharedCreateDeal :status =" column.id" :refetch =" refetch" />
35+
5336 <div
54- class =" my-3 bg-gray-900 rounded-md p-2"
55- v-for =" card in item .items"
37+ class =" my-3 dark: bg-gray-900 bg-gray-100 rounded-md p-2 animation "
38+ v-for =" card in column .items"
5639 :key =" card.$id"
5740 role =" button"
5841 draggable =" true"
@@ -78,3 +61,20 @@ const { data, isLoading } = useStatusQuery()
7861 </div >
7962 </div >
8063</template >
64+
65+ <style scoped>
66+ @keyframes show {
67+ from {
68+ transform : scale (0.5 ) translateY (-30px );
69+ opacity : 0.4 ;
70+ }
71+ to {
72+ transform : scale (1 ) translateY (0 );
73+ opacity : 1 ;
74+ }
75+ }
76+
77+ .animation {
78+ animation : show 0.3s ease-in-out ;
79+ }
80+ </style >
0 commit comments