@zap-wunschlachen/wl-shared-components 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/App.vue +5 -48
- package/package.json +1 -1
- package/src/components/Appointment/Card/Card.vue +3 -10
- package/src/utils/General.ts +42 -0
package/App.vue
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
<div class="app">
|
|
3
3
|
<div class="element-container">
|
|
4
4
|
<div style="height:100%; width: 100%; display: flex; flex-direction: column; gap: 20px;">
|
|
5
|
-
<Card :appointment="value0"
|
|
6
|
-
<Card disabled :appointment="value1"
|
|
7
|
-
<Card :appointment="value2"
|
|
8
|
-
<Card :appointment="value3"
|
|
9
|
-
<Card duplicate-treatment-datetime disabled :appointment="value4"
|
|
5
|
+
<Card :appointment="value0" :dentist-image-src="value0.dentist.imageSrc" @confirm="onConfirmed" @cancel="onCancelled" @reschedule="onRescheduled" />
|
|
6
|
+
<Card disabled :appointment="value1" :dentist-image-src="value1.dentist.imageSrc" @confirm="onConfirmed" @cancel="onCancelled" @reschedule="onRescheduled" />
|
|
7
|
+
<Card :appointment="value2" :dentist-image-src="value2.dentist.imageSrc" @confirm="onConfirmed" @cancel="onCancelled" @reschedule="onRescheduled" />
|
|
8
|
+
<Card :appointment="value3" :dentist-image-src="value3.dentist.imageSrc" @confirm="onConfirmed" @cancel="onCancelled" @reschedule="onRescheduled" />
|
|
9
|
+
<Card duplicate-treatment-datetime disabled :appointment="value4" :dentist-image-src="value4.dentist.imageSrc" @confirm="onConfirmed" @cancel="onCancelled" @reschedule="onRescheduled" />
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
@@ -123,49 +123,6 @@ const value4 = ref<AppointmentData>({
|
|
|
123
123
|
address: "Musterstraße 1, 12345 Musterstadt",
|
|
124
124
|
district: "Musterstadt-Mitte"
|
|
125
125
|
});
|
|
126
|
-
|
|
127
|
-
const appointmentTypes = ref([
|
|
128
|
-
{
|
|
129
|
-
id: 0,
|
|
130
|
-
icon: 'simple',
|
|
131
|
-
title: 'Simple',
|
|
132
|
-
content: '1 Patient <br>1 Behandler <br>1 Behandlungen',
|
|
133
|
-
description: 'Hier steht Text zu der Termin option die ungefähr so lang ist.',
|
|
134
|
-
additionalClass: "hidden"
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
id: 1,
|
|
138
|
-
icon: 'multitermin',
|
|
139
|
-
title: 'Multitermin',
|
|
140
|
-
content: '1 Patient <br>1 Behandler <br>2 Behandlungen',
|
|
141
|
-
description: 'Hier steht Text zu der Termin option die ungefähr so lang ist.',
|
|
142
|
-
additionalClass: ""
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
id: 2,
|
|
146
|
-
icon: 'supervision',
|
|
147
|
-
title: 'Supervision',
|
|
148
|
-
content: '1 Patient <br>2 Behandler <br> 1 Behandlungen',
|
|
149
|
-
description: 'Hier steht Text zu der Termin option die ungefähr so lang ist.',
|
|
150
|
-
additionalClass: ""
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
id: 3,
|
|
154
|
-
icon: 'doppeltermin',
|
|
155
|
-
title: 'Doppeltermin',
|
|
156
|
-
content: '2 Patienten <br> 1 Behandler <br> 1 Behandlungen',
|
|
157
|
-
description: 'Hier steht Text zu der Termin option die ungefähr so lang ist.',
|
|
158
|
-
additionalClass: ""
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
id: 4,
|
|
162
|
-
icon: 'kombitermin',
|
|
163
|
-
title: 'Kombitermin',
|
|
164
|
-
content: '1 Patient <br> 2 Behandler <br> 2 Behandlungen',
|
|
165
|
-
description: 'Hier steht Text zu der Termin option die ungefähr so lang ist.',
|
|
166
|
-
additionalClass: ""
|
|
167
|
-
},
|
|
168
|
-
]);
|
|
169
126
|
</script>
|
|
170
127
|
|
|
171
128
|
<style scoped>
|
package/package.json
CHANGED
|
@@ -47,9 +47,10 @@
|
|
|
47
47
|
|
|
48
48
|
<script setup lang="ts">
|
|
49
49
|
import { format } from 'date-fns'
|
|
50
|
-
import IconsAdvanceAppointments from '
|
|
50
|
+
import IconsAdvanceAppointments from '@/components/Icons/AdvanceAppointments.vue';
|
|
51
51
|
import { de } from 'date-fns/locale'
|
|
52
52
|
import type { AppointmentData } from '@/types'
|
|
53
|
+
import { appointmentTypes } from '@/utils/General'
|
|
53
54
|
import Details from './Details.vue'
|
|
54
55
|
import Actions from './Actions.vue'
|
|
55
56
|
import { computed } from 'vue'
|
|
@@ -63,7 +64,6 @@ const props = defineProps<{
|
|
|
63
64
|
dentistImageSrc?: string,
|
|
64
65
|
disabled?: boolean,
|
|
65
66
|
duplicateTreatmentDatetime?: boolean,
|
|
66
|
-
appointmentTypes: Array<{ id: number, icon: string, title: string }>
|
|
67
67
|
}>();
|
|
68
68
|
|
|
69
69
|
const treatmentDate = computed(() => {
|
|
@@ -74,15 +74,8 @@ const treatmentTime = computed(() => {
|
|
|
74
74
|
return format(props.appointment ? new Date(props.appointment.start) : new Date(), 'HH:mm')
|
|
75
75
|
})
|
|
76
76
|
|
|
77
|
-
console.log('Rendering Card for appointment:', props.appointment);
|
|
78
|
-
console.log('Disabled state:', props.disabled);
|
|
79
|
-
console.log('Appointment Link:', props.appointmentLink);
|
|
80
|
-
console.log('Dentist Image Src:', props.dentistImageSrc);
|
|
81
|
-
console.log('Duplicate Treatment Datetime:', props.duplicateTreatmentDatetime);
|
|
82
|
-
|
|
83
|
-
|
|
84
77
|
const getAppointmentType = computed(() => {
|
|
85
|
-
return
|
|
78
|
+
return appointmentTypes.find(item => item.id === props.appointment?.type)
|
|
86
79
|
})
|
|
87
80
|
</script>
|
|
88
81
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export const appointmentTypes = [
|
|
2
|
+
{
|
|
3
|
+
id: 0,
|
|
4
|
+
icon: 'simple',
|
|
5
|
+
title: 'Simple',
|
|
6
|
+
content: '1 Patient <br>1 Behandler <br>1 Behandlungen',
|
|
7
|
+
description: 'Hier steht Text zu der Termin option die ungefähr so lang ist.',
|
|
8
|
+
additionalClass: "hidden"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
id: 1,
|
|
12
|
+
icon: 'multitermin',
|
|
13
|
+
title: 'Multitermin',
|
|
14
|
+
content: '1 Patient <br>1 Behandler <br>2 Behandlungen',
|
|
15
|
+
description: 'Hier steht Text zu der Termin option die ungefähr so lang ist.',
|
|
16
|
+
additionalClass: ""
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: 2,
|
|
20
|
+
icon: 'supervision',
|
|
21
|
+
title: 'Supervision',
|
|
22
|
+
content: '1 Patient <br>2 Behandler <br> 1 Behandlungen',
|
|
23
|
+
description: 'Hier steht Text zu der Termin option die ungefähr so lang ist.',
|
|
24
|
+
additionalClass: ""
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 3,
|
|
28
|
+
icon: 'doppeltermin',
|
|
29
|
+
title: 'Doppeltermin',
|
|
30
|
+
content: '2 Patienten <br> 1 Behandler <br> 1 Behandlungen',
|
|
31
|
+
description: 'Hier steht Text zu der Termin option die ungefähr so lang ist.',
|
|
32
|
+
additionalClass: ""
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 4,
|
|
36
|
+
icon: 'kombitermin',
|
|
37
|
+
title: 'Kombitermin',
|
|
38
|
+
content: '1 Patient <br> 2 Behandler <br> 2 Behandlungen',
|
|
39
|
+
description: 'Hier steht Text zu der Termin option die ungefähr so lang ist.',
|
|
40
|
+
additionalClass: ""
|
|
41
|
+
},
|
|
42
|
+
];
|