Hi
My objective is to add a button inside the eventTooltip that will run a function inside the ts file to set some parameters and navigate to a different page when clicked.
here is my configuration:
features : {
// Event right click placement
eventTooltip : {
align : 'l-r',
renderer : (data: any) =>
`<dl>
<dt>Time:</dt>
<dd>
${DateHelper.format(data.eventRecord.startDate, 'LT')} - ${DateHelper.format(data.eventRecord.endDate, 'LT')}
</dd>
${data.eventRecord.orderCompact ? `<dt>Customer:</dt><dd>${data.eventRecord.orderCompact.customer.name} (${data.eventRecord.orderCompact.customer.phone})</dd>` : ''}
<dt>Address:</dt>
${data.eventRecord.address ? `<dd>${data.eventRecord.address.street} ${data.eventRecord.address.number}, ${data.eventRecord.address.postal_code} ${data.eventRecord.address.city}</dd>` : `<dd>No address added</dd>`}
${!data.eventRecord.orderCompact ? `<dt>Description:</dt>` : ''}
${!data.eventRecord.orderCompact && data.eventRecord.eventDescription != null ? `<dd>${data.eventRecord.eventDescription}</dd>` : ``}
${data.eventRecord.orderCompact ? `<dt>Status: </dt><dd>${data.eventRecord.orderCompact.order_status_name}</dd>` : ``}
${data.eventRecord.orderCompact ? `<button class="btn btn-primary btn-sm" (click)="onEventClick($event)">Go to order</button>` : ``}
</dl>
`,
onBeforeShow(e: any) {
const { source } = e;
source.tools.delete = source.eventRecord.eventTypeId != 1;
source.tools.edit = source.eventRecord.eventTypeId != 1;
}
},
how can i add a (click)= on the button inside the tooltip ?
tried to add it as normal but it is not trigered when pressed.