diff --git a/src/components/01_branch-management/FormQr.vue b/src/components/01_branch-management/FormQr.vue index 92023704..ad7e604a 100644 --- a/src/components/01_branch-management/FormQr.vue +++ b/src/components/01_branch-management/FormQr.vue @@ -35,7 +35,7 @@ defineEmits<{ }" class="col-12 row branch-form-show-qr-code" > -
+
-
-
+ ('employeeTab');
-
-
- +
+ +
+
-
-
- -
+ +
+ +
+ + +
+
diff --git a/src/components/ImageUploadDialog.vue b/src/components/ImageUploadDialog.vue index 4ae49c14..c2212cca 100644 --- a/src/components/ImageUploadDialog.vue +++ b/src/components/ImageUploadDialog.vue @@ -24,7 +24,7 @@ const file = defineModel('file', { required: true, }); defineEmits<{ - (e: 'save', v: File | null): void; + (e: 'save', file: File | null, url: string | null): void; }>(); const reader = new FileReader(); @@ -131,7 +131,7 @@ function change(e: Event) { type="submit" color="primary" class="q-px-md" - @click="$emit('save', inputFile?.files?.[0] || null)" + @click="$emit('save', inputFile?.files?.[0] || null, imageUrl)" :label="$t('save')" />
@@ -190,4 +190,14 @@ function change(e: Event) { .image-container > :deep(*:not(:first-child)) { display: none; } + +.close-btn { + color: hsl(var(--negative-bg)); + background-color: hsla(var(--negative-bg) / 0.1); + + &.dark { + background-color: transparent; + border: 1px solid hsl(var(--negative-bg)); + } +} diff --git a/src/components/ProfileBanner.vue b/src/components/ProfileBanner.vue index a62792cf..aa4c3038 100644 --- a/src/components/ProfileBanner.vue +++ b/src/components/ProfileBanner.vue @@ -4,11 +4,11 @@ import { ref } from 'vue'; defineProps<{ icon?: string; color?: string; - img?: string; + img?: string | null; bgColor?: string; title?: string; caption?: string; - cover?: string; + cover?: string | null; hideFade?: boolean; active?: boolean; @@ -40,7 +40,11 @@ const showOverlay = ref(false);
(false); const hideStat = ref(false); const currentStatus = ref('All'); const expandedTree = ref([]); +const formMenuIcon = ref<{ icon: string; color: string; bgColor: string }[]>([ + { + icon: 'mdi-office-building-outline', + color: 'hsl(var(--info-bg))', + bgColor: 'var(--surface-1)', + }, + { + icon: 'mdi-phone', + color: 'hsl(var(--info-bg))', + bgColor: 'var(--surface-1)', + }, + { + icon: 'mdi-map-marker-radius', + color: 'hsl(var(--info-bg))', + bgColor: 'var(--surface-1)', + }, + { + icon: 'mdi-map-legend', + color: 'hsl(var(--info-bg))', + bgColor: 'var(--surface-1)', + }, + { + icon: 'mdi-qrcode', + color: 'hsl(var(--info-bg))', + bgColor: 'var(--surface-1)', + }, + { + icon: 'mdi-piggy-bank-outline', + color: 'hsl(var(--info-bg))', + bgColor: 'var(--surface-1)', + }, +]); -const profileFileImg = ref(undefined); +const isImageEdit = ref(false); +const profileFileImg = ref(null); const imageUrl = ref(''); const currentNode = ref(); +const imageDialog = ref(false); const inputFileImg = (() => { const element = document.createElement('input'); @@ -532,6 +567,25 @@ function handleHold(node: BranchWithChildren) { }; } +function openImageDialog(isEdit?: boolean) { + if (isEdit) isImageEdit.value = true; + else isImageEdit.value = false; + imageDialog.value = true; +} + +function handleImageUpload(file: File | null, url: string | null) { + imageUrl.value = url; + imageDialog.value = false; + // profileFileImg = file; +} + +watch( + () => profileFileImg.value, + () => { + if (profileFileImg.value !== null) isImageEdit.value = true; + }, +); + watch(locale, () => { fieldSelectedBranch.value = { label: t(`${fieldSelectedBranch.value.label}`), @@ -1394,41 +1448,22 @@ watch(currentHq, () => { onSubmit(); } " - :close="() => (modal = false)" + :close="() => ((modal = false), (profileFileImg = null))" >
{ :menu="[ { name: $t('formDialogTitleInformation'), - anchor: 'information', + anchor: 'form-information', }, { name: $t('formDialogTitleContact'), - anchor: 'contact', + anchor: 'form-contact', }, { name: $t('formDialogTitleAddress'), - anchor: 'address', + anchor: 'form-address', }, { name: $t('formDialogTitleLocation'), - anchor: 'location', + anchor: 'form-location', }, { name: 'QR Code', - anchor: 'qr', + anchor: 'form-qr', }, { name: $t('bankBook'), - anchor: 'bankBook', + anchor: 'form-bankBook', }, ]" background="transparent" @@ -1476,7 +1511,7 @@ watch(currentHq, () => {
{ title="formDialogTitleInformation" /> { :outlined="true" /> { v-model:zip-code="formData.zipCode" /> { title="formDialogTitleLocation" /> { :close="() => ((modalDrawer = false), flowStore.rotate())" :statusBranch="formData.status" > - + /> --> +
+
+ @@ -1779,6 +1870,30 @@ watch(currentHq, () => {
+ + + +