mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 08:03:49 +00:00
signature: add index on PDFSignatureZone + init POST signature
This commit is contained in:
@@ -110,6 +110,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, Ref, reactive } from "vue";
|
||||
import { Signature, SignatureZone } from "../../types";
|
||||
import { makeFetch } from "../../../../../ChillMainBundle/Resources/public/lib/api/apiMethods";
|
||||
import * as pdfjsLib from "pdfjs-dist";
|
||||
import {
|
||||
PDFDocumentProxy,
|
||||
@@ -321,11 +322,24 @@ const confirm_sign = () => {
|
||||
console.log(userSignatureZones.value);
|
||||
loading.value = true;
|
||||
//TODO POST userSignatureZones to backend
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
modalOpen.value = false;
|
||||
signed.value = true;
|
||||
}, 3000); // FAKE
|
||||
const url = `/api/1.0/document/workflow/${signature.id}/signature-request`;
|
||||
const body = {
|
||||
storedObject: signature.storedObject,
|
||||
zone: userSignatureZones.value,
|
||||
};
|
||||
makeFetch('POST', url, body)
|
||||
.then(r => {
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
});
|
||||
|
||||
// setTimeout(() => {
|
||||
// loading.value = false;
|
||||
// modalOpen.value = false;
|
||||
// signed.value = true;
|
||||
// }, 3000); // FAKE
|
||||
};
|
||||
|
||||
const undo_sign = async () => {
|
||||
|
Reference in New Issue
Block a user