Chore: Update dependencies

Chore: Lint
Chore: Remove old useless files
Feature: Add more fields to case detail
This commit is contained in:
2021-01-12 10:49:38 +05:30
parent eab3a725dc
commit 789722c0a9
52 changed files with 210 additions and 3739 deletions

View File

@ -42,12 +42,8 @@
fxLayoutGap.lt-md="0px"
>
<mat-form-field fxFlex>
<mat-label>Mobile</mat-label>
<input matInput placeholder="Mobile" formControlName="mobile" />
</mat-form-field>
<mat-form-field fxFlex>
<mat-label>Land Line</mat-label>
<input matInput placeholder="Landline" formControlName="landline" />
<mat-label>Court Case Number</mat-label>
<input matInput placeholder="Court Case Number" formControlName="courtCaseNumber" />
</mat-form-field>
</div>
<div
@ -58,8 +54,13 @@
fxLayoutGap.lt-md="0px"
>
<mat-form-field fxFlex>
<mat-label>Email</mat-label>
<input matInput placeholder="Email" formControlName="email" />
<mat-label>Case Type</mat-label>
<mat-select placeholder="Case Type" formControlName="caseType">
<mat-option value=""> -- Not Applicable -- </mat-option>
<mat-option *ngFor="let ct of caseTypes" [value]="ct.id">
{{ ct.name }}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div
@ -70,8 +71,52 @@
fxLayoutGap.lt-md="0px"
>
<mat-form-field fxFlex>
<mat-label>Address</mat-label>
<input matInput placeholder="Address" formControlName="address" />
<mat-label>Year</mat-label>
<input matInput placeholder="Year" formControlName="year" />
</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>Connected Cases</mat-label>
<input matInput placeholder="Connected Cases" formControlName="connectedCases" />
</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>Appearing for the</mat-label>
<mat-select placeholder="Appearing for the" formControlName="appearOnBehalfOf">
<mat-option value="Petitioner">Petitioner</mat-option>
<mat-option value="Respondent">Respondent</mat-option>
</mat-select>
</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>Forum</mat-label>
<mat-select placeholder="Forum" formControlName="court">
<mat-option value=""> -- Not Applicable -- </mat-option>
<mat-option *ngFor="let c of courts" [value]="c.id">
{{ c.name }}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div
@ -90,6 +135,15 @@
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field fxFlex>
<mat-label>Department</mat-label>
<mat-select placeholder="Department" formControlName="office">
<mat-option value=""> -- Not Applicable -- </mat-option>
<mat-option *ngFor="let o of offices | async" [value]="o.id">
{{ o.name }}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div
fxLayout="row"
@ -99,11 +153,58 @@
fxLayoutGap.lt-md="0px"
>
<mat-form-field fxFlex>
<mat-label>Department</mat-label>
<mat-select placeholder="Department" formControlName="office">
<mat-label>Contact Person</mat-label>
<input matInput placeholder="Contact Person" formControlName="contactPerson" />
</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>Court Status</mat-label>
<mat-select placeholder="Court Status" formControlName="courtStatus">
<mat-option value=""> -- Not Applicable -- </mat-option>
<mat-option *ngFor="let o of offices | async" [value]="o.id">
{{ o.name }}
<mat-option *ngFor="let cs of courtStatuses" [value]="cs.id">
{{ cs.name }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field fxFlex>
<mat-label>Office Status</mat-label>
<mat-select placeholder="Office Status" formControlName="officeStatus">
<mat-option value=""> -- Not Applicable -- </mat-option>
<mat-option *ngFor="let os of officeStatuses" [value]="os.id">
{{ os.name }}
</mat-option>
</mat-select>
</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>Act</mat-label>
<mat-select placeholder="Act" formControlName="act">
<mat-option value=""> -- Not Applicable -- </mat-option>
<mat-option *ngFor="let a of acts" [value]="a.id">
{{ a.name }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field fxFlex>
<mat-label>Nature</mat-label>
<mat-select placeholder="Nature" formControlName="nature">
<mat-option value=""> -- Not Applicable -- </mat-option>
<mat-option *ngFor="let n of natures" [value]="n.id">
{{ n.name }}
</mat-option>
</mat-select>
</mat-form-field>

View File

@ -27,8 +27,14 @@ import { CaseService } from '../case.service';
export class CaseDetailComponent implements OnInit, AfterViewInit {
@ViewChild('nameElement', { static: true }) nameElement?: ElementRef;
form: FormGroup;
caseTypes: CaseType[] = [];
courts: Court[] = [];
departments: Department[] = [];
offices: Observable<Office[]> = new Observable<Office[]>();
courtStatuses: CourtStatus[] = [];
officeStatuses: OfficeStatus[] = [];
acts: Act[] = [];
natures: Nature[] = [];
item: Case = new Case();
constructor(
@ -76,8 +82,23 @@ export class CaseDetailComponent implements OnInit, AfterViewInit {
ngOnInit() {
this.route.data.subscribe((value) => {
const data = value as { item: Case; departments: Department[] };
const data = value as {
item: Case;
caseTypes: CaseType[];
courts: Court[];
departments: Department[];
courtStatuses: CourtStatus[];
officeStatuses: OfficeStatus[];
acts: Act[];
natures: Nature[];
};
this.caseTypes = data.caseTypes;
this.courts = data.courts;
this.departments = data.departments;
this.courtStatuses = data.courtStatuses;
this.officeStatuses = data.officeStatuses;
this.acts = data.acts;
this.natures = data.natures;
this.showItem(data.item);
});
}

View File

@ -2,9 +2,19 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ActListResolver } from '../acts/act-list-resolver.service';
import { AuthGuard } from '../auth/auth-guard.service';
import { CaseSourceListResolver } from '../case-sources/case-source-list-resolver.service';
import { CaseTypeListResolver } from '../case-types/case-type-list-resolver.service';
import { Case } from '../core/case';
import { CaseType } from '../core/case-type';
import { Court } from '../core/court';
import { Department } from '../core/department';
import { CourtStatusListResolver } from '../court-statuses/court-status-list-resolver.service';
import { CourtListResolver } from '../courts/court-list-resolver.service';
import { DepartmentListResolver } from '../departments/department-list-resolver.service';
import { NatureListResolver } from '../natures/nature-list-resolver.service';
import { OfficeStatusListResolver } from '../office-statuses/office-status-list-resolver.service';
import { CaseDetailComponent } from './case-detail/case-detail.component';
import { CaseListResolver } from './case-list-resolver.service';
@ -33,7 +43,13 @@ const advocatesRoutes: Routes = [
},
resolve: {
item: CaseResolver,
caseTypes: CaseTypeListResolver,
courts: CourtListResolver,
departments: DepartmentListResolver,
courtStatuses: CourtStatusListResolver,
officeStatuses: OfficeStatusListResolver,
acts: ActListResolver,
natures: NatureListResolver,
},
},
{
@ -45,7 +61,13 @@ const advocatesRoutes: Routes = [
},
resolve: {
item: CaseResolver,
caseTypes: CaseTypeListResolver,
courts: CourtListResolver,
departments: DepartmentListResolver,
courtStatuses: CourtStatusListResolver,
officeStatuses: OfficeStatusListResolver,
acts: ActListResolver,
natures: NatureListResolver,
},
},
];

View File

@ -79,14 +79,6 @@
</mat-option>
</mat-select>
</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>Department</mat-label>
<mat-select placeholder="Department" formControlName="office">

View File

@ -1,5 +1,5 @@
export const environment = {
production: true,
ACCESS_TOKEN_REFRESH_MINUTES: 10, // refresh token 10 minutes before expiry
version: '6.3.0',
version: '1.0.0',
};

View File

@ -5,7 +5,7 @@
export const environment = {
production: false,
ACCESS_TOKEN_REFRESH_MINUTES: 10, // refresh token 10 minutes before expiry
version: '6.3.0',
version: '1.0.0',
};
/*