...
Code Block |
---|
/* calendar.cmp */ <aura:component implements="flexipage:availableForAllPageTypes" access="global"> <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> <aura:attribute name="myFilters" type="Object[]" /> <B25:multiCalendarWrapper calendarId="Resources" view="week" startDate="2020-12-31" hiddenDimensionFilters="{!v.myFilters}" > </B25:multiCalendarWrapper> </aura:component> /* calendarController.js */ ({ doInit: function (cmp, event, helper) { var recordId = cmp.get('v.recordId'); cmp.set('v.myFilters', [ { 'fieldName': 'B25__Is_Active__c', 'operator': '=', 'value': 'true'}, { type: 1, logicalOperator: 'OR', subFilters: [ { 'fieldName': 'Name', 'operator': '=', 'value': 'Awesome'}, { 'fieldName': 'Name', 'operator': '=', 'value': 'Nice'} ] } ]); } }) |
Anchor | ||||
---|---|---|---|---|
|
Passing Dynamic Filters
You can pass a special object to the property dynamicFilters
(available only on multi calendars). This property allows you to specify initial values for two different types of dynamic filters: “Available Resource Filter” (allowing you to show only available resources during the specified times), and “Hide rows without reservations” (allowing you to choose whether to show rows that have no visible reservations in the calendar view).
dynamicFilters
should contain the following properties:
Property | Description |
---|---|
hideRowsWithoutReservations | A boolean specifying whether to show empty rows in the calendar view. |
availableResourceFilter | A nested object containing initial values for the available resource filter. |
availableResourceFilter
should contain the following properties:
Property | Description |
---|---|
enabled | A boolean specifying whether to show empty rows in the calendar view. |
fromDateTime | A datetime string specifying the beginning datetime for the filter. |
untilDateTime | A datetime string specifying the ending datetime for the filter. |
Code Block |
---|
/* calendar.cmp */
<aura:component implements="flexipage:availableForAllPageTypes" access="global">
<aura:attribute
name="dynamicFilters"
type="Object"
/>
<B25:multiCalendarWrapper
calendarId="Resources"
view="week"
startDate="2024-04-12"
dynamicFilters="{!v.dynamicFilters}"
>
</B25:multiCalendarWrapper>
</aura:component>
/* calendarController.js */
({
doInit: function (cmp, event, helper) {
component.set("v.dynamicFilters", {
hideRowsWithoutReservations: true,
availableResourceFilter: {
enabled: true,
fromDateTime: '2024-04-12T12:30:00.000Z',
untilDateTime: '2024-04-19T12:30:00.000Z'
}
});
}
}) |
MDAContext
Property | Expected Value | Description |
---|---|---|
enabled | Boolean | If the MDA filtering is enabled |
context | Map<String, List<Id>> | A Map of The availability lookups on the Availability record to a list of ids. Availabilities will only be included if the lookup specified matches any of the provided ids. |
subtreeContext | Map<String, List<Id>> | Works in the same way as the normal context however will not be take into account if the availability is an unavailability |
...