From 6747e06b5cf1712f3a87895a317d7df80d024106 Mon Sep 17 00:00:00 2001 From: leejh Date: Wed, 2 Oct 2019 17:12:51 +0900 Subject: [PATCH] template page added --- .../src/app/app-routing.module.ts | 4 + .../components/login.page.component.html | 6 +- .../components/login.page.component.ts | 7 +- .../app/pages/template/components/index.ts | 90 +++++++++++++++++++ .../components/template.page.component.html | 11 +++ .../components/template.page.component.scss | 0 .../template.page.component.spec.ts | 27 ++++++ .../components/template.page.component.ts | 81 +++++++++++++++++ .../template/template-routing.page.module.ts | 17 ++++ .../pages/template/template.page.module.ts | 25 ++++++ .../src/lib/components/login.component.html | 29 +++--- .../src/lib/components/login.component.ts | 6 ++ .../lib/components/list-item.component.html | 9 +- .../components/user-list-item.component.html | 12 +++ .../components/user-list-item.component.scss | 0 .../user-list-item.component.spec.ts | 28 ++++++ .../components/user-list-item.component.ts | 33 +++++++ .../src/lib/ucap-ui-profile.module.ts | 13 ++- 18 files changed, 365 insertions(+), 33 deletions(-) create mode 100644 projects/ucap-webmessenger-app/src/app/pages/template/components/index.ts create mode 100644 projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.html create mode 100644 projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.scss create mode 100644 projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.spec.ts create mode 100644 projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts create mode 100644 projects/ucap-webmessenger-app/src/app/pages/template/template-routing.page.module.ts create mode 100644 projects/ucap-webmessenger-app/src/app/pages/template/template.page.module.ts create mode 100644 projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.html create mode 100644 projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.scss create mode 100644 projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.spec.ts create mode 100644 projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.ts diff --git a/projects/ucap-webmessenger-app/src/app/app-routing.module.ts b/projects/ucap-webmessenger-app/src/app/app-routing.module.ts index 2c415702..fc9282b1 100644 --- a/projects/ucap-webmessenger-app/src/app/app-routing.module.ts +++ b/projects/ucap-webmessenger-app/src/app/app-routing.module.ts @@ -13,6 +13,10 @@ const routes: Routes = [ { path: 'account', loadChildren: './pages/account/account.page.module#AppAccountPageModule' + }, + { + path: 'template', + loadChildren: './pages/template/template.page.module#AppTemplatePageModule' } ]; 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 d6872031..a3983ede 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,8 +1,6 @@
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 b7bf1caf..bf1775ba 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 @@ -8,6 +8,7 @@ import * as AppStore from '@app/store'; import * as AuthenticationStore from '@app/store/account/authentication'; import * as CompanyStore from '@app/store/setting/company'; import { Observable } from 'rxjs'; +import { Router } from '@angular/router'; @Component({ selector: 'app-page-account-login', @@ -17,7 +18,7 @@ import { Observable } from 'rxjs'; export class LoginPageComponent implements OnInit { companyList$: Observable; - constructor(private store: Store) {} + constructor(private store: Store, private router: Router) {} ngOnInit(): void { this.store.dispatch( @@ -50,4 +51,8 @@ export class LoginPageComponent implements OnInit { }) ); } + + onTemplate() { + this.router.navigate(['/template']); + } } diff --git a/projects/ucap-webmessenger-app/src/app/pages/template/components/index.ts b/projects/ucap-webmessenger-app/src/app/pages/template/components/index.ts new file mode 100644 index 00000000..38a562c9 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/pages/template/components/index.ts @@ -0,0 +1,90 @@ +import { TemplatePageComponent } from './template.page.component'; + +export const COMPONENTS = [TemplatePageComponent]; + +import { A11yModule } from '@angular/cdk/a11y'; +import { DragDropModule } from '@angular/cdk/drag-drop'; +import { PortalModule } from '@angular/cdk/portal'; +import { ScrollingModule } from '@angular/cdk/scrolling'; +import { CdkStepperModule } from '@angular/cdk/stepper'; +import { CdkTableModule } from '@angular/cdk/table'; +import { CdkTreeModule } from '@angular/cdk/tree'; +import { MatAutocompleteModule } from '@angular/material/autocomplete'; +import { MatBadgeModule } from '@angular/material/badge'; +import { MatBottomSheetModule } from '@angular/material/bottom-sheet'; +import { MatButtonModule } from '@angular/material/button'; +import { MatButtonToggleModule } from '@angular/material/button-toggle'; +import { MatCardModule } from '@angular/material/card'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatChipsModule } from '@angular/material/chips'; +import { MatStepperModule } from '@angular/material/stepper'; +import { MatDatepickerModule } from '@angular/material/datepicker'; +import { MatDialogModule } from '@angular/material/dialog'; +import { MatDividerModule } from '@angular/material/divider'; +import { MatExpansionModule } from '@angular/material/expansion'; +import { MatGridListModule } from '@angular/material/grid-list'; +import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; +import { MatListModule } from '@angular/material/list'; +import { MatMenuModule } from '@angular/material/menu'; +import { MatNativeDateModule, MatRippleModule } from '@angular/material/core'; +import { MatPaginatorModule } from '@angular/material/paginator'; +import { MatProgressBarModule } from '@angular/material/progress-bar'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { MatRadioModule } from '@angular/material/radio'; +import { MatSelectModule } from '@angular/material/select'; +import { MatSidenavModule } from '@angular/material/sidenav'; +import { MatSliderModule } from '@angular/material/slider'; +import { MatSlideToggleModule } from '@angular/material/slide-toggle'; +import { MatSnackBarModule } from '@angular/material/snack-bar'; +import { MatSortModule } from '@angular/material/sort'; +import { MatTableModule } from '@angular/material/table'; +import { MatTabsModule } from '@angular/material/tabs'; +import { MatToolbarModule } from '@angular/material/toolbar'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { MatTreeModule } from '@angular/material/tree'; + +export const MET_MODULES = [ + A11yModule, + CdkStepperModule, + CdkTableModule, + CdkTreeModule, + DragDropModule, + MatAutocompleteModule, + MatBadgeModule, + MatBottomSheetModule, + MatButtonModule, + MatButtonToggleModule, + MatCardModule, + MatCheckboxModule, + MatChipsModule, + MatStepperModule, + MatDatepickerModule, + MatDialogModule, + MatDividerModule, + MatExpansionModule, + MatGridListModule, + MatIconModule, + MatInputModule, + MatListModule, + MatMenuModule, + MatNativeDateModule, + MatPaginatorModule, + MatProgressBarModule, + MatProgressSpinnerModule, + MatRadioModule, + MatRippleModule, + MatSelectModule, + MatSidenavModule, + MatSliderModule, + MatSlideToggleModule, + MatSnackBarModule, + MatSortModule, + MatTableModule, + MatTabsModule, + MatToolbarModule, + MatTooltipModule, + MatTreeModule, + PortalModule, + ScrollingModule +]; 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 new file mode 100644 index 00000000..cbefe8a2 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.html @@ -0,0 +1,11 @@ +
+

User-list-item

+
+ + + + + + +
+
diff --git a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.scss b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.spec.ts b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.spec.ts new file mode 100644 index 00000000..2af3a477 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.spec.ts @@ -0,0 +1,27 @@ +/* tslint:disable:no-unused-variable */ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { By } from '@angular/platform-browser'; +import { DebugElement } from '@angular/core'; + +import { TemplatePageComponent } from './template.page.component'; + +describe('TemplatePageComponent', () => { + let component: TemplatePageComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [TemplatePageComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TemplatePageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); 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 new file mode 100644 index 00000000..190c8c00 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts @@ -0,0 +1,81 @@ +import { Component, OnInit } from '@angular/core'; +import { UserInfo } from '@ucap-webmessenger/protocol-sync'; +import { EmployeeType } from '@ucap-webmessenger/protocol-room'; +import { RoleCode } from '@ucap-webmessenger/protocol-authentication'; +import { + StatusBulkInfo, + TerminalStatusInfo, + TerminalStatusNumber +} from '@ucap-webmessenger/protocol-status'; +import { StatusCode } from '@ucap-webmessenger/core'; + +@Component({ + selector: 'app-template.page', + templateUrl: './template.page.component.html', + styleUrls: ['./template.page.component.scss'] +}) +export class TemplatePageComponent implements OnInit { + profileImageRoot: string = 'http://27.122.224.170:8011/ProfileImage'; + + userInfo: UserInfo = buddyData; + + presence: StatusBulkInfo = status; + + constructor() {} + + ngOnInit() {} +} + +export const status: StatusBulkInfo = { + // 사용자SEQ + userSeq: 15, + // 상태코드(PC) + pcStatus: StatusCode.Away, + // 상태코드(통화) + phoneStatus: StatusCode.Offline, + // 상태코드(모바일) + mobileStatus: StatusCode.OnLine, + // 상태코드(PC화상) + conferenceStatus: StatusCode.Offline, + // 상태메시지 + statusMessage: '다른용무중', + // 상태코드(Mobile화상) + mobileConferenceStatus: StatusCode.Offline, + // 상태코드(iMessenger) + imessengerStatus: StatusCode.Offline, + // 단말상태정보(s) + terminalStatus: TerminalStatusInfo.Idle, + // 단말상태번호(n) + terminalStatusNumber: TerminalStatusNumber.Idle +}; +export const buddyData: UserInfo = { + seq: 15, + name: '채희중', + profileImageFile: '/2017/08/09/PF_15_174154508.jpeg', + grade: '책임', + intro: '프로필정보 변경됨.', + companyCode: 'GUC006', + hpNumber: '01089339833', + lineNumber: '01089339833', + email: 'hjchae72@lgcns.com', + isMobile: false, + deptName: 'UCAP TEAM', + isFavorit: false, + isBuddy: true, + isActive: true, + roleCd: RoleCode.CompanyExcludeSync, + employeeNum: ' ', + madn: '0033', + hardSadn: ' ', + fmcSadn: '0033', + nameEn: 'HUI JOONG CHAE', + nameCn: ' ', + gradeEn: 'Business Engineering', + gradeCn: ' ', + deptNameEn: ' ', + deptNameCn: ' ', + isPrivacyAgree: true, + isValidLogin: true, + employeeType: EmployeeType.Regular, + nickName: '채책임(닉)' +}; diff --git a/projects/ucap-webmessenger-app/src/app/pages/template/template-routing.page.module.ts b/projects/ucap-webmessenger-app/src/app/pages/template/template-routing.page.module.ts new file mode 100644 index 00000000..f0797eba --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/pages/template/template-routing.page.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { TemplatePageComponent } from './components/template.page.component'; + +const routes: Routes = [ + { path: '', redirectTo: '/template/page', pathMatch: 'full' }, + { + path: 'page', + component: TemplatePageComponent + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class AppTemplateRoutingPageModule {} 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 new file mode 100644 index 00000000..65291d9e --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/pages/template/template.page.module.ts @@ -0,0 +1,25 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { FlexLayoutModule } from '@angular/flex-layout'; + +import { UCapUiGroupModule } from '@ucap-webmessenger/ui-group'; + +import { AppTemplateRoutingPageModule } from './template-routing.page.module'; + +import { COMPONENTS, MET_MODULES } from './components'; +import { UcapUiProfileModule } from '@ucap-webmessenger/ui-profile'; + +@NgModule({ + imports: [ + ...MET_MODULES, + CommonModule, + FlexLayoutModule, + UCapUiGroupModule, + UcapUiProfileModule, + AppTemplateRoutingPageModule + ], + declarations: [...COMPONENTS], + entryComponents: [] +}) +export class AppTemplatePageModule {} 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 7a450792..6b3e73cd 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,11 +5,8 @@ Company - {{ company.companyName }} + {{ company.companyName }} + Company is required @@ -35,12 +32,7 @@ -
+
Remember Me @@ -50,14 +42,8 @@
- @@ -66,4 +52,9 @@ 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 ed774837..d59775b6 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,6 +27,8 @@ export class LoginComponent implements OnInit { rememberMe: boolean; notValid: () => void; }>(); + @Output() + template = new EventEmitter(); @ViewChild('loginPw', { static: true }) loginPwElementRef: ElementRef; @@ -53,4 +55,8 @@ export class LoginComponent implements OnInit { } }); } + + onClickTemplate() { + this.template.emit(); + } } diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/list-item.component.html b/projects/ucap-webmessenger-ui-profile/src/lib/components/list-item.component.html index 815690b4..db485e99 100644 --- a/projects/ucap-webmessenger-ui-profile/src/lib/components/list-item.component.html +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/list-item.component.html @@ -1,10 +1,5 @@ -