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

1 line
14 KiB
JavaScript
Vendored

(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{VQA6:function(t,e,r){"use strict";r.r(e);var n=r("vDqi"),a=r.n(n),o=r("i/t5");function i(t){return(i="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){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return s(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 s(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(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 l(){l=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:{},c=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=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),c=new O(n||[]);return a(i,"_invoke",{value:E(t,r,c)}),i}function d(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",v="executing",y="completed",m={};function g(){}function w(){}function _(){}var x={};f(x,c,(function(){return this}));var b=Object.getPrototypeOf,C=b&&b(b(B([])));C&&C!==r&&n.call(C,c)&&(x=C);var S=_.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 L(t,e){function r(a,o,c,s){var l=d(t[a],t,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,s)}),(function(t){r("throw",t,c,s)})):e.resolve(f).then((function(t){u.value=t,c(u)}),(function(t){return r("throw",t,c,s)}))}s(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 E(e,r,n){var a=p;return function(o,i){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===o)throw i;return{value:t,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var s=P(c,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=v;var l=d(e,r,n);if("normal"===l.type){if(a=n.done?y:"suspendedYield",l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=y,n.method="throw",n.arg=l.arg)}}}function P(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,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;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,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function M(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,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,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(i(e)+" is not iterable")}return w.prototype=_,a(S,"constructor",{value:_,configurable:!0}),a(_,"constructor",{value:w,configurable:!0}),w.displayName=f(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"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(S),t},e.awrap=function(t){return{__await:t}},k(L.prototype),f(L.prototype,s,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new L(h(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(S),f(S,u,"Generator"),f(S,c,(function(){return this})),f(S,"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,O.prototype={constructor:O,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(j),!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 c.type="throw",c.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],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){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,m):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),m},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),j(r),m}},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;j(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),m}},e}function u(t,e,r,n,a,o,i){try{var c=t[o](i),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,a)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var o=t.apply(e,r);function i(t){u(o,n,a,i,c,"next",t)}function c(t){u(o,n,a,i,c,"throw",t)}i(void 0)}))}}var h,d,p={data:function(){return{data:{},barcodeimg:"",QRCodeimg:"",MedicalCenter:""}},methods:{load:(d=f(l().mark((function t(e){var r;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.a.get(o.a.showPackage(e));case 2:200==(r=t.sent).status&&(this.data=r.data.data,this.generateBarcode(this.data.id),this.MedicalCenter=this.data.user.medical_center.name);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)}),generateBarcode:(h=f(l().mark((function t(e){var r;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.a.post(o.a.Barcode(e,"Package"));case 2:(r=t.sent)&&200==r.status&&(this.QRCodeimg=r.data.data.QRCode?r.data.data.QRCode:null,this.barcodeimg=r.data.data.Barcode?r.data.data.Barcode:null);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)}),editPackage:function(t){window.location.href="/packages/"+t+"/edit"},addPackage:function(){window.location.href="/add-package"},print:function(){for(var t=document.getElementById("printMe").innerHTML,e="",r=0,n=c(document.querySelectorAll('link[rel="stylesheet"], style'));r<n.length;r++){e+=n[r].outerHTML}var a=window.open("","","left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0");a.document.write("<!DOCTYPE html>\n <html>\n <head>\n ".concat(e,"\n </head>\n <body>\n ").concat(t,"\n </body>\n </html>")),a.document.close(),a.focus(),a.print(),a.close()}},created:function(){this.$route.params.package&&this.load(this.$route.params.package)}},v=r("KHd+"),y=Object(v.a)(p,(function(){var t=this,e=t._self._c;return e("v-container",{attrs:{"grid-list-xs":""}},[e("material-card",{attrs:{color:"black",title:"Show Package"}},[e("v-layout",{staticClass:"px-5 my-3",attrs:{id:"printMe","align-left":"","justify-left":"",wrap:""}},[e("h3",{staticClass:"ml-3 CSSD-font"},[t._v("Package - "+t._s(t.MedicalCenter))]),t._v(" "),e("v-flex",{attrs:{xs12:""}},[e("hr",{staticClass:"v-divider theme--light"})]),t._v(" "),e("v-layout",{staticClass:"ml-4",attrs:{row:"",wrap:""}},[e("v-flex",{attrs:{xs12:"",md6:"",sm6:""}},[e("div",{staticClass:"WM-d-flex"},[e("v-icon",{staticClass:"WMi-info"}),t._v(" "),e("span",{staticClass:"headline ml-1 CSSD-font",staticStyle:{"letter-spacing":"0 !important"}},[t._v(t._s(t.data.name))])],1)]),t._v(" "),e("v-flex",{attrs:{xs12:"",md6:"",sm6:""}},[e("div",{staticClass:"WM-d-flex"},[e("v-icon",{staticClass:"WMi-Industry"}),t._v(" "),e("span",{staticClass:"headline ml-2 CSSD-font",staticStyle:{"letter-spacing":"0 !important"}},[t._v(t._s(t.data.created_at))])],1)]),t._v(" "),e("v-flex",{attrs:{xs12:"",md6:"",sm6:""}},[e("div",{staticClass:"WM-d-flex"},[e("v-icon",{staticClass:"WMi-user"}),t._v(" "),e("span",{staticClass:"headline ml-2 CSSD-font",staticStyle:{"letter-spacing":"0 !important"}},[t._v(t._s(t.data.user?t.data.user.name:""))])],1)]),t._v(" "),e("v-flex",{attrs:{xs12:"",md6:"",sm6:""}},[e("div",{staticClass:"WM-d-flex"},[e("v-icon",{staticClass:"WMi-pencil"}),t._v(" "),e("span",{staticClass:"headline ml-1 CSSD-font",staticStyle:{"letter-spacing":"0 !important"}},[t._v(t._s(t.data.note))])],1)])],1),t._v(" "),e("v-layout",{staticClass:"px-5 my-3",attrs:{"align-left":"","justify-left":"",wrap:""}},[e("h3",{staticClass:"ml-3 CSSD-font"},[t._v("Barcode And QRCode Image")]),t._v(" "),e("v-flex",{attrs:{xs12:""}},[e("hr",{staticClass:"v-divider theme--light"})]),t._v(" "),e("v-layout",{staticClass:"ml-4",attrs:{row:"",wrap:""}},[t.barcodeimg?e("v-flex",{attrs:{xs12:"",md6:"",sm6:""}},[e("img",{staticClass:"WM-Width-350",attrs:{src:t.barcodeimg}}),e("br"),t._v(" "),e("span",{staticClass:"CSSD-font"},[t._v("Package ID : "+t._s(t.data.id))])]):t._e()],1),t._v(" "),e("v-layout",{staticClass:"ml-4",attrs:{row:"",wrap:""}},[t.QRCodeimg?e("v-flex",{attrs:{xs12:"",md6:"",sm6:""}},[e("img",{staticClass:"WM-Width-150",attrs:{src:t.QRCodeimg}})]):t._e()],1)],1)],1),t._v(" "),e("v-layout",{staticClass:"px-5 my-3",attrs:{"align-left":"","justify-left":"",wrap:""}},[e("h3",{staticClass:"ml-3 CSSD-font"},[t._v("Items")]),t._v(" "),e("v-flex",{attrs:{xs12:""}},[e("hr",{staticClass:"v-divider theme--light"})]),t._v(" "),e("v-layout",{staticClass:"ml-4",attrs:{row:"",wrap:""}},[[e("v-expansion-panel",{staticClass:"WM-Panel"},t._l(t.data.items,(function(r,n){return e("v-expansion-panel-content",{key:n,scopedSlots:t._u([{key:"header",fn:function(){return[e("div",[t._v(t._s(n+1+": "+r.name)+" ("+t._s(r.pivot.count)+")")])]},proxy:!0}],null,!0)},[t._v(" "),e("v-card",[e("v-card-text",[t._v("note : "+t._s(r.note))])],1)],1)})),1)]],2)],1),t._v(" "),e("v-layout",{staticStyle:{"text-align":"center"},attrs:{row:"",wrap:"","align-center":"","justify-center":""}},[e("v-flex",{attrs:{xs12:"",md12:"",sm12:""}},[e("v-btn",{staticClass:"WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black",on:{click:function(e){return t.addPackage()}}},[e("v-icon",{staticClass:"black--text"},[t._v("keyboard_arrow_left")]),t._v(" "),e("span",{staticClass:"black--text"},[t._v("Back")])],1),t._v(" "),e("v-btn",{staticClass:"WM-CyanBlueGradient-BG",staticStyle:{padding:"10px 60px"},on:{click:t.print}},[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-print")]),t._v(" "),e("span",{staticClass:"white--text"},[t._v("Print")])],1),t._v(" "),e("v-btn",{staticClass:"mr-2",staticStyle:{padding:"10px 60px"},attrs:{color:"orange"},on:{click:function(e){return t.editPackage(t.data.id)}}},[e("v-icon",{staticClass:"white--text mr-1 caption"},[t._v("fas fa-pen")]),t._v(" "),e("span",[t._v("Edit")])],1)],1)],1)],1)],1)}),[],!1,null,null,null);e.default=y.exports},"i/t5":function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var n={showTestResult:function(t){return"/ShowTestResult/".concat(t)},showItem:function(t){return"/ShowItem/".concat(t)},showPackage:function(t){return"/ShowPackage/".concat(t)},showLabel:function(t){return"/ShowLabel/".concat(t)},showCycle:function(t){return"/ShowCycle/".concat(t)},Barcode:function(t,e){return console.log(t,e,"aaa"),"/BarCode/".concat(t,"/").concat(e)},packageBarcode:function(t){return"/Package/Barcode/".concat(t)},packageQRCode:function(t){return"/Package/QRCode/".concat(t)}}}}]);