{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./StaticFiles/src/rendezvous/rendezvous-clinics.js","webpack:///./StaticFiles/src/index.js","webpack:///./StaticFiles/src/rendezvous/index.js","webpack:///./StaticFiles/src/rendezvous/rendezvous.js","webpack:///./StaticFiles/src/rendezvous/rendezvous-datepicker.js","webpack:///./StaticFiles/src/rendezvous/timeslots.mock.js","webpack:///./StaticFiles/src/table-tabs.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","Clinics","_classCallCheck","this","$loading","$","$results","RENDEZVOUS_SEARCH_URL","CLINICS_URL","searchClinics","onSuccess","e","_this","searchTerm","target","val","trim","length","html","ajax","type","url","contentType","data","JSON","stringify","beforeSend","show","success","complete","hide","response","_this2","isEmptyObject","parse","isArray","Table","map","item","guid","OnDutyClinicSeatGuid","text","OnDutyClinicSeatDisplayName","append","each","children","insertAfter","on","preventDefault","toggleClass","siblings","slideToggle","_rendezvous2","default","clinics","document","containerId","allowedDays","onDutyClinicSeatId","parseInt","guestID","window","app","Vue","el","date","summary","timeslots","selectedTimeslot","isLoading","hasErrors","submitMessage","computed","time","Slot","wsDate","_date$split","split","_date$split2","_slicedToArray","day","join","methods","onSelectDate","getTimeTable","onSelectTime","timeslot","scrollTo","body","scrollHeight","resetTimetable","innerHTML","onSubmitAppointment","dateStr","timeStr","result","$result","status","find","showModal","modal","hideModal","location","href","mounted","DatePicker","$this","$listItem","closest","$openedListItems","not","trigger","hasClass","addClass","slideDown","removeClass","slideUp","_ref","$el","totalMonths","setup","that","currentDate","Date","minDate","maxDate","getMonth","getFullYear","datepicker","numberOfMonths","beforeShowDay","aDate","dayIndex","findIndex","dateParser","cssClass","message","onSelect","defaultDate","regional","getDate","hour","slots","slot","slotText","attr","$toggles","first"],"mappings":"aACA,IAAAA,KAGA,SAAAC,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AU,qBACpCD,KAAM,QAAS9C,OAAQ,EAAG+C,SAAU,8BACpCD,KAAM,QAAS9C,OAAQ,EAAG+C,SAAU,8BACpCD,KAAM,QAAS9C,OAAQ,EAAG+C,SAAU,kBACpCD,KAAM,QAAS9C,OAAQ,EAAG+C,SAAU,oBAI1CH,KAAM,QACNC,QACMC,KAAM,QAAS9C,OAAQ,EAAG+C,SAAU,kBACpCD,KAAM,QAAS9C,OAAQ,EAAG+C,SAAU,qBACpCD,KAAM,QAAS9C,OAAQ,EAAG+C,SAAU,kBACpCD,KAAM,QAAS9C,OAAQ,EAAG+C,SAAU,8BACpCD,KAAM,QAAS9C,OAAQ,EAAG+C,SAAU,kBACpCD,KAAM,QAAS9C,OAAQ,EAAG+C,SAAU,kDCpBlD3I,EAAE,eACGyG,IAAI,qBACJmC,KAAK,mBAAmB,GACxBrG,KAAK,WACF,IACMsG,EADa7I,EAAEF,MACO0C,SAAS,MAErCqG,EAASC,QAAQlC,SAAS,UAC1BiC,EAASnG,GAAG,QAAS,SAAApC,GACDN,EAAEM,EAAEG,QAERkG,SAAS,YAIrBkC,EAAS/B,YAAY,UACrB9G,EAAEM,EAAEG,QAAQmG,SAAS","file":"main.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n","class Clinics {\r\n constructor() {\r\n this.$loading = $('.clinic-seat-form .loading');\r\n this.$results = $('#divSearchResults');\r\n this.RENDEZVOUS_SEARCH_URL =\r\n '/User-Services/Rendezvous/Clinic-Search/Rendezvous-Search?s=';\r\n this.CLINICS_URL =\r\n '/CMSWebParts/Nortech/OnlineRendezvous/OnlineRedezvous.asmx/GetClinics';\r\n\r\n this.searchClinics = this.searchClinics.bind(this);\r\n this.onSuccess = this.onSuccess.bind(this);\r\n }\r\n\r\n searchClinics(e) {\r\n const searchTerm = $(e.target)\r\n .val()\r\n .trim();\r\n\r\n if (searchTerm.length < 3) {\r\n this.$results.html('');\r\n return;\r\n }\r\n\r\n $.ajax({\r\n type: 'POST',\r\n url: this.CLINICS_URL,\r\n contentType: 'application/json',\r\n data: JSON.stringify({ searchTerm }),\r\n beforeSend: () => this.$loading.show(),\r\n success: this.onSuccess,\r\n complete: () => this.$loading.hide()\r\n });\r\n }\r\n\r\n onSuccess(response) {\r\n this.$results.html('');\r\n\r\n if ($.isEmptyObject(response) || $.isEmptyObject(response.d)) {\r\n return;\r\n }\r\n\r\n const data = JSON.parse(response.d);\r\n\r\n if ($.isArray(data) && $.isArray(data[0].Table)) {\r\n const items = data[0].Table;\r\n\r\n items.map(item => {\r\n const guid = item.OnDutyClinicSeatGuid;\r\n const text = item.OnDutyClinicSeatDisplayName;\r\n const classNames = 'list-group-item list-group-item-action';\r\n\r\n this.$results.append(\r\n `${text}`\r\n );\r\n });\r\n }\r\n }\r\n}\r\n\r\nexport default Clinics;","import './sass/main.scss';\r\nimport './rendezvous';\r\nimport './table-tabs';\r\nimport Clinics from './rendezvous/rendezvous-clinics';\r\n\r\n$('.main-nav .nav-item').each(function() {\r\n if ($(this).children('ul').length > 0) {\r\n $('').insertAfter(\r\n $(this).children('.nav-link')\r\n );\r\n }\r\n});\r\n$('.main-nav').on('click', '[class*=\"fa-angle-\"]', function(e) {\r\n e.preventDefault();\r\n $(this)\r\n .toggleClass('fa-angle-up fa-angle-down')\r\n .siblings('ul')\r\n .slideToggle();\r\n});\r\n\r\n\r\n\r\n\r\n","\r\nimport setupRendezvous from './rendezvous';\r\n\r\nimport Clinics from './rendezvous-clinics';\r\n\r\nif ($('#rendezvous-submission').length > 0) {\r\n setupRendezvous();\r\n}\r\n\r\nvar clinics = null;\r\n\r\n$(document).on('keyup', '#txtSearch', {}, initializeSearchClinics);\r\n\r\nfunction initializeSearchClinics() {\r\n if (clinics == null)\r\n {\r\n clinics = new Clinics();\r\n }\r\n $('#txtSearch').on('keyup', clinics.searchClinics);\r\n}\r\n","import DatePicker from './rendezvous-datepicker';\r\nimport timeslots from './timeslots.mock';\r\n\r\nconst containerId = '#rendezvous-submission';\r\n\r\nfunction setupRendezvous() {\r\n const allowedDays = JSON.parse($('#allowed-days').val());\r\n const onDutyClinicSeatId = parseInt($('#online-clinic-seat-id').val(), 10);\r\n const guestID = parseInt($('#GuestID').val(), 10);\r\n const $messageModal = $('#messageModal');\r\n const TIMETABLE_URL =\r\n '/CMSWebParts/Nortech/OnlineRendezvous/OnlineRedezvous.asmx/GetTimetable';\r\n const SUBMIT_RENDEZVOUS_URL =\r\n '/CMSWebParts/Nortech/OnlineRendezvous/OnlineRedezvous.asmx/SubmitRendezvous';\r\n\r\n window.app = new Vue({\r\n el: containerId,\r\n data: {\r\n date: '',\r\n summary: '',\r\n timeslots: [],\r\n selectedTimeslot: {},\r\n isLoading: false,\r\n hasErrors: false,\r\n submitMessage: ''\r\n },\r\n computed: {\r\n time: function() {\r\n return this.selectedTimeslot.Slot;\r\n },\r\n wsDate() {\r\n const [day, month, year] = this.date.split('/');\r\n const date = [month, day, year].join('-');\r\n\r\n return date;\r\n }\r\n },\r\n methods: {\r\n onSelectDate: function(date) {\r\n this.date = date;\r\n this.getTimeTable();\r\n },\r\n onSelectTime: function(e, timeslot) {\r\n e.preventDefault();\r\n this.selectedTimeslot = timeslot;\r\n window.scrollTo(0,document.body.scrollHeight);\r\n },\r\n getTimeTable: function() { \r\n this.resetTimetable();\r\n const data = {\r\n date: this.wsDate,\r\n onDutyClinicSeatId,\r\n guestID\r\n };\r\n\r\n $.ajax({\r\n type: 'GET',\r\n url: TIMETABLE_URL,\r\n // contentType: 'application/json',\r\n data,\r\n beforeSend: () => (this.isLoading = true),\r\n success: timeslots => {\r\n try {\r\n this.timeslots = JSON.parse(\r\n timeslots.children[0].innerHTML\r\n );\r\n } catch (e) {\r\n this.timeslots = [];\r\n }\r\n },\r\n complete: () => (this.isLoading = false)\r\n });\r\n },\r\n onSubmitAppointment: function() {\r\n const data = {\r\n dateStr: this.wsDate,\r\n timeStr: this.time,\r\n onDutyClinicSeatId,\r\n guestID\r\n };\r\n\r\n // console.log('submit rendezvous request data: ', data);\r\n\r\n $.ajax({\r\n type: 'POST',\r\n url: SUBMIT_RENDEZVOUS_URL,\r\n data,\r\n beforeSend: () => (this.isLoading = true),\r\n success: result => {\r\n const $result = $(result.children[0]);\r\n const status = $result.find('RendezvousStatus').text();\r\n this.submitMessage = $result.find('Message').text();\r\n\r\n if (status !== 'Success') {\r\n this.hasErrors = true;\r\n }\r\n\r\n this.showModal();\r\n\r\n // window.result = result;\r\n // console.log(\r\n // 'submit rendezvous response: ',\r\n // $result.html()\r\n // );\r\n },\r\n complete: () => (this.isLoading = false)\r\n });\r\n },\r\n resetTimetable: function() {\r\n this.time = '';\r\n this.timeslots = [];\r\n this.selectedTimeslot = '';\r\n this.hasErrors = false;\r\n this.submitMessage = '';\r\n },\r\n showModal: function(e) {\r\n e && e.preventDefault();\r\n $('#messageModal').modal('show');\r\n },\r\n hideModal: function(e) {\r\n e && e.preventDefault();\r\n\r\n if (this.hasErrors) {\r\n $('#messageModal').modal('hide');\r\n this.getTimeTable();\r\n } else {\r\n window.location.href =\r\n '/User-Services/Rendezvous/Rendezvous-History';\r\n }\r\n }\r\n },\r\n mounted: function() {\r\n new DatePicker({\r\n allowedDays,\r\n onSelectDate: this.onSelectDate\r\n });\r\n setupEvents();\r\n }\r\n });\r\n}\r\n\r\nfunction setupEvents() {\r\n $(containerId)\r\n .on('click', '.time-list .btn-toggle', e => {\r\n e.preventDefault();\r\n const $this = $(e.target);\r\n const $listItem = $this.closest('.list-item');\r\n const $openedListItems = $('.time-list .list-item--open').not(\r\n $listItem\r\n );\r\n\r\n $openedListItems.trigger('close');\r\n\r\n $listItem.hasClass('list-item--open')\r\n ? $listItem.trigger('close')\r\n : $listItem.trigger('open');\r\n })\r\n .on('open', '.time-list .list-item', e => {\r\n $(e.target)\r\n .addClass('list-item--open')\r\n .find('.list-item-main')\r\n .slideDown();\r\n })\r\n .on('close', '.time-list .list-item', e => {\r\n $(e.target)\r\n .removeClass('list-item--open')\r\n .find('.list-item-main')\r\n .slideUp();\r\n });\r\n}\r\n\r\n\r\nexport default setupRendezvous;\r\n","class DatePicker {\r\n constructor({ allowedDays, onSelectDate }) {\r\n this.$el = $('#datepicker');\r\n this.totalMonths = 3;\r\n this.allowedDays = allowedDays;\r\n this.onSelectDate = onSelectDate;\r\n this.setup();\r\n }\r\n\r\n setup() {\r\n var that = this;\r\n\r\n const currentDate = new Date();\r\n const minDate = currentDate;\r\n /* Add 3 months but set day to 0, which translates to 'whole next month'.\r\n * If it's December (month === 11) change year and set month to 1 (February) and day to 0.\r\n */\r\n const maxDate =\r\n currentDate.getMonth() !== 11\r\n ? new Date(\r\n currentDate.getFullYear(),\r\n currentDate.getMonth() + this.totalMonths,\r\n 0\r\n )\r\n : new Date(currentDate.getFullYear() + 1, 1, 0);\r\n\r\n this.$el.datepicker({\r\n numberOfMonths: this.totalMonths,\r\n beforeShowDay: date => (function(aDate) {\r\n var dayIndex = that.allowedDays.findIndex(d => d.day === that.dateParser(aDate));\r\n var day = null;\r\n if (dayIndex > -1) {\r\n day = that.allowedDays[dayIndex];\r\n\r\n return [\r\n true,\r\n day.cssClass,\r\n day.message\r\n ];\r\n }\r\n \r\n return [\r\n false,\r\n ''\r\n ];\r\n })(date),\r\n onSelect: this.onSelectDate,\r\n defaultDate: currentDate,\r\n minDate,\r\n maxDate\r\n });\r\n\r\n this.$el.datepicker($.datepicker.regional['el']);\r\n }\r\n\r\n // return date in format of type '22-1-2019'\r\n dateParser(date) {\r\n const day = date.getDate();\r\n const month = date.getMonth() + 1;\r\n const year = date.getFullYear();\r\n const formattedDate = `${day}-${month}-${year}`;\r\n\r\n return formattedDate;\r\n }\r\n}\r\n\r\nexport default DatePicker;\r\n","export default [\r\n {\r\n hour: '08:00',\r\n slots: [\r\n { slot: '08:00', status: 1, slotText: 'Διαθέσιμη ώρα' },\r\n { slot: '08:03', status: 2, slotText: 'Κατειλημμένη ώρα' },\r\n { slot: '08:10', status: 3, slotText: 'Κατειλημμένη από εσάς ώρα' },\r\n { slot: '08:15', status: 3, slotText: 'Κατειλημμένη από εσάς ώρα' },\r\n { slot: '08:40', status: 1, slotText: 'Διαθέσιμη ώρα' },\r\n { slot: '08:55', status: 1, slotText: 'Διαθέσιμη ώρα' }\r\n ]\r\n },\r\n {\r\n hour: '09:00',\r\n slots: [\r\n { slot: '09:00', status: 1, slotText: 'Διαθέσιμη ώρα' },\r\n { slot: '09:03', status: 2, slotText: 'Κατειλημμένη ώρα' },\r\n { slot: '09:10', status: 1, slotText: 'Διαθέσιμη ώρα' },\r\n { slot: '09:15', status: 3, slotText: 'Κατειλημμένη από εσάς ώρα' },\r\n { slot: '09:40', status: 1, slotText: 'Διαθέσιμη ώρα' },\r\n { slot: '09:55', status: 1, slotText: 'Διαθέσιμη ώρα' }\r\n ]\r\n }\r\n];\r\n","$('.table-tabs')\r\n .not('[table-tabs-init]')\r\n .attr('table-tabs-init', true)\r\n .each(function() {\r\n const $tableTabs = $(this);\r\n const $toggles = $tableTabs.children('dt');\r\n\r\n $toggles.first().addClass('active');\r\n $toggles.on('click', e => {\r\n const $toggle = $(e.target);\r\n\r\n if ($toggle.hasClass('active')) {\r\n return;\r\n }\r\n\r\n $toggles.removeClass('active');\r\n $(e.target).addClass('active');\r\n });\r\n });\r\n"],"sourceRoot":""}