#7897 - masterTest_24_36 #669

Merged
jsegarra merged 115 commits from 7897_masterTest_24_36 into master 2024-09-03 06:37:49 +00:00
2 changed files with 20 additions and 19 deletions
Showing only changes of commit 3d5807463b - Show all commits

View File

@ -24,15 +24,28 @@ const companiesOptions = ref([]);
const printersOptions = ref([]); const printersOptions = ref([]);
const clientsOptions = ref([]); const clientsOptions = ref([]);
const serialTypesOptions = ref([]); const serialTypesOptions = ref([]);
const handleInvoiceOutSerialsFetch = (data) => {
const uniqueTypes = new Set();
serialTypesOptions.value = data.filter((item) => {
if (item.type === null || uniqueTypes.has(item.type)) {
return false;
}
uniqueTypes.add(item.type);
return true;
});
};
const formData = ref({}); const formData = ref({});
const optionsInitialData = computed(() => { const optionsInitialData = computed(() => {
return ( const optionsArrays = [
companiesOptions.value.length > 0 && companiesOptions.value,
printersOptions.value.length > 0 && printersOptions.value,
clientsOptions.value.length > 0 && clientsOptions.value,
serialTypesOptions.value.length > 0 serialTypesOptions.value,
); ];
return optionsArrays.every((arr) => arr.length > 0);
}); });
const getStatus = computed({ const getStatus = computed({
@ -60,18 +73,7 @@ onMounted(async () => {
<FetchData url="Clients" @on-fetch="(data) => (clientsOptions = data)" auto-load /> <FetchData url="Clients" @on-fetch="(data) => (clientsOptions = data)" auto-load />
<FetchData <FetchData
url="invoiceOutSerials" url="invoiceOutSerials"
@on-fetch=" @on-fetch="handleInvoiceOutSerialsFetch"
(data) => {
const uniqueTypes = new Set();
serialTypesOptions = data.filter((item) => {
if (item.type === null || uniqueTypes.has(item.type)) {
return false;
}
uniqueTypes.add(item.type);
return true;
});
}
"
auto-load auto-load
/> />
<QForm <QForm

View File

@ -16,7 +16,6 @@ const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
const itemTypesOptions = ref([]); const itemTypesOptions = ref([]);
const itemsWithNameOptions = ref([]);
const intrastatsOptions = ref([]); const intrastatsOptions = ref([]);
const expensesOptions = ref([]); const expensesOptions = ref([]);