(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{"3AME":function(t,e,r){"use strict";r("iGcO")},Ym5q:function(t,e,r){"use strict";r.r(e);var n=r("85lN"),a=r("Y8XJ"),o=r("L2JU"),i=r("uXhm");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){s=!0,o=t},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function f(t,e,r,n,a,o,i){try{var s=t[o](i),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,a)}function v(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var o=t.apply(e,r);function i(t){f(o,n,a,i,s,"next",t)}function s(t){f(o,n,a,i,s,"throw",t)}i(void 0)}))}}function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e0&&void 0!==s[0]?s[0]:1,r="?",this.filter)this.filter.hasOwnProperty(o)&&(r+="".concat(o,"=").concat(this.filter[o],"&"));return r+=e?"page=".concat(e):"page=1",t.next=6,a.a.get(n.a.listOpertor(r));case 6:(i=t.sent)&&200==i.status?(this.items=i.data.data.data,this.currentPage=i.data.data.current_page,this.lastPage=i.data.data.last_page):this.$router.push({name:"Dashboard"});case 8:case"end":return t.stop()}}),t,this)}))),function(){return b.apply(this,arguments)}),changeStatus:(g=v(u().mark((function t(e){var r,o,i,s;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.a.post(n.a.changeStatusUser(e));case 2:if((r=t.sent)&&200==r.status){o=l(this.items);try{for(o.s();!(i=o.n()).done;)(s=i.value).id==e&&(s.status=r.data.data.status)}catch(t){o.e(t)}finally{o.f()}}else this.$router.push({name:"Dashboard"});case 4:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},Object(o.d)("modal",["changeCurrentModal"])),{},{changeRoleModal:function(t){this.changeCurrentModal({modal:"modal-user-role",properties:{user:t}})},remove:(y=v(u().mark((function t(e){var r,o;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.a.delete(n.a.deleteUser(e));case 2:if((r=t.sent)&&200==r.status)for(o in this.items)this.items.hasOwnProperty(o)&&this.items[o].id==e&&this.items.splice(o,1);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)}),fillSelectFilter:(m=v(u().mark((function t(){var e;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.a.get(n.a.listFilterItemsTestResult);case 2:(e=t.sent)&&200==e.status&&(this.medicalCenters=e.data.data.MedicalCenters);case 4:case"end":return t.stop()}}),t,this)}))),function(){return m.apply(this,arguments)})}),computed:h({},Object(o.c)("modal",["getModalResult"])),watch:{getModalResult:function(t){var e,r=l(this.items);try{for(r.s();!(e=r.n()).done;){var n=e.value;n.id==t.id&&(n.roles=t.roles)}}catch(t){r.e(t)}finally{r.f()}},currentPage:function(t){this.load(t)}}},x=(r("3AME"),r("KHd+")),w=Object(x.a)(_,(function(){var t=this,e=t._self._c;return e("v-container",{attrs:{"grid-list-xs":""}},[e("material-card",{attrs:{color:"black",title:"Member List"}},[e("v-layout",{staticClass:"px-5 mb-3",attrs:{"align-center":"","justify-center":"",wrap:""}},[e("v-flex",{staticClass:"WM-FlexCenter",attrs:{xs12:"",md3:"",sm3:""}},[e("v-icon",{staticClass:"fa fa-align-left mr-2 WM-Margin-B-8"}),t._v(" "),e("v-text-field",{staticClass:"py-3 pr-3",attrs:{color:"black",name:"name",label:"Name"},model:{value:t.filter.name,callback:function(e){t.$set(t.filter,"name",e)},expression:"filter.name"}})],1),t._v(" "),e("v-flex",{staticClass:"WM-FlexCenter pl-3",attrs:{xs12:"",md3:"",sm3:""}},[e("v-icon",{staticClass:"fa fa-hospital-o mr-2 WM-Margin-B-8"}),t._v(" "),e("v-autocomplete",{staticClass:"py-3 pr-3",attrs:{label:"Hospital",color:"black",items:t.medicalCenters,"item-text":"name","item-value":"id"},model:{value:t.filter.medicalCenter_id,callback:function(e){t.$set(t.filter,"medicalCenter_id",e)},expression:"filter.medicalCenter_id"}})],1),t._v(" "),e("v-flex",{staticClass:"WM-FlexCenter pl-3",attrs:{xs12:"",md3:"",sm3:""}},[e("v-icon",{staticClass:"fa fa-phone mr-2 WM-Margin-B-8"}),t._v(" "),e("v-text-field",{staticClass:"py-3 pr-3",attrs:{color:"black",name:"CellPhone",label:"CellPhone"},model:{value:t.filter.cell_number,callback:function(e){t.$set(t.filter,"cell_number",e)},expression:"filter.cell_number"}})],1),t._v(" "),e("v-flex",{staticClass:"WM-FlexCenter pl-3",attrs:{xs12:"",md3:"",sm3:""}},[e("v-icon",{staticClass:"fa fa-check mr-2 WM-Margin-B-8"}),t._v(" "),e("v-select",{staticClass:"py-3 pr-3",attrs:{color:"black",name:"role",label:"Role",items:t.roles},model:{value:t.filter.role,callback:function(e){t.$set(t.filter,"role",e)},expression:"filter.role"}})],1)],1),t._v(" "),e("v-layout",{staticClass:"px-5 mb-3"},[e("v-flex",{staticClass:"WM-FlexCenter",attrs:{xs12:"",sm12:"",md2:""}},[e("v-icon",{staticClass:"far fa-calendar-alt mr-2"}),t._v(" "),e("v-menu",{attrs:{lazy:"","close-on-content-click":!0,transition:"v-scale-transition","offset-y":""},model:{value:t.fromMenu,callback:function(e){t.fromMenu=e},expression:"fromMenu"}},[e("v-text-field",{attrs:{slot:"activator",required:"",label:"FromDate",color:"black"},slot:"activator",model:{value:t.filter.fromPicker,callback:function(e){t.$set(t.filter,"fromPicker",e)},expression:"filter.fromPicker"}}),t._v(" "),e("v-date-picker",{attrs:{color:"pink","no-title":"","date-format":function(t){return new Date(t).toDateString()}},model:{value:t.filter.fromPicker,callback:function(e){t.$set(t.filter,"fromPicker",e)},expression:"filter.fromPicker"}})],1)],1),t._v(" "),e("v-flex",{staticClass:"WM-FlexCenter pl-3",attrs:{xs12:"",sm12:"",md2:""}},[e("v-icon",{staticClass:"far fa-calendar-alt mr-2"}),t._v(" "),e("v-menu",{attrs:{lazy:"","close-on-content-click":!0,transition:"v-scale-transition","offset-y":""},model:{value:t.upToMenu,callback:function(e){t.upToMenu=e},expression:"upToMenu"}},[e("v-text-field",{attrs:{slot:"activator",required:"",label:"UpToDate",color:"black"},slot:"activator",model:{value:t.filter.upToPicker,callback:function(e){t.$set(t.filter,"upToPicker",e)},expression:"filter.upToPicker"}}),t._v(" "),e("v-date-picker",{attrs:{color:"pink","no-title":"","date-format":function(t){return new Date(t).toDateString()}},model:{value:t.filter.upToPicker,callback:function(e){t.$set(t.filter,"upToPicker",e)},expression:"filter.upToPicker"}})],1)],1),t._v(" "),e("v-flex",{staticClass:"WM-Align-R ml-4",attrs:{wrap:"",xs12:"",md2:"",sm12:""}},[e("v-btn",{staticClass:"WM-CyanBlueGradient-BG",staticStyle:{padding:"10px 60px"},on:{click:function(e){return t.load(void 0)}}},[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-search")]),t._v(" "),e("span",{staticClass:"white--text"},[t._v("Filter")])],1)],1)],1),t._v(" "),e("v-layout",{staticClass:"px-4 my-3"},[e("v-divider")],1),t._v(" "),e("v-layout",{staticClass:"px-5 my-2",attrs:{"align-center":"","justify-center":"",wrap:""}},[e("v-flex",{attrs:{xs12:"",md12:"",sm12:""}},[e("v-data-table",{attrs:{headers:t.headers,items:t.items,"hide-actions":""},scopedSlots:t._u([{key:"headerCell",fn:function(r){var n=r.header;return[e("span",{staticClass:"subheading font-weight-light text-white text--darken-3",domProps:{textContent:t._s(n.text)}})]}},{key:"items",fn:function(r){var n=r.item;return[e("td",{staticClass:"headline font-weight-light"},[t._v("\n "+t._s(n.name)+"\n "),e("br"),t._v(" "),e("span",{staticClass:"WM-Font-14"},[t._v(t._s(n.cell_number))])]),t._v(" "),e("td",{staticClass:"title font-weight-light"},[t._v(t._s(n.created_at))]),t._v(" "),e("td",{staticClass:"title font-weight-light"},t._l(n.roles,(function(r,n){return e("span",{key:n},[t._v(t._s(r.name))])})),0),t._v(" "),e("td",{staticClass:"title font-weight-light"},[t._v(t._s(n.medical_center.name))]),t._v(" "),e("td",{staticClass:"text-xs-right FlexBtn"},[e("v-tooltip",{attrs:{bottom:"","open-on-hover":""},scopedSlots:t._u([{key:"activator",fn:function(r){var a=r.on,o=r.attrs;return[t.$hasRole("Admin|Supervisor")?e("v-btn",t._g(t._b({staticClass:"mr-2 WM-ActionButton",attrs:{color:"Active"==n.status?"green":"red"},on:{click:function(e){return t.changeStatus(n.id)}}},"v-btn",o,!1),a),["Active"==n.status?[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fa fa-pause")]),t._v(" "),"Active"==n.status?e("span",[t._v("Suspended")]):t._e()]:[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fa fa-pause")]),t._v(" "),e("span",[t._v("Active")])]],2):t._e()]}}],null,!0)},[t._v(" "),"Active"==n.status?e("span",[t._v("Suspended")]):e("span",[t._v("Active")])]),t._v(" "),e("v-tooltip",{attrs:{bottom:"","open-on-hover":""},scopedSlots:t._u([{key:"activator",fn:function(r){var a=r.on,o=r.attrs;return[t.$hasRole("Admin")?e("v-btn",t._g(t._b({staticClass:"mr-2 WM-ActionButton",attrs:{color:"orange darken-1"},on:{click:function(e){return t.changeRoleModal(n)}}},"v-btn",o,!1),a),[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-user-tag")]),t._v(" "),e("span",[t._v("Role")])],1):t._e()]}}],null,!0)},[t._v(" "),e("span",[t._v("Role")])]),t._v(" "),e("v-tooltip",{attrs:{bottom:"","open-on-hover":""},scopedSlots:t._u([{key:"activator",fn:function(r){var a=r.on,o=r.attrs;return[t.$hasRole("Admin")?e("v-btn",t._g(t._b({staticClass:"WM-ActionButton",attrs:{color:"pink"},on:{click:function(e){return t.remove(n.id)}}},"v-btn",o,!1),a),[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-times")]),t._v(" "),e("span",[t._v("Remove")])],1):t._e()]}}],null,!0)},[t._v(" "),e("span",[t._v("Remove")])])],1)]}}])})],1)],1),t._v(" "),e("v-layout",{staticClass:"px-4 my-3"},[e("v-divider")],1),t._v(" "),t.lastPage>1?e("div",{staticClass:"text-xs-center mt-2"},[e("v-pagination",{attrs:{color:"black",length:t.lastPage,"total-visible":6},model:{value:t.currentPage,callback:function(e){t.currentPage=e},expression:"currentPage"}})],1):t._e(),t._v(" "),e("v-layout",{staticClass:"mt-3",attrs:{row:"",wrap:"","align-center":"","justify-center":""}},[e("router-link",{attrs:{to:{name:"Dashboard"}}},[e("v-btn",{staticClass:"WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5"},[e("v-icon",{staticClass:"black--text mr-2 caption"},[t._v("fas fa-chevron-left")]),t._v(" "),e("span",{staticClass:"black--text"},[t._v("Back")])],1)],1)],1)],1)],1)}),[],!1,null,null,null);e.default=w.exports},b0tm:function(t,e,r){(t.exports=r("JPst")(!1)).push([t.i,"\n.v-btn--floating {\r\n padding: 0!important;\n}\n.theme--light.v-btn.v-btn--flat {\r\n color: rgba(0,0,0,.87)!important;\n}\n.v-btn--floating, .v-btn--icon:before {\r\n border-radius: 50%!important;\n}\r\n",""])},iGcO:function(t,e,r){var n=r("b0tm");"string"==typeof n&&(n=[[t.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r("aET+")(n,a);n.locals&&(t.exports=n.locals)}}]);