mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-12 18:11:06 +03:30
1 line
11 KiB
JavaScript
Vendored
1 line
11 KiB
JavaScript
Vendored
(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{NLmH:function(t,e,r){"use strict";r.r(e);var n=r("Y8XJ");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 a(){a=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=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 h(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),s=new M(n||[]);return i(a,"_invoke",{value:O(t,r,s)}),a}function m(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",v="completed",y={};function g(){}function w(){}function x(){}var b={};f(b,c,(function(){return this}));var _=Object.getPrototypeOf,L=_&&_(_(G([])));L&&L!==r&&n.call(L,c)&&(b=L);var k=x.prototype=g.prototype=Object.create(b);function C(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,s,c){var l=m(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 a;i(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var c=j(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(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=m(e,r,n);if("normal"===l.type){if(o=n.done?v:"suspendedYield",l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=m(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function G(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 w.prototype=x,i(k,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,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,x):(t.__proto__=x,f(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},C(E.prototype),f(E.prototype,l,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(h(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(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=G,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(N),!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 o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("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 o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.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),N(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 o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:G(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function i(t,e,r,n,o,a,i){try{var s=t[a](i),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}var s,c,l={data:function(){var t=Object.freeze({cell_number:"",password:"",name:"",gender:"",medical_center_id:this.$route.params.medicalCenter?this.$route.params.medicalCenter:""});return{form:Object.assign({},t),show1:!1,items:["Male","FeMale"],isLogin:n.c.getInfo(),rules:{required:function(t){return!!t||"Required."},nameCounter:function(t){return t&&t.length>=5||"Min 5 characters"},passCounter:function(t){return t&&t.length>=8||"Min 8 characters"},cellNumberCounter:function(t){return t&&11==t.length||"must 11 characters"},countryCode:function(t){return t&&4==t.length||"must 4 characters for example (0098)"}}}},methods:{register:(s=a().mark((function t(){var e;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.$refs.form.validate()){t.next=5;break}return t.next=3,n.a.post("register",this.form);case 3:(e=t.sent)&&200==e.status&&this.$router.push({name:"OperatorList",params:{medicalCenter:this.form.medical_center_id}});case 5:case"end":return t.stop()}}),t,this)})),c=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=s.apply(t,e);function a(t){i(o,r,n,a,c,"next",t)}function c(t){i(o,r,n,a,c,"throw",t)}a(void 0)}))},function(){return c.apply(this,arguments)})}},u=r("KHd+"),f=Object(u.a)(l,(function(){var t=this,e=t._self._c;return e("v-form",{ref:"form"},[e("v-container",{attrs:{"grid-list-xs":""}},[e("v-layout",{staticClass:"justify-center",attrs:{row:"",wrap:""}},[e("v-flex",{staticClass:"WM-WidthScreen-SM WM-WidthScreen-XS",attrs:{xs12:"",md3:"",sm6:""}},[e("material-card",{attrs:{color:"black",title:"Register Page"}},[e("v-layout",{attrs:{column:""}},[e("v-flex",{attrs:{xs12:"",md2:"",sm2:""}},[e("v-text-field",{staticClass:"pa-2",attrs:{name:"name",label:"Name",color:"black",rules:[t.rules.required,t.rules.nameCounter]},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),t._v(" "),e("v-flex",{attrs:{xs12:"",md2:"",sm2:""}},[e("v-select",{staticClass:"pa-2",attrs:{items:t.items,label:"Gender",name:"gender","single-line":"",color:"black",rules:[t.rules.required]},model:{value:t.form.gender,callback:function(e){t.$set(t.form,"gender",e)},expression:"form.gender"}})],1),t._v(" "),e("v-flex",{attrs:{xs2:"",md2:"",sm2:""}},[e("v-text-field",{attrs:{name:"country_code",label:"Country Code",color:"black",rules:[t.rules.required,t.rules.countryCode],mask:"####"},model:{value:t.form.country_code,callback:function(e){t.$set(t.form,"country_code",e)},expression:"form.country_code"}})],1),t._v(" "),e("v-flex",{attrs:{xs10:"",md10:"",sm10:""}},[e("v-text-field",{attrs:{name:"cellnumber",label:"Cell Number",color:"black",rules:[t.rules.required,t.rules.cellNumberCounter],mask:"#### ### ####"},model:{value:t.form.cell_number,callback:function(e){t.$set(t.form,"cell_number",e)},expression:"form.cell_number"}})],1),t._v(" "),e("v-flex",{attrs:{xs12:"",md2:"",sm2:""}},[e("v-text-field",{staticClass:"pa-2",attrs:{name:"password",label:"Password",type:t.show1?"text":"password","append-icon":t.show1?"visibility":"visibility_off",color:"black",rules:[t.rules.required,t.rules.passCounter]},on:{"click:append":function(e){t.show1=!t.show1}},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}})],1)],1),t._v(" "),e("v-layout",{attrs:{row:"",wrap:""}},[e("v-flex",{staticClass:"text-md-left text-sm-center text-xs-center",attrs:{xs12:"",md6:"",sm6:""}},[e("v-btn",{staticClass:"WM-CyanBlueGradient-BG",staticStyle:{padding:"10px 60px"},on:{click:t.register}},[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-plus")]),t._v(" "),e("span",{staticClass:"white--text"},[t._v("Register")])],1)],1),t._v(" "),t.isLogin?t._e():e("v-flex",{staticClass:"text-md-right text-sm-center text-xs-center",attrs:{xs12:"",md6:"",sm6:""}},[e("router-link",{attrs:{to:"/login"}},[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-sign-in-alt")]),t._v(" "),e("span",{staticClass:"black--text"},[t._v("Login")])],1)],1)],1)],1)],1)],1)],1)],1)],1)}),[],!1,null,null,null);e.default=f.exports}}]); |