Commit 9afce9d7 by Tuukka Kivilahti

still coding

1 parent f442b1cf
...@@ -72,7 +72,7 @@ Jos tulee muita järkeviä kokonaisuuksia, joita voi käyttää muualla, jaa oma ...@@ -72,7 +72,7 @@ Jos tulee muita järkeviä kokonaisuuksia, joita voi käyttää muualla, jaa oma
* info `tapahtumanaikana "infolaisen" toimesta tehtävät jutut, sisäänotto, käyttäjänhallinta jne. Oma moduulinsa joka lazyloadataan` * info `tapahtumanaikana "infolaisen" toimesta tehtävät jutut, sisäänotto, käyttäjänhallinta jne. Oma moduulinsa joka lazyloadataan`
* info.module.ts * info.module.ts
* viplist * viplist
* viplist.component.ts,html,jne * info-viplist-page.component.ts,html,jne
* viplist.service.ts * viplist.service.ts
* pizzatilaus * pizzatilaus
* list.component.ts `listaa kaikki, ja lisää uusi pizzailaus` * list.component.ts `listaa kaikki, ja lisää uusi pizzailaus`
......
...@@ -14,19 +14,22 @@ import { TopMenuComponent } from './menu/top-menu/top-menu.component'; ...@@ -14,19 +14,22 @@ import { TopMenuComponent } from './menu/top-menu/top-menu.component';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import {MatTableModule} from "@angular/material"; import {MatTableModule} from "@angular/material";
import {ViplistModule} from "./modules/viplist/viplist.module";
import {LoginModule} from "./pages/login/login.module";
@NgModule({ @NgModule({
declarations: [ declarations: [
AppComponent, AppComponent,
TopMenuComponent, TopMenuComponent,
MoyaLocaleComponent MoyaLocaleComponent,
], ],
imports: [ imports: [
BrowserModule, BrowserModule,
AppRoutingModule, AppRoutingModule,
FormsModule, FormsModule,
HttpClientModule, HttpClientModule,
MatTableModule, ViplistModule,
LoginModule,
AlertModule.forRoot(), AlertModule.forRoot(),
TranslateModule.forRoot({ TranslateModule.forRoot({
......
<mat-table [dataSource]="vips | async"> <mat-table #table [dataSource]="vips | async">
<ng-container matColumnDef="host"> <ng-container matColumnDef="host">
<mat-header-cell *matHeaderCellDef translate> vip.host </mat-header-cell> <mat-header-cell *matHeaderCellDef translate> vip.host </mat-header-cell>
<mat-cell *matCellDef="let v"> {{v.host.firstname v.host.lastname}} </mat-cell> <mat-cell *matCellDef="let v"> {{v.host.firstname}} {{ v.host.lastname}} </mat-cell>
</ng-container> </ng-container>
<ng-container matColumnDef="host"> <ng-container matColumnDef="host">
......
...@@ -3,21 +3,21 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; ...@@ -3,21 +3,21 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser'; import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core'; import { DebugElement } from '@angular/core';
import { ViplistComponent } from './viplist.component'; import { InfoViplistPageComponent } from './info-viplist-page.component';
describe('ViplistComponent', () => { describe('InfoViplistPageComponent', () => {
let component: ViplistComponent; let component: InfoViplistPageComponent;
let fixture: ComponentFixture<ViplistComponent>; let fixture: ComponentFixture<InfoViplistPageComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ ViplistComponent ] declarations: [ InfoViplistPageComponent ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(ViplistComponent); fixture = TestBed.createComponent(InfoViplistPageComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
...@@ -5,11 +5,11 @@ import {ViplistService} from '../viplist.service'; ...@@ -5,11 +5,11 @@ import {ViplistService} from '../viplist.service';
@Component({ @Component({
selector: 'moya-viplist', selector: 'moya-viplist',
templateUrl: './viplist.component.html', templateUrl: './info-viplist-page.component.html',
styleUrls: ['./viplist.component.scss'], styleUrls: ['./info-viplist-page.component.scss'],
providers: [ViplistService] providers: [ViplistService]
}) })
export class ViplistComponent implements OnInit { export class InfoViplistPageComponent implements OnInit {
vips: Observable<Array<Vip>>; vips: Observable<Array<Vip>>;
......
import { ViplistComponent } from '../../modules/viplist/info/viplist.component'; import { InfoViplistPageComponent } from '../../modules/viplist/info/info-viplist-page.component';
import { OldMoyaComponent } from './../old-moya/old-moya.component'; import { OldMoyaComponent } from './../old-moya/old-moya.component';
import { InfoMenuComponent } from './../../menu/info-menu/info-menu.component'; import { InfoMenuComponent } from './../../menu/info-menu/info-menu.component';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
...@@ -9,7 +9,7 @@ const routes: Routes = [ ...@@ -9,7 +9,7 @@ const routes: Routes = [
{ path: '', component: InfoMenuComponent, outlet: 'left-menu' }, { path: '', component: InfoMenuComponent, outlet: 'left-menu' },
{ path: '', pathMatch: 'full', component: OldMoyaComponent }, { path: '', pathMatch: 'full', component: OldMoyaComponent },
{ path: 'old', component: OldMoyaComponent }, { path: 'old', component: OldMoyaComponent },
{ path: 'viplist', component: ViplistComponent } { path: 'viplist', component: InfoViplistPageComponent }
]; ];
@NgModule({ @NgModule({
......
import { ViplistComponent } from '../../modules/viplist/info/viplist.component';
import { OldMoyaModule } from './../old-moya/old-moya.module'; import { OldMoyaModule } from './../old-moya/old-moya.module';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
...@@ -14,7 +13,7 @@ import { LeftMenuModule } from '../../menu/left-menu/left-menu.module'; ...@@ -14,7 +13,7 @@ import { LeftMenuModule } from '../../menu/left-menu/left-menu.module';
LeftMenuModule, LeftMenuModule,
OldMoyaModule OldMoyaModule
], ],
declarations: [InfoComponent, InfoMenuComponent, ViplistComponent] declarations: [InfoComponent, InfoMenuComponent]
}) })
export class InfoModule { } export class InfoModule { }
...@@ -2,13 +2,12 @@ import { LoginRoutingModule } from './login-routing.module'; ...@@ -2,13 +2,12 @@ import { LoginRoutingModule } from './login-routing.module';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { LoginComponent } from './login.component'; import { LoginComponent } from './login.component';
import { TopMenuComponent } from '../../menu/top-menu/top-menu.component';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, CommonModule,
LoginRoutingModule LoginRoutingModule
], ],
declarations: [ LoginComponent, TopMenuComponent ] declarations: [ LoginComponent]
}) })
export class LoginModule { } export class LoginModule { }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!