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'; function CreateID(length) { var result = ''; var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; var charactersLength = characters.length; for (var i = 0; i < length; i++) { result += characters.charAt(Math.floor(Math.random() * charactersLength)); } return result; } const UUID = CreateID(10); // console.log("hasil : ", UUID); const Checkout = function ({ backend, checkoutItem, ...props }) { // const [HargaFasilitas, setHargaFasilitas] = useState(''); // const [NamaFasilitas, setNamaFasilitas] = useState(''); var [TglCheckIn, setCheckIn] = useState(''); var [TglCheckOut, setCheckOut] = useState(''); var date = (new Date(TglCheckIn)).getTime(); var today = (new Date(TglCheckOut)).getTime(); const msDay = 24 * 60 * 60 * 1000; var days = Math.floor((today - date) / msDay); const [formValue, setFormValue] = React.useState({ transactionID: UUID, namaPemesan: "", emailPemesan: "", teleponPemesan: "", pemesan: "", checkIn: "", checkOut: "", jumlahPengunjung: "", requestKamar: "", catatan: "", hargaKamar: "", namaKamar: "", ppnKamar: 0.1, hargaTotal: "", }); const disablePastDate = () => { const today = new Date(); const dd = String(today.getDate() + 1).padStart(2, "0"); const mm = String(today.getMonth() + 1).padStart(2, "0"); const yyyy = today.getFullYear(); return yyyy + "-" + mm + "-" + dd; }; const Router = useRouter(); return ( <>
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.