#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 clientsOptions = 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 optionsInitialData = computed(() => {
return (
companiesOptions.value.length > 0 &&
printersOptions.value.length > 0 &&
clientsOptions.value.length > 0 &&
serialTypesOptions.value.length > 0
);
const optionsArrays = [
companiesOptions.value,
printersOptions.value,
clientsOptions.value,
serialTypesOptions.value,
];
return optionsArrays.every((arr) => arr.length > 0);
});
const getStatus = computed({
@ -60,18 +73,7 @@ onMounted(async () => {
<FetchData url="Clients" @on-fetch="(data) => (clientsOptions = data)" auto-load />
<FetchData
url="invoiceOutSerials"
@on-fetch="
(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;
});
}
"
@on-fetch="handleInvoiceOutSerialsFetch"
auto-load
/>
<QForm

View File

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