added infra store

This commit is contained in:
snoop 2018-03-08 14:39:07 +09:00
parent 289a1d2241
commit 2a4e370f8c
14 changed files with 79 additions and 0 deletions

View File

@ -0,0 +1,13 @@
export interface Page {
content: any;
first: boolean;
last: boolean;
number: number;
numberOfElements: number;
size: number;
sort: any;
totalElements: number;
totalPages: number;
}
// export default Page;

View File

@ -0,0 +1,8 @@
export interface PageParams {
pageNo: string;
countPerPage: string;
sortCol?: string;
sortDirection?: string;
}
// export default PageParams;

View File

@ -0,0 +1,2 @@
export * from './Page';
export * from './PageParams';

View File

View File

View File

@ -0,0 +1,32 @@
// import { Injectable } from '@angular/core';
// import { Observable } from 'rxjs/Observable';
// import 'rxjs/add/operator/map';
// import { RESTService } from 'packages/commons/service/rest.service';
// import { DomainMember } from 'packages/domain/model';
// import { Infra } from '../model';
// @Injectable()
// export class MemberService {
// public constructor(
// private restService: RESTService,
// ) {
// }
// public signin(email: string, password: string): Observable<DomainMember> {
// const body = {
// signinId: email,
// signinPw: password,
// };
// return this.restService.post<DomainMember>('/account/signin', body);
// }
// public signup(member: Member): Observable<Infra> {
// return this.restService.post<Member>('/account/signup', member);
// }
// }

View File

View File

@ -0,0 +1,4 @@
// export * from './readbydomain.action';
// export * from './readbydomain.effect';
// export * from './readbydomain.reducer';
// export * from './readbydomain.state';

View File

@ -0,0 +1,20 @@
import { ErrorResponse } from 'packages/commons/service/error-response';
import { Infra } from '../../model';
import { Page } from '../../../../app/commons/model';
export interface State {
error: ErrorResponse | null;
isPending: boolean;
infraList: Infra[] | null;
}
export const initialState: State = {
error: null,
isPending: false,
infraList: null,
};
export const getInfraList = (state: State) => state.infraList;
export const getError = (state: State) => state.error;
export const isPending = (state: State) => state.isPending;