fix: refs #6919 update customer data retrieval to use useArrayData for improved reactivity #1474
|
@ -18,6 +18,7 @@ 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 FormPopup from 'src/components/FormPopup.vue';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
|
||||
const { dialogRef, onDialogOK } = useDialogPluginComponent();
|
||||
|
||||
|
@ -39,7 +40,7 @@ const optionsSamplesVisible = ref([]);
|
|||
const sampleType = ref({ hasPreview: false });
|
||||
const initialData = reactive({});
|
||||
const entityId = computed(() => route.params.id);
|
||||
const customer = computed(() => state.get('Customer'));
|
||||
const customer = computed(() => useArrayData('Customer').store?.data);
|
||||
const filterEmailUsers = { where: { userFk: user.value.id } };
|
||||
const filterClientsAddresses = {
|
||||
include: [
|
||||
|
@ -65,9 +66,9 @@ const filterSamplesVisible = {
|
|||
defineEmits(['confirm', ...useDialogPluginComponent.emits]);
|
||||
|
||||
onBeforeMount(async () => {
|
||||
initialData.clientFk = customer.value.id;
|
||||
initialData.recipient = customer.value.email;
|
||||
initialData.recipientId = customer.value.id;
|
||||
initialData.clientFk = customer.value?.id;
|
||||
initialData.recipient = customer.value?.email;
|
||||
initialData.recipientId = customer.value?.id;
|
||||
});
|
||||
|
||||
const setEmailUser = (data) => {
|
||||
|
|
Loading…
Reference in New Issue