PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / trunk
Booking for Appointments and Events Calendar – Amelia vtrunk
2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / v3 / src / assets / js / common / integrationApple.js
ameliabooking / v3 / src / assets / js / common Last commit date
appointments.js 5 days ago attendees.js 5 days ago colorManipulation.js 5 days ago customer.js 5 days ago date.js 5 days ago defaultCustomize.js 5 days ago employee.js 5 days ago events.js 5 days ago formFieldsTemplates.js 5 days ago formatting.js 5 days ago helper.js 5 days ago image.js 5 days ago integrationApple.js 5 days ago integrationGoogle.js 5 days ago integrationOutlook.js 5 days ago integrationStripe.js 5 days ago integrationZoom.js 5 days ago licence.js 5 days ago phone.js 5 days ago pricing.js 5 days ago recurring.js 5 days ago responsive.js 5 days ago scrollElements.js 5 days ago settings.js 5 days ago translationsElementPlus.js 5 days ago utilHeaderHeight.js 5 days ago
integrationApple.js
38 lines
1 import httpClient from '../../../plugins/axios'
2 import { ref } from 'vue'
3
4 let isEmployeeConnectedToPersonalAppleCalendar = ref(false)
5
6 function useAppleSync(store) {
7 store.commit('auth/setAppleLoading', true)
8
9 httpClient
10 .get('/apple/calendar-list/' + store.getters['employee/getId'])
11 .then((response) => {
12 store.commit(
13 'auth/setAppleCalendars',
14 response.data.data?.calendarList ? response.data.data.calendarList : [],
15 )
16
17 if (
18 store.getters['auth/getAppleCalendars']
19 .map((i) => i.id)
20 .indexOf(store.getters['employee/getAppleCalendarId']) === -1
21 ) {
22 store.commit('employee/setAppleCalendarId', '')
23 }
24 store.commit('employee/setAppleCalendarId', response.data.data?.appleCalendarId)
25
26 isEmployeeConnectedToPersonalAppleCalendar.value =
27 response.data.data.isEmployeeConnectedToPersonalAppleCalendar
28 })
29 .catch((error) => {
30 console.log(error)
31 })
32 .finally(() => {
33 store.commit('auth/setAppleLoading', false)
34 })
35 }
36
37 export { isEmployeeConnectedToPersonalAppleCalendar, useAppleSync }
38