Chore: Upgraded to Angular v17 and all the refactoring for that

Chore: Updated all dependencies in overlord
This commit is contained in:
tanshu committed 2024-04-30 12:48:11 +05:30
1 parent 43cb697737
commit 34b4227148
89 files changed
+776 -613

No files matched your search

+7
View File
@@ -11,6 +11,13 @@
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http://localhost:9876/debug.html"
},
{
"name": "Python: FastAPI",
"type": "python",
@@ -5,6 +5,7 @@ Revises: a1372ed99c45
Create Date: 2023-04-14 07:50:22.110724
"""
import sqlalchemy as sa
from alembic import op
@@ -5,6 +5,7 @@ Revises: 0bf3d70ee7de
Create Date: 2022-10-31 06:23:13.091598
"""
from hashlib import md5
import sqlalchemy as sa
@@ -5,6 +5,7 @@ Revises: ba0fff092981
Create Date: 2023-10-16 16:26:45.922654
"""
import sqlalchemy as sa
from alembic import op
@@ -5,6 +5,7 @@ Revises: 12262aadbc08
Create Date: 2023-08-07 13:01:05.401492
"""
from alembic import op
@@ -5,6 +5,7 @@ Revises: 2438cd581f00
Create Date: 2023-12-28 12:45:01.275322
"""
import sqlalchemy as sa
from alembic import op
@@ -5,6 +5,7 @@ Revises: 185c674cc392
Create Date: 2023-03-31 05:03:40.408240
"""
import sqlalchemy as sa
from sqlalchemy import func
@@ -5,6 +5,7 @@ Revises: 48af31eb6f3f
Create Date: 2023-08-11 18:12:51.293741
"""
import sqlalchemy as sa
from alembic import op
+2 -2
View File
@@ -245,7 +245,7 @@ def delete_with_data(account: Account, db: Session) -> None:
assert acc_jnl is not None
if sus_jnl is None:
acc_jnl.account = suspense_account
voucher.narration += f"\nSuspense \u20B9{acc_jnl.amount:,.2f} is {account.name}"
voucher.narration += f"\nSuspense \u20b9{acc_jnl.amount:,.2f} is {account.name}"
else:
amount = (sus_jnl.debit * sus_jnl.amount) + (acc_jnl.debit * acc_jnl.amount)
db.delete(acc_jnl)
@@ -254,7 +254,7 @@ def delete_with_data(account: Account, db: Session) -> None:
else:
sus_jnl.amount = abs(amount)
sus_jnl.debit = -1 if amount < 0 else 1
voucher.narration += f"\nDeleted \u20B9{acc_jnl.amount * acc_jnl.debit:,.2f} of {account.name}"
voucher.narration += f"\nDeleted \u20b9{acc_jnl.amount * acc_jnl.debit:,.2f} of {account.name}"
if voucher.voucher_type in (
VoucherType.PAYMENT,
VoucherType.RECEIPT,
+2 -2
View File
@@ -232,7 +232,7 @@ def delete_with_data(employee: Employee, db: Session) -> None:
assert acc_jnl is not None
if sus_jnl is None:
acc_jnl.account = suspense_account
voucher.narration += f"\nSuspense \u20B9 {acc_jnl.amount:,.2f} is {employee.name}"
voucher.narration += f"\nSuspense \u20b9 {acc_jnl.amount:,.2f} is {employee.name}"
else:
amount = (sus_jnl.debit * sus_jnl.amount) + (acc_jnl.debit * acc_jnl.amount)
if acc_jnl.employee_benefit is not None:
@@ -243,7 +243,7 @@ def delete_with_data(employee: Employee, db: Session) -> None:
else:
sus_jnl.amount = abs(amount)
sus_jnl.debit = -1 if amount < 0 else 1
voucher.narration += f"\nDeleted \u20B9 {acc_jnl.amount * acc_jnl.debit:,.2f} of {employee.name}"
voucher.narration += f"\nDeleted \u20b9 {acc_jnl.amount * acc_jnl.debit:,.2f} of {employee.name}"
if voucher.voucher_type in (
VoucherType.PAYMENT,
VoucherType.RECEIPT,
+1 -1
View File
@@ -95,7 +95,7 @@ def save_starred(date_: date, db: Session) -> list[uuid.UUID]:
for other in others:
if voucher.voucher_type != VoucherType.OPENING_ACCOUNTS:
voucher.narration += f"\nSuspense \u20B9{other.amount:,.2f} is {other.account.name}"
voucher.narration += f"\nSuspense \u20b9{other.amount:,.2f} is {other.account.name}"
if other.employee_benefit:
db.delete(other.employee_benefit)
if other.incentive:
+1 -1
View File
@@ -39,7 +39,7 @@ ARG INSTALL_DEV=false
RUN bash -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --only main ; fi"
COPY --from=builder /app/brewman /app
COPY --from=builder /app/frontend /app/frontend
COPY --from=builder /app/frontend/browser /app/frontend
ENV PYTHONPATH=/app
EXPOSE 80
+7 -10
View File
@@ -4,16 +4,14 @@
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
# Node
/node_modules
npm-debug.log
yarn-error.log
package-lock.json
# profiling files
chrome-profiler-events*.json
# IDEs and editors
/.idea
.project
@@ -23,7 +21,7 @@ chrome-profiler-events*.json
.settings/
*.sublime-workspace
# IDE - VSCode
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
@@ -31,14 +29,13 @@ chrome-profiler-events*.json
!.vscode/extensions.json
.history/*
# misc
# Miscellaneous
/.angular/cache
/.sass-cache
/.nx/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
+15 -20
View File
@@ -6,6 +6,9 @@
"overlord": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
},
"@schematics/angular:application": {
"strict": true
}
@@ -15,11 +18,12 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "../frontend",
"outputPath": {
"base": "../frontend"
},
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": [
"zone.js"
],
@@ -32,7 +36,8 @@
"@angular/material/prebuilt-themes/indigo-pink.css",
"src/styles.css"
],
"scripts": []
"scripts": [],
"browser": "src/main.ts"
},
"configurations": {
"production": {
@@ -40,7 +45,7 @@
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
"maximumError": "1500kb"
},
{
"type": "anyComponentStyle",
@@ -57,9 +62,7 @@
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
@@ -71,10 +74,10 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "overlord:build:production"
"buildTarget": "overlord:build:production"
},
"development": {
"browserTarget": "overlord:build:development"
"buildTarget": "overlord:build:development"
}
},
"options": {
@@ -85,18 +88,18 @@
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "overlord:build"
"buildTarget": "overlord:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": [
"zone.js",
"zone.js/testing"
],
"tsConfig": "tsconfig.spec.json",
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
@@ -124,14 +127,6 @@
"schematicCollections": [
"@angular-eslint/schematics"
],
"analytics": "0309c8d2-99a2-4dd3-b63e-9a0a43611460"
},
"schematics": {
"@angular-eslint/schematics:application": {
"setParserOptionsProject": true
},
"@angular-eslint/schematics:library": {
"setParserOptionsProject": true
}
"analytics": false
}
}
+39 -39
View File
@@ -14,47 +14,47 @@
},
"private": true,
"dependencies": {
"@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",
"@angular/animations": "^17.3.6",
"@angular/cdk": "^17.3.6",
"@angular/common": "^17.3.6",
"@angular/compiler": "^17.3.6",
"@angular/core": "^17.3.6",
"@angular/forms": "^17.3.6",
"@angular/material": "^17.3.6",
"@angular/material-moment-adapter": "^17.3.6",
"@angular/platform-browser": "^17.3.6",
"@angular/platform-browser-dynamic": "^17.3.6",
"@angular/router": "^17.3.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": "^15.0.0",
"mathjs": "^11.9.0",
"moment": "^2.29.4",
"@types/mousetrap": "1.6.15",
"angular2-hotkeys": "^16.0.1",
"mathjs": "^12.4.2",
"moment": "^2.30.1",
"rxjs": "~7.8.0",
"tslib": "^2.6.0",
"zone.js": "~0.13.1"
"zone.js": "~0.14.4"
},
"devDependencies": {
"@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.39.0",
"eslint-config-prettier": "^8.7.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-unused-imports": "^3.0.0",
"husky": "^8.0.2",
"@angular-devkit/build-angular": "^17.3.6",
"@angular-eslint/builder": "^17.3.0",
"@angular-eslint/eslint-plugin": "^17.3.0",
"@angular-eslint/eslint-plugin-template": "^17.3.0",
"@angular-eslint/schematics": "^17.3.0",
"@angular-eslint/template-parser": "^17.3.0",
"@angular/cli": "^17.3.6",
"@angular/compiler-cli": "^17.3.6",
"@angular/language-service": "^17.3.6",
"@types/jasmine": "~5.1.4",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-unused-imports": "^3.1.0",
"husky": "^9.0.11",
"jasmine-core": "~5.1.0",
"jasmine-spec-reporter": "7.0.0",
"karma": "^6.4.2",
@@ -62,12 +62,12 @@
"karma-coverage": "~2.2.1",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "^2.1.0",
"lint-staged": "^13.2.3",
"postcss": "^8.4.27",
"prettier": "^3.0.0",
"lint-staged": "^15.2.2",
"postcss": "^8.4.38",
"prettier": "^3.2.5",
"standard-version": "^9.5.0",
"tailwindcss": "^3.3.3",
"typescript": "~5.1.6"
"tailwindcss": "^3.4.3",
"typescript": "~5.4.5"
},
"husky": {
"hooks": {
@@ -25,9 +25,11 @@
<mat-form-field class="flex-auto">
<mat-label>Account Type</mat-label>
<mat-select formControlName="type">
<mat-option *ngFor="let at of accountTypes" [value]="at.id">
{{ at.name }}
</mat-option>
@for (at of accountTypes; track at) {
<mat-option [value]="at.id">
{{ at.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
</div>
@@ -39,9 +41,11 @@
<mat-form-field class="flex-auto">
<mat-label>Cost Centre</mat-label>
<mat-select formControlName="costCentre">
<mat-option *ngFor="let cs of costCentres" [value]="cs.id">
{{ cs.name }}
</mat-option>
@for (cs of costCentres; track cs) {
<mat-option [value]="cs.id">
{{ cs.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
</div>
@@ -49,6 +53,8 @@
</mat-card-content>
<mat-card-actions>
<button mat-raised-button color="primary" (click)="save()" class="mr-5">Save</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="!!item.id">Delete</button>
@if (!!item.id) {
<button mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
}
</mat-card-actions>
</mat-card>
@@ -23,7 +23,9 @@
<mat-header-cell *matHeaderCellDef mat-sort-header>Name</mat-header-cell>
<mat-cell *matCellDef="let row">
<a [routerLink]="['/accounts', row.id]">
<mat-icon matSuffix *ngIf="row.isStarred" class="gold">star </mat-icon>
@if (row.isStarred) {
<mat-icon matSuffix class="gold">star </mat-icon>
}
{{ row.name }}
</a>
</mat-cell>
@@ -43,9 +43,11 @@
<mat-header-cell *matHeaderCellDef>Status</mat-header-cell>
<mat-cell *matCellDef="let row; let i = index" [formGroupName]="i" class="flex-auto">
<mat-select formControlName="attendanceType" name="attendanceType">
<mat-option *ngFor="let at of attendanceTypes" [value]="at.id">
{{ at.name }}
</mat-option>
@for (at of attendanceTypes; track at) {
<mat-option [value]="at.id">
{{ at.name }}
</mat-option>
}
</mat-select>
</mat-cell>
</ng-container>
@@ -55,19 +57,20 @@
<mat-header-cell *matHeaderCellDef>Prints</mat-header-cell>
<mat-cell *matCellDef="let row; let i = index" class="no-bg">
{{ row.prints }}
<mat-icon class="no-bg" *ngIf="!form.controls.attendances.controls[i].controls.attendanceType.pristine"
>new_releases</mat-icon
>
@if (!form.controls.attendances.controls[i].controls.attendanceType.pristine) {
<mat-icon class="no-bg">new_releases</mat-icon>
}
<mat-chip-set class="no-bg">
<mat-chip-option
*ngIf="row.hoursWorked.length"
class="no-bg"
selected
selectable="false"
[color]="row.fullDay === true ? 'primary' : 'warn'"
>
{{ row.hoursWorked }}
</mat-chip-option>
@if (row.hoursWorked.length) {
<mat-chip-option
class="no-bg"
selected
selectable="false"
[color]="row.fullDay === true ? 'primary' : 'warn'"
>
{{ row.hoursWorked }}
</mat-chip-option>
}
</mat-chip-set>
</mat-cell>
</ng-container>
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { FormArray, FormControl, FormGroup } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { BehaviorSubject } from 'rxjs';
import { AuthService } from '../auth/auth.service';
@@ -18,13 +18,15 @@
</mat-form-field>
</div>
<mat-divider></mat-divider>
<h2 *ngIf="showOtp">Client ID: {{ clientId }}</h2>
<div class="flex flex-row justify-around content-start items-start" *ngIf="showOtp">
<mat-form-field class="flex-auto">
<mat-label>Otp</mat-label>
<input matInput formControlName="otp" />
</mat-form-field>
</div>
@if (showOtp) {
<h2>Client ID: {{ clientId }}</h2>
<div class="flex flex-row justify-around content-start items-start">
<mat-form-field class="flex-auto">
<mat-label>Otp</mat-label>
<input matInput formControlName="otp" />
</mat-form-field>
</div>
}
</form>
</mat-card-content>
<mat-card-actions>
@@ -3,7 +3,7 @@ import { FormControl, FormGroup } from '@angular/forms';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { BalanceSheet } from './balance-sheet';
import { BalanceSheetDataSource } from './balance-sheet-datasource';
@@ -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 }} &#64; {{ row.price | currency: 'INR' }} is showing
{{ row.showing }} instead of {{ row.actual }}
</mat-cell>
</ng-container>
@@ -18,10 +18,12 @@
<mat-header-cell *matHeaderCellDef>Details</mat-header-cell>
<mat-cell *matCellDef="let row">
<ul>
<li *ngFor="let detail of row.details">
<a [routerLink]="detail.url">{{ detail.type }}</a> on {{ detail.date }} of {{ detail.quantity }} @
{{ detail.price | currency: 'INR' }}
</li>
@for (detail of row.details; track detail) {
<li>
<a [routerLink]="detail.url">{{ detail.type }}</a> on {{ detail.date }} of {{ detail.quantity }} &#64;
{{ detail.price | currency: 'INR' }}
</li>
}
</ul>
</mat-cell>
</ng-container>
@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { CashFlow } from './cash-flow';
import { CashFlowDataSource } from './cash-flow-datasource';
@@ -40,7 +40,7 @@
<ng-container matColumnDef="last">
<mat-header-cell *matHeaderCellDef mat-sort-header>Last Login</mat-header-cell>
<mat-cell *matCellDef="let row"
>{{ row.lastUser }} @ {{ row.lastDate ? (row.lastDate | localTime) : 'Never' }}</mat-cell
>{{ row.lastUser }} &#64; {{ row.lastDate ? (row.lastDate | localTime) : 'Never' }}</mat-cell
>
</ng-container>
@@ -2,9 +2,11 @@
<mat-card-header>
<mat-card-title-group>
<mat-card-title>Closing Stock</mat-card-title>
<button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
<mat-icon>save_alt</mat-icon>
</button>
@if (dataSource.data.length) {
<button mat-icon-button (click)="exportCsv()">
<mat-icon>save_alt</mat-icon>
</button>
}
</mat-card-title-group>
</mat-card-header>
<mat-card-content>
@@ -13,9 +15,11 @@
<mat-form-field class="flex-auto basis-2/5 mr-5">
<mat-label>Department</mat-label>
<mat-select formControlName="costCentre" name="costCentre">
<mat-option *ngFor="let at of costCentres" [value]="at.id">
{{ at.name }}
</mat-option>
@for (at of costCentres; track at) {
<mat-option [value]="at.id">
{{ at.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field class="flex-auto basis-2/5 mr-5">
@@ -81,9 +85,11 @@
name="costCentre"
(selectionChange)="updateDepartment($event.value, row)"
>
<mat-option *ngFor="let at of costCentres" [value]="at.id">
{{ at.name }}
</mat-option>
@for (at of costCentres; track at) {
<mat-option [value]="at.id">
{{ at.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
</mat-cell>
@@ -111,16 +117,11 @@
</mat-card-content>
<mat-card-actions>
<button mat-raised-button color="primary" (click)="save()" [disabled]="form.pristine">Save</button>
<button
mat-raised-button
(click)="post()"
*ngIf="canDelete()"
[disabled]="info.posted || !auth.allowed('post-vouchers')"
>
{{ info.posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="canDelete()" [disabled]="!canSave()">
Delete
</button>
@if (canDelete()) {
<button mat-raised-button (click)="post()" [disabled]="info.posted || !auth.allowed('post-vouchers')">
{{ info.posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" [disabled]="!canSave()">Delete</button>
}
</mat-card-actions>
</mat-card>
@@ -5,7 +5,7 @@ import { MatPaginator } from '@angular/material/paginator';
import { MatSelectChange } from '@angular/material/select';
import { MatSort } from '@angular/material/sort';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { AuthService } from '../auth/auth.service';
import { CostCentre } from '../core/cost-centre';
@@ -69,13 +69,17 @@
<a mat-menu-item routerLink="/clients">Clients</a>
<a mat-menu-item routerLink="/settings">Settings</a>
</mat-menu>
<button mat-button [matMenuTriggerFor]="userMenu" *ngIf="(auth.currentUser | async)?.name as name">
<mat-icon>account_box</mat-icon>
{{ name }}
</button>
<a mat-button routerLink="/login" *ngIf="(auth.currentUser | async) === null">
<mat-icon>account_box</mat-icon>
Login</a
>
@if ((auth.currentUser | async)?.name; as name) {
<button mat-button [matMenuTriggerFor]="userMenu">
<mat-icon>account_box</mat-icon>
{{ name }}
</button>
}
@if ((auth.currentUser | async) === null) {
<a mat-button routerLink="/login">
<mat-icon>account_box</mat-icon>
Login</a
>
}
</mat-toolbar>
<div class="toolbar-fix"></div>
@@ -3,7 +3,7 @@ import { FormControl, FormGroup } from '@angular/forms';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { Daybook } from './daybook';
import { DaybookDataSource } from './daybook-datasource';
@@ -47,7 +47,9 @@
[displayWith]="displayFn"
(optionSelected)="selected($event)"
>
<mat-option *ngFor="let employee of employees | async" [value]="employee">{{ employee.name }}</mat-option>
@for (employee of employees | async; track employee) {
<mat-option [value]="employee">{{ employee.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<button mat-raised-button class="flex-auto basis-1/5" color="primary" (click)="show()">Show</button>
@@ -64,9 +66,11 @@
<mat-header-cell *matHeaderCellDef>Status</mat-header-cell>
<mat-cell *matCellDef="let row; let i = index" [formGroupName]="i" class="flex flex-auto">
<mat-select formControlName="attendanceType" name="attendanceType">
<mat-option *ngFor="let at of attendanceTypes" [value]="at.id">
{{ at.name }}
</mat-option>
@for (at of attendanceTypes; track at) {
<mat-option [value]="at.id">
{{ at.name }}
</mat-option>
}
</mat-select>
</mat-cell>
</ng-container>
@@ -76,19 +80,20 @@
<mat-header-cell *matHeaderCellDef>Prints</mat-header-cell>
<mat-cell *matCellDef="let row; let i = index" class="no-bg">
{{ row.prints }}
<mat-icon class="no-bg" *ngIf="!form.controls.attendances.controls[i].controls.attendanceType.pristine"
>new_releases</mat-icon
>
@if (!form.controls.attendances.controls[i].controls.attendanceType.pristine) {
<mat-icon class="no-bg">new_releases</mat-icon>
}
<mat-chip-set class="no-bg">
<mat-chip-option
*ngIf="row.hoursWorked.length"
class="no-bg"
selected
selectable="false"
[color]="row.fullDay === true ? 'primary' : 'warn'"
>
{{ row.hoursWorked }}
</mat-chip-option>
@if (row.hoursWorked.length) {
<mat-chip-option
class="no-bg"
selected
selectable="false"
[color]="row.fullDay === true ? 'primary' : 'warn'"
>
{{ row.hoursWorked }}
</mat-chip-option>
}
</mat-chip-set>
</mat-cell>
</ng-container>
@@ -3,7 +3,7 @@ import { FormArray, FormControl, FormGroup } from '@angular/forms';
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
@@ -29,7 +29,9 @@
[displayWith]="displayFn"
(optionSelected)="employeeSelected($event)"
>
<mat-option *ngFor="let employee of employees | async" [value]="employee">{{ employee.name }}</mat-option>
@for (employee of employees | async; track employee) {
<mat-option [value]="employee">{{ employee.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-[15%] mr-5">
@@ -117,21 +119,18 @@
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()">
{{ voucher.id ? 'Update' : 'Save' }}
</button>
<button
mat-raised-button
(click)="post()"
*ngIf="voucher.id"
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
>
{{ voucher.posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="voucher.id" [disabled]="!canSave()">
Delete
</button>
@if (voucher.id) {
<button mat-raised-button (click)="post()" [disabled]="voucher.posted || !auth.allowed('post-vouchers')">
{{ voucher.posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" [disabled]="!canSave()">Delete</button>
}
</mat-card-actions>
<mat-card-subtitle *ngIf="voucher.id">
Created on <strong>{{ voucher.creationDate | localTime }}</strong> and Last Edited on
<strong>{{ voucher.lastEditDate | localTime }}</strong> by <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
</mat-card-subtitle>
@if (voucher.id) {
<mat-card-subtitle>
Created on <strong>{{ voucher.creationDate | localTime }}</strong> and Last Edited on
<strong>{{ voucher.lastEditDate | localTime }}</strong> by <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
</mat-card-subtitle>
}
</mat-card>
@@ -3,7 +3,7 @@ import { FormControl, FormGroup } from '@angular/forms';
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
@@ -1,7 +1,7 @@
import { Component } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { MatDatepicker } from '@angular/material/datepicker';
import * as moment from 'moment';
import moment from 'moment';
import { Moment } from 'moment';
import { ToasterService } from '../core/toaster.service';
@@ -46,9 +46,11 @@
<mat-form-field class="flex-auto">
<mat-label>Cost Centre</mat-label>
<mat-select formControlName="costCentre" name="CostCentre">
<mat-option *ngFor="let cs of costCentres" [value]="cs.id">
{{ cs.name }}
</mat-option>
@for (cs of costCentres; track cs) {
<mat-option [value]="cs.id">
{{ cs.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
</div>
@@ -64,22 +66,26 @@
<mat-datepicker-toggle matSuffix [for]="joiningDate"></mat-datepicker-toggle>
<mat-datepicker #joiningDate></mat-datepicker>
</mat-form-field>
<mat-form-field *ngIf="!item.isActive" class="flex-auto">
<mat-label>Leaving Date</mat-label>
<input
matInput
[matDatepicker]="leavingDate"
(focus)="leavingDate.open()"
formControlName="leavingDate"
autocomplete="off"
/>
<mat-datepicker-toggle matSuffix [for]="leavingDate"></mat-datepicker-toggle>
<mat-datepicker #leavingDate></mat-datepicker>
</mat-form-field>
@if (!item.isActive) {
<mat-form-field class="flex-auto">
<mat-label>Leaving Date</mat-label>
<input
matInput
[matDatepicker]="leavingDate"
(focus)="leavingDate.open()"
formControlName="leavingDate"
autocomplete="off"
/>
<mat-datepicker-toggle matSuffix [for]="leavingDate"></mat-datepicker-toggle>
<mat-datepicker #leavingDate></mat-datepicker>
</mat-form-field>
}
</form>
</mat-card-content>
<mat-card-actions>
<button mat-raised-button color="primary" (click)="save()">Save</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="!!item.id">Delete</button>
@if (!!item.id) {
<button mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
}
</mat-card-actions>
</mat-card>
@@ -2,7 +2,7 @@ import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angula
import { FormControl, FormGroup } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { CostCentre } from '../../core/cost-centre';
import { ToasterService } from '../../core/toaster.service';
@@ -2,9 +2,11 @@
<mat-card-header>
<mat-card-title-group>
<mat-card-title>Employees</mat-card-title>
<button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
<mat-icon>save_alt</mat-icon>
</button>
@if (dataSource.data.length) {
<button mat-icon-button (click)="exportCsv()">
<mat-icon>save_alt</mat-icon>
</button>
}
<a mat-button [routerLink]="['/employees', 'new']">
<mat-icon>add_box</mat-icon>
Add
@@ -32,7 +34,9 @@
<mat-header-cell *matHeaderCellDef mat-sort-header>Name</mat-header-cell>
<mat-cell *matCellDef="let row">
<a [routerLink]="['/employees', row.id]">
<mat-icon matSuffix *ngIf="row.isStarred" class="gold">star </mat-icon>
@if (row.isStarred) {
<mat-icon matSuffix class="gold">star </mat-icon>
}
{{ row.name }}
</a>
</mat-cell>
@@ -64,7 +64,9 @@
<mat-header-cell *matHeaderCellDef>Debit</mat-header-cell>
<mat-cell *matCellDef="let row">
<ul>
<li *ngFor="let item of row.debitNames">{{ item }}</li>
@for (item of row.debitNames; track item) {
<li>{{ item }}</li>
}
</ul>
</mat-cell>
</ng-container>
@@ -74,7 +76,9 @@
<mat-header-cell *matHeaderCellDef>Credit</mat-header-cell>
<mat-cell *matCellDef="let row">
<ul>
<li *ngFor="let item of row.creditNames">{{ item }}</li>
@for (item of row.creditNames; track item) {
<li>{{ item }}</li>
}
</ul>
</mat-cell>
</ng-container>
@@ -4,7 +4,7 @@ import { MatPaginator } from '@angular/material/paginator';
import { MatRadioChange } from '@angular/material/radio';
import { MatSort, SortDirection } from '@angular/material/sort';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { EntriesDatasource } from './entries-datasource';
import { Report } from './report';
@@ -73,21 +73,18 @@
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()">
{{ voucher.id ? 'Update' : 'Save' }}
</button>
<button
mat-raised-button
(click)="post()"
*ngIf="voucher.id"
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
>
{{ voucher.posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="voucher.id" [disabled]="!canSave()">
Delete
</button>
@if (voucher.id) {
<button mat-raised-button (click)="post()" [disabled]="voucher.posted || !auth.allowed('post-vouchers')">
{{ voucher.posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" [disabled]="!canSave()">Delete</button>
}
</mat-card-actions>
<mat-card-subtitle *ngIf="voucher.id">
Created on <strong>{{ voucher.creationDate | localTime }}</strong> and Last Edited on
<strong>{{ voucher.lastEditDate | localTime }}</strong> by <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
</mat-card-subtitle>
@if (voucher.id) {
<mat-card-subtitle>
Created on <strong>{{ voucher.creationDate | localTime }}</strong> and Last Edited on
<strong>{{ voucher.lastEditDate | localTime }}</strong> by <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
</mat-card-subtitle>
}
</mat-card>
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { FormArray, FormControl, FormGroup } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { BehaviorSubject } from 'rxjs';
import { map } from 'rxjs/operators';
@@ -18,7 +18,9 @@
[displayWith]="displayFn"
(optionSelected)="batchSelected($event)"
>
<mat-option *ngFor="let batch of batches | async" [value]="batch">{{ batch.name }}</mat-option>
@for (batch of batches | async; track batch) {
<mat-option [value]="batch">{{ batch.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-1/3">
+25 -17
View File
@@ -20,16 +20,20 @@
</mat-form-field>
<mat-form-field class="flex-auto basis-[28%] mr-5">
<mat-select formControlName="source">
<mat-option *ngFor="let costCentre of costCentres" [value]="costCentre.id">
{{ costCentre.name }}
</mat-option>
@for (costCentre of costCentres; track costCentre) {
<mat-option [value]="costCentre.id">
{{ costCentre.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field class="flex-auto basis-[28%] mr-5">
<mat-select formControlName="destination">
<mat-option *ngFor="let costCentre of costCentres" [value]="costCentre.id">
{{ costCentre.name }}
</mat-option>
@for (costCentre of costCentres; track costCentre) {
<mat-option [value]="costCentre.id">
{{ costCentre.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field class="flex-auto basis-[16%]">
@@ -56,7 +60,9 @@
[displayWith]="displayFn"
(optionSelected)="batchSelected($event)"
>
<mat-option *ngFor="let batch of batches | async" [value]="batch">{{ batch.name }}</mat-option>
@for (batch of batches | async; track batch) {
<mat-option [value]="batch">{{ batch.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-1/4 mr-5">
@@ -123,17 +129,19 @@
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()" class="mr-5">
{{ voucher.id ? 'Update' : 'Save' }}
</button>
<button mat-raised-button color="warn" (click)="newVoucher()" *ngIf="voucher.id" class="mr-5">New Entry</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="voucher.id" [disabled]="!canSave()">
Delete
</button>
@if (voucher.id) {
<button mat-raised-button color="warn" (click)="newVoucher()" class="mr-5">New Entry</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" [disabled]="!canSave()">Delete</button>
}
<span class="fill-remaining-space"></span>
<span *ngIf="voucher.id" class="flex">
Created on&nbsp;<strong>{{ voucher.creationDate | localTime }}</strong
>&nbsp;and Last Edited on&nbsp; <strong>{{ voucher.lastEditDate | localTime }}</strong
>&nbsp;by&nbsp; <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
</span>
@if (voucher.id) {
<span class="flex">
Created on&nbsp;<strong>{{ voucher.creationDate | localTime }}</strong
>&nbsp;and Last Edited on&nbsp; <strong>{{ voucher.lastEditDate | localTime }}</strong
>&nbsp;by&nbsp; <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
</span>
}
</mat-card-actions>
<mat-card-header>
<mat-card-title>Other issues for the day</mat-card-title>
+1 -1
View File
@@ -5,7 +5,7 @@ import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import { Hotkey, HotkeysService } from 'angular2-hotkeys';
import { round } from 'mathjs';
import * as moment from 'moment';
import moment from 'moment';
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
import { debounceTime, distinctUntilChanged, map, switchMap } from 'rxjs/operators';
@@ -18,10 +18,12 @@
formControlName="account"
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>
</mat-hint>
@if (accBal) {
<mat-hint>
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
#auto="matAutocomplete"
@@ -29,7 +31,9 @@
[displayWith]="displayFn"
(optionSelected)="accountSelected($event)"
>
<mat-option *ngFor="let account of accounts | async" [value]="account">{{ account.name }}</mat-option>
@for (account of accounts | async; track account) {
<mat-option [value]="account">{{ account.name }}</mat-option>
}
</mat-autocomplete>
<mat-form-field class="flex-auto basis-1/4">
<mat-label>Amount</mat-label>
+36 -29
View File
@@ -46,10 +46,12 @@
formControlName="account"
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>
</mat-hint>
@if (accBal) {
<mat-hint>
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
#auto="matAutocomplete"
@@ -57,7 +59,9 @@
[displayWith]="displayFn"
(optionSelected)="accountSelected($event)"
>
<mat-option *ngFor="let account of accounts | async" [value]="account">{{ account.name }}</mat-option>
@for (account of accounts | async; track account) {
<mat-option [value]="account">{{ account.name }}</mat-option>
}
</mat-autocomplete>
<mat-form-field class="flex-auto mr-5 basis-1/6">
<mat-label>Amount</mat-label>
@@ -107,12 +111,14 @@
<textarea matInput matAutosizeMinRows="5" formControlName="narration"></textarea>
</mat-form-field>
<div class="flex flex-row justify-center items-stretch">
<div class="img-container" class="flex-auto mr-5 basis-1/5" *ngFor="let item of voucher.files">
<img [src]="item.thumbnail" (click)="zoomImage(item)" />
<button mat-icon-button class="overlay" (click)="deleteImage(item)">
<mat-icon>delete</mat-icon>
</button>
</div>
@for (item of voucher.files; track item) {
<div class="img-container" class="flex-auto mr-5 basis-1/5">
<img [src]="item.thumbnail" (click)="zoomImage(item)" />
<button mat-icon-button class="overlay" (click)="deleteImage(item)">
<mat-icon>delete</mat-icon>
</button>
</div>
}
<div class="img-container" class="flex flex-auto basis-1/5">
<label ng-href for="fileUp">
<img
@@ -135,24 +141,25 @@
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()" class="mr-5">
{{ voucher.id ? 'Update' : 'Save' }}
</button>
<button
mat-raised-button
(click)="post()"
*ngIf="voucher.id"
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
class="mr-5"
>
{{ voucher.posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="voucher.id" [disabled]="!canSave()">
Delete
</button>
@if (voucher.id) {
<button
mat-raised-button
(click)="post()"
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
class="mr-5"
>
{{ voucher.posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" [disabled]="!canSave()">Delete</button>
}
<span class="fill-remaining-space"></span>
<span *ngIf="voucher.id" class="flex">
Created on&nbsp;<strong>{{ voucher.creationDate | localTime }}</strong
>&nbsp;and Last Edited on&nbsp; <strong>{{ voucher.lastEditDate | localTime }}</strong
>&nbsp;by&nbsp; <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
</span>
@if (voucher.id) {
<span class="flex">
Created on&nbsp;<strong>{{ voucher.creationDate | localTime }}</strong
>&nbsp;and Last Edited on&nbsp; <strong>{{ voucher.lastEditDate | localTime }}</strong
>&nbsp;by&nbsp; <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
</span>
}
</mat-card-actions>
</mat-card>
@@ -5,7 +5,7 @@ import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import { Hotkey, HotkeysService } from 'angular2-hotkeys';
import { round } from 'mathjs';
import * as moment from 'moment';
import moment from 'moment';
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
@@ -2,9 +2,11 @@
<mat-card-header>
<mat-card-title-group>
<mat-card-title>Ledger</mat-card-title>
<button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
<mat-icon>save_alt</mat-icon>
</button>
@if (dataSource.data.length) {
<button mat-icon-button (click)="exportCsv()">
<mat-icon>save_alt</mat-icon>
</button>
}
</mat-card-title-group>
</mat-card-header>
<mat-card-content>
@@ -52,7 +54,9 @@
[displayWith]="displayFn"
(optionSelected)="selected($event)"
>
<mat-option *ngFor="let account of accounts | async" [value]="account">{{ account.name }}</mat-option>
@for (account of accounts | async; track account) {
<mat-option [value]="account">{{ account.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<button mat-raised-button class="flex-auto basis-1/5" color="primary" (click)="show()">Show</button>
+1 -1
View File
@@ -4,7 +4,7 @@ import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { Observable, of as observableOf } from 'rxjs';
import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
@@ -3,7 +3,7 @@ import { FormControl, FormGroup } from '@angular/forms';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { NetTransactions } from './net-transactions';
import { NetTransactionsDataSource } from './net-transactions-datasource';
@@ -12,10 +12,12 @@
formControlName="account"
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>
</mat-hint>
@if (accBal) {
<mat-hint>
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
#auto="matAutocomplete"
@@ -23,7 +25,9 @@
(optionSelected)="accountSelected($event)"
[displayWith]="displayFn"
>
<mat-option *ngFor="let account of accounts | async" [value]="account">{{ account.name }}</mat-option>
@for (account of accounts | async; track account) {
<mat-option [value]="account">{{ account.name }}</mat-option>
}
</mat-autocomplete>
<mat-form-field class="flex-auto basis-1/3">
<mat-label>Amount</mat-label>
+41 -32
View File
@@ -30,9 +30,11 @@
</mat-form-field>
<mat-form-field class="flex-auto basis-2/5 mr-5">
<mat-select formControlName="paymentAccount">
<mat-option *ngFor="let account of paymentAccounts" [value]="account.id">
{{ account.name }}
</mat-option>
@for (account of paymentAccounts; track account) {
<mat-option [value]="account.id">
{{ account.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field class="flex-auto basis-1/5">
@@ -53,10 +55,12 @@
formControlName="account"
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>
</mat-hint>
@if (accBal) {
<mat-hint>
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
#auto="matAutocomplete"
@@ -64,7 +68,9 @@
[displayWith]="displayFn"
(optionSelected)="accountSelected($event)"
>
<mat-option *ngFor="let account of accounts | async" [value]="account">{{ account.name }}</mat-option>
@for (account of accounts | async; track account) {
<mat-option [value]="account">{{ account.name }}</mat-option>
}
</mat-autocomplete>
<mat-form-field class="flex-auto basis-1/4 mr-5">
<mat-label>Amount</mat-label>
@@ -108,12 +114,14 @@
<textarea matInput matAutosizeMinRows="5" formControlName="narration"></textarea>
</mat-form-field>
<div class="flex flex-row justify-center items-stretch">
<div class="img-container" class="flex-auto mr-5 basis-1/5" *ngFor="let item of voucher.files">
<img [src]="item.thumbnail" (click)="zoomImage(item)" />
<button mat-icon-button class="overlay" (click)="deleteImage(item)">
<mat-icon>delete</mat-icon>
</button>
</div>
@for (item of voucher.files; track item) {
<div class="img-container" class="flex-auto mr-5 basis-1/5">
<img [src]="item.thumbnail" (click)="zoomImage(item)" />
<button mat-icon-button class="overlay" (click)="deleteImage(item)">
<mat-icon>delete</mat-icon>
</button>
</div>
}
<div class="img-container" class="flex flex-auto basis-1/5">
<label ng-href for="fileUp">
<img
@@ -136,24 +144,25 @@
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()" class="mr-5">
{{ voucher.id ? 'Update' : 'Save' }}
</button>
<button
mat-raised-button
(click)="post()"
*ngIf="voucher.id"
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
class="mr-5"
>
{{ voucher.posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="voucher.id" [disabled]="!canSave()">
Delete
</button>
@if (voucher.id) {
<button
mat-raised-button
(click)="post()"
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
class="mr-5"
>
{{ voucher.posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" [disabled]="!canSave()">Delete</button>
}
<span class="fill-remaining-space"></span>
<span *ngIf="voucher.id" class="flex">
Created on&nbsp;<strong>{{ voucher.creationDate | localTime }}</strong
>&nbsp;and Last Edited on&nbsp; <strong>{{ voucher.lastEditDate | localTime }}</strong
>&nbsp;by&nbsp; <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
</span>
@if (voucher.id) {
<span class="flex">
Created on&nbsp;<strong>{{ voucher.creationDate | localTime }}</strong
>&nbsp;and Last Edited on&nbsp; <strong>{{ voucher.lastEditDate | localTime }}</strong
>&nbsp;by&nbsp; <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
</span>
}
</mat-card-actions>
</mat-card>
@@ -5,7 +5,7 @@ import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import { Hotkey, HotkeysService } from 'angular2-hotkeys';
import { round } from 'mathjs';
import * as moment from 'moment';
import moment from 'moment';
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
@@ -24,6 +24,8 @@
</mat-card-content>
<mat-card-actions>
<button mat-raised-button color="primary" (click)="save()" class="mr-5">Save</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="!!item.id">Delete</button>
@if (!!item.id) {
<button mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
}
</mat-card-actions>
</mat-card>
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { ToasterService } from '../../core/toaster.service';
import { ConfirmDialogComponent } from '../../shared/confirm-dialog/confirm-dialog.component';
@@ -2,9 +2,11 @@
<mat-card-header>
<mat-card-title-group>
<mat-card-title>Product Ledger</mat-card-title>
<button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
<mat-icon>save_alt</mat-icon>
</button>
@if (dataSource.data.length) {
<button mat-icon-button (click)="exportCsv()">
<mat-icon>save_alt</mat-icon>
</button>
}
</mat-card-title-group>
</mat-card-header>
<mat-card-content>
@@ -52,7 +54,9 @@
[displayWith]="displayFn"
(optionSelected)="selected($event)"
>
<mat-option *ngFor="let product of products | async" [value]="product">{{ product.name }}</mat-option>
@for (product of products | async; track product) {
<mat-option [value]="product">{{ product.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<button mat-raised-button class="flex-auto basis-1/5" color="primary" (click)="show()">Show</button>
@@ -4,7 +4,7 @@ import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { Observable, of as observableOf } from 'rxjs';
import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
@@ -35,9 +35,11 @@
<mat-form-field class="flex-auto">
<mat-label>Product Type</mat-label>
<mat-select formControlName="productGroup" (selectionChange)="updatePG($event.value)">
<mat-option *ngFor="let pg of productGroups" [value]="pg.id">
{{ pg.name }}
</mat-option>
@for (pg of productGroups; track pg) {
<mat-option [value]="pg.id">
{{ pg.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
</div>
@@ -47,67 +49,72 @@
<input matInput #nameElement formControlName="allergen" />
</mat-form-field>
</div>
<h2 *ngIf="item.productGroup?.nutritional ?? false">Nutritional Information</h2>
<div
class="flex flex-row justify-around content-start items-start"
*ngIf="item.productGroup?.nutritional ?? false"
>
<mat-form-field class="flex-auto mr-5">
<mat-label>Protein</mat-label>
<input matInput formControlName="protein" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Carbohydrate</mat-label>
<input matInput formControlName="carbohydrate" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Total Sugar</mat-label>
<input matInput formControlName="totalSugar" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Added Sugar</mat-label>
<input matInput formControlName="addedSugar" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Total Fat</mat-label>
<input matInput formControlName="totalFat" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Saturated Fat</mat-label>
<input matInput formControlName="saturatedFat" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Trans Fat</mat-label>
<input matInput formControlName="transFat" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Cholestrol</mat-label>
<input matInput formControlName="cholestrol" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Sodium</mat-label>
<input matInput formControlName="sodium" />
</mat-form-field>
</div>
<h2 *ngIf="item.productGroup?.iceCream ?? false">Ice Cream Information</h2>
<div class="flex flex-row justify-around content-start items-start" *ngIf="item.productGroup?.iceCream ?? false">
<mat-form-field class="flex-auto mr-5">
<mat-label>MSNF</mat-label>
<input matInput formControlName="msnf" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Other Solids</mat-label>
<input matInput formControlName="otherSolids" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Total Solids</mat-label>
<input matInput formControlName="totalSolids" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Water</mat-label>
<input matInput formControlName="water" />
</mat-form-field>
</div>
@if (item.productGroup?.nutritional ?? false) {
<h2>Nutritional Information</h2>
}
@if (item.productGroup?.nutritional ?? false) {
<div class="flex flex-row justify-around content-start items-start">
<mat-form-field class="flex-auto mr-5">
<mat-label>Protein</mat-label>
<input matInput formControlName="protein" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Carbohydrate</mat-label>
<input matInput formControlName="carbohydrate" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Total Sugar</mat-label>
<input matInput formControlName="totalSugar" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Added Sugar</mat-label>
<input matInput formControlName="addedSugar" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Total Fat</mat-label>
<input matInput formControlName="totalFat" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Saturated Fat</mat-label>
<input matInput formControlName="saturatedFat" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Trans Fat</mat-label>
<input matInput formControlName="transFat" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Cholestrol</mat-label>
<input matInput formControlName="cholestrol" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Sodium</mat-label>
<input matInput formControlName="sodium" />
</mat-form-field>
</div>
}
@if (item.productGroup?.iceCream ?? false) {
<h2>Ice Cream Information</h2>
}
@if (item.productGroup?.iceCream ?? false) {
<div class="flex flex-row justify-around content-start items-start">
<mat-form-field class="flex-auto mr-5">
<mat-label>MSNF</mat-label>
<input matInput formControlName="msnf" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Other Solids</mat-label>
<input matInput formControlName="otherSolids" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Total Solids</mat-label>
<input matInput formControlName="totalSolids" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Water</mat-label>
<input matInput formControlName="water" />
</mat-form-field>
</div>
}
<h2>Stock Keeping Units</h2>
<div
formGroupName="addRow"
@@ -186,6 +193,8 @@
</mat-card-content>
<mat-card-actions>
<button mat-raised-button color="primary" (click)="save()" class="mr-5">Save</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="!!item.id">Delete</button>
@if (!!item.id) {
<button mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
}
</mat-card-actions>
</mat-card>
@@ -2,9 +2,11 @@
<mat-card-header>
<mat-card-title-group>
<mat-card-title>Products</mat-card-title>
<button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
<mat-icon>save_alt</mat-icon>
</button>
@if (dataSource.data.length) {
<button mat-icon-button (click)="exportCsv()">
<mat-icon>save_alt</mat-icon>
</button>
}
<a mat-button [routerLink]="['/products', 'new']">
<mat-icon>add_box</mat-icon>
Add
@@ -26,12 +28,14 @@
<mat-header-cell *matHeaderCellDef mat-sort-header>Name</mat-header-cell>
<mat-cell *matCellDef="let row">
<ul>
<li *ngFor="let sku of row.skus">
<a [routerLink]="['/products', row.id]"
>{{ row.name }} ({{ showExtended ? sku.fraction + ' ' + row.fractionUnits + ' = 1 ' : ''
}}{{ sku.units }})</a
>
</li>
@for (sku of row.skus; track sku) {
<li>
<a [routerLink]="['/products', row.id]"
>{{ row.name }} ({{ showExtended ? sku.fraction + ' ' + row.fractionUnits + ' = 1 ' : ''
}}{{ sku.units }})</a
>
</li>
}
</ul>
</mat-cell>
</ng-container>
@@ -41,9 +45,11 @@
<mat-header-cell *matHeaderCellDef mat-sort-header>Cost Price</mat-header-cell>
<mat-cell *matCellDef="let row">
<ul>
<li *ngFor="let sku of row.skus">
{{ sku.costPrice | currency: 'INR' }}
</li>
@for (sku of row.skus; track sku) {
<li>
{{ sku.costPrice | currency: 'INR' }}
</li>
}
</ul>
</mat-cell>
</ng-container>
@@ -53,9 +59,11 @@
<mat-header-cell *matHeaderCellDef mat-sort-header>Yield</mat-header-cell>
<mat-cell *matCellDef="let row">
<ul>
<li *ngFor="let sku of row.skus">
{{ sku.productYield | percent: '1.2-2' }}
</li>
@for (sku of row.skus; track sku) {
<li>
{{ sku.productYield | percent: '1.2-2' }}
</li>
}
</ul>
</mat-cell>
</ng-container>
@@ -3,7 +3,7 @@ import { FormControl, FormGroup } from '@angular/forms';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { ProfitLoss } from './profit-loss';
import { ProfitLossDataSource } from './profit-loss-datasource';
@@ -3,7 +3,7 @@ import { FormControl, FormGroup } from '@angular/forms';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { PurchaseEntries } from './purchase-entries';
import { PurchaseEntriesDataSource } from './purchase-entries-datasource';
@@ -18,7 +18,9 @@
[displayWith]="displayFn"
(optionSelected)="batchSelected($event)"
>
<mat-option *ngFor="let batch of batches | async" [value]="batch">{{ batch.name }}</mat-option>
@for (batch of batches | async; track batch) {
<mat-option [value]="batch">{{ batch.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-1/3">
@@ -38,17 +38,21 @@
formControlName="account"
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>
</mat-hint>
@if (accBal) {
<mat-hint>
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"
autoActiveFirstOption
[displayWith]="displayFn"
(optionSelected)="accountSelected($event)"
>
<mat-option *ngFor="let account of accounts | async" [value]="account">{{ account.name }}</mat-option>
@for (account of accounts | async; track account) {
<mat-option [value]="account">{{ account.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-1/5">
@@ -75,7 +79,9 @@
[displayWith]="displayFn"
(optionSelected)="batchSelected($event)"
>
<mat-option *ngFor="let batch of batches | async" [value]="batch">{{ batch.name }}</mat-option>
@for (batch of batches | async; track batch) {
<mat-option [value]="batch">{{ batch.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-1/4 mr-5">
@@ -143,12 +149,14 @@
<textarea matInput matAutosizeMinRows="5" formControlName="narration"></textarea>
</mat-form-field>
<div class="flex flex-row justify-center items-stretch mr-5">
<div class="img-container" class="flex-auto mr-5 basis-1/5" *ngFor="let item of voucher.files">
<img [src]="item.thumbnail" (click)="zoomImage(item)" />
<button mat-icon-button class="overlay" (click)="deleteImage(item)">
<mat-icon>delete</mat-icon>
</button>
</div>
@for (item of voucher.files; track item) {
<div class="img-container" class="flex-auto mr-5 basis-1/5">
<img [src]="item.thumbnail" (click)="zoomImage(item)" />
<button mat-icon-button class="overlay" (click)="deleteImage(item)">
<mat-icon>delete</mat-icon>
</button>
</div>
}
<div class="img-container" class="flex flex-auto basis-1/5">
<label ng-href for="fileUp">
<img
@@ -171,24 +179,25 @@
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()" class="mr-5">
{{ voucher.id ? 'Update' : 'Save' }}
</button>
<button
mat-raised-button
(click)="post()"
*ngIf="voucher.id"
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
class="mr-5"
>
{{ voucher.posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="voucher.id" [disabled]="!canSave()">
Delete
</button>
@if (voucher.id) {
<button
mat-raised-button
(click)="post()"
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
class="mr-5"
>
{{ voucher.posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" [disabled]="!canSave()">Delete</button>
}
<span class="fill-remaining-space"></span>
<span *ngIf="voucher.id" class="flex">
Created on&nbsp;<strong>{{ voucher.creationDate | localTime }}</strong
>&nbsp;and Last Edited on&nbsp; <strong>{{ voucher.lastEditDate | localTime }}</strong
>&nbsp;by&nbsp; <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
</span>
@if (voucher.id) {
<span class="flex">
Created on&nbsp;<strong>{{ voucher.creationDate | localTime }}</strong
>&nbsp;and Last Edited on&nbsp; <strong>{{ voucher.lastEditDate | localTime }}</strong
>&nbsp;by&nbsp; <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
</span>
}
</mat-card-actions>
</mat-card>
@@ -5,7 +5,7 @@ import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import { Hotkey, HotkeysService } from 'angular2-hotkeys';
import { round } from 'mathjs';
import * as moment from 'moment';
import moment from 'moment';
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
@@ -18,7 +18,9 @@
[displayWith]="displayFn"
(optionSelected)="productSelected($event)"
>
<mat-option *ngFor="let product of products | async" [value]="product">{{ product.name }}</mat-option>
@for (product of products | async; track product) {
<mat-option [value]="product">{{ product.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-[12%] mr-5">
@@ -38,17 +38,21 @@
formControlName="account"
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>
</mat-hint>
@if (accBal) {
<mat-hint>
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"
autoActiveFirstOption
[displayWith]="displayFn"
(optionSelected)="accountSelected($event)"
>
<mat-option *ngFor="let account of accounts | async" [value]="account">{{ account.name }}</mat-option>
@for (account of accounts | async; track account) {
<mat-option [value]="account">{{ account.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-1/5">
@@ -75,7 +79,9 @@
[displayWith]="displayFn"
(optionSelected)="productSelected($event)"
>
<mat-option *ngFor="let product of products | async" [value]="product">{{ product.name }}</mat-option>
@for (product of products | async; track product) {
<mat-option [value]="product">{{ product.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-1/10 mr-5">
@@ -155,12 +161,14 @@
<textarea matInput matAutosizeMinRows="5" formControlName="narration"></textarea>
</mat-form-field>
<div class="flex flex-row justify-center items-stretch mr-5">
<div class="img-container" class="flex-auto mr-5 basis-1/5" *ngFor="let item of voucher.files">
<img [src]="item.thumbnail" (click)="zoomImage(item)" />
<button mat-icon-button class="overlay" (click)="deleteImage(item)">
<mat-icon>delete</mat-icon>
</button>
</div>
@for (item of voucher.files; track item) {
<div class="img-container" class="flex-auto mr-5 basis-1/5">
<img [src]="item.thumbnail" (click)="zoomImage(item)" />
<button mat-icon-button class="overlay" (click)="deleteImage(item)">
<mat-icon>delete</mat-icon>
</button>
</div>
}
<div class="img-container" class="flex flex-auto basis-1/5">
<label ng-href for="fileUp">
<img
@@ -183,24 +191,25 @@
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()" class="mr-5">
{{ voucher.id ? 'Update' : 'Save' }}
</button>
<button
mat-raised-button
(click)="post()"
*ngIf="voucher.id"
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
class="mr-5"
>
{{ voucher.posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="voucher.id" [disabled]="!canSave()">
Delete
</button>
@if (voucher.id) {
<button
mat-raised-button
(click)="post()"
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
class="mr-5"
>
{{ voucher.posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" [disabled]="!canSave()">Delete</button>
}
<span class="fill-remaining-space"></span>
<span *ngIf="voucher.id" class="flex">
Created on&nbsp;<strong>{{ voucher.creationDate | localTime }}</strong
>&nbsp;and Last Edited on&nbsp; <strong>{{ voucher.lastEditDate | localTime }}</strong
>&nbsp;by&nbsp; <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
</span>
@if (voucher.id) {
<span class="flex">
Created on&nbsp;<strong>{{ voucher.creationDate | localTime }}</strong
>&nbsp;and Last Edited on&nbsp; <strong>{{ voucher.lastEditDate | localTime }}</strong
>&nbsp;by&nbsp; <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
</span>
}
</mat-card-actions>
</mat-card>
@@ -5,7 +5,7 @@ import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import { Hotkey, HotkeysService } from 'angular2-hotkeys';
import { round } from 'mathjs';
import * as moment from 'moment';
import moment from 'moment';
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
@@ -3,7 +3,7 @@ import { FormControl, FormGroup } from '@angular/forms';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { Purchases } from './purchases';
import { PurchasesDataSource } from './purchases-datasource';
@@ -27,7 +27,9 @@
[displayWith]="displayFn"
(optionSelected)="accountSelected($event)"
>
<mat-option *ngFor="let account of accounts | async" [value]="account">{{ account.name }}</mat-option>
@for (account of accounts | async; track account) {
<mat-option [value]="account">{{ account.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
</div>
@@ -62,7 +64,9 @@
[displayWith]="displayFn"
(optionSelected)="productSelected($event)"
>
<mat-option *ngFor="let product of products | async" [value]="product">{{ product.name }}</mat-option>
@for (product of products | async; track product) {
<mat-option [value]="product">{{ product.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-1/5 mr-5">
@@ -3,7 +3,7 @@ import { FormControl, FormGroup } from '@angular/forms';
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
@@ -29,7 +29,9 @@
<mat-header-cell *matHeaderCellDef mat-sort-header>Products</mat-header-cell>
<mat-cell *matCellDef="let row">
<ul>
<li *ngFor="let item of row.items">{{ item.sku.name }} @ {{ item.price | currency: 'INR' }}</li>
@for (item of row.items; track item) {
<li>{{ item.sku.name }} &#64; {{ item.price | currency: 'INR' }}</li>
}
</ul>
</mat-cell>
</ng-container>
@@ -2,9 +2,11 @@
<mat-card-header>
<mat-card-title-group>
<mat-card-title>Raw Material Cost</mat-card-title>
<button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
<mat-icon>save_alt</mat-icon>
</button>
@if (dataSource.data.length) {
<button mat-icon-button (click)="exportCsv()">
<mat-icon>save_alt</mat-icon>
</button>
}
</mat-card-title-group>
</mat-card-header>
<mat-card-content>
@@ -42,14 +44,13 @@
<ng-container matColumnDef="name">
<mat-header-cell *matHeaderCellDef mat-sort-header>Name</mat-header-cell>
<mat-cell *matCellDef="let row">
<a
*ngIf="row.url"
[routerLink]="row.url"
[queryParams]="{ startDate: info.startDate, finishDate: info.finishDate }"
>
{{ row.name }}
</a>
<span *ngIf="!row.url">{{ row.name }}</span>
@if (row.url) {
<a [routerLink]="row.url" [queryParams]="{ startDate: info.startDate, finishDate: info.finishDate }">
{{ row.name }}
</a>
} @else {
<span>{{ row.name }}</span>
}
</mat-cell>
<mat-footer-cell *matFooterCellDef>{{ info.footer?.name }}</mat-footer-cell>
</ng-container>
@@ -3,7 +3,7 @@ import { FormControl, FormGroup } from '@angular/forms';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { ToCsvService } from '../shared/to-csv.service';
@@ -12,10 +12,12 @@
formControlName="account"
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>
</mat-hint>
@if (accBal) {
<mat-hint>
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
#auto="matAutocomplete"
@@ -23,7 +25,9 @@
[displayWith]="displayFn"
(optionSelected)="accountSelected($event)"
>
<mat-option *ngFor="let account of accounts | async" [value]="account">{{ account.name }}</mat-option>
@for (account of accounts | async; track account) {
<mat-option [value]="account">{{ account.name }}</mat-option>
}
</mat-autocomplete>
<mat-form-field class="flex-auto basis-1/3">
<mat-label>Amount</mat-label>
+41 -32
View File
@@ -30,9 +30,11 @@
</mat-form-field>
<mat-form-field class="flex-auto basis-2/5 mr-5">
<mat-select formControlName="receiptAccount">
<mat-option *ngFor="let account of receiptAccounts" [value]="account.id">
{{ account.name }}
</mat-option>
@for (account of receiptAccounts; track account) {
<mat-option [value]="account.id">
{{ account.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field class="flex-auto basis-1/5">
@@ -53,10 +55,12 @@
formControlName="account"
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>
</mat-hint>
@if (accBal) {
<mat-hint>
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
#auto="matAutocomplete"
@@ -64,7 +68,9 @@
[displayWith]="displayFn"
(optionSelected)="accountSelected($event)"
>
<mat-option *ngFor="let account of accounts | async" [value]="account">{{ account.name }}</mat-option>
@for (account of accounts | async; track account) {
<mat-option [value]="account">{{ account.name }}</mat-option>
}
</mat-autocomplete>
<mat-form-field class="flex-auto basis-1/4 mr-5">
<mat-label>Amount</mat-label>
@@ -108,12 +114,14 @@
<textarea matInput matAutosizeMinRows="5" formControlName="narration"></textarea>
</mat-form-field>
<div class="flex flex-row justify-center items-stretch">
<div class="img-container" class="flex-auto mr-5 basis-1/5" *ngFor="let item of voucher.files">
<img [src]="item.thumbnail" (click)="zoomImage(item)" />
<button mat-icon-button class="overlay" (click)="deleteImage(item)">
<mat-icon>delete</mat-icon>
</button>
</div>
@for (item of voucher.files; track item) {
<div class="img-container" class="flex-auto mr-5 basis-1/5">
<img [src]="item.thumbnail" (click)="zoomImage(item)" />
<button mat-icon-button class="overlay" (click)="deleteImage(item)">
<mat-icon>delete</mat-icon>
</button>
</div>
}
<div class="img-container" class="flex flex-auto basis-1/5">
<label ng-href for="fileUp">
<img
@@ -136,24 +144,25 @@
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()" class="mr-5">
{{ voucher.id ? 'Update' : 'Save' }}
</button>
<button
mat-raised-button
(click)="post()"
*ngIf="voucher.id"
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
class="mr-5"
>
{{ voucher.posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="voucher.id" [disabled]="!canSave()">
Delete
</button>
@if (voucher.id) {
<button
mat-raised-button
(click)="post()"
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
class="mr-5"
>
{{ voucher.posted ? 'Posted' : 'Post' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" [disabled]="!canSave()">Delete</button>
}
<span class="fill-remaining-space"></span>
<span *ngIf="voucher.id" class="flex">
Created on&nbsp;<strong>{{ voucher.creationDate | localTime }}</strong
>&nbsp;and Last Edited on&nbsp; <strong>{{ voucher.lastEditDate | localTime }}</strong
>&nbsp;by&nbsp; <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
</span>
@if (voucher.id) {
<span class="flex">
Created on&nbsp;<strong>{{ voucher.creationDate | localTime }}</strong
>&nbsp;and Last Edited on&nbsp; <strong>{{ voucher.lastEditDate | localTime }}</strong
>&nbsp;by&nbsp; <strong>{{ voucher.user.name }}</strong
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
</span>
}
</mat-card-actions>
</mat-card>
@@ -5,7 +5,7 @@ import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import { Hotkey, HotkeysService } from 'angular2-hotkeys';
import { round } from 'mathjs';
import * as moment from 'moment';
import moment from 'moment';
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
@@ -2,7 +2,7 @@ import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angula
import { FormControl, FormGroup } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { ToasterService } from '../../core/toaster.service';
import { ConfirmDialogComponent } from '../../shared/confirm-dialog/confirm-dialog.component';
@@ -40,7 +40,9 @@
[displayWith]="displayProduct"
(optionSelected)="productSelected($event)"
>
<mat-option *ngFor="let product of products | async" [value]="product">{{ product.name }}</mat-option>
@for (product of products | async; track product) {
<mat-option [value]="product">{{ product.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-1/5">
@@ -65,9 +67,9 @@
[displayWith]="displayIngredient"
(optionSelected)="ingredientSelected($event)"
>
<mat-option *ngFor="let product of ingredients | async" [value]="product"
>{{ product.name }} ({{ product.fractionUnits }})</mat-option
>
@for (product of ingredients | async; track product) {
<mat-option [value]="product">{{ product.name }} ({{ product.fractionUnits }})</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-1/5 mr-5">
@@ -127,6 +129,8 @@
<button mat-raised-button (click)="save()" color="primary" class="mr-5">
{{ item.id ? 'Update' : 'Save' }}
</button>
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="item.id">Delete</button>
@if (item.id) {
<button mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
}
</mat-card-actions>
</mat-card>
@@ -3,7 +3,7 @@ import { FormControl, FormGroup } from '@angular/forms';
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
import { debounceTime, distinctUntilChanged, map, switchMap } from 'rxjs/operators';
import { Period } from 'src/app/period/period';
@@ -19,16 +19,20 @@
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
<mat-form-field class="flex-auto">
<mat-select formControlName="period">
<mat-option *ngFor="let p of periods" [value]="p"> {{ p.validFrom }} to {{ p.validTill }} </mat-option>
@for (p of periods; track p) {
<mat-option [value]="p"> {{ p.validFrom }} to {{ p.validTill }} </mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field class="flex-auto">
<mat-label>Product Type</mat-label>
<mat-select formControlName="productGroup" (selectionChange)="filterProductGroup($event.value)">
<mat-option>-- All Products --</mat-option>
<mat-option *ngFor="let mc of productGroups" [value]="mc.id">
{{ mc.name }}
</mat-option>
@for (mc of productGroups; track mc) {
<mat-option [value]="mc.id">
{{ mc.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
</div>
@@ -13,13 +13,11 @@
</div>
<mat-divider></mat-divider>
<div formArrayName="permissions">
<div
class="flex flex-row justify-around content-start items-start"
*ngFor="let p of item.permissions; index as i"
[formGroupName]="i"
>
<mat-checkbox formControlName="permission" class="flex-auto">{{ p.name }}</mat-checkbox>
</div>
@for (p of item.permissions; track p; let i = $index) {
<div class="flex flex-row justify-around content-start items-start" [formGroupName]="i">
<mat-checkbox formControlName="permission" class="flex-auto">{{ p.name }}</mat-checkbox>
</div>
}
</div>
</form>
</mat-card-content>
@@ -23,7 +23,9 @@
<mat-header-cell *matHeaderCellDef mat-sort-header>Permissions</mat-header-cell>
<mat-cell *matCellDef="let row">
<ul>
<li *ngFor="let permission of row.permissions">{{ permission }}</li>
@for (permission of row.permissions; track permission) {
<li>{{ permission }}</li>
}
</ul>
</mat-cell>
</ng-container>
@@ -5,60 +5,64 @@
<form [formGroup]="lockInfoForm" class="flex flex-col">
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
<mat-checkbox formControlName="lockOlder" class="flex-auto basis-1/5 mr-5">Lock Older</mat-checkbox>
<mat-checkbox formControlName="olderRolling" *ngIf="lockOlder" class="flex-auto basis-1/5 mr-5">
Is Rolling
</mat-checkbox>
<mat-form-field class="flex-auto basis-3/5" *ngIf="lockOlder && !olderRolling">
<mat-label>Date</mat-label>
<input matInput [matDatepicker]="olderDate" formControlName="olderDate" autocomplete="off" />
<mat-datepicker-toggle matSuffix [for]="olderDate"></mat-datepicker-toggle>
<mat-datepicker #olderDate></mat-datepicker>
</mat-form-field>
<mat-form-field class="flex-auto basis-3/5" *ngIf="lockOlder && olderRolling">
<mat-label>Days</mat-label>
<input matInput formControlName="olderDays" autocomplete="off" />
</mat-form-field>
@if (lockOlder) {
<mat-checkbox formControlName="olderRolling" class="flex-auto basis-1/5 mr-5"> Is Rolling </mat-checkbox>
}
@if (lockOlder && !olderRolling) {
<mat-form-field class="flex-auto basis-3/5">
<mat-label>Date</mat-label>
<input matInput [matDatepicker]="olderDate" formControlName="olderDate" autocomplete="off" />
<mat-datepicker-toggle matSuffix [for]="olderDate"></mat-datepicker-toggle>
<mat-datepicker #olderDate></mat-datepicker>
</mat-form-field>
}
@if (lockOlder && olderRolling) {
<mat-form-field class="flex-auto basis-3/5">
<mat-label>Days</mat-label>
<input matInput formControlName="olderDays" autocomplete="off" />
</mat-form-field>
}
</div>
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
<mat-checkbox formControlName="lockNewer" class="flex-auto basis-1/5 mr-5">Lock Newer</mat-checkbox>
<mat-checkbox formControlName="newerRolling" *ngIf="lockNewer" class="flex-auto basis-1/5 mr-5">
Is Rolling
</mat-checkbox>
<mat-form-field class="flex-auto basis-3/5" *ngIf="lockNewer && !newerRolling">
<input
matInput
[matDatepicker]="newerDate"
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 class="flex-auto basis-3/5" *ngIf="lockNewer && newerRolling">
<input matInput placehnewer="Days" formControlName="newerDays" autocomplete="off" />
</mat-form-field>
@if (lockNewer) {
<mat-checkbox formControlName="newerRolling" class="flex-auto basis-1/5 mr-5"> Is Rolling </mat-checkbox>
}
@if (lockNewer && !newerRolling) {
<mat-form-field class="flex-auto basis-3/5">
<input
matInput
[matDatepicker]="newerDate"
placehnewer="Date"
formControlName="newerDate"
autocomplete="off"
/>
<mat-datepicker-toggle matSuffix [for]="newerDate"></mat-datepicker-toggle>
<mat-datepicker #newerDate></mat-datepicker>
</mat-form-field>
}
@if (lockNewer && newerRolling) {
<mat-form-field class="flex-auto basis-3/5">
<input matInput placehnewer="Days" formControlName="newerDays" autocomplete="off" />
</mat-form-field>
}
</div>
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
<div formArrayName="accountTypes">
<h3>Account Types</h3>
<div
*ngFor="let at of accountTypes; index as i"
[formGroupName]="i"
class="flex flex-row justify-around content-start items-start"
>
<mat-checkbox formControlName="accountType" class="flex-auto">{{ at.name }}</mat-checkbox>
</div>
@for (at of accountTypes; track at; let i = $index) {
<div [formGroupName]="i" class="flex flex-row justify-around content-start items-start">
<mat-checkbox formControlName="accountType" class="flex-auto">{{ at.name }}</mat-checkbox>
</div>
}
</div>
<div formArrayName="voucherTypes">
<h3>Voucher Types</h3>
<div
*ngFor="let vt of voucherTypes; index as j"
[formGroupName]="j"
class="flex flex-row justify-around content-start items-start"
>
<mat-checkbox formControlName="voucherType" class="flex-auto">{{ vt.name }}</mat-checkbox>
</div>
@for (vt of voucherTypes; track vt; let j = $index) {
<div [formGroupName]="j" class="flex flex-row justify-around content-start items-start">
<mat-checkbox formControlName="voucherType" class="flex-auto">{{ vt.name }}</mat-checkbox>
</div>
}
</div>
</div>
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
@@ -101,7 +105,9 @@
<mat-header-cell *matHeaderCellDef>Voucher Types</mat-header-cell>
<mat-cell *matCellDef="let row">
<ul>
<li *ngFor="let vt of row.voucherTypes">{{ vt.name }}</li>
@for (vt of row.voucherTypes; track vt) {
<li>{{ vt.name }}</li>
}
</ul>
</mat-cell>
</ng-container>
@@ -111,7 +117,9 @@
<mat-header-cell *matHeaderCellDef>Account Types</mat-header-cell>
<mat-cell *matCellDef="let row">
<ul>
<li *ngFor="let at of row.accountTypes">{{ at.name }}</li>
@for (at of row.accountTypes; track at) {
<li>{{ at.name }}</li>
}
</ul>
</mat-cell>
</ng-container>
@@ -173,13 +181,15 @@
<mat-tab label="Maintenance Mode">
<mat-card>
<mat-card-content>
<mat-card-subtitle *ngIf="maintenance.enabled">
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>
@if (maintenance.enabled) {
<mat-card-subtitle>
Maintenance mode is <strong>ENABLED</strong> by user <strong>{{ maintenance.user }}</strong
>.
</mat-card-subtitle>
}
@if (!maintenance.enabled) {
<mat-card-subtitle> Maintenance mode is <strong>DISABLED</strong>. </mat-card-subtitle>
}
<button
mat-raised-button
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { FormArray, FormControl, FormGroup } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { BehaviorSubject } from 'rxjs';
import { environment } from '../../environments/environment';
+1 -1
View File
@@ -1,5 +1,5 @@
import { Pipe, PipeTransform } from '@angular/core';
import * as moment from 'moment';
import moment from 'moment';
@Pipe({
name: 'localTime',
@@ -3,7 +3,7 @@ import { FormControl, FormGroup } from '@angular/forms';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { StockMovement } from './stock-movement';
import { StockMovementDataSource } from './stock-movement-datasource';
@@ -3,7 +3,7 @@ import { FormControl, FormGroup } from '@angular/forms';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { TrialBalance } from './trial-balance';
import { TrialBalanceDataSource } from './trial-balance-datasource';
@@ -23,13 +23,11 @@
</div>
<mat-divider></mat-divider>
<div formArrayName="roles">
<div
*ngFor="let r of item.roles; index as i"
[formGroupName]="i"
class="flex flex-row justify-around content-start items-start"
>
<mat-checkbox formControlName="role" class="flex-auto">{{ r.name }}</mat-checkbox>
</div>
@for (r of item.roles; track r; let i = $index) {
<div [formGroupName]="i" class="flex flex-row justify-around content-start items-start">
<mat-checkbox formControlName="role" class="flex-auto">{{ r.name }}</mat-checkbox>
</div>
}
</div>
</form>
</mat-card-content>
@@ -29,7 +29,9 @@
<mat-header-cell *matHeaderCellDef>Roles</mat-header-cell>
<mat-cell *matCellDef="let row">
<ul>
<li *ngFor="let role of row.roles">{{ role }}</li>
@for (role of row.roles; track role) {
<li>{{ role }}</li>
}
</ul>
</mat-cell>
</ng-container>
@@ -38,7 +40,7 @@
<ng-container matColumnDef="last">
<mat-header-cell *matHeaderCellDef>Last Login</mat-header-cell>
<mat-cell *matCellDef="let row"
>{{ row.lastDevice }} @ {{ row.lastDate ? (row.lastDate | localTime) : 'Never' }}</mat-cell
>{{ row.lastDevice }} &#64; {{ row.lastDate ? (row.lastDate | localTime) : 'Never' }}</mat-cell
>
</ng-container>
+2 -1
View File
@@ -10,9 +10,10 @@
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true,
"esModuleInterop": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,