%PDF- %PDF-
Direktori : /home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/client/ |
Current File : //home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/client/ba7b8a5.js |
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{379:function(t,o,e){var content=e(385);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,e(34).default)("68b99d2a",content,!0,{sourceMap:!1})},384:function(t,o,e){"use strict";e(379)},385:function(t,o,e){var r=e(33)((function(i){return i[1]}));r.push([t.i,".time[data-v-6ba927ca]{display:block;border-radius:0.25rem;border-width:1px;--tw-border-opacity:1;border-color:rgba(51, 51, 51, var(--tw-border-opacity));--tw-border-opacity:0.1;padding:0.5rem;text-align:center;font-size:0.875rem;line-height:1.25rem;line-height:1.25rem;transition-property:background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;transition-property:background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-property:background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;transition-duration:100ms;}.time[data-v-6ba927ca]:focus, .time[data-v-6ba927ca]:hover{--tw-bg-opacity:1;background-color:rgba(51, 51, 51, var(--tw-bg-opacity))}.time[data-v-6ba927ca]:focus, .time[data-v-6ba927ca]:hover{--tw-text-opacity:1;color:rgba(255, 255, 255, var(--tw-text-opacity))}",""]),t.exports=r},386:function(t,o,e){"use strict";e.r(o);var r=e(0),n=(e(3),e(213),{props:{therapist_id:Number,therapist_slug:String,is_booking_enabled:Boolean,classes:String},data:function(){return{isLoading:!1,isOpen:!1,date:null,availability:[]}},methods:{openAvailability:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function o(){return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t.isLoading=!0,t.isOpen=!0,o.next=4,t.$axios.post("/availability/next/"+t.therapist_id).then((function(o){t.isLoading=!1,t.date=o.data.date,t.availability=o.data.slots})).catch((function(o){t.isLoading=!1}));case 4:case"end":return o.stop()}}),o)})))()}}}),l=(e(384),e(10)),component=Object(l.a)(n,(function(){var t=this,o=t.$createElement,e=t._self._c||o;return t.is_booking_enabled?e("div",{staticClass:"w-full relative flex items-center",class:t.classes,on:{mouseleave:function(o){t.isOpen=!1}}},[e("button",{staticClass:"mt-4 uppercase font-medium flex items-center justify-center focus:outline-none hover:text-yellow transition duration-200",attrs:{type:"button"},on:{click:t.openAvailability}},[t._v("\n Book Now\n "),e("svg",{staticClass:"w-4 h-4 ml-1",class:t.isOpen?"transform rotate-180":"",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"}})])]),t._v(" "),t.isOpen?e("div",{staticClass:"absolute z-20 top-full left-0 w-full p-6 bg-white rounded-lg shadow"},[1==t.isLoading?e("div",{staticClass:"flex items-center justify-center"},[e("svg",{staticClass:"animate-spin -ml-1 mr-3 h-5 w-5 text-current",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"}},[e("circle",{staticClass:"opacity-25",attrs:{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}}),t._v(" "),e("path",{staticClass:"opacity-75",attrs:{fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}})]),t._v(" "),e("span",[t._v("Loading Times")])]):t.availability.length>0?e("div",[e("span",{staticClass:"block font-bold mb-2"},[t._v(t._s(t.$moment.utc(t.date).format("DD/MM/Y")))]),t._v(" "),e("div",{staticClass:"grid grid-cols-3 gap-2"},t._l(t.availability,(function(time,o){return e("NuxtLink",{key:o,staticClass:"time",attrs:{to:"/booking/"+t.therapist_slug+"?date="+t.$moment.utc(time.start).format("Y-MM-DD")+"&time="+time.start}},[t._v(t._s(t.$moment.utc(time.start).format("H:mm")))])})),1)]):e("div",{staticClass:"flex items-center justify-center"},[e("span",{staticClass:"font-bold"},[t._v("No availability")])])]):t._e()]):t._e()}),[],!1,null,"6ba927ca",null);o.default=component.exports}}]);