codevdesign 0.0.91 → 0.0.92
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} +56 -56
- 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>
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-date-input
|
|
3
|
-
v-model="dateValeur"
|
|
4
|
-
v-bind="$attrs"
|
|
5
|
-
@update:model-value="formatDate"
|
|
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
|
+
<template>
|
|
2
|
+
<v-date-input
|
|
3
|
+
v-model="dateValeur"
|
|
4
|
+
v-bind="$attrs"
|
|
5
|
+
@update:model-value="formatDate"
|
|
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>
|