codevdesign 1.0.74 → 1.0.75
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 -87
- package/composants/csqcChaise/chaiseConteneur.vue +372 -372
- package/composants/csqcChaise/chaiseItem.vue +54 -54
- package/composants/csqcConfirmation.vue +75 -75
- package/composants/csqcEditeurTexteRiche.vue +378 -378
- package/composants/csqcEntete.vue +229 -229
- package/composants/csqcImportCSV.vue +125 -125
- package/composants/csqcSnackbar.vue +207 -207
- package/composants/csqcSwitch.vue +220 -220
- package/composants/csqcTable/csqcTableExportExcel.vue +46 -46
- package/composants/csqcTexteBilingue.vue +175 -175
- package/composants/csqcTiroir.vue +195 -195
- package/composants/gabarit/csqcMenu.vue +281 -281
- package/editeur.ts +1 -1
- package/importCSV.ts +1 -1
- package/index.ts +80 -80
- package/modeles/composants/csqcMenuModele.ts +18 -18
- package/modeles/composants/datatableColonne.ts +31 -31
- package/outils/appAxios.ts +113 -113
- package/outils/rafraichisseurToken.ts +81 -52
- 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>
|
|
@@ -1,75 +1,75 @@
|
|
|
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
|
+
<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>
|