Merge branch 'dev' into US-30-ReservarÁreacomúnparainquilinoV2

This commit is contained in:
Eduardo Quiros 2022-08-28 12:16:02 +00:00 committed by GitHub
commit 395086122d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 14 deletions

View File

@ -48,6 +48,7 @@ const Reservations = () => {
const [saveButtonTitle, setSaveButtonTitle] = useState("Registrar") const [saveButtonTitle, setSaveButtonTitle] = useState("Registrar")
const [reservationDialog, setReservationDialog] = useState(false); const [reservationDialog, setReservationDialog] = useState(false);
const [dateMax, setDateMax] = useState(); const [dateMax, setDateMax] = useState();
const [tenants, setTenants] = useState([]);
async function tenantsList(id) { async function tenantsList(id) {
@ -93,9 +94,7 @@ const Reservations = () => {
(val) => val.status != -1, (val) => val.status != -1,
) )
data.map((item) => { data.map((item) => {
item.date = formatDateString(item.date) item.date = formatDateString(item.date)
if (item.status == '1') { if (item.status == '1') {
item.status_text = 'Activo'; item.status_text = 'Activo';
} else if (item.status == '0') { } else if (item.status == '0') {
@ -224,7 +223,6 @@ const Reservations = () => {
setSubmitted(false); setSubmitted(false);
}; };
const leftToolbarTemplate = () => { const leftToolbarTemplate = () => {
return ( return (
<React.Fragment> <React.Fragment>
@ -243,7 +241,6 @@ const Reservations = () => {
disabled={!selectedReservations || !selectedReservations.length} disabled={!selectedReservations || !selectedReservations.length}
/> />
</div> </div>
</React.Fragment> </React.Fragment>
); );
}; };
@ -457,7 +454,6 @@ const Reservations = () => {
return today.toJSON().split('T')[0]; return today.toJSON().split('T')[0];
} }
return ( return (
<div className="grid"> <div className="grid">
<div className="col-12"> <div className="col-12">
@ -698,16 +694,10 @@ const Reservations = () => {
</div> </div>
)} )}
</Dialog> </Dialog>
</div> </div>
</div> </div>
</div> </div>
); );
} }
export default React.memo(Reservations); export default React.memo(Reservations);