Skip to content

Instantly share code, notes, and snippets.

@ChadRehmKineticData
Created March 31, 2020 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChadRehmKineticData/288506add4ef58a0716831afcc0d222e to your computer and use it in GitHub Desktop.
Save ChadRehmKineticData/288506add4ef58a0716831afcc0d222e to your computer and use it in GitHub Desktop.
Calendar Configuration
[
{
"name": "Calendar Test",
"color": "#0000ff",
"source": {
"kappSlug": "services",
"formSlug": "shared-resources",
"bridgedResourceName": "Calendar Data",
"parameters": {"ce": {
"fieldName": "Date Range"
}}
},
...
}
]
[
{
"name": "Calendar Test",
"color": "#0000ff",
"source": {
"kappSlug": "services",
"formSlug": "shared-resources",
"bridgedResourceName": "Calendar Data",
"parameters": () =>
{
const mDate = moment(moment().format(), 'YYYY-MM');
const daysCount = mDate.daysInMonth() + 14;
const dates = Array(daysCount)
.fill(null)
.map((v, index) => {
const addDays = index === 0 ? -7 : 1;
return mDate.add(addDays, 'days').format('YYYY-MM-DD');
});
dates.push(mDate.format('YYYY-MM'));
return { 'Date Range': `(${dates.map(date => `'${date}'`).join(',')})` };
},
...
}
]
[
{
"name": "Calendar Test",
"color": "#0000ff",
"source": {
"kappSlug": "services",
"formSlug": "shared-resources",
"bridgedResourceName": "Calendar Data",
},
"coreMapping": {
"start": "Start Date Time",
"end": "End Date Time",
"type": "Host",
"title": "Title",
"allDay": "All Day"
},
"detailMapping": {
"Status": "Status",
"Host": "Host",
"Person": "Person",
"Start Date Time": "Start Date Time",
"End Date Time": "End Date Time",
"Title": "Title",
"Priority": "Priority",
"Description": "Description"
},
"filterMapping": [
{
"Name": "Host",
"Value": "Host",
"values": {}
},
{
"Name": "Person",
"Value": "Person",
"values": {}
}
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment