Skip to content

Commit

Permalink
feat(gDriveSync): add promise buttons also to time sheet export
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesjo committed Mar 9, 2018
1 parent c3885ac commit af9e5af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Expand Up @@ -103,14 +103,17 @@ <h2>Time Sheet Export</h2>

<div>
<md-button class="md-raised md-primary"
promise-btn
ng-show="!vm.isLoggedIn"
ng-click="vm.login()">Login
</md-button>
<md-button class="md-raised md-primary"
promise-btn
ng-show="vm.isLoggedIn"
ng-click="vm.logout()">Logout
</md-button>
<md-button class="md-raised md-primary"
promise-btn
ng-disabled="!vm.opts.spreadsheetId"
ng-show="vm.isLoggedIn"
ng-click="vm.readSpreadsheet()">Read spreadsheet
Expand Down Expand Up @@ -193,7 +196,8 @@ <h2>Time Sheet Export</h2>
<md-button ng-click="vm.save()"
ng-show="vm.actualValues.length > 0 && vm.isLoggedIn"
type="button"
class="md-raised md-primary">
class="md-raised md-primary"
promise-btn>
<ng-md-icon icon="save"></ng-md-icon>
Save row
</md-button>
Expand Down
Expand Up @@ -18,6 +18,7 @@
let vm = this;
vm.theme = theme;
vm.opts = $rootScope.r.uiHelper.timeSheetExportSettings;
vm.GoogleApi = GoogleApi;
vm.actualValues = [];

vm.roundTimeOptions = [
Expand Down Expand Up @@ -53,7 +54,7 @@

vm.logout = () => {
vm.isLoading = true;
GoogleApi.logout()
return GoogleApi.logout()
.then(() => {
vm.isLoggedIn = false;
vm.isLoading = false;
Expand Down

0 comments on commit af9e5af

Please sign in to comment.