This commit is contained in:
parent
defb11a6d7
commit
d0ccce2656
|
@ -26,14 +26,9 @@ const clientsOptions = ref([]);
|
||||||
const serialTypesOptions = ref([]);
|
const serialTypesOptions = ref([]);
|
||||||
|
|
||||||
const handleInvoiceOutSerialsFetch = (data) => {
|
const handleInvoiceOutSerialsFetch = (data) => {
|
||||||
const uniqueTypes = new Set();
|
serialTypesOptions.value = Array.from(
|
||||||
serialTypesOptions.value = data.filter((item) => {
|
new Set(data.map((item) => item.type).filter((type) => type))
|
||||||
if (item.type === null || uniqueTypes.has(item.type)) {
|
);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
uniqueTypes.add(item.type);
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const formData = ref({});
|
const formData = ref({});
|
||||||
|
|
Loading…
Reference in New Issue