Initial commit: AgentForceTest Salesforce DX project
This commit is contained in:
26
force-app/main/default/lwc/jiraIssueList/jiraIssueList.js
Normal file
26
force-app/main/default/lwc/jiraIssueList/jiraIssueList.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { LightningElement, wire } from "lwc";
|
||||
import getJiraIssues from "@salesforce/apex/JiraIntegration.getJiraIssues";
|
||||
|
||||
export default class JiraIssueList extends LightningElement {
|
||||
@wire(getJiraIssues)
|
||||
wiredIssues({ error, data }) {
|
||||
if (data) {
|
||||
this.issues = data;
|
||||
this.error = undefined;
|
||||
} else if (error) {
|
||||
this.error = error;
|
||||
this.issues = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
issues;
|
||||
error;
|
||||
|
||||
get hasIssues() {
|
||||
return this.issues && this.issues.length > 0;
|
||||
}
|
||||
|
||||
get hasError() {
|
||||
return this.error !== undefined;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>60.0</apiVersion>
|
||||
<isExposed>true</isExposed>
|
||||
<masterLabel>Jira Issue List</masterLabel>
|
||||
<description>Displays a list of Jira issues</description>
|
||||
<targets>
|
||||
<target>lightning__RecordPage</target>
|
||||
<target>lightning__AppPage</target>
|
||||
<target>lightning__HomePage</target>
|
||||
</targets>
|
||||
</LightningComponentBundle>
|
||||
Reference in New Issue
Block a user