Merge branch 'dev' into US-30-ReservarÁreacomúnparainquilinoV2
This commit is contained in:
commit
395086122d
|
@ -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') {
|
||||||
|
@ -193,7 +192,7 @@ const Reservations = () => {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const confirmDeleteReservation = (reservation) => {
|
const confirmDeleteReservation = (reservation) => {
|
||||||
setReservation(reservation);
|
setReservation(reservation);
|
||||||
setDeleteReservationDialog(true);
|
setDeleteReservationDialog(true);
|
||||||
|
@ -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>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -271,7 +268,7 @@ const Reservations = () => {
|
||||||
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
const header = (
|
const header = (
|
||||||
<div className="flex flex-column md:flex-row md:justify-content-between md:align-items-center">
|
<div className="flex flex-column md:flex-row md:justify-content-between md:align-items-center">
|
||||||
<h5 className="m-0">
|
<h5 className="m-0">
|
||||||
|
@ -456,8 +453,7 @@ const Reservations = () => {
|
||||||
today.setDate(today.getDate() - 1)
|
today.setDate(today.getDate() - 1)
|
||||||
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);
|
||||||
|
|
Loading…
Reference in New Issue