forked from verdnatura/salix-front
Wait to render teleport until subtoolbar is shown
This commit is contained in:
parent
5ae54d557b
commit
87f376464b
|
@ -16,6 +16,7 @@ import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
|||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
import CustomerSamplesPreview from 'src/pages/Customer/components/CustomerSamplesPreview.vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
|
||||
const { notify } = useNotify();
|
||||
const { t } = useI18n();
|
||||
|
@ -25,6 +26,7 @@ const route = useRoute();
|
|||
const router = useRouter();
|
||||
const state = useState();
|
||||
const user = state.getUser();
|
||||
const stateStore = useStateStore();
|
||||
|
||||
const client = ref({});
|
||||
const hasChanged = ref(false);
|
||||
|
@ -61,7 +63,7 @@ const initialData = reactive({});
|
|||
onBeforeMount(async () => {
|
||||
const { data } = await axios.get(`Clients/1/getCard`);
|
||||
client.value = data;
|
||||
initialData.clientFk = route.params.id;
|
||||
initialData.clientFk = route.params?.id;
|
||||
initialData.recipient = data.email;
|
||||
initialData.recipientId = data.id;
|
||||
});
|
||||
|
@ -194,7 +196,7 @@ const toCustomerSamples = () => {
|
|||
url="Samples/visible"
|
||||
/>
|
||||
|
||||
<Teleport to="#st-actions">
|
||||
<Teleport v-if="stateStore?.isSubToolbarShown()" to="#st-actions">
|
||||
<QBtnGroup push class="q-gutter-x-sm">
|
||||
<QBtn
|
||||
:label="t('globals.cancel')"
|
||||
|
|
Loading…
Reference in New Issue