Moved from tslint to eslint as tslint was depreciated.

Added prettier and also prettied all the typescript files using prettier

ESLint is using the AirBnB rules which are the most strict to lint the files.
This commit is contained in:
2020-10-01 20:51:22 +05:30
parent 40e79ff949
commit 1350870f9e
545 changed files with 8455 additions and 7036 deletions

View File

@ -3,36 +3,78 @@
<mat-card>
<mat-card-content>
<form [formGroup]="lockDatesForm" fxLayout="column">
<div fxLayout="row" fxLayoutAlign="space-around start" fxLayout.lt-md="column" fxLayoutGap="20px"
fxLayoutGap.lt-md="0px">
<div
fxLayout="row"
fxLayoutAlign="space-around start"
fxLayout.lt-md="column"
fxLayoutGap="20px"
fxLayoutGap.lt-md="0px"
>
<mat-checkbox formControlName="lockOlder" fxFlex="20">Lock Older</mat-checkbox>
<mat-checkbox formControlName="olderRolling" *ngIf="lockInformation.lockOlder" fxFlex="20">
<mat-checkbox
formControlName="olderRolling"
*ngIf="lockInformation.lockOlder"
fxFlex="20"
>
Is Rolling
</mat-checkbox>
<mat-form-field fxFlex="60" *ngIf="lockInformation.lockOlder && !lockInformation.olderRolling">
<input matInput [matDatepicker]="olderDate" (focus)="olderDate.open()" placeholder="Date"
formControlName="olderDate" autocomplete="off">
<mat-form-field
fxFlex="60"
*ngIf="lockInformation.lockOlder && !lockInformation.olderRolling"
>
<input
matInput
[matDatepicker]="olderDate"
(focus)="olderDate.open()"
placeholder="Date"
formControlName="olderDate"
autocomplete="off"
/>
<mat-datepicker-toggle matSuffix [for]="olderDate"></mat-datepicker-toggle>
<mat-datepicker #olderDate></mat-datepicker>
</mat-form-field>
<mat-form-field fxFlex="60" *ngIf="lockInformation.lockOlder && lockInformation.olderRolling">
<input matInput placeholder="Days" formControlName="olderDays" autocomplete="off">
<mat-form-field
fxFlex="60"
*ngIf="lockInformation.lockOlder && lockInformation.olderRolling"
>
<input matInput placeholder="Days" formControlName="olderDays" autocomplete="off" />
</mat-form-field>
</div>
<div fxLayout="row" fxLayoutAlign="space-around start" fxLayout.lt-md="column" fxLayoutGap="20px"
fxLayoutGap.lt-md="0px">
<div
fxLayout="row"
fxLayoutAlign="space-around start"
fxLayout.lt-md="column"
fxLayoutGap="20px"
fxLayoutGap.lt-md="0px"
>
<mat-checkbox formControlName="lockNewer" fxFlex="20">Lock Newer</mat-checkbox>
<mat-checkbox formControlName="newerRolling" *ngIf="lockInformation.lockNewer" fxFlex="20">
<mat-checkbox
formControlName="newerRolling"
*ngIf="lockInformation.lockNewer"
fxFlex="20"
>
Is Rolling
</mat-checkbox>
<mat-form-field fxFlex="60" *ngIf="lockInformation.lockNewer && !lockInformation.newerRolling">
<input matInput [matDatepicker]="newerDate" (focus)="newerDate.open()" placehnewer="Date"
formControlName="newerDate" autocomplete="off">
<mat-form-field
fxFlex="60"
*ngIf="lockInformation.lockNewer && !lockInformation.newerRolling"
>
<input
matInput
[matDatepicker]="newerDate"
(focus)="newerDate.open()"
placehnewer="Date"
formControlName="newerDate"
autocomplete="off"
/>
<mat-datepicker-toggle matSuffix [for]="newerDate"></mat-datepicker-toggle>
<mat-datepicker #newerDate></mat-datepicker>
</mat-form-field>
<mat-form-field fxFlex="60" *ngIf="lockInformation.lockNewer && lockInformation.newerRolling">
<input matInput placehnewer="Days" formControlName="newerDays" autocomplete="off">
<mat-form-field
fxFlex="60"
*ngIf="lockInformation.lockNewer && lockInformation.newerRolling"
>
<input matInput placehnewer="Days" formControlName="newerDays" autocomplete="off" />
</mat-form-field>
</div>
</form>
@ -47,17 +89,29 @@
<mat-card>
<mat-card-content>
<form [formGroup]="rebaseDataForm" fxLayout="column">
<div fxLayout="row" fxLayoutAlign="space-around start" fxLayout.lt-md="column"
fxLayoutGap="20px" fxLayoutGap.lt-md="0px">
<div
fxLayout="row"
fxLayoutAlign="space-around start"
fxLayout.lt-md="column"
fxLayoutGap="20px"
fxLayoutGap.lt-md="0px"
>
<mat-form-field fxFlex="80">
<input matInput [matDatepicker]="rebaseDataDate" (focus)="rebaseDataDate.open()" placeholder="Date"
formControlName="date"
autocomplete="off">
<input
matInput
[matDatepicker]="rebaseDataDate"
(focus)="rebaseDataDate.open()"
placeholder="Date"
formControlName="date"
autocomplete="off"
/>
<mat-datepicker-toggle matSuffix [for]="rebaseDataDate"></mat-datepicker-toggle>
<mat-datepicker #rebaseDataDate></mat-datepicker>
</mat-form-field>
<button mat-raised-button color="primary" (click)="confirmRebase()" fxFlex="20">Rebase</button>
<button mat-raised-button color="primary" (click)="confirmRebase()" fxFlex="20">
Rebase
</button>
</div>
</form>
</mat-card-content>
@ -66,37 +120,67 @@
<mat-tab label="Reset Stock">
<mat-card>
<mat-card-content>
<form [formGroup]="resetStockForm" fxLayout="row" fxLayoutAlign="space-around start"
fxLayout.lt-md="column" fxLayoutGap="20px" fxLayoutGap.lt-md="0px">
<form
[formGroup]="resetStockForm"
fxLayout="row"
fxLayoutAlign="space-around start"
fxLayout.lt-md="column"
fxLayoutGap="20px"
fxLayoutGap.lt-md="0px"
>
<mat-form-field fxFlex="20">
<input matInput [matDatepicker]="resetDate" (focus)="resetDate.open()" placeholder="Reset Date"
formControlName="resetDate"
autocomplete="off">
<input
matInput
[matDatepicker]="resetDate"
(focus)="resetDate.open()"
placeholder="Reset Date"
formControlName="resetDate"
autocomplete="off"
/>
<mat-datepicker-toggle matSuffix [for]="resetDate"></mat-datepicker-toggle>
<mat-datepicker #resetDate></mat-datepicker>
</mat-form-field>
<mat-form-field fxFlex="20">
<input matInput [matDatepicker]="stockDate" (focus)="stockDate.open()" placeholder="Stock Date"
formControlName="stockDate"
autocomplete="off">
<input
matInput
[matDatepicker]="stockDate"
(focus)="stockDate.open()"
placeholder="Stock Date"
formControlName="stockDate"
autocomplete="off"
/>
<mat-datepicker-toggle matSuffix [for]="stockDate"></mat-datepicker-toggle>
<mat-datepicker #stockDate></mat-datepicker>
</mat-form-field>
<mat-form-field fxFlex="40">
<mat-label>Product</mat-label>
<input type="text" matInput placeholder="Product" [matAutocomplete]="auto" formControlName="product"
autocomplete="off">
<mat-autocomplete #auto="matAutocomplete" autoActiveFirstOption [displayWith]="displayProduct"
(optionSelected)="selectedProduct($event)">
<mat-option *ngFor="let product of products | async" [value]="product">{{product.name}}</mat-option>
<input
type="text"
matInput
placeholder="Product"
[matAutocomplete]="auto"
formControlName="product"
autocomplete="off"
/>
<mat-autocomplete
#auto="matAutocomplete"
autoActiveFirstOption
[displayWith]="displayProduct"
(optionSelected)="selectedProduct($event)"
>
<mat-option *ngFor="let product of products | async" [value]="product">{{
product.name
}}</mat-option>
</mat-autocomplete>
</mat-form-field>
<mat-form-field fxFlex="10">
<mat-label>Quantity</mat-label>
<input matInput placehnewer="Quantity" formControlName="quantity" autocomplete="off">
<input matInput placehnewer="Quantity" formControlName="quantity" autocomplete="off" />
</mat-form-field>
<button mat-raised-button color="warn" (click)="confirmResetStock()" fxFlex="10">Rebase</button>
<button mat-raised-button color="warn" (click)="confirmResetStock()" fxFlex="10">
Rebase
</button>
</form>
</mat-card-content>
</mat-card>
@ -104,7 +188,9 @@
<mat-tab label="Integrity Check">
<mat-card>
<mat-card-content>
<button mat-raised-button color="warn" (click)="checkIntegrity()" fxFlex="100">Integrity Check</button>
<button mat-raised-button color="warn" (click)="checkIntegrity()" fxFlex="100">
Integrity Check
</button>
</mat-card-content>
</mat-card>
</mat-tab>
@ -112,14 +198,21 @@
<mat-card>
<mat-card-content>
<mat-card-subtitle *ngIf="maintenance.enabled">
Maintenance mode is <strong>ENABLED</strong> by user <strong>{{maintenance.user}}</strong>.
Maintenance mode is <strong>ENABLED</strong> by user
<strong>{{ maintenance.user }}</strong
>.
</mat-card-subtitle>
<mat-card-subtitle *ngIf="!maintenance.enabled">
Maintenance mode is <strong>DISABLED</strong>.
</mat-card-subtitle>
<button mat-raised-button [color]="maintenance.enabled ? 'warn' : 'primary'" (click)="toggleMaintenance()"
fxFlex="100">{{ maintenance.enabled ? 'Disable' : 'Enable' }}
<button
mat-raised-button
[color]="maintenance.enabled ? 'warn' : 'primary'"
(click)="toggleMaintenance()"
fxFlex="100"
>
{{ maintenance.enabled ? 'Disable' : 'Enable' }}
</button>
</mat-card-content>
</mat-card>