-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgrade npm dependencies * Create separate files for actions and update reducers to use 4.x interface * Perform secondary refactor of reducers * Refactor actions and reducers and update specs * Update service usages * Update service specs * Upgrade dependencies * Update component usages * Rename Location to Site and temporarily remove Rx implementation for create organization * Update specs * Update remaining dispatches in services * Destroy subscriptions in ngOnDestroy hook * Rename check-in button to Check In * Upgrade jasmine-node back to 2.0.0
- Loading branch information
Showing
84 changed files
with
2,538 additions
and
1,662 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Action } from '@ngrx/store'; | ||
import { Organization } from '../models/organization'; | ||
|
||
export const LOAD = '[Organizations] Load'; | ||
export const ADD = '[Organizations] Add'; | ||
export const MODIFY = '[Organizations] Modify'; | ||
|
||
export class Load implements Action { | ||
readonly type = LOAD; | ||
|
||
constructor(public payload: Organization[]) {} | ||
} | ||
|
||
export class Add implements Action { | ||
readonly type = ADD; | ||
|
||
constructor(public payload: Organization) {} | ||
} | ||
|
||
export class Modify implements Action { | ||
readonly type = MODIFY; | ||
|
||
constructor(public payload: Organization) {} | ||
} | ||
|
||
export type All | ||
= Load | ||
| Add | ||
| Modify; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { Action } from '@ngrx/store'; | ||
import { Site } from '../models/site'; | ||
|
||
export const LOAD = '[Sites] Load'; | ||
export const ADD = '[Sites] Add'; | ||
export const MODIFY = '[Sites] Modify'; | ||
|
||
/** | ||
* Every action is comprised of at least a type and an optional | ||
* payload. Expressing actions as classes enables powerful | ||
* type checking in reducer functions. | ||
*/ | ||
export class Load implements Action { | ||
readonly type = LOAD; | ||
|
||
constructor(public payload: Site[]) {} | ||
} | ||
|
||
export class Add implements Action { | ||
readonly type = ADD; | ||
|
||
constructor(public payload: Site) {} | ||
} | ||
|
||
export class Modify implements Action { | ||
readonly type = MODIFY; | ||
|
||
constructor(public payload: Site) {} | ||
} | ||
|
||
/** | ||
* Export a type alias of all actions in this action group | ||
* so that reducers can easily compose action types. | ||
*/ | ||
export type All | ||
= Load | ||
| Add | ||
| Modify; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Action } from '@ngrx/store'; | ||
import { User } from '../models/user'; | ||
|
||
export const LOAD = '[Users] Load'; | ||
export const ADD = '[Users] Add'; | ||
export const MODIFY = '[Users] Modify'; | ||
|
||
export class Load implements Action { | ||
readonly type = LOAD; | ||
|
||
constructor(public payload: User[]) {} | ||
} | ||
|
||
export class Add implements Action { | ||
readonly type = ADD; | ||
|
||
constructor(public payload: User) {} | ||
} | ||
|
||
export class Modify implements Action { | ||
readonly type = MODIFY; | ||
|
||
constructor(public payload: User) {} | ||
} | ||
|
||
export type All | ||
= Load | ||
| Add | ||
| Modify; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Action } from '@ngrx/store'; | ||
import { Visit } from '../models/visit'; | ||
|
||
export const LOAD = '[Visits] Load'; | ||
export const ADD = '[Visits] Add'; | ||
export const MODIFY = '[Visits] Modify'; | ||
|
||
export class Load implements Action { | ||
readonly type = LOAD; | ||
|
||
constructor(public payload: Visit[]) {} | ||
} | ||
|
||
export class Add implements Action { | ||
readonly type = ADD; | ||
|
||
constructor(public payload: Visit) {} | ||
} | ||
|
||
export class Modify implements Action { | ||
readonly type = MODIFY; | ||
|
||
constructor(public payload: Visit) {} | ||
} | ||
|
||
export type All | ||
= Load | ||
| Add | ||
| Modify; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Action } from '@ngrx/store'; | ||
import { Volunteer } from '../models/volunteer'; | ||
|
||
export const LOAD = '[Volunteers] Load'; | ||
export const ADD = '[Volunteers] Add'; | ||
export const MODIFY = '[Volunteers] Modify'; | ||
|
||
export class Load implements Action { | ||
readonly type = LOAD; | ||
|
||
constructor(public payload: Volunteer[]) {} | ||
} | ||
|
||
export class Add implements Action { | ||
readonly type = ADD; | ||
|
||
constructor(public payload: Volunteer) {} | ||
} | ||
|
||
export class Modify implements Action { | ||
readonly type = MODIFY; | ||
|
||
constructor(public payload: Volunteer) {} | ||
} | ||
|
||
export type All | ||
= Load | ||
| Add | ||
| Modify; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.