import React, { useState } from 'react'; import * as Icon from 'react-feather'; import { useRouter } from 'next/router' import NumberFormat from 'react-number-format'; //sweet alert import swal from 'sweetalert'; const Checkout = function ({ backend, checkoutItem, ...props }) { // const [HargaFasilitas, setHargaFasilitas] = useState(''); // const [NamaFasilitas, setNamaFasilitas] = useState(''); const [formValue, setFormValue] = React.useState({ namaPemesan: "", emailPemesan: "", teleponPemesan: "", pemesan: "", checkIn: "", checkOut: "", jumlahPengunjung: "", requestKamar: "", catatan: "", hargaKamar: "", namaKamar: "", ppnKamar: 0.1, hargaTotal: checkoutItem[0].hargaKamar + checkoutItem[0].hargaKamar * 0.1, }); const disablePastDate = () => { const today = new Date(); const dd = String(today.getDate() + 1).padStart(2, "0"); const mm = String(today.getMonth() + 1).padStart(2, "0"); //January is 0! const yyyy = today.getFullYear(); return yyyy + "-" + mm + "-" + dd; }; const [TglCheckIn, setCheckIn] = useState(''); const [TglCheckOut, setCheckOut] = useState(''); const date = (new Date(TglCheckIn)).getTime(); const today = (new Date(TglCheckOut)).getTime(); const msDay = 24 * 60 * 60 * 1000; // milliseconds per day const days = Math.floor((today - date) / msDay); const router = useRouter(); const CheckoutKamar = checkoutItem.map((data) => { return (
Fasilitas :
Jenis Kamar | Total |
---|---|
Catania {data.namaKamar} |
|
Total Hari | {days} Hari |
Pajak 10% |
|
Total |
|
As COVID-19 situation evolves, make sure the cancellation policy suits your needs.
In reference to the circular letter by the government regarding the spread control of Covid-19, please ensure that you are aware of your booking's refund, cancellation, and reschedule policy.