mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 02:01:07 +03:30
1 line
18 KiB
JavaScript
Vendored
1 line
18 KiB
JavaScript
Vendored
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{K2EN:function(t,e,r){"use strict";r.r(e);var n=r("Y8XJ"),a=r("85lN"),i=r("L2JU");function o(t){return(o="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 s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",u=i.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 v(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,o=Object.create(i.prototype),s=new S(n||[]);return a(o,"_invoke",{value:P(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=v;var p="suspendedStart",d="executing",m="completed",y={};function b(){}function g(){}function _(){}var w={};f(w,c,(function(){return this}));var x=Object.getPrototypeOf,C=x&&x(x(B([])));C&&C!==r&&n.call(C,c)&&(w=C);var k=_.prototype=b.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(a,i,s,c){var l=h(t[a],t,i);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(f).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,a){r(t,n,e,a)}))}return i=i?i.then(a,a):a()}})}function P(e,r,n){var a=p;return function(i,o){if(a===d)throw new Error("Generator is already running");if(a===m){if("throw"===i)throw o;return{value:t,done:!0}}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var c=M(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=h(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 M(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,M(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=h(a,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var o=i.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function B(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=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 i.next=i}}throw new TypeError(o(e)+" is not iterable")}return g.prototype=_,a(k,"constructor",{value:_,configurable:!0}),a(_,"constructor",{value:g,configurable:!0}),g.displayName=f(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,f(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},O(L.prototype),f(L.prototype,l,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,a,i){void 0===i&&(i=Promise);var o=new L(v(t,r,n,a),i);return e.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},O(k),f(k,u,"Generator"),f(k,c,(function(){return this})),f(k,"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=B,S.prototype={constructor:S,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(E),!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 i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.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 i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},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),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:B(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function c(t,e,r,n,a,i,o){try{var s=t[i](o),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,a)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function o(t){c(i,n,a,o,s,"next",t)}function s(t){c(i,n,a,o,s,"throw",t)}o(void 0)}))}}function u(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 f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){v(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function v(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===o(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var h,p,d,m,y,b,g={data:function(){return{headers:[{sortable:!0,text:"Label ID",value:"Label ID"},{sortable:!0,text:"Hospital",value:"Hospital"},{sortable:!1,text:"User",value:"User"},{sortable:!1,text:"Cycle Number",value:"Cycle Number"},{sortable:!1,text:"SterilizerID",value:"SterilizerID"},{sortable:!1,text:"Action",value:"action",align:"left"}],filter:{},items:[],medicalCenters:[],users:[],currentPage:1,lastPage:1}},created:function(){this.load()},methods:f(f({},Object(i.d)("modal",["changeCurrentModal"])),{},{load:(b=l(s().mark((function t(){var e,r,i,o,c=arguments;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(i in e=c.length>0&&void 0!==c[0]?c[0]:1,r="?",this.filter)this.filter.hasOwnProperty(i)&&(r+="".concat(i,"=").concat(this.filter[i],"&"));return r+=e?"page=".concat(e):"page=1",t.next=6,n.a.get(a.a.listLabel(r));case 6:(o=t.sent)&&200==o.status&&(this.items=o.data.data.data,this.currentPage=o.data.data.current_page,this.lastPage=o.data.data.last_page),this.loadMedicalCenters();case 9:case"end":return t.stop()}}),t,this)}))),function(){return b.apply(this,arguments)}),loadMedicalCenters:(y=l(s().mark((function t(){var e;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.a.get(a.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 y.apply(this,arguments)}),fillUsers:(m=l(s().mark((function t(){var e;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.a.get(a.a.listOpertorMedicalCenter(this.form.medicalCenterId));case 2:(e=t.sent)&&200==e.status&&(this.users=e.data.data.users);case 4:case"end":return t.stop()}}),t,this)}))),function(){return m.apply(this,arguments)}),show:(d=l(s().mark((function t(e){var r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.a.get(a.a.showLabel(e));case 2:(r=t.sent)&&200==r.status&&this.changeCurrentModal({modal:"modal-label-show",properties:{result:r,width:40}});case 4:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)}),remove:(p=l(s().mark((function t(e){var r,i;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.a.delete(a.a.removeLabel(e));case 2:if((r=t.sent)&&200==r.status)for(i in this.items)this.items.hasOwnProperty(i)&&this.items[i].id==e&&this.items.splice(i,1);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)}),generateBarcode:(h=l(s().mark((function t(e,r){var i;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.a.post(a.a.Barcode(e,r));case 2:(i=t.sent)&&200==i.status&&this.changeCurrentModal({modal:"modal-barcode-barcode",properties:{result:i}});case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return h.apply(this,arguments)})}),computed:f({},Object(i.c)("modal",["getModalResult"])),watch:{currentPage:function(t){this.load(t)},getModalResult:function(t){for(var e in this.items)this.items.hasOwnProperty(e)&&this.items[e].id==t.id&&(this.items[e]=t)}}},_=(r("k2+/"),r("KHd+")),w=Object(_.a)(g,(function(){var t=this,e=t._self._c;return e("div",{},[e("v-container",{attrs:{fluid:""}},[e("material-card",{attrs:{color:"black",title:"All Labels",text:""}},[e("v-layout",{staticClass:"px-5 my-3",attrs:{"align-center":"",wrap:""}},[e("v-flex",{staticClass:"WM-FlexCenter",attrs:{xs12:"",md3:"",sm3:""}},[e("v-icon",{staticClass:"fas fa-sort-numeric-up mr-2 WM-Margin-B-8"}),t._v(" "),e("v-text-field",{staticClass:"py-3",attrs:{label:"Label ID",color:"black"},model:{value:t.filter.label_id,callback:function(e){t.$set(t.filter,"label_id",e)},expression:"filter.label_id"}})],1),t._v(" "),t.$hasRole("Admin")?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:{"item-text":"name","item-value":"id",label:"Hospital",color:"black",items:t.medicalCenters,clearable:!0},on:{change:t.fillUsers},model:{value:t.filter.medical_center_id,callback:function(e){t.$set(t.filter,"medical_center_id",e)},expression:"filter.medical_center_id"}})],1):t._e(),t._v(" "),e("v-flex",{staticClass:"WM-FlexCenter pl-3",attrs:{xs12:"",md3:"",sm3:""}},[e("v-icon",{staticClass:"fas fa-sort-numeric-up mr-2 WM-Margin-B-8"}),t._v(" "),e("v-text-field",{staticClass:"py-3",attrs:{label:"Sterilizer ID",color:"black"},model:{value:t.filter.sterilizer_id,callback:function(e){t.$set(t.filter,"sterilizer_id",e)},expression:"filter.sterilizer_id"}})],1),t._v(" "),e("v-flex",{staticClass:"WM-FlexCenter pl-3",attrs:{xs12:"",md3:"",sm3:""}},[e("v-icon",{staticClass:"fas fa-sort-numeric-up mr-2 WM-Margin-B-8"}),t._v(" "),e("v-text-field",{staticClass:"py-3",attrs:{label:"Cycle Number",color:"black"},model:{value:t.filter.cycle_number,callback:function(e){t.$set(t.filter,"cycle_number",e)},expression:"filter.cycle_number"}})],1),t._v(" "),e("v-flex",{attrs:{xs12:"",md2:"",sm3:""}},[e("v-btn",{staticClass:"WM-CyanBlueGradient-BG",staticStyle:{padding:"10px 60px"},on:{click:function(e){return 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:{name:"AddLabel"}}},[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-4 my-3"},[e("v-divider")],1),t._v(" "),e("v-layout",{staticClass:"px-5 my-3",attrs:{"align-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:"title font-weight-light"},[t._v(t._s(n.id))]),t._v(" "),e("td",{staticClass:"title font-weight-light"},[t._v(t._s(n.user&&n.user.medical_center?n.user.medical_center.name:""))]),t._v(" "),e("td",{staticClass:"title font-weight-light"},[t._v(t._s(n.user?n.user.name:""))]),t._v(" "),e("td",{staticClass:"title font-weight-light"},[t._v(t._s(n.cycle_number))]),t._v(" "),e("td",{staticClass:"title font-weight-light"},[t._v(t._s(n.sterilizer_id))]),t._v(" "),e("td",{staticClass:"text-xs-right FlexBtn Height-MD-60"},[e("v-tooltip",{attrs:{bottom:"","open-on-hover":""},scopedSlots:t._u([{key:"activator",fn:function(r){var a=r.on,i=r.attrs;return[e("v-btn",t._g(t._b({staticClass:"mr-2",attrs:{color:"cyan"},on:{click:function(e){return t.show(n.id)}}},"v-btn",i,!1),a),[e("v-icon",{staticClass:"white--text mr-1 caption"},[t._v("fas fa-eye")]),t._v(" "),e("span",[t._v("Show")])],1)]}}],null,!0)},[t._v(" "),e("span",[t._v("Show")])]),t._v(" "),e("v-tooltip",{attrs:{bottom:"","open-on-hover":""},scopedSlots:t._u([{key:"activator",fn:function(r){var a=r.on,i=r.attrs;return[t.$hasRole("Admin")||n.user_id==t.$store.state.user.id?e("router-link",{staticClass:"LinkBtn",attrs:{to:{name:"EditLabel",params:{label:n.id}}}},[e("v-btn",t._g(t._b({staticClass:"mr-2",attrs:{color:"orange"}},"v-btn",i,!1),a),[e("v-icon",{staticClass:"white--text mr-1 caption"},[t._v("fas fa-pen")]),t._v(" "),e("span",[t._v("Edit")])],1)],1):t._e()]}}],null,!0)},[t._v(" "),e("span",[t._v("Edit")])]),t._v(" "),e("v-tooltip",{attrs:{bottom:"","open-on-hover":""},scopedSlots:t._u([{key:"activator",fn:function(r){var a=r.on,i=r.attrs;return[t.$hasRole("Admin")||n.user_id==t.$store.state.user.id?e("v-btn",t._g(t._b({staticClass:"WM-ActionButton mr-2",attrs:{color:"pink"},on:{click:function(e){return t.remove(n.id)}}},"v-btn",i,!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")])]),t._v(" "),e("v-tooltip",{attrs:{bottom:"","open-on-hover":""},scopedSlots:t._u([{key:"activator",fn:function(r){var a=r.on,i=r.attrs;return[e("v-btn",t._g(t._b({attrs:{color:"orange darken-1 mr-2"},on:{click:function(e){return t.generateBarcode(n.id,"Label")}}},"v-btn",i,!1),a),[e("v-icon",{staticClass:"white--text mr-1 caption"},[t._v("fas fa-barcode")]),t._v(" "),e("span",[t._v("Generate Barcode")])],1)]}}],null,!0)},[t._v(" "),e("span",[t._v("Generate Barcode")])])],1)]}}])})],1)],1),t._v(" "),e("v-divider"),t._v(" "),t.lastPage>1?e("div",{staticClass:"text-xs-center"},[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:"/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)}),[],!1,null,null,null);e.default=w.exports},ZTDb:function(t,e,r){var n=r("xHXd");"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)},"k2+/":function(t,e,r){"use strict";r("ZTDb")},xHXd:function(t,e,r){(t.exports=r("JPst")(!1)).push([t.i,"\n.v-btn--floating {\r\n\tpadding: 0 !important;\n}\n.theme--light.v-btn.v-btn--flat {\r\n\tcolor: rgba(0, 0, 0, 0.87) !important;\n}\n.v-btn--floating,\r\n.v-btn--icon:before {\r\n\tborder-radius: 50% !important;\n}\r\n",""])}}]); |