1
1
<template >
2
2
<div class =" flex flex-col bg-white rounded w-full py-6 px-4 border-none" >
3
- <h2 class =" text-lg font-bold text-gray-900" >
4
- Hey, {{ employee?.data?.first_name }} 👋
5
- </h2 >
3
+ <h2 class =" text-lg font-bold text-gray-900" >Hey, {{ employee?.data?.first_name }} 👋</h2 >
6
4
7
5
<template v-if =" allowCheckinFromMobile .data " >
8
6
<div class =" font-medium text-sm text-gray-500 mt-1.5" v-if =" lastLog" >
15
13
>
16
14
<template #prefix >
17
15
<FeatherIcon
18
- :name ="
19
- nextAction.action === 'IN'
20
- ? 'arrow-right-circle'
21
- : 'arrow-left-circle'
22
- "
16
+ :name =" nextAction.action === 'IN' ? 'arrow-right-circle' : 'arrow-left-circle'"
23
17
class =" w-4"
24
18
/>
25
19
</template >
26
20
{{ nextAction.label }}
27
21
</Button >
22
+
23
+ <ion-modal
24
+ ref =" modal"
25
+ trigger =" open-checkin-modal"
26
+ :initial-breakpoint =" 1"
27
+ :breakpoints =" [0, 1]"
28
+ >
29
+ <div class =" h-40 w-full flex flex-col items-center justify-center gap-5 p-4 mb-5" >
30
+ <div class =" flex flex-col gap-1.5 items-center justify-center" >
31
+ <div class =" font-bold text-xl" >
32
+ {{ dayjs(checkinTimestamp).format("hh:mm:ss a") }}
33
+ </div >
34
+ <div class =" font-medium text-gray-500 text-sm" >
35
+ {{ dayjs().format("D MMM, YYYY") }}
36
+ </div >
37
+ </div >
38
+ <Button
39
+ variant =" solid"
40
+ class =" w-full py-5 text-sm"
41
+ @click =" submitLog(nextAction.action)"
42
+ >
43
+ Confirm {{ nextAction.label }}
44
+ </Button >
45
+ </div >
46
+ </ion-modal >
28
47
</template >
48
+
29
49
<div v-else class =" font-medium text-sm text-gray-500 mt-1.5" >
30
50
{{ dayjs().format("ddd, D MMMM, YYYY") }}
31
51
</div >
32
52
</div >
33
-
34
- <ion-modal
35
- ref =" modal"
36
- trigger =" open-checkin-modal"
37
- :initial-breakpoint =" 1"
38
- :breakpoints =" [0, 1]"
39
- >
40
- <div
41
- class =" h-40 w-full flex flex-col items-center justify-center gap-5 p-4 mb-5"
42
- >
43
- <div class =" flex flex-col gap-1.5 items-center justify-center" >
44
- <div class =" font-bold text-xl" >
45
- {{ dayjs(checkinTimestamp).format("hh:mm:ss a") }}
46
- </div >
47
- <div class =" font-medium text-gray-500 text-sm" >
48
- {{ dayjs().format("D MMM, YYYY") }}
49
- </div >
50
- </div >
51
- <Button
52
- variant =" solid"
53
- class =" w-full py-5 text-sm"
54
- @click =" submitLog(nextAction.action)"
55
- >
56
- Confirm {{ nextAction.label }}
57
- </Button >
58
- </div >
59
- </ion-modal >
60
53
</template >
61
54
62
55
<script setup>
@@ -74,14 +67,7 @@ const checkinTimestamp = ref(null)
74
67
75
68
const checkins = createListResource ({
76
69
doctype: DOCTYPE ,
77
- fields: [
78
- " name" ,
79
- " employee" ,
80
- " employee_name" ,
81
- " log_type" ,
82
- " time" ,
83
- " device_id" ,
84
- ],
70
+ fields: [" name" , " employee" , " employee_name" , " log_type" , " time" , " device_id" ],
85
71
filters: {
86
72
employee: employee .data .name ,
87
73
},
0 commit comments