Add list view and routing for viewing.

This commit is contained in:
Ross Moroney 2020-02-07 13:00:29 +00:00 committed by Dillon-Brown
parent 94337a5eb5
commit 18cf64c8ad
9 changed files with 67 additions and 4 deletions

View file

@ -2,10 +2,14 @@ import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {ClassicViewUiComponent} from '@components/classic-view/classic-view.component';
import {ClassicViewResolver} from '@services/api/resolvers/classic-view.resolver';
import {ListComponent} from '../../views/list/list.component';
import {AuthGuard} from '../services/auth/auth-guard.service';
const routes: Routes = [
{
path: ':module/list',
component: ListComponent
},
{
path: 'Accounts/index',
loadChildren: () => import('../components/account/account.module').then(m => m.AccountUiModule)

View file

@ -15,6 +15,7 @@ import {ClassicViewUiModule} from '../components/classic-view/classic-view.modul
import {MessageUiModule} from '../components/message/message.module';
import {FilterUiModule} from '../components/filter/filter.module';
import {ColumnchooserUiModule} from '../components/columnchooser/columnchooser.module';
import {ListModule} from '../../views/list/list.module';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
@ -45,6 +46,7 @@ import { FetchPolicy } from 'apollo-client/core/watchQueryOptions';
MessageUiModule,
ClassicViewUiModule,
FilterUiModule,
ListModule,
ColumnchooserUiModule,
BrowserAnimationsModule,
NgbModule

View file

@ -30,5 +30,11 @@ getTestBed().initTestEnvironment(
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
// Then we find all the tests.
const context_views = require.context('../views', true, /\.spec\.ts$/);
// And load the modules.
context_views.keys().map(context_views);
// Finally, start Karma to run the tests.
__karma__.start();

View file

@ -17,6 +17,7 @@
"paths": {
"@app/*": ["./src/app/*"],
"@base/*": ["./src/*"],
"@views/*": ["./views/*"],
"@services/*": ["./src/services/*"],
"@components/*": ["./src/components/*"]
},

View file

@ -0,0 +1 @@
<p style="margin-top:150px;">list works!</p>

View file

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ListComponent } from './list.component';
describe('ListComponent', () => {
let component: ListComponent;
let fixture: ComponentFixture<ListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ListComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'scrm-list',
templateUrl: './list.component.html',
styleUrls: []
})
export class ListComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View file

@ -0,0 +1,12 @@
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ListComponent } from './list.component';
@NgModule({
declarations: [ListComponent],
exports: [ListComponent],
imports: [
CommonModule,
]
})
export class ListModule {}

View file

@ -1,3 +0,0 @@
<?php
// stub for list view