View pubsub.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) 2021. 7Summits Inc. All rights reserved. | |
*/ | |
/** | |
* A basic pub-sub mechanism for sibling component communication. | |
* To be replaced by messageService when out of beta in experience builder: | |
* | |
* https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.use_message_channel | |
* |
View PageLayout_Template.cmp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
- Use this component as a template for custom page layouts | |
- siteforceContentArea, slds-col_padded & com-layout-column are Customer Service (Napili) classes that match | |
- page layout classes in that OTB theme | |
--> | |
<aura:component description="Peak_PageLayout_Template" implements="forceCommunity:layout" access="global"> | |
<aura:attribute name="ContentHeader" type="Aura.Component[]" /> | |
<aura:attribute name="ContentSubHeader" type="Aura.Component[]" /> |
View gist:c563c1c3fe49883cbc0d70450fceb313
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN:VCALENDAR | |
BEGIN:VEVENT | |
DTSTART:20210430 | |
DTEND: 20210430 | |
RRULE:FREQ=MONTHLY;BYDAY=SU,MO,TU,WE,TH,FR,SA;BYSETPOS=-1;WKST=SU | |
SUMMARY:Payday | |
END:VEVENT | |
END:VCALENDAR |
View gist:ae47a4614bdcbcdcf06a330787ce067b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get targetValue() { | |
if (isNaN(requestedAmount)) return 0; | |
if (isNan(otherRequestedAmount)) return 0; | |
return requestedAmount + otherRequestedAmount; | |
} |
View feeditem-soql-query.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
feedItemsList = [ | |
SELECT Id, Body, Title, Parent.Name, CreatedDate, | |
TYPEOF InsertedBy WHEN User THEN Name, MediumPhotoUrl END | |
FROM FeedItem | |
WHERE CreatedDate = LAST_N_DAYS:30 | |
ORDER BY CreatedDate DESC | |
]; |
View bad-feeditem-soql-query-3.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
feedItemsList = [ | |
SELECT Id, Body, Title, CreatedDate, Parent.Name, InsertedBy.MediumPhotoUrl | |
FROM FeedItem | |
WHERE CreatedDate = LAST_N_DAYS:30 | |
ORDER BY CreatedDate DESC | |
]; | |
feedItemsList = [ | |
SELECT Id, Body, Title, CreatedDate, Parent.Name, InsertedBy__r.MediumPhotoUrl | |
FROM FeedItem |
View bad-feeditem-soql-query-2.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
feedItemsList = [ | |
SELECT Id, Body, Title, CreatedDate, Parent.Name, Parent.Photo.mediumPhotoUrl | |
FROM FeedItem | |
WHERE InsertedBy = LAST_N_DAYS:30 | |
ORDER BY CreatedDate DESC | |
]; |
View bad-feeditem-soql-query.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
feedItemsList = [ | |
SELECT Id, Body, Title, CreatedDate, Parent.Name, Parent.MediumPhotoUrl | |
FROM FeedItem | |
WHERE CreatedDate = LAST_N_DAYS:30 | |
ORDER BY CreatedDate DESC | |
]; | |
feedItemsList = [ | |
SELECT Id, Body, Title, CreatedDate, Parent.Name, Parent__r.MediumPhotoUrl | |
FROM FeedItem |
View websocketChat.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this._socket.on('refreshChatUsers', () => { | |
return refreshApex(this.wiredChatUsers); | |
}); |
View server.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
socket.on('userEnteredChat', () => { | |
io.emit('refreshChatUsers'); | |
}); | |
socket.on('userLeftChat', () => { | |
io.emit('refreshChatUsers'); | |
}); |
NewerOlder