UNPKG

@agendize/vue-event-booking

Version:
79 lines 3.65 kB
import { ComputedRef, Ref } from 'vue'; import { CalendarApi, CompanyEntity, ContactEntity, EmployeeEntity, EventEntity, Logger, ServiceEntity, StaffEntity, UserEntity } from '@agendize/js-calendar-api'; import { FormField } from "@agendize/design-system"; import { Duration } from "luxon"; import { Locale } from "@agendize/az-i18n"; interface EventBookingViewModelType { loading: Ref<boolean>; companySearch: Function; companySearching: Ref<boolean>; companySelect: (item: CompanyEntity) => void; companyDeselect: (item: CompanyEntity) => void; company: Ref<CompanyEntity | undefined>; serviceSearch: Function; serviceSearching: Ref<boolean>; serviceSelect: (item: ServiceEntity) => void; serviceDeselect: (item: ServiceEntity) => void; service: Ref<ServiceEntity | undefined>; staffSearch: Function; staffSearching: Ref<boolean>; staffSelect: (item: StaffEntity) => void; staffDeselect: (item: StaffEntity) => void; staff: Ref<StaffEntity | undefined>; contactSearch: Function; contactSearching: Ref<boolean>; contactCreate: Function; contactCreating: Ref<boolean>; contactCreated: (contact: ContactEntity) => void; contactSelect: (item: ContactEntity) => void; contactDeselect: (item: ContactEntity) => void; contact: Ref<ContactEntity | undefined>; createEvent: (event: EventEntity | undefined) => void; subject: Ref<string>; eventCapacity: Ref<number | undefined>; eventDescription: Ref<string | undefined>; startDate: Ref<Date | undefined>; endDate: Ref<Date | undefined>; duration: ComputedRef<string>; delta: Ref<Duration | undefined>; isSameDay: Ref<boolean>; bookingTimeZone: Ref<string | undefined>; fullDay: Ref<boolean>; note: Ref<string>; saveEnabled: ComputedRef<boolean>; companiesFilter: (companies: CompanyEntity[]) => Promise<CompanyEntity[]>; staffsFilter: (staffs: StaffEntity[]) => Promise<StaffEntity[]>; servicesFilter: (services: ServiceEntity[]) => Promise<ServiceEntity[]>; widgetFields: Ref<FormField[]>; validateForm: (validation: { isValid: boolean; values: any; }) => void; loadEvent: (event: EventEntity) => void; companySearchBack: Function; serviceSearchBack: Function; staffSearchBack: Function; contactSearchBack: Function; contactCreateBack: Function; hasPrivacyConsent: Ref<boolean>; privacyConsentText: Ref<string>; privacyConsentValid: Ref<boolean>; hasMarketingConsent: Ref<boolean>; marketingConsentText: Ref<string>; marketingConsentValid: Ref<boolean>; isOldClient: Ref<boolean>; autoSelectCompany: Ref<boolean>; autoSelectStaff: Ref<boolean>; eventLocation: Ref<"companyAddress" | "videoconference" | "phone" | "custom" | undefined>; } export declare enum AppointmentType { PRO = "normal", PERSO = "personal", EVENT = "event" } export declare function EventBookingViewModel(emitter: Function, api: CalendarApi, acl: any, timeZone: string, companySearchComponent: Ref, serviceSearchComponent: Ref, staffSearchComponent: Ref, contactSearchComponent: Ref, companySearchButton: Ref, serviceSearchButton: Ref, staffSearchButton: Ref, contactSearchButton: Ref, noteField: Ref, saveButton: Ref, locale: Locale, organisationEmail: string, connectedUser: UserEntity, minDate?: string | undefined, maxDate?: string | undefined, event?: EventEntity, type?: AppointmentType, logger?: Logger, preselection?: { employee?: EmployeeEntity; contact?: ContactEntity; }): EventBookingViewModelType; export {}; //# sourceMappingURL=viewModel.d.ts.map