PluginProbe
Booktics – Appointment Booking Calendar for Service Businesses / 1.0.21
Booktics – Appointment Booking Calendar for Service Businesses v1.0.21
1.0.29 1.0.28 1.0.27 1.0.26 1.0.25 1.0.24 1.0.23 1.0.22 1.0.21 1.0.20 1.0.19 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.2 1.0.3 All 31 releases
booktics / assets / build / chunks / js / 9436.js

9436.js in Booktics – Appointment Booking Calendar for Service Businesses 1.0.21, at assets/build/chunks/js/9436.js

1 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 "use strict";(globalThis.webpackChunkbooktics=globalThis.webpackChunkbooktics||[]).push([[5236,5375,6899,7018,9436],{46899:(e,t,o)=>{o.r(t),o.d(t,{default:()=>r});var l=o(86087),n=o(47143),a=o(40309),s=o(57018),c=o(60742);o(27723);const r=()=>{const{data:e}=(0,n.useSelect)(e=>e(a.settings).getSettingsState(),[]),{setGoogleState:t}=(0,n.useDispatch)(s.googleStoreName),[o]=c.A.useForm(),r=e=>o.setFieldsValue(e),{google_client_id:g,google_secret_key:i,google_redirect_url:d}=e,u={google_client_id:g,google_secret_key:i,google_redirect_url:d,block_booking_during_google_events:e?.block_booking_during_google_events||!1};return(0,l.useEffect)(()=>{t({setFields:r,form:o})},[]),{Form:c.A,form:o,initialValues:u}}},55375:(e,t,o)=>{o.r(t),o.d(t,{default:()=>s});var l=o(47143),n=o(11534),a=o(40309);const s=()=>{const{setSettingsState:e}=(0,l.useDispatch)(a.settings),{data:t}=(0,l.useSelect)(e=>e(a.settings).getSettingsState(),[]),{google_calendar_connected:o}=t||{},{singleTeamMember:s,profileInfo:c}=(0,l.useSelect)(e=>e(a.team).getTeamState(),[]),{setTeamState:r}=(0,l.useDispatch)(a.team),g=async(o={})=>{try{(await n.A.google.disconnectGoogle(o)).success&&(o?.team_member_id?r({singleTeamMember:{...s,google_calendar_connected:!1}}):e({data:{...t,google_calendar_connected:!1}}))}catch(e){console.log(e)}};return{adminGoogleSettings:e=>{const{google_redirect_url:t,...l}=e;o?g():(async e=>{try{const{google_redirect_url:t,...o}=e,l=await n.A.google.configureGoogle(o);l.success&&window.location.replace(l?.data?.auth_url,"noopener,noreferrer")}catch(e){console.log(e)}})(l)},teamGoogleSettings:()=>{if(!t?.google_calendar_connected)return;const e={team_member_id:s?.id||c.id};s?.google_calendar_connected?g(e):(async(e={})=>{try{const t=await n.A.google.connectGoogle(e);t.success&&window.location.replace(t?.data?.auth_url,"noopener,noreferrer")}catch(e){console.log(e)}})(e)}}}},57018:(e,t,o)=>{o.r(t),o.d(t,{googleStoreName:()=>l});const l="booktics/google"},79436:(e,t,o)=>{o.r(t),o.d(t,{default:()=>u});var l=o(51609),n=o(47143),a=o(22564),s=o(88802),c=o(46899),r=o(85236),g=o(55375),i=o(57018),d=o(27723);const u=e=>{const{keys:t=[],children:o,title:u}=e,{data:m}=(0,n.useSelect)(e=>e(s.settingsStore).getSettingsState(),[]),{isModalOpen:_,editLoading:S}=(0,n.useSelect)(e=>e(i.googleStoreName).getGoogleState(),[]),{Form:f,form:h,initialValues:b}=(0,c.default)(),{handleOpen:k,handleClose:p,handleClear:y}=(0,r.default)(),{adminGoogleSettings:C}=(0,g.default)();return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(a.ConfigureBtn,{text:(0,d.__)("Configure","booktics"),onClick:k}),(0,l.createElement)(a.Modal,{title:u,open:_,onCancel:p,footer:null,className:"bkt-config-modal",centered:!0},(0,l.createElement)(f,{layout:"vertical",form:h,initialValues:b||{},onFinish:C},o,(0,l.createElement)(a.Flex,{justify:"flex-end",gap:"small"},(0,l.createElement)(a.SecondaryButton,{size:"middle",onClick:()=>y({keys:t}),text:(0,d.__)("Clear","booktics"),className:"bkt-neutral-soft-light-btn"}),(0,l.createElement)(a.PrimaryButton,{size:"middle",htmlType:"submit",text:(0,d.__)(m?.google_calendar_connected?"Disconnect":"Connect","booktics"),loading:S})))))}},85236:(e,t,o)=>{o.r(t),o.d(t,{default:()=>a});var l=o(47143),n=o(57018);const a=()=>{const{setFields:e}=(0,l.useSelect)(e=>e(n.googleStoreName).getGoogleState(),[]),{setGoogleState:t}=(0,l.useDispatch)(n.googleStoreName);return{handleOpen:()=>t({isModalOpen:!0}),handleClose:()=>t({isModalOpen:!1}),handleClear:({keys:t})=>{const o=Object.fromEntries(t.map(e=>[e,""]));e(o)}}}}}]);