The floorplan can be used on any other page by wrapping the calendar component and providing a number of variables.
Variable Name | Value/Description |
---|
floorplanId | The Id of a Floorplan__c record. This is the floorplan that will be loaded in the component.
|
highlightedAreaIds (optional) | A comma-separated list of Area__c record ids. These records will be highlighted on the floorplan.
If no highlightedAreaIds are specified, all the existing areas will be highlighted on the floorplan. |
highlightColor (optional) | Either a hex-color code or a color name that will be the highlight color of the areas defined in the highlightedAreaIds. Both #FFC0CB and pink are valid options.
Fallback color is #088F8F . |
floorplanDateTime (optional) | A datetime value, allowing you to initialise the floorplan on a certain date/time.
Fallback will be today’s date. |
height (optional) | Height of the floorplan in pixels.
Has a fallback of 500. |
Sample code:
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId">
<FP25:floorplanWrapper
floorplanId="a027a000008CYHbAAO"
highlightedAreaIds="a017a0000071YY2AAM"
highlightColor="#ff0000"
>
</FP25:floorplanWrapper>
</aura:component>
CODE
Floorplan Wrapper for a custom Floorplan field on Opportunity
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<aura:attribute name="opportunityRecord" type="Object"/>
<aura:attribute name="recordLoadError" type="String"/>
<force:recordData aura:id="recordLoader"
recordId="{!v.recordId}"
fields="Name, Floorplan__c,Area__c"
targetFields="{!v.opportunityRecord}"
targetError="{!v.recordLoadError}"
/>
<aura:if isTrue="{!v.opportunityRecord.Floorplan__c}">
<FP25:floorplanWrapper
floorplanId="{!v.opportunityRecord.Floorplan__c}"
highlightedAreaIds="{!v.opportunityRecord.Area__c}"
highlightColor="#ff0000"
>
</FP25:floorplanWrapper>
</aura:if>
</aura:component>
CODE