Skip to content

Instantly share code, notes, and snippets.

View timeslot.cmp
<aura:component implements="lightning:availableForFlowScreens" access="global">
<aura:attribute name="mydata" type="conference360__Event__c[]"/>
<aura:attribute name="selectedRows" type="conference360__Event__c[]"/>
<aura:attribute name="mycolumns" type="List"/>
<aura:attribute name="column1_label" type="String"/>
<aura:attribute name="column1_fieldName" type="String"/>
<aura:attribute name="column1_type" type="String"/>
View addBusinessHours.cls
global class addBusinessHours {
global class request
{
@InvocableVariable (label='Start Date' required = true)
global DateTime startDateTime;
@InvocableVariable (label='Business Hours Id' required = true)
global String businessHoursId;
@InvocableVariable (label='Interval To Add (Milliseconds)' required = true)
global Long intervalMilliseconds;
}
View CalculateNextBusinessDate.cls
global class CalculateNextBusinessDate {
global class request
{
@InvocableVariable (label='Start Date' required = true)
global DateTime givenDateTime;
@InvocableVariable (label='Business Hours Id' required = true)
global String businessHoursId;
}
global class response
{
View calculateIsInsideBusinessHours.cls
global class calculateIsInsideBusinessHours {
global class request
{
@InvocableVariable (label='Date' required = true)
global DateTime givenDateTime;
@InvocableVariable (label='Business Hours Id' required = true)
global String businessHoursId;
}
View CalculateBusinessHoursDiff.cls
global class CalculateBusinessHoursDiff {
global class request
{
@InvocableVariable(label='Business Hours Id' required = true)
global String businessHoursId;
@InvocableVariable(label='Start Date' required = true)
global DateTime startDate;
@InvocableVariable(label='End Date' required = true)
global DateTime endDate;
}
View lookupFSCController.js
({
doInit: function(component, event, helper) {
helper.hlpCheckValidity(component, event);
}
});
View visualNav.js-meta.xml
<?xml version="1.0" encoding="UTF-8" ?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>47.0</apiVersion>
<isExposed>true</isExposed>
<masterLabel>Professor Flow | Visual Nav</masterLabel>
<targets>
<target>lightning__FlowScreen</target>
</targets>
<targetConfigs>
<targetConfig targets="lightning__FlowScreen">
View visualNav.js
import {
LightningElement,
api,
track
} from "lwc";
import {
FlowAttributeChangeEvent
} from "lightning/flowSupport";
import {
FlowNavigationNextEvent
View visualNav.html
<template>
<lightning-layout multiple-rows="true">
<template for:each={items} for:item="item">
<lightning-layout-item class="slds-m-around_xxx-small" key={item.uniqueId}>
<div class="slds-visual-picker" tabindex="0" onkeyup={handleKeyUp} data-outputlabel={item.label}
data-outputsublabel={item.sublabel} data-outputvalue={item.value} data-outputunique={item.uniqueId}>
<input type="radio" onclick={handleChange} name="visualList" id={item.uniqueId} tabindex="-1"
title={item.label} value={item.value} data-outputlabel={item.label} data-outputsublabel={item.sublabel}
data-outputvalue={item.value} data-outputunique={item.uniqueId} />
<label for={item.uniqueId}>
View datatableFSCController.js
({
init: function (cmp, event, helper) {
// Maximum Row Selection
if(cmp.get('v.singleSelection') == '1') {
cmp.set('v.maxRowSelection','1')
}
// Hide Checkbox Column
if(cmp.get('v.hideShow').toLowerCase() == 'hide') {