fix(01): enter hq after create br / 1 input location

This commit is contained in:
puriphatt 2024-08-29 14:46:45 +07:00
parent 19dd009f88
commit 73c7ba8327
4 changed files with 20 additions and 5 deletions

View file

@ -34,9 +34,9 @@ defineProps<{
<div class="col-12 bordered rounded column">
<!-- <div class="q-pl-md q-py-sm app-text-muted bordered-b">location</div> -->
<div v-if="!!longitude && !!latitude" class="col flex flex-center">
<div v-if="!!latitude" class="col flex flex-center">
<iframe
:src="`https://maps.google.com/maps?q=${latitude}, ${longitude}&z=15&output=embed`"
:src="`https://maps.google.com/maps?q=${latitude}&z=15&output=embed`"
width="100%"
frameborder="0"
style="border: 0"
@ -76,17 +76,17 @@ defineProps<{
:readonly="readonly"
:outlined="outlined"
:dense="dense"
:label="$t('branch.form.latitude')"
:label="$t('branch.form.locationCoordinate')"
class="col q-mr-xs"
/>
<q-input
<!-- <q-input
v-model="longitude"
:readonly="readonly"
:outlined="outlined"
:dense="dense"
:label="$t('branch.form.longitude')"
class="col q-ml-xs"
/>
/> -->
</div>
</div>
</template>

View file

@ -206,6 +206,7 @@ export default {
latitude: 'Latitude',
longitude: 'Longitude',
webUrl: 'Website URL',
locationCoordinate: 'Location coordinates',
},
},

View file

@ -206,6 +206,7 @@ export default {
latitude: 'ละติจูด',
longitude: 'ลองจิจูด',
webUrl: 'ที่อยู่เว็บไซต์',
locationCoordinate: 'ตำแหน่งพิกัด',
},
},

View file

@ -602,6 +602,19 @@ async function onSubmit() {
formData.value.code = formData.value.code?.slice(0, -5);
delete formData.value['codeHeadOffice'];
await createBranch();
fieldSelectedBranch.value.value = '';
inputSearch.value = '';
currentHq.value = {
id: currentRecord.id,
code: currentRecord.code,
};
beforeBranch.value = {
id: '',
code: '',
};
expandedTree.value = [];
expandedTree.value.push(currentRecord.id);
} else {
dialog({
color: 'info',