Chore: Updated to Angular 16
This commit is contained in:
1 parent
9589081046
commit
78d98f979d
99 files changed
+416
-232
No files matched your search
@@ -9,8 +9,8 @@ RUN cd /app/overlord \
|
||||
ADD https://git.tanshu.com/api/v1/repos/tanshu/brewman/tags /tags.json
|
||||
RUN git clone --single-branch --depth 1 --branch latest https://git.tanshu.com/tanshu/brewman.git /app
|
||||
WORKDIR /app/overlord
|
||||
RUN mv /node_modules /app/overlord/ \
|
||||
&& /app/overlord/node_modules/.bin/ng build
|
||||
RUN mv /node_modules /app/bookie/ \
|
||||
&& /app/bookie/node_modules/.bin/ng build
|
||||
|
||||
|
||||
FROM python:3.11
|
||||
@@ -27,7 +27,7 @@ ENV LANG en_IN
|
||||
ENV LC_ALL en_IN
|
||||
|
||||
# Install Poetry
|
||||
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | POETRY_HOME=/opt/poetry python && \
|
||||
RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/opt/poetry python - && \
|
||||
cd /usr/local/bin && \
|
||||
ln -s /opt/poetry/bin/poetry && \
|
||||
poetry config virtualenvs.create false
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:@angular-eslint/recommended",
|
||||
"plugin:@angular-eslint/template/process-inline-templates",
|
||||
"plugin:@angular-eslint/recommended--extra",
|
||||
"prettier"
|
||||
],
|
||||
"plugins": [
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
module.exports = {
|
||||
trailingComma: "all",
|
||||
tabWidth: 2,
|
||||
semi: true,
|
||||
singleQuote: true,
|
||||
bracketSpacing: true,
|
||||
printWidth: 100
|
||||
printWidth: 120
|
||||
};
|
||||
+39
-40
@@ -14,61 +14,60 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^15.2.6",
|
||||
"@angular/cdk": "^15.2.6",
|
||||
"@angular/common": "^15.2.6",
|
||||
"@angular/compiler": "^15.2.6",
|
||||
"@angular/core": "^15.2.6",
|
||||
"@angular/forms": "^15.2.6",
|
||||
"@angular/material": "^15.2.6",
|
||||
"@angular/material-moment-adapter": "^15.2.6",
|
||||
"@angular/platform-browser": "^15.2.6",
|
||||
"@angular/platform-browser-dynamic": "^15.2.6",
|
||||
"@angular/router": "^15.2.6",
|
||||
"@angular/animations": "^16.1.6",
|
||||
"@angular/cdk": "^16.1.5",
|
||||
"@angular/common": "^16.1.6",
|
||||
"@angular/compiler": "^16.1.6",
|
||||
"@angular/core": "^16.1.6",
|
||||
"@angular/forms": "^16.1.6",
|
||||
"@angular/material": "^16.1.5",
|
||||
"@angular/material-moment-adapter": "^16.1.5",
|
||||
"@angular/platform-browser": "^16.1.6",
|
||||
"@angular/platform-browser-dynamic": "^16.1.6",
|
||||
"@angular/router": "^16.1.6",
|
||||
"@ngx-loading-bar/core": "^6.0.2",
|
||||
"@ngx-loading-bar/http-client": "^6.0.2",
|
||||
"@ngx-loading-bar/router": "^6.0.2",
|
||||
"@types/mousetrap": "1.6.11",
|
||||
"angular2-hotkeys": "^13.2.0",
|
||||
"mathjs": "^11.8.0",
|
||||
"angular2-hotkeys": "^15.0.0",
|
||||
"mathjs": "^11.9.0",
|
||||
"moment": "^2.29.4",
|
||||
"rxjs": "~7.8.0",
|
||||
"tslib": "^2.5.0",
|
||||
"zone.js": "~0.12.0"
|
||||
"tslib": "^2.6.0",
|
||||
"zone.js": "~0.13.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^15.2.5",
|
||||
"@angular-eslint/builder": "^15.2.1",
|
||||
"@angular-eslint/eslint-plugin": "^15.2.1",
|
||||
"@angular-eslint/eslint-plugin-template": "^15.2.1",
|
||||
"@angular-eslint/schematics": "^15.2.1",
|
||||
"@angular-eslint/template-parser": "^15.2.1",
|
||||
"@angular/cli": "^15.2.5",
|
||||
"@angular/compiler-cli": "^15.2.6",
|
||||
"@angular/language-service": "^15.2.6",
|
||||
"@types/jasmine": "~4.3.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.57.1",
|
||||
"@typescript-eslint/parser": "^5.57.1",
|
||||
"@angular-devkit/build-angular": "^16.1.5",
|
||||
"@angular-eslint/builder": "^16.1.0",
|
||||
"@angular-eslint/eslint-plugin": "^16.1.0",
|
||||
"@angular-eslint/eslint-plugin-template": "^16.1.0",
|
||||
"@angular-eslint/schematics": "^16.1.0",
|
||||
"@angular-eslint/template-parser": "^16.1.0",
|
||||
"@angular/cli": "^16.1.5",
|
||||
"@angular/compiler-cli": "^16.1.6",
|
||||
"@angular/language-service": "^16.1.6",
|
||||
"@types/jasmine": "~4.3.5",
|
||||
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
||||
"@typescript-eslint/parser": "^6.1.0",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"eslint": "^8.37.0",
|
||||
"eslint": "^8.39.0",
|
||||
"eslint-config-prettier": "^8.7.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-unused-imports": "^2.0.0",
|
||||
"eslint-plugin-unused-imports": "^3.0.0",
|
||||
"husky": "^8.0.2",
|
||||
"jasmine-core": "~4.5.0",
|
||||
"jasmine-core": "~5.1.0",
|
||||
"jasmine-spec-reporter": "7.0.0",
|
||||
"karma": "^6.4.1",
|
||||
"karma-chrome-launcher": "~3.1.1",
|
||||
"karma-coverage": "~2.2.0",
|
||||
"karma": "^6.4.2",
|
||||
"karma-chrome-launcher": "~3.2.0",
|
||||
"karma-coverage": "~2.2.1",
|
||||
"karma-jasmine": "~5.1.0",
|
||||
"karma-jasmine-html-reporter": "^2.0.0",
|
||||
"lint-staged": "^13.1.0",
|
||||
"postcss": "^8.4.21",
|
||||
"prettier": "^2.8.7",
|
||||
"karma-jasmine-html-reporter": "^2.1.0",
|
||||
"lint-staged": "^13.2.3",
|
||||
"postcss": "^8.4.27",
|
||||
"prettier": "^3.0.0",
|
||||
"standard-version": "^9.5.0",
|
||||
"tailwindcss": "^3.3.1",
|
||||
"ts-node": "^9.1.1",
|
||||
"typescript": "~4.9.4"
|
||||
"tailwindcss": "^3.3.3",
|
||||
"typescript": "~5.1.6"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
||||
@@ -13,7 +13,10 @@ const serviceName = 'AccountTypeService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class AccountTypeService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(): Observable<AccountType[]> {
|
||||
return this.http
|
||||
|
||||
@@ -12,7 +12,10 @@ const serviceName = 'AttendanceTypeService';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class AttendanceTypeService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(): Observable<AttendanceType[]> {
|
||||
return this.http
|
||||
|
||||
@@ -12,7 +12,10 @@ const serviceName = 'AttendanceService';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class AttendanceService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
get(date: string | null): Observable<Attendance> {
|
||||
const getUrl: string = date === null ? url : `${url}/${date}`;
|
||||
|
||||
@@ -9,7 +9,11 @@ import { AuthService } from '../auth.service';
|
||||
template: '',
|
||||
})
|
||||
export class LogoutComponent implements OnInit {
|
||||
constructor(private auth: AuthService, private router: Router, private toaster: ToasterService) {}
|
||||
constructor(
|
||||
private auth: AuthService,
|
||||
private router: Router,
|
||||
private toaster: ToasterService,
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.auth.logout();
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
<ng-container matColumnDef="subAmount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.subAmount | currency : 'INR' | clear
|
||||
row.subAmount | currency: 'INR' | clear
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right"
|
||||
>{{ info.footer?.subAmount | currency : 'INR' | clear }}
|
||||
>{{ info.footer?.subAmount | currency: 'INR' | clear }}
|
||||
</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -50,10 +50,10 @@
|
||||
<ng-container matColumnDef="total">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Total</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.amount | currency : 'INR' | clear
|
||||
row.amount | currency: 'INR' | clear
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right"
|
||||
>{{ info.footer?.amount | currency : 'INR' | clear }}
|
||||
>{{ info.footer?.amount | currency: 'INR' | clear }}
|
||||
</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -25,7 +25,10 @@ export class BalanceSheetComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['group', 'name', 'subAmount', 'total'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
) {
|
||||
this.form = new FormGroup({
|
||||
date: new FormControl(new Date(), { nonNullable: true }),
|
||||
});
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'BalanceSheetService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class BalanceSheetService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(date: string | null): Observable<BalanceSheet> {
|
||||
const listUrl = date === null ? url : `${url}/${date}`;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<ng-container matColumnDef="batch">
|
||||
<mat-header-cell *matHeaderCellDef>Batch</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">
|
||||
{{ row.product }} dated {{ row.date }} @ {{ row.price | currency : 'INR' }} is showing
|
||||
{{ row.product }} dated {{ row.date }} @ {{ row.price | currency: 'INR' }} is showing
|
||||
{{ row.showing }} instead of {{ row.actual }}
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
@@ -21,7 +21,7 @@
|
||||
<li *ngFor="let detail of row.details">
|
||||
<a [routerLink]="detail.url">{{ detail.type }}</a> on {{ detail.date }} of
|
||||
{{ detail.quantity }} @
|
||||
{{ detail.price | currency : 'INR' }}
|
||||
{{ detail.price | currency: 'INR' }}
|
||||
</li>
|
||||
</ul>
|
||||
</mat-cell>
|
||||
|
||||
@@ -14,7 +14,10 @@ export class BatchIntegrityReportComponent implements OnInit {
|
||||
dataSource: BatchIntegrityReportDatasource = new BatchIntegrityReportDatasource(this.info);
|
||||
displayedColumns = ['batch', 'details'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router) {}
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data.subscribe((value) => {
|
||||
|
||||
@@ -13,7 +13,10 @@ const serviceName = 'BatchIntegrityReportService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class BatchIntegrityReportService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
batchIntegrity(): Observable<BatchIntegrity[]> {
|
||||
const url = '/api/batch-integrity';
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.amount | currency : 'INR' | clear
|
||||
row.amount | currency: 'INR' | clear
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -22,7 +22,10 @@ export class CashFlowComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['name', 'amount'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
) {
|
||||
this.form = new FormGroup({
|
||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'CashFlowService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class CashFlowService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(
|
||||
id: string | null,
|
||||
|
||||
@@ -11,7 +11,11 @@ import { Client } from '../client';
|
||||
const compare = (a: string | number, b: string | number, isAsc: boolean) =>
|
||||
(a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
||||
export class ClientListDataSource extends DataSource<Client> {
|
||||
constructor(public data: Client[], private paginator?: MatPaginator, private sort?: MatSort) {
|
||||
constructor(
|
||||
public data: Client[],
|
||||
private paginator?: MatPaginator,
|
||||
private sort?: MatSort,
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'ClientService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ClientService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
get(id: string | null): Observable<Client> {
|
||||
const getUrl: string = id === null ? url : `${url}/${id}`;
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
>Closing Stock</mat-header-cell
|
||||
>
|
||||
<mat-cell *matCellDef="let row" class="right middle">{{
|
||||
row.quantity | number : '0.2-2'
|
||||
row.quantity | number: '0.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<ng-container matColumnDef="variance" class="middle">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Variance</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right middle">{{
|
||||
row.quantity - row.physical | number : '0.2-2'
|
||||
row.quantity - row.physical | number: '0.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
>Amount</mat-header-cell
|
||||
>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.amount | currency : 'INR'
|
||||
row.amount | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'ClosingStockService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ClosingStockService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(date: string | null, costCentre: string | null): Observable<ClosingStock> {
|
||||
const listUrl = date === null ? url : `${url}/${date}`;
|
||||
|
||||
@@ -12,7 +12,10 @@ const serviceName = 'AccountService';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class AccountService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
get(id: string | null): Observable<Account> {
|
||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||
|
||||
@@ -11,7 +11,10 @@ const serviceName = 'BatchService';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class BatchService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
autocomplete(date: string, term: string): Observable<Batch[]> {
|
||||
const options = { params: new HttpParams().set('q', term).set('d', date) };
|
||||
|
||||
@@ -9,7 +9,10 @@ import { AuthService } from '../../auth/auth.service';
|
||||
styleUrls: ['./nav-bar.component.css'],
|
||||
})
|
||||
export class NavBarComponent {
|
||||
constructor(private router: Router, public auth: AuthService) {}
|
||||
constructor(
|
||||
private router: Router,
|
||||
public auth: AuthService,
|
||||
) {}
|
||||
|
||||
logout() {
|
||||
this.auth.logout();
|
||||
|
||||
@@ -13,7 +13,10 @@ const serviceName = 'VoucherService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class VoucherService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
static dataURLtoBlob(dataURL: string) {
|
||||
const re = /^data:([\w/\-.]+);\w+,(.*)$/;
|
||||
|
||||
@@ -11,7 +11,11 @@ import { CostCentre } from '../../core/cost-centre';
|
||||
const compare = (a: string | number, b: string | number, isAsc: boolean) =>
|
||||
(a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
||||
export class CostCentreListDataSource extends DataSource<CostCentre> {
|
||||
constructor(public data: CostCentre[], private paginator?: MatPaginator, private sort?: MatSort) {
|
||||
constructor(
|
||||
public data: CostCentre[],
|
||||
private paginator?: MatPaginator,
|
||||
private sort?: MatSort,
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,10 @@ const serviceName = 'CostCentreService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class CostCentreService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
get(id: string | null): Observable<CostCentre> {
|
||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<ng-container matColumnDef="debitAmount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.debitAmount | currency : 'INR'
|
||||
row.debitAmount | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<ng-container matColumnDef="creditAmount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.creditAmount | currency : 'INR'
|
||||
row.creditAmount | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -35,7 +35,10 @@ export class DaybookComponent implements OnInit {
|
||||
'creditAmount',
|
||||
];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
) {
|
||||
this.form = new FormGroup({
|
||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'DaybookService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class DaybookService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(startDate: string | null, finishDate: string | null): Observable<Daybook> {
|
||||
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
||||
|
||||
@@ -12,7 +12,10 @@ const serviceName = 'EmployeeAttendanceService';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class EmployeeAttendanceService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
get(
|
||||
id: string | null,
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<ng-container matColumnDef="grossSalary">
|
||||
<mat-header-cell *matHeaderCellDef class="right">GrossSalary</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.grossSalary | currency : 'INR'
|
||||
row.grossSalary | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
<ng-container matColumnDef="daysWorked">
|
||||
<mat-header-cell *matHeaderCellDef class="right">DaysWorked</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.daysWorked | number : '1.2-2'
|
||||
row.daysWorked | number: '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<ng-container matColumnDef="esiEmployee">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Esi EE</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.esiEmployee | currency : 'INR'
|
||||
row.esiEmployee | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<ng-container matColumnDef="pfEmployee">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Pf EE</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.pfEmployee | currency : 'INR'
|
||||
row.pfEmployee | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
<ng-container matColumnDef="esiEmployer">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Esi ER</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.esiEmployer | currency : 'INR'
|
||||
row.esiEmployer | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
<ng-container matColumnDef="pfEmployer">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Pf ER</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.pfEmployer | currency : 'INR'
|
||||
row.pfEmployer | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -25,7 +25,10 @@ export class EmployeeFunctionsComponent {
|
||||
|
||||
fingerprintFile: File | null = null;
|
||||
|
||||
constructor(private toaster: ToasterService, private ser: EmployeeFunctionsService) {
|
||||
constructor(
|
||||
private toaster: ToasterService,
|
||||
private ser: EmployeeFunctionsService,
|
||||
) {
|
||||
const startDate = moment().date(1);
|
||||
const finishDate = moment().date(startDate.daysInMonth());
|
||||
this.creditSalaryForm = new FormGroup({
|
||||
|
||||
@@ -9,7 +9,10 @@ const serviceName = 'EmployeeFunctionsService';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class EmployeeFunctionsService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
creditSalary(month: string): Observable<boolean> {
|
||||
const url = '/api/credit-salary';
|
||||
|
||||
@@ -47,13 +47,13 @@
|
||||
<!-- Salary Column -->
|
||||
<ng-container matColumnDef="salary">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Salary</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.salary | currency : 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.salary | currency: 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Points Column -->
|
||||
<ng-container matColumnDef="points">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Points</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.points | number : '1.2-2' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.points | number: '1.2-2' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Department Column -->
|
||||
|
||||
@@ -40,7 +40,10 @@ export class EmployeeListComponent implements OnInit, AfterViewInit {
|
||||
'leavingDate',
|
||||
];
|
||||
|
||||
constructor(private route: ActivatedRoute, private toCsv: ToCsvService) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private toCsv: ToCsvService,
|
||||
) {
|
||||
this.form = new FormGroup({
|
||||
filter: new FormControl<string>('', { nonNullable: true }),
|
||||
});
|
||||
|
||||
@@ -12,7 +12,10 @@ const serviceName = 'EmployeeService';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class EmployeeService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
get(id: string | null): Observable<Employee> {
|
||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<!-- Amount Column -->
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.amount | currency : 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.amount | currency: 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- User Column -->
|
||||
|
||||
@@ -38,7 +38,10 @@ export class EntriesComponent implements OnInit {
|
||||
|
||||
posted: boolean | null = null;
|
||||
issue = false;
|
||||
constructor(private route: ActivatedRoute, private router: Router) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
) {
|
||||
this.form = new FormGroup({
|
||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'EntriesService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class EntriesService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(
|
||||
start_date: string | null,
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
Total Incentive: <strong>{{ voucher.incentive | number : '1.2-2' }}</strong> Total Points:
|
||||
<strong>{{ totalPoints() | number : '1.2-2' }}</strong> Point Value:
|
||||
<strong>{{ pointValue() | number : '1.2-2' }}</strong>
|
||||
Total Incentive: <strong>{{ voucher.incentive | number: '1.2-2' }}</strong> Total Points:
|
||||
<strong>{{ totalPoints() | number: '1.2-2' }}</strong> Point Value:
|
||||
<strong>{{ pointValue() | number: '1.2-2' }}</strong>
|
||||
</div>
|
||||
<mat-table #table [dataSource]="dataSource" formArrayName="incentives">
|
||||
<!-- Name Column -->
|
||||
@@ -46,7 +46,7 @@
|
||||
<ng-container matColumnDef="daysWorked">
|
||||
<mat-header-cell *matHeaderCellDef class="right">DaysWorked</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.daysWorked | number : '1.2-2'
|
||||
row.daysWorked | number: '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
amount(row) | currency : 'INR'
|
||||
amount(row) | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -13,7 +13,10 @@ const serviceName = 'IssueGridService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class IssueGridService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
issueGrid(date: string): Observable<IssueGridItem[]> {
|
||||
return this.http
|
||||
|
||||
@@ -90,21 +90,21 @@
|
||||
<ng-container matColumnDef="quantity">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.quantity | number : '1.2-2'
|
||||
row.quantity | number: '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Rate Column -->
|
||||
<ng-container matColumnDef="rate">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Rate</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency : 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency: 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Amount Column -->
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.amount | currency : 'INR'
|
||||
row.amount | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
<!-- Amount Column -->
|
||||
<ng-container matColumnDef="gridAmount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.amount | currency : 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.amount | currency: 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Load Column -->
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-hint *ngIf="accBal">
|
||||
Balance as on Date: <strong>{{ accBal.date | currency : 'INR' | accounting }}</strong> /
|
||||
Final balance: <strong>{{ accBal.total | currency : 'INR' | accounting }}</strong>
|
||||
Balance as on Date: <strong>{{ accBal.date | currency: 'INR' | accounting }}</strong> /
|
||||
Final balance: <strong>{{ accBal.total | currency: 'INR' | accounting }}</strong>
|
||||
</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-autocomplete
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-hint *ngIf="accBal">
|
||||
Balance as on Date: <strong>{{ accBal.date | currency : 'INR' | accounting }}</strong> /
|
||||
Final balance: <strong>{{ accBal.total | currency : 'INR' | accounting }}</strong>
|
||||
Balance as on Date: <strong>{{ accBal.date | currency: 'INR' | accounting }}</strong> /
|
||||
Final balance: <strong>{{ accBal.total | currency: 'INR' | accounting }}</strong>
|
||||
</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-autocomplete
|
||||
@@ -91,7 +91,7 @@
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.amount | currency : 'INR'
|
||||
row.amount | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -11,7 +11,11 @@ import { LedgerItem } from './ledger-item';
|
||||
const compare = (a: string | number, b: string | number, isAsc: boolean) =>
|
||||
(a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
||||
export class LedgerDataSource extends DataSource<LedgerItem> {
|
||||
constructor(public data: LedgerItem[], private paginator?: MatPaginator, private sort?: MatSort) {
|
||||
constructor(
|
||||
public data: LedgerItem[],
|
||||
private paginator?: MatPaginator,
|
||||
private sort?: MatSort,
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@@ -97,10 +97,10 @@
|
||||
<ng-container matColumnDef="debit">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Debit</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.debit | currency : 'INR' | clear
|
||||
row.debit | currency: 'INR' | clear
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
debit | currency : 'INR'
|
||||
debit | currency: 'INR'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -108,10 +108,10 @@
|
||||
<ng-container matColumnDef="credit">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Credit</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.credit | currency : 'INR' | clear
|
||||
row.credit | currency: 'INR' | clear
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
credit | currency : 'INR'
|
||||
credit | currency: 'INR'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -119,10 +119,10 @@
|
||||
<ng-container matColumnDef="running">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Running</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.running | currency : 'INR' | accounting
|
||||
row.running | currency: 'INR' | accounting
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
running | currency : 'INR' | accounting
|
||||
running | currency: 'INR' | accounting
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'LedgerService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class LedgerService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(id: string | null, startDate: string | null, finishDate: string | null): Observable<Ledger> {
|
||||
const listUrl = id === null ? url : `${url}/${id}`;
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<ng-container matColumnDef="debit">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Debit</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.debit | currency : 'INR' | accounting
|
||||
row.debit | currency: 'INR' | accounting
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<ng-container matColumnDef="credit">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Credit</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.credit | currency : 'INR' | accounting
|
||||
row.credit | currency: 'INR' | accounting
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -27,7 +27,10 @@ export class NetTransactionsComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['type', 'name', 'debit', 'credit'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
) {
|
||||
this.form = new FormGroup({
|
||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'NetTransactionsService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class NetTransactionsService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(startDate: string | null, finishDate: string | null): Observable<NetTransactions> {
|
||||
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<ng-container matColumnDef="contractPrice">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Contract</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.contractPrice | currency : 'INR'
|
||||
row.contractPrice | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<ng-container matColumnDef="purchasePrice">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Purchase</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.purchasePrice | currency : 'INR'
|
||||
row.purchasePrice | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@ export class NonContractPurchaseComponent implements OnInit {
|
||||
dataSource: NonContractPurchaseDatasource = new NonContractPurchaseDatasource(this.info);
|
||||
displayedColumns = ['date', 'vendor', 'product', 'contractPrice', 'purchasePrice'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router) {}
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data.subscribe((value) => {
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'NonContractPurchaseService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class NonContractPurchaseService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
nonContractPurchase(): Observable<NonContractPurchase[]> {
|
||||
return this.http
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-hint *ngIf="accBal">
|
||||
Balance as on Date: <strong>{{ accBal.date | currency : 'INR' | accounting }}</strong> /
|
||||
Final balance: <strong>{{ accBal.total | currency : 'INR' | accounting }}</strong>
|
||||
Balance as on Date: <strong>{{ accBal.date | currency: 'INR' | accounting }}</strong> /
|
||||
Final balance: <strong>{{ accBal.total | currency: 'INR' | accounting }}</strong>
|
||||
</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-autocomplete
|
||||
|
||||
@@ -57,8 +57,8 @@
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-hint *ngIf="accBal">
|
||||
Balance as on Date: <strong>{{ accBal.date | currency : 'INR' | accounting }}</strong> /
|
||||
Final balance: <strong>{{ accBal.total | currency : 'INR' | accounting }}</strong>
|
||||
Balance as on Date: <strong>{{ accBal.date | currency: 'INR' | accounting }}</strong> /
|
||||
Final balance: <strong>{{ accBal.total | currency: 'INR' | accounting }}</strong>
|
||||
</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-autocomplete
|
||||
@@ -92,7 +92,7 @@
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.amount | currency : 'INR'
|
||||
row.amount | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -12,7 +12,10 @@ const serviceName = 'PeriodService';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class PeriodService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
get(id: string | null): Observable<Period> {
|
||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||
|
||||
@@ -13,7 +13,10 @@ const serviceName = 'ProductGroupService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ProductGroupService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
get(id: string | null): Observable<ProductGroup> {
|
||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||
|
||||
@@ -99,10 +99,10 @@
|
||||
>Debit Quantity</mat-header-cell
|
||||
>
|
||||
<mat-cell *matCellDef="let row" class="right"
|
||||
>{{ row.debitQuantity | number : '1.2-2' }} {{ row.debitUnit }}</mat-cell
|
||||
>{{ row.debitQuantity | number: '1.2-2' }} {{ row.debitUnit }}</mat-cell
|
||||
>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
debitQuantity | number : '1.2-2'
|
||||
debitQuantity | number: '1.2-2'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -110,10 +110,10 @@
|
||||
<ng-container matColumnDef="debitAmount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.debitAmount | currency : 'INR'
|
||||
row.debitAmount | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
debitAmount | currency : 'INR'
|
||||
debitAmount | currency: 'INR'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -121,10 +121,10 @@
|
||||
<ng-container matColumnDef="creditQuantity">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Credit</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right"
|
||||
>{{ row.creditQuantity | number : '1.2-2' }} {{ row.creditUnit }}</mat-cell
|
||||
>{{ row.creditQuantity | number: '1.2-2' }} {{ row.creditUnit }}</mat-cell
|
||||
>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
creditQuantity | number : '1.2-2'
|
||||
creditQuantity | number: '1.2-2'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -132,10 +132,10 @@
|
||||
<ng-container matColumnDef="creditAmount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Credit</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.creditAmount | currency : 'INR'
|
||||
row.creditAmount | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
creditAmount | currency : 'INR'
|
||||
creditAmount | currency: 'INR'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -143,10 +143,10 @@
|
||||
<ng-container matColumnDef="runningQuantity">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Running</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.runningQuantity | number : '1.2-2'
|
||||
row.runningQuantity | number: '1.2-2'
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
runningQuantity | number : '1.2-2'
|
||||
runningQuantity | number: '1.2-2'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -154,10 +154,10 @@
|
||||
<ng-container matColumnDef="runningAmount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Running</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.runningAmount | currency : 'INR'
|
||||
row.runningAmount | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
runningAmount | currency : 'INR'
|
||||
runningAmount | currency: 'INR'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'ProductLedgerService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ProductLedgerService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(
|
||||
id: string | null,
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<ng-container matColumnDef="costPrice">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Cost Price</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.costPrice | currency : 'INR'
|
||||
row.costPrice | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<ng-container matColumnDef="salePrice">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Sale Price</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.salePrice | currency : 'INR'
|
||||
row.salePrice | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<mat-cell *matCellDef="let row">
|
||||
<ul>
|
||||
<li *ngFor="let sku of row.skus">
|
||||
{{ sku.costPrice | currency : 'INR' }}
|
||||
{{ sku.costPrice | currency: 'INR' }}
|
||||
</li>
|
||||
</ul>
|
||||
</mat-cell>
|
||||
@@ -55,7 +55,7 @@
|
||||
<mat-cell *matCellDef="let row">
|
||||
<ul>
|
||||
<li *ngFor="let sku of row.skus">
|
||||
{{ sku.productYield | percent : '1.2-2' }}
|
||||
{{ sku.productYield | percent: '1.2-2' }}
|
||||
</li>
|
||||
</ul>
|
||||
</mat-cell>
|
||||
|
||||
@@ -32,7 +32,10 @@ export class ProductListComponent implements OnInit, AfterViewInit {
|
||||
|
||||
private _showExtended = true;
|
||||
|
||||
constructor(private route: ActivatedRoute, private toCsv: ToCsvService) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private toCsv: ToCsvService,
|
||||
) {
|
||||
this.showExtended = true;
|
||||
this.form = new FormGroup({
|
||||
filter: new FormControl<string>('', { nonNullable: true }),
|
||||
|
||||
@@ -12,7 +12,10 @@ const serviceName = 'ProductService';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ProductService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
get(id: string | null): Observable<Product> {
|
||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||
|
||||
@@ -52,18 +52,18 @@
|
||||
<!-- Amount Column -->
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.amount | currency : 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.amount | currency: 'INR' }}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">
|
||||
{{ info.footer.amount | currency : 'INR' }}
|
||||
{{ info.footer.amount | currency: 'INR' }}
|
||||
</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Total Column -->
|
||||
<ng-container matColumnDef="total">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Total</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.total | currency : 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.total | currency: 'INR' }}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">
|
||||
{{ info.footer.total | currency : 'INR' }}
|
||||
{{ info.footer.total | currency: 'INR' }}
|
||||
</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -27,7 +27,10 @@ export class ProfitLossComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['group', 'name', 'amount', 'total'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
) {
|
||||
this.form = new FormGroup({
|
||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'ProfitLossService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ProfitLossService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(startDate: string | null, finishDate: string | null): Observable<ProfitLoss> {
|
||||
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
||||
|
||||
@@ -59,34 +59,34 @@
|
||||
<ng-container matColumnDef="quantity">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.quantity | number : '1.2-2'
|
||||
row.quantity | number: '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Rate Column -->
|
||||
<ng-container matColumnDef="rate">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Rate</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency : 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency: 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Tax Column -->
|
||||
<ng-container matColumnDef="tax">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Tax</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.tax | percent : '1.2-2' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.tax | percent: '1.2-2' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Discount Column -->
|
||||
<ng-container matColumnDef="discount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Discount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.discount | percent : '1.2-2'
|
||||
row.discount | percent: '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Amount Column -->
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.amount | currency : 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.amount | currency: 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
|
||||
@@ -36,7 +36,10 @@ export class PurchaseEntriesComponent implements OnInit {
|
||||
'amount',
|
||||
];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
) {
|
||||
this.form = new FormGroup({
|
||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'PurchaseEntriesService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class PurchaseEntriesService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(startDate: string | null, finishDate: string | null): Observable<PurchaseEntries> {
|
||||
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-hint *ngIf="accBal">
|
||||
Balance as on Date: <strong>{{ accBal.date | currency : 'INR' | accounting }}</strong> /
|
||||
Final balance: <strong>{{ accBal.total | currency : 'INR' | accounting }}</strong>
|
||||
Balance as on Date: <strong>{{ accBal.date | currency: 'INR' | accounting }}</strong> /
|
||||
Final balance: <strong>{{ accBal.total | currency: 'INR' | accounting }}</strong>
|
||||
</mat-hint>
|
||||
<mat-autocomplete
|
||||
#autoA="matAutocomplete"
|
||||
@@ -105,27 +105,27 @@
|
||||
<ng-container matColumnDef="quantity">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.quantity | number : '1.2-2'
|
||||
row.quantity | number: '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Rate Column -->
|
||||
<ng-container matColumnDef="rate">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Rate</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency : 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency: 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Tax Column -->
|
||||
<ng-container matColumnDef="tax">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Tax</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.tax | percent : '1.2-2' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.tax | percent: '1.2-2' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Discount Column -->
|
||||
<ng-container matColumnDef="discount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Discount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.discount | percent : '1.2-2'
|
||||
row.discount | percent: '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.amount | currency : 'INR'
|
||||
row.amount | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-hint *ngIf="accBal">
|
||||
Balance as on Date: <strong>{{ accBal.date | currency : 'INR' | accounting }}</strong> /
|
||||
Final balance: <strong>{{ accBal.total | currency : 'INR' | accounting }}</strong>
|
||||
Balance as on Date: <strong>{{ accBal.date | currency: 'INR' | accounting }}</strong> /
|
||||
Final balance: <strong>{{ accBal.total | currency: 'INR' | accounting }}</strong>
|
||||
</mat-hint>
|
||||
<mat-autocomplete
|
||||
#autoA="matAutocomplete"
|
||||
@@ -117,27 +117,27 @@
|
||||
<ng-container matColumnDef="quantity">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.quantity | number : '1.2-2'
|
||||
row.quantity | number: '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Rate Column -->
|
||||
<ng-container matColumnDef="rate">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Rate</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency : 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency: 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Tax Column -->
|
||||
<ng-container matColumnDef="tax">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Tax</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.tax | percent : '1.2-2' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.tax | percent: '1.2-2' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Discount Column -->
|
||||
<ng-container matColumnDef="discount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Discount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.discount | percent : '1.2-2'
|
||||
row.discount | percent: '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.amount | currency : 'INR'
|
||||
row.amount | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -54,28 +54,28 @@
|
||||
<ng-container matColumnDef="quantity">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.quantity | number : '1.2-2'
|
||||
row.quantity | number: '1.2-2'
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">
|
||||
{{ info.footer.quantity | number : '1.2-2' }}
|
||||
{{ info.footer.quantity | number: '1.2-2' }}
|
||||
</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Rate Column -->
|
||||
<ng-container matColumnDef="rate">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Rate</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency : 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency: 'INR' }}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">
|
||||
{{ info.footer.rate | currency : 'INR' }}
|
||||
{{ info.footer.rate | currency: 'INR' }}
|
||||
</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Amount Column -->
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.amount | currency : 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.amount | currency: 'INR' }}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">
|
||||
{{ info.footer.amount | currency : 'INR' }}
|
||||
{{ info.footer.amount | currency: 'INR' }}
|
||||
</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -28,7 +28,10 @@ export class PurchasesComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['product', 'quantity', 'rate', 'amount'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
) {
|
||||
this.form = new FormGroup({
|
||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'PurchasesService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class PurchasesService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(startDate: string | null, finishDate: string | null): Observable<Purchases> {
|
||||
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
||||
|
||||
+1
-3
@@ -106,9 +106,7 @@
|
||||
<!-- Price Column -->
|
||||
<ng-container matColumnDef="price">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Price</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.price | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.price | currency: 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Action Column -->
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<mat-cell *matCellDef="let row">
|
||||
<ul>
|
||||
<li *ngFor="let item of row.items">
|
||||
{{ item.sku.name }} @ {{ item.price | currency : 'INR' }}
|
||||
{{ item.sku.name }} @ {{ item.price | currency: 'INR' }}
|
||||
</li>
|
||||
</ul>
|
||||
</mat-cell>
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'RateContractService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class RateContractService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
get(id: string | null): Observable<RateContract> {
|
||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||
|
||||
@@ -59,27 +59,27 @@
|
||||
<!-- Issue Column -->
|
||||
<ng-container matColumnDef="issue">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Issue</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.issue | currency : 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.issue | currency: 'INR' }}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
info.footer?.issue | currency : 'INR'
|
||||
info.footer?.issue | currency: 'INR'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Sale Column -->
|
||||
<ng-container matColumnDef="sale">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Sale</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.sale | currency : 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.sale | currency: 'INR' }}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
info.footer?.sale | currency : 'INR'
|
||||
info.footer?.sale | currency: 'INR'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Rmc Column -->
|
||||
<ng-container matColumnDef="rmc">
|
||||
<mat-header-cell *matHeaderCellDef class="right">RMC</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rmc | percent : '1.2-2' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rmc | percent: '1.2-2' }}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
info.footer?.rmc | percent : '1.2-2'
|
||||
info.footer?.rmc | percent: '1.2-2'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<ng-container matColumnDef="quantity">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Quantity</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.quantity | number : '1.2-2'
|
||||
row.quantity | number: '1.2-2'
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef></mat-footer-cell>
|
||||
</ng-container>
|
||||
@@ -102,14 +102,14 @@
|
||||
<!-- Net Column -->
|
||||
<ng-container matColumnDef="net">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Net</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.net | currency : 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.net | currency: 'INR' }}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef></mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Gross Column -->
|
||||
<ng-container matColumnDef="gross">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Gross</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.gross | currency : 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.gross | currency: 'INR' }}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef></mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -36,7 +36,11 @@ export class RawMaterialCostComponent implements OnInit {
|
||||
columnsNoId = ['name', 'issue', 'sale', 'rmc'];
|
||||
columnsId = ['name', 'group', 'quantity', 'net', 'gross'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router, private toCsv: ToCsvService) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private toCsv: ToCsvService,
|
||||
) {
|
||||
this.form = new FormGroup({
|
||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'RawMaterialCostService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class RawMaterialCostService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(
|
||||
id: string | null,
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-hint *ngIf="accBal">
|
||||
Balance as on Date: <strong>{{ accBal.date | currency : 'INR' | accounting }}</strong> /
|
||||
Final balance: <strong>{{ accBal.total | currency : 'INR' | accounting }}</strong>
|
||||
Balance as on Date: <strong>{{ accBal.date | currency: 'INR' | accounting }}</strong> /
|
||||
Final balance: <strong>{{ accBal.total | currency: 'INR' | accounting }}</strong>
|
||||
</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-autocomplete
|
||||
|
||||
@@ -57,8 +57,8 @@
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-hint *ngIf="accBal">
|
||||
Balance as on Date: <strong>{{ accBal.date | currency : 'INR' | accounting }}</strong> /
|
||||
Final balance: <strong>{{ accBal.total | currency : 'INR' | accounting }}</strong>
|
||||
Balance as on Date: <strong>{{ accBal.date | currency: 'INR' | accounting }}</strong> /
|
||||
Final balance: <strong>{{ accBal.total | currency: 'INR' | accounting }}</strong>
|
||||
</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-autocomplete
|
||||
@@ -92,7 +92,7 @@
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.amount | currency : 'INR'
|
||||
row.amount | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'RecipeTemplateService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class RecipeTemplateService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
get(id: string | null): Observable<RecipeTemplate> {
|
||||
const getUrl: string = id === null ? url : `${url}/${id}`;
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
<ng-container matColumnDef="quantity">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right"
|
||||
>{{ row.quantity | number : '1.2-2' }} {{ row.product.fractionUnits }}</mat-cell
|
||||
>{{ row.quantity | number: '1.2-2' }} {{ row.product.fractionUnits }}</mat-cell
|
||||
>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -35,7 +35,10 @@ export class RecipeListComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['name', 'yield', 'date', 'source'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
) {
|
||||
this.form = new FormGroup({
|
||||
period: new FormControl(new Period(), { nonNullable: true }),
|
||||
productGroup: new FormControl<ProductGroup | string | null>(null),
|
||||
|
||||
@@ -12,7 +12,10 @@ const serviceName = 'RecipeService';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class RecipeService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
get(id: string | null): Observable<Recipe> {
|
||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||
|
||||
@@ -11,7 +11,11 @@ import { Role } from '../role';
|
||||
const compare = (a: string | number, b: string | number, isAsc: boolean) =>
|
||||
(a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
||||
export class RoleListDatasource extends DataSource<Role> {
|
||||
constructor(public data: Role[], private paginator?: MatPaginator, private sort?: MatSort) {
|
||||
constructor(
|
||||
public data: Role[],
|
||||
private paginator?: MatPaginator,
|
||||
private sort?: MatSort,
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'RoleService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class RoleService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
get(id: string | null): Observable<Role> {
|
||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||
|
||||
@@ -11,7 +11,10 @@ const serviceName = 'SettingsService';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class SettingsService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
getLockInformation(): Observable<[LockInfo]> {
|
||||
const url = '/api/lock-information';
|
||||
|
||||
@@ -13,7 +13,10 @@ const serviceName = 'VoucherTypeService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class VoucherTypeService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(): Observable<AccountType[]> {
|
||||
return this.http
|
||||
|
||||
@@ -57,31 +57,27 @@
|
||||
<!-- Opening Column -->
|
||||
<ng-container matColumnDef="opening">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Opening</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.opening | number : '1.2-2'
|
||||
}}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.opening | number: '1.2-2' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Purchaase Column -->
|
||||
<ng-container matColumnDef="purchase">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Purchase</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.purchase | number : '1.2-2'
|
||||
row.purchase | number: '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Issue Column -->
|
||||
<ng-container matColumnDef="issue">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Issue</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.issue | number : '1.2-2' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.issue | number: '1.2-2' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Closing Column -->
|
||||
<ng-container matColumnDef="closing">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Closing</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.closing | number : '1.2-2'
|
||||
}}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.closing | number: '1.2-2' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
|
||||
@@ -27,7 +27,10 @@ export class StockMovementComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['group', 'name', 'opening', 'purchase', 'issue', 'closing'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
) {
|
||||
this.form = new FormGroup({
|
||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'StockMovementService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class StockMovementService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(startDate: string | null, finishDate: string | null): Observable<StockMovement> {
|
||||
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<ng-container matColumnDef="debit">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Debit</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.debit | currency : 'INR' | accounting
|
||||
row.debit | currency: 'INR' | accounting
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<ng-container matColumnDef="credit">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Credit</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.credit | currency : 'INR' | accounting
|
||||
row.credit | currency: 'INR' | accounting
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -25,7 +25,10 @@ export class TrialBalanceComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['type', 'name', 'debit', 'credit'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
) {
|
||||
this.form = new FormGroup({
|
||||
date: new FormControl(new Date(), { nonNullable: true }),
|
||||
});
|
||||
|
||||
@@ -14,7 +14,10 @@ const serviceName = 'TrialBalanceService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class TrialBalanceService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
list(date: string | null): Observable<TrialBalance> {
|
||||
const listUrl = date === null ? url : `${url}/${date}`;
|
||||
|
||||
@@ -12,7 +12,11 @@ const compare = (a: string | number, b: string | number, isAsc: boolean) =>
|
||||
(a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
||||
|
||||
export class UserListDataSource extends DataSource<User> {
|
||||
constructor(public data: User[], private paginator?: MatPaginator, private sort?: MatSort) {
|
||||
constructor(
|
||||
public data: User[],
|
||||
private paginator?: MatPaginator,
|
||||
private sort?: MatSort,
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,10 @@ const serviceName = 'UserService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class UserService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
get(id: string | null): Observable<User> {
|
||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||
|
||||
Reference in new issue
Block a user