codevdesign 0.0.87 → 0.0.89
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/assets/csqc.css +14 -8
- package/composants/codeBudgetaireGenerique.vue +260 -260
- package/composants/csqcAide.vue +55 -55
- package/composants/csqcChaise/chaiseConteneur.vue +362 -362
- package/composants/csqcChaise/chaiseItem.vue +54 -54
- package/composants/csqcDate/csqcDate.vue +56 -0
- package/composants/csqcDialogue.vue +117 -117
- package/composants/csqcEditeurTexteRiche.vue +318 -318
- package/composants/csqcEntete.vue +163 -163
- package/composants/csqcImportCSV.vue +125 -125
- package/composants/csqcRechercheUtilisateur.vue +197 -197
- package/composants/csqcTiroir.vue +155 -155
- package/composants/gabarit/csqcMenu.vue +281 -281
- package/index.ts +65 -65
- package/modeles/composants/csqcMenuModele.ts +18 -18
- package/package.json +1 -1
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<v-list-item-title>{{ nomUnite }}</v-list-item-title>
|
|
4
|
-
<v-list-item-subtitle v-if="getPreference != ''">
|
|
5
|
-
{{ getPreference }}
|
|
6
|
-
</v-list-item-subtitle>
|
|
7
|
-
<v-list-item-subtitle
|
|
8
|
-
v-if="getPreference == ''"
|
|
9
|
-
class="messageErreurChaiseItem"
|
|
10
|
-
>
|
|
11
|
-
{{ $t('csqc.message.chaiseSelection') }}
|
|
12
|
-
</v-list-item-subtitle>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
<script lang="ts" setup>
|
|
16
|
-
import { computed } from 'vue'
|
|
17
|
-
|
|
18
|
-
// Définition des props
|
|
19
|
-
const props = defineProps<{
|
|
20
|
-
uniteId: number
|
|
21
|
-
preferences: { chaiseId: number }[]
|
|
22
|
-
dictChaisesReleve: Record<number, { id: number; nom: string }[]>
|
|
23
|
-
unites: { id: number; nom: string }[]
|
|
24
|
-
}>()
|
|
25
|
-
|
|
26
|
-
const nomUnite = computed(() => {
|
|
27
|
-
if (!props.uniteId || !props.unites?.length) {
|
|
28
|
-
return ''
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const unite = props.unites.find(u => u.id == props.uniteId)
|
|
32
|
-
return unite?.nom || ''
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
const getPreference = computed(() => {
|
|
36
|
-
const chaises = props.dictChaisesReleve?.[props.uniteId] ?? []
|
|
37
|
-
const prefs = props.preferences ?? []
|
|
38
|
-
|
|
39
|
-
for (const chaise of chaises) {
|
|
40
|
-
if (prefs.some(p => p.chaiseId === chaise.id)) {
|
|
41
|
-
return chaise.nom
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return ''
|
|
46
|
-
})
|
|
47
|
-
</script>
|
|
48
|
-
|
|
49
|
-
<style scoped>
|
|
50
|
-
.messageErreurChaiseItem {
|
|
51
|
-
color: red !important;
|
|
52
|
-
font-style: italic;
|
|
53
|
-
}
|
|
54
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<v-list-item-title>{{ nomUnite }}</v-list-item-title>
|
|
4
|
+
<v-list-item-subtitle v-if="getPreference != ''">
|
|
5
|
+
{{ getPreference }}
|
|
6
|
+
</v-list-item-subtitle>
|
|
7
|
+
<v-list-item-subtitle
|
|
8
|
+
v-if="getPreference == ''"
|
|
9
|
+
class="messageErreurChaiseItem"
|
|
10
|
+
>
|
|
11
|
+
{{ $t('csqc.message.chaiseSelection') }}
|
|
12
|
+
</v-list-item-subtitle>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
<script lang="ts" setup>
|
|
16
|
+
import { computed } from 'vue'
|
|
17
|
+
|
|
18
|
+
// Définition des props
|
|
19
|
+
const props = defineProps<{
|
|
20
|
+
uniteId: number
|
|
21
|
+
preferences: { chaiseId: number }[]
|
|
22
|
+
dictChaisesReleve: Record<number, { id: number; nom: string }[]>
|
|
23
|
+
unites: { id: number; nom: string }[]
|
|
24
|
+
}>()
|
|
25
|
+
|
|
26
|
+
const nomUnite = computed(() => {
|
|
27
|
+
if (!props.uniteId || !props.unites?.length) {
|
|
28
|
+
return ''
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const unite = props.unites.find(u => u.id == props.uniteId)
|
|
32
|
+
return unite?.nom || ''
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
const getPreference = computed(() => {
|
|
36
|
+
const chaises = props.dictChaisesReleve?.[props.uniteId] ?? []
|
|
37
|
+
const prefs = props.preferences ?? []
|
|
38
|
+
|
|
39
|
+
for (const chaise of chaises) {
|
|
40
|
+
if (prefs.some(p => p.chaiseId === chaise.id)) {
|
|
41
|
+
return chaise.nom
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return ''
|
|
46
|
+
})
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<style scoped>
|
|
50
|
+
.messageErreurChaiseItem {
|
|
51
|
+
color: red !important;
|
|
52
|
+
font-style: italic;
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-date-input
|
|
3
|
+
v-model="dateValeur"
|
|
4
|
+
@update:model-value="formatDate"
|
|
5
|
+
v-bind="$attrs"
|
|
6
|
+
variant="outlined"
|
|
7
|
+
prepend-icon=""
|
|
8
|
+
prepend-inner-icon="$calendar"
|
|
9
|
+
density="comfortable"
|
|
10
|
+
></v-date-input>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
import { ref, watch, computed } from 'vue'
|
|
15
|
+
import { VDateInput } from 'vuetify/labs/VDateInput'
|
|
16
|
+
|
|
17
|
+
const props = withDefaults(
|
|
18
|
+
defineProps<{
|
|
19
|
+
modelValue: string | Date | null
|
|
20
|
+
}>(),
|
|
21
|
+
{},
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
const emit = defineEmits(['update:modelValue'])
|
|
25
|
+
const dateValeur = ref<Date | string | null>(props.modelValue)
|
|
26
|
+
|
|
27
|
+
const formatDate = (date: Date | string | null) => {
|
|
28
|
+
if (date == null) {
|
|
29
|
+
emit('update:modelValue', null)
|
|
30
|
+
return
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (typeof date === 'string') {
|
|
34
|
+
emit('update:modelValue', props.modelValue)
|
|
35
|
+
return
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//Transformer la date en string
|
|
39
|
+
const d = new Date(date)
|
|
40
|
+
const yyyy = d.getFullYear()
|
|
41
|
+
const mm = String(d.getMonth() + 1).padStart(2, '0')
|
|
42
|
+
const dd = String(d.getDate()).padStart(2, '0')
|
|
43
|
+
const formatte = `${yyyy}-${mm}-${dd}`
|
|
44
|
+
dateValeur.value = formatte
|
|
45
|
+
|
|
46
|
+
emit('update:modelValue', dateValeur.value)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Synchronise les props externes avec l'état interne
|
|
50
|
+
watch(
|
|
51
|
+
() => props.modelValue,
|
|
52
|
+
nouvelle => {
|
|
53
|
+
dateValeur.value = nouvelle
|
|
54
|
+
},
|
|
55
|
+
)
|
|
56
|
+
</script>
|
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-dialog
|
|
3
|
-
v-model="dialog"
|
|
4
|
-
class="pa-0 ma-0"
|
|
5
|
-
:width="largeur"
|
|
6
|
-
:fullscreen="display.xs.value"
|
|
7
|
-
max-width="650"
|
|
8
|
-
:persistent="props.persistant"
|
|
9
|
-
@keydown.esc="!persistant ? annuler : ''"
|
|
10
|
-
@click:outside="!persistant ? annuler : ''"
|
|
11
|
-
>
|
|
12
|
-
<v-card class="pa-0 ma-0 pl-8 pt-8">
|
|
13
|
-
<!-- Bouton en haut à droite -->
|
|
14
|
-
<v-btn
|
|
15
|
-
icon="mdi-close"
|
|
16
|
-
variant="text"
|
|
17
|
-
class="position-absolute couleurHover"
|
|
18
|
-
style="top: 5px; right: 5px"
|
|
19
|
-
@click="annuler"
|
|
20
|
-
></v-btn>
|
|
21
|
-
|
|
22
|
-
<v-card-title
|
|
23
|
-
class="pa-0 ma-0 pb-6"
|
|
24
|
-
style="font-size: 24px; white-space: normal; word-break: break-word"
|
|
25
|
-
>
|
|
26
|
-
<slot name="titre"></slot>
|
|
27
|
-
<div text-h5><span v-html="titre"></span></div>
|
|
28
|
-
</v-card-title>
|
|
29
|
-
|
|
30
|
-
<v-card-text class="pa-0 ma-0 pb-6 pr-6">
|
|
31
|
-
<v-container>
|
|
32
|
-
<slot></slot>
|
|
33
|
-
<slot name="content"></slot>
|
|
34
|
-
</v-container>
|
|
35
|
-
</v-card-text>
|
|
36
|
-
<v-card-actions class="my-2 d-flex justify-end pr-6 pb-5">
|
|
37
|
-
<slot name="actions"></slot>
|
|
38
|
-
<v-btn
|
|
39
|
-
v-if="btnAnnuler"
|
|
40
|
-
color="primary"
|
|
41
|
-
:loading="operationEnCours"
|
|
42
|
-
variant="text"
|
|
43
|
-
@click="annuler"
|
|
44
|
-
>
|
|
45
|
-
{{ btnAnnulerTexte ? btnAnnulerTexte : $t('csqc.bouton.annuler') }}
|
|
46
|
-
</v-btn>
|
|
47
|
-
|
|
48
|
-
<v-btn
|
|
49
|
-
v-if="btnOk"
|
|
50
|
-
class="Gouttiere"
|
|
51
|
-
color="primary"
|
|
52
|
-
:loading="operationEnCours"
|
|
53
|
-
:disabled="btnOkDesactiver"
|
|
54
|
-
variant="flat"
|
|
55
|
-
@click="okBouton"
|
|
56
|
-
>
|
|
57
|
-
{{ btnOkTexte ? btnOkTexte : $t('csqc.bouton.ok') }}
|
|
58
|
-
</v-btn>
|
|
59
|
-
</v-card-actions>
|
|
60
|
-
</v-card>
|
|
61
|
-
</v-dialog>
|
|
62
|
-
</template>
|
|
63
|
-
|
|
64
|
-
<script setup lang="ts">
|
|
65
|
-
import { ref } from 'vue'
|
|
66
|
-
import { useDisplay } from 'vuetify'
|
|
67
|
-
|
|
68
|
-
const display = useDisplay()
|
|
69
|
-
|
|
70
|
-
// Déclaration des props
|
|
71
|
-
const props = defineProps({
|
|
72
|
-
largeur: { type: String, default: '50vw' },
|
|
73
|
-
persistant: { type: Boolean, default: true },
|
|
74
|
-
operationEnCours: { type: Boolean, default: false },
|
|
75
|
-
btnAnnuler: { type: Boolean, default: true },
|
|
76
|
-
btnOk: { type: Boolean, default: true },
|
|
77
|
-
btnAnnulerTexte: { type: String, default: '' },
|
|
78
|
-
btnOkTexte: { type: String, default: '' },
|
|
79
|
-
titre: { type: String, default: '' },
|
|
80
|
-
btnOkDesactiver: { type: Boolean, default: false },
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
// Déclaration des événements émis
|
|
84
|
-
const emit = defineEmits(['annuler', 'ok'])
|
|
85
|
-
|
|
86
|
-
// Gestion de l'état du dialogue
|
|
87
|
-
const dialog = ref(false)
|
|
88
|
-
|
|
89
|
-
// Méthodes pour gérer l'ouverture et la fermeture
|
|
90
|
-
const ouvrir = () => {
|
|
91
|
-
dialog.value = true
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const fermer = () => {
|
|
95
|
-
dialog.value = false
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// Gestion des actions des boutons
|
|
99
|
-
const annuler = () => {
|
|
100
|
-
emit('annuler')
|
|
101
|
-
fermer()
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const okBouton = () => {
|
|
105
|
-
emit('ok')
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// permet d'exporter les 2 actions
|
|
109
|
-
defineExpose({ ouvrir, fermer })
|
|
110
|
-
</script>
|
|
111
|
-
|
|
112
|
-
<style lang="css" scoped>
|
|
113
|
-
.v-card__text,
|
|
114
|
-
.v-card__title {
|
|
115
|
-
word-break: normal; /* empeche le wrap de couper un mot en XS */
|
|
116
|
-
}
|
|
117
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<v-dialog
|
|
3
|
+
v-model="dialog"
|
|
4
|
+
class="pa-0 ma-0"
|
|
5
|
+
:width="largeur"
|
|
6
|
+
:fullscreen="display.xs.value"
|
|
7
|
+
max-width="650"
|
|
8
|
+
:persistent="props.persistant"
|
|
9
|
+
@keydown.esc="!persistant ? annuler : ''"
|
|
10
|
+
@click:outside="!persistant ? annuler : ''"
|
|
11
|
+
>
|
|
12
|
+
<v-card class="pa-0 ma-0 pl-8 pt-8">
|
|
13
|
+
<!-- Bouton en haut à droite -->
|
|
14
|
+
<v-btn
|
|
15
|
+
icon="mdi-close"
|
|
16
|
+
variant="text"
|
|
17
|
+
class="position-absolute couleurHover"
|
|
18
|
+
style="top: 5px; right: 5px"
|
|
19
|
+
@click="annuler"
|
|
20
|
+
></v-btn>
|
|
21
|
+
|
|
22
|
+
<v-card-title
|
|
23
|
+
class="pa-0 ma-0 pb-6"
|
|
24
|
+
style="font-size: 24px; white-space: normal; word-break: break-word"
|
|
25
|
+
>
|
|
26
|
+
<slot name="titre"></slot>
|
|
27
|
+
<div text-h5><span v-html="titre"></span></div>
|
|
28
|
+
</v-card-title>
|
|
29
|
+
|
|
30
|
+
<v-card-text class="pa-0 ma-0 pb-6 pr-6">
|
|
31
|
+
<v-container>
|
|
32
|
+
<slot></slot>
|
|
33
|
+
<slot name="content"></slot>
|
|
34
|
+
</v-container>
|
|
35
|
+
</v-card-text>
|
|
36
|
+
<v-card-actions class="my-2 d-flex justify-end pr-6 pb-5">
|
|
37
|
+
<slot name="actions"></slot>
|
|
38
|
+
<v-btn
|
|
39
|
+
v-if="btnAnnuler"
|
|
40
|
+
color="primary"
|
|
41
|
+
:loading="operationEnCours"
|
|
42
|
+
variant="text"
|
|
43
|
+
@click="annuler"
|
|
44
|
+
>
|
|
45
|
+
{{ btnAnnulerTexte ? btnAnnulerTexte : $t('csqc.bouton.annuler') }}
|
|
46
|
+
</v-btn>
|
|
47
|
+
|
|
48
|
+
<v-btn
|
|
49
|
+
v-if="btnOk"
|
|
50
|
+
class="Gouttiere"
|
|
51
|
+
color="primary"
|
|
52
|
+
:loading="operationEnCours"
|
|
53
|
+
:disabled="btnOkDesactiver"
|
|
54
|
+
variant="flat"
|
|
55
|
+
@click="okBouton"
|
|
56
|
+
>
|
|
57
|
+
{{ btnOkTexte ? btnOkTexte : $t('csqc.bouton.ok') }}
|
|
58
|
+
</v-btn>
|
|
59
|
+
</v-card-actions>
|
|
60
|
+
</v-card>
|
|
61
|
+
</v-dialog>
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<script setup lang="ts">
|
|
65
|
+
import { ref } from 'vue'
|
|
66
|
+
import { useDisplay } from 'vuetify'
|
|
67
|
+
|
|
68
|
+
const display = useDisplay()
|
|
69
|
+
|
|
70
|
+
// Déclaration des props
|
|
71
|
+
const props = defineProps({
|
|
72
|
+
largeur: { type: String, default: '50vw' },
|
|
73
|
+
persistant: { type: Boolean, default: true },
|
|
74
|
+
operationEnCours: { type: Boolean, default: false },
|
|
75
|
+
btnAnnuler: { type: Boolean, default: true },
|
|
76
|
+
btnOk: { type: Boolean, default: true },
|
|
77
|
+
btnAnnulerTexte: { type: String, default: '' },
|
|
78
|
+
btnOkTexte: { type: String, default: '' },
|
|
79
|
+
titre: { type: String, default: '' },
|
|
80
|
+
btnOkDesactiver: { type: Boolean, default: false },
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
// Déclaration des événements émis
|
|
84
|
+
const emit = defineEmits(['annuler', 'ok'])
|
|
85
|
+
|
|
86
|
+
// Gestion de l'état du dialogue
|
|
87
|
+
const dialog = ref(false)
|
|
88
|
+
|
|
89
|
+
// Méthodes pour gérer l'ouverture et la fermeture
|
|
90
|
+
const ouvrir = () => {
|
|
91
|
+
dialog.value = true
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const fermer = () => {
|
|
95
|
+
dialog.value = false
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Gestion des actions des boutons
|
|
99
|
+
const annuler = () => {
|
|
100
|
+
emit('annuler')
|
|
101
|
+
fermer()
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const okBouton = () => {
|
|
105
|
+
emit('ok')
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// permet d'exporter les 2 actions
|
|
109
|
+
defineExpose({ ouvrir, fermer })
|
|
110
|
+
</script>
|
|
111
|
+
|
|
112
|
+
<style lang="css" scoped>
|
|
113
|
+
.v-card__text,
|
|
114
|
+
.v-card__title {
|
|
115
|
+
word-break: normal; /* empeche le wrap de couper un mot en XS */
|
|
116
|
+
}
|
|
117
|
+
</style>
|