feat: refs #7346 add seriaType option #626
|
@ -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)) {
|
);
|
||||||
jsegarra marked this conversation as resolved
Outdated
jsegarra
commented
Para tener una condición con 4 condiciones que siguen el mismo criterio, propondria usar el método "every" Para tener una condición con 4 condiciones que siguen el mismo criterio, propondria usar el método "every"
|
|||||||
return false;
|
|
||||||
}
|
|
||||||
uniqueTypes.add(item.type);
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const formData = ref({});
|
const formData = ref({});
|
||||||
|
|
Loading…
Reference in New Issue
variable === null es lo mismo que hacer !variable
Por otra parte