formateo de fechas y eliminar impresiones innecesarias

This commit is contained in:
Mariela 2022-08-26 17:13:18 -06:00
parent 5a2f0846d8
commit 1b99458b7d
4 changed files with 6 additions and 21 deletions

View File

@ -14,8 +14,6 @@ export class ReservationsService {
) {}
create(reservation: ReservationDocument) {
console.log(reservation);
return this.reservationModel.create(reservation);
}

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="es">
<head>
<meta charset="utf-8" />
<title>Katoikia</title>

View File

@ -13,8 +13,8 @@ export const AppFooter = (props) => {
height="20"
className="mr-2"
/>
by
<span className="font-medium ml-2">PrimeReact</span>
por
<span className="font-medium ml-2">Deimos</span>
</div>
);
};

View File

@ -49,7 +49,6 @@ const Reservations = () => {
const [reservationDialog, setReservationDialog] = useState(false);
async function tenantsList(id) {
await fetch(`http://localhost:4000/user/findTenants/${id}`,
{ method: 'GET' })
@ -148,8 +147,6 @@ const Reservations = () => {
} else if (_reservation.status == '0') {
_reservation.status_text = 'Inactivo';
}
console.log(_reservation)
fetch('http://localhost:4000/reservation/createReservation/', {
cache: 'no-cache',
method: 'POST',
@ -174,19 +171,12 @@ const Reservations = () => {
setReservationDialog(false)
})
} else {
setSubmitted(true);
}
}
const actionsReservation = (rowData) => {
return (
<div className="actions">
<Button
@ -199,8 +189,6 @@ const Reservations = () => {
);
};
const confirmDeleteReservation = (reservation) => {
setReservation(reservation);
setDeleteReservationDialog(true);
@ -267,7 +255,6 @@ const Reservations = () => {
);
};
const reservationDialogFooter = (
<>
<Button
@ -432,7 +419,7 @@ const Reservations = () => {
}
function formatDateString(dateString) {
const [date, time] = dateString.split('T');
let date = new Date(dateString).toLocaleDateString("es-CL");
return date;
}
@ -587,7 +574,7 @@ const Reservations = () => {
autoFocus
min={new Date().toJSON().split('T')[0]}
type="date"
lang='es'
lang='es-CL'
value={reservation.date}
className={classNames({
'p-invalid': submitted && (reservation.date === ''