{"version":3,"sources":["webpack:///./src/components/modules/CalendarWeekTime.vue?34ed","webpack:///./src/components/modules/CalendarWeekTime.vue","webpack:///./src/components/modules/CalendarWeekTime.vue?abe1","webpack:///./src/components/modules/CalendarWeekTime.vue?dfee","webpack:///./src/components/modules/CalendarWeekTime.vue?22de"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","class","selectedAppointmentId","_l","weekday","i","key","dayOfMonth","style","displayGrid","getOverlappingTimes","_v","_s","weekDay","isToday","n","daysToDisplay","a","id","isRecommendation","columnStart","actualPosition","alternateLane","startHour","endHour","attrs","dayOfWeek","on","$event","$emit","domProps","timeDisplay","$i18n","locale","_f","price","currency","_e","staticRenderFns","calendarHelper","CalendarHelper","extend","props","appointments","getAppointmentsPropValidator","selectedWeek","type","String","default","format","data","currentDate","temp","currentDay","getFirstAppointment","methods","resetValues","calendarDisplayDays","mounted","calendargrid","document","getElementsByClassName","gridTemplateColumns","j","calendarFiller","gridArea","computed","weeksToDisplay","localeValue","i18n","today","firstDayOfThisWeek","clone","days","tmpDaysToDisplay","day","add","push","date","isSame","isRecommended","getFormattedDate","toUpperCase","appointmentsOfWeek","appointmentsWithinWeek","getMaxAlternateLane","component"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,oBAAoBC,MAAM,CAAE,eAAgBP,EAAIQ,wBAAyB,CAACJ,EAAG,MAAM,CAACE,YAAY,sBAAsB,CAACF,EAAG,MAAM,CAACE,YAAY,iBAAiB,CAACN,EAAIS,GAAIT,EAAkB,gBAAE,SAASU,EAAQC,GAAG,OAAOP,EAAG,MAAM,CAACQ,IAAI,IAAMF,EAAQG,WAAWP,YAAY,mBAAmBQ,MAAQ,kBAAqBd,EAAIe,YACzaJ,GACG,kBAAoBX,EAAIgB,oBAAsB,KAAO,CAACZ,EAAG,MAAM,CAACE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/CV,KAAKe,qBAAuBL,EAAI,IAAMV,KAAKe,oBAAsB,GACnE,4BAAoBf,KAAKe,uBAI/BwD,SAAU,EAAF,GACH,eAAW,CAAC,wBAAuB,CACtCC,eAAc,WACZxE,KAAK6D,cAEL,IAAIY,EAAcC,EAAA,KAAKpC,OAEL,MAAfmC,IACDA,EAAc,MAGhB,IAAOnC,OAAOmC,GACd,IAAME,EAAQ,MAERC,EAAqB,IAAO5E,KAAKkD,cAAc2B,QACrD,IAAKD,EAAoB,MAAO,GAOhC,IALA,IAAME,EAAO,GACPC,EAAmBnC,EAAekB,oBACtC9D,KAAKe,qBAGEL,EAAI,EAAGA,EAAIqE,EAAkBrE,IAAK,CACzC,IAAMsE,EAAMJ,EAAmBC,QAAQI,IAAIvE,EAAG,QAE9CoE,EAAKI,KAAK,CACRtE,WAAYoE,EAAIG,OAChBhE,QAAS6D,EAAII,OAAOT,EAAO,OAC3B3B,aAAc,GACdqC,eAAe,EACfF,KAAMvC,EAAe0C,iBAAiBN,GACtC9D,QAAS8D,EAAI1B,OAAO,MAAM,GAAGiC,cAAgBP,EAAI1B,OAAO,MAAM,KAGlE,OAAOwB,GAETU,mBAAkB,WAChB,IAAMC,EAAyB7C,EAAe8C,oBAC5C1F,KAAKgD,aACLhD,KAAKe,oBACLf,KAAKqB,cACLrB,KAAKkD,cAEP,OAAOuC,OC3M8c,I,wBCQvdE,EAAY,eACd,EACA7F,EACA6C,GACA,EACA,KACA,WACA,MAIa,aAAAgD,E,6CCnBf,W","file":"js/chunk-2f5c265d.897fa1ff.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"calendar-weektime\",class:{ 'has-selected': _vm.selectedAppointmentId }},[_c('div',{staticClass:\"calendar-container\"},[_c('div',{staticClass:\"calendar-grid\"},[_vm._l((_vm.weeksToDisplay),function(weekday,i){return _c('div',{key:'w' + weekday.dayOfMonth,staticClass:\"calendar-weekday\",style:((\"grid-area: 1 / \" + (_vm.displayGrid(\n i\n )) + \" / auto / span \" + _vm.getOverlappingTimes + \";\"))},[_c('div',{staticClass:\"calendar-weekday\"},[_vm._v(_vm._s(weekday.weekDay))]),_c('div',{staticClass:\"calendar-weekday-number\",class:{ 'is-today': weekday.isToday }},[_vm._v(\" \"+_vm._s(weekday.dayOfMonth)+\" \")])])}),_vm._l((15),function(n){return _c('div',{key:'t' + n,staticClass:\"calendar-timeslot\",style:((\"grid-area: \" + n + \" / 1 / auto / auto;\"))},[_vm._v(\" \"+_vm._s(n + 6)+\" \")])}),_vm._l((14 * _vm.daysToDisplay),function(n){return _c('div',{key:(\"f-\" + n),staticClass:\"calendar-filler\"})}),_vm._l((_vm.appointmentsOfWeek),function(a){return _c('div',{key:'a' + a.id,staticClass:\"calendar-appointment\",class:{\n 'is-recommendation': a.isRecommendation,\n 'is-selected': a.id === _vm.selectedAppointmentId,\n },style:((\"\\n grid-column-start: \" + (_vm.columnStart(\n a.actualPosition,\n a.alternateLane\n )) + \";\\n grid-row-start: \" + (a.startHour - 5) + \";\\n grid-row-end: \" + (a.endHour - 5) + \";\\n \")),attrs:{\"data-dayofweek\":a.dayOfWeek},on:{\"click\":function($event){return _vm.$emit('change', a)}}},[_c('div',{staticClass:\"calendar-appointment-timewindow\",domProps:{\"innerHTML\":_vm._s(a.timeDisplay)}},[_c('br')]),(_vm.$i18n.locale !== 'pl')?_c('div',{staticClass:\"calendar-appointment-price\"},[_vm._v(\" \"+_vm._s(_vm._f(\"formatAmount\")(a.price,a.currency))+\" \")]):_vm._e(),_c('div',{staticClass:\"calendar-appointment-checked\"},[_c('svg',{attrs:{\"xmlns\":\"http://www.w3.org/2000/svg\",\"width\":\"24\",\"height\":\"24\",\"viewBox\":\"0 0 24 24\",\"svg-inline\":'',\"role\":'presentation',\"focusable\":'false',\"tabindex\":'-1'}},[_c('path',{attrs:{\"d\":\"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"}})])])])})],2)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport { mapGetters } from \"vuex\";\nimport { AppointmentWeekTime, Day } from \"@/components/modules/types/Calendar\";\nimport moment from \"moment\";\nimport i18n from \"@/i18n/index\";\nimport CalendarHelper from \"@/helpers/CalendarHelper\";\nconst calendarHelper = new CalendarHelper();\n\ninterface CalendarData {\n currentDate: string;\n}\n\ninterface ExtendedCalendarData extends CalendarData {\n temp: number;\n currentDay: string;\n daysToDisplay: number;\n}\n\nexport default Vue.extend({\n props: {\n appointments: calendarHelper.getAppointmentsPropValidator(),\n selectedWeek: {\n type: String,\n default: function () {\n return moment().format();\n },\n },\n selectedAppointmentId: {\n type: String,\n default: \"\",\n },\n },\n data(): ExtendedCalendarData {\n return {\n currentDate: moment().format(),\n temp: 0,\n currentDay: calendarHelper.getFirstAppointment(this.appointments),\n daysToDisplay: 7,\n };\n },\n methods: {\n displayGrid: function (i: number) {\n return (\n this.getOverlappingTimes * (i + 1) - (this.getOverlappingTimes - 2)\n );\n },\n columnStart: function (actualPosition: number, alternateLane: number) {\n this.temp = this.getOverlappingTimes;\n\n return (\n actualPosition * this.getOverlappingTimes +\n 2 +\n alternateLane -\n this.temp\n );\n },\n resetValues: function () {\n this.daysToDisplay = calendarHelper.calendarDisplayDays(\n this.getOverlappingTimes\n );\n },\n },\n mounted() {\n // calculate grid in dependency to timewindows for a day\n const calendargrid = document.getElementsByClassName(\n \"calendar-grid\"\n )[0] as HTMLElement;\n calendargrid.style.gridTemplateColumns = `40px repeat(${\n this.daysToDisplay * this.getOverlappingTimes\n }, minmax(0, 1fr))`;\n\n //set background slot filler\n for (let i = 0; i < this.daysToDisplay; i++) {\n //14 because of 14 time zones\n for (let j = 14 * i; j < 14 * i + 14; j++) {\n const calendarFiller = document.getElementsByClassName(\n \"calendar-filler\"\n )[j] as HTMLElement;\n calendarFiller.style.gridArea = `${j - 14 * i + 2} / ${\n this.getOverlappingTimes * (i + 1) - (this.getOverlappingTimes - 2)\n } / span 1 / span ${this.getOverlappingTimes}`;\n }\n }\n },\n computed: {\n ...mapGetters([\"getOverlappingTimes\"]),\n weeksToDisplay(): Day[] {\n this.resetValues();\n\n let localeValue = i18n.locale;\n\n if(localeValue == \"cz\"){\n localeValue = \"cs\";\n }\n\n moment.locale(localeValue);\n const today = moment();\n\n const firstDayOfThisWeek = moment(this.selectedWeek).clone();\n if (!firstDayOfThisWeek) return [];\n\n const days = [];\n const tmpDaysToDisplay = calendarHelper.calendarDisplayDays(\n this.getOverlappingTimes\n );\n\n for (let i = 0; i < tmpDaysToDisplay; i++) {\n const day = firstDayOfThisWeek.clone().add(i, \"days\");\n\n days.push({\n dayOfMonth: day.date(),\n isToday: day.isSame(today, \"day\"),\n appointments: [],\n isRecommended: false,\n date: calendarHelper.getFormattedDate(day),\n weekDay: day.format(\"dd\")[0].toUpperCase() + day.format(\"dd\")[1],\n });\n }\n return days;\n },\n appointmentsOfWeek(): AppointmentWeekTime[] {\n const appointmentsWithinWeek = calendarHelper.getMaxAlternateLane(\n this.appointments,\n this.getOverlappingTimes,\n this.daysToDisplay,\n this.selectedWeek\n );\n return appointmentsWithinWeek;\n },\n },\n});\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../node_modules/vue-svg-inline-loader/dist/index.min.js!./CalendarWeekTime.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../node_modules/vue-svg-inline-loader/dist/index.min.js!./CalendarWeekTime.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./CalendarWeekTime.vue?vue&type=template&id=00d7a561&scoped=true&\"\nimport script from \"./CalendarWeekTime.vue?vue&type=script&lang=ts&\"\nexport * from \"./CalendarWeekTime.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./CalendarWeekTime.vue?vue&type=style&index=0&id=00d7a561&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"00d7a561\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../node_modules/vue-svg-inline-loader/dist/index.min.js!./CalendarWeekTime.vue?vue&type=style&index=0&id=00d7a561&lang=scss&scoped=true&\""],"sourceRoot":""}