HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/8.2.20
System: Linux 825a8fd6cf8c 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User: apache (48)
PHP: 8.2.20
Disabled: NONE
Upload Files
File: /var/www/html/public/static/js/hookUserB-legacy-b792161d.js
System.register(["./po-legacy-08c71dd1.js","./vue-router-legacy-a12307c3.js","./message-legacy-10af7c73.js","./index-legacy-42c17c53.js","./runtime-core.esm-bundler-legacy-c5df00b7.js","./index-legacy-06009ca9.js","./preload-helper-legacy-f8638e03.js","./vue-i18n.runtime.esm-bundler-legacy-720876b1.js","./index-legacy-c9e20962.js","./_commonjsHelpers-legacy-5498c249.js","./utils-legacy-c0023c33.js","./focus-trap-legacy-631b7396.js","./error-legacy-e98f9e58.js"],(function(e,i){"use strict";var t,a,n,s,o,c,l,d,r,_,u,m,g,p,h,v,f,y,b,k,w,S,D,C,T,O;return{setters:[e=>{t=e.addCompanyWeb,a=e.getdaysClander,n=e.bookingOrderWeb,s=e.getHealthFormDataWeb,o=e.submitHealthFormModelWeb,c=e.bookingCheckIn,l=e.submitNoteFormWeb,d=e.getCompanyListWeb,r=e.getUserAssocDetailWeb,_=e.getTherapistDetailWeb,u=e.bookingCustomerSchduleListWeb,m=e.bookingAmountCalculteWeb,g=e.yuyueFDF,p=e.getNoteFormWeb,h=e.deleteCompanyWeb,v=e.bookingSchduleWeb,f=e.bookingDetailClientWeb,y=e.bookingPaymentWeb,b=e.bookingDelete},e=>{k=e.d,w=e.u},e=>{S=e.b7},e=>{D=e.o},e=>{C=e.r,T=e.A,O=e.o},null,null,null,null,null,null,null,null],execute:function(){e("useEqu",(function(){k(),w(),k();const e=C(),i=C(!1),x=C(!1),j=C(!1),A=C([]),N=C([]),E=C(!1),L=C(!1),W=C(!1),I=C(!1),P=C(!1),B=C(!1),J=C(!1),F=C(!1),H=C(!1),R=C(!1),M=C(!1),z=C(""),q=C(""),K=C(""),Y=C(""),U=C(M),V=C(""),G=C([]),Z=C([]),Q=C([]),X=C([]),$=C([]),ee=C([]),ie=C([]),te=C([]),ae=C([]),ne=C([]),se=T({}),oe=T({}),ce=T({}),le=T({}),de=T({}),re=T({}),_e=T({}),ue=T({}),me=T({});T({});const ge=T({}),pe=C([{id:1,text:"<500m",value:"500m"},{id:2,text:"<1km",value:"1km"},{id:3,text:"<3km",value:"3km"},{id:4,text:"<5km",value:"5km"},{id:5,text:"<10km",value:"10km"},{id:6,text:">10km",value:"larger10km"},{id:7,text:"All",value:"all"}]),he=T({name:"",today_date:"",hear_about:"",chief_complaint:"",rashes_bruise:!1,address:"",Birth:"",Code_ZIP:"",Occupation:"",Phone:"",Work_Phone:"",Physician:"",Phone1:"",City:""}),ve=T({tableIndex:0,note:""}),fe=T({signal_url:"",form_type:"",note_id:""}),ye=T({loacation_id:"",loacation_name:"",Client_name:"",Client_id:"",date:"",time:"",service_name:"Massage",Therapist_name:"",Therapist_id:"",Therapist_id1:"",comment:"",During:60,gender:-1,description:"",service_times:"",config_id:"",dateInfo:"",Terapist:"",checkbox:!1,is_items:!1,Clinic_id:"",Location_id:"",amount:"",service_name1:"",next_page:"",prev_page:"",page:1,allow_code:"",allow_times_time:"",allow_times_mins:"",booking_id:""}),be=T({SignatureValue:"Please sign in the mini program",time:"",note_id:"",signal_url1:"",signal_url2:"",signal_desc1:"",signal_desc2:"",form_type:"",sensitived_url:"",sensitived_desc:"",ougoing_url1:"",ougoing_url2:"",ougoing_url3:"",ougoing_url4:"",ougoing_url5:"",ougoing_desc1:"",ougoing_desc2:"",ougoing_desc3:"",ougoing_desc4:"",ougoing_desc5:"",userId1:"",formInfo1:"",formInfo2:"",formInfo3:"",formInfo4:"",formInfo5:"",imgView:"",service_name:"",Therapist_name:"",date:0,month:"",action:"",click_date:"",checked1:!1,therapist_name:"",userId:"",is_additional:"",is_form_history:2,is_historyAll:2,is_form_edit:1}),ke=T({plan:"",date:"",daily_living:"",treatment_goal:"",focus_treatment:"",frequency:"",duration:"",performed:"",assessments:"",schedule:"",responses:"",recommended:"",hydrotherapy:"",contraindications:"",referrals:"",discussed_with:"",treatment_plan:"",checkedCities:""}),we=T({notes:"",date:"",time:"",duration:"",fee:"",assessment:"",therapist:"",findings:"",feedback:"",self_care:"",timeType:"",durationType:"",receivedType:""}),Se=T({name:"",name1:"",indication:"",client_name:"",date:"",checkedCities:""}),De=T({date1:"",date2:"",date3:"",date4:"",date5:""}),Ce=C([{id:1,text:"Yes",value:"yes",is_selected:0},{id:2,text:"No",value:"no",is_selected:0}]),Te=C([{id:1,text:"Yes",value:"yes",is_selected:0},{id:2,text:"No",value:"no",is_selected:0}]),Oe=C([{id:1,text:"am",value:"am",is_selected:0},{id:2,text:"pm",value:"pm",is_selected:0}]),xe=C([{id:1,text:"min.",value:"min",is_selected:0},{id:2,text:"hr.",value:"hr",is_selected:0}]),je=C([{id:1,name:"Chest Wall Muscles (not including breasts)",is_selected:0},{id:2,name:"Breast (s)",is_selected:0},{id:3,name:"Buttocks (gluteal muscles)",is_selected:0},{id:4,name:"Upper Inner Thigh(s)",is_selected:0}]),Ae=C([{id:1,name:"back",is_selected:0},{id:2,name:"neck",is_selected:0},{id:3,name:"shoulders",is_selected:0},{id:4,name:"face",is_selected:0},{id:5,name:"arm L R",is_selected:0},{id:6,name:"leg L R",is_selected:0},{id:7,name:"hip area",is_selected:0},{id:8,name:"abdominals",is_selected:0},{id:9,name:"chest",is_selected:0},{id:10,name:"breast",is_selected:0},{id:11,name:"other (list)",is_selected:0}]),Ne=C([{id:1,name:"Swedish",is_selected:0},{id:2,name:"Frictions",is_selected:0},{id:3,name:"deep facial",is_selected:0},{id:4,name:"trigger points",is_selected:0},{id:5,name:"stretch",is_selected:0},{id:6,name:"intra-oral",is_selected:0},{id:7,name:"Breast",is_selected:0},{id:8,name:"Hydrotherapy",is_selected:0},{id:9,name:"joint mobilization grade: ",is_selected:0},{id:10,name:"other (list) ",is_selected:0}]),Ee=C([{id:1,text:"Yes",value:"yes",is_selected:0},{id:2,text:"No",value:"no",is_selected:0}]),Le=C([{id:1,name:"back",is_selected:0},{id:2,name:"neck",is_selected:0},{id:3,name:"shoulders",is_selected:0},{id:4,name:"face",is_selected:0},{id:5,name:"arm L R",is_selected:0},{id:6,name:"leg L R",is_selected:0},{id:7,name:"gluteus",is_selected:0},{id:8,name:"abdominals",is_selected:0},{id:9,name:"chest",is_selected:0},{id:10,name:"breast",is_selected:0},{id:11,name:"other (list)",is_selected:0}]),We=T({company_name:"",first_name:"",last_name:"",phone:"",email:"",address:"",state:"Ontraio",city:"",hst:"",r_ac:"",rmt_register:"",country:"Canada",postal:"L3S 0E2",company_id:"",number_companyname:""});T({destination_comp:"",state:"",city:"",address:"",phone:"",contact:"",customer_id:""});const Ie=T({name:"",id:""}),Pe=T({name:"",id:"",Therapist_id:""}),Be=T({}),Je=T({}),Fe=T({}),He=T({}),Re=T({}),Me=T({}),ze=T({}),qe=T({}),Ke=T({qo_item_str:"",name:"",address:"",way:"",shipping:[],itemsDetail:[],trackingNo:"",courier:"",comment:""}),Ye=T({total:0,pageSize:10,currentPage:1,background:!0,pageSizes:[10,25,50,100]}),Ue=T({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:"",bookingorder_id:"",room:"",current_jindu:"",current_weidu:"",clinic_name:"",is_distance:"all"});async function Ve(e){const{data:i}=await h(Object.assign(Je,{company_id:e.id}));1==i.code?(ti(),S({type:"success",message:i.msg})):S({type:"error",message:i.msg})}async function Ge(){const{data:e}=await v(Object.assign(oe,{date:K}));z.value="max-height:"+window.innerHeight+"px",e.code}async function Ze(e){be.action=e;const{data:i}=await a(Object.assign(ce,{month:be.month,action:be.action,click_date:be.click_date,many_one:"one"}));1==i.code&&(be.month=i.month,ae.value=i.data,V.value=i.higher_days[0],1!=e&&oi())}async function Qe(e){const{data:i}=await f(Object.assign(ge,{bookingorder_id:e}));1==i.code?(q.value=i.data,be.is_additional="",i.data.clients.additional_Service&&i.data.clients.additional_Service.forEach(((e,i)=>{e.is_Selected&&(be.is_additional=1)})),x.value=!0):S({type:"error",message:i.msg})}async function Xe(e){const{data:i}=await y(Object.assign(qe,{bookingorder_id:e.clients.id}));1==i.code?(oi(),S({type:"success",message:i.msg})):S({type:"error",message:i.msg})}async function $e(e){let i={detail:"",imageurl:""},t={detail:""};if("informed"==be.form_type){let e={information:be.time,signal_desc1:be.signal_desc1,signal_desc2:be.signal_desc2},t={signal_url1:be.signal_url1,signal_url2:be.signal_url2};i.detail=e,i.imageurl=t}if("treatment_plan"==be.form_type){let e={pendingProcessing:Le,information:ke};t.detail=e}if("treatment_note"==be.form_type){let e={information:we,usedData:Ne,areasData:Ae};t.detail=e}if("sensitived"==be.form_type){let e={information:Se,initialData:je,sensitived_desc:be.sensitived_desc},t={signal_url1:be.sensitived_url};i.detail=e,i.imageurl=t}if("ougoing"==be.form_type){let e={information:De,ougoing_desc1:be.ougoing_desc1,ougoing_desc2:be.ougoing_desc2,ougoing_desc3:be.ougoing_desc3,ougoing_desc4:be.ougoing_desc4,ougoing_desc5:be.ougoing_desc5},t={signal_url1:be.ougoing_url1,signal_url2:be.ougoing_url2,signal_url3:be.ougoing_url3,signal_url4:be.ougoing_url4,signal_url5:be.ougoing_url5};i.detail=e,i.imageurl=t}let a="";"treatment_plan"==be.form_type||"treatment_note"==be.form_type?a=t:"informed"!=be.form_type&&"sensitived"!=be.form_type&&"ougoing"!=be.form_type||(a=i);const{data:n}=await l(Object.assign(de,{note_id:be.note_id,form_type:be.form_type,data_row:a}));1==n.code?1==e&&(oi(),Qe(q.value.clients.id),W.value=!1,S({type:"success",message:n.msg})):S({type:"error",message:n.msg})}const ei=C([{id:1,date:"",time:"",duration:60}]);function ii(e){let i=ei.value.findIndex((i=>i.id===e.id));-1!==i&&ei.value.splice(i,1),ei.value.forEach(((e,i)=>{e.id=i+1}))}async function ti(){i.value=!0;const{data:e}=await d(Object.assign(se,{searchKey:Ue.searchKey,Therapist_id:ye.Therapist_id1}));G.value=e.data,i.value=!1}async function ai(){const{data:e}=await r(Object.assign(re,{pageSize:Ye.pageSize,page:Ye.currentPage,current_jindu:Ue.current_jindu,current_weidu:Ue.current_weidu,searchKey:Ue.searchKey,distance_meters:Ue.is_distance}));1==e.code?(ie.value=e.data.therapist_info,G.value=e.data.clinic_info,ye.Clinic_id=e.data.clinic_info[0].id,Ye.total=e.data.total,ni()):S({type:"error",message:e.msg})}async function ni(){const{data:e}=await _(Object.assign(_e,{clinic_id:ye.Clinic_id,therapists_id:ye.Therapist_id1,date:V.value,is_worktime:1}));if(1==e.code){ee.value=e.data.location_info,$.value=e.data.services_info,ye.Location_id=e.data.location_info[0].id,ye.loacation_name=e.data.location_info[0].company_name,e.data.location_info[0].is_Selected1=1,$.value.length>0&&($.value[0].is_Selected=1);let i=[],t=[];$.value.forEach(((e,a)=>{1==e.is_Selected&&(i.push(e),t.push(e.service_name))})),N.value=i,ye.service_name=t.toString(),N.value.length>0&&(N.value[0].is_Selected1=1,ye.service_name1=N.value[0].service_name,N.value[0].additional_Service?Z.value=JSON.parse(JSON.stringify(N.value[0].additional_Service)):Z.value=[])}else""!=ye.Clinic_id&&""!=ye.Therapist_id1||oi(),S({type:"error",message:e.msg})}function si(e){ye.Clinic_id=e,ye.Therapist_id1="",ni()}async function oi(){const{data:e}=await u(Object.assign(Fe,{date:V.value,services_array:ye.service_name,clinic_id:ye.Clinic_id,therapists_id:ye.Therapist_id1,page:ye.page}));1==e.code?(ne.value=e.data.content,Q.value=e.data.title,be.therapist_name=e.data.therapist_name,ye.next_page=e.page_data.next_page,ye.prev_page=e.page_data.prev_page,ti()):(Q.value=[],be.therapist_name="",ne.value=[],S({type:"error",message:e.msg}))}async function ci(){N.value.forEach(((e,i)=>{e.value==ye.service_name1&&e.id}));const{data:e}=await m(Object.assign(me,{descrption:ye.service_name1,Therapist_id:ye.Therapist_id,during:ye.During,customer_id:"",role:"",clinic_id:ye.Clinic_id,service_id:"",additional_Service:Z.value}));1==e.code?(ye.amount=e.total_amount,ye.During=e.during):S({type:"error",message:e.msg})}async function li(e){i.value=!0;const{data:t}=await b(Object.assign(ue,{booking_id:e.clients.id}));1==t.code?(x.value=!1,oi(),S({type:"success",message:t.msg})):S({type:"error",message:t.msg}),i.value=!1}function di(e,i){ri(e,i,1)}async function ri(e,i,t){be.is_form_edit=1,2!=t||"sensitived"!=i&&"informed"!=i||(be.is_form_edit=2),Y.value=e,1==t?be.note_id=e.clients.note_id:2==t&&(be.note_id=e.id),be.form_type=i;const{data:a}=await p(Object.assign(le,{note_id:be.note_id,form_type:i}));1==a.code?(W.value=!0,"informed"==be.form_type?(a.data.content?(be.time=a.data.content.information,be.signal_desc1=a.data.content.signal_desc1,be.signal_desc2=a.data.content.signal_desc2):be.time="",be.signal_url1=a.data.signal_url1,be.signal_url2=a.data.signal_url2):"treatment_plan"==be.form_type?a.data.content?(Object.keys(a.data.content.information).map((e=>{ke[e]=a.data.content.information[e]})),Le.value=a.data.content.pendingProcessing):(Object.keys(ke).map((e=>{ke[e]=""})),Le.value.forEach(((e,i)=>{e.is_selected=0}))):"treatment_note"==be.form_type?(a.data.content?(Ae.value=a.data.content.areasData,Ne.value=a.data.content.usedData,Object.keys(a.data.content.information).map((e=>{we[e]=a.data.content.information[e]}))):(Object.keys(we).map((e=>{we[e]=""})),Ae.value.forEach(((e,i)=>{e.is_selected=0})),Ne.value.forEach(((e,i)=>{e.is_selected=0}))),a.is_first&&(we.fee=e.clients.amount,we.duration=e.clients.session,we.time=e.clients.begin_time,we.date=e.date,we.notes=e.clients.customer_name,we.client_goal=e.clients.description,Oe.value.forEach(((i,t)=>{i.is_selected=0,i.text==e.clients.am_pm&&(i.is_selected=1,we.timeType=i.value)})))):"sensitived"==be.form_type?(a.data.content?(je.value=a.data.content.initialData,be.sensitived_desc=a.data.content.sensitived_desc,Object.keys(a.data.content.information).map((e=>{Se[e]=a.data.content.information[e]}))):(Object.keys(Se).map((e=>{Se[e]=""})),je.value.forEach(((e,i)=>{e.is_selected=0}))),be.sensitived_url=a.data.signal_url1):"ougoing"==be.form_type&&(a.data.content?(be.ougoing_desc1=a.data.content.ougoing_desc1,be.ougoing_desc2=a.data.content.ougoing_desc2,be.ougoing_desc3=a.data.content.ougoing_desc3,be.ougoing_desc4=a.data.content.ougoing_desc4,be.ougoing_desc5=a.data.content.ougoing_desc5,Object.keys(a.data.content.ougoingArr).map((e=>{De[e]=a.data.content.ougoingArr[e]}))):(Object.keys(De).map((e=>{De[e]=""})),be.ougoing_desc1="",be.ougoing_desc2="",be.ougoing_desc3="",be.ougoing_desc4="",be.ougoing_desc5=""),be.ougoing_url1=a.data.signal_url2,be.ougoing_url2=a.data.signal_url3,be.ougoing_url3=a.data.signal_url4,be.ougoing_url4=a.data.signal_url5,be.ougoing_url5=a.data.signal_url6),we.therapist=e.therapists_name):S({type:"error",message:a.msg})}const _i=C(null),ui=()=>new Promise(((e,i)=>{navigator.geolocation.getCurrentPosition((i=>e(i)),(e=>i(e)),{enableHighAccuracy:!0,timeout:3e4,maximumAge:0})}));return O((()=>{var e,i,t,a;ai(),(async()=>{try{if(navigator.permissions){const{state:e}=await navigator.permissions.query({name:"geolocation"});if("denied"===e)throw new Error("PERMISSION_DENIED")}const e=await ui();_i.value={latitude:e.coords.latitude,longitude:e.coords.longitude,accuracy:e.coords.accuracy},Ue.current_jindu=_i.value.longitude,Ue.current_weidu=_i.value.latitude}catch(e){}})(),e=new Date,i=e.getFullYear(),t=("0"+(e.getMonth()+1)).slice(-2),a=("0"+e.getDate()).slice(-2),K.value=i+"-"+t+"-"+a,Ze(1)})),{searchDetail:Ue,btnSearchPart:function(){ti()},loading:i,small:M,selectList:["勾选列","Avatar","Clinic Name","Descprion","Distance Meters","Create name","Address","Clinic Web","Phone","Email","Business Time","Therapists","Service name","Invitation code","HST"],columns:[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"序号列",type:"index",width:70,hide:({checkList:e})=>!e.includes("序号列")},{label:"Avatar",prop:"avatar",minWidth:100,slot:"Avatar",align:"center",hide:({checkList:e})=>!e.includes("Avatar")},{label:"Clinic Name",prop:"clinic_name",minWidth:100,hide:({checkList:e})=>!e.includes("Clinic Name")},{label:"Descprion",prop:"descprion",minWidth:100,hide:({checkList:e})=>!e.includes("Descprion")},{label:"Distance Meters",prop:"distance_meters",minWidth:100,hide:({checkList:e})=>!e.includes("Distance Meters")},{label:"Create name",prop:"hst",minWidth:100,slot:"Createname",hide:({checkList:e})=>!e.includes("Create name")},{label:"Address",prop:"address",minWidth:100,hide:({checkList:e})=>!e.includes("Address")},{label:"Clinic Web",prop:"clinic_web",minWidth:100,hide:({checkList:e})=>!e.includes("Clinic Web")},{label:"Phone",prop:"phone_number",minWidth:100,slot:"Phone",hide:({checkList:e})=>!e.includes("Phone")},{label:"Email",prop:"email",minWidth:100,hide:({checkList:e})=>!e.includes("Email")},{label:"Business Time",minWidth:100,slot:"BusinessTime",hide:({checkList:e})=>!e.includes("Business Time")},{label:"Therapists",prop:"Therapist_str",minWidth:100,hide:({checkList:e})=>!e.includes("Therapists")},{label:"Service name",prop:"service_name",minWidth:100,hide:({checkList:e})=>!e.includes("Service name")},{label:"Invitation code",prop:"invitation_code",minWidth:150,slot:"slotAction",hide:({checkList:e})=>!e.includes("Invitation code")},{label:"HST",prop:"hst",minWidth:100,hide:({checkList:e})=>!e.includes("HST")}],pagination:Ye,handleSizeChange:function(e){Ye.pageSize=e,ai()},handleCurrentChange:function(e){Ye.currentPage=e,ai()},PartList:G,deliverDialog:E,selectClick:(i,t)=>{if(i.length>1){const t=i.shift(),{toggleRowSelection:a}=e.value.getTableRef();a(t,!1)}si(t.id),Ue.clinic_name=t.clinic_name,j.value=!1},deliverDataArr:Ke,btnDeliverConfirm:async function(){const{data:e}=await t(Object.assign(Be,{data_row:We}));1==e.code?(ti(),F.value=!1,S({type:"success",message:e.msg})):S({type:"error",message:e.msg})},itemArr:ve,onSituationArr:function(e){ve.tableIndex=e},addLocationDialog:F,btnAdd:function(){Object.keys(We).map((e=>{We[e]=""})),F.value=!0},locationArr:We,EditLocation:function(e){Object.keys(e).map((i=>{We[i]=e[i]})),F.value=!0},btnDellocation:e=>{D.confirm("Are you sure you want to delete this location",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then((()=>{Ve(e)})).catch((()=>{S({type:"info",message:"Canceled"})}))},BookingInfoData:ne,Terapist:Q,get_table_box:z,bookingDate:K,serverDate:function(){Ge()},formArr:be,calendarData:ae,loadDaysClander:Ze,onDay:function(e){be.click_date=e.date,be.action="",Ze(be.action),ni()},addBookingDialog:H,onAddBooking:function(e){if("free"==e.status){ye.is_items=!1,ei.value=[];let i={id:1,date:e.date,time:"",duration:60};ye.Therapist_name=e.therapists_name,ye.Therapist_id=e.therapists_id,ye.service_times=e.time,ye.date=e.date,H.value=!0,ye.allow_code=e.allow_code,ye.allow_times_time=e.allow_times.end_time,ye.allow_times_mins=e.allow_times.mins,ei.value.push(i);let t=[];$.value.forEach(((e,i)=>{1==e.is_Selected&&t.push(e)})),N.value=t,N.value.length>0&&(N.value.forEach(((e,i)=>{e.is_Selected1=0})),N.value[0].is_Selected1=1,ye.service_name1=N.value[0].service_name,N.value[0].additional_Service?Z.value=JSON.parse(JSON.stringify(N.value[0].additional_Service)):Z.value=[]),ye.config_id="",ye.checkbox=!1,ye.During=60,ye.description="",ye.booking_id="",ci()}"new"==e.status&&Qe(e.clients.id)},addForm:ye,goPrivacy:function(){P.value=!0},PrivacyDialog:P,ClientDialog:B,eventIsNum:function(){ye.Client_id=Ie.id,ye.Client_name=Ie.name},ClientData:Ie,locationDialog:J,eventIsNumlocation:function(){ye.loacation_name=Pe.name,ye.loacation_id=Pe.id},locationData:Pe,onSelectLocation:function(){J.value=!0},onSelClient:function(){B.value=!0},btnAddConfirm:async function(){if(i.value=!0,0==ye.allow_code)return S({type:"error",message:"Appointment cannot be made during this time period"}),void(i.value=!1);if(ye.During>ye.allow_times_mins)return S({type:"error",message:"Max Mins: "+ye.allow_times_mins}),void(i.value=!1);if(!ye.checkbox)return S({type:"error",message:"Please read the Privacy Policy and check the box"}),void(i.value=!1);const{data:e}=await n(Object.assign(He,{clinics_id:ye.Clinic_id,therapist_list:ye.Therapist_id,description:ye.description,service_date:ye.date,service_times:ye.service_times,amount:ye.amount,first_name:"",last_name:"",phone:"",email:"",config_id:ye.config_id,add_session:"",during:ye.During,sex:ye.gender,customer_id:ye.Client_id,company_id:ye.Location_id,Description_type:ye.service_name1,owner_booking:"Y",mul_service:ei,additional_Service:Z.value,booking_id:ye.booking_id}));1==e.code?(i.value=!1,oi(),ye.booking_id&&Qe(ye.booking_id),H.value=!1):(i.value=!1,S({type:"error",message:e.msg}))},serviceData:$,onHealthForm:async function(e){he.name=e.clients.customer_name,be.userId1=e.clients.customer_id;const{data:i}=await s(Object.assign(Re,{customer_id:e.clients.customer_id}));1==i.code&&(A.value=i.model.health_info,Object.keys(i.model.information).map((e=>{he[e]=i.model.information[e]})),I.value=!0)},health_info:A,infoData:X,healthDialog:I,btnHealthConfirm:async function(){i.value=!0;let e={information:he,health_info:A.value};const{data:t}=await o(Object.assign(Me,{customer_id:q.value.clients.customer_id,data_row:e}));1==t.code?(S({type:"success",message:t.msg}),Qe(q.value.clients.id),I.value=!1,i.value=!1):(S({type:"error",message:t.msg}),i.value=!1)},onCheckIn:function(e){Ue.bookingorder_id=e.clients.id,R.value=!0},addDuringDialog:R,addDuringConfirm:async function(){if(""==Ue.room)return void S({type:"error",message:"Please fill in the room"});const{data:e}=await c(Object.assign(ze,{bookingorder_id:Ue.bookingorder_id,room:Ue.room}));1==e.code?(oi(),R.value=!1,S({type:"success",message:e.msg})):S({type:"error",message:e.msg})},onPaymant:e=>{D.confirm("Are you sure to payment?",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then((()=>{Xe(e)})).catch((()=>{S({type:"info",message:"Canceled"})}))},higher_days:V,onMore:function(e){e.clients.is_more=2},onRetract:function(e){e.clients.is_more=1},formDialog:W,Form1Edit:di,planArr:ke,noteArr:we,sensitivedArr:Se,ougoingArr:De,isData:Ce,isData1:Te,TimeData:Oe,DurationData:xe,initialData:je,areasData1:Ae,usedData1:Ne,receivedData1:Ee,treatedData:Le,submitNoteForm:$e,selectedTr:function(e,i){Ce.value.forEach(((e,i)=>{e.is_selected=0})),e.is_selected=1,ke.discussed_with=e.value},selectedTr1:function(e,i){Te.value.forEach(((e,i)=>{e.is_selected=0})),e.is_selected=1,ke.treatment_plan=e.value},btnInitia:function(e){1==e.is_selected?e.is_selected=0:e.is_selected=1},coatingRequire:function(e){1==e.is_selected?e.is_selected=0:0==e.is_selected&&(e.is_selected=1)},coatingRequire1:function(e){1==e.is_selected?e.is_selected=0:e.is_selected=1},coatingRequire2:function(e){1==e.is_selected?e.is_selected=0:e.is_selected=1},onTime:function(e,i){Oe.value.forEach(((e,i)=>{e.is_selected=0})),e.is_selected=1,we.timeType=e.value},onDuration:function(e,i){xe.value.forEach(((e,i)=>{e.is_selected=0})),e.is_selected=1,we.durationType=e.value},onReceived:function(e,i){Ee.value.forEach(((e,i)=>{e.is_selected=0})),e.is_selected=1,we.receivedType=e.value},items:ei,onDelete:e=>{D.confirm("Are you sure you want to delete this item ?",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then((()=>{ii(e)})).catch((()=>{S({type:"info",message:"Canceled"})}))},onAddItem:function(){let e={id:ei.value.length+1,time:"",date:ye.date,duration:60};ei.value.push(e)},autographDialog:L,openAutograph:function(e,i){fe.signal_url=i,fe.form_type=e,fe.note_id=be.note_id,$e(2),L.value=!0},signalData:fe,eventSignal:function(){di(Y.value,be.form_type)},singleTableRef:e,addServiceData:N,onServiceAdd:function(e){if(1==$.value.length)return;1==e.is_Selected?e.is_Selected=0:e.is_Selected=1;let i=[],t=[];$.value.forEach(((e,a)=>{1==e.is_Selected&&(i.push(e),t.push(e.service_name))})),ye.service_name=t.toString(),N.value=i,N.value.forEach(((e,i)=>{0==i?(e.is_Selected1=1,ye.service_name1=e.service_name):e.is_Selected1=0})),oi()},TherapistsData:ie,ClinicData:te,btnClinic:si,locationDataselect:ee,btnTherapist:function(e){ye.Clinic_id="",Ue.clinic_name="",ye.Therapist_id1=e,ni()},btnLocation:function(e){ye.Location_id=e,ee.value.forEach(((i,t)=>{e==i.id&&(ye.loacation_name=i.company_name)}))},onServiceAdd1:function(e){N.value.forEach(((e,i)=>{e.is_Selected1=0})),e.is_Selected1=1,ye.service_name1=e.service_name,e.additional_Service?Z.value=JSON.parse(JSON.stringify(e.additional_Service)):Z.value=[],ci()},btnDuring:function(){ci()},onArrowLeft:function(){-2==be.prev_page&&(be.click_date=be.last_day,be.action="click",Ze(be.action)),ye.prev_page>0&&(ye.page=ye.prev_page,oi())},onArrowRight:function(){-2==be.next_page&&(be.click_date=be.next_day,be.action="click",Ze(be.action)),ye.next_page>0&&(ye.page=ye.next_page,oi())},onDelBooking:function(e){1==e.clients.is_24hour?alert(e.clients.is_notice):onDelBooking1(e)},size:U,additionalService:Z,changeAdditional:function(){ci()},bookingDetailDialog:x,bookedArr:q,btnDelBooking:e=>{D.confirm("Are you sure you want to delete this booking ?",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then((()=>{li(e)})).catch((()=>{S({type:"info",message:"Canceled"})}))},btnEdit:function(e){ye.Therapist_name=e.therapists_name,ye.Therapist_id=e.therapists_id,ye.loacation_name=e.clients.company_name,ye.loacation_id=e.clients.company_id,N.value=JSON.parse(JSON.stringify($.value)),ye.service_name1=e.clients.description_type,N.value.forEach(((i,t)=>{i.is_Selected1=0,ye.service_name1==i.value&&(i.is_Selected1=1),e.clients.additional_Service?Z.value=e.clients.additional_Service:Z.value=[],ye.date=e.date,ye.service_times=e.time,ye.During=e.clients.session,ye.amount=e.clients.amount,ye.description=e.clients.description,ye.allow_times_time=e.allow_times.data.end_time,ye.allow_times_mins=e.allow_times.data.mins,ye.allow_code=e.allow_times.code,ye.checkbox=!0,ye.booking_id=e.clients.id})),H.value=!0},HealthArr:he,onHealth:function(e,i){1==i.is_selected?i.is_selected=0:0==i.is_selected&&(i.is_selected=1)},uploadSlotFile1:function(e,i,t){1==e.code&&(oi(),Qe(q.value.clients.id),S({type:"success",message:"Upload successful"}))},btnFormImgView:function(e){window.open(g+e.replace("/var/www/html/public",""))},btnFillout:function(e){be.is_historyAll=e,q.value.clients.other_note_detail.forEach(((i,t)=>{1==e?(i.is_informed=!0,i.is_ongoning=!0,i.is_sensitive=!0,i.is_treatment_note=!0,i.is_treatment_plan=!0,i.is_record=!0):2==e&&(i.is_informed=JSON.parse(JSON.stringify(i.is_informed_show)),i.is_ongoning=JSON.parse(JSON.stringify(i.is_ongoning_show)),i.is_sensitive=JSON.parse(JSON.stringify(i.is_sensitive_show)),i.is_treatment_note=JSON.parse(JSON.stringify(i.is_treatment_note_show)),i.is_treatment_plan=JSON.parse(JSON.stringify(i.is_treatment_plan_show)),i.is_record=JSON.parse(JSON.stringify(i.is_record_show)))}))},btnHistory:function(){1==be.is_form_history?be.is_form_history=2:be.is_form_history=1},onNotesForm:function(e,i){ri(e,i,2)},clinicDialog:j,selectClinic:function(){j.value=!0},onSearchKey:function(){ai()},distanceMeters:pe,onDistance:function(e){Ue.is_distance=e.value,ai()},viewIMG:function(e){window.open(e)}}}))}}}));