Skip to content

Commit

Permalink
Merge pull request #78 from rotem-hen-sf/main
Browse files Browse the repository at this point in the history
Adjust use of refreshGraphQL to recent changes
  • Loading branch information
khawkins authored Sep 18, 2023
2 parents c2b1f87 + 679da26 commit 965be97
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion MobileDashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Let your mobile workers easily see an overview of their data. For example, show
3. Under Permission Set Assignments, click **Edit Assignments**.
4. Enable **Field Service Mobile Dashboard Permissions**.
5. Repeat these steps for all the relevant mobile users.
3. To install the package, click https://login.salesforce.com/packaging/installPackage.apexp?p0=04tB0000000hFeMIAU.
3. To install the package, click https://login.salesforce.com/packaging/installPackage.apexp?p0=04t1Q0000012EomQAE.
4. From the Developer Console, run the script to get preconfigured cards for your dashboard: `DashboardPostInstall.onInstall();`
5. From the App Launcher, find and select **Mobile Dashboard Settings**.
6. Review the details of the cards and change them as needed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ export default class MainDashboard extends LightningElement {
this.queryResult = result;
const { data, errors } = result;
if (data) {
const allSettings = data?.uiapi?.query['Mobile_Dashboard_Setting__c']?.edges;
if (allSettings) this.populateDashboardSettings(allSettings);
if (!this.refreshed) {
this.refreshGraphQL();
this.refreshed = true;
return;
this.refreshGraphQL();
}
const allSettings = data?.uiapi?.query['Mobile_Dashboard_Setting__c']?.edges;
if (allSettings) this.populateDashboardSettings(allSettings);
}
if (errors) {
console.log(JSON.stringify(errors));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ export default class SummaryComponent extends LightningElement {
this.queryResult = result;
const { data, errors } = result;
if (data) {
this.setRecordsAndSubQueries(data);
if (!this.refreshed) {
this.refreshGraphQL();
this.refreshed = true;
return;
this.refreshGraphQL();
}
this.setRecordsAndSubQueries(data);
}
if (errors) {
console.log(errors);
Expand Down

0 comments on commit 965be97

Please sign in to comment.