PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.6
Booking for Appointments and Events Calendar – Amelia v2.4.6
2.4.7 2.4.6 2.4.5 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 / customer.js
ameliabooking / v3 / src / assets / js / common Last commit date
appointments.js 1 month ago attendees.js 1 month ago colorManipulation.js 1 month ago customer.js 1 month ago date.js 3 weeks ago defaultCustomize.js 3 weeks ago employee.js 5 days ago events.js 1 month ago formFieldsTemplates.js 1 month ago formatting.js 1 month ago helper.js 5 days ago image.js 1 month ago integrationApple.js 1 month ago integrationGoogle.js 1 month ago integrationOutlook.js 1 month ago integrationStripe.js 1 month ago integrationZoom.js 1 month ago licence.js 1 month ago liveAnnouncer.js 3 weeks ago phone.js 3 weeks ago pricing.js 1 month ago recurring.js 5 days ago responsive.js 1 month ago scrollElements.js 1 month ago settings.js 1 month ago translationsElementPlus.js 1 month ago utilHeaderHeight.js 1 month ago
customer.js
27 lines
1 import moment from 'moment'
2
3 function useFrontendCustomer(store, customer) {
4 return Object.assign({}, customer, {
5 gender: customer.gender ? customer.gender : '',
6 note: customer.note ? customer.note : '',
7 phone: customer.phone ? customer.phone : '',
8 birthday: customer.birthday ? moment(customer.birthday.date.split(' ')[0]).toDate() : null,
9 translations: customer.translations
10 ? JSON.parse(customer.translations)
11 : { defaultLanguage: '' },
12 })
13 }
14
15 function useBackendCustomer(store) {
16 let customer = store.getters['customerInfo/getCustomer']
17
18 return Object.assign({}, customer, {
19 birthday: customer.birthday ? moment(customer.birthday).format('YYYY-MM-DD') : null,
20 translations: customer.translations.defaultLanguage
21 ? JSON.stringify(customer.translations)
22 : null,
23 })
24 }
25
26 export { useFrontendCustomer, useBackendCustomer }
27