Skip to content

Commit

Permalink
Deactivate and reactivate dog & test checklist
Browse files Browse the repository at this point in the history
  • Loading branch information
mjrochford committed Feb 5, 2020
1 parent c80578f commit 4283387
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
8 changes: 8 additions & 0 deletions app/controllers/ProfileController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,12 @@ export class ProfileController implements ng.IComponentController {
public deactivate(id: string) {
this.hounds.deactivateDog(id);
}

/**
* reactivates a dog
* @param id to reactivate
*/
public reactivate(id: string) {
this.hounds.reactivateDog(id);
}
}
12 changes: 9 additions & 3 deletions dist/res/views/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,15 @@
<button ng-show="profile.editMode" class="profile-button"
ng-click="profile.editMode = false; root.saveProfile(root.dogProfile)">Save</button>

<button class="profile-button"
ng-click="profile.deactivate(root.dogProfile.id); root.closeDogProfile()">Deactivate
Dog</button>
<button ng-show = "root.dogProfile.activeClient" class="profile-button"
ng-click="profile.deactivate(root.dogProfile.id); root.closeDogProfile()">
Deactivate Dog
</button>

<button ng-show = "!root.dogProfile.activeClient" class="profile-button"
ng-click="profile.reactivate(root.dogProfile.id); root.closeDogProfile()">
Reactivate Dog
</button>

<div ng-if="!profile.editMode" class="dog-profile-name">{{root.dogProfile.name}}</div>
<h2 class="dog-profile-name" style="font-size:1rem">
Expand Down
2 changes: 1 addition & 1 deletion dist/res/views/widgets/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ <h3>Settings</h3>
<label>Closing Hour PM</label>
<input class="settings-number" type="number" ng-model="root.$settings.HOURS.CLOSING.PM">
</div>
<button ng-click="root.$settings.save()">Save</button>
</div>

<button ng-click="root.$settings.save()">Save</button>
<button class="logout-button" ng-click="root.logout()">Logout</button>
<h3>Version {{root.$settings.apiConfig.apiVersion}}</h3>

Expand Down
20 changes: 20 additions & 0 deletions frontend-test-checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Testing checklist
[_] Add a new Dog
- dog.name = "Major J"
- dog.clientName = "Joseph Johnson"
[_] Find Major
- By Major J
- By Joseph Johnson
[_] Add boarding day 0 am -> day 7 pm
[_] Add boarding day 0 pm -> day 7 am
[_] Add daycare day 0 am -> noon
[_] Add daycare day 0 am -> pm
[_] Add boarding day -1 am -> day 8 pm
[_] Add boarding day -1 pm -> day 8 am
[_] Add boarding 1st day of year -> 1st day of next year
[_] Add daycare every day across DLS
[_] Add events for each half hour of the week
[_] Delete event
[_] Deactivate Dog
[_] Reactivate Dog
[_] Delete Dog

0 comments on commit 4283387

Please sign in to comment.