mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 08:03:49 +00:00
Eslint fixes
This commit is contained in:
@@ -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) => {
|
||||
|
Reference in New Issue
Block a user