Skip to content

Commit

Permalink
Clarified that the menu action is refreshing both the surveys and com…
Browse files Browse the repository at this point in the history
…bined topline listings
  • Loading branch information
motin committed Jan 6, 2020
1 parent c33643e commit 221b4c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Note: Global functions must be exposed to the (global as any) object, or it will not be picked up by gas-webpack-plugin.
*/

import { menuRefreshCombinedToplineListing } from "./menuActions/menuRefreshCombinedToplineListing";
import { menuRefreshSurveysAndCombinedToplineListings } from "./menuActions/menuRefreshSurveysAndCombinedToplineListings";

/* tslint:disable:only-arrow-functions */

Expand All @@ -14,10 +14,10 @@ import { menuRefreshCombinedToplineListing } from "./menuActions/menuRefreshComb
const ui = SpreadsheetApp.getUi();
const menu = ui.createMenu("Gapminder Igno Survey Process");
menu.addItem(
`Refresh combined topline listing`,
"menuRefreshCombinedToplineListing"
`Refresh surveys and combined topline listings`,
"menuRefreshSurveysAndCombinedToplineListings"
);
menu.addToUi();
};

(global as any).menuRefreshCombinedToplineListing = menuRefreshCombinedToplineListing;
(global as any).menuRefreshSurveysAndCombinedToplineListings = menuRefreshSurveysAndCombinedToplineListings;
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ import Folder = GoogleAppsScript.Drive.Folder;
import File = GoogleAppsScript.Drive.File;

/**
* Menu item action for "Gapminder Igno Survey Process -> Refresh combined topline listing"
* Menu item action for "Gapminder Igno Survey Process -> Refresh surveys and combined topline listings"
*
* Notes:
* - Creates the `surveys` and `topline_combo` worksheets if they don't exist
* - Verifies that the first headers of the `surveys` and `topline_combo` worksheets are as expected
*/
export function menuRefreshCombinedToplineListing() {
export function menuRefreshSurveysAndCombinedToplineListings() {
refreshCombinedToplineListing();

SpreadsheetApp.getUi().alert(
"Refreshed the combined topline listing (based on files in the gs_results folder)."
"Refreshed the surveys and combined topline listings (based on files in the gs_results folder)."
);

return;
Expand Down

0 comments on commit 221b4c2

Please sign in to comment.