diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html index ca34a27d..215c92b2 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html @@ -1 +1 @@ - + diff --git a/projects/ucap-webmessenger-app/src/app/pages/account/account.page.module.ts b/projects/ucap-webmessenger-app/src/app/pages/account/account.page.module.ts index c787da7b..61c11843 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/account/account.page.module.ts +++ b/projects/ucap-webmessenger-app/src/app/pages/account/account.page.module.ts @@ -3,6 +3,8 @@ import { CommonModule } from '@angular/common'; import { FlexLayoutModule } from '@angular/flex-layout'; +import { MatButtonModule } from '@angular/material/button'; + import { UCapUiAccountModule } from '@ucap-webmessenger/ui-account'; import { AppAccountRoutingPageModule } from './account-routing.page.module'; @@ -13,6 +15,7 @@ import { COMPONENTS } from './components'; imports: [ CommonModule, FlexLayoutModule, + MatButtonModule, UCapUiAccountModule, AppAccountRoutingPageModule ], diff --git a/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.html b/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.html index a3983ede..46111ea7 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.html +++ b/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.html @@ -1,6 +1,19 @@
- +
+ +
diff --git a/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.ts b/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.ts index bf1775ba..832e8340 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.ts +++ b/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.ts @@ -52,7 +52,7 @@ export class LoginPageComponent implements OnInit { ); } - onTemplate() { + onClickTemplate() { this.router.navigate(['/template']); } } diff --git a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.html b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.html index cbefe8a2..d1f582e2 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.html +++ b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.html @@ -1,11 +1,32 @@ -
+
+ +

User-list-item

- + - + - +
diff --git a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts index 190c8c00..78c710ba 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts +++ b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts @@ -8,6 +8,7 @@ import { TerminalStatusNumber } from '@ucap-webmessenger/protocol-status'; import { StatusCode } from '@ucap-webmessenger/core'; +import { Router } from '@angular/router'; @Component({ selector: 'app-template.page', @@ -21,9 +22,13 @@ export class TemplatePageComponent implements OnInit { presence: StatusBulkInfo = status; - constructor() {} + constructor(private router: Router) {} ngOnInit() {} + + onClickLogin() { + this.router.navigate(['/account/login']); + } } export const status: StatusBulkInfo = { diff --git a/projects/ucap-webmessenger-app/src/app/pages/template/template.page.module.ts b/projects/ucap-webmessenger-app/src/app/pages/template/template.page.module.ts index 65291d9e..8b8c5fe7 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/template/template.page.module.ts +++ b/projects/ucap-webmessenger-app/src/app/pages/template/template.page.module.ts @@ -3,6 +3,8 @@ import { CommonModule } from '@angular/common'; import { FlexLayoutModule } from '@angular/flex-layout'; +import { MatButtonModule } from '@angular/material/button'; + import { UCapUiGroupModule } from '@ucap-webmessenger/ui-group'; import { AppTemplateRoutingPageModule } from './template-routing.page.module'; @@ -15,6 +17,7 @@ import { UcapUiProfileModule } from '@ucap-webmessenger/ui-profile'; ...MET_MODULES, CommonModule, FlexLayoutModule, + MatButtonModule, UCapUiGroupModule, UcapUiProfileModule, AppTemplateRoutingPageModule diff --git a/projects/ucap-webmessenger-app/src/app/resolvers/messenger.resolver.ts b/projects/ucap-webmessenger-app/src/app/resolvers/messenger.resolver.ts index d0084151..eb0c1285 100644 --- a/projects/ucap-webmessenger-app/src/app/resolvers/messenger.resolver.ts +++ b/projects/ucap-webmessenger-app/src/app/resolvers/messenger.resolver.ts @@ -25,7 +25,7 @@ import { KEY_LOGIN_INFO, EnvironmentsInfo, KEY_ENVIRONMENTS_INFO -} from '../types'; +} from '@app/types'; import { InnerProtocolService } from '@ucap-webmessenger/protocol-inner'; import { AuthenticationProtocolService, @@ -40,8 +40,8 @@ import { OptionProtocolService } from '@ucap-webmessenger/protocol-option'; import * as AppStore from '@app/store'; import * as VersionInfoStore from '@app/store/setting/version-info'; -import * as OptionStore from '@app/store/setting/option'; -import * as QueryStore from '@app/store/setting/query'; +import * as OptionStore from '@app/store/messenger/option'; +import * as QueryStore from '@app/store/messenger/query'; import * as SyncStore from '@app/store/messenger/sync'; @Injectable() @@ -124,7 +124,7 @@ export class AppMessengerResolver implements Resolve { ); this.store.dispatch(QueryStore.authSuccess({ res: authRes })); - this.store.dispatch(AuthenticationStore.postLogin({ loginRes })); + // this.store.dispatch(AuthenticationStore.postLogin({ loginRes })); }), withLatestFrom( this.store.pipe( @@ -146,6 +146,12 @@ export class AppMessengerResolver implements Resolve { localeCode: loginInfo.localeCode }) ); + this.store.dispatch( + QueryStore.dept({ + divCd: 'ORG', + companyCode: loginInfo.companyCode + }) + ); }), catchError(err => { return throwError(err); diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/index.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/index.ts index be22c53c..d1f36124 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/index.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/index.ts @@ -2,17 +2,23 @@ import { Type } from '@angular/core'; import { Action, combineReducers, Selector, createSelector } from '@ngrx/store'; import * as ChatStore from './chat'; +import * as OptionStore from './option'; +import * as QueryStore from './query'; import * as StatusStore from './status'; import * as SyncStore from './sync'; export interface State { chat: ChatStore.State; + option: OptionStore.State; + query: QueryStore.State; status: StatusStore.State; sync: SyncStore.State; } export const effects: Type[] = [ ChatStore.Effects, + OptionStore.Effects, + QueryStore.Effects, StatusStore.Effects, SyncStore.Effects ]; @@ -20,6 +26,8 @@ export const effects: Type[] = [ export function reducers(state: State | undefined, action: Action) { return combineReducers({ chat: ChatStore.reducer, + option: OptionStore.reducer, + query: QueryStore.reducer, status: StatusStore.reducer, sync: SyncStore.reducer })(state, action); @@ -33,6 +41,18 @@ export function selectors(selector: Selector) { (state: State) => state.chat ) ), + OptionSelector: OptionStore.selectors( + createSelector( + selector, + (state: State) => state.option + ) + ), + QuerySelector: QueryStore.selectors( + createSelector( + selector, + (state: State) => state.query + ) + ), StatusSelector: StatusStore.selectors( createSelector( selector, diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/option/actions.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/option/actions.ts similarity index 73% rename from projects/ucap-webmessenger-app/src/app/store/setting/option/actions.ts rename to projects/ucap-webmessenger-app/src/app/store/messenger/option/actions.ts index 1f1e3242..7deb8164 100644 --- a/projects/ucap-webmessenger-app/src/app/store/setting/option/actions.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/option/actions.ts @@ -8,31 +8,31 @@ import { } from '@ucap-webmessenger/protocol-option'; export const regView = createAction( - '[Setting::Option] RegView', + '[Messenger::Option] RegView', props() ); export const regViewSuccess = createAction( - '[Setting::Option] RegView Success', + '[Messenger::Option] RegView Success', props<{ res: RegViewResponse }>() ); export const regViewFailure = createAction( - '[Setting::Option] RegView Failure', + '[Messenger::Option] RegView Failure', props<{ error: any }>() ); export const regUpdate = createAction( - '[Setting::Option] RegUpdate', + '[Messenger::Option] RegUpdate', props() ); export const regUpdateSuccess = createAction( - '[Setting::Option] RegUpdate Success', + '[Messenger::Option] RegUpdate Success', props<{ res: RegUpdateResponse }>() ); export const regUpdateFailure = createAction( - '[Setting::Option] RegUpdate Failure', + '[Messenger::Option] RegUpdate Failure', props<{ error: any }>() ); diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/option/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/option/effects.ts similarity index 59% rename from projects/ucap-webmessenger-app/src/app/store/setting/option/effects.ts rename to projects/ucap-webmessenger-app/src/app/store/messenger/option/effects.ts index 7cde4fcc..c5780998 100644 --- a/projects/ucap-webmessenger-app/src/app/store/setting/option/effects.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/option/effects.ts @@ -6,24 +6,12 @@ import { of } from 'rxjs'; import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { regViewSuccess, regViewFailure } from './actions'; -import { initSettings } from '../init'; + import { OptionProtocolService } from '@ucap-webmessenger/protocol-option'; import { loginSuccess } from '@app/store/account/authentication'; @Injectable() export class Effects { - // initSettings$ = createEffect(() => - // this.actions$.pipe( - // ofType(loginSuccess), - // exhaustMap(() => - // this.optionProtocolService.regView({}).pipe( - // map(res => regViewSuccess({ res })), - // catchError(error => of(regViewFailure({ error }))) - // ) - // ) - // ) - // ); - constructor( private actions$: Actions, private optionProtocolService: OptionProtocolService diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/option/index.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/option/index.ts similarity index 100% rename from projects/ucap-webmessenger-app/src/app/store/setting/option/index.ts rename to projects/ucap-webmessenger-app/src/app/store/messenger/option/index.ts diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/option/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/option/reducers.ts similarity index 100% rename from projects/ucap-webmessenger-app/src/app/store/setting/option/reducers.ts rename to projects/ucap-webmessenger-app/src/app/store/messenger/option/reducers.ts diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/option/state.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/option/state.ts similarity index 89% rename from projects/ucap-webmessenger-app/src/app/store/setting/option/state.ts rename to projects/ucap-webmessenger-app/src/app/store/messenger/option/state.ts index 15b5f587..3cc3cec6 100644 --- a/projects/ucap-webmessenger-app/src/app/store/setting/option/state.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/option/state.ts @@ -1,7 +1,6 @@ import { Selector, createSelector } from '@ngrx/store'; import { RegViewResponse } from '@ucap-webmessenger/protocol-option'; -// tslint:disable-next-line: no-empty-interface export interface State { reg?: RegViewResponse; } diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/query/actions.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/query/actions.ts new file mode 100644 index 00000000..d1b633cb --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/query/actions.ts @@ -0,0 +1,38 @@ +import { createAction, props } from '@ngrx/store'; + +import { + AuthRequest, + AuthResponse, + DeptRequest, + DeptInfo +} from '@ucap-webmessenger/protocol-query'; + +export const auth = createAction( + '[Messenger::Query] Auth', + props() +); + +export const authSuccess = createAction( + '[Messenger::Query] Auth Success', + props<{ res: AuthResponse }>() +); + +export const authFailure = createAction( + '[Messenger::Query] Auth Failure', + props<{ error: any }>() +); + +export const dept = createAction( + '[Messenger::Query] Dept', + props() +); + +export const deptSuccess = createAction( + '[Messenger::Query] Dept Success', + props<{ departmentInfoList: DeptInfo[] }>() +); + +export const deptFailure = createAction( + '[Messenger::Query] Dept Failure', + props<{ error: any }>() +); diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/query/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/query/effects.ts new file mode 100644 index 00000000..b337d4b4 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/query/effects.ts @@ -0,0 +1,62 @@ +import { Injectable } from '@angular/core'; + +import { Actions, ofType, createEffect } from '@ngrx/effects'; + +import { of } from 'rxjs'; +import { catchError, map, tap, switchMap } from 'rxjs/operators'; + +import { dept, deptSuccess, deptFailure } from './actions'; + +import { + QueryProtocolService, + DeptInfo, + SSVC_TYPE_QUERY_DEPT_DATA, + SSVC_TYPE_QUERY_DEPT_RES, + DeptData +} from '@ucap-webmessenger/protocol-query'; +import { SessionStorageService } from '@ucap-webmessenger/web-storage'; + +import { Store } from '@ngrx/store'; + +@Injectable() +export class Effects { + dept$ = createEffect( + () => { + let departmentInfoList: DeptInfo[]; + + return this.actions$.pipe( + ofType(dept), + tap(() => { + departmentInfoList = []; + }), + switchMap(req => { + return this.queryProtocolService.dept(req).pipe( + map(res => { + switch (res.Type) { + case SSVC_TYPE_QUERY_DEPT_DATA: + departmentInfoList.push(...(res as DeptData).departmentInfos); + break; + case SSVC_TYPE_QUERY_DEPT_RES: + this.store.dispatch( + deptSuccess({ + departmentInfoList + }) + ); + break; + } + }), + catchError(error => of(deptFailure({ error }))) + ); + }) + ); + }, + { dispatch: false } + ); + + constructor( + private actions$: Actions, + private store: Store, + private sessionStorageService: SessionStorageService, + private queryProtocolService: QueryProtocolService + ) {} +} diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/query/index.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/query/index.ts similarity index 100% rename from projects/ucap-webmessenger-app/src/app/store/setting/query/index.ts rename to projects/ucap-webmessenger-app/src/app/store/messenger/query/index.ts diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/query/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/query/reducers.ts similarity index 57% rename from projects/ucap-webmessenger-app/src/app/store/setting/query/reducers.ts rename to projects/ucap-webmessenger-app/src/app/store/messenger/query/reducers.ts index ec5008a3..75f9dd6d 100644 --- a/projects/ucap-webmessenger-app/src/app/store/setting/query/reducers.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/query/reducers.ts @@ -1,6 +1,6 @@ import { createReducer, on } from '@ngrx/store'; import { initialState } from './state'; -import { authSuccess } from './actions'; +import { authSuccess, deptSuccess } from './actions'; export const reducer = createReducer( initialState, @@ -9,5 +9,12 @@ export const reducer = createReducer( ...state, auth: action.res }; + }), + + on(deptSuccess, (state, action) => { + return { + ...state, + departmentInfoList: action.departmentInfoList + }; }) ); diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/query/state.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/query/state.ts similarity index 53% rename from projects/ucap-webmessenger-app/src/app/store/setting/query/state.ts rename to projects/ucap-webmessenger-app/src/app/store/messenger/query/state.ts index 74f75f49..4a2d8dba 100644 --- a/projects/ucap-webmessenger-app/src/app/store/setting/query/state.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/query/state.ts @@ -1,12 +1,15 @@ import { Selector, createSelector } from '@ngrx/store'; -import { AuthResponse } from '@ucap-webmessenger/protocol-query'; +import { AuthResponse, DeptInfo } from '@ucap-webmessenger/protocol-query'; export interface State { auth?: AuthResponse; + + departmentInfoList: DeptInfo[] | null; } export const initialState: State = { - auth: null + auth: null, + departmentInfoList: null }; export function selectors(selector: Selector) { @@ -14,6 +17,10 @@ export function selectors(selector: Selector) { auth: createSelector( selector, (state: State) => state.auth + ), + departmentInfoList: createSelector( + selector, + (state: State) => state.departmentInfoList ) }; } diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts index f8a939e7..19e0af25 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts @@ -49,7 +49,7 @@ import { RoomUserDetailData, RoomResponse } from '@ucap-webmessenger/protocol-sync'; -import { regViewSuccess } from '@app/store/setting/option'; +import { regViewSuccess } from '@app/store/messenger/option'; import { RoomInfo, UserInfoShort, diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/index.ts b/projects/ucap-webmessenger-app/src/app/store/setting/index.ts index d771110f..e6919574 100644 --- a/projects/ucap-webmessenger-app/src/app/store/setting/index.ts +++ b/projects/ucap-webmessenger-app/src/app/store/setting/index.ts @@ -3,23 +3,17 @@ import { Action, combineReducers, Selector, createSelector } from '@ngrx/store'; import * as CompanyStore from './company'; import * as InitStore from './init'; -import * as OptionStore from './option'; -import * as QueryStore from './query'; import * as VersionInfoStore from './version-info'; export interface State { company: CompanyStore.State; init: InitStore.State; - option: OptionStore.State; - query: QueryStore.State; versionInfo: VersionInfoStore.State; } export const effects: Type[] = [ CompanyStore.Effects, InitStore.Effects, - OptionStore.Effects, - QueryStore.Effects, VersionInfoStore.Effects ]; @@ -27,8 +21,6 @@ export function reducers(state: State | undefined, action: Action) { return combineReducers({ company: CompanyStore.reducer, init: InitStore.reducer, - option: OptionStore.reducer, - query: QueryStore.reducer, versionInfo: VersionInfoStore.reducer })(state, action); } @@ -47,18 +39,6 @@ export function selectors(selector: Selector) { (state: State) => state.init ) ), - OptionSelector: OptionStore.selectors( - createSelector( - selector, - (state: State) => state.option - ) - ), - QuerySelector: QueryStore.selectors( - createSelector( - selector, - (state: State) => state.query - ) - ), VersionInfoSelector: VersionInfoStore.selectors( createSelector( selector, diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/query/actions.ts b/projects/ucap-webmessenger-app/src/app/store/setting/query/actions.ts deleted file mode 100644 index f0c5f92f..00000000 --- a/projects/ucap-webmessenger-app/src/app/store/setting/query/actions.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { createAction, props } from '@ngrx/store'; - -import { AuthRequest, AuthResponse } from '@ucap-webmessenger/protocol-query'; - -export const auth = createAction('[Setting::Query] Auth', props()); - -export const authSuccess = createAction( - '[Setting::Query] Auth Success', - props<{ res: AuthResponse }>() -); - -export const authFailure = createAction( - '[Setting::Query] Auth Failure', - props<{ error: any }>() -); diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/query/effects.ts b/projects/ucap-webmessenger-app/src/app/store/setting/query/effects.ts deleted file mode 100644 index cdbc2232..00000000 --- a/projects/ucap-webmessenger-app/src/app/store/setting/query/effects.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Injectable } from '@angular/core'; - -import { Actions, ofType, createEffect } from '@ngrx/effects'; - -import { of } from 'rxjs'; -import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; - -import { authSuccess, authFailure } from './actions'; -import { initSettings } from '../init'; - -import { - QueryProtocolService, - AuthRequest -} from '@ucap-webmessenger/protocol-query'; -import { SessionStorageService } from '@ucap-webmessenger/web-storage'; -import { - LoginInfo, - KEY_LOGIN_INFO, - EnvironmentsInfo, - KEY_ENVIRONMENTS_INFO -} from '@app/types'; -import { loginSuccess } from '@app/store/account/authentication'; - -@Injectable() -export class Effects { - // initSettings$ = createEffect(() => - // this.actions$.pipe( - // ofType(loginSuccess), - // map(() => { - // const loginInfo = this.sessionStorageService.get( - // KEY_LOGIN_INFO - // ); - // const environmentsInfo = this.sessionStorageService.get< - // EnvironmentsInfo - // >(KEY_ENVIRONMENTS_INFO); - - // return { - // deviceType: environmentsInfo.deviceType - // } as AuthRequest; - // }), - // exhaustMap(req => - // this.queryProtocolService.auth(req).pipe( - // map(res => authSuccess({ res })), - // catchError(error => of(authFailure({ error }))) - // ) - // ) - // ) - // ); - - constructor( - private actions$: Actions, - private sessionStorageService: SessionStorageService, - private queryProtocolService: QueryProtocolService - ) {} -} diff --git a/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.html b/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.html index 6b3e73cd..cbddde99 100644 --- a/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.html +++ b/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.html @@ -5,7 +5,10 @@ Company - {{ company.companyName }} + {{ company.companyName }} @@ -32,7 +35,12 @@ -
+
Remember Me @@ -42,8 +50,14 @@
- @@ -52,9 +66,4 @@ Don't have an account? Create an account
- - -
diff --git a/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.ts b/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.ts index d59775b6..ed774837 100644 --- a/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.ts +++ b/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.ts @@ -27,8 +27,6 @@ export class LoginComponent implements OnInit { rememberMe: boolean; notValid: () => void; }>(); - @Output() - template = new EventEmitter(); @ViewChild('loginPw', { static: true }) loginPwElementRef: ElementRef; @@ -55,8 +53,4 @@ export class LoginComponent implements OnInit { } }); } - - onClickTemplate() { - this.template.emit(); - } } diff --git a/projects/ucap-webmessenger-ui-organization/src/lib/components/expansion-panel.component.ts b/projects/ucap-webmessenger-ui-organization/src/lib/components/expansion-panel.component.ts deleted file mode 100644 index 72103902..00000000 --- a/projects/ucap-webmessenger-ui-organization/src/lib/components/expansion-panel.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit, Input } from '@angular/core'; - -@Component({ - selector: 'ucap-organization-expansion-panel', - templateUrl: './expansion-panel.component.html', - styleUrls: ['./expansion-panel.component.scss'] -}) -export class ExpansionPanelComponent implements OnInit { - @Input() - organizationList: any[]; - - constructor() {} - - ngOnInit() {} -} diff --git a/projects/ucap-webmessenger-ui-organization/src/lib/components/expansion-panel.component.html b/projects/ucap-webmessenger-ui-organization/src/lib/components/tree.component.html similarity index 100% rename from projects/ucap-webmessenger-ui-organization/src/lib/components/expansion-panel.component.html rename to projects/ucap-webmessenger-ui-organization/src/lib/components/tree.component.html diff --git a/projects/ucap-webmessenger-ui-organization/src/lib/components/expansion-panel.component.scss b/projects/ucap-webmessenger-ui-organization/src/lib/components/tree.component.scss similarity index 100% rename from projects/ucap-webmessenger-ui-organization/src/lib/components/expansion-panel.component.scss rename to projects/ucap-webmessenger-ui-organization/src/lib/components/tree.component.scss diff --git a/projects/ucap-webmessenger-ui-organization/src/lib/components/expansion-panel.component.spec.ts b/projects/ucap-webmessenger-ui-organization/src/lib/components/tree.component.spec.ts similarity index 51% rename from projects/ucap-webmessenger-ui-organization/src/lib/components/expansion-panel.component.spec.ts rename to projects/ucap-webmessenger-ui-organization/src/lib/components/tree.component.spec.ts index 748e039c..ba8d1f94 100644 --- a/projects/ucap-webmessenger-ui-organization/src/lib/components/expansion-panel.component.spec.ts +++ b/projects/ucap-webmessenger-ui-organization/src/lib/components/tree.component.spec.ts @@ -1,19 +1,19 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { ExpansionPanelComponent } from './expansion-panel.component'; +import { TreeComponent } from './tree.component'; -describe('Organization::ExpansionPanelComponent', () => { - let component: ExpansionPanelComponent; - let fixture: ComponentFixture; +describe('Organization::TreeComponent', () => { + let component: TreeComponent; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ExpansionPanelComponent] + declarations: [TreeComponent] }).compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(ExpansionPanelComponent); + fixture = TestBed.createComponent(TreeComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/projects/ucap-webmessenger-ui-organization/src/lib/components/tree.component.ts b/projects/ucap-webmessenger-ui-organization/src/lib/components/tree.component.ts new file mode 100644 index 00000000..cc3d442b --- /dev/null +++ b/projects/ucap-webmessenger-ui-organization/src/lib/components/tree.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit, Input } from '@angular/core'; + +@Component({ + selector: 'ucap-organization-tree', + templateUrl: './tree.component.html', + styleUrls: ['./tree.component.scss'] +}) +export class TreeComponent implements OnInit { + @Input() + organizationList: any[]; + + constructor() {} + + ngOnInit() {} +} diff --git a/projects/ucap-webmessenger-ui-organization/src/lib/ucap-ui-organization.module.ts b/projects/ucap-webmessenger-ui-organization/src/lib/ucap-ui-organization.module.ts index 4bf445e3..0a251a63 100644 --- a/projects/ucap-webmessenger-ui-organization/src/lib/ucap-ui-organization.module.ts +++ b/projects/ucap-webmessenger-ui-organization/src/lib/ucap-ui-organization.module.ts @@ -4,9 +4,9 @@ import { ReactiveFormsModule } from '@angular/forms'; import { MatExpansionModule } from '@angular/material/expansion'; -import { ExpansionPanelComponent } from './components/expansion-panel.component'; +import { TreeComponent } from './components/tree.component'; -const COMPONENTS = [ExpansionPanelComponent]; +const COMPONENTS = [TreeComponent]; const SERVICES = []; @NgModule({ diff --git a/projects/ucap-webmessenger-ui-organization/src/public-api.ts b/projects/ucap-webmessenger-ui-organization/src/public-api.ts index d6bb500c..869f9218 100644 --- a/projects/ucap-webmessenger-ui-organization/src/public-api.ts +++ b/projects/ucap-webmessenger-ui-organization/src/public-api.ts @@ -1,6 +1,6 @@ /* * Public API Surface of ucap-webmessenger-ui-organization */ -export * from './lib/components/expansion-panel.component'; +export * from './lib/components/tree.component'; export * from './lib/ucap-ui-organization.module';