From a8af79c2cee36b1c926f45c32bac2a3be041814c Mon Sep 17 00:00:00 2001 From: byung eun park Date: Thu, 1 Aug 2019 20:26:02 +0900 Subject: [PATCH] user search component added --- src/app/pages/users/user/component/index.ts | 4 +- .../list-search/list-search.component.html | 116 ++++++++++++++++++ .../list-search/list-search.component.scss | 4 + .../list-search/list-search.component.spec.ts | 25 ++++ .../list-search/list-search.component.ts | 67 ++++++++++ .../user/component/user-list.component.html | 8 +- 6 files changed, 221 insertions(+), 3 deletions(-) create mode 100644 src/app/pages/users/user/component/list-search/list-search.component.html create mode 100644 src/app/pages/users/user/component/list-search/list-search.component.scss create mode 100644 src/app/pages/users/user/component/list-search/list-search.component.spec.ts create mode 100644 src/app/pages/users/user/component/list-search/list-search.component.ts diff --git a/src/app/pages/users/user/component/index.ts b/src/app/pages/users/user/component/index.ts index 1276eaa..9d31611 100644 --- a/src/app/pages/users/user/component/index.ts +++ b/src/app/pages/users/user/component/index.ts @@ -4,6 +4,7 @@ import { UserConnectComponent } from './user-connect/user-connect.component'; import { UserRegistComponent } from './user-regist/user-regist.component'; import { UserFeesComponent } from './user-fees/user-fees.component'; import { UserAttendanceComponent } from './user-attendance/user-attendance.component'; +import { ListSearchComponent } from '../component/list-search/list-search.component'; export const COMPONENTS = [ UserDetailComponent, @@ -11,5 +12,6 @@ export const COMPONENTS = [ UserConnectComponent, UserRegistComponent, UserFeesComponent, - UserAttendanceComponent + UserAttendanceComponent, + ListSearchComponent ]; diff --git a/src/app/pages/users/user/component/list-search/list-search.component.html b/src/app/pages/users/user/component/list-search/list-search.component.html new file mode 100644 index 0000000..87009c9 --- /dev/null +++ b/src/app/pages/users/user/component/list-search/list-search.component.html @@ -0,0 +1,116 @@ + + + + + Search + + + Search Click + + + +
+ +
+
+ + + First name + + account_circle + First Name is required! + + + + Last name + + account_circle + Last Name is required! + + +
+
+ + + Address + + Address is required! + + + + Address 2 + + Address 2 is required! + + +
+ +
+ + + City + + location_city + City is required! + + + + State + + location_city + State is required! + + + + Postal Code + + markunread_mailbox + + Postal Code is required! + + +
+ +
+ + + Country + + + United States of America + + + United Kingdom + + + Russia + + + China + + + Japan + + + Turkey + + + outlined_flag + Country is required! + + +
+
+ +
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/app/pages/users/user/component/list-search/list-search.component.scss b/src/app/pages/users/user/component/list-search/list-search.component.scss new file mode 100644 index 0000000..3408788 --- /dev/null +++ b/src/app/pages/users/user/component/list-search/list-search.component.scss @@ -0,0 +1,4 @@ +.example-button-row button, +.example-button-row a { + margin-right: 8px; +} diff --git a/src/app/pages/users/user/component/list-search/list-search.component.spec.ts b/src/app/pages/users/user/component/list-search/list-search.component.spec.ts new file mode 100644 index 0000000..0d74398 --- /dev/null +++ b/src/app/pages/users/user/component/list-search/list-search.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ListSearchComponent } from './list-search.component'; + +describe('ListSearchComponent', () => { + let component: ListSearchComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ListSearchComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ListSearchComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/users/user/component/list-search/list-search.component.ts b/src/app/pages/users/user/component/list-search/list-search.component.ts new file mode 100644 index 0000000..c776a0e --- /dev/null +++ b/src/app/pages/users/user/component/list-search/list-search.component.ts @@ -0,0 +1,67 @@ +import { Component, OnDestroy, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { Subject } from 'rxjs'; + +@Component({ + selector: 'app-list-search', + templateUrl: './list-search.component.html', + styleUrls: ['./list-search.component.scss'] +}) +export class ListSearchComponent implements OnInit, OnDestroy { + panelOpenState = false; + form: FormGroup; + + // Private + private unsubscribeAll: Subject; + + constructor( + private _formBuilder: FormBuilder + ) { + this.unsubscribeAll = new Subject(); + } + + ngOnInit() { + + this.form = this._formBuilder.group({ + company: [ + { + value: 'Google', + disabled: true + }, Validators.required + ], + firstName: ['', Validators.required], + lastName: ['', Validators.required], + address: ['', Validators.required], + address2: ['', Validators.required], + city: ['', Validators.required], + state: ['', Validators.required], + postalCode: ['', [Validators.required, Validators.maxLength(5)]], + country: ['', Validators.required] + }); + } + /** + * On destroy + */ + ngOnDestroy(): void { + // Unsubscribe from all subscriptions + this.unsubscribeAll.next(); + this.unsubscribeAll.complete(); + } + // ----------------------------------------------------------------------------------------------------- + // @ Public methods + // ----------------------------------------------------------------------------------------------------- + + /** + * Finish the horizontal stepper + */ + finishHorizontalStepper(): void { + alert('You have finished the horizontal stepper!'); + } + + /** + * Finish the vertical stepper + */ + finishVerticalStepper(): void { + alert('You have finished the vertical stepper!'); + } +} diff --git a/src/app/pages/users/user/component/user-list.component.html b/src/app/pages/users/user/component/user-list.component.html index e413a06..f631a37 100644 --- a/src/app/pages/users/user/component/user-list.component.html +++ b/src/app/pages/users/user/component/user-list.component.html @@ -18,14 +18,18 @@ -
+ +
+
+ +