Lint and update dockerfile for deploying
This commit is contained in:
@ -16,7 +16,8 @@ const routes: Routes = [
|
||||
},
|
||||
{
|
||||
path: 'case-sources',
|
||||
loadChildren: () => import('./case-sources/case-sources.module').then((mod) => mod.CaseSourcesModule),
|
||||
loadChildren: () =>
|
||||
import('./case-sources/case-sources.module').then((mod) => mod.CaseSourcesModule),
|
||||
},
|
||||
{
|
||||
path: 'case-types',
|
||||
|
||||
@ -91,7 +91,6 @@ export class AuthService {
|
||||
this.currentUserSubject.next(user);
|
||||
return user;
|
||||
}),
|
||||
tap((x) => console.log(x.perms)),
|
||||
);
|
||||
}
|
||||
|
||||
@ -119,7 +118,6 @@ export class AuthService {
|
||||
this.currentUserSubject.next(user);
|
||||
return user;
|
||||
}),
|
||||
tap((x) => console.log(x.perms)),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -14,12 +14,7 @@
|
||||
>
|
||||
<mat-form-field fxFlex>
|
||||
<mat-label>Name</mat-label>
|
||||
<input
|
||||
matInput
|
||||
#nameElement
|
||||
placeholder="Name"
|
||||
formControlName="name"
|
||||
/>
|
||||
<input matInput #nameElement placeholder="Name" formControlName="name" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div
|
||||
@ -31,11 +26,7 @@
|
||||
>
|
||||
<mat-form-field fxFlex>
|
||||
<mat-label>Prefix</mat-label>
|
||||
<input
|
||||
matInput
|
||||
placeholder="Prefix"
|
||||
formControlName="prefix"
|
||||
/>
|
||||
<input matInput placeholder="Prefix" formControlName="prefix" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -22,7 +22,9 @@ export class CaseSourceService {
|
||||
const getUrl: string = id === null ? url : `${url}/${id}`;
|
||||
return this.http
|
||||
.get<CaseSource>(getUrl)
|
||||
.pipe(catchError(this.log.handleError(serviceName, `get id=${id}`))) as Observable<CaseSource>;
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, `get id=${id}`)),
|
||||
) as Observable<CaseSource>;
|
||||
}
|
||||
|
||||
list(): Observable<CaseSource[]> {
|
||||
|
||||
@ -13,16 +13,27 @@
|
||||
fxLayoutGap.lt-md="0px"
|
||||
>
|
||||
<mat-form-field fxFlex>
|
||||
<mat-label>Name</mat-label>
|
||||
<mat-label>Office File Number</mat-label>
|
||||
<input
|
||||
matInput
|
||||
#nameElement
|
||||
placeholder="Name"
|
||||
formControlName="name"
|
||||
(keyup.enter)="save()"
|
||||
placeholder="Office File Number"
|
||||
formControlName="officeFileNumber"
|
||||
/>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div
|
||||
fxLayout="row"
|
||||
fxLayoutAlign="space-around start"
|
||||
fxLayout.lt-md="column"
|
||||
fxLayoutGap="20px"
|
||||
fxLayoutGap.lt-md="0px"
|
||||
>
|
||||
<mat-form-field fxFlex>
|
||||
<mat-label>Title</mat-label>
|
||||
<input matInput placeholder="Title" formControlName="title" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div
|
||||
fxLayout="row"
|
||||
fxLayoutAlign="space-around start"
|
||||
|
||||
@ -42,13 +42,35 @@ export class CaseDetailComponent implements OnInit, AfterViewInit {
|
||||
) {
|
||||
// Create form
|
||||
this.form = this.fb.group({
|
||||
name: '',
|
||||
mobile: '',
|
||||
landline: '',
|
||||
email: '',
|
||||
address: '',
|
||||
officeFileNumber: '',
|
||||
courtCaseNumber: '',
|
||||
year: '',
|
||||
title: '',
|
||||
docketNumber: '',
|
||||
receiptDate: '',
|
||||
limitationDate: '',
|
||||
filingDate: '',
|
||||
appearOnBehalfOf: '',
|
||||
questionOfLaw: '',
|
||||
aorName: '',
|
||||
opposingCouncilAor: '',
|
||||
opposingCouncilDetail: '',
|
||||
lowerCourtCaseNumber: '',
|
||||
dateOfImpugnedJudgement: '',
|
||||
briefDescription: '',
|
||||
remarks: '',
|
||||
slpCounter: '',
|
||||
contactDetail: '',
|
||||
caseConnectedWith: '',
|
||||
bunchCases: '',
|
||||
court: '',
|
||||
department: '',
|
||||
office: '',
|
||||
caseType: '',
|
||||
act: '',
|
||||
nature: '',
|
||||
officeStatus: '',
|
||||
courtStatus: '',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -1,24 +1,21 @@
|
||||
import { DataSource } from '@angular/cdk/collections';
|
||||
import {merge, Observable, of as observableOf} from 'rxjs';
|
||||
import { EventEmitter } from '@angular/core';
|
||||
import { MatPaginator, PageEvent } from '@angular/material/paginator';
|
||||
import { merge, Observable, of as observableOf } from 'rxjs';
|
||||
import { map, tap } from 'rxjs/operators';
|
||||
|
||||
import { Case } from '../../core/case';
|
||||
import {MatPaginator, PageEvent} from "@angular/material/paginator";
|
||||
import {EventEmitter} from "@angular/core";
|
||||
import {map, tap} from "rxjs/operators";
|
||||
|
||||
export class CaseListDataSource extends DataSource<Case> {
|
||||
private dataValues: Case[] = [];
|
||||
private data: Observable<Case[]> = new Observable<Case[]>();
|
||||
constructor(public d: Observable<Case[]>, private paginator?: MatPaginator) {
|
||||
constructor(public d: Observable<Case[]>, private paginator?: MatPaginator) {
|
||||
super();
|
||||
this.data = d.pipe(tap(x=> this.dataValues = x));
|
||||
this.data = d.pipe(tap((x) => (this.dataValues = x)));
|
||||
}
|
||||
|
||||
connect(): Observable<Case[]> {
|
||||
const dataMutations: (
|
||||
| Observable<Case[]>
|
||||
| EventEmitter<PageEvent>
|
||||
)[] = [this.data];
|
||||
const dataMutations: (Observable<Case[]> | EventEmitter<PageEvent>)[] = [this.data];
|
||||
if (this.paginator) {
|
||||
dataMutations.push((this.paginator as MatPaginator).page);
|
||||
}
|
||||
@ -43,5 +40,4 @@ export class CaseListDataSource extends DataSource<Case> {
|
||||
const startIndex = this.paginator.pageIndex * this.paginator.pageSize;
|
||||
return data.slice(startIndex, startIndex + this.paginator.pageSize);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" fxLayout="column">
|
||||
<form [formGroup]="form" fxLayout="column">
|
||||
<div
|
||||
fxLayout="row"
|
||||
fxLayout.lt-md="column"
|
||||
@ -24,7 +24,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
<mat-table #table [dataSource]="dataSource" aria-label="Elements">
|
||||
<!-- Office File Number Column -->
|
||||
<ng-container matColumnDef="officeFileNumber">
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Observable, of as observableOf } from 'rxjs';
|
||||
import { distinctUntilChanged, startWith, switchMap, tap } from 'rxjs/operators';
|
||||
|
||||
import { Case } from '../../core/case';
|
||||
import { CaseSource } from '../../core/case-source';
|
||||
import { CaseService } from '../case.service';
|
||||
|
||||
import { CaseListDataSource } from './case-list-datasource';
|
||||
import {CaseSource} from "../../core/case-source";
|
||||
import {FormBuilder, FormControl, FormGroup} from "@angular/forms";
|
||||
import {distinctUntilChanged, startWith, switchMap, tap} from "rxjs/operators";
|
||||
import {CaseService} from "../case.service";
|
||||
import { Observable, of as observableOf } from 'rxjs';
|
||||
import {MatPaginator} from "@angular/material/paginator";
|
||||
|
||||
@Component({
|
||||
selector: 'app-case-list',
|
||||
@ -39,7 +39,7 @@ export class CaseListComponent implements OnInit {
|
||||
'lowerCourtCaseNumber',
|
||||
];
|
||||
|
||||
constructor(private route: ActivatedRoute, private fb: FormBuilder, private ser: CaseService) {
|
||||
constructor(private route: ActivatedRoute, private fb: FormBuilder, private ser: CaseService) {
|
||||
// Create form
|
||||
this.form = this.fb.group({
|
||||
caseSource: '',
|
||||
@ -56,9 +56,7 @@ export class CaseListComponent implements OnInit {
|
||||
startWith(''),
|
||||
distinctUntilChanged(),
|
||||
switchMap((x) => this.ser.list(x)),
|
||||
tap(x=>console.log(x))
|
||||
);
|
||||
|
||||
});
|
||||
this.dataSource = new CaseListDataSource(this.list, this.paginator);
|
||||
}
|
||||
|
||||
@ -3,13 +3,13 @@ import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { AuthGuard } from '../auth/auth-guard.service';
|
||||
import { CaseSourceListResolver } from '../case-sources/case-source-list-resolver.service';
|
||||
import { DepartmentListResolver } from '../departments/department-list-resolver.service';
|
||||
|
||||
import { CaseDetailComponent } from './case-detail/case-detail.component';
|
||||
import { CaseListResolver } from './case-list-resolver.service';
|
||||
import { CaseListComponent } from './case-list/case-list.component';
|
||||
import { CaseResolver } from './case-resolver.service';
|
||||
import {CaseSourceListResolver} from "../case-sources/case-source-list-resolver.service";
|
||||
|
||||
const advocatesRoutes: Routes = [
|
||||
{
|
||||
|
||||
@ -7,6 +7,7 @@ import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatPaginatorModule } from '@angular/material/paginator';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
@ -14,24 +15,23 @@ import { MatTableModule } from '@angular/material/table';
|
||||
import { CaseDetailComponent } from './case-detail/case-detail.component';
|
||||
import { CaseListComponent } from './case-list/case-list.component';
|
||||
import { CasesRoutingModule } from './cases-routing.module';
|
||||
import {MatPaginatorModule} from "@angular/material/paginator";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
CdkTableModule,
|
||||
FlexLayoutModule,
|
||||
MatButtonModule,
|
||||
MatCardModule,
|
||||
MatIconModule,
|
||||
MatInputModule,
|
||||
MatProgressSpinnerModule,
|
||||
MatTableModule,
|
||||
ReactiveFormsModule,
|
||||
CasesRoutingModule,
|
||||
MatSelectModule,
|
||||
MatPaginatorModule,
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
CdkTableModule,
|
||||
FlexLayoutModule,
|
||||
MatButtonModule,
|
||||
MatCardModule,
|
||||
MatIconModule,
|
||||
MatInputModule,
|
||||
MatProgressSpinnerModule,
|
||||
MatTableModule,
|
||||
ReactiveFormsModule,
|
||||
CasesRoutingModule,
|
||||
MatSelectModule,
|
||||
MatPaginatorModule,
|
||||
],
|
||||
declarations: [CaseListComponent, CaseDetailComponent],
|
||||
})
|
||||
export class CasesModule {}
|
||||
|
||||
Reference in New Issue
Block a user