chore: comment out unused var (build failed)

This commit is contained in:
Methapon2001 2024-04-18 08:57:57 +07:00
parent 05b2bd4221
commit 70c6d58db0

View file

@ -11,7 +11,6 @@ import TooltipComponent from 'components/TooltipComponent.vue';
import StatCard from 'components/StatCardComponent.vue';
import BranchCard from 'src/components/01_branch-management/BranchCard.vue';
import { BranchContactCreate } from 'stores/branch-contact/types';
import { BranchWithChildren, BranchCreate } from 'stores/branch/types';
import { watch } from 'vue';
import { useI18n } from 'vue-i18n';
@ -21,25 +20,25 @@ const { t } = useI18n();
const profileFile = ref<File | undefined>(undefined);
const imageUrl = ref<string | null>();
const inputFile = (() => {
const element = document.createElement('input');
element.type = 'file';
element.accept = 'image/*';
const reader = new FileReader();
reader.addEventListener('load', () => {
if (typeof reader.result === 'string') imageUrl.value = reader.result;
});
element.addEventListener('change', () => {
profileFile.value = element.files?.[0];
if (profileFile.value) {
reader.readAsDataURL(profileFile.value);
}
});
return element;
})();
// const inputFile = (() => {
// const element = document.createElement('input');
// element.type = 'file';
// element.accept = 'image/*';
//
// const reader = new FileReader();
// reader.addEventListener('load', () => {
// if (typeof reader.result === 'string') imageUrl.value = reader.result;
// });
//
// element.addEventListener('change', () => {
// profileFile.value = element.files?.[0];
// if (profileFile.value) {
// reader.readAsDataURL(profileFile.value);
// }
// });
//
// return element;
// })();
const branchStore = useBranchStore();
const { locale } = useI18n();
@ -126,10 +125,10 @@ const formData = ref<BranchCreate & { contact: string[] }>(
structuredClone(defaultFormData),
);
function clearData() {
formData.value = structuredClone(defaultFormData);
profileFile.value = undefined;
}
// function clearData() {
// formData.value = structuredClone(defaultFormData);
// profileFile.value = undefined;
// }
</script>
<template>