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 / 4406.js

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

1 lines 5.1 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([[4406,5236,5375,6899,7018,9264,9436],{14406:(e,t,o)=>{o.r(t);var l=o(51609),n=o(59264);window.wp?.hooks.addFilter("booktics_config_google","booktics",()=>(0,l.createElement)(n.default,null),10)},46899:(e,t,o)=>{o.r(t),o.d(t,{default:()=>s});var l=o(86087),n=o(47143),a=o(40309),r=o(57018),c=o(60742);o(27723);const s=()=>{const{data:e}=(0,n.useSelect)(e=>e(a.settings).getSettingsState(),[]),{setGoogleState:t}=(0,n.useDispatch)(r.googleStoreName),[o]=c.A.useForm(),s=e=>o.setFieldsValue(e),{google_client_id:i,google_secret_key:g,google_redirect_url:d}=e,u={google_client_id:i,google_secret_key:g,google_redirect_url:d,block_booking_during_google_events:e?.block_booking_during_google_events||!1};return(0,l.useEffect)(()=>{t({setFields:s,form:o})},[]),{Form:c.A,form:o,initialValues:u}}},55375:(e,t,o)=>{o.r(t),o.d(t,{default:()=>r});var l=o(47143),n=o(11534),a=o(40309);const r=()=>{const{setSettingsState:e}=(0,l.useDispatch)(a.settings),{data:t}=(0,l.useSelect)(e=>e(a.settings).getSettingsState(),[]),{google_calendar_connected:o}=t||{},{singleTeamMember:r,profileInfo:c}=(0,l.useSelect)(e=>e(a.team).getTeamState(),[]),{setTeamState:s}=(0,l.useDispatch)(a.team),i=async(o={})=>{try{(await n.A.google.disconnectGoogle(o)).success&&(o?.team_member_id?s({singleTeamMember:{...r,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?i():(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:r?.id||c.id};r?.google_calendar_connected?i(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"},59264:(e,t,o)=>{o.r(t),o.d(t,{default:()=>s});var l=o(51609),n=o(79436),a=o(22564),r=o(27723);const{MODULES_DOCUMENTATION:c}=window?.booktics?.globalConstant||{},s=(0,a.wrapWithTheme)(()=>{const e=["google_client_id","google_secret_key","google_redirect_url","block_booking_during_google_events"];return(0,l.createElement)(l.Fragment,null,window?.location.href.includes("/settings")?(0,l.createElement)(a.SettingsConfigureDescription,{className:"bkt-configure-description"},(0,r.__)("Set up your Google Calendar settings here. For more details, please refer to the ","booktics"),(0,l.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:c?.googleCalendarDoc||"#"},(0,r.__)("documentation","booktics")),(0,r.__)(" for further assistance.")):null,(0,l.createElement)(n.default,{title:(0,r.__)("Google Meet/calendar","booktics"),keys:e},(0,l.createElement)(a.TextInput,{label:(0,r.__)("Client ID","booktics"),name:e[0],rules:[{required:!0,message:(0,r.__)("Please enter Client ID","booktics")}]}),(0,l.createElement)(a.TextInput,{label:(0,r.__)("Client Secret Key","booktics"),name:e[1],rules:[{required:!0,message:(0,r.__)("Please enter Client Secret Key","booktics")}]}),(0,l.createElement)(a.TextInput,{label:(0,r.__)("Redirect URL","booktics"),name:e[2],readOnly:!0}),(0,l.createElement)(a.FormItem,{name:e[3],valuePropName:"checked"},(0,l.createElement)(a.CheckBox,null,(0,r.__)("Block bookings during google calendar events","booktics-pro")))))})},79436:(e,t,o)=>{o.r(t),o.d(t,{default:()=>u});var l=o(51609),n=o(47143),a=o(22564),r=o(88802),c=o(46899),s=o(85236),i=o(55375),g=o(57018),d=o(27723);const u=e=>{const{keys:t=[],children:o,title:u}=e,{data:_}=(0,n.useSelect)(e=>e(r.settingsStore).getSettingsState(),[]),{isModalOpen:m,editLoading:k}=(0,n.useSelect)(e=>e(g.googleStoreName).getGoogleState(),[]),{Form:b,form:f,initialValues:S}=(0,c.default)(),{handleOpen:h,handleClose:p,handleClear:C}=(0,s.default)(),{adminGoogleSettings:y}=(0,i.default)();return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(a.ConfigureBtn,{text:(0,d.__)("Configure","booktics"),onClick:h}),(0,l.createElement)(a.Modal,{title:u,open:m,onCancel:p,footer:null,className:"bkt-config-modal",centered:!0},(0,l.createElement)(b,{layout:"vertical",form:f,initialValues:S||{},onFinish:y},o,(0,l.createElement)(a.Flex,{justify:"flex-end",gap:"small"},(0,l.createElement)(a.SecondaryButton,{size:"middle",onClick:()=>C({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.__)(_?.google_calendar_connected?"Disconnect":"Connect","booktics"),loading:k})))))}},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)}}}}}]);