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

@ -14,43 +14,42 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^11.0.5",
"@angular/animations": "^11.0.8",
"@angular/cdk": "^11.0.3",
"@angular/common": "^11.0.5",
"@angular/compiler": "^11.0.5",
"@angular/core": "^11.0.5",
"@angular/common": "^11.0.8",
"@angular/compiler": "^11.0.8",
"@angular/core": "^11.0.8",
"@angular/flex-layout": "^11.0.0-beta.33",
"@angular/forms": "^11.0.5",
"@angular/forms": "^11.0.8",
"@angular/material": "^11.0.3",
"@angular/material-moment-adapter": "^11.0.3",
"@angular/platform-browser": "^11.0.5",
"@angular/platform-browser-dynamic": "^11.0.5",
"@angular/router": "^11.0.5",
"@angular/platform-browser": "^11.0.8",
"@angular/platform-browser-dynamic": "^11.0.8",
"@angular/router": "^11.0.8",
"moment": "^2.29.1",
"rxjs": "^6.6.3",
"tslib": "^2.0.0",
"tslib": "^2.1.0",
"zone.js": "^0.11.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1100.5",
"@angular-eslint/builder": "^0.8.0-beta.6",
"@angular-eslint/eslint-plugin": "^0.8.0-beta.6",
"@angular-eslint/eslint-plugin-template": "^0.8.0-beta.6",
"@angular-eslint/schematics": "^0.8.0-beta.6",
"@angular-eslint/template-parser": "^0.8.0-beta.6",
"@angular/cli": "^11.0.5",
"@angular/compiler-cli": "^11.0.5",
"@angular/language-service": "^11.0.5",
"@angular-devkit/build-angular": "~0.1100.6",
"@angular-eslint/builder": "1.0.0",
"@angular-eslint/eslint-plugin": "1.0.0",
"@angular-eslint/eslint-plugin-template": "1.0.0",
"@angular-eslint/schematics": "1.0.0",
"@angular-eslint/template-parser": "1.0.0",
"@angular/cli": "^11.0.6",
"@angular/compiler-cli": "^11.0.8",
"@angular/language-service": "^11.0.8",
"@types/jasmine": "~3.6.2",
"@types/node": "^14.14.14",
"@typescript-eslint/eslint-plugin": "^4.10.0",
"@typescript-eslint/parser": "^4.10.0",
"eslint": "^7.16.0",
"eslint-config-prettier": "^7.1.0",
"@types/node": "^14.14.20",
"@typescript-eslint/eslint-plugin": "^4.13.0",
"@typescript-eslint/parser": "^4.13.0",
"eslint": "^7.17.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^30.7.9",
"eslint-plugin-jsdoc": "^31.0.3",
"eslint-plugin-prefer-arrow": "1.2.2",
"husky": "^4.3.6",
"husky": "^4.3.7",
"jasmine-core": "^3.6.0",
"jasmine-spec-reporter": "^6.0.0",
"karma": "^5.2.3",
@ -60,7 +59,7 @@
"karma-jasmine-html-reporter": "^1.5.0",
"lint-staged": "^10.5.3",
"prettier": "^2.2.1",
"standard-version": "^9.0.0",
"standard-version": "^9.1.0",
"ts-node": "^9.1.1",
"typescript": "~4.0.5"
},

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',
};
/*