-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cba0f87
commit 33d4363
Showing
10 changed files
with
96 additions
and
70 deletions.
There are no files selected for viewing
44 changes: 22 additions & 22 deletions
44
force-app/main/default/aura/AlertBanner/AlertBannerController.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,51 @@ | ||
/** | ||
* @File Name : AlertBannerController.js | ||
* @Description : | ||
* @Description : | ||
* @Author : Stewart Anderson (Salesforce.org) | ||
* @Group : | ||
* @Last Modified By : Stewart Anderson (Salesforce.org) | ||
* @Last Modified On : 4/7/2020, 8:57:28 AM | ||
* @Modification Log : | ||
* @Group : | ||
* @Last Modified By : Stewart Anderson | ||
* @Last Modified On : 10-23-2023 | ||
* @Modification Log : | ||
* Ver Date Author Modification | ||
* 1.0 4/7/2020 Stewart Anderson (Salesforce.org) Initial Version | ||
**/ | ||
({ | ||
doInit: function(component, event, helper) { | ||
doInit: function (component, event, helper) { | ||
|
||
//Get Animal Alert Records | ||
var action = component.get("c.getRelatedAlertRecords"); | ||
action.setParams({ | ||
parentId: component.get("v.recordId"), | ||
}); | ||
action.setCallback(this, function(response) { | ||
|
||
action.setCallback(this, function (response) { | ||
|
||
//Handle Response | ||
if (response.getState() === "SUCCESS") { | ||
|
||
var AnimalBoxDiv = component.find("AlertBox"); | ||
var AnimalAlertList = response.getReturnValue(); | ||
component.set("v.intAnimalAlertsSize",AnimalAlertList.length); | ||
if(AnimalAlertList.length > 0){ | ||
component.set("v.lstAnimalAlerts",response.getReturnValue()); | ||
var AnimalAlertList = response.getReturnValue(); | ||
component.set("v.intAnimalAlertsSize", AnimalAlertList.length); | ||
|
||
if (AnimalAlertList.length > 0) { | ||
component.set("v.lstAnimalAlerts", response.getReturnValue()); | ||
$A.util.removeClass(component.find("AlertBox"), "slds-hide"); | ||
$A.util.addClass(component.find("AlertBox"), "AnimalAlertClass"); | ||
} | ||
} | ||
|
||
} | ||
else if (state == "ERROR") { | ||
|
||
//Handle Error | ||
var toastEvent = $A.get("e.force:showToast"); | ||
toastEvent.setParams({ | ||
"title": "Error!", | ||
"message": "Please contact your administrator, there was an error retrieving animal alerts related to this record." | ||
}); | ||
toastEvent.fire(); | ||
} | ||
} | ||
}); | ||
|
||
$A.enqueueAction(action); | ||
} | ||
}) | ||
}) |
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 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 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 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 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 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 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 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
Oops, something went wrong.