codevdesign 0.0.91 → 0.0.93
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/composants/csqcAide.vue +55 -55
- package/composants/csqcAlerteErreur.vue +87 -86
- package/composants/csqcChaise/chaiseConteneur.vue +362 -362
- package/composants/csqcChaise/chaiseItem.vue +54 -54
- package/composants/{codeBudgetaireGenerique.vue → csqcCodeBudgetaireGenerique.vue} +257 -260
- package/composants/csqcConfirmation.vue +75 -74
- package/composants/{csqcDate/csqcDate.vue → csqcDate.vue} +15 -2
- package/composants/csqcEditeurTexteRiche.vue +319 -318
- package/composants/csqcEntete.vue +163 -163
- package/composants/csqcImportCSV.vue +125 -125
- package/composants/csqcOptionSwitch.vue +120 -124
- package/composants/csqcRechercheUtilisateur.vue +197 -197
- package/composants/csqcSnackbar.vue +88 -98
- package/composants/csqcTiroir.vue +156 -155
- package/composants/gabarit/csqcMenu.vue +281 -281
- package/index.ts +2 -2
- package/modeles/composants/csqcMenuModele.ts +18 -18
- package/package.json +1 -1
|
@@ -1,74 +1,75 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<csqcDialogue
|
|
3
|
-
ref="modale"
|
|
4
|
-
:titre="props.titre"
|
|
5
|
-
:operation-en-cours="operationEnCours"
|
|
6
|
-
activator="supprimer"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
import
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<csqcDialogue
|
|
3
|
+
ref="modale"
|
|
4
|
+
:titre="props.titre"
|
|
5
|
+
:operation-en-cours="operationEnCours"
|
|
6
|
+
activator="supprimer"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
:largeur="props.largeur"
|
|
9
|
+
@ok="confirmer"
|
|
10
|
+
@annuler="annuler"
|
|
11
|
+
>
|
|
12
|
+
<v-form
|
|
13
|
+
ref="form"
|
|
14
|
+
@submit.prevent
|
|
15
|
+
>
|
|
16
|
+
<v-row>
|
|
17
|
+
<v-col
|
|
18
|
+
cols="12"
|
|
19
|
+
class="pa-0 ma-0"
|
|
20
|
+
>
|
|
21
|
+
<span v-html="texte"></span>
|
|
22
|
+
</v-col>
|
|
23
|
+
</v-row>
|
|
24
|
+
</v-form>
|
|
25
|
+
</csqcDialogue>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script lang="ts" setup>
|
|
29
|
+
import { ref } from 'vue'
|
|
30
|
+
import csqcDialogue from './csqcDialogue.vue'
|
|
31
|
+
|
|
32
|
+
const modale = ref<InstanceType<typeof csqcDialogue> | null>(null)
|
|
33
|
+
const utilisateurATermine = ref(false)
|
|
34
|
+
const reponse = ref(false)
|
|
35
|
+
const texte = ref('')
|
|
36
|
+
const modeAlerte = ref(false)
|
|
37
|
+
|
|
38
|
+
const props = defineProps({
|
|
39
|
+
operationEnCours: { type: Boolean, default: false },
|
|
40
|
+
titre: { type: String, default: '' },
|
|
41
|
+
largeur: { type: String, default: '525px' },
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
const ouvrir = async (message: string, modeAlerteParam: boolean = false) => {
|
|
45
|
+
texte.value = message
|
|
46
|
+
modeAlerte.value = modeAlerteParam
|
|
47
|
+
utilisateurATermine.value = false
|
|
48
|
+
modale.value?.ouvrir()
|
|
49
|
+
|
|
50
|
+
while (!utilisateurATermine.value) {
|
|
51
|
+
await new Promise(resolve => setTimeout(resolve, 100)) // Attendre 100ms
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return reponse.value
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const confirmer = (): void => {
|
|
58
|
+
reponse.value = true
|
|
59
|
+
utilisateurATermine.value = true
|
|
60
|
+
|
|
61
|
+
if (modeAlerte.value) fermer()
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const annuler = (): void => {
|
|
65
|
+
reponse.value = false
|
|
66
|
+
utilisateurATermine.value = true
|
|
67
|
+
fermer()
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const fermer = (): void => {
|
|
71
|
+
modale.value?.fermer()
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
defineExpose({ ouvrir, fermer })
|
|
75
|
+
</script>
|
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
<v-date-input
|
|
3
3
|
v-model="dateValeur"
|
|
4
4
|
v-bind="$attrs"
|
|
5
|
-
|
|
5
|
+
:display-format="toIso"
|
|
6
|
+
input-format="yyyy-MM-dd"
|
|
6
7
|
variant="outlined"
|
|
7
8
|
prepend-icon=""
|
|
8
9
|
prepend-inner-icon="$calendar"
|
|
9
10
|
density="comfortable"
|
|
11
|
+
@update:model-value="formatDate"
|
|
10
12
|
></v-date-input>
|
|
11
13
|
</template>
|
|
12
14
|
|
|
13
15
|
<script setup lang="ts">
|
|
14
|
-
import { ref, watch
|
|
16
|
+
import { ref, watch } from 'vue'
|
|
15
17
|
import { VDateInput } from 'vuetify/labs/VDateInput'
|
|
16
18
|
|
|
17
19
|
const props = withDefaults(
|
|
@@ -24,6 +26,17 @@
|
|
|
24
26
|
const emit = defineEmits(['update:modelValue'])
|
|
25
27
|
const dateValeur = ref<Date | string | null>(props.modelValue)
|
|
26
28
|
|
|
29
|
+
// yyyy-MM-dd en local time (évite toISOString qui est en UTC)
|
|
30
|
+
function toIso(d?: unknown) {
|
|
31
|
+
if (!d) return ''
|
|
32
|
+
const date = typeof d === 'string' ? new Date(d) : (d as Date)
|
|
33
|
+
if (Number.isNaN(date?.getTime?.())) return ''
|
|
34
|
+
const y = date.getFullYear()
|
|
35
|
+
const m = String(date.getMonth() + 1).padStart(2, '0')
|
|
36
|
+
const day = String(date.getDate()).padStart(2, '0')
|
|
37
|
+
return `${y}-${m}-${day}`
|
|
38
|
+
}
|
|
39
|
+
|
|
27
40
|
const formatDate = (date: Date | string | null) => {
|
|
28
41
|
if (date == null) {
|
|
29
42
|
emit('update:modelValue', null)
|