mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-09 17:29:51 +00:00
Fix ts errors upon prod compilation
This commit is contained in:
parent
40eb71f95a
commit
7ddf84ea5a
@ -1,5 +1,5 @@
|
|||||||
// @ts-ignore Cannot find module (when used within an app)
|
// @ts-ignore Cannot find module (when used within an app)
|
||||||
import { trans, getLocale, setLocale, setLocaleFallbacks } from "@symfony/ux-translator";
|
import { trans, setLocale, setLocaleFallbacks } from "@symfony/ux-translator";
|
||||||
|
|
||||||
setLocaleFallbacks({"en": "fr", "nl": "fr", "fr": "en"});
|
setLocaleFallbacks({"en": "fr", "nl": "fr", "fr": "en"});
|
||||||
setLocale('fr');
|
setLocale('fr');
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
"@hotwired/stimulus": "^3.0.0",
|
"@hotwired/stimulus": "^3.0.0",
|
||||||
"@luminateone/eslint-baseline": "^1.0.9",
|
"@luminateone/eslint-baseline": "^1.0.9",
|
||||||
"@symfony/stimulus-bridge": "^3.2.0",
|
"@symfony/stimulus-bridge": "^3.2.0",
|
||||||
|
"@symfony/ux-translator": "file:vendor/symfony/ux-translator/assets",
|
||||||
"@symfony/webpack-encore": "^4.1.0",
|
"@symfony/webpack-encore": "^4.1.0",
|
||||||
"@tsconfig/node20": "^20.1.4",
|
"@tsconfig/node20": "^20.1.4",
|
||||||
"@types/dompurify": "^3.0.5",
|
"@types/dompurify": "^3.0.5",
|
||||||
|
@ -92,8 +92,7 @@
|
|||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
:disabled="
|
:disabled="
|
||||||
userSignatureZone === null ||
|
isFirstSignatureZone
|
||||||
userSignatureZone?.index < 1
|
|
||||||
"
|
"
|
||||||
class="btn btn-light btn-sm"
|
class="btn btn-light btn-sm"
|
||||||
@click="turnSignature(-1)"
|
@click="turnSignature(-1)"
|
||||||
@ -103,7 +102,7 @@
|
|||||||
<span>|</span>
|
<span>|</span>
|
||||||
<button
|
<button
|
||||||
:disabled="
|
:disabled="
|
||||||
userSignatureZone?.index >= signature.zones.length - 1
|
isLastSignatureZone
|
||||||
"
|
"
|
||||||
class="btn btn-light btn-sm"
|
class="btn btn-light btn-sm"
|
||||||
@click="turnSignature(1)"
|
@click="turnSignature(1)"
|
||||||
@ -200,10 +199,7 @@
|
|||||||
class="col-4 d-xl-none text-center turnSignature p-0"
|
class="col-4 d-xl-none text-center turnSignature p-0"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
:disabled="
|
:disabled="!hasSignatureZoneSelected"
|
||||||
userSignatureZone === null ||
|
|
||||||
userSignatureZone?.index < 1
|
|
||||||
"
|
|
||||||
class="btn btn-light btn-sm"
|
class="btn btn-light btn-sm"
|
||||||
@click="turnSignature(-1)"
|
@click="turnSignature(-1)"
|
||||||
>
|
>
|
||||||
@ -212,7 +208,7 @@
|
|||||||
<span>|</span>
|
<span>|</span>
|
||||||
<button
|
<button
|
||||||
:disabled="
|
:disabled="
|
||||||
userSignatureZone?.index >= signature.zones.length - 1
|
isLastSignatureZone
|
||||||
"
|
"
|
||||||
class="btn btn-light btn-sm"
|
class="btn btn-light btn-sm"
|
||||||
@click="turnSignature(1)"
|
@click="turnSignature(1)"
|
||||||
@ -226,8 +222,7 @@
|
|||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
:disabled="
|
:disabled="
|
||||||
userSignatureZone === null ||
|
isFirstSignatureZone
|
||||||
userSignatureZone?.index < 1
|
|
||||||
"
|
"
|
||||||
class="btn btn-light btn-sm"
|
class="btn btn-light btn-sm"
|
||||||
@click="turnSignature(-1)"
|
@click="turnSignature(-1)"
|
||||||
@ -236,9 +231,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span>|</span>
|
<span>|</span>
|
||||||
<button
|
<button
|
||||||
:disabled="
|
:disabled="isLastSignatureZone"
|
||||||
userSignatureZone?.index >= signature.zones.length - 1
|
|
||||||
"
|
|
||||||
class="btn btn-light btn-sm"
|
class="btn btn-light btn-sm"
|
||||||
@click="turnSignature(1)"
|
@click="turnSignature(1)"
|
||||||
>
|
>
|
||||||
@ -333,7 +326,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, Ref, reactive } from "vue";
|
import {ref, Ref, reactive, computed} from "vue";
|
||||||
import { useToast } from "vue-toast-notification";
|
import { useToast } from "vue-toast-notification";
|
||||||
import "vue-toast-notification/dist/theme-sugar.css";
|
import "vue-toast-notification/dist/theme-sugar.css";
|
||||||
import {
|
import {
|
||||||
@ -433,6 +426,14 @@ const $toast = useToast();
|
|||||||
|
|
||||||
const signature = window.signature;
|
const signature = window.signature;
|
||||||
|
|
||||||
|
const isFirstSignatureZone = () => userSignatureZone.value?.index ? userSignatureZone.value.index < 1 : false
|
||||||
|
const isLastSignatureZone = () => userSignatureZone.value?.index ? userSignatureZone.value.index >= signature.zones.length - 1 : false
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if the user has selected a user zone (existing on the doc or created by the user)
|
||||||
|
*/
|
||||||
|
const hasSignatureZoneSelected = computed<boolean>(() => userSignatureZone.value !== null);
|
||||||
|
|
||||||
const setZoomLevel = async (zoomLevel: string) => {
|
const setZoomLevel = async (zoomLevel: string) => {
|
||||||
zoom.value = Number.parseFloat(zoomLevel);
|
zoom.value = Number.parseFloat(zoomLevel);
|
||||||
await resetPages();
|
await resetPages();
|
||||||
|
@ -3,8 +3,9 @@ import Modal from "ChillMainAssets/vuejs/_components/Modal.vue";
|
|||||||
import { reactive } from "vue";
|
import { reactive } from "vue";
|
||||||
import HistoryButtonList from "ChillDocStoreAssets/vuejs/StoredObjectButton/HistoryButton/HistoryButtonList.vue";
|
import HistoryButtonList from "ChillDocStoreAssets/vuejs/StoredObjectButton/HistoryButton/HistoryButtonList.vue";
|
||||||
import {
|
import {
|
||||||
StoredObject,
|
StoredObject, StoredObjectVersion,
|
||||||
StoredObjectVersionWithPointInTime,
|
StoredObjectVersionWithPointInTime,
|
||||||
|
StoredObjectPointInTime
|
||||||
} from "./../../../types";
|
} from "./../../../types";
|
||||||
|
|
||||||
interface HistoryButtonListConfig {
|
interface HistoryButtonListConfig {
|
||||||
@ -28,6 +29,8 @@ const open = () => {
|
|||||||
state.opened = true;
|
state.opened = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const onRestoreVersion = (payload : { newVersion: StoredObjectVersionWithPointInTime }) => emit('restoreVersion', payload)
|
||||||
|
|
||||||
defineExpose({ open });
|
defineExpose({ open });
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
@ -43,7 +46,7 @@ defineExpose({ open });
|
|||||||
:can-edit="canEdit"
|
:can-edit="canEdit"
|
||||||
:stored-object="storedObject"
|
:stored-object="storedObject"
|
||||||
@restore-version="
|
@restore-version="
|
||||||
(payload) => emit('restoreVersion', payload)
|
onRestoreVersion
|
||||||
"
|
"
|
||||||
></history-button-list>
|
></history-button-list>
|
||||||
</template>
|
</template>
|
||||||
|
@ -45,6 +45,9 @@ const onPickGenericDoc = ({
|
|||||||
}) => {
|
}) => {
|
||||||
emit("pickGenericDoc", { genericDoc });
|
emit("pickGenericDoc", { genericDoc });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const onRemoveAttachment = (payload: { attachment: WorkflowAttachment }) => { emit('removeAttachment', payload) };
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -56,7 +59,7 @@ const onPickGenericDoc = ({
|
|||||||
></pick-generic-doc-modal>
|
></pick-generic-doc-modal>
|
||||||
<attachment-list
|
<attachment-list
|
||||||
:attachments="props.attachments"
|
:attachments="props.attachments"
|
||||||
@removeAttachment="(payload) => emit('removeAttachment', payload)"
|
@removeAttachment="onRemoveAttachment"
|
||||||
></attachment-list>
|
></attachment-list>
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li>
|
<li>
|
||||||
|
@ -72,6 +72,10 @@ const placeTrans = (str: string): string => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const onPickDocument = (payload: { genericDoc: GenericDocForAccompanyingPeriod }) => emit('pickGenericDoc', payload);
|
||||||
|
|
||||||
|
const onRemoveGenericDoc = (payload: {genericDoc: GenericDocForAccompanyingPeriod}) => emit('removeGenericDoc', payload);
|
||||||
|
|
||||||
const filteredDocuments = computed<GenericDocForAccompanyingPeriod[]>(() => {
|
const filteredDocuments = computed<GenericDocForAccompanyingPeriod[]>(() => {
|
||||||
if (false === loaded.value) {
|
if (false === loaded.value) {
|
||||||
return [];
|
return [];
|
||||||
@ -245,9 +249,9 @@ const filteredDocuments = computed<GenericDocForAccompanyingPeriod[]>(() => {
|
|||||||
:accompanying-period-id="accompanyingPeriodId"
|
:accompanying-period-id="accompanyingPeriodId"
|
||||||
:genericDoc="g"
|
:genericDoc="g"
|
||||||
:is-picked="isPicked(g)"
|
:is-picked="isPicked(g)"
|
||||||
@pickGenericDoc="(payload) => emit('pickGenericDoc', payload)"
|
@pickGenericDoc="onPickDocument"
|
||||||
@removeGenericDoc="
|
@removeGenericDoc="
|
||||||
(payload) => emit('removeGenericDoc', payload)
|
onRemoveGenericDoc
|
||||||
"
|
"
|
||||||
></pick-generic-doc-item>
|
></pick-generic-doc-item>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user