@cnamts/synapse 0.0.11-alpha → 0.0.12-alpha
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/dist/design-system-v3.js +3878 -3189
- package/dist/design-system-v3.umd.cjs +1 -1
- package/dist/src/components/Amelipro/types/languages.d.ts +6 -0
- package/dist/src/components/Amelipro/types/types.d.ts +65 -0
- package/dist/src/components/CookieBanner/CookieBanner.d.ts +1 -1
- package/dist/src/components/Customs/SyInputSelect/SyInputSelect.d.ts +2 -0
- package/dist/src/components/Customs/SyTextField/SyTextField.d.ts +29 -23
- package/dist/src/components/Customs/SyTextField/types.d.ts +1 -0
- package/dist/src/components/DatePicker/DatePicker.d.ts +70 -59
- package/dist/src/components/DatePicker/DateTextInput.d.ts +67 -56
- package/dist/src/components/ErrorPage/ErrorPage.d.ts +1 -1
- package/dist/src/components/FileList/FileList.d.ts +1 -0
- package/dist/src/components/FileList/UploadItem/UploadItem.d.ts +1 -1
- package/dist/src/components/FilterSideBar/FilterSideBar.d.ts +31 -0
- package/dist/src/components/FilterSideBar/locales.d.ts +7 -0
- package/dist/src/components/FilterSideBar/tests/FilterSideBar.spec.d.ts +1 -0
- package/dist/src/components/LangBtn/LangBtn.d.ts +2 -2
- package/dist/src/components/NirField/NirField.d.ts +940 -0
- package/dist/src/components/NotificationBar/NotificationBar.d.ts +1 -1
- package/dist/src/components/PasswordField/PasswordField.d.ts +40 -8
- package/dist/src/components/PeriodField/PeriodField.d.ts +142 -120
- package/dist/src/components/PhoneField/PhoneField.d.ts +11 -2
- package/dist/src/components/RatingPicker/EmotionPicker/EmotionPicker.d.ts +1 -1
- package/dist/src/components/RatingPicker/NumberPicker/NumberPicker.d.ts +1 -1
- package/dist/src/components/RatingPicker/StarsPicker/StarsPicker.d.ts +1 -1
- package/dist/src/components/UploadWorkflow/config.d.ts +29 -0
- package/dist/src/components/UploadWorkflow/locales.d.ts +7 -0
- package/dist/src/components/UploadWorkflow/tests/UploadWorkflow.spec.d.ts +1 -0
- package/dist/src/components/UploadWorkflow/types.d.ts +19 -0
- package/dist/src/components/UploadWorkflow/useFileList.d.ts +10 -0
- package/dist/src/components/UploadWorkflow/useFileUploadJourney.d.ts +9 -0
- package/dist/src/components/index.d.ts +2 -0
- package/dist/src/composables/rules/useFieldValidation.d.ts +1 -0
- package/dist/src/composables/validation/tests/useValidation.spec.d.ts +1 -0
- package/dist/src/composables/validation/useValidation.d.ts +39 -0
- package/dist/src/designTokens/index.d.ts +3 -1
- package/dist/src/vuetifyConfig.d.ts +81 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/assets/_elevations.scss +89 -0
- package/src/assets/_fonts.scss +6 -0
- package/src/assets/_radius.scss +86 -0
- package/src/assets/_spacers.scss +149 -0
- package/src/assets/settings.scss +7 -3
- package/src/assets/tokens.scss +32 -29
- package/src/components/Amelipro/types/languages.d.ts +6 -0
- package/src/components/Amelipro/types/types.d.ts +65 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +65 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.vue +13 -3
- package/src/components/Customs/SySelect/SySelect.stories.ts +88 -5
- package/src/components/Customs/SySelect/SySelect.vue +36 -10
- package/src/components/Customs/SySelect/tests/SySelect.spec.ts +135 -2
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +576 -85
- package/src/components/Customs/SyTextField/SyTextField.vue +132 -104
- package/src/components/Customs/SyTextField/tests/SyTextField.spec.ts +190 -38
- package/src/components/Customs/SyTextField/types.d.ts +1 -0
- package/src/components/DatePicker/DatePicker.vue +405 -137
- package/src/components/DatePicker/DateTextInput.vue +15 -0
- package/src/components/DatePicker/tests/DatePicker.spec.ts +8 -15
- package/src/components/FileList/FileList.vue +2 -1
- package/src/components/FileList/UploadItem/UploadItem.vue +10 -0
- package/src/components/FileUpload/FileUpload.stories.ts +84 -0
- package/src/components/FileUpload/FileUpload.vue +1 -0
- package/src/components/FileUpload/tests/FileUpload.spec.ts +4 -4
- package/src/components/FilterInline/FilterInline.mdx +180 -34
- package/src/components/FilterInline/FilterInline.stories.ts +363 -6
- package/src/components/FilterSideBar/FilterSideBar.mdx +237 -0
- package/src/components/FilterSideBar/FilterSideBar.stories.ts +798 -0
- package/src/components/FilterSideBar/FilterSideBar.vue +193 -0
- package/src/components/FilterSideBar/locales.ts +8 -0
- package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +305 -0
- package/src/components/FilterSideBar/tests/__snapshots__/FilterSideBar.spec.ts.snap +39 -0
- package/src/components/HeaderBar/Usages.mdx +1 -1
- package/src/components/NirField/NirField.stories.ts +573 -29
- package/src/components/NirField/NirField.vue +397 -359
- package/src/components/NirField/tests/NirField.spec.ts +88 -52
- package/src/components/NirField/tests//342/200/257dataset/342/200/257.md +12 -0
- package/src/components/NotificationBar/Accessibilite.stories.ts +4 -0
- package/src/components/NotificationBar/NotificationBar.stories.ts +18 -13
- package/src/components/PasswordField/PasswordField.mdx +129 -47
- package/src/components/PasswordField/PasswordField.stories.ts +924 -120
- package/src/components/PasswordField/PasswordField.vue +209 -99
- package/src/components/PasswordField/tests/PasswordField.spec.ts +138 -9
- package/src/components/PeriodField/PeriodField.vue +55 -54
- package/src/components/PhoneField/PhoneField.stories.ts +69 -0
- package/src/components/PhoneField/PhoneField.vue +3 -0
- package/src/components/PhoneField/indicatifs.ts +1 -1
- package/src/components/UploadWorkflow/UploadWorkflow.mdx +75 -0
- package/src/components/UploadWorkflow/UploadWorkflow.stories.ts +943 -0
- package/src/components/UploadWorkflow/UploadWorkflow.vue +230 -0
- package/src/components/UploadWorkflow/config.ts +29 -0
- package/src/components/UploadWorkflow/locales.ts +8 -0
- package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +257 -0
- package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +54 -0
- package/src/components/UploadWorkflow/types.ts +21 -0
- package/src/components/UploadWorkflow/useFileList.ts +84 -0
- package/src/components/UploadWorkflow/useFileUploadJourney.ts +18 -0
- package/src/components/index.ts +2 -0
- package/src/composables/rules/useFieldValidation.ts +5 -2
- package/src/composables/validation/tests/useValidation.spec.ts +154 -0
- package/src/composables/validation/useValidation.ts +165 -0
- package/src/designTokens/index.ts +4 -0
- package/src/stories/Demarrer/Accueil.mdx +1 -1
- package/src/stories/DesignTokens/ThemePA.mdx +4 -30
- package/src/stories/GuideDuDev/UtiliserLesRules.mdx +319 -76
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +1 -1
- package/src/vuetifyConfig.ts +61 -0
- package/src/composables/useFilterable/__snapshots__/useFilterable.spec.ts.snap +0 -3
|
@@ -510,7 +510,22 @@
|
|
|
510
510
|
emit('update:model-value', formattedDate)
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
+
else {
|
|
514
|
+
// Même si la validation échoue, conserver la valeur actuelle
|
|
515
|
+
// pour éviter que la date ne disparaisse
|
|
516
|
+
emit('update:model-value', props.modelValue)
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
else if (props.required) {
|
|
520
|
+
// Si le champ est vide mais requis, émettre quand même la valeur actuelle
|
|
521
|
+
// pour éviter que la date ne disparaisse
|
|
522
|
+
emit('update:model-value', props.modelValue)
|
|
513
523
|
}
|
|
524
|
+
else {
|
|
525
|
+
// Si le champ est vide et non requis, émettre null
|
|
526
|
+
emit('update:model-value', null)
|
|
527
|
+
}
|
|
528
|
+
|
|
514
529
|
// Toujours valider les règles, même si le champ est vide
|
|
515
530
|
validateRules(inputValue.value || '')
|
|
516
531
|
}
|
|
@@ -19,7 +19,7 @@ describe('DatePicker.vue', () => {
|
|
|
19
19
|
})
|
|
20
20
|
})
|
|
21
21
|
|
|
22
|
-
it('displays the placeholder text', () => {
|
|
22
|
+
it('displays the placeholder text as label', () => {
|
|
23
23
|
const placeholder = 'Sélectionner une date'
|
|
24
24
|
const wrapper = mount(DatePicker, {
|
|
25
25
|
global: {
|
|
@@ -27,7 +27,10 @@ describe('DatePicker.vue', () => {
|
|
|
27
27
|
},
|
|
28
28
|
props: { placeholder },
|
|
29
29
|
})
|
|
30
|
-
|
|
30
|
+
|
|
31
|
+
// Vérifier que le placeholder est affiché comme label
|
|
32
|
+
const label = wrapper.find('label')
|
|
33
|
+
expect(label.text()).toBe(placeholder)
|
|
31
34
|
})
|
|
32
35
|
|
|
33
36
|
it('emits update:modelValue event on date selection', async () => {
|
|
@@ -63,16 +66,6 @@ describe('DatePicker.vue', () => {
|
|
|
63
66
|
expect(wrapper.vm.isDatePickerVisible).toBe(true)
|
|
64
67
|
})
|
|
65
68
|
|
|
66
|
-
it('hides the date picker on outside click', async () => {
|
|
67
|
-
const input = wrapper.find('input')
|
|
68
|
-
await input.trigger('focus')
|
|
69
|
-
expect(wrapper.vm.isDatePickerVisible).toBe(true)
|
|
70
|
-
|
|
71
|
-
document.body.click()
|
|
72
|
-
await nextTick()
|
|
73
|
-
expect(wrapper.vm.isDatePickerVisible).toBe(false)
|
|
74
|
-
})
|
|
75
|
-
|
|
76
69
|
it('updates aria-labels for date picker navigation buttons', async () => {
|
|
77
70
|
wrapper.vm.isDatePickerVisible = true
|
|
78
71
|
await nextTick()
|
|
@@ -85,14 +78,14 @@ describe('DatePicker.vue', () => {
|
|
|
85
78
|
)
|
|
86
79
|
|
|
87
80
|
if (arrowDown) {
|
|
88
|
-
expect(arrowDown.getAttribute('aria-label')).toBe('
|
|
81
|
+
expect(arrowDown.getAttribute('aria-label')).toBe('Changer de vue')
|
|
89
82
|
}
|
|
90
83
|
arrowLeftButtons.forEach((button, index) => {
|
|
91
84
|
if (index === 0) {
|
|
92
|
-
expect(button.getAttribute('aria-label')).toBe('
|
|
85
|
+
expect(button.getAttribute('aria-label')).toBe('Mois précédent')
|
|
93
86
|
}
|
|
94
87
|
else if (index === 1) {
|
|
95
|
-
expect(button.getAttribute('aria-label')).toBe('
|
|
88
|
+
expect(button.getAttribute('aria-label')).toBe('Mois suivant')
|
|
96
89
|
}
|
|
97
90
|
})
|
|
98
91
|
})
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { useWidthable, type Widthable } from '@/composables/widthable'
|
|
4
4
|
import { locales as defaultLocales } from './UploadItem/locales'
|
|
5
5
|
|
|
6
|
+
export type FileState = 'initial' | 'success' | 'error' | 'loading'
|
|
6
7
|
export interface Item {
|
|
7
8
|
id: string
|
|
8
9
|
title: string
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
:title="item.title"
|
|
44
45
|
:file-name="item.fileName"
|
|
45
46
|
:optional="item.optional"
|
|
46
|
-
:state="(item.state as
|
|
47
|
+
:state="(item.state as FileState)"
|
|
47
48
|
:progress="item.progress"
|
|
48
49
|
:show-upload-btn="item.showUploadBtn"
|
|
49
50
|
:show-preview-btn="item.showPreviewBtn"
|
|
@@ -112,6 +112,12 @@
|
|
|
112
112
|
>
|
|
113
113
|
{{ message ?? locales.optionalDocument }}
|
|
114
114
|
</div>
|
|
115
|
+
<div
|
|
116
|
+
v-if="state === 'error'"
|
|
117
|
+
class="file-item__error-message text-error"
|
|
118
|
+
>
|
|
119
|
+
{{ locales.error }}
|
|
120
|
+
</div>
|
|
115
121
|
</div>
|
|
116
122
|
</div>
|
|
117
123
|
<div class="file-item__actions">
|
|
@@ -191,6 +197,10 @@
|
|
|
191
197
|
gap: tokens.$gap-3;
|
|
192
198
|
padding-block: tokens.$padding-4;
|
|
193
199
|
border-bottom: 1px solid tokens.$colors-border-subdued;
|
|
200
|
+
|
|
201
|
+
&:first-child:last-child {
|
|
202
|
+
border-bottom: none;
|
|
203
|
+
}
|
|
194
204
|
}
|
|
195
205
|
|
|
196
206
|
.file-item__title {
|
|
@@ -6,6 +6,8 @@ import NotificationBar from '@/components/NotificationBar/NotificationBar.vue'
|
|
|
6
6
|
import { useNotificationService } from '@/services/NotificationService'
|
|
7
7
|
import { mdiCloudUpload } from '@mdi/js'
|
|
8
8
|
import { VIcon } from 'vuetify/components'
|
|
9
|
+
import { computed, ref } from 'vue'
|
|
10
|
+
import FileList from '../FileList/FileList.vue'
|
|
9
11
|
|
|
10
12
|
const meta = {
|
|
11
13
|
title: 'Composants/Formulaires/FileUpload',
|
|
@@ -427,3 +429,85 @@ export const Customization: Story = {
|
|
|
427
429
|
],
|
|
428
430
|
},
|
|
429
431
|
}
|
|
432
|
+
|
|
433
|
+
export const WithFileList: Story = {
|
|
434
|
+
args: {
|
|
435
|
+
'modelValue': [],
|
|
436
|
+
'onUpdate:modelValue': fn(),
|
|
437
|
+
'onError': fn(),
|
|
438
|
+
'multiple': true,
|
|
439
|
+
},
|
|
440
|
+
render: args => ({
|
|
441
|
+
components: { FileUpload, FileList },
|
|
442
|
+
setup() {
|
|
443
|
+
const model = ref<Array<File>>([])
|
|
444
|
+
|
|
445
|
+
const uploadList = computed(
|
|
446
|
+
() => model.value.map(item => ({
|
|
447
|
+
id: item.name,
|
|
448
|
+
title: item.name,
|
|
449
|
+
state: 'success',
|
|
450
|
+
})),
|
|
451
|
+
)
|
|
452
|
+
|
|
453
|
+
function removeFile(itemToRemove: { id: string }) {
|
|
454
|
+
model.value = model.value.filter(item => item.name !== itemToRemove.id)
|
|
455
|
+
}
|
|
456
|
+
return { args, uploadList, removeFile, model }
|
|
457
|
+
},
|
|
458
|
+
template: `<div style="max-width: 600px">
|
|
459
|
+
<FileUpload
|
|
460
|
+
v-bind="args"
|
|
461
|
+
v-model="model"
|
|
462
|
+
/>
|
|
463
|
+
<FileList
|
|
464
|
+
:uploadList="uploadList"
|
|
465
|
+
@delete="removeFile"
|
|
466
|
+
/>
|
|
467
|
+
</div>`,
|
|
468
|
+
}),
|
|
469
|
+
parameters: {
|
|
470
|
+
sourceCode: [
|
|
471
|
+
{
|
|
472
|
+
name: 'Template',
|
|
473
|
+
code: `
|
|
474
|
+
<template>
|
|
475
|
+
<div style="max-width: 600px">
|
|
476
|
+
<FileUpload
|
|
477
|
+
v-model="model"
|
|
478
|
+
:multiple="true"
|
|
479
|
+
/>
|
|
480
|
+
{{ model }}
|
|
481
|
+
<FileList
|
|
482
|
+
:uploadList="uploadList"
|
|
483
|
+
@delete="removeFile"
|
|
484
|
+
/>
|
|
485
|
+
</div>
|
|
486
|
+
</template>
|
|
487
|
+
`,
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
name: 'Script',
|
|
491
|
+
code: `
|
|
492
|
+
<script setup lang="ts">
|
|
493
|
+
import { FileUpload, FileList } from '@cnamts/synapse'
|
|
494
|
+
import { ref, computed } from 'vue'
|
|
495
|
+
|
|
496
|
+
const files = ref<Array<File>>([])
|
|
497
|
+
const uploadList = computed(
|
|
498
|
+
() => files.value.map(item => ({
|
|
499
|
+
id: item.name,
|
|
500
|
+
title: item.name,
|
|
501
|
+
state: 'success',
|
|
502
|
+
})),
|
|
503
|
+
)
|
|
504
|
+
|
|
505
|
+
function removeFile(itemToRemove: { id: string }) {
|
|
506
|
+
files.value = files.value.filter(file => file.name !== itemToRemove.id)
|
|
507
|
+
}
|
|
508
|
+
</script>
|
|
509
|
+
`,
|
|
510
|
+
},
|
|
511
|
+
],
|
|
512
|
+
},
|
|
513
|
+
}
|
|
@@ -141,7 +141,7 @@ describe('FileUpload', () => {
|
|
|
141
141
|
},
|
|
142
142
|
})
|
|
143
143
|
|
|
144
|
-
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual(
|
|
144
|
+
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual(undefined)
|
|
145
145
|
expect(wrapper.emitted('error')?.[0]).toEqual([['Le fichier filename.jpg a une extension invalide. Extensions acceptées : pdf']])
|
|
146
146
|
})
|
|
147
147
|
|
|
@@ -166,7 +166,7 @@ describe('FileUpload', () => {
|
|
|
166
166
|
},
|
|
167
167
|
})
|
|
168
168
|
|
|
169
|
-
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual(
|
|
169
|
+
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual(undefined)
|
|
170
170
|
expect(wrapper.emitted('error')?.[0]).toEqual([['Le fichier filename.jpg a une extension invalide. Extensions acceptées : pdf']])
|
|
171
171
|
|
|
172
172
|
await wrapper.find('label').trigger('drop', {
|
|
@@ -176,7 +176,7 @@ describe('FileUpload', () => {
|
|
|
176
176
|
})
|
|
177
177
|
|
|
178
178
|
expect(wrapper.emitted('error')?.[1]).toBeFalsy()
|
|
179
|
-
expect(wrapper.emitted('update:modelValue')?.[
|
|
179
|
+
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual([[pdfFile, pdfFile]])
|
|
180
180
|
})
|
|
181
181
|
|
|
182
182
|
it('rejects the drop of a file that is too big', async () => {
|
|
@@ -198,7 +198,7 @@ describe('FileUpload', () => {
|
|
|
198
198
|
},
|
|
199
199
|
})
|
|
200
200
|
|
|
201
|
-
expect(wrapper.emitted('update:modelValue')
|
|
201
|
+
expect(wrapper.emitted('update:modelValue')).toBe(undefined)
|
|
202
202
|
expect(wrapper.emitted('error')?.[0]).toEqual([['Le fichier filename.jpg est trop volumineux. Taille max. : 1 o']])
|
|
203
203
|
})
|
|
204
204
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Controls, Canvas, Meta, Source } from '@storybook/blocks';
|
|
2
2
|
import * as FilterInlineStories from './FilterInline.stories.ts';
|
|
3
|
+
import * as FilterSideBarStories from '@/components/FilterSideBar/FilterSideBar.stories.ts';
|
|
3
4
|
|
|
4
5
|
<Meta of={FilterInlineStories} />
|
|
5
6
|
|
|
@@ -28,14 +29,6 @@ Vous pouvez modifier le formatage des puces en utilisant la propriété `chipFor
|
|
|
28
29
|
import { VSelect } from 'vuetify/components'
|
|
29
30
|
|
|
30
31
|
const filters = [
|
|
31
|
-
{
|
|
32
|
-
name: 'updated-at',
|
|
33
|
-
title: 'Mise à jour',
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
name: 'folder',
|
|
37
|
-
title: 'Type de dossier',
|
|
38
|
-
},
|
|
39
32
|
{
|
|
40
33
|
name: 'range-slider',
|
|
41
34
|
title: 'Intervalle',
|
|
@@ -47,35 +40,10 @@ Vous pouvez modifier le formatage des puces en utilisant la propriété `chipFor
|
|
|
47
40
|
],
|
|
48
41
|
},
|
|
49
42
|
]
|
|
50
|
-
|
|
51
|
-
const folderTypes = [
|
|
52
|
-
'AT',
|
|
53
|
-
'MP',
|
|
54
|
-
'Autre',
|
|
55
|
-
]
|
|
56
43
|
</script>
|
|
57
44
|
|
|
58
45
|
<template>
|
|
59
46
|
<FiltersInline v-model="filters">
|
|
60
|
-
<template #updated-at="{ props }">
|
|
61
|
-
<DatePicker
|
|
62
|
-
v-bind="props"
|
|
63
|
-
label="Date de mise à jour"
|
|
64
|
-
variant="outlined"
|
|
65
|
-
/>
|
|
66
|
-
</template>
|
|
67
|
-
|
|
68
|
-
<template #folder="{ props }">
|
|
69
|
-
<VSelect
|
|
70
|
-
v-bind="props"
|
|
71
|
-
:items="folderTypes"
|
|
72
|
-
label="Type de dossier"
|
|
73
|
-
multiple
|
|
74
|
-
variant="outlined"
|
|
75
|
-
hide-details
|
|
76
|
-
/>
|
|
77
|
-
</template>
|
|
78
|
-
|
|
79
47
|
<template #range-slider="{ props }">
|
|
80
48
|
<RangeField
|
|
81
49
|
v-bind="props"
|
|
@@ -88,4 +56,182 @@ Vous pouvez modifier le formatage des puces en utilisant la propriété `chipFor
|
|
|
88
56
|
</template>
|
|
89
57
|
`
|
|
90
58
|
}}
|
|
91
|
-
/>
|
|
59
|
+
/>
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## Combinaison de composants filtres
|
|
63
|
+
|
|
64
|
+
Vous pouvez utiliser plusieurs composants de filtres pour un seul et même filtre afin de pouvoir modifier un filtre à différents endroits sur une page.
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
<Canvas
|
|
68
|
+
of={FilterInlineStories.FilterCombination}
|
|
69
|
+
source={{
|
|
70
|
+
language: 'html',
|
|
71
|
+
format: 'dedent',
|
|
72
|
+
code: `
|
|
73
|
+
<script lang="ts" setup>
|
|
74
|
+
import { ref } from 'vue'
|
|
75
|
+
import { FilterSideBar, filterInline, SearchListField, PeriodField } from '@cnamts/synapse'
|
|
76
|
+
import { VDivider, VSelect, VTextField } from 'vuetify/components'
|
|
77
|
+
|
|
78
|
+
const filters = ref([
|
|
79
|
+
{
|
|
80
|
+
name: 'name',
|
|
81
|
+
title: 'Identité',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'folder',
|
|
85
|
+
title: 'Type de dossier',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'period',
|
|
89
|
+
title: 'Période',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'profession',
|
|
93
|
+
title: 'Profession',
|
|
94
|
+
},
|
|
95
|
+
])
|
|
96
|
+
|
|
97
|
+
const folderTypes = [
|
|
98
|
+
{
|
|
99
|
+
title: 'AT',
|
|
100
|
+
value: 'at',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
title: 'MP',
|
|
104
|
+
value: 'mp',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
title: 'Autre',
|
|
108
|
+
value: 'other',
|
|
109
|
+
},
|
|
110
|
+
]
|
|
111
|
+
|
|
112
|
+
const professionList = [
|
|
113
|
+
{
|
|
114
|
+
label: 'Chirurgien-dentiste',
|
|
115
|
+
value: 'chirurgien-dentiste',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
label: 'Infirmier',
|
|
119
|
+
value: 'infirmier',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
label: 'Orthophoniste',
|
|
123
|
+
value: 'orthophoniste',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
label: 'Orthoptiste',
|
|
127
|
+
value: 'orthoptiste',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
label: 'Pédicure-podologue',
|
|
131
|
+
value: 'pedicure-podologue',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
label: 'Pharmacien',
|
|
135
|
+
value: 'pharmacien',
|
|
136
|
+
},
|
|
137
|
+
]
|
|
138
|
+
|
|
139
|
+
</script>
|
|
140
|
+
|
|
141
|
+
<template>
|
|
142
|
+
<div>
|
|
143
|
+
<FilterSideBar
|
|
144
|
+
v-model="filters"
|
|
145
|
+
>
|
|
146
|
+
<template #name="{ props }">
|
|
147
|
+
<VTextField
|
|
148
|
+
v-bind="props"
|
|
149
|
+
label="Nom"
|
|
150
|
+
variant="outlined"
|
|
151
|
+
hide-details
|
|
152
|
+
color="primary"
|
|
153
|
+
/>
|
|
154
|
+
</template>
|
|
155
|
+
|
|
156
|
+
<template #folder="{ props }">
|
|
157
|
+
<p class="text-secondary mb-4">
|
|
158
|
+
Vous pouvez filtrer entre les dossiers de type <b>Arrêt de Travail (AT)</b> et <b>Maladie Professionnelle (MP)</b> ou <b>Autre</b>.
|
|
159
|
+
</p>
|
|
160
|
+
|
|
161
|
+
<VSelect
|
|
162
|
+
v-bind="props"
|
|
163
|
+
:items="folderTypes"
|
|
164
|
+
label="Type de dossier"
|
|
165
|
+
multiple
|
|
166
|
+
variant="outlined"
|
|
167
|
+
return-object
|
|
168
|
+
hide-details
|
|
169
|
+
color="primary"
|
|
170
|
+
/>
|
|
171
|
+
</template>
|
|
172
|
+
|
|
173
|
+
<template #period="{ props }">
|
|
174
|
+
<PeriodField
|
|
175
|
+
v-bind="props"
|
|
176
|
+
variant="outlined"
|
|
177
|
+
/>
|
|
178
|
+
</template>
|
|
179
|
+
|
|
180
|
+
<template #profession="{ props }">
|
|
181
|
+
<SearchListField
|
|
182
|
+
v-bind="props"
|
|
183
|
+
:items="professionList"
|
|
184
|
+
/>
|
|
185
|
+
</template>
|
|
186
|
+
</FilterSideBar>
|
|
187
|
+
<VDivider class="my-4" />
|
|
188
|
+
<FilterInline
|
|
189
|
+
v-model="filters"
|
|
190
|
+
>
|
|
191
|
+
<template #name="{ props }">
|
|
192
|
+
<VTextField
|
|
193
|
+
v-bind="props"
|
|
194
|
+
label="Nom"
|
|
195
|
+
variant="outlined"
|
|
196
|
+
hide-details
|
|
197
|
+
color="primary"
|
|
198
|
+
/>
|
|
199
|
+
</template>
|
|
200
|
+
|
|
201
|
+
<template #folder="{ props }">
|
|
202
|
+
<p class="text-secondary mb-4">
|
|
203
|
+
Vous pouvez filtrer entre les dossiers de type <b>Arrêt de Travail (AT)</b> et <b>Maladie Professionnelle (MP)</b> ou <b>Autre</b>.
|
|
204
|
+
</p>
|
|
205
|
+
|
|
206
|
+
<VSelect
|
|
207
|
+
v-bind="props"
|
|
208
|
+
:items="folderTypes"
|
|
209
|
+
label="Type de dossier"
|
|
210
|
+
multiple
|
|
211
|
+
variant="outlined"
|
|
212
|
+
return-object
|
|
213
|
+
hide-details
|
|
214
|
+
color="primary"
|
|
215
|
+
/>
|
|
216
|
+
</template>
|
|
217
|
+
|
|
218
|
+
<template #period="{ props }">
|
|
219
|
+
<PeriodField
|
|
220
|
+
v-bind="props"
|
|
221
|
+
variant="outlined"
|
|
222
|
+
/>
|
|
223
|
+
</template>
|
|
224
|
+
|
|
225
|
+
<template #profession="{ props }">
|
|
226
|
+
<SearchListField
|
|
227
|
+
v-bind="props"
|
|
228
|
+
:items="professionList"
|
|
229
|
+
color="primary"
|
|
230
|
+
/>
|
|
231
|
+
</template>
|
|
232
|
+
</FilterInline>
|
|
233
|
+
</div>
|
|
234
|
+
</template>
|
|
235
|
+
`
|
|
236
|
+
}}
|
|
237
|
+
/>
|