Skip to content

Commit

Permalink
[DriveWorks] Improve user workflow by showing the running job directl…
Browse files Browse the repository at this point in the history
…y if there is
  • Loading branch information
ycui1984 committed Jul 29, 2024
1 parent 44f1cf8 commit 6acd0db
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions core/Common.gs
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
function onHomepage(e) {
console.log('onHomePage = ' + JSON.stringify(e));
console.log('onHomePage: ' + JSON.stringify(e));
var statusCard = buildCardViaPropertiesIfExist();
if (statusCard) {
console.log('onHomePage: return existing status card');
return statusCard.build();
}
console.log('onHomePage: return brand new home card');
return createHomeCard();
}

Expand Down Expand Up @@ -513,11 +519,7 @@ function deleteJob() {
var jobMetadataKey = getJobMetadataKey(email);
var properties = PropertiesService.getUserProperties();
properties.deleteProperty(jobMetadataKey);
var navigation = CardService.newNavigation()
.popCard();
var actionResponse = CardService.newActionResponseBuilder()
.setNavigation(navigation);
return actionResponse.build();
return createHomeCard();
}


Expand Down

0 comments on commit 6acd0db

Please sign in to comment.