(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4a01b6ce"],{"17e4":function(e,t,i){},"2b87":function(e,t,i){"use strict";var n=i("d301"),s=i.n(n);s.a},"3df1":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",{staticClass:"close-button",on:{click:e.closeModal}},[i("b-icon",{staticStyle:{width:"10px",height:"10px"},attrs:{icon:"close"}})],1)},s=[],o={name:"ModalCloseButton",props:["isTopLevel"],methods:{closeModal:function(){this.isTopLevel?this.$parent.close():this.$parent.$parent.close()}}},a=o,r=(i("8531"),i("2877")),c=Object(r["a"])(a,n,s,!1,null,"430d5aef",null);t["a"]=c.exports},4259:function(e,t,i){},"4e7c":function(e,t,i){"use strict";var n=i("17e4"),s=i.n(n);s.a},"5cd5":function(e,t,i){},7514:function(e,t,i){"use strict";var n=i("5ca1"),s=i("0a49")(5),o="find",a=!0;o in[]&&Array(1)[o](function(){a=!1}),n(n.P+n.F*a,"Array",{find:function(e){return s(this,e,arguments.length>1?arguments[1]:void 0)}}),i("9c6c")(o)},8531:function(e,t,i){"use strict";var n=i("e658"),s=i.n(n);s.a},a1f1:function(e,t,i){"use strict";var n=i("fbdc"),s=i.n(n);s.a},a644:function(e,t,i){"use strict";var n=i("4259"),s=i.n(n);s.a},a89b:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("BookingModal",{attrs:{modalComponent:e.components.BookForm,type:"bookForm"}}),i("BookingModal",{attrs:{modalComponent:e.components.PrintBill,type:"printBill"}}),i("BookingModal",{attrs:{modalComponent:e.components.SalonNote,type:"bookNote"}}),i("BookingModal",{attrs:{modalComponent:e.components.DeleteBookingReason,type:"deleteBookingReason"}}),i("OrganizeSkinnerModal")],1)},s=[],o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"wrapper is-wrapped has-background-white"},[i("h2",{staticClass:"title is-4 is-uppercase"},[e._v("Ghi chú của khách hàng")]),i("section",[i("b-field",{attrs:{horizontal:"",label:"Số điện thoại"}},[i("b-input",{attrs:{name:"subject",expanded:"",disabled:""},model:{value:e.booking.customerPhone,callback:function(t){e.$set(e.booking,"customerPhone",t)},expression:"booking.customerPhone"}})],1),e.guessNote?i("b-field",{attrs:{horizontal:"",label:"Ghi chú của KH"}},[i("b-input",{attrs:{type:"textarea",disabled:""},model:{value:e.guessNote,callback:function(t){e.guessNote=t},expression:"guessNote"}})],1):e._e(),e.systemNote?i("b-field",{attrs:{horizontal:"",label:"Ghi chú của KH qua hệ thống"}},[i("b-input",{attrs:{type:"textarea",disabled:""},model:{value:e.systemNote,callback:function(t){e.systemNote=t},expression:"systemNote"}})],1):e._e(),i("b-field",{attrs:{horizontal:"",label:"Ghi chú của Salon"}},[i("b-input",{attrs:{type:"textarea",disabled:e.isDisabled},model:{value:e.salonNote,callback:function(t){e.salonNote=t},expression:"salonNote"}})],1),i("b-field",{attrs:{horizontal:""}},[i("p",{staticClass:"control buttons"},[i("button",{staticClass:"button is-primary",class:{"is-static":e.isDisabled},on:{click:function(t){return e.updateSalonNote()}}},[e._v("\n Gửi\n ")])])])],1),i("ModalCloseButton")],1)},a=[],r=(i("96cf"),i("3b8d")),c=(i("c5f6"),i("922e")),l=i("bc3a"),u=i.n(l),h=i("3df1"),d={name:"note",components:{ModalCloseButton:h["a"]},props:{bookingId:{type:Number,default:0}},data:function(){return{salonNote:"",guessNote:"",systemNote:"",isDisabled:""}},methods:{updateSalonNote:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return t={salonNote:this.salonNote},e.next=3,u.a.put("".concat(c["a"].MAIN_API,"/api/booking/update-salon-note?bookingId=").concat(this.booking.id),t);case 3:this.$emit("finish-update",this.salonNote),this.$buefy.toast.open("Cập nhập thành công!"),this.$parent.close();case 6:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},computed:{booking:function(){return this.$store.getters.bookingMap[this.bookingId]}},created:function(){this.salonNote=this.booking.salonNote,this.guessNote=this.booking.note,this.systemNote=this.booking.note1,this.isDisabled=!!this.booking.salonNote}},m=d,p=(i("cc37"),i("2877")),g=Object(p["a"])(m,o,a,!1,null,"bde43100",null),b=g.exports,k=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"has-background-white wrapper print-bill has-text-left"},[i("div",{staticClass:"margin-2"},[i("h2",{staticClass:"title is-3 no-margin has-text-centered"},[e._v(e._s(e.hour.hour))]),i("p",{staticClass:"has-text-centered stylist-text"},[e._v("STYLIST | "+e._s(e.stylist.fullName))])]),i("div",{staticClass:"columns"},[i("div",{staticClass:"column"},[i("CustomerForm",{attrs:{booking:e.booking},on:{customer:e.getCustomer},model:{value:e.tempCustomer,callback:function(t){e.tempCustomer=t},expression:"tempCustomer"}}),i("div",{staticClass:"field",style:{marginTop:"10px"}},[i("b-checkbox",{model:{value:e.bill.isBookStylist,callback:function(t){e.$set(e.bill,"isBookStylist",t)},expression:"bill.isBookStylist"}},[e._v("Khách book Stylist")])],1),[e.customerTagData.length?i("b-message",{staticStyle:{width:"275px"},attrs:{closable:!1,active:"",type:"is-warning",title:"Tags dành cho khách hàng","aria-close-label":"Close message"}},[i("span",[e._v(" \n Tags :\n ")]),i("ul",e._l(e.customerTagData,function(t){return i("li",{key:t.customerId,staticStyle:{width:"230px","white-space":"normal","word-break":"break-all"}},[e._v(e._s("- "+t.customerTag))])}),0)]):e._e()],e.specialCustomerData.length?i("b-message",{staticClass:"special-customer-message",attrs:{title:"Khách hàng đặc biệt",active:"","aria-close-label":"Close message",closable:!1}},[e._v("\n Lý do:\n "),i("ul",e._l(e.specialCustomerData,function(t){return i("li",{key:t.typeErrId},[e._v(" "+e._s("- "+t.reason))])}),0)]):e._e(),e.campaignData.length?i("b-message",{staticClass:"special-customer-message",attrs:{title:"Ưu đãi",active:"","aria-close-label":"Close message",closable:!1}},[i("ul",e._l(e.campaignData,function(t){return i("li",{key:t.mktCampaign.id},[i("b",[e._v(e._s(t.mktCampaign.description))]),i("ul",{style:{marginBottom:"5px"}},e._l(t.lstService,function(n){return i("li",{key:n.id},[e._v("\n "+e._s("- "+n.name+" (Còn "+(t.mktCampaign.maxUsage-n.timesUsed+1)+" lần)")+"\n ")])}),0)])}),0)]):e._e()],2),i("div",{staticClass:"column"},[e.assignedSkinner?e._e():i("div",{staticStyle:{color:"red"}},[e._v("Vui lòng chọn skinner ở trang "),i("a",{attrs:{target:"_blank",href:e.staffScheduleUrl}},[e._v("xếp gội")])]),i("StaffSelection",{attrs:{title:"Skinner",placeholderText:"Chọn skinner",data:e.skinners,selected:e.assignedSkinner,disabled:""}}),i("StaffSelection",{attrs:{title:"Nhân viên checkin",placeholderText:"Chọn checkin",data:e.checkins,selected:e.bill.selectedCheckin},on:{select:function(t){e.bill.selectedCheckin=t}}}),i("h4",{staticClass:"has-text-left is-bold"},[e._v("Dịch vụ")]),i("b-field",[i("b-taginput",{attrs:{data:e.filteredServices,autocomplete:"","allow-new":!1,field:"displayName",icon:"label",placeholder:"Chọn dịch vụ"},on:{typing:e.getFilteredServices},model:{value:e.bill.chosenServices,callback:function(t){e.$set(e.bill,"chosenServices",t)},expression:"bill.chosenServices"}})],1),e.indexedProducts.length>0?i("h4",{staticClass:"has-text-left is-bold"},[e._v("Sản phẩm")]):e._e(),e.indexedProducts.length>0?i("b-field",[i("b-taginput",{attrs:{data:e.filteredProducts,autocomplete:"","allow-new":!1,field:"displayName",icon:"label",placeholder:"Chọn sản phẩm","allow-duplicates":""},on:{typing:e.getFilteredProducts},model:{value:e.bill.chosenProducts,callback:function(t){e.$set(e.bill,"chosenProducts",t)},expression:"bill.chosenProducts"}})],1):e._e(),this.booking&&this.booking.id&&!e.booking.totalBill&&!e.booking.isShineMember?i("div",{staticClass:"sm-sale-prompt"},[e._v("Checkin giới thiệu chính sách KH Mới và tư vấn quyền lợi Shine Member")]):e._e(),i("div",{staticClass:"field"},[!e.isPrintingBill&&e.booking&&e.booking.isMakeBill?i("button",{staticClass:"button is-large is-fullwidth is-primary is-uppercase",attrs:{disabled:""},on:{click:e.updateBill}},[e._v("\n In lại\n phiếu\n ")]):i("button",{staticClass:"button is-large is-fullwidth is-primary is-uppercase",attrs:{disabled:""},on:{click:e.createBill}},[e._v("\n In\n phiếu\n ")])])],1)]),i("ModalCloseButton")],1)},f=[],v=(i("28a5"),i("7f7f"),i("6b54"),i("456d"),i("ac6a"),i("bd86")),C=i("cebc"),y=i("2f62"),S=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"has-text-left"},[i("h4",{staticClass:"has-text-left is-bold"},[e._v("Khách hàng")]),i("b-field",{attrs:{type:{"is-danger":e.error.phone},message:e.error.phone}},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.customer.phone,expression:"customer.phone"},{name:"autofocus",rawName:"v-autofocus"}],staticClass:"input",attrs:{placeholder:"Số điện thoại"},domProps:{value:e.customer.phone},on:{blur:e.getCustomer,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getCustomer(t)},input:function(t){t.target.composing||e.$set(e.customer,"phone",t.target.value)}}})]),i("b-field",[i("input",{directives:[{name:"model",rawName:"v-model",value:e.customer.name,expression:"customer.name"}],staticClass:"input",attrs:{placeholder:"Tên",disabled:!e.isEditing},domProps:{value:e.customer.name},on:{blur:e.checkValidName,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.update(t)},input:function(t){t.target.composing||e.$set(e.customer,"name",t.target.value)}}}),e.isEditing?i("p",{staticClass:"control"},[i("button",{staticClass:"button is-primary",on:{click:e.update}},[e._v("Lưu")])]):e._e(),e.isEditing?e._e():i("p",{staticClass:"control"},[i("button",{staticClass:"button is-primary",on:{click:function(t){e.isEditing=!0}}},[e._v("Sửa")])])]),e.error.name?i("p",{staticClass:"help is-danger"},[e._v(e._s(e.error.name))]):e._e()],1)},I=[],x=(i("a481"),{"0120":"070","0121":"079","0122":"077","0126":"076","0128":"078","0123":"083","0124":"084","0125":"085","0127":"081","0129":"082","0162":"032","0163":"033","0164":"034","0165":"035","0166":"036","0167":"037","0168":"038","0169":"039","0186":"056","0188":"058","0199":"059"}),B=function(e){if(11==e.length){var t=e.substring(0,4),i=x[t]?x[t]+e.slice(4,e.length):e;return i}return e},N={convertPhonePrefix:B},_=(i("f559"),/^[a-z0-9A-Z_ÀÁÂÃÈÉÊẾÌÍÒÓÔÕÙÚĂĐĨŨƠàáâãèéêếìíòóôõùúăđĩũơƯĂẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼỀỀỂưăạảấầẩẫậắằẳẵặẹẻẽềềểỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪễệỉịọỏốồổỗộớờởỡợụủứừỬỮỰỲỴÝỶỸửữựỳỵỷỹý ]+$/),w=function(e){var t=null;return e.length>50&&(t="Tên khách tối đa 50 ký tự"),_.test(e.normalize("NFC"))||(t="Tên không hợp lệ"),t},P=function(e){var t=null;return e.startsWith("0")||(t="Số điện thoại phải bắt đầu bằng số 0!"),isNaN(e)&&(t="Số điện thoại phải là chữ số!"),t},$={checkValidNameOnInput:w,checkValidPhoneOnInput:P},M={name:"CustomerForm",props:["value","booking"],data:function(){return{customer:this.value,error:{name:null,phone:null},customerInfo:null}},methods:{checkValidName:function(){this.customer.name&&(this.customer.name=this.customer.name.trim().replace(/\s\s+/g," "),this.error.name=$.checkValidNameOnInput(this.customer.name))},getCustomer:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(){var t,i,n,s;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(this.customer.phone=N.convertPhonePrefix(this.customer.phone),10===this.customer.phone.length){e.next=4;break}return this.error.phone="Số điện thoại phải là số có 10 chữ số!",e.abrupt("return");case 4:if(i=this.$store.getters.getCustomerByPhone(this.customer.phone),i){e.next=13;break}return e.next=8,u.a.get("".concat(c["a"].MAIN_API,"/api/customer?phone=").concat(this.customer.phone));case 8:n=e.sent,s=n.data,s&&(t=s,this.$store.dispatch("setCustomer",{customer:t,customerPhone:this.customer.phone})),e.next=14;break;case 13:t=i;case 14:this.customer.name=t?t.fullName:"",this.customer.name||(this.isEditing=!0,this.$buefy.snackbar.open({message:"Khách hàng mới. Vui lòng hỏi tên khách hàng và lưu lại trong hệ thống.",position:"is-top",duration:1e3})),this.$emit("customer",{name:this.customer.name,phone:this.customer.phone}),this.customerInfo=t,this.customer.name.length&&this.checkValidName();case 19:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),update:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(){var t,i,n,s,o;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t=null,!this.customerInfo){e.next=8;break}return this.customerInfo.fullName=this.customer.name,t=this.customerInfo,e.next=6,u.a.put("".concat(c["a"].MAIN_API,"/api/customer?customerId=").concat(this.customerInfo.id,"&customerName=").concat(this.customer.name));case 6:e.next=14;break;case 8:return i={fullName:this.customer.name,phone:this.customer.phone},e.next=11,u.a.post("".concat(c["a"].MAIN_API,"/api/customer"),i);case 11:n=e.sent,s=n.data,t=s;case 14:if(!this.booking||!this.booking.id){e.next=19;break}return e.next=17,u.a.put("".concat(c["a"].MAIN_API,"/api/booking/update-customer-name?bookingId=").concat(this.booking.id,"&customerName=").concat(this.customer.name));case 17:o=e.sent,o.data;case 19:this.customerInfo=t,this.isEditing=!1,this.$buefy.snackbar.open({message:"Thay đổi tên khách hàng thành công.",position:"is-top"}),this.$emit("customer",t);case 23:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},watch:{"customer.phone":function(e){this.customer.phone=this.customer.phone.trim().replace(/\s\s+/g,""),this.error.phone=$.checkValidPhoneOnInput(e)},"customer.name":function(e){this.error.name=$.checkValidNameOnInput(e)}},updated:function(){this.$emit("input",{name:this.customer.name,phone:this.customer.phone,error:this.error})},created:function(){this.isEditing=!1},computed:{isEditing:{get:function(){return this.$store.getters.isEditingCustomer},set:function(e){this.$store.commit("setEditingCustomer",e)}}}},D=M,T=(i("a644"),Object(p["a"])(D,S,I,!1,null,"79ee5278",null)),O=T.exports,R=i("7529"),A=i("bcc2"),E=i("0be6"),j=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"selection-container"},[i("h4",{staticClass:"has-text-left is-bold"},[e._v(e._s(e.title))]),i("b-field",[i("b-autocomplete",{attrs:{size:"is-small","open-on-focus":!0,placeholder:e.placeholderText,data:e.filteredData,field:"displayName",disabled:e.disabled},on:{select:function(t){return e.$emit("select",t)},focus:function(t){e.inputName="",e.$emit("select",null)}},model:{value:e.inputName,callback:function(t){e.inputName=t},expression:"inputName"}})],1)],1)},H=[],F={name:"StaffSelection",props:{selected:{type:Object,default:null},data:{type:Array,default:null},title:{type:String,default:""},placeholderText:{type:String,default:""},disabled:{type:Boolean,default:!1}},data:function(){return{inputName:""}},methods:{},created:function(){this.indexedStaff=this.data.map(function(e){return Object(C["a"])({},e,{normalizedName:A["a"].removeVietnameseAccent(e.fullName.toLowerCase())+" "+e.id,displayName:"".concat(e.fullName," (").concat(e.id,")")})}),this.selected&&this.selected.id&&(this.inputName=this.selected.fullName+" ("+this.selected.id+")")},computed:{filteredData:function(){var e=this;return this.indexedStaff.filter(function(t){return t.normalizedName.indexOf(A["a"].removeVietnameseAccent(e.inputName.toLowerCase()))>=0})}},watch:{selected:{deep:!0,handler:function(){this.selected&&this.selected.id&&(this.inputName=this.selected.fullName+" ("+this.selected.id+")")}}}},V=F,z=(i("2b87"),Object(p["a"])(V,j,H,!1,null,"47f66d31",null)),L=z.exports,Y={name:"PrintBill",components:{CustomerForm:O,ModalCloseButton:h["a"],StaffSelection:L},data:function(){return{filteredServices:[],filteredProducts:[],tempCustomer:{name:"",phone:"",error:{name:null,phone:null}},customer:{},bill:null,isPrintingBill:!1,isExperimentSalon:!0,createdBooking:null,staffScheduleUrl:E["a"].STAFF_SCHEDULE_URL}},props:["bookingId"],methods:Object(C["a"])({},Object(y["d"])(["updateBooking"]),{initBill:function(){var e=this,t=this.booking&&this.booking.id?this.billByBookingId[this.booking.id]:null;if(t||(t=Object(v["a"])({isBookStylist:!1,selectedSkinner:{},selectedCheckin:this.getSelectedCheckin(),chosenServices:[],chosenProducts:[]},"isBookStylist",this.booking.isBookStylist)),this.bill=t,!this.bill.id&&this.booking.chosenServices){var i=JSON.parse(this.booking.chosenServices);i.length&&(this.bill.chosenServices=i.map(function(t){return e.getIndexedServiceById(t.id)}).filter(function(e){return null!=e}))}},book:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(){var t,i,n,s,o;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(e.prev=0,t=this.checkCustomer(),i={customerPhone:this.customer.phone,salonId:this.selectedSalon.id,stylistId:this.stylist.id,hourId:this.hour.hourId,subHourId:this.hour.subHourId,isBookStylist:this.bill.isBookStylist,dateBook:this.$store.getters.selectedMomentDate.format("YYYY-MM-DD")},i=A["a"].transformSubHourOut(i),n=null,!t||t.completeBillTime){e.next=16;break}if(!t.isMakeBill||this.$store.getters.getHourIdFromSubHour(t.subHourId)===this.hour.hourId){e.next=11;break}R["a"].changeBookingDenyBillPrinted(this,t.customerName),n=null,e.next=14;break;case 11:return e.next=13,this.changeBookingTime(t.id,t.customerName,i);case 13:n=e.sent;case 14:e.next=29;break;case 16:return e.next=18,u.a.post("".concat(c["a"].MAIN_API,"/api/booking"),i);case 18:if(s=e.sent,o=s.data,"update"!=o.message){e.next=26;break}return e.next=23,this.changeBookingTime(o.booking.bookingId,o.booking.customerName,i);case 23:n=e.sent,e.next=29;break;case 26:n=o,R["a"].bookingSuccess(this,n.customerName),this.isTodaySelected||this.$store.dispatch("addBooking",n);case 29:return e.abrupt("return",n);case 32:e.prev=32,e.t0=e["catch"](0),e.t0&&e.t0.response&&e.t0.response.data&&e.t0.response.data.message&&(e.t0=e.t0.response.data.message),R["a"].generalError(this,e.t0);case 36:case"end":return e.stop()}},e,this,[[0,32]])}));function t(){return e.apply(this,arguments)}return t}(),getFilteredServices:function(e){var t=A["a"].removeVietnameseAccent(e.toLowerCase());this.filteredServices=this.indexedServices.filter(function(e){return e.normalizedName.indexOf(t)>=0})},getFilteredProducts:function(e){var t=A["a"].removeVietnameseAccent(e.toLowerCase());this.filteredProducts=this.indexedProducts.filter(function(e){return e.normalizedName.indexOf(t)>=0})},aggregateProducts:function(e){var t={};return e.forEach(function(e){var i=e.id;t[i]?t[i].quantity++:(t[i]=e,t[i].quantity=1)}),Object.keys(t).map(function(e){return t[e]})},changeBookingTime:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(t,i,n){var s,o;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,R["a"].confirmChangeBookingTime(this,i);case 2:if(!e.sent){e.next=10;break}return e.next=5,u.a.put("".concat(c["a"].MAIN_API,"/api/booking?bookingId=").concat(t),n);case 5:return s=e.sent,o=s.data,R["a"].changeBookingSuccess(this,i),this.isTodaySelected||this.$store.dispatch("addBooking",o),e.abrupt("return",o);case 10:return e.abrupt("return",null);case 11:case"end":return e.stop()}},e,this)}));function t(t,i,n){return e.apply(this,arguments)}return t}(),createBill:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(){var t,i,n,s,o,a,r,l,h;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t=null,this.isPrintingBill&&(t="Hệ thống đang in bill, vui lòng không click nhiều lần!"),this.booking&&this.booking.id&&this.shouldDeferAction[this.booking.id]&&(t="Thao tác quá nhanh, vui lòng thử lại sau!"),this.isEditingCustomer&&(t="Vui lòng lưu thông tin khách hàng trước khi thao tác."),this.isExperimentSalon&&!this.assignedSkinner&&(t="Vui lòng chọn skinner cho bill"),!t){e.next=8;break}return this.$buefy.snackbar.open({message:t,position:"is-top"}),e.abrupt("return");case 8:for(this.isPrintingBill=!0,e.prev=9,i=[],n=0;n0?"SMS"===this.booking.memberCode?"Shine Member (Silver)":"SMB"===this.booking.memberCode?"Shine Member (Black)":"":""},doPrintBill:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(t){var n,s;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n={createdTime:t.createdTime,customerName:this.booking.customerName,customerPhone:this.booking.customerPhone,customerTagData:this.customerTagData,isBookStylist:this.bill.isBookStylist,hourFrame:this.hour.hour,isCallTime:this.booking.isCallTime,customerNote:this.booking.note||"",systemNote:this.booking.note1||"",specialCustomerNote:this.booking.specialCusNote||"",pdfBillCode:t.pdfBillCode,stylistName:this.stylist.fullName,selectedProducts:this.aggregateProducts(this.bill.chosenProducts),selectedServices:this.bill.chosenServices,skinnerName:this.isExperimentSalon&&this.assignedSkinner?this.assignedSkinner.fullName:"",checkinName:this.bill.selectedCheckin?this.bill.selectedCheckin.fullName:"",isShineMember:this.booking.isShineMember,memberEndTime:this.booking.memberEndTime,totalBill:this.booking.totalBill,memberName:this.getMemberName(),specialCustomerData:this.specialCustomerData,campaignData:this.campaignData,billId:this.bill.id},e.next=3,i.e("chunk-39f8783c").then(i.bind(null,"9380"));case 3:s=e.sent,s.default.print(n),this.$parent.close();case 6:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),getCustomer:function(e){this.customer=e,this.tempCustomer=e,e.phone&&e.name&&(this.$store.dispatch("fetchSpecialCustomerData",e.phone),this.$store.dispatch("fetchCustomerTagData",e.phone),this.$store.dispatch("fetchCampaignData",{customerPhone:e.phone,bookingId:0}))},checkCustomer:function(){for(var e=this.$store.state.booking.bookings,t=0;t