From c1008d044c496dc4edf26cb65d222af8466f3750 Mon Sep 17 00:00:00 2001 From: byung eun park Date: Fri, 30 Aug 2019 15:53:22 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A6=AC=EA=B7=B8=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=95=84=EC=9B=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../league-management.component.html | 126 +++++++++++++++- .../league-management.component.scss | 140 ++++++++++++++++++ .../league-management.component.spec.ts | 25 ---- .../league-management.component.ts | 91 +++++++++++- src/app/pages/games/games.module.ts | 8 +- 5 files changed, 354 insertions(+), 36 deletions(-) delete mode 100644 src/app/pages/games/component/league-management/league-management.component.spec.ts diff --git a/src/app/pages/games/component/league-management/league-management.component.html b/src/app/pages/games/component/league-management/league-management.component.html index ddd48ad..b60fe7f 100644 --- a/src/app/pages/games/component/league-management/league-management.component.html +++ b/src/app/pages/games/component/league-management/league-management.component.html @@ -1 +1,125 @@ -

league-management works!

+
+ + +
+
+
+ home + chevron_right + User Interface +
+
리그관리
+
+
+ + + +
+
+ 리그 리스트 +
+ +
+
+ + + + 아이콘 + {{ + element.position + }} + + + + + 리그명 + {{ element.name }} + + + + + 추가방식 + {{ element.weight }} + + + + + 종목 + {{ element.symbol }} + + + + + 실행 + {{ element.test }} + + + + + + + +
+
+
+
Reactive Form Model
+
test
+
+
+
Reactive Form Model
+
test
+
+
+
Reactive Form Model
+
test
+
+
+
+
+ +
diff --git a/src/app/pages/games/component/league-management/league-management.component.scss b/src/app/pages/games/component/league-management/league-management.component.scss index e69de29..c96a909 100644 --- a/src/app/pages/games/component/league-management/league-management.component.scss +++ b/src/app/pages/games/component/league-management/league-management.component.scss @@ -0,0 +1,140 @@ +@import 'src/@fuse/scss/fuse'; + +app-league-management { + #league { + .top-bg { + @include media-breakpoint('xs') { + height: 224px; + } + } + > .center { + > .header { + .search-wrapper { + width: 100%; + max-width: 480px; + border-radius: 28px; + overflow: hidden; + @include mat-elevation(1); + + @include media-breakpoint('xs') { + width: 100%; + } + + .search { + width: 100%; + height: 48px; + line-height: 48px; + padding: 0 18px; + + input { + width: 100%; + height: 48px; + min-height: 48px; + max-height: 48px; + padding: 0 16px; + border: none; + outline: none; + } + } + } + + @include media-breakpoint('xs') { + padding: 8px 0; + height: 160px !important; + min-height: 160px !important; + max-height: 160px !important; + } + } + } + } + + .league-table { + color: black; + flex: 1 1 auto; + border-bottom: 1px solid rgba(0, 0, 0, 0.301); + overflow: auto; + // -webkit-overflow-scrolling: touch; + + .league { + position: relative; + cursor: pointer; + // height: 84px; + } + .mat-cell { + min-width: 0; + display: flex; + align-items: center; + } + + //First column and header + // .mat-header-cell:first-child, + // .mat-cell:first-child { + // flex: 10%; + // } + // //Second column and header + // .mat-header-cell:nth-child(2), + // .mat-cell:nth-child(2) { + // flex: 30%; + // } + // .mat-header-cell:nth-child(3), + // .mat-cell:nth-child(2) { + // flex: 20%; + // } + // .mat-header-cell:nth-child(4), + // .mat-cell:nth-child(2) { + // flex: 15%; + // } + // //Last column and header + // .mat-header-cell:last-child, + // .mat-cell:last-child { + // flex: 15%; + // } + + .mat-column-position { + max-width: 10%; + // justify-content: start; + } + .mat-column-name { + max-width: 50%; + } + .mat-column-weight { + max-width: 15%; + } + .mat-column-symbol { + max-width: 10%; + } + .mat-column-test { + max-width: 15%; + // justify-content: flex-end; + } + .mat-column-image { + flex: 1 0 84px; + + .product-image { + width: 52px; + height: 52px; + border: 1px solid rgba(0, 0, 0, 0.12); + } + } + .mat-column-buttons { + flex: 0 0 80px; + } + .quantity-indicator { + display: inline-block; + vertical-align: middle; + width: 8px; + height: 8px; + border-radius: 4px; + margin-right: 8px; + + & + span { + display: inline-block; + vertical-align: middle; + } + } + + .active-icon { + border-radius: 50%; + } + } +} diff --git a/src/app/pages/games/component/league-management/league-management.component.spec.ts b/src/app/pages/games/component/league-management/league-management.component.spec.ts deleted file mode 100644 index b338e35..0000000 --- a/src/app/pages/games/component/league-management/league-management.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { LeagueManagementComponent } from './league-management.component'; - -describe('LeagueManagementComponent', () => { - let component: LeagueManagementComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ LeagueManagementComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(LeagueManagementComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/pages/games/component/league-management/league-management.component.ts b/src/app/pages/games/component/league-management/league-management.component.ts index edd1546..74cc89b 100644 --- a/src/app/pages/games/component/league-management/league-management.component.ts +++ b/src/app/pages/games/component/league-management/league-management.component.ts @@ -1,15 +1,98 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; +import { MatPaginator } from '@angular/material/paginator'; +import { MatTableDataSource } from '@angular/material/table'; + +import { fuseAnimations } from 'src/@fuse/animations'; @Component({ selector: 'app-league-management', templateUrl: './league-management.component.html', - styleUrls: ['./league-management.component.scss'] + styleUrls: ['./league-management.component.scss'], + animations: fuseAnimations, + encapsulation: ViewEncapsulation.None }) export class LeagueManagementComponent implements OnInit { + displayedColumns: string[] = ['position', 'name', 'weight', 'symbol', 'test']; + dataSource = new MatTableDataSource(ELEMENT_DATA); - constructor() { } + @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator; + + constructor() {} ngOnInit() { + this.dataSource.paginator = this.paginator; } - } + +export interface PeriodicElement { + name: string; + position: number; + weight: number; + symbol: string; + test: string; +} + +const ELEMENT_DATA: PeriodicElement[] = [ + { position: 1, name: 'Hydrogen', weight: 1.0079, symbol: 'H', test: 'test' }, + { position: 2, name: 'Helium', weight: 4.0026, symbol: 'He', test: 'test' }, + { position: 3, name: 'Lithium', weight: 6.941, symbol: 'Li', test: 'test' }, + { + position: 4, + name: 'Beryllium', + weight: 9.0122, + symbol: 'Be', + test: 'test' + }, + { position: 5, name: 'Boron', weight: 10.811, symbol: 'B', test: 'test' }, + { position: 6, name: 'Carbon', weight: 12.0107, symbol: 'C', test: 'test' }, + { position: 7, name: 'Nitrogen', weight: 14.0067, symbol: 'N', test: 'test' }, + { position: 8, name: 'Oxygen', weight: 15.9994, symbol: 'O', test: 'test' }, + { position: 9, name: 'Fluorine', weight: 18.9984, symbol: 'F', test: 'test' }, + { position: 10, name: 'Neon', weight: 20.1797, symbol: 'Ne', test: 'test' }, + { position: 11, name: 'Sodium', weight: 22.9897, symbol: 'Na', test: 'test' }, + { + position: 12, + name: 'Magnesium', + weight: 24.305, + symbol: 'Mg', + test: 'test' + }, + { + position: 13, + name: 'Aluminum', + weight: 26.9815, + symbol: 'Al', + test: 'test' + }, + { + position: 14, + name: 'Silicon', + weight: 28.0855, + symbol: 'Si', + test: 'test' + }, + { + position: 15, + name: 'Phosphorus', + weight: 30.9738, + symbol: 'P', + test: 'test' + }, + { position: 16, name: 'Sulfur', weight: 32.065, symbol: 'S', test: 'test' }, + { + position: 17, + name: 'Chlorine', + weight: 35.453, + symbol: 'Cl', + test: 'test' + }, + { position: 18, name: 'Argon', weight: 39.948, symbol: 'Ar', test: 'test' }, + { + position: 19, + name: 'Potassium', + weight: 39.0983, + symbol: 'K', + test: 'test' + }, + { position: 20, name: 'Calcium', weight: 40.078, symbol: 'Ca', test: 'test' } +]; diff --git a/src/app/pages/games/games.module.ts b/src/app/pages/games/games.module.ts index 06b8c13..a678e05 100644 --- a/src/app/pages/games/games.module.ts +++ b/src/app/pages/games/games.module.ts @@ -3,10 +3,6 @@ import { FuseSharedModule } from 'src/@fuse/shared.module'; import { GamesRoutingModule } from './games-routing.module'; @NgModule({ - - imports: [ - FuseSharedModule, - GamesRoutingModule - ], + imports: [FuseSharedModule, GamesRoutingModule] }) -export class GamesModule { } +export class GamesModule {}