codevdesign 1.0.19 → 1.0.21
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.
|
@@ -29,10 +29,14 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script setup lang="ts">
|
|
32
|
-
import { ref, computed, onMounted, nextTick } from 'vue'
|
|
32
|
+
import { ref, computed, onMounted, nextTick, watch } from 'vue'
|
|
33
33
|
import type { VForm } from 'vuetify/components'
|
|
34
34
|
|
|
35
|
-
const emit = defineEmits
|
|
35
|
+
const emit = defineEmits<{
|
|
36
|
+
'update:modelValue': [string | null]
|
|
37
|
+
'update:codeBudgetairesProp': [string[]]
|
|
38
|
+
'update:valide': [boolean] // 👈 nouveau
|
|
39
|
+
}>()
|
|
36
40
|
|
|
37
41
|
const props = withDefaults(
|
|
38
42
|
defineProps<{
|
|
@@ -60,6 +64,16 @@
|
|
|
60
64
|
const format = props.format
|
|
61
65
|
const activerExtension = props.activerExtension
|
|
62
66
|
|
|
67
|
+
onMounted(() => {
|
|
68
|
+
derniereValeurSauvegardee.value = codeBudgetaire.value
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
const placeholder = computed(() => {
|
|
72
|
+
const base = format.replace(/9/g, '0')
|
|
73
|
+
const extension = activerExtension ? '-XXX/XXX' : ''
|
|
74
|
+
return base + extension
|
|
75
|
+
})
|
|
76
|
+
|
|
63
77
|
const estValide = computed(() => {
|
|
64
78
|
const val = codeBudgetaire.value?.toUpperCase().trim() || ''
|
|
65
79
|
const base = val.slice(0, 15)
|
|
@@ -245,13 +259,7 @@
|
|
|
245
259
|
}
|
|
246
260
|
}
|
|
247
261
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
})
|
|
251
|
-
|
|
252
|
-
const placeholder = computed(() => {
|
|
253
|
-
const base = format.replace(/9/g, '0')
|
|
254
|
-
const extension = activerExtension ? '-XXX/XXX' : ''
|
|
255
|
-
return base + extension
|
|
262
|
+
watch(estValide, value => {
|
|
263
|
+
emit('update:valide', value)
|
|
256
264
|
})
|
|
257
265
|
</script>
|
|
@@ -155,6 +155,37 @@
|
|
|
155
155
|
theme_advanced_resizing: true,
|
|
156
156
|
theme_advanced_resizing_use_cookie: false,
|
|
157
157
|
toolbar: this.toolbarEffective,
|
|
158
|
+
content_style: `
|
|
159
|
+
@page {
|
|
160
|
+
size: 8.5in 11in;
|
|
161
|
+
margin: 0.5in;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@media print {
|
|
165
|
+
html, body {
|
|
166
|
+
margin: 0;
|
|
167
|
+
padding: 0;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
body {
|
|
171
|
+
width: 8.5in;
|
|
172
|
+
min-height: 11in;
|
|
173
|
+
box-sizing: border-box;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.mce-content-body {
|
|
177
|
+
max-width: 7.5in; /* un peu plus large si tu veux */
|
|
178
|
+
margin: 0 auto;
|
|
179
|
+
font-size: 11pt;
|
|
180
|
+
line-height: 1.3;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
img, table {
|
|
184
|
+
max-width: 100%;
|
|
185
|
+
height: auto;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
`,
|
|
158
189
|
|
|
159
190
|
// --- File picker seulement si images permises ---
|
|
160
191
|
...(this.autoriserImage ? {} : { file_picker_types: 'image' }),
|