{"version":3,"sources":["webpack:///./src/components/modules/CalendarWeek.vue?c319","webpack:///./src/components/modules/CalendarWeek.vue","webpack:///./src/components/modules/CalendarWeek.vue?677d","webpack:///./src/components/modules/CalendarWeek.vue?4128","webpack:///./src/components/modules/CalendarWeek.vue?a8a9"],"names":["render","_vm","this","_h","$createElement","_c","_self","appointmentError","_e","staticClass","class","selectedAppointmentId","_l","day","key","date","_v","_s","display","$t","appointments","appointment","id","isRecommendation","on","$event","$emit","timeslot","_f","price","currency","attrs","staticRenderFns","calendarHelper","CalendarHelper","extend","props","getAppointmentsPropValidator","selectedWeek","type","String","default","format","data","currentDate","computed","calendarToDisplay","today","$moment","locale","i18n","firstDayOfThisWeek","clone","days","i","add","appointmentsForThisDay","forEach","isSame","start","end","getClock","push","dayOfMonth","isToday","isRecommended","some","getFormattedDate","displayDateFormat","methods","component"],"mappings":"8IAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAASF,EAAIM,iBAG8uBN,EAAIO,KAHhuBH,EAAG,MAAM,CAACI,YAAY,WAAWC,MAAM,CAAE,eAAgBT,EAAIU,wBAAyBV,EAAIW,GAAIX,EAAqB,mBAAE,SAASY,GAAK,OAAOR,EAAG,MAAM,CAACS,IAAID,EAAIE,KAAKN,YAAY,gBAAgB,CAACJ,EAAG,MAAM,CAACI,YAAY,qBAAqB,CAACJ,EAAG,MAAM,CAACI,YAAY,sBAAsB,CAACR,EAAIe,GAAG,IAAIf,EAAIgB,GAAGJ,EAAIK,SAAS,KAAML,EAAiB,cAAER,EAAG,MAAM,CAACI,YAAY,+BAA+B,CAACR,EAAIe,GAAG,IAAIf,EAAIgB,GAAGhB,EAAIkB,GAAG,+BAA+B,OAAOlB,EAAIO,SAASH,EAAG,MAAM,CAACI,YAAY,qBAAqB,CAACJ,EAAG,MAAM,CAACI,YAAY,sBAAsB,CAAEI,EAAIO,aAAmB,OAAEf,E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,OAAOC,EAAA,KAAKD,QACnB,IAAME,EAAqBjD,KAAK8C,QAAQ9C,KAAKoC,cAC1Cc,QACH,IAAKD,EAAoB,MAAO,GAEhC,IADA,IAAME,EAAO,GAAG,WACPC,GACP,IAAMzC,EAAMsC,EAAmBC,QAAQG,IAAID,EAAG,QAExCE,EAA6C,GACnD,EAAKpC,aAAaqC,SAAQ,SAACpC,GACrBR,EAAI6C,OAAO,EAAKV,QAAQ3B,EAAYsC,OAAQ,SAC9CtC,EAAYM,SACV,EAAKqB,QAAQ3B,EAAYsC,OAAOjB,OAAO,SACvC,MACA,EAAKM,QAAQ3B,EAAYuC,KAAKlB,OAAO,SACrC,EAAKmB,WACPL,EAAuBM,KAAKzC,OAIhCgC,EAAKS,KAAK,CACRC,WAAYlD,EAAIE,OAChBiD,QAASnD,EAAI6C,OAAOX,EAAO,OAC3B3B,aAAcoC,EACdS,cAAeT,EAAuBU,MACpC,SAAC7C,GAAW,OAAKA,EAAYE,oBAE/BR,KAAMkB,EAAekC,iBAAiBtD,GACtCK,QAASL,EAAI6B,OAAO,QAAD,OAAST,EAAemC,uBAvBtCd,EAAI,EAAGA,EAAI,EAAGA,IAAK,EAAnBA,GA2BT,OAAOD,KAGXgB,QAAS,CACPR,SAAQ,WACN,MAAoB,OAAhBX,EAAA,KAAKD,OACA,GAEF/C,KAAKiB,GAAG,qBC/Hkc,I,wBCQndmD,EAAY,eACd,EACAtE,EACAgC,GACA,EACA,KACA,WACA,MAIa,aAAAsC,E,2CCnBf","file":"js/chunk-14c37521.eb93fe54.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.appointmentError)?_c('div',{staticClass:\"calendar\",class:{ 'has-selected': _vm.selectedAppointmentId }},_vm._l((_vm.calendarToDisplay),function(day){return _c('div',{key:day.date,staticClass:\"calendar-day\"},[_c('div',{staticClass:\"calendar-day-head\"},[_c('div',{staticClass:\"calendar-container\"},[_vm._v(\" \"+_vm._s(day.display)+\" \"),(day.isRecommended)?_c('div',{staticClass:\"calendar-day-recommendation\"},[_vm._v(\" \"+_vm._s(_vm.$t(\"appointment.recommendation\"))+\" \")]):_vm._e()])]),_c('div',{staticClass:\"calendar-day-body\"},[_c('div',{staticClass:\"calendar-container\"},[(day.appointments.length)?_c('div',{staticClass:\"calendar-appointment-available\"},_vm._l((day.appointments),function(appointment){return _c('div',{key:appointment.id,staticClass:\"calendar-appointment\",class:{\n 'is-recommendation': appointment.isRecommendation,\n 'is-selected': appointment.id === _vm.selectedAppointmentId,\n },on:{\"click\":function($event){return _vm.$emit('change', appointment)}}},[_c('div',{staticClass:\"calendar-appointment-timewindow\"},[_vm._v(\" \"+_vm._s(appointment.timeslot)+\" \")]),_c('div',{staticClass:\"calendar-appointment-price\"},[_vm._v(\" \"+_vm._s(_vm._f(\"formatAmount\")(appointment.price,appointment.currency))+\" \")]),_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\"}})])])])}),0):_c('div',{staticClass:\"calendar-appointment-unavailable\"},[_vm._v(\" \"+_vm._s(_vm.$t(\"appointment.noAppointments\"))+\" \")])])])])}),0):_vm._e()}\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\nimport Vue from \"vue\";\nimport moment from \"moment\";\nimport { Appointment, Day } from \"@/components/modules/types/Calendar\";\nimport { mapState } from \"vuex\";\nimport i18n from \"@/i18n/index\";\nimport CalendarHelper from \"@/helpers/CalendarHelper\";\nconst calendarHelper = new CalendarHelper();\n\ninterface CalendarData {\n currentDate: string;\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(): CalendarData {\n return {\n currentDate: moment().format(),\n };\n },\n computed: {\n ...mapState([\"appointmentError\"]),\n calendarToDisplay(): Array {\n const today = this.$moment();\n moment.locale(i18n.locale);\n const firstDayOfThisWeek = this.$moment(this.selectedWeek)\n .clone();\n if (!firstDayOfThisWeek) return [];\n const days = [];\n for (let i = 0; i < 7; i++) {\n const day = firstDayOfThisWeek.clone().add(i, \"days\");\n\n const appointmentsForThisDay: Array = [];\n this.appointments.forEach((appointment: Appointment) => {\n if (day.isSame(this.$moment(appointment.start), \"day\")) {\n appointment.timeslot =\n this.$moment(appointment.start).format(\"HH:mm\") +\n \" - \" +\n this.$moment(appointment.end).format(\"HH:mm\") +\n this.getClock();\n appointmentsForThisDay.push(appointment);\n }\n });\n\n days.push({\n dayOfMonth: day.date(),\n isToday: day.isSame(today, \"day\"),\n appointments: appointmentsForThisDay,\n isRecommended: appointmentsForThisDay.some(\n (appointment) => appointment.isRecommendation\n ),\n date: calendarHelper.getFormattedDate(day),\n display: day.format(`ddd, ${calendarHelper.displayDateFormat}`),\n });\n }\n\n return days;\n },\n },\n methods: {\n getClock() {\n if (i18n.locale === \"pl\") {\n return \"\";\n }\n return this.$t(\"general.clock\");\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!./CalendarWeek.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!./CalendarWeek.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./CalendarWeek.vue?vue&type=template&id=0bb47cee&scoped=true&\"\nimport script from \"./CalendarWeek.vue?vue&type=script&lang=ts&\"\nexport * from \"./CalendarWeek.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./CalendarWeek.vue?vue&type=style&index=0&id=0bb47cee&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 \"0bb47cee\",\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!./CalendarWeek.vue?vue&type=style&index=0&id=0bb47cee&lang=scss&scoped=true&\""],"sourceRoot":""}