feat: Refresh quotation list on window focus
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
This commit is contained in:
parent
f7a8416e7a
commit
15a812b50e
1 changed files with 11 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, reactive, ref, watch, computed } from 'vue';
|
import { onMounted, onUnmounted, reactive, ref, watch, computed } from 'vue';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
@ -275,6 +275,10 @@ const customerNameInfo = computed(() => {
|
||||||
return name || '-';
|
return name || '-';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function handleWindowFocus() {
|
||||||
|
fetchQuotationList();
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
pageState.gridView = $q.screen.lt.md ? true : false;
|
pageState.gridView = $q.screen.lt.md ? true : false;
|
||||||
navigatorStore.current.title = 'quotation.title';
|
navigatorStore.current.title = 'quotation.title';
|
||||||
|
|
@ -312,6 +316,12 @@ onMounted(async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
flowStore.rotate();
|
flowStore.rotate();
|
||||||
|
|
||||||
|
window.addEventListener('focus', handleWindowFocus);
|
||||||
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
window.removeEventListener('focus', handleWindowFocus);
|
||||||
});
|
});
|
||||||
|
|
||||||
async function fetchQuotationList(mobileFetch?: boolean) {
|
async function fetchQuotationList(mobileFetch?: boolean) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue