1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3483],{20135:function(e,i,n){"use strict";n.r(i),n.d(i,{ClinicPage:function(){return q}});var a=n(27812),s=n(59499),l=n(50029),c=n(16835),r=n(87794),t=n.n(r),d=n(67294),o=n(11163),p=n(65242),h=n(14890),u=n(12783),m=n(95239),f=n(41139),g=n(39568),v=n(63238),x=n(98708),_=n(2744),j=n(79937),y=n(61692),N=n(84979),b=n(24742),k=n(92165),w=n(96349),P=n(32264),C=n(36618),S=n(2240),E=n(25534),Z=n(96268),I=n(48524),F=n(5199),L=n(46338),O=n(8975),D=n(14759),A=n(19938),M=n(92814),T=n(92565),B=n(85893);function R(e,i){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);i&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function z(e){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?R(Object(n),!0).forEach(function(i){(0,s.Z)(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}var J=x.Z.supportsLocalStorage()&&x.Z.supportsSessionStorage()||!1,U=j.ZP.metas,G=U.og;G.description,G.locale,U.seo.description;var K=u.ZP.div.withConfig({componentId:"sc-1loqjy9-0"})([""]);function q(e){e.isFetching;var i=e.isLogging,n=void 0!==i&&i,r=e.disconnectUser,p=e.getUserInfo,h=e.selfInfo,u=e.doctor,f=e.admin,g=e.userAuth,v=e.transferAdminProfileData,x=e.initProfileSetup,L=e.doctorUpdate
1Clinic,R=e.getClinicById,U=e.doctorRegisterClinic,G=e.adminJoinClinic,q=e.editServiceCategoryByAdmin,H=e.downloadServiceList,V=e.importServiceList,W=e.t,X=e.i18n,Q=e.getPatientDiseases,Y=(0,d.useState)({specialty:"",location:"",name:""});Y[0],Y[1],(0,d.useState)(J)[0];var ee=(0,o.useRouter)(),ei=ee.replace,en=ee.push,ea=ee.query,es=(0,d.useRef)(),el=(0,d.useRef)(),ec=(0,d.useRef)(),er=(0,d.useRef)(),et=(0,d.useRef)(),ed=(0,d.useRef)(),eo=(0,d.useState)({isEditTitle:!1,isEditIntro:!1,isEditLang:!1,isEditService:!1,isEdit:!1,isEditPayment:!1,isEditPhone:!1,selectClinic:ea.id,name:"",address:"",lat:0,lng:0,phone:"",star:0,num_apt:0,introduction:"",language:{},settingEachDayOfWeek:!1,has_lunch:!1,services_image:"",business_license_image:"",specialty:[],specialtyKey:[],business_license_number:"",avatar:"",arrayStar:[null,null,null,null,null],payment_method_accepted:{},new_payment:"",insurance:{},new_insurance:"",schedule:{mon:{has_open:!0,has_lunch:!1,open:9,lunch_start:12,lunch_stop:13,close:17},tue:{has_open:!0,has_lunch:!1,open:9,lunch_start:12,lunch_stop:13,close:17},wed:{has_open:!0,has_lunch:!1,open:9,lunch_start:12,lunch_stop:13,close:17},thurs:{has_open:!0,has_lunch:!1,open:9,lunch_start:12,lunch_stop:13,close:17},fri:{has_open:!0,has_lunch:!1,open:9,lunch_start:12,lunch_stop:13,close:17},sat:{has_open:!0,has_lunch:!1,open:9,lunch_start:12,lunch_stop:13,close:17},sun:{has_open:!0,has_lunch:!1,open:9,lunch_start:12,lunch_stop:13,close:17}},clinic_id:ea.id,clinic_role:"owner"}),ep=eo[0],eh=eo[1],eu=(0,d.useState)({}),em=eu[0],ef=eu[1],eg=(0,F.fP)(["name"]),ev=(0,c.Z)(eg,2),ex=ev[0];ev[1],(0,d.useCallback)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return function(){return en(e)}},[]);var e_,ej=(0,d.useState)(function(){return[]}),ey=ej[0],eN=ej[1],eb=(e_=(0,l.Z)(t().mark(function e(){var i,n,a;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i={token:ex.access_token,language:X.language},!(Q&&0===ey.length)){e.next=7;break}return e.next=4,Q(i,!1);case 4:eN(e.sent.payload.data.data.location);case 7:case"end":return e.stop()}},e)})),function(){return e_.apply(this,arguments)});(0,d.useEffect)(function(){r(),eb()},[]),(0,d.useEffect)(function(){ep.isEditTitle&&$(".select-specialty").selectpicker({noneSelectedText:W("providers:select_specialty")})},[ep.isEditTitle]),(0,d.useEffect)(function(){ea.id&&f&&f.profile&&eZ.getClinic(!0)},[ea.id]),(0,d.useEffect)(function(){if(h&&h.admin&&f&&!f.profile&&eZ.getClinic(!0),!u||u.initProfile&&u.initProfile.insurance&&u.initProfile.insurance.length&&u.initProfile.payment_method_accepted&&u.initProfile.payment_method_accepted.length||eZ.initProfile(),!ea.id&&h&&h.admin&&h.admin.clinic&&h.admin.clinic.length){for(var e in h.admin.clinic)if("active"==h.admin.clinic[e].status){window.location.assign([window.location.origin,"/admin/clinic?id=",h.admin.clinic[e].clinic_id].join(""));break}}},[h]),(0,d.useEffect)(function(){var e="clinic";if(f&&f.profile&&f.profile[e]&&f.profile[e].length){var i={},n={},a={};for(var s in f.profile[e])if(f.profile[e][s].clinic_id==ea.id){if(f.profile[e][s].language)for(var l in f.profile[e][s].language)i[f.profile[e][s].language[l]]=!0;if(f.profile[e][s].payment_method_accepted)for(var l in f.profile[e][s].payment_method_accepted)n[f.profile[e][s].payment_method_accepted[l]]=!0;if(f.profile[e][s].insurance)for(var l in f.profile[e][s].insurance)a[f.profile[e][s].insurance[l]]=!0;var c=ep.schedule;if(f.profile[e][s].schedule){var r={};["mon","tue","wed","thurs","fri","sat","sun"].map(function(i,n){r=JSON.parse(f.profile[e][s].schedule[i]),c[i]=z(z({},c[i]),r),c[i].has_open,c[i].has_lunch})}eh(z(z({},ep),{name:f.profile[e][s].name,address:f.profile[e][s].address,num_apt:f.profile[e][s].num_apt,star:f.profile[e][s].star,phone:f.profile[e][s].phone,lat:f.profile[e][s].lat,lng:f.profile[e][s].lng,introduction:f.profile[e][s].introduction,services_image:f.profile[e][s].services_image,business_license_image:f.profile[e][s].business_license_image,specialty:f.profile[e][s].specialty,specialtyKey:eZ.getSpecialtyKey(f.profile[e][s].specialty),avatar:f.profile[e][s].avatar,language:i,schedule:c,settingEachDayOfWeek:!f.profile[e][s].schedule||1!=f.profile[e][s].schedule.same_in_week,has_lunch:!!f.profile[e][s].schedule&&1==f.profile[e][s].schedule.same_in_week&&!!c.mon.has_lunch,clinic_id:ea.id,isEdit:!1,
1clinic_role:f.profile[e][s].role,status:f.profile[e][s].status,is_super:f.profile[e][s].is_super,active_service:f.profile[e][s].active_service,service_list:f.profile[e][s].service_list,extra_avatar:f.profile[e][s].extra_avatar,payment_method_accepted:n,insurance:a,new_payment:"",new_insurance:"",isEditTitle:!1,isEditIntro:!1,isEditLang:!1,isEditService:!1,isEditPhone:!1,isEditSpecialties:!1,isEditPayment:!1,isEditInsurance:!1}))}}},[f,ea.id]),(0,d.useCallback)(function(e){e&&e.preventDefault(),ei("/")},[]);var ek,ew,eP,eC,eS,eE=function(){return!0},eZ={toggleActiveSpecialties:function(e){var i=(0,a.Z)(ep.specialtyKey),n=i.indexOf(e.id);-1!=n?i.splice(n,1):i.push(e.id),eh(z(z({},ep),{specialtyKey:i}))},renderListSpecialties:function(){var e=[];if(u.initProfile&&u.initProfile.specialty)for(var i in u.initProfile.specialty)e.push((0,B.jsx)("div",{className:-1!=ep.specialtyKey.indexOf(u.initProfile.specialty[i].id)?"box-full pointer":"box-full box-full-inactive pointer",onClick:function(){return eZ.toggleActiveSpecialties(u.initProfile.specialty[i])},children:u.initProfile.specialty[i].name},i));return e},renderListExtraPhoto:function(){var e=[];if(""==ep.name)return e;if("owner"!=ep.clinic_role){if(ep.extra_avatar&&ep.extra_avatar.length)for(var i in ep.extra_avatar)e.push((0,B.jsx)("div",{className:"inline pull-left",style:{margin:"10px 10px 0 0"},children:(0,B.jsx)("img",{className:"img-border",src:y.ZP.getDoctorImg(ep.extra_avatar[i].thumb_path),width:"120",height:"120"})}));return e}var n,s=ep.extra_avatar&&ep.extra_avatar.length?(0,a.Z)(ep.extra_avatar):[],l=0;if(s.length){if((n=10-s.length)>0)for(var i=0;i<n;i++)s.push({id:"no-"+i,path:"",thumb_path:""})}else for(var i=0;i<10;i++)0==i&&(s=[]),s.push({id:"no-"+i,path:"",thumb_path:""});for(var i in s)e.push((0,B.jsx)(D.gj,{source:s[i].thumb_path,posId:s[i].id,noCrop:!0,noChangeSrc:!0,onSave:eZ.savePhoto,hasDelete:""!=s[i].path,customClass:-1==s[i].id.toString().indexOf("no")?"extra-photo pull-left no-background post-id-".concat(s[i].id):"extra-photo pull-left post-id-".concat(s[i].id)}));return e},renderBoxItem:function(e){var i=[];switch(e){case"specialties":if(ep.specialty&&ep.specialty.length)for(var n in ep.specialty)i.push((0,B.jsx)("div",{className:"box-full",children:ep.specialty[n].name},n));break;case"language":if(ep.language&&Object.keys(ep.language).length){var a={vi:"Tiếng Viá»t",en:"English",fr:"Fran\xe7aise",ca:"áá¶áá¶áááááá",cn:"䏿",kr:"íêµì´",jp:"æ¥æ¬èª"};for(var n in ep.language)i.push((0,B.jsxs)("div",{class:"box-border clearfix",style:{padding:"8px 8px 0 8px"},children:[(0,B.jsx)("div",{className:"list-language inline "+n}),(0,B.jsx)("div",{className:"inline pull-right",children:a[n]})]}))}break;case"payment_method_accepted_edit":var s=[],l=[];if(u&&u.initProfile&&u.initProfile.payment_method_accepted&&u.initProfile.payment_method_accepted.length)for(var n in u.initProfile.payment_method_accepted)n%2==0?l.push((0,B.jsxs)("div",{className:"form-check no-padding margin-tb-10",children:[(0,B.jsx)("input",{className:"form-check-input",type:"checkbox",value:u.initProfile.payment_method_accepted[n].code,checked:ep.payment_method_accepted[u.initProfile.payment_method_accepted[n].code],onChange:eI("payment_method_accepted",u.initProfile.payment_method_accepted[n].code),id:u.initProfile.payment_method_accepted[n].code}),(0,B.jsxs)("label",{className:"form-check-label clearfix",htmlFor:u.initProfile.payment_method_accepted[n].code,children:[(0,B.jsx)("div",{style:{marginLeft:"10px"},className:"list-payment-method-provider inline pull-right "+u.initProfile.payment_method_accepted[n].code}),(0,B.jsx)("div",{className:"inline",children:u.initProfile.payment_method_accepted[n].name})]})]},n)):s.push((0,B.jsxs)("div",{className:"form-check no-padding margin-tb-10",children:[(0,B.jsx)("input",{className:"form-check-input",type:"checkbox",value:u.initProfile.payment_method_accepted[n].code,checked:ep.payment_method_accepted[u.initProfile.payment_method_accepted[n].code],onChange:eI("payment_method_accepted",u.initProfile.payment_method_accepted[n].code),id:u.initProfile.payment_method_accepted[n].code}),(0,B.jsxs)("label",{className:"form-check-label clearfix",htmlFor:u.initProfile.payment_method_accepted[n].code,children:[(0,B.jsx)("div",{style:{marginLeft:"10px"}
1,className:"list-payment-method-provider inline pull-right "+u.initProfile.payment_method_accepted[n].code}),(0,B.jsx)("div",{className:"inline",children:u.initProfile.payment_method_accepted[n].name})]})]},n));s.push((0,B.jsxs)("div",{className:"form-check no-padding margin-tb-10",children:[(0,B.jsx)("input",{className:"form-check-input",type:"checkbox",value:"",checked:!0,onChange:eI("new_payment_check"),id:"new-payment"}),(0,B.jsx)("label",{className:"form-check-label clearfix",htmlFor:"new-payment",children:(0,B.jsxs)("div",{className:"inline",style:{borderBottom:"1px solid #707070"},children:[(0,B.jsxs)("div",{className:"inline",children:[W("other"),":"]}),(0,B.jsx)("input",{className:"",style:{border:"none",width:"150px"},value:ep.new_payment,onChange:eI("new_payment")}),(0,B.jsxs)("div",{className:"inline",style:{borderLeft:"1px solid #707070",paddingLeft:"5px"},children:[ep.new_payment.length?ep.new_payment.length:"","/12"]})]})})]},"new-payment")),i.push((0,B.jsxs)("div",{children:[(0,B.jsx)("div",{className:"col-md-6 inline pull-left",children:s}),(0,B.jsx)("div",{className:"col-md-6 inline",children:l})]}));break;case"payment_method_accepted":if(ep.payment_method_accepted&&u.initProfile&&u.initProfile.payment_method_accepted&&Object.keys(ep.payment_method_accepted).length)for(var n in ep.payment_method_accepted)for(var c in u.initProfile.payment_method_accepted)u.initProfile.payment_method_accepted[c].code==n&&i.push((0,B.jsxs)("div",{className:"box-border clearfix",children:[(0,B.jsx)("div",{className:"list-payment-method-provider inline pull-left "+u.initProfile.payment_method_accepted[c].code}),(0,B.jsx)("span",{style:{marginLeft:"10px",lineHeight:"30px"},children:u.initProfile.payment_method_accepted[c].name})]}));break;case"insurance":if(ep.insurance&&u.initProfile&&Object.keys(ep.insurance).length)for(var n in ep.insurance)for(var c in u.initProfile.insurance)u.initProfile.insurance[c].code==n&&i.push((0,B.jsxs)("div",{className:"box-border clearfix",children:[(0,B.jsx)("div",{className:"list-insurance inline pull-left "+u.initProfile.insurance[c].code}),(0,B.jsx)("span",{style:{marginLeft:"10px",lineHeight:"30px"},children:u.initProfile.insurance[c].name})]}));break;case"insurance_edit":var s=[],l=[];if(u&&u.initProfile&&u.initProfile.insurance&&u.initProfile.insurance.length)for(var n in u.initProfile.insurance)n%2==0?l.push((0,B.jsxs)("div",{className:"form-check no-padding margin-tb-10",children:[(0,B.jsx)("input",{className:"form-check-input",type:"checkbox",value:u.initProfile.insurance[n].code,checked:ep.insurance[u.initProfile.insurance[n].code],onChange:eI("insurance",u.initProfile.insurance[n].code),id:u.initProfile.insurance[n].code}),(0,B.jsxs)("label",{className:"form-check-label clearfix",htmlFor:u.initProfile.insurance[n].code,children:[(0,B.jsx)("div",{style:{marginLeft:"10px"},className:"list-insurance inline pull-right "+u.initProfile.insurance[n].code}),(0,B.jsx)("div",{className:"inline",children:u.initProfile.insurance[n].name})]})]},n)):s.push((0,B.jsxs)("div",{className:"form-check no-padding margin-tb-10",children:[(0,B.jsx)("input",{className:"form-check-input",type:"checkbox",value:u.initProfile.insurance[n].code,checked:ep.insurance[u.initProfile.insurance[n].code],onChange:eI("insurance",u.initProfile.insurance[n].code),id:u.initProfile.insurance[n].code}),(0,B.jsxs)("label",{className:"form-check-label clearfix",htmlFor:u.initProfile.insurance[n].code,children:[(0,B.jsx)("div",{style:{marginLeft:"10px"},className:"list-insurance inline pull-right "+u.initProfile.insurance[n].code}),(0,B.jsx)("div",{className:"inline",children:u.initProfile.insurance[n].name})]})]},n));s.push((0,B.jsxs)("div",{className:"form-check no-padding margin-tb-10",children:[(0,B.jsx)("input",{className:"form-check-input",type:"checkbox",value:"",checked:!0,onChange:eI("new_insurance_check"),id:"new-insurance"}),(0,B.jsx)("label",{className:"form-check-label clearfix",htmlFor:"new-insurance",children:(0,B.jsxs)("div",{className:"inline",style:{borderBottom:"1px solid #707070"},children:[(0,B.jsxs)("div",{className:"inline",children:[W("other"),":"]}),(0,B.jsx)("input",{className:"",style:{border:"none",width:"150px"},value:ep.new_insurance,onChange:eI("new_insurance")}),(0,B.jsxs)("div",{className:"inline",style:{borderLeft:"1px solid #707070",paddingLeft:"5px"},children:[ep.new_insurance.length?ep.new_insurance.length:"","/12"]})]})})]},"new-insurance")),i.push((0,B.jsxs)("div",{children:[(0,B.jsx)("div",{className:"col-md-6 inline pull-left",children:s}),(0,B.jsx)("div",{className:"col-md-6 inline",children:l})]}));break;case"payment_method_accepted":if(ep.insurance&&Object.keys(ep.insurance).length)for(var n in ep.insurance)for(var c in u.initProfile.insurance)u.initProfile.insurance[c].code==n&&i.push((0,B.jsxs)("div",{className:"box-border clearfix",children:[(0,B.jsx)("div",{className:"list-payment-method-provider inl
1ine pull-left "+u.initProfile.insurance[c].code}),(0,B.jsx)("span",{style:{marginLeft:"10px",lineHeight:"30px"},children:u.initProfile.insurance[c].name})]}))}return i.length||i.push((0,B.jsx)("div",{children:W("no_info")})),i},savePhoto:function(e,i,n){if(n)eZ.handleSave({is_remove_extra_photo:1,photo_id:i});else{var s=(0,a.Z)(ep.extra_avatar);if("avatar"==i)eZ.handleSave({avatar:e});else{var l=!1;if(s&&s.length){for(var c in s)s[c].id==i&&(s[c].path=e,l=!0);l||s.push({path:e})}else s=[{path:e}];eZ.handleSave({extra_avatar:s})}}},editServiceCategory:(ek=(0,l.Z)(t().mark(function e(i){var n,a;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={is_admin:1,type:"clinic",clinic_id:ea.id},n="delete"==i.action_type?z(z({},n),i):1==i.is_new_service||1==i.is_active_service?z(z({},n),i):z(z({},n),{service_list_id:i.service_list_id,category:{id:!!i.cat_id&&i.cat_id,name:i.cat_name,data:i.service}}),i.type="clinic",e.prev=3,e.next=6,q(n,ex.access_token);case 6:if(a=e.sent,(0,w.Z)("res_success",W("success"),W("update_success")),!(a&&a.payload&&a.payload.data&&a.payload.data.data&&a.payload.data.attr)||!et.current){e.next=18;break}e.t0=a.payload.data.attr.action_type,e.next="add_service_list"===e.t0?13:"add_category"===e.t0?16:"delete_category"===e.t0?16:"edit_category"===e.t0?16:"active_service"===e.t0?16:18;break;case 13:return a.payload.data.attr.service_list&&et.current.setListService(a.payload.data.attr.service_list),et.current.setActiveService(a.payload.data.data),e.abrupt("break",18);case 16:return et.current.setActiveService(a.payload.data.data),e.abrupt("break",18);case 18:e.next=23;break;case 20:e.prev=20,e.t1=e.catch(3),e.t1&&e.t1.data&&e.t1.data.error&&e.t1.data.error&&(0,w.Z)("res_fail",W("error"),y.ZP.getMsgErrorFromApi(e.t1.data.error));case 23:case"end":return e.stop()}},e,null,[[3,20]])})),function(e){return ek.apply(this,arguments)}),foo:function(){"owner"==ep.clinic_role&&er.current&&er.current.showModal()},getListPhoto:function(e){var i=[];if(e&&e.length)for(var n in e)i.push(e[n].path);return i},onMultiImagesSave:function(e){e&&e.length&&eZ.handleSave({avatar:e[0],extra_avatar:e})},getSpecialtyKey:function(e){var i=[];if(!e||!e.length)return[];for(var n in e)i.push(e[n].id);return i},getSpecialtyStr:function(e){var i=[];if(!e||!e.length)return"";for(var n in e)i.push(e[n].name);return i.join(", ")},handleSaveGpsAddress:function(e,i){if(!i){ec.current.showModal();return}e&&eh(z(z({},ep),{address:e.address,lat:e.lat,lng:e.lng}))},showModalRequestStaffClinic:(ew=(0,l.Z)(t().mark(function e(i){return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!i.success||(el.current.setConfirmData({msg:(0,O.sprintf)(W("providers:request_join_staff_clinic"),i.clinicName)}),el.current.showModal(),!i.clinicName)){e.next=7;break}return e.next=6,p(ex.access_token,!0);case 6:v();case 7:case"end":return e.stop()}},e)})),function(e){return ew.apply(this,arguments)}),addClinic:function(e,i){if(!i){es.current.showModal();return}},getClinic:(eP=(0,l.Z)(t().mark(function e(i){var n,a,s;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(ea.id){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,R(ea.id,ex.access_token);case 4:if((n=e.sent)&&n.payload&&n.payload.data&&n.payload.data.data&&i){if((a=g.selfInfo.admin).clinic&&a.clinic.length)for(s in a.clinic)a.clinic[s].clinic_id==n.payload.data.data.clinic_id&&(a.clinic[s]=n.payload.data.data);v(a)}case 6:case"end":return e.stop()}},e)})),function(e){return eP.apply(this,arguments)}),getListClinic:function(){var e=[];return f&&f.profile&&f.profile.clinic.length&&f.profile.clinic.map(function(i,n){e.push((0,B.jsx)("option",{value:i.clinic_id,children:i.name},n))}),e},goCalendar:function(){f.profile&&f.profile.clinic&&f.profile.clinic[0]?en({pathname:"/admin/calendar",query:{id:f.profile.clinic[0].clinic_id}}):(0,w.Z)("res_fail",W("error"),W("providers:no_clinic_found"))},getListHousr:function(){for(var e,i,n,a=[],s=6;s<=23;s+=.5)s<=12?(i=(s-parseInt(s))*60,e=[s<10?[0,parseInt(s)].join(""):parseInt(s),":",i>0?i<10?[0,i].join(""):i:"00","AM"].join(" ")):(i=((n=s-12)-parseInt(n))*60,e=[n<10?[0,parseInt(n)].join(""):parseInt(n),":",i>0?i<10?[0,i].join(""):i:"00","PM"].join(" ")),a.push((0,B.jsx)("option",{value:s,children:e},s));return a},getDayName:function(e){switch(e){case"mon":return W("providers:monday");case"tue":return W("providers:tuesday");case"wed":return W("providers:wednesday");case"thurs":return W("providers:thursday");case"fri":return W("providers:friday");case"sat":return W("providers:saturday");case"sun":return W("providers:sunday")}},getTitleOpenADay:function(e){switch(e){case"mon":return W("providers:clinic_is_open_monday");case"tue":return W("providers:clinic_is_open_tuesday");case"wed":return W("providers:clinic_is_open_wednesday");case"thurs":return W("providers:clinic_is_open_thursday");case"fri":return W("providers:clinic_is_open_friday");case"sat":return W("providers:clinic_is_open_saturday");case"sun":return W("providers:clinic_is_open_sunday")}},initProfile:(eC=(0,l.Z)(t().mark(function e(){return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x(ex.access_token,{has_payment_method:1,has_insurance:1},!0);case 2:e.sent;case 3:case"end":return e.stop()}},e)})),function(){return eC.apply(this,arguments)}),getLanguage:function(){if(u.initProfile)return y.ZP.getLanguage(ep.language,u.initProfile.language)},doEdit:function(e){eh(z(z({},ep),{},(0,s.Z)({},e,!0)))},formValidation:function(){var e,i,n,a,s={};for(var l in""==ep.name&&(s.name=W("errors.empty")),""==ep.address&&(s.address=W("errors.empty")),ep.schedule)e=parseFloat(ep.schedule[l].open),i=parseFloat(ep.schedule[l].close),n=parseFloat(ep.schedule[l].lunch_start),a=parseFloat(ep.schedule[l].lunch_stop),e>=i&&(s.schedule||(s.schedule={}),s.schedule[l]||(s.schedule[l]={}),s.schedule[l].open=W("providers:must_lower_than_close_time")),ep.schedule[l].has_lunch&&n<=e&&(s.schedule||(s.schedule={}),s.schedule[l]||(s.schedule[l]={}),s.schedule[l].lunch_start=W("providers:must_greater_than_open_time")),ep.schedule[l].has_lunch&&n>=a&&(s.schedule||(s.schedule={}),s.schedule[l]||(s.schedule[l]={}),s.schedule[l].lunch_start=W("providers:must_lower_than_lunch_stop")),ep.schedule[l].has_lunch&&n>=i&&(s.schedule||(s.schedule={}),s.schedule[l]||(s.schedule[l]={}),s.schedule[l].lunch_start=W("providers:must_lower_than_close_time")),ep.schedule[l].has_lunch&&a>=i&&(s.schedule||(s.schedule={}),s.schedule[l]||(s.schedule[l]={}),s.schedule[l].lunch_stop=W("providers:must_lower_than_close_time"));return!Object.keys(s).length||(ef(s),!1)},handleSave:(eS=(0,l.Z)(t().mark(function e(i){var n,a,s,l,c;return t().wrap(function(e){for(;;
1)switch(e.prev=e.next){case 0:if(eZ.formValidation()){e.next=3;break}return(0,w.Z)("res_fail",W("error"),W("errors.require_field_incomplete")),e.abrupt("return");case 3:if(n={clinic_id:ep.clinic_id,clinic_role:"owner",name:ep.name,address:ep.address,lat:ep.lat,lng:ep.lng,introduction:ep.introduction,avatar:ep.avatar,services_image:ep.services_image,business_license_image:ep.business_license_image,specialty:ep.specialtyKey,language:[],payment_method_accepted:[],phone:ep.phone},i&&(n=z(z({},n),i)),a=[],s=[],l=[],Object.keys(ep.language).length){for(c in ep.language)ep.language[c]&&a.push(c);n.language=a}if(Object.keys(ep.payment_method_accepted).length){for(c in ep.payment_method_accepted)ep.payment_method_accepted[c]&&s.push(c);n.payment_method_accepted=s}if(ep.new_payment&&ep.new_payment.length&&(n.new_payment=ep.new_payment),Object.keys(ep.insurance).length){for(c in ep.insurance)ep.insurance[c]&&l.push(c);n.insurance=l}if(ep.new_insurance&&ep.new_insurance.length&&(n.new_insurance=ep.new_insurance),ep.settingEachDayOfWeek)for(c in n.schedule={same_in_week:"0"},ep.schedule)n.schedule[c]={has_open:ep.schedule[c].has_open?1:0,has_lunch:ep.schedule[c].has_lunch?1:0},n.schedule[c].has_open&&(n.schedule[c].open=ep.schedule[c].open,n.schedule[c].close=ep.schedule[c].close),n.schedule[c].has_lunch&&(n.schedule[c].lunch_start=ep.schedule[c].lunch_start,n.schedule[c].lunch_stop=ep.schedule[c].lunch_stop),n.schedule[c]=JSON.stringify(n.schedule[c]);else for(c in n.schedule={same_in_week:"1"},ep.schedule)n.schedule[c]={has_open:ep.schedule.mon.has_open?1:0,has_lunch:ep.schedule.mon.has_lunch?1:0},n.schedule[c].has_open&&(n.schedule[c].open=ep.schedule.mon.open,n.schedule[c].close=ep.schedule.mon.close),n.schedule[c].has_lunch&&(n.schedule[c].lunch_start=ep.schedule.mon.lunch_start,n.schedule[c].lunch_stop=ep.schedule.mon.lunch_stop),n.schedule[c]=JSON.stringify(n.schedule[c]);return e.prev=12,e.next=15,L(n,ex.access_token);case 15:e.sent,(n.new_payment||n.new_insurance)&&eZ.initProfile(),(0,w.Z)("res_success",W("success"),W("update_success")),eZ.getClinic(!0),e.next=23;break;case 21:e.prev=21,e.t0=e.catch(12);case 23:case"end":return e.stop()}},e,null,[[12,21]])})),function(e){return eS.apply(this,arguments)})},eI=function(e,i,n){return function(n){var a=n.target.value;switch(e){case"new_payment":case"new_insurance":a.length<=12&&eh(z(z({},ep),(0,s.Z)({},e,a)));break;case"payment_method_accepted":case"insurance":case"language":var l=ep[e];l[i]=n.target.checked,eh(z(z({},ep),{},(0,s.Z)({},e,l)));break;case"selectClinic":en({pathname:"/admin/clinic",query:{id:n.target.value}}),eh(z(z({},ep),{selectClinic:n.target.value})),et.current&&et.current.reset();break;case"language":var l=ep.language;l[i]=n.target.checked,eh(z(z({},ep),{},{language:l}));break;case"specialtyKey":for(var c=[],r=n.target.options,t=0,d=r.length;t<d;t++)r[t].selected&&c.push(r[t].value);eh(z(z({},ep),{specialtyKey:c}));break;default:eh(z(z({},ep),(0,s.Z)({},e,a)))}}},eF=function(e,i){if(e.files&&e.files[0]){var n=new FileReader;n.onload=function(e){$(".profile-img "+i).html('<img src="'+e.target.result+'" width="150" height="150" />')},n.readAsDataURL(e.files[0])}}
1,eL={action:[j.ZP.api.url,j.ZP.api.uploadImg].join("/"),data:{object_type:"doctor"},headers:{Authorization:"Bearer "+ex.access_token},multiple:!1,beforeUpload:function(e){return -1==$.inArray(e.name.split(".").pop().toLowerCase(),["png","jpg","jpeg","gif","tiff","raw"])?((0,w.Z)("res_fail",W("error"),W("error_image_format")),!1):e.size>2e7?((0,w.Z)("res_fail",W("error"),W("error_image_size")),!1):void eF($('.profile-img .img-upload-avatar input[type="file"]')[0],".img-upload-avatar")},onStart:function(e){},onSuccess:function(e){e&&e.data&&e.data.url&&(eh(z(z({},ep),{avatar:e.data.url})),eZ.handleSave({avatar:e.data.url}))},onProgress:function(e,i){},onError:function(e){}},eO={action:[j.ZP.api.url,j.ZP.api.uploadImg].join("/"),data:{object_type:"doctor"},headers:{Authorization:"Bearer "+ex.access_token},multiple:!1,beforeUpload:function(e){var i=y.ZP.allowUploadExtension;return -1==$.inArray(e.name.split(".").pop().toLowerCase(),i)?((0,w.Z)("res_fail",W("error"),W("error_image_format")),!1):e.size>2e7?((0,w.Z)("res_fail",W("error"),W("error_image_size")),!1):void eF($('.profile-img2 .img-upload-services_image input[type="file"]')[0],".img-upload-services_image")},onStart:function(e){},onSuccess:function(e){e&&e.data&&e.data.url&&(eh(z(z({},ep),{services_image:e.data.url})),eZ.handleSave({services_image:e.data.url}))},onProgress:function(e,i){},onError:function(e){}};return(0,B.jsx)(b.Z,{areaFor:"providers",children:(0,B.jsx)(K,{children:(0,B.jsx)(N.Z,{title:W("provider_clinic_title"),authArea:!1,selfInfo:h,areaFor:"admin",children:(0,B.jsxs)(I.Z,{module:"profile-info",children:[ep.extra_avatar&&(0,B.jsx)(E.Z,{ref:er,cropImgModalRef:ed,photos:eZ.getListPhoto(ep.extra_avatar),onSave:eZ.onMultiImagesSave}),(0,B.jsx)(C.Z,{doctor:u,doctorRegisterClinic:U,saveEvent:eZ.showModalRequestStaffClinic,ref:el}),(0,B.jsx)(P.Z,{doctor:u,admin:f,selfInfo:h,adminJoinClinic:G,saveEvent:eZ.showModalRequestStaffClinic,ref:es}),(0,B.jsx)(S.Z,{doctor:u,saveEvent:eZ.handleSaveGpsAddress,addressInfo:{address:ep.address,lat:ep.lat,lng:ep.lng},ref:ec,location:ey}),(0,B.jsx)(k.Z,{activeMenu:"clinic",admin:f,selfInfo:h}),(0,B.jsxs)("div",{className:"provider-content service-list",children:[(0,B.jsxs)("div",{className:"provider-title",children:[(0,B.jsx)("div",{className:"inline pull-left provider-header-title",children:W("providers:clinic")}),(0,B.jsx)("span",{style:{marginLeft:"5px",fontWeight:"normal",fontSize:"16px"},children:(0,B.jsx)("select",{style:{top:"-3px",border:"none",boxShadow:"inset 0px 0px 0px 0px !important",width:"auto"},className:"custom-select form-select col-5",value:ep.selectClinic,onChange:eI("selectClinic"),children:eZ.getListClinic()})}),(0,B.jsx)("div",{className:"pull-right inline",children:(0,B.jsxs)("button",{style:{top:"90px",backgroundColor:"#70BDE9",marginTop:"3px"},type:"button",className:"btn btn-yes margin-l-10 add-clinic",onClick:function(){return eZ.addClinic()},children:[(0,B.jsx)(M.G,{icon:T.r8p})," ",W("add")]})})]}),ep.is_super?(0,B.jsxs)("div",{children:[(0,B.jsxs)("div",{className:"padding-10 clearfix",children:[(0,B.jsxs)("div",{className:ep.isEditTitle?"hide":"",children:[(0,B.jsxs)("div",{className:"col-md-10 inline pull-left no-padding",children:[(0,B.jsx)("div",{className:"img-upload-avatar inline pull-left",children:(0,B.jsx)("div",{className:"container-img",children:(0,B.jsx)(D.gj,{source:ep.avatar,posId:"avatar",onSave:eZ.savePhoto,customClass:"extra-photo post-id-avatar"})})}),(0,B.jsxs)("div",{className:"inline",style:{alignItems:"center"},children:[(0,B.jsx)("div",{className:"provider-profile-title",children:ep.name}),(0,B.jsxs)("div",{style:{color:"#DFAC50",fontSize:"14px"},className:"ratingbox clearfix",children:[(0,B.jsx)(A.Z,{numberOfStars:5,rating:ep.star,name:"rating",starDimension:"20px",starSpacing:"1px",starRatedColor:"#D62D68"}),(0,B.jsx)("div",{style:{color:"#D4D4D4",marginLeft:"10px"},className:"inline",children:ep.num_apt?[ep.num_apt,W("providers:num_patient")].join(" "):""})]}),(0,B.jsx)("div",{children:ep.address})]})]}),"owner"==ep.clinic_role&&(0,B.jsx)("div",{className:"col-md-2 inline pull-left pointer",children:(0,B.jsxs)("div",{className:"btn-profile-edit",onClick:function(){return eZ.doEdit("isEditTitle")},children:[(0,B.jsx)(M.G,{icon:T.UJf}),(0,B.jsxs)("span",{className:"hide-mobile",children:["\xa0",W("edit")]})]})})]}),(0,B.jsxs)("div",{className:ep.isEditTitle?"":"hide",children:[(0,B.jsxs)("div",{className:"col-md-10 inline no-padding profile-img pull-left",children:[(0,B.jsx)("div",{className:"img-upload-avatar inline pull-left",onClick:function(){return"owner"==ep.clinic_role&&er.current&&er.current.showModal()},children:(0,B.jsxs)("div",{className:"container-img",children:[(0,B.jsx)("img",{src:y.ZP.getDoctorImg(ep.avatar),className:"image avatar img-border",width:"150",height:"150"}),"owner"==ep.clinic_role&&(0,B.jsx)("div",{class:"middle",children:(0,B.jsxs)("div",{class:"text",children:[(0,B.jsx)(M.G,{icon:T._jT,style:{fontSize:"24px"}}),(0,B.jsx)("br",{}),W("providers:edit_profile_picture")]})})]})}),(0,B.jsx)("div",{className:"inline margin-l-10",style:{width:"70%"},children:(0,B.jsxs)("div",{children:[(0,B.jsx)("input",{type:"text",className:em.name?"form-control error":"form-control",id:"inputName",placeholder:W("name"),value:ep.name,onChange:eI("name")}
1),(0,B.jsx)("input",{type:"text",onClick:function(){return eZ.handleSaveGpsAddress()},className:em.address?"form-control error margin-t-5 color-disable":"form-control margin-t-5 color-disable",id:"inputAddress",placeholder:W("name"),value:ep.address,readOnly:!0,onChange:eI("address")})]})})]}),(0,B.jsx)("div",{className:"col-md-2 inline pointer",children:(0,B.jsx)("button",{type:"button",className:"btn btn-yes margin-l-10",onClick:function(){return eZ.handleSave()},children:W("save")})})]})]}),(0,B.jsx)("div",{className:"line"}),(0,B.jsx)("div",{className:"padding-10 clearfix",children:ep.isEditPhone?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"col-md-10 inline no-padding",children:[(0,B.jsx)("div",{className:"bold",children:W("providers:clinic_phone_number")}),(0,B.jsx)("input",{className:em.phone?"box-border error":"box-border",value:ep.phone,onChange:eI("phone")}),em.phone?(0,B.jsx)("div",{className:"error-msg",children:em.phone}):""]}),(0,B.jsx)("div",{className:"col-md-2 inline",children:(0,B.jsx)("button",{style:{top:"90px"},type:"button",className:"btn btn-yes margin-l-10",onClick:function(){return eZ.handleSave()},children:W("save")})})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"col-md-10 inline pull-left no-padding",children:[(0,B.jsx)("div",{className:"bold",children:W("providers:clinic_phone_number")}),(0,B.jsx)("div",{className:"info",children:(0,B.jsx)("div",{className:"box-border",children:ep.phone})})]}),"owner"==ep.clinic_role&&(0,B.jsx)("div",{className:"col-md-2 inline pull-left pointer",children:(0,B.jsxs)("div",{className:"btn-profile-edit",onClick:function(){return eZ.doEdit("isEditPhone")},children:[(0,B.jsx)(M.G,{icon:T.UJf}),(0,B.jsxs)("span",{className:"hide-mobile",children:["\xa0",W("edit")]})]})})]})}),(0,B.jsx)("div",{className:"line"}),(0,B.jsx)("div",{className:"padding-10 clearfix",children:ep.isEditSpecialties?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"col-md-10 inline no-padding pull-left",children:[(0,B.jsx)("div",{className:"bold",children:W("providers:specialties")}),(0,B.jsxs)("div",{style:{marginTop:"10px"},children:[(0,B.jsx)("div",{style:{paddingBottom:"10px"},children:(0,B.jsxs)("i",{children:[W("providers:select_specialty_your_clinic_provide"),":"]})}),eZ.renderListSpecialties()]})]}),(0,B.jsx)("div",{className:"col-md-2 inline",children:(0,B.jsx)("button",{style:{top:"90px"},type:"button",className:"btn btn-yes margin-l-10",onClick:function(){return eZ.handleSave()},children:W("save")})})]}):(0,B.jsx)(B.Fragment,{children:(0,B.jsxs)("div",{className:"col-md-10 inline pull-left no-padding",children:[(0,B.jsx)("div",{className:"bold",children:W("providers:specialties")}),(0,B.jsx)("div",{className:"info",children:eZ.renderBoxItem("specialties")})]})})}),(0,B.jsx)("div",{className:"line"}),(0,B.jsx)("div",{className:"padding-10 clearfix",children:ep.isEditLang?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"col-md-10 inline pull-left no-padding",children:[(0,B.jsx)("div",{className:"b-500",children:W("providers:language")}),(0,B.jsxs)("div",{className:"info",children:[(0,B.jsxs)("div",{className:"form-check margin-tb-10 no-padding",children:[(0,B.jsx)("input",{className:"form-check-input",type:"checkbox",value:ep.language.vi,checked:ep.language.vi,onChange:eI("language","vi"),id:"checkVi"}),(0,B.jsxs)("label",{className:"form-check-label clearfix",htmlFor:"checkVi",children:[(0,B.jsx)("div",{className:"list-language vi inline"}),(0,B.jsx)("div",{className:"inline pull-right",children:"Tiếng Viá»t"})]})]}),(0,B.jsxs)("div",{className:"form-check margin-tb-10 no-padding",children:[(0,B.jsx)("input",{className:"form-check-input",type:"checkbox",value:ep.language.en,checked:ep.language.en,onChange:eI("language","en"),id:"checkEn"}),(0,B.jsxs)("label",{className:"form-check-label clearfix",htmlFor:"checkEn",children:[(0,B.jsx)("div",{className:"list-language en inline"}),(0,B.jsx)("div",{className:"inline pull-right",children:"English"})]})]}),(0,B.jsxs)("div",{className:"form-check margin-tb-10 no-padding",children:[(0,B.jsx)("input",{className:"form-check-input",type:"checkbox",value:ep.language.fr,checked:ep.language.fr,onChange:eI("language","fr"),id:"checkFr"}),(0,B.jsxs)("label",{className:"form-check-label clearfix",htmlFor:"checkFr",children:[(0,B.jsx)("div",{className:"list-language fr inline"}),(0,B.jsx)("div",{className:"inline pull-right",children:"Fran\xe7aise"})]})]}),(0,B.jsxs)("div",{className:"form-check margin-tb-10 no-padding",children:[(0,B.jsx)("input",{className:"form-check-input",type:"checkbox",value:ep.language.ca,checked:ep.language.ca,onChange:eI("language","ca"),id:"checkCa"}),(0,B.jsxs)("label",{className:"form-check-label",htmlFor:"checkCa",children:[(0,B.jsx)("div",{className:"list-language ca inline"}),(0,B.jsx)("div",{className:"inline pull-right",children:"áá¶áá¶áááááá"})]})]}),(0,B.jsxs)("div",{className:"form-check margin-tb-10 no-padding",children:[(0,B.jsx)("input",{className:"form-check-input",type:"checkbox",value:ep.language.cn,checked:ep.language.cn,onChange:eI("language","cn"),id:"checkCn"}),(0,B.jsxs)("label",{className:"form-check-label clearfix",htmlFor:"checkCn",children:[(0,B.jsx)("div",{className:"list-language cn inline"}),(0,B.jsx)("div",{className:"inline pull-right",children:"䏿"})]})]}),(0,B.jsxs)("div",{className:"form-check margin-tb-10 no-padding",children:[(0,B.jsx)("input",{className:"form-check-input",type:"checkbox",value:ep.language.kr,checked:ep.language.kr,onChange:eI("language","kr"),id:"checkKr"}),(0,B.jsxs)("label",{className:"form-check-label clearfix",htmlFor:"checkKr",children:[(0,B.jsx)("div",{className:"list-language kr inline"}),(0,B.jsx)("div",{className:"inline pull-right",children:"íêµì´"})]})]}),(0,B.jsxs)("div",{className:"form-check margin-tb-10 no-padding",children:[(0,B.jsx)("input",{className:"form-check-input",type:"checkbox",value:ep.language.jp,checked:ep.language.jp,onChange:eI("language","jp"),id:"checkJp"}),(0,B.jsxs)("label",{className:"form-check-label clearfix",htmlFor:"checkJp",children:[(0,B.jsx)("div",{className:"list-language jp inline"}),(0,B.jsx)("div",{className:"inline pull-right",children:"æ¥æ¬èª"})]})]})]})]}),(0,B.jsx)("div",{className:"col-md-2 inline pull-left",children:(0,B.jsx)("button",{style:{to
1p:"90px"},type:"button",className:"btn btn-yes margin-l-10",onClick:function(){return eZ.handleSave()},children:W("save")})})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"col-md-10 inline pull-left no-padding",children:[(0,B.jsx)("div",{className:"bold",children:W("providers:language")}),(0,B.jsx)("div",{className:"info",children:eZ.renderBoxItem("language")})]}),"owner"==ep.clinic_role&&(0,B.jsx)("div",{className:"col-md-2 inline pull-left pointer",children:(0,B.jsxs)("div",{className:"btn-profile-edit",onClick:function(){return eZ.doEdit("isEditLang")},children:[(0,B.jsx)(M.G,{icon:T.UJf}),(0,B.jsxs)("span",{className:"hide-mobile",children:["\xa0",W("edit")]})]})})]})}),(0,B.jsx)("div",{className:"line"}),(0,B.jsx)("div",{className:"padding-10 clearfix",children:ep.isEditIntro?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"col-md-10 inline no-padding",children:[(0,B.jsx)("div",{className:"b-500",children:W("providers:introduce")}),(0,B.jsx)("textarea",{className:"form-control white-space-pre",rows:"4",placeholder:"",onChange:eI("introduction"),children:ep.introduction})]}),(0,B.jsx)("div",{className:"col-md-2 inline",children:(0,B.jsx)("button",{style:{top:"90px"},type:"button",className:"btn btn-yes margin-l-10",onClick:function(){return eZ.handleSave()},children:W("save")})})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"col-md-10 inline pull-left no-padding",children:[(0,B.jsx)("div",{className:"b-500",children:W("providers:introduce")}),(0,B.jsx)("div",{className:"info",dangerouslySetInnerHTML:{__html:ep.introduction?ep.introduction.replace(/(?:\r\n|\r|\n)/g,"<br>"):W("no_info")}})]}),"owner"==ep.clinic_role&&(0,B.jsx)("div",{className:"col-md-2 inline pull-left pointer",children:(0,B.jsxs)("div",{className:"btn-profile-edit",onClick:function(){return eZ.doEdit("isEditIntro")},children:[(0,B.jsx)(M.G,{icon:T.UJf}),(0,B.jsxs)("span",{className:"hide-mobile",children:["\xa0",W("edit")]})]})})]})}),(0,B.jsx)("div",{className:"line"}),(0,B.jsx)("div",{className:"padding-10 clearfix",children:(0,B.jsxs)("div",{className:"col-md-10 inline pull-left no-padding",children:[(0,B.jsx)("div",{className:"bold",children:W("providers:clinic_photos")}),(0,B.jsx)("div",{className:"info clearfix",children:eZ.renderListExtraPhoto()})]})}),(0,B.jsx)("div",{className:"line"}),(0,B.jsx)("div",{className:"padding-10 clearfix",children:ep.isEditPayment?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"col-md-10 inline no-padding pull-left",children:[(0,B.jsx)("div",{className:"bold",children:W("providers:payment_method_accepted")}),(0,B.jsx)("div",{className:"info clearfix",children:eZ.renderBoxItem("payment_method_accepted_edit")})]}),(0,B.jsx)("div",{className:"col-md-2 inline",children:(0,B.jsx)("button",{style:{top:"90px"},type:"button",className:"btn btn-yes margin-l-10",onClick:function(){return eZ.handleSave()},children:W("save")})})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"col-md-10 inline pull-left no-padding",children:[(0,B.jsx)("div",{className:"bold",children:W("providers:payment_method_accepted")}),(0,B.jsx)("div",{className:"info",children:eZ.renderBoxItem("payment_method_accepted")})]}),"owner"==ep.clinic_role&&(0,B.jsx)("div",{className:"col-md-2 inline pull-left pointer",children:(0,B.jsxs)("div",{className:"btn-profile-edit",onClick:function(){return eZ.doEdit("isEditPayment")},children:[(0,B.jsx)(M.G,{icon:T.UJf}),(0,B.jsxs)("span",{className:"hide-mobile",children:["\xa0",W("edit")]})]})})]})}),(0,B.jsx)("div",{className:"line"}),(0,B.jsx)("div",{className:"padding-10 clearfix",children:ep.isEditInsurance?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"col-md-10 inline no-padding pull-left",children:[(0,B.jsx)("div",{className:"bold",children:W("providers:insurance_accepted")}),(0,B.jsx)("div",{className:"info clearfix",children:eZ.renderBoxItem("insurance_edit")})]}),(0,B.jsx)("div",{className:"col-md-2 inline",children:(0,B.jsx)("button",{style:{top:"90px"},type:"button",className:"btn btn-yes margin-l-10",onClick:function(){return eZ.handleSave()},children:W("save")})})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"col-md-10 inline pull-left no-padding",children:[(0,B.jsx)("div",{className:"bold",children:W("providers:insurance_accepted")}),(0,B.jsx)("div",{className:"info",children:eZ.renderBoxItem("insurance")})]}),"owner"==ep.clinic_role&&(0,B.jsx)("div",{className:"col-md-2 inline pull-left pointer",children:(0,B.jsxs)("div",{className:"btn-profile-edit",onClick:function(){return eZ.doEdit("isEditInsurance")},children:[(0,B.jsx)(M.G,{icon:T.UJf}),(0,B.jsxs)("span",{className:"hide-mobile",children:["\xa0",W("edit")]})]})})]})}),(0,B.jsx)("div",{className:"line"}),(0,B.jsxs)("div",{className:"padding-10 clearfix",children:[(0,B.jsx)("div",{className:"b-500",children:W("providers:service")}),(0,B.jsx)("div",{className:"info no-padding",children:(0,B.jsx)(Z.Z,{ref:et,data:ep,forSuperClinic:!0,eventEditServiceCategory:eZ.editServiceCategory,eventDownloadServiceList:H,importServiceList:V,getProfile:eZ.getClinic,serviceFor:"clinic",clinicRole:1==ep.is_super&&"owner"==ep.clinic_role?"owner":"staff",role:ea.role})})]}),(0,B.jsx)("div",{className:"line"}),(0,B.jsx)("div",{className:"padding-10 clearfix",children:(0,B.jsxs)("div",{className:"col-md-10 inline pull-left no-padding",children:[(0,B.jsx)("div",{className:"b-500",children:W("providers:clinic_license")}),(0,B.jsx)("div",{className:"info no-margin",dangerouslySetInnerHTML:{__html:y.ZP.showFileByExt(ep.business_license_image)}})]})})]}):(0,B.jsxs)("div",{children:[(0,B.jsxs)("div",{className:"padding-10 clearfix profile-img",children:["pending"==ep.status&&(0,B.jsx)("div",{className:"inline pull-left no-padding profile-img",children:ep.avatar?(0,B.jsx)("img",{src:y.ZP.getDoctorImg(ep.avatar),width:"150",height:"150"}):(0,B.jsx)("img",{src:"/static/providers/no-image.png",width:"150",height:"150"})}),(0,B.jsx)("div",{className:"active"==ep.status?"img-upload-avatar inline pull-left pointer":"img-upload-avatar inline pull-left hide pointer",children:(0,B.jsx)(_.Z,z(z({},eL),{},{children:ep.avatar?(0,B.jsx)("img",{src:y.ZP.getDoctorImg(ep.avatar),width:"150",height:"150"}):(0,B.jsx)("img",{src:"/static/providers/no-image.png",width:"150",height:"150"})}))}),(0,B.jsxs)("div",{className:"inline margin-l-10",children:[(0,B.jsxs)("div",{className:"provider-profile-title",children:[ep.name," ","pending"==ep.status&&(0,B.jsxs)("span",{style:{color:"#BC2D5F"},children:["(",W("providers:waiting_active"),")"]})]}),(0,B.jsx)("div",{children:ep.address})]})]}),(0,B.jsx)("div",{className:"line"}),(0,B.jsx)("div",{className:"padding-10 clearfix",children:(0,B.jsxs)("div",{className:"col-md-10 inline pull-left no-padding",children:[(0,B.jsx)("div",{className:"b-500",children:W("providers:introduce")}),(0,B.jsx)("div",{className:"info",children:ep.introduction?ep.introduction:W("providers:no_info")})]})}),(0,B.jsx)("div",{className:"line"}),(0,B.jsx)("div",{className:"padding-10 clearfix",children:(0,B.jsxs)("div",{className:"col-md-10 inline pull-left no-padding",children:[(0,B.jsx)("div",{className:"b-500",children:W("providers:language")}),(0,B.jsx)("div",{className:"info",children:eZ.getLanguage()})]})}),(0,B.jsx)("div",{className:"line"}),(0,B.jsx)("div",{className:"padding-10 clearfix profile-img2",children:(0,B.jsxs)("div",{className:"col-md-10 inline pull-left no-padding profile-img2",children:[(0,B.jsx)("div",{className:"b-500",children:W("providers:clinic_services")}),"pending"==ep.status&&(0,B.jsx)("div",{className:"inline pull-left no-padding",children:ep.avatar?(0,B.jsx)("img",{src:y.ZP.getDoctorImg(ep.services_image),width:"150",height:"150"}):(0,B.jsx)("img",{src:"/static/providers/no-image.png",width:"150",height:"150"})}),(0,B.jsx)("div",{className:"active"==ep.status?"info no-margin img-upload-services_image pointer":"info no-margin img-upload-services_image hide",children:(0,B.jsx)(_.Z,z(z({},eO),{},{children:(0,B.jsx)("span",{dangerouslySetInnerHTML:{__html:y.ZP.showFileByExt(ep.services_image)}})}))})]})}),(0,B.jsx)("div",{className:"line"}),(0,B.jsx)("div",{className:"padding-10 clearfix",children:(0,B.jsxs)("div",{className:"col-md-10 inline pull-left no-padding",children:[(0,B.jsx)("div",{className:"b-500",children:W("providers:clinic_license")}),(0,B.jsx)("div",{className:"info no-margin",dangerouslySetInnerHTML:{__html:y.ZP.showFileByExt(ep.business_license_image)}})]})}),(0,B.jsxs)("div",{className:"form-group margin-b-5",children:[h&&h.provider&&(0,B.jsx)(m.JX,{md:{size:6,offset:3},xs:{size:10,offset:1},children:(0,B.jsx)(m.zx,{className:eE()?"Page-button btn-block btn-login":"Page-button btn-block btn-disable",disabled:n||!eE(),onClick:function(){return eZ.goCalendar(
1)},children:n?(0,B.jsxs)("span",{children:["Waiting... \xa0",(0,B.jsx)(M.G,{icon:T.LM3,className:"fa-fw fa-pulse"})]}):(0,B.jsx)("span",{children:W("providers:continue")})})}),h&&h.doctor&&(0,B.jsx)(m.JX,{md:{size:2,offset:5},xs:{size:8,offset:2},children:(0,B.jsx)(m.zx,{className:"Page-button btn-block btn-login",onClick:function(){return eZ.handleSave()},children:(0,B.jsx)("span",{children:W("save")})})})]})]})]})]})})})})}q.displayName="ClinicPage";var H=function(e){return{isAuthenticated:e.userAuth.isAuthenticated,isFetching:e.userAuth.isFetching,isLogging:e.userAuth.isLogging,selfInfo:e.userAuth.selfInfo,userAuth:e.userAuth,doctor:e.doctor,admin:e.admin}},V=function(e){return z({},(0,h.DE)(z(z(z({},f),g),v),e))};i.default=(0,h.qC)((0,L.Zh)(["common","patient"]),(0,p.$j)(H,V))(q)},5388:function(e,i,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/clinic",function(){return n(20135)}])}},function(e){e.O(0,[8592,1216,2888,179],function(){return e(e.s=5388)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.