Files
cssd-back/public/js/vue/chunks/35.457a7569863337739ad3.js
T
2023-09-23 02:29:26 -07:00

1 line
15 KiB
JavaScript
Vendored

(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{"CN/x":function(t,e,r){"use strict";r.r(e);var n=r("Y8XJ"),a=r("L2JU"),o=r("85lN"),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 c(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 l(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 l(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 l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(){u=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),s=new M(n||[]);return a(i,"_invoke",{value:L(t,r,s)}),i}function v(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",d="executing",m="completed",y={};function g(){}function b(){}function w(){}var x={};f(x,i,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(N([])));O&&O!==r&&n.call(O,i)&&(x=O);var C=w.prototype=g.prototype=Object.create(x);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(a,o,i,c){var l=v(t[a],t,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==s(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,a){r(t,n,e,a)}))}return o=o?o.then(a,a):a()}})}function L(e,r,n){var a=p;return function(o,i){if(a===d)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:t,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var c=S(s,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var l=v(e,r,n);if("normal"===l.type){if(a=n.done?m:"suspendedYield",l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=m,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,a=e.iterator[n];if(a===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=v(a,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,o=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(s(e)+" is not iterable")}return b.prototype=w,a(C,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:b,configurable:!0}),b.displayName=f(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},k(j.prototype),f(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new j(h(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(C),f(C,l,"Generator"),f(C,i,(function(){return this})),f(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function a(n,a){return s.type="throw",s.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(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;P(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(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),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,a)}function h(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 v(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 p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach((function(e){d(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function d(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===s(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var m,y,g,b={data:function(){return{headers:[{sortable:!0,text:"Operator Name",value:"name"},{sortable:!1,text:"Role",value:"role"},{sortable:!1,text:"Number",value:"number"},{sortable:!1,text:"Status",value:"status"},{sortable:!1,text:"Action",value:"action",align:"right"}],filter:{name:"",cell_number:"",role:""},items:[],name:"",roles:i.a}},created:function(){this.$route.params.medicalCenter&&this.load()},methods:p(p({load:(g=h(u().mark((function t(){var e,r,a,i;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(a in e=this.$route.params.medicalCenter,r="?",this.filter)this.filter.hasOwnProperty(a)&&(r+="".concat(a,"=").concat(this.filter[a],"&"));return t.next=5,n.a.get(o.a.listOpertorMedicalCenter(e,r));case 5:(i=t.sent)&&200==i.status?(this.items=i.data.data.users,this.name=i.data.data.name):this.$router.push({name:"Dashboard"});case 7:case"end":return t.stop()}}),t,this)}))),function(){return g.apply(this,arguments)}),changeStatus:(y=h(u().mark((function t(e){var r,a,i,s;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.a.post(o.a.changeStatusUser(e));case 2:if((r=t.sent)&&200==r.status){a=c(this.items);try{for(a.s();!(i=a.n()).done;)(s=i.value).id==e&&(s.status=r.data.data.status)}catch(t){a.e(t)}finally{a.f()}}else this.$router.push({name:"Dashboard"});case 4:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},Object(a.d)("modal",["changeCurrentModal"])),{},{changeRoleModal:function(t){this.changeCurrentModal({modal:"modal-user-role",properties:{user:t}})},remove:(m=h(u().mark((function t(e){var r,a;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.a.delete(o.a.deleteUser(e));case 2:if((r=t.sent)&&200==r.status)for(a in this.items)this.items.hasOwnProperty(a)&&this.items[a].id==e&&this.items.splice(a,1);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})}),computed:p({},Object(a.c)("modal",["getModalResult"])),watch:{getModalResult:function(t){var e,r=c(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()}}}},w=r("KHd+"),x=Object(w.a)(b,(function(){var t=this,e=t._self._c;return e("v-container",{attrs:{"grid-list-xs":""}},[e("material-card",{attrs:{color:"black",title:"Operator List ".concat(t.name),text:""}},[e("v-layout",{staticClass:"px-5 mb-3",attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs12:"",md3:"",xs3:""}},[e("v-text-field",{staticClass:"pa-2",attrs:{name:"Name",label:"Name",color:"black"},model:{value:t.filter.name,callback:function(e){t.$set(t.filter,"name",e)},expression:"filter.name"}})],1),t._v(" "),e("v-flex",{attrs:{xs12:"",md3:"",xs3:""}},[e("v-text-field",{staticClass:"pa-2",attrs:{name:"cell_number",label:"Cell Number",color:"black"},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",{attrs:{xs12:"",md2:"",xs3:""}},[e("v-select",{staticClass:"pa-2",attrs:{items:t.roles,name:"roles",label:"Roles",color:"black"},model:{value:t.filter.role,callback:function(e){t.$set(t.filter,"role",e)},expression:"filter.role"}})],1),t._v(" "),e("v-flex",{staticClass:"text-xs-right",attrs:{xs12:"",md2:"",sm2:""}},[e("v-btn",{staticClass:"WM-CyanBlueGradient-BG",staticStyle:{padding:"10px 60px"},on:{click:t.load}},[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),t._v(" "),e("v-spacer"),t._v(" "),e("v-flex",{staticClass:"text-xs-right",attrs:{xs12:"",md2:"",sm2:""}},[e("router-link",{attrs:{to:"/add-operator/".concat(t.$route.params.medicalCenter)}},[e("v-btn",{staticClass:"WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"},[e("v-icon",{staticClass:"black--text mr-2 caption"},[t._v("fas fa-plus")]),t._v(" "),e("span",{staticClass:"black--text"},[t._v("Add")])],1)],1)],1)],1),t._v(" "),e("v-layout",{staticClass:"px-5 mt-3",attrs:{row:"","align-center":"","justify-center":"",wrap:""}},[e("v-flex",{attrs:{md12:""}},[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(t._s(n.name))]),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.cell_number))]),t._v(" "),e("td",{staticClass:"title font-weight-light"},[t._v(t._s(n.status))]),t._v(" "),e("td",{staticClass:"text-xs-right"},[e("v-btn",{staticClass:"mr-2 WM-ActionButton",attrs:{color:"Active"==n.status?"red":"green"},on:{click:function(e){return t.changeStatus(n.id)}}},["Active"==n.status?[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-user-tag")]),t._v(" "),"Active"==n.status?e("span",[t._v("Suspended")]):t._e()]:[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-user-tag")]),t._v(" "),e("span",[t._v("Active")])]],2),t._v(" "),e("v-btn",{staticClass:"mr-2 WM-ActionButton",attrs:{color:"orange darken-1"},on:{click:function(e){return t.changeRoleModal(n)}}},[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-user-tag")]),t._v(" "),e("span",[t._v("Role")])],1),t._v(" "),e("v-btn",{staticClass:"WM-ActionButton",attrs:{color:"pink"},on:{click:function(e){return t.remove(n.id)}}},[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-times")]),t._v(" "),e("span",[t._v("Remove")])],1)],1)]}}])})],1)],1),t._v(" "),e("v-divider"),t._v(" "),e("v-layout",{staticClass:"mt-3",attrs:{row:"",wrap:"","align-center":"","justify-center":""}},[e("router-link",{attrs:{to:"/manage-medical-center"}},[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=x.exports}}]);