mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Eslint fixes
This commit is contained in:
parent
c52d4b2a0e
commit
c8e09a28e6
@ -96,7 +96,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<FullCalendar :options="calendarOptions" ref="calendarRef">
|
||||
<template v-slot:eventContent="{ arg }: {arg: { event: EventApi }}">
|
||||
<template v-slot:eventContent="{ arg }: { arg: { event: EventApi } }">
|
||||
<span :class="eventClasses(arg.event)">
|
||||
<b v-if="arg.event.extendedProps.is === 'remote'">{{
|
||||
arg.event.title
|
||||
|
@ -91,9 +91,7 @@
|
||||
class="col-5 p-0 text-center turnSignature"
|
||||
>
|
||||
<button
|
||||
:disabled="
|
||||
isFirstSignatureZone
|
||||
"
|
||||
:disabled="isFirstSignatureZone"
|
||||
class="btn btn-light btn-sm"
|
||||
@click="turnSignature(-1)"
|
||||
>
|
||||
@ -101,9 +99,7 @@
|
||||
</button>
|
||||
<span>|</span>
|
||||
<button
|
||||
:disabled="
|
||||
isLastSignatureZone
|
||||
"
|
||||
:disabled="isLastSignatureZone"
|
||||
class="btn btn-light btn-sm"
|
||||
@click="turnSignature(1)"
|
||||
>
|
||||
@ -207,9 +203,7 @@
|
||||
</button>
|
||||
<span>|</span>
|
||||
<button
|
||||
:disabled="
|
||||
isLastSignatureZone
|
||||
"
|
||||
:disabled="isLastSignatureZone"
|
||||
class="btn btn-light btn-sm"
|
||||
@click="turnSignature(1)"
|
||||
>
|
||||
@ -221,9 +215,7 @@
|
||||
class="col-4 d-none d-xl-flex p-0 text-center turnSignature"
|
||||
>
|
||||
<button
|
||||
:disabled="
|
||||
isFirstSignatureZone
|
||||
"
|
||||
:disabled="isFirstSignatureZone"
|
||||
class="btn btn-light btn-sm"
|
||||
@click="turnSignature(-1)"
|
||||
>
|
||||
@ -326,7 +318,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref, Ref, reactive, computed} from "vue";
|
||||
import { ref, Ref, computed } from "vue";
|
||||
import { useToast } from "vue-toast-notification";
|
||||
import "vue-toast-notification/dist/theme-sugar.css";
|
||||
import {
|
||||
@ -344,18 +336,15 @@ import {
|
||||
PDFPageProxy,
|
||||
} from "pdfjs-dist/types/src/display/api";
|
||||
|
||||
// @ts-ignore
|
||||
// @ts-expect-error incredible but the console.log is needed
|
||||
import * as PdfWorker from "pdfjs-dist/build/pdf.worker.mjs";
|
||||
console.log(PdfWorker); // incredible but this is needed
|
||||
console.log(PdfWorker);
|
||||
|
||||
// import { PdfWorker } from 'pdfjs-dist/build/pdf.worker.mjs'
|
||||
// pdfjsLib.GlobalWorkerOptions.workerSrc = PdfWorker;
|
||||
|
||||
import Modal from "ChillMainAssets/vuejs/_components/Modal.vue";
|
||||
import {
|
||||
download_and_decrypt_doc,
|
||||
download_doc_as_pdf,
|
||||
} from "../StoredObjectButton/helpers";
|
||||
import { download_doc_as_pdf } from "../StoredObjectButton/helpers";
|
||||
|
||||
pdfjsLib.GlobalWorkerOptions.workerSrc = "pdfjs-dist/build/pdf.worker.mjs";
|
||||
|
||||
@ -426,13 +415,19 @@ const $toast = useToast();
|
||||
|
||||
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
|
||||
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 hasSignatureZoneSelected = computed<boolean>(
|
||||
() => userSignatureZone.value !== null,
|
||||
);
|
||||
|
||||
const setZoomLevel = async (zoomLevel: string) => {
|
||||
zoom.value = Number.parseFloat(zoomLevel);
|
||||
@ -755,7 +750,7 @@ const confirmSign = () => {
|
||||
zone: userSignatureZone.value,
|
||||
};
|
||||
makeFetch("POST", url, body)
|
||||
.then((r) => {
|
||||
.then(() => {
|
||||
checkForReady();
|
||||
})
|
||||
.catch((error) => {
|
||||
@ -777,9 +772,7 @@ const undoSign = async () => {
|
||||
};
|
||||
|
||||
const toggleAddZone = () => {
|
||||
canvasEvent.value === "select"
|
||||
? (canvasEvent.value = "add")
|
||||
: (canvasEvent.value = "select");
|
||||
canvasEvent.value = canvasEvent.value === "select" ? "add" : "select";
|
||||
};
|
||||
|
||||
const addZoneEvent = async (e: PointerEvent, canvas: HTMLCanvasElement) => {
|
||||
|
@ -3,9 +3,8 @@ import Modal from "ChillMainAssets/vuejs/_components/Modal.vue";
|
||||
import { reactive } from "vue";
|
||||
import HistoryButtonList from "ChillDocStoreAssets/vuejs/StoredObjectButton/HistoryButton/HistoryButtonList.vue";
|
||||
import {
|
||||
StoredObject, StoredObjectVersion,
|
||||
StoredObject,
|
||||
StoredObjectVersionWithPointInTime,
|
||||
StoredObjectPointInTime
|
||||
} from "./../../../types";
|
||||
|
||||
interface HistoryButtonListConfig {
|
||||
@ -29,7 +28,9 @@ const open = () => {
|
||||
state.opened = true;
|
||||
};
|
||||
|
||||
const onRestoreVersion = (payload : { newVersion: StoredObjectVersionWithPointInTime }) => emit('restoreVersion', payload)
|
||||
const onRestoreVersion = (payload: {
|
||||
newVersion: StoredObjectVersionWithPointInTime;
|
||||
}) => emit("restoreVersion", payload);
|
||||
|
||||
defineExpose({ open });
|
||||
</script>
|
||||
@ -45,9 +46,7 @@ defineExpose({ open });
|
||||
:versions="props.versions"
|
||||
:can-edit="canEdit"
|
||||
:stored-object="storedObject"
|
||||
@restore-version="
|
||||
onRestoreVersion
|
||||
"
|
||||
@restore-version="onRestoreVersion"
|
||||
></history-button-list>
|
||||
</template>
|
||||
</modal>
|
||||
|
@ -46,8 +46,9 @@ const onPickGenericDoc = ({
|
||||
emit("pickGenericDoc", { genericDoc });
|
||||
};
|
||||
|
||||
const onRemoveAttachment = (payload: { attachment: WorkflowAttachment }) => { emit('removeAttachment', payload) };
|
||||
|
||||
const onRemoveAttachment = (payload: { attachment: WorkflowAttachment }) => {
|
||||
emit("removeAttachment", payload);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -72,9 +72,13 @@ const placeTrans = (str: string): string => {
|
||||
}
|
||||
};
|
||||
|
||||
const onPickDocument = (payload: { genericDoc: GenericDocForAccompanyingPeriod }) => emit('pickGenericDoc', payload);
|
||||
const onPickDocument = (payload: {
|
||||
genericDoc: GenericDocForAccompanyingPeriod;
|
||||
}) => emit("pickGenericDoc", payload);
|
||||
|
||||
const onRemoveGenericDoc = (payload: {genericDoc: GenericDocForAccompanyingPeriod}) => emit('removeGenericDoc', payload);
|
||||
const onRemoveGenericDoc = (payload: {
|
||||
genericDoc: GenericDocForAccompanyingPeriod;
|
||||
}) => emit("removeGenericDoc", payload);
|
||||
|
||||
const filteredDocuments = computed<GenericDocForAccompanyingPeriod[]>(() => {
|
||||
if (false === loaded.value) {
|
||||
@ -250,9 +254,7 @@ const filteredDocuments = computed<GenericDocForAccompanyingPeriod[]>(() => {
|
||||
:genericDoc="g"
|
||||
:is-picked="isPicked(g)"
|
||||
@pickGenericDoc="onPickDocument"
|
||||
@removeGenericDoc="
|
||||
onRemoveGenericDoc
|
||||
"
|
||||
@removeGenericDoc="onRemoveGenericDoc"
|
||||
></pick-generic-doc-item>
|
||||
</div>
|
||||
<div v-else class="text-center chill-no-data-statement">
|
||||
|
Loading…
x
Reference in New Issue
Block a user