diff --git a/src/helpers/constants.js b/src/helpers/constants.js index f9cfe1c..8e40fab 100644 --- a/src/helpers/constants.js +++ b/src/helpers/constants.js @@ -10,7 +10,7 @@ export const ALLOWED_FILE_TYPES = [ "image/jpeg", ]; export const QUESTIONNAIRE_LINK = "http://ba.digital-tps.tk/export-questionnaire/"; -export const LETTER_LINK = "http://ba.digital-tps.tk/storage/"; +export const LETTER_LINK = "http://ba.digital-tps.tk/doc/"; export const APPLICATION_APPROVED_STATE = "approved"; export const APPLICATION_TO_BE_IMPROVED_STATE = "to_be_improved"; export const APPLICATION_NEW_STATE = "new"; diff --git a/src/main.js b/src/main.js index bf3defc..ee820bd 100644 --- a/src/main.js +++ b/src/main.js @@ -7,8 +7,6 @@ import globalComponents from "./global-components"; import utils from "./utils"; import "./assets/css/app.css"; -const reCaptchaKey = import.meta.env.VITE_RECAPTCHA_KEY; - const app = createApp(App).use(router).use(i18n).use(createPinia()); globalComponents(app); diff --git a/src/views/document/Main.vue b/src/views/document/Main.vue index 91d1a71..b93cb8e 100644 --- a/src/views/document/Main.vue +++ b/src/views/document/Main.vue @@ -98,16 +98,18 @@
@@ -183,10 +185,14 @@ const { application } = storeToRefs(applicationStore); const docFile = ref(null); const validationError = ref({}); +const isLoadingDoc = ref({}); + const isApplying = ref(false); const onFileChange = async (index, attachment, e) => { - // todo: loading + isLoadingDoc.value = {}; + isLoadingDoc.value[index] = true; + let files = e.target.files || e.dataTransfer.files if (!files.length) { @@ -199,6 +205,8 @@ const onFileChange = async (index, attachment, e) => { await applicationStore.fileUpload(attachment.attachment_id, files[0]); } + + isLoadingDoc.value[index] = false; } const fileIsValid = (index, attachment) => { @@ -224,6 +232,7 @@ const apply = async () => { }; const downloadQuestionnaire = async () => { + // console.log(user.value.token); window.open(QUESTIONNAIRE_LINK + user.value.token, '_blank'); // await applicationStore.downloadQuestionnaire(user.value.token); };