mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-01 08:00:47 +08:00
Add list view and routing for viewing.
This commit is contained in:
parent
94337a5eb5
commit
18cf64c8ad
9 changed files with 67 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
"paths": {
|
||||
"@app/*": ["./src/app/*"],
|
||||
"@base/*": ["./src/*"],
|
||||
"@views/*": ["./views/*"],
|
||||
"@services/*": ["./src/services/*"],
|
||||
"@components/*": ["./src/components/*"]
|
||||
},
|
||||
|
|
1
core/app/views/list/list.component.html
Normal file
1
core/app/views/list/list.component.html
Normal file
|
@ -0,0 +1 @@
|
|||
<p style="margin-top:150px;">list works!</p>
|
25
core/app/views/list/list.component.spec.ts
Normal file
25
core/app/views/list/list.component.spec.ts
Normal 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();
|
||||
});
|
||||
});
|
15
core/app/views/list/list.component.ts
Normal file
15
core/app/views/list/list.component.ts
Normal 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() {
|
||||
}
|
||||
|
||||
}
|
12
core/app/views/list/list.module.ts
Normal file
12
core/app/views/list/list.module.ts
Normal 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 {}
|
|
@ -1,3 +0,0 @@
|
|||
<?php
|
||||
|
||||
// stub for list view
|
Loading…
Add table
Add a link
Reference in a new issue