Chore: Updated to Angular 16
This commit is contained in:
@@ -9,8 +9,8 @@ RUN cd /app/overlord \
|
|||||||
ADD https://git.tanshu.com/api/v1/repos/tanshu/brewman/tags /tags.json
|
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
|
RUN git clone --single-branch --depth 1 --branch latest https://git.tanshu.com/tanshu/brewman.git /app
|
||||||
WORKDIR /app/overlord
|
WORKDIR /app/overlord
|
||||||
RUN mv /node_modules /app/overlord/ \
|
RUN mv /node_modules /app/bookie/ \
|
||||||
&& /app/overlord/node_modules/.bin/ng build
|
&& /app/bookie/node_modules/.bin/ng build
|
||||||
|
|
||||||
|
|
||||||
FROM python:3.11
|
FROM python:3.11
|
||||||
@@ -27,7 +27,7 @@ ENV LANG en_IN
|
|||||||
ENV LC_ALL en_IN
|
ENV LC_ALL en_IN
|
||||||
|
|
||||||
# Install Poetry
|
# 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 && \
|
cd /usr/local/bin && \
|
||||||
ln -s /opt/poetry/bin/poetry && \
|
ln -s /opt/poetry/bin/poetry && \
|
||||||
poetry config virtualenvs.create false
|
poetry config virtualenvs.create false
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
"plugin:@typescript-eslint/recommended",
|
"plugin:@typescript-eslint/recommended",
|
||||||
"plugin:@angular-eslint/recommended",
|
"plugin:@angular-eslint/recommended",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates",
|
"plugin:@angular-eslint/template/process-inline-templates",
|
||||||
"plugin:@angular-eslint/recommended--extra",
|
|
||||||
"prettier"
|
"prettier"
|
||||||
],
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
trailingComma: "all",
|
|
||||||
tabWidth: 2,
|
tabWidth: 2,
|
||||||
semi: true,
|
semi: true,
|
||||||
singleQuote: true,
|
singleQuote: true,
|
||||||
bracketSpacing: true,
|
bracketSpacing: true,
|
||||||
printWidth: 100
|
printWidth: 120
|
||||||
};
|
};
|
||||||
|
|||||||
+39
-40
@@ -14,61 +14,60 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^15.2.6",
|
"@angular/animations": "^16.1.6",
|
||||||
"@angular/cdk": "^15.2.6",
|
"@angular/cdk": "^16.1.5",
|
||||||
"@angular/common": "^15.2.6",
|
"@angular/common": "^16.1.6",
|
||||||
"@angular/compiler": "^15.2.6",
|
"@angular/compiler": "^16.1.6",
|
||||||
"@angular/core": "^15.2.6",
|
"@angular/core": "^16.1.6",
|
||||||
"@angular/forms": "^15.2.6",
|
"@angular/forms": "^16.1.6",
|
||||||
"@angular/material": "^15.2.6",
|
"@angular/material": "^16.1.5",
|
||||||
"@angular/material-moment-adapter": "^15.2.6",
|
"@angular/material-moment-adapter": "^16.1.5",
|
||||||
"@angular/platform-browser": "^15.2.6",
|
"@angular/platform-browser": "^16.1.6",
|
||||||
"@angular/platform-browser-dynamic": "^15.2.6",
|
"@angular/platform-browser-dynamic": "^16.1.6",
|
||||||
"@angular/router": "^15.2.6",
|
"@angular/router": "^16.1.6",
|
||||||
"@ngx-loading-bar/core": "^6.0.2",
|
"@ngx-loading-bar/core": "^6.0.2",
|
||||||
"@ngx-loading-bar/http-client": "^6.0.2",
|
"@ngx-loading-bar/http-client": "^6.0.2",
|
||||||
"@ngx-loading-bar/router": "^6.0.2",
|
"@ngx-loading-bar/router": "^6.0.2",
|
||||||
"@types/mousetrap": "1.6.11",
|
"@types/mousetrap": "1.6.11",
|
||||||
"angular2-hotkeys": "^13.2.0",
|
"angular2-hotkeys": "^15.0.0",
|
||||||
"mathjs": "^11.8.0",
|
"mathjs": "^11.9.0",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"rxjs": "~7.8.0",
|
"rxjs": "~7.8.0",
|
||||||
"tslib": "^2.5.0",
|
"tslib": "^2.6.0",
|
||||||
"zone.js": "~0.12.0"
|
"zone.js": "~0.13.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "^15.2.5",
|
"@angular-devkit/build-angular": "^16.1.5",
|
||||||
"@angular-eslint/builder": "^15.2.1",
|
"@angular-eslint/builder": "^16.1.0",
|
||||||
"@angular-eslint/eslint-plugin": "^15.2.1",
|
"@angular-eslint/eslint-plugin": "^16.1.0",
|
||||||
"@angular-eslint/eslint-plugin-template": "^15.2.1",
|
"@angular-eslint/eslint-plugin-template": "^16.1.0",
|
||||||
"@angular-eslint/schematics": "^15.2.1",
|
"@angular-eslint/schematics": "^16.1.0",
|
||||||
"@angular-eslint/template-parser": "^15.2.1",
|
"@angular-eslint/template-parser": "^16.1.0",
|
||||||
"@angular/cli": "^15.2.5",
|
"@angular/cli": "^16.1.5",
|
||||||
"@angular/compiler-cli": "^15.2.6",
|
"@angular/compiler-cli": "^16.1.6",
|
||||||
"@angular/language-service": "^15.2.6",
|
"@angular/language-service": "^16.1.6",
|
||||||
"@types/jasmine": "~4.3.0",
|
"@types/jasmine": "~4.3.5",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.57.1",
|
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
||||||
"@typescript-eslint/parser": "^5.57.1",
|
"@typescript-eslint/parser": "^6.1.0",
|
||||||
"autoprefixer": "^10.4.14",
|
"autoprefixer": "^10.4.14",
|
||||||
"eslint": "^8.37.0",
|
"eslint": "^8.39.0",
|
||||||
"eslint-config-prettier": "^8.7.0",
|
"eslint-config-prettier": "^8.7.0",
|
||||||
"eslint-plugin-import": "^2.27.5",
|
"eslint-plugin-import": "^2.27.5",
|
||||||
"eslint-plugin-unused-imports": "^2.0.0",
|
"eslint-plugin-unused-imports": "^3.0.0",
|
||||||
"husky": "^8.0.2",
|
"husky": "^8.0.2",
|
||||||
"jasmine-core": "~4.5.0",
|
"jasmine-core": "~5.1.0",
|
||||||
"jasmine-spec-reporter": "7.0.0",
|
"jasmine-spec-reporter": "7.0.0",
|
||||||
"karma": "^6.4.1",
|
"karma": "^6.4.2",
|
||||||
"karma-chrome-launcher": "~3.1.1",
|
"karma-chrome-launcher": "~3.2.0",
|
||||||
"karma-coverage": "~2.2.0",
|
"karma-coverage": "~2.2.1",
|
||||||
"karma-jasmine": "~5.1.0",
|
"karma-jasmine": "~5.1.0",
|
||||||
"karma-jasmine-html-reporter": "^2.0.0",
|
"karma-jasmine-html-reporter": "^2.1.0",
|
||||||
"lint-staged": "^13.1.0",
|
"lint-staged": "^13.2.3",
|
||||||
"postcss": "^8.4.21",
|
"postcss": "^8.4.27",
|
||||||
"prettier": "^2.8.7",
|
"prettier": "^3.0.0",
|
||||||
"standard-version": "^9.5.0",
|
"standard-version": "^9.5.0",
|
||||||
"tailwindcss": "^3.3.1",
|
"tailwindcss": "^3.3.3",
|
||||||
"ts-node": "^9.1.1",
|
"typescript": "~5.1.6"
|
||||||
"typescript": "~4.9.4"
|
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
|
|||||||
@@ -13,7 +13,10 @@ const serviceName = 'AccountTypeService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class AccountTypeService {
|
export class AccountTypeService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
list(): Observable<AccountType[]> {
|
list(): Observable<AccountType[]> {
|
||||||
return this.http
|
return this.http
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ const serviceName = 'AttendanceTypeService';
|
|||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class AttendanceTypeService {
|
export class AttendanceTypeService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
list(): Observable<AttendanceType[]> {
|
list(): Observable<AttendanceType[]> {
|
||||||
return this.http
|
return this.http
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ const serviceName = 'AttendanceService';
|
|||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class AttendanceService {
|
export class AttendanceService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
get(date: string | null): Observable<Attendance> {
|
get(date: string | null): Observable<Attendance> {
|
||||||
const getUrl: string = date === null ? url : `${url}/${date}`;
|
const getUrl: string = date === null ? url : `${url}/${date}`;
|
||||||
|
|||||||
@@ -9,7 +9,11 @@ import { AuthService } from '../auth.service';
|
|||||||
template: '',
|
template: '',
|
||||||
})
|
})
|
||||||
export class LogoutComponent implements OnInit {
|
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() {
|
ngOnInit() {
|
||||||
this.auth.logout();
|
this.auth.logout();
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ export class BalanceSheetComponent implements OnInit {
|
|||||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||||
displayedColumns = ['group', 'name', 'subAmount', 'total'];
|
displayedColumns = ['group', 'name', 'subAmount', 'total'];
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private router: Router) {
|
constructor(
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private router: Router,
|
||||||
|
) {
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
date: new FormControl(new Date(), { nonNullable: true }),
|
date: new FormControl(new Date(), { nonNullable: true }),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'BalanceSheetService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class BalanceSheetService {
|
export class BalanceSheetService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
list(date: string | null): Observable<BalanceSheet> {
|
list(date: string | null): Observable<BalanceSheet> {
|
||||||
const listUrl = date === null ? url : `${url}/${date}`;
|
const listUrl = date === null ? url : `${url}/${date}`;
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ export class BatchIntegrityReportComponent implements OnInit {
|
|||||||
dataSource: BatchIntegrityReportDatasource = new BatchIntegrityReportDatasource(this.info);
|
dataSource: BatchIntegrityReportDatasource = new BatchIntegrityReportDatasource(this.info);
|
||||||
displayedColumns = ['batch', 'details'];
|
displayedColumns = ['batch', 'details'];
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private router: Router) {}
|
constructor(
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private router: Router,
|
||||||
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.data.subscribe((value) => {
|
this.route.data.subscribe((value) => {
|
||||||
|
|||||||
@@ -13,7 +13,10 @@ const serviceName = 'BatchIntegrityReportService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class BatchIntegrityReportService {
|
export class BatchIntegrityReportService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
batchIntegrity(): Observable<BatchIntegrity[]> {
|
batchIntegrity(): Observable<BatchIntegrity[]> {
|
||||||
const url = '/api/batch-integrity';
|
const url = '/api/batch-integrity';
|
||||||
|
|||||||
@@ -22,7 +22,10 @@ export class CashFlowComponent implements OnInit {
|
|||||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||||
displayedColumns = ['name', 'amount'];
|
displayedColumns = ['name', 'amount'];
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private router: Router) {
|
constructor(
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private router: Router,
|
||||||
|
) {
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'CashFlowService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class CashFlowService {
|
export class CashFlowService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
list(
|
list(
|
||||||
id: string | null,
|
id: string | null,
|
||||||
|
|||||||
@@ -11,7 +11,11 @@ import { Client } from '../client';
|
|||||||
const compare = (a: string | number, b: string | number, isAsc: boolean) =>
|
const compare = (a: string | number, b: string | number, isAsc: boolean) =>
|
||||||
(a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
(a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
||||||
export class ClientListDataSource extends DataSource<Client> {
|
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();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'ClientService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class ClientService {
|
export class ClientService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
get(id: string | null): Observable<Client> {
|
get(id: string | null): Observable<Client> {
|
||||||
const getUrl: string = id === null ? url : `${url}/${id}`;
|
const getUrl: string = id === null ? url : `${url}/${id}`;
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'ClosingStockService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class ClosingStockService {
|
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> {
|
list(date: string | null, costCentre: string | null): Observable<ClosingStock> {
|
||||||
const listUrl = date === null ? url : `${url}/${date}`;
|
const listUrl = date === null ? url : `${url}/${date}`;
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ const serviceName = 'AccountService';
|
|||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class AccountService {
|
export class AccountService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
get(id: string | null): Observable<Account> {
|
get(id: string | null): Observable<Account> {
|
||||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||||
|
|||||||
@@ -11,7 +11,10 @@ const serviceName = 'BatchService';
|
|||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class BatchService {
|
export class BatchService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
autocomplete(date: string, term: string): Observable<Batch[]> {
|
autocomplete(date: string, term: string): Observable<Batch[]> {
|
||||||
const options = { params: new HttpParams().set('q', term).set('d', date) };
|
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'],
|
styleUrls: ['./nav-bar.component.css'],
|
||||||
})
|
})
|
||||||
export class NavBarComponent {
|
export class NavBarComponent {
|
||||||
constructor(private router: Router, public auth: AuthService) {}
|
constructor(
|
||||||
|
private router: Router,
|
||||||
|
public auth: AuthService,
|
||||||
|
) {}
|
||||||
|
|
||||||
logout() {
|
logout() {
|
||||||
this.auth.logout();
|
this.auth.logout();
|
||||||
|
|||||||
@@ -13,7 +13,10 @@ const serviceName = 'VoucherService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class VoucherService {
|
export class VoucherService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
static dataURLtoBlob(dataURL: string) {
|
static dataURLtoBlob(dataURL: string) {
|
||||||
const re = /^data:([\w/\-.]+);\w+,(.*)$/;
|
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) =>
|
const compare = (a: string | number, b: string | number, isAsc: boolean) =>
|
||||||
(a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
(a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
||||||
export class CostCentreListDataSource extends DataSource<CostCentre> {
|
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();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,10 @@ const serviceName = 'CostCentreService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class CostCentreService {
|
export class CostCentreService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
get(id: string | null): Observable<CostCentre> {
|
get(id: string | null): Observable<CostCentre> {
|
||||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||||
|
|||||||
@@ -35,7 +35,10 @@ export class DaybookComponent implements OnInit {
|
|||||||
'creditAmount',
|
'creditAmount',
|
||||||
];
|
];
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private router: Router) {
|
constructor(
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private router: Router,
|
||||||
|
) {
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'DaybookService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class DaybookService {
|
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> {
|
list(startDate: string | null, finishDate: string | null): Observable<Daybook> {
|
||||||
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ const serviceName = 'EmployeeAttendanceService';
|
|||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class EmployeeAttendanceService {
|
export class EmployeeAttendanceService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
get(
|
get(
|
||||||
id: string | null,
|
id: string | null,
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ export class EmployeeFunctionsComponent {
|
|||||||
|
|
||||||
fingerprintFile: File | null = null;
|
fingerprintFile: File | null = null;
|
||||||
|
|
||||||
constructor(private toaster: ToasterService, private ser: EmployeeFunctionsService) {
|
constructor(
|
||||||
|
private toaster: ToasterService,
|
||||||
|
private ser: EmployeeFunctionsService,
|
||||||
|
) {
|
||||||
const startDate = moment().date(1);
|
const startDate = moment().date(1);
|
||||||
const finishDate = moment().date(startDate.daysInMonth());
|
const finishDate = moment().date(startDate.daysInMonth());
|
||||||
this.creditSalaryForm = new FormGroup({
|
this.creditSalaryForm = new FormGroup({
|
||||||
|
|||||||
@@ -9,7 +9,10 @@ const serviceName = 'EmployeeFunctionsService';
|
|||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class EmployeeFunctionsService {
|
export class EmployeeFunctionsService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
creditSalary(month: string): Observable<boolean> {
|
creditSalary(month: string): Observable<boolean> {
|
||||||
const url = '/api/credit-salary';
|
const url = '/api/credit-salary';
|
||||||
|
|||||||
@@ -40,7 +40,10 @@ export class EmployeeListComponent implements OnInit, AfterViewInit {
|
|||||||
'leavingDate',
|
'leavingDate',
|
||||||
];
|
];
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private toCsv: ToCsvService) {
|
constructor(
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private toCsv: ToCsvService,
|
||||||
|
) {
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
filter: new FormControl<string>('', { nonNullable: true }),
|
filter: new FormControl<string>('', { nonNullable: true }),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ const serviceName = 'EmployeeService';
|
|||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class EmployeeService {
|
export class EmployeeService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
get(id: string | null): Observable<Employee> {
|
get(id: string | null): Observable<Employee> {
|
||||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||||
|
|||||||
@@ -38,7 +38,10 @@ export class EntriesComponent implements OnInit {
|
|||||||
|
|
||||||
posted: boolean | null = null;
|
posted: boolean | null = null;
|
||||||
issue = false;
|
issue = false;
|
||||||
constructor(private route: ActivatedRoute, private router: Router) {
|
constructor(
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private router: Router,
|
||||||
|
) {
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'EntriesService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class EntriesService {
|
export class EntriesService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
list(
|
list(
|
||||||
start_date: string | null,
|
start_date: string | null,
|
||||||
|
|||||||
@@ -13,7 +13,10 @@ const serviceName = 'IssueGridService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class IssueGridService {
|
export class IssueGridService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
issueGrid(date: string): Observable<IssueGridItem[]> {
|
issueGrid(date: string): Observable<IssueGridItem[]> {
|
||||||
return this.http
|
return this.http
|
||||||
|
|||||||
@@ -11,7 +11,11 @@ import { LedgerItem } from './ledger-item';
|
|||||||
const compare = (a: string | number, b: string | number, isAsc: boolean) =>
|
const compare = (a: string | number, b: string | number, isAsc: boolean) =>
|
||||||
(a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
(a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
||||||
export class LedgerDataSource extends DataSource<LedgerItem> {
|
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();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'LedgerService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class LedgerService {
|
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> {
|
list(id: string | null, startDate: string | null, finishDate: string | null): Observable<Ledger> {
|
||||||
const listUrl = id === null ? url : `${url}/${id}`;
|
const listUrl = id === null ? url : `${url}/${id}`;
|
||||||
|
|||||||
@@ -27,7 +27,10 @@ export class NetTransactionsComponent implements OnInit {
|
|||||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||||
displayedColumns = ['type', 'name', 'debit', 'credit'];
|
displayedColumns = ['type', 'name', 'debit', 'credit'];
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private router: Router) {
|
constructor(
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private router: Router,
|
||||||
|
) {
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'NetTransactionsService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class NetTransactionsService {
|
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> {
|
list(startDate: string | null, finishDate: string | null): Observable<NetTransactions> {
|
||||||
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ export class NonContractPurchaseComponent implements OnInit {
|
|||||||
dataSource: NonContractPurchaseDatasource = new NonContractPurchaseDatasource(this.info);
|
dataSource: NonContractPurchaseDatasource = new NonContractPurchaseDatasource(this.info);
|
||||||
displayedColumns = ['date', 'vendor', 'product', 'contractPrice', 'purchasePrice'];
|
displayedColumns = ['date', 'vendor', 'product', 'contractPrice', 'purchasePrice'];
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private router: Router) {}
|
constructor(
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private router: Router,
|
||||||
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.data.subscribe((value) => {
|
this.route.data.subscribe((value) => {
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'NonContractPurchaseService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class NonContractPurchaseService {
|
export class NonContractPurchaseService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
nonContractPurchase(): Observable<NonContractPurchase[]> {
|
nonContractPurchase(): Observable<NonContractPurchase[]> {
|
||||||
return this.http
|
return this.http
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ const serviceName = 'PeriodService';
|
|||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class PeriodService {
|
export class PeriodService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
get(id: string | null): Observable<Period> {
|
get(id: string | null): Observable<Period> {
|
||||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||||
|
|||||||
@@ -13,7 +13,10 @@ const serviceName = 'ProductGroupService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class ProductGroupService {
|
export class ProductGroupService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
get(id: string | null): Observable<ProductGroup> {
|
get(id: string | null): Observable<ProductGroup> {
|
||||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'ProductLedgerService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class ProductLedgerService {
|
export class ProductLedgerService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
list(
|
list(
|
||||||
id: string | null,
|
id: string | null,
|
||||||
|
|||||||
@@ -32,7 +32,10 @@ export class ProductListComponent implements OnInit, AfterViewInit {
|
|||||||
|
|
||||||
private _showExtended = true;
|
private _showExtended = true;
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private toCsv: ToCsvService) {
|
constructor(
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private toCsv: ToCsvService,
|
||||||
|
) {
|
||||||
this.showExtended = true;
|
this.showExtended = true;
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
filter: new FormControl<string>('', { nonNullable: true }),
|
filter: new FormControl<string>('', { nonNullable: true }),
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ const serviceName = 'ProductService';
|
|||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class ProductService {
|
export class ProductService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
get(id: string | null): Observable<Product> {
|
get(id: string | null): Observable<Product> {
|
||||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||||
|
|||||||
@@ -27,7 +27,10 @@ export class ProfitLossComponent implements OnInit {
|
|||||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||||
displayedColumns = ['group', 'name', 'amount', 'total'];
|
displayedColumns = ['group', 'name', 'amount', 'total'];
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private router: Router) {
|
constructor(
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private router: Router,
|
||||||
|
) {
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'ProfitLossService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class ProfitLossService {
|
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> {
|
list(startDate: string | null, finishDate: string | null): Observable<ProfitLoss> {
|
||||||
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
||||||
|
|||||||
@@ -36,7 +36,10 @@ export class PurchaseEntriesComponent implements OnInit {
|
|||||||
'amount',
|
'amount',
|
||||||
];
|
];
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private router: Router) {
|
constructor(
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private router: Router,
|
||||||
|
) {
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'PurchaseEntriesService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class PurchaseEntriesService {
|
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> {
|
list(startDate: string | null, finishDate: string | null): Observable<PurchaseEntries> {
|
||||||
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
||||||
|
|||||||
@@ -28,7 +28,10 @@ export class PurchasesComponent implements OnInit {
|
|||||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||||
displayedColumns = ['product', 'quantity', 'rate', 'amount'];
|
displayedColumns = ['product', 'quantity', 'rate', 'amount'];
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private router: Router) {
|
constructor(
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private router: Router,
|
||||||
|
) {
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'PurchasesService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class PurchasesService {
|
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> {
|
list(startDate: string | null, finishDate: string | null): Observable<Purchases> {
|
||||||
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
||||||
|
|||||||
+1
-3
@@ -106,9 +106,7 @@
|
|||||||
<!-- Price Column -->
|
<!-- Price Column -->
|
||||||
<ng-container matColumnDef="price">
|
<ng-container matColumnDef="price">
|
||||||
<mat-header-cell *matHeaderCellDef class="right">Price</mat-header-cell>
|
<mat-header-cell *matHeaderCellDef class="right">Price</mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row" class="right">{{
|
<mat-cell *matCellDef="let row" class="right">{{ row.price | currency: 'INR' }}</mat-cell>
|
||||||
row.price | currency : 'INR'
|
|
||||||
}}</mat-cell>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!-- Action Column -->
|
<!-- Action Column -->
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'RateContractService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class RateContractService {
|
export class RateContractService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
get(id: string | null): Observable<RateContract> {
|
get(id: string | null): Observable<RateContract> {
|
||||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||||
|
|||||||
@@ -36,7 +36,11 @@ export class RawMaterialCostComponent implements OnInit {
|
|||||||
columnsNoId = ['name', 'issue', 'sale', 'rmc'];
|
columnsNoId = ['name', 'issue', 'sale', 'rmc'];
|
||||||
columnsId = ['name', 'group', 'quantity', 'net', 'gross'];
|
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({
|
this.form = new FormGroup({
|
||||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'RawMaterialCostService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class RawMaterialCostService {
|
export class RawMaterialCostService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
list(
|
list(
|
||||||
id: string | null,
|
id: string | null,
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'RecipeTemplateService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class RecipeTemplateService {
|
export class RecipeTemplateService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
get(id: string | null): Observable<RecipeTemplate> {
|
get(id: string | null): Observable<RecipeTemplate> {
|
||||||
const getUrl: string = id === null ? url : `${url}/${id}`;
|
const getUrl: string = id === null ? url : `${url}/${id}`;
|
||||||
|
|||||||
@@ -35,7 +35,10 @@ export class RecipeListComponent implements OnInit {
|
|||||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||||
displayedColumns = ['name', 'yield', 'date', 'source'];
|
displayedColumns = ['name', 'yield', 'date', 'source'];
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private router: Router) {
|
constructor(
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private router: Router,
|
||||||
|
) {
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
period: new FormControl(new Period(), { nonNullable: true }),
|
period: new FormControl(new Period(), { nonNullable: true }),
|
||||||
productGroup: new FormControl<ProductGroup | string | null>(null),
|
productGroup: new FormControl<ProductGroup | string | null>(null),
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ const serviceName = 'RecipeService';
|
|||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class RecipeService {
|
export class RecipeService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
get(id: string | null): Observable<Recipe> {
|
get(id: string | null): Observable<Recipe> {
|
||||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
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) =>
|
const compare = (a: string | number, b: string | number, isAsc: boolean) =>
|
||||||
(a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
(a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
||||||
export class RoleListDatasource extends DataSource<Role> {
|
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();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'RoleService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class RoleService {
|
export class RoleService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
get(id: string | null): Observable<Role> {
|
get(id: string | null): Observable<Role> {
|
||||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||||
|
|||||||
@@ -11,7 +11,10 @@ const serviceName = 'SettingsService';
|
|||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class SettingsService {
|
export class SettingsService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
getLockInformation(): Observable<[LockInfo]> {
|
getLockInformation(): Observable<[LockInfo]> {
|
||||||
const url = '/api/lock-information';
|
const url = '/api/lock-information';
|
||||||
|
|||||||
@@ -13,7 +13,10 @@ const serviceName = 'VoucherTypeService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class VoucherTypeService {
|
export class VoucherTypeService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
list(): Observable<AccountType[]> {
|
list(): Observable<AccountType[]> {
|
||||||
return this.http
|
return this.http
|
||||||
|
|||||||
@@ -57,9 +57,7 @@
|
|||||||
<!-- Opening Column -->
|
<!-- Opening Column -->
|
||||||
<ng-container matColumnDef="opening">
|
<ng-container matColumnDef="opening">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Opening</mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Opening</mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row" class="right">{{
|
<mat-cell *matCellDef="let row" class="right">{{ row.opening | number: '1.2-2' }}</mat-cell>
|
||||||
row.opening | number : '1.2-2'
|
|
||||||
}}</mat-cell>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!-- Purchaase Column -->
|
<!-- Purchaase Column -->
|
||||||
@@ -79,9 +77,7 @@
|
|||||||
<!-- Closing Column -->
|
<!-- Closing Column -->
|
||||||
<ng-container matColumnDef="closing">
|
<ng-container matColumnDef="closing">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Closing</mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Closing</mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row" class="right">{{
|
<mat-cell *matCellDef="let row" class="right">{{ row.closing | number: '1.2-2' }}</mat-cell>
|
||||||
row.closing | number : '1.2-2'
|
|
||||||
}}</mat-cell>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
<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. */
|
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||||
displayedColumns = ['group', 'name', 'opening', 'purchase', 'issue', 'closing'];
|
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({
|
this.form = new FormGroup({
|
||||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'StockMovementService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class StockMovementService {
|
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> {
|
list(startDate: string | null, finishDate: string | null): Observable<StockMovement> {
|
||||||
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ export class TrialBalanceComponent implements OnInit {
|
|||||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||||
displayedColumns = ['type', 'name', 'debit', 'credit'];
|
displayedColumns = ['type', 'name', 'debit', 'credit'];
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private router: Router) {
|
constructor(
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private router: Router,
|
||||||
|
) {
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
date: new FormControl(new Date(), { nonNullable: true }),
|
date: new FormControl(new Date(), { nonNullable: true }),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ const serviceName = 'TrialBalanceService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class TrialBalanceService {
|
export class TrialBalanceService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
list(date: string | null): Observable<TrialBalance> {
|
list(date: string | null): Observable<TrialBalance> {
|
||||||
const listUrl = date === null ? url : `${url}/${date}`;
|
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);
|
(a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
||||||
|
|
||||||
export class UserListDataSource extends DataSource<User> {
|
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();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,10 @@ const serviceName = 'UserService';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class UserService {
|
export class UserService {
|
||||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private log: ErrorLoggerService,
|
||||||
|
) {}
|
||||||
|
|
||||||
get(id: string | null): Observable<User> {
|
get(id: string | null): Observable<User> {
|
||||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user