mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 12:11:05 +03:30
1 line
14 KiB
JavaScript
Vendored
1 line
14 KiB
JavaScript
Vendored
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{"6WFB":function(t,e,r){"use strict";r.r(e);var n=r("Y8XJ"),a=r("85lN");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 i(){i=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",u=s.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 p(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),s=new j(n||[]);return a(i,"_invoke",{value:E(t,r,s)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var v="suspendedStart",m="executing",d="completed",y={};function b(){}function x(){}function g(){}var w={};f(w,c,(function(){return this}));var _=Object.getPrototypeOf,k=_&&_(_(O([])));k&&k!==r&&n.call(k,c)&&(w=k);var C=g.prototype=b.prototype=Object.create(w);function D(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 E(e,r,n){var a=v;return function(o,i){if(a===m)throw new Error("Generator is already running");if(a===d){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=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===v)throw a=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=m;var l=h(e,r,n);if("normal"===l.type){if(a=n.done?d:"suspendedYield",l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=d,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 o=h(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 S(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 F(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(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 x.prototype=g,a(C,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:x,configurable:!0}),x.displayName=f(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,f(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},D(L.prototype),f(L.prototype,l,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new L(p(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},D(C),f(C,u,"Generator"),f(C,c,(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=O,j.prototype={constructor:j,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(F),!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),F(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;F(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function s(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 c(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var o=t.apply(e,r);function i(t){s(o,n,a,i,c,"next",t)}function c(t){s(o,n,a,i,c,"throw",t)}i(void 0)}))}}var l,u,f,p={data:function(){return{fromMenuDate:!1,formData:{note:"",labels:[{name:""}]},labels:[],rules:{required:function(t){return!!t||"Required."},counter:function(t){return!t||0==t.length||t.length>=5||"Min 5 characters"}}}},created:function(){this.$route.params.cycle&&this.load(this.$route.params.cycle),this.loadLabels()},methods:{load:(f=c(i().mark((function t(e){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.a.get(a.a.editCycle(e));case 2:200==(r=t.sent).status&&(this.formData=r.data.data);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return f.apply(this,arguments)}),loadLabels:(u=c(i().mark((function t(){var e;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.a.get(a.a.listAllLabel());case 2:200==(e=t.sent).status&&(this.labels=e.data.data);case 4:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)}),submitForm:(l=c(i().mark((function t(){var e;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.$route.params.cycle){t.next=6;break}return t.next=3,n.a.put(a.a.updateCycle(this.$route.params.cycle),this.formData);case 3:e=t.sent,t.next=9;break;case 6:return t.next=8,n.a.post(a.a.storeCycle,this.formData);case 8:e=t.sent;case 9:e&&200==e.status&&this.$router.push({name:"AllCycle"});case 10:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)}),duplicateForm:function(t){this.formData.labels.push({name:""})},removeForm:function(t){this.formData.labels.splice(t,1)}}},h=(r("8HGb"),r("KHd+")),v=Object(h.a)(p,(function(){var t=this,e=t._self._c;return e("v-form",{ref:"form"},[e("v-container",{attrs:{"grid-list-xs":"",fluid:""}},[e("material-card",{attrs:{color:"black",title:"Add Cycle"}},[e("v-layout",{staticClass:"px-5 my-3",attrs:{wrap:""}},[e("v-flex",{staticClass:"WM-FlexCenter pl-3",attrs:{xs12:"",sm6:"",md4:""}},[e("v-icon",{staticClass:"fas fa-sort-numeric-up mr-2 WM-Margin-B-8"}),t._v(" "),e("v-text-field",{staticClass:"py-3 pr-3",attrs:{name:"sterilizer_id",label:"Sterilizer ID",color:"black"},model:{value:t.formData.sterilizer_id,callback:function(e){t.$set(t.formData,"sterilizer_id",e)},expression:"formData.sterilizer_id"}})],1),t._v(" "),e("v-flex",{staticClass:"WM-FlexCenter pl-3",attrs:{xs12:"",sm6:"",md4:""}},[e("v-icon",{staticClass:"fas fa-sort-numeric-up mr-2 WM-Margin-B-8"}),t._v(" "),e("v-text-field",{staticClass:"py-3 pr-3",attrs:{name:"cycle_number",label:"Cycle Number",color:"black"},model:{value:t.formData.cycle_number,callback:function(e){t.$set(t.formData,"cycle_number",e)},expression:"formData.cycle_number"}})],1),t._v(" "),e("v-flex",{staticClass:"WM-FlexCenter",attrs:{xs12:"",sm6:"",md4:""}},[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.fromMenuDate,callback:function(e){t.fromMenuDate=e},expression:"fromMenuDate"}},[e("v-text-field",{staticClass:"pr-3",attrs:{slot:"activator",required:"",label:"Date",color:"black"},slot:"activator",model:{value:t.formData.date,callback:function(e){t.$set(t.formData,"date",e)},expression:"formData.date"}}),t._v(" "),e("v-date-picker",{attrs:{color:"pink","no-title":"","date-format":function(t){return new Date(t).toDateString()}},model:{value:t.formData.date,callback:function(e){t.$set(t.formData,"date",e)},expression:"formData.date"}})],1)],1),t._v(" "),e("v-flex",{attrs:{xs12:""}}),t._v(" "),t._l(t.formData.labels,(function(r,n){return e("v-flex",{key:n,staticClass:"WM-FlexCenter WM-DuplicateInput",staticStyle:{position:"relative"},attrs:{xs12:"",sm6:"",md4:""}},[e("div",{staticClass:"Inner"},[e("v-icon",{staticClass:"fa fa-check mr-2 WM-Margin-B-8"}),t._v(" "),e("v-autocomplete",{attrs:{color:"black",items:t.labels,"item-text":"id","item-value":"id",label:"Select Label For Cycle"},model:{value:r.id,callback:function(e){t.$set(r,"id",e)},expression:"label.id"}}),t._v(" "),e("v-btn",{attrs:{absolute:"",small:"",right:"",bottom:"",color:"cyan"},on:{click:function(e){return t.duplicateForm(n)}}},[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-plus")]),t._v("ADD\n ")],1),t._v(" "),n>0?e("v-btn",{attrs:{absolute:"",small:"",right:"",top:"",color:"pink"},on:{click:function(e){return t.removeForm(n)}}},[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-remove")]),t._v("REMOVE\n ")],1):t._e()],1)])})),t._v(" "),e("v-spacer"),t._v(" "),e("v-flex",{attrs:{xs12:""}},[e("hr",{staticClass:"v-divider theme--light",staticStyle:{margin:"30px 0 0 0 !important"}})]),t._v(" "),e("v-flex",{staticClass:"WM-FlexCenter",attrs:{xs12:"",sm12:"",md12:""}},[e("v-textarea",{staticClass:"py-3 pr-3",attrs:{color:"black",name:"address"},scopedSlots:t._u([{key:"label",fn:function(){return[e("div",[t._v("Description")])]},proxy:!0}]),model:{value:t.formData.note,callback:function(e){t.$set(t.formData,"note",e)},expression:"formData.note"}})],1)],2),t._v(" "),e("v-layout",{attrs:{row:"",wrap:"","justify-center":"","align-center":""}},[e("v-flex",{staticClass:"text-md-center text-xs-center",attrs:{xs12:"",md2:"",sm2:""}},[e("v-btn",{staticClass:"WM-CyanBlueGradient-BG",staticStyle:{padding:"10px 60px"},on:{click:function(e){return t.submitForm()}}},[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-check")]),t._v(" "),e("span",{staticClass:"white--text"},[t._v("SAVE")])],1)],1),t._v(" "),e("v-flex",{staticClass:"text-md-center text-sm-center text-xs-center",attrs:{xs12:"",md2:"",sm2:""}},[e("router-link",{attrs:{to:{name:"AllCycle"}}},[e("v-btn",{staticClass:"WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"},[e("v-icon",{staticClass:"black--text"},[t._v("keyboard_arrow_left")]),t._v(" "),e("span",{staticClass:"black--text"},[t._v("Back")])],1)],1)],1)],1)],1)],1)],1)}),[],!1,null,null,null);e.default=v.exports},"8HGb":function(t,e,r){"use strict";r("K5jG")},K5jG:function(t,e,r){var n=r("oEa4");"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)},oEa4: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}\n.WM-DuplicateInput {\r\n margin: 15px 0;\n}\n.WM-DuplicateInput .Inner {\r\n padding: 15px 20px !important;\r\n margin: 0 10px 0 0;\r\n width: 100%;\r\n border: 1px solid rgba(0,0,0,.2);\n}\r\n",""])}}]); |