mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 08:03:49 +00:00
Fix ts errors upon prod compilation
This commit is contained in:
@@ -92,8 +92,7 @@
|
||||
>
|
||||
<button
|
||||
:disabled="
|
||||
userSignatureZone === null ||
|
||||
userSignatureZone?.index < 1
|
||||
isFirstSignatureZone
|
||||
"
|
||||
class="btn btn-light btn-sm"
|
||||
@click="turnSignature(-1)"
|
||||
@@ -103,7 +102,7 @@
|
||||
<span>|</span>
|
||||
<button
|
||||
:disabled="
|
||||
userSignatureZone?.index >= signature.zones.length - 1
|
||||
isLastSignatureZone
|
||||
"
|
||||
class="btn btn-light btn-sm"
|
||||
@click="turnSignature(1)"
|
||||
@@ -200,10 +199,7 @@
|
||||
class="col-4 d-xl-none text-center turnSignature p-0"
|
||||
>
|
||||
<button
|
||||
:disabled="
|
||||
userSignatureZone === null ||
|
||||
userSignatureZone?.index < 1
|
||||
"
|
||||
:disabled="!hasSignatureZoneSelected"
|
||||
class="btn btn-light btn-sm"
|
||||
@click="turnSignature(-1)"
|
||||
>
|
||||
@@ -212,7 +208,7 @@
|
||||
<span>|</span>
|
||||
<button
|
||||
:disabled="
|
||||
userSignatureZone?.index >= signature.zones.length - 1
|
||||
isLastSignatureZone
|
||||
"
|
||||
class="btn btn-light btn-sm"
|
||||
@click="turnSignature(1)"
|
||||
@@ -226,8 +222,7 @@
|
||||
>
|
||||
<button
|
||||
:disabled="
|
||||
userSignatureZone === null ||
|
||||
userSignatureZone?.index < 1
|
||||
isFirstSignatureZone
|
||||
"
|
||||
class="btn btn-light btn-sm"
|
||||
@click="turnSignature(-1)"
|
||||
@@ -236,9 +231,7 @@
|
||||
</button>
|
||||
<span>|</span>
|
||||
<button
|
||||
:disabled="
|
||||
userSignatureZone?.index >= signature.zones.length - 1
|
||||
"
|
||||
:disabled="isLastSignatureZone"
|
||||
class="btn btn-light btn-sm"
|
||||
@click="turnSignature(1)"
|
||||
>
|
||||
@@ -333,7 +326,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, Ref, reactive } from "vue";
|
||||
import {ref, Ref, reactive, computed} from "vue";
|
||||
import { useToast } from "vue-toast-notification";
|
||||
import "vue-toast-notification/dist/theme-sugar.css";
|
||||
import {
|
||||
@@ -433,6 +426,14 @@ 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
|
||||
|
||||
/**
|
||||
* 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) => {
|
||||
zoom.value = Number.parseFloat(zoomLevel);
|
||||
await resetPages();
|
||||
|
Reference in New Issue
Block a user