This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import 'react-dates/initialize'; | |
import {DateRangePicker, initialStartDate, isInclusivelyAfterDay} from 'react-dates'; | |
import {START_DATE, END_DATE} from 'react-dates/constants'; | |
import ReactDOM from 'react-dom'; | |
import isSameDay from './utils/isSameDay'; | |
import moment from "moment/moment"; | |
import checkStatus from "./utils/checkFetchStatus"; | |
import swal from 'sweetalert'; | |
import 'whatwg-fetch'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import 'react-dates/initialize'; | |
import {DateRangePicker, initialStartDate, isInclusivelyAfterDay} from 'react-dates'; | |
import {START_DATE, END_DATE} from 'react-dates/constants'; | |
import ReactDOM from 'react-dom'; | |
import isSameDay from './utils/isSameDay'; | |
import moment from "moment/moment"; | |
import fetchPrices from './utils/fetchPrices'; | |
let disabledDates = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Encore = require('@symfony/webpack-encore'); | |
Encore | |
.setOutputPath('public/build') | |
.setPublicPath('/build') | |
.setManifestKeyPrefix('') | |
.splitEntryChunks() | |
.addEntry('js/test', './public/assets/js/test.js')// JAVASCRIPT | |
.cleanupOutputBeforeBuild() | |
.enableBuildNotifications() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (root, factory) { | |
var routing = factory(); | |
if (typeof define === 'function' && define.amd) { | |
// AMD. Register as an anonymous module. | |
define([], routing.Routing); | |
} else if (typeof module === 'object' && module.exports) { | |
// Node. Does not work with strict CommonJS, but | |
// only CommonJS-like environments that support module.exports, | |
// like Node. | |
module.exports = routing.Routing; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<datepicker | |
:startDate="startDate" | |
@check-in-changed="setCheckInDate" | |
@check-out-changed="setCheckOutDate" | |
:maxNights="21" | |
:minNights="minNights" | |
:checkIn="checkIn" | |
:checkOut="checkOut" | |
:disabledDates="bookedDates" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<datepicker | |
:startDate="startDate" | |
@checkInChanged="setCheckinDate" | |
:maxNights="30" | |
:disabledDates="bookedDates" | |
:firstDayOfWeek="1" | |
:i18n="lang" | |
:showYear="true" | |
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'whatwg-fetch'; //polyfill | |
window.fetch(Routing.generate('booking_data'), { //window.fetch -> polyfill | |
method: 'post', | |
headers: { | |
'Content-Type': 'application/json', | |
'Accept': 'application/json' | |
}, | |
body: JSON.stringify({ | |
checkin: event.start.toDateString(), |