evitar que se muestren los eliminados
This commit is contained in:
parent
443b09e8e3
commit
b213900733
|
@ -67,6 +67,10 @@ const AreasComunes = () => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data = data.filter(
|
||||||
|
(val) => val.status != -1,
|
||||||
|
)
|
||||||
setCommonAreaList(data);
|
setCommonAreaList(data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -98,6 +102,9 @@ const AreasComunes = () => {
|
||||||
let _common_areas = commonAreaList.filter(
|
let _common_areas = commonAreaList.filter(
|
||||||
(val) => val._id !== commonArea._id,
|
(val) => val._id !== commonArea._id,
|
||||||
);
|
);
|
||||||
|
_common_areas = _common_areas.filter(
|
||||||
|
(val) => val.status != -1,
|
||||||
|
)
|
||||||
setCommonAreaList(_common_areas);
|
setCommonAreaList(_common_areas);
|
||||||
setDeleteCommonAreaDialog(false);
|
setDeleteCommonAreaDialog(false);
|
||||||
setCommonArea(emptyCommonArea);
|
setCommonArea(emptyCommonArea);
|
||||||
|
@ -121,15 +128,18 @@ const AreasComunes = () => {
|
||||||
let _commonareas = commonAreaList.filter(
|
let _commonareas = commonAreaList.filter(
|
||||||
(val) => !selectedCommonAreas.includes(val),
|
(val) => !selectedCommonAreas.includes(val),
|
||||||
);
|
);
|
||||||
/* selectedCommunities.map((item) => {
|
selectedCommonAreas.map((item) => {
|
||||||
fetch('http://localhost:4000/user/deleteCommunity/' + item._id, {
|
fetch('http://localhost:4000/commonArea/deleteCommonArea/' + item._id, {
|
||||||
cache: 'no-cache',
|
cache: 'no-cache',
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})*/
|
});
|
||||||
|
_common_areas = _common_areas.filter(
|
||||||
|
(val) => val.status != -1,
|
||||||
|
)
|
||||||
setCommonAreaList(_commonareas);
|
setCommonAreaList(_commonareas);
|
||||||
setDeleteCommonAreasDialog(false);
|
setDeleteCommonAreasDialog(false);
|
||||||
setSelectedCommonAreas(null);
|
setSelectedCommonAreas(null);
|
||||||
|
|
Loading…
Reference in New Issue