openModal
This function places a request to open a modal over the current hosting page
Syntax
import messageHandler from '@vcita/intandem-app-com';
// ...initialize the handler
messageHandler.openModal(MODAL_NAME, PAYLOAD?).then(result => {
console.log('The modal result was', result);
});
Parameters
modalName
(String): The name of the modal- * init object _8 (Object)_ : An object with params required to initialize the modal
Available modals
App Market
messageHandler.openModal('AppMarket')
App market - specific app deeplink
messageHandler.openModal('AppMarket', [{appCodeName:"<APP_CODE_NAME>"}])
Calendar Sync Dialog
const user = await messageHandler.getUser();
messageHandler.openModal('calendar-sync-dialog', [{staffUid: user.data.staffUid}])
Import Clients
const user = await messageHandler.getUser();
messageHandler.openModal('ImportContacts', [{staffUid: user.data.staffUid}])
Online Scheduling Wizard
const user = await messageHandler.getUser();
messageHandler.openModal('OnlineScheduling', [{staffUid: user.data.staffUid}])
Client Picker
messageHandler.openModal('ClientPicker');
New Appointment
messageHandler.openModal('NewAppointment');
Import Products
messageHandler.openModal('import-products-modal');
Updated 1 day ago