added infra store
This commit is contained in:
parent
289a1d2241
commit
2a4e370f8c
13
src/app/commons/model/Page.ts
Normal file
13
src/app/commons/model/Page.ts
Normal 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;
|
8
src/app/commons/model/PageParams.ts
Normal file
8
src/app/commons/model/PageParams.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
export interface PageParams {
|
||||
pageNo: string;
|
||||
countPerPage: string;
|
||||
sortCol?: string;
|
||||
sortDirection?: string;
|
||||
}
|
||||
|
||||
// export default PageParams;
|
2
src/app/commons/model/index.ts
Normal file
2
src/app/commons/model/index.ts
Normal file
|
@ -0,0 +1,2 @@
|
|||
export * from './Page';
|
||||
export * from './PageParams';
|
0
src/packages/infra/infra-store.module.ts
Normal file
0
src/packages/infra/infra-store.module.ts
Normal file
0
src/packages/infra/infra.constant.ts
Normal file
0
src/packages/infra/infra.constant.ts
Normal file
0
src/packages/infra/service/infra.service.spec.ts
Normal file
0
src/packages/infra/service/infra.service.spec.ts
Normal file
32
src/packages/infra/service/infra.service.ts
Normal file
32
src/packages/infra/service/infra.service.ts
Normal 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);
|
||||
// }
|
||||
// }
|
0
src/packages/infra/store/index.ts
Normal file
0
src/packages/infra/store/index.ts
Normal file
4
src/packages/infra/store/readbydomain/index.ts
Normal file
4
src/packages/infra/store/readbydomain/index.ts
Normal file
|
@ -0,0 +1,4 @@
|
|||
// export * from './readbydomain.action';
|
||||
// export * from './readbydomain.effect';
|
||||
// export * from './readbydomain.reducer';
|
||||
// export * from './readbydomain.state';
|
20
src/packages/infra/store/readbydomain/readbydomain.state.ts
Normal file
20
src/packages/infra/store/readbydomain/readbydomain.state.ts
Normal 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;
|
Loading…
Reference in New Issue
Block a user