Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Milestone/iteration 1 remainders #72

Merged
merged 105 commits into from
Nov 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
fbb81f1
Merge branch 'master' into milestone/iteration-1-remainders
yclee0210 Nov 10, 2017
1c5fafa
feat(property-list): add page routing
yclee0210 Nov 10, 2017
253932a
feat(property-list): add html layout
yclee0210 Nov 10, 2017
696abda
feat(properties-sort): add properties-sort component
yclee0210 Nov 10, 2017
d09d7c3
feat(property-sort): add UI handlers
yclee0210 Nov 10, 2017
f236528
fix(property-list-page): add schema for clarity icons
yclee0210 Nov 10, 2017
a6c419a
refact(property-list): move sort html to properties-sort component an…
yclee0210 Nov 10, 2017
5b187b7
feat(property-list-page): add i/o attributes to app-properties-sort e…
yclee0210 Nov 10, 2017
53bfd18
style(properties-sort): formatting
yclee0210 Nov 10, 2017
750c662
feat(properties): add main list component
yclee0210 Nov 10, 2017
d6fd307
feat(properties): add getMore event emission
yclee0210 Nov 10, 2017
c254856
style(properties): formatting
yclee0210 Nov 10, 2017
2f9ffce
feat(properties): move dummy html to properties component & wire
yclee0210 Nov 10, 2017
17b5e9a
style(property-list-page): formatting
yclee0210 Nov 10, 2017
c39e85f
refact(property-list-page): add dummy data
yclee0210 Nov 10, 2017
fbdc83f
feat(requestMore): add handler for getMore event
yclee0210 Nov 10, 2017
6d36470
Merge pull request #57 from CS506-MS3/feat/add-property-list-page-ui
yclee0210 Nov 10, 2017
ac42242
build(env): add local env
yclee0210 Nov 11, 2017
b25f082
fix(access-purchase): fix data structure
yclee0210 Nov 11, 2017
c36546a
fix(access-purchase): fix token handler scope error
yclee0210 Nov 11, 2017
951f652
fix(access-purchase-page): add missing submit method binding
yclee0210 Nov 11, 2017
48c8cf4
fix(api-endpoints): update pricings api endpoint
yclee0210 Nov 11, 2017
10eb2f1
fix(access-purchase-page): fix type error
yclee0210 Nov 11, 2017
fbb95bb
Merge pull request #58 from CS506-MS3/fix/access-purchase
yclee0210 Nov 11, 2017
a4e3f2f
feat(properties): add reducer to app
yclee0210 Nov 11, 2017
88fbc3f
feat(properties): add cursor field to query param & properties
yclee0210 Nov 11, 2017
e3a03ef
feat(properties-query): add api
yclee0210 Nov 11, 2017
74fe0d5
feat(properties.service): implement query
yclee0210 Nov 11, 2017
f751fa5
fix(properties.component): add default image
yclee0210 Nov 11, 2017
e9c9b7c
feat(property-list-page): implement properties data component
yclee0210 Nov 11, 2017
43195ad
Merge pull request #59 from CS506-MS3/feat/add-properties-api
yclee0210 Nov 11, 2017
cae62e9
feat(landing-page): add link to properties page
yclee0210 Nov 11, 2017
f74016a
feat(property-create): get options from server
yclee0210 Nov 11, 2017
7d69c16
fix(property-create): update to match server API
yclee0210 Nov 11, 2017
1f20ba3
Merge pull request #60 from CS506-MS3/test/create-property
yclee0210 Nov 11, 2017
2f5d8b9
fix(user-info): update user info get logics
yclee0210 Nov 15, 2017
3a23dd0
fix(access): fix access purchase
yclee0210 Nov 15, 2017
81a9c14
fix(property-create): fix property create success handling
yclee0210 Nov 18, 2017
c675f67
fix(my-properties/access): fix integration test errors
yclee0210 Nov 18, 2017
c27b7c3
style(app): fix lint & test errors
yclee0210 Nov 18, 2017
d3254bb
Merge pull request #61 from CS506-MS3/test/integration-test-171114
yclee0210 Nov 18, 2017
0108045
feat(property-page): add UI layout
yclee0210 Nov 19, 2017
cd25e70
search-bar
Nov 21, 2017
8190a21
feat(property): add domain
yclee0210 Nov 22, 2017
a22aea5
feat(app): register property reducer
yclee0210 Nov 22, 2017
96b7b5b
feat(property): add get api
yclee0210 Nov 22, 2017
acc293c
feat(property): wire feature
yclee0210 Nov 22, 2017
241102e
Merge branch 'milestone/iteration-1-remainders' into feat/property-page
yclee0210 Nov 22, 2017
8ee1fb1
fix(searching-bar): remove from app module
yclee0210 Nov 22, 2017
5d7a6da
style(property-page): remove console log
yclee0210 Nov 22, 2017
53f48db
fix(property-list-page): remove mock data
yclee0210 Nov 22, 2017
9bf64a9
test(property-page): add mock data
yclee0210 Nov 22, 2017
e124a44
fix(properties): fix missing router testing module
yclee0210 Nov 22, 2017
0f350d0
style(app): fix lint errors & remove personal info
yclee0210 Nov 22, 2017
c587763
Merge pull request #63 from CS506-MS3/feat/property-page
yclee0210 Nov 22, 2017
129570e
feat(wishlist): add dropdown ui with dummy data
yclee0210 Nov 22, 2017
a0f57fc
feat(header): show wishlist only when authenticated
yclee0210 Nov 22, 2017
4813950
feat(wishlist): add wishlist button to shared module
yclee0210 Nov 22, 2017
f5ea4c9
feat(wishlist): add wishlist in account info
yclee0210 Nov 22, 2017
2b3a580
test(wishlist): fix tests
yclee0210 Nov 22, 2017
3d451ea
style(lint): missing semicolons
yclee0210 Nov 22, 2017
1cef74d
Merge pull request #64 from CS506-MS3/feat/add-wishlist-ui
yclee0210 Nov 22, 2017
920d077
Added some code
namanmaheshwari97 Nov 23, 2017
d7bda1d
fix(item-id): allow string id
yclee0210 Nov 25, 2017
9fb5ee5
feat(wishlist): add api constants
yclee0210 Nov 25, 2017
9f6930c
feat(wishlist): post api
yclee0210 Nov 25, 2017
f39a6d9
feat(wishlist): delete api
yclee0210 Nov 25, 2017
5113d59
feat(wishlist): register to user module
yclee0210 Nov 25, 2017
edab77b
fix(wishlist): fix wishlist styles
yclee0210 Nov 25, 2017
7faa732
feat(wishlist): wire features
yclee0210 Nov 25, 2017
ffb56db
Merge pull request #65 from CS506-MS3/feat/add-wishlist-api-and-finis…
yclee0210 Nov 25, 2017
94ed775
Merge pull request #66 from CS506-MS3/milestone/wishlist
yclee0210 Nov 25, 2017
f3cb231
Merge branch 'milestone/iteration-1-remainders' into feat/filter-listing
yclee0210 Nov 25, 2017
b34feb4
feat(filter): add filter and search
yclee0210 Nov 25, 2017
d6c277f
test(filters): fix specs
yclee0210 Nov 25, 2017
3f622fa
style(lint): fix lint error
yclee0210 Nov 25, 2017
e1d95e6
Merge pull request #67 from CS506-MS3/feat/filter-listing
yclee0210 Nov 25, 2017
e6f18b8
feat(password-reset): add password reset form type
yclee0210 Nov 26, 2017
1ccf738
feat(password-reset): add apis
yclee0210 Nov 26, 2017
c009e68
refact(email-form): move email form to shared module
yclee0210 Nov 26, 2017
eae9b24
feat(password-reset): add effect & register to module
yclee0210 Nov 26, 2017
df14023
feat(password-reset): add service & its specs
yclee0210 Nov 26, 2017
4cdeaa8
refact(shared): register email form component and expose reactive for…
yclee0210 Nov 26, 2017
b9dc5f6
feat(password-reset): add UI pages
yclee0210 Nov 26, 2017
54f3539
Merge pull request #68 from CS506-MS3/feat/reset-password
yclee0210 Nov 26, 2017
8160df7
feat(domain): add type decl for password and user info change forms
yclee0210 Nov 26, 2017
f465e82
feat(personal-info): add button links to change password and edit use…
yclee0210 Nov 26, 2017
11dfa5a
feat(password-change): add page object
yclee0210 Nov 26, 2017
f6f5360
feat(user-info-edit): add page component
yclee0210 Nov 26, 2017
bae8a1a
feat(routes): add routes
yclee0210 Nov 26, 2017
c8efc08
fix(route): change uri for change password
yclee0210 Nov 26, 2017
9798497
fix(app): add missing module
yclee0210 Nov 26, 2017
acb8e09
feat(password-change): add UI
yclee0210 Nov 26, 2017
db6dd1f
feat(user-info-edit): add UI & form validations
yclee0210 Nov 26, 2017
92fae07
feat(user-info): wire components with service
yclee0210 Nov 26, 2017
92d66c3
feat(user-info): add apis & specs
yclee0210 Nov 26, 2017
7057e3f
Merge pull request #69 from CS506-MS3/feat/user-info-edit
yclee0210 Nov 26, 2017
733c81b
fix(properties): fix query param parse error case
yclee0210 Nov 27, 2017
5446e02
fix(app): fix html errors
yclee0210 Nov 28, 2017
f061067
feat(cancel-subscription): add UI
yclee0210 Nov 28, 2017
0417732
feat(cancel-subscription): add api
yclee0210 Nov 28, 2017
77f88cb
Merge pull request #70 from CS506-MS3/feat/cancel-access
yclee0210 Nov 28, 2017
9f08db4
fix(app): fix integration test errors
yclee0210 Nov 28, 2017
8348ab6
fix(package.json): remove mac only dependency
yclee0210 Nov 28, 2017
af32c9b
Merge pull request #71 from CS506-MS3/test/iteration-2-integration-test
yclee0210 Nov 28, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .angular-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"local": "environments/environment.local.ts",
"prod": "environments/environment.prod.ts"
}
}
Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = function (config) {
angularCli: {
environment: 'dev'
},
reporters: ['progress', 'kjhtml'],
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
Expand Down
8,815 changes: 8,815 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"private": true,
"dependencies": {
"@agm/core": "^1.0.0-beta.2",
"@angular/animations": "^4.2.4",
"@angular/common": "^4.2.4",
"@angular/compiler": "^4.2.4",
Expand Down
12 changes: 11 additions & 1 deletion src/app/_actions/accesses.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import {ItemId} from '../_domains/item-id';
import * as CrudActions from './crud.actions';
import {Accesses} from '../_domains/accesses';
import {Access} from '../_domains/access';
import {Action} from '@ngrx/store';

export const ACTION_NAME = 'AccessesActions';

export const SET = ACTION_NAME + CrudActions.SET;
export const ADD_ITEM = ACTION_NAME + CrudActions.ADD_ITEM;
export const REMOVE_ITEM = ACTION_NAME + CrudActions.REMOVE_ITEM;
export const CLEAR = ACTION_NAME + CrudActions.CLEAR;
export const CANCEL_SUBSCRIPTION = ACTION_NAME + 'CANCEL_SUBSCRIPTION';

export class Set extends CrudActions.Set {
constructor(public payload: Accesses) {
Expand All @@ -34,8 +36,16 @@ export class Clear extends CrudActions.Clear {
}
}

export class CancelSubscription implements Action {
type = CANCEL_SUBSCRIPTION;

constructor(public payload: string) {
}
}

export type All
= Set
| AddItem
| RemoveItem
| Clear;
| Clear
| CancelSubscription;
36 changes: 33 additions & 3 deletions src/app/_actions/accesses.reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,41 @@ import {Accesses} from '../_domains/accesses';
const prefix = AccessesActions.ACTION_NAME;
const INIT = 'INIT';
const initialState: Accesses = {
list: []
vendor: null,
customer: null
};

export function reducer(state = initialState, action: Action = {type: INIT}): Accesses {
const newState = Crud.reducer(state, action, prefix, initialState);
switch (action.type) {
case AccessesActions.CANCEL_SUBSCRIPTION:
switch ((<AccessesActions.CancelSubscription>action).payload) {
case 'VENDOR': {

return newState === null ? initialState : newState;
return {
vendor: Object.assign({}, state.vendor, {
next_payment_date: null
}),
customer: state.customer
};
}

case 'CUSTOMER': {

return {
vendor: state.vendor,
customer: Object.assign({}, state.customer, {
next_payment_date: null
})
};
}

default:
return state;
}

default:
const newState = Crud.reducer(state, action, prefix, initialState);

return newState === null ? initialState : newState;
}
}
11 changes: 10 additions & 1 deletion src/app/_actions/auth.actions.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import * as CrudActions from './crud.actions';
import {Auth} from '../_domains/auth';
import {Action} from '@ngrx/store';

export const ACTION_NAME = 'AuthActions';

export const SET = ACTION_NAME + CrudActions.SET;
export const CLEAR = ACTION_NAME + CrudActions.CLEAR;
export const UPDATE_TOKEN = ACTION_NAME + 'UPDATE_TOKEN';

export class Set extends CrudActions.Set {
constructor(public payload: Auth) {
Expand All @@ -18,6 +20,13 @@ export class Clear extends CrudActions.Clear {
}
}

export class UpdateToken implements Action {
type = UPDATE_TOKEN;

constructor(public payload: any) {
}
}
export type All
= Set
| Clear;
| Clear
| UpdateToken;
11 changes: 9 additions & 2 deletions src/app/_actions/auth.reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ const INIT = 'INIT';
const initialState: Auth = new Auth();

export function reducer(state = initialState, action: Action = {type: INIT}): Auth {
const newState = Crud.reducer(state, action, prefix, initialState);
switch (action.type) {
case AuthActions.UPDATE_TOKEN:
return Object.assign({}, state, (<AuthActions.UpdateToken>action).payload);

default:
const newState = Crud.reducer(state, action, prefix, initialState);

return newState === null ? initialState : newState;
}

return newState === null ? initialState : newState;
}
5 changes: 3 additions & 2 deletions src/app/_actions/properties.reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ import {Properties} from '../_domains/properties';
const prefix = PropertiesActions.ACTION_NAME;
const INIT = 'INIT';
const initialState: Properties = {
list: []
list: [],
cursor: null
};

export function reducer(state = initialState, action: Action = {type: INIT}): Properties {
switch (action.type) {
case PropertiesActions.INCREASE_LIST:
return {
...state,
cursor: (<PropertiesActions.IncreaseList>action).payload.cursor,
list: [...state.list, ...((<PropertiesActions.IncreaseList>action).payload.list)]
};

Expand Down
15 changes: 15 additions & 0 deletions src/app/_actions/property-options.actions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import * as CrudActions from './crud.actions';
import {PropertyOptions} from '../_domains/property-options';

export const ACTION_NAME = 'PropertyOptionsActions';

export const SET = ACTION_NAME + CrudActions.SET;

export class Set extends CrudActions.Set {
constructor(public payload: PropertyOptions) {
super(ACTION_NAME);
}
}

export type All
= Set;
17 changes: 17 additions & 0 deletions src/app/_actions/property-options.reducer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {Action} from '@ngrx/store';
import * as PropertyOptionsActions from './property-options.actions';
import * as Crud from './crud.reducer';
import {Property} from '../_domains/property';
import {PropertyOptions} from '../_domains/property-options';

const prefix = PropertyOptionsActions.ACTION_NAME;
const INIT = 'INIT';
const initialState: PropertyOptions = {
list: []
};

export function reducer(state = initialState, action: Action = {type: INIT}): Property {
const newState = Crud.reducer(state, action, prefix, initialState);

return newState === null ? initialState : newState;
}
4 changes: 2 additions & 2 deletions src/app/_actions/property.reducer.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {Action, ActionReducer} from '@ngrx/store';
import * as UserInfoActions from './user-info.actions';
import * as PropertyActions from './property.actions';
import * as Crud from './crud.reducer';
import {Property} from '../_domains/property';

const prefix = UserInfoActions.ACTION_NAME;
const prefix = PropertyActions.ACTION_NAME;
const INIT = 'INIT';
const initialState = null;

Expand Down
6 changes: 4 additions & 2 deletions src/app/_domains/access.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export interface Access {
id: number;
// TODO: Needs configuration
id: string;
cancelled: boolean;
nextPaymentDate: string;
paymentAmount: number;
}
3 changes: 2 additions & 1 deletion src/app/_domains/accesses.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Access} from './access';

export interface Accesses {
list: Access[];
vendor: Access;
customer: Access;
}
2 changes: 1 addition & 1 deletion src/app/_domains/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ export class Auth {

constructor(public token: string = null,
public email: string = null,
public id: number = null) {
public id: number | string = null) {
}
}
4 changes: 4 additions & 0 deletions src/app/_domains/change-password-form.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface ChangePasswordForm {
password: string;
new_password: string;
}
7 changes: 7 additions & 0 deletions src/app/_domains/edit-user-info-form.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {NotificationSettings} from './notification-settings';

export interface EditUserInfoForm {
phone: string;
notification: NotificationSettings;
password: string;
}
2 changes: 1 addition & 1 deletion src/app/_domains/item-id.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export interface ItemId {
id: number;
id: number | string;
}
4 changes: 4 additions & 0 deletions src/app/_domains/password-reset-form.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface PasswordResetForm {
token: string;
password: string;
}
2 changes: 1 addition & 1 deletion src/app/_domains/pricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ export interface Pricing {
id: number;
type: 'VENDOR_SUBSCRIPTION' | 'VENDOR_ADDITIONAL' | 'CUSTOMER_SUBSCRIPTION';
alias: string;
pricePerItem: number;
price: number;
canHaveMultiple: boolean;
}
1 change: 1 addition & 0 deletions src/app/_domains/properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ import {PropertySummary} from './property-summary';

export interface Properties {
list: PropertySummary[];
cursor: string;
}
5 changes: 1 addition & 4 deletions src/app/_domains/property-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ export interface PropertyForm {
title: string;
address: any;
description: string;
propertyType: string;
roomType: string;
price: number;
startDate: string;
duration: number;
amenities: number[];
pets: number[];
houseRules: number[];
options: number[];
imageUrls: string[];
}
7 changes: 7 additions & 0 deletions src/app/_domains/property-option.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export interface PropertyOption {
id: number;
alias: string;
type: string;
createTime?: string;
updateTime?: string;
}
5 changes: 5 additions & 0 deletions src/app/_domains/property-options.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import {PropertyOption} from './property-option';

export interface PropertyOptions {
list: PropertyOption[];
}
5 changes: 3 additions & 2 deletions src/app/_domains/property-query-params.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export interface PropertyQueryParams {
sortBy?: string;
sortOrder?: boolean;
sortBy: string;
direction: string;
cursor?: string;
searchBy?: string;
filters?: any;
}
1 change: 1 addition & 0 deletions src/app/_domains/property-summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ export interface PropertySummary {
startDate: string;
duration: number;
thumbnailUrl: string;
status?: boolean;
}
25 changes: 24 additions & 1 deletion src/app/_domains/property.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
export interface Property {
id: string;
status: boolean;
title: string;
// TODO: Implementation required
address: {
geocode: {
lat: number;
lng: number;
};
detailLevel1: string;
detailLevel2: string;
city: string;
state: string;
zipcode: string;
type: string;
};
description: string;
roomType: string;
price: number;
startDate: string;
duration: number;
options: number[];
imageUrls: string[];
owner?: string;
createTime?: string;
updateTime?: string;
}
1 change: 0 additions & 1 deletion src/app/_domains/purchase-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ import {StripeToken} from './stripe-token';
export interface PurchaseForm {
token: StripeToken;
type: string;
count: number;
}
4 changes: 4 additions & 0 deletions src/app/_domains/subscription-cancel-form.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface SubscriptionCancelForm {
password: string;
type: string;
}
29 changes: 29 additions & 0 deletions src/app/_effect-actions/password-change.actions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import {RequestError} from '../_domains/request-error';
import {Action} from '@ngrx/store';
import {ChangePasswordForm} from '../_domains/change-password-form';
import {AuthResponse} from '../_domains/auth-response';

export const REQUEST = 'PasswordChangeActions.REQUEST';
export const SUCCESS = 'PasswordChangeActions.SUCCESS';
export const ERROR = 'PasswordChangeActions.ERROR';

export class Request implements Action {
readonly type = REQUEST;

constructor(public payload: ChangePasswordForm, public userId) {
}
}

export class Success implements Action {
readonly type = SUCCESS;

constructor(public payload: AuthResponse) {
}
}

export class Error implements Action {
readonly type = ERROR;

constructor(public payload: RequestError) {
}
}
Loading