diff --git a/.browserslistrc b/.browserslistrc index f5543dc88e..719d8e50c6 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -8,5 +8,12 @@ Firefox ESR not dead not kaios 2.5 not op_mini all -# For IE 9-11 support, please uncomment the next line and adjust as needed -# IE 9-11 +not and_qq 14.9 +not and_uc 15.5 +not android 141 +not kaios 3.0-3.1 +not op_mob 80 +not opera 122 +not opera 121 +not samsung 28 +not samsung 27 \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d52582a2d6..181ca043bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,7 @@ jobs: # no support for lts as of now with github actions. # issue link : https://github.com/actions/setup-node/issues/26 # lts/gallium node v19.7.0 (npm v9.5.0) - node-version: '22.9.0' + node-version: '22.12.0' - name: Remove node_modules run: rm -rf node_modules diff --git a/.htmlhintrc b/.htmlhintrc index 007af1f90c..764020221a 100644 --- a/.htmlhintrc +++ b/.htmlhintrc @@ -3,7 +3,7 @@ "attr-lowercase": false, "attr-value-double-quotes": true, "tag-pair": true, - "spec-char-escape": true, + "spec-char-escape": false, "id-unique": true, "src-not-empty": true, "attr-no-duplication": true, diff --git a/angular.json b/angular.json index 4b90ba9755..fcfbfebcae 100644 --- a/angular.json +++ b/angular.json @@ -226,6 +226,30 @@ }, "@angular-eslint/schematics:library": { "setParserOptionsProject": true + }, + "@schematics/angular:component": { + "type": "component" + }, + "@schematics/angular:directive": { + "type": "directive" + }, + "@schematics/angular:service": { + "type": "service" + }, + "@schematics/angular:guard": { + "typeSeparator": "." + }, + "@schematics/angular:interceptor": { + "typeSeparator": "." + }, + "@schematics/angular:module": { + "typeSeparator": "." + }, + "@schematics/angular:pipe": { + "typeSeparator": "." + }, + "@schematics/angular:resolver": { + "typeSeparator": "." } } } diff --git a/eslint.config.js b/eslint.config.js index 92742d671d..50f2367a31 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -51,7 +51,8 @@ module.exports = [ style: 'camelCase', type: 'attribute' } - ] + ], + '@angular-eslint/prefer-inject': 'off' } }, diff --git a/package-lock.json b/package-lock.json index ceed020b47..42a72a9224 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,28 +10,27 @@ "hasInstallScript": true, "license": "MPL-2.0", "dependencies": { - "@angular-devkit/schematics": "19.2.15", - "@angular/animations": "19.2.14", - "@angular/cdk": "^19.2.18", - "@angular/common": "19.2.14", - "@angular/compiler": "19.2.14", - "@angular/core": "19.2.14", - "@angular/forms": "19.2.14", - "@angular/localize": "19.2.14", - "@angular/material": "^19.2.18", - "@angular/platform-browser": "19.2.14", - "@angular/platform-browser-dynamic": "19.2.14", - "@angular/router": "19.2.14", + "@angular/animations": "20.3.9", + "@angular/cdk": "^20.2.10", + "@angular/common": "20.3.9", + "@angular/compiler": "20.3.9", + "@angular/core": "20.3.9", + "@angular/forms": "20.3.9", + "@angular/localize": "20.3.9", + "@angular/material": "^20.2.10", + "@angular/platform-browser": "20.3.9", + "@angular/platform-browser-dynamic": "20.3.9", + "@angular/router": "20.3.9", "@ckeditor/ckeditor5-angular": "6.0.1", "@ckeditor/ckeditor5-build-classic": "40.2.0", - "@fortawesome/angular-fontawesome": "^1.0.0", + "@fortawesome/angular-fontawesome": "^3.0.0", "@fortawesome/fontawesome-free": "^6.7.2", - "@fortawesome/fontawesome-svg-core": "6.2.1", - "@fortawesome/free-brands-svg-icons": "6.7.2", - "@fortawesome/free-solid-svg-icons": "6.2.1", + "@fortawesome/fontawesome-svg-core": "^6.7.2", + "@fortawesome/free-brands-svg-icons": "^6.7.2", + "@fortawesome/free-solid-svg-icons": "^6.7.2", "@ngx-translate/core": "^16.0.4", "@ngx-translate/http-loader": "^16.0.1", - "@swimlane/ngx-graph": "^10.0.0", + "@swimlane/ngx-graph": "^11.0.0", "@tailwindcss/forms": "^0.5.4", "chart.js": "3.0.0-alpha", "d3": "^7.9.0", @@ -41,23 +40,23 @@ "jspdf-autotable": "^5.0.2", "lodash": "4.17.21", "moment": "^2.29.4", - "ngx-mat-select-search": "^7.0.10", - "rxjs": "7.8.1", - "tslib": "^2.0.0", + "ngx-mat-select-search": "^8.0.2", + "rxjs": "^7.8.2", + "tslib": "^2.8.1", "vkbeautify": "^0.99.3", "zone.js": "0.15.1" }, "devDependencies": { - "@angular-builders/jest": "^19.0.1", - "@angular-eslint/builder": "^19.7.0", - "@angular-eslint/eslint-plugin": "^19.7.0", - "@angular-eslint/eslint-plugin-template": "^19.7.0", - "@angular-eslint/schematics": "^19.7.0", - "@angular-eslint/template-parser": "^19.7.0", - "@angular/build": "^19.2.15", - "@angular/cli": "19.2.15", - "@angular/compiler-cli": "19.2.14", - "@angular/language-service": "19.2.14", + "@angular-builders/jest": "^20.0.0", + "@angular-eslint/builder": "^20.5.0", + "@angular-eslint/eslint-plugin": "^20.5.0", + "@angular-eslint/eslint-plugin-template": "^20.5.0", + "@angular-eslint/schematics": "^20.5.0", + "@angular-eslint/template-parser": "^20.5.0", + "@angular/build": "^20.3.8", + "@angular/cli": "20.3.8", + "@angular/compiler-cli": "20.3.9", + "@angular/language-service": "20.3.9", "@cypress/schematic": "^2.5.2", "@types/d3-dispatch": "^3.0.1", "@types/d3-drag": "^3.0.1", @@ -69,11 +68,11 @@ "@types/lodash": "4.14.132", "@types/node": "22.15.29", "@types/vkbeautify": "^0.99.2", - "@typescript-eslint/eslint-plugin": "^8.26.1", - "@typescript-eslint/parser": "^8.26.1", + "@typescript-eslint/eslint-plugin": "^8.46.2", + "@typescript-eslint/parser": "^8.46.2", "@vendure/ngx-translate-extract": "^9.4.0", "cypress": "^13.17.0", - "eslint": "^8.57.0", + "eslint": "^9.38.0", "git-describe": "^4.1.1", "htmlhint": "1.1.4", "https-proxy-agent": "7.0.2", @@ -81,7 +80,7 @@ "jasmine-core": "^4.2.0", "jasmine-spec-reporter": "~5.0.0", "jest": "^29.7.0", - "jest-preset-angular": "^14.6.0", + "jest-preset-angular": "^14.6.2", "lint-staged": "^15.2.10", "prettier": "^3.3.3", "prettier-plugin-multiline-arrays": "^3.0.6", @@ -92,13 +91,222 @@ "stylelint-scss": "^6.8.1", "tailwindcss": "^3.3.3", "ts-node": "^10.9.2", - "typescript": "^5.4.5" + "typescript": "^5.8.3" }, "engines": { - "node": ">= 16.15.1", + "node": ">= 20.11.1", "npm": ">= 8.11.0" } }, + "node_modules/@algolia/abtesting": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@algolia/abtesting/-/abtesting-1.1.0.tgz", + "integrity": "sha512-sEyWjw28a/9iluA37KLGu8vjxEIlb60uxznfTUmXImy7H5NvbpSO6yYgmgH5KiD7j+zTUUihiST0jEP12IoXow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.35.0", + "@algolia/requester-browser-xhr": "5.35.0", + "@algolia/requester-fetch": "5.35.0", + "@algolia/requester-node-http": "5.35.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-abtesting": { + "version": "5.35.0", + "resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.35.0.tgz", + "integrity": "sha512-uUdHxbfHdoppDVflCHMxRlj49/IllPwwQ2cQ8DLC4LXr3kY96AHBpW0dMyi6ygkn2MtFCc6BxXCzr668ZRhLBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.35.0", + "@algolia/requester-browser-xhr": "5.35.0", + "@algolia/requester-fetch": "5.35.0", + "@algolia/requester-node-http": "5.35.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-analytics": { + "version": "5.35.0", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.35.0.tgz", + "integrity": "sha512-SunAgwa9CamLcRCPnPHx1V2uxdQwJGqb1crYrRWktWUdld0+B2KyakNEeVn5lln4VyeNtW17Ia7V7qBWyM/Skw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.35.0", + "@algolia/requester-browser-xhr": "5.35.0", + "@algolia/requester-fetch": "5.35.0", + "@algolia/requester-node-http": "5.35.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-common": { + "version": "5.35.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.35.0.tgz", + "integrity": "sha512-ipE0IuvHu/bg7TjT2s+187kz/E3h5ssfTtjpg1LbWMgxlgiaZIgTTbyynM7NfpSJSKsgQvCQxWjGUO51WSCu7w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-insights": { + "version": "5.35.0", + "resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.35.0.tgz", + "integrity": "sha512-UNbCXcBpqtzUucxExwTSfAe8gknAJ485NfPN6o1ziHm6nnxx97piIbcBQ3edw823Tej2Wxu1C0xBY06KgeZ7gA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.35.0", + "@algolia/requester-browser-xhr": "5.35.0", + "@algolia/requester-fetch": "5.35.0", + "@algolia/requester-node-http": "5.35.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-personalization": { + "version": "5.35.0", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.35.0.tgz", + "integrity": "sha512-/KWjttZ6UCStt4QnWoDAJ12cKlQ+fkpMtyPmBgSS2WThJQdSV/4UWcqCUqGH7YLbwlj3JjNirCu3Y7uRTClxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.35.0", + "@algolia/requester-browser-xhr": "5.35.0", + "@algolia/requester-fetch": "5.35.0", + "@algolia/requester-node-http": "5.35.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-query-suggestions": { + "version": "5.35.0", + "resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.35.0.tgz", + "integrity": "sha512-8oCuJCFf/71IYyvQQC+iu4kgViTODbXDk3m7yMctEncRSRV+u2RtDVlpGGfPlJQOrAY7OONwJlSHkmbbm2Kp/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.35.0", + "@algolia/requester-browser-xhr": "5.35.0", + "@algolia/requester-fetch": "5.35.0", + "@algolia/requester-node-http": "5.35.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-search": { + "version": "5.35.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.35.0.tgz", + "integrity": "sha512-FfmdHTrXhIduWyyuko1YTcGLuicVbhUyRjO3HbXE4aP655yKZgdTIfMhZ/V5VY9bHuxv/fGEh3Od1Lvv2ODNTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.35.0", + "@algolia/requester-browser-xhr": "5.35.0", + "@algolia/requester-fetch": "5.35.0", + "@algolia/requester-node-http": "5.35.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/ingestion": { + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.35.0.tgz", + "integrity": "sha512-gPzACem9IL1Co8mM1LKMhzn1aSJmp+Vp434An4C0OBY4uEJRcqsLN3uLBlY+bYvFg8C8ImwM9YRiKczJXRk0XA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.35.0", + "@algolia/requester-browser-xhr": "5.35.0", + "@algolia/requester-fetch": "5.35.0", + "@algolia/requester-node-http": "5.35.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/monitoring": { + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.35.0.tgz", + "integrity": "sha512-w9MGFLB6ashI8BGcQoVt7iLgDIJNCn4OIu0Q0giE3M2ItNrssvb8C0xuwJQyTy1OFZnemG0EB1OvXhIHOvQwWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.35.0", + "@algolia/requester-browser-xhr": "5.35.0", + "@algolia/requester-fetch": "5.35.0", + "@algolia/requester-node-http": "5.35.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/recommend": { + "version": "5.35.0", + "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.35.0.tgz", + "integrity": "sha512-AhrVgaaXAb8Ue0u2nuRWwugt0dL5UmRgS9LXe0Hhz493a8KFeZVUE56RGIV3hAa6tHzmAV7eIoqcWTQvxzlJeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.35.0", + "@algolia/requester-browser-xhr": "5.35.0", + "@algolia/requester-fetch": "5.35.0", + "@algolia/requester-node-http": "5.35.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/requester-browser-xhr": { + "version": "5.35.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.35.0.tgz", + "integrity": "sha512-diY415KLJZ6x1Kbwl9u96Jsz0OstE3asjXtJ9pmk1d+5gPuQ5jQyEsgC+WmEXzlec3iuVszm8AzNYYaqw6B+Zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.35.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/requester-fetch": { + "version": "5.35.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.35.0.tgz", + "integrity": "sha512-uydqnSmpAjrgo8bqhE9N1wgcB98psTRRQXcjc4izwMB7yRl9C8uuAQ/5YqRj04U0mMQ+fdu2fcNF6m9+Z1BzDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.35.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/requester-node-http": { + "version": "5.35.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.35.0.tgz", + "integrity": "sha512-RgLX78ojYOrThJHrIiPzT4HW3yfQa0D7K+MQ81rhxqaNyNBu4F1r+72LNHYH/Z+y9I1Mrjrd/c/Ue5zfDgAEjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.35.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, "node_modules/@alloc/quick-lru": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", @@ -125,48 +333,48 @@ } }, "node_modules/@angular-builders/common": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@angular-builders/common/-/common-3.0.1.tgz", - "integrity": "sha512-AIIqWtlr3sc2+CTEOqbDsrpVvkT6ijfYzvzPk1HLFrcP9Y2tYLXVFc+gGThlE+e1Om0pKminXcINEqm3J/yY5g==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@angular-builders/common/-/common-4.0.0.tgz", + "integrity": "sha512-bepZI1KdXUVhDGqHOudZQJwucSbZWxfWzM+EHFXUoExUO0u7XEuHTF5bhtQZ+YU+ZK2Ayl26QbI/26Yj72vcFQ==", "dev": true, "license": "MIT", "dependencies": { - "@angular-devkit/core": "^19.0.0", + "@angular-devkit/core": "^20.0.0", "ts-node": "^10.0.0", - "tsconfig-paths": "^4.1.0" + "tsconfig-paths": "^4.2.0" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" } }, "node_modules/@angular-builders/jest": { - "version": "19.0.1", - "resolved": "https://registry.npmjs.org/@angular-builders/jest/-/jest-19.0.1.tgz", - "integrity": "sha512-mi4HMQkyb1Z+pPRIKt70Uk/EBoDUirPqhv3xlz1/WpPqpxXz8y+Y3ffutot4JJDmzJw2p4h3x2hh6D3Kbocraw==", + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/@angular-builders/jest/-/jest-20.0.0.tgz", + "integrity": "sha512-3rnobnIdErtjyM3yAAAOdod79lgbkf1QWMFHiRDHW4tw4f+DLFiM2HMFircCoO5WIe/ILEJE9GNxs/vvYa3gvw==", "dev": true, "license": "MIT", "dependencies": { - "@angular-builders/common": "3.0.1", - "@angular-devkit/architect": ">=0.1900.0 < 0.2000.0", - "@angular-devkit/core": "^19.0.0", - "jest-preset-angular": "14.5.4", + "@angular-builders/common": "4.0.0", + "@angular-devkit/architect": ">=0.2000.0 < 0.2100.0", + "@angular-devkit/core": "^20.0.0", + "jest-preset-angular": "14.6.0", "lodash": "^4.17.15" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" }, "peerDependencies": { - "@angular-devkit/build-angular": "^19.0.0", - "@angular/compiler-cli": "^19.0.0", - "@angular/core": "^19.0.0", - "@angular/platform-browser-dynamic": "^19.0.0", + "@angular-devkit/build-angular": "^20.0.0", + "@angular/compiler-cli": "^20.0.0", + "@angular/core": "^20.0.0", + "@angular/platform-browser-dynamic": "^20.0.0", "jest": ">=29" } }, "node_modules/@angular-builders/jest/node_modules/jest-preset-angular": { - "version": "14.5.4", - "resolved": "https://registry.npmjs.org/jest-preset-angular/-/jest-preset-angular-14.5.4.tgz", - "integrity": "sha512-vbil9qTrZljzVJNsDIxEhWVb4r6BQumXEgIHCAVkHJjpF1fYkIB4bczPAe58lBZH2gKeRHBSj8/IoGpGBI1qiQ==", + "version": "14.6.0", + "resolved": "https://registry.npmjs.org/jest-preset-angular/-/jest-preset-angular-14.6.0.tgz", + "integrity": "sha512-LGSKLCsUhtrs2dw6f7ega/HOS8/Ni/1gV+oXmxPHmJDLHFpM6cI78Monmz8Z1P87a/A4OwnKilxgPRr+6Pzmgg==", "dev": true, "license": "MIT", "dependencies": { @@ -184,9 +392,9 @@ "esbuild": ">=0.15.13" }, "peerDependencies": { - "@angular/compiler-cli": ">=15.0.0 <20.0.0", - "@angular/core": ">=15.0.0 <20.0.0", - "@angular/platform-browser-dynamic": ">=15.0.0 <20.0.0", + "@angular/compiler-cli": ">=15.0.0 <21.0.0", + "@angular/core": ">=15.0.0 <21.0.0", + "@angular/platform-browser-dynamic": ">=15.0.0 <21.0.0", "jest": "^29.0.0", "jsdom": ">=20.0.0", "typescript": ">=4.8" @@ -198,113 +406,120 @@ } }, "node_modules/@angular-devkit/architect": { - "version": "0.1902.17", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1902.17.tgz", - "integrity": "sha512-/LV8lXi6/SqevyI9ZAk2uAqlnN/pUwNwD6SyjotCqU55FBhBW8vM3/GucFXawJqTOzNmBXuMx1YVvQN5H0v5LQ==", + "version": "0.2003.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.2003.8.tgz", + "integrity": "sha512-pbXQ2NlZQwzjsSIEoRQMGB1WrgZFCyM0zoD9h+rDjyR8PEB1Evl4evZ4Q5CJzjEBxC8IEG61PHKHjh8GdLb+sg==", "dev": true, "license": "MIT", "dependencies": { - "@angular-devkit/core": "19.2.17", - "rxjs": "7.8.1" + "@angular-devkit/core": "20.3.8", + "rxjs": "7.8.2" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "node": "^20.19.0 || ^22.12.0 || >=24.0.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", "yarn": ">= 1.13.0" } }, "node_modules/@angular-devkit/build-angular": { - "version": "19.2.17", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-19.2.17.tgz", - "integrity": "sha512-lbvzNoSjHlhP6bcHtFMlEQHG/Zxc1tTdwoelm4+AWPuQH4rGfoty4SXH4rr50SXVBUg9Zb4xZuChOYZmYKpGLQ==", + "version": "20.3.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-20.3.8.tgz", + "integrity": "sha512-U+dSQL/M9orZFPHGgkW/MoAWVGc65TMRChvQ+W4iGB8jQ4z3gE91tTrsKnaJn7D+vW95nAkdGWAVCl7YRf1hhA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "@ampproject/remapping": "2.3.0", - "@angular-devkit/architect": "0.1902.17", - "@angular-devkit/build-webpack": "0.1902.17", - "@angular-devkit/core": "19.2.17", - "@angular/build": "19.2.17", - "@babel/core": "7.26.10", - "@babel/generator": "7.26.10", - "@babel/helper-annotate-as-pure": "7.25.9", + "@angular-devkit/architect": "0.2003.8", + "@angular-devkit/build-webpack": "0.2003.8", + "@angular-devkit/core": "20.3.8", + "@angular/build": "20.3.8", + "@babel/core": "7.28.3", + "@babel/generator": "7.28.3", + "@babel/helper-annotate-as-pure": "7.27.3", "@babel/helper-split-export-declaration": "7.24.7", - "@babel/plugin-transform-async-generator-functions": "7.26.8", - "@babel/plugin-transform-async-to-generator": "7.25.9", - "@babel/plugin-transform-runtime": "7.26.10", - "@babel/preset-env": "7.26.9", - "@babel/runtime": "7.26.10", + "@babel/plugin-transform-async-generator-functions": "7.28.0", + "@babel/plugin-transform-async-to-generator": "7.27.1", + "@babel/plugin-transform-runtime": "7.28.3", + "@babel/preset-env": "7.28.3", + "@babel/runtime": "7.28.3", "@discoveryjs/json-ext": "0.6.3", - "@ngtools/webpack": "19.2.17", - "@vitejs/plugin-basic-ssl": "1.2.0", + "@ngtools/webpack": "20.3.8", "ansi-colors": "4.1.3", - "autoprefixer": "10.4.20", - "babel-loader": "9.2.1", + "autoprefixer": "10.4.21", + "babel-loader": "10.0.0", "browserslist": "^4.21.5", - "copy-webpack-plugin": "12.0.2", + "copy-webpack-plugin": "13.0.1", "css-loader": "7.1.2", - "esbuild-wasm": "0.25.4", + "esbuild-wasm": "0.25.9", "fast-glob": "3.3.3", "http-proxy-middleware": "3.0.5", "istanbul-lib-instrument": "6.0.3", "jsonc-parser": "3.3.1", "karma-source-map-support": "1.4.0", - "less": "4.2.2", - "less-loader": "12.2.0", + "less": "4.4.0", + "less-loader": "12.3.0", "license-webpack-plugin": "4.0.2", "loader-utils": "3.3.1", - "mini-css-extract-plugin": "2.9.2", - "open": "10.1.0", - "ora": "5.4.1", - "picomatch": "4.0.2", - "piscina": "4.8.0", - "postcss": "8.5.2", + "mini-css-extract-plugin": "2.9.4", + "open": "10.2.0", + "ora": "8.2.0", + "picomatch": "4.0.3", + "piscina": "5.1.3", + "postcss": "8.5.6", "postcss-loader": "8.1.1", "resolve-url-loader": "5.0.0", - "rxjs": "7.8.1", - "sass": "1.85.0", + "rxjs": "7.8.2", + "sass": "1.90.0", "sass-loader": "16.0.5", - "semver": "7.7.1", + "semver": "7.7.2", "source-map-loader": "5.0.0", "source-map-support": "0.5.21", - "terser": "5.39.0", + "terser": "5.43.1", "tree-kill": "1.2.2", "tslib": "2.8.1", - "webpack": "5.98.0", + "webpack": "5.101.2", "webpack-dev-middleware": "7.4.2", "webpack-dev-server": "5.2.2", "webpack-merge": "6.0.1", "webpack-subresource-integrity": "5.1.0" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "node": "^20.19.0 || ^22.12.0 || >=24.0.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", "yarn": ">= 1.13.0" }, "optionalDependencies": { - "esbuild": "0.25.4" + "esbuild": "0.25.9" }, "peerDependencies": { - "@angular/compiler-cli": "^19.0.0 || ^19.2.0-next.0", - "@angular/localize": "^19.0.0 || ^19.2.0-next.0", - "@angular/platform-server": "^19.0.0 || ^19.2.0-next.0", - "@angular/service-worker": "^19.0.0 || ^19.2.0-next.0", - "@angular/ssr": "^19.2.17", + "@angular/compiler-cli": "^20.0.0", + "@angular/core": "^20.0.0", + "@angular/localize": "^20.0.0", + "@angular/platform-browser": "^20.0.0", + "@angular/platform-server": "^20.0.0", + "@angular/service-worker": "^20.0.0", + "@angular/ssr": "^20.3.8", "@web/test-runner": "^0.20.0", "browser-sync": "^3.0.2", - "jest": "^29.5.0", - "jest-environment-jsdom": "^29.5.0", + "jest": "^29.5.0 || ^30.2.0", + "jest-environment-jsdom": "^29.5.0 || ^30.2.0", "karma": "^6.3.0", - "ng-packagr": "^19.0.0 || ^19.2.0-next.0", + "ng-packagr": "^20.0.0", "protractor": "^7.0.0", "tailwindcss": "^2.0.0 || ^3.0.0 || ^4.0.0", - "typescript": ">=5.5 <5.9" + "typescript": ">=5.8 <6.0" }, "peerDependenciesMeta": { + "@angular/core": { + "optional": true + }, "@angular/localize": { "optional": true }, + "@angular/platform-browser": { + "optional": true + }, "@angular/platform-server": { "optional": true }, @@ -341,18 +556,18 @@ } }, "node_modules/@angular-devkit/build-webpack": { - "version": "0.1902.17", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1902.17.tgz", - "integrity": "sha512-8NVJL7ujeTYKR1LgErkc5UN3EEoGYasqtu5AACXraFf9NLOw2p9N0+QY4cfjIwip1nyBp0RRzlBS4omGEymJCw==", + "version": "0.2003.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.2003.8.tgz", + "integrity": "sha512-IKLQCe7BgV8XRl9m6oirU5XQ9ojq214GH6GKw8dvGg1MCIxv/TfB3pRTPexgOqPaWk6SONyXj6tshB+Nluk3nw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@angular-devkit/architect": "0.1902.17", - "rxjs": "7.8.1" + "@angular-devkit/architect": "0.2003.8", + "rxjs": "7.8.2" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "node": "^20.19.0 || ^22.12.0 || >=24.0.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", "yarn": ">= 1.13.0" }, @@ -362,21 +577,21 @@ } }, "node_modules/@angular-devkit/core": { - "version": "19.2.17", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-19.2.17.tgz", - "integrity": "sha512-Ah008x2RJkd0F+NLKqIpA34/vUGwjlprRCkvddjDopAWRzYn6xCkz1Tqwuhn0nR1Dy47wTLKYD999TYl5ONOAQ==", + "version": "20.3.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-20.3.8.tgz", + "integrity": "sha512-+YFpJdvlL4gxnMm/++8rseE7ZNRHlYPmOqpoiXSuP5eGPSmdklEoQGTQvpMw42S3bll1g6/029DmV2FCZ/dtEQ==", "dev": true, "license": "MIT", "dependencies": { "ajv": "8.17.1", "ajv-formats": "3.0.1", "jsonc-parser": "3.3.1", - "picomatch": "4.0.2", - "rxjs": "7.8.1", - "source-map": "0.7.4" + "picomatch": "4.0.3", + "rxjs": "7.8.2", + "source-map": "0.7.6" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "node": "^20.19.0 || ^22.12.0 || >=24.0.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", "yarn": ">= 1.13.0" }, @@ -390,59 +605,33 @@ } }, "node_modules/@angular-devkit/schematics": { - "version": "19.2.15", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-19.2.15.tgz", - "integrity": "sha512-kNOJ+3vekJJCQKWihNmxBkarJzNW09kP5a9E1SRNiQVNOUEeSwcRR0qYotM65nx821gNzjjhJXnAZ8OazWldrg==", + "version": "20.3.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-20.3.8.tgz", + "integrity": "sha512-Ymv7nWLTDB1gBh2laRveO912eUpQ/rUIzKRr8VQFMVG/wNipL88vzyrlKhJa7WhQ3CdKxLD7kplFIjdev7XUVg==", + "dev": true, "license": "MIT", "dependencies": { - "@angular-devkit/core": "19.2.15", + "@angular-devkit/core": "20.3.8", "jsonc-parser": "3.3.1", "magic-string": "0.30.17", - "ora": "5.4.1", - "rxjs": "7.8.1" - }, - "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0", - "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", - "yarn": ">= 1.13.0" - } - }, - "node_modules/@angular-devkit/schematics/node_modules/@angular-devkit/core": { - "version": "19.2.15", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-19.2.15.tgz", - "integrity": "sha512-pU2RZYX6vhd7uLSdLwPnuBcr0mXJSjp3EgOXKsrlQFQZevc+Qs+2JdXgIElnOT/aDqtRtriDmLlSbtdE8n3ZbA==", - "license": "MIT", - "dependencies": { - "ajv": "8.17.1", - "ajv-formats": "3.0.1", - "jsonc-parser": "3.3.1", - "picomatch": "4.0.2", - "rxjs": "7.8.1", - "source-map": "0.7.4" + "ora": "8.2.0", + "rxjs": "7.8.2" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "node": "^20.19.0 || ^22.12.0 || >=24.0.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", "yarn": ">= 1.13.0" - }, - "peerDependencies": { - "chokidar": "^4.0.0" - }, - "peerDependenciesMeta": { - "chokidar": { - "optional": true - } } }, "node_modules/@angular-eslint/builder": { - "version": "19.8.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-19.8.1.tgz", - "integrity": "sha512-NOMkw0xgDoDVCLkL5nkkvdd3ouDYkOGqtEmabTR7N4/kQnk1R4coOTWGCqAgMXCFdxlyjuxquDwuJ+yni81pRg==", + "version": "20.5.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-20.5.0.tgz", + "integrity": "sha512-ycrvgomFgitSwzDndo+i3Ob1iu9lAJeuZZ8cwBR4E/RYsCxNm02NLCv5qjQ3ya57yjkh12N6yvjzWnCO9Vdiuw==", "dev": true, "license": "MIT", "dependencies": { - "@angular-devkit/architect": ">= 0.1900.0 < 0.2000.0", - "@angular-devkit/core": ">= 19.0.0 < 20.0.0" + "@angular-devkit/architect": ">= 0.2000.0 < 0.2100.0", + "@angular-devkit/core": ">= 20.0.0 < 21.0.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", @@ -450,21 +639,22 @@ } }, "node_modules/@angular-eslint/bundled-angular-compiler": { - "version": "19.8.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-19.8.1.tgz", - "integrity": "sha512-WXi1YbSs7SIQo48u+fCcc5Nt14/T4QzYQPLZUnjtsUXPgQG7ZoahhcGf7PPQ+n0V3pSopHOlSHwqK+tSsYK87A==", + "version": "20.5.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-20.5.0.tgz", + "integrity": "sha512-XjvSZk+G/4rRUOLHHjlHBeS4OnnsLV9G1YtE5OerBB2H4x6nKgUEzpptad3uuL4iYWI9rGaWMLqGPTvyYqw/IA==", "dev": true, "license": "MIT" }, "node_modules/@angular-eslint/eslint-plugin": { - "version": "19.8.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-19.8.1.tgz", - "integrity": "sha512-wZEBMPwD2TRhifG751hcj137EMIEaFmsxRB2EI+vfINCgPnFGSGGOHXqi8aInn9fXqHs7VbXkAzXYdBsvy1m4Q==", + "version": "20.5.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-20.5.0.tgz", + "integrity": "sha512-xpBrx4qCq0mzQ1lmqHa06faxHuKvBZGYb5owP/vTQBr2kZvQ502ENp5vwv+NS04TRKcWht1zHbMfy9rKRdhL5w==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "19.8.1", - "@angular-eslint/utils": "19.8.1" + "@angular-eslint/bundled-angular-compiler": "20.5.0", + "@angular-eslint/utils": "20.5.0", + "ts-api-utils": "^2.1.0" }, "peerDependencies": { "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", @@ -473,19 +663,19 @@ } }, "node_modules/@angular-eslint/eslint-plugin-template": { - "version": "19.8.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-19.8.1.tgz", - "integrity": "sha512-0ZVQldndLrDfB0tzFe/uIwvkUcakw8qGxvkEU0l7kSbv/ngNQ/qrkRi7P64otB15inIDUNZI2jtmVat52dqSfQ==", + "version": "20.5.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-20.5.0.tgz", + "integrity": "sha512-sX3TgTTGusYv4CjnEWWNvSyVCPmf2WF2LT5NpcKF+4BLcIVLXHdTXKz9H+OxIHeHk9R7QSRkuop/F7DAKyEPhA==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "19.8.1", - "@angular-eslint/utils": "19.8.1", + "@angular-eslint/bundled-angular-compiler": "20.5.0", + "@angular-eslint/utils": "20.5.0", "aria-query": "5.3.2", "axobject-query": "4.1.0" }, "peerDependencies": { - "@angular-eslint/template-parser": "19.8.1", + "@angular-eslint/template-parser": "20.5.0", "@typescript-eslint/types": "^7.11.0 || ^8.0.0", "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", "eslint": "^8.57.0 || ^9.0.0", @@ -493,25 +683,25 @@ } }, "node_modules/@angular-eslint/schematics": { - "version": "19.8.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-19.8.1.tgz", - "integrity": "sha512-MKzfO3puOCuQFgP8XDUkEr5eaqcCQLAdYLLMcywEO/iRs1eRHL46+rkW+SjDp1cUqlxKtu+rLiTYr0T/O4fi9Q==", + "version": "20.5.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-20.5.0.tgz", + "integrity": "sha512-pYGxMKocgUzKIMOOYBcGjvtxRcvnOY5ETs64IFcdHnwKoFfWeQV0a77sJdDj1YGOu/mj4PeORTRHfQyLvbhvyQ==", "dev": true, "license": "MIT", "dependencies": { - "@angular-devkit/core": ">= 19.0.0 < 20.0.0", - "@angular-devkit/schematics": ">= 19.0.0 < 20.0.0", - "@angular-eslint/eslint-plugin": "19.8.1", - "@angular-eslint/eslint-plugin-template": "19.8.1", + "@angular-devkit/core": ">= 20.0.0 < 21.0.0", + "@angular-devkit/schematics": ">= 20.0.0 < 21.0.0", + "@angular-eslint/eslint-plugin": "20.5.0", + "@angular-eslint/eslint-plugin-template": "20.5.0", "ignore": "7.0.5", - "semver": "7.7.2", + "semver": "7.7.3", "strip-json-comments": "3.1.1" } }, "node_modules/@angular-eslint/schematics/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "bin": { @@ -522,13 +712,13 @@ } }, "node_modules/@angular-eslint/template-parser": { - "version": "19.8.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-19.8.1.tgz", - "integrity": "sha512-pQiOg+se1AU/ncMlnJ9V6xYnMQ84qI1BGWuJpbU6A99VTXJg90scg0+T7DWmKssR1YjP5qmmBtrZfKsHEcLW/A==", + "version": "20.5.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-20.5.0.tgz", + "integrity": "sha512-dWaz2Knjy6yJI5/xVYqp5iu65b725wveMwt1DgJ9EDTZ5gpJcTsvSCW4zQr/6iXfpAZHKPh9LJvVW1svowhtWw==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "19.8.1", + "@angular-eslint/bundled-angular-compiler": "20.5.0", "eslint-scope": "^8.0.2" }, "peerDependencies": { @@ -537,13 +727,13 @@ } }, "node_modules/@angular-eslint/utils": { - "version": "19.8.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-19.8.1.tgz", - "integrity": "sha512-gVDKYWmAjeTPtaYmddT/HS03fCebXJtrk8G1MouQIviZbHqLjap6TbVlzlkBigRzaF0WnFnrDduQslkJzEdceA==", + "version": "20.5.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-20.5.0.tgz", + "integrity": "sha512-eP8al/UKP9FpmwK3hVWkYUjBuq4BnUDrcboS51L9mRZsoOblkPt1/UgU6MJqW8sh6sfebP9N3RxLQOAFrM3juQ==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "19.8.1" + "@angular-eslint/bundled-angular-compiler": "20.5.0" }, "peerDependencies": { "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", @@ -552,81 +742,90 @@ } }, "node_modules/@angular/animations": { - "version": "19.2.14", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-19.2.14.tgz", - "integrity": "sha512-xhl8fLto5HHJdVj8Nb6EoBEiTAcXuWDYn1q5uHcGxyVH3kiwENWy/2OQXgCr2CuWo2e6hNUGzSLf/cjbsMNqEA==", + "version": "20.3.9", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-20.3.9.tgz", + "integrity": "sha512-ckpRdtRV16u96ULipXTF0ZTMSe3kBZL7+Q6OYi2AsNPlrO4CUhdM8XWH0CE2lZVDkg7XNstjswfikeH8UaQVTw==", "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" }, "peerDependencies": { - "@angular/common": "19.2.14", - "@angular/core": "19.2.14" + "@angular/core": "20.3.9" } }, "node_modules/@angular/build": { - "version": "19.2.17", - "resolved": "https://registry.npmjs.org/@angular/build/-/build-19.2.17.tgz", - "integrity": "sha512-JrF9dSrsMip2xJzSz3zNoozBXu/OYg0bHuKfuPA/usPhz5AomJ2SQ2unvl6sDF00pTlgJohJMQ6SUHjylybn2g==", + "version": "20.3.8", + "resolved": "https://registry.npmjs.org/@angular/build/-/build-20.3.8.tgz", + "integrity": "sha512-wE6/T1FIjDSXljyNPh7KEwK5ysH3/uq2h8ZB5UCAAUkPHcQ/Y1unk27TUYePO7++KjkYXUX6XwwYZksXCZFJjA==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "2.3.0", - "@angular-devkit/architect": "0.1902.17", - "@babel/core": "7.26.10", - "@babel/helper-annotate-as-pure": "7.25.9", + "@angular-devkit/architect": "0.2003.8", + "@babel/core": "7.28.3", + "@babel/helper-annotate-as-pure": "7.27.3", "@babel/helper-split-export-declaration": "7.24.7", - "@babel/plugin-syntax-import-attributes": "7.26.0", - "@inquirer/confirm": "5.1.6", - "@vitejs/plugin-basic-ssl": "1.2.0", - "beasties": "0.3.2", + "@inquirer/confirm": "5.1.14", + "@vitejs/plugin-basic-ssl": "2.1.0", + "beasties": "0.3.5", "browserslist": "^4.23.0", - "esbuild": "0.25.4", - "fast-glob": "3.3.3", + "esbuild": "0.25.9", "https-proxy-agent": "7.0.6", "istanbul-lib-instrument": "6.0.3", - "listr2": "8.2.5", + "jsonc-parser": "3.3.1", + "listr2": "9.0.1", "magic-string": "0.30.17", "mrmime": "2.0.1", - "parse5-html-rewriting-stream": "7.0.0", - "picomatch": "4.0.2", - "piscina": "4.8.0", - "rollup": "4.34.8", - "sass": "1.85.0", - "semver": "7.7.1", + "parse5-html-rewriting-stream": "8.0.0", + "picomatch": "4.0.3", + "piscina": "5.1.3", + "rollup": "4.52.3", + "sass": "1.90.0", + "semver": "7.7.2", "source-map-support": "0.5.21", - "vite": "6.3.6", - "watchpack": "2.4.2" + "tinyglobby": "0.2.14", + "vite": "7.1.11", + "watchpack": "2.4.4" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "node": "^20.19.0 || ^22.12.0 || >=24.0.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", "yarn": ">= 1.13.0" }, "optionalDependencies": { - "lmdb": "3.2.6" + "lmdb": "3.4.2" }, "peerDependencies": { - "@angular/compiler": "^19.0.0 || ^19.2.0-next.0", - "@angular/compiler-cli": "^19.0.0 || ^19.2.0-next.0", - "@angular/localize": "^19.0.0 || ^19.2.0-next.0", - "@angular/platform-server": "^19.0.0 || ^19.2.0-next.0", - "@angular/service-worker": "^19.0.0 || ^19.2.0-next.0", - "@angular/ssr": "^19.2.17", + "@angular/compiler": "^20.0.0", + "@angular/compiler-cli": "^20.0.0", + "@angular/core": "^20.0.0", + "@angular/localize": "^20.0.0", + "@angular/platform-browser": "^20.0.0", + "@angular/platform-server": "^20.0.0", + "@angular/service-worker": "^20.0.0", + "@angular/ssr": "^20.3.8", "karma": "^6.4.0", "less": "^4.2.0", - "ng-packagr": "^19.0.0 || ^19.2.0-next.0", + "ng-packagr": "^20.0.0", "postcss": "^8.4.0", "tailwindcss": "^2.0.0 || ^3.0.0 || ^4.0.0", - "typescript": ">=5.5 <5.9" + "tslib": "^2.3.0", + "typescript": ">=5.8 <6.0", + "vitest": "^3.1.1" }, "peerDependenciesMeta": { + "@angular/core": { + "optional": true + }, "@angular/localize": { "optional": true }, + "@angular/platform-browser": { + "optional": true + }, "@angular/platform-server": { "optional": true }, @@ -650,6 +849,9 @@ }, "tailwindcss": { "optional": true + }, + "vitest": { + "optional": true } } }, @@ -668,253 +870,178 @@ } }, "node_modules/@angular/cdk": { - "version": "19.2.19", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-19.2.19.tgz", - "integrity": "sha512-PCpJagurPBqciqcq4Z8+3OtKLb7rSl4w/qBJoIMua8CgnrjvA1i+SWawhdtfI1zlY8FSwhzLwXV0CmWWfFzQPg==", + "version": "20.2.10", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-20.2.10.tgz", + "integrity": "sha512-d95C2r3JP11KCahouWmPaxswz/EE7Zn1k8ocoGt70jl33x42Sg96vAHeOpnQ4yfrdA4W7Q+eWB/NqqvAGCzOPQ==", "license": "MIT", "dependencies": { - "parse5": "^7.1.2", + "parse5": "^8.0.0", "tslib": "^2.3.0" }, "peerDependencies": { - "@angular/common": "^19.0.0 || ^20.0.0", - "@angular/core": "^19.0.0 || ^20.0.0", + "@angular/common": "^20.0.0 || ^21.0.0", + "@angular/core": "^20.0.0 || ^21.0.0", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/cli": { - "version": "19.2.15", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-19.2.15.tgz", - "integrity": "sha512-YRIpARHWSOnWkHusUWTQgeUrPWMjWvtQrOkjWc6stF36z2KUzKMEng6EzUvH6sZolNSwVwOFpODEP0ut4aBkvQ==", + "version": "20.3.8", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-20.3.8.tgz", + "integrity": "sha512-UUNmwDCrRknE+50Gwwt66o4T/l0KfLWOzxlYdLn9l2PIVNhpspg+5CUkO0juRyRyCxCnojic1s9pPTD1Eq4rtg==", "dev": true, "license": "MIT", "dependencies": { - "@angular-devkit/architect": "0.1902.15", - "@angular-devkit/core": "19.2.15", - "@angular-devkit/schematics": "19.2.15", - "@inquirer/prompts": "7.3.2", - "@listr2/prompt-adapter-inquirer": "2.0.18", - "@schematics/angular": "19.2.15", + "@angular-devkit/architect": "0.2003.8", + "@angular-devkit/core": "20.3.8", + "@angular-devkit/schematics": "20.3.8", + "@inquirer/prompts": "7.8.2", + "@listr2/prompt-adapter-inquirer": "3.0.1", + "@modelcontextprotocol/sdk": "1.17.3", + "@schematics/angular": "20.3.8", "@yarnpkg/lockfile": "1.1.0", + "algoliasearch": "5.35.0", "ini": "5.0.0", "jsonc-parser": "3.3.1", - "listr2": "8.2.5", - "npm-package-arg": "12.0.2", - "npm-pick-manifest": "10.0.0", - "pacote": "20.0.0", + "listr2": "9.0.1", + "npm-package-arg": "13.0.0", + "pacote": "21.0.0", "resolve": "1.22.10", - "semver": "7.7.1", - "symbol-observable": "4.0.0", - "yargs": "17.7.2" + "semver": "7.7.2", + "yargs": "18.0.0", + "zod": "3.25.76" }, "bin": { "ng": "bin/ng.js" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0", - "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", - "yarn": ">= 1.13.0" - } - }, - "node_modules/@angular/cli/node_modules/@angular-devkit/architect": { - "version": "0.1902.15", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1902.15.tgz", - "integrity": "sha512-RbqhStc6ZoRv57ZqLB36VOkBkAdU3nNezCvIs0AJV5V4+vLPMrb0hpIB0sF+9yMlMjWsolnRsj0/Fil+zQG3bw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@angular-devkit/core": "19.2.15", - "rxjs": "7.8.1" - }, - "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0", - "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", - "yarn": ">= 1.13.0" - } - }, - "node_modules/@angular/cli/node_modules/@angular-devkit/core": { - "version": "19.2.15", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-19.2.15.tgz", - "integrity": "sha512-pU2RZYX6vhd7uLSdLwPnuBcr0mXJSjp3EgOXKsrlQFQZevc+Qs+2JdXgIElnOT/aDqtRtriDmLlSbtdE8n3ZbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "8.17.1", - "ajv-formats": "3.0.1", - "jsonc-parser": "3.3.1", - "picomatch": "4.0.2", - "rxjs": "7.8.1", - "source-map": "0.7.4" - }, - "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "node": "^20.19.0 || ^22.12.0 || >=24.0.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", "yarn": ">= 1.13.0" - }, - "peerDependencies": { - "chokidar": "^4.0.0" - }, - "peerDependenciesMeta": { - "chokidar": { - "optional": true - } } }, "node_modules/@angular/common": { - "version": "19.2.14", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-19.2.14.tgz", - "integrity": "sha512-NcNklcuyqaTjOVGf7aru8APX9mjsnZ01gFZrn47BxHozhaR0EMRrotYQTdi8YdVjPkeYFYanVntSLfhyobq/jg==", + "version": "20.3.9", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-20.3.9.tgz", + "integrity": "sha512-PgKEnv30TxvpfTJ3d4h5LEjUHpKSYcs3Rc4OvK7p5A7waBkXzfqCBmy54nomzfcf4dlEjb6wSoXxlJbR7Y34Iw==", "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" }, "peerDependencies": { - "@angular/core": "19.2.14", + "@angular/core": "20.3.9", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/compiler": { - "version": "19.2.14", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-19.2.14.tgz", - "integrity": "sha512-ZqJDYOdhgKpVGNq3+n/Gbxma8DVYElDsoRe0tvNtjkWBVdaOxdZZUqmJ3kdCBsqD/aqTRvRBu0KGo9s2fCChkA==", + "version": "20.3.9", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-20.3.9.tgz", + "integrity": "sha512-nfzR/JpI77Yr4opRimnnTys//taZiibEco1ihV1C02eM4FDCQMOEp8WB+DT/yUESb6MRBlZe1MjeelwSfHlB7g==", "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" } }, "node_modules/@angular/compiler-cli": { - "version": "19.2.14", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-19.2.14.tgz", - "integrity": "sha512-e9/h86ETjoIK2yTLE9aUeMCKujdg/du2pq7run/aINjop4RtnNOw+ZlSTUa6R65lP5CVwDup1kPytpAoifw8cA==", + "version": "20.3.9", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-20.3.9.tgz", + "integrity": "sha512-Fe7MIg2NWXoK+M4GtclxaYNoTdZX2U8f/Fd3N8zxtEMcRsvliJOnJ4oQtpx5kqMAuZVO4zY3wuIY1wAGXYCUbQ==", "license": "MIT", "dependencies": { - "@babel/core": "7.26.9", + "@babel/core": "7.28.3", "@jridgewell/sourcemap-codec": "^1.4.14", "chokidar": "^4.0.0", "convert-source-map": "^1.5.1", "reflect-metadata": "^0.2.0", "semver": "^7.0.0", "tslib": "^2.3.0", - "yargs": "^17.2.1" + "yargs": "^18.0.0" }, "bin": { "ng-xi18n": "bundles/src/bin/ng_xi18n.js", - "ngc": "bundles/src/bin/ngc.js", - "ngcc": "bundles/ngcc/index.js" + "ngc": "bundles/src/bin/ngc.js" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" }, "peerDependencies": { - "@angular/compiler": "19.2.14", - "typescript": ">=5.5 <5.9" - } - }, - "node_modules/@angular/compiler-cli/node_modules/@babel/core": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.9.tgz", - "integrity": "sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==", - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.9", - "@babel/helper-compilation-targets": "^7.26.5", - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.9", - "@babel/parser": "^7.26.9", - "@babel/template": "^7.26.9", - "@babel/traverse": "^7.26.9", - "@babel/types": "^7.26.9", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" + "@angular/compiler": "20.3.9", + "typescript": ">=5.8 <6.0" }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@angular/compiler-cli/node_modules/@babel/core/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "license": "MIT" - }, - "node_modules/@angular/compiler-cli/node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@angular/core": { - "version": "19.2.14", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-19.2.14.tgz", - "integrity": "sha512-EVErpW9tGqJ/wNcAN3G/ErH8pHCJ8mM1E6bsJ8UJIpDTZkpqqYjBMtZS9YWH5n3KwUd1tAkAB2w8FK125AjDUQ==", + "version": "20.3.9", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-20.3.9.tgz", + "integrity": "sha512-zZb7wUexBIIUojr1helzXsL25ilAoASm8aPOjBNHPLYr4ndDjMD/wogmH/dA7EzuCdmZf30ZmZZpuX149WdrpA==", "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" }, "peerDependencies": { + "@angular/compiler": "20.3.9", "rxjs": "^6.5.3 || ^7.4.0", "zone.js": "~0.15.0" + }, + "peerDependenciesMeta": { + "@angular/compiler": { + "optional": true + }, + "zone.js": { + "optional": true + } } }, "node_modules/@angular/forms": { - "version": "19.2.14", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-19.2.14.tgz", - "integrity": "sha512-hWtDOj2B0AuRTf+nkMJeodnFpDpmEK9OIhIv1YxcRe73ooaxrIdjgugkElO8I9Tj0E4/7m117ezhWDUkbqm1zA==", + "version": "20.3.9", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-20.3.9.tgz", + "integrity": "sha512-jSlhU1IyuxxSYNN5Gg3oBb0nAqIl5Mwf1hywtkbyMay+3sENYGvBRseWp00R308isKe+n8bKi6hF54A1lhozzg==", "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" }, "peerDependencies": { - "@angular/common": "19.2.14", - "@angular/core": "19.2.14", - "@angular/platform-browser": "19.2.14", + "@angular/common": "20.3.9", + "@angular/core": "20.3.9", + "@angular/platform-browser": "20.3.9", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/language-service": { - "version": "19.2.14", - "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-19.2.14.tgz", - "integrity": "sha512-XgzZdBCe/obCrck5I6GIG4qSI9UGaOtbrvNuw0QAK0DySKaW5inRm6/QwCMPRmPkJBY0wLeYUVz//rtHpEjeTQ==", + "version": "20.3.9", + "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-20.3.9.tgz", + "integrity": "sha512-aCsuzlFx8a/VMBNgXMfwai97j2QHZ8PhQwzwodDNb2X3eQsaUO+nCgs5kNIZmQ/rJESH+fY9ZdlZcrYbVp+nBA==", "dev": true, "license": "MIT", "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" } }, "node_modules/@angular/localize": { - "version": "19.2.14", - "resolved": "https://registry.npmjs.org/@angular/localize/-/localize-19.2.14.tgz", - "integrity": "sha512-T2qPVE5N4qe1rQnx9tkxqUzXV+gUgAwSpVG+vHHRJe//jxCIVfk5zyPd2Z9nFzwGarHP61hvnEzbdbZHtCmbcQ==", + "version": "20.3.9", + "resolved": "https://registry.npmjs.org/@angular/localize/-/localize-20.3.9.tgz", + "integrity": "sha512-YtjsOIOUChGCb1XUNb0CLQQVFTQjxgAR8ihLVHQb0M1pJhhkTJGWJAvf3Qr1+1aLJjyAC4wve+zkj5Z9eR9A1A==", "license": "MIT", "dependencies": { - "@babel/core": "7.26.9", + "@babel/core": "7.28.3", "@types/babel__core": "7.20.5", - "fast-glob": "3.3.3", - "yargs": "^17.2.1" + "tinyglobby": "^0.2.12", + "yargs": "^18.0.0" }, "bin": { "localize-extract": "tools/bundles/src/extract/cli.js", @@ -922,90 +1049,45 @@ "localize-translate": "tools/bundles/src/translate/cli.js" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" }, "peerDependencies": { - "@angular/compiler": "19.2.14", - "@angular/compiler-cli": "19.2.14" - } - }, - "node_modules/@angular/localize/node_modules/@babel/core": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.9.tgz", - "integrity": "sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==", - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.9", - "@babel/helper-compilation-targets": "^7.26.5", - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.9", - "@babel/parser": "^7.26.9", - "@babel/template": "^7.26.9", - "@babel/traverse": "^7.26.9", - "@babel/types": "^7.26.9", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@angular/localize/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "license": "MIT" - }, - "node_modules/@angular/localize/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "@angular/compiler": "20.3.9", + "@angular/compiler-cli": "20.3.9" } }, "node_modules/@angular/material": { - "version": "19.2.19", - "resolved": "https://registry.npmjs.org/@angular/material/-/material-19.2.19.tgz", - "integrity": "sha512-auIE6JUzTIA3LyYklh9J/T7u64crmphxUBgAa0zcOMDog6SYfwbNe9YeLQqua5ek4OUAOdK/BHHfVl5W5iaUoQ==", + "version": "20.2.10", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-20.2.10.tgz", + "integrity": "sha512-WkJfUu7KiQY2lqHjMZtEKBG653sPmky0nytTMASsfQ/xUs56W3CAAEOuKhSyCNKsNeFJZS/NgJnvlpRzcE5k6g==", "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { - "@angular/cdk": "19.2.19", - "@angular/common": "^19.0.0 || ^20.0.0", - "@angular/core": "^19.0.0 || ^20.0.0", - "@angular/forms": "^19.0.0 || ^20.0.0", - "@angular/platform-browser": "^19.0.0 || ^20.0.0", + "@angular/cdk": "20.2.10", + "@angular/common": "^20.0.0 || ^21.0.0", + "@angular/core": "^20.0.0 || ^21.0.0", + "@angular/forms": "^20.0.0 || ^21.0.0", + "@angular/platform-browser": "^20.0.0 || ^21.0.0", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/platform-browser": { - "version": "19.2.14", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-19.2.14.tgz", - "integrity": "sha512-hzkT5nmA64oVBQl6PRjdL4dIFT1n7lfM9rm5cAoS+6LUUKRgiE2d421Kpn/Hz3jaCJfo+calMIdtSMIfUJBmww==", + "version": "20.3.9", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-20.3.9.tgz", + "integrity": "sha512-q9uyNIKto3PmIh3q9/OX0HYN/SMYqCJ7MyQHBuF9Rel0vXi0gWyk2dgsWAl/tSTLlqHWtGZZ3rvJyxYQmxFo4w==", "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" }, "peerDependencies": { - "@angular/animations": "19.2.14", - "@angular/common": "19.2.14", - "@angular/core": "19.2.14" + "@angular/animations": "20.3.9", + "@angular/common": "20.3.9", + "@angular/core": "20.3.9" }, "peerDependenciesMeta": { "@angular/animations": { @@ -1014,38 +1096,38 @@ } }, "node_modules/@angular/platform-browser-dynamic": { - "version": "19.2.14", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-19.2.14.tgz", - "integrity": "sha512-Hfz0z1KDQmIdnFXVFCwCPykuIsHPkr1uW2aY396eARwZ6PK8i0Aadcm1ZOnpd3MR1bMyDrJo30VRS5kx89QWvA==", + "version": "20.3.9", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-20.3.9.tgz", + "integrity": "sha512-XLGDmloD25eEeQM3hrCnU+2TqXpFLp36xOPqVSyBNso0YFXBtAX/lc2tcOFX3fLslje3LT0nyObAlV45YfBiGA==", "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" }, "peerDependencies": { - "@angular/common": "19.2.14", - "@angular/compiler": "19.2.14", - "@angular/core": "19.2.14", - "@angular/platform-browser": "19.2.14" + "@angular/common": "20.3.9", + "@angular/compiler": "20.3.9", + "@angular/core": "20.3.9", + "@angular/platform-browser": "20.3.9" } }, "node_modules/@angular/router": { - "version": "19.2.14", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-19.2.14.tgz", - "integrity": "sha512-cBTWY9Jx7YhbmDYDb7Hqz4Q7UNIMlKTkdKToJd2pbhIXyoS+kHVQrySmyca+jgvYMjWnIjsAEa3dpje12D4mFw==", + "version": "20.3.9", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-20.3.9.tgz", + "integrity": "sha512-wsilSrTtR85OFd6XP0b9rMakx1pEw5sHEYBrfoSQc+NfYCsP5a5qFBJ5CWOQKgWjKlfPgpkaheD6JdqN9WpFoQ==", "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" }, "peerDependencies": { - "@angular/common": "19.2.14", - "@angular/core": "19.2.14", - "@angular/platform-browser": "19.2.14", + "@angular/common": "20.3.9", + "@angular/core": "20.3.9", + "@angular/platform-browser": "20.3.9", "rxjs": "^6.5.3 || ^7.4.0" } }, @@ -1089,30 +1171,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.4.tgz", - "integrity": "sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", + "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.10.tgz", - "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.3.tgz", + "integrity": "sha512-yDBHV9kQNcr2/sUr9jghVyz9C3Y5G2zUM2H2lo+9mKv4sFgbA8s8Z9t8D1jiTkGoO/NoIfKMyKWr4s6CN23ZwQ==", "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.10", - "@babel/helper-compilation-targets": "^7.26.5", - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.10", - "@babel/parser": "^7.26.10", - "@babel/template": "^7.26.9", - "@babel/traverse": "^7.26.10", - "@babel/types": "^7.26.10", + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.3", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.28.3", + "@babel/helpers": "^7.28.3", + "@babel/parser": "^7.28.3", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.3", + "@babel/types": "^7.28.2", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -1143,15 +1225,15 @@ } }, "node_modules/@babel/generator": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.10.tgz", - "integrity": "sha512-rRHT8siFIXQrAYOYqZQVsAr8vJ+cBNqcVAY6m5V8/4QqzaPl+zDBe6cLEPRDuNOUf3ww8RfJVlOyQMoSI+5Ang==", - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.26.10", - "@babel/types": "^7.26.10", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz", + "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.28.3", + "@babel/types": "^7.28.2", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" }, "engines": { @@ -1159,13 +1241,13 @@ } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.9.tgz", - "integrity": "sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz", + "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.25.9" + "@babel/types": "^7.27.3" }, "engines": { "node": ">=6.9.0" @@ -1197,19 +1279,19 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.3.tgz", - "integrity": "sha512-V9f6ZFIYSLNEbuGA/92uOvYsGCJNsuA8ESZ4ldc09bWk/j8H8TKiPw8Mk1eG6olpnO0ALHJmYfZvF4MEE4gajg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.5.tgz", + "integrity": "sha512-q3WC4JfdODypvxArsJQROfupPBq9+lMwjKq7C33GhbFYJsufD0yd/ziwD+hJucLeWsnFPWZjsU2DNFqBPE7jwQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.3", - "@babel/helper-member-expression-to-functions": "^7.27.1", + "@babel/helper-member-expression-to-functions": "^7.28.5", "@babel/helper-optimise-call-expression": "^7.27.1", "@babel/helper-replace-supers": "^7.27.1", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", - "@babel/traverse": "^7.28.3", + "@babel/traverse": "^7.28.5", "semver": "^6.3.1" }, "engines": { @@ -1219,20 +1301,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-create-class-features-plugin/node_modules/@babel/helper-annotate-as-pure": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz", - "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/types": "^7.27.3" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-create-class-features-plugin/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -1245,15 +1313,15 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.27.1.tgz", - "integrity": "sha512-uVDC72XVf8UbrH5qQTc18Agb8emwjTiZrQE11Nv3CuBEZmVvTwwE9CBUEvHku06gQCAyYf8Nv6ja1IN+6LMbxQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.28.5.tgz", + "integrity": "sha512-N1EhvLtHzOvj7QQOUCCS3NrPJP8c5W6ZXCHDn7Yialuy1iu4r5EmIYkXlKNqT99Ciw+W0mDqWoR6HWMZlFP3hw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.27.1", - "regexpu-core": "^6.2.0", + "@babel/helper-annotate-as-pure": "^7.27.3", + "regexpu-core": "^6.3.1", "semver": "^6.3.1" }, "engines": { @@ -1263,20 +1331,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-create-regexp-features-plugin/node_modules/@babel/helper-annotate-as-pure": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz", - "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/types": "^7.27.3" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-create-regexp-features-plugin/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -1316,15 +1370,15 @@ } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.27.1.tgz", - "integrity": "sha512-E5chM8eWjTp/aNoVpcbfM7mLxu9XGLWYise2eBKGQomAk/Mb4XoxyqXTZbuTohbsl8EKqdlMhnDI2CCLfcs9wA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.28.5.tgz", + "integrity": "sha512-cwM7SBRZcPCLgl8a7cY0soT1SptSzAlMH39vwiRpOQkJlh53r5hdHwLSCZpQdVLT39sZt+CRpNwYG4Y2v77atg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1" + "@babel/traverse": "^7.28.5", + "@babel/types": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -1403,20 +1457,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-remap-async-to-generator/node_modules/@babel/helper-annotate-as-pure": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz", - "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/types": "^7.27.3" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-replace-supers": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.27.1.tgz", @@ -1474,9 +1514,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", - "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -1521,12 +1561,12 @@ } }, "node_modules/@babel/parser": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", - "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", + "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", "license": "MIT", "dependencies": { - "@babel/types": "^7.28.4" + "@babel/types": "^7.28.5" }, "bin": { "parser": "bin/babel-parser.js" @@ -1536,15 +1576,15 @@ } }, "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.27.1.tgz", - "integrity": "sha512-QPG3C9cCVRQLxAVwmefEmwdTanECuUBMQZ/ym5kiw3XKCGA7qkuQLcjWWHcrD/GKbn/WmJwaezfuuAOcyKlRPA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.28.5.tgz", + "integrity": "sha512-87GDMS3tsmMSi/3bWOte1UblL+YUTFMV8SZPZ2eSEL17s74Cw/l63rR6NmGVKMYW2GYi85nE+/d6Hw5N0bEk2Q==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", - "@babel/traverse": "^7.27.1" + "@babel/traverse": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -1711,13 +1751,13 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", - "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", + "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1930,16 +1970,16 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.26.8.tgz", - "integrity": "sha512-He9Ej2X7tNf2zdKMAGOsmg2MrFc+hfoAhd3po4cWfo/NWjzEAKa0oQruj1ROVUdl0e6fb6/kE/G3SSxE0lRJOg==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.28.0.tgz", + "integrity": "sha512-BEOdvX4+M765icNPZeidyADIvQ1m1gmunXufXxvRESy/jNNyfovIqUyE7MVgGBjWktCoJlzvFA1To2O4ymIO3Q==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.26.5", - "@babel/helper-remap-async-to-generator": "^7.25.9", - "@babel/traverse": "^7.26.8" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-remap-async-to-generator": "^7.27.1", + "@babel/traverse": "^7.28.0" }, "engines": { "node": ">=6.9.0" @@ -1949,16 +1989,16 @@ } }, "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.25.9.tgz", - "integrity": "sha512-NT7Ejn7Z/LjUH0Gv5KsBCxh7BH3fbLTV0ptHvpeMvrt3cPThHfJfst9Wrb7S8EvJ7vRTFI7z+VAvFVEQn/m5zQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.27.1.tgz", + "integrity": "sha512-NREkZsZVJS4xmTr8qzE5y8AfIPqsdQfRuUiLRTEzb7Qii8iFWCyDKaUV2c0rCuh4ljDZ98ALHP/PetiBV2nddA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/helper-remap-async-to-generator": "^7.25.9" + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-remap-async-to-generator": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1985,9 +2025,9 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.4.tgz", - "integrity": "sha512-1yxmvN0MJHOhPVmAsmoW5liWwoILobu/d/ShymZmj867bAdxGbehIrew1DuLpw2Ukv+qDSSPQdYW1dLNE7t11A==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.5.tgz", + "integrity": "sha512-45DmULpySVvmq9Pj3X9B+62Xe+DJGov27QravQJU1LLcapR6/10i+gYVAucGGJpHBp5mYxIMK4nDAT/QDLr47g==", "dev": true, "license": "MIT", "peer": true, @@ -2059,20 +2099,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-classes/node_modules/@babel/helper-annotate-as-pure": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz", - "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/types": "^7.27.3" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/plugin-transform-computed-properties": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.27.1.tgz", @@ -2092,15 +2118,15 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.28.0.tgz", - "integrity": "sha512-v1nrSMBiKcodhsyJ4Gf+Z0U/yawmJDBOTpEB3mcQY52r9RIyPneGyAS/yM6seP/8I+mWI3elOMtT5dB8GJVs+A==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.28.5.tgz", + "integrity": "sha512-Kl9Bc6D0zTUcFUvkNuQh4eGXPKKNDOJQXVyyM4ZAQPMveniJdxi8XMJwLo+xSoW3MIq81bD33lcUe9kZpl0MCw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", - "@babel/traverse": "^7.28.0" + "@babel/traverse": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -2179,10 +2205,28 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-explicit-resource-management": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-explicit-resource-management/-/plugin-transform-explicit-resource-management-7.28.0.tgz", + "integrity": "sha512-K8nhUcn3f6iB+P3gwCv/no7OdzOZQcKchW6N389V6PD8NUWKZHzndOd9sPDVbMoBsbmjMqlB4L9fm+fEFNVlwQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/plugin-transform-destructuring": "^7.28.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.27.1.tgz", - "integrity": "sha512-uspvXnhHvGKf2r4VVtBpeFnuDWsJLQ6MF6lGJLC89jBR1uoVeqM416AZtTuhTezOfgHicpJQmoD5YUakO/YmXQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.28.5.tgz", + "integrity": "sha512-D4WIMaFtwa2NizOp+dnoFjRez/ClKiC2BqqImwKd1X28nqBtZEyCYJ2ozQrrzlxAFrcrjxo39S6khe9RNDlGzw==", "dev": true, "license": "MIT", "peer": true, @@ -2285,9 +2329,9 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.27.1.tgz", - "integrity": "sha512-SJvDs5dXxiae4FbSL1aBJlG4wvl594N6YEVVn9e3JGulwioy6z3oPjx/sQBO3Y4NwUu5HNix6KJ3wBZoewcdbw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.28.5.tgz", + "integrity": "sha512-axUuqnUTBuXyHGcJEVVh9pORaN6wC5bYfE7FGzPiaWa3syib9m7g+/IT/4VgCOe2Upef43PHzeAvcrVek6QuuA==", "dev": true, "license": "MIT", "peer": true, @@ -2355,17 +2399,17 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.27.1.tgz", - "integrity": "sha512-w5N1XzsRbc0PQStASMksmUeqECuzKuTJer7kFagK8AXgpCMkeDMO5S+aaFb7A51ZYDF7XI34qsTX+fkHiIm5yA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.28.5.tgz", + "integrity": "sha512-vn5Jma98LCOeBy/KpeQhXcV2WZgaRUtjwQmjoBuLNlOmkg0fB5pdvYVeWRYI69wWKwK2cD1QbMiUQnoujWvrew==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-module-transforms": "^7.27.1", + "@babel/helper-module-transforms": "^7.28.3", "@babel/helper-plugin-utils": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.27.1" + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -2518,9 +2562,9 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.27.1.tgz", - "integrity": "sha512-BQmKPPIuc8EkZgNKsv0X4bPmOoayeu4F1YCwx2/CfmDSXDbp7GnzlUH+/ul5VGfRg1AoFPsrIThlEBj2xb4CAg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.28.5.tgz", + "integrity": "sha512-N6fut9IZlPnjPwgiQkXNhb+cT8wQKFlJNqcZkWlcTqkcqx6/kU4ynGmLFoa4LViBSirn05YAwk+sQBbPfxtYzQ==", "dev": true, "license": "MIT", "peer": true, @@ -2589,20 +2633,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-private-property-in-object/node_modules/@babel/helper-annotate-as-pure": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz", - "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/types": "^7.27.3" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/plugin-transform-property-literals": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.27.1.tgz", @@ -2673,18 +2703,18 @@ } }, "node_modules/@babel/plugin-transform-runtime": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.26.10.tgz", - "integrity": "sha512-NWaL2qG6HRpONTnj4JvDU6th4jYeZOJgu3QhmFTCihib0ermtOJqktA5BduGm3suhhVe9EMP9c9+mfJ/I9slqw==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.28.3.tgz", + "integrity": "sha512-Y6ab1kGqZ0u42Zv/4a7l0l72n9DKP/MKoKWaUSBylrhNZO2prYuqFOLbn5aW5SIFXwSH93yfjbgllL8lxuGKLg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-plugin-utils": "^7.26.5", - "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.11.0", - "babel-plugin-polyfill-regenerator": "^0.6.1", + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1", + "babel-plugin-polyfill-corejs2": "^0.4.14", + "babel-plugin-polyfill-corejs3": "^0.13.0", + "babel-plugin-polyfill-regenerator": "^0.6.5", "semver": "^6.3.1" }, "engines": { @@ -2863,81 +2893,82 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.26.9.tgz", - "integrity": "sha512-vX3qPGE8sEKEAZCWk05k3cpTAE3/nOYca++JA+Rd0z2NCNzabmYvEiSShKzm10zdquOIAVXsy2Ei/DTW34KlKQ==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.28.3.tgz", + "integrity": "sha512-ROiDcM+GbYVPYBOeCR6uBXKkQpBExLl8k9HO1ygXEyds39j+vCCsjmj7S8GOniZQlEs81QlkdJZe76IpLSiqpg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/compat-data": "^7.26.8", - "@babel/helper-compilation-targets": "^7.26.5", - "@babel/helper-plugin-utils": "^7.26.5", - "@babel/helper-validator-option": "^7.25.9", - "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.25.9", - "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.25.9", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.25.9", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.25.9", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.25.9", + "@babel/compat-data": "^7.28.0", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-validator-option": "^7.27.1", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.27.1", + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.27.1", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.27.1", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.27.1", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.28.3", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", - "@babel/plugin-syntax-import-assertions": "^7.26.0", - "@babel/plugin-syntax-import-attributes": "^7.26.0", + "@babel/plugin-syntax-import-assertions": "^7.27.1", + "@babel/plugin-syntax-import-attributes": "^7.27.1", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", - "@babel/plugin-transform-arrow-functions": "^7.25.9", - "@babel/plugin-transform-async-generator-functions": "^7.26.8", - "@babel/plugin-transform-async-to-generator": "^7.25.9", - "@babel/plugin-transform-block-scoped-functions": "^7.26.5", - "@babel/plugin-transform-block-scoping": "^7.25.9", - "@babel/plugin-transform-class-properties": "^7.25.9", - "@babel/plugin-transform-class-static-block": "^7.26.0", - "@babel/plugin-transform-classes": "^7.25.9", - "@babel/plugin-transform-computed-properties": "^7.25.9", - "@babel/plugin-transform-destructuring": "^7.25.9", - "@babel/plugin-transform-dotall-regex": "^7.25.9", - "@babel/plugin-transform-duplicate-keys": "^7.25.9", - "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.25.9", - "@babel/plugin-transform-dynamic-import": "^7.25.9", - "@babel/plugin-transform-exponentiation-operator": "^7.26.3", - "@babel/plugin-transform-export-namespace-from": "^7.25.9", - "@babel/plugin-transform-for-of": "^7.26.9", - "@babel/plugin-transform-function-name": "^7.25.9", - "@babel/plugin-transform-json-strings": "^7.25.9", - "@babel/plugin-transform-literals": "^7.25.9", - "@babel/plugin-transform-logical-assignment-operators": "^7.25.9", - "@babel/plugin-transform-member-expression-literals": "^7.25.9", - "@babel/plugin-transform-modules-amd": "^7.25.9", - "@babel/plugin-transform-modules-commonjs": "^7.26.3", - "@babel/plugin-transform-modules-systemjs": "^7.25.9", - "@babel/plugin-transform-modules-umd": "^7.25.9", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.25.9", - "@babel/plugin-transform-new-target": "^7.25.9", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.26.6", - "@babel/plugin-transform-numeric-separator": "^7.25.9", - "@babel/plugin-transform-object-rest-spread": "^7.25.9", - "@babel/plugin-transform-object-super": "^7.25.9", - "@babel/plugin-transform-optional-catch-binding": "^7.25.9", - "@babel/plugin-transform-optional-chaining": "^7.25.9", - "@babel/plugin-transform-parameters": "^7.25.9", - "@babel/plugin-transform-private-methods": "^7.25.9", - "@babel/plugin-transform-private-property-in-object": "^7.25.9", - "@babel/plugin-transform-property-literals": "^7.25.9", - "@babel/plugin-transform-regenerator": "^7.25.9", - "@babel/plugin-transform-regexp-modifiers": "^7.26.0", - "@babel/plugin-transform-reserved-words": "^7.25.9", - "@babel/plugin-transform-shorthand-properties": "^7.25.9", - "@babel/plugin-transform-spread": "^7.25.9", - "@babel/plugin-transform-sticky-regex": "^7.25.9", - "@babel/plugin-transform-template-literals": "^7.26.8", - "@babel/plugin-transform-typeof-symbol": "^7.26.7", - "@babel/plugin-transform-unicode-escapes": "^7.25.9", - "@babel/plugin-transform-unicode-property-regex": "^7.25.9", - "@babel/plugin-transform-unicode-regex": "^7.25.9", - "@babel/plugin-transform-unicode-sets-regex": "^7.25.9", + "@babel/plugin-transform-arrow-functions": "^7.27.1", + "@babel/plugin-transform-async-generator-functions": "^7.28.0", + "@babel/plugin-transform-async-to-generator": "^7.27.1", + "@babel/plugin-transform-block-scoped-functions": "^7.27.1", + "@babel/plugin-transform-block-scoping": "^7.28.0", + "@babel/plugin-transform-class-properties": "^7.27.1", + "@babel/plugin-transform-class-static-block": "^7.28.3", + "@babel/plugin-transform-classes": "^7.28.3", + "@babel/plugin-transform-computed-properties": "^7.27.1", + "@babel/plugin-transform-destructuring": "^7.28.0", + "@babel/plugin-transform-dotall-regex": "^7.27.1", + "@babel/plugin-transform-duplicate-keys": "^7.27.1", + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.27.1", + "@babel/plugin-transform-dynamic-import": "^7.27.1", + "@babel/plugin-transform-explicit-resource-management": "^7.28.0", + "@babel/plugin-transform-exponentiation-operator": "^7.27.1", + "@babel/plugin-transform-export-namespace-from": "^7.27.1", + "@babel/plugin-transform-for-of": "^7.27.1", + "@babel/plugin-transform-function-name": "^7.27.1", + "@babel/plugin-transform-json-strings": "^7.27.1", + "@babel/plugin-transform-literals": "^7.27.1", + "@babel/plugin-transform-logical-assignment-operators": "^7.27.1", + "@babel/plugin-transform-member-expression-literals": "^7.27.1", + "@babel/plugin-transform-modules-amd": "^7.27.1", + "@babel/plugin-transform-modules-commonjs": "^7.27.1", + "@babel/plugin-transform-modules-systemjs": "^7.27.1", + "@babel/plugin-transform-modules-umd": "^7.27.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.27.1", + "@babel/plugin-transform-new-target": "^7.27.1", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.27.1", + "@babel/plugin-transform-numeric-separator": "^7.27.1", + "@babel/plugin-transform-object-rest-spread": "^7.28.0", + "@babel/plugin-transform-object-super": "^7.27.1", + "@babel/plugin-transform-optional-catch-binding": "^7.27.1", + "@babel/plugin-transform-optional-chaining": "^7.27.1", + "@babel/plugin-transform-parameters": "^7.27.7", + "@babel/plugin-transform-private-methods": "^7.27.1", + "@babel/plugin-transform-private-property-in-object": "^7.27.1", + "@babel/plugin-transform-property-literals": "^7.27.1", + "@babel/plugin-transform-regenerator": "^7.28.3", + "@babel/plugin-transform-regexp-modifiers": "^7.27.1", + "@babel/plugin-transform-reserved-words": "^7.27.1", + "@babel/plugin-transform-shorthand-properties": "^7.27.1", + "@babel/plugin-transform-spread": "^7.27.1", + "@babel/plugin-transform-sticky-regex": "^7.27.1", + "@babel/plugin-transform-template-literals": "^7.27.1", + "@babel/plugin-transform-typeof-symbol": "^7.27.1", + "@babel/plugin-transform-unicode-escapes": "^7.27.1", + "@babel/plugin-transform-unicode-property-regex": "^7.27.1", + "@babel/plugin-transform-unicode-regex": "^7.27.1", + "@babel/plugin-transform-unicode-sets-regex": "^7.27.1", "@babel/preset-modules": "0.1.6-no-external-plugins", - "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.11.0", - "babel-plugin-polyfill-regenerator": "^0.6.1", - "core-js-compat": "^3.40.0", + "babel-plugin-polyfill-corejs2": "^0.4.14", + "babel-plugin-polyfill-corejs3": "^0.13.0", + "babel-plugin-polyfill-regenerator": "^0.6.5", + "core-js-compat": "^3.43.0", "semver": "^6.3.1" }, "engines": { @@ -2975,13 +3006,10 @@ } }, "node_modules/@babel/runtime": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.10.tgz", - "integrity": "sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.3.tgz", + "integrity": "sha512-9uIQ10o0WGdpP6GDhXcdOJPJuDgFtIDtN/9+ArJQ2NAfAmiuhTQdzkaTGR33v43GYS2UrSA0eX2pPPHoFVvpxA==", "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, "engines": { "node": ">=6.9.0" } @@ -3001,17 +3029,17 @@ } }, "node_modules/@babel/traverse": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.4.tgz", - "integrity": "sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", + "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.3", + "@babel/generator": "^7.28.5", "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.28.4", + "@babel/parser": "^7.28.5", "@babel/template": "^7.27.2", - "@babel/types": "^7.28.4", + "@babel/types": "^7.28.5", "debug": "^4.3.1" }, "engines": { @@ -3019,13 +3047,13 @@ } }, "node_modules/@babel/traverse/node_modules/@babel/generator": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz", - "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", + "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", "license": "MIT", "dependencies": { - "@babel/parser": "^7.28.3", - "@babel/types": "^7.28.2", + "@babel/parser": "^7.28.5", + "@babel/types": "^7.28.5", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" @@ -3035,13 +3063,13 @@ } }, "node_modules/@babel/types": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", - "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", + "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1" + "@babel/helper-validator-identifier": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -3078,6 +3106,22 @@ "keyv": "^5.5.3" } }, + "node_modules/@cacheable/memory/node_modules/@keyv/bigmap": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@keyv/bigmap/-/bigmap-1.1.0.tgz", + "integrity": "sha512-MX7XIUNwVRK+hjZcAbNJ0Z8DREo+Weu9vinBOjGU1thEi9F6vPhICzBbk4CCf3eEefKRz7n6TfZXwUFZTSgj8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "hookified": "^1.12.2" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "keyv": "^5.5.3" + } + }, "node_modules/@cacheable/memory/node_modules/keyv": { "version": "5.5.3", "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.5.3.tgz", @@ -3089,11 +3133,24 @@ } }, "node_modules/@cacheable/utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@cacheable/utils/-/utils-2.0.3.tgz", - "integrity": "sha512-m7Rce68cMHlAUjvWBy9Ru1Nmw5gU0SjGGtQDdhpe6E0xnbcvrIY0Epy//JU1VYYBUTzrG9jvgmTauULGKzOkWA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@cacheable/utils/-/utils-2.1.0.tgz", + "integrity": "sha512-ZdxfOiaarMqMj+H7qwlt5EBKWaeGihSYVHdQv5lUsbn8MJJOTW82OIwirQ39U5tMZkNvy3bQE+ryzC+xTAb9/g==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "keyv": "^5.5.3" + } + }, + "node_modules/@cacheable/utils/node_modules/keyv": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.5.3.tgz", + "integrity": "sha512-h0Un1ieD+HUrzBH6dJXhod3ifSghk5Hw/2Y4/KHBziPlZecrFyE9YOTPU6eOs0V9pYl8gOs86fkr/KN8lUX39A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@keyv/serialize": "^1.1.1" + } }, "node_modules/@ckeditor/ckeditor5-adapter-ckfinder": { "version": "40.2.0", @@ -3697,9 +3754,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.4.tgz", - "integrity": "sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz", + "integrity": "sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==", "cpu": [ "ppc64" ], @@ -3714,9 +3771,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.4.tgz", - "integrity": "sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.9.tgz", + "integrity": "sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==", "cpu": [ "arm" ], @@ -3731,9 +3788,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.4.tgz", - "integrity": "sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz", + "integrity": "sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==", "cpu": [ "arm64" ], @@ -3748,9 +3805,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.4.tgz", - "integrity": "sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.9.tgz", + "integrity": "sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==", "cpu": [ "x64" ], @@ -3765,9 +3822,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.4.tgz", - "integrity": "sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz", + "integrity": "sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==", "cpu": [ "arm64" ], @@ -3782,9 +3839,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.4.tgz", - "integrity": "sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz", + "integrity": "sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==", "cpu": [ "x64" ], @@ -3799,9 +3856,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.4.tgz", - "integrity": "sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz", + "integrity": "sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==", "cpu": [ "arm64" ], @@ -3816,9 +3873,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.4.tgz", - "integrity": "sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz", + "integrity": "sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==", "cpu": [ "x64" ], @@ -3833,9 +3890,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.4.tgz", - "integrity": "sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz", + "integrity": "sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==", "cpu": [ "arm" ], @@ -3850,9 +3907,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.4.tgz", - "integrity": "sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz", + "integrity": "sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==", "cpu": [ "arm64" ], @@ -3867,9 +3924,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.4.tgz", - "integrity": "sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz", + "integrity": "sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==", "cpu": [ "ia32" ], @@ -3884,9 +3941,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.4.tgz", - "integrity": "sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz", + "integrity": "sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==", "cpu": [ "loong64" ], @@ -3901,9 +3958,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.4.tgz", - "integrity": "sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz", + "integrity": "sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==", "cpu": [ "mips64el" ], @@ -3918,9 +3975,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.4.tgz", - "integrity": "sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz", + "integrity": "sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==", "cpu": [ "ppc64" ], @@ -3935,9 +3992,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.4.tgz", - "integrity": "sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz", + "integrity": "sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==", "cpu": [ "riscv64" ], @@ -3952,9 +4009,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.4.tgz", - "integrity": "sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz", + "integrity": "sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==", "cpu": [ "s390x" ], @@ -3969,9 +4026,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.4.tgz", - "integrity": "sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz", + "integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==", "cpu": [ "x64" ], @@ -3986,9 +4043,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.4.tgz", - "integrity": "sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz", + "integrity": "sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==", "cpu": [ "arm64" ], @@ -4003,9 +4060,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.4.tgz", - "integrity": "sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz", + "integrity": "sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==", "cpu": [ "x64" ], @@ -4020,9 +4077,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.4.tgz", - "integrity": "sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz", + "integrity": "sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==", "cpu": [ "arm64" ], @@ -4037,9 +4094,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.4.tgz", - "integrity": "sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz", + "integrity": "sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==", "cpu": [ "x64" ], @@ -4053,10 +4110,27 @@ "node": ">=18" } }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz", + "integrity": "sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.4.tgz", - "integrity": "sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz", + "integrity": "sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==", "cpu": [ "x64" ], @@ -4071,9 +4145,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.4.tgz", - "integrity": "sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz", + "integrity": "sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==", "cpu": [ "arm64" ], @@ -4088,9 +4162,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.4.tgz", - "integrity": "sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz", + "integrity": "sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==", "cpu": [ "ia32" ], @@ -4105,9 +4179,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.4.tgz", - "integrity": "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz", + "integrity": "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==", "cpu": [ "x64" ], @@ -4141,26 +4215,104 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true, "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers/node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.16.0.tgz", + "integrity": "sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -4168,7 +4320,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -4233,21 +4385,61 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "version": "9.38.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.38.0.tgz", + "integrity": "sha512-UZ1VpFvXf9J06YG9xQBdnzU+kthors6KjhMAl6f4gH4usHyh31rUf2DLGInT8RFYIReYXNSydgPY0V2LuWgl7A==", "dev": true, "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" } }, - "node_modules/@fast-csv/format": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-4.3.5.tgz", - "integrity": "sha512-8iRn6QF3I8Ak78lNAa+Gdl5MJJBM5vRHivFtMRUWINdevNo00K7OXxS2PshawLKTejVwieIlPmK5YlLu6w4u8A==", - "license": "MIT", - "dependencies": { + "node_modules/@eslint/object-schema": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@fast-csv/format": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-4.3.5.tgz", + "integrity": "sha512-8iRn6QF3I8Ak78lNAa+Gdl5MJJBM5vRHivFtMRUWINdevNo00K7OXxS2PshawLKTejVwieIlPmK5YlLu6w4u8A==", + "license": "MIT", + "dependencies": { "@types/node": "^14.0.1", "lodash.escaperegexp": "^4.1.2", "lodash.isboolean": "^3.0.3", @@ -4284,44 +4476,43 @@ "license": "MIT" }, "node_modules/@fortawesome/angular-fontawesome": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@fortawesome/angular-fontawesome/-/angular-fontawesome-1.0.0.tgz", - "integrity": "sha512-EC2fYuXIuw2ld1kzJi+zysWus6OeGGfLQtbh0hW9zyyq5aBo8ZJkcJKBsVQ8E6Mg7nHyTWaXn+sdcXTPDWz+UQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@fortawesome/angular-fontawesome/-/angular-fontawesome-3.0.0.tgz", + "integrity": "sha512-+8Dd6DoJnqArfrZ5NvjHyRL64IIkTigXclbOOcFdYQ8/WFERQUDaEU6SAV8Q0JBpJhMS1McED7YCOCAE6SIVyA==", "license": "MIT", "dependencies": { - "@fortawesome/fontawesome-svg-core": "^6.7.1", + "@fortawesome/fontawesome-svg-core": "^7.0.0", "tslib": "^2.8.1" }, "peerDependencies": { - "@angular/core": "^19.0.0" + "@angular/core": "^20.0.0" } }, "node_modules/@fortawesome/angular-fontawesome/node_modules/@fortawesome/fontawesome-common-types": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.7.2.tgz", - "integrity": "sha512-Zs+YeHUC5fkt7Mg1l6XTniei3k4bwG/yo3iFUtZWd/pMx9g3fdvkSK9E0FOC+++phXOka78uJcYb8JaFkW52Xg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-7.1.0.tgz", + "integrity": "sha512-l/BQM7fYntsCI//du+6sEnHOP6a74UixFyOYUyz2DLMXKx+6DEhfR3F2NYGE45XH1JJuIamacb4IZs9S0ZOWLA==", "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/@fortawesome/angular-fontawesome/node_modules/@fortawesome/fontawesome-svg-core": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.7.2.tgz", - "integrity": "sha512-yxtOBWDrdi5DD5o1pmVdq3WMCvnobT0LU6R8RyyVXPvFRd2o79/0NCuQoCjNTeZz9EzA9xS3JxNWfv54RIHFEA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-7.1.0.tgz", + "integrity": "sha512-fNxRUk1KhjSbnbuBxlWSnBLKLBNun52ZBTcs22H/xEEzM6Ap81ZFTQ4bZBxVQGQgVY0xugKGoRcCbaKjLQ3XZA==", "license": "MIT", "dependencies": { - "@fortawesome/fontawesome-common-types": "6.7.2" + "@fortawesome/fontawesome-common-types": "7.1.0" }, "engines": { "node": ">=6" } }, "node_modules/@fortawesome/fontawesome-common-types": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.2.1.tgz", - "integrity": "sha512-Sz07mnQrTekFWLz5BMjOzHl/+NooTdW8F8kDQxjWwbpOJcnoSg4vUDng8d/WR1wOxM0O+CY9Zw0nR054riNYtQ==", - "hasInstallScript": true, + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.7.2.tgz", + "integrity": "sha512-Zs+YeHUC5fkt7Mg1l6XTniei3k4bwG/yo3iFUtZWd/pMx9g3fdvkSK9E0FOC+++phXOka78uJcYb8JaFkW52Xg==", "license": "MIT", "engines": { "node": ">=6" @@ -4337,13 +4528,12 @@ } }, "node_modules/@fortawesome/fontawesome-svg-core": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.2.1.tgz", - "integrity": "sha512-HELwwbCz6C1XEcjzyT1Jugmz2NNklMrSPjZOWMlc+ZsHIVk+XOvOXLGGQtFBwSyqfJDNgRq4xBCwWOaZ/d9DEA==", - "hasInstallScript": true, + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.7.2.tgz", + "integrity": "sha512-yxtOBWDrdi5DD5o1pmVdq3WMCvnobT0LU6R8RyyVXPvFRd2o79/0NCuQoCjNTeZz9EzA9xS3JxNWfv54RIHFEA==", "license": "MIT", "dependencies": { - "@fortawesome/fontawesome-common-types": "6.2.1" + "@fortawesome/fontawesome-common-types": "6.7.2" }, "engines": { "node": ">=6" @@ -4361,66 +4551,40 @@ "node": ">=6" } }, - "node_modules/@fortawesome/free-brands-svg-icons/node_modules/@fortawesome/fontawesome-common-types": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.7.2.tgz", - "integrity": "sha512-Zs+YeHUC5fkt7Mg1l6XTniei3k4bwG/yo3iFUtZWd/pMx9g3fdvkSK9E0FOC+++phXOka78uJcYb8JaFkW52Xg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/@fortawesome/free-solid-svg-icons": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.2.1.tgz", - "integrity": "sha512-oKuqrP5jbfEPJWTij4sM+/RvgX+RMFwx3QZCZcK9PrBDgxC35zuc7AOFsyMjMd/PIFPeB2JxyqDr5zs/DZFPPw==", - "hasInstallScript": true, + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.7.2.tgz", + "integrity": "sha512-GsBrnOzU8uj0LECDfD5zomZJIjrPhIlWU82AHwa2s40FKH+kcxQaBvBo3Z4TxyZHIyX8XTDxsyA33/Vx9eFuQA==", "license": "(CC-BY-4.0 AND MIT)", "dependencies": { - "@fortawesome/fontawesome-common-types": "6.2.1" + "@fortawesome/fontawesome-common-types": "6.7.2" }, "engines": { "node": ">=6" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true, "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", "dev": true, - "license": "ISC", + "license": "Apache-2.0", "dependencies": { - "brace-expansion": "^1.1.7" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" }, "engines": { - "node": "*" + "node": ">=18.18.0" } }, "node_modules/@humanwhocodes/module-importer": { @@ -4437,18 +4601,24 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, - "license": "BSD-3-Clause" + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@inquirer/ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.0.tgz", - "integrity": "sha512-JWaTfCxI1eTmJ1BIv86vUfjVatOdxwD0DAVKYevY8SazeUUZtW+tNbsdejVO1GYE0GXJW1N1ahmiC3TFd+7wZA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.1.tgz", + "integrity": "sha512-yqq0aJW/5XPhi5xOAL1xRCpe1eh8UFVgYFpFsjEqmIR8rKLyP+HINvFXwUaxYICflJrVlxnp7lLN6As735kVpw==", "dev": true, "license": "MIT", "engines": { @@ -4456,16 +4626,16 @@ } }, "node_modules/@inquirer/checkbox": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.2.4.tgz", - "integrity": "sha512-2n9Vgf4HSciFq8ttKXk+qy+GsyTXPV1An6QAwe/8bkbbqvG4VW1I/ZY1pNu2rf+h9bdzMLPbRSfcNxkHBy/Ydw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.3.0.tgz", + "integrity": "sha512-5+Q3PKH35YsnoPTh75LucALdAxom6xh5D1oeY561x4cqBuH24ZFVyFREPe14xgnrtmGu3EEt1dIi60wRVSnGCw==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/ansi": "^1.0.0", - "@inquirer/core": "^10.2.2", - "@inquirer/figures": "^1.0.13", - "@inquirer/type": "^3.0.8", + "@inquirer/ansi": "^1.0.1", + "@inquirer/core": "^10.3.0", + "@inquirer/figures": "^1.0.14", + "@inquirer/type": "^3.0.9", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -4481,14 +4651,14 @@ } }, "node_modules/@inquirer/confirm": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.6.tgz", - "integrity": "sha512-6ZXYK3M1XmaVBZX6FCfChgtponnL0R6I7k8Nu+kaoNkT828FVZTcca1MqmWQipaW2oNREQl5AaPCUOOCVNdRMw==", + "version": "5.1.14", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.14.tgz", + "integrity": "sha512-5yR4IBfe0kXe59r1YCTG8WXkUbl7Z35HK87Sw+WUyGD8wNUx7JvY7laahzeytyE1oLn74bQnL7hstctQxisQ8Q==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.7", - "@inquirer/type": "^3.0.4" + "@inquirer/core": "^10.1.15", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" @@ -4503,15 +4673,15 @@ } }, "node_modules/@inquirer/core": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.2.2.tgz", - "integrity": "sha512-yXq/4QUnk4sHMtmbd7irwiepjB8jXU0kkFRL4nr/aDBA2mDz13cMakEWdDwX3eSCTkk03kwcndD1zfRAIlELxA==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.3.0.tgz", + "integrity": "sha512-Uv2aPPPSK5jeCplQmQ9xadnFx2Zhj9b5Dj7bU6ZeCdDNNY11nhYy4btcSdtDguHqCT2h5oNeQTcUNSGGLA7NTA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/ansi": "^1.0.0", - "@inquirer/figures": "^1.0.13", - "@inquirer/type": "^3.0.8", + "@inquirer/ansi": "^1.0.1", + "@inquirer/figures": "^1.0.14", + "@inquirer/type": "^3.0.9", "cli-width": "^4.1.0", "mute-stream": "^2.0.0", "signal-exit": "^4.1.0", @@ -4531,15 +4701,15 @@ } }, "node_modules/@inquirer/editor": { - "version": "4.2.20", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.20.tgz", - "integrity": "sha512-7omh5y5bK672Q+Brk4HBbnHNowOZwrb/78IFXdrEB9PfdxL3GudQyDk8O9vQ188wj3xrEebS2M9n18BjJoI83g==", + "version": "4.2.21", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.21.tgz", + "integrity": "sha512-MjtjOGjr0Kh4BciaFShYpZ1s9400idOdvQ5D7u7lE6VztPFoyLcVNE5dXBmEEIQq5zi4B9h2kU+q7AVBxJMAkQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.2", + "@inquirer/core": "^10.3.0", "@inquirer/external-editor": "^1.0.2", - "@inquirer/type": "^3.0.8" + "@inquirer/type": "^3.0.9" }, "engines": { "node": ">=18" @@ -4554,14 +4724,14 @@ } }, "node_modules/@inquirer/expand": { - "version": "4.0.20", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.20.tgz", - "integrity": "sha512-Dt9S+6qUg94fEvgn54F2Syf0Z3U8xmnBI9ATq2f5h9xt09fs2IJXSCIXyyVHwvggKWFXEY/7jATRo2K6Dkn6Ow==", + "version": "4.0.21", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.21.tgz", + "integrity": "sha512-+mScLhIcbPFmuvU3tAGBed78XvYHSvCl6dBiYMlzCLhpr0bzGzd8tfivMMeqND6XZiaZ1tgusbUHJEfc6YzOdA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.2", - "@inquirer/type": "^3.0.8", + "@inquirer/core": "^10.3.0", + "@inquirer/type": "^3.0.9", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -4599,9 +4769,9 @@ } }, "node_modules/@inquirer/figures": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.13.tgz", - "integrity": "sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.14.tgz", + "integrity": "sha512-DbFgdt+9/OZYFM+19dbpXOSeAstPy884FPy1KjDu4anWwymZeOYhMY1mdFri172htv6mvc/uvIAAi7b7tvjJBQ==", "dev": true, "license": "MIT", "engines": { @@ -4609,14 +4779,14 @@ } }, "node_modules/@inquirer/input": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.2.4.tgz", - "integrity": "sha512-cwSGpLBMwpwcZZsc6s1gThm0J+it/KIJ+1qFL2euLmSKUMGumJ5TcbMgxEjMjNHRGadouIYbiIgruKoDZk7klw==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.2.5.tgz", + "integrity": "sha512-7GoWev7P6s7t0oJbenH0eQ0ThNdDJbEAEtVt9vsrYZ9FulIokvd823yLyhQlWHJPGce1wzP53ttfdCZmonMHyA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.2", - "@inquirer/type": "^3.0.8" + "@inquirer/core": "^10.3.0", + "@inquirer/type": "^3.0.9" }, "engines": { "node": ">=18" @@ -4631,14 +4801,14 @@ } }, "node_modules/@inquirer/number": { - "version": "3.0.20", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.20.tgz", - "integrity": "sha512-bbooay64VD1Z6uMfNehED2A2YOPHSJnQLs9/4WNiV/EK+vXczf/R988itL2XLDGTgmhMF2KkiWZo+iEZmc4jqg==", + "version": "3.0.21", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.21.tgz", + "integrity": "sha512-5QWs0KGaNMlhbdhOSCFfKsW+/dcAVC2g4wT/z2MCiZM47uLgatC5N20kpkDQf7dHx+XFct/MJvvNGy6aYJn4Pw==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.2", - "@inquirer/type": "^3.0.8" + "@inquirer/core": "^10.3.0", + "@inquirer/type": "^3.0.9" }, "engines": { "node": ">=18" @@ -4653,15 +4823,15 @@ } }, "node_modules/@inquirer/password": { - "version": "4.0.20", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.20.tgz", - "integrity": "sha512-nxSaPV2cPvvoOmRygQR+h0B+Av73B01cqYLcr7NXcGXhbmsYfUb8fDdw2Us1bI2YsX+VvY7I7upgFYsyf8+Nug==", + "version": "4.0.21", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.21.tgz", + "integrity": "sha512-xxeW1V5SbNFNig2pLfetsDb0svWlKuhmr7MPJZMYuDnCTkpVBI+X/doudg4pznc1/U+yYmWFFOi4hNvGgUo7EA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/ansi": "^1.0.0", - "@inquirer/core": "^10.2.2", - "@inquirer/type": "^3.0.8" + "@inquirer/ansi": "^1.0.1", + "@inquirer/core": "^10.3.0", + "@inquirer/type": "^3.0.9" }, "engines": { "node": ">=18" @@ -4676,22 +4846,22 @@ } }, "node_modules/@inquirer/prompts": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.3.2.tgz", - "integrity": "sha512-G1ytyOoHh5BphmEBxSwALin3n1KGNYB6yImbICcRQdzXfOGbuJ9Jske/Of5Sebk339NSGGNfUshnzK8YWkTPsQ==", + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.8.2.tgz", + "integrity": "sha512-nqhDw2ZcAUrKNPwhjinJny903bRhI0rQhiDz1LksjeRxqa36i3l75+4iXbOy0rlDpLJGxqtgoPavQjmmyS5UJw==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/checkbox": "^4.1.2", - "@inquirer/confirm": "^5.1.6", - "@inquirer/editor": "^4.2.7", - "@inquirer/expand": "^4.0.9", - "@inquirer/input": "^4.1.6", - "@inquirer/number": "^3.0.9", - "@inquirer/password": "^4.0.9", - "@inquirer/rawlist": "^4.0.9", - "@inquirer/search": "^3.0.9", - "@inquirer/select": "^4.0.9" + "@inquirer/checkbox": "^4.2.1", + "@inquirer/confirm": "^5.1.14", + "@inquirer/editor": "^4.2.17", + "@inquirer/expand": "^4.0.17", + "@inquirer/input": "^4.2.1", + "@inquirer/number": "^3.0.17", + "@inquirer/password": "^4.0.17", + "@inquirer/rawlist": "^4.1.5", + "@inquirer/search": "^3.1.0", + "@inquirer/select": "^4.3.1" }, "engines": { "node": ">=18" @@ -4706,14 +4876,14 @@ } }, "node_modules/@inquirer/rawlist": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.8.tgz", - "integrity": "sha512-CQ2VkIASbgI2PxdzlkeeieLRmniaUU1Aoi5ggEdm6BIyqopE9GuDXdDOj9XiwOqK5qm72oI2i6J+Gnjaa26ejg==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.9.tgz", + "integrity": "sha512-AWpxB7MuJrRiSfTKGJ7Y68imYt8P9N3Gaa7ySdkFj1iWjr6WfbGAhdZvw/UnhFXTHITJzxGUI9k8IX7akAEBCg==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.2", - "@inquirer/type": "^3.0.8", + "@inquirer/core": "^10.3.0", + "@inquirer/type": "^3.0.9", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -4729,15 +4899,15 @@ } }, "node_modules/@inquirer/search": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.1.3.tgz", - "integrity": "sha512-D5T6ioybJJH0IiSUK/JXcoRrrm8sXwzrVMjibuPs+AgxmogKslaafy1oxFiorNI4s3ElSkeQZbhYQgLqiL8h6Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.2.0.tgz", + "integrity": "sha512-a5SzB/qrXafDX1Z4AZW3CsVoiNxcIYCzYP7r9RzrfMpaLpB+yWi5U8BWagZyLmwR0pKbbL5umnGRd0RzGVI8bQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.2", - "@inquirer/figures": "^1.0.13", - "@inquirer/type": "^3.0.8", + "@inquirer/core": "^10.3.0", + "@inquirer/figures": "^1.0.14", + "@inquirer/type": "^3.0.9", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -4753,16 +4923,16 @@ } }, "node_modules/@inquirer/select": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.3.4.tgz", - "integrity": "sha512-Qp20nySRmfbuJBBsgPU7E/cL62Hf250vMZRzYDcBHty2zdD1kKCnoDFWRr0WO2ZzaXp3R7a4esaVGJUx0E6zvA==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.4.0.tgz", + "integrity": "sha512-kaC3FHsJZvVyIjYBs5Ih8y8Bj4P/QItQWrZW22WJax7zTN+ZPXVGuOM55vzbdCP9zKUiBd9iEJVdesujfF+cAA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/ansi": "^1.0.0", - "@inquirer/core": "^10.2.2", - "@inquirer/figures": "^1.0.13", - "@inquirer/type": "^3.0.8", + "@inquirer/ansi": "^1.0.1", + "@inquirer/core": "^10.3.0", + "@inquirer/figures": "^1.0.14", + "@inquirer/type": "^3.0.9", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -4778,9 +4948,9 @@ } }, "node_modules/@inquirer/type": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.8.tgz", - "integrity": "sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.9.tgz", + "integrity": "sha512-QPaNt/nmE2bLGQa9b7wwyRJoLZ7pN6rcyXvzU0YCmivmJyq1BVo94G98tStRWkoD1RgDX5C+dPlhhHzNdu/W/w==", "dev": true, "license": "MIT", "engines": { @@ -4795,6 +4965,29 @@ } } }, + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@isaacs/balanced-match": "^4.0.1" + }, + "engines": { + "node": "20 || >=22" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -5039,16 +5232,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/console/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/core": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", @@ -5113,16 +5296,6 @@ "node": ">=8" } }, - "node_modules/@jest/core/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/environment": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", @@ -5290,16 +5463,6 @@ "node": "*" } }, - "node_modules/@jest/reporters/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/schemas": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", @@ -5360,16 +5523,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/test-sequencer/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/transform": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", @@ -5404,16 +5557,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@jest/transform/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/types": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", @@ -5498,9 +5641,9 @@ } }, "node_modules/@jsonjoy.com/buffers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-1.0.0.tgz", - "integrity": "sha512-NDigYR3PHqCnQLXYyoLbnEdzMMvzeiCWo1KOut7Q0CoIqg9tUAPKJ1iq/2nFhc5kZtexzutNY0LFjdwWL3Dw3Q==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-1.2.1.tgz", + "integrity": "sha512-12cdlDwX4RUM3QxmUbVJWqZ/mrK6dFQH4Zxq6+r1YXKXYBNgZXndx2qbCJwh3+WWkCSn67IjnlG3XYTvmvYtgA==", "dev": true, "license": "Apache-2.0", "peer": true, @@ -5534,20 +5677,21 @@ } }, "node_modules/@jsonjoy.com/json-pack": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.14.0.tgz", - "integrity": "sha512-LpWbYgVnKzphN5S6uss4M25jJ/9+m6q6UJoeN6zTkK4xAGhKsiBRPVeF7OYMWonn5repMQbE5vieRXcMUrKDKw==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.21.0.tgz", + "integrity": "sha512-+AKG+R2cfZMShzrF2uQw34v3zbeDYUqnQ+jg7ORic3BGtfw9p/+N6RJbq/kkV8JmYZaINknaEQ2m0/f693ZPpg==", "dev": true, "license": "Apache-2.0", "peer": true, "dependencies": { "@jsonjoy.com/base64": "^1.1.2", - "@jsonjoy.com/buffers": "^1.0.0", + "@jsonjoy.com/buffers": "^1.2.0", "@jsonjoy.com/codegen": "^1.0.0", - "@jsonjoy.com/json-pointer": "^1.0.1", + "@jsonjoy.com/json-pointer": "^1.0.2", "@jsonjoy.com/util": "^1.9.0", "hyperdyperid": "^1.2.0", - "thingies": "^2.5.0" + "thingies": "^2.5.0", + "tree-dump": "^1.1.0" }, "engines": { "node": ">=10.0" @@ -5604,19 +5748,6 @@ "tslib": "2" } }, - "node_modules/@keyv/bigmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@keyv/bigmap/-/bigmap-1.0.2.tgz", - "integrity": "sha512-KR03xkEZlAZNF4IxXgVXb+uNIVNvwdh8UwI0cnc7WI6a+aQcDp8GL80qVfeB4E5NpsKJzou5jU0r6yLSSbMOtA==", - "dev": true, - "license": "MIT", - "dependencies": { - "hookified": "^1.12.1" - }, - "engines": { - "node": ">= 18" - } - }, "node_modules/@keyv/serialize": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.1.1.tgz", @@ -5639,48 +5770,26 @@ "peer": true }, "node_modules/@listr2/prompt-adapter-inquirer": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/@listr2/prompt-adapter-inquirer/-/prompt-adapter-inquirer-2.0.18.tgz", - "integrity": "sha512-0hz44rAcrphyXcA8IS7EJ2SCoaBZD2u5goE8S/e+q/DL+dOGpqpcLidVOFeLG3VgML62SXmfRLAhWt0zL1oW4Q==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@listr2/prompt-adapter-inquirer/-/prompt-adapter-inquirer-3.0.1.tgz", + "integrity": "sha512-3XFmGwm3u6ioREG+ynAQB7FoxfajgQnMhIu8wC5eo/Lsih4aKDg0VuIMGaOsYn7hJSJagSeaD4K8yfpkEoDEmA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/type": "^1.5.5" + "@inquirer/type": "^3.0.7" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" }, "peerDependencies": { - "@inquirer/prompts": ">= 3 < 8" - } - }, - "node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-1.5.5.tgz", - "integrity": "sha512-MzICLu4yS7V8AA61sANROZ9vT1H3ooca5dSmI1FjZkzq7o/koMsRfQSzRtFo+F3Ao4Sf1C0bpLKejpKB/+j6MA==", - "dev": true, - "license": "MIT", - "dependencies": { - "mute-stream": "^1.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@listr2/prompt-adapter-inquirer/node_modules/mute-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", - "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "@inquirer/prompts": ">= 3 < 8", + "listr2": "9.0.1" } }, "node_modules/@lmdb/lmdb-darwin-arm64": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-arm64/-/lmdb-darwin-arm64-3.2.6.tgz", - "integrity": "sha512-yF/ih9EJJZc72psFQbwnn8mExIWfTnzWJg+N02hnpXtDPETYLmQswIMBn7+V88lfCaFrMozJsUvcEQIkEPU0Gg==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-arm64/-/lmdb-darwin-arm64-3.4.2.tgz", + "integrity": "sha512-NK80WwDoODyPaSazKbzd3NEJ3ygePrkERilZshxBViBARNz21rmediktGHExoj9n5t9+ChlgLlxecdFKLCuCKg==", "cpu": [ "arm64" ], @@ -5692,9 +5801,9 @@ ] }, "node_modules/@lmdb/lmdb-darwin-x64": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-x64/-/lmdb-darwin-x64-3.2.6.tgz", - "integrity": "sha512-5BbCumsFLbCi586Bb1lTWQFkekdQUw8/t8cy++Uq251cl3hbDIGEwD9HAwh8H6IS2F6QA9KdKmO136LmipRNkg==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-x64/-/lmdb-darwin-x64-3.4.2.tgz", + "integrity": "sha512-zevaowQNmrp3U7Fz1s9pls5aIgpKRsKb3dZWDINtLiozh3jZI9fBrI19lYYBxqdyiIyNdlyiidPnwPShj4aK+w==", "cpu": [ "x64" ], @@ -5706,9 +5815,9 @@ ] }, "node_modules/@lmdb/lmdb-linux-arm": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm/-/lmdb-linux-arm-3.2.6.tgz", - "integrity": "sha512-+6XgLpMb7HBoWxXj+bLbiiB4s0mRRcDPElnRS3LpWRzdYSe+gFk5MT/4RrVNqd2MESUDmb53NUXw1+BP69bjiQ==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm/-/lmdb-linux-arm-3.4.2.tgz", + "integrity": "sha512-OmHCULY17rkx/RoCoXlzU7LyR8xqrksgdYWwtYa14l/sseezZ8seKWXcogHcjulBddER5NnEFV4L/Jtr2nyxeg==", "cpu": [ "arm" ], @@ -5720,9 +5829,9 @@ ] }, "node_modules/@lmdb/lmdb-linux-arm64": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm64/-/lmdb-linux-arm64-3.2.6.tgz", - "integrity": "sha512-l5VmJamJ3nyMmeD1ANBQCQqy7do1ESaJQfKPSm2IG9/ADZryptTyCj8N6QaYgIWewqNUrcbdMkJajRQAt5Qjfg==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm64/-/lmdb-linux-arm64-3.4.2.tgz", + "integrity": "sha512-ZBEfbNZdkneebvZs98Lq30jMY8V9IJzckVeigGivV7nTHJc+89Ctomp1kAIWKlwIG0ovCDrFI448GzFPORANYg==", "cpu": [ "arm64" ], @@ -5734,9 +5843,9 @@ ] }, "node_modules/@lmdb/lmdb-linux-x64": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-x64/-/lmdb-linux-x64-3.2.6.tgz", - "integrity": "sha512-nDYT8qN9si5+onHYYaI4DiauDMx24OAiuZAUsEqrDy+ja/3EbpXPX/VAkMV8AEaQhy3xc4dRC+KcYIvOFefJ4Q==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-x64/-/lmdb-linux-x64-3.4.2.tgz", + "integrity": "sha512-vL9nM17C77lohPYE4YaAQvfZCSVJSryE4fXdi8M7uWPBnU+9DJabgKVAeyDb84ZM2vcFseoBE4/AagVtJeRE7g==", "cpu": [ "x64" ], @@ -5747,10 +5856,24 @@ "linux" ] }, + "node_modules/@lmdb/lmdb-win32-arm64": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-win32-arm64/-/lmdb-win32-arm64-3.4.2.tgz", + "integrity": "sha512-SXWjdBfNDze4ZPeLtYIzsIeDJDJ/SdsA0pEXcUBayUIMO0FQBHfVZZyHXQjjHr4cvOAzANBgIiqaXRwfMhzmLw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@lmdb/lmdb-win32-x64": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-win32-x64/-/lmdb-win32-x64-3.2.6.tgz", - "integrity": "sha512-XlqVtILonQnG+9fH2N3Aytria7P/1fwDgDhl29rde96uH2sLB8CHORIf2PfuLVzFQJ7Uqp8py9AYwr3ZUCFfWg==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-win32-x64/-/lmdb-win32-x64-3.4.2.tgz", + "integrity": "sha512-IY+r3bxKW6Q6sIPiMC0L533DEfRJSXibjSI3Ft/w9Q8KQBNqEIvUFXt+09wV8S5BRk0a8uSF19YWxuRwEfI90g==", "cpu": [ "x64" ], @@ -5761,6 +5884,54 @@ "win32" ] }, + "node_modules/@modelcontextprotocol/sdk": { + "version": "1.17.3", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.17.3.tgz", + "integrity": "sha512-JPwUKWSsbzx+DLFznf/QZ32Qa+ptfbUlHhRLrBQBAFu9iI1iYvizM4p+zhhRDceSsPutXp4z+R/HPVphlIiclg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.6", + "content-type": "^1.0.5", + "cors": "^2.8.5", + "cross-spawn": "^7.0.5", + "eventsource": "^3.0.2", + "eventsource-parser": "^3.0.0", + "express": "^5.0.1", + "express-rate-limit": "^7.5.0", + "pkce-challenge": "^5.0.0", + "raw-body": "^3.0.0", + "zod": "^3.23.8", + "zod-to-json-schema": "^3.24.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, "node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.3.tgz", @@ -6169,20 +6340,20 @@ } }, "node_modules/@ngtools/webpack": { - "version": "19.2.17", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-19.2.17.tgz", - "integrity": "sha512-HpbOLwS8tIW041UXcMqwfySqpZ9ztObH8U4NWKwjPBe0S5UDnF6doW2rS3GQm71hkiuB8sqbxOWz5I/NNvZFNQ==", + "version": "20.3.8", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-20.3.8.tgz", + "integrity": "sha512-hwmpnUKHpC89rne9t/OBeoPM9MBiD9rAfVwnntK+d13/v44U2jWVON7ogIcyjWb+PyAn8VNn1/G404+YmOvxCA==", "dev": true, "license": "MIT", "peer": true, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "node": "^20.19.0 || ^22.12.0 || >=24.0.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", "yarn": ">= 1.13.0" }, "peerDependencies": { - "@angular/compiler-cli": "^19.0.0 || ^19.2.0-next.0", - "typescript": ">=5.5 <5.9", + "@angular/compiler-cli": "^20.0.0", + "typescript": ">=5.8 <6.0", "webpack": "^5.54.0" } }, @@ -6397,14 +6568,34 @@ "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/@npmcli/promise-spawn": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-8.0.3.tgz", - "integrity": "sha512-Yb00SWaL4F8w+K8YGhQ55+xE4RUNdMHV43WZGsiTM92gS+lC0mGsn7I4hLug7pbao035S6bj3Y3w0cUNGLfmkg==", + "node_modules/@npmcli/package-json/node_modules/hosted-git-info": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-8.1.0.tgz", + "integrity": "sha512-Rw/B2DNQaPBICNXEm8balFz9a6WpZrkCGpcWFpy7nCj+NyhSdqXipmfvtmWt9xGfp0wZnBxB+iVpLmQMYt47Tw==", "dev": true, "license": "ISC", "dependencies": { - "which": "^5.0.0" + "lru-cache": "^10.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/package-json/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/@npmcli/promise-spawn": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-8.0.3.tgz", + "integrity": "sha512-Yb00SWaL4F8w+K8YGhQ55+xE4RUNdMHV43WZGsiTM92gS+lC0mGsn7I4hLug7pbao035S6bj3Y3w0cUNGLfmkg==", + "dev": true, + "license": "ISC", + "dependencies": { + "which": "^5.0.0" }, "engines": { "node": "^18.17.0 || >=20.5.0" @@ -6847,9 +7038,9 @@ } }, "node_modules/@puppeteer/browsers": { - "version": "2.10.10", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.10.10.tgz", - "integrity": "sha512-3ZG500+ZeLql8rE0hjfhkycJjDj0pI/btEh3L9IkWUYcOrgP0xCNRq3HbtbqOPbvDhFaAWD88pDFtlLv8ns8gA==", + "version": "2.10.12", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.10.12.tgz", + "integrity": "sha512-mP9iLFZwH+FapKJLeA7/fLqOlSUwYpMwjR1P5J23qd4e7qGJwecJccJqHYrjw33jmIZYV4dtiTHPD/J+1e7cEw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -6857,8 +7048,8 @@ "extract-zip": "^2.0.1", "progress": "^2.0.3", "proxy-agent": "^6.5.0", - "semver": "^7.7.2", - "tar-fs": "^3.1.0", + "semver": "^7.7.3", + "tar-fs": "^3.1.1", "yargs": "^17.7.2" }, "bin": { @@ -6868,10 +7059,25 @@ "node": ">=18" } }, + "node_modules/@puppeteer/browsers/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@puppeteer/browsers/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "bin": { @@ -6881,10 +7087,47 @@ "node": ">=10" } }, + "node_modules/@puppeteer/browsers/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@puppeteer/browsers/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.8.tgz", - "integrity": "sha512-q217OSE8DTp8AFHuNHXo0Y86e1wtlfVrXiAlwkIvGRQv9zbc6mE3sjIVfwI8sYUyNxwOg0j/Vm1RKM04JcWLJw==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.3.tgz", + "integrity": "sha512-h6cqHGZ6VdnwliFG1NXvMPTy/9PS3h8oLh7ImwR+kl+oYnQizgjxsONmmPSb2C66RksfkfIxEVtDSEcJiO0tqw==", "cpu": [ "arm" ], @@ -6896,9 +7139,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.8.tgz", - "integrity": "sha512-Gigjz7mNWaOL9wCggvoK3jEIUUbGul656opstjaUSGC3eT0BM7PofdAJaBfPFWWkXNVAXbaQtC99OCg4sJv70Q==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.3.tgz", + "integrity": "sha512-wd+u7SLT/u6knklV/ifG7gr5Qy4GUbH2hMWcDauPFJzmCZUAJ8L2bTkVXC2niOIxp8lk3iH/QX8kSrUxVZrOVw==", "cpu": [ "arm64" ], @@ -6910,9 +7153,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.8.tgz", - "integrity": "sha512-02rVdZ5tgdUNRxIUrFdcMBZQoaPMrxtwSb+/hOfBdqkatYHR3lZ2A2EGyHq2sGOd0Owk80oV3snlDASC24He3Q==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.3.tgz", + "integrity": "sha512-lj9ViATR1SsqycwFkJCtYfQTheBdvlWJqzqxwc9f2qrcVrQaF/gCuBRTiTolkRWS6KvNxSk4KHZWG7tDktLgjg==", "cpu": [ "arm64" ], @@ -6924,9 +7167,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.8.tgz", - "integrity": "sha512-qIP/elwR/tq/dYRx3lgwK31jkZvMiD6qUtOycLhTzCvrjbZ3LjQnEM9rNhSGpbLXVJYQ3rq39A6Re0h9tU2ynw==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.3.tgz", + "integrity": "sha512-+Dyo7O1KUmIsbzx1l+4V4tvEVnVQqMOIYtrxK7ncLSknl1xnMHLgn7gddJVrYPNZfEB8CIi3hK8gq8bDhb3h5A==", "cpu": [ "x64" ], @@ -6938,9 +7181,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.8.tgz", - "integrity": "sha512-IQNVXL9iY6NniYbTaOKdrlVP3XIqazBgJOVkddzJlqnCpRi/yAeSOa8PLcECFSQochzqApIOE1GHNu3pCz+BDA==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.3.tgz", + "integrity": "sha512-u9Xg2FavYbD30g3DSfNhxgNrxhi6xVG4Y6i9Ur1C7xUuGDW3banRbXj+qgnIrwRN4KeJ396jchwy9bCIzbyBEQ==", "cpu": [ "arm64" ], @@ -6952,9 +7195,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.8.tgz", - "integrity": "sha512-TYXcHghgnCqYFiE3FT5QwXtOZqDj5GmaFNTNt3jNC+vh22dc/ukG2cG+pi75QO4kACohZzidsq7yKTKwq/Jq7Q==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.3.tgz", + "integrity": "sha512-5M8kyi/OX96wtD5qJR89a/3x5x8x5inXBZO04JWhkQb2JWavOWfjgkdvUqibGJeNNaz1/Z1PPza5/tAPXICI6A==", "cpu": [ "x64" ], @@ -6966,9 +7209,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.8.tgz", - "integrity": "sha512-A4iphFGNkWRd+5m3VIGuqHnG3MVnqKe7Al57u9mwgbyZ2/xF9Jio72MaY7xxh+Y87VAHmGQr73qoKL9HPbXj1g==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.3.tgz", + "integrity": "sha512-IoerZJ4l1wRMopEHRKOO16e04iXRDyZFZnNZKrWeNquh5d6bucjezgd+OxG03mOMTnS1x7hilzb3uURPkJ0OfA==", "cpu": [ "arm" ], @@ -6980,9 +7223,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.8.tgz", - "integrity": "sha512-S0lqKLfTm5u+QTxlFiAnb2J/2dgQqRy/XvziPtDd1rKZFXHTyYLoVL58M/XFwDI01AQCDIevGLbQrMAtdyanpA==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.3.tgz", + "integrity": "sha512-ZYdtqgHTDfvrJHSh3W22TvjWxwOgc3ThK/XjgcNGP2DIwFIPeAPNsQxrJO5XqleSlgDux2VAoWQ5iJrtaC1TbA==", "cpu": [ "arm" ], @@ -6994,9 +7237,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.8.tgz", - "integrity": "sha512-jpz9YOuPiSkL4G4pqKrus0pn9aYwpImGkosRKwNi+sJSkz+WU3anZe6hi73StLOQdfXYXC7hUfsQlTnjMd3s1A==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.3.tgz", + "integrity": "sha512-NcViG7A0YtuFDA6xWSgmFb6iPFzHlf5vcqb2p0lGEbT+gjrEEz8nC/EeDHvx6mnGXnGCC1SeVV+8u+smj0CeGQ==", "cpu": [ "arm64" ], @@ -7008,9 +7251,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.8.tgz", - "integrity": "sha512-KdSfaROOUJXgTVxJNAZ3KwkRc5nggDk+06P6lgi1HLv1hskgvxHUKZ4xtwHkVYJ1Rep4GNo+uEfycCRRxht7+Q==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.3.tgz", + "integrity": "sha512-d3pY7LWno6SYNXRm6Ebsq0DJGoiLXTb83AIPCXl9fmtIQs/rXoS8SJxxUNtFbJ5MiOvs+7y34np77+9l4nfFMw==", "cpu": [ "arm64" ], @@ -7022,23 +7265,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.4.tgz", - "integrity": "sha512-0G2c2lpYtbTuXo8KEJkDkClE/+/2AFPdPAbmaHoE870foRFs4pBrDehilMcrSScrN/fB/1HTaWO4bqw+ewBzMQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.8.tgz", - "integrity": "sha512-NyF4gcxwkMFRjgXBM6g2lkT58OWztZvw5KkV2K0qqSnUEqCVcqdh2jN4gQrTn/YUpAcNKyFHfoOZEer9nwo6uQ==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.3.tgz", + "integrity": "sha512-3y5GA0JkBuirLqmjwAKwB0keDlI6JfGYduMlJD/Rl7fvb4Ni8iKdQs1eiunMZJhwDWdCvrcqXRY++VEBbvk6Eg==", "cpu": [ "loong64" ], @@ -7049,24 +7278,10 @@ "linux" ] }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.8.tgz", - "integrity": "sha512-LMJc999GkhGvktHU85zNTDImZVUCJ1z/MbAJTnviiWmmjyckP5aQsHtcujMjpNdMZPT2rQEDBlJfubhs3jsMfw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.4.tgz", - "integrity": "sha512-teSACug1GyZHmPDv14VNbvZFX779UqWTsd7KtTM9JIZRDI5NUwYSIS30kzI8m06gOPB//jtpqlhmraQ68b5X2g==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.3.tgz", + "integrity": "sha512-AUUH65a0p3Q0Yfm5oD2KVgzTKgwPyp9DSXc3UA7DtxhEb/WSPfbG4wqXeSN62OG5gSo18em4xv6dbfcUGXcagw==", "cpu": [ "ppc64" ], @@ -7078,9 +7293,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.8.tgz", - "integrity": "sha512-xAQCAHPj8nJq1PI3z8CIZzXuXCstquz7cIOL73HHdXiRcKk8Ywwqtx2wrIy23EcTn4aZ2fLJNBB8d0tQENPCmw==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.3.tgz", + "integrity": "sha512-1makPhFFVBqZE+XFg3Dkq+IkQ7JvmUrwwqaYBL2CE+ZpxPaqkGaiWFEWVGyvTwZace6WLJHwjVh/+CXbKDGPmg==", "cpu": [ "riscv64" ], @@ -7092,9 +7307,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.4.tgz", - "integrity": "sha512-1HHmsRyh845QDpEWzOFtMCph5Ts+9+yllCrREuBR/vg2RogAQGGBRC8lDPrPOMnrdOJ+mt1WLMOC2Kao/UwcvA==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.3.tgz", + "integrity": "sha512-OOFJa28dxfl8kLOPMUOQBCO6z3X2SAfzIE276fwT52uXDWUS178KWq0pL7d6p1kz7pkzA0yQwtqL0dEPoVcRWg==", "cpu": [ "riscv64" ], @@ -7106,9 +7321,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.8.tgz", - "integrity": "sha512-DdePVk1NDEuc3fOe3dPPTb+rjMtuFw89gw6gVWxQFAuEqqSdDKnrwzZHrUYdac7A7dXl9Q2Vflxpme15gUWQFA==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.3.tgz", + "integrity": "sha512-jMdsML2VI5l+V7cKfZx3ak+SLlJ8fKvLJ0Eoa4b9/vCUrzXKgoKxvHqvJ/mkWhFiyp88nCkM5S2v6nIwRtPcgg==", "cpu": [ "s390x" ], @@ -7120,9 +7335,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.8.tgz", - "integrity": "sha512-8y7ED8gjxITUltTUEJLQdgpbPh1sUQ0kMTmufRF/Ns5tI9TNMNlhWtmPKKHCU0SilX+3MJkZ0zERYYGIVBYHIA==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.3.tgz", + "integrity": "sha512-tPgGd6bY2M2LJTA1uGq8fkSPK8ZLYjDjY+ZLK9WHncCnfIz29LIXIqUgzCR0hIefzy6Hpbe8Th5WOSwTM8E7LA==", "cpu": [ "x64" ], @@ -7134,9 +7349,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.8.tgz", - "integrity": "sha512-SCXcP0ZpGFIe7Ge+McxY5zKxiEI5ra+GT3QRxL0pMMtxPfpyLAKleZODi1zdRHkz5/BhueUrYtYVgubqe9JBNQ==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.3.tgz", + "integrity": "sha512-BCFkJjgk+WFzP+tcSMXq77ymAPIxsX9lFJWs+2JzuZTLtksJ2o5hvgTdIcZ5+oKzUDMwI0PfWzRBYAydAHF2Mw==", "cpu": [ "x64" ], @@ -7148,9 +7363,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.4.tgz", - "integrity": "sha512-1ox+GqgRWqaB1RnyZXL8PD6E5f7YyRUJYnCqKpNzxzP0TkaUh112NDrR9Tt+C8rJ4x5G9Mk8PQR3o7Ku2RKqKA==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.3.tgz", + "integrity": "sha512-KTD/EqjZF3yvRaWUJdD1cW+IQBk4fbQaHYJUmP8N4XoKFZilVL8cobFSTDnjTtxWJQ3JYaMgF4nObY/+nYkumA==", "cpu": [ "arm64" ], @@ -7162,9 +7377,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.8.tgz", - "integrity": "sha512-YHYsgzZgFJzTRbth4h7Or0m5O74Yda+hLin0irAIobkLQFRQd1qWmnoVfwmKm9TXIZVAD0nZ+GEb2ICicLyCnQ==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.3.tgz", + "integrity": "sha512-+zteHZdoUYLkyYKObGHieibUFLbttX2r+58l27XZauq0tcWYYuKUwY2wjeCN9oK1Um2YgH2ibd6cnX/wFD7DuA==", "cpu": [ "arm64" ], @@ -7176,9 +7391,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.8.tgz", - "integrity": "sha512-r3NRQrXkHr4uWy5TOjTpTYojR9XmF0j/RYgKCef+Ag46FWUTltm5ziticv8LdNsDMehjJ543x/+TJAek/xBA2w==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.3.tgz", + "integrity": "sha512-of1iHkTQSo3kr6dTIRX6t81uj/c/b15HXVsPcEElN5sS859qHrOepM5p9G41Hah+CTqSh2r8Bm56dL2z9UQQ7g==", "cpu": [ "ia32" ], @@ -7190,9 +7405,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.4.tgz", - "integrity": "sha512-UF9KfsH9yEam0UjTwAgdK0anlQ7c8/pWPU2yVjyWcF1I1thABt6WXE47cI71pGiZ8wGvxohBoLnxM04L/wj8mQ==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.3.tgz", + "integrity": "sha512-s0hybmlHb56mWVZQj8ra9048/WZTPLILKxcvcq+8awSZmyiSUZjjem1AhU3Tf4ZKpYhK4mg36HtHDOe8QJS5PQ==", "cpu": [ "x64" ], @@ -7204,9 +7419,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.8.tgz", - "integrity": "sha512-U0FaE5O1BCpZSeE6gBl3c5ObhePQSfk9vDRToMmTkbhCOgW4jqvtS5LGyQ76L1fH8sM0keRp4uDTsbjiUyjk0g==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.3.tgz", + "integrity": "sha512-zGIbEVVXVtauFgl3MRwGWEN36P5ZGenHRMgNw88X5wEhEBpq0XrMEZwOn07+ICrwM17XO5xfMZqh0OldCH5VTA==", "cpu": [ "x64" ], @@ -7218,48 +7433,20 @@ ] }, "node_modules/@schematics/angular": { - "version": "19.2.15", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-19.2.15.tgz", - "integrity": "sha512-dz/eoFQKG09POSygpEDdlCehFIMo35HUM2rVV8lx9PfQEibpbGwl1NNQYEbqwVjTyCyD/ILyIXCWPE+EfTnG4g==", + "version": "20.3.8", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-20.3.8.tgz", + "integrity": "sha512-lmdh1JywRl0BK1VcYwGDrNre78OpduNhsV4N5afELvrNPKSk/ixCb3iZq4MCY3yBZ3RV5Uso+vrJwwEeqe02JQ==", "dev": true, "license": "MIT", "dependencies": { - "@angular-devkit/core": "19.2.15", - "@angular-devkit/schematics": "19.2.15", + "@angular-devkit/core": "20.3.8", + "@angular-devkit/schematics": "20.3.8", "jsonc-parser": "3.3.1" }, "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0", - "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", - "yarn": ">= 1.13.0" - } - }, - "node_modules/@schematics/angular/node_modules/@angular-devkit/core": { - "version": "19.2.15", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-19.2.15.tgz", - "integrity": "sha512-pU2RZYX6vhd7uLSdLwPnuBcr0mXJSjp3EgOXKsrlQFQZevc+Qs+2JdXgIElnOT/aDqtRtriDmLlSbtdE8n3ZbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "8.17.1", - "ajv-formats": "3.0.1", - "jsonc-parser": "3.3.1", - "picomatch": "4.0.2", - "rxjs": "7.8.1", - "source-map": "0.7.4" - }, - "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "node": "^20.19.0 || ^22.12.0 || >=24.0.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", "yarn": ">= 1.13.0" - }, - "peerDependencies": { - "chokidar": "^4.0.0" - }, - "peerDependenciesMeta": { - "chokidar": { - "optional": true - } } }, "node_modules/@sigstore/bundle": { @@ -7349,20 +7536,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@sindresorhus/merge-streams": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", - "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@sinonjs/commons": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", @@ -7384,9 +7557,9 @@ } }, "node_modules/@swimlane/ngx-graph": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@swimlane/ngx-graph/-/ngx-graph-10.0.0.tgz", - "integrity": "sha512-9/ZvLgTv+Df1DhOn4AYOSkYbHVvTb5sz/A06H/tUvL3w67bBtBxERpv4T2eo8AX+wHV/g4qcGgZ6FTmfQcvkbg==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@swimlane/ngx-graph/-/ngx-graph-11.0.0.tgz", + "integrity": "sha512-QmJxh97KlC70eDWGCZcyl5vzNGaRo7rGcNeLAB2o0RKSnMPm/kdMzRKFeu40zvmpyWVw2oTEjhwdVQ/08GqIyQ==", "license": "MIT", "dependencies": { "d3-dispatch": "^3.0.1", @@ -7403,10 +7576,10 @@ "webcola": "^3.4.0" }, "peerDependencies": { - "@angular/animations": "15.x || 16.x || 17.x || 18.x || 19.x", - "@angular/cdk": "15.x || 16.x || 17.x || 18.x || 19.x", - "@angular/common": "15.x || 16.x || 17.x || 18.x || 19.x", - "@angular/core": "15.x || 16.x || 17.x || 18.x || 19.x", + "@angular/animations": "18.x || 19.x || 20.x", + "@angular/cdk": "18.x || 19.x || 20.x", + "@angular/common": "18.x || 19.x || 20.x", + "@angular/core": "18.x || 19.x || 20.x", "rxjs": "7.x" } }, @@ -7685,9 +7858,9 @@ "license": "MIT" }, "node_modules/@types/express": { - "version": "4.17.23", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.23.tgz", - "integrity": "sha512-Crp6WY9aTYP3qPi2wGDo9iUe/rceX01UMhnF1jmwDcKCFM6cx7YhGP/Mpr3y9AASpfHixIG0E6azCcL5OcDHsQ==", + "version": "4.17.25", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.25.tgz", + "integrity": "sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==", "dev": true, "license": "MIT", "peer": true, @@ -7695,13 +7868,13 @@ "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", "@types/qs": "*", - "@types/serve-static": "*" + "@types/serve-static": "^1" } }, "node_modules/@types/express-serve-static-core": { - "version": "4.19.6", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz", - "integrity": "sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==", + "version": "4.19.7", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.7.tgz", + "integrity": "sha512-FvPtiIf1LfhzsaIXhv/PHan/2FeQBbtBDtfX2QfvPxdUelMDEckK08SM6nqo1MIZY3RUlfA+HV8+hFUSio78qg==", "dev": true, "license": "MIT", "peer": true, @@ -7731,9 +7904,9 @@ "peer": true }, "node_modules/@types/http-proxy": { - "version": "1.17.16", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.16.tgz", - "integrity": "sha512-sdWoUajOB1cd0A8cRRQ1cfyWNbmFKLAqBB89Y8x5iYyG/mkJHc0YUH8pdWBy2omi9qtCpiIgGjuwO0dQST2l5w==", + "version": "1.17.17", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.17.tgz", + "integrity": "sha512-ED6LB+Z1AVylNTu7hdzuBqOgMnvG/ld6wGCG8wFnAzKX5uyW2K3WD52v0gnLCTK/VLpXtKckgWuyScYK6cSPaw==", "dev": true, "license": "MIT", "peer": true, @@ -7769,9 +7942,9 @@ } }, "node_modules/@types/jasmine": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-5.1.9.tgz", - "integrity": "sha512-8t4HtkW4wxiPVedMpeZ63n3vlWxEIquo/zc1Tm8ElU+SqVV7+D3Na2PWaJUp179AzTragMWVwkMv7mvty0NfyQ==", + "version": "5.1.12", + "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-5.1.12.tgz", + "integrity": "sha512-1BzPxNsFDLDfj9InVR3IeY0ZVf4o9XV+4mDqoCfyPkbsA7dYyKAPAb2co6wLFlHcvxPlt1wShm7zQdV7uTfLGA==", "dev": true, "license": "MIT" }, @@ -7808,13 +7981,38 @@ "parse5": "^7.0.0" } }, + "node_modules/@types/jsdom/node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/@types/jsdom/node_modules/parse5": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "entities": "^6.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@types/lodash": { "version": "4.14.132", @@ -7897,9 +8095,9 @@ "license": "MIT" }, "node_modules/@types/send": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.0.tgz", - "integrity": "sha512-zBF6vZJn1IaMpg3xUF25VK3gd3l8zwE0ZLRX7dsQyQi+jp4E8mMDJNGDYnYse+bQhYwWERTxVwHpi3dMOq7RKQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.1.tgz", + "integrity": "sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==", "dev": true, "license": "MIT", "peer": true, @@ -7919,9 +8117,9 @@ } }, "node_modules/@types/serve-static": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.9.tgz", - "integrity": "sha512-dOTIuqpWLyl3BBXU3maNQsS4A3zuuoYRNIvYSxxhebPfXg2mzWQEPne/nlJ37yOse6uGgR386uTpdsx4D0QZWA==", + "version": "1.15.10", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.10.tgz", + "integrity": "sha512-tRs1dB+g8Itk72rlSI2ZrW6vZg0YrLI81iQSTkMmOqnqCaNr/8Ek4VwWcN5vZgCYWbg/JJSGBlUaYGAOP73qBw==", "dev": true, "license": "MIT", "peer": true, @@ -7932,9 +8130,9 @@ } }, "node_modules/@types/serve-static/node_modules/@types/send": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz", - "integrity": "sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==", + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.6.tgz", + "integrity": "sha512-Uqt8rPBE8SY0RK8JB1EzVOIZ32uqy8HwdxCnoCOsYrvnswqmFZ/k+9Ikidlk/ImhsdvBsloHbAlewb2IEBV/Og==", "dev": true, "license": "MIT", "peer": true, @@ -8022,9 +8220,9 @@ } }, "node_modules/@types/yargs": { - "version": "17.0.33", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", - "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "version": "17.0.34", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.34.tgz", + "integrity": "sha512-KExbHVa92aJpw9WDQvzBaGVE2/Pz+pLZQloT2hjL8IqsZnV62rlPOYvNnLmf/L2dyllfVUOVBj64M0z/46eR2A==", "dev": true, "license": "MIT", "dependencies": { @@ -8050,17 +8248,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.45.0.tgz", - "integrity": "sha512-HC3y9CVuevvWCl/oyZuI47dOeDF9ztdMEfMH8/DW/Mhwa9cCLnK1oD7JoTVGW/u7kFzNZUKUoyJEqkaJh5y3Wg==", + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.2.tgz", + "integrity": "sha512-ZGBMToy857/NIPaaCucIUQgqueOiq7HeAKkhlvqVV4lm089zUFW6ikRySx2v+cAhKeUCPuWVHeimyk6Dw1iY3w==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.45.0", - "@typescript-eslint/type-utils": "8.45.0", - "@typescript-eslint/utils": "8.45.0", - "@typescript-eslint/visitor-keys": "8.45.0", + "@typescript-eslint/scope-manager": "8.46.2", + "@typescript-eslint/type-utils": "8.46.2", + "@typescript-eslint/utils": "8.46.2", + "@typescript-eslint/visitor-keys": "8.46.2", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -8074,22 +8272,22 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.45.0", + "@typescript-eslint/parser": "^8.46.2", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.45.0.tgz", - "integrity": "sha512-TGf22kon8KW+DeKaUmOibKWktRY8b2NSAZNdtWh798COm1NWx8+xJ6iFBtk3IvLdv6+LGLJLRlyhrhEDZWargQ==", + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.2.tgz", + "integrity": "sha512-BnOroVl1SgrPLywqxyqdJ4l3S2MsKVLDVxZvjI1Eoe8ev2r3kGDo+PcMihNmDE+6/KjkTubSJnmqGZZjQSBq/g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.45.0", - "@typescript-eslint/types": "8.45.0", - "@typescript-eslint/typescript-estree": "8.45.0", - "@typescript-eslint/visitor-keys": "8.45.0", + "@typescript-eslint/scope-manager": "8.46.2", + "@typescript-eslint/types": "8.46.2", + "@typescript-eslint/typescript-estree": "8.46.2", + "@typescript-eslint/visitor-keys": "8.46.2", "debug": "^4.3.4" }, "engines": { @@ -8105,14 +8303,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.45.0.tgz", - "integrity": "sha512-3pcVHwMG/iA8afdGLMuTibGR7pDsn9RjDev6CCB+naRsSYs2pns5QbinF4Xqw6YC/Sj3lMrm/Im0eMfaa61WUg==", + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.2.tgz", + "integrity": "sha512-PULOLZ9iqwI7hXcmL4fVfIsBi6AN9YxRc0frbvmg8f+4hQAjQ5GYNKK0DIArNo+rOKmR/iBYwkpBmnIwin4wBg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.45.0", - "@typescript-eslint/types": "^8.45.0", + "@typescript-eslint/tsconfig-utils": "^8.46.2", + "@typescript-eslint/types": "^8.46.2", "debug": "^4.3.4" }, "engines": { @@ -8127,14 +8325,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.45.0.tgz", - "integrity": "sha512-clmm8XSNj/1dGvJeO6VGH7EUSeA0FMs+5au/u3lrA3KfG8iJ4u8ym9/j2tTEoacAffdW1TVUzXO30W1JTJS7dA==", + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.2.tgz", + "integrity": "sha512-LF4b/NmGvdWEHD2H4MsHD8ny6JpiVNDzrSZr3CsckEgCbAGZbYM4Cqxvi9L+WqDMT+51Ozy7lt2M+d0JLEuBqA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.45.0", - "@typescript-eslint/visitor-keys": "8.45.0" + "@typescript-eslint/types": "8.46.2", + "@typescript-eslint/visitor-keys": "8.46.2" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -8145,9 +8343,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.45.0.tgz", - "integrity": "sha512-aFdr+c37sc+jqNMGhH+ajxPXwjv9UtFZk79k8pLoJ6p4y0snmYpPA52GuWHgt2ZF4gRRW6odsEj41uZLojDt5w==", + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.2.tgz", + "integrity": "sha512-a7QH6fw4S57+F5y2FIxxSDyi5M4UfGF+Jl1bCGd7+L4KsaUY80GsiF/t0UoRFDHAguKlBaACWJRmdrc6Xfkkag==", "dev": true, "license": "MIT", "engines": { @@ -8162,15 +8360,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.45.0.tgz", - "integrity": "sha512-bpjepLlHceKgyMEPglAeULX1vixJDgaKocp0RVJ5u4wLJIMNuKtUXIczpJCPcn2waII0yuvks/5m5/h3ZQKs0A==", + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.2.tgz", + "integrity": "sha512-HbPM4LbaAAt/DjxXaG9yiS9brOOz6fabal4uvUmaUYe6l3K1phQDMQKBRUrr06BQkxkvIZVVHttqiybM9nJsLA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.45.0", - "@typescript-eslint/typescript-estree": "8.45.0", - "@typescript-eslint/utils": "8.45.0", + "@typescript-eslint/types": "8.46.2", + "@typescript-eslint/typescript-estree": "8.46.2", + "@typescript-eslint/utils": "8.46.2", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -8187,9 +8385,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.45.0.tgz", - "integrity": "sha512-WugXLuOIq67BMgQInIxxnsSyRLFxdkJEJu8r4ngLR56q/4Q5LrbfkFRH27vMTjxEK8Pyz7QfzuZe/G15qQnVRA==", + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.2.tgz", + "integrity": "sha512-lNCWCbq7rpg7qDsQrd3D6NyWYu+gkTENkG5IKYhUIcxSb59SQC/hEQ+MrG4sTgBVghTonNWq42bA/d4yYumldQ==", "dev": true, "license": "MIT", "engines": { @@ -8201,16 +8399,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.45.0.tgz", - "integrity": "sha512-GfE1NfVbLam6XQ0LcERKwdTTPlLvHvXXhOeUGC1OXi4eQBoyy1iVsW+uzJ/J9jtCz6/7GCQ9MtrQ0fml/jWCnA==", + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.2.tgz", + "integrity": "sha512-f7rW7LJ2b7Uh2EiQ+7sza6RDZnajbNbemn54Ob6fRwQbgcIn+GWfyuHDHRYgRoZu1P4AayVScrRW+YfbTvPQoQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.45.0", - "@typescript-eslint/tsconfig-utils": "8.45.0", - "@typescript-eslint/types": "8.45.0", - "@typescript-eslint/visitor-keys": "8.45.0", + "@typescript-eslint/project-service": "8.46.2", + "@typescript-eslint/tsconfig-utils": "8.46.2", + "@typescript-eslint/types": "8.46.2", + "@typescript-eslint/visitor-keys": "8.46.2", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -8230,16 +8428,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.45.0.tgz", - "integrity": "sha512-bxi1ht+tLYg4+XV2knz/F7RVhU0k6VrSMc9sb8DQ6fyCTrGQLHfo7lDtN0QJjZjKkLA2ThrKuCdHEvLReqtIGg==", + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.2.tgz", + "integrity": "sha512-sExxzucx0Tud5tE0XqR0lT0psBQvEpnpiul9XbGUB1QwpWJJAps1O/Z7hJxLGiZLBKMCutjTzDgmd1muEhBnVg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.45.0", - "@typescript-eslint/types": "8.45.0", - "@typescript-eslint/typescript-estree": "8.45.0" + "@typescript-eslint/scope-manager": "8.46.2", + "@typescript-eslint/types": "8.46.2", + "@typescript-eslint/typescript-estree": "8.46.2" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -8254,13 +8452,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.45.0.tgz", - "integrity": "sha512-qsaFBA3e09MIDAGFUrTk+dzqtfv1XPVz8t8d1f0ybTzrCY7BKiMC5cjrl1O/P7UmHsNyW90EYSkU/ZWpmXelag==", + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.2.tgz", + "integrity": "sha512-tUFMXI4gxzzMXt4xpGJEsBsTox0XbNQ1y94EwlD/CuZwFcQP79xfQqMhau9HsRc/J0cAPA/HZt1dZPtGn9V/7w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.45.0", + "@typescript-eslint/types": "8.46.2", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -8284,13 +8482,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", - "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", - "dev": true, - "license": "ISC" - }, "node_modules/@vendure/ngx-translate-extract": { "version": "9.4.2", "resolved": "https://registry.npmjs.org/@vendure/ngx-translate-extract/-/ngx-translate-extract-9.4.2.tgz", @@ -8320,17 +8511,69 @@ "typescript": ">=5.2.0" } }, + "node_modules/@vendure/ngx-translate-extract/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@vendure/ngx-translate-extract/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@vendure/ngx-translate-extract/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@vitejs/plugin-basic-ssl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.2.0.tgz", - "integrity": "sha512-mkQnxTkcldAzIsomk1UuLfAu9n+kpQ3JbHcpCp7d2Oo6ITtji8pHS3QToOWjhPFvNQSnhlkAjmGbhv2QvwO/7Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-2.1.0.tgz", + "integrity": "sha512-dOxxrhgyDIEUADhb/8OlV9JIqYLgos03YorAueTIeOUskLJSEsfwCByjbu98ctXitUN3znXKp0bYD/WHSudCeA==", "dev": true, "license": "MIT", "engines": { - "node": ">=14.21.3" + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" }, "peerDependencies": { - "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" + "vite": "^6.0.0 || ^7.0.0" } }, "node_modules/@webassemblyjs/ast": { @@ -8563,27 +8806,38 @@ } }, "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" }, "engines": { "node": ">= 0.6" } }, - "node_modules/accepts/node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "node_modules/accepts/node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", "dev": true, "license": "MIT", - "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/accepts/node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, "engines": { "node": ">= 0.6" } @@ -8612,6 +8866,20 @@ "acorn-walk": "^8.0.2" } }, + "node_modules/acorn-import-phases": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz", + "integrity": "sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10.13.0" + }, + "peerDependencies": { + "acorn": "^8.14.0" + } + }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -8694,6 +8962,7 @@ "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -8710,6 +8979,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "dev": true, "license": "MIT", "dependencies": { "ajv": "^8.0.0" @@ -8737,6 +9007,32 @@ "ajv": "^8.8.2" } }, + "node_modules/algoliasearch": { + "version": "5.35.0", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.35.0.tgz", + "integrity": "sha512-Y+moNhsqgLmvJdgTsO4GZNgsaDWv8AOGAaPeIeHKlDn/XunoAqYbA+XNpBd1dW8GOXAUDyxC9Rxc7AV4kpFcIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/abtesting": "1.1.0", + "@algolia/client-abtesting": "5.35.0", + "@algolia/client-analytics": "5.35.0", + "@algolia/client-common": "5.35.0", + "@algolia/client-insights": "5.35.0", + "@algolia/client-personalization": "5.35.0", + "@algolia/client-query-suggestions": "5.35.0", + "@algolia/client-search": "5.35.0", + "@algolia/ingestion": "1.35.0", + "@algolia/monitoring": "1.35.0", + "@algolia/recommend": "5.35.0", + "@algolia/requester-browser-xhr": "5.35.0", + "@algolia/requester-fetch": "5.35.0", + "@algolia/requester-node-http": "5.35.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -8763,23 +9059,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-html-community": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", - "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", + "node_modules/ansi-html-community": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", + "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", "dev": true, "engines": [ "node >= 0.8.0" @@ -9090,9 +9373,9 @@ } }, "node_modules/autoprefixer": { - "version": "10.4.20", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz", - "integrity": "sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==", + "version": "10.4.21", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.21.tgz", + "integrity": "sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ==", "dev": true, "funding": [ { @@ -9111,11 +9394,11 @@ "license": "MIT", "peer": true, "dependencies": { - "browserslist": "^4.23.3", - "caniuse-lite": "^1.0.30001646", + "browserslist": "^4.24.4", + "caniuse-lite": "^1.0.30001702", "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", - "picocolors": "^1.0.1", + "picocolors": "^1.1.1", "postcss-value-parser": "^4.2.0" }, "bin": { @@ -9191,33 +9474,22 @@ "@babel/core": "^7.8.0" } }, - "node_modules/babel-jest/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/babel-loader": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.2.1.tgz", - "integrity": "sha512-fqe8naHt46e0yIdkjUZYqddSXfej3AHajX+CSO5X7oy0EmPc6o5Xh+RClNoHjnieWz9AW4kZxW9yyFMhVB1QLA==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-10.0.0.tgz", + "integrity": "sha512-z8jt+EdS61AMw22nSfoNJAZ0vrtmhPRVi6ghL3rCeRZI8cdNYFiV5xeV3HbE7rlZZNmGH8BVccwWt8/ED0QOHA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "find-cache-dir": "^4.0.0", - "schema-utils": "^4.0.0" + "find-up": "^5.0.0" }, "engines": { - "node": ">= 14.15.0" + "node": "^18.20.0 || ^20.10.0 || >=22.0.0" }, "peerDependencies": { "@babel/core": "^7.12.0", - "webpack": ">=5" + "webpack": ">=5.61.0" } }, "node_modules/babel-plugin-istanbul": { @@ -9308,15 +9580,15 @@ } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.11.1.tgz", - "integrity": "sha512-yGCqvBT4rwMczo28xkH/noxJ6MZ4nJfkVYdoDaC/utLtWrXxv27HVrzAeSbqR8SxDsp46n0YF47EbHoixy6rXQ==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.13.0.tgz", + "integrity": "sha512-U+GNwMdSFgzVmfhNm8GJUX88AadB3uo9KpJqS3FaqNIPKgySuvMb+bHPsOmmuWyIcuqZj/pzt1RUIUZns4y2+A==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.3", - "core-js-compat": "^3.40.0" + "@babel/helper-define-polyfill-provider": "^0.6.5", + "core-js-compat": "^3.43.0" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" @@ -9387,15 +9659,23 @@ "license": "MIT" }, "node_modules/bare-events": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.7.0.tgz", - "integrity": "sha512-b3N5eTW1g7vXkw+0CXh/HazGTcO5KYuu/RCNaJbDMPI6LHDi+7qe8EmxKUVe1sUbY2KZOVZFyj62x0OEz9qyAA==", - "license": "Apache-2.0" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.8.1.tgz", + "integrity": "sha512-oxSAxTS1hRfnyit2CL5QpAOS5ixfBjj6ex3yTNvXyY/kE719jQ/IjuESJBK2w5v4wwQRAHGseVJXx9QBYOtFGQ==", + "license": "Apache-2.0", + "peerDependencies": { + "bare-abort-controller": "*" + }, + "peerDependenciesMeta": { + "bare-abort-controller": { + "optional": true + } + } }, "node_modules/bare-fs": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.4.5.tgz", - "integrity": "sha512-TCtu93KGLu6/aiGWzMr12TmSRS6nKdfhAnzTQRbXoSWxkbb9eRd53jQ51jG7g1gYjjtto3hbBrrhzg6djcgiKg==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.5.0.tgz", + "integrity": "sha512-GljgCjeupKZJNetTqxKaQArLK10vpmK28or0+RwWjEl5Rk+/xG3wkpmkv+WrcBm3q1BwHKlnhXzR8O37kcvkXQ==", "dev": true, "license": "Apache-2.0", "optional": true, @@ -9464,9 +9744,9 @@ } }, "node_modules/bare-url": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/bare-url/-/bare-url-2.2.2.tgz", - "integrity": "sha512-g+ueNGKkrjMazDG3elZO1pNs3HY5+mMmOet1jtKyhOaCnkLzitxf26z7hoAEkDNgdNmnc1KIlt/dw6Po6xZMpA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/bare-url/-/bare-url-2.3.1.tgz", + "integrity": "sha512-v2yl0TnaZTdEnelkKtXZGnotiV6qATBlnNuUMrHl6v9Lmmrh9mw9RYyImPU7/4RahumSwQS1k2oKXcRfXcbjJw==", "dev": true, "license": "Apache-2.0", "optional": true, @@ -9504,9 +9784,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.12", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.12.tgz", - "integrity": "sha512-vAPMQdnyKCBtkmQA6FMCBvU9qFIppS3nzyXnEM+Lo2IAhG4Mpjv9cCxMudhgV3YdNNJv6TNqXy97dfRVL2LmaQ==", + "version": "2.8.21", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.21.tgz", + "integrity": "sha512-JU0h5APyQNsHOlAM7HnQnPToSDQoEBZqzu/YBlqDnEeymPnZDREeXJA3KBMQee+dKteAxZ2AtvQEvVYdZf241Q==", "license": "Apache-2.0", "bin": { "baseline-browser-mapping": "dist/cli.js" @@ -9541,14 +9821,14 @@ } }, "node_modules/beasties": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/beasties/-/beasties-0.3.2.tgz", - "integrity": "sha512-p4AF8uYzm9Fwu8m/hSVTCPXrRBPmB34hQpHsec2KOaR9CZmgoU8IOv4Cvwq4hgz2p4hLMNbsdNl5XeA6XbAQwA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/beasties/-/beasties-0.3.5.tgz", + "integrity": "sha512-NaWu+f4YrJxEttJSm16AzMIFtVldCvaJ68b1L098KpqXmxt9xOLtKoLkKxb8ekhOrLqEJAbvT6n6SEvB/sac7A==", "dev": true, "license": "Apache-2.0", "dependencies": { - "css-select": "^5.1.0", - "css-what": "^6.1.0", + "css-select": "^6.0.0", + "css-what": "^7.0.0", "dom-serializer": "^2.0.0", "domhandler": "^5.0.3", "htmlparser2": "^10.0.0", @@ -9583,17 +9863,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, "node_modules/blob-util": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", @@ -9614,81 +9883,39 @@ "license": "MIT" }, "node_modules/body-parser": { - "version": "1.20.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", - "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz", + "integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.0", + "http-errors": "^2.0.0", + "iconv-lite": "^0.6.3", + "on-finished": "^2.4.1", + "qs": "^6.14.0", + "raw-body": "^3.0.0", + "type-is": "^2.0.0" }, "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "ms": "2.0.0" + "node": ">=18" } }, "node_modules/body-parser/node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/body-parser/node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/bonjour-service": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.3.0.tgz", @@ -9737,9 +9964,9 @@ "license": "MIT" }, "node_modules/browserslist": { - "version": "4.26.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.3.tgz", - "integrity": "sha512-lAUU+02RFBuCKQPj/P6NgjlbCnLBMp4UtgTx7vNHd3XSIJF87s9a5rA3aH2yw3GS9DqZAUbOtZdCCiZeVRqt0w==", + "version": "4.27.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.27.0.tgz", + "integrity": "sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==", "funding": [ { "type": "opencollective", @@ -9756,11 +9983,11 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.8.9", - "caniuse-lite": "^1.0.30001746", - "electron-to-chromium": "^1.5.227", - "node-releases": "^2.0.21", - "update-browserslist-db": "^1.1.3" + "baseline-browser-mapping": "^2.8.19", + "caniuse-lite": "^1.0.30001751", + "electron-to-chromium": "^1.5.238", + "node-releases": "^2.0.26", + "update-browserslist-db": "^1.1.4" }, "bin": { "browserslist": "cli.js" @@ -9796,6 +10023,7 @@ "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, "funding": [ { "type": "github", @@ -9855,7 +10083,6 @@ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8" } @@ -9929,17 +10156,18 @@ } }, "node_modules/cacheable": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-2.0.3.tgz", - "integrity": "sha512-nZF80J3d8RMrroMSYm1E9pBllVDXWPuECZgEZxH+vusCY4MAXAJVrY0jutcHSgh3xYX3G2EUNnmtWGZVVjWCXw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-2.1.1.tgz", + "integrity": "sha512-LmF4AXiSNdiRbI2UjH8pAp9NIXxeQsTotpEaegPiDcnN0YPygDJDV3l/Urc0mL72JWdATEorKqIHEx55nDlONg==", "dev": true, "license": "MIT", "dependencies": { "@cacheable/memoize": "^2.0.3", "@cacheable/memory": "^2.0.3", - "@cacheable/utils": "^2.0.3", - "hookified": "^1.12.1", - "keyv": "^5.5.3" + "@cacheable/utils": "^2.1.0", + "hookified": "^1.12.2", + "keyv": "^5.5.3", + "qified": "^0.5.0" } }, "node_modules/cacheable/node_modules/keyv": { @@ -10023,9 +10251,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001748", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001748.tgz", - "integrity": "sha512-5P5UgAr0+aBmNiplks08JLw+AW/XG/SurlgZLgB1dDLfAw7EfRGxIwzPHxdSCGY/BTKDqIVyJL87cCN6s0ZR0w==", + "version": "1.0.30001751", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001751.tgz", + "integrity": "sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==", "funding": [ { "type": "opencollective", @@ -10062,13 +10290,6 @@ "node": ">=10.0.0" } }, - "node_modules/canvg/node_modules/regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", - "license": "MIT", - "optional": true - }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -10080,6 +10301,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", @@ -10096,6 +10318,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -10115,9 +10338,9 @@ } }, "node_modules/chardet": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz", - "integrity": "sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz", + "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==", "dev": true, "license": "MIT" }, @@ -10177,9 +10400,9 @@ } }, "node_modules/chromium-bidi": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-9.1.0.tgz", - "integrity": "sha512-rlUzQ4WzIAWdIbY/viPShhZU2n21CxDUgazXVbw4Hu1MwaeUSEksSeM6DqPgpRjCLXRk702AVRxJxoOz0dw4OA==", + "version": "10.5.1", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-10.5.1.tgz", + "integrity": "sha512-rlj6OyhKhVTnk4aENcUme3Jl9h+cq4oXu4AzBcvr8RMmT6BR4a3zSNT9dbIfXr9/BS6ibzRyDhowuw4n2GgzsQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -10257,6 +10480,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, "license": "MIT", "dependencies": { "restore-cursor": "^3.1.0" @@ -10269,6 +10493,7 @@ "version": "2.9.2", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -10324,9 +10549,9 @@ } }, "node_modules/cli-truncate/node_modules/emoji-regex": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.5.0.tgz", - "integrity": "sha512-lb49vf1Xzfx080OKA0o6l8DQQpV+6Vg95zyCJX9VB/BqKYlhG7N4wgROUUHRA+ZPUefLnteQOad7z1kT2bV7bg==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", "dev": true, "license": "MIT" }, @@ -10375,43 +10600,96 @@ } }, "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", "license": "ISC", "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, + "engines": { + "node": ">=20" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "node_modules/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "license": "MIT" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "license": "MIT", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "node_modules/cliui/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, "engines": { - "node": ">=0.8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/clone-deep": { @@ -10456,9 +10734,9 @@ } }, "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", + "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", "dev": true, "license": "MIT" }, @@ -10536,14 +10814,6 @@ "node": ">= 6" } }, - "node_modules/common-path-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", - "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", - "dev": true, - "license": "ISC", - "peer": true - }, "node_modules/common-tags": { "version": "1.8.2", "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", @@ -10693,12 +10963,11 @@ } }, "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", + "integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "safe-buffer": "5.2.1" }, @@ -10723,23 +10992,24 @@ "license": "MIT" }, "node_modules/cookie": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", - "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">= 0.6" } }, "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", "dev": true, "license": "MIT", - "peer": true + "engines": { + "node": ">=6.6.0" + } }, "node_modules/copy-anything": { "version": "2.0.6", @@ -10756,19 +11026,18 @@ } }, "node_modules/copy-webpack-plugin": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-12.0.2.tgz", - "integrity": "sha512-SNwdBeHyII+rWvee/bTnAYyO8vfVdcSTud4EIb6jcZ8inLeWucJE0DnxXQBjlQ5zlteuuvooGQy3LIyGxhvlOA==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-13.0.1.tgz", + "integrity": "sha512-J+YV3WfhY6W/Xf9h+J1znYuqTye2xkBUIGyTPWuBAT27qajBa5mR4f8WBmfDY3YjRftT2kqZZiLi1qf0H+UOFw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "fast-glob": "^3.3.2", "glob-parent": "^6.0.1", - "globby": "^14.0.0", "normalize-path": "^3.0.0", "schema-utils": "^4.2.0", - "serialize-javascript": "^6.0.2" + "serialize-javascript": "^6.0.2", + "tinyglobby": "^0.2.12" }, "engines": { "node": ">= 18.12.0" @@ -10782,9 +11051,9 @@ } }, "node_modules/core-js": { - "version": "3.45.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.45.1.tgz", - "integrity": "sha512-L4NPsJlCfZsPeXukyzHFlg/i7IIVwHSItR0wg0FLNqYClJ4MQYTYLbC7EkjKYRLZF2iof2MUgN0EGy7MdQFChg==", + "version": "3.46.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.46.0.tgz", + "integrity": "sha512-vDMm9B0xnqqZ8uSBpZ8sNtRtOdmfShrvT6h2TuQGLs0Is+cR0DYbj/KWP6ALVNbWPpqA/qPLoOuppJN07humpA==", "hasInstallScript": true, "license": "MIT", "optional": true, @@ -10794,14 +11063,14 @@ } }, "node_modules/core-js-compat": { - "version": "3.45.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.45.1.tgz", - "integrity": "sha512-tqTt5T4PzsMIZ430XGviK4vzYSoeNJ6CXODi6c/voxOT6IZqBht5/EKaSNnYiEjjRYxjVz7DQIsOsY0XNi8PIA==", + "version": "3.46.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.46.0.tgz", + "integrity": "sha512-p9hObIIEENxSV8xIu+V68JjSeARg6UVMG5mR+JEUguG3sI6MsiS1njz2jHmyJDvA+8jX/sytkBHup6kxhM9law==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "browserslist": "^4.25.3" + "browserslist": "^4.26.3" }, "funding": { "type": "opencollective", @@ -10814,6 +11083,20 @@ "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", "license": "MIT" }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/cosmiconfig": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", @@ -11006,17 +11289,17 @@ } }, "node_modules/css-select": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz", - "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-6.0.0.tgz", + "integrity": "sha512-rZZVSLle8v0+EY8QAkDWrKhpgt6SA5OtHsgBnsj6ZaLb5dmDVOWUDtQitd9ydxxvEjhewNudS6eTVU7uOyzvXw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" + "css-what": "^7.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "nth-check": "^2.1.1" }, "funding": { "url": "https://github.com/sponsors/fb55" @@ -11037,9 +11320,9 @@ } }, "node_modules/css-what": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz", - "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-7.0.0.tgz", + "integrity": "sha512-wD5oz5xibMOPHzy13CyGmogB3phdvcDaB5t0W/Nr5Z2O/agcB8YwOz6e2Lsp10pNDzBoDO9nVa3RGs/2BttpHQ==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -11852,23 +12135,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "license": "MIT", - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/define-lazy-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", - "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", - "dev": true, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, "license": "MIT", "peer": true, "engines": { @@ -11918,7 +12189,6 @@ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8" } @@ -11965,9 +12235,9 @@ "peer": true }, "node_modules/devtools-protocol": { - "version": "0.0.1508733", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1508733.tgz", - "integrity": "sha512-QJ1R5gtck6nDcdM+nlsaJXcelPEI7ZxSMw1ujHpO1c4+9l+Nue5qlebi9xO1Z2MGr92bFOQTW7/rrheh5hHxDg==", + "version": "0.0.1521046", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1521046.tgz", + "integrity": "sha512-vhE6eymDQSKWUXwwA37NtTTVEzjtGVfDr3pRbsWEQ5onH/Snp2c+2xZHWJJawG/0hCCJLRGt4xVtEVUVILol4w==", "dev": true, "license": "BSD-3-Clause" }, @@ -12010,16 +12280,6 @@ "node": ">=8" } }, - "node_modules/dir-glob/node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/dlv": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", @@ -12040,19 +12300,6 @@ "node": ">=6" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/dom-serializer": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", @@ -12112,9 +12359,9 @@ } }, "node_modules/dompurify": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.7.tgz", - "integrity": "sha512-WhL/YuveyGXJaerVlMYGWhvQswa7myDG17P7Vu65EWC05o8vfeNbvNf4d/BOvH99+ZW+LlQsc1GDKMa1vNK6dw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.3.0.tgz", + "integrity": "sha512-r+f6MYR1gGN1eJv0TVQbhA7if/U7P87cdPl3HN5rikqaBSBxLiCb/b9O+2eG0cxz0ghyU+mU1QkbsOwERMYlWQ==", "license": "(MPL-2.0 OR Apache-2.0)", "optional": true, "optionalDependencies": { @@ -12212,13 +12459,12 @@ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.230", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.230.tgz", - "integrity": "sha512-A6A6Fd3+gMdaed9wX83CvHYJb4UuapPD5X5SLq72VZJzxHSY0/LUweGXRWmQlh2ln7KV7iw7jnwXK7dlPoOnHQ==", + "version": "1.5.243", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.243.tgz", + "integrity": "sha512-ZCphxFW3Q1TVhcgS9blfut1PX8lusVi2SvXQgmEEnK4TCmE1JhH2JkjJN+DNt0pJJwfBri5AROBnz2b/C+YU9g==", "license": "ISC" }, "node_modules/emittery": { @@ -12257,7 +12503,6 @@ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8" } @@ -12450,9 +12695,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.4.tgz", - "integrity": "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz", + "integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -12463,37 +12708,38 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.4", - "@esbuild/android-arm": "0.25.4", - "@esbuild/android-arm64": "0.25.4", - "@esbuild/android-x64": "0.25.4", - "@esbuild/darwin-arm64": "0.25.4", - "@esbuild/darwin-x64": "0.25.4", - "@esbuild/freebsd-arm64": "0.25.4", - "@esbuild/freebsd-x64": "0.25.4", - "@esbuild/linux-arm": "0.25.4", - "@esbuild/linux-arm64": "0.25.4", - "@esbuild/linux-ia32": "0.25.4", - "@esbuild/linux-loong64": "0.25.4", - "@esbuild/linux-mips64el": "0.25.4", - "@esbuild/linux-ppc64": "0.25.4", - "@esbuild/linux-riscv64": "0.25.4", - "@esbuild/linux-s390x": "0.25.4", - "@esbuild/linux-x64": "0.25.4", - "@esbuild/netbsd-arm64": "0.25.4", - "@esbuild/netbsd-x64": "0.25.4", - "@esbuild/openbsd-arm64": "0.25.4", - "@esbuild/openbsd-x64": "0.25.4", - "@esbuild/sunos-x64": "0.25.4", - "@esbuild/win32-arm64": "0.25.4", - "@esbuild/win32-ia32": "0.25.4", - "@esbuild/win32-x64": "0.25.4" + "@esbuild/aix-ppc64": "0.25.9", + "@esbuild/android-arm": "0.25.9", + "@esbuild/android-arm64": "0.25.9", + "@esbuild/android-x64": "0.25.9", + "@esbuild/darwin-arm64": "0.25.9", + "@esbuild/darwin-x64": "0.25.9", + "@esbuild/freebsd-arm64": "0.25.9", + "@esbuild/freebsd-x64": "0.25.9", + "@esbuild/linux-arm": "0.25.9", + "@esbuild/linux-arm64": "0.25.9", + "@esbuild/linux-ia32": "0.25.9", + "@esbuild/linux-loong64": "0.25.9", + "@esbuild/linux-mips64el": "0.25.9", + "@esbuild/linux-ppc64": "0.25.9", + "@esbuild/linux-riscv64": "0.25.9", + "@esbuild/linux-s390x": "0.25.9", + "@esbuild/linux-x64": "0.25.9", + "@esbuild/netbsd-arm64": "0.25.9", + "@esbuild/netbsd-x64": "0.25.9", + "@esbuild/openbsd-arm64": "0.25.9", + "@esbuild/openbsd-x64": "0.25.9", + "@esbuild/openharmony-arm64": "0.25.9", + "@esbuild/sunos-x64": "0.25.9", + "@esbuild/win32-arm64": "0.25.9", + "@esbuild/win32-ia32": "0.25.9", + "@esbuild/win32-x64": "0.25.9" } }, "node_modules/esbuild-wasm": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.25.4.tgz", - "integrity": "sha512-2HlCS6rNvKWaSKhWaG/YIyRsTsL3gUrMP2ToZMBIjw9LM7vVcIs+rz8kE2vExvTJgvM8OKPqNpcHawY/BQc/qQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.25.9.tgz", + "integrity": "sha512-Jpv5tCSwQg18aCqCRD3oHIX/prBhXMDapIoG//A+6+dV0e7KQMGFg85ihJ5T1EeMjbZjON3TqFy0VrGAnIHLDA==", "dev": true, "license": "MIT", "bin": { @@ -12517,8 +12763,7 @@ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/escape-string-regexp": { "version": "4.0.0", @@ -12567,60 +12812,63 @@ } }, "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "version": "9.38.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.38.0.tgz", + "integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.1", + "@eslint/core": "^0.16.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.38.0", + "@eslint/plugin-kit": "^0.4.0", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-scope": { @@ -12681,18 +12929,14 @@ "concat-map": "0.0.1" } }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, + "license": "Apache-2.0", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -12729,18 +12973,31 @@ } }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -12812,7 +13069,6 @@ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">= 0.6" } @@ -12859,6 +13115,29 @@ "bare-events": "^2.7.0" } }, + "node_modules/eventsource": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz", + "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eventsource-parser": "^3.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/eventsource-parser": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz", + "integrity": "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/exceljs": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/exceljs/-/exceljs-4.4.0.tgz", @@ -12957,94 +13236,92 @@ "license": "Apache-2.0" }, "node_modules/exponential-backoff": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.2.tgz", - "integrity": "sha512-8QxYTVXUkuy7fIIoitQkPwGonB8F3Zj8eEO8Sqg9Zv/bkI7RJAzowee4gr81Hak/dUTpA2Z7VfQgoijjPNlUZA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.3.tgz", + "integrity": "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==", "dev": true, "license": "Apache-2.0" }, "node_modules/express": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", - "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz", + "integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.3", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.7.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.3.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.3", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.12", - "proxy-addr": "~2.0.7", - "qs": "6.13.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.19.0", - "serve-static": "1.16.2", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" + "accepts": "^2.0.0", + "body-parser": "^2.2.0", + "content-disposition": "^1.0.0", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.7", + "qs": "^6.14.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" }, "engines": { - "node": ">= 0.10.0" + "node": ">= 18" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/express" } }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/express-rate-limit": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.1.tgz", + "integrity": "sha512-7iN8iPMDzOMHPUYllBEsQdWVB6fPDMPqwjBaFrgr4Jgr/+okjvzAy+UHlYYL/Vs0OsOrMkwS6PJDkFlJwoxUnw==", "dev": true, "license": "MIT", - "peer": true, - "dependencies": { - "ms": "2.0.0" + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/express-rate-limit" + }, + "peerDependencies": { + "express": ">= 4.11" } }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "node_modules/express/node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", "dev": true, "license": "MIT", - "peer": true + "engines": { + "node": ">= 0.6" + } }, - "node_modules/express/node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "node_modules/express/node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", "dev": true, - "license": "BSD-3-Clause", - "peer": true, + "license": "MIT", "dependencies": { - "side-channel": "^1.0.6" + "mime-db": "^1.54.0" }, "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.6" } }, "node_modules/extend": { @@ -13102,6 +13379,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, "license": "MIT" }, "node_modules/fast-fifo": { @@ -13167,6 +13445,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "dev": true, "funding": [ { "type": "github", @@ -13236,7 +13515,6 @@ "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, "license": "MIT", "engines": { "node": ">=12.0.0" @@ -13283,16 +13561,16 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { @@ -13308,62 +13586,23 @@ } }, "node_modules/finalhandler": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", - "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz", + "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "debug": "2.6.9", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" }, "engines": { "node": ">= 0.8" } }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/find-cache-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-4.0.0.tgz", - "integrity": "sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "common-path-prefix": "^3.0.0", - "pkg-dir": "^7.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -13395,18 +13634,17 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { @@ -13487,7 +13725,6 @@ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">= 0.6" } @@ -13508,14 +13745,13 @@ } }, "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", "dev": true, "license": "MIT", - "peer": true, "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, "node_modules/fs-extra": { @@ -13599,7 +13835,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -13881,45 +14116,51 @@ } }, "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globby": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz", - "integrity": "sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "@sindresorhus/merge-streams": "^2.1.0", - "fast-glob": "^3.3.3", - "ignore": "^7.0.3", - "path-type": "^6.0.0", - "slash": "^5.1.0", - "unicorn-magic": "^0.3.0" + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" }, "engines": { - "node": ">=18" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globjoin": { - "version": "0.1.4", + "node_modules/globby/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/globjoin": { + "version": "0.1.4", "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", "integrity": "sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==", "dev": true, @@ -14004,6 +14245,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -14051,31 +14293,34 @@ } }, "node_modules/hookified": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.12.1.tgz", - "integrity": "sha512-xnKGl+iMIlhrZmGHB729MqlmPoWBznctSQTYCpFKqNsCgimJQmithcW0xSQMMFzYnV2iKUh25alswn6epgxS0Q==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.12.2.tgz", + "integrity": "sha512-aokUX1VdTpI0DUsndvW+OiwmBpKCu/NgRsSSkuSY0zq8PY6Q6a+lmOfAFDXAAOtBqJELvcWY9L1EVtzjbQcMdg==", "dev": true, "license": "MIT" }, "node_modules/hosted-git-info": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-8.1.0.tgz", - "integrity": "sha512-Rw/B2DNQaPBICNXEm8balFz9a6WpZrkCGpcWFpy7nCj+NyhSdqXipmfvtmWt9xGfp0wZnBxB+iVpLmQMYt47Tw==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.2.tgz", + "integrity": "sha512-M422h7o/BR3rmCQ8UHi7cyyMqKltdP9Uo+J2fXK+RSAY+wTcKOIRyhTuKv4qn+DJf3g+PL890AzId5KZpX+CBg==", "dev": true, "license": "ISC", "dependencies": { - "lru-cache": "^10.0.1" + "lru-cache": "^11.1.0" }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": "^20.17.0 || >=22.9.0" } }, "node_modules/hosted-git-info/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", "dev": true, - "license": "ISC" + "license": "ISC", + "engines": { + "node": "20 || >=22" + } }, "node_modules/hpack.js": { "version": "2.1.6", @@ -14320,7 +14565,6 @@ "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -14332,6 +14576,16 @@ "node": ">= 0.8" } }, + "node_modules/http-errors/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/http-parser-js": { "version": "0.5.10", "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.10.tgz", @@ -14531,16 +14785,32 @@ } }, "node_modules/ignore-walk": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-7.0.0.tgz", - "integrity": "sha512-T4gbf83A4NH95zvhVYZc+qWocBBGlpzUXLPGurJggw/WIOwicfXJChLDP/iBZnN5WqROSu5Bm3hhle4z8a8YGQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-8.0.0.tgz", + "integrity": "sha512-FCeMZT4NiRQGh+YkeKMtWrOmBgWjHjMJ26WQWrRQyoyzqevdaGSakUaJW5xQYmjLlUVk2qUnCjYVBax9EKKg8A==", "dev": true, "license": "ISC", "dependencies": { - "minimatch": "^9.0.0" + "minimatch": "^10.0.3" }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/ignore-walk/node_modules/minimatch": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", + "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/image-size": { @@ -14565,9 +14835,9 @@ "license": "MIT" }, "node_modules/immutable": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.3.tgz", - "integrity": "sha512-+chQdDfvscSF1SJqv2gn4SRO2ZyS3xL3r7IW/wWEEzrzLisnOlKiQu5ytC/BVNcS15C39WT2Hg/bjKjDMcu+zg==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.4.tgz", + "integrity": "sha512-p6u1bG3YSnINT5RQmx/yRZBpenIl30kVxkTLDyHLIMk0gict704Q9n+thfDI7lTRm9vXdDYutVzXhzcThxTnXA==", "dev": true, "license": "MIT" }, @@ -14608,75 +14878,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/import-local/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/import-local/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/import-local/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-local/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/import-local/node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -14751,14 +14952,13 @@ } }, "node_modules/ipaddr.js": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz", - "integrity": "sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "dev": true, "license": "MIT", - "peer": true, "engines": { - "node": ">= 10" + "node": ">= 0.10" } }, "node_modules/is-arrayish": { @@ -14894,12 +15094,16 @@ } }, "node_modules/is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-network-error": { @@ -14966,6 +15170,13 @@ "dev": true, "license": "MIT" }, + "node_modules/is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "dev": true, + "license": "MIT" + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -14989,6 +15200,7 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -15306,16 +15518,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-circus/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-cli": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", @@ -15350,6 +15552,58 @@ } } }, + "node_modules/jest-cli/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-cli/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/jest-cli/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/jest-config": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", @@ -15458,16 +15712,6 @@ "node": "*" } }, - "node_modules/jest-config/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-diff": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", @@ -15647,16 +15891,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-message-util/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-mock": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", @@ -15691,9 +15925,9 @@ } }, "node_modules/jest-preset-angular": { - "version": "14.6.1", - "resolved": "https://registry.npmjs.org/jest-preset-angular/-/jest-preset-angular-14.6.1.tgz", - "integrity": "sha512-7q5x42wKrsF2ykOwGVzcXpr9p1X4FQJMU/DnH1tpvCmeOm5XqENdwD/xDZug+nP6G8SJPdioauwdsK/PMY/MpQ==", + "version": "14.6.2", + "resolved": "https://registry.npmjs.org/jest-preset-angular/-/jest-preset-angular-14.6.2.tgz", + "integrity": "sha512-QWnjfXrnYJX65D+iZXBrdQ0ABHSo6DGvcmL3dGYOdF+V2ZhDlqJwKTmt7nyiOcORPdCL+20P8y+Q1mmnjZTHKQ==", "dev": true, "license": "MIT", "dependencies": { @@ -15769,16 +16003,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-runner": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", @@ -15913,16 +16137,6 @@ "node": "*" } }, - "node_modules/jest-runtime/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-snapshot": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", @@ -16163,6 +16377,19 @@ "node": ">= 6.0.0" } }, + "node_modules/jsdom/node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/jsdom/node_modules/https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", @@ -16177,6 +16404,19 @@ "node": ">= 6" } }, + "node_modules/jsdom/node_modules/parse5": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "entities": "^6.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, "node_modules/jsdom/node_modules/saxes": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", @@ -16256,6 +16496,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { @@ -16288,6 +16529,7 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, "license": "MIT" }, "node_modules/jsonfile": { @@ -16451,9 +16693,9 @@ "license": "MIT" }, "node_modules/launch-editor": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.11.1.tgz", - "integrity": "sha512-SEET7oNfgSaB6Ym0jufAdCeo3meJVeCaaDyzRygy0xsp2BFKCprcfHljTq4QkzTLUxEKkFK6OK4811YM2oSrRg==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.12.0.tgz", + "integrity": "sha512-giOHXoOtifjdHqUamwKq6c49GzBdLjvxrd2D+Q4V6uOHopJv7p9VJxikDsQ/CBXZbEITgUqSVHXLTG3VhPP1Dg==", "dev": true, "license": "MIT", "peer": true, @@ -16515,9 +16757,9 @@ } }, "node_modules/less": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/less/-/less-4.2.2.tgz", - "integrity": "sha512-tkuLHQlvWUTeQ3doAqnHbNn8T6WX1KA8yvbKG9x4VtKtIjHsVKQZCH11zRgAfbDAXC2UNIg/K9BYAAcEzUIrNg==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/less/-/less-4.4.0.tgz", + "integrity": "sha512-kdTwsyRuncDfjEs0DlRILWNvxhDG/Zij4YLO4TMJgDLW+8OzpfkdPnRgrsRuY1o+oaxJGWsps5f/RVBgGmmN0w==", "dev": true, "license": "Apache-2.0", "peer": true, @@ -16530,7 +16772,7 @@ "lessc": "bin/lessc" }, "engines": { - "node": ">=6" + "node": ">=14" }, "optionalDependencies": { "errno": "^0.1.1", @@ -16543,9 +16785,9 @@ } }, "node_modules/less-loader": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-12.2.0.tgz", - "integrity": "sha512-MYUxjSQSBUQmowc0l5nPieOYwMzGPUaTzB6inNW/bdPEG9zOL3eAAD1Qw5ZxSPk7we5dMojHwNODYMV1hq4EVg==", + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-12.3.0.tgz", + "integrity": "sha512-0M6+uYulvYIWs52y0LqN4+QM9TqWAohYSNTo4htE8Z7Cn3G/qQMEmktfHmyJT23k+20kU9zHH2wrfFXkxNLtVw==", "dev": true, "license": "MIT", "peer": true, @@ -16720,6 +16962,32 @@ "url": "https://opencollective.com/lint-staged" } }, + "node_modules/lint-staged/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/lint-staged/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/lint-staged/node_modules/chalk": { "version": "5.6.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", @@ -16743,6 +17011,20 @@ "node": ">=18" } }, + "node_modules/lint-staged/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/lint-staged/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true, + "license": "MIT" + }, "node_modules/lint-staged/node_modules/execa": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", @@ -16803,6 +17085,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lint-staged/node_modules/listr2": { + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.3.3.tgz", + "integrity": "sha512-LWzX2KsqcB1wqQ4AHgYb4RsDXauQiqhjLk+6hjbaeHG4zpjjVAB6wC/gz6X0l+Du1cN3pUB5ZlrvTbhGSNnUQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "cli-truncate": "^4.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.1.0", + "rfdc": "^1.4.1", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/lint-staged/node_modules/mimic-fn": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", @@ -16861,6 +17161,40 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lint-staged/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/lint-staged/node_modules/strip-final-newline": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", @@ -16874,10 +17208,28 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lint-staged/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/listr2": { - "version": "8.2.5", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.5.tgz", - "integrity": "sha512-iyAZCeyD+c1gPyE9qpFu8af0Y+MRtmKOncdGoA2S5EY8iFq99dmmvkNnHiWo+pj0s7yH7l3KPIgee77tKpXPWQ==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-9.0.1.tgz", + "integrity": "sha512-SL0JY3DaxylDuo/MecFeiC+7pedM0zia33zl0vcjgwcq1q1FWWF1To9EIauPbl8GbMCU0R2e0uJ8bZunhYKD2g==", "dev": true, "license": "MIT", "dependencies": { @@ -16889,7 +17241,7 @@ "wrap-ansi": "^9.0.0" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/listr2/node_modules/ansi-regex": { @@ -16919,9 +17271,9 @@ } }, "node_modules/listr2/node_modules/emoji-regex": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.5.0.tgz", - "integrity": "sha512-lb49vf1Xzfx080OKA0o6l8DQQpV+6Vg95zyCJX9VB/BqKYlhG7N4wgROUUHRA+ZPUefLnteQOad7z1kT2bV7bg==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", "dev": true, "license": "MIT" }, @@ -16985,9 +17337,9 @@ } }, "node_modules/lmdb": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-3.2.6.tgz", - "integrity": "sha512-SuHqzPl7mYStna8WRotY8XX/EUZBjjv3QyKIByeCLFfC9uXT/OIHByEcA07PzbMfQAM0KYJtLgtpMRlIe5dErQ==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-3.4.2.tgz", + "integrity": "sha512-nwVGUfTBUwJKXd6lRV8pFNfnrCC1+l49ESJRM19t/tFb/97QfJEixe5DYRvug5JO7DSFKoKaVy7oGMt5rVqZvg==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -17003,23 +17355,28 @@ "download-lmdb-prebuilds": "bin/download-prebuilds.js" }, "optionalDependencies": { - "@lmdb/lmdb-darwin-arm64": "3.2.6", - "@lmdb/lmdb-darwin-x64": "3.2.6", - "@lmdb/lmdb-linux-arm": "3.2.6", - "@lmdb/lmdb-linux-arm64": "3.2.6", - "@lmdb/lmdb-linux-x64": "3.2.6", - "@lmdb/lmdb-win32-x64": "3.2.6" + "@lmdb/lmdb-darwin-arm64": "3.4.2", + "@lmdb/lmdb-darwin-x64": "3.4.2", + "@lmdb/lmdb-linux-arm": "3.4.2", + "@lmdb/lmdb-linux-arm64": "3.4.2", + "@lmdb/lmdb-linux-x64": "3.4.2", + "@lmdb/lmdb-win32-arm64": "3.4.2", + "@lmdb/lmdb-win32-x64": "3.4.2" } }, "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.1.tgz", + "integrity": "sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q==", "dev": true, "license": "MIT", "peer": true, "engines": { "node": ">=6.11.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" } }, "node_modules/loader-utils": { @@ -17150,6 +17507,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, "license": "MIT", "dependencies": { "chalk": "^4.1.0", @@ -17241,9 +17599,9 @@ } }, "node_modules/log-update/node_modules/emoji-regex": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.5.0.tgz", - "integrity": "sha512-lb49vf1Xzfx080OKA0o6l8DQQpV+6Vg95zyCJX9VB/BqKYlhG7N4wgROUUHRA+ZPUefLnteQOad7z1kT2bV7bg==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", "dev": true, "license": "MIT" }, @@ -17378,6 +17736,7 @@ "version": "0.30.17", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" @@ -17468,20 +17827,19 @@ "license": "CC0-1.0" }, "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", "dev": true, "license": "MIT", - "peer": true, "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, "node_modules/memfs": { - "version": "4.48.1", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.48.1.tgz", - "integrity": "sha512-vWO+1ROkhOALF1UnT9aNOOflq5oFDlqwTXaPg6duo07fBLxSH0+bcF0TY1lbA1zTNKyGgDxgaDdKx5MaewLX5A==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.50.0.tgz", + "integrity": "sha512-N0LUYQMUA1yS5tJKmMtU9yprPm6ZIg24yr/OVv/7t6q0kKDIho4cBbXRi1XKttUmNYDYgF/q45qrKE/UhGO0CA==", "dev": true, "license": "Apache-2.0", "peer": true, @@ -17512,12 +17870,14 @@ } }, "node_modules/merge-descriptors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", - "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", "dev": true, "license": "MIT", - "peer": true, + "engines": { + "node": ">=18" + }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } @@ -17615,6 +17975,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -17634,9 +17995,9 @@ } }, "node_modules/mini-css-extract-plugin": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.9.2.tgz", - "integrity": "sha512-GJuACcS//jtq4kCtd5ii/M0SZf7OZRH+BxdqXZHaJfb8TJiVl+NgQRPwiYt2EuqeSkNydn/7vP+bcE27C5mb9w==", + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.9.4.tgz", + "integrity": "sha512-ZWYT7ln73Hptxqxk2DxPU9MmapXRhxkJD6tkSR04dnQxm8BGu2hzgKLugK5yySD97u/8yy7Ma7E76k9ZdvtjkQ==", "dev": true, "license": "MIT", "peer": true, @@ -18051,15 +18412,15 @@ } }, "node_modules/ngx-mat-select-search": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/ngx-mat-select-search/-/ngx-mat-select-search-7.0.10.tgz", - "integrity": "sha512-aygVGuOVJKfY8cQuOinz36sROEMaj2KU0IXB1f8VvKjbRAet5y5RAojo3ElnHR2FPaMQ6IMbp563kNyv2I4XrQ==", + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/ngx-mat-select-search/-/ngx-mat-select-search-8.0.3.tgz", + "integrity": "sha512-Fj8xWJvUAjCqMa8iJKNqUuc6rx4YDyugMHapc64TyilWpWI0RYu/KvM52FbH3zXdHQBwoo6T4tz5WcIDLlDbsw==", "license": "MIT", "dependencies": { "tslib": "^2.4.0" }, "peerDependencies": { - "@angular/material": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + "@angular/material": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0" } }, "node_modules/node-addon-api": { @@ -18128,9 +18489,9 @@ } }, "node_modules/node-gyp": { - "version": "11.4.2", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-11.4.2.tgz", - "integrity": "sha512-3gD+6zsrLQH7DyYOUIutaauuXrcyxeTPyQuZQCQoNPZMHMMS5m4y0xclNpvYzoK3VNzuyxT6eF4mkIL4WSZ1eQ==", + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-11.5.0.tgz", + "integrity": "sha512-ra7Kvlhxn5V9Slyus0ygMa2h+UqExPqUIkfk7Pc8QTLT956JLSy51uWFwHtIYy0vI8cB4BDhc/S03+880My/LQ==", "dev": true, "license": "MIT", "dependencies": { @@ -18238,9 +18599,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.23", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.23.tgz", - "integrity": "sha512-cCmFDMSm26S6tQSDpBCg/NR8NENrVPhAJSf+XbxBG4rPFaaonlEoE9wHQmun+cls499TQGSb7ZyPBRlzgKfpeg==", + "version": "2.0.27", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", + "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", "license": "MIT" }, "node_modules/nopt": { @@ -18316,32 +18677,43 @@ } }, "node_modules/npm-package-arg": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-12.0.2.tgz", - "integrity": "sha512-f1NpFjNI9O4VbKMOlA5QoBq/vSQPORHcTZ2feJpFkTHJ9eQkdlmZEKSjcAhxTGInC7RlEyScT9ui67NaOsjFWA==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-13.0.0.tgz", + "integrity": "sha512-+t2etZAGcB7TbbLHfDwooV9ppB2LhhcT6A+L9cahsf9mEUAoQ6CktLEVvEnpD0N5CkX7zJqnPGaFtoQDy9EkHQ==", "dev": true, "license": "ISC", "dependencies": { - "hosted-git-info": "^8.0.0", + "hosted-git-info": "^9.0.0", "proc-log": "^5.0.0", "semver": "^7.3.5", "validate-npm-package-name": "^6.0.0" }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": "^20.17.0 || >=22.9.0" } }, "node_modules/npm-packlist": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-9.0.0.tgz", - "integrity": "sha512-8qSayfmHJQTx3nJWYbbUmflpyarbLMBc6LCAjYsiGtXxDB68HaZpb8re6zeaLGxZzDuMdhsg70jryJe+RrItVQ==", + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-10.0.3.tgz", + "integrity": "sha512-zPukTwJMOu5X5uvm0fztwS5Zxyvmk38H/LfidkOMt3gbZVCyro2cD/ETzwzVPcWZA3JOyPznfUN/nkyFiyUbxg==", "dev": true, "license": "ISC", "dependencies": { - "ignore-walk": "^7.0.0" + "ignore-walk": "^8.0.0", + "proc-log": "^6.0.0" }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm-packlist/node_modules/proc-log": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-6.0.0.tgz", + "integrity": "sha512-KG/XsTDN901PNfPfAMmj6N/Ywg9tM+bHK8pAz+27fS4N4Pcr+4zoYBOcGSBu6ceXYNPxkLpa4ohtfxV1XcLAfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" } }, "node_modules/npm-pick-manifest": { @@ -18360,6 +18732,42 @@ "node": "^18.17.0 || >=20.5.0" } }, + "node_modules/npm-pick-manifest/node_modules/hosted-git-info": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-8.1.0.tgz", + "integrity": "sha512-Rw/B2DNQaPBICNXEm8balFz9a6WpZrkCGpcWFpy7nCj+NyhSdqXipmfvtmWt9xGfp0wZnBxB+iVpLmQMYt47Tw==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^10.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm-pick-manifest/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/npm-pick-manifest/node_modules/npm-package-arg": { + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-12.0.2.tgz", + "integrity": "sha512-f1NpFjNI9O4VbKMOlA5QoBq/vSQPORHcTZ2feJpFkTHJ9eQkdlmZEKSjcAhxTGInC7RlEyScT9ui67NaOsjFWA==", + "dev": true, + "license": "ISC", + "dependencies": { + "hosted-git-info": "^8.0.0", + "proc-log": "^5.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^6.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, "node_modules/npm-registry-fetch": { "version": "18.0.2", "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-18.0.2.tgz", @@ -18380,6 +18788,42 @@ "node": "^18.17.0 || >=20.5.0" } }, + "node_modules/npm-registry-fetch/node_modules/hosted-git-info": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-8.1.0.tgz", + "integrity": "sha512-Rw/B2DNQaPBICNXEm8balFz9a6WpZrkCGpcWFpy7nCj+NyhSdqXipmfvtmWt9xGfp0wZnBxB+iVpLmQMYt47Tw==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^10.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm-registry-fetch/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/npm-registry-fetch/node_modules/npm-package-arg": { + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-12.0.2.tgz", + "integrity": "sha512-f1NpFjNI9O4VbKMOlA5QoBq/vSQPORHcTZ2feJpFkTHJ9eQkdlmZEKSjcAhxTGInC7RlEyScT9ui67NaOsjFWA==", + "dev": true, + "license": "ISC", + "dependencies": { + "hosted-git-info": "^8.0.0", + "proc-log": "^5.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^6.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -18458,7 +18902,6 @@ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "ee-first": "1.1.1" }, @@ -18491,6 +18934,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" @@ -18503,9 +18947,9 @@ } }, "node_modules/open": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/open/-/open-10.1.0.tgz", - "integrity": "sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz", + "integrity": "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==", "dev": true, "license": "MIT", "peer": true, @@ -18513,7 +18957,7 @@ "default-browser": "^5.2.1", "define-lazy-prop": "^3.0.0", "is-inside-container": "^1.0.0", - "is-wsl": "^3.1.0" + "wsl-utils": "^0.1.0" }, "engines": { "node": ">=18" @@ -18541,57 +18985,217 @@ } }, "node_modules/ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-8.2.0.tgz", + "integrity": "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==", + "dev": true, "license": "MIT", "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" + "chalk": "^5.3.0", + "cli-cursor": "^5.0.0", + "cli-spinners": "^2.9.2", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^2.0.0", + "log-symbols": "^6.0.0", + "stdin-discarder": "^0.2.2", + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ordered-binary": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.6.0.tgz", - "integrity": "sha512-IQh2aMfMIDbPjI/8a3Edr+PiOpcsB7yo8NdW7aHWVaoR/pcDldunMvnnwbk/auPGqmKeAdxtZl7MHX/QmPwhvQ==", + "node_modules/ora/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", - "optional": true - }, - "node_modules/ospath": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", - "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", - "dev": true, - "license": "MIT" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "node_modules/ora/node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", "dev": true, "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, "engines": { - "node": ">=10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ora/node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/ora/node_modules/is-unicode-supported": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", + "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/log-symbols": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz", + "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "is-unicode-supported": "^1.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/log-symbols/node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/ordered-binary": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.6.0.tgz", + "integrity": "sha512-IQh2aMfMIDbPjI/8a3Edr+PiOpcsB7yo8NdW7aHWVaoR/pcDldunMvnnwbk/auPGqmKeAdxtZl7MHX/QmPwhvQ==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/ospath": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", + "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", + "dev": true, + "license": "MIT" + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { @@ -18732,9 +19336,9 @@ "license": "BlueOak-1.0.0" }, "node_modules/pacote": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-20.0.0.tgz", - "integrity": "sha512-pRjC5UFwZCgx9kUFDVM9YEahv4guZ1nSLqwmWiLUnDbGsjs+U5w7z6Uc8HNR1a6x8qnu5y9xtGE6D1uAuYz+0A==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-21.0.0.tgz", + "integrity": "sha512-lcqexq73AMv6QNLo7SOpz0JJoaGdS3rBFgF122NZVl1bApo2mfu+XzUBU/X/XsiJu+iUmKpekRayqQYAs+PhkA==", "dev": true, "license": "ISC", "dependencies": { @@ -18747,7 +19351,7 @@ "fs-minipass": "^3.0.0", "minipass": "^7.0.2", "npm-package-arg": "^12.0.0", - "npm-packlist": "^9.0.0", + "npm-packlist": "^10.0.0", "npm-pick-manifest": "^10.0.0", "npm-registry-fetch": "^18.0.0", "proc-log": "^5.0.0", @@ -18759,6 +19363,42 @@ "bin": { "pacote": "bin/index.js" }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/pacote/node_modules/hosted-git-info": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-8.1.0.tgz", + "integrity": "sha512-Rw/B2DNQaPBICNXEm8balFz9a6WpZrkCGpcWFpy7nCj+NyhSdqXipmfvtmWt9xGfp0wZnBxB+iVpLmQMYt47Tw==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^10.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/pacote/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/pacote/node_modules/npm-package-arg": { + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-12.0.2.tgz", + "integrity": "sha512-f1NpFjNI9O4VbKMOlA5QoBq/vSQPORHcTZ2feJpFkTHJ9eQkdlmZEKSjcAhxTGInC7RlEyScT9ui67NaOsjFWA==", + "dev": true, + "license": "ISC", + "dependencies": { + "hosted-git-info": "^8.0.0", + "proc-log": "^5.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^6.0.0" + }, "engines": { "node": "^18.17.0 || >=20.5.0" } @@ -18820,9 +19460,9 @@ } }, "node_modules/parse5": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", - "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.0.0.tgz", + "integrity": "sha512-9m4m5GSgXjL4AjumKzq1Fgfp3Z8rsvjRNbnkVwfu2ImRqE5D0LnY2QfDen18FSY9C573YU5XxSapdHZTZ2WolA==", "license": "MIT", "dependencies": { "entities": "^6.0.0" @@ -18832,28 +19472,41 @@ } }, "node_modules/parse5-html-rewriting-stream": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5-html-rewriting-stream/-/parse5-html-rewriting-stream-7.0.0.tgz", - "integrity": "sha512-mazCyGWkmCRWDI15Zp+UiCqMp/0dgEmkZRvhlsqqKYr4SsVm/TvnSpD9fCvqCA2zoWJcfRym846ejWBBHRiYEg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/parse5-html-rewriting-stream/-/parse5-html-rewriting-stream-8.0.0.tgz", + "integrity": "sha512-wzh11mj8KKkno1pZEu+l2EVeWsuKDfR5KNWZOTsslfUX8lPDZx77m9T0kIoAVkFtD1nx6YF8oh4BnPHvxMtNMw==", "dev": true, "license": "MIT", "dependencies": { - "entities": "^4.3.0", - "parse5": "^7.0.0", - "parse5-sax-parser": "^7.0.0" + "entities": "^6.0.0", + "parse5": "^8.0.0", + "parse5-sax-parser": "^8.0.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/parse5-html-rewriting-stream/node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/parse5-sax-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5-sax-parser/-/parse5-sax-parser-7.0.0.tgz", - "integrity": "sha512-5A+v2SNsq8T6/mG3ahcz8ZtQ0OUFTatxPbeidoMB7tkJSGDY3tdfl4MHovtLQHkEn5CGxijNWRQHhRQ6IRpXKg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/parse5-sax-parser/-/parse5-sax-parser-8.0.0.tgz", + "integrity": "sha512-/dQ8UzHZwnrzs3EvDj6IkKrD/jIZyTlB+8XrHJvcjNgRdmWruNdN9i9RK/JtxakmlUdPwKubKPTCqvbTgzGhrw==", "dev": true, "license": "MIT", "dependencies": { - "parse5": "^7.0.0" + "parse5": "^8.0.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" @@ -18877,7 +19530,6 @@ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8" } @@ -18940,25 +19592,24 @@ "license": "ISC" }, "node_modules/path-to-regexp": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", - "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", + "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", "dev": true, "license": "MIT", - "peer": true + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } }, "node_modules/path-type": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-6.0.0.tgz", - "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, "license": "MIT", - "peer": true, "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/pend": { @@ -18982,9 +19633,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "license": "MIT", "engines": { "node": ">=12" @@ -19025,130 +19676,101 @@ } }, "node_modules/piscina": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/piscina/-/piscina-4.8.0.tgz", - "integrity": "sha512-EZJb+ZxDrQf3dihsUL7p42pjNyrNIFJCrRHPMgxu/svsj+P3xS3fuEWp7k2+rfsavfl1N0G29b1HGs7J0m8rZA==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/piscina/-/piscina-5.1.3.tgz", + "integrity": "sha512-0u3N7H4+hbr40KjuVn2uNhOcthu/9usKhnw5vT3J7ply79v3D3M8naI00el9Klcy16x557VsEkkUQaHCWFXC/g==", "dev": true, "license": "MIT", + "engines": { + "node": ">=20.x" + }, "optionalDependencies": { - "@napi-rs/nice": "^1.0.1" + "@napi-rs/nice": "^1.0.4" + } + }, + "node_modules/pkce-challenge": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.0.tgz", + "integrity": "sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16.20.0" } }, "node_modules/pkg-dir": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-7.0.0.tgz", - "integrity": "sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "find-up": "^6.3.0" + "find-up": "^4.0.0" }, "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/pkg-dir/node_modules/find-up": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", - "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "locate-path": "^7.1.0", - "path-exists": "^5.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/pkg-dir/node_modules/locate-path": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", - "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", - "dev": true, + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "p-locate": "^6.0.0" + "p-locate": "^4.1.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/pkg-dir/node_modules/p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "yocto-queue": "^1.0.0" + "p-try": "^2.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/pkg-dir/node_modules/p-locate": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", - "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "p-limit": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "p-limit": "^2.2.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/path-exists": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", - "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/pkg-dir/node_modules/yocto-queue": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz", - "integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==", - "dev": true, - "license": "MIT", - "peer": true, "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/postcss": { - "version": "8.5.2", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.2.tgz", - "integrity": "sha512-MjOadfU3Ys9KYoX0AdkBlFEF1Vx37uCCeN4ZHnmwm9FfpbsGWMZeBLMmmpY+6Ocqod7mkdZ0DT31OlbsFrLlkA==", + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", "funding": [ { "type": "opencollective", @@ -19165,7 +19787,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.8", + "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -19633,7 +20255,6 @@ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -19642,17 +20263,6 @@ "node": ">= 0.10" } }, - "node_modules/proxy-addr/node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/proxy-agent": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz", @@ -19811,18 +20421,18 @@ } }, "node_modules/puppeteer": { - "version": "24.23.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-24.23.0.tgz", - "integrity": "sha512-BVR1Lg8sJGKXY79JARdIssFWK2F6e1j+RyuJP66w4CUmpaXjENicmA3nNpUXA8lcTdDjAndtP+oNdni3T/qQqA==", + "version": "24.27.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-24.27.0.tgz", + "integrity": "sha512-eEcAFGxmHRSrk74DVkFAMAwfj4l3Ak8avBuA2bZaAoocY1+Fb9WLS3I7jlOc/tIOU7EmGLiDdVP08R44wADpHw==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "2.10.10", - "chromium-bidi": "9.1.0", + "@puppeteer/browsers": "2.10.12", + "chromium-bidi": "10.5.1", "cosmiconfig": "^9.0.0", - "devtools-protocol": "0.0.1508733", - "puppeteer-core": "24.23.0", + "devtools-protocol": "0.0.1521046", + "puppeteer-core": "24.27.0", "typed-query-selector": "^2.12.0" }, "bin": { @@ -19833,18 +20443,18 @@ } }, "node_modules/puppeteer-core": { - "version": "24.23.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-24.23.0.tgz", - "integrity": "sha512-yl25C59gb14sOdIiSnJ08XiPP+O2RjuyZmEG+RjYmCXO7au0jcLf7fRiyii96dXGUBW7Zwei/mVKfxMx/POeFw==", + "version": "24.27.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-24.27.0.tgz", + "integrity": "sha512-yubwj2XXmTM3wRIpbhO5nCjbByPgpFHlgrsD4IK+gMPqO7/a5FfnoSXDKjmqi8A2M1Ewusz0rTI/r+IN0GU0MA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "2.10.10", - "chromium-bidi": "9.1.0", + "@puppeteer/browsers": "2.10.12", + "chromium-bidi": "10.5.1", "debug": "^4.4.3", - "devtools-protocol": "0.0.1508733", + "devtools-protocol": "0.0.1521046", "typed-query-selector": "^2.12.0", - "webdriver-bidi-protocol": "0.3.6", + "webdriver-bidi-protocol": "0.3.8", "ws": "^8.18.3" }, "engines": { @@ -19868,6 +20478,19 @@ ], "license": "MIT" }, + "node_modules/qified": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/qified/-/qified-0.5.1.tgz", + "integrity": "sha512-+BtFN3dCP+IaFA6IYNOu/f/uK1B8xD2QWyOeCse0rjtAebBmkzgd2d1OAXi3ikAzJMIBSdzZDNZ3wZKEUDQs5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hookified": "^1.12.2" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/qs": { "version": "6.14.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", @@ -19938,40 +20561,24 @@ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">= 0.6" } }, "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.1.tgz", + "integrity": "sha512-9G8cA+tuMS75+6G/TzW8OtLzmBDMo8p1JRxN5AZ+LAp8uxGA8V8GZm4GQ4/N5QNQEnLmg6SS7wyuSmbKepiKqA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", - "iconv-lite": "0.4.24", + "iconv-lite": "0.7.0", "unpipe": "1.0.0" }, "engines": { - "node": ">= 0.8" - } - }, - "node_modules/raw-body/node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" + "node": ">= 0.10" } }, "node_modules/react-is": { @@ -20067,10 +20674,11 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "license": "MIT" + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "license": "MIT", + "optional": true }, "node_modules/regex-parser": { "version": "2.3.1", @@ -20135,6 +20743,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -20144,6 +20753,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -20268,6 +20878,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, "license": "MIT", "dependencies": { "onetime": "^5.1.0", @@ -20281,6 +20892,7 @@ "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, "license": "ISC" }, "node_modules/retry": { @@ -20320,69 +20932,6 @@ "node": ">= 0.8.15" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/robust-predicates": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", @@ -20390,13 +20939,13 @@ "license": "Unlicense" }, "node_modules/rollup": { - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.8.tgz", - "integrity": "sha512-489gTVMzAYdiZHFVA/ig/iYFllCcWFHMvUHI1rpFmkoUtRlQxqh6/yiNqnYibjMZ2b/+FUQwldG+aLsEt6bglQ==", + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.3.tgz", + "integrity": "sha512-RIDh866U8agLgiIcdpB+COKnlCreHJLfIhWC3LVflku5YHfpnsIKigRZeFfMfCc4dVcqNVfQQ5gO/afOck064A==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.6" + "@types/estree": "1.0.8" }, "bin": { "rollup": "dist/bin/rollup" @@ -20406,34 +20955,47 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.34.8", - "@rollup/rollup-android-arm64": "4.34.8", - "@rollup/rollup-darwin-arm64": "4.34.8", - "@rollup/rollup-darwin-x64": "4.34.8", - "@rollup/rollup-freebsd-arm64": "4.34.8", - "@rollup/rollup-freebsd-x64": "4.34.8", - "@rollup/rollup-linux-arm-gnueabihf": "4.34.8", - "@rollup/rollup-linux-arm-musleabihf": "4.34.8", - "@rollup/rollup-linux-arm64-gnu": "4.34.8", - "@rollup/rollup-linux-arm64-musl": "4.34.8", - "@rollup/rollup-linux-loongarch64-gnu": "4.34.8", - "@rollup/rollup-linux-powerpc64le-gnu": "4.34.8", - "@rollup/rollup-linux-riscv64-gnu": "4.34.8", - "@rollup/rollup-linux-s390x-gnu": "4.34.8", - "@rollup/rollup-linux-x64-gnu": "4.34.8", - "@rollup/rollup-linux-x64-musl": "4.34.8", - "@rollup/rollup-win32-arm64-msvc": "4.34.8", - "@rollup/rollup-win32-ia32-msvc": "4.34.8", - "@rollup/rollup-win32-x64-msvc": "4.34.8", + "@rollup/rollup-android-arm-eabi": "4.52.3", + "@rollup/rollup-android-arm64": "4.52.3", + "@rollup/rollup-darwin-arm64": "4.52.3", + "@rollup/rollup-darwin-x64": "4.52.3", + "@rollup/rollup-freebsd-arm64": "4.52.3", + "@rollup/rollup-freebsd-x64": "4.52.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.52.3", + "@rollup/rollup-linux-arm-musleabihf": "4.52.3", + "@rollup/rollup-linux-arm64-gnu": "4.52.3", + "@rollup/rollup-linux-arm64-musl": "4.52.3", + "@rollup/rollup-linux-loong64-gnu": "4.52.3", + "@rollup/rollup-linux-ppc64-gnu": "4.52.3", + "@rollup/rollup-linux-riscv64-gnu": "4.52.3", + "@rollup/rollup-linux-riscv64-musl": "4.52.3", + "@rollup/rollup-linux-s390x-gnu": "4.52.3", + "@rollup/rollup-linux-x64-gnu": "4.52.3", + "@rollup/rollup-linux-x64-musl": "4.52.3", + "@rollup/rollup-openharmony-arm64": "4.52.3", + "@rollup/rollup-win32-arm64-msvc": "4.52.3", + "@rollup/rollup-win32-ia32-msvc": "4.52.3", + "@rollup/rollup-win32-x64-gnu": "4.52.3", + "@rollup/rollup-win32-x64-msvc": "4.52.3", "fsevents": "~2.3.2" } }, - "node_modules/rollup/node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "node_modules/router": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" + }, + "engines": { + "node": ">= 18" + } }, "node_modules/run-applescript": { "version": "7.1.0", @@ -20517,9 +21079,9 @@ "license": "BSD-3-Clause" }, "node_modules/rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" @@ -20552,9 +21114,9 @@ "license": "MIT" }, "node_modules/sass": { - "version": "1.85.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.85.0.tgz", - "integrity": "sha512-3ToiC1xZ1Y8aU7+CkgCI/tqyuPXEmYGJXO7H4uqp0xkLXUqp88rQQ4j1HmP37xSJLbCJPaIiv+cT1y+grssrww==", + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.90.0.tgz", + "integrity": "sha512-9GUyuksjw70uNpb1MTYWsH9MQHOHY6kwfnkafC24+7aOMZn9+rVMBxRbLvw756mrBFbIsFg6Xw9IkR2Fnn3k+Q==", "dev": true, "license": "MIT", "dependencies": { @@ -20699,9 +21261,9 @@ } }, "node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -20711,59 +21273,49 @@ } }, "node_modules/send": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", - "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz", + "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" + "debug": "^4.3.5", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "mime-types": "^3.0.1", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.1" }, "engines": { - "node": ">= 0.8.0" + "node": ">= 18" } }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/send/node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", "dev": true, "license": "MIT", - "peer": true, - "dependencies": { - "ms": "2.0.0" + "engines": { + "node": ">= 0.6" } }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/send/node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "node_modules/send/node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", "dev": true, "license": "MIT", - "peer": true, + "dependencies": { + "mime-db": "^1.54.0" + }, "engines": { - "node": ">= 0.8" + "node": ">= 0.6" } }, "node_modules/serialize-javascript": { @@ -20797,6 +21349,21 @@ "node": ">= 0.8.0" } }, + "node_modules/serve-index/node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/serve-index/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -20852,6 +21419,17 @@ "license": "MIT", "peer": true }, + "node_modules/serve-index/node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/serve-index/node_modules/setprototypeof": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", @@ -20872,20 +21450,19 @@ } }, "node_modules/serve-static": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", - "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz", + "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.19.0" + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" }, "engines": { - "node": ">= 0.8.0" + "node": ">= 18" } }, "node_modules/setimmediate": { @@ -20899,8 +21476,7 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "dev": true, - "license": "ISC", - "peer": true + "license": "ISC" }, "node_modules/shallow-clone": { "version": "3.0.1", @@ -21065,17 +21641,13 @@ "license": "MIT" }, "node_modules/slash": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", - "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/slice-ansi": { @@ -21163,12 +21735,13 @@ } }, "node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", + "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==", + "dev": true, "license": "BSD-3-Clause", "engines": { - "node": ">= 8" + "node": ">= 12" } }, "node_modules/source-map-js": { @@ -21387,16 +21960,28 @@ } }, "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8" } }, + "node_modules/stdin-discarder": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", + "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/streamx": { "version": "2.23.0", "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.23.0.tgz", @@ -21737,77 +22322,17 @@ } }, "node_modules/stylelint/node_modules/flat-cache": { - "version": "6.1.17", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.17.tgz", - "integrity": "sha512-Jzse4YoiUJBVYTwz5Bwl4h/2VQM7e2KK3MVAMlXzX9uamIHAH/TXUlRKU1AQGQOryQhN0EsmufiiF40G057YXA==", + "version": "6.1.18", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.18.tgz", + "integrity": "sha512-JUPnFgHMuAVmLmoH9/zoZ6RHOt5n9NlUw/sDXsTbROJ2SFoS2DS4s+swAV6UTeTbGH/CAsZIE6M8TaG/3jVxgQ==", "dev": true, "license": "MIT", "dependencies": { - "cacheable": "^2.0.3", + "cacheable": "^2.1.0", "flatted": "^3.3.3", "hookified": "^1.12.0" } }, - "node_modules/stylelint/node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/stylelint/node_modules/globby/node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/stylelint/node_modules/postcss": { - "version": "8.5.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", - "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.11", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, "node_modules/stylelint/node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -21818,16 +22343,6 @@ "node": ">=8" } }, - "node_modules/stylelint/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/stylelint/node_modules/write-file-atomic": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", @@ -21947,16 +22462,6 @@ "integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==", "dev": true }, - "node_modules/symbol-observable": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", - "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10" - } - }, "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -22249,15 +22754,15 @@ "license": "ISC" }, "node_modules/terser": { - "version": "5.39.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.39.0.tgz", - "integrity": "sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==", + "version": "5.43.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.43.1.tgz", + "integrity": "sha512-+6erLbBm0+LROX2sPXlUYx/ux5PyE9K/a92Wrt6oA+WDAoFTdpHE5tCYCI5PNzq2y8df4rA+QgHLJuR4jNymsg==", "dev": true, "license": "BSD-2-Clause", "peer": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", + "acorn": "^8.14.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -22407,13 +22912,6 @@ "utrie": "^1.0.2" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -22479,14 +22977,13 @@ "peer": true }, "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", - "dev": true, + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", "license": "MIT", "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.3" + "fdir": "^6.4.4", + "picomatch": "^4.0.2" }, "engines": { "node": ">=12.0.0" @@ -22495,19 +22992,6 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, - "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/tldts": { "version": "6.1.86", "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz", @@ -22562,7 +23046,6 @@ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=0.6" } @@ -22650,9 +23133,9 @@ "license": "Apache-2.0" }, "node_modules/ts-jest": { - "version": "29.4.4", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.4.tgz", - "integrity": "sha512-ccVcRABct5ZELCT5U0+DZwkXMCcOCLi2doHRrKy1nK/s7J7bch6TzJMsrY09WxgUUIP/ITfmcDS8D2yl63rnXw==", + "version": "29.4.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.5.tgz", + "integrity": "sha512-HO3GyiWn2qvTQA4kTgjDcXiMwYQt68a1Y8+JuLRVpdIzm+UOLSHgl/XqR4c6nzJkq5rOkjc02O2I7P7l/Yof0Q==", "dev": true, "license": "MIT", "dependencies": { @@ -22662,7 +23145,7 @@ "json5": "^2.2.3", "lodash.memoize": "^4.1.2", "make-error": "^1.3.6", - "semver": "^7.7.2", + "semver": "^7.7.3", "type-fest": "^4.41.0", "yargs-parser": "^21.1.1" }, @@ -22703,9 +23186,9 @@ } }, "node_modules/ts-jest/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "bin": { @@ -22902,9 +23385,9 @@ } }, "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -22915,15 +23398,38 @@ } }, "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/type-is/node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/type-is/node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" }, "engines": { "node": ">= 0.6" @@ -22945,9 +23451,10 @@ "license": "MIT" }, "node_modules/typescript": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", - "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -23026,20 +23533,6 @@ "node": ">=4" } }, - "node_modules/unicorn-magic": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", - "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/unique-filename": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-4.0.0.tgz", @@ -23081,7 +23574,6 @@ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8" } @@ -23124,9 +23616,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", - "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", + "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", "funding": [ { "type": "opencollective", @@ -23271,7 +23763,6 @@ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8" } @@ -23292,24 +23783,24 @@ } }, "node_modules/vite": { - "version": "6.3.6", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.6.tgz", - "integrity": "sha512-0msEVHJEScQbhkbVTb/4iHZdJ6SXp/AvxL2sjwYQFfBqleHtnCqv1J3sa9zbWz/6kW1m9Tfzn92vW+kZ1WV6QA==", + "version": "7.1.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.11.tgz", + "integrity": "sha512-uzcxnSDVjAopEUjljkWh8EIrg6tlzrjFUfMcR1EVsRDGwf/ccef0qQPRyOrROwhrTDaApueq+ja+KLPlzR/zdg==", "dev": true, "license": "MIT", "dependencies": { "esbuild": "^0.25.0", - "fdir": "^6.4.4", - "picomatch": "^4.0.2", - "postcss": "^8.5.3", - "rollup": "^4.34.9", - "tinyglobby": "^0.2.13" + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" }, "bin": { "vite": "bin/vite.js" }, "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + "node": "^20.19.0 || >=22.12.0" }, "funding": { "url": "https://github.com/vitejs/vite?sponsor=1" @@ -23318,14 +23809,14 @@ "fsevents": "~2.3.3" }, "peerDependencies": { - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", - "less": "*", + "less": "^4.0.0", "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" @@ -23366,362 +23857,70 @@ } } }, - "node_modules/vite/node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.4.tgz", - "integrity": "sha512-BTm2qKNnWIQ5auf4deoetINJm2JzvihvGb9R6K/ETwKLql/Bb3Eg2H1FBp1gUb4YGbydMA3jcmQTR73q7J+GAA==", - "cpu": [ - "arm" - ], + "node_modules/vite/node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "android" - ] + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } }, - "node_modules/vite/node_modules/@rollup/rollup-android-arm64": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.4.tgz", - "integrity": "sha512-P9LDQiC5vpgGFgz7GSM6dKPCiqR3XYN1WwJKA4/BUVDjHpYsf3iBEmVz62uyq20NGYbiGPR5cNHI7T1HqxNs2w==", - "cpu": [ - "arm64" - ], + "node_modules/vkbeautify": { + "version": "0.99.3", + "resolved": "https://registry.npmjs.org/vkbeautify/-/vkbeautify-0.99.3.tgz", + "integrity": "sha512-2ozZEFfmVvQcHWoHLNuiKlUfDKlhh4KGsy54U0UrlLMR1SO+XKAIDqBxtBwHgNrekurlJwE8A9K6L49T78ZQ9Q==", + "license": "MIT" + }, + "node_modules/w3c-xmlserializer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", + "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "android" - ] + "dependencies": { + "xml-name-validator": "^4.0.0" + }, + "engines": { + "node": ">=14" + } }, - "node_modules/vite/node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.4.tgz", - "integrity": "sha512-QRWSW+bVccAvZF6cbNZBJwAehmvG9NwfWHwMy4GbWi/BQIA/laTIktebT2ipVjNncqE6GLPxOok5hsECgAxGZg==", - "cpu": [ - "arm64" - ], + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } }, - "node_modules/vite/node_modules/@rollup/rollup-darwin-x64": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.4.tgz", - "integrity": "sha512-hZgP05pResAkRJxL1b+7yxCnXPGsXU0fG9Yfd6dUaoGk+FhdPKCJ5L1Sumyxn8kvw8Qi5PvQ8ulenUbRjzeCTw==", - "cpu": [ - "x64" - ], + "node_modules/watchpack": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.4.tgz", + "integrity": "sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } }, - "node_modules/vite/node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.4.tgz", - "integrity": "sha512-xmc30VshuBNUd58Xk4TKAEcRZHaXlV+tCxIXELiE9sQuK3kG8ZFgSPi57UBJt8/ogfhAF5Oz4ZSUBN77weM+mQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/vite/node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.4.tgz", - "integrity": "sha512-WdSLpZFjOEqNZGmHflxyifolwAiZmDQzuOzIq9L27ButpCVpD7KzTRtEG1I0wMPFyiyUdOO+4t8GvrnBLQSwpw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/vite/node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.4.tgz", - "integrity": "sha512-xRiOu9Of1FZ4SxVbB0iEDXc4ddIcjCv2aj03dmW8UrZIW7aIQ9jVJdLBIhxBI+MaTnGAKyvMwPwQnoOEvP7FgQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/vite/node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.4.tgz", - "integrity": "sha512-FbhM2p9TJAmEIEhIgzR4soUcsW49e9veAQCziwbR+XWB2zqJ12b4i/+hel9yLiD8pLncDH4fKIPIbt5238341Q==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/vite/node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.4.tgz", - "integrity": "sha512-4n4gVwhPHR9q/g8lKCyz0yuaD0MvDf7dV4f9tHt0C73Mp8h38UCtSCSE6R9iBlTbXlmA8CjpsZoujhszefqueg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/vite/node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.4.tgz", - "integrity": "sha512-u0n17nGA0nvi/11gcZKsjkLj1QIpAuPFQbR48Subo7SmZJnGxDpspyw2kbpuoQnyK+9pwf3pAoEXerJs/8Mi9g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/vite/node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.4.tgz", - "integrity": "sha512-/MOEW3aHjjs1p4Pw1Xk4+3egRevx8Ji9N6HUIA1Ifh8Q+cg9dremvFCUbOX2Zebz80BwJIgCBUemjqhU5XI5Eg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/vite/node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.4.tgz", - "integrity": "sha512-seoeZp4L/6D1MUyjWkOMRU6/iLmCU2EjbMTyAG4oIOs1/I82Y5lTeaxW0KBfkUdHAWN7j25bpkt0rjnOgAcQcA==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/vite/node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.4.tgz", - "integrity": "sha512-Wi6AXf0k0L7E2gteNsNHUs7UMwCIhsCTs6+tqQ5GPwVRWMaflqGec4Sd8n6+FNFDw9vGcReqk2KzBDhCa1DLYg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/vite/node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.4.tgz", - "integrity": "sha512-dtBZYjDmCQ9hW+WgEkaffvRRCKm767wWhxsFW3Lw86VXz/uJRuD438/XvbZT//B96Vs8oTA8Q4A0AfHbrxP9zw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/vite/node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.4.tgz", - "integrity": "sha512-8GKr640PdFNXwzIE0IrkMWUNUomILLkfeHjXBi/nUvFlpZP+FA8BKGKpacjW6OUUHaNI6sUURxR2U2g78FOHWQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/vite/node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.4.tgz", - "integrity": "sha512-AIy/jdJ7WtJ/F6EcfOb2GjR9UweO0n43jNObQMb6oGxkYTfLcnN7vYYpG+CN3lLxrQkzWnMOoNSHTW54pgbVxw==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/vite/node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.4.tgz", - "integrity": "sha512-bf9PtUa0u8IXDVxzRToFQKsNCRz9qLYfR/MpECxl4mRoWYjAeFjgxj1XdZr2M/GNVpT05p+LgQOHopYDlUu6/w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/vite/node_modules/postcss": { - "version": "8.5.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", - "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.11", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/vite/node_modules/rollup": { - "version": "4.52.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.4.tgz", - "integrity": "sha512-CLEVl+MnPAiKh5pl4dEWSyMTpuflgNQiLGhMv8ezD5W/qP8AKvmYpCOKRRNOh7oRKnauBZ4SyeYkMS+1VSyKwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.8" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.52.4", - "@rollup/rollup-android-arm64": "4.52.4", - "@rollup/rollup-darwin-arm64": "4.52.4", - "@rollup/rollup-darwin-x64": "4.52.4", - "@rollup/rollup-freebsd-arm64": "4.52.4", - "@rollup/rollup-freebsd-x64": "4.52.4", - "@rollup/rollup-linux-arm-gnueabihf": "4.52.4", - "@rollup/rollup-linux-arm-musleabihf": "4.52.4", - "@rollup/rollup-linux-arm64-gnu": "4.52.4", - "@rollup/rollup-linux-arm64-musl": "4.52.4", - "@rollup/rollup-linux-loong64-gnu": "4.52.4", - "@rollup/rollup-linux-ppc64-gnu": "4.52.4", - "@rollup/rollup-linux-riscv64-gnu": "4.52.4", - "@rollup/rollup-linux-riscv64-musl": "4.52.4", - "@rollup/rollup-linux-s390x-gnu": "4.52.4", - "@rollup/rollup-linux-x64-gnu": "4.52.4", - "@rollup/rollup-linux-x64-musl": "4.52.4", - "@rollup/rollup-openharmony-arm64": "4.52.4", - "@rollup/rollup-win32-arm64-msvc": "4.52.4", - "@rollup/rollup-win32-ia32-msvc": "4.52.4", - "@rollup/rollup-win32-x64-gnu": "4.52.4", - "@rollup/rollup-win32-x64-msvc": "4.52.4", - "fsevents": "~2.3.2" - } - }, - "node_modules/vkbeautify": { - "version": "0.99.3", - "resolved": "https://registry.npmjs.org/vkbeautify/-/vkbeautify-0.99.3.tgz", - "integrity": "sha512-2ozZEFfmVvQcHWoHLNuiKlUfDKlhh4KGsy54U0UrlLMR1SO+XKAIDqBxtBwHgNrekurlJwE8A9K6L49T78ZQ9Q==", - "license": "MIT" - }, - "node_modules/w3c-xmlserializer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", - "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", - "dev": true, - "license": "MIT", - "dependencies": { - "xml-name-validator": "^4.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/watchpack": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", - "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", - "dev": true, - "license": "MIT", - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "node_modules/wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", "dev": true, "license": "MIT", "peer": true, @@ -23729,15 +23928,6 @@ "minimalistic-assert": "^1.0.0" } }, - "node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "license": "MIT", - "dependencies": { - "defaults": "^1.0.3" - } - }, "node_modules/weak-lru-cache": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/weak-lru-cache/-/weak-lru-cache-1.2.2.tgz", @@ -23802,9 +23992,9 @@ "license": "BSD-3-Clause" }, "node_modules/webdriver-bidi-protocol": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-0.3.6.tgz", - "integrity": "sha512-mlGndEOA9yK9YAbvtxaPTqdi/kaCWYYfwrZvGzcmkr/3lWM+tQj53BxtpVd6qbC6+E5OnHXgCcAhre6AkXzxjA==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-0.3.8.tgz", + "integrity": "sha512-21Yi2GhGntMc671vNBCjiAeEVknXjVRoyu+k+9xOMShu+ZQfpGQwnBqbNz/Sv4GXZ6JmutlPAi2nIJcrymAWuQ==", "dev": true, "license": "Apache-2.0" }, @@ -23819,22 +24009,24 @@ } }, "node_modules/webpack": { - "version": "5.98.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.98.0.tgz", - "integrity": "sha512-UFynvx+gM44Gv9qFgj0acCQK2VE1CtdfwFdimkapco3hlPCJ/zeq73n2yVKimVbtm+TnApIugGhLJnkU6gjYXA==", + "version": "5.101.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.101.2.tgz", + "integrity": "sha512-4JLXU0tD6OZNVqlwzm3HGEhAHufSiyv+skb7q0d2367VDMzrU1Q/ZeepvkcHH0rZie6uqEtTQQe0OEOOluH3Mg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", - "@types/estree": "^1.0.6", + "@types/estree": "^1.0.8", + "@types/json-schema": "^7.0.15", "@webassemblyjs/ast": "^1.14.1", "@webassemblyjs/wasm-edit": "^1.14.1", "@webassemblyjs/wasm-parser": "^1.14.1", - "acorn": "^8.14.0", + "acorn": "^8.15.0", + "acorn-import-phases": "^1.0.3", "browserslist": "^4.24.0", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.1", + "enhanced-resolve": "^5.17.3", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", @@ -23844,11 +24036,11 @@ "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^4.3.0", + "schema-utils": "^4.3.2", "tapable": "^2.1.1", "terser-webpack-plugin": "^5.3.11", "watchpack": "^2.4.1", - "webpack-sources": "^3.2.3" + "webpack-sources": "^3.3.3" }, "bin": { "webpack": "bin/webpack.js" @@ -23956,6 +24148,47 @@ } } }, + "node_modules/webpack-dev-server/node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/webpack-dev-server/node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, "node_modules/webpack-dev-server/node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -23973,13 +24206,144 @@ "readdirp": "~3.6.0" }, "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/webpack-dev-server/node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/webpack-dev-server/node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/webpack-dev-server/node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/webpack-dev-server/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/webpack-dev-server/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/webpack-dev-server/node_modules/express": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/webpack-dev-server/node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/webpack-dev-server/node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" } }, "node_modules/webpack-dev-server/node_modules/glob-parent": { @@ -24022,6 +24386,72 @@ } } }, + "node_modules/webpack-dev-server/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-dev-server/node_modules/ipaddr.js": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz", + "integrity": "sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/webpack-dev-server/node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/webpack-dev-server/node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "dev": true, + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/webpack-dev-server/node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/webpack-dev-server/node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "dev": true, + "license": "MIT", + "peer": true + }, "node_modules/webpack-dev-server/node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -24036,6 +24466,40 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/webpack-dev-server/node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/webpack-dev-server/node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/webpack-dev-server/node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -24050,6 +24514,86 @@ "node": ">=8.10.0" } }, + "node_modules/webpack-dev-server/node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/webpack-dev-server/node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/webpack-dev-server/node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/webpack-dev-server/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/webpack-dev-server/node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/webpack-merge": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-6.0.1.tgz", @@ -24345,6 +24889,23 @@ } } }, + "node_modules/wsl-utils": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz", + "integrity": "sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "is-wsl": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/xml": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", @@ -24397,32 +24958,91 @@ } }, "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", + "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", "license": "MIT", "dependencies": { - "cliui": "^8.0.1", + "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", + "string-width": "^7.2.0", "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "yargs-parser": "^22.0.0" }, "engines": { - "node": ">=12" + "node": "^20.19.0 || ^22.12.0 || >=23" } }, "node_modules/yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, "license": "ISC", "engines": { "node": ">=12" } }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "license": "MIT" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, "node_modules/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", @@ -24544,6 +25164,16 @@ "url": "https://github.com/sponsors/colinhacks" } }, + "node_modules/zod-to-json-schema": { + "version": "3.24.6", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.6.tgz", + "integrity": "sha512-h/z3PKvcTcTetyjl1fkj79MHNEjm+HpD6NXheWjzOekY7kV+lwDYnHw+ivHkijnCSMz1yJaWBD9vu/Fcmk+vEg==", + "dev": true, + "license": "ISC", + "peerDependencies": { + "zod": "^3.24.1" + } + }, "node_modules/zone.js": { "version": "0.15.1", "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.15.1.tgz", diff --git a/package.json b/package.json index 0cbfe3162a..e689872a1e 100644 --- a/package.json +++ b/package.json @@ -31,28 +31,27 @@ "cypress:run": "cypress run" }, "dependencies": { - "@angular-devkit/schematics": "19.2.15", - "@angular/animations": "19.2.14", - "@angular/cdk": "^19.2.18", - "@angular/common": "19.2.14", - "@angular/compiler": "19.2.14", - "@angular/core": "19.2.14", - "@angular/forms": "19.2.14", - "@angular/localize": "19.2.14", - "@angular/material": "^19.2.18", - "@angular/platform-browser": "19.2.14", - "@angular/platform-browser-dynamic": "19.2.14", - "@angular/router": "19.2.14", + "@angular/animations": "20.3.9", + "@angular/cdk": "^20.2.10", + "@angular/common": "20.3.9", + "@angular/compiler": "20.3.9", + "@angular/core": "20.3.9", + "@angular/forms": "20.3.9", + "@angular/localize": "20.3.9", + "@angular/material": "^20.2.10", + "@angular/platform-browser": "20.3.9", + "@angular/platform-browser-dynamic": "20.3.9", + "@angular/router": "20.3.9", "@ckeditor/ckeditor5-angular": "6.0.1", "@ckeditor/ckeditor5-build-classic": "40.2.0", - "@fortawesome/angular-fontawesome": "^1.0.0", + "@fortawesome/angular-fontawesome": "^3.0.0", "@fortawesome/fontawesome-free": "^6.7.2", - "@fortawesome/fontawesome-svg-core": "6.2.1", - "@fortawesome/free-brands-svg-icons": "6.7.2", - "@fortawesome/free-solid-svg-icons": "6.2.1", + "@fortawesome/fontawesome-svg-core": "^6.7.2", + "@fortawesome/free-brands-svg-icons": "^6.7.2", + "@fortawesome/free-solid-svg-icons": "^6.7.2", "@ngx-translate/core": "^16.0.4", "@ngx-translate/http-loader": "^16.0.1", - "@swimlane/ngx-graph": "^10.0.0", + "@swimlane/ngx-graph": "^11.0.0", "@tailwindcss/forms": "^0.5.4", "chart.js": "3.0.0-alpha", "d3": "^7.9.0", @@ -62,23 +61,23 @@ "jspdf-autotable": "^5.0.2", "lodash": "4.17.21", "moment": "^2.29.4", - "ngx-mat-select-search": "^7.0.10", - "rxjs": "7.8.1", - "tslib": "^2.0.0", + "ngx-mat-select-search": "^8.0.2", + "rxjs": "^7.8.2", + "tslib": "^2.8.1", "vkbeautify": "^0.99.3", "zone.js": "0.15.1" }, "devDependencies": { - "@angular-builders/jest": "^19.0.1", - "@angular-eslint/builder": "^19.7.0", - "@angular-eslint/eslint-plugin": "^19.7.0", - "@angular-eslint/eslint-plugin-template": "^19.7.0", - "@angular-eslint/schematics": "^19.7.0", - "@angular-eslint/template-parser": "^19.7.0", - "@angular/build": "^19.2.15", - "@angular/cli": "19.2.15", - "@angular/compiler-cli": "19.2.14", - "@angular/language-service": "19.2.14", + "@angular-builders/jest": "^20.0.0", + "@angular-eslint/builder": "^20.5.0", + "@angular-eslint/eslint-plugin": "^20.5.0", + "@angular-eslint/eslint-plugin-template": "^20.5.0", + "@angular-eslint/schematics": "^20.5.0", + "@angular-eslint/template-parser": "^20.5.0", + "@angular/build": "^20.3.8", + "@angular/cli": "20.3.8", + "@angular/compiler-cli": "20.3.9", + "@angular/language-service": "20.3.9", "@cypress/schematic": "^2.5.2", "@types/d3-dispatch": "^3.0.1", "@types/d3-drag": "^3.0.1", @@ -90,11 +89,11 @@ "@types/lodash": "4.14.132", "@types/node": "22.15.29", "@types/vkbeautify": "^0.99.2", - "@typescript-eslint/eslint-plugin": "^8.26.1", - "@typescript-eslint/parser": "^8.26.1", + "@typescript-eslint/eslint-plugin": "^8.46.2", + "@typescript-eslint/parser": "^8.46.2", "@vendure/ngx-translate-extract": "^9.4.0", "cypress": "^13.17.0", - "eslint": "^8.57.0", + "eslint": "^9.38.0", "git-describe": "^4.1.1", "htmlhint": "1.1.4", "https-proxy-agent": "7.0.2", @@ -102,7 +101,7 @@ "jasmine-core": "^4.2.0", "jasmine-spec-reporter": "~5.0.0", "jest": "^29.7.0", - "jest-preset-angular": "^14.6.0", + "jest-preset-angular": "^14.6.2", "lint-staged": "^15.2.10", "prettier": "^3.3.3", "prettier-plugin-multiline-arrays": "^3.0.6", @@ -113,7 +112,7 @@ "stylelint-scss": "^6.8.1", "tailwindcss": "^3.3.3", "ts-node": "^10.9.2", - "typescript": "^5.4.5" + "typescript": "^5.8.3" }, "repository": { "type": "git", @@ -123,7 +122,7 @@ "url": "https://mifosforge.jira.com/jira/software/c/projects/WEB/boards/62" }, "engines": { - "node": ">= 16.15.1", + "node": ">= 20.11.1", "npm": ">= 8.11.0" }, "lint-staged": { diff --git a/src/app/account-transfers/account-transfers.service.ts b/src/app/account-transfers/account-transfers.service.ts index 01d42fcb39..26f0bca6bc 100644 --- a/src/app/account-transfers/account-transfers.service.ts +++ b/src/app/account-transfers/account-transfers.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -16,7 +16,12 @@ import { switchMap } from 'rxjs/operators'; providedIn: 'root' }) export class AccountTransfersService { - constructor(private http: HttpClient) {} + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} /** * @params standingInstructionsId diff --git a/src/app/account-transfers/common-resolvers/list-transactions.resolver.ts b/src/app/account-transfers/common-resolvers/list-transactions.resolver.ts index 7cae7bfe8c..425184375f 100644 --- a/src/app/account-transfers/common-resolvers/list-transactions.resolver.ts +++ b/src/app/account-transfers/common-resolvers/list-transactions.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -14,14 +14,17 @@ import { SettingsService } from 'app/settings/settings.service'; */ @Injectable() export class ListTransactionsResolver { + private accountTransfersService = inject(AccountTransfersService); + private settingsService = inject(SettingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountTransfersService} accountTransfersService Account Transfers service. * @param {SettingsService} settingsService Settings Service. */ - constructor( - private accountTransfersService: AccountTransfersService, - private settingsService: SettingsService - ) {} + constructor() {} /** * Returns the Standing Instructions Data. diff --git a/src/app/account-transfers/common-resolvers/make-account-transfer-template.resolver.ts b/src/app/account-transfers/common-resolvers/make-account-transfer-template.resolver.ts index 0809f478b7..830710f491 100644 --- a/src/app/account-transfers/common-resolvers/make-account-transfer-template.resolver.ts +++ b/src/app/account-transfers/common-resolvers/make-account-transfer-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,12 +13,17 @@ import { AccountTransfersService } from '../account-transfers.service'; */ @Injectable() export class MakeAccountTransferTemplateResolver { + private accountTransfersService = inject(AccountTransfersService); + accountTypeId: string; id: any; + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); /** * @param {accountTransfersService} AccountTransfersService Account Transfers service. */ - constructor(private accountTransfersService: AccountTransfersService) {} + constructor() {} /** * Returns the Standing Instructions Data. diff --git a/src/app/account-transfers/common-resolvers/standing-instructions-data-and-template.resolver.ts b/src/app/account-transfers/common-resolvers/standing-instructions-data-and-template.resolver.ts index f801c80b3b..07774caaa2 100644 --- a/src/app/account-transfers/common-resolvers/standing-instructions-data-and-template.resolver.ts +++ b/src/app/account-transfers/common-resolvers/standing-instructions-data-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { AccountTransfersService } from '../account-transfers.service'; */ @Injectable() export class StandingInstructionsDataAndTemplateResolver { + private accountTransfersService = inject(AccountTransfersService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {accountTransfersService} AccountTransfersService Account Transfers service. */ - constructor(private accountTransfersService: AccountTransfersService) {} + constructor() {} /** * Returns the Standing Instructions Data. diff --git a/src/app/account-transfers/common-resolvers/standing-instructions-template.resolver.ts b/src/app/account-transfers/common-resolvers/standing-instructions-template.resolver.ts index 205a0e8e6f..dfe2298f29 100644 --- a/src/app/account-transfers/common-resolvers/standing-instructions-template.resolver.ts +++ b/src/app/account-transfers/common-resolvers/standing-instructions-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,12 +13,17 @@ import { AccountTransfersService } from '../account-transfers.service'; */ @Injectable() export class StandingInstructionsTemplateResolver { + private accountTransfersService = inject(AccountTransfersService); + accountTypeId: string; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {accountTransfersService} AccountTransfersService Account Transfers service. */ - constructor(private accountTransfersService: AccountTransfersService) {} + constructor() {} /** * Returns the Standing Instructions Data. diff --git a/src/app/account-transfers/common-resolvers/view-account-transfer.resolver.ts b/src/app/account-transfers/common-resolvers/view-account-transfer.resolver.ts index fd9e74f533..bcd2181421 100644 --- a/src/app/account-transfers/common-resolvers/view-account-transfer.resolver.ts +++ b/src/app/account-transfers/common-resolvers/view-account-transfer.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { AccountTransfersService } from '../account-transfers.service'; */ @Injectable() export class ViewAccountTransferResolver { + private accountTransfersService = inject(AccountTransfersService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountTransfersService} AccountTransfersService Savings service. */ - constructor(private accountTransfersService: AccountTransfersService) {} + constructor() {} /** * Returns the View Account Transfer data. diff --git a/src/app/account-transfers/common-resolvers/view-standing-instructions.resolver.ts b/src/app/account-transfers/common-resolvers/view-standing-instructions.resolver.ts index 2031cb6910..be075190a8 100644 --- a/src/app/account-transfers/common-resolvers/view-standing-instructions.resolver.ts +++ b/src/app/account-transfers/common-resolvers/view-standing-instructions.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { AccountTransfersService } from '../account-transfers.service'; */ @Injectable() export class ViewStandingInstructionsResolver { + private accountTransfersService = inject(AccountTransfersService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {accountTransfersService} AccountTransfersService Account Transfers service. */ - constructor(private accountTransfersService: AccountTransfersService) {} + constructor() {} /** * Returns the Standing Instructions Data. diff --git a/src/app/account-transfers/create-standing-instructions/create-standing-instructions.component.html b/src/app/account-transfers/create-standing-instructions/create-standing-instructions.component.html index 9a31e028ed..2373d4f5db 100644 --- a/src/app/account-transfers/create-standing-instructions/create-standing-instructions.component.html +++ b/src/app/account-transfers/create-standing-instructions/create-standing-instructions.component.html @@ -6,10 +6,12 @@ {{ 'labels.inputs.name' | translate }} - - {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.inputs.required' | translate }} - + @if (createStandingInstructionsForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.inputs.required' | translate }} + + } @@ -20,153 +22,199 @@ {{ 'labels.inputs.Type' | translate }} - - {{ transferType.value }} - + @for (transferType of transferTypeData; track transferType) { + + {{ transferType.value }} + + } - - {{ 'labels.inputs.Transfer Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.inputs.required' | translate }} - + @if (createStandingInstructionsForm.controls.transferType.hasError('required')) { + + {{ 'labels.inputs.Transfer Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.inputs.required' | translate }} + + } {{ 'labels.inputs.Priority' | translate }} - - {{ priorityType.value }} - + @for (priorityType of priorityTypeData; track priorityType) { + + {{ priorityType.value }} + + } - - {{ 'labels.inputs.Priority' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.priority.hasError('required')) { + + {{ 'labels.inputs.Priority' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Status' | translate }} - - {{ statusType.value }} - + @for (statusType of statusTypeData; track statusType) { + + {{ statusType.value }} + + } - - {{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.status.hasError('required')) { + + {{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.From Account Type' | translate }} - - {{ fromAccountType.value }} - + @for (fromAccountType of fromAccountTypeData; track fromAccountType) { + + {{ fromAccountType.value }} + + } - - {{ 'labels.inputs.From Account Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.fromAccountType.hasError('required')) { + + {{ 'labels.inputs.From Account Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.From Account' | translate }} - - {{ fromAccount.productName }} - {{ fromAccount.accountNo }} - + @for (fromAccount of fromAccountData; track fromAccount) { + + {{ fromAccount.productName }} - {{ fromAccount.accountNo }} + + } - - {{ 'labels.inputs.From Account' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.fromAccountId.hasError('required')) { + + {{ 'labels.inputs.From Account' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Destination' | translate }} - - {{ destinationType.value }} - + @for (destinationType of destinationTypeData; track destinationType) { + + {{ destinationType.value }} + + } - - {{ 'labels.inputs.Destination' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.destination.hasError('required')) { + + {{ 'labels.inputs.Destination' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.To Office' | translate }} - - {{ toOfficeType.name }} - + @for (toOfficeType of toOfficeTypeData; track toOfficeType) { + + {{ toOfficeType.name }} + + } - - {{ 'labels.inputs.To Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.toOfficeId.hasError('required')) { + + {{ 'labels.inputs.To Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Beneficiary' | translate }} - - {{ toClientType.displayName }} - + @for (toClientType of toClientTypeData; track toClientType) { + + {{ toClientType.displayName }} + + } - - {{ 'labels.inputs.Beneficiary' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.toClientId.hasError('required')) { + + {{ 'labels.inputs.Beneficiary' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.To Account Type' | translate }} - - {{ toAccountType.value }} - + @for (toAccountType of toAccountTypeData; track toAccountType) { + + {{ toAccountType.value }} + + } - - {{ 'labels.inputs.To Account Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.toAccountType.hasError('required')) { + + {{ 'labels.inputs.To Account Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.To Account' | translate }} - - {{ toAccount.productName }} - {{ toAccount.accountNo }} - + @for (toAccount of toAccountData; track toAccount) { + + {{ toAccount.productName }} - {{ toAccount.accountNo }} + + } - - {{ 'labels.inputs.To Account' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.toAccountId.hasError('required')) { + + {{ 'labels.inputs.To Account' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Standing Instruction Type' | translate }} - - {{ instructionsType.value }} - + @for (instructionsType of instructionTypeData; track instructionsType) { + + {{ instructionsType.value }} + + } - - {{ 'labels.inputs.Standing Instruction Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.instructionType.hasError('required')) { + + {{ 'labels.inputs.Standing Instruction Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Amount' | translate }} - - {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.amount.hasError('required')) { + + {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -181,10 +229,12 @@ /> - - {{ 'labels.inputs.Valid From Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.validFrom.hasError('required')) { + + {{ 'labels.inputs.Valid From Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -199,48 +249,57 @@ /> - - {{ 'labels.inputs.Valid Till Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.validTill.hasError('required')) { + + {{ 'labels.inputs.Valid Till Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Recurrence Type' | translate }} - - {{ recurrenceType.value }} - + @for (recurrenceType of recurrenceTypeData; track recurrenceType) { + + {{ recurrenceType.value }} + + } - - {{ 'labels.inputs.Recurrence Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.recurrenceType.hasError('required')) { + + {{ 'labels.inputs.Recurrence Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Interval' | translate }} - - {{ 'labels.inputs.Recurrence Interval' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.recurrenceInterval.hasError('required')) { + + {{ 'labels.inputs.Recurrence Interval' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Recurrence Frequency' | translate }} - - {{ recurrenceFrequencyType.value }} - + @for (recurrenceFrequencyType of recurrenceFrequencyTypeData; track recurrenceFrequencyType) { + + {{ recurrenceFrequencyType.value }} + + } - - {{ 'labels.inputs.Recurrence Frequency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.recurrenceFrequency.hasError('required')) { + + {{ 'labels.inputs.Recurrence Frequency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -255,10 +314,12 @@ /> - - {{ 'labels.inputs.On Month Day' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createStandingInstructionsForm.controls.recurrenceOnMonthDay.hasError('required')) { + + {{ 'labels.inputs.On Month Day' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/account-transfers/create-standing-instructions/create-standing-instructions.component.ts b/src/app/account-transfers/create-standing-instructions/create-standing-instructions.component.ts index 0cc50bb7fb..aac301248e 100644 --- a/src/app/account-transfers/create-standing-instructions/create-standing-instructions.component.ts +++ b/src/app/account-transfers/create-standing-instructions/create-standing-instructions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { UntypedFormBuilder, UntypedFormGroup, Validators, FormControl, ReactiveFormsModule } from '@angular/forms'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateStandingInstructionsComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private accountTransfersService = inject(AccountTransfersService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + /** Standing Instructions Data */ standingIntructionsTemplate: any; /** Minimum date allowed. */ @@ -70,6 +77,9 @@ export class CreateStandingInstructionsComponent implements OnInit { /** Client Id */ clientId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the standing instructions template from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -79,14 +89,7 @@ export class CreateStandingInstructionsComponent implements OnInit { * @param {SettingsService} settingsService Settings Service * @param {Dates} dateUtils Date Utils */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private accountTransfersService: AccountTransfersService, - private settingsService: SettingsService, - private dateUtils: Dates - ) { + constructor() { this.route.data.subscribe((data: { standingIntructionsTemplate: any }) => { this.standingIntructionsTemplate = data.standingIntructionsTemplate; this.setParams(); diff --git a/src/app/account-transfers/edit-standing-instructions/edit-standing-instructions.component.html b/src/app/account-transfers/edit-standing-instructions/edit-standing-instructions.component.html index 8e6d14a0b6..6a82394ef5 100644 --- a/src/app/account-transfers/edit-standing-instructions/edit-standing-instructions.component.html +++ b/src/app/account-transfers/edit-standing-instructions/edit-standing-instructions.component.html @@ -26,27 +26,35 @@ {{ 'labels.inputs.Priority' | translate }} - - {{ priorityType.value }} - + @for (priorityType of priorityTypeData; track priorityType) { + + {{ priorityType.value }} + + } - - {{ 'labels.inputs.Priority' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editStandingInstructionsForm.controls.priority.hasError('required')) { + + {{ 'labels.inputs.Priority' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Status' | translate }} - - {{ statusType.value }} - + @for (statusType of statusTypeData; track statusType) { + + {{ statusType.value }} + + } - - {{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editStandingInstructionsForm.controls.status.hasError('required')) { + + {{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -82,9 +90,11 @@ {{ 'labels.inputs.Standing Instruction Type' | translate }} - - {{ instructionsType.value }} - + @for (instructionsType of instructionTypeData; track instructionsType) { + + {{ instructionsType.value }} + + } @@ -105,10 +115,12 @@ /> - - {{ 'labels.inputs.Valid From Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editStandingInstructionsForm.controls.validFrom.hasError('required')) { + + {{ 'labels.inputs.Valid From Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -123,23 +135,29 @@ /> - - {{ 'labels.inputs.Valid Till Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editStandingInstructionsForm.controls.validTill.hasError('required')) { + + {{ 'labels.inputs.Valid Till Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Recurrence Type' | translate }} - - {{ recurrenceType.value }} - + @for (recurrenceType of recurrenceTypeData; track recurrenceType) { + + {{ recurrenceType.value }} + + } - - {{ 'labels.inputs.Recurrence Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editStandingInstructionsForm.controls.recurrenceType.hasError('required')) { + + {{ 'labels.inputs.Recurrence Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -150,12 +168,11 @@ {{ 'labels.inputs.Recurrence Frequency' | translate }} - - {{ recurrenceFrequencyType.value }} - + @for (recurrenceFrequencyType of recurrenceFrequencyTypeData; track recurrenceFrequencyType) { + + {{ recurrenceFrequencyType.value }} + + } diff --git a/src/app/account-transfers/edit-standing-instructions/edit-standing-instructions.component.ts b/src/app/account-transfers/edit-standing-instructions/edit-standing-instructions.component.ts index fd3ef02071..f09ae6ad80 100644 --- a/src/app/account-transfers/edit-standing-instructions/edit-standing-instructions.component.ts +++ b/src/app/account-transfers/edit-standing-instructions/edit-standing-instructions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { UntypedFormBuilder, UntypedFormGroup, Validators, FormControl, ReactiveFormsModule } from '@angular/forms'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditStandingInstructionsComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private accountTransfersService = inject(AccountTransfersService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + /** Standing Instructions Data */ standingInstructionsData: any; /** Standing Instructions Id */ @@ -44,6 +51,9 @@ export class EditStandingInstructionsComponent implements OnInit { /** Maximum date allowed. */ maxDate = new Date(2100, 0, 1); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the standing instructions template from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -53,14 +63,7 @@ export class EditStandingInstructionsComponent implements OnInit { * @param {SettingsService} settingsService Settings Service * @param {Dates} dateUtils Date Utils */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private accountTransfersService: AccountTransfersService, - private settingsService: SettingsService, - private dateUtils: Dates - ) { + constructor() { this.route.data.subscribe((data: { standingInstructionsDataAndTemplate: any }) => { this.standingInstructionsData = data.standingInstructionsDataAndTemplate; this.standingInstructionsId = data.standingInstructionsDataAndTemplate.id; diff --git a/src/app/account-transfers/list-standing-instructions/list-standing-instructions.component.html b/src/app/account-transfers/list-standing-instructions/list-standing-instructions.component.html index 3d07c885e0..9f98e1c75c 100644 --- a/src/app/account-transfers/list-standing-instructions/list-standing-instructions.component.html +++ b/src/app/account-transfers/list-standing-instructions/list-standing-instructions.component.html @@ -2,32 +2,38 @@ - - - {{ 'labels.heading.Client Type' | translate }} - - - {{ clientName }} - - + @if (isFromClient) { + + + {{ 'labels.heading.Client Type' | translate }} + + + {{ clientName }} + + + } - - - - - - - - + @if (!isFromClient) { + + + + + + + + + } {{ 'labels.inputs.Type' | translate }} - - {{ transferTypeData.value }} - + @for (transferTypeData of transferTypeDatas; track transferTypeData) { + + {{ transferTypeData.value }} + + } @@ -88,30 +94,34 @@ {{ clientName }} {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - + @if (instruction.status.value !== 'Deleted') { + + + + + + } + @if (instruction.status.value !== 'Deleted') { + + + + + + } { this.standingIntructionsTemplateData = data.standingIntructionsTemplate; if (data.standingIntructionsTemplate.fromClient) { diff --git a/src/app/account-transfers/list-transactions/list-transactions.component.ts b/src/app/account-transfers/list-transactions/list-transactions.component.ts index 54de85c0c6..52b717cbfd 100644 --- a/src/app/account-transfers/list-transactions/list-transactions.component.ts +++ b/src/app/account-transfers/list-transactions/list-transactions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { @@ -46,6 +46,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ListTransactionsComponent { + private route = inject(ActivatedRoute); + /** List Transactions Data */ listTransactionData: any; /** Data source for instructions table. */ @@ -61,11 +63,14 @@ export class ListTransactionsComponent { /** Paginator for centers table. */ @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves Recurring Deposits Account Data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { listTransactionData: any }) => { this.listTransactionData = data.listTransactionData; this.dataSource = new MatTableDataSource(this.listTransactionData.transactions.pageItems); diff --git a/src/app/account-transfers/make-account-interbank-transfers/make-account-interbank-transfers.component.html b/src/app/account-transfers/make-account-interbank-transfers/make-account-interbank-transfers.component.html index 7b8ffda48b..a5d75a7529 100644 --- a/src/app/account-transfers/make-account-interbank-transfers/make-account-interbank-transfers.component.html +++ b/src/app/account-transfers/make-account-interbank-transfers/make-account-interbank-transfers.component.html @@ -12,10 +12,12 @@ /> - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (makeAccountTransferForm.controls.transferDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -41,23 +43,29 @@ {{ 'labels.inputs.Amount' | translate }} - - {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - {{ 'errors.validation.msg.savingsproduct.insufficient.balance' | translate: { balance } }} - + @if (makeAccountTransferForm.controls.transferAmount.hasError('required')) { + + {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (makeAccountTransferForm.get('transferAmount')?.hasError('amountExceedsBalance')) { + + + {{ 'errors.validation.msg.savingsproduct.insufficient.balance' | translate: { balance } }} + + } {{ 'labels.inputs.Description' | translate }} - - {{ 'labels.inputs.Transfer Description' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (makeAccountTransferForm.controls.transferDescription.hasError('required')) { + + {{ 'labels.inputs.Transfer Description' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/account-transfers/make-account-transfers/make-account-transfers.component.html b/src/app/account-transfers/make-account-transfers/make-account-transfers.component.html index 36856908d2..1abe176ce3 100644 --- a/src/app/account-transfers/make-account-transfers/make-account-transfers.component.html +++ b/src/app/account-transfers/make-account-transfers/make-account-transfers.component.html @@ -1,226 +1,247 @@ - - - - - - - - - - - {{ 'labels.heading.Transferring From Details' | translate }} - - - - - - {{ 'labels.inputs.Applicant' | translate }} - {{ accountTransferTemplateData.fromClient.displayName }} - - - - {{ 'labels.inputs.Office' | translate }} - {{ accountTransferTemplateData.fromOffice.name }} - - - - {{ 'labels.inputs.From Account' | translate }} - - {{ accountTransferTemplateData.fromAccount.productName }} - #{{ - accountTransferTemplateData.fromAccount.accountNo - }} + @if (isLoading) { + + + + + + + } + @if (!isLoading) { + + + + + {{ 'labels.heading.Transferring From Details' | translate }} + + + + {{ 'labels.inputs.Applicant' | translate }} + {{ accountTransferTemplateData.fromClient.displayName }} + + + {{ 'labels.inputs.Office' | translate }} + {{ accountTransferTemplateData.fromOffice.name }} + + + {{ 'labels.inputs.From Account' | translate }} + + {{ accountTransferTemplateData.fromAccount.productName }} - #{{ + accountTransferTemplateData.fromAccount.accountNo + }} + + + + {{ 'labels.inputs.From Account Type' | translate }} + {{ accountTransferTemplateData.fromAccountType.value }} + + + {{ 'labels.inputs.Currency' | translate }} + {{ accountTransferTemplateData.currency.name }} - - - {{ 'labels.inputs.From Account Type' | translate }} - {{ accountTransferTemplateData.fromAccountType.value }} - - - - {{ 'labels.inputs.Currency' | translate }} - {{ accountTransferTemplateData.currency.name }} - - - - - - - - {{ 'labels.heading.Transferred To' | translate }} - - {{ 'labels.inputs.Phone Number' | translate }} - - {{ phoneAccount.length || 0 }}/10 - - - - - - {{ 'labels.buttons.Cancel' | translate }} - - - {{ 'labels.buttons.Search' | translate }} - - - - - - - - - {{ 'labels.heading.Transfer Details' | translate }} - - - - {{ 'labels.inputs.Transaction Date' | translate }} - - - - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Office' | translate }} - - - {{ toOfficeType.name }} - - - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Client' | translate }} - - - {{ 'labels.inputs.Client' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - {{ client.id }} - {{ client.displayName }} - - - - - {{ 'labels.inputs.Account Type' | translate }} - - - {{ toAccountType.value }} - - - - {{ 'labels.inputs.Account Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Account' | translate }} - - - {{ toAccount.productName }} - {{ toAccount.accountNo }} - - - - {{ 'labels.inputs.Account' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - - {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - {{ 'errors.validation.msg.savingsproduct.insufficient.balance' | translate: { balance } }} - - - - - {{ 'labels.inputs.Description' | translate }} - - - {{ 'labels.inputs.Transfer Description' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.buttons.Cancel' | translate }} - - - {{ 'labels.buttons.Submit' | translate }} - - - - - - + + @if (interbank) { + + + {{ 'labels.heading.Transferred To' | translate }} + + {{ 'labels.inputs.Phone Number' | translate }} + + {{ phoneAccount.length || 0 }}/10 + + + @if (!interbankTransferForm) { + + + {{ 'labels.buttons.Cancel' | translate }} + + + {{ 'labels.buttons.Search' | translate }} + + + } + + } + @if (!interbank) { + + } + + @if (!interbank) { + + {{ 'labels.heading.Transfer Details' | translate }} + + + {{ 'labels.inputs.Transaction Date' | translate }} + + + + @if (makeAccountTransferForm.controls.transferDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Office' | translate }} + + @for (toOfficeType of toOfficeTypeData; track toOfficeType) { + + {{ toOfficeType.name }} + + } + + @if (makeAccountTransferForm.controls.toOfficeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Client' | translate }} + + @if (makeAccountTransferForm.controls.toClientId.hasError('required')) { + + {{ 'labels.inputs.Client' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + @for (client of clientsData; track client) { + {{ client.id }} - {{ client.displayName }} + } + + + {{ 'labels.inputs.Account Type' | translate }} + + @for (toAccountType of toAccountTypeData; track toAccountType) { + + {{ toAccountType.value }} + + } + + @if (makeAccountTransferForm.controls.toAccountType.hasError('required')) { + + {{ 'labels.inputs.Account Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Account' | translate }} + + @for (toAccount of toAccountData; track toAccount) { + + {{ toAccount.productName }} - {{ toAccount.accountNo }} + + } + + @if (makeAccountTransferForm.controls.toAccountId.hasError('required')) { + + {{ 'labels.inputs.Account' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Amount' | translate }} + + @if (makeAccountTransferForm.controls.transferAmount.hasError('required')) { + + {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (makeAccountTransferForm.get('transferAmount')?.hasError('amountExceedsBalance')) { + + + {{ 'errors.validation.msg.savingsproduct.insufficient.balance' | translate: { balance } }} + + } + + + {{ 'labels.inputs.Description' | translate }} + + @if (makeAccountTransferForm.controls.transferDescription.hasError('required')) { + + {{ 'labels.inputs.Transfer Description' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + + + {{ 'labels.buttons.Cancel' | translate }} + + + {{ 'labels.buttons.Submit' | translate }} + + + + } + @if (interbank && interbankTransferForm) { + + } + + + } diff --git a/src/app/account-transfers/make-account-transfers/make-account-transfers.component.ts b/src/app/account-transfers/make-account-transfers/make-account-transfers.component.ts index d66a000c61..264cd4490f 100644 --- a/src/app/account-transfers/make-account-transfers/make-account-transfers.component.ts +++ b/src/app/account-transfers/make-account-transfers/make-account-transfers.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, AfterViewInit, ViewChild, ElementRef } from '@angular/core'; +import { Component, OnInit, AfterViewInit, ViewChild, ElementRef, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { AbstractControl, @@ -48,6 +48,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class MakeAccountTransfersComponent implements OnInit, AfterViewInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private accountTransfersService = inject(AccountTransfersService); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + private clientsService = inject(ClientsService); + /** Standing Instructions Data */ accountTransferTemplateData: any; /** Minimum date allowed. */ @@ -81,6 +89,9 @@ export class MakeAccountTransfersComponent implements OnInit, AfterViewInit { balance: number = 0; isLoading: boolean = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the standing instructions template from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -91,15 +102,7 @@ export class MakeAccountTransfersComponent implements OnInit, AfterViewInit { * @param {SettingsService} settingsService Settings Service * @param {ClientsService} clientsService Clients Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private accountTransfersService: AccountTransfersService, - private dateUtils: Dates, - private settingsService: SettingsService, - private clientsService: ClientsService - ) { + constructor() { this.route.data.subscribe((data: { accountTransferTemplate: any }) => { this.accountTransferTemplateData = data.accountTransferTemplate; this.setParams(); @@ -119,7 +122,7 @@ export class MakeAccountTransfersComponent implements OnInit, AfterViewInit { this.accountTypeId = '2'; this.id = this.route.snapshot.queryParams['savingsId']; this.interbank = this.route.snapshot.queryParams['interbank'] === 'true'; - this.balance = this.router.getCurrentNavigation().extras.state.balance; + this.balance = this.router.currentNavigation().extras.state.balance; break; default: this.accountTypeId = '0'; diff --git a/src/app/account-transfers/view-account-transfer/view-account-transfer.component.html b/src/app/account-transfers/view-account-transfer/view-account-transfer.component.html index c3e05f7b7c..f81869acd3 100644 --- a/src/app/account-transfers/view-account-transfer/view-account-transfer.component.html +++ b/src/app/account-transfers/view-account-transfer/view-account-transfer.component.html @@ -1,10 +1,12 @@ - - - {{ 'labels.buttons.Undo' | translate }} - - + @if (!viewAccountTransferData.reversed) { + + + {{ 'labels.buttons.Undo' | translate }} + + + } diff --git a/src/app/account-transfers/view-account-transfer/view-account-transfer.component.ts b/src/app/account-transfers/view-account-transfer/view-account-transfer.component.ts index c4a670e40f..656a520e39 100644 --- a/src/app/account-transfers/view-account-transfer/view-account-transfer.component.ts +++ b/src/app/account-transfers/view-account-transfer/view-account-transfer.component.ts @@ -1,6 +1,6 @@ /** Angular Imports */ import { Location, NgIf, NgClass } from '@angular/common'; -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatDivider } from '@angular/material/divider'; @@ -22,16 +22,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewAccountTransferComponent { + private route = inject(ActivatedRoute); + private location = inject(Location); + viewAccountTransferData: any; + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); /** * Retrieves the view account transfer data from `resolve`. * @param {ActivatedRoute} route Activated Route. * @param {Location} location Location. */ - constructor( - private route: ActivatedRoute, - private location: Location - ) { + constructor() { this.route.data.subscribe((data: { viewAccountTransferData: any }) => { this.viewAccountTransferData = data.viewAccountTransferData; }); diff --git a/src/app/account-transfers/view-standing-instructions/view-standing-instructions.component.html b/src/app/account-transfers/view-standing-instructions/view-standing-instructions.component.html index ca2efa8fdf..144cb0547c 100644 --- a/src/app/account-transfers/view-standing-instructions/view-standing-instructions.component.html +++ b/src/app/account-transfers/view-standing-instructions/view-standing-instructions.component.html @@ -57,8 +57,12 @@ {{ standingInstructionsData.name }} {{ 'labels.inputs.Destination' | translate }}: - {{ 'labels.inputs.Within Bank' | translate }} - {{ 'labels.inputs.Own Account' | translate }} + @if (allowclientedit) { + {{ 'labels.inputs.Within Bank' | translate }} + } + @if (!allowclientedit) { + {{ 'labels.inputs.Own Account' | translate }} + } diff --git a/src/app/account-transfers/view-standing-instructions/view-standing-instructions.component.ts b/src/app/account-transfers/view-standing-instructions/view-standing-instructions.component.ts index 5fe9c768a7..2c410c6276 100644 --- a/src/app/account-transfers/view-standing-instructions/view-standing-instructions.component.ts +++ b/src/app/account-transfers/view-standing-instructions/view-standing-instructions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatDivider } from '@angular/material/divider'; @@ -18,16 +18,21 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewStandingInstructionsComponent { + private route = inject(ActivatedRoute); + /** Standing Instructions Data */ standingInstructionsData: any; /** Allow Client Edit */ allowclientedit = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the standing instructions data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { standingInstructionsData: any }) => { this.standingInstructionsData = data.standingInstructionsData; if (this.standingInstructionsData.fromClient.id === this.standingInstructionsData.toClient.id) { diff --git a/src/app/accounting/accounting-rules/accounting-rule.resolver.ts b/src/app/accounting/accounting-rules/accounting-rule.resolver.ts index fc618ab69d..4692f3110f 100644 --- a/src/app/accounting/accounting-rules/accounting-rule.resolver.ts +++ b/src/app/accounting/accounting-rules/accounting-rule.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class AccountingRuleResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the accounting rule data. diff --git a/src/app/accounting/accounting-rules/accounting-rules-template.resolver.ts b/src/app/accounting/accounting-rules/accounting-rules-template.resolver.ts index 4aaa54398e..a8d54ce07f 100644 --- a/src/app/accounting/accounting-rules/accounting-rules-template.resolver.ts +++ b/src/app/accounting/accounting-rules/accounting-rules-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class AccountingRulesTemplateResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the accounting rules template data. diff --git a/src/app/accounting/accounting-rules/accounting-rules.component.ts b/src/app/accounting/accounting-rules/accounting-rules.component.ts index adcdb6be98..4bd9b1b51e 100644 --- a/src/app/accounting/accounting-rules/accounting-rules.component.ts +++ b/src/app/accounting/accounting-rules/accounting-rules.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -45,6 +45,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AccountingRulesComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Accounting rule data. */ accountingRuleData: any; /** Columns to be displayed in accounting rules table. */ @@ -64,11 +66,14 @@ export class AccountingRulesComponent implements OnInit { /** Sorter for accounting rules table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the accounting rules data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { accountingRules: any }) => { this.accountingRuleData = data.accountingRules; }); diff --git a/src/app/accounting/accounting-rules/accounting-rules.resolver.ts b/src/app/accounting/accounting-rules/accounting-rules.resolver.ts index fb459c151d..252368eca7 100644 --- a/src/app/accounting/accounting-rules/accounting-rules.resolver.ts +++ b/src/app/accounting/accounting-rules/accounting-rules.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class AccountingRulesResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the accounting rules data. diff --git a/src/app/accounting/accounting-rules/create-rule/create-rule.component.html b/src/app/accounting/accounting-rules/create-rule/create-rule.component.html index e7e9947efa..65706bbfe9 100644 --- a/src/app/accounting/accounting-rules/create-rule/create-rule.component.html +++ b/src/app/accounting/accounting-rules/create-rule/create-rule.component.html @@ -6,23 +6,29 @@ {{ 'labels.inputs.Accounting Rule Name' | translate }} - - {{ 'labels.inputs.Accounting Rule Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (accountingRuleForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Accounting Rule Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (accountingRuleForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -40,34 +46,38 @@ - - {{ 'labels.inputs.Account to Debit' | translate }} - - - {{ glAccount.name }} - - - - - - - {{ 'labels.inputs.Debit Tags' | translate }} - - - {{ debitTag.name }} - + @if (accountingRuleForm.controls.debitRuleType.value === 'fixedAccount') { + + {{ 'labels.inputs.Account to Debit' | translate }} + + @for (glAccount of glAccountData; track glAccount) { + + {{ glAccount.name }} + + } + } - - - {{ 'labels.inputs.Multiple Debit Entries Allowed' | translate }} - + @if (accountingRuleForm.controls.debitRuleType.value === 'listOfAccounts') { + + + {{ 'labels.inputs.Debit Tags' | translate }} + + @for (debitTag of debitTagData; track debitTag) { + + {{ debitTag.name }} + + } + + + + + {{ 'labels.inputs.Multiple Debit Entries Allowed' | translate }} + + - + } - - {{ 'labels.inputs.Account to Credit' | translate }} - - - {{ glAccount.name }} - - - - - - - {{ 'labels.inputs.Credit Tags' | translate }} - - - {{ creditTag.name }} - + @if (accountingRuleForm.controls.creditRuleType.value === 'fixedAccount') { + + {{ 'labels.inputs.Account to Credit' | translate }} + + @for (glAccount of glAccountData; track glAccount) { + + {{ glAccount.name }} + + } + } - - - {{ 'labels.inputs.Multiple Credit Entries Allowed' | translate }} - + @if (accountingRuleForm.controls.creditRuleType.value === 'listOfAccounts') { + + + {{ 'labels.inputs.Credit Tags' | translate }} + + @for (creditTag of creditTagData; track creditTag) { + + {{ creditTag.name }} + + } + + + + + {{ 'labels.inputs.Multiple Credit Entries Allowed' | translate }} + + - + } {{ 'labels.inputs.Description' | translate }} diff --git a/src/app/accounting/accounting-rules/create-rule/create-rule.component.ts b/src/app/accounting/accounting-rules/create-rule/create-rule.component.ts index 0141d5dbbe..0da3aa2def 100644 --- a/src/app/accounting/accounting-rules/create-rule/create-rule.component.ts +++ b/src/app/accounting/accounting-rules/create-rule/create-rule.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -29,6 +29,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateRuleComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private accountingService = inject(AccountingService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Accounting rule form. */ accountingRuleForm: UntypedFormGroup; /** Office data. */ @@ -40,6 +45,9 @@ export class CreateRuleComponent implements OnInit { /** Credit tag data. */ creditTagData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices, gl accounts, debit tags and credit tags data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -47,12 +55,7 @@ export class CreateRuleComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private accountingService: AccountingService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { accountingRulesTemplate: any }) => { this.officeData = data.accountingRulesTemplate.allowedOffices; this.glAccountData = data.accountingRulesTemplate.allowedAccounts; diff --git a/src/app/accounting/accounting-rules/edit-rule/edit-rule.component.html b/src/app/accounting/accounting-rules/edit-rule/edit-rule.component.html index 644b0ada93..70ea8009cc 100644 --- a/src/app/accounting/accounting-rules/edit-rule/edit-rule.component.html +++ b/src/app/accounting/accounting-rules/edit-rule/edit-rule.component.html @@ -6,23 +6,29 @@ {{ 'labels.inputs.Accounting Rule Name' | translate }} - - {{ 'labels.inputs.Accounting Rule Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (accountingRuleForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Accounting Rule Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (accountingRuleForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -40,34 +46,38 @@ - - {{ 'labels.inputs.Account to Debit' | translate }} - - - {{ glAccount.name }} - - - - - - - {{ 'labels.inputs.Debit Tags' | translate }} - - - {{ debitTag.name }} - + @if (accountingRuleForm.controls.debitRuleType.value === 'fixedAccount') { + + {{ 'labels.inputs.Account to Debit' | translate }} + + @for (glAccount of glAccountData; track glAccount) { + + {{ glAccount.name }} + + } + } - - - {{ 'labels.inputs.Multiple Debit Entries Allowed' | translate }} - + @if (accountingRuleForm.controls.debitRuleType.value === 'listOfAccounts') { + + + {{ 'labels.inputs.Debit Tags' | translate }} + + @for (debitTag of debitTagData; track debitTag) { + + {{ debitTag.name }} + + } + + + + + {{ 'labels.inputs.Multiple Debit Entries Allowed' | translate }} + + - + } - - {{ 'labels.inputs.Account to Credit' | translate }} - - - {{ glAccount.name }} - - - - - - - {{ 'labels.inputs.Credit Tags' | translate }} - - - {{ creditTag.name }} - + @if (accountingRuleForm.controls.creditRuleType.value === 'fixedAccount') { + + {{ 'labels.inputs.Account to Credit' | translate }} + + @for (glAccount of glAccountData; track glAccount) { + + {{ glAccount.name }} + + } + } - - - {{ 'labels.inputs.Multiple Credit Entries Allowed' | translate }} - + @if (accountingRuleForm.controls.creditRuleType.value === 'listOfAccounts') { + + + {{ 'labels.inputs.Credit Tags' | translate }} + + @for (creditTag of creditTagData; track creditTag) { + + {{ creditTag.name }} + + } + + + + + {{ 'labels.inputs.Multiple Credit Entries Allowed' | translate }} + + - + } {{ 'labels.inputs.Description' | translate }} diff --git a/src/app/accounting/accounting-rules/edit-rule/edit-rule.component.ts b/src/app/accounting/accounting-rules/edit-rule/edit-rule.component.ts index ee1a51d36d..a8625f85b3 100644 --- a/src/app/accounting/accounting-rules/edit-rule/edit-rule.component.ts +++ b/src/app/accounting/accounting-rules/edit-rule/edit-rule.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -29,6 +29,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditRuleComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private accountingService = inject(AccountingService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Accounting rule form. */ accountingRuleForm: UntypedFormGroup; /** Accounting rule. */ @@ -42,6 +47,9 @@ export class EditRuleComponent implements OnInit { /** Credit tag data. */ creditTagData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices, gl accounts, debit tags, credit tags and accounting rule data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -49,12 +57,7 @@ export class EditRuleComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private accountingService: AccountingService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { accountingRulesTemplate: any; accountingRule: any }) => { this.officeData = data.accountingRulesTemplate.allowedOffices; this.glAccountData = data.accountingRulesTemplate.allowedAccounts; diff --git a/src/app/accounting/accounting-rules/view-rule/view-rule.component.html b/src/app/accounting/accounting-rules/view-rule/view-rule.component.html index 5fe5cd77e8..ce22cde495 100644 --- a/src/app/accounting/accounting-rules/view-rule/view-rule.component.html +++ b/src/app/accounting/accounting-rules/view-rule/view-rule.component.html @@ -22,10 +22,12 @@ {{ accountingRule.officeName }} - - {{ 'labels.inputs.Description' | translate }} - {{ accountingRule.description }} - + @if (accountingRule.description) { + + {{ 'labels.inputs.Description' | translate }} + {{ accountingRule.description }} + + } {{ 'labels.inputs.Multiple Debit Entries Allowed' | translate }} @@ -41,37 +43,49 @@ - - {{ 'labels.inputs.Debit Tags' | translate }} - - {{ debitTag.tag.name }} + @if (accountingRule.debitTags?.length) { + + {{ 'labels.inputs.Debit Tags' | translate }} + + @for (debitTag of accountingRule.debitTags; track debitTag) { + {{ debitTag.tag.name }} + } + - + } - - {{ 'labels.inputs.Debit Account Name' | translate }} - - {{ - debitAccount.name + ' (' + debitAccount.glCode + ')' - }} + @if (accountingRule.debitAccounts?.length) { + + {{ 'labels.inputs.Debit Account Name' | translate }} + + @for (debitAccount of accountingRule.debitAccounts; track debitAccount) { + {{ debitAccount.name + ' (' + debitAccount.glCode + ')' }} + } + - + } - - {{ 'labels.inputs.Credit Tags' | translate }} - - {{ creditTag.tag.name }} + @if (accountingRule.creditTags?.length) { + + {{ 'labels.inputs.Credit Tags' | translate }} + + @for (creditTag of accountingRule.creditTags; track creditTag) { + {{ creditTag.tag.name }} + } + - + } - - {{ 'labels.inputs.Credit Account Name' | translate }} - - {{ - creditAccount.name + ' (' + creditAccount.glCode + ')' - }} + @if (accountingRule.creditAccounts?.length) { + + {{ 'labels.inputs.Credit Account Name' | translate }} + + @for (creditAccount of accountingRule.creditAccounts; track creditAccount) { + {{ creditAccount.name + ' (' + creditAccount.glCode + ')' }} + } + - + } diff --git a/src/app/accounting/accounting-rules/view-rule/view-rule.component.ts b/src/app/accounting/accounting-rules/view-rule/view-rule.component.ts index 4bcbf669d7..bb90dd22cc 100644 --- a/src/app/accounting/accounting-rules/view-rule/view-rule.component.ts +++ b/src/app/accounting/accounting-rules/view-rule/view-rule.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -24,9 +24,17 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewRuleComponent { + private accountingService = inject(AccountingService); + private route = inject(ActivatedRoute); + private router = inject(Router); + dialog = inject(MatDialog); + /** Accounting rule. */ accountingRule: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the accounting rule data from `resolve`. * @param {AccountingService} accountingService Accounting Service. @@ -34,12 +42,7 @@ export class ViewRuleComponent { * @param {Router} router Router for navigation. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private accountingService: AccountingService, - private route: ActivatedRoute, - private router: Router, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { accountingRule: any }) => { this.accountingRule = data.accountingRule; }); diff --git a/src/app/accounting/accounting.component.html b/src/app/accounting/accounting.component.html index f1c8eae411..9023e50d05 100644 --- a/src/app/accounting/accounting.component.html +++ b/src/app/accounting/accounting.component.html @@ -11,24 +11,20 @@ {{ 'labels.heading.Frequent Postings' | translate }} - - {{ 'labels.text.These are predefined postings' | translate }} - + @if (arrowBooleans[0]) { + + {{ 'labels.text.These are predefined postings' | translate }} + + } - - + @if (!arrowBooleans[0]) { + + } + @if (arrowBooleans[0]) { + + } @@ -42,29 +38,20 @@ {{ 'labels.heading.Create Journal Entries' | translate }} - - {{ 'labels.text.Manual journal entry transactions recorded in a journal' | translate }} - + @if (arrowBooleans[1]) { + + {{ 'labels.text.Manual journal entry transactions recorded in a journal' | translate }} + + } - - + @if (!arrowBooleans[1]) { + + } + @if (arrowBooleans[1]) { + + } @@ -78,19 +65,20 @@ {{ 'labels.heading.Search Journal Entries' | translate }} - - {{ 'labels.text.Advanced search option for journal entries' | translate }} - + @if (arrowBooleans[2]) { + + {{ 'labels.text.Advanced search option for journal entries' | translate }} + + } - - + @if (!arrowBooleans[2]) { + + } + @if (arrowBooleans[2]) { + + } @@ -104,29 +92,20 @@ {{ 'labels.heading.Accounts Linked to Financial Activities' | translate }} - - {{ 'labels.text.List of Financial Activities and GL Account Mappings' | translate }} - + @if (arrowBooleans[3]) { + + {{ 'labels.text.List of Financial Activities and GL Account Mappings' | translate }} + + } - - + @if (!arrowBooleans[3]) { + + } + @if (arrowBooleans[3]) { + + } @@ -141,29 +120,20 @@ {{ 'labels.heading.Migrate Opening Balances (Office-wise)' | translate }} - - {{ 'labels.text.Set or update office-level opening balances for GL accounts' | translate }} - + @if (arrowBooleans[4]) { + + {{ 'labels.text.Set or update office-level opening balances for GL accounts' | translate }} + + } - - + @if (!arrowBooleans[4]) { + + } + @if (arrowBooleans[4]) { + + } @@ -182,24 +152,20 @@ {{ 'labels.heading.Chart of Accounts' | translate }} - - {{ 'labels.text.List of accounts used by the organization' | translate }} - + @if (arrowBooleans[5]) { + + {{ 'labels.text.List of accounts used by the organization' | translate }} + + } - - + @if (!arrowBooleans[5]) { + + } + @if (arrowBooleans[5]) { + + } @@ -214,24 +180,20 @@ {{ 'labels.heading.Closing Entries' | translate }} - - {{ 'labels.text.Journal entries made at the end of accounting period' | translate }} - + @if (arrowBooleans[6]) { + + {{ 'labels.text.Journal entries made at the end of accounting period' | translate }} + + } - - + @if (!arrowBooleans[6]) { + + } + @if (arrowBooleans[6]) { + + } @@ -245,19 +207,20 @@ {{ 'labels.heading.Accounting Rules' | translate }} - - {{ 'labels.text.List of all accounting rules' | translate }} - + @if (arrowBooleans[7]) { + + {{ 'labels.text.List of all accounting rules' | translate }} + + } - - + @if (!arrowBooleans[7]) { + + } + @if (arrowBooleans[7]) { + + } @@ -270,19 +233,20 @@ {{ 'labels.heading.Accruals' | translate }} - - {{ 'labels.text.Accrues income, expenses and liabilities' | translate }} - + @if (arrowBooleans[8]) { + + {{ 'labels.text.Accrues income, expenses and liabilities' | translate }} + + } - - + @if (!arrowBooleans[8]) { + + } + @if (arrowBooleans[8]) { + + } @@ -295,19 +259,20 @@ {{ 'labels.heading.Provisioning Entries' | translate }} - - {{ 'labels.text.Create provisioning entries' | translate }} - + @if (arrowBooleans[9]) { + + {{ 'labels.text.Create provisioning entries' | translate }} + + } - - + @if (!arrowBooleans[9]) { + + } + @if (arrowBooleans[9]) { + + } diff --git a/src/app/accounting/accounting.component.ts b/src/app/accounting/accounting.component.ts index cd922d737e..af4d932920 100644 --- a/src/app/accounting/accounting.component.ts +++ b/src/app/accounting/accounting.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { AfterViewInit, Component, ElementRef, TemplateRef, ViewChild } from '@angular/core'; +import { AfterViewInit, Component, ElementRef, TemplateRef, ViewChild, inject } from '@angular/core'; import { Router, RouterLink } from '@angular/router'; /** Custom Services */ @@ -28,6 +28,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AccountingComponent implements AfterViewInit { + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /* Reference of Chart of Accounts */ @ViewChild('chartofAccounts') chartofAccounts: ElementRef; /* Template for popover on Chart of Accounts */ @@ -51,16 +55,15 @@ export class AccountingComponent implements AfterViewInit { // Initialize an array of 10 boolean values, all set to false arrowBooleans: boolean[] = new Array(10).fill(false); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {Router} router Router. * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) {} + constructor() {} /** * Popover function diff --git a/src/app/accounting/accounting.service.ts b/src/app/accounting/accounting.service.ts index 4742982329..299186cc52 100644 --- a/src/app/accounting/accounting.service.ts +++ b/src/app/accounting/accounting.service.ts @@ -1,7 +1,7 @@ /** TODO: Separate services for feature modules for cleaner accounting service. */ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -14,10 +14,15 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class AccountingService { + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. */ - constructor(private http: HttpClient) {} + constructor() {} /** * @returns {Observable} Offices data ordered by id. diff --git a/src/app/accounting/chart-of-accounts/chart-of-accounts.component.html b/src/app/accounting/chart-of-accounts/chart-of-accounts.component.html index fbfbd42f15..88b4386ec3 100644 --- a/src/app/accounting/chart-of-accounts/chart-of-accounts.component.html +++ b/src/app/accounting/chart-of-accounts/chart-of-accounts.component.html @@ -70,22 +70,24 @@ {{ 'labels.inputs.Manual Entries Allowed' | translate }} - - + @if (glAccount.manualEntriesAllowed) { + + } + @if (!glAccount.manualEntriesAllowed) { + + } @@ -123,7 +125,9 @@ - {{ '(' + node.glCode + ')' }} + @if (node.glCode) { + {{ '(' + node.glCode + ')' }} + } {{ node.name }} @@ -139,7 +143,9 @@ > - {{ '(' + node.glCode + ')' }} + @if (node.glCode) { + {{ '(' + node.glCode + ')' }} + } {{ node.name }} @@ -151,61 +157,52 @@ - - - - - - {{ 'labels.inputs.Account Name' | translate }} - - - - {{ glAccount.name }} - - - - {{ 'labels.inputs.GL Code' | translate }} - - - - {{ glAccount.glCode }} - - - - {{ 'labels.inputs.Account Type' | translate }} + @if (glAccount) { + + + + + + {{ 'labels.inputs.Account Name' | translate }} + + + {{ glAccount.name }} + + + {{ 'labels.inputs.GL Code' | translate }} + + + {{ glAccount.glCode }} + + + {{ 'labels.inputs.Account Type' | translate }} + + + {{ 'labels.inputs.accounting.' + glAccount.type | translate }} + + + {{ 'labels.inputs.Account Usage' | translate }} + + + {{ glAccount.usage }} + + + {{ 'labels.inputs.Manual Entries Allowed' | translate }} + + + {{ glAccount.manualEntriesAllowed }} + + + {{ 'labels.inputs.Description' | translate }} + + + {{ glAccount.description }} + - - - {{ 'labels.inputs.accounting.' + glAccount.type | translate }} - - - - {{ 'labels.inputs.Account Usage' | translate }} - - - - {{ glAccount.usage }} - - - - {{ 'labels.inputs.Manual Entries Allowed' | translate }} - - - - {{ glAccount.manualEntriesAllowed }} - - - - {{ 'labels.inputs.Description' | translate }} - - - - {{ glAccount.description }} - - - - - + + + + } diff --git a/src/app/accounting/chart-of-accounts/chart-of-accounts.component.ts b/src/app/accounting/chart-of-accounts/chart-of-accounts.component.ts index 54ff0b44ff..b635881da1 100644 --- a/src/app/accounting/chart-of-accounts/chart-of-accounts.component.ts +++ b/src/app/accounting/chart-of-accounts/chart-of-accounts.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -81,6 +81,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ChartOfAccountsComponent implements AfterViewInit, OnInit { + private glAccountTreeService = inject(GlAccountTreeService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private treeControlService = inject(TreeControlService); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Button toggle group form control for type of view. (list/tree) */ viewGroup = new UntypedFormControl('listView'); /** GL Account data. */ @@ -119,6 +126,9 @@ export class ChartOfAccountsComponent implements AfterViewInit, OnInit { /* Template for popover on accounts table */ @ViewChild('templateAccountsTable') templateAccountsTable: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the gl accounts data from `resolve` and initializes(generates) gl accounts tree. * @param {GlAccountTreeService} glAccountTreeService GL Account tree service. @@ -127,14 +137,9 @@ export class ChartOfAccountsComponent implements AfterViewInit, OnInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private glAccountTreeService: GlAccountTreeService, - private route: ActivatedRoute, - private router: Router, - private treeControlService: TreeControlService, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { + const glAccountTreeService = this.glAccountTreeService; + this.route.data.subscribe((data: { chartOfAccounts: any }) => { this.glAccountData = data.chartOfAccounts; glAccountTreeService.initialize(this.glAccountData); diff --git a/src/app/accounting/chart-of-accounts/chart-of-accounts.resolver.ts b/src/app/accounting/chart-of-accounts/chart-of-accounts.resolver.ts index a5a54860fa..be014d9000 100644 --- a/src/app/accounting/chart-of-accounts/chart-of-accounts.resolver.ts +++ b/src/app/accounting/chart-of-accounts/chart-of-accounts.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class ChartOfAccountsResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the chart of accounts data. diff --git a/src/app/accounting/chart-of-accounts/create-gl-account/chart-of-accounts-template.resolver.ts b/src/app/accounting/chart-of-accounts/create-gl-account/chart-of-accounts-template.resolver.ts index 199ca4c976..3fb8cfcaa4 100644 --- a/src/app/accounting/chart-of-accounts/create-gl-account/chart-of-accounts-template.resolver.ts +++ b/src/app/accounting/chart-of-accounts/create-gl-account/chart-of-accounts-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { AccountingService } from '../../accounting.service'; */ @Injectable() export class ChartOfAccountsTemplateResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the chart of accounts template data. diff --git a/src/app/accounting/chart-of-accounts/create-gl-account/create-gl-account.component.html b/src/app/accounting/chart-of-accounts/create-gl-account/create-gl-account.component.html index fb711089eb..ea28567387 100644 --- a/src/app/accounting/chart-of-accounts/create-gl-account/create-gl-account.component.html +++ b/src/app/accounting/chart-of-accounts/create-gl-account/create-gl-account.component.html @@ -6,45 +6,57 @@ {{ 'labels.inputs.Account Type' | translate }} - - {{ 'labels.inputs.accounting.' + accountType.value | translate }} - + @for (accountType of accountTypeData; track accountType) { + + {{ 'labels.inputs.accounting.' + accountType.value | translate }} + + } - - {{ 'labels.inputs.Account Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (glAccountForm.controls.type.hasError('required')) { + + {{ 'labels.inputs.Account Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Account Name' | translate }} - - {{ 'labels.inputs.Account Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (glAccountForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Account Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Account Usage' | translate }} - - {{ accountUsage.value }} - + @for (accountUsage of accountUsageData; track accountUsage) { + + {{ accountUsage.value }} + + } - - {{ 'labels.inputs.Account Usage' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (glAccountForm.controls.usage.hasError('required')) { + + {{ 'labels.inputs.Account Usage' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.GL Code' | translate }} - - {{ 'labels.inputs.GL Code' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (glAccountForm.controls.glCode.hasError('required')) { + + {{ 'labels.inputs.GL Code' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Tag' | translate }} - - {{ tag.name }} - + @for (tag of tagData; track tag) { + + {{ tag.name }} + + } diff --git a/src/app/accounting/chart-of-accounts/create-gl-account/create-gl-account.component.ts b/src/app/accounting/chart-of-accounts/create-gl-account/create-gl-account.component.ts index 5f3a0a3c51..b39d17c22e 100644 --- a/src/app/accounting/chart-of-accounts/create-gl-account/create-gl-account.component.ts +++ b/src/app/accounting/chart-of-accounts/create-gl-account/create-gl-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -32,6 +32,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateGlAccountComponent implements OnInit, AfterViewInit { + private formBuilder = inject(UntypedFormBuilder); + private accountingService = inject(AccountingService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + dialog = inject(MatDialog); + /** GL account form. */ glAccountForm: UntypedFormGroup; /** Chart of accounts data. */ @@ -56,6 +64,9 @@ export class CreateGlAccountComponent implements OnInit, AfterViewInit { /* Template for popover on accounts form */ @ViewChild('templateAccountFormRef') templateAccountFormRef: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the chart of accounts data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -66,15 +77,7 @@ export class CreateGlAccountComponent implements OnInit, AfterViewInit { * @param {PopoverService} popoverService PopoverService. * @param {Matdialog} dialog Matdialog. */ - constructor( - private formBuilder: UntypedFormBuilder, - private accountingService: AccountingService, - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService, - public dialog: MatDialog - ) { + constructor() { this.route.queryParamMap.subscribe((params) => { this.accountTypeId = Number(params.get('accountType')); this.parentId = Number(params.get('parent')); diff --git a/src/app/accounting/chart-of-accounts/edit-gl-account/edit-gl-account.component.html b/src/app/accounting/chart-of-accounts/edit-gl-account/edit-gl-account.component.html index fecc2cb5b0..587d2a2f5c 100644 --- a/src/app/accounting/chart-of-accounts/edit-gl-account/edit-gl-account.component.html +++ b/src/app/accounting/chart-of-accounts/edit-gl-account/edit-gl-account.component.html @@ -6,45 +6,57 @@ {{ 'labels.inputs.Account Type' | translate }} - - {{ accountType.value }} - + @for (accountType of accountTypeData; track accountType) { + + {{ accountType.value }} + + } - - {{ 'labels.inputs.Account Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (glAccountForm.controls.type.hasError('required')) { + + {{ 'labels.inputs.Account Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Account Name' | translate }} - - {{ 'labels.inputs.Account Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (glAccountForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Account Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Account Usage' | translate }} - - {{ accountUsage.value }} - + @for (accountUsage of accountUsageData; track accountUsage) { + + {{ accountUsage.value }} + + } - - {{ 'labels.inputs.Account Usage' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (glAccountForm.controls.usage.hasError('required')) { + + {{ 'labels.inputs.Account Usage' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.GL Code' | translate }} - - {{ 'labels.inputs.GL Code' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (glAccountForm.controls.glCode.hasError('required')) { + + {{ 'labels.inputs.GL Code' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Tag' | translate }} - - {{ tag.name }} - + @for (tag of tagData; track tag) { + + {{ tag.name }} + + } diff --git a/src/app/accounting/chart-of-accounts/edit-gl-account/edit-gl-account.component.ts b/src/app/accounting/chart-of-accounts/edit-gl-account/edit-gl-account.component.ts index 7ddf8cd71b..414e789884 100644 --- a/src/app/accounting/chart-of-accounts/edit-gl-account/edit-gl-account.component.ts +++ b/src/app/accounting/chart-of-accounts/edit-gl-account/edit-gl-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; @@ -25,6 +25,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditGlAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private accountingService = inject(AccountingService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** GL account form. */ glAccountForm: UntypedFormGroup; /** GL account and chart of accounts data. */ @@ -38,6 +43,9 @@ export class EditGlAccountComponent implements OnInit { /** Tag data. */ tagData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the chart of accounts data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -45,12 +53,7 @@ export class EditGlAccountComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private accountingService: AccountingService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { glAccountAndChartOfAccountsTemplate: any }) => { this.glAccount = data.glAccountAndChartOfAccountsTemplate; }); diff --git a/src/app/accounting/chart-of-accounts/gl-account-and-chart-of-accounts-template.resolver.ts b/src/app/accounting/chart-of-accounts/gl-account-and-chart-of-accounts-template.resolver.ts index 7c37a50931..7d592629da 100644 --- a/src/app/accounting/chart-of-accounts/gl-account-and-chart-of-accounts-template.resolver.ts +++ b/src/app/accounting/chart-of-accounts/gl-account-and-chart-of-accounts-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -14,10 +14,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class GlAccountAndChartOfAccountsTemplateResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the gl account and chart of accounts template data. diff --git a/src/app/accounting/chart-of-accounts/gl-account-tree.service.ts b/src/app/accounting/chart-of-accounts/gl-account-tree.service.ts index f71ec0c59d..b68e82923d 100644 --- a/src/app/accounting/chart-of-accounts/gl-account-tree.service.ts +++ b/src/app/accounting/chart-of-accounts/gl-account-tree.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { BehaviorSubject } from 'rxjs'; @@ -16,6 +16,8 @@ import { GLAccount } from 'app/shared/models/general.model'; providedIn: 'root' }) export class GlAccountTreeService { + private translateService = inject(TranslateService); + /** GL Account data. */ glAccountData: any; /** Chart of accounts tree data behavior subject to represent chart of accounts tree nodes. */ @@ -28,7 +30,10 @@ export class GlAccountTreeService { return this.treeDataChange.value; } - constructor(private translateService: TranslateService) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} /** * Builds the chart of accounts tree and emits the value. diff --git a/src/app/accounting/chart-of-accounts/view-gl-account/view-gl-account.component.html b/src/app/accounting/chart-of-accounts/view-gl-account/view-gl-account.component.html index 19320b8bd3..94d3f9b924 100644 --- a/src/app/accounting/chart-of-accounts/view-gl-account/view-gl-account.component.html +++ b/src/app/accounting/chart-of-accounts/view-gl-account/view-gl-account.component.html @@ -1,15 +1,16 @@ - - - {{ 'labels.buttons.Subledger Account' | translate }} - + @if (glAccount.usage.value === 'HEADER') { + + + {{ 'labels.buttons.Subledger Account' | translate }} + + } @@ -20,17 +21,21 @@ - - - {{ 'labels.buttons.Disable' | translate }} - + @if (!glAccount.disabled) { + + + {{ 'labels.buttons.Disable' | translate }} + + } - - - {{ 'labels.buttons.Enable' | translate }} - + @if (glAccount.disabled) { + + + {{ 'labels.buttons.Enable' | translate }} + + } @@ -54,22 +59,26 @@ {{ glAccount.glCode }} - - {{ 'labels.inputs.Parent Account Name' | translate }} - - - - + @if (glAccount.parent) { + + {{ 'labels.inputs.Parent Account Name' | translate }} + + + + + - + } - - {{ 'labels.inputs.Tag' | translate }} - {{ glAccount.tagId.name }} - + @if (glAccount.tagId.id) { + + {{ 'labels.inputs.Tag' | translate }} + {{ glAccount.tagId.name }} + + } {{ 'labels.inputs.Account Usage' | translate }} @@ -81,10 +90,12 @@ {{ glAccount.manualEntriesAllowed | yesNo }} - - {{ 'labels.inputs.Description' | translate }} - {{ glAccount.description }} - + @if (glAccount.description) { + + {{ 'labels.inputs.Description' | translate }} + {{ glAccount.description }} + + } diff --git a/src/app/accounting/chart-of-accounts/view-gl-account/view-gl-account.component.ts b/src/app/accounting/chart-of-accounts/view-gl-account/view-gl-account.component.ts index eb66055a88..6ffd088c35 100644 --- a/src/app/accounting/chart-of-accounts/view-gl-account/view-gl-account.component.ts +++ b/src/app/accounting/chart-of-accounts/view-gl-account/view-gl-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -8,7 +8,7 @@ import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dial /** Custom Services */ import { AccountingService } from '../../accounting.service'; -import { Location, NgIf } from '@angular/common'; +import { Location } from '@angular/common'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { GlAccountDisplayComponent } from '../../../shared/accounting/gl-account-display/gl-account-display.component'; import { YesnoPipe } from '../../../pipes/yesno.pipe'; @@ -29,9 +29,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewGlAccountComponent { + private accountingService = inject(AccountingService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private location = inject(Location); + /** GL Account. */ glAccount: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the gl account data from `resolve`. * @param {AccountingService} accountingService Accounting Service. @@ -39,13 +48,7 @@ export class ViewGlAccountComponent { * @param {Router} router Router for navigation. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private accountingService: AccountingService, - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private location: Location - ) { + constructor() { this.route.data.subscribe((data: { glAccountAndChartOfAccountsTemplate: any }) => { this.glAccount = data.glAccountAndChartOfAccountsTemplate; }); diff --git a/src/app/accounting/closing-entries/closing-entries.component.html b/src/app/accounting/closing-entries/closing-entries.component.html index 24de5a07b9..842d8af93b 100644 --- a/src/app/accounting/closing-entries/closing-entries.component.html +++ b/src/app/accounting/closing-entries/closing-entries.component.html @@ -16,9 +16,11 @@ - - {{ office.name }} - + @for (office of filteredOfficeData | async; track office) { + + {{ office.name }} + + } diff --git a/src/app/accounting/closing-entries/closing-entries.component.ts b/src/app/accounting/closing-entries/closing-entries.component.ts index 9da5f54e93..95d4900a40 100644 --- a/src/app/accounting/closing-entries/closing-entries.component.ts +++ b/src/app/accounting/closing-entries/closing-entries.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -26,7 +26,7 @@ import { PopoverService } from '../../configuration-wizard/popover/popover.servi import { ConfigurationWizardService } from '../../configuration-wizard/configuration-wizard.service'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatAutocompleteTrigger, MatAutocomplete, MatOption } from '@angular/material/autocomplete'; -import { NgFor, AsyncPipe } from '@angular/common'; +import { AsyncPipe } from '@angular/common'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; /** @@ -58,6 +58,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ClosingEntriesComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Columns to be displayed in closing entries table. */ displayedColumns: string[] = [ 'officeName', @@ -90,6 +95,9 @@ export class ClosingEntriesComponent implements OnInit, AfterViewInit { /* Template for popover on closures table */ @ViewChild('templateClosuresTable') templateClosuresTable: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices and gl account closures data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -97,12 +105,7 @@ export class ClosingEntriesComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { offices: any; glAccountClosures: any }) => { this.officeData = data.offices; this.glAccountClosureData = data.glAccountClosures; diff --git a/src/app/accounting/closing-entries/closing-entries.resolver.ts b/src/app/accounting/closing-entries/closing-entries.resolver.ts index e01d59e4d4..e5bd0b8b3b 100644 --- a/src/app/accounting/closing-entries/closing-entries.resolver.ts +++ b/src/app/accounting/closing-entries/closing-entries.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class ClosingEntriesResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the gl account closures data. diff --git a/src/app/accounting/closing-entries/closing-entry.resolver.ts b/src/app/accounting/closing-entries/closing-entry.resolver.ts index 067e018c36..f37fb8e52e 100644 --- a/src/app/accounting/closing-entries/closing-entry.resolver.ts +++ b/src/app/accounting/closing-entries/closing-entry.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class ClosingEntryResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the gl account closure data. diff --git a/src/app/accounting/closing-entries/create-closure/create-closure.component.html b/src/app/accounting/closing-entries/create-closure/create-closure.component.html index f4d56713ce..00614c50d5 100644 --- a/src/app/accounting/closing-entries/create-closure/create-closure.component.html +++ b/src/app/accounting/closing-entries/create-closure/create-closure.component.html @@ -6,14 +6,18 @@ {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (accountingClosureForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -28,10 +32,12 @@ /> - - {{ 'labels.inputs.Closing Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (accountingClosureForm.controls.closingDate.hasError('required')) { + + {{ 'labels.inputs.Closing Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/accounting/closing-entries/create-closure/create-closure.component.ts b/src/app/accounting/closing-entries/create-closure/create-closure.component.ts index 89473ad924..bc06a5dc7d 100644 --- a/src/app/accounting/closing-entries/create-closure/create-closure.component.ts +++ b/src/app/accounting/closing-entries/create-closure/create-closure.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -22,6 +22,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateClosureComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private accountingService = inject(AccountingService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Minimum closing date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum closing date allowed. */ @@ -31,6 +38,9 @@ export class CreateClosureComponent implements OnInit { /** Office data. */ officeData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -39,14 +49,7 @@ export class CreateClosureComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private accountingService: AccountingService, - private settingsService: SettingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { offices: any }) => { this.officeData = data.offices; }); diff --git a/src/app/accounting/closing-entries/edit-closure/edit-closure.component.html b/src/app/accounting/closing-entries/edit-closure/edit-closure.component.html index 2ffdca36dc..3c96ff892e 100644 --- a/src/app/accounting/closing-entries/edit-closure/edit-closure.component.html +++ b/src/app/accounting/closing-entries/edit-closure/edit-closure.component.html @@ -6,9 +6,11 @@ {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } diff --git a/src/app/accounting/closing-entries/edit-closure/edit-closure.component.ts b/src/app/accounting/closing-entries/edit-closure/edit-closure.component.ts index ebe3d3460c..64d6b73e83 100644 --- a/src/app/accounting/closing-entries/edit-closure/edit-closure.component.ts +++ b/src/app/accounting/closing-entries/edit-closure/edit-closure.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -21,6 +21,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditClosureComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private accountingService = inject(AccountingService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Accounting closure form. */ accountingClosureForm: UntypedFormGroup; /** GL Account closure. */ @@ -28,6 +33,9 @@ export class EditClosureComponent implements OnInit { /** Office data. */ officeData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the gl account closure data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -35,12 +43,7 @@ export class EditClosureComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private accountingService: AccountingService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { glAccountClosure: any }) => { this.glAccountClosure = data.glAccountClosure; }); diff --git a/src/app/accounting/closing-entries/view-closure/view-closure.component.html b/src/app/accounting/closing-entries/view-closure/view-closure.component.html index 05bc54cfd5..29452752db 100644 --- a/src/app/accounting/closing-entries/view-closure/view-closure.component.html +++ b/src/app/accounting/closing-entries/view-closure/view-closure.component.html @@ -9,66 +9,55 @@ - - - - - - {{ 'labels.inputs.Office' | translate }} - - - - {{ glAccountClosure.officeName }} - - - - {{ 'labels.inputs.Closure Date' | translate }} - - - - {{ glAccountClosure.closingDate }} - - - - {{ 'labels.inputs.Closed By' | translate }} - - - - {{ glAccountClosure.createdByUsername }} - - - - {{ 'labels.inputs.Updated By' | translate }} - - - - {{ glAccountClosure.lastUpdatedByUsername }} - - - - {{ 'labels.inputs.Updated On' | translate }} - - - - {{ glAccountClosure.lastUpdatedDate }} - - - - {{ 'labels.inputs.Closure Creation Date' | translate }} - - - - {{ glAccountClosure.createdDate }} - - - - {{ 'labels.inputs.Comments' | translate }} - - - - {{ glAccountClosure.comments }} - - - - - +@if (glAccountClosure) { + + + + + + {{ 'labels.inputs.Office' | translate }} + + + {{ glAccountClosure.officeName }} + + + {{ 'labels.inputs.Closure Date' | translate }} + + + {{ glAccountClosure.closingDate }} + + + {{ 'labels.inputs.Closed By' | translate }} + + + {{ glAccountClosure.createdByUsername }} + + + {{ 'labels.inputs.Updated By' | translate }} + + + {{ glAccountClosure.lastUpdatedByUsername }} + + + {{ 'labels.inputs.Updated On' | translate }} + + + {{ glAccountClosure.lastUpdatedDate }} + + + {{ 'labels.inputs.Closure Creation Date' | translate }} + + + {{ glAccountClosure.createdDate }} + + + {{ 'labels.inputs.Comments' | translate }} + + + {{ glAccountClosure.comments }} + + + + + +} diff --git a/src/app/accounting/closing-entries/view-closure/view-closure.component.ts b/src/app/accounting/closing-entries/view-closure/view-closure.component.ts index 292eb8b618..0e63fdf5ab 100644 --- a/src/app/accounting/closing-entries/view-closure/view-closure.component.ts +++ b/src/app/accounting/closing-entries/view-closure/view-closure.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -24,9 +24,17 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewClosureComponent { + private accountingService = inject(AccountingService); + private route = inject(ActivatedRoute); + private router = inject(Router); + dialog = inject(MatDialog); + /** GL Account closure. */ glAccountClosure: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the gl account closure data from `resolve`. * @param {AccountingService} accountingService Accounting Service. @@ -34,12 +42,7 @@ export class ViewClosureComponent { * @param {Router} router Router for navigation. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private accountingService: AccountingService, - private route: ActivatedRoute, - private router: Router, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { glAccountClosure: any }) => { this.glAccountClosure = data.glAccountClosure; }); diff --git a/src/app/accounting/common-resolvers/accounting-rules-associations.resolver.ts b/src/app/accounting/common-resolvers/accounting-rules-associations.resolver.ts index 88ba896dd8..fe02822631 100644 --- a/src/app/accounting/common-resolvers/accounting-rules-associations.resolver.ts +++ b/src/app/accounting/common-resolvers/accounting-rules-associations.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class AccountingRulesAssociationsResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the accounting rules associations data. diff --git a/src/app/accounting/common-resolvers/currencies.resolver.ts b/src/app/accounting/common-resolvers/currencies.resolver.ts index 7fa158089e..a211239bc5 100644 --- a/src/app/accounting/common-resolvers/currencies.resolver.ts +++ b/src/app/accounting/common-resolvers/currencies.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class CurrenciesResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the currencies data. diff --git a/src/app/accounting/common-resolvers/external-asset-configuration.resolver.ts b/src/app/accounting/common-resolvers/external-asset-configuration.resolver.ts index 8d395e137d..b0f0983191 100644 --- a/src/app/accounting/common-resolvers/external-asset-configuration.resolver.ts +++ b/src/app/accounting/common-resolvers/external-asset-configuration.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from 'app/system/system.service'; */ @Injectable() export class ExternalAssetConfigurationResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the offices data. diff --git a/src/app/accounting/common-resolvers/gl-accounts.resolver.ts b/src/app/accounting/common-resolvers/gl-accounts.resolver.ts index df09f7a42f..9d6aac41b0 100644 --- a/src/app/accounting/common-resolvers/gl-accounts.resolver.ts +++ b/src/app/accounting/common-resolvers/gl-accounts.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class GlAccountsResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the gl accounts data. diff --git a/src/app/accounting/common-resolvers/journal-entry-transaction.resolver.ts b/src/app/accounting/common-resolvers/journal-entry-transaction.resolver.ts index d87eb28ffb..ad4587e724 100644 --- a/src/app/accounting/common-resolvers/journal-entry-transaction.resolver.ts +++ b/src/app/accounting/common-resolvers/journal-entry-transaction.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class JournalEntryTransactionResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the transaction data. diff --git a/src/app/accounting/common-resolvers/loan-products.resolver.ts b/src/app/accounting/common-resolvers/loan-products.resolver.ts index 29ef058cea..cfd44fbd5b 100644 --- a/src/app/accounting/common-resolvers/loan-products.resolver.ts +++ b/src/app/accounting/common-resolvers/loan-products.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class LoanProductsResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the loan products data. diff --git a/src/app/accounting/common-resolvers/offices.resolver.ts b/src/app/accounting/common-resolvers/offices.resolver.ts index dc084de449..30821e4d18 100644 --- a/src/app/accounting/common-resolvers/offices.resolver.ts +++ b/src/app/accounting/common-resolvers/offices.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class OfficesResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the offices data. diff --git a/src/app/accounting/common-resolvers/payment-types.resolver.ts b/src/app/accounting/common-resolvers/payment-types.resolver.ts index 9309357812..169d44a37a 100644 --- a/src/app/accounting/common-resolvers/payment-types.resolver.ts +++ b/src/app/accounting/common-resolvers/payment-types.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class PaymentTypesResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the payment types data. diff --git a/src/app/accounting/common-resolvers/provisioning-categories.resolver.ts b/src/app/accounting/common-resolvers/provisioning-categories.resolver.ts index 629c057e7d..68aed9733c 100644 --- a/src/app/accounting/common-resolvers/provisioning-categories.resolver.ts +++ b/src/app/accounting/common-resolvers/provisioning-categories.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class ProvisioningCategoriesResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the Provisioning categories data. diff --git a/src/app/accounting/create-journal-entry/create-journal-entry.component.html b/src/app/accounting/create-journal-entry/create-journal-entry.component.html index 5fcc8121ca..8093c828a1 100644 --- a/src/app/accounting/create-journal-entry/create-journal-entry.component.html +++ b/src/app/accounting/create-journal-entry/create-journal-entry.component.html @@ -6,115 +6,117 @@ {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (journalEntryForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Currency' | translate }} - - {{ currency.displayLabel }} - + @for (currency of currencyData; track currency) { + + {{ currency.displayLabel }} + + } - - {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (journalEntryForm.controls.currencyCode.hasError('required')) { + + {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.External Asset Owner' | translate }} - - - - - - - - - - {{ 'labels.inputs.Debit Amount' | translate }} - - - {{ 'labels.inputs.Debit Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - - - + {{ 'labels.inputs.External Asset Owner' | translate }} + + + } + + @for (debit of debits.controls; track debit; let i = $index) { + + + - - - + + + {{ 'labels.inputs.Debit Amount' | translate }} + + @if (debits.at(i).controls.amount.hasError('required')) { + + {{ 'labels.inputs.Debit Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + @if (i !== 0) { + + + + } + @if (i === 0) { + + + + } + + - - - - - - - - - {{ 'labels.inputs.Credit Amount' | translate }} - - - {{ 'labels.inputs.Credit Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - - - + + - - - + + + {{ 'labels.inputs.Credit Amount' | translate }} + + @if (credits.at(i).controls.amount.hasError('required')) { + + {{ 'labels.inputs.Credit Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + @if (i !== 0) { + + + + } + @if (i === 0) { + + + + } + + - + } {{ 'labels.inputs.Reference Number' | translate }} @@ -133,18 +135,22 @@ /> - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (journalEntryForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentType.name }} - + @for (paymentType of paymentTypeData; track paymentType) { + + {{ paymentType.name }} + + } diff --git a/src/app/accounting/create-journal-entry/create-journal-entry.component.ts b/src/app/accounting/create-journal-entry/create-journal-entry.component.ts index 11bdf346ed..954e585887 100644 --- a/src/app/accounting/create-journal-entry/create-journal-entry.component.ts +++ b/src/app/accounting/create-journal-entry/create-journal-entry.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormArray, UntypedFormControl } from '@angular/forms'; import { Router, ActivatedRoute } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -34,6 +34,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateJournalEntryComponent implements OnInit, AfterViewInit { + private formBuilder = inject(UntypedFormBuilder); + private accountingService = inject(AccountingService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Minimum transaction date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum transaction date allowed. */ @@ -57,6 +67,9 @@ export class CreateJournalEntryComponent implements OnInit, AfterViewInit { /* Template for popover on create journal form */ @ViewChild('templateCreateJournalFormRef') templateCreateJournalFormRef: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices, currencies, payment types and gl accounts data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -67,17 +80,7 @@ export class CreateJournalEntryComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private formBuilder: UntypedFormBuilder, - private accountingService: AccountingService, - private settingsService: SettingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.assetExternalizationEnabled = false; this.route.data.subscribe( (data: { offices: any; currencies: any; paymentTypes: any; glAccounts: any; globalConfig: any }) => { diff --git a/src/app/accounting/financial-activity-mappings/create-financial-activity-mapping/create-financial-activity-mapping.component.html b/src/app/accounting/financial-activity-mappings/create-financial-activity-mapping/create-financial-activity-mapping.component.html index bd780cede7..16b310fc1d 100644 --- a/src/app/accounting/financial-activity-mappings/create-financial-activity-mapping/create-financial-activity-mapping.component.html +++ b/src/app/accounting/financial-activity-mappings/create-financial-activity-mapping/create-financial-activity-mapping.component.html @@ -6,15 +6,19 @@ {{ 'labels.inputs.Financial Activity' | translate }} - - ({{ financialActivity.id }}) - {{ 'labels.accounting.financialActivity.' + financialActivity.name | translate }} - + @for (financialActivity of financialActivityData; track financialActivity) { + + ({{ financialActivity.id }}) + {{ 'labels.accounting.financialActivity.' + financialActivity.name | translate }} + + } - - {{ 'labels.inputs.Financial Activity' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (financialActivityMappingForm.controls.financialActivityId.hasError('required')) { + + {{ 'labels.inputs.Financial Activity' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } { this.glAccountOptions = data.financialActivityAccountsTemplate.glAccountOptions; this.financialActivityData = data.financialActivityAccountsTemplate.financialActivityOptions; diff --git a/src/app/accounting/financial-activity-mappings/create-financial-activity-mapping/financial-activity-mappings-template.resolver.ts b/src/app/accounting/financial-activity-mappings/create-financial-activity-mapping/financial-activity-mappings-template.resolver.ts index 176e331a6b..d1c20076f5 100644 --- a/src/app/accounting/financial-activity-mappings/create-financial-activity-mapping/financial-activity-mappings-template.resolver.ts +++ b/src/app/accounting/financial-activity-mappings/create-financial-activity-mapping/financial-activity-mappings-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { AccountingService } from '../../accounting.service'; */ @Injectable() export class FinancialActivityMappingsTemplateResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the financial activity mappings template data. diff --git a/src/app/accounting/financial-activity-mappings/edit-financial-activity-mapping/edit-financial-activity-mapping.component.html b/src/app/accounting/financial-activity-mappings/edit-financial-activity-mapping/edit-financial-activity-mapping.component.html index 675ac89e3c..e911e3747d 100644 --- a/src/app/accounting/financial-activity-mappings/edit-financial-activity-mapping/edit-financial-activity-mapping.component.html +++ b/src/app/accounting/financial-activity-mappings/edit-financial-activity-mapping/edit-financial-activity-mapping.component.html @@ -6,10 +6,12 @@ {{ 'labels.inputs.Financial Activity' | translate }} - - ({{ financialActivity.id }}) - {{ 'labels.accounting.financialActivity.' + financialActivity.name | translate }} - + @for (financialActivity of financialActivityData; track financialActivity) { + + ({{ financialActivity.id }}) + {{ 'labels.accounting.financialActivity.' + financialActivity.name | translate }} + + } diff --git a/src/app/accounting/financial-activity-mappings/edit-financial-activity-mapping/edit-financial-activity-mapping.component.ts b/src/app/accounting/financial-activity-mappings/edit-financial-activity-mapping/edit-financial-activity-mapping.component.ts index febef2e159..68cba1b6eb 100644 --- a/src/app/accounting/financial-activity-mappings/edit-financial-activity-mapping/edit-financial-activity-mapping.component.ts +++ b/src/app/accounting/financial-activity-mappings/edit-financial-activity-mapping/edit-financial-activity-mapping.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -22,6 +22,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditFinancialActivityMappingComponent implements OnInit { + private formBuider = inject(UntypedFormBuilder); + private accountingService = inject(AccountingService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Financial activity mapping form. */ financialActivityMappingForm: UntypedFormGroup; /** GL Account options. */ @@ -37,6 +42,9 @@ export class EditFinancialActivityMappingComponent implements OnInit { /** GL Account ID. */ glAccountId: number; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the gl account options, financial activity and financial activity account data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -44,12 +52,7 @@ export class EditFinancialActivityMappingComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuider: UntypedFormBuilder, - private accountingService: AccountingService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { financialActivityAccountAndTemplate: any }) => { this.financialActivityAccountId = data.financialActivityAccountAndTemplate.id; this.financialActivityId = data.financialActivityAccountAndTemplate.financialActivityData.id; diff --git a/src/app/accounting/financial-activity-mappings/edit-financial-activity-mapping/financial-activity-mapping-and-template.resolver.ts b/src/app/accounting/financial-activity-mappings/edit-financial-activity-mapping/financial-activity-mapping-and-template.resolver.ts index 0e3df98ab5..30881c4cae 100644 --- a/src/app/accounting/financial-activity-mappings/edit-financial-activity-mapping/financial-activity-mapping-and-template.resolver.ts +++ b/src/app/accounting/financial-activity-mappings/edit-financial-activity-mapping/financial-activity-mapping-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { AccountingService } from '../../accounting.service'; */ @Injectable() export class FinancialActivityMappingAndTemplateResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the financial activity mapping and template data. diff --git a/src/app/accounting/financial-activity-mappings/financial-activity-mappings.component.ts b/src/app/accounting/financial-activity-mappings/financial-activity-mappings.component.ts index a45d6aec38..19fd62ad9a 100644 --- a/src/app/accounting/financial-activity-mappings/financial-activity-mappings.component.ts +++ b/src/app/accounting/financial-activity-mappings/financial-activity-mappings.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -49,6 +49,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FinancialActivityMappingsComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Financial activity account data. */ financialActivityAccountData: any; /** Columns to be displayed in financial activity mappings table. */ @@ -75,6 +80,9 @@ export class FinancialActivityMappingsComponent implements OnInit, AfterViewInit /* Template for popover on Activities table */ @ViewChild('templateActivitiesTable') templateActivitiesTable: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the financial activity accounts data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -82,12 +90,7 @@ export class FinancialActivityMappingsComponent implements OnInit, AfterViewInit * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { financialActivityAccounts: any }) => { this.financialActivityAccountData = data.financialActivityAccounts; }); diff --git a/src/app/accounting/financial-activity-mappings/financial-activity-mappings.resolver.ts b/src/app/accounting/financial-activity-mappings/financial-activity-mappings.resolver.ts index 732d47aa21..96ddb15a55 100644 --- a/src/app/accounting/financial-activity-mappings/financial-activity-mappings.resolver.ts +++ b/src/app/accounting/financial-activity-mappings/financial-activity-mappings.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class FinancialActivityMappingsResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the financial activity mappings data. diff --git a/src/app/accounting/financial-activity-mappings/view-financial-activity-mapping/financial-activity-mapping.resolver.ts b/src/app/accounting/financial-activity-mappings/view-financial-activity-mapping/financial-activity-mapping.resolver.ts index c5675cd7f8..fb65fcadc9 100644 --- a/src/app/accounting/financial-activity-mappings/view-financial-activity-mapping/financial-activity-mapping.resolver.ts +++ b/src/app/accounting/financial-activity-mappings/view-financial-activity-mapping/financial-activity-mapping.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { AccountingService } from '../../accounting.service'; */ @Injectable() export class FinancialActivityMappingResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the financial activity mapping data. diff --git a/src/app/accounting/financial-activity-mappings/view-financial-activity-mapping/view-financial-activity-mapping.component.ts b/src/app/accounting/financial-activity-mappings/view-financial-activity-mapping/view-financial-activity-mapping.component.ts index c496383806..5dae009939 100644 --- a/src/app/accounting/financial-activity-mappings/view-financial-activity-mapping/view-financial-activity-mapping.component.ts +++ b/src/app/accounting/financial-activity-mappings/view-financial-activity-mapping/view-financial-activity-mapping.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -27,11 +27,20 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewFinancialActivityMappingComponent { + private accountingService = inject(AccountingService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private location = inject(Location); + /** Financial activity account ID. */ financialActivityAccountId: any; /** Financial activity account data. */ financialActivityAccount: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the financial activity account data from `resolve`. * @param {AccountingService} accountingService Accounting Service. @@ -39,13 +48,7 @@ export class ViewFinancialActivityMappingComponent { * @param {Router} router Router for navigation. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private accountingService: AccountingService, - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private location: Location - ) { + constructor() { this.route.data.subscribe((data: { financialActivityAccount: any }) => { this.financialActivityAccount = data.financialActivityAccount; this.financialActivityAccountId = data.financialActivityAccount.id; diff --git a/src/app/accounting/frequent-postings/frequent-postings.component.html b/src/app/accounting/frequent-postings/frequent-postings.component.html index 82aceee008..ea240bb23a 100644 --- a/src/app/accounting/frequent-postings/frequent-postings.component.html +++ b/src/app/accounting/frequent-postings/frequent-postings.component.html @@ -6,136 +6,145 @@ {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (frequentPostingsForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Accounting Rule' | translate }} - - {{ accountingRule.name }} - + @for (accountingRule of accountingRuleData; track accountingRule) { + + {{ accountingRule.name }} + + } - - {{ 'labels.inputs.Accounting Rule' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (frequentPostingsForm.controls.accountingRule.hasError('required')) { + + {{ 'labels.inputs.Accounting Rule' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Currency' | translate }} - - {{ currency.displayLabel }} - + @for (currency of currencyData; track currency) { + + {{ currency.displayLabel }} + + } - - {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (frequentPostingsForm.controls.currencyCode.hasError('required')) { + + {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - - - {{ 'labels.inputs.Affected GL Entry (Debit)' | translate }} - - - {{ affectedGLEntryDebit.name }} - - - - {{ 'labels.inputs.Affected GL Entry (Debit)' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Debit Amount' | translate }} - - - {{ 'labels.inputs.Debit Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - - - - - - + @for (debit of debits.controls; track debit; let i = $index) { + + + + {{ 'labels.inputs.Affected GL Entry (Debit)' | translate }} + + @for (affectedGLEntryDebit of debitAccountData; track affectedGLEntryDebit) { + + {{ affectedGLEntryDebit.name }} + + } + + @if (debits.at(i).controls.glAccountId.hasError('required')) { + + {{ 'labels.inputs.Affected GL Entry (Debit)' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Debit Amount' | translate }} + + @if (debits.at(i).controls.amount.hasError('required')) { + + {{ 'labels.inputs.Debit Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + @if (i !== 0) { + + + + } + @if (i === 0 && allowMultipleDebitEntries) { + + + + } + + - - - - - - {{ 'labels.inputs.Affected GL Entry (Credit)' | translate }} - - - {{ affectedGLEntryCredit.name }} - - - - {{ 'labels.inputs.Affected GL Entry (Credit)' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Credit Amount' | translate }} - - - {{ 'labels.inputs.Credit Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - - - - - - + } + + @for (credit of credits.controls; track credit; let i = $index) { + + + + {{ 'labels.inputs.Affected GL Entry (Credit)' | translate }} + + @for (affectedGLEntryCredit of creditAccountData; track affectedGLEntryCredit) { + + {{ affectedGLEntryCredit.name }} + + } + + @if (credits.at(i).controls.glAccountId.hasError('required')) { + + {{ 'labels.inputs.Affected GL Entry (Credit)' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Credit Amount' | translate }} + + @if (credits.at(i).controls.amount.hasError('required')) { + + {{ 'labels.inputs.Credit Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + @if (i !== 0) { + + + + } + @if (i === 0 && allowMultipleCreditEntries) { + + + + } + + - + } {{ 'labels.inputs.Reference Number' | translate }} @@ -154,18 +163,22 @@ /> - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (frequentPostingsForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentType.name }} - + @for (paymentType of paymentTypeData; track paymentType) { + + {{ paymentType.name }} + + } diff --git a/src/app/accounting/frequent-postings/frequent-postings.component.ts b/src/app/accounting/frequent-postings/frequent-postings.component.ts index 9264b04b72..8aeb4b8b3d 100644 --- a/src/app/accounting/frequent-postings/frequent-postings.component.ts +++ b/src/app/accounting/frequent-postings/frequent-postings.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -32,6 +32,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FrequentPostingsComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private accountingService = inject(AccountingService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Minimum transaction date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum transaction date allowed. */ @@ -55,6 +62,9 @@ export class FrequentPostingsComponent implements OnInit { /** True if multiple debit entries are allowed. */ allowMultipleDebitEntries: boolean; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices, accounting rules, currencies and payment types data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -63,14 +73,7 @@ export class FrequentPostingsComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private accountingService: AccountingService, - private settingsService: SettingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { offices: any; accountingRules: any; currencies: any; paymentTypes: any }) => { this.officeData = data.offices; this.accountingRuleData = data.accountingRules; diff --git a/src/app/accounting/migrate-opening-balances/migrate-opening-balances.component.html b/src/app/accounting/migrate-opening-balances/migrate-opening-balances.component.html index 75a428f639..bca4a216d5 100644 --- a/src/app/accounting/migrate-opening-balances/migrate-opening-balances.component.html +++ b/src/app/accounting/migrate-opening-balances/migrate-opening-balances.component.html @@ -8,14 +8,18 @@ {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (openingBalancesForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -26,125 +30,121 @@ - - - - - - {{ 'labels.inputs.Currency' | translate }} - - - {{ currency.displayLabel }} - - - - {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Opening Balances Date' | translate }} - - - - - {{ 'labels.inputs.Opening Balances Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - {{ 'labels.inputs.Type' | translate }} - - - - {{ 'labels.inputs.GL Code' | translate }} - - - - {{ 'labels.inputs.GL Name' | translate }} - {{ 'labels.inputs.Account' | translate }} - - - - {{ 'labels.inputs.Total Debit' | translate }}: - {{ debitsSum | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - {{ 'labels.inputs.Total Credit' | translate }}: - {{ creditsSum | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - - - {{ - openingBalancesData.glAccounts[i].glAccountType.value !== - openingBalancesData.glAccounts[i - 1]?.glAccountType.value - ? glAccountTypeLabel(openingBalancesData.glAccounts[i].glAccountType.value) - : '' - }} + @if (openingBalancesData) { + + + + + {{ 'labels.inputs.Currency' | translate }} + + @for (currency of currencyData; track currency) { + + {{ currency.displayLabel }} + + } + + @if (openingBalancesForm.controls.currencyCode.hasError('required')) { + + {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Opening Balances Date' | translate }} + + + + @if (openingBalancesForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Opening Balances Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + + {{ 'labels.inputs.Type' | translate }} - - - {{ openingBalancesData.glAccounts[i].glAccountCode }} + + {{ 'labels.inputs.GL Code' | translate }} - - - {{ openingBalancesData.glAccounts[i].glAccountName }} + + {{ 'labels.inputs.GL Name' | translate }} + {{ 'labels.inputs.Account' | translate }} - - - - {{ 'labels.inputs.Debit' | translate }} - - + + {{ 'labels.inputs.Total Debit' | translate }}: + {{ debitsSum | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - {{ 'labels.inputs.Credit' | translate }} - - + + {{ 'labels.inputs.Total Credit' | translate }}: + {{ creditsSum | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + @for (credit of glAccountEntries.controls; track credit; let i = $index) { + + + + {{ + openingBalancesData.glAccounts[i].glAccountType.value !== + openingBalancesData.glAccounts[i - 1]?.glAccountType.value + ? glAccountTypeLabel(openingBalancesData.glAccounts[i].glAccountType.value) + : '' + }} + + + {{ openingBalancesData.glAccounts[i].glAccountCode }} + + + {{ openingBalancesData.glAccounts[i].glAccountName }} + + + + {{ 'labels.inputs.Debit' | translate }} + + + + + + {{ 'labels.inputs.Credit' | translate }} + + + + + + } - + } - - - {{ 'labels.buttons.Cancel' | translate }} - - - {{ 'labels.buttons.Submit' | translate }} - - + @if (openingBalancesData) { + + + {{ 'labels.buttons.Cancel' | translate }} + + + {{ 'labels.buttons.Submit' | translate }} + + + } diff --git a/src/app/accounting/migrate-opening-balances/migrate-opening-balances.component.ts b/src/app/accounting/migrate-opening-balances/migrate-opening-balances.component.ts index 6f7e20c308..40a06e633a 100644 --- a/src/app/accounting/migrate-opening-balances/migrate-opening-balances.component.ts +++ b/src/app/accounting/migrate-opening-balances/migrate-opening-balances.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -19,7 +19,7 @@ import { ConfigurationWizardService } from '../../configuration-wizard/configura import { onlyOneOfTheFieldsIsRequiredValidator } from './only-one-of-the-fields-is-required.validator'; import { Dates } from 'app/core/utils/dates'; import { TranslateService } from '@ngx-translate/core'; -import { NgFor, NgIf, CurrencyPipe } from '@angular/common'; +import { CurrencyPipe } from '@angular/common'; import { GlAccountDisplayComponent } from '../../shared/accounting/gl-account-display/gl-account-display.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -37,6 +37,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class MigrateOpeningBalancesComponent implements OnInit, AfterViewInit { + private formBuilder = inject(UntypedFormBuilder); + private accountingService = inject(AccountingService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + private translateService = inject(TranslateService); + /** Minimum opening balances date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum opening balances date allowed. */ @@ -60,6 +70,9 @@ export class MigrateOpeningBalancesComponent implements OnInit, AfterViewInit { /* Template for popover on search form */ @ViewChild('templateSearchFormRef') templateSearchFormRef: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices and currencies from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -70,17 +83,7 @@ export class MigrateOpeningBalancesComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private formBuilder: UntypedFormBuilder, - private accountingService: AccountingService, - private settingsService: SettingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { offices: any; currencies: any }) => { this.officeData = data.offices; this.currencyData = data.currencies.selectedCurrencyOptions; diff --git a/src/app/accounting/periodic-accruals/periodic-accruals.component.html b/src/app/accounting/periodic-accruals/periodic-accruals.component.html index 1cb0119c69..fff1f1f63d 100644 --- a/src/app/accounting/periodic-accruals/periodic-accruals.component.html +++ b/src/app/accounting/periodic-accruals/periodic-accruals.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Accrue Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (periodicAccrualsForm.controls.tillDate.hasError('required')) { + + {{ 'labels.inputs.Accrue Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/accounting/periodic-accruals/periodic-accruals.component.ts b/src/app/accounting/periodic-accruals/periodic-accruals.component.ts index c54637123d..fe0b4c1679 100644 --- a/src/app/accounting/periodic-accruals/periodic-accruals.component.ts +++ b/src/app/accounting/periodic-accruals/periodic-accruals.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -22,6 +22,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class PeriodicAccrualsComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private accountingService = inject(AccountingService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Minimum accrue date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum accrue date allowed. */ @@ -29,6 +36,9 @@ export class PeriodicAccrualsComponent implements OnInit { /** Periodic accruals form. */ periodicAccrualsForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {AccountingService} accountingService Accounting Service. @@ -36,14 +46,7 @@ export class PeriodicAccrualsComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private accountingService: AccountingService, - private settingsService: SettingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router - ) {} + constructor() {} /** * Creates periodic accruals form. diff --git a/src/app/accounting/provisioning-entries/create-provisioning-entry/create-provisioning-entry.component.html b/src/app/accounting/provisioning-entries/create-provisioning-entry/create-provisioning-entry.component.html index 58d8393e26..bc92cb74c1 100644 --- a/src/app/accounting/provisioning-entries/create-provisioning-entry/create-provisioning-entry.component.html +++ b/src/app/accounting/provisioning-entries/create-provisioning-entry/create-provisioning-entry.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (provisioningEntryForm.controls.date.hasError('required')) { + + {{ 'labels.inputs.Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/accounting/provisioning-entries/create-provisioning-entry/create-provisioning-entry.component.ts b/src/app/accounting/provisioning-entries/create-provisioning-entry/create-provisioning-entry.component.ts index b51ff83794..dd11381e77 100644 --- a/src/app/accounting/provisioning-entries/create-provisioning-entry/create-provisioning-entry.component.ts +++ b/src/app/accounting/provisioning-entries/create-provisioning-entry/create-provisioning-entry.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -22,6 +22,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateProvisioningEntryComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private accountingService = inject(AccountingService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Minimum provisioning date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum provisioning date allowed. */ @@ -29,6 +36,9 @@ export class CreateProvisioningEntryComponent implements OnInit { /** Provisioning entry form. */ provisioningEntryForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {AccountingService} accountingService Accounting Service. @@ -36,14 +46,7 @@ export class CreateProvisioningEntryComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private accountingService: AccountingService, - private settingsService: SettingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router - ) {} + constructor() {} /** * Creates the provisioning entry form. diff --git a/src/app/accounting/provisioning-entries/provisioning-entries.component.ts b/src/app/accounting/provisioning-entries/provisioning-entries.component.ts index 6aee9844bf..1f9014b422 100644 --- a/src/app/accounting/provisioning-entries/provisioning-entries.component.ts +++ b/src/app/accounting/provisioning-entries/provisioning-entries.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -50,6 +50,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ProvisioningEntriesComponent implements OnInit { + private accountingService = inject(AccountingService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Provisioning entry data. */ provisioningEntryData: any; /** Columns to be displayed in provisioning entries table. */ @@ -69,17 +73,16 @@ export class ProvisioningEntriesComponent implements OnInit { /** Sorter for provisioning entries table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the provisioning entries data from `resolve`. * @param {AccountingService} accountingService Accounting Service. * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private accountingService: AccountingService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { provisioningEntries: any }) => { this.provisioningEntryData = data.provisioningEntries.pageItems; }); diff --git a/src/app/accounting/provisioning-entries/provisioning-entries.resolver.ts b/src/app/accounting/provisioning-entries/provisioning-entries.resolver.ts index 68a1eaf590..6224d8cdfa 100644 --- a/src/app/accounting/provisioning-entries/provisioning-entries.resolver.ts +++ b/src/app/accounting/provisioning-entries/provisioning-entries.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { AccountingService } from '../accounting.service'; */ @Injectable() export class ProvisioningEntriesResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the provisioning entries data. diff --git a/src/app/accounting/provisioning-entries/view-provisioning-entry/provisioning-entry-entries.resolver.ts b/src/app/accounting/provisioning-entries/view-provisioning-entry/provisioning-entry-entries.resolver.ts index d7cb4b6277..04ea8b8aea 100644 --- a/src/app/accounting/provisioning-entries/view-provisioning-entry/provisioning-entry-entries.resolver.ts +++ b/src/app/accounting/provisioning-entries/view-provisioning-entry/provisioning-entry-entries.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { AccountingService } from '../../accounting.service'; */ @Injectable() export class ProvisioningEntryEntriesResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the provisioning entry entries data. diff --git a/src/app/accounting/provisioning-entries/view-provisioning-entry/provisioning-entry.resolver.ts b/src/app/accounting/provisioning-entries/view-provisioning-entry/provisioning-entry.resolver.ts index 302e835e5c..5a23236a95 100644 --- a/src/app/accounting/provisioning-entries/view-provisioning-entry/provisioning-entry.resolver.ts +++ b/src/app/accounting/provisioning-entries/view-provisioning-entry/provisioning-entry.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { AccountingService } from '../../accounting.service'; */ @Injectable() export class ProvisioningEntryResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the provisioning entry data. diff --git a/src/app/accounting/provisioning-entries/view-provisioning-entry/view-provisioning-entry.component.html b/src/app/accounting/provisioning-entries/view-provisioning-entry/view-provisioning-entry.component.html index a846afda80..1fd45aa3ca 100644 --- a/src/app/accounting/provisioning-entries/view-provisioning-entry/view-provisioning-entry.component.html +++ b/src/app/accounting/provisioning-entries/view-provisioning-entry/view-provisioning-entry.component.html @@ -1,46 +1,43 @@ - - - - - {{ 'labels.buttons.Create Journal Entries' | translate }} - - - - - - - - {{ 'labels.inputs.Created By' | translate }} - - - {{ provisioningEntry.createdUser }} - - - - {{ 'labels.inputs.Created On' | translate }} - - - - {{ provisioningEntry.createdDate }} +@if (provisioningEntry) { + + + + + {{ 'labels.buttons.Create Journal Entries' | translate }} + + + + + + + {{ 'labels.inputs.Created By' | translate }} + + + {{ provisioningEntry.createdUser }} + + + {{ 'labels.inputs.Created On' | translate }} + + + {{ provisioningEntry.createdDate }} + + + {{ 'labels.inputs.Amount to be Reserved' | translate }} + + + {{ provisioningEntry.reservedAmount }} + - - - {{ 'labels.inputs.Amount to be Reserved' | translate }} - - - - {{ provisioningEntry.reservedAmount }} - - - - - + + + +} @@ -62,24 +59,27 @@ - - {{ office.name }} - + @for (office of filteredOfficeData | async; track office) { + + {{ office.name }} + + } - - {{ loanProduct.name }} - + @for (loanProduct of filteredLoanProductData | async; track loanProduct) { + + {{ loanProduct.name }} + + } - - {{ provisioningCategory.categoryName }} - + @for (provisioningCategory of filteredProvisioningCategoryData | async; track provisioningCategory) { + + {{ provisioningCategory.categoryName }} + + } diff --git a/src/app/accounting/provisioning-entries/view-provisioning-entry/view-provisioning-entry.component.ts b/src/app/accounting/provisioning-entries/view-provisioning-entry/view-provisioning-entry.component.ts index ea6f192617..eaf9013335 100644 --- a/src/app/accounting/provisioning-entries/view-provisioning-entry/view-provisioning-entry.component.ts +++ b/src/app/accounting/provisioning-entries/view-provisioning-entry/view-provisioning-entry.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, ViewChild, AfterViewInit, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { MatPaginator } from '@angular/material/paginator'; @@ -23,7 +23,7 @@ import { startWith, map, debounceTime, distinctUntilChanged, tap } from 'rxjs/op /** Custom Services */ import { AccountingService } from '../../accounting.service'; -import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { AsyncPipe } from '@angular/common'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatAutocompleteTrigger, MatAutocomplete, MatOption } from '@angular/material/autocomplete'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -57,6 +57,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewProvisioningEntryComponent implements OnInit, AfterViewInit { + private accountingService = inject(AccountingService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Provisioning entry id. */ provisioningEntryId: string; /** Provisioning entry. */ @@ -105,6 +109,9 @@ export class ViewProvisioningEntryComponent implements OnInit, AfterViewInit { /** Sorter for provisioning entry entries table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the provisioning entry, provisioning entry entries, offices, * loan products, provisioning categories data from `resolve`. @@ -112,11 +119,7 @@ export class ViewProvisioningEntryComponent implements OnInit, AfterViewInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private accountingService: AccountingService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe( (data: { provisioningEntry: any; diff --git a/src/app/accounting/provisioning-entries/view-provisioning-journal-entries/provisioning-journal-entries.resolver.ts b/src/app/accounting/provisioning-entries/view-provisioning-journal-entries/provisioning-journal-entries.resolver.ts index 27aa23cb52..c84f3c8f5c 100644 --- a/src/app/accounting/provisioning-entries/view-provisioning-journal-entries/provisioning-journal-entries.resolver.ts +++ b/src/app/accounting/provisioning-entries/view-provisioning-journal-entries/provisioning-journal-entries.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { AccountingService } from '../../accounting.service'; */ @Injectable() export class ProvisioningJournalEntriesResolver { + private accountingService = inject(AccountingService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting service. */ - constructor(private accountingService: AccountingService) {} + constructor() {} /** * Returns the provisioning journal entries data. diff --git a/src/app/accounting/provisioning-entries/view-provisioning-journal-entries/view-provisioning-journal-entries.component.html b/src/app/accounting/provisioning-entries/view-provisioning-journal-entries/view-provisioning-journal-entries.component.html index aed4c56a26..f08883efb6 100644 --- a/src/app/accounting/provisioning-entries/view-provisioning-journal-entries/view-provisioning-journal-entries.component.html +++ b/src/app/accounting/provisioning-entries/view-provisioning-journal-entries/view-provisioning-journal-entries.component.html @@ -51,26 +51,30 @@ {{ 'labels.inputs.Debit' | translate }} - - {{ - (provisioningJournalEntry.currency.displaySymbol || provisioningJournalEntry.currency.code) + - ' ' + - provisioningJournalEntry.amount - }} - + @if (provisioningJournalEntry.entryType.value === 'DEBIT') { + + {{ + (provisioningJournalEntry.currency.displaySymbol || provisioningJournalEntry.currency.code) + + ' ' + + provisioningJournalEntry.amount + }} + + } {{ 'labels.inputs.Credit' | translate }} - - {{ - (provisioningJournalEntry.currency.displaySymbol || provisioningJournalEntry.currency.code) + - ' ' + - provisioningJournalEntry.amount - }} - + @if (provisioningJournalEntry.entryType.value === 'CREDIT') { + + {{ + (provisioningJournalEntry.currency.displaySymbol || provisioningJournalEntry.currency.code) + + ' ' + + provisioningJournalEntry.amount + }} + + } diff --git a/src/app/accounting/provisioning-entries/view-provisioning-journal-entries/view-provisioning-journal-entries.component.ts b/src/app/accounting/provisioning-entries/view-provisioning-journal-entries/view-provisioning-journal-entries.component.ts index e5f616d917..0edbbb4f85 100644 --- a/src/app/accounting/provisioning-entries/view-provisioning-journal-entries/view-provisioning-journal-entries.component.ts +++ b/src/app/accounting/provisioning-entries/view-provisioning-journal-entries/view-provisioning-journal-entries.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -43,6 +43,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewProvisioningJournalEntriesComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Provisioning journal entry data. */ provisioningJournalEntryData: any; /** Columns to be displayed in provisioning journal entries table. */ @@ -66,11 +68,14 @@ export class ViewProvisioningJournalEntriesComponent implements OnInit { /** Sorter for provisioning journal entries table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the provisioning journal entries data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { provisioningJournalEntry: any }) => { this.provisioningJournalEntryData = data.provisioningJournalEntry.pageItems; }); diff --git a/src/app/accounting/revert-transaction/revert-transaction.component.html b/src/app/accounting/revert-transaction/revert-transaction.component.html index 85e3d969ae..7ac530bf78 100644 --- a/src/app/accounting/revert-transaction/revert-transaction.component.html +++ b/src/app/accounting/revert-transaction/revert-transaction.component.html @@ -1,21 +1,21 @@ - - {{ 'labels.heading.Revert Transaction' | translate }} - - {{ 'labels.text.Revert this transaction?' | translate }} - - {{ 'labels.inputs.Comments' | translate }} - - +@if (!data.reverted) { + + {{ 'labels.heading.Revert Transaction' | translate }} + + {{ 'labels.text.Revert this transaction?' | translate }} + + {{ 'labels.inputs.Comments' | translate }} + + + + + {{ 'labels.buttons.No' | translate }} + + {{ 'labels.buttons.Yes' | translate }} + + - - {{ 'labels.buttons.No' | translate }} - - {{ 'labels.buttons.Yes' | translate }} - - - - - +} @else { {{ 'labels.heading.Transaction Reverted' | translate }} {{ 'labels.heading.Success!' | translate }} @@ -28,4 +28,4 @@ {{ 'labels.heading.Success!' | translate }} {{ 'labels.buttons.Redirect to New Transaction' | translate }} - +} diff --git a/src/app/accounting/revert-transaction/revert-transaction.component.ts b/src/app/accounting/revert-transaction/revert-transaction.component.ts index 40b778e7df..4a8bc19166 100644 --- a/src/app/accounting/revert-transaction/revert-transaction.component.ts +++ b/src/app/accounting/revert-transaction/revert-transaction.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -29,15 +29,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RevertTransactionComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + /** Comments input form control. */ comments = new UntypedFormControl(''); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Provides comments or reverted transaction ID. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/accounting/search-journal-entry/search-journal-entry.component.html b/src/app/accounting/search-journal-entry/search-journal-entry.component.html index 2b83a7af69..b601a0723c 100644 --- a/src/app/accounting/search-journal-entry/search-journal-entry.component.html +++ b/src/app/accounting/search-journal-entry/search-journal-entry.component.html @@ -16,9 +16,11 @@ {{ 'labels.inputs.Filter' | translate }} - - {{ filter.option }} - + @for (filter of entryTypeFilterData; track filter) { + + {{ filter.option }} + + } @@ -80,9 +82,11 @@ - - {{ office.name }} - + @for (office of filteredOfficeData | async; track office) { + + {{ office.name }} + + } @@ -139,14 +143,18 @@ {{ 'labels.inputs.Debit' | translate }} - {{ journalEntry.amount | formatNumber }} + @if (journalEntry.entryType.value === 'DEBIT') { + {{ journalEntry.amount | formatNumber }} + } {{ 'labels.inputs.Credit' | translate }} - {{ journalEntry.amount | formatNumber }} + @if (journalEntry.entryType.value === 'CREDIT') { + {{ journalEntry.amount | formatNumber }} + } diff --git a/src/app/accounting/search-journal-entry/search-journal-entry.component.ts b/src/app/accounting/search-journal-entry/search-journal-entry.component.ts index dde72a9b9e..370d49412d 100644 --- a/src/app/accounting/search-journal-entry/search-journal-entry.component.ts +++ b/src/app/accounting/search-journal-entry/search-journal-entry.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; @@ -17,7 +17,7 @@ import { JournalEntriesDataSource } from './journal-entry.datasource'; import { Dates } from 'app/core/utils/dates'; import { MatAutocompleteTrigger, MatOption, MatAutocomplete } from '@angular/material/autocomplete'; import { GlAccountSelectorComponent } from '../../shared/accounting/gl-account-selector/gl-account-selector.component'; -import { NgFor, NgIf, AsyncPipe } from '@angular/common'; +import { AsyncPipe } from '@angular/common'; import { MatTable, MatColumnDef, @@ -67,6 +67,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SearchJournalEntryComponent implements OnInit, AfterViewInit { + private accountingService = inject(AccountingService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + /** Minimum transaction date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum transaction date allowed. */ @@ -179,18 +184,16 @@ export class SearchJournalEntryComponent implements OnInit, AfterViewInit { /** Sorter for journal entries table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices and gl accounts data from `resolve`. * @param {AccountingService} accountingService Accounting Service. * @param {ActivatedRoute} route Activated Route. * @param {SettingsService} settingsService Settings Service. */ - constructor( - private accountingService: AccountingService, - private settingsService: SettingsService, - private dateUtils: Dates, - private route: ActivatedRoute - ) { + constructor() { this.route.data.subscribe((data: { offices: any; glAccounts: any }) => { this.officeData = data.offices; this.glAccountData = data.glAccounts; diff --git a/src/app/centers/centers-view/center-actions/activate-center/activate-center.component.html b/src/app/centers/centers-view/center-actions/activate-center/activate-center.component.html index 2c33f92c1f..8a89bb8c7d 100644 --- a/src/app/centers/centers-view/center-actions/activate-center/activate-center.component.html +++ b/src/app/centers/centers-view/center-actions/activate-center/activate-center.component.html @@ -14,10 +14,12 @@ /> - - {{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (activateCenterForm.controls.activationDate.hasError('required')) { + + {{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/centers/centers-view/center-actions/activate-center/activate-center.component.ts b/src/app/centers/centers-view/center-actions/activate-center/activate-center.component.ts index 7858952e60..9f89c9b834 100644 --- a/src/app/centers/centers-view/center-actions/activate-center/activate-center.component.ts +++ b/src/app/centers/centers-view/center-actions/activate-center/activate-center.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ActivateCenterComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private centersService = inject(CentersService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -30,6 +37,9 @@ export class ActivateCenterComponent implements OnInit { /** Group Account Id */ centerId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {centersService} CentersService Shares Service @@ -38,14 +48,7 @@ export class ActivateCenterComponent implements OnInit { * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private centersService: CentersService, - private settingsService: SettingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.centerId = this.route.parent.snapshot.params['centerId']; } diff --git a/src/app/centers/centers-view/center-actions/attach-center-meeting/attach-center-meeting.component.html b/src/app/centers/centers-view/center-actions/attach-center-meeting/attach-center-meeting.component.html index 385d93ce03..e297e840ac 100644 --- a/src/app/centers/centers-view/center-actions/attach-center-meeting/attach-center-meeting.component.html +++ b/src/app/centers/centers-view/center-actions/attach-center-meeting/attach-center-meeting.component.html @@ -15,54 +15,74 @@ /> - - {{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (centerMeetingForm.controls.startDate.hasError('required')) { + + {{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Repeats?' | translate }} - - {{ 'labels.inputs.Repetition Frequency' | translate }} - - - {{ option.value }} - - - - {{ 'labels.inputs.Repetition Frequency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (centerMeetingForm.contains('frequency')) { + + {{ 'labels.inputs.Repetition Frequency' | translate }} + + @for (option of frequencyOptions; track option) { + + {{ option.value }} + + } + + @if (centerMeetingForm.controls.frequency.hasError('repeatsOnDay')) { + + {{ 'labels.inputs.Repetition Frequency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Repetition Interval' | translate }} - - - {{ interval }} - - - - {{ 'labels.inputs.Repetition Interval' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (centerMeetingForm.contains('interval')) { + + {{ 'labels.inputs.Repetition Interval' | translate }} + + @for (interval of repetitionIntervals; track interval) { + + {{ interval }} + + } + + @if (centerMeetingForm.controls.interval.hasError('repeatsOnDay')) { + + {{ 'labels.inputs.Repetition Interval' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Repeats on Day' | translate }} - - - {{ day.value }} - - - - {{ 'labels.inputs.At least' | translate }} {{ 'labels.inputs.one' | translate }} - {{ 'labels.inputs.day must be selected' | translate }} - - + @if (centerMeetingForm.contains('repeatsOnDay')) { + + {{ 'labels.inputs.Repeats on Day' | translate }} + + @for (day of repeatsOnDays; track day) { + + {{ day.value }} + + } + + @if (centerMeetingForm.controls.repeatsOnDay.hasError('repeatsOnDay')) { + + {{ 'labels.inputs.At least' | translate }} {{ 'labels.inputs.one' | translate }} + {{ 'labels.inputs.day must be selected' | translate }} + + } + + } diff --git a/src/app/centers/centers-view/center-actions/attach-center-meeting/attach-center-meeting.component.ts b/src/app/centers/centers-view/center-actions/attach-center-meeting/attach-center-meeting.component.ts index d8f26f9b01..643085e099 100644 --- a/src/app/centers/centers-view/center-actions/attach-center-meeting/attach-center-meeting.component.ts +++ b/src/app/centers/centers-view/center-actions/attach-center-meeting/attach-center-meeting.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -29,6 +29,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AttachCenterMeetingComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private centersService = inject(CentersService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -46,6 +53,9 @@ export class AttachCenterMeetingComponent implements OnInit { /** Repetition Days Data */ repeatsOnDays: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches Calendar Template from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -55,14 +65,7 @@ export class AttachCenterMeetingComponent implements OnInit { * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private centersService: CentersService, - private settingsService: SettingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { centersActionData: any }) => { this.calendarTemplate = data.centersActionData; this.frequencyOptions = this.calendarTemplate.frequencyOptions; diff --git a/src/app/centers/centers-view/center-actions/center-actions.component.html b/src/app/centers/centers-view/center-actions/center-actions.component.html index 87578b19ef..106a300871 100644 --- a/src/app/centers/centers-view/center-actions/center-actions.component.html +++ b/src/app/centers/centers-view/center-actions/center-actions.component.html @@ -1,9 +1,27 @@ - - - - - - - - - +@if (actions['Activate']) { + +} +@if (actions['Assign Staff']) { + +} +@if (actions['Close']) { + +} +@if (actions['Attendance']) { + +} +@if (actions['Attach Meeting']) { + +} +@if (actions['Edit Meeting']) { + +} +@if (actions['Edit Meeting Schedule']) { + +} +@if (actions['Manage Groups']) { + +} +@if (actions['Staff Assignment History']) { + +} diff --git a/src/app/centers/centers-view/center-actions/center-actions.component.ts b/src/app/centers/centers-view/center-actions/center-actions.component.ts index da6f40738b..8f052cad5c 100644 --- a/src/app/centers/centers-view/center-actions/center-actions.component.ts +++ b/src/app/centers/centers-view/center-actions/center-actions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { ActivateCenterComponent } from './activate-center/activate-center.component'; import { CenterAssignStaffComponent } from './center-assign-staff/center-assign-staff.component'; @@ -33,6 +33,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CenterActionsComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Flag object to store possible actions and render appropriate UI to the user */ actions: { Activate: boolean; @@ -56,13 +59,13 @@ export class CenterActionsComponent { 'Staff Assignment History': false }; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route */ - constructor( - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.router.routeReuseStrategy.shouldReuseRoute = () => false; const name = this.route.snapshot.params['action']; diff --git a/src/app/centers/centers-view/center-actions/center-assign-staff/center-assign-staff.component.html b/src/app/centers/centers-view/center-actions/center-assign-staff/center-assign-staff.component.html index 6803d7de3d..5f5b17fabe 100644 --- a/src/app/centers/centers-view/center-actions/center-assign-staff/center-assign-staff.component.html +++ b/src/app/centers/centers-view/center-actions/center-assign-staff/center-assign-staff.component.html @@ -6,14 +6,18 @@ {{ 'labels.inputs.Staff' | translate }} - - {{ staff.displayName }} - + @for (staff of staffData; track staff) { + + {{ staff.displayName }} + + } - - {{ 'labels.inputs.Staff' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (centerAssignStaffForm.controls.staffId.hasError('required')) { + + {{ 'labels.inputs.Staff' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/centers/centers-view/center-actions/center-assign-staff/center-assign-staff.component.ts b/src/app/centers/centers-view/center-actions/center-assign-staff/center-assign-staff.component.ts index 97050f0819..7345db2fe9 100644 --- a/src/app/centers/centers-view/center-actions/center-assign-staff/center-assign-staff.component.ts +++ b/src/app/centers/centers-view/center-actions/center-assign-staff/center-assign-staff.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -19,6 +19,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CenterAssignStaffComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private centersService = inject(CentersService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Center Assign Staff form. */ centerAssignStaffForm: UntypedFormGroup; /** Field Officer Data */ @@ -26,6 +31,9 @@ export class CenterAssignStaffComponent implements OnInit { /** Center Data */ centerData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches Center Action Data from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -33,12 +41,7 @@ export class CenterAssignStaffComponent implements OnInit { * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private centersService: CentersService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { centersActionData: any }) => { this.centerData = data.centersActionData; }); diff --git a/src/app/centers/centers-view/center-actions/center-attendance/center-attendance.component.ts b/src/app/centers/centers-view/center-actions/center-attendance/center-attendance.component.ts index 8c3dbd690f..3b9a0a8d14 100644 --- a/src/app/centers/centers-view/center-actions/center-attendance/center-attendance.component.ts +++ b/src/app/centers/centers-view/center-actions/center-attendance/center-attendance.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -65,6 +65,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CenterAttendanceComponent implements OnInit { + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private router = inject(Router); + private centersService = inject(CentersService); + private settingsService = inject(SettingsService); + dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** Members data. */ membersData: any; /** Center Data */ @@ -87,6 +95,9 @@ export class CenterAttendanceComponent implements OnInit { /** Maximum date allowed. */ maxDate = new Date(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the center members data from `resolve`. * @param {ActivatedRoute} route Route @@ -96,15 +107,7 @@ export class CenterAttendanceComponent implements OnInit { * @param {SettingsService} settingsService Settings Service. * @param {MatDialog} dialog Mat Dialog */ - constructor( - private route: ActivatedRoute, - private dateUtils: Dates, - private router: Router, - private centersService: CentersService, - private settingsService: SettingsService, - public dialog: MatDialog, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { centersActionData: any }) => { this.centerData = data.centersActionData; this.membersData = data.centersActionData.clients; diff --git a/src/app/centers/centers-view/center-actions/close-center/close-center.component.html b/src/app/centers/centers-view/center-actions/close-center/close-center.component.html index 052ac1d53a..2c8d756851 100644 --- a/src/app/centers/centers-view/center-actions/close-center/close-center.component.html +++ b/src/app/centers/centers-view/center-actions/close-center/close-center.component.html @@ -15,23 +15,29 @@ /> - - {{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeCenterForm.controls.closureDate.hasError('required')) { + + {{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Closure Reason' | translate }} - - {{ reason.name }} - + @for (reason of closureData; track reason) { + + {{ reason.name }} + + } - - {{ 'labels.inputs.Closure Reason' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeCenterForm.controls.closureReasonId.hasError('required')) { + + {{ 'labels.inputs.Closure Reason' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/centers/centers-view/center-actions/close-center/close-center.component.ts b/src/app/centers/centers-view/center-actions/close-center/close-center.component.ts index d1d060eebb..5b29779cd5 100644 --- a/src/app/centers/centers-view/center-actions/close-center/close-center.component.ts +++ b/src/app/centers/centers-view/center-actions/close-center/close-center.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CloseCenterComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private centersService = inject(CentersService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class CloseCenterComponent implements OnInit { /** Center Id */ centerId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {CentersService} centersService Shares Service @@ -40,14 +50,7 @@ export class CloseCenterComponent implements OnInit { * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private centersService: CentersService, - private settingsService: SettingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { centeractionData: any }) => { this.closureData = data.centeractionData.closureReasons; }); diff --git a/src/app/centers/centers-view/center-actions/edit-center-meeting-schedule/edit-center-meeting-schedule.component.html b/src/app/centers/centers-view/center-actions/edit-center-meeting-schedule/edit-center-meeting-schedule.component.html index a6eafece82..1271c6b025 100644 --- a/src/app/centers/centers-view/center-actions/edit-center-meeting-schedule/edit-center-meeting-schedule.component.html +++ b/src/app/centers/centers-view/center-actions/edit-center-meeting-schedule/edit-center-meeting-schedule.component.html @@ -6,14 +6,18 @@ {{ 'labels.inputs.Existing Meeting Date' | translate }} - - {{ date | dateFormat }} - + @for (date of nextMeetingDates; track date) { + + {{ date | dateFormat }} + + } - - {{ 'labels.inputs.Existing Meeting Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (centerEditMeetingScheduleForm.controls.presentMeetingDate.hasError('repeatsOnDay')) { + + {{ 'labels.inputs.Existing Meeting Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -28,10 +32,12 @@ /> - - {{ 'labels.inputs.Revised Meeting Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (centerEditMeetingScheduleForm.controls.newMeetingDate.hasError('required')) { + + {{ 'labels.inputs.Revised Meeting Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/centers/centers-view/center-actions/edit-center-meeting-schedule/edit-center-meeting-schedule.component.ts b/src/app/centers/centers-view/center-actions/edit-center-meeting-schedule/edit-center-meeting-schedule.component.ts index 693f6abfe6..e2285e30f1 100644 --- a/src/app/centers/centers-view/center-actions/edit-center-meeting-schedule/edit-center-meeting-schedule.component.ts +++ b/src/app/centers/centers-view/center-actions/edit-center-meeting-schedule/edit-center-meeting-schedule.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, FormControl, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditCenterMeetingScheduleComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private centersService = inject(CentersService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -38,6 +45,9 @@ export class EditCenterMeetingScheduleComponent implements OnInit { /** Next meetings data */ nextMeetingDates: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches Calendar Template from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -47,14 +57,7 @@ export class EditCenterMeetingScheduleComponent implements OnInit { * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private centersService: CentersService, - private settingsService: SettingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { centersActionData: any }) => { this.calendarTemplate = data.centersActionData; this.nextMeetingDates = this.calendarTemplate.nextTenRecurringDates; diff --git a/src/app/centers/centers-view/center-actions/edit-center-meeting/edit-center-meeting.component.html b/src/app/centers/centers-view/center-actions/edit-center-meeting/edit-center-meeting.component.html index b3162741c5..1779b28078 100644 --- a/src/app/centers/centers-view/center-actions/edit-center-meeting/edit-center-meeting.component.html +++ b/src/app/centers/centers-view/center-actions/edit-center-meeting/edit-center-meeting.component.html @@ -13,41 +13,55 @@ {{ 'labels.inputs.Repetition Frequency' | translate }} - - {{ option.value }} - + @for (option of frequencyOptions; track option) { + + {{ option.value }} + + } - - {{ 'labels.inputs.Repetition Frequency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (centerEditMeetingForm.controls.frequency.hasError('repeatsOnDay')) { + + {{ 'labels.inputs.Repetition Frequency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Repetition Interval' | translate }} - - {{ interval }} - + @for (interval of repetitionIntervals; track interval) { + + {{ interval }} + + } - - {{ 'labels.inputs.Repetition Interval' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (centerEditMeetingForm.controls.interval.hasError('repeatsOnDay')) { + + {{ 'labels.inputs.Repetition Interval' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Repeats on Day' | translate }} - - - {{ day.value }} - - - - {{ 'labels.inputs.At least' | translate }} {{ 'labels.inputs.one' | translate }} - {{ 'labels.inputs.day must be selected' | translate }} - - + @if (centerEditMeetingForm.contains('repeatsOnDay')) { + + {{ 'labels.inputs.Repeats on Day' | translate }} + + @for (day of repeatsOnDays; track day) { + + {{ day.value }} + + } + + @if (centerEditMeetingForm.controls.repeatsOnDay.hasError('repeatsOnDay')) { + + {{ 'labels.inputs.At least' | translate }} {{ 'labels.inputs.one' | translate }} + {{ 'labels.inputs.day must be selected' | translate }} + + } + + } {{ 'labels.inputs.Above Changes are Effective from' | translate }} @@ -61,10 +75,12 @@ /> - - {{ 'labels.inputs.Changes Affection Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (centerEditMeetingForm.controls.startDate.hasError('required')) { + + {{ 'labels.inputs.Changes Affection Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ "labels.text.Repeats' and 'Repeats every" | translate }} diff --git a/src/app/centers/centers-view/center-actions/edit-center-meeting/edit-center-meeting.component.ts b/src/app/centers/centers-view/center-actions/edit-center-meeting/edit-center-meeting.component.ts index 3fc7fed974..6dd5d52f5e 100644 --- a/src/app/centers/centers-view/center-actions/edit-center-meeting/edit-center-meeting.component.ts +++ b/src/app/centers/centers-view/center-actions/edit-center-meeting/edit-center-meeting.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -31,6 +31,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditCenterMeetingComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private centersService = inject(CentersService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -50,6 +57,9 @@ export class EditCenterMeetingComponent implements OnInit { /** CalendarI ID */ calendarId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches Calendar Template from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -59,14 +69,7 @@ export class EditCenterMeetingComponent implements OnInit { * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private centersService: CentersService, - private settingsService: SettingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { centersActionData: any }) => { this.calendarTemplate = data.centersActionData; this.frequencyOptions = this.calendarTemplate.frequencyOptions; diff --git a/src/app/centers/centers-view/center-actions/manage-groups/manage-groups.component.html b/src/app/centers/centers-view/center-actions/manage-groups/manage-groups.component.html index 45c43c1330..5edc2613e7 100644 --- a/src/app/centers/centers-view/center-actions/manage-groups/manage-groups.component.html +++ b/src/app/centers/centers-view/center-actions/manage-groups/manage-groups.component.html @@ -6,9 +6,11 @@ - - {{ group.name }} - + @for (group of groupsData; track group) { + + {{ group.name }} + + } @@ -36,19 +38,23 @@ {{ 'labels.heading.Group Members' | translate }} - - - {{ group.name }} - - - - - + @if (groupMembers?.length) { + + @for (group of groupMembers; track group; let i = $index) { + + {{ group.name }} + + + + + } + + } diff --git a/src/app/centers/centers-view/center-actions/manage-groups/manage-groups.component.ts b/src/app/centers/centers-view/center-actions/manage-groups/manage-groups.component.ts index e4a8b3de9a..0b3e24b3d3 100644 --- a/src/app/centers/centers-view/center-actions/manage-groups/manage-groups.component.ts +++ b/src/app/centers/centers-view/center-actions/manage-groups/manage-groups.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, AfterViewInit } from '@angular/core'; +import { Component, AfterViewInit, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; @@ -33,6 +33,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ManageGroupsComponent implements AfterViewInit { + private route = inject(ActivatedRoute); + private centersService = inject(CentersService); + private groupsService = inject(GroupsService); + dialog = inject(MatDialog); + /** Center Data */ centerData: any; /** Group data. */ @@ -42,6 +47,9 @@ export class ManageGroupsComponent implements AfterViewInit { /** GroupChoice. */ groupChoice = new UntypedFormControl(''); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches center action data from `resolve` * @param {ActivatedRoute} route Activated Route @@ -49,12 +57,7 @@ export class ManageGroupsComponent implements AfterViewInit { * @param {GroupsService} groupsService Groups Service * @param {MatDialog} dialog Mat Dialog */ - constructor( - private route: ActivatedRoute, - private centersService: CentersService, - private groupsService: GroupsService, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { centersActionData: any }) => { this.centerData = data.centersActionData; this.groupMembers = data.centersActionData.groupMembers; diff --git a/src/app/centers/centers-view/center-actions/staff-assignment-history/staff-assignment-history.component.ts b/src/app/centers/centers-view/center-actions/staff-assignment-history/staff-assignment-history.component.ts index b7ae59e121..99f9c43101 100644 --- a/src/app/centers/centers-view/center-actions/staff-assignment-history/staff-assignment-history.component.ts +++ b/src/app/centers/centers-view/center-actions/staff-assignment-history/staff-assignment-history.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; import { ActivatedRoute, RouterLink } from '@angular/router'; @@ -21,18 +21,21 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class StaffAssignmentHistoryComponent implements OnInit { + private sanitizer = inject(DomSanitizer); + private route = inject(ActivatedRoute); + /** Staff Assignment History Data */ staffAssignmentHistoryData: any; /** trusted resource url for pentaho output */ pentahoUrl: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {DomSanitizer} sanitizer DOM Sanitizer */ - constructor( - private sanitizer: DomSanitizer, - private route: ActivatedRoute - ) { + constructor() { this.route.data.subscribe((data: { centersActionData: any }) => { this.staffAssignmentHistoryData = data.centersActionData; }); diff --git a/src/app/centers/centers-view/centers-view.component.html b/src/app/centers/centers-view/centers-view.component.html index a0400d0c74..94712cf9f5 100644 --- a/src/app/centers/centers-view/centers-view.component.html +++ b/src/app/centers/centers-view/centers-view.component.html @@ -17,13 +17,15 @@ > {{ 'labels.heading.Center Name' | translate }} : {{ centerViewData.name }} - - - - - - - + @if (!(centerViewData.status.value === 'Closed')) { + + + + + + + + } @@ -31,33 +33,44 @@ {{ 'labels.inputs.Account' | translate }} #:{{ centerViewData.accountNo }} {{ 'labels.inputs.Office' | translate }}: {{ centerViewData.officeName }} - - {{ 'labels.inputs.External Id' | translate }}: - - - - {{ 'labels.inputs.Staff' | translate }}: {{ centerViewData.staffName }} - + @if (centerViewData.externalId) { + + {{ 'labels.inputs.External Id' | translate }}: + + + } + @if (centerViewData.staffName) { + {{ 'labels.inputs.Staff' | translate }}: {{ centerViewData.staffName }} + } {{ 'labels.inputs.Activation Date' | translate }} : {{ centerViewData.activationDate ? (centerViewData.activationDate | dateFormat) : 'Not Activated' }} - - - {{ 'labels.inputs.Next Meeting on' | translate }}: - {{ centerViewData.collectionMeetingCalendar?.nextTenRecurringDates[0] | dateFormat }} - - - - {{ 'labels.inputs.Meeting Frequency' | translate }}: - {{ centerViewData.collectionMeetingCalendar?.frequency.value | lowercase }} - - - + @if (centerViewData.collectionMeetingCalendar) { + + + {{ 'labels.inputs.Next Meeting on' | translate }}: + {{ centerViewData.collectionMeetingCalendar?.nextTenRecurringDates[0] | dateFormat }} + @if (editMeeting) { + + + + } + {{ 'labels.inputs.Meeting Frequency' | translate }}: + {{ centerViewData.collectionMeetingCalendar?.frequency.value | lowercase }} + + + } @else { {{ 'labels.inputs.Next Meeting on' | translate }}: {{ 'labels.text.Unassigned' | translate }} @@ -65,21 +78,23 @@ {{ 'labels.inputs.Meeting Frequency' | translate }}: {{ 'labels.text.N/A' | translate }} - + } - - - - - - {{ 'labels.buttons.Activate' | translate }} - - + @if (!(centerViewData.status.value === 'Active')) { + + + + + + {{ 'labels.buttons.Activate' | translate }} + + + } @@ -98,53 +113,65 @@ {{ 'labels.buttons.Manage Groups' | translate }} - - - - - - {{ 'labels.buttons.Centers Saving Application' | translate }} - - - {{ 'labels.buttons.More' | translate }} - - + @if (centerViewData.active) { + - {{ 'labels.buttons.Attendance' | translate }} - - - - - {{ 'labels.buttons.Assign Staff' | translate }} - - - - - {{ 'labels.buttons.Unassign Staff' | translate }} - - - - - {{ 'labels.buttons.Delete' | translate }} + + + + {{ 'labels.buttons.Centers Saving Application' | translate }} + } + {{ 'labels.buttons.More' | translate }} + + @if (centerViewData.collectionMeetingCalendar) { + + + {{ 'labels.buttons.Attendance' | translate }} + + + } + @if (!centerViewData.staffId) { + + + {{ 'labels.buttons.Assign Staff' | translate }} + + + } + @if (centerViewData.staffId) { + + + {{ 'labels.buttons.Unassign Staff' | translate }} + + + } + @if (centerViewData.status.value === 'Active') { + + + {{ 'labels.buttons.Delete' | translate }} + + + } {{ 'labels.buttons.Close' | translate }} - - - {{ 'labels.buttons.Attach Meeting' | translate }} - - + @if (centerViewData.status.value === 'Active' && !centerViewData.collectionMeetingCalendar) { + + + {{ 'labels.buttons.Attach Meeting' | translate }} + + + } > {{ 'labels.inputs.Notes' | translate }} - - - {{ centerDatatable.registeredTableName }} - - + @for (centerDatatable of centerDatatables; track centerDatatable) { + + + {{ centerDatatable.registeredTableName }} + + + } diff --git a/src/app/centers/centers-view/centers-view.component.ts b/src/app/centers/centers-view/centers-view.component.ts index d8f91d68ce..f879ebb68d 100644 --- a/src/app/centers/centers-view/centers-view.component.ts +++ b/src/app/centers/centers-view/centers-view.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -20,7 +20,7 @@ import { MatCardContent } from '@angular/material/card'; import { MatTooltip } from '@angular/material/tooltip'; -import { NgClass, NgIf, NgFor, LowerCasePipe } from '@angular/common'; +import { NgClass, LowerCasePipe } from '@angular/common'; import { MatIconButton } from '@angular/material/button'; import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; import { MatIcon } from '@angular/material/icon'; @@ -64,6 +64,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CentersViewComponent implements OnInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + dialog = inject(MatDialog); + centersService = inject(CentersService); + private translateService = inject(TranslateService); + /** Stores Center View Data */ centerViewData: any; /** Center datatable */ @@ -71,17 +77,14 @@ export class CentersViewComponent implements OnInit { /** Meeting data */ meetingData: boolean; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the data for center * @param route route Activated Route. */ - constructor( - private route: ActivatedRoute, - private router: Router, - public dialog: MatDialog, - public centersService: CentersService, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { centerViewData: any; centerDatatables: any }) => { this.centerViewData = data.centerViewData; this.centerDatatables = data.centerDatatables; diff --git a/src/app/centers/centers-view/datatable-tab/datatable-tab.component.ts b/src/app/centers/centers-view/datatable-tab/datatable-tab.component.ts index 9984ca7e6b..4144ebfcba 100644 --- a/src/app/centers/centers-view/datatable-tab/datatable-tab.component.ts +++ b/src/app/centers/centers-view/datatable-tab/datatable-tab.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { EntityDatatableTabComponent } from '../../../shared/tabs/entity-datatable-tab/entity-datatable-tab.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -13,17 +13,22 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DatatableTabComponent { + private route = inject(ActivatedRoute); + entityId: string; /** Center Datatable */ entityDatatable: any; /** Multi Row Datatable Flag */ multiRowDatatableFlag: boolean; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches data table data from `resolve` * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.entityId = this.route.parent.parent.snapshot.paramMap.get('centerId'); this.route.data.subscribe((data: { centerDatatable: any }) => { diff --git a/src/app/centers/centers-view/general-tab/general-tab.component.html b/src/app/centers/centers-view/general-tab/general-tab.component.html index 541ea9f6e7..bdad914496 100644 --- a/src/app/centers/centers-view/general-tab/general-tab.component.html +++ b/src/app/centers/centers-view/general-tab/general-tab.component.html @@ -1,7 +1,9 @@ - - {{ 'labels.heading.Center Closed' | translate }} - + @if (centerViewData.status.value === 'Closed') { + + {{ 'labels.heading.Center Closed' | translate }} + + } {{ 'labels.heading.Summary Details' | translate }} @@ -18,9 +20,8 @@ {{ 'labels.heading.Summary Details' | translate }} - 0"> + @if (groupResourceData.length > 0) { {{ 'labels.heading.Groups' | translate }} - {{ 'labels.inputs.Account Number' | translate }} @@ -33,32 +34,27 @@ {{ 'labels.heading.Groups' | translate }} {{ element.accountNo }} - {{ 'labels.inputs.Group Name' | translate }} {{ element.name }} - {{ 'labels.inputs.Office Name' | translate }} {{ element.officeName }} - {{ 'labels.inputs.Submitted On' | translate }} {{ element.timeline.submittedOnDate | dateFormat }} - - + } - - 0"> + @if (!(savingsAccountData === undefined)) { + @if (savingsAccountData.length > 0) { {{ 'labels.heading.Savings Account Overview' | translate }} - {{ 'labels.inputs.Account No' | translate }} @@ -71,63 +67,64 @@ {{ 'labels.heading.Savings Account Overview' | translate }} {{ element.accountNo }} - {{ 'labels.inputs.Products' | translate }} {{ element.productName }} - {{ 'labels.inputs.Balance' | translate }} {{ element.accountBalance }} - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - + @if (element.status.active) { + @if (element.depositType.id === 100) { + + + + } + @if (element.depositType.id === 300) { + + + + } + @if (element.depositType.id === 100) { + + + + } + @if (element.depositType.id === 300) { + + + + } + } + @if (element.status.submittedAndPendingApproval) { {{ 'labels.heading.Savings Account Overview' | translate }} > - - + } + @if (!element.status.submittedAndPendingApproval && !element.status.active) { {{ 'labels.heading.Savings Account Overview' | translate }} > - + } - {{ 'labels.heading.Savings Account Overview' | translate }} [routerLink]="['../', 'savings-accounts', row.id, 'transactions']" > - - + } + } diff --git a/src/app/centers/centers-view/general-tab/general-tab.component.ts b/src/app/centers/centers-view/general-tab/general-tab.component.ts index bd0eb30cb4..b887bee4c9 100644 --- a/src/app/centers/centers-view/general-tab/general-tab.component.ts +++ b/src/app/centers/centers-view/general-tab/general-tab.component.ts @@ -1,7 +1,7 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; -import { NgIf, NgClass } from '@angular/common'; +import { NgClass } from '@angular/common'; import { MatTable, MatColumnDef, @@ -47,6 +47,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GeneralTabComponent { + private route = inject(ActivatedRoute); + /** Savings Account Table Columns */ savingsAccountColumns: string[] = [ 'Account No', @@ -70,11 +72,14 @@ export class GeneralTabComponent { /** Stores Group Data */ groupResourceData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the data for centers * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { centerSummaryData: any; centerViewData: any; savingsAccountData: any }) => { this.centerSummaryData = data.centerSummaryData[0]; this.centerViewData = data.centerViewData; diff --git a/src/app/centers/centers-view/notes-tab/notes-tab.component.html b/src/app/centers/centers-view/notes-tab/notes-tab.component.html index 3dec8e6167..2a0d50ee97 100644 --- a/src/app/centers/centers-view/notes-tab/notes-tab.component.html +++ b/src/app/centers/centers-view/notes-tab/notes-tab.component.html @@ -26,22 +26,24 @@ {{ 'labels.heading.Notes' | translate }} - - - {{ centerNote.note }} - - {{ 'labels.inputs.Created By' | translate }}: {{ centerNote.createdByUsername }} - {{ 'labels.inputs.Date' | translate }}: {{ centerNote.createdOn | dateFormat }} - - - - - - - - - - + @for (centerNote of centerNotes; track centerNote; let i = $index) { + + + {{ centerNote.note }} + + {{ 'labels.inputs.Created By' | translate }}: {{ centerNote.createdByUsername }} + {{ 'labels.inputs.Date' | translate }}: {{ centerNote.createdOn | dateFormat }} + + + + + + + + + + + } diff --git a/src/app/centers/centers-view/notes-tab/notes-tab.component.ts b/src/app/centers/centers-view/notes-tab/notes-tab.component.ts index 654c03035f..7064281840 100644 --- a/src/app/centers/centers-view/notes-tab/notes-tab.component.ts +++ b/src/app/centers/centers-view/notes-tab/notes-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute } from '@angular/router'; @@ -31,20 +31,23 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class NotesTabComponent implements OnInit { + private route = inject(ActivatedRoute); + private formBuilder = inject(UntypedFormBuilder); + private centersService = inject(CentersService); + private authenticationService = inject(AuthenticationService); + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + centerId: string; username: string; centerNotes: any; noteForm: UntypedFormGroup; @ViewChild('formRef', { static: true }) formRef: any; - constructor( - private route: ActivatedRoute, - private formBuilder: UntypedFormBuilder, - private centersService: CentersService, - private authenticationService: AuthenticationService, - private dialog: MatDialog, - private translateService: TranslateService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { const savedCredentials = this.authenticationService.getCredentials(); this.username = savedCredentials.username; this.centerId = this.route.parent.snapshot.params['centerId']; diff --git a/src/app/centers/centers.component.ts b/src/app/centers/centers.component.ts index 34db3d5e49..e165924292 100644 --- a/src/app/centers/centers.component.ts +++ b/src/app/centers/centers.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatCheckbox } from '@angular/material/checkbox'; import { MatPaginator } from '@angular/material/paginator'; @@ -63,6 +63,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CentersComponent implements OnInit, AfterViewInit { + private centersService = inject(CentersService); + @ViewChild('showClosedCenters', { static: true }) showClosedCenters: MatCheckbox; /** Name form control. */ @@ -96,7 +98,10 @@ export class CentersComponent implements OnInit, AfterViewInit { /** Sorter for centers table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; - constructor(private centersService: CentersService) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { this.getCenters(); diff --git a/src/app/centers/centers.service.ts b/src/app/centers/centers.service.ts index a728d51e2a..d04b700328 100644 --- a/src/app/centers/centers.service.ts +++ b/src/app/centers/centers.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -12,10 +12,15 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class CentersService { + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. */ - constructor(private http: HttpClient) {} + constructor() {} /** * @param {any} filterBy Properties by which entries should be filtered. diff --git a/src/app/centers/common-resolvers/center-actions.resolver.ts b/src/app/centers/common-resolvers/center-actions.resolver.ts index bf11d698f5..21a07a58d6 100644 --- a/src/app/centers/common-resolvers/center-actions.resolver.ts +++ b/src/app/centers/common-resolvers/center-actions.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { CentersService } from '../centers.service'; */ @Injectable() export class CenterActionsResolver { + private centersService = inject(CentersService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {CentersService} centersService Savings service. */ - constructor(private centersService: CentersService) {} + constructor() {} /** * Returns the Centers account actions data. diff --git a/src/app/centers/common-resolvers/center-data-and-template.resolver.ts b/src/app/centers/common-resolvers/center-data-and-template.resolver.ts index 9f54b0eb2f..54faf41869 100644 --- a/src/app/centers/common-resolvers/center-data-and-template.resolver.ts +++ b/src/app/centers/common-resolvers/center-data-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { CentersService } from '../centers.service'; */ @Injectable() export class CenterDataAndTemplateResolver { + private centersService = inject(CentersService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {CentersService} CentersService Centers service. */ - constructor(private centersService: CentersService) {} + constructor() {} /** * Returns the Centers and template data. diff --git a/src/app/centers/common-resolvers/center-datatable.resolver.ts b/src/app/centers/common-resolvers/center-datatable.resolver.ts index 1d6ffce065..6aa07e9d57 100644 --- a/src/app/centers/common-resolvers/center-datatable.resolver.ts +++ b/src/app/centers/common-resolvers/center-datatable.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { CentersService } from '../centers.service'; */ @Injectable() export class CenterDatatableResolver { + private centersService = inject(CentersService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {CentersService} CentersService Centers service. */ - constructor(private centersService: CentersService) {} + constructor() {} /** * Returns the Centers Notes Data. diff --git a/src/app/centers/common-resolvers/center-datatables.resolver.ts b/src/app/centers/common-resolvers/center-datatables.resolver.ts index 315a4cde56..9adb36ac70 100644 --- a/src/app/centers/common-resolvers/center-datatables.resolver.ts +++ b/src/app/centers/common-resolvers/center-datatables.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { CentersService } from '../centers.service'; */ @Injectable() export class CenterDatatablesResolver { + private centersService = inject(CentersService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {centersService} centersService centers service. */ - constructor(private centersService: CentersService) {} + constructor() {} /** * Returns the center datatables. diff --git a/src/app/centers/common-resolvers/center-notes.resolver.ts b/src/app/centers/common-resolvers/center-notes.resolver.ts index a3b74fd099..90cb36bb67 100644 --- a/src/app/centers/common-resolvers/center-notes.resolver.ts +++ b/src/app/centers/common-resolvers/center-notes.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { CentersService } from '../centers.service'; */ @Injectable() export class CenterNotesResolver { + private centersService = inject(CentersService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {CentersService} CentersService Centers service. */ - constructor(private centersService: CentersService) {} + constructor() {} /** * Returns the Centers Notes Data. diff --git a/src/app/centers/common-resolvers/center-resource.resolver.ts b/src/app/centers/common-resolvers/center-resource.resolver.ts index fd076ad2e6..721ce2b4ae 100644 --- a/src/app/centers/common-resolvers/center-resource.resolver.ts +++ b/src/app/centers/common-resolvers/center-resource.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { CentersService } from '../centers.service'; */ @Injectable() export class CenterResourceResolver { + private centersService = inject(CentersService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {CentersService} CentersService Centers service. */ - constructor(private centersService: CentersService) {} + constructor() {} /** * Returns the Centers data for General Tab. diff --git a/src/app/centers/common-resolvers/center-summary.resolver.ts b/src/app/centers/common-resolvers/center-summary.resolver.ts index b4f0945e7d..55c4c21d4a 100644 --- a/src/app/centers/common-resolvers/center-summary.resolver.ts +++ b/src/app/centers/common-resolvers/center-summary.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { CentersService } from '../centers.service'; */ @Injectable() export class CenterSummaryResolver { + private centersService = inject(CentersService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {CentersService} CentersService Centers service. */ - constructor(private centersService: CentersService) {} + constructor() {} /** * Returns the Centers Summary Data. diff --git a/src/app/centers/common-resolvers/center-view.resolver.ts b/src/app/centers/common-resolvers/center-view.resolver.ts index 07a355aaa9..1522f38dd1 100644 --- a/src/app/centers/common-resolvers/center-view.resolver.ts +++ b/src/app/centers/common-resolvers/center-view.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { CentersService } from '../centers.service'; */ @Injectable() export class CenterViewResolver { + private centersService = inject(CentersService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {CentersService} CentersService Centers service. */ - constructor(private centersService: CentersService) {} + constructor() {} /** * Returns the Centers data. diff --git a/src/app/centers/common-resolvers/savings-account.resolver.ts b/src/app/centers/common-resolvers/savings-account.resolver.ts index b1093e6cf9..9cf28175a1 100644 --- a/src/app/centers/common-resolvers/savings-account.resolver.ts +++ b/src/app/centers/common-resolvers/savings-account.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { CentersService } from '../centers.service'; */ @Injectable() export class SavingsAccountResolver { + private centersService = inject(CentersService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {CentersService} CentersService Centers service. */ - constructor(private centersService: CentersService) {} + constructor() {} /** * Returns the Center Savings Account data. diff --git a/src/app/centers/create-center/create-center.component.html b/src/app/centers/create-center/create-center.component.html index 02d0f8062b..9da5dbb872 100644 --- a/src/app/centers/create-center/create-center.component.html +++ b/src/app/centers/create-center/create-center.component.html @@ -6,35 +6,45 @@ {{ 'labels.inputs.name' | translate }} - - {{ 'labels.inputs.Center Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Center Name' | translate }} {{ 'labels.inputs.cannot' | translate }} - {{ 'labels.inputs.begin with a special character or number' | translate }} - + @if (centerForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Center Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (centerForm.controls.name.hasError('pattern')) { + + {{ 'labels.inputs.Center Name' | translate }} {{ 'labels.inputs.cannot' | translate }} + {{ 'labels.inputs.begin with a special character or number' | translate }} + + } {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (centerForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Staff' | translate }} - - {{ staff.displayName }} - + @for (staff of staffData; track staff) { + + {{ staff.displayName }} + + } @@ -42,23 +52,27 @@ {{ 'labels.inputs.Active' | translate }} - - {{ 'labels.inputs.Activation Date' | translate }} - - - - - {{ 'labels.inputs.Activation Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (this.centerForm.controls.active.value) { + + {{ 'labels.inputs.Activation Date' | translate }} + + + + @if (centerForm.controls.activationDate.hasError('required')) { + + {{ 'labels.inputs.Activation Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } {{ 'labels.inputs.External Id' | translate }} @@ -77,53 +91,63 @@ /> - - {{ 'labels.inputs.Submission Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (centerForm.controls.submittedOnDate.hasError('required')) { + + {{ 'labels.inputs.Submission Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Select and Add groups' | translate }} - - {{ group.name }} - + @for (group of groupsData; track group) { + + {{ group.name }} + + } - - - {{ 'labels.inputs.Group Details' | translate }} - - - - - - {{ 'labels.inputs.name' | translate }} - {{ groupChoice.value.name }} - - - {{ 'labels.inputs.Id' | translate }} - {{ groupChoice.value.id }} + @if (groupChoice.value) { + + + {{ 'labels.inputs.Group Details' | translate }} + + + + + + {{ 'labels.inputs.name' | translate }} + {{ groupChoice.value.name }} + + + {{ 'labels.inputs.Id' | translate }} + {{ groupChoice.value.id }} + + + {{ 'labels.inputs.Office' | translate }} + {{ groupChoice.value.officeName }} + - - {{ 'labels.inputs.Office' | translate }} - {{ groupChoice.value.officeName }} - - + } - - {{ 'labels.heading.Selected Groups' | translate }} - - - - - {{ group.name }} - - + @if (groupMembers.length) { + + {{ 'labels.heading.Selected Groups' | translate }} + @for (group of groupMembers; track group; let i = $index) { + + + + + {{ group.name }} + + } + + } diff --git a/src/app/centers/create-center/create-center.component.ts b/src/app/centers/create-center/create-center.component.ts index 7b672455b3..a84aabce17 100644 --- a/src/app/centers/create-center/create-center.component.ts +++ b/src/app/centers/create-center/create-center.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -39,6 +39,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateCenterComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private centerService = inject(CentersService); + private settingsService = inject(SettingsService); + private groupService = inject(GroupsService); + private dateUtils = inject(Dates); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -56,6 +64,9 @@ export class CreateCenterComponent implements OnInit { /** Group Choice. */ groupChoice = new UntypedFormControl(''); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -66,15 +77,7 @@ export class CreateCenterComponent implements OnInit { * @param {GroupsService} groupService GroupsService. * @param {Dates} dateUtils Date Utils to format date. */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private centerService: CentersService, - private settingsService: SettingsService, - private groupService: GroupsService, - private dateUtils: Dates - ) { + constructor() { this.route.data.subscribe((data: { offices: any }) => { this.officeData = data.offices; }); diff --git a/src/app/centers/edit-center/edit-center.component.html b/src/app/centers/edit-center/edit-center.component.html index bada6043d1..5dc0a2a2b3 100644 --- a/src/app/centers/edit-center/edit-center.component.html +++ b/src/app/centers/edit-center/edit-center.component.html @@ -6,22 +6,28 @@ {{ 'labels.inputs.name' | translate }} - - {{ 'labels.inputs.Center Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Center Name' | translate }} {{ 'labels.inputs.cannot' | translate }} - {{ 'labels.inputs.begin with a special character or number' | translate }} - + @if (editCenterForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Center Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (editCenterForm.controls.name.hasError('pattern')) { + + {{ 'labels.inputs.Center Name' | translate }} {{ 'labels.inputs.cannot' | translate }} + {{ 'labels.inputs.begin with a special character or number' | translate }} + + } {{ 'labels.inputs.Staff' | translate }} - - {{ staff.displayName }} - + @for (staff of staffs; track staff) { + + {{ staff.displayName }} + + } @@ -30,25 +36,29 @@ - - - {{ 'labels.inputs.Activation Date' | translate }} - - - - - {{ 'labels.inputs.Activation Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - + @if (centerData.status.value === 'Pending') { + + + {{ 'labels.inputs.Activation Date' | translate }} + + + + @if (editCenterForm.controls.activationDate.hasError('required')) { + + {{ 'labels.inputs.Activation Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + } diff --git a/src/app/centers/edit-center/edit-center.component.ts b/src/app/centers/edit-center/edit-center.component.ts index 2d188b7912..87ed50b31b 100644 --- a/src/app/centers/edit-center/edit-center.component.ts +++ b/src/app/centers/edit-center/edit-center.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -27,6 +27,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditCenterComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private centersService = inject(CentersService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + /** Center Data */ centerData: any; /** Staffs Data */ @@ -38,6 +45,9 @@ export class EditCenterComponent implements OnInit { /** Activate center form. */ editCenterForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the center and template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -47,14 +57,7 @@ export class EditCenterComponent implements OnInit { * @param {GroupsService} groupService GroupsService. * @param {Dates} dateUtils Date Utils to format date. */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private centersService: CentersService, - private settingsService: SettingsService, - private dateUtils: Dates - ) { + constructor() { this.route.data.subscribe((data: { centerData: any }) => { this.centerData = data.centerData; this.staffs = this.centerData.staffOptions; diff --git a/src/app/clients/client-stepper/client-address-step/client-address-step.component.html b/src/app/clients/client-stepper/client-address-step/client-address-step.component.html index 424362ccd4..e31a38366c 100644 --- a/src/app/clients/client-stepper/client-address-step/client-address-step.component.html +++ b/src/app/clients/client-stepper/client-address-step/client-address-step.component.html @@ -7,64 +7,70 @@ {{ 'labels.heading.Address' | translate }} - 0"> - - - - {{ getSelectedValue('addressTypeIdOptions', address.addressTypeId)?.name }} - - - - {{ address.relationship }} - - - - - - - - - - - - - - - - - {{ 'labels.inputs.Street' | translate }} : {{ address.street }} - {{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }} - {{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }} - {{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }} - {{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }} - {{ 'labels.inputs.City' | translate }} : {{ address.city }} - {{ 'labels.inputs.State / Province' | translate }} : - {{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }} - {{ 'labels.inputs.Country' | translate }} : {{ getSelectedValue('countryIdOptions', address.countryId)?.name - }} - {{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }} - {{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }} - - - + @if (clientAddressData.length > 0) { + + @for (address of clientAddressData; track address; let i = $index) { + + + + {{ getSelectedValue('addressTypeIdOptions', address.addressTypeId)?.name }} + + + {{ address.relationship }} + + + + + + + + + + + + + + @if (isFieldEnabled('street')) { + {{ 'labels.inputs.Street' | translate }} : {{ address.street }} + } + @if (isFieldEnabled('addressLine1')) { + {{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }} + } + @if (isFieldEnabled('addressLine2')) { + {{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }} + } + @if (isFieldEnabled('addressLine3')) { + {{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }} + } + @if (isFieldEnabled('townVillage')) { + {{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }} + } + @if (isFieldEnabled('city')) { + {{ 'labels.inputs.City' | translate }} : {{ address.city }} + } + @if (isFieldEnabled('stateProvinceId')) { + {{ 'labels.inputs.State / Province' | translate }} : + {{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }} + } + @if (isFieldEnabled('countryId')) { + {{ 'labels.inputs.Country' | translate }} : + {{ getSelectedValue('countryIdOptions', address.countryId)?.name }} + } + @if (isFieldEnabled('postalCode')) { + {{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }} + } + @if (isFieldEnabled('isActive')) { + {{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }} + } + + + } + + } diff --git a/src/app/clients/client-stepper/client-address-step/client-address-step.component.ts b/src/app/clients/client-stepper/client-address-step/client-address-step.component.ts index 0b0109e2fa..bdfab8977b 100644 --- a/src/app/clients/client-stepper/client-address-step/client-address-step.component.ts +++ b/src/app/clients/client-stepper/client-address-step/client-address-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Input } from '@angular/core'; +import { Component, Input, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; /** Custom Models */ @@ -46,6 +46,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ClientAddressStepComponent { + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** Client Address Field Config */ @Input() clientAddressFieldConfig: any; /** Client Template */ @@ -54,14 +57,14 @@ export class ClientAddressStepComponent { /** Client Address Data */ clientAddressData: any[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialog} dialog Mat Dialog * @param {TranslateService} translateService Translate Service. */ - constructor( - private dialog: MatDialog, - private translateService: TranslateService - ) { + constructor() { this.clientAddressData = []; } diff --git a/src/app/clients/client-stepper/client-datatable-step/client-datatable-step.component.html b/src/app/clients/client-stepper/client-datatable-step/client-datatable-step.component.html index 56a31c0681..6a2bd6c5f3 100644 --- a/src/app/clients/client-stepper/client-datatable-step/client-datatable-step.component.html +++ b/src/app/clients/client-stepper/client-datatable-step/client-datatable-step.component.html @@ -1,58 +1,49 @@ - - - {{ getInputName(datatableInput) }} - - - - {{ code.value }} - - - - - - - - - - - - - - - - - - {{ getInputName(datatableInput) }} - - + @for (datatableInput of datatableInputs; track datatableInput) { + + @if (!isBoolean(datatableInput.columnDisplayType)) { + + {{ getInputName(datatableInput) }} + @if (isDropdown(datatableInput.columnDisplayType)) { + + @for (code of datatableInput.columnValues; track code) { + + {{ code.value }} + + } + + } + @if (isNumeric(datatableInput.columnDisplayType)) { + + } + @if (isString(datatableInput.columnDisplayType)) { + + } + @if (isText(datatableInput.columnDisplayType)) { + + } + @if (isDate(datatableInput.columnDisplayType)) { + + + + + + } + + } + @if (isBoolean(datatableInput.columnDisplayType)) { + + {{ getInputName(datatableInput) }} + + } + + } diff --git a/src/app/clients/client-stepper/client-datatable-step/client-datatable-step.component.ts b/src/app/clients/client-stepper/client-datatable-step/client-datatable-step.component.ts index c1da84cfcf..36c8da58c0 100644 --- a/src/app/clients/client-stepper/client-datatable-step/client-datatable-step.component.ts +++ b/src/app/clients/client-stepper/client-datatable-step/client-datatable-step.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormControl, @@ -26,6 +26,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ClientDatatableStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private settingsService = inject(SettingsService); + private datatableService = inject(Datatables); + /** Input Fields Data */ @Input() datatableData: any; /** Create Input Form */ @@ -33,11 +37,10 @@ export class ClientDatatableStepComponent implements OnInit { datatableInputs: any = []; - constructor( - private formBuilder: UntypedFormBuilder, - private settingsService: SettingsService, - private datatableService: Datatables - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.datatableInputs = this.datatableService.filterSystemColumns(this.datatableData.columnHeaderData); diff --git a/src/app/clients/client-stepper/client-family-members-step/client-family-member-dialog/client-family-member-dialog.component.html b/src/app/clients/client-stepper/client-family-members-step/client-family-member-dialog/client-family-member-dialog.component.html index e93c0600d0..ef709311fd 100644 --- a/src/app/clients/client-stepper/client-family-members-step/client-family-member-dialog/client-family-member-dialog.component.html +++ b/src/app/clients/client-stepper/client-family-members-step/client-family-member-dialog/client-family-member-dialog.component.html @@ -5,10 +5,12 @@ {{ data.context }} {{ 'labels.heading.Family Member' | tran {{ 'labels.inputs.First Name' | translate }} - - {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (familyMemberForm.controls.firstName.hasError('required')) { + + {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -19,10 +21,12 @@ {{ data.context }} {{ 'labels.heading.Family Member' | tran {{ 'labels.inputs.Last Name' | translate }} - - {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (familyMemberForm.controls.lastName.hasError('required')) { + + {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -42,44 +46,56 @@ {{ data.context }} {{ 'labels.heading.Family Member' | tran {{ 'labels.inputs.Relationship' | translate }} - - {{ relation.name | translateKey: 'catalogs' }} - + @for (relation of data.options.relationshipIdOptions; track relation) { + + {{ relation.name | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Relationship' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (familyMemberForm.controls.relationshipId.hasError('required')) { + + {{ 'labels.inputs.Relationship' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Gender' | translate }} - - {{ gender.name | translateKey: 'catalogs' }} - + @for (gender of data.options.genderIdOptions; track gender) { + + {{ gender.name | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Gender' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (familyMemberForm.controls.genderId.hasError('required')) { + + {{ 'labels.inputs.Gender' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Profession' | translate }} - - {{ profession.name | translateKey: 'catalogs' }} - + @for (profession of data.options.professionIdOptions; track profession) { + + {{ profession.name | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Marital Status' | translate }} - - {{ maritalStatus.name | translateKey: 'catalogs' }} - + @for (maritalStatus of data.options.maritalStatusIdOptions; track maritalStatus) { + + {{ maritalStatus.name | translateKey: 'catalogs' }} + + } diff --git a/src/app/clients/client-stepper/client-family-members-step/client-family-member-dialog/client-family-member-dialog.component.ts b/src/app/clients/client-stepper/client-family-members-step/client-family-member-dialog/client-family-member-dialog.component.ts index d5fb76f579..d3a3266673 100644 --- a/src/app/clients/client-stepper/client-family-members-step/client-family-member-dialog/client-family-member-dialog.component.ts +++ b/src/app/clients/client-stepper/client-family-members-step/client-family-member-dialog/client-family-member-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -31,12 +31,21 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ClientFamilyMemberDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + private formBuilder = inject(UntypedFormBuilder); + private dateUtils = inject(Dates); + data = inject(MAT_DIALOG_DATA); + private settingsService = inject(SettingsService); + /** Maximum Due Date allowed. */ maxDate = new Date(); /** Add/Edit family member form. */ familyMemberForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Client Family Member Dialog Reference * @param {FormBuilder} formBuilder Form Builder @@ -44,13 +53,7 @@ export class ClientFamilyMemberDialogComponent implements OnInit { * @param {any} data Dialog Data * @param {SettingsService} settingsService Setting service */ - constructor( - public dialogRef: MatDialogRef, - private formBuilder: UntypedFormBuilder, - private dateUtils: Dates, - @Inject(MAT_DIALOG_DATA) public data: any, - private settingsService: SettingsService - ) {} + constructor() {} ngOnInit() { this.maxDate = this.settingsService.businessDate; diff --git a/src/app/clients/client-stepper/client-family-members-step/client-family-members-step.component.html b/src/app/clients/client-stepper/client-family-members-step/client-family-members-step.component.html index 26bb7f8e55..e75d7fb3ec 100644 --- a/src/app/clients/client-stepper/client-family-members-step/client-family-members-step.component.html +++ b/src/app/clients/client-stepper/client-family-members-step/client-family-members-step.component.html @@ -8,48 +8,46 @@ {{ 'labels.heading.Family Members' | translate }} - - - - {{ member.firstName }} {{ member.middleName ? member.middleName + ' ' + member.lastName : member.lastName }} - - - - {{ member.relationship }} - - - - - - - - - - - - - - - - {{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }} - {{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }} - {{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }} - {{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }} - {{ 'labels.inputs.Relationship' | translate }} : - {{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name' - }} - {{ 'labels.inputs.Age' | translate }} : {{ member.age }} - {{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent ? 'Yes' : 'No' }} - {{ 'labels.inputs.Marital Status' | translate }} : - {{ member.maritalStatusId | find: clientTemplate.familyMemberOptions.maritalStatusIdOptions : 'id' : 'name' - }} - {{ 'labels.inputs.Gender' | translate }} : - {{ member.genderId | find: clientTemplate.familyMemberOptions.genderIdOptions : 'id' : 'name' }} - {{ 'labels.inputs.Profession' | translate }} : - {{ member.professionId | find: clientTemplate.familyMemberOptions.professionIdOptions : 'id' : 'name' }} - {{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }} - - + @for (member of clientFamilyMembers; track member; let i = $index) { + + + + {{ member.firstName }} {{ member.middleName ? member.middleName + ' ' + member.lastName : member.lastName }} + + + {{ member.relationship }} + + + + + + + + + + + + + {{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }} + {{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }} + {{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }} + {{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }} + {{ 'labels.inputs.Relationship' | translate }} : + {{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name' + }} + {{ 'labels.inputs.Age' | translate }} : {{ member.age }} + {{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent ? 'Yes' : 'No' }} + {{ 'labels.inputs.Marital Status' | translate }} : + {{ member.maritalStatusId | find: clientTemplate.familyMemberOptions.maritalStatusIdOptions : 'id' : 'name' + }} + {{ 'labels.inputs.Gender' | translate }} : + {{ member.genderId | find: clientTemplate.familyMemberOptions.genderIdOptions : 'id' : 'name' }} + {{ 'labels.inputs.Profession' | translate }} : + {{ member.professionId | find: clientTemplate.familyMemberOptions.professionIdOptions : 'id' : 'name' }} + {{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }} + + + } diff --git a/src/app/clients/client-stepper/client-family-members-step/client-family-members-step.component.ts b/src/app/clients/client-stepper/client-family-members-step/client-family-members-step.component.ts index e56bb090f1..0b18303f04 100644 --- a/src/app/clients/client-stepper/client-family-members-step/client-family-members-step.component.ts +++ b/src/app/clients/client-stepper/client-family-members-step/client-family-members-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Input } from '@angular/core'; +import { Component, Input, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; /** Custom Components */ @@ -43,19 +43,22 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ClientFamilyMembersStepComponent { + dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** Cient Template */ @Input() clientTemplate: any; /** Client Family Members */ clientFamilyMembers: any[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialog} dialog Mat Dialog * @param {TranslateService} translateService Translate Service. */ - constructor( - public dialog: MatDialog, - private translateService: TranslateService - ) {} + constructor() {} /** * Adds a family member. diff --git a/src/app/clients/client-stepper/client-general-step/client-general-step.component.html b/src/app/clients/client-stepper/client-general-step/client-general-step.component.html index 2f8145421c..3f08b804e8 100644 --- a/src/app/clients/client-stepper/client-general-step/client-general-step.component.html +++ b/src/app/clients/client-stepper/client-general-step/client-general-step.component.html @@ -3,22 +3,28 @@ {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeOptions; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createClientForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Legal Form' | translate }} - - {{ legalForm.value | translateKey: 'inputs' }} - + @for (legalForm of legalFormOptions; track legalForm) { + + {{ legalForm.value | translateKey: 'inputs' }} + + } @@ -27,64 +33,86 @@ - - - {{ 'labels.inputs.' + getDateLabel(createClientForm.value.legalFormId, ['Name', 'Entity Name']) | translate }} - - - - {{ 'labels.inputs.Client name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Client name' | translate }} {{ 'labels.inputs.cannot' | translate }} - {{ 'labels.commons.begin with a special character or number' | translate }} - - - - - - {{ 'labels.inputs.First Name' | translate }} - - - {{ 'labels.inputs.Client first name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Client first name' | translate }} {{ 'labels.inputs.cannot' | translate }} - {{ 'labels.commons.begin with a special character or number' | translate }} - - - - - {{ 'labels.inputs.Middle Name' | translate }} - - - {{ 'labels.inputs.Client middle name' | translate }} {{ 'labels.inputs.cannot' | translate }} - {{ 'labels.commons.begin with a special character or number' | translate }} - + @if (createClientForm.contains('fullname')) { + + + {{ 'labels.inputs.' + getDateLabel(createClientForm.value.legalFormId, ['Name', 'Entity Name']) | translate }} + + + @if (createClientForm.controls.fullname.hasError('required')) { + + {{ 'labels.inputs.Client name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (createClientForm.controls.fullname.hasError('pattern')) { + + {{ 'labels.inputs.Client name' | translate }} {{ 'labels.inputs.cannot' | translate }} + {{ 'labels.commons.begin with a special character or number' | translate }} + + } + } - - {{ 'labels.inputs.Last Name' | translate }} - - - {{ 'labels.inputs.Client last name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Client last name' | translate }} {{ 'labels.inputs.cannot' | translate }} - {{ 'labels.commons.begin with a special character or number' | translate }} - - - + @if ( + createClientForm.contains('firstname') || + createClientForm.contains('middlename') || + createClientForm.contains('lastname') + ) { + + @if (createClientForm.contains('firstname')) { + + {{ 'labels.inputs.First Name' | translate }} + + @if (createClientForm.controls.firstname.hasError('required')) { + + {{ 'labels.inputs.Client first name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (createClientForm.controls.firstname.hasError('pattern')) { + + {{ 'labels.inputs.Client first name' | translate }} + {{ 'labels.inputs.cannot' | translate }} + {{ 'labels.commons.begin with a special character or number' | translate }} + + } + + } + @if (createClientForm.contains('middlename')) { + + {{ 'labels.inputs.Middle Name' | translate }} + + @if (createClientForm.controls.middlename.hasError('pattern')) { + + {{ 'labels.inputs.Client middle name' | translate }} + {{ 'labels.inputs.cannot' | translate }} + {{ 'labels.commons.begin with a special character or number' | translate }} + + } + + } + @if (createClientForm.contains('lastname')) { + + {{ 'labels.inputs.Last Name' | translate }} + + @if (createClientForm.controls.lastname.hasError('required')) { + + {{ 'labels.inputs.Client last name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (createClientForm.controls.lastname.hasError('pattern')) { + + {{ 'labels.inputs.Client last name' | translate }} + {{ 'labels.inputs.cannot' | translate }} + {{ 'labels.commons.begin with a special character or number' | translate }} + + } + + } + + } @@ -100,79 +128,80 @@ - - - {{ 'labels.inputs.Constitution' | translate }} - - - {{ constitution.name }} - - - + @if (createClientForm.get('clientNonPersonDetails')) { + + + {{ 'labels.inputs.Constitution' | translate }} + + @for (constitution of constitutionOptions; track constitution) { + + {{ constitution.name }} + + } + + + + {{ 'labels.inputs.Main Business Line' | translate }} + + @for (business of businessLineOptions; track business) { + + {{ business.name }} + + } + + + + {{ 'labels.inputs.Incorporation Validity Till Date' | translate }} + + + + + + {{ 'labels.inputs.Incorporation Number' | translate }} + + + + {{ 'labels.inputs.Remarks' | translate }} + + + + } + @if (createClientForm.value.legalFormId === 1) { - {{ 'labels.inputs.Main Business Line' | translate }} - - - {{ business.name }} - + {{ 'labels.inputs.Gender' | translate }} + + @for (gender of genderOptions; track gender) { + + {{ gender.name }} + + } - - - {{ 'labels.inputs.Incorporation Validity Till Date' | translate }} - - - - - - - {{ 'labels.inputs.Incorporation Number' | translate }} - - - - - {{ 'labels.inputs.Remarks' | translate }} - - - - - - {{ 'labels.inputs.Gender' | translate }} - - - {{ gender.name }} - - - + } {{ 'labels.inputs.Staff' | translate }} - - {{ staff.displayName }} - + @for (staff of staffOptions; track staff) { + + {{ staff.displayName }} + + } - - {{ 'labels.inputs.Is staff' | translate }}? - + @if (createClientForm.value.legalFormId === 1) { + + {{ 'labels.inputs.Is staff' | translate }}? + + } @@ -184,29 +213,32 @@ {{ 'labels.inputs.Email Address' | translate }} - - {{ 'error.Email not valid' | translate }} - + @if (createClientForm.controls.emailAddress.errors?.email) { + + {{ 'error.Email not valid' | translate }} + + } {{ 'labels.inputs.Client Type' | translate }} - - {{ clientType.name }} - + @for (clientType of clientTypeOptions; track clientType) { + + {{ clientType.name }} + + } {{ 'labels.inputs.Client Classification' | translate }} - - {{ clientClassification.name }} - + @for (clientClassification of clientClassificationTypeOptions; track clientClassification) { + + {{ clientClassification.name }} + + } @@ -230,44 +262,50 @@ {{ 'labels.inputs.Active' | translate }}? - - {{ 'labels.inputs.Activation Date' | translate }} - - - - - {{ 'labels.inputs.Activation Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (createClientForm.contains('activationDate')) { + + {{ 'labels.inputs.Activation Date' | translate }} + + + + @if (createClientForm.controls.activationDate.hasError('required')) { + + {{ 'labels.inputs.Activation Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } {{ 'labels.inputs.Open Savings Account' | translate }}? - - {{ 'labels.inputs.Savings Product' | translate }} - - - {{ product.name }} - - - - {{ 'labels.inputs.Savings Product' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (createClientForm.contains('savingsProductId')) { + + {{ 'labels.inputs.Savings Product' | translate }} + + @for (product of savingProductOptions; track product) { + + {{ product.name }} + + } + + @if (createClientForm.controls.savingsProductId.hasError('required')) { + + {{ 'labels.inputs.Savings Product' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } diff --git a/src/app/clients/client-stepper/client-general-step/client-general-step.component.ts b/src/app/clients/client-stepper/client-general-step/client-general-step.component.ts index d90db066ce..a7e6448232 100644 --- a/src/app/clients/client-stepper/client-general-step/client-general-step.component.ts +++ b/src/app/clients/client-stepper/client-general-step/client-general-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; +import { Component, OnInit, Input, Output, EventEmitter, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, @@ -37,6 +37,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ClientGeneralStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + private clientService = inject(ClientsService); + @Output() legalFormChangeEvent = new EventEmitter<{ legalForm: number }>(); /** Minimum date allowed. */ @@ -68,18 +73,16 @@ export class ClientGeneralStepComponent implements OnInit { /** Saving Product Options */ savingProductOptions: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {Dates} dateUtils Date Utils * @param {SettingsService} settingsService Setting service * @param {ClientsService} clientService Client service */ - constructor( - private formBuilder: UntypedFormBuilder, - private dateUtils: Dates, - private settingsService: SettingsService, - private clientService: ClientsService - ) { + constructor() { this.setClientForm(); } diff --git a/src/app/clients/client-stepper/client-preview-step/client-preview-step.component.html b/src/app/clients/client-stepper/client-preview-step/client-preview-step.component.html index 00b1b410be..207522e804 100644 --- a/src/app/clients/client-stepper/client-preview-step/client-preview-step.component.html +++ b/src/app/clients/client-stepper/client-preview-step/client-preview-step.component.html @@ -5,11 +5,15 @@ {{ 'labels.heading.General' | translate }} {{ 'labels.inputs.name' | translate }} - {{ client.fullname }} - {{ client.firstname }} - {{ client.middlename ? client.middlename + ' ' + client.lastname : client.lastname }} + @if (client.legalFormId === 2) { + {{ client.fullname }} + } + @if (client.legalFormId === 1) { + {{ client.firstname }} + {{ client.middlename ? client.middlename + ' ' + client.lastname : client.lastname }} + } @@ -22,209 +26,239 @@ {{ 'labels.heading.General' | translate }} {{ client.legalFormId | find: clientTemplate.clientLegalFormOptions : 'id' : 'value' }} - - {{ 'labels.inputs.Staff' | translate }} - {{ client.staffId | find: clientTemplate.staffOptions : 'id' : 'displayName' }} - + @if (client.staffId) { + + {{ 'labels.inputs.Staff' | translate }} + {{ client.staffId | find: clientTemplate.staffOptions : 'id' : 'displayName' }} + + } - - {{ client.legalFormId === 1 ? 'Date of Birth' : 'Incorporation Date' }} - {{ client.dateOfBirth | dateFormat }} - + @if (client.dateOfBirth) { + + {{ client.legalFormId === 1 ? 'Date of Birth' : 'Incorporation Date' }} + {{ client.dateOfBirth | dateFormat }} + + } - - {{ 'labels.inputs.External Id' | translate }} - - - - + @if (client.externalId) { + + {{ 'labels.inputs.External Id' | translate }} + + + + + } - - {{ 'labels.inputs.Mobile No' | translate }} - {{ client.mobileNo }} - + @if (client.mobileNo) { + + {{ 'labels.inputs.Mobile No' | translate }} + {{ client.mobileNo }} + + } - - {{ 'labels.inputs.Email Address' | translate }} - {{ client.emailAddress }} - + @if (client.emailAddress) { + + {{ 'labels.inputs.Email Address' | translate }} + {{ client.emailAddress }} + + } - - {{ 'labels.inputs.Client Type' | translate }} - {{ client.clientTypeId | find: clientTemplate.clientTypeOptions : 'id' : 'name' }} - + @if (client.clientTypeId) { + + {{ 'labels.inputs.Client Type' | translate }} + {{ client.clientTypeId | find: clientTemplate.clientTypeOptions : 'id' : 'name' }} + + } - - {{ 'labels.inputs.Client Classification' | translate }} - {{ - client.clientClassificationId | find: clientTemplate.clientClassificationOptions : 'id' : 'name' - }} - + @if (client.clientClassificationId) { + + {{ 'labels.inputs.Client Classification' | translate }} + {{ + client.clientClassificationId | find: clientTemplate.clientClassificationOptions : 'id' : 'name' + }} + + } - - {{ 'labels.inputs.Savings Product' | translate }} - {{ - client.savingsProductId | find: clientTemplate.savingProductOptions : 'id' : 'name' - }} - + @if (client.savingsProductId) { + + {{ 'labels.inputs.Savings Product' | translate }} + {{ + client.savingsProductId | find: clientTemplate.savingProductOptions : 'id' : 'name' + }} + + } - - {{ 'labels.inputs.Submitted On Date' | translate }} - {{ client.submittedOnDate | dateFormat }} - + @if (client.submittedOnDate) { + + {{ 'labels.inputs.Submitted On Date' | translate }} + {{ client.submittedOnDate | dateFormat }} + + } {{ 'labels.inputs.Active' | translate }}? {{ client.active | yesNo }} - - {{ 'labels.inputs.Activation Date' | translate }} - {{ client.activationDate | dateFormat }} - - - - - {{ 'labels.inputs.Gender' | translate }} - {{ client.genderId | find: clientTemplate.genderOptions : 'id' : 'name' }} + @if (client.activationDate) { + + {{ 'labels.inputs.Activation Date' | translate }} + {{ client.activationDate | dateFormat }} - + } + + @if (client.legalFormId === 1) { + @if (client.genderId) { + + {{ 'labels.inputs.Gender' | translate }} + {{ client.genderId | find: clientTemplate.genderOptions : 'id' : 'name' }} + + } {{ 'labels.inputs.Is staff' | translate }}? {{ client.isStaff | yesNo }} - - - - - {{ 'labels.inputs.Incorporation Validity Till Date' | translate }} - {{ client.clientNonPersonDetails.incorpValidityTillDate | dateFormat }} - - + } + + @if (client.legalFormId === 2) { + @if (client.clientNonPersonDetails.incorpValidityTillDate) { + + {{ 'labels.inputs.Incorporation Validity Till Date' | translate }} + {{ client.clientNonPersonDetails.incorpValidityTillDate | dateFormat }} + + } {{ 'labels.inputs.Incorportation Number' | translate }} {{ client.clientNonPersonDetails.incorpNumber || 'Not Provided' }} - - - {{ 'labels.inputs.Main Business Line' | translate }} - {{ - client.clientNonPersonDetails.mainBusinessLineId - | find: clientTemplate.clientNonPersonMainBusinessLineOptions : 'id' : 'name' - }} - - - - {{ 'labels.inputs.Constitution' | translate }} - {{ - client.clientNonPersonDetails.constitutionId - | find: clientTemplate.clientNonPersonConstitutionOptions : 'id' : 'name' - }} - - + @if (client.clientNonPersonDetails.mainBusinessLineId) { + + {{ 'labels.inputs.Main Business Line' | translate }} + {{ + client.clientNonPersonDetails.mainBusinessLineId + | find: clientTemplate.clientNonPersonMainBusinessLineOptions : 'id' : 'name' + }} + + } + @if (client.clientNonPersonDetails.constitutionId) { + + {{ 'labels.inputs.Constitution' | translate }} + {{ + client.clientNonPersonDetails.constitutionId + | find: clientTemplate.clientNonPersonConstitutionOptions : 'id' : 'name' + }} + + } {{ 'labels.inputs.Remarks' | translate }} {{ client.clientNonPersonDetails.remarks || 'N/A' }} - - - - {{ 'labels.heading.Family Members' | translate }} - - - - - - - {{ member.firstName }} {{ member.middleName ? member.middleName + ' ' + member.lastName : member.lastName }} - - - - {{ member.relationship }} - - - - - - - {{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }} - {{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }} - {{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }} - {{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }} - {{ 'labels.inputs.Relationship' | translate }} : - {{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name' - }} - {{ 'labels.inputs.Age' | translate }} : {{ member.age }} - {{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent ? 'Yes' : 'No' }} - {{ 'labels.inputs.Marital Status' | translate }} : - {{ member.maritalStatusId | find: clientTemplate.familyMemberOptions.maritalStatusIdOptions : 'id' : 'name' - }} - {{ 'labels.inputs.Gender' | translate }} : - {{ member.genderId | find: clientTemplate.familyMemberOptions.genderIdOptions : 'id' : 'name' }} - {{ 'labels.inputs.Profession' | translate }} : - {{ member.professionId | find: clientTemplate.familyMemberOptions.professionIdOptions : 'id' : 'name' }} - {{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }} - - - - - - - {{ 'labels.heading.Address' | translate }} - - - - - - - {{ getSelectedValue('addressTypeIdOptions', address.addressTypeId)?.name }} - - - - {{ address.relationship }} - - - - - - - {{ 'labels.inputs.Street' | translate }} : {{ address.street }} - {{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }} - {{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }} - {{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }} - {{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }} - {{ 'labels.inputs.City' | translate }} : {{ address.city }} - {{ 'labels.inputs.State / Province' | translate }} : - {{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }} - {{ 'labels.inputs.Country' | translate }} : - {{ getSelectedValue('countryIdOptions', address.countryId)?.name }} - {{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }} - {{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }} - - - - + } + + @if (client.familyMembers.length) { + + {{ 'labels.heading.Family Members' | translate }} + + + @for (member of client.familyMembers; track member) { + + + + {{ member.firstName }} + {{ member.middleName ? member.middleName + ' ' + member.lastName : member.lastName }} + + + {{ member.relationship }} + + + + + {{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }} + {{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }} + {{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }} + {{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }} + {{ 'labels.inputs.Relationship' | translate }} : + {{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name' + }} + {{ 'labels.inputs.Age' | translate }} : {{ member.age }} + {{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent ? 'Yes' : 'No' }} + {{ 'labels.inputs.Marital Status' | translate }} : + {{ + member.maritalStatusId + | find: clientTemplate.familyMemberOptions.maritalStatusIdOptions : 'id' : 'name' + }} + {{ 'labels.inputs.Gender' | translate }} : + {{ member.genderId | find: clientTemplate.familyMemberOptions.genderIdOptions : 'id' : 'name' }} + {{ 'labels.inputs.Profession' | translate }} : + {{ member.professionId | find: clientTemplate.familyMemberOptions.professionIdOptions : 'id' : 'name' + }} + {{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }} + + + } + + + } + + @if (clientTemplate.isAddressEnabled && client.address && client.address.length) { + + {{ 'labels.heading.Address' | translate }} + + + @for (address of client.address; track address) { + + + + {{ getSelectedValue('addressTypeIdOptions', address.addressTypeId)?.name }} + + + {{ address.relationship }} + + + + + @if (isFieldEnabled('street')) { + {{ 'labels.inputs.Street' | translate }} : {{ address.street }} + } + @if (isFieldEnabled('addressLine1')) { + {{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }} + } + @if (isFieldEnabled('addressLine2')) { + {{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }} + } + @if (isFieldEnabled('addressLine3')) { + {{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }} + } + @if (isFieldEnabled('townVillage')) { + {{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }} + } + @if (isFieldEnabled('city')) { + {{ 'labels.inputs.City' | translate }} : {{ address.city }} + } + @if (isFieldEnabled('stateProvinceId')) { + {{ 'labels.inputs.State / Province' | translate }} : + {{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }} + } + @if (isFieldEnabled('countryId')) { + {{ 'labels.inputs.Country' | translate }} : + {{ getSelectedValue('countryIdOptions', address.countryId)?.name }} + } + @if (isFieldEnabled('postalCode')) { + {{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }} + } + @if (isFieldEnabled('isActive')) { + {{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }} + } + + + } + + + } diff --git a/src/app/clients/clients-view/address-tab/address-tab.component.html b/src/app/clients/clients-view/address-tab/address-tab.component.html index 288a2cce32..98ae04fe19 100644 --- a/src/app/clients/clients-view/address-tab/address-tab.component.html +++ b/src/app/clients/clients-view/address-tab/address-tab.component.html @@ -8,57 +8,62 @@ {{ 'labels.heading.Address' | translate }} - - - - {{ address.addressType }} - - - {{ address.relationship }} - - - - - - - - - - - - - - {{ 'labels.inputs.Street' | translate }} : {{ address.street }} - {{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }} - {{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }} - {{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }} - {{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }} - {{ 'labels.inputs.City' | translate }} : {{ address.city }} - {{ 'labels.inputs.State / Province' | translate }} : - {{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }} - {{ 'labels.inputs.Country' | translate }} : {{ getSelectedValue('countryIdOptions', address.countryId)?.name - }} - {{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }} - {{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }} - - + @for (address of clientAddressData; track address; let i = $index) { + + + + {{ address.addressType }} + + + {{ address.relationship }} + + + + + + + + + + + @if (isFieldEnabled('street')) { + {{ 'labels.inputs.Street' | translate }} : {{ address.street }} + } + @if (isFieldEnabled('addressLine1')) { + {{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }} + } + @if (isFieldEnabled('addressLine2')) { + {{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }} + } + @if (isFieldEnabled('addressLine3')) { + {{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }} + } + @if (isFieldEnabled('townVillage')) { + {{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }} + } + @if (isFieldEnabled('city')) { + {{ 'labels.inputs.City' | translate }} : {{ address.city }} + } + @if (isFieldEnabled('stateProvinceId')) { + {{ 'labels.inputs.State / Province' | translate }} : + {{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }} + } + @if (isFieldEnabled('countryId')) { + {{ 'labels.inputs.Country' | translate }} : + {{ getSelectedValue('countryIdOptions', address.countryId)?.name }} + } + @if (isFieldEnabled('postalCode')) { + {{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }} + } + @if (isFieldEnabled('isActive')) { + {{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }} + } + + + } diff --git a/src/app/clients/clients-view/address-tab/address-tab.component.ts b/src/app/clients/clients-view/address-tab/address-tab.component.ts index e66338a2af..2c3b85cf25 100644 --- a/src/app/clients/clients-view/address-tab/address-tab.component.ts +++ b/src/app/clients/clients-view/address-tab/address-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute } from '@angular/router'; import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base'; @@ -44,6 +44,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AddressTabComponent { + private route = inject(ActivatedRoute); + private clientService = inject(ClientsService); + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** Client Address Data */ clientAddressData: any; /** Client Address Field Config */ @@ -53,18 +58,16 @@ export class AddressTabComponent { /** Client Id */ clientId: string; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route * @param {ClientsService} clientService Clients Service * @param {MatDialog} dialog Mat Dialog * @param {TranslateService} translateService Translate Service. */ - constructor( - private route: ActivatedRoute, - private clientService: ClientsService, - private dialog: MatDialog, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe( (data: { clientAddressData: any; clientAddressFieldConfig: any; clientAddressTemplateData: any }) => { this.clientAddressData = data.clientAddressData; diff --git a/src/app/clients/clients-view/charges/charges-overview/charge-overview.resolver.ts b/src/app/clients/clients-view/charges/charges-overview/charge-overview.resolver.ts index 0d9e24324c..202d1b437c 100644 --- a/src/app/clients/clients-view/charges/charges-overview/charge-overview.resolver.ts +++ b/src/app/clients/clients-view/charges/charges-overview/charge-overview.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../../../clients.service'; */ @Injectable() export class ClientChargeOverviewResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client Charge data. diff --git a/src/app/clients/clients-view/charges/charges-overview/charges-overview.component.ts b/src/app/clients/clients-view/charges/charges-overview/charges-overview.component.ts index cbc315f80b..80311d0357 100644 --- a/src/app/clients/clients-view/charges/charges-overview/charges-overview.component.ts +++ b/src/app/clients/clients-view/charges/charges-overview/charges-overview.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; import { @@ -47,6 +47,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ChargesOverviewComponent implements OnInit { + private route = inject(ActivatedRoute); + dialog = inject(MatDialog); + /** Columns to be displayed in charge overview table. */ displayedColumns: string[] = [ 'name', @@ -64,15 +67,15 @@ export class ChargesOverviewComponent implements OnInit { /** Paginator for charge overview table. */ @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the charge overview data from `resolve`. * @param {ActivatedRoute} route Activated Route. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private route: ActivatedRoute, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { clientChargesData: any }) => { this.chargeOverviewData = data.clientChargesData; }); diff --git a/src/app/clients/clients-view/charges/client-pay-charges/client-pay-charges.component.html b/src/app/clients/clients-view/charges/client-pay-charges/client-pay-charges.component.html index 53beb39b2c..863517db98 100644 --- a/src/app/clients/clients-view/charges/client-pay-charges/client-pay-charges.component.html +++ b/src/app/clients/clients-view/charges/client-pay-charges/client-pay-charges.component.html @@ -5,10 +5,12 @@ {{ 'labels.inputs.Amount' | translate }} - - {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (transactionForm.controls.amount.hasError('required')) { + + {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -22,10 +24,12 @@ /> - - {{ 'labels.inputs.Transaction date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (transactionForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/clients/clients-view/charges/client-pay-charges/client-pay-charges.component.ts b/src/app/clients/clients-view/charges/client-pay-charges/client-pay-charges.component.ts index 8589de642a..ac582dff8b 100644 --- a/src/app/clients/clients-view/charges/client-pay-charges/client-pay-charges.component.ts +++ b/src/app/clients/clients-view/charges/client-pay-charges/client-pay-charges.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ClientPayChargesComponent implements OnInit { + private clientsService = inject(ClientsService); + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + /** Transaction Form. */ transactionForm: any; /** Transaction Data. */ @@ -28,6 +35,9 @@ export class ClientPayChargesComponent implements OnInit { /** Minimum Date allowed. */ minDate = new Date(2000, 0, 1); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the charge data from `resolve`. * @param {ClientService} clientService Products Service. @@ -36,14 +46,7 @@ export class ClientPayChargesComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Setting service */ - constructor( - private clientsService: ClientsService, - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { transactionData: any }) => { this.transactionData = data.transactionData; }); diff --git a/src/app/clients/clients-view/charges/view-charge/view-charge.component.html b/src/app/clients/clients-view/charges/view-charge/view-charge.component.html index 46b36b4305..eb86949604 100644 --- a/src/app/clients/clients-view/charges/view-charge/view-charge.component.html +++ b/src/app/clients/clients-view/charges/view-charge/view-charge.component.html @@ -74,51 +74,48 @@ {{ 'labels.heading.Transactions' | translate }} - - - {{ 'labels.inputs.ID' | translate }} - {{ element.id }} - - - - {{ 'labels.inputs.Office Name' | translate }} - - {{ element.officeName }} - - - - - {{ 'labels.inputs.Type' | translate }} - - {{ element.type.value }} - - - - {{ 'labels.inputs.Transaction Date' | translate }} - - {{ element.date | dateFormat }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ element.amount | formatNumber }} - - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - + @if (chargeData.clientTransactionDatas) { + + + {{ 'labels.inputs.ID' | translate }} + {{ element.id }} + + + {{ 'labels.inputs.Office Name' | translate }} + + {{ element.officeName }} + + + + {{ 'labels.inputs.Type' | translate }} + + {{ element.type.value }} + + + + {{ 'labels.inputs.Transaction Date' | translate }} + + {{ element.date | dateFormat }} + + + + {{ 'labels.inputs.Amount' | translate }} + + {{ element.amount | formatNumber }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + } diff --git a/src/app/clients/clients-view/charges/view-charge/view-charge.component.ts b/src/app/clients/clients-view/charges/view-charge/view-charge.component.ts index 67313031b5..571652f544 100644 --- a/src/app/clients/clients-view/charges/view-charge/view-charge.component.ts +++ b/src/app/clients/clients-view/charges/view-charge/view-charge.component.ts @@ -1,10 +1,10 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { ClientsService } from 'app/clients/clients.service'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatCard, MatCardTitle, MatCardContent, MatCardActions } from '@angular/material/card'; -import { NgClass, NgIf } from '@angular/common'; +import { NgClass } from '@angular/common'; import { MatDivider } from '@angular/material/divider'; import { MatTable, @@ -52,6 +52,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewChargeComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private clientService = inject(ClientsService); + /** Charge Data. */ chargeData: any; /** Mat Table Column defs. */ @@ -64,16 +68,15 @@ export class ViewChargeComponent { 'actions' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the selected job data from `resolve`. * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private clientService: ClientsService - ) { + constructor() { this.route.data.subscribe((data: { clientChargeData: any }) => { this.chargeData = data.clientChargeData; }); diff --git a/src/app/clients/clients-view/client-actions/accept-client-transfer/accept-client-transfer.component.ts b/src/app/clients/clients-view/client-actions/accept-client-transfer/accept-client-transfer.component.ts index 366cf431fe..95a1c45bb0 100644 --- a/src/app/clients/clients-view/client-actions/accept-client-transfer/accept-client-transfer.component.ts +++ b/src/app/clients/clients-view/client-actions/accept-client-transfer/accept-client-transfer.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AcceptClientTransferComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private clientsService = inject(ClientsService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Accept Client Transfer form. */ acceptClientTransferForm: UntypedFormGroup; /** Client Id */ @@ -30,6 +37,9 @@ export class AcceptClientTransferComponent implements OnInit { /** Transfer Date */ transferDate: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {ClientsService} clientsService Clients Service @@ -38,14 +48,7 @@ export class AcceptClientTransferComponent implements OnInit { * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private clientsService: ClientsService, - private settingsService: SettingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { clientActionData: any }) => { this.transferDate = data.clientActionData; }); diff --git a/src/app/clients/clients-view/client-actions/activate-client/activate-client.component.html b/src/app/clients/clients-view/client-actions/activate-client/activate-client.component.html index 218cc32298..ab294299ad 100644 --- a/src/app/clients/clients-view/client-actions/activate-client/activate-client.component.html +++ b/src/app/clients/clients-view/client-actions/activate-client/activate-client.component.html @@ -14,10 +14,12 @@ /> - - {{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (activateClientForm.controls.activationDate.hasError('required')) { + + {{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/clients/clients-view/client-actions/activate-client/activate-client.component.ts b/src/app/clients/clients-view/client-actions/activate-client/activate-client.component.ts index eb7e6e8752..3bf02741f6 100644 --- a/src/app/clients/clients-view/client-actions/activate-client/activate-client.component.ts +++ b/src/app/clients/clients-view/client-actions/activate-client/activate-client.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ActivateClientComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private clientsService = inject(ClientsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -30,6 +37,9 @@ export class ActivateClientComponent implements OnInit { /** Client Id */ clientId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {clientsService} clientsService Cliens Service @@ -38,14 +48,7 @@ export class ActivateClientComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private clientsService: ClientsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.clientId = this.route.parent.snapshot.params['clientId']; } diff --git a/src/app/clients/clients-view/client-actions/add-client-charge/add-client-charge.component.html b/src/app/clients/clients-view/client-actions/add-client-charge/add-client-charge.component.html index 50e46999c9..571120ff2c 100644 --- a/src/app/clients/clients-view/client-actions/add-client-charge/add-client-charge.component.html +++ b/src/app/clients/clients-view/client-actions/add-client-charge/add-client-charge.component.html @@ -6,88 +6,102 @@ {{ 'labels.inputs.Charge' | translate }} - - {{ clientCharge.name + ' (' + clientCharge.currency.name + ')' }} - - - - {{ 'labels.inputs.Charge' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - {{ 'labels.inputs.Amount' | translate }} - - - {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Charge Calculation' | translate }} - - - {{ chargeCalculation.value }} - - - - - - {{ 'labels.inputs.Charge time type' | translate }} - - - {{ chargeTime.value }} + @for (clientCharge of clientChargeOptions; track clientCharge) { + + {{ clientCharge.name + ' (' + clientCharge.currency.name + ')' }} - - - - - {{ 'labels.inputs.Due for collection on' | translate }} - - - - - {{ 'labels.inputs.Due for collection on' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Due On' | translate }} - - - - - {{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }} + } + + @if (clientChargeForm.controls.chargeId.hasError('required')) { + + {{ 'labels.inputs.Charge' | translate }} {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} - + } + - - {{ 'labels.inputs.Repeats Every' | translate }} - - - + @if (chargeDetails) { + + + {{ 'labels.inputs.Amount' | translate }} + + @if (clientChargeForm.controls.amount.hasError('required')) { + + {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Charge Calculation' | translate }} + + @for (chargeCalculation of chargeDetails.chargeCalculationTypeOptions; track chargeCalculation) { + + {{ chargeCalculation.value }} + + } + + + + {{ 'labels.inputs.Charge time type' | translate }} + + @for (chargeTime of chargeDetails.chargeTimeTypeOptions; track chargeTime) { + + {{ chargeTime.value }} + + } + + + @if (clientChargeForm.contains('dueDate')) { + + {{ 'labels.inputs.Due for collection on' | translate }} + + + + @if (clientChargeForm.controls.dueDate.hasError('required')) { + + {{ 'labels.inputs.Due for collection on' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + @if (clientChargeForm.contains('feeOnMonthDay')) { + + {{ 'labels.inputs.Due On' | translate }} + + + + @if (clientChargeForm.controls.feeOnMonthDay.hasError('required')) { + + {{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + @if (clientChargeForm.contains('feeInterval')) { + + {{ 'labels.inputs.Repeats Every' | translate }} + + + } + + } diff --git a/src/app/clients/clients-view/client-actions/add-client-charge/add-client-charge.component.ts b/src/app/clients/clients-view/client-actions/add-client-charge/add-client-charge.component.ts index 94d8f29d8e..f31fded3b8 100644 --- a/src/app/clients/clients-view/client-actions/add-client-charge/add-client-charge.component.ts +++ b/src/app/clients/clients-view/client-actions/add-client-charge/add-client-charge.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -27,6 +27,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AddClientChargeComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private clientsService = inject(ClientsService); + private settingsService = inject(SettingsService); + /** Minimum Due Date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum Due Date allowed. */ @@ -40,6 +47,9 @@ export class AddClientChargeComponent implements OnInit { /** charge details */ chargeDetails: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves charge template data from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -49,14 +59,7 @@ export class AddClientChargeComponent implements OnInit { * @param {ClientsService} clientsService Clients Service * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private clientsService: ClientsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { clientActionData: any }) => { this.clientChargeOptions = data.clientActionData.chargeOptions; }); diff --git a/src/app/clients/clients-view/client-actions/add-client-collateral/add-client-collateral.component.html b/src/app/clients/clients-view/client-actions/add-client-collateral/add-client-collateral.component.html index 99551cf095..c9e1a87297 100644 --- a/src/app/clients/clients-view/client-actions/add-client-collateral/add-client-collateral.component.html +++ b/src/app/clients/clients-view/client-actions/add-client-collateral/add-client-collateral.component.html @@ -6,61 +6,62 @@ {{ 'labels.inputs.Collateral' | translate }} - - {{ clientCollateral.name }} - + @for (clientCollateral of clientCollateralOptions; track clientCollateral) { + + {{ clientCollateral.name }} + + } - - {{ 'labels.inputs.Collateral' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - {{ 'labels.inputs.name' | translate }} - - - - - {{ 'labels.inputs.Type/Quality' | translate }} - - - - - {{ 'labels.inputs.Unit Type' | translate }} - - - - - {{ 'labels.inputs.Base Price' | translate }} - - - - - {{ 'labels.inputs.Percentage To Base' | translate }} - - - - - {{ 'labels.inputs.Quantity' | translate }} - - - {{ 'labels.inputs.Quantity' | translate }} {{ 'labels.commons.is' | translate }} + @if (clientCollateralForm.controls.collateralId.hasError('required')) { + + {{ 'labels.inputs.Collateral' | translate }} {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} - - - - {{ 'labels.inputs.Total' | translate }} - - + } + - - {{ 'labels.inputs.Total Collateral Value' | translate }} - - - + @if (collateralDetails) { + + + {{ 'labels.inputs.name' | translate }} + + + + {{ 'labels.inputs.Type/Quality' | translate }} + + + + {{ 'labels.inputs.Unit Type' | translate }} + + + + {{ 'labels.inputs.Base Price' | translate }} + + + + {{ 'labels.inputs.Percentage To Base' | translate }} + + + + {{ 'labels.inputs.Quantity' | translate }} + + @if (clientCollateralForm.controls.quantity.hasError('required')) { + + {{ 'labels.inputs.Quantity' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Total' | translate }} + + + + {{ 'labels.inputs.Total Collateral Value' | translate }} + + + + } diff --git a/src/app/clients/clients-view/client-actions/add-client-collateral/add-client-collateral.component.ts b/src/app/clients/clients-view/client-actions/add-client-collateral/add-client-collateral.component.ts index c008b5e63b..bf75df845c 100644 --- a/src/app/clients/clients-view/client-actions/add-client-collateral/add-client-collateral.component.ts +++ b/src/app/clients/clients-view/client-actions/add-client-collateral/add-client-collateral.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -20,6 +20,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AddClientCollateralComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private productsService = inject(ProductsService); + private clientsService = inject(ClientsService); + private settingsService = inject(SettingsService); + /** Client Collateral Form */ clientCollateralForm: UntypedFormGroup; /** Client Collateral Options */ @@ -29,6 +36,9 @@ export class AddClientCollateralComponent implements OnInit { /** Collateral Details */ collateralDetails: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retirives Collateral Form from `resolve` * @param {FormBuilder} formBuilder Form bUilder. @@ -36,14 +46,7 @@ export class AddClientCollateralComponent implements OnInit { * @param {Router} router Router. * @param {ProductsService} productsService Products Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private productsService: ProductsService, - private clientsService: ClientsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { clientActionData: any }) => { this.clientCollateralOptions = data.clientActionData; }); diff --git a/src/app/clients/clients-view/client-actions/client-actions.component.html b/src/app/clients/clients-view/client-actions/client-actions.component.html index 4b04874d6f..d9b42fd9ef 100644 --- a/src/app/clients/clients-view/client-actions/client-actions.component.html +++ b/src/app/clients/clients-view/client-actions/client-actions.component.html @@ -1,17 +1,51 @@ - - - - - - - - - - - - - - - - - +@if (actions['Assign Staff']) { + +} +@if (actions['Close']) { + +} +@if (actions['Survey']) { + +} +@if (actions['Reject']) { + +} +@if (actions['Activate']) { + +} +@if (actions['Withdraw']) { + +} +@if (actions['Update Default Savings']) { + +} +@if (actions['Transfer Client']) { + +} +@if (actions['Undo Transfer']) { + +} +@if (actions['Reject Transfer']) { + +} +@if (actions['Accept Transfer']) { + +} +@if (actions['Reactivate']) { + +} +@if (actions['Undo Rejection']) { + +} +@if (actions['Add Charge']) { + +} +@if (actions['Take Survey']) { + +} +@if (actions['Client Screen Reports']) { + +} +@if (actions['Create Collateral']) { + +} diff --git a/src/app/clients/clients-view/client-actions/client-actions.component.ts b/src/app/clients/clients-view/client-actions/client-actions.component.ts index b397bf3eca..b6224b85ec 100644 --- a/src/app/clients/clients-view/client-actions/client-actions.component.ts +++ b/src/app/clients/clients-view/client-actions/client-actions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { ClientAssignStaffComponent } from './client-assign-staff/client-assign-staff.component'; import { CloseClientComponent } from './close-client/close-client.component'; @@ -49,6 +49,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ClientActionsComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Flag object to store possible actions and render appropriate UI to the user */ actions: { 'Assign Staff': boolean; @@ -88,14 +91,14 @@ export class ClientActionsComponent { 'Create Collateral': false }; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.router.routeReuseStrategy.shouldReuseRoute = () => false; const name = this.route.snapshot.params['name'] as keyof typeof this.actions; this.actions[name] = true; diff --git a/src/app/clients/clients-view/client-actions/client-assign-staff/client-assign-staff.component.html b/src/app/clients/clients-view/client-actions/client-assign-staff/client-assign-staff.component.html index 62885d1301..ee4e518d13 100644 --- a/src/app/clients/clients-view/client-actions/client-assign-staff/client-assign-staff.component.html +++ b/src/app/clients/clients-view/client-actions/client-assign-staff/client-assign-staff.component.html @@ -6,14 +6,18 @@ {{ 'labels.inputs.Staff' | translate }} - - {{ staff.displayName }} - + @for (staff of staffData; track staff) { + + {{ staff.displayName }} + + } - - {{ 'labels.inputs.Staff' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (clientAssignStaffForm.controls.staffId.hasError('required')) { + + {{ 'labels.inputs.Staff' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/clients/clients-view/client-actions/client-assign-staff/client-assign-staff.component.ts b/src/app/clients/clients-view/client-actions/client-assign-staff/client-assign-staff.component.ts index c2a9179725..b9912ace85 100644 --- a/src/app/clients/clients-view/client-actions/client-assign-staff/client-assign-staff.component.ts +++ b/src/app/clients/clients-view/client-actions/client-assign-staff/client-assign-staff.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -19,6 +19,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ClientAssignStaffComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private clientsService = inject(ClientsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Client Assign Staff form. */ clientAssignStaffForm: UntypedFormGroup; /** Staff Data */ @@ -26,6 +31,9 @@ export class ClientAssignStaffComponent implements OnInit { /** Client Data */ clientData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches Client Action Data from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -33,12 +41,7 @@ export class ClientAssignStaffComponent implements OnInit { * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private clientsService: ClientsService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { clientActionData: any }) => { this.clientData = data.clientActionData; }); diff --git a/src/app/clients/clients-view/client-actions/client-screen-reports/client-screen-reports.component.html b/src/app/clients/clients-view/client-actions/client-screen-reports/client-screen-reports.component.html index ab9c1a6cc9..84058bc977 100644 --- a/src/app/clients/clients-view/client-actions/client-screen-reports/client-screen-reports.component.html +++ b/src/app/clients/clients-view/client-actions/client-screen-reports/client-screen-reports.component.html @@ -6,14 +6,18 @@ {{ 'labels.inputs.Client Screen Reports' | translate }} - - {{ template.name }} - + @for (template of templatesData; track template) { + + {{ template.name }} + + } - - {{ 'labels.inputs.Screen Report' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (clientScreenReportForm.controls.templateId.hasError('required')) { + + {{ 'labels.inputs.Screen Report' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/clients/clients-view/client-actions/client-screen-reports/client-screen-reports.component.ts b/src/app/clients/clients-view/client-actions/client-screen-reports/client-screen-reports.component.ts index 2d3dc1fb43..3094062597 100644 --- a/src/app/clients/clients-view/client-actions/client-screen-reports/client-screen-reports.component.ts +++ b/src/app/clients/clients-view/client-actions/client-screen-reports/client-screen-reports.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Renderer2, ViewChild, ElementRef, SecurityContext } from '@angular/core'; +import { Component, OnInit, Renderer2, ViewChild, ElementRef, SecurityContext, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -22,6 +22,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ClientScreenReportsComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private clientsService = inject(ClientsService); + private route = inject(ActivatedRoute); + private sanitizer = inject(DomSanitizer); + private renderer = inject(Renderer2); + /** Client Screen Reportform. */ clientScreenReportForm: UntypedFormGroup; /** Templates Data */ @@ -34,6 +40,9 @@ export class ClientScreenReportsComponent implements OnInit { /** Screen report output reference */ @ViewChild('screenReport', { static: true }) screenReportRef: ElementRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches Client Action Data from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -42,13 +51,7 @@ export class ClientScreenReportsComponent implements OnInit { * @param {DomSanitizer} sanitizer DOM Sanitizer * @param {Renderer2} renderer Renderer 2 */ - constructor( - private formBuilder: UntypedFormBuilder, - private clientsService: ClientsService, - private route: ActivatedRoute, - private sanitizer: DomSanitizer, - private renderer: Renderer2 - ) { + constructor() { this.route.data.subscribe((data: { clientActionData: any }) => { this.templatesData = data.clientActionData; }); diff --git a/src/app/clients/clients-view/client-actions/close-client/close-client.component.html b/src/app/clients/clients-view/client-actions/close-client/close-client.component.html index 98590f9099..a899640627 100644 --- a/src/app/clients/clients-view/client-actions/close-client/close-client.component.html +++ b/src/app/clients/clients-view/client-actions/close-client/close-client.component.html @@ -15,23 +15,29 @@ /> - - {{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeClientForm.controls.closureDate.hasError('required')) { + + {{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Closure Reason' | translate }} - - {{ reason.name }} - + @for (reason of closureData; track reason) { + + {{ reason.name }} + + } - - {{ 'labels.inputs.Closure Reason' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeClientForm.controls.closureReasonId.hasError('required')) { + + {{ 'labels.inputs.Closure Reason' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/clients/clients-view/client-actions/close-client/close-client.component.ts b/src/app/clients/clients-view/client-actions/close-client/close-client.component.ts index 7b6c74437f..efbc8e8f38 100644 --- a/src/app/clients/clients-view/client-actions/close-client/close-client.component.ts +++ b/src/app/clients/clients-view/client-actions/close-client/close-client.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CloseClientComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private clientsService = inject(ClientsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class CloseClientComponent implements OnInit { /** Client Id */ clientId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {ClientsService} clientsService Clients Service @@ -40,14 +50,7 @@ export class CloseClientComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private clientsService: ClientsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { clientActionData: any }) => { this.closureData = data.clientActionData.narrations; }); diff --git a/src/app/clients/clients-view/client-actions/reactivate-client/reactivate-client.component.html b/src/app/clients/clients-view/client-actions/reactivate-client/reactivate-client.component.html index 2c4efd633e..c40ee0bf1a 100644 --- a/src/app/clients/clients-view/client-actions/reactivate-client/reactivate-client.component.html +++ b/src/app/clients/clients-view/client-actions/reactivate-client/reactivate-client.component.html @@ -14,10 +14,12 @@ /> - - {{ 'labels.inputs.Reactivation Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (reactivateClientForm.controls.reactivationDate.hasError('required')) { + + {{ 'labels.inputs.Reactivation Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/clients/clients-view/client-actions/reactivate-client/reactivate-client.component.ts b/src/app/clients/clients-view/client-actions/reactivate-client/reactivate-client.component.ts index 096730339d..11691f6eaa 100644 --- a/src/app/clients/clients-view/client-actions/reactivate-client/reactivate-client.component.ts +++ b/src/app/clients/clients-view/client-actions/reactivate-client/reactivate-client.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ReactivateClientComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private clientsService = inject(ClientsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -30,6 +37,9 @@ export class ReactivateClientComponent implements OnInit { /** Client Account Id */ clientId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {clientsService} clientsService Clients Service @@ -38,14 +48,7 @@ export class ReactivateClientComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private clientsService: ClientsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.clientId = this.route.parent.snapshot.params['clientId']; } diff --git a/src/app/clients/clients-view/client-actions/reject-client-transfer/reject-client-transfer.component.ts b/src/app/clients/clients-view/client-actions/reject-client-transfer/reject-client-transfer.component.ts index eaa9d02143..19c903e3a6 100644 --- a/src/app/clients/clients-view/client-actions/reject-client-transfer/reject-client-transfer.component.ts +++ b/src/app/clients/clients-view/client-actions/reject-client-transfer/reject-client-transfer.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RejectClientTransferComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private clientsService = inject(ClientsService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Reject Client Transfer form. */ rejectClientTransferForm: UntypedFormGroup; /** Client Id */ @@ -30,20 +37,16 @@ export class RejectClientTransferComponent implements OnInit { /** Transfer Date */ transferDate: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {ClientsService} clientsService Clients Service * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private clientsService: ClientsService, - private settingsService: SettingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { clientActionData: any }) => { this.transferDate = data.clientActionData; }); diff --git a/src/app/clients/clients-view/client-actions/reject-client/reject-client.component.html b/src/app/clients/clients-view/client-actions/reject-client/reject-client.component.html index 71d989cc30..294c66a45d 100644 --- a/src/app/clients/clients-view/client-actions/reject-client/reject-client.component.html +++ b/src/app/clients/clients-view/client-actions/reject-client/reject-client.component.html @@ -15,23 +15,29 @@ /> - - {{ 'labels.inputs.Rejection Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (rejectClientForm.controls.rejectionDate.hasError('required')) { + + {{ 'labels.inputs.Rejection Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Rejection Reason' | translate }} - - {{ reason.name }} - + @for (reason of rejectionData; track reason) { + + {{ reason.name }} + + } - - {{ 'labels.inputs.Rejection Reason' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (rejectClientForm.controls.rejectionReasonId.hasError('required')) { + + {{ 'labels.inputs.Rejection Reason' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/clients/clients-view/client-actions/reject-client/reject-client.component.ts b/src/app/clients/clients-view/client-actions/reject-client/reject-client.component.ts index 9c8ef234e9..3726175443 100644 --- a/src/app/clients/clients-view/client-actions/reject-client/reject-client.component.ts +++ b/src/app/clients/clients-view/client-actions/reject-client/reject-client.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RejectClientComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private clientsService = inject(ClientsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class RejectClientComponent implements OnInit { /** Client Id */ clientId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {ClientsService} clientsService Clients Service @@ -40,14 +50,7 @@ export class RejectClientComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private clientsService: ClientsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { clientActionData: any }) => { this.rejectionData = data.clientActionData.narrations; }); diff --git a/src/app/clients/clients-view/client-actions/take-survey/take-survey.component.html b/src/app/clients/clients-view/client-actions/take-survey/take-survey.component.html index 62513e0757..d9248cbd07 100644 --- a/src/app/clients/clients-view/client-actions/take-survey/take-survey.component.html +++ b/src/app/clients/clients-view/client-actions/take-survey/take-survey.component.html @@ -3,42 +3,41 @@ {{ 'labels.inputs.Survey Name' | translate }} - - {{ surveyData.name }} - + @for (surveyData of allSurveyData; track surveyData) { + + {{ surveyData.name }} + + } - - component[0].componentKey - + @for (component of componentGroups; track component) { + @if (component[0].componentKey) { + component[0].componentKey + } - + @for (question of component; track question) { {{ question.text }} - - - - {{ options.text }} - - + @for (options of question.responseDatas; track options) { + + + {{ options.text }} + + + } - - - {{ 'labels.text.Your answer is' | translate }}: {{ question.answer.text }} - - + @if (question.answer) { + {{ 'labels.text.Your answer is' | translate }}: {{ question.answer.text }} + } + } - + } diff --git a/src/app/clients/clients-view/client-actions/take-survey/take-survey.component.ts b/src/app/clients/clients-view/client-actions/take-survey/take-survey.component.ts index ac4d6d5c39..20f17e6ce2 100644 --- a/src/app/clients/clients-view/client-actions/take-survey/take-survey.component.ts +++ b/src/app/clients/clients-view/client-actions/take-survey/take-survey.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; /** Custom Services */ @@ -24,6 +24,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class TakeSurveyComponent { + private route = inject(ActivatedRoute); + private clientsService = inject(ClientsService); + private router = inject(Router); + private authenticationService = inject(AuthenticationService); + /** List of all Survey Data */ allSurveyData: any; /** User Id */ @@ -45,6 +50,9 @@ export class TakeSurveyComponent { id: Number; }; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the survey data from `resolve`. * @param {ActivatedRoute} route Activated Route @@ -52,12 +60,7 @@ export class TakeSurveyComponent { * @param {Router} router Router * @param {AuthenticationService} authenticationService AuthenticationService */ - constructor( - private route: ActivatedRoute, - private clientsService: ClientsService, - private router: Router, - private authenticationService: AuthenticationService - ) { + constructor() { this.route.data.subscribe((data: { clientActionData: any }) => { this.allSurveyData = data.clientActionData; this.clientId = this.route.parent.snapshot.params['clientId']; diff --git a/src/app/clients/clients-view/client-actions/transfer-client/transfer-client.component.html b/src/app/clients/clients-view/client-actions/transfer-client/transfer-client.component.html index 143fbcdf84..f8acbce618 100644 --- a/src/app/clients/clients-view/client-actions/transfer-client/transfer-client.component.html +++ b/src/app/clients/clients-view/client-actions/transfer-client/transfer-client.component.html @@ -6,14 +6,18 @@ {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (transferClientForm.controls.destinationOfficeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -28,10 +32,12 @@ /> - - {{ 'labels.inputs.Transfer Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (transferClientForm.controls.transferDate.hasError('required')) { + + {{ 'labels.inputs.Transfer Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/clients/clients-view/client-actions/transfer-client/transfer-client.component.ts b/src/app/clients/clients-view/client-actions/transfer-client/transfer-client.component.ts index 023798432d..57c2fa0175 100644 --- a/src/app/clients/clients-view/client-actions/transfer-client/transfer-client.component.ts +++ b/src/app/clients/clients-view/client-actions/transfer-client/transfer-client.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class TransferClientComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private clientsService = inject(ClientsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -34,6 +41,9 @@ export class TransferClientComponent implements OnInit { /** Client Id */ clientId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {ClientsService} clientsService Clients Service @@ -42,14 +52,7 @@ export class TransferClientComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private clientsService: ClientsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { clientActionData: any }) => { this.officeData = data.clientActionData; }); diff --git a/src/app/clients/clients-view/client-actions/undo-client-rejection/undo-client-rejection.component.html b/src/app/clients/clients-view/client-actions/undo-client-rejection/undo-client-rejection.component.html index 693c6f1cc7..0e72344206 100644 --- a/src/app/clients/clients-view/client-actions/undo-client-rejection/undo-client-rejection.component.html +++ b/src/app/clients/clients-view/client-actions/undo-client-rejection/undo-client-rejection.component.html @@ -14,10 +14,12 @@ /> - - {{ 'labels.inputs.Reopened On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (undoClientRejectionForm.controls.reopenedDate.hasError('required')) { + + {{ 'labels.inputs.Reopened On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/clients/clients-view/client-actions/undo-client-rejection/undo-client-rejection.component.ts b/src/app/clients/clients-view/client-actions/undo-client-rejection/undo-client-rejection.component.ts index 834891160d..f1df4a070b 100644 --- a/src/app/clients/clients-view/client-actions/undo-client-rejection/undo-client-rejection.component.ts +++ b/src/app/clients/clients-view/client-actions/undo-client-rejection/undo-client-rejection.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UndoClientRejectionComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private clientsService = inject(ClientsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -30,6 +37,9 @@ export class UndoClientRejectionComponent implements OnInit { /** Client Id */ clientId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {clientsService} clientsService Cliens Service @@ -37,14 +47,7 @@ export class UndoClientRejectionComponent implements OnInit { * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private clientsService: ClientsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.clientId = this.route.parent.snapshot.params['clientId']; } diff --git a/src/app/clients/clients-view/client-actions/undo-client-transfer/undo-client-transfer.component.ts b/src/app/clients/clients-view/client-actions/undo-client-transfer/undo-client-transfer.component.ts index b315746118..92ae395988 100644 --- a/src/app/clients/clients-view/client-actions/undo-client-transfer/undo-client-transfer.component.ts +++ b/src/app/clients/clients-view/client-actions/undo-client-transfer/undo-client-transfer.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UndoClientTransferComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private clientsService = inject(ClientsService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Undo Client Transfer form. */ undoClientTransferForm: UntypedFormGroup; /** Client Id */ @@ -30,20 +37,16 @@ export class UndoClientTransferComponent implements OnInit { /** Transfer Date */ transferDate: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {ClientsService} clientsService Clients Service * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private clientsService: ClientsService, - private settingsService: SettingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { clientActionData: any }) => { this.transferDate = data.clientActionData; }); diff --git a/src/app/clients/clients-view/client-actions/update-client-savings-account/update-client-savings-account.component.html b/src/app/clients/clients-view/client-actions/update-client-savings-account/update-client-savings-account.component.html index 7393e0e258..5034c32a4c 100644 --- a/src/app/clients/clients-view/client-actions/update-client-savings-account/update-client-savings-account.component.html +++ b/src/app/clients/clients-view/client-actions/update-client-savings-account/update-client-savings-account.component.html @@ -6,14 +6,18 @@ {{ 'labels.inputs.Default Savings Account' | translate }} - - {{ account.accountNo }} - + @for (account of savingsAccounts; track account) { + + {{ account.accountNo }} + + } - - {{ 'labels.inputs.Account' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (clientSavingsAccountForm.controls.savingsAccountId.hasError('required')) { + + {{ 'labels.inputs.Account' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/clients/clients-view/client-actions/update-client-savings-account/update-client-savings-account.component.ts b/src/app/clients/clients-view/client-actions/update-client-savings-account/update-client-savings-account.component.ts index bd2af18aac..32a030aaea 100644 --- a/src/app/clients/clients-view/client-actions/update-client-savings-account/update-client-savings-account.component.ts +++ b/src/app/clients/clients-view/client-actions/update-client-savings-account/update-client-savings-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -19,6 +19,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UpdateClientSavingsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private clientsService = inject(ClientsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Client Update Savings Account form. */ clientSavingsAccountForm: UntypedFormGroup; /** Savings Accounts Data */ @@ -26,6 +31,9 @@ export class UpdateClientSavingsAccountComponent implements OnInit { /** Client Data */ clientData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches Client Action Data from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -33,12 +41,7 @@ export class UpdateClientSavingsAccountComponent implements OnInit { * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private clientsService: ClientsService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { clientActionData: any }) => { this.clientData = data.clientActionData; }); diff --git a/src/app/clients/clients-view/client-actions/view-survey/view-survey.component.ts b/src/app/clients/clients-view/client-actions/view-survey/view-survey.component.ts index f3bc015019..489d500880 100644 --- a/src/app/clients/clients-view/client-actions/view-survey/view-survey.component.ts +++ b/src/app/clients/clients-view/client-actions/view-survey/view-survey.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -49,6 +49,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewSurveyComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Survey Data */ surveyData: any; /** Data source for view surveys table. */ @@ -66,11 +68,14 @@ export class ViewSurveyComponent implements OnInit { /** Sorter for list of surveys table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the survey data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { clientActionData: any }) => { this.surveyData = data.clientActionData; }); diff --git a/src/app/clients/clients-view/client-actions/withdraw-client/withdraw-client.component.html b/src/app/clients/clients-view/client-actions/withdraw-client/withdraw-client.component.html index f6cd279164..e96f75f6ff 100644 --- a/src/app/clients/clients-view/client-actions/withdraw-client/withdraw-client.component.html +++ b/src/app/clients/clients-view/client-actions/withdraw-client/withdraw-client.component.html @@ -15,23 +15,29 @@ /> - - {{ 'labels.inputs.Withdrawal Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (withdrawClientForm.controls.withdrawalDate.hasError('required')) { + + {{ 'labels.inputs.Withdrawal Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Withdrawal Reason' | translate }} - - {{ reason.name }} - + @for (reason of withdrawalData; track reason) { + + {{ reason.name }} + + } - - {{ 'labels.inputs.Withdrawal Reason' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (withdrawClientForm.controls.withdrawalReasonId.hasError('required')) { + + {{ 'labels.inputs.Withdrawal Reason' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/clients/clients-view/client-actions/withdraw-client/withdraw-client.component.ts b/src/app/clients/clients-view/client-actions/withdraw-client/withdraw-client.component.ts index 1e71206f54..5a81c155ea 100644 --- a/src/app/clients/clients-view/client-actions/withdraw-client/withdraw-client.component.ts +++ b/src/app/clients/clients-view/client-actions/withdraw-client/withdraw-client.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class WithdrawClientComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private clientsService = inject(ClientsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class WithdrawClientComponent implements OnInit { /** Client Id */ clientId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {ClientsService} clientsService Clients Service @@ -40,14 +50,7 @@ export class WithdrawClientComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private clientsService: ClientsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { clientActionData: any }) => { this.withdrawalData = data.clientActionData.narrations; }); diff --git a/src/app/clients/clients-view/clients-view.component.html b/src/app/clients/clients-view/clients-view.component.html index 415b709aad..7884b13670 100644 --- a/src/app/clients/clients-view/clients-view.component.html +++ b/src/app/clients/clients-view/clients-view.component.html @@ -90,18 +90,24 @@ > - - - {{ 'labels.inputs.Activation Date' | translate }} - - {{ clientViewData.activationDate | dateFormat }} - + @if (clientViewData.activationDate) { + + + {{ 'labels.inputs.Activation Date' | translate }} + + {{ clientViewData.activationDate | dateFormat }} + + } {{ 'labels.inputs.Staff' | translate }} - {{ clientViewData.staffName }} - {{ 'labels.inputs.Unassigned' | translate }} + @if (clientViewData.staffName) { + {{ clientViewData.staffName }} + } + @if (!clientViewData.staffName) { + {{ 'labels.inputs.Unassigned' | translate }} + } @@ -109,22 +115,28 @@ - 0"> - - {{ 'labels.inputs.Member Of' | translate }} - - - - {{ group.name }} - - - - - - {{ 'labels.inputs.Client Type' | translate }} - - {{ clientViewData.clientType.name }} - + @if (clientViewData.groups.length > 0) { + + + {{ 'labels.inputs.Member Of' | translate }} + + + @for (group of clientViewData.groups; track group) { + + {{ group.name }} + + } + + + } + @if (clientViewData.clientType) { + + + {{ 'labels.inputs.Client Type' | translate }} + + {{ clientViewData.clientType.name }} + + } {{ 'labels.inputs.Mobile Number' | translate }} @@ -162,12 +174,14 @@ {{ 'labels.buttons.Edit' | translate }} - - - - - {{ 'labels.buttons.Applications' | translate }} - + @if (isActive()) { + + + + + {{ 'labels.buttons.Applications' | translate }} + + } @@ -176,21 +190,25 @@ {{ 'labels.buttons.Actions' | translate }} - - - - - {{ 'labels.buttons.Assign Staff' | translate }} - - - - + @if (!clientViewData.staffId) { + - {{ 'labels.buttons.Unassign Staff' | translate }} + {{ 'labels.buttons.Assign Staff' | translate }} - + } + + @if (clientViewData.staffId) { + + + + + + {{ 'labels.buttons.Unassign Staff' | translate }} + + + } {{ 'labels.buttons.More' | translate }} @@ -230,49 +248,67 @@ {{ 'labels.buttons.Transfer Client' | translate }} - - {{ 'labels.buttons.Activate' | translate }} - - - {{ 'labels.buttons.Withdraw' | translate }} - - {{ 'labels.buttons.Reject' | translate }} - - {{ 'labels.buttons.Delete' | translate }} - - - {{ 'labels.buttons.Reactivate' | translate }} - - - {{ 'labels.buttons.Undo Rejection' | translate }} - - - {{ 'labels.buttons.Undo Transfer' | translate }} - - - {{ 'labels.buttons.Accept Transfer' | translate }} - - - {{ 'labels.buttons.Reject transfer' | translate }} - + @if (clientViewData.status.value === 'Pending') { + + {{ 'labels.buttons.Activate' | translate }} + + } + @if (clientViewData.status.value === 'Pending') { + + {{ 'labels.buttons.Withdraw' | translate }} + + } + @if (clientViewData.status.value === 'Pending') { + {{ 'labels.buttons.Reject' | translate }} + } + @if (clientViewData.status.value === 'Pending') { + + {{ 'labels.buttons.Delete' | translate }} + + } + @if (clientViewData.status.value === 'Closed') { + + {{ 'labels.buttons.Reactivate' | translate }} + + } + @if (clientViewData.status.value === 'Rejected') { + + {{ 'labels.buttons.Undo Rejection' | translate }} + + } + @if (clientViewData.status.value === 'Transfer in progress') { + + {{ 'labels.buttons.Undo Transfer' | translate }} + + } + @if (clientViewData.status.value === 'Transfer in progress') { + + {{ 'labels.buttons.Accept Transfer' | translate }} + + } + @if (clientViewData.status.value === 'Transfer in progress') { + + {{ 'labels.buttons.Reject transfer' | translate }} + + } @@ -308,15 +344,17 @@ > {{ 'labels.buttons.Create Standing Instructions' | translate }} - - - {{ 'labels.buttons.View Standing Instructions' | translate }} - - + @if (clientViewData.status.value !== 'Transfer on hold') { + + + {{ 'labels.buttons.View Standing Instructions' | translate }} + + + } @@ -380,7 +418,7 @@ > {{ 'labels.inputs.Notes' | translate }} - + @for (clientDatatable of clientDatatables; track clientDatatable) { > {{ clientDatatable.registeredTableName }} - + } diff --git a/src/app/clients/clients-view/clients-view.component.ts b/src/app/clients/clients-view/clients-view.component.ts index e8693978ac..ff335c0626 100644 --- a/src/app/clients/clients-view/clients-view.component.ts +++ b/src/app/clients/clients-view/clients-view.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; import { DomSanitizer } from '@angular/platform-browser'; import { MatDialog } from '@angular/material/dialog'; @@ -26,7 +26,7 @@ import { } from '@angular/material/card'; import { MatButton, MatIconButton } from '@angular/material/button'; import { MatTooltip } from '@angular/material/tooltip'; -import { NgClass, NgIf, NgFor } from '@angular/common'; +import { NgClass } from '@angular/common'; import { EntityNameComponent } from '../../shared/entity-name/entity-name.component'; import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; import { MatIcon } from '@angular/material/icon'; @@ -70,18 +70,21 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ClientsViewComponent implements OnInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private clientsService = inject(ClientsService); + private _sanitizer = inject(DomSanitizer); + dialog = inject(MatDialog); + clientViewData: any; clientDatatables: any; clientImage: any; clientTemplateData: any; - constructor( - private route: ActivatedRoute, - private router: Router, - private clientsService: ClientsService, - private _sanitizer: DomSanitizer, - public dialog: MatDialog - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { clientViewData: any; clientTemplateData: any; clientDatatables: any }) => { this.clientViewData = data.clientViewData; this.clientDatatables = data.clientDatatables; diff --git a/src/app/clients/clients-view/custom-dialogs/capture-image-dialog/capture-image-dialog.component.html b/src/app/clients/clients-view/custom-dialogs/capture-image-dialog/capture-image-dialog.component.html index 3e4f08ee5a..1848744bd3 100644 --- a/src/app/clients/clients-view/custom-dialogs/capture-image-dialog/capture-image-dialog.component.html +++ b/src/app/clients/clients-view/custom-dialogs/capture-image-dialog/capture-image-dialog.component.html @@ -10,12 +10,16 @@ {{ 'labels.heading.Capture Client Image' | t - - {{ 'labels.buttons.Capture' | translate }} - - - {{ 'labels.buttons.Recapture' | translate }} - + @if (!isCaptured) { + + {{ 'labels.buttons.Capture' | translate }} + + } + @if (isCaptured) { + + {{ 'labels.buttons.Recapture' | translate }} + + } diff --git a/src/app/clients/clients-view/custom-dialogs/capture-image-dialog/capture-image-dialog.component.ts b/src/app/clients/clients-view/custom-dialogs/capture-image-dialog/capture-image-dialog.component.ts index 31840b6980..411f3db61f 100644 --- a/src/app/clients/clients-view/custom-dialogs/capture-image-dialog/capture-image-dialog.component.ts +++ b/src/app/clients/clients-view/custom-dialogs/capture-image-dialog/capture-image-dialog.component.ts @@ -1,7 +1,7 @@ /** Angular Imports */ -import { Component, ViewChild, ElementRef, AfterViewInit, Renderer2, OnDestroy } from '@angular/core'; +import { Component, ViewChild, ElementRef, AfterViewInit, Renderer2, OnDestroy, inject } from '@angular/core'; import { MatDialogRef, MatDialogTitle, MatDialogActions, MatDialogClose } from '@angular/material/dialog'; -import { NgStyle, NgIf } from '@angular/common'; +import { NgStyle } from '@angular/common'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -22,6 +22,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CaptureImageDialogComponent implements AfterViewInit, OnDestroy { + dialogRef = inject>(MatDialogRef); + private renderer = inject(Renderer2); + /** Video element reference */ @ViewChild('video', { static: true }) video: ElementRef; /** Canvas element reference */ @@ -36,14 +39,14 @@ export class CaptureImageDialogComponent implements AfterViewInit, OnDestroy { /** Client image file */ clientImageDataURL: string; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Mat Dialog Reference * @param {Renderer2} renderer Template Renderer */ - constructor( - public dialogRef: MatDialogRef, - private renderer: Renderer2 - ) {} + constructor() {} ngAfterViewInit() { this.startCamera(); diff --git a/src/app/clients/clients-view/custom-dialogs/delete-signature-dialog/delete-signature-dialog.component.html b/src/app/clients/clients-view/custom-dialogs/delete-signature-dialog/delete-signature-dialog.component.html index 816aba1b4e..b84049ec85 100644 --- a/src/app/clients/clients-view/custom-dialogs/delete-signature-dialog/delete-signature-dialog.component.html +++ b/src/app/clients/clients-view/custom-dialogs/delete-signature-dialog/delete-signature-dialog.component.html @@ -1,19 +1,27 @@ {{ 'labels.heading.Delete Client Signature' | translate }} - - {{ 'labels.text.Delete clients signature' | translate }} ? - +@if (signatureId) { + + {{ 'labels.text.Delete clients signature' | translate }} ? + +} - - {{ 'labels.text.Client Signature is not provided.' | translate }} - +@if (!signatureId) { + + {{ 'labels.text.Client Signature is not provided.' | translate }} + +} {{ 'labels.buttons.Cancel' | translate }} - - {{ 'labels.buttons.Confirm' | translate }} - - - {{ 'labels.buttons.Upload' | translate }} - + @if (signatureId) { + + {{ 'labels.buttons.Confirm' | translate }} + + } + @if (!signatureId) { + + {{ 'labels.buttons.Upload' | translate }} + + } diff --git a/src/app/clients/clients-view/custom-dialogs/delete-signature-dialog/delete-signature-dialog.component.ts b/src/app/clients/clients-view/custom-dialogs/delete-signature-dialog/delete-signature-dialog.component.ts index 13f2570b81..1269edfa4b 100644 --- a/src/app/clients/clients-view/custom-dialogs/delete-signature-dialog/delete-signature-dialog.component.ts +++ b/src/app/clients/clients-view/custom-dialogs/delete-signature-dialog/delete-signature-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,17 +28,20 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DeleteSignatureDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + /** Id of client signature in documents */ signatureId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Documents data */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any[] - ) { + constructor() { const signature = this.data.find((document: any) => document.name === 'clientSignature') || {}; this.signatureId = signature.id; } diff --git a/src/app/clients/clients-view/custom-dialogs/edit-notes-dialog/edit-notes-dialog.component.ts b/src/app/clients/clients-view/custom-dialogs/edit-notes-dialog/edit-notes-dialog.component.ts index 7291ee9b49..28e0960a70 100644 --- a/src/app/clients/clients-view/custom-dialogs/edit-notes-dialog/edit-notes-dialog.component.ts +++ b/src/app/clients/clients-view/custom-dialogs/edit-notes-dialog/edit-notes-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -22,13 +22,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditNotesDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + private formBuilder = inject(UntypedFormBuilder); + data = inject(MAT_DIALOG_DATA); + noteForm: UntypedFormGroup; - constructor( - public dialogRef: MatDialogRef, - private formBuilder: UntypedFormBuilder, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { this.createNoteForm(); diff --git a/src/app/clients/clients-view/custom-dialogs/unassign-staff-dialog/unassign-staff-dialog.component.ts b/src/app/clients/clients-view/custom-dialogs/unassign-staff-dialog/unassign-staff-dialog.component.ts index cb52774ed7..31f0c4d01a 100644 --- a/src/app/clients/clients-view/custom-dialogs/unassign-staff-dialog/unassign-staff-dialog.component.ts +++ b/src/app/clients/clients-view/custom-dialogs/unassign-staff-dialog/unassign-staff-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,8 +28,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UnassignStaffDialogComponent { + dialogRef = inject>(MatDialogRef); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. */ - constructor(public dialogRef: MatDialogRef) {} + constructor() {} } diff --git a/src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.html b/src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.html index 60514f16b2..925d22db45 100644 --- a/src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.html +++ b/src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.html @@ -6,16 +6,20 @@ {{ 'labels.inputs.File Name' | translate }} - - {{ 'labels.inputs.File Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (uploadDocumentForm.controls.fileName.hasError('required')) { + + {{ 'labels.inputs.File Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Description' | translate }} - - + @if (!documentIdentifier) { + + {{ 'labels.inputs.Description' | translate }} + + + } diff --git a/src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.ts b/src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.ts index 3eeba8a93f..856af02e27 100644 --- a/src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.ts +++ b/src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -23,6 +23,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UploadDocumentDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + private formBuilder = inject(UntypedFormBuilder); + data = inject(MAT_DIALOG_DATA); + /** Upload Document form. */ uploadDocumentForm: UntypedFormGroup; /** Upload Document Data */ @@ -32,16 +36,17 @@ export class UploadDocumentDialogComponent implements OnInit { /** Entity Type */ entityType: string; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Dialog reference element * @param {FormBuilder} formBuilder Form Builder * @param {any} data Dialog Data */ - constructor( - public dialogRef: MatDialogRef, - private formBuilder: UntypedFormBuilder, - @Inject(MAT_DIALOG_DATA) public data: any - ) { + constructor() { + const data = this.data; + this.documentIdentifier = data.documentIdentifier; this.entityType = data.entityType; } diff --git a/src/app/clients/clients-view/custom-dialogs/upload-image-dialog/upload-image-dialog.component.ts b/src/app/clients/clients-view/custom-dialogs/upload-image-dialog/upload-image-dialog.component.ts index c315852894..2abc3b1354 100644 --- a/src/app/clients/clients-view/custom-dialogs/upload-image-dialog/upload-image-dialog.component.ts +++ b/src/app/clients/clients-view/custom-dialogs/upload-image-dialog/upload-image-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MatDialogTitle, MatDialogActions, MatDialogClose } from '@angular/material/dialog'; import { FileUploadComponent } from '../../../../shared/file-upload/file-upload.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -20,13 +20,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UploadImageDialogComponent { + dialogRef = inject>(MatDialogRef); + /** Client Image */ image: File; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. */ - constructor(public dialogRef: MatDialogRef) {} + constructor() {} /** * Sets file form control value. diff --git a/src/app/clients/clients-view/custom-dialogs/upload-signature-dialog/upload-signature-dialog.component.ts b/src/app/clients/clients-view/custom-dialogs/upload-signature-dialog/upload-signature-dialog.component.ts index 189bbadcb1..956331caf1 100644 --- a/src/app/clients/clients-view/custom-dialogs/upload-signature-dialog/upload-signature-dialog.component.ts +++ b/src/app/clients/clients-view/custom-dialogs/upload-signature-dialog/upload-signature-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MatDialogTitle, MatDialogActions, MatDialogClose } from '@angular/material/dialog'; import { FileUploadComponent } from '../../../../shared/file-upload/file-upload.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -20,13 +20,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UploadSignatureDialogComponent { + dialogRef = inject>(MatDialogRef); + /** Client Signature */ signature: File; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. */ - constructor(public dialogRef: MatDialogRef) {} + constructor() {} /** * Sets file form control value. diff --git a/src/app/clients/clients-view/custom-dialogs/view-signature-dialog/view-signature-dialog.component.html b/src/app/clients/clients-view/custom-dialogs/view-signature-dialog/view-signature-dialog.component.html index add202276a..5ec30bc275 100644 --- a/src/app/clients/clients-view/custom-dialogs/view-signature-dialog/view-signature-dialog.component.html +++ b/src/app/clients/clients-view/custom-dialogs/view-signature-dialog/view-signature-dialog.component.html @@ -1,19 +1,27 @@ {{ 'labels.heading.View Client Signature' | translate }} - - - +@if (signatureId) { + + + +} - - {{ 'labels.text.Client Signature is not provided.' | translate }} - +@if (!signatureId) { + + {{ 'labels.text.Client Signature is not provided.' | translate }} + +} {{ 'labels.buttons.Close' | translate }} - - {{ 'labels.buttons.Delete' | translate }} - - - {{ 'labels.buttons.Upload' | translate }} - + @if (signatureId) { + + {{ 'labels.buttons.Delete' | translate }} + + } + @if (!signatureId) { + + {{ 'labels.buttons.Upload' | translate }} + + } diff --git a/src/app/clients/clients-view/custom-dialogs/view-signature-dialog/view-signature-dialog.component.ts b/src/app/clients/clients-view/custom-dialogs/view-signature-dialog/view-signature-dialog.component.ts index de887a7024..8018890833 100644 --- a/src/app/clients/clients-view/custom-dialogs/view-signature-dialog/view-signature-dialog.component.ts +++ b/src/app/clients/clients-view/custom-dialogs/view-signature-dialog/view-signature-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -35,6 +35,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewSignatureDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + private clientsService = inject(ClientsService); + private sanitizer = inject(DomSanitizer); + data = inject<{ + documents: any[]; + id: string; + }>(MAT_DIALOG_DATA); + /** Id of client signature in documents */ signatureId: any; /** Signature Image */ @@ -42,16 +50,14 @@ export class ViewSignatureDialogComponent implements OnInit { /** Client Id */ clientId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Documents data */ - constructor( - public dialogRef: MatDialogRef, - private clientsService: ClientsService, - private sanitizer: DomSanitizer, - @Inject(MAT_DIALOG_DATA) public data: { documents: any[]; id: string } - ) { + constructor() { const signature = this.data.documents.find((document: any) => document.name === 'clientSignature') || {}; this.signatureId = signature.id; this.clientId = this.data.id; diff --git a/src/app/clients/clients-view/datatable-tab/datatable-tab.component.ts b/src/app/clients/clients-view/datatable-tab/datatable-tab.component.ts index ff0aaf5e2c..aedd5f63b7 100644 --- a/src/app/clients/clients-view/datatable-tab/datatable-tab.component.ts +++ b/src/app/clients/clients-view/datatable-tab/datatable-tab.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { EntityDatatableTabComponent } from '../../../shared/tabs/entity-datatable-tab/entity-datatable-tab.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -13,11 +13,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DatatableTabComponent { + private route = inject(ActivatedRoute); + entityId: string; entityDatatable: any; multiRowDatatableFlag: boolean; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.entityId = this.route.parent.parent.snapshot.paramMap.get('clientId'); this.route.data.subscribe((data: { clientDatatable: any }) => { diff --git a/src/app/clients/clients-view/documents-tab/documents-tab.component.ts b/src/app/clients/clients-view/documents-tab/documents-tab.component.ts index dd6d954f34..a7b0ccffa1 100644 --- a/src/app/clients/clients-view/documents-tab/documents-tab.component.ts +++ b/src/app/clients/clients-view/documents-tab/documents-tab.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -17,15 +17,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DocumentsTabComponent { + private route = inject(ActivatedRoute); + private clientsService = inject(ClientsService); + dialog = inject(MatDialog); + entityDocuments: any; entityId: string; entityType = 'clients'; - constructor( - private route: ActivatedRoute, - private clientsService: ClientsService, - public dialog: MatDialog - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { clientDocuments: any }) => { this.entityDocuments = data.clientDocuments; }); diff --git a/src/app/clients/clients-view/family-members-tab/add-family-member/add-family-member.component.html b/src/app/clients/clients-view/family-members-tab/add-family-member/add-family-member.component.html index bb1b9eb67b..ab6ef6defc 100644 --- a/src/app/clients/clients-view/family-members-tab/add-family-member/add-family-member.component.html +++ b/src/app/clients/clients-view/family-members-tab/add-family-member/add-family-member.component.html @@ -11,10 +11,12 @@ placeholder="First Name" title="First Name" /> - - {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (addFamilyMemberForm.controls.firstName.hasError('required')) { + + {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -38,10 +40,12 @@ placeholder="Last Name" title="Last Name" /> - - {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (addFamilyMemberForm.controls.lastName.hasError('required')) { + + {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -76,47 +80,56 @@ {{ 'labels.inputs.Relationship' | translate }} - - {{ relation.name | translateKey: 'catalogs' }} - + @for (relation of addFamilyMemberTemplate.relationshipIdOptions; track relation) { + + {{ relation.name | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Relationship' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (addFamilyMemberForm.controls.relationshipId.hasError('required')) { + + {{ 'labels.inputs.Relationship' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Gender' | translate }} - - {{ gender.name | translateKey: 'catalogs' }} - + @for (gender of addFamilyMemberTemplate.genderIdOptions; track gender) { + + {{ gender.name | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Gender' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (addFamilyMemberForm.controls.genderId.hasError('required')) { + + {{ 'labels.inputs.Gender' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Profession' | translate }} - - {{ profession.name | translateKey: 'catalogs' }} - + @for (profession of addFamilyMemberTemplate.professionIdOptions; track profession) { + + {{ profession.name | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Marital Status' | translate }} - - {{ maritalStatus.name | translateKey: 'catalogs' }} - + @for (maritalStatus of addFamilyMemberTemplate.maritalStatusIdOptions; track maritalStatus) { + + {{ maritalStatus.name | translateKey: 'catalogs' }} + + } diff --git a/src/app/clients/clients-view/family-members-tab/add-family-member/add-family-member.component.ts b/src/app/clients/clients-view/family-members-tab/add-family-member/add-family-member.component.ts index c8a82670bc..c7ab3a1ed6 100644 --- a/src/app/clients/clients-view/family-members-tab/add-family-member/add-family-member.component.ts +++ b/src/app/clients/clients-view/family-members-tab/add-family-member/add-family-member.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AddFamilyMemberComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private dateUtils = inject(Dates); + private router = inject(Router); + private route = inject(ActivatedRoute); + private clientsService = inject(ClientsService); + private settingsService = inject(SettingsService); + /** Maximum Due Date allowed. */ maxDate = new Date(); /** Minimum age allowed is 0. */ @@ -34,6 +41,9 @@ export class AddFamilyMemberComponent implements OnInit { /** Client ID */ clientId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder FormBuilder * @param {Dates} dateUtils Date Utils @@ -42,14 +52,7 @@ export class AddFamilyMemberComponent implements OnInit { * @param {ClientsService} clientsService Clients Service * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private dateUtils: Dates, - private router: Router, - private route: ActivatedRoute, - private clientsService: ClientsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { clientTemplate: any }) => { this.addFamilyMemberTemplate = data.clientTemplate.familyMemberOptions; }); diff --git a/src/app/clients/clients-view/family-members-tab/edit-family-member/edit-family-member.component.html b/src/app/clients/clients-view/family-members-tab/edit-family-member/edit-family-member.component.html index 49750b8b6d..57a0c3cd15 100644 --- a/src/app/clients/clients-view/family-members-tab/edit-family-member/edit-family-member.component.html +++ b/src/app/clients/clients-view/family-members-tab/edit-family-member/edit-family-member.component.html @@ -4,10 +4,12 @@ {{ 'labels.inputs.First Name' | translate }} - - {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editFamilyMemberForm.controls.firstName.hasError('required')) { + + {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -18,10 +20,12 @@ {{ 'labels.inputs.Last Name' | translate }} - - {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editFamilyMemberForm.controls.lastName.hasError('required')) { + + {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -41,47 +45,56 @@ {{ 'labels.inputs.Relationship' | translate }} - - {{ relation.name | translateKey: 'catalogs' }} - + @for (relation of addFamilyMemberTemplate.relationshipIdOptions; track relation) { + + {{ relation.name | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Relationship' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editFamilyMemberForm.controls.relationshipId.hasError('required')) { + + {{ 'labels.inputs.Relationship' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Gender' | translate }} - - {{ gender.name | translateKey: 'catalogs' }} - + @for (gender of addFamilyMemberTemplate.genderIdOptions; track gender) { + + {{ gender.name | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Gender' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editFamilyMemberForm.controls.genderId.hasError('required')) { + + {{ 'labels.inputs.Gender' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Profession' | translate }} - - {{ profession.name | translateKey: 'catalogs' }} - + @for (profession of addFamilyMemberTemplate.professionIdOptions; track profession) { + + {{ profession.name | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Marital Status' | translate }} - - {{ maritalStatus.name | translateKey: 'catalogs' }} - + @for (maritalStatus of addFamilyMemberTemplate.maritalStatusIdOptions; track maritalStatus) { + + {{ maritalStatus.name | translateKey: 'catalogs' }} + + } diff --git a/src/app/clients/clients-view/family-members-tab/edit-family-member/edit-family-member.component.ts b/src/app/clients/clients-view/family-members-tab/edit-family-member/edit-family-member.component.ts index 8315e8f49d..2592fc29f8 100644 --- a/src/app/clients/clients-view/family-members-tab/edit-family-member/edit-family-member.component.ts +++ b/src/app/clients/clients-view/family-members-tab/edit-family-member/edit-family-member.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditFamilyMemberComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private dateUtils = inject(Dates); + private router = inject(Router); + private route = inject(ActivatedRoute); + private clientsService = inject(ClientsService); + private settingsService = inject(SettingsService); + /** Maximum Due Date allowed. */ maxDate = new Date(); /** Add family member form. */ @@ -32,6 +39,9 @@ export class EditFamilyMemberComponent implements OnInit { /** Family Members Details */ familyMemberDetails: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {Dates} dateUtils Date Utils @@ -40,14 +50,7 @@ export class EditFamilyMemberComponent implements OnInit { * @param {ClientsService} clientsService Clients Service * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private dateUtils: Dates, - private router: Router, - private route: ActivatedRoute, - private clientsService: ClientsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { clientTemplate: any; editFamilyMember: any }) => { this.addFamilyMemberTemplate = data.clientTemplate.familyMemberOptions; this.familyMemberDetails = data.editFamilyMember; diff --git a/src/app/clients/clients-view/family-members-tab/family-members-tab.component.html b/src/app/clients/clients-view/family-members-tab/family-members-tab.component.html index 48bb848415..880f01331f 100644 --- a/src/app/clients/clients-view/family-members-tab/family-members-tab.component.html +++ b/src/app/clients/clients-view/family-members-tab/family-members-tab.component.html @@ -9,57 +9,66 @@ {{ 'labels.heading.Family Members' | translate }} - - - - {{ displayName(member) }} - - - {{ member.relationship }} - - - - - - - - - - - - - - - - {{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }} - {{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }} - {{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }} - {{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }} - {{ 'labels.inputs.Mobile Number' | translate }} : {{ member.mobileNumber }} - {{ 'labels.inputs.Age' | translate }} : {{ member.age }} - {{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent | yesNo }} - {{ 'labels.inputs.Marital Status' | translate }} : {{ member.maritalStatus }} - {{ 'labels.inputs.Gender' | translate }} : {{ member.gender }} - {{ 'labels.inputs.Profession' | translate }} : {{ member.profession }} - {{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }} - - + @for (member of clientFamilyMembers; track member; let i = $index) { + + + + {{ displayName(member) }} + + + {{ member.relationship }} + + + + + + + + + + + + + @if (member.firstName) { + {{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }} + } + @if (member.middleName) { + {{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }} + } + @if (member.lastName) { + {{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }} + } + @if (member.qualification) { + {{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }} + } + @if (member.mobileNumber) { + {{ 'labels.inputs.Mobile Number' | translate }} : {{ member.mobileNumber }} + } + @if (member.age) { + {{ 'labels.inputs.Age' | translate }} : {{ member.age }} + } + @if (member.isDependent) { + {{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent | yesNo }} + } + @if (member.maritalStatus) { + {{ 'labels.inputs.Marital Status' | translate }} : {{ member.maritalStatus }} + } + @if (member.gender) { + {{ 'labels.inputs.Gender' | translate }} : {{ member.gender }} + } + @if (member.profession) { + {{ 'labels.inputs.Profession' | translate }} : {{ member.profession }} + } + @if (member.dateOfBirth) { + {{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }} + } + + + } diff --git a/src/app/clients/clients-view/family-members-tab/family-members-tab.component.ts b/src/app/clients/clients-view/family-members-tab/family-members-tab.component.ts index 64c67a7ee7..662e9de9c5 100644 --- a/src/app/clients/clients-view/family-members-tab/family-members-tab.component.ts +++ b/src/app/clients/clients-view/family-members-tab/family-members-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterOutlet, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -43,19 +43,22 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FamilyMembersTabComponent { + private route = inject(ActivatedRoute); + private clientsService = inject(ClientsService); + dialog = inject(MatDialog); + /** Client Family Members */ clientFamilyMembers: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route * @param {ClientsService} clientsService Clients Service * @param {MatDialog }dialog Mat Dialog */ - constructor( - private route: ActivatedRoute, - private clientsService: ClientsService, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { clientFamilyMembers: any }) => { this.clientFamilyMembers = data.clientFamilyMembers; }); diff --git a/src/app/clients/clients-view/general-tab/general-tab.component.html b/src/app/clients/clients-view/general-tab/general-tab.component.html index c8bfb9c2f2..0d4e9e0ee8 100644 --- a/src/app/clients/clients-view/general-tab/general-tab.component.html +++ b/src/app/clients/clients-view/general-tab/general-tab.component.html @@ -123,179 +123,177 @@ {{ 'labels.heading.Loan Accounts' | translate }} - - - {{ 'labels.inputs.Account No' | translate }} - - - - - - - - {{ 'labels.inputs.Loan Product' | translate }} - - - - - - - {{ 'labels.inputs.Original Loan' | translate }} - {{ element.originalLoan }} - - - {{ 'labels.inputs.Loan Balance' | translate }} - {{ element.loanBalance | formatNumber }} - - - - {{ 'labels.inputs.Amount Paid' | translate }} - {{ element.amountPaid | formatNumber }} - - - - {{ 'labels.inputs.Type' | translate }} - - - - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - + + {{ 'labels.inputs.Account No' | translate }} + + + + + + + {{ 'labels.inputs.Loan Product' | translate }} + + + + + + {{ 'labels.inputs.Original Loan' | translate }} + {{ element.originalLoan }} + + + {{ 'labels.inputs.Loan Balance' | translate }} + {{ element.loanBalance | formatNumber }} + + + {{ 'labels.inputs.Amount Paid' | translate }} + {{ element.amountPaid | formatNumber }} + + + {{ 'labels.inputs.Type' | translate }} + + - - - - - - - - - + > + + + + {{ 'labels.inputs.Actions' | translate }} + + @if (element.status.active) { + + + + } + @if (element.status.pendingApproval) { + + + + + + } + @if (!element.status.pendingApproval && !element.status.active && !element.status.overpaid) { + + + + + + } + @if (!element.status.pendingApproval && !element.status.active && element.status.overpaid) { + + + + + + } + + + + + + } - - - {{ 'labels.inputs.Account No' | translate }} - - - - - - - - {{ 'labels.inputs.Loan Product' | translate }} - - - - - - - {{ 'labels.inputs.Original Loan' | translate }} - {{ element.lastActiveTransactionDate | dateFormat }} - - - - {{ 'labels.inputs.Loan Balance' | translate }} - {{ element.loanBalance | formatNumber }} - - - - {{ 'labels.inputs.Amount Paid' | translate }} - {{ element.accountBalance | formatNumber }} - - - - {{ 'labels.inputs.Type' | translate }} - - - - - - - {{ 'labels.inputs.Closed Date' | translate }} - {{ element.timeline.closedOnDate | dateFormat }} - - - - - + @if (showClosedLoanAccounts) { + + + {{ 'labels.inputs.Account No' | translate }} + + + + + + + {{ 'labels.inputs.Loan Product' | translate }} + + + + + + {{ 'labels.inputs.Original Loan' | translate }} + {{ element.lastActiveTransactionDate | dateFormat }} + + + {{ 'labels.inputs.Loan Balance' | translate }} + {{ element.loanBalance | formatNumber }} + + + {{ 'labels.inputs.Amount Paid' | translate }} + {{ element.accountBalance | formatNumber }} + + + {{ 'labels.inputs.Type' | translate }} + + + + + + {{ 'labels.inputs.Closed Date' | translate }} + {{ element.timeline.closedOnDate | dateFormat }} + + + + + } @@ -313,131 +311,124 @@ {{ 'labels.heading.Saving Accounts' | translate }} - - - {{ 'labels.inputs.Account No' | translate }} - - - - - - - - {{ 'labels.inputs.Savings Product' | translate }} - - - - - - - {{ 'labels.inputs.Last Active' | translate }} - {{ element.lastActiveTransactionDate | dateFormat }} - - - - {{ 'labels.inputs.Balance' | translate }} - {{ element.accountBalance | formatNumber }} - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - - - - - - - + @if (!showClosedSavingAccounts) { + + + {{ 'labels.inputs.Account No' | translate }} + + + + + + + {{ 'labels.inputs.Savings Product' | translate }} + + + + + + {{ 'labels.inputs.Last Active' | translate }} + {{ element.lastActiveTransactionDate | dateFormat }} + + + {{ 'labels.inputs.Balance' | translate }} + {{ element.accountBalance | formatNumber }} + + + {{ 'labels.inputs.Actions' | translate }} + + @if (element.status.active) { + + + + } + @if (element.status.active) { + + + + } + @if (element.status.submittedAndPendingApproval) { + + + + } + @if (!element.status.submittedAndPendingApproval && !element.status.active) { + + + + } + @if (!element.status.submittedAndPendingApproval && !element.status.active) { + + + + } + + + + + + } - - - {{ 'labels.inputs.Account No' | translate }} - - - - - - - - {{ 'labels.inputs.Savings Product' | translate }} - - - - - - - {{ 'labels.inputs.Closed Date' | translate }} - {{ element.timeline.closedOnDate | dateFormat }} - - - - - + @if (showClosedSavingAccounts) { + + + {{ 'labels.inputs.Account No' | translate }} + + + + + + + {{ 'labels.inputs.Savings Product' | translate }} + + + + + + {{ 'labels.inputs.Closed Date' | translate }} + {{ element.timeline.closedOnDate | dateFormat }} + + + + + } @@ -455,110 +446,101 @@ {{ 'labels.heading.Fixed Deposit Accounts' | translate }} - - - {{ 'labels.inputs.Account No' | translate }} - - - - - - - - {{ 'labels.inputs.Fixed Deposit Product' | translate }} - {{ element.productName }} - - - - {{ 'labels.inputs.Last Active' | translate }} - {{ element.lastActiveTransactionDate | dateFormat }} - - - - {{ 'labels.inputs.Balance' | translate }} - {{ element.accountBalance | formatNumber }} - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - + @if (!showClosedFixedAccounts) { + + + {{ 'labels.inputs.Account No' | translate }} + + + + + + + {{ 'labels.inputs.Fixed Deposit Product' | translate }} + {{ element.productName }} + + + {{ 'labels.inputs.Last Active' | translate }} + {{ element.lastActiveTransactionDate | dateFormat }} + + + {{ 'labels.inputs.Balance' | translate }} + {{ element.accountBalance | formatNumber }} + + + {{ 'labels.inputs.Actions' | translate }} + + @if (element.status.submittedAndPendingApproval) { + + + + } + @if (!element.status.submittedAndPendingApproval && !element.status.active) { + + + + } + @if (!element.status.submittedAndPendingApproval && !element.status.active) { + + + + } + + + + + + } - - - {{ 'labels.inputs.Account No' | translate }} - - - - - - - - {{ 'labels.inputs.Fixed Deposit Product' | translate }} - - - - - - - {{ 'labels.inputs.Closed Date' | translate }} - {{ element.timeline.closedOnDate | dateFormat }} - - - - - + @if (showClosedFixedAccounts) { + + + {{ 'labels.inputs.Account No' | translate }} + + + + + + + {{ 'labels.inputs.Fixed Deposit Product' | translate }} + + + + + + {{ 'labels.inputs.Closed Date' | translate }} + {{ element.timeline.closedOnDate | dateFormat }} + + + + + } @@ -576,118 +558,106 @@ {{ 'labels.heading.Recurring Deposit Accounts' | translate }} - - - {{ 'labels.inputs.Account No' | translate }} - - - - - - - - {{ 'labels.inputs.Recurring Deposit Product' | translate }} - - - - - - - {{ 'labels.inputs.Last Active' | translate }} - {{ element.lastActiveTransactionDate | dateFormat }} - - - - {{ 'labels.inputs.Balance' | translate }} - {{ element.accountBalance | formatNumber }} - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - - - - - + @if (!showClosedRecurringAccounts) { + + + {{ 'labels.inputs.Account No' | translate }} + + + + + + + {{ 'labels.inputs.Recurring Deposit Product' | translate }} + + + + + + {{ 'labels.inputs.Last Active' | translate }} + {{ element.lastActiveTransactionDate | dateFormat }} + + + {{ 'labels.inputs.Balance' | translate }} + {{ element.accountBalance | formatNumber }} + + + {{ 'labels.inputs.Actions' | translate }} + + @if (element.status.submittedAndPendingApproval) { + + + + } + @if (!element.status.submittedAndPendingApproval && !element.status.active) { + + + + + + + } + + + + + + } - - - {{ 'labels.inputs.Account No' | translate }} - - - - - - - - {{ 'labels.inputs.Recurring Deposit Product' | translate }} - - - - - - - {{ 'labels.inputs.Closed Date' | translate }} - {{ element.timeline.closedOnDate | dateFormat }} - - - - - + @if (showClosedRecurringAccounts) { + + + {{ 'labels.inputs.Account No' | translate }} + + + + + + + {{ 'labels.inputs.Recurring Deposit Product' | translate }} + + + + + + {{ 'labels.inputs.Closed Date' | translate }} + {{ element.timeline.closedOnDate | dateFormat }} + + + + + } @@ -705,113 +675,110 @@ {{ 'labels.inputs.Shares Accounts' | translate }} - - - {{ 'labels.inputs.Account No' | translate }} - - - - - - - - {{ 'labels.inputs.Share Product' | translate }} - - - - - - - {{ 'labels.inputs.Approved Shares' | translate }} - {{ element.totalApprovedShares }} - - - - {{ 'labels.inputs.Pending For Approval Shares' | translate }} - {{ element.totalPendingForApprovalShares }} - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - + @if (!showClosedShareAccounts) { + + + {{ 'labels.inputs.Account No' | translate }} + + + + + + + {{ 'labels.inputs.Share Product' | translate }} + + + + + + {{ 'labels.inputs.Approved Shares' | translate }} + {{ element.totalApprovedShares }} + + + {{ 'labels.inputs.Pending For Approval Shares' | translate }} + {{ element.totalPendingForApprovalShares }} + + + {{ 'labels.inputs.Actions' | translate }} + + @if (element.status.submittedAndPendingApproval) { + + + + } + @if (!element.status.submittedAndPendingApproval && !element.status.active) { + + + + } + @if (!element.status.submittedAndPendingApproval && !element.status.active) { + + + + } + + + + + + } - - - {{ 'labels.inputs.Account No' | translate }} - - - - - - - - {{ 'labels.inputs.Share Product' | translate }} - {{ element.productName }} - - - - {{ 'labels.inputs.Approved Shares' | translate }} - {{ element.totalApprovedShares }} - - - - {{ 'labels.inputs.Pending For Approval Shares' | translate }} - {{ element.totalPendingForApprovalShares }} - - - - {{ 'labels.inputs.Closed Date' | translate }} - {{ element.timeline.closedOnDate | dateFormat }} - - - - - + @if (showClosedShareAccounts) { + + + {{ 'labels.inputs.Account No' | translate }} + + + + + + + {{ 'labels.inputs.Share Product' | translate }} + {{ element.productName }} + + + {{ 'labels.inputs.Approved Shares' | translate }} + {{ element.totalApprovedShares }} + + + {{ 'labels.inputs.Pending For Approval Shares' | translate }} + {{ element.totalPendingForApprovalShares }} + + + {{ 'labels.inputs.Closed Date' | translate }} + {{ element.timeline.closedOnDate | dateFormat }} + + + + + } diff --git a/src/app/clients/clients-view/general-tab/general-tab.component.ts b/src/app/clients/clients-view/general-tab/general-tab.component.ts index f26c8926da..e88e135a2c 100644 --- a/src/app/clients/clients-view/general-tab/general-tab.component.ts +++ b/src/app/clients/clients-view/general-tab/general-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; /** Custom Services. */ @@ -16,7 +16,7 @@ import { MatRowDef, MatRow } from '@angular/material/table'; -import { NgClass, NgIf } from '@angular/common'; +import { NgClass } from '@angular/common'; import { AccountNumberComponent } from '../../../shared/account-number/account-number.component'; import { LongTextComponent } from '../../../shared/long-text/long-text.component'; import { MatTooltip } from '@angular/material/tooltip'; @@ -56,6 +56,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GeneralTabComponent { + private route = inject(ActivatedRoute); + private clientService = inject(ClientsService); + private router = inject(Router); + /** Open Loan Accounts Columns */ openLoansColumns: string[] = [ 'Account No', @@ -154,16 +158,15 @@ export class GeneralTabComponent { /** Client Id */ clientid: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route * @param {ClientsService} clientService Clients Service * @param {Router} router Router */ - constructor( - private route: ActivatedRoute, - private clientService: ClientsService, - private router: Router - ) { + constructor() { this.route.data.subscribe( (data: { clientAccountsData: any; clientChargesData: any; clientSummary: any; clientCollateralData: any }) => { this.clientAccountData = data.clientAccountsData; diff --git a/src/app/clients/clients-view/identities-tab/identities-tab.component.html b/src/app/clients/clients-view/identities-tab/identities-tab.component.html index 46c3e5b4aa..b7918f1aa9 100644 --- a/src/app/clients/clients-view/identities-tab/identities-tab.component.html +++ b/src/app/clients/clients-view/identities-tab/identities-tab.component.html @@ -37,14 +37,16 @@ {{ 'labels.heading.Identities' | translate }} {{ 'labels.inputs.Identity Documents' | translate }} - - {{ document.name }} - - + @for (document of identity.documents; track document) { + + {{ document.name }} + + + } diff --git a/src/app/clients/clients-view/identities-tab/identities-tab.component.ts b/src/app/clients/clients-view/identities-tab/identities-tab.component.ts index b4ae11604b..6666c05b43 100644 --- a/src/app/clients/clients-view/identities-tab/identities-tab.component.ts +++ b/src/app/clients/clients-view/identities-tab/identities-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatTable, @@ -29,7 +29,7 @@ import { UploadDocumentDialogComponent } from '../custom-dialogs/upload-document import { TranslateService } from '@ngx-translate/core'; import { ClientsService } from '../../clients.service'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; -import { NgStyle, NgFor } from '@angular/common'; +import { NgStyle } from '@angular/common'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; /** @@ -56,6 +56,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class IdentitiesTabComponent { + private route = inject(ActivatedRoute); + private dialog = inject(MatDialog); + private clientService = inject(ClientsService); + private translateService = inject(TranslateService); + /** Client Identities */ clientIdentities: any; /** Client Identifier Template */ @@ -76,17 +81,15 @@ export class IdentitiesTabComponent { /** Identifiers Table */ @ViewChild('identifiersTable', { static: true }) identifiersTable: MatTable; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route * @param {MatDialog} dialog Mat Dialog * @param {ClientsService} clientService Clients Service */ - constructor( - private route: ActivatedRoute, - private dialog: MatDialog, - private clientService: ClientsService, - private translateService: TranslateService - ) { + constructor() { this.clientId = this.route.parent.snapshot.paramMap.get('clientId'); this.route.data.subscribe((data: { clientIdentities: any; clientIdentifierTemplate: any }) => { this.clientIdentities = data.clientIdentities; diff --git a/src/app/clients/clients-view/notes-tab/notes-tab.component.ts b/src/app/clients/clients-view/notes-tab/notes-tab.component.ts index 7be778d2c8..644009f994 100644 --- a/src/app/clients/clients-view/notes-tab/notes-tab.component.ts +++ b/src/app/clients/clients-view/notes-tab/notes-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; /** Custom Components */ @@ -23,6 +23,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class NotesTabComponent implements OnInit { + private route = inject(ActivatedRoute); + private clientsService = inject(ClientsService); + private authenticationService = inject(AuthenticationService); + /** Client ID */ entityId: string; /** Username */ @@ -30,16 +34,15 @@ export class NotesTabComponent implements OnInit { /** Client Notes */ entityNotes: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route * @param {ClientsService} clientsService Clients Service * @param {AuthenticationService} authenticationService Authentication Service */ - constructor( - private route: ActivatedRoute, - private clientsService: ClientsService, - private authenticationService: AuthenticationService - ) { + constructor() { this.entityId = this.route.parent.snapshot.params['clientId']; this.addNote = this.addNote.bind(this); } diff --git a/src/app/clients/clients.component.html b/src/app/clients/clients.component.html index 6dfc9c0f2c..f0a74213c2 100644 --- a/src/app/clients/clients.component.html +++ b/src/app/clients/clients.component.html @@ -10,11 +10,13 @@ /> - - {{ 'labels.inputs.Show Closed Accounts' | translate }} - - + @if (existsClientsToFilter) { + + {{ 'labels.inputs.Show Closed Accounts' | translate }} + + + } - - - + @if (isLoading) { + + + + } diff --git a/src/app/clients/clients.component.ts b/src/app/clients/clients.component.ts index 12ec8c1bc8..ea421a42eb 100644 --- a/src/app/clients/clients.component.ts +++ b/src/app/clients/clients.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatCheckbox } from '@angular/material/checkbox'; import { MatPaginator, PageEvent } from '@angular/material/paginator'; import { MatSort, Sort, MatSortHeader } from '@angular/material/sort'; @@ -20,7 +20,7 @@ import { /** Custom Services */ import { environment } from '../../environments/environment'; import { ClientsService } from './clients.service'; -import { NgIf, NgClass } from '@angular/common'; +import { NgClass } from '@angular/common'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatProgressBar } from '@angular/material/progress-bar'; import { AccountNumberComponent } from '../shared/account-number/account-number.component'; @@ -57,6 +57,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ClientsComponent implements OnInit { + private clientService = inject(ClientsService); + @ViewChild('showClosedAccounts') showClosedAccounts: MatCheckbox; displayedColumns = [ @@ -84,7 +86,10 @@ export class ClientsComponent implements OnInit { @ViewChild(MatPaginator) paginator: MatPaginator; @ViewChild(MatSort) sort: MatSort; - constructor(private clientService: ClientsService) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { if (environment.preloadClients) { diff --git a/src/app/clients/clients.service.ts b/src/app/clients/clients.service.ts index de7a116c3a..c9bffc5a07 100644 --- a/src/app/clients/clients.service.ts +++ b/src/app/clients/clients.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { map, catchError } from 'rxjs/operators'; providedIn: 'root' }) export class ClientsService { + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. */ - constructor(private http: HttpClient) {} + constructor() {} getFilteredClients( orderBy: string, diff --git a/src/app/clients/common-resolvers/client-accounts.resolver.ts b/src/app/clients/common-resolvers/client-accounts.resolver.ts index 1e6b81a097..35eb1388ba 100644 --- a/src/app/clients/common-resolvers/client-accounts.resolver.ts +++ b/src/app/clients/common-resolvers/client-accounts.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientAccountsResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client Account data. diff --git a/src/app/clients/common-resolvers/client-actions.resolver.ts b/src/app/clients/common-resolvers/client-actions.resolver.ts index ba12936757..0bac2a5e26 100644 --- a/src/app/clients/common-resolvers/client-actions.resolver.ts +++ b/src/app/clients/common-resolvers/client-actions.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -14,14 +14,17 @@ import { ProductsService } from 'app/products/products.service'; */ @Injectable() export class ClientActionsResolver { + private clientsService = inject(ClientsService); + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} clientsService Clients service. * @param {ProductsService} productsService Products Service */ - constructor( - private clientsService: ClientsService, - private productsService: ProductsService - ) {} + constructor() {} /** * Returns the clients actions data. diff --git a/src/app/clients/common-resolvers/client-address-fieldconfiguration.resolver.ts b/src/app/clients/common-resolvers/client-address-fieldconfiguration.resolver.ts index e251360468..cca9cd4e15 100644 --- a/src/app/clients/common-resolvers/client-address-fieldconfiguration.resolver.ts +++ b/src/app/clients/common-resolvers/client-address-fieldconfiguration.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientAddressFieldConfigurationResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client Address Field Configuration. diff --git a/src/app/clients/common-resolvers/client-address-template.resolver.ts b/src/app/clients/common-resolvers/client-address-template.resolver.ts index 5e6cae3671..f59c3e129f 100644 --- a/src/app/clients/common-resolvers/client-address-template.resolver.ts +++ b/src/app/clients/common-resolvers/client-address-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientAddressTemplateResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client Address Field Configuration. diff --git a/src/app/clients/common-resolvers/client-address.resolver.ts b/src/app/clients/common-resolvers/client-address.resolver.ts index 99c2d4ea0a..96870dd94a 100644 --- a/src/app/clients/common-resolvers/client-address.resolver.ts +++ b/src/app/clients/common-resolvers/client-address.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientAddressResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client Address data. diff --git a/src/app/clients/common-resolvers/client-and-template.resolver.ts b/src/app/clients/common-resolvers/client-and-template.resolver.ts index ccbf94239d..f6952b073a 100644 --- a/src/app/clients/common-resolvers/client-and-template.resolver.ts +++ b/src/app/clients/common-resolvers/client-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientDataAndTemplateResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Clients data and template. diff --git a/src/app/clients/common-resolvers/client-charge-view.resolver.ts b/src/app/clients/common-resolvers/client-charge-view.resolver.ts index cf85e537f3..91bca6a1e1 100644 --- a/src/app/clients/common-resolvers/client-charge-view.resolver.ts +++ b/src/app/clients/common-resolvers/client-charge-view.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientChargeViewResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client Charge data. diff --git a/src/app/clients/common-resolvers/client-charges.resolver.ts b/src/app/clients/common-resolvers/client-charges.resolver.ts index ac74de215a..fd8e99cd30 100644 --- a/src/app/clients/common-resolvers/client-charges.resolver.ts +++ b/src/app/clients/common-resolvers/client-charges.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientChargesResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client Charge data. diff --git a/src/app/clients/common-resolvers/client-collateral.resolver.ts b/src/app/clients/common-resolvers/client-collateral.resolver.ts index 7d649782c1..ceeb54cd54 100644 --- a/src/app/clients/common-resolvers/client-collateral.resolver.ts +++ b/src/app/clients/common-resolvers/client-collateral.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientCollateralResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} clientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client Collateral data. diff --git a/src/app/clients/common-resolvers/client-datatable.resolver.ts b/src/app/clients/common-resolvers/client-datatable.resolver.ts index da6e35265d..e023886544 100644 --- a/src/app/clients/common-resolvers/client-datatable.resolver.ts +++ b/src/app/clients/common-resolvers/client-datatable.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientDatatableResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client datatables. diff --git a/src/app/clients/common-resolvers/client-datatables.resolver.ts b/src/app/clients/common-resolvers/client-datatables.resolver.ts index 2fd7fe022b..5340b48f19 100644 --- a/src/app/clients/common-resolvers/client-datatables.resolver.ts +++ b/src/app/clients/common-resolvers/client-datatables.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientDatatablesResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client datatables. diff --git a/src/app/clients/common-resolvers/client-document.resolver.ts b/src/app/clients/common-resolvers/client-document.resolver.ts index 7d7d4f4c5e..0910851598 100644 --- a/src/app/clients/common-resolvers/client-document.resolver.ts +++ b/src/app/clients/common-resolvers/client-document.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientDocumentsResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client's Documents data. diff --git a/src/app/clients/common-resolvers/client-family-member.resolver.ts b/src/app/clients/common-resolvers/client-family-member.resolver.ts index c11afbf1e3..f9a3378e56 100644 --- a/src/app/clients/common-resolvers/client-family-member.resolver.ts +++ b/src/app/clients/common-resolvers/client-family-member.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientFamilyMemberResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Clients data. diff --git a/src/app/clients/common-resolvers/client-family-members.resolver.ts b/src/app/clients/common-resolvers/client-family-members.resolver.ts index 7e44cbce22..14173ad99a 100644 --- a/src/app/clients/common-resolvers/client-family-members.resolver.ts +++ b/src/app/clients/common-resolvers/client-family-members.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientFamilyMembersResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Clients data. diff --git a/src/app/clients/common-resolvers/client-identifier-template.resolver.ts b/src/app/clients/common-resolvers/client-identifier-template.resolver.ts index 31c267f600..eea9040bcd 100644 --- a/src/app/clients/common-resolvers/client-identifier-template.resolver.ts +++ b/src/app/clients/common-resolvers/client-identifier-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientIdentifierTemplateResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client Identities data. * @returns {Observable} diff --git a/src/app/clients/common-resolvers/client-identities.resolver.ts b/src/app/clients/common-resolvers/client-identities.resolver.ts index ed3b4e1dbd..9910ed0f81 100644 --- a/src/app/clients/common-resolvers/client-identities.resolver.ts +++ b/src/app/clients/common-resolvers/client-identities.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -14,10 +14,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientIdentitiesResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client Identities data. * @returns {Observable} diff --git a/src/app/clients/common-resolvers/client-notes.resolver.ts b/src/app/clients/common-resolvers/client-notes.resolver.ts index 036ebc584f..70f6d2b679 100644 --- a/src/app/clients/common-resolvers/client-notes.resolver.ts +++ b/src/app/clients/common-resolvers/client-notes.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientNotesResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client's Notes. diff --git a/src/app/clients/common-resolvers/client-summary.resolver.ts b/src/app/clients/common-resolvers/client-summary.resolver.ts index 7ee7d43aab..e228ab0b34 100644 --- a/src/app/clients/common-resolvers/client-summary.resolver.ts +++ b/src/app/clients/common-resolvers/client-summary.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientSummaryResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client Summary data. diff --git a/src/app/clients/common-resolvers/client-template.resolver.ts b/src/app/clients/common-resolvers/client-template.resolver.ts index a4ea203640..b8cc506893 100644 --- a/src/app/clients/common-resolvers/client-template.resolver.ts +++ b/src/app/clients/common-resolvers/client-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientTemplateResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client Template data. diff --git a/src/app/clients/common-resolvers/client-transaction-pay.resolver.ts b/src/app/clients/common-resolvers/client-transaction-pay.resolver.ts index c694f12149..3caec00234 100644 --- a/src/app/clients/common-resolvers/client-transaction-pay.resolver.ts +++ b/src/app/clients/common-resolvers/client-transaction-pay.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientTransactionPayResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Client Transaction data. diff --git a/src/app/clients/common-resolvers/client-view.resolver.ts b/src/app/clients/common-resolvers/client-view.resolver.ts index b2a015f8e9..de2074db22 100644 --- a/src/app/clients/common-resolvers/client-view.resolver.ts +++ b/src/app/clients/common-resolvers/client-view.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ClientsService } from '../clients.service'; */ @Injectable() export class ClientViewResolver { + private clientsService = inject(ClientsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ClientsService} ClientsService Clients service. */ - constructor(private clientsService: ClientsService) {} + constructor() {} /** * Returns the Clients data. diff --git a/src/app/clients/create-client/create-client.component.html b/src/app/clients/create-client/create-client.component.html index 8385fbc645..382bdc86e2 100644 --- a/src/app/clients/create-client/create-client.component.html +++ b/src/app/clients/create-client/create-client.component.html @@ -38,33 +38,36 @@ > - - {{ 'labels.inputs.ADDRESS' | translate }} + @if (clientTemplate.isAddressEnabled) { + + {{ 'labels.inputs.ADDRESS' | translate }} + + + + } - - - - - - {{ datatable.registeredTableName }} - - - - - - {{ 'labels.inputs.PREVIEW' | translate }} + @for (datatable of datatables; track datatable) { + + {{ datatable.registeredTableName }} + + + } - - - + @if (areFormvalids()) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/clients/create-client/create-client.component.ts b/src/app/clients/create-client/create-client.component.ts index 5397787208..2b0e4414c2 100644 --- a/src/app/clients/create-client/create-client.component.ts +++ b/src/app/clients/create-client/create-client.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, QueryList, ViewChild, ViewChildren } from '@angular/core'; +import { Component, QueryList, ViewChild, ViewChildren, inject } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; /** Custom Services */ @@ -40,6 +40,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateClientComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private clientsService = inject(ClientsService); + private settingsService = inject(SettingsService); + /** Client General Step */ @ViewChild(ClientGeneralStepComponent, { static: true }) clientGeneralStep: ClientGeneralStepComponent; /** Client Family Members Step */ @@ -57,6 +62,9 @@ export class CreateClientComponent { /** Client Address Field Config */ clientAddressFieldConfig: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches client and address template from `resolve` * @param {ActivatedRoute} route Activated Route @@ -64,12 +72,7 @@ export class CreateClientComponent { * @param {ClientsService} clientsService Clients Service * @param {SettingsService} settingsService Setting service */ - constructor( - private route: ActivatedRoute, - private router: Router, - private clientsService: ClientsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { clientTemplate: any; clientAddressFieldConfig: any }) => { this.clientTemplate = data.clientTemplate; this.clientAddressFieldConfig = data.clientAddressFieldConfig; diff --git a/src/app/clients/edit-client/edit-client.component.html b/src/app/clients/edit-client/edit-client.component.html index 80f1b6bf0b..e48bd040ce 100644 --- a/src/app/clients/edit-client/edit-client.component.html +++ b/src/app/clients/edit-client/edit-client.component.html @@ -7,22 +7,28 @@ {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeOptions; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editClientForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Legal Form' | translate }} - - {{ legalForm.value }} - + @for (legalForm of legalFormOptions; track legalForm) { + + {{ legalForm.value }} + + } @@ -39,39 +45,53 @@ - - {{ - 'labels.inputs.' + getDateLabel(legalFormId, ['Name', 'Entity Name']) | translate - }} - - - {{ 'labels.inputs.Client name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (editClientForm.contains('fullname')) { + + {{ + 'labels.inputs.' + getDateLabel(legalFormId, ['Name', 'Entity Name']) | translate + }} + + @if (editClientForm.controls.fullname.hasError('required')) { + + {{ 'labels.inputs.Client name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.First Name' | translate }} - - - {{ 'labels.inputs.Client first name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (editClientForm.contains('firstname')) { + + {{ 'labels.inputs.First Name' | translate }} + + @if (editClientForm.controls.firstname.hasError('required')) { + + {{ 'labels.inputs.Client first name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Middle Name' | translate }} - - + @if (editClientForm.contains('middlename')) { + + {{ 'labels.inputs.Middle Name' | translate }} + + + } - - {{ 'labels.inputs.Last Name' | translate }} - - - {{ 'labels.inputs.Client last name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (editClientForm.contains('lastname')) { + + {{ 'labels.inputs.Last Name' | translate }} + + @if (editClientForm.controls.lastname.hasError('required')) { + + {{ 'labels.inputs.Client last name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } @@ -87,14 +107,18 @@ - - {{ 'labels.inputs.Gender' | translate }} - - - {{ gender.name }} - - - + @if (legalFormId === 1) { + + {{ 'labels.inputs.Gender' | translate }} + + @for (gender of genderOptions; track gender) { + + {{ gender.name }} + + } + + + } @@ -102,68 +126,65 @@ {{ 'labels.inputs.Staff' | translate }} - - {{ staff.displayName }} - + @for (staff of staffOptions; track staff) { + + {{ staff.displayName }} + + } - - {{ 'labels.inputs.Is staff' | translate }}? - + @if (legalFormId === 1) { + + {{ 'labels.inputs.Is staff' | translate }}? + + } - - - {{ 'labels.inputs.Constitution' | translate }} - - - {{ constitution.name }} - - - - - - {{ 'labels.inputs.Main Business Line' | translate }} - - - {{ business.name }} - - - - - - {{ 'labels.inputs.Incorporation Validity Till Date' | translate }} - - - - - - - {{ 'labels.inputs.Incorporation No' | translate }} - - - - - {{ 'labels.inputs.Remarks' | translate }} - - - + @if (editClientForm.contains('clientNonPersonDetails')) { + + + {{ 'labels.inputs.Constitution' | translate }} + + @for (constitution of constitutionOptions; track constitution) { + + {{ constitution.name }} + + } + + + + {{ 'labels.inputs.Main Business Line' | translate }} + + @for (business of businessLineOptions; track business) { + + {{ business.name }} + + } + + + + {{ 'labels.inputs.Incorporation Validity Till Date' | translate }} + + + + + + {{ 'labels.inputs.Incorporation No' | translate }} + + + + {{ 'labels.inputs.Remarks' | translate }} + + + + } @@ -175,7 +196,9 @@ {{ 'labels.inputs.Email Address' | translate }} - Email not valid + @if (editClientForm.controls.emailAddress.errors?.email) { + Email not valid + } @@ -184,21 +207,22 @@ {{ 'labels.inputs.Client Type' | translate }} - - {{ clientType.name }} - + @for (clientType of clientTypeOptions; track clientType) { + + {{ clientType.name }} + + } {{ 'labels.inputs.Client Classification' | translate }} - - {{ clientClassification.name }} - + @for (clientClassification of clientClassificationTypeOptions; track clientClassification) { + + {{ clientClassification.name }} + + } @@ -217,10 +241,12 @@ /> - - {{ 'labels.inputs.Submitted Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editClientForm.controls.submittedOnDate.hasError('required')) { + + {{ 'labels.inputs.Submitted Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/clients/edit-client/edit-client.component.ts b/src/app/clients/edit-client/edit-client.component.ts index ecfbad552a..d7e501aa72 100644 --- a/src/app/clients/edit-client/edit-client.component.ts +++ b/src/app/clients/edit-client/edit-client.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { UntypedFormBuilder, @@ -33,6 +33,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditClientComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private clientsService = inject(ClientsService); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -61,6 +68,9 @@ export class EditClientComponent implements OnInit { genderOptions: any; legalFormId = 1; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches client template data from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -70,14 +80,7 @@ export class EditClientComponent implements OnInit { * @param {Dates} dateUtils Date Utils * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private clientsService: ClientsService, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { clientDataAndTemplate: any }) => { this.clientDataAndTemplate = data.clientDataAndTemplate; }); diff --git a/src/app/collaterals/collaterals.service.ts b/src/app/collaterals/collaterals.service.ts index 07674412e7..c7bc6d21cc 100644 --- a/src/app/collaterals/collaterals.service.ts +++ b/src/app/collaterals/collaterals.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -11,10 +11,15 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class CollateralsService { + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. */ - constructor(private http: HttpClient) {} + constructor() {} getFilteredClients( orderBy: string, diff --git a/src/app/collaterals/common-resolvers/client-collateral.resolver.ts b/src/app/collaterals/common-resolvers/client-collateral.resolver.ts index 06e9baeeb2..d974d2846f 100644 --- a/src/app/collaterals/common-resolvers/client-collateral.resolver.ts +++ b/src/app/collaterals/common-resolvers/client-collateral.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { CollateralsService } from '../collaterals.service'; */ @Injectable() export class ClientCollateralResolver { + private collateralsService = inject(CollateralsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {CollateralsService} collateralsService Collaterals service. */ - constructor(private collateralsService: CollateralsService) {} + constructor() {} /** * Returns the Client Collateral data. diff --git a/src/app/collaterals/edit-collateral/edit-collateral.component.html b/src/app/collaterals/edit-collateral/edit-collateral.component.html index 7412e9ba83..420651e3c8 100644 --- a/src/app/collaterals/edit-collateral/edit-collateral.component.html +++ b/src/app/collaterals/edit-collateral/edit-collateral.component.html @@ -12,10 +12,12 @@ {{ 'labels.inputs.Quantity' | translate }} - - {{ 'labels.inputs.Quantity' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (clientCollateralForm.controls.quantity.hasError('required')) { + + {{ 'labels.inputs.Quantity' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/collaterals/edit-collateral/edit-collateral.component.ts b/src/app/collaterals/edit-collateral/edit-collateral.component.ts index 2a8529b3ef..ecbf3991f7 100644 --- a/src/app/collaterals/edit-collateral/edit-collateral.component.ts +++ b/src/app/collaterals/edit-collateral/edit-collateral.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -17,6 +17,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditCollateralComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + private collateralService = inject(CollateralsService); + /** Client Collateral Form */ clientCollateralForm: UntypedFormGroup; /** Client Collateral Options */ @@ -26,6 +32,9 @@ export class EditCollateralComponent implements OnInit { /** Collateral Details */ collateralDetails: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retirives Collateral Form from `resolve` * @param {FormBuilder} formBuilder Form bUilder. @@ -34,13 +43,7 @@ export class EditCollateralComponent implements OnInit { * @param {SettingsService} settingsService Settings Service * @param {CollateralsService} collateralService Collateral Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService, - private collateralService: CollateralsService - ) { + constructor() { this.route.data.subscribe((data: { clientCollateralData: any }) => { this.collateralDetails = data.clientCollateralData; }); diff --git a/src/app/collaterals/view-collateral/view-collateral.component.ts b/src/app/collaterals/view-collateral/view-collateral.component.ts index e01a8acd6f..e8cc5d4f08 100644 --- a/src/app/collaterals/view-collateral/view-collateral.component.ts +++ b/src/app/collaterals/view-collateral/view-collateral.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { CollateralsService } from '../collaterals.service'; import { MatDialog } from '@angular/material/dialog'; @@ -44,6 +44,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewCollateralComponent { + private route = inject(ActivatedRoute); + private collateralsService = inject(CollateralsService); + private router = inject(Router); + private dialog = inject(MatDialog); + clientCollateralData: any; collateralColumns: string[] = [ @@ -53,12 +58,10 @@ export class ViewCollateralComponent { 'Last Repayment Date' ]; - constructor( - private route: ActivatedRoute, - private collateralsService: CollateralsService, - private router: Router, - private dialog: MatDialog - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { clientCollateralData: any }) => { this.clientCollateralData = data.clientCollateralData; }); diff --git a/src/app/collections/collection-sheet/collection-sheet.component.html b/src/app/collections/collection-sheet/collection-sheet.component.html index d17ccc53e7..01a7d647ff 100644 --- a/src/app/collections/collection-sheet/collection-sheet.component.html +++ b/src/app/collections/collection-sheet/collection-sheet.component.html @@ -4,60 +4,80 @@ {{ 'labels.inputs.Branch Office' | translate }} - - {{ office.name }} - + @for (office of officesData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Branch Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (collectionSheetForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Branch Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Meeting Date' | translate }} - - - - - {{ 'labels.inputs.Meeting Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (officeId !== null) { + + {{ 'labels.inputs.Meeting Date' | translate }} + + + + @if (collectionSheetForm.controls.meetingDate.hasError('required')) { + + {{ 'labels.inputs.Meeting Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Staff' | translate }} - - - {{ loanOfficer.displayName }} - - - + @if (officeId !== null) { + + {{ 'labels.inputs.Staff' | translate }} + + @for (loanOfficer of loanOfficerData; track loanOfficer) { + + {{ loanOfficer.displayName }} + + } + + + } - - {{ 'labels.inputs.Group' | translate }} - - - {{ group.name }} - - - + @if (officeId !== null) { + + {{ 'labels.inputs.Group' | translate }} + + @for (group of groupsData; track group) { + + {{ group.name }} + + } + + + } - - {{ 'labels.inputs.Center' | translate }} - - - {{ center.name }} - - - + @if (officeId !== null) { + + {{ 'labels.inputs.Center' | translate }} + + @for (center of centersData; track center) { + + {{ center.name }} + + } + + + } diff --git a/src/app/collections/collection-sheet/collection-sheet.component.ts b/src/app/collections/collection-sheet/collection-sheet.component.ts index 24eaf8d683..1b9ae43d31 100644 --- a/src/app/collections/collection-sheet/collection-sheet.component.ts +++ b/src/app/collections/collection-sheet/collection-sheet.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; import { CollectionsService } from '../collections.service'; import { ActivatedRoute, Router } from '@angular/router'; @@ -22,6 +22,15 @@ import { CollectionSheetData, JLGGroupData, MeetingFallCenter } from '../models/ ] }) export class CollectionSheetComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private centerService = inject(CentersService); + private collectionsService = inject(CollectionsService); + private organizationService = inject(OrganizationService); + private router = inject(Router); + private route = inject(ActivatedRoute); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + /** Offices Data */ officesData: any; /** Group Data */ @@ -40,6 +49,9 @@ export class CollectionSheetComponent implements OnInit { officeId: number | null = null; meetingFallCenters: MeetingFallCenter[] | null = null; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -50,16 +62,7 @@ export class CollectionSheetComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private centerService: CentersService, - private collectionsService: CollectionsService, - private organizationService: OrganizationService, - private router: Router, - private route: ActivatedRoute, - private settingsService: SettingsService, - private dateUtils: Dates - ) { + constructor() { this.route.data.subscribe((data: { officesData: any }) => { this.officesData = data.officesData; }); diff --git a/src/app/collections/collections.service.ts b/src/app/collections/collections.service.ts index cbf471c277..daff34e64d 100644 --- a/src/app/collections/collections.service.ts +++ b/src/app/collections/collections.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -12,7 +12,12 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class CollectionsService { - constructor(private http: HttpClient) {} + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} /** * Retrieves the Collection Sheet Data diff --git a/src/app/collections/individual-collection-sheet/individual-collection-sheet.component.html b/src/app/collections/individual-collection-sheet/individual-collection-sheet.component.html index 9e856978bf..6cfffbdf24 100644 --- a/src/app/collections/individual-collection-sheet/individual-collection-sheet.component.html +++ b/src/app/collections/individual-collection-sheet/individual-collection-sheet.component.html @@ -1,170 +1,173 @@ - - - - - {{ 'labels.text.No repayments and disbursal' | translate }} - - - - - - - {{ 'labels.inputs.Branch Office' | translate }} - - - {{ office.name }} - - - - {{ 'labels.inputs.Branch Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Repayment Date' | translate }} - - - - - {{ 'labels.inputs.Repayment Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Staff' | translate }} - - - {{ loanOfficer.displayName }} - - - - - - - {{ 'labels.buttons.Cancel' | translate }} - - {{ 'labels.buttons.Collection Sheet' | translate }} - - - - - - - - - - - {{ 'labels.buttons.Parameters' | translate }} - +@if (!isCollapsed) { + + @if (noData) { + + + + {{ 'labels.text.No repayments and disbursal' | translate }} + + + } + + + + {{ 'labels.inputs.Branch Office' | translate }} + + @for (office of officesData; track office) { + + {{ office.name }} + + } + + @if (collectionSheetForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Branch Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Repayment Date' | translate }} + + + + @if (collectionSheetForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Repayment Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Staff' | translate }} + + @for (loanOfficer of loanOfficerData; track loanOfficer) { + + {{ loanOfficer.displayName }} + + } + + - - - {{ 'labels.heading.Due Collections' | translate }} - - - - {{ 'labels.inputs.Loan Account' | translate }} # - {{ loan.accountId }} - - - - {{ 'labels.inputs.Product Name' | translate }} - {{ loan.productShortName }}({{ loan.productId }}) - - - - {{ 'labels.inputs.Client Name' | translate }} - {{ loan.clientName }}({{ loan.clientId }}) - - - - {{ 'labels.inputs.Total Due' | translate }} - {{ loan.totalDue }} - - - - {{ 'labels.inputs.Charges' | translate }} - {{ loan.feeDue }} - - - - {{ 'labels.inputs.Actions' | translate }} - - - {{ 'labels.buttons.Add Payment' | translate }} - - - - - - - - - - - - - {{ 'labels.inputs.Due Savings Collections' | translate }} - - - - {{ 'labels.inputs.Deposit Account' | translate }} - {{ saving.depositAccountType }} - - - - - {{ 'labels.inputs.Savings Account' | translate }} # - - {{ saving.accountId }} - - - - {{ 'labels.inputs.Product Name' | translate }} - {{ saving.productName }}({{ saving.productId }}) - - - - {{ 'labels.inputs.Client Name' | translate }} - {{ saving.clientName }}({{ saving.clientId }}) - - - - {{ 'labels.inputs.Total Due' | translate }} - {{ saving.dueAmount }} - - - - {{ 'labels.inputs.Actions' | translate }} - - - {{ 'labels.buttons.Add Payment' | translate }} - - - - - - - - - - - {{ 'labels.buttons.Cancel' | translate }} - {{ 'labels.buttons.Submit' | translate }} + + {{ 'labels.buttons.Collection Sheet' | translate }} + - - + + +} + + + @if (isCollapsed) { + + + + + {{ 'labels.buttons.Parameters' | translate }} + + + @if (loansDataSource) { + {{ 'labels.heading.Due Collections' | translate }} + + + + {{ 'labels.inputs.Loan Account' | translate }} # + + {{ loan.accountId }} + + + {{ 'labels.inputs.Product Name' | translate }} + {{ loan.productShortName }}({{ loan.productId }}) + + + {{ 'labels.inputs.Client Name' | translate }} + {{ loan.clientName }}({{ loan.clientId }}) + + + {{ 'labels.inputs.Total Due' | translate }} + {{ loan.totalDue }} + + + {{ 'labels.inputs.Charges' | translate }} + {{ loan.feeDue }} + + + {{ 'labels.inputs.Actions' | translate }} + + + {{ 'labels.buttons.Add Payment' | translate }} + + + + + + + + } + @if (savingsDataSource) { + {{ 'labels.inputs.Due Savings Collections' | translate }} + + + + {{ 'labels.inputs.Deposit Account' | translate }} + + {{ saving.depositAccountType }} + + + + {{ 'labels.inputs.Savings Account' | translate }} # + + {{ saving.accountId }} + + + {{ 'labels.inputs.Product Name' | translate }} + {{ saving.productName }}({{ saving.productId }}) + + + {{ 'labels.inputs.Client Name' | translate }} + {{ saving.clientName }}({{ saving.clientId }}) + + + {{ 'labels.inputs.Total Due' | translate }} + {{ saving.dueAmount }} + + + {{ 'labels.inputs.Actions' | translate }} + + + {{ 'labels.buttons.Add Payment' | translate }} + + + + + + + + } + + + {{ 'labels.buttons.Cancel' | translate }} + + + {{ 'labels.buttons.Submit' | translate }} + + + + + } diff --git a/src/app/collections/individual-collection-sheet/individual-collection-sheet.component.ts b/src/app/collections/individual-collection-sheet/individual-collection-sheet.component.ts index 7f06268afa..c372b70fa2 100644 --- a/src/app/collections/individual-collection-sheet/individual-collection-sheet.component.ts +++ b/src/app/collections/individual-collection-sheet/individual-collection-sheet.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -63,6 +63,15 @@ import { OrganizationService } from 'app/organization/organization.service'; ] }) export class IndividualCollectionSheetComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private collectionsService = inject(CollectionsService); + private organizationService = inject(OrganizationService); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + dialog = inject(MatDialog); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Offices Data */ officesData: any; /** Loan Officer Data */ @@ -124,6 +133,9 @@ export class IndividualCollectionSheetComponent implements OnInit { /** Sorter for table. */ @ViewChild(MatSort, { read: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -134,16 +146,7 @@ export class IndividualCollectionSheetComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private collectionsService: CollectionsService, - private organizationService: OrganizationService, - private route: ActivatedRoute, - private dateUtils: Dates, - public dialog: MatDialog, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { officesData: any }) => { this.officesData = data.officesData; }); diff --git a/src/app/configuration-wizard/completion-dialog/completion-dialog.component.ts b/src/app/configuration-wizard/completion-dialog/completion-dialog.component.ts index 54e4e16b29..969140d42f 100644 --- a/src/app/configuration-wizard/completion-dialog/completion-dialog.component.ts +++ b/src/app/configuration-wizard/completion-dialog/completion-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -30,8 +30,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CompletionDialogComponent { - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} } diff --git a/src/app/configuration-wizard/configuration-wizard.component.ts b/src/app/configuration-wizard/configuration-wizard.component.ts index 3197fec71a..c5b3334d3e 100644 --- a/src/app/configuration-wizard/configuration-wizard.component.ts +++ b/src/app/configuration-wizard/configuration-wizard.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -33,12 +33,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ConfigurationWizardComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + show: number; + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); /** * @param {MatDialogRef} dialogRef MatDialogRef. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/configuration-wizard/continue-setup-dialog/continue-setup-dialog.component.ts b/src/app/configuration-wizard/continue-setup-dialog/continue-setup-dialog.component.ts index 6470d917e4..ba2ca47724 100644 --- a/src/app/configuration-wizard/continue-setup-dialog/continue-setup-dialog.component.ts +++ b/src/app/configuration-wizard/continue-setup-dialog/continue-setup-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,16 +28,21 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ContinueSetupDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + /* Current Step Name*/ stepName: number; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef MatDialogRef. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) { + constructor() { + const data = this.data; + this.stepName = data.stepName; } } diff --git a/src/app/configuration-wizard/next-step-dialog/next-step-dialog.component.ts b/src/app/configuration-wizard/next-step-dialog/next-step-dialog.component.ts index 6776b69858..f62abc6711 100644 --- a/src/app/configuration-wizard/next-step-dialog/next-step-dialog.component.ts +++ b/src/app/configuration-wizard/next-step-dialog/next-step-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -30,6 +30,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class NextStepDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + /* Step Percentage */ stepPercentage: number; /* Next Step Name */ @@ -37,13 +40,15 @@ export class NextStepDialogComponent { /* Previous Step Name*/ previousStepName: string; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef MatDialogRef. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) { + constructor() { + const data = this.data; + this.stepPercentage = data.stepPercentage; this.nextStepName = data.nextStepName; this.previousStepName = data.previousStepName; diff --git a/src/app/configuration-wizard/popover/popover-arrow.directive.ts b/src/app/configuration-wizard/popover/popover-arrow.directive.ts index 59761a51a0..c2543a8a8a 100644 --- a/src/app/configuration-wizard/popover/popover-arrow.directive.ts +++ b/src/app/configuration-wizard/popover/popover-arrow.directive.ts @@ -1,5 +1,5 @@ /* Angular Imports */ -import { Directive, Renderer2, ElementRef, HostBinding, ChangeDetectorRef, OnDestroy } from '@angular/core'; +import { Directive, Renderer2, ElementRef, HostBinding, ChangeDetectorRef, OnDestroy, inject } from '@angular/core'; /* rxjs Imports */ import { Subscription } from 'rxjs'; @@ -13,6 +13,9 @@ import { PopoverRef } from './popover-ref'; */ @Directive({ selector: '[mifosxPopoverArrow]' }) export class PopoverArrowDirective implements OnDestroy { + private popoverRef = inject(PopoverRef); + private cd = inject(ChangeDetectorRef); + @HostBinding('style.width.px') @HostBinding('style.height.px') arrowSize: number; @@ -31,14 +34,16 @@ export class PopoverArrowDirective implements OnDestroy { private subscription = new Subscription(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {PopoverRef} popoverRef PopoverRef. * @param {ChangeDetectorRef} cd ChangeDetectorRef */ - constructor( - private popoverRef: PopoverRef, - private cd: ChangeDetectorRef - ) { + constructor() { + const popoverRef = this.popoverRef; + this.arrowSize = popoverRef.config.arrowSize; this.subscription = popoverRef.positionChanges().subscribe((p) => { diff --git a/src/app/configuration-wizard/popover/popover-close.directive.ts b/src/app/configuration-wizard/popover/popover-close.directive.ts index 5247b6dc28..2b614698a9 100644 --- a/src/app/configuration-wizard/popover/popover-close.directive.ts +++ b/src/app/configuration-wizard/popover/popover-close.directive.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Directive, HostListener, Input, Optional } from '@angular/core'; +import { Directive, HostListener, Input, inject } from '@angular/core'; /** Popover Ref */ import { PopoverRef } from './popover-ref'; @@ -9,12 +9,17 @@ import { PopoverRef } from './popover-ref'; */ @Directive({ selector: '[mifosxPopoverClose]' }) export class PopoverCloseDirective { + private popoverRef = inject>(PopoverRef, { optional: true }); + @Input('mifosxPopoverClose') popoverResult: T; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {PopoverRef} popoverRef PopoverRef. */ - constructor(@Optional() private popoverRef: PopoverRef) {} + constructor() {} @HostListener('click') onClick(): void { if (!this.popoverRef) { diff --git a/src/app/configuration-wizard/popover/popover.service.ts b/src/app/configuration-wizard/popover/popover.service.ts index 1426a57d1e..d47d5bec5f 100644 --- a/src/app/configuration-wizard/popover/popover.service.ts +++ b/src/app/configuration-wizard/popover/popover.service.ts @@ -7,7 +7,7 @@ import { ConnectionPositionPair } from '@angular/cdk/overlay'; import { ComponentPortal, TemplatePortal } from '@angular/cdk/portal'; -import { Injectable, InjectionToken, Injector, TemplateRef, ElementRef } from '@angular/core'; +import { Injectable, InjectionToken, Injector, TemplateRef, ElementRef, inject } from '@angular/core'; /* Custom Imports */ import { PopoverConfig } from './popover-config'; @@ -35,14 +35,17 @@ const defaultConfig: PopoverConfig = { providedIn: 'root' }) export class PopoverService { + private overlay = inject(Overlay); + private injector = inject(Injector); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {Injector} injector Injector. * @param {overlay} overlay Overlay. */ - constructor( - private overlay: Overlay, - private injector: Injector - ) {} + constructor() {} /** * Opens the popover at target element diff --git a/src/app/core/authentication/authentication.guard.ts b/src/app/core/authentication/authentication.guard.ts index b7dde88999..d43d895dfb 100644 --- a/src/app/core/authentication/authentication.guard.ts +++ b/src/app/core/authentication/authentication.guard.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { Router } from '@angular/router'; /** Custom Services */ @@ -14,14 +14,17 @@ const log = new Logger('AuthenticationGuard'); */ @Injectable() export class AuthenticationGuard { + private router = inject(Router); + private authenticationService = inject(AuthenticationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {Router} router Router for navigation. * @param {AuthenticationService} authenticationService Authentication Service. */ - constructor( - private router: Router, - private authenticationService: AuthenticationService - ) {} + constructor() {} /** * Ensures route access is authorized only when user is authenticated, otherwise redirects to login. diff --git a/src/app/core/authentication/authentication.interceptor.ts b/src/app/core/authentication/authentication.interceptor.ts index 1204557ab2..1bd0ff5ab6 100644 --- a/src/app/core/authentication/authentication.interceptor.ts +++ b/src/app/core/authentication/authentication.interceptor.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http'; /** rxjs Imports */ @@ -27,7 +27,12 @@ const twoFactorAccessTokenHeader = 'Fineract-Platform-TFA-Token'; */ @Injectable() export class AuthenticationInterceptor implements HttpInterceptor { - constructor(private settingsService: SettingsService) {} + private settingsService = inject(SettingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} /** * Intercepts a Http request and sets the request headers. diff --git a/src/app/core/authentication/authentication.service.ts b/src/app/core/authentication/authentication.service.ts index 417b49cfe2..593e04aaf1 100644 --- a/src/app/core/authentication/authentication.service.ts +++ b/src/app/core/authentication/authentication.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams, HttpHeaders } from '@angular/common/http'; /** rxjs Imports */ @@ -25,6 +25,10 @@ import { OAuth2Token } from './o-auth2-token.model'; */ @Injectable() export class AuthenticationService { + private http = inject(HttpClient); + private alertService = inject(AlertService); + private authenticationInterceptor = inject(AuthenticationInterceptor); + changePassword(userId: string, passwordObj: any) { return this.http.put(`/users/${userId}`, passwordObj); } @@ -54,6 +58,9 @@ export class AuthenticationService { /** Key to store two factor authentication token in storage. */ private twoFactorAuthenticationTokenStorageKey = 'mifosXTwoFactorAuthenticationToken'; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Initializes the type of storage and authorization headers depending on whether * credentials are presently in storage or not. @@ -61,11 +68,9 @@ export class AuthenticationService { * @param {AlertService} alertService Alert Service. * @param {AuthenticationInterceptor} authenticationInterceptor Authentication Interceptor. */ - constructor( - private http: HttpClient, - private alertService: AlertService, - private authenticationInterceptor: AuthenticationInterceptor - ) { + constructor() { + const authenticationInterceptor = this.authenticationInterceptor; + this.userLoggedIn = false; this.rememberMe = false; this.storage = sessionStorage; diff --git a/src/app/core/core.module.ts b/src/app/core/core.module.ts index 3e26d95ae1..e6d46e8ba5 100644 --- a/src/app/core/core.module.ts +++ b/src/app/core/core.module.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { NgModule, Optional, SkipSelf, Injector } from '@angular/core'; +import { NgModule, Optional, Injector, inject } from '@angular/core'; import { HTTP_INTERCEPTORS, HttpClient, @@ -112,7 +112,12 @@ import { ContentComponent } from './shell/content/content.component'; ] }) export class CoreModule { - constructor(@Optional() @SkipSelf() parentModule: CoreModule) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { + const parentModule = inject(CoreModule, { optional: true, skipSelf: true }); + // Import guard if (parentModule) { throw new Error(`${parentModule} has already been loaded. Import Core module in the AppModule only.`); diff --git a/src/app/core/http/api-prefix.interceptor.ts b/src/app/core/http/api-prefix.interceptor.ts index 60ef891a89..0d88fdb82c 100644 --- a/src/app/core/http/api-prefix.interceptor.ts +++ b/src/app/core/http/api-prefix.interceptor.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SettingsService } from 'app/settings/settings.service'; */ @Injectable() export class ApiPrefixInterceptor implements HttpInterceptor { + private settingsService = inject(SettingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SettingsService} settingsService Settings Service */ - constructor(private settingsService: SettingsService) {} + constructor() {} /** * Intercepts a Http request and prefixes it with `serverUrl`. diff --git a/src/app/core/http/cache.interceptor.ts b/src/app/core/http/cache.interceptor.ts index 8898df6884..24c275d230 100644 --- a/src/app/core/http/cache.interceptor.ts +++ b/src/app/core/http/cache.interceptor.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpResponse } from '@angular/common/http'; /** rxjs Imports */ @@ -15,9 +15,14 @@ import { environment } from '../../../environments/environment'; */ @Injectable() export class CacheInterceptor implements HttpInterceptor { + private httpCacheService = inject(HttpCacheService); + private forceUpdate = false; - constructor(private httpCacheService: HttpCacheService) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} /** * Configures interceptor options diff --git a/src/app/core/http/error-handler.interceptor.ts b/src/app/core/http/error-handler.interceptor.ts index fbfd6c7355..2889b24fd1 100644 --- a/src/app/core/http/error-handler.interceptor.ts +++ b/src/app/core/http/error-handler.interceptor.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpErrorResponse } from '@angular/common/http'; /** rxjs Imports */ @@ -22,14 +22,17 @@ const log = new Logger('ErrorHandlerInterceptor'); */ @Injectable() export class ErrorHandlerInterceptor implements HttpInterceptor { + private alertService = inject(AlertService); + private translate = inject(TranslateService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AlertService} alertService Alert Service. * @param {TranslateService} translate Translation Service. */ - constructor( - private alertService: AlertService, - private translate: TranslateService // Added TranslateService - ) {} + constructor() {} /** * Intercepts a Http request and adds a default error handler. diff --git a/src/app/core/http/http.service.ts b/src/app/core/http/http.service.ts index 90f5001b75..0e5bfe62f3 100644 --- a/src/app/core/http/http.service.ts +++ b/src/app/core/http/http.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Inject, Injectable, InjectionToken, Injector, Optional } from '@angular/core'; +import { Injectable, InjectionToken, Injector, inject } from '@angular/core'; import { HttpClient, HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http'; /** rxjs Imports */ @@ -70,12 +70,18 @@ export const HTTP_DYNAMIC_INTERCEPTORS = new InjectionToken('HT */ @Injectable() export class HttpService extends HttpClient { - constructor( - private httpHandler: HttpHandler, - private injector: Injector, - @Optional() @Inject(HTTP_DYNAMIC_INTERCEPTORS) private interceptors: HttpInterceptor[] = [] - ) { + private httpHandler: HttpHandler; + private injector = inject(Injector); + private interceptors: any = inject(HTTP_DYNAMIC_INTERCEPTORS, { optional: true }) ?? []; + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { + const httpHandler = inject(HttpHandler); + super(httpHandler); + this.httpHandler = httpHandler; if (!this.interceptors) { // Configure default interceptors that can be disabled here @@ -103,7 +109,7 @@ export class HttpService extends HttpClient { */ request(method?: any, url?: any, options?: any): any { const handler = this.interceptors.reduceRight( - (next, interceptor) => new HttpInterceptorHandler(next, interceptor), + (next: HttpHandler, interceptor: HttpInterceptor) => new HttpInterceptorHandler(next, interceptor), this.httpHandler ); return new HttpClient(handler).request(method, url, options); @@ -113,7 +119,7 @@ export class HttpService extends HttpClient { return new HttpService( this.httpHandler, this.injector, - this.interceptors.filter((i) => !(i instanceof interceptorType)) + this.interceptors.filter((i: any) => !(i instanceof interceptorType)) ); } diff --git a/src/app/core/i18n/i18n.service.ts b/src/app/core/i18n/i18n.service.ts index 5190a5dd57..29643eb7ee 100644 --- a/src/app/core/i18n/i18n.service.ts +++ b/src/app/core/i18n/i18n.service.ts @@ -1,13 +1,18 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** Translation Imports */ import { TranslateService } from '@ngx-translate/core'; import { Observable } from 'rxjs'; -@Injectable() +@Injectable({ providedIn: 'root' }) export class I18nService { - constructor(private translateService: TranslateService) {} + private translateService = inject(TranslateService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} public translate(key: string, params?: object): Observable { return this.translateService.get(key, params); diff --git a/src/app/core/progress-bar/progress.interceptor.ts b/src/app/core/progress-bar/progress.interceptor.ts index 99bcebe3a2..0bacb83dfe 100644 --- a/src/app/core/progress-bar/progress.interceptor.ts +++ b/src/app/core/progress-bar/progress.interceptor.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from '@angular/common/http'; /** rxjs Imports */ @@ -14,10 +14,15 @@ import { ProgressBarService } from './progress-bar.service'; */ @Injectable() export class ProgressInterceptor implements HttpInterceptor { + private progressBarService = inject(ProgressBarService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProgressBarService} progressBarService Progress Bar Service. */ - constructor(private progressBarService: ProgressBarService) {} + constructor() {} /** * Intercepts a Http request to start loading the progress bar for a pending request diff --git a/src/app/core/shell/breadcrumb/breadcrumb.component.html b/src/app/core/shell/breadcrumb/breadcrumb.component.html index 5e51816760..5f04e57f12 100644 --- a/src/app/core/shell/breadcrumb/breadcrumb.component.html +++ b/src/app/core/shell/breadcrumb/breadcrumb.component.html @@ -1,15 +1,27 @@ {{ getTranslate(breadcrumbs[breadcrumbs?.length - 1].label) }} - - - - {{ getTranslate(breadcrumb.label) }} - {{ getTranslate(breadcrumb.label) }} - - {{ getTranslate(breadcrumb.label) }} - - + @if (breadcrumbs.length - 1 !== 0) { + + @for (breadcrumb of breadcrumbs; track breadcrumb; let last = $last) { + + @if (!last) { + + @if (breadcrumb.url) { + {{ getTranslate(breadcrumb.label) }} + } + @if (!breadcrumb.url) { + {{ getTranslate(breadcrumb.label) }} + } + + } + @if (last) { + {{ getTranslate(breadcrumb.label) }} + } + + } + + } diff --git a/src/app/core/shell/breadcrumb/breadcrumb.component.ts b/src/app/core/shell/breadcrumb/breadcrumb.component.ts index 68deadc121..9e726a815d 100644 --- a/src/app/core/shell/breadcrumb/breadcrumb.component.ts +++ b/src/app/core/shell/breadcrumb/breadcrumb.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { ActivatedRoute, Router, NavigationEnd, Data, RouterLink } from '@angular/router'; /** rxjs Imports */ @@ -55,6 +55,12 @@ const routeAddBreadcrumbLink = 'addBreadcrumbLink'; ] }) export class BreadcrumbComponent implements AfterViewInit { + private activatedRoute = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + private translateService = inject(TranslateService); + /** Array of breadcrumbs. */ breadcrumbs: Breadcrumb[]; /* Reference of breadcrumb */ @@ -62,6 +68,9 @@ export class BreadcrumbComponent implements AfterViewInit { /* Template for popover on breadcrumb */ @ViewChild('templateBreadcrumb') templateBreadcrumb: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Generates the breadcrumbs. * @param {ActivatedRoute} activatedRoute Activated Route. @@ -69,13 +78,7 @@ export class BreadcrumbComponent implements AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private activatedRoute: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService, - private translateService: TranslateService - ) { + constructor() { this.generateBreadcrumbs(); } diff --git a/src/app/core/shell/shell.component.html b/src/app/core/shell/shell.component.html index c0dd4571c0..3fa8b7d941 100644 --- a/src/app/core/shell/shell.component.html +++ b/src/app/core/shell/shell.component.html @@ -20,9 +20,11 @@ - - - + @if (progressBarMode !== 'none') { + + + + } diff --git a/src/app/core/shell/shell.component.ts b/src/app/core/shell/shell.component.ts index 0a950b0069..725f48c661 100644 --- a/src/app/core/shell/shell.component.ts +++ b/src/app/core/shell/shell.component.ts @@ -1,6 +1,6 @@ /** Angular Imports */ import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout'; -import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; +import { ChangeDetectorRef, Component, OnDestroy, OnInit, inject } from '@angular/core'; /** rxjs Imports */ import { Observable, Subscription } from 'rxjs'; @@ -9,7 +9,7 @@ import { map } from 'rxjs/operators'; /** Custom Services */ import { ProgressBarService } from '../progress-bar/progress-bar.service'; import { MatSidenavContainer, MatSidenav, MatSidenavContent } from '@angular/material/sidenav'; -import { NgClass, NgIf, AsyncPipe } from '@angular/common'; +import { NgClass, AsyncPipe } from '@angular/common'; import { SidenavComponent } from './sidenav/sidenav.component'; import { ToolbarComponent } from './toolbar/toolbar.component'; import { BreadcrumbComponent } from './breadcrumb/breadcrumb.component'; @@ -39,6 +39,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ShellComponent implements OnInit, OnDestroy { + private breakpointObserver = inject(BreakpointObserver); + private progressBarService = inject(ProgressBarService); + private cdr = inject(ChangeDetectorRef); + /** Subscription to breakpoint observer for handset. */ isHandset$: Observable = this.breakpointObserver .observe(Breakpoints.Handset) @@ -50,16 +54,15 @@ export class ShellComponent implements OnInit, OnDestroy { /** Subscription to progress bar. */ progressBar$: Subscription; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {BreakpointObserver} breakpointObserver Breakpoint Observer to detect screen size. * @param {ProgressBarService} progressBarService Progress Bar Service. * @param {ChangeDetectorRef} cdr Change Detector Ref. */ - constructor( - private breakpointObserver: BreakpointObserver, - private progressBarService: ProgressBarService, - private cdr: ChangeDetectorRef - ) {} + constructor() {} /** * Subscribes to progress bar to update its mode. diff --git a/src/app/core/shell/sidenav/sidenav.component.html b/src/app/core/shell/sidenav/sidenav.component.html index 1b24ee13fc..5fe6c4f3d9 100644 --- a/src/app/core/shell/sidenav/sidenav.component.html +++ b/src/app/core/shell/sidenav/sidenav.component.html @@ -40,16 +40,18 @@ - - - - - + @for (activity of mappedActivities; track activity) { + + + + + + } @@ -68,7 +70,7 @@ - {{ 'labels.menus.Dashboard' | translate }} + {{ 'labels.menus.Dashboard' | translate }} - {{ 'labels.menus.Navigation' | translate }} + {{ 'labels.menus.Navigation' | translate }} - {{ 'labels.menus.Checker Inbox and Tasks' | translate }} + {{ 'labels.menus.Checker Inbox and Tasks' | translate }} - {{ 'labels.menus.Collection Sheet' | translate }} + {{ 'labels.menus.Collection Sheet' | translate }} - {{ 'labels.menus.Individual Collection Sheet' | translate }} + {{ 'labels.menus.Individual Collection Sheet' | translate }} - {{ 'labels.menus.Notifications' | translate }} + {{ 'labels.menus.Notifications' | translate }} - {{ 'labels.menus.Frequent Postings' | translate }} + {{ 'labels.menus.Frequent Postings' | translate }} - {{ 'labels.menus.Create Journal Entry' | translate }} + {{ 'labels.menus.Create Journal Entry' | translate }} - {{ 'labels.menus.Chart of Accounts' | translate }} + {{ 'labels.menus.Chart of Accounts' | translate }} - {{ 'labels.menus.Keyboard Shortcuts' | translate }} + {{ 'labels.menus.Keyboard Shortcuts' | translate }} - {{ 'labels.menus.Help' | translate }} + {{ 'labels.menus.Help' | translate }} diff --git a/src/app/core/shell/sidenav/sidenav.component.scss b/src/app/core/shell/sidenav/sidenav.component.scss index 263558cbfa..04d8a53019 100644 --- a/src/app/core/shell/sidenav/sidenav.component.scss +++ b/src/app/core/shell/sidenav/sidenav.component.scss @@ -88,6 +88,10 @@ } .app-sidenav { + .menu-label { + margin-left: 8px; + } + .icon-menu { display: flex; flex-direction: column; diff --git a/src/app/core/shell/sidenav/sidenav.component.ts b/src/app/core/shell/sidenav/sidenav.component.ts index d6b82eda1b..801cdfd635 100644 --- a/src/app/core/shell/sidenav/sidenav.component.ts +++ b/src/app/core/shell/sidenav/sidenav.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, Input, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { Router, RouterLink, RouterLinkActive } from '@angular/router'; @@ -14,7 +14,7 @@ import { ConfigurationWizardService } from '../../../configuration-wizard/config /** Custom Imports */ import { frequentActivities } from './frequent-activities'; import { SettingsService } from 'app/settings/settings.service'; -import { NgClass, NgFor } from '@angular/common'; +import { NgClass } from '@angular/common'; import { MatIconButton, MatButton } from '@angular/material/button'; import { MatTooltip } from '@angular/material/tooltip'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @@ -50,6 +50,14 @@ import { AuthService } from 'app/zitadel/auth.service'; ] }) export class SidenavComponent implements OnInit, AfterViewInit { + private router = inject(Router); + dialog = inject(MatDialog); + private authenticationService = inject(AuthenticationService); + private settingsService = inject(SettingsService); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + private authService = inject(AuthService); + /** True if sidenav is in collapsed state. */ @Input() sidenavCollapsed: boolean; /** Tooltip position */ @@ -72,6 +80,9 @@ export class SidenavComponent implements OnInit, AfterViewInit { /* Template for popover on chart of accounts */ @ViewChild('templateChartOfAccounts') templateChartOfAccounts: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {Router} router Router for navigation. * @param {MatDialog} dialog Mat Dialog @@ -80,15 +91,7 @@ export class SidenavComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private router: Router, - public dialog: MatDialog, - private authenticationService: AuthenticationService, - private settingsService: SettingsService, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService, - private authService: AuthService - ) { + constructor() { this.userActivity = JSON.parse(localStorage.getItem('mifosXLocation')); } diff --git a/src/app/core/shell/toolbar/toolbar.component.html b/src/app/core/shell/toolbar/toolbar.component.html index b3dec54620..da623a2729 100644 --- a/src/app/core/shell/toolbar/toolbar.component.html +++ b/src/app/core/shell/toolbar/toolbar.component.html @@ -1,25 +1,31 @@ - - - + @if (!sidenavCollapsed) { + + + + } - - - - + @if (sidenav.opened) { + + @if (!sidenavCollapsed) { + + } + @if (sidenavCollapsed) { + + } + + } ; /* Template for popover on institution */ @@ -92,6 +102,9 @@ export class ToolbarComponent implements OnInit, AfterViewInit, AfterContentChec /** Sidenav collapse event. */ @Output() collapse = new EventEmitter(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {BreakpointObserver} breakpointObserver Breakpoint observer to detect screen size. * @param {Router} router Router for navigation. @@ -100,16 +113,7 @@ export class ToolbarComponent implements OnInit, AfterViewInit, AfterContentChec * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private breakpointObserver: BreakpointObserver, - private router: Router, - private authenticationService: AuthenticationService, - private popoverService: PopoverService, - private configurationWizardService: ConfigurationWizardService, - private dialog: MatDialog, - private changeDetector: ChangeDetectorRef, - private authService: AuthService - ) {} + constructor() {} /** * Subscribes to breakpoint for handset. diff --git a/src/app/core/utils/datatables.ts b/src/app/core/utils/datatables.ts index 5c17c95fb1..996a3896ac 100644 --- a/src/app/core/utils/datatables.ts +++ b/src/app/core/utils/datatables.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { SettingsService } from 'app/settings/settings.service'; import { CheckboxBase } from 'app/shared/form-dialog/formfield/model/checkbox-base'; import { DatepickerBase } from 'app/shared/form-dialog/formfield/model/datepicker-base'; @@ -11,6 +11,9 @@ import { Dates } from './dates'; providedIn: 'root' }) export class Datatables { + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + systemFields: string[] = [ 'id', 'created_at', @@ -30,10 +33,10 @@ export class Datatables { 'share_product_id' ]; - constructor( - private dateUtils: Dates, - private settingsService: SettingsService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} public getFormfields(columns: any, dateTransformColumns: string[], dataTableEntryObject: any) { return columns.map((column: any) => { diff --git a/src/app/core/utils/dates.ts b/src/app/core/utils/dates.ts index 6c273dc874..198c9d003c 100644 --- a/src/app/core/utils/dates.ts +++ b/src/app/core/utils/dates.ts @@ -1,15 +1,20 @@ import { DatePipe } from '@angular/common'; -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import moment from 'moment'; @Injectable({ providedIn: 'root' }) export class Dates { + private datePipe = inject(DatePipe); + public static DEFAULT_DATEFORMAT = 'yyyy-MM-dd'; public static DEFAULT_DATETIMEFORMAT = 'yyyy-MM-dd HH:mm'; - constructor(private datePipe: DatePipe) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} public getDate(timestamp: any): string { return this.datePipe.transform(timestamp, 'YYYY-MM-DD'); diff --git a/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-actions.resolver.ts b/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-actions.resolver.ts index 6a0606eceb..b026a849ac 100644 --- a/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-actions.resolver.ts +++ b/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-actions.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -14,14 +14,17 @@ import { FixedDepositsService } from '../fixed-deposits.service'; */ @Injectable() export class FixedDepositsAccountActionsResolver { + private savingsService = inject(SavingsService); + private fixedDepositsService = inject(FixedDepositsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SavingsService} SavingsService Savings service. * @param {FixedDepositsService} fixedDepositsService Fixed Deposits Service. */ - constructor( - private savingsService: SavingsService, - private fixedDepositsService: FixedDepositsService - ) {} + constructor() {} /** * Returns the Fixed deposits account actions data. diff --git a/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-and-template.resolver.ts b/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-and-template.resolver.ts index 5be91e1281..6c53d90301 100644 --- a/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-and-template.resolver.ts +++ b/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { FixedDepositsService } from '../fixed-deposits.service'; */ @Injectable() export class FixedDepositsAccountAndTemplateResolver { + private fixedDepositsService = inject(FixedDepositsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FixedDepositsService} fixedDepositsService Fixed Deposits service. */ - constructor(private fixedDepositsService: FixedDepositsService) {} + constructor() {} /** * Returns the Fixed Deposits Account Template. diff --git a/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-template.resolver.ts b/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-template.resolver.ts index 1b5e4aa50b..05a9267020 100644 --- a/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-template.resolver.ts +++ b/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { FixedDepositsService } from '../fixed-deposits.service'; */ @Injectable() export class FixedDepositsAccountTemplateResolver { + private fixedDepositsService = inject(FixedDepositsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FixedDepositsService} fixedDepositsService Fixed Deposits service. */ - constructor(private fixedDepositsService: FixedDepositsService) {} + constructor() {} /** * Returns the Fixed Deposits Account Template. diff --git a/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-transaction.resolver.ts b/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-transaction.resolver.ts index 0d88546e59..7f2d2d1cfd 100644 --- a/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-transaction.resolver.ts +++ b/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-transaction.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { FixedDepositsService } from '../fixed-deposits.service'; */ @Injectable() export class FixedDepositsAccountTransactionResolver { + private fixedDepositsService = inject(FixedDepositsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FixedDepositsService} fixedDepositsService Savings service. */ - constructor(private fixedDepositsService: FixedDepositsService) {} + constructor() {} /** * Returns the Fixed Deposits Account Transaction data. diff --git a/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-view.resolver.ts b/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-view.resolver.ts index 2a992d3668..385a242145 100644 --- a/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-view.resolver.ts +++ b/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-view.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { FixedDepositsService } from 'app/deposits/fixed-deposits/fixed-deposits */ @Injectable() export class FixedDepositsAccountViewResolver { + private fixedDepositsService = inject(FixedDepositsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FixedDepositsService} fixedDepositsService Fixed Deposits service. */ - constructor(private fixedDepositsService: FixedDepositsService) {} + constructor() {} /** * Returns the Fixed Deposits Account data. diff --git a/src/app/deposits/fixed-deposits/create-fixed-deposit-account/create-fixed-deposit-account.component.html b/src/app/deposits/fixed-deposits/create-fixed-deposit-account/create-fixed-deposit-account.component.html index f2d177d4c1..60e4b72365 100644 --- a/src/app/deposits/fixed-deposits/create-fixed-deposit-account/create-fixed-deposit-account.component.html +++ b/src/app/deposits/fixed-deposits/create-fixed-deposit-account/create-fixed-deposit-account.component.html @@ -77,16 +77,17 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (fixedDepositAccountFormValid) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/deposits/fixed-deposits/create-fixed-deposit-account/create-fixed-deposit-account.component.ts b/src/app/deposits/fixed-deposits/create-fixed-deposit-account/create-fixed-deposit-account.component.ts index ae97491ddc..f0f3014b38 100644 --- a/src/app/deposits/fixed-deposits/create-fixed-deposit-account/create-fixed-deposit-account.component.ts +++ b/src/app/deposits/fixed-deposits/create-fixed-deposit-account/create-fixed-deposit-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Services */ @@ -41,6 +41,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateFixedDepositAccountComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private fixedDepositsService = inject(FixedDepositsService); + private settingsService = inject(SettingsService); + /** Fixed Deposits Account Details Step */ @ViewChild(FixedDepositAccountDetailsStepComponent, { static: true }) fixedDepositsAccountDetailsStep: FixedDepositAccountDetailsStepComponent; @@ -59,6 +65,9 @@ export class CreateFixedDepositAccountComponent { /** Fixed Deposit Account Product Template */ fixedDepositsAccountProductTemplate: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches FD account template from `resolve` * @param {ActivatedRoute} route Activated Route @@ -67,13 +76,7 @@ export class CreateFixedDepositAccountComponent { * @param {FixedDepositsService} fixedDepositsService Fixed Deposits Service * @param {SettingsService} settingsService Settings Service */ - constructor( - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private fixedDepositsService: FixedDepositsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { fixedDepositsAccountTemplate: any }) => { this.fixedDepositsAccountTemplate = data.fixedDepositsAccountTemplate; }); diff --git a/src/app/deposits/fixed-deposits/edit-fixed-deposit-account/edit-fixed-deposit-account.component.html b/src/app/deposits/fixed-deposits/edit-fixed-deposit-account/edit-fixed-deposit-account.component.html index 56706a19cf..de4548c8cc 100644 --- a/src/app/deposits/fixed-deposits/edit-fixed-deposit-account/edit-fixed-deposit-account.component.html +++ b/src/app/deposits/fixed-deposits/edit-fixed-deposit-account/edit-fixed-deposit-account.component.html @@ -77,16 +77,17 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (fixedDepositAccountFormValidAndNotPristine) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/deposits/fixed-deposits/edit-fixed-deposit-account/edit-fixed-deposit-account.component.ts b/src/app/deposits/fixed-deposits/edit-fixed-deposit-account/edit-fixed-deposit-account.component.ts index 9382a81357..28f6f82645 100644 --- a/src/app/deposits/fixed-deposits/edit-fixed-deposit-account/edit-fixed-deposit-account.component.ts +++ b/src/app/deposits/fixed-deposits/edit-fixed-deposit-account/edit-fixed-deposit-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Services */ @@ -42,6 +42,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditFixedDepositAccountComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private fixedDepositsService = inject(FixedDepositsService); + private settingsService = inject(SettingsService); + /** Fixed Deposits Account Details Step */ @ViewChild(FixedDepositAccountDetailsStepComponent, { static: true }) fixedDepositsAccountDetailsStep: FixedDepositAccountDetailsStepComponent; @@ -62,6 +68,9 @@ export class EditFixedDepositAccountComponent { currency: Currency; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches FD account template from `resolve` * @param {ActivatedRoute} route Activated Route @@ -70,13 +79,7 @@ export class EditFixedDepositAccountComponent { * @param {FixedDepositsService} fixedDepositsService Fixed Deposits Service * @param {SettingsService} settingsService Settings Service */ - constructor( - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private fixedDepositsService: FixedDepositsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { fixedDepositsAccountAndTemplate: any }) => { this.fixedDepositsAccountAndTemplate = data.fixedDepositsAccountAndTemplate; }); diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-charges-step/fixed-deposit-account-charges-step.component.html b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-charges-step/fixed-deposit-account-charges-step.component.html index b48e03fd8e..22d5054a20 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-charges-step/fixed-deposit-account-charges-step.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-charges-step/fixed-deposit-account-charges-step.component.html @@ -2,9 +2,11 @@ {{ 'labels.inputs.Charge' | translate }} - - {{ charge.name }} - + @for (charge of chargeData; track charge) { + + {{ charge.name }} + + } @@ -55,38 +57,37 @@ {{ 'labels.inputs.Date' | translate }} - - {{ (charge.dueDate | dateFormat) || 'Unassigned*' }} - - - {{ charge.feeOnMonthDay ? ([2000].concat(charge.feeOnMonthDay) | dateFormat: 'dd MMMM') : 'Unassigned' }} - - - {{ 'labels.inputs.N/A' | translate }} - - + {{ (charge.dueDate | dateFormat) || 'Unassigned*' }} + + } + @if (charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee') { + + {{ charge.feeOnMonthDay ? ([2000].concat(charge.feeOnMonthDay) | dateFormat: 'dd MMMM') : 'Unassigned' }} + + } + @if ( + !( + charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee' || - charge.chargeTimeType.value === 'Specified due date' - " - (click)="editChargeDate(charge)" - > - - + charge.chargeTimeType.value === 'Specified due date' || + charge.chargeTimeType.value === 'Weekly Fee' + ) + ) { + + {{ 'labels.inputs.N/A' | translate }} + + } + @if ( + charge.chargeTimeType.value === 'Weekly Fee' || + charge.chargeTimeType.value === 'Annual Fee' || + charge.chargeTimeType.value === 'Specified due date' + ) { + + + + } @@ -94,14 +95,11 @@ {{ 'labels.inputs.Repayments Every' | translate }} {{ charge.feeInterval || 'Not Provided' }} - - - + @if (charge.chargeTimeType.value === 'Weekly Fee' || charge.chargeTimeType.value === 'Monthly Fee') { + + + + } diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-charges-step/fixed-deposit-account-charges-step.component.ts b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-charges-step/fixed-deposit-account-charges-step.component.ts index 1a2aa34fd3..6b89259d2b 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-charges-step/fixed-deposit-account-charges-step.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-charges-step/fixed-deposit-account-charges-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, OnChanges } from '@angular/core'; +import { Component, OnInit, Input, OnChanges, inject } from '@angular/core'; import { UntypedFormControl } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; @@ -58,6 +58,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositAccountChargesStepComponent implements OnInit, OnChanges { + dialog = inject(MatDialog); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + /** Fixed deposits account template */ @Input() fixedDepositsAccountTemplate: any; /** Fixed deposits account and product template */ @@ -86,16 +90,15 @@ export class FixedDepositAccountChargesStepComponent implements OnInit, OnChange /** Component is pristine if there has been no changes by user interaction */ pristine = true; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialog} dialog Mat Dialog * @param {Dates} dateUtils Date Utils * @param {SettingsService} settingsService Settings Service */ - constructor( - public dialog: MatDialog, - private dateUtils: Dates, - private settingsService: SettingsService - ) {} + constructor() {} ngOnInit() { this.chargesDataSource = []; diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-details-step/fixed-deposit-account-details-step.component.html b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-details-step/fixed-deposit-account-details-step.component.html index 055889fafc..7ca7a66e71 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-details-step/fixed-deposit-account-details-step.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-details-step/fixed-deposit-account-details-step.component.html @@ -3,9 +3,11 @@ {{ 'labels.inputs.Product Name' | translate }} - - {{ product.name }} - + @for (product of productData; track product) { + + {{ product.name }} + + } {{ 'labels.inputs.Product Name' | translate }} {{ 'labels.commons.is' | translate }} @@ -13,37 +15,49 @@ - - {{ 'labels.inputs.Submitted On' | translate }} - - - - - {{ 'labels.inputs.Submission Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (isProductSelected) { + + {{ 'labels.inputs.Submitted On' | translate }} + + + + + {{ 'labels.inputs.Submission Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + } - - {{ 'labels.inputs.Field Officer' | translate }} - - - {{ officer.displayName }} - - - + @if (isProductSelected) { + + {{ 'labels.inputs.Field Officer' | translate }} + + @for (officer of fieldOfficerData; track officer) { + + {{ officer.displayName }} + + } + + + } - - {{ 'labels.inputs.External id' | translate }} - - + @if (isProductSelected) { + + {{ 'labels.inputs.External id' | translate }} + + + } diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-details-step/fixed-deposit-account-details-step.component.ts b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-details-step/fixed-deposit-account-details-step.component.ts index 4db6448409..33ac5a1e0c 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-details-step/fixed-deposit-account-details-step.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-details-step/fixed-deposit-account-details-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; +import { Component, OnInit, Input, Output, EventEmitter, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { SettingsService } from 'app/settings/settings.service'; @@ -26,6 +26,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositAccountDetailsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private fixedDepositsService = inject(FixedDepositsService); + private settingsService = inject(SettingsService); + /** Fixed Deposits Account Template */ @Input() fixedDepositsAccountTemplate: any; @@ -47,17 +51,16 @@ export class FixedDepositAccountDetailsStepComponent implements OnInit { /** Fixed Deposits Account Template with product data */ @Output() fixedDepositsAccountProductTemplate = new EventEmitter(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Sets fixed deposits account details form. * @param {FormBuilder} formBuilder Form Builder. * @param {FixedDepositsService} fixedDepositsService Fixed Deposits Service. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private fixedDepositsService: FixedDepositsService, - private settingsService: SettingsService - ) { + constructor() { this.createFixedDepositsAccountDetailsForm(); } diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-settings-step/fixed-deposit-account-settings-step.component.html b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-settings-step/fixed-deposit-account-settings-step.component.html index 4681f17d5c..79a9949d1e 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-settings-step/fixed-deposit-account-settings-step.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-settings-step/fixed-deposit-account-settings-step.component.html @@ -10,12 +10,11 @@ {{ 'labels.heading.Lock-in Period' | translate }} {{ 'labels.inputs.Type' | translate }} - - {{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }} - + @for (lockinPeriodFrequencyType of lockinPeriodFrequencyTypeData; track lockinPeriodFrequencyType) { + + {{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }} + + } @@ -33,9 +32,11 @@ {{ 'labels.heading.Minimum Deposit Term' | translate {{ 'labels.inputs.Frequency Type' | translate }} - - {{ periodFrequencyType.value | translateKey: 'catalogs' }} - + @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { + + {{ periodFrequencyType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Minimum Deposit Term Frequency Type' | translate }} {{ 'labels.commons.is' | translate }} @@ -53,9 +54,11 @@ {{ 'labels.heading.And thereafter, in Multiples of' | {{ 'labels.inputs.Type' | translate }} - - {{ periodFrequencyType.value | translateKey: 'catalogs' }} - + @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { + + {{ periodFrequencyType.value | translateKey: 'catalogs' }} + + } @@ -69,9 +72,11 @@ {{ 'labels.heading.Maximum Deposit Term' | translate {{ 'labels.inputs.Type' | translate }} - - {{ periodFrequencyType.value | translateKey: 'catalogs' }} - + @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { + + {{ periodFrequencyType.value | translateKey: 'catalogs' }} + + } @@ -83,42 +88,48 @@ {{ 'labels.heading.Interest Transfer' | translate }}< {{ 'labels.inputs.Transfer Interest to Linked Savings Account' | translate }}? - - {{ 'labels.inputs.Linked Savings Account' | translate }} - - - ({{ account.accountNo }}) {{ account.savingsProductName }} - - - - {{ 'labels.inputs.Linked Savings Account' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (fixedDepositAccountSettingsForm.contains('linkAccountId')) { + + {{ 'labels.inputs.Linked Savings Account' | translate }} + + @for (account of savingsAccountsData; track account) { + ({{ account.accountNo }}) {{ account.savingsProductName }} + } + + + {{ 'labels.inputs.Linked Savings Account' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + } {{ 'labels.inputs.Maturity Instructions' | translate }} - - {{ maturityInstruction.value | translateKey: 'catalogs' }} - + @for (maturityInstruction of maturityInstructionOptions; track maturityInstruction) { + + {{ maturityInstruction.value | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Transfer to savings account' | translate }} - - - ({{ account.accountNo }}) {{ account.savingsProductName }} - - - - {{ 'labels.inputs.Transfer to savings account' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (fixedDepositAccountSettingsForm.contains('transferToSavingsId')) { + + {{ 'labels.inputs.Transfer to savings account' | translate }} + + @for (account of savingsAccountsData; track account) { + ({{ account.accountNo }}) {{ account.savingsProductName }} + } + + + {{ 'labels.inputs.Transfer to savings account' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + } @@ -136,27 +147,26 @@ {{ 'labels.heading.For Pre-mature closure' | translat {{ 'labels.inputs.Period' | translate }} - - {{ preClosurePenalInterestOnType.value | translateKey: 'catalogs' }} - + @for (preClosurePenalInterestOnType of preClosurePenalInterestOnTypeData; track preClosurePenalInterestOnType) { + + {{ preClosurePenalInterestOnType.value | translateKey: 'catalogs' }} + + } - + @if (fixedDepositAccountSettingsForm.controls.withHoldTax) { - {{ 'labels.inputs.Is Withhold Tax Applicable' | translate }}? - - - {{ 'labels.inputs.Tax Group' | translate }} - - - + @if (fixedDepositAccountSettingsForm.controls.taxGroupId) { + + {{ 'labels.inputs.Tax Group' | translate }} + + + } + } diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-settings-step/fixed-deposit-account-settings-step.component.ts b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-settings-step/fixed-deposit-account-settings-step.component.ts index dc8f4ca123..d6944a4b6a 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-settings-step/fixed-deposit-account-settings-step.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-settings-step/fixed-deposit-account-settings-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, OnChanges } from '@angular/core'; +import { Component, OnInit, Input, OnChanges, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -32,6 +32,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositAccountSettingsStepComponent implements OnInit, OnChanges { + private formBuilder = inject(UntypedFormBuilder); + private settingsService = inject(SettingsService); + /** Fixed deposits account template */ @Input() fixedDepositsAccountTemplate: any; /** Fixed deposits account and product template */ @@ -52,16 +55,16 @@ export class FixedDepositAccountSettingsStepComponent implements OnInit, OnChang /** Savings Accounts Data */ savingsAccountsData: any; - maturityInstructionOptions: OptionData; + maturityInstructionOptions: OptionData[]; + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); /** * @param {FormBuilder} formBuilder Form Builder * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private settingsService: SettingsService - ) { + constructor() { this.createFixedDepositAccountSettingsForm(); this.buildDependencies(); } diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-terms-step/fixed-deposit-account-terms-step.component.html b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-terms-step/fixed-deposit-account-terms-step.component.html index 2c9406484a..41e673fbe7 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-terms-step/fixed-deposit-account-terms-step.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-terms-step/fixed-deposit-account-terms-step.component.html @@ -1,14 +1,15 @@ - - + @if (currency) { + + + } @@ -24,9 +25,11 @@ {{ 'labels.inputs.Deposit Period Type' | translate }} - - {{ periodFrequencyType.value | translateKey: 'catalogs' }} - + @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { + + {{ periodFrequencyType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Deposit Period Type' | translate }} {{ 'labels.commons.is' | translate }} @@ -39,12 +42,11 @@ {{ 'labels.inputs.Interest Compounding Period' | translate }} - - {{ interestCompoundingPeriodType.value | translateKey: 'catalogs' }} - + @for (interestCompoundingPeriodType of interestCompoundingPeriodTypeData; track interestCompoundingPeriodType) { + + {{ interestCompoundingPeriodType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Interest Compounding Period' | translate }} {{ 'labels.commons.is' | translate }} @@ -55,12 +57,11 @@ {{ 'labels.inputs.Interest Posting Period' | translate }} - - {{ interestPostingPeriodType.value | translateKey: 'catalogs' }} - + @for (interestPostingPeriodType of interestPostingPeriodTypeData; track interestPostingPeriodType) { + + {{ interestPostingPeriodType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Interest Posting Period' | translate }} {{ 'labels.commons.is' | translate }} @@ -71,12 +72,11 @@ {{ 'labels.inputs.Interest Calculated using' | translate }} - - {{ interestCalculationType.value | translateKey: 'catalogs' }} - + @for (interestCalculationType of interestCalculationTypeData; track interestCalculationType) { + + {{ interestCalculationType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Interest Calculated using' | translate }} {{ 'labels.commons.is' | translate }} @@ -87,12 +87,14 @@ {{ 'labels.inputs.Days in Year' | translate }} - - {{ interestCalculationDaysInYearType.value | translateKey: 'catalogs' }} - + @for ( + interestCalculationDaysInYearType of interestCalculationDaysInYearTypeData; + track interestCalculationDaysInYearType + ) { + + {{ interestCalculationDaysInYearType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Days in Year' | translate }} {{ 'labels.commons.is' | translate }} diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-terms-step/fixed-deposit-account-terms-step.component.ts b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-terms-step/fixed-deposit-account-terms-step.component.ts index ae63a2544c..53531f640c 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-terms-step/fixed-deposit-account-terms-step.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-terms-step/fixed-deposit-account-terms-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, OnChanges } from '@angular/core'; +import { Component, OnInit, Input, OnChanges, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { SettingsService } from 'app/settings/settings.service'; import { Currency } from 'app/shared/models/general.model'; @@ -26,6 +26,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositAccountTermsStepComponent implements OnInit, OnChanges { + private formBuilder = inject(UntypedFormBuilder); + private settingsService = inject(SettingsService); + /** Fixed deposits account template */ @Input() fixedDepositsAccountTemplate: any; /** Fixed deposits account and product template */ @@ -49,14 +52,14 @@ export class FixedDepositAccountTermsStepComponent implements OnInit, OnChanges periodFrequencyTypeData: any; currency: Currency | null = null; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private settingsService: SettingsService - ) { + constructor() { this.createFixedDepositsAccountTermsForm(); } diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/charges-tab/charges-tab.component.html b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/charges-tab/charges-tab.component.html index d77dbaed00..b4393c7735 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/charges-tab/charges-tab.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/charges-tab/charges-tab.component.html @@ -3,11 +3,13 @@ {{ 'labels.heading.All Charges' | translate }} - - - {{ showInactiveCharges ? 'View Active Charges' : 'View Inactive Charges' }} - - + @if (this.chargesData) { + + + {{ showInactiveCharges ? 'View Active Charges' : 'View Inactive Charges' }} + + + } @@ -81,62 +83,66 @@ {{ 'labels.heading.All Charges' | translate }} {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - + @if (fixedDepositsAccountData.status.value === 'Submitted and pending approval') { + + + + + + + + + } + @if (fixedDepositsAccountData.status.value === 'Active' && charge.amountOutstanding !== 0) { + + + + - + - - + @if (isRecurringCharge(charge)) { + + + + } + + } diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/charges-tab/charges-tab.component.ts b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/charges-tab/charges-tab.component.ts index 1ef8e2297d..306c8de109 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/charges-tab/charges-tab.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/charges-tab/charges-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; import { @@ -62,6 +62,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ChargesTabComponent implements OnInit { + private savingsService = inject(SavingsService); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private router = inject(Router); + dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + /** Fixed Deposits Account Data */ fixedDepositsAccountData: any; /** Charges Data */ @@ -88,6 +95,9 @@ export class ChargesTabComponent implements OnInit { /** Charges Table Reference */ @ViewChild('chargesTable', { static: true }) chargesTableRef: MatTable; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Fixed Deposits account data from `resolve`. * @param {SavingsService} savingsService Savings Service @@ -97,14 +107,7 @@ export class ChargesTabComponent implements OnInit { * @param {Dates} dateUtils Date Utils. * @param {SettingsService} settingsService Settings Service. */ - constructor( - private savingsService: SavingsService, - private route: ActivatedRoute, - private dateUtils: Dates, - private router: Router, - public dialog: MatDialog, - private settingsService: SettingsService - ) { + constructor() { this.route.parent.data.subscribe((data: { fixedDepositsAccountData: any }) => { this.fixedDepositsAccountData = data.fixedDepositsAccountData; this.chargesData = this.fixedDepositsAccountData.charges; diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/calculate-interest-dialog/calculate-interest-dialog.component.ts b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/calculate-interest-dialog/calculate-interest-dialog.component.ts index 3c269b9313..17672f6780 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/calculate-interest-dialog/calculate-interest-dialog.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/calculate-interest-dialog/calculate-interest-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MatDialogTitle, @@ -27,8 +27,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CalculateInterestDialogComponent { + dialogRef = inject>(MatDialogRef); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. */ - constructor(public dialogRef: MatDialogRef) {} + constructor() {} } diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/inactivate-charge-dialog/inactivate-charge-dialog.component.ts b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/inactivate-charge-dialog/inactivate-charge-dialog.component.ts index 289d1968d7..e3afbdad2f 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/inactivate-charge-dialog/inactivate-charge-dialog.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/inactivate-charge-dialog/inactivate-charge-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,11 +28,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class InactivateChargeDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/post-interest-dialog/post-interest-dialog.component.ts b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/post-interest-dialog/post-interest-dialog.component.ts index 894cf6df91..cf4d5923aa 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/post-interest-dialog/post-interest-dialog.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/post-interest-dialog/post-interest-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MatDialogTitle, @@ -27,8 +27,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class PostInterestDialogComponent { + dialogRef = inject>(MatDialogRef); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. */ - constructor(public dialogRef: MatDialogRef) {} + constructor() {} } diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/toggle-withhold-tax-dialog/toggle-withhold-tax-dialog.component.ts b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/toggle-withhold-tax-dialog/toggle-withhold-tax-dialog.component.ts index d53f653f11..581fd05762 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/toggle-withhold-tax-dialog/toggle-withhold-tax-dialog.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/toggle-withhold-tax-dialog/toggle-withhold-tax-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,12 +28,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ToggleWithholdTaxDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/waive-charge-dialog/waive-charge-dialog.component.ts b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/waive-charge-dialog/waive-charge-dialog.component.ts index df4e9b488e..6b07007c20 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/waive-charge-dialog/waive-charge-dialog.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/custom-dialogs/waive-charge-dialog/waive-charge-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,12 +28,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class WaiveChargeDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/datatable-tabs/datatable-tabs.component.ts b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/datatable-tabs/datatable-tabs.component.ts index b25abead1a..f7562efa00 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/datatable-tabs/datatable-tabs.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/datatable-tabs/datatable-tabs.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { EntityDatatableTabComponent } from '../../../../shared/tabs/entity-datatable-tab/entity-datatable-tab.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -17,17 +17,22 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DatatableTabsComponent { + private route = inject(ActivatedRoute); + entityId: string; /** Savings Datatable */ entityDatatable: any; /** Multi Row Datatable Flag */ multiRowDatatableFlag: boolean; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches Savings and datatables data from `resolve` * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.entityId = this.route.parent.parent.snapshot.paramMap.get('fixedDepositAccountId'); this.route.data.subscribe((data: { savingsDatatable: any }) => { diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/fixed-deposit-account-view.component.html b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/fixed-deposit-account-view.component.html index d0e86644c8..dd64d7cdd3 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/fixed-deposit-account-view.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/fixed-deposit-account-view.component.html @@ -29,42 +29,44 @@ {{ 'labels.text.' + entityType | translate }} : {{ fixedDepositsAccountData.clientName || fixedDepositsAccountData.groupName }} - - - + @if (fixedDepositsAccountData.clientAccountNo) { + + + + } - - {{ 'labels.heading.Account Overview' | translate }} - - - - {{ 'labels.inputs.Current Balance' | translate }} - - {{ - fixedDepositsAccountData.summary.accountBalance - | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Deposit Amount' | translate }} - - {{ fixedDepositsAccountData.depositAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - - - + @if ( + !fixedDepositsAccountData.status.rejected && !fixedDepositsAccountData.status.submittedAndPendingApproval + ) { + + {{ 'labels.heading.Account Overview' | translate }} + + + + {{ 'labels.inputs.Current Balance' | translate }} + + {{ + fixedDepositsAccountData.summary.accountBalance + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + + {{ 'labels.inputs.Deposit Amount' | translate }} + + {{ + fixedDepositsAccountData.depositAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + + + + } {{ 'labels.heading.Account Overview' | translate }} - + @for (button of buttonConfig.singleButtons; track button) { {{ button.name | translateKey: 'menus' }} - + } - + @if (buttonConfig.options.length) { {{ 'More' | translateKey: 'menus' }} - - {{ option.name | translateKey: 'menus' }} - + @for (option of buttonConfig.options; track option) { + + {{ option.name | translateKey: 'menus' }} + + } - + } @@ -121,17 +125,19 @@ {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Interest Rate Chart' | translate }} - - - {{ 'labels.inputs.Transactions' | translate }} - - + @if (showTransactions) { + + + {{ 'labels.inputs.Transactions' | translate }} + + + } {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Charges' | translate }} - - {{ 'labels.inputs.Standing Instructions' | translate }} - - + @if (fixedDepositsAccountData.clientId) { + + {{ 'labels.inputs.Standing Instructions' | translate }} + + } + @for (savingsDatatable of savingsDatatables; track savingsDatatable) { {{ 'labels.heading.Account Overview' | translate }} > {{ savingsDatatable.registeredTableName }} - + } diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/fixed-deposit-account-view.component.ts b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/fixed-deposit-account-view.component.ts index efa82b7e00..944dcc24f1 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/fixed-deposit-account-view.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/fixed-deposit-account-view.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -25,7 +25,7 @@ import { MatCardContent } from '@angular/material/card'; import { MatTooltip } from '@angular/material/tooltip'; -import { NgClass, NgIf, NgFor, CurrencyPipe } from '@angular/common'; +import { NgClass, CurrencyPipe } from '@angular/common'; import { AccountNumberComponent } from '../../../shared/account-number/account-number.component'; import { MatIconButton } from '@angular/material/button'; import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; @@ -67,6 +67,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositAccountViewComponent implements OnInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private fixedDepositsService = inject(FixedDepositsService); + private savingsService = inject(SavingsService); + dialog = inject(MatDialog); + /** Fixed Deposits Account Data */ fixedDepositsAccountData: any; /** Savings Data Tables */ @@ -78,6 +84,9 @@ export class FixedDepositAccountViewComponent implements OnInit { currency: Currency; showTransactions = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches fixed deposits account data from `resolve` * @param {ActivatedRoute} route Activated Route @@ -86,13 +95,7 @@ export class FixedDepositAccountViewComponent implements OnInit { * @param {SavingsService} savingsService Savings Service * @param {MatDialog} dialog Mat Dialog */ - constructor( - private route: ActivatedRoute, - private router: Router, - private fixedDepositsService: FixedDepositsService, - private savingsService: SavingsService, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { fixedDepositsAccountData: any; savingsDatatables: any }) => { this.fixedDepositsAccountData = data.fixedDepositsAccountData; this.savingsDatatables = data.savingsDatatables; diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/general-tab/general-tab.component.html b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/general-tab/general-tab.component.html index 79a6cc0f2b..aaeaea70af 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/general-tab/general-tab.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/general-tab/general-tab.component.html @@ -7,15 +7,19 @@ {{ 'labels.heading.Fixed Deposit Details' | translate {{ 'labels.inputs.External Id' | translate }} - - - - - {{ 'labels.inputs.Not Available' | translate }} - + @if (fixedDepositsAccountData.externalId) { + + + + } + @if (!fixedDepositsAccountData.externalId) { + + {{ 'labels.inputs.Not Available' | translate }} + + } @@ -28,10 +32,12 @@ {{ 'labels.heading.Fixed Deposit Details' | translate }} - - {{ 'labels.inputs.Closed On' | translate }} - {{ fixedDepositsAccountData.timeline.closedOnDate | dateFormat }} - + @if (fixedDepositsAccountData.timeline.closedOnDate) { + + {{ 'labels.inputs.Closed On' | translate }} + {{ fixedDepositsAccountData.timeline.closedOnDate | dateFormat }} + + } {{ 'labels.inputs.Field Officer' | translate }} @@ -56,14 +62,18 @@ {{ 'labels.heading.Fixed Deposit Details' | translate }} - - {{ 'labels.inputs.Tax Group' | translate }} - {{ fixedDepositsAccountData.taxGroup.name }} - - - {{ 'labels.inputs.Maturity Instructions' | translate }} - {{ fixedDepositsAccountData.onAccountClosure.value | translateKey: 'catalogs' }} - + @if (fixedDepositsAccountData.withHoldTax) { + + {{ 'labels.inputs.Tax Group' | translate }} + {{ fixedDepositsAccountData.taxGroup.name }} + + } + @if (fixedDepositsAccountData.onAccountClosure) { + + {{ 'labels.inputs.Maturity Instructions' | translate }} + {{ fixedDepositsAccountData.onAccountClosure.value | translateKey: 'catalogs' }} + + } @@ -92,68 +102,74 @@ {{ 'labels.heading.Interest Details' | translate }}{{ 'labels.inputs.No. of Days in Year' | translate }} {{ fixedDepositsAccountData.interestCalculationDaysInYearType.value | translateKey: 'catalogs' }} - - {{ 'labels.inputs.Pre-cloure Penal' | translate }} - - {{ fixedDepositsAccountData.preClosurePenalInterest }} % on - {{ fixedDepositsAccountData.preClosurePenalInterestOnType.value | translateKey: 'catalogs' }} - - + @if (fixedDepositsAccountData.preClosurePenalApplicable) { + + {{ 'labels.inputs.Pre-cloure Penal' | translate }} + + {{ fixedDepositsAccountData.preClosurePenalInterest }} % on + {{ fixedDepositsAccountData.preClosurePenalInterestOnType.value | translateKey: 'catalogs' }} + + + } - - {{ 'labels.heading.Performance History' | translate }} - - - - {{ 'labels.inputs.Principal Amount' | translate }} - - {{ fixedDepositsAccountData.depositAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - - {{ 'labels.inputs.Maturity Amount' | translate }} - - {{ fixedDepositsAccountData.maturityAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - - {{ 'labels.inputs.Total Deposits' | translate }} - - {{ fixedDepositsAccountData.summary.totalDeposits | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - - {{ 'labels.inputs.Total Withdrawals' | translate }} - - {{ - fixedDepositsAccountData.summary.totalWithdrawals | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - = 0"> - {{ 'labels.inputs.Total Interest Earned' | translate }} - - {{ - fixedDepositsAccountData.summary.totalInterestEarned - | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - - - - + @if (!fixedDepositsAccountData.status.rejected && !fixedDepositsAccountData.status.submittedAndPendingApproval) { + + {{ 'labels.heading.Performance History' | translate }} + + + + {{ 'labels.inputs.Principal Amount' | translate }} + + {{ fixedDepositsAccountData.depositAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + + + + {{ 'labels.inputs.Maturity Amount' | translate }} + + {{ fixedDepositsAccountData.maturityAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + + + @if (fixedDepositsAccountData.summary.totalDeposits) { + + {{ 'labels.inputs.Total Deposits' | translate }} + + {{ + fixedDepositsAccountData.summary.totalDeposits | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + } + @if (fixedDepositsAccountData.summary.totalWithdrawals) { + + {{ 'labels.inputs.Total Withdrawals' | translate }} + + {{ + fixedDepositsAccountData.summary.totalWithdrawals + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + } + @if (fixedDepositsAccountData.summary.totalInterestEarned >= 0) { + + {{ 'labels.inputs.Total Interest Earned' | translate }} + + {{ + fixedDepositsAccountData.summary.totalInterestEarned + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + } + + + + } @else { {{ 'labels.heading.Other Details' | translate }} @@ -173,6 +189,6 @@ {{ 'labels.heading.Other Details' | translate }} - + } diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/general-tab/general-tab.component.ts b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/general-tab/general-tab.component.ts index e099acfae8..a5ba891ff7 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/general-tab/general-tab.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/general-tab/general-tab.component.ts @@ -1,7 +1,7 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { Currency } from 'app/shared/models/general.model'; -import { NgIf, CurrencyPipe } from '@angular/common'; +import { CurrencyPipe } from '@angular/common'; import { ExternalIdentifierComponent } from '../../../../shared/external-identifier/external-identifier.component'; import { DateFormatPipe } from '../../../../pipes/date-format.pipe'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -18,14 +18,17 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GeneralTabComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + fixedDepositsAccountData: any; entityType: string; currency: Currency; - constructor( - private route: ActivatedRoute, - private router: Router - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.parent.data.subscribe((data: { fixedDepositsAccountData: any }) => { this.fixedDepositsAccountData = data.fixedDepositsAccountData; this.currency = this.fixedDepositsAccountData.currency; diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/interest-rate-chart-tab/interest-rate-chart-tab.component.ts b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/interest-rate-chart-tab/interest-rate-chart-tab.component.ts index f17bfea1ec..e59d073f93 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/interest-rate-chart-tab/interest-rate-chart-tab.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/interest-rate-chart-tab/interest-rate-chart-tab.component.ts @@ -1,5 +1,5 @@ // ** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { animate, state, style, transition, trigger } from '@angular/animations'; import { @@ -52,6 +52,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class InterestRateChartTabComponent { + private route = inject(ActivatedRoute); + /** Fixed Deposits Account Status */ status: any; /** Interest Rate Chart Data */ @@ -78,11 +80,14 @@ export class InterestRateChartTabComponent { /** Expand Chart Slab Index used in the view */ expandChartSlabIndex: number; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves fixed deposits account data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.parent.data.subscribe((data: { fixedDepositsAccountData: any }) => { this.interestRateChartData = data.fixedDepositsAccountData.accountChart.chartSlabs; }); diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/standing-instructions-tab/standing-instructions-tab.component.html b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/standing-instructions-tab/standing-instructions-tab.component.html index c2ffe6141b..53ed66d477 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/standing-instructions-tab/standing-instructions-tab.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/standing-instructions-tab/standing-instructions-tab.component.html @@ -46,29 +46,33 @@ {{ 'labels.heading.All Standing Instructions' | translate }} {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - + @if (instruction.status.value !== 'Deleted') { + + + + + + } + @if (instruction.status.value !== 'Deleted') { + + + + + + } ; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves Fixed Deposits Account Data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -79,13 +88,7 @@ export class StandingInstructionsTabComponent implements OnInit { * @param {AccountTransfersService} accountTransfersService Accounts Transfer Service * @param {SettingsService} settingsService Settings Service */ - constructor( - private route: ActivatedRoute, - private fixedDepositsService: FixedDepositsService, - private dialog: MatDialog, - private accountTransfersService: AccountTransfersService, - private settingsService: SettingsService - ) { + constructor() { this.route.parent.data.subscribe((data: { fixedDepositsAccountData: any }) => { this.fixedDepositsData = data.fixedDepositsAccountData; }); diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/transactions-tab/transactions-tab.component.html b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/transactions-tab/transactions-tab.component.html index dd20f9fbd5..9b31b669a8 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/transactions-tab/transactions-tab.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/transactions-tab/transactions-tab.component.html @@ -4,14 +4,16 @@ {{ 'labels.heading.All Transactions' | translate }} - - - {{ 'labels.inputs.Hide Reversed' | translate }} - - {{ 'labels.inputs.Hide Accruals' | translate }} - + @if (checkStatus()) { + + + {{ 'labels.inputs.Hide Reversed' | translate }} + + {{ 'labels.inputs.Hide Accruals' | translate }} + + } diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/transactions-tab/transactions-tab.component.ts b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/transactions-tab/transactions-tab.component.ts index 722daec052..9e3ec47f97 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/transactions-tab/transactions-tab.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/transactions-tab/transactions-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; @@ -19,7 +19,7 @@ import { } from '@angular/material/table'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { SavingsAccountTransaction } from 'app/savings/models/savings-account-transaction.model'; -import { NgIf, NgClass } from '@angular/common'; +import { NgClass } from '@angular/common'; import { MatCheckbox } from '@angular/material/checkbox'; import { MatIconButton } from '@angular/material/button'; import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; @@ -61,6 +61,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class TransactionsTabComponent implements OnInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + dialog = inject(MatDialog); + accountId: string; status: any; /** Transactions Data */ @@ -84,16 +88,15 @@ export class TransactionsTabComponent implements OnInit { @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator; @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves fixed deposits account data from `resolve`. * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router */ - constructor( - private route: ActivatedRoute, - private router: Router, - public dialog: MatDialog - ) { + constructor() { this.route.parent.data.subscribe((data: { fixedDepositsAccountData: any }) => { this.transactionsData = data.fixedDepositsAccountData.transactions; this.accountId = this.route.parent.snapshot.params['fixedDepositAccountId']; diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/view-transaction/view-transaction.component.html b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/view-transaction/view-transaction.component.html index 111e69e996..b28d34979c 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/view-transaction/view-transaction.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/view-transaction/view-transaction.component.html @@ -1,14 +1,16 @@ - - - Undo - - + @if (allowUndo()) { + + + Undo + + + } @@ -56,19 +58,22 @@ {{ transactionData.amount | currency: transactionData.currency.code : 'symbol-narrow' : '1.2-2' }} - - {{ 'labels.inputs.Note' | translate }} - + @if (transactionData.note) { + + {{ 'labels.inputs.Note' | translate }} + + } - - {{ transactionData.note }} - + @if (transactionData.note) { + + {{ transactionData.note }} + + } - - + @if (transactionData.paymentDetailData) { + + + } diff --git a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/view-transaction/view-transaction.component.ts b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/view-transaction/view-transaction.component.ts index 3dbb293e50..84af473cdd 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposit-account-view/view-transaction/view-transaction.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposit-account-view/view-transaction/view-transaction.component.ts @@ -1,12 +1,12 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; import { UndoTransactionDialogComponent } from 'app/savings/savings-account-view/custom-dialogs/undo-transaction-dialog/undo-transaction-dialog.component'; import { Dates } from 'app/core/utils/dates'; import { SavingsService } from 'app/savings/savings.service'; import { SettingsService } from 'app/settings/settings.service'; -import { NgIf, NgClass, CurrencyPipe } from '@angular/common'; +import { NgClass, CurrencyPipe } from '@angular/common'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { TransactionPaymentDetailComponent } from '../../../../shared/transaction-payment-detail/transaction-payment-detail.component'; import { DateFormatPipe } from '../../../../pipes/date-format.pipe'; @@ -29,21 +29,24 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewTransactionComponent { + private savingsService = inject(SavingsService); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private router = inject(Router); + dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + accountId: string; transactionId: string; /** Transaction data. */ transactionData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** */ - constructor( - private savingsService: SavingsService, - private route: ActivatedRoute, - private dateUtils: Dates, - private router: Router, - public dialog: MatDialog, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { fixedDepositsAccountTransaction: any }) => { this.accountId = this.route.parent.snapshot.params['fixedDepositAccountId']; this.transactionData = data.fixedDepositsAccountTransaction; diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/activate-fixed-deposits-account/activate-fixed-deposits-account.component.html b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/activate-fixed-deposits-account/activate-fixed-deposits-account.component.html index d8e0e50f17..a58ee6201f 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/activate-fixed-deposits-account/activate-fixed-deposits-account.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/activate-fixed-deposits-account/activate-fixed-deposits-account.component.html @@ -14,10 +14,12 @@ /> - - {{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (activateFixedDepositsAccountForm.controls.activatedOnDate.hasError('required')) { + + {{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/activate-fixed-deposits-account/activate-fixed-deposits-account.component.ts b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/activate-fixed-deposits-account/activate-fixed-deposits-account.component.ts index 058ec6b950..63a46b9d31 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/activate-fixed-deposits-account/activate-fixed-deposits-account.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/activate-fixed-deposits-account/activate-fixed-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ActivateFixedDepositsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private savingsService = inject(SavingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -30,6 +37,9 @@ export class ActivateFixedDepositsAccountComponent implements OnInit { /** Fixed Deposits Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fixed deposits endpoint is not supported so using Savings endpoint. * @param {FormBuilder} formBuilder Form Builder @@ -39,14 +49,7 @@ export class ActivateFixedDepositsAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private savingsService: SavingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['fixedDepositAccountId']; } diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/add-charge-fixed-deposits-account/add-charge-fixed-deposits-account.component.html b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/add-charge-fixed-deposits-account/add-charge-fixed-deposits-account.component.html index 604ccf4ffd..7e6ef28e0b 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/add-charge-fixed-deposits-account/add-charge-fixed-deposits-account.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/add-charge-fixed-deposits-account/add-charge-fixed-deposits-account.component.html @@ -6,91 +6,102 @@ {{ 'labels.inputs.Charge' | translate }} - - {{ savingsCharge.name + ' (' + savingsCharge.currency.name + ')' }} - - - - {{ 'labels.inputs.Charge' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - {{ 'labels.inputs.Amount' | translate }} - - - {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Charge Calculation' | translate }} - - - {{ chargeCalculation.value }} - - - - - - {{ 'labels.inputs.Charge time type' | translate }} - - - {{ chargeTime.value }} + @for (savingsCharge of savingsChargeOptions; track savingsCharge) { + + {{ savingsCharge.name + ' (' + savingsCharge.currency.name + ')' }} - - - - - {{ 'labels.inputs.Due for collection on' | translate }} - - - - - {{ 'labels.inputs.Due for collection on' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Due On' | translate }} - - - - - {{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }} + } + + @if (fixedDepositsChargeForm.controls.chargeId.hasError('required')) { + + {{ 'labels.inputs.Charge' | translate }} {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} - + } + - - {{ 'labels.inputs.Repeats Every' | translate }} - - - + @if (chargeDetails) { + + + {{ 'labels.inputs.Amount' | translate }} + + @if (fixedDepositsChargeForm.controls.amount.hasError('required')) { + + {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Charge Calculation' | translate }} + + @for (chargeCalculation of chargeDetails.chargeCalculationTypeOptions; track chargeCalculation) { + + {{ chargeCalculation.value }} + + } + + + + {{ 'labels.inputs.Charge time type' | translate }} + + @for (chargeTime of chargeDetails.chargeTimeTypeOptions; track chargeTime) { + + {{ chargeTime.value }} + + } + + + @if (fixedDepositsChargeForm.contains('dueDate')) { + + {{ 'labels.inputs.Due for collection on' | translate }} + + + + @if (fixedDepositsChargeForm.controls.dueDate.hasError('required')) { + + {{ 'labels.inputs.Due for collection on' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + @if (fixedDepositsChargeForm.contains('feeOnMonthDay')) { + + {{ 'labels.inputs.Due On' | translate }} + + + + @if (fixedDepositsChargeForm.controls.feeOnMonthDay.hasError('required')) { + + {{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + @if (fixedDepositsChargeForm.contains('feeInterval')) { + + {{ 'labels.inputs.Repeats Every' | translate }} + + + } + + } diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/add-charge-fixed-deposits-account/add-charge-fixed-deposits-account.component.ts b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/add-charge-fixed-deposits-account/add-charge-fixed-deposits-account.component.ts index bcba746fc0..18fd1c3e5e 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/add-charge-fixed-deposits-account/add-charge-fixed-deposits-account.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/add-charge-fixed-deposits-account/add-charge-fixed-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -28,6 +28,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AddChargeFixedDepositsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private savingsService = inject(SavingsService); + private settingsService = inject(SettingsService); + /** Minimum Due Date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum Due Date allowed. */ @@ -41,6 +48,9 @@ export class AddChargeFixedDepositsAccountComponent implements OnInit { /** charge details */ chargeDetails: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves charge template data from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -50,14 +60,7 @@ export class AddChargeFixedDepositsAccountComponent implements OnInit { * @param {SavingsService} savingsService Savings Service * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private savingsService: SavingsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { fixedDepositsAccountActionData: any }) => { this.savingsChargeOptions = data.fixedDepositsAccountActionData.chargeOptions; }); diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/approve-fixed-deposits-account/approve-fixed-deposits-account.component.html b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/approve-fixed-deposits-account/approve-fixed-deposits-account.component.html index a8c2e79cb3..fc7f40660c 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/approve-fixed-deposits-account/approve-fixed-deposits-account.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/approve-fixed-deposits-account/approve-fixed-deposits-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Approved On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (approveFixedDepositsAccountForm.controls.approvedOnDate.hasError('required')) { + + {{ 'labels.inputs.Approved On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/approve-fixed-deposits-account/approve-fixed-deposits-account.component.ts b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/approve-fixed-deposits-account/approve-fixed-deposits-account.component.ts index 77a16136d4..1007b2cf17 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/approve-fixed-deposits-account/approve-fixed-deposits-account.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/approve-fixed-deposits-account/approve-fixed-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ApproveFixedDepositsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private fixedDepositsService = inject(FixedDepositsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class ApproveFixedDepositsAccountComponent implements OnInit { /** Fixed Deposits Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {FixedDepositsService} fixedDepositsService Fixed Deposits Service @@ -40,14 +50,7 @@ export class ApproveFixedDepositsAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private fixedDepositsService: FixedDepositsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['fixedDepositAccountId']; } diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/close-fixed-deposits-account/close-fixed-deposits-account.component.html b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/close-fixed-deposits-account/close-fixed-deposits-account.component.html index b65da0594a..e979f0949e 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/close-fixed-deposits-account/close-fixed-deposits-account.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/close-fixed-deposits-account/close-fixed-deposits-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeOnMaturityAccountForm.controls.closedOnDate.hasError('required')) { + + {{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -29,33 +31,45 @@ {{ 'labels.inputs.Action' | translate }} - - {{ closureOption.value }} - + @for (closureOption of onAccountClosureOptions; track closureOption) { + + {{ closureOption.value }} + + } - - {{ 'labels.inputs.Account action' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeOnMaturityAccountForm.controls.onAccountClosureId.hasError('required')) { + + {{ 'labels.inputs.Account action' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Transfer to Savings' | translate }} - - - {{ account.accountNo }} - - - - {{ 'labels.inputs.Transfer to savings account' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (closeOnMaturityAccountForm.contains('toSavingsAccountId')) { + + {{ 'labels.inputs.Transfer to Savings' | translate }} + + @for (account of savingsAccountsData; track account) { + + {{ account.accountNo }} + + } + + @if (closeOnMaturityAccountForm.controls.toSavingsAccountId.hasError('required')) { + + {{ 'labels.inputs.Transfer to savings account' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Transfer Description' | translate }} - - + @if (closeOnMaturityAccountForm.contains('transferDescription')) { + + {{ 'labels.inputs.Transfer Description' | translate }} + + + } {{ 'labels.inputs.Note' | translate }} diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/close-fixed-deposits-account/close-fixed-deposits-account.component.ts b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/close-fixed-deposits-account/close-fixed-deposits-account.component.ts index eb9969fbf1..b027835610 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/close-fixed-deposits-account/close-fixed-deposits-account.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/close-fixed-deposits-account/close-fixed-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -29,6 +29,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CloseFixedDepositsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private fixedDepositsService = inject(FixedDepositsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -44,6 +51,9 @@ export class CloseFixedDepositsAccountComponent implements OnInit { /** Maturity Amount */ maturityAmount: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches close action data from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -53,14 +63,7 @@ export class CloseFixedDepositsAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private fixedDepositsService: FixedDepositsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { fixedDepositsAccountActionData: any }) => { this.savingsAccountsData = data.fixedDepositsAccountActionData.savingsAccounts; this.onAccountClosureOptions = data.fixedDepositsAccountActionData.onAccountClosureOptions; diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-account-actions.component.html b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-account-actions.component.html index 77704a95ec..5d21297051 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-account-actions.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-account-actions.component.html @@ -1,15 +1,27 @@ - - - - - - - - - +@if (actions['Approve']) { + +} +@if (actions['Reject']) { + +} +@if (actions['Activate']) { + +} +@if (actions['Undo Approval'] || actions['Undo Activation']) { + +} +@if (actions['Withdrawn by Client']) { + +} +@if (actions['Add Charge']) { + +} +@if (actions['Premature Close']) { + +} +@if (actions['Close']) { + +} +@if (actions['Withdrawal']) { + +} diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-account-actions.component.ts b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-account-actions.component.ts index e176bc66b5..07bd161ea8 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-account-actions.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-account-actions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { ApproveFixedDepositsAccountComponent } from './approve-fixed-deposits-account/approve-fixed-deposits-account.component'; import { RejectFixedDepositsAccountComponent } from './reject-fixed-deposits-account/reject-fixed-deposits-account.component'; @@ -33,6 +33,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositsAccountActionsComponent { + private route = inject(ActivatedRoute); + /** Flag object to store possible actions and render appropriate UI to the user */ actions: { Approve: boolean; @@ -58,10 +60,13 @@ export class FixedDepositsAccountActionsComponent { Withdrawal: false }; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route */ - constructor(private route: ActivatedRoute) { + constructor() { const name = this.route.snapshot.params['name']; if (name && name in this.actions) { this.actions[name as keyof typeof this.actions] = true; diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.html b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.html index 724296c9f1..f49c695f80 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.html @@ -1,8 +1,10 @@ - - {{ 'labels.menus.' + actionName | translate }} {{ 'labels.heading.Fixed Deposit Transactions' | translate }} - + @if (transactionType.withdrawal) { + + {{ 'labels.menus.' + actionName | translate }} {{ 'labels.heading.Fixed Deposit Transactions' | translate }} + + } @@ -18,10 +20,12 @@ /> - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (accountTransactionForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentType.name }} - + @for (paymentType of paymentTypeOptions; track paymentType) { + + {{ paymentType.name }} + + } @@ -51,30 +57,40 @@ - - {{ 'labels.inputs.Account Number' | translate }} - - + @if (addPaymentDetailsFlag) { + + {{ 'labels.inputs.Account Number' | translate }} + + + } - - {{ 'labels.inputs.Cheque' | translate }} - - + @if (addPaymentDetailsFlag) { + + {{ 'labels.inputs.Cheque' | translate }} + + + } - - {{ 'labels.inputs.Routing Code' | translate }} - - + @if (addPaymentDetailsFlag) { + + {{ 'labels.inputs.Routing Code' | translate }} + + + } - - {{ 'labels.inputs.Receipt Number' | translate }} - - + @if (addPaymentDetailsFlag) { + + {{ 'labels.inputs.Receipt Number' | translate }} + + + } - - {{ 'labels.inputs.Bank' | translate }} - - + @if (addPaymentDetailsFlag) { + + {{ 'labels.inputs.Bank' | translate }} + + + } {{ 'labels.inputs.Notes' | translate }} diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.ts b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.ts index 6173160f4d..771aed2bd7 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormControl, @@ -29,6 +29,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositsCashTransactionComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private fixedDepositsService = inject(FixedDepositsService); + private settingsService = inject(SettingsService); + /** Minimum Due Date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum Due Date allowed. */ @@ -48,6 +55,9 @@ export class FixedDepositsCashTransactionComponent implements OnInit { accountId: string; currency: Currency; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Saving Account transaction template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -57,14 +67,7 @@ export class FixedDepositsCashTransactionComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private fixedDepositsService: FixedDepositsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { fixedDepositsAccountActionData: any }) => { this.currency = data.fixedDepositsAccountActionData.currency; this.paymentTypeOptions = data.fixedDepositsAccountActionData.paymentTypeOptions; diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/premature-close-fixed-deposits-account/premature-close-fixed-deposits-account.component.html b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/premature-close-fixed-deposits-account/premature-close-fixed-deposits-account.component.html index d00263d08d..bb82cdc05e 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/premature-close-fixed-deposits-account/premature-close-fixed-deposits-account.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/premature-close-fixed-deposits-account/premature-close-fixed-deposits-account.component.html @@ -15,52 +15,72 @@ /> - - {{ 'labels.inputs.Premature Close Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (prematureCloseAccountForm.controls.closedOnDate.hasError('required')) { + + {{ 'labels.inputs.Premature Close Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Maturity Amount' | translate }} - - + @if (prematureCloseAccountForm.controls.maturityAmount) { + + {{ 'labels.inputs.Maturity Amount' | translate }} + + + } - - {{ 'labels.inputs.Action' | translate }} - - - {{ closureOption.value }} - - - - {{ 'labels.inputs.Account action' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (prematureCloseAccountForm.contains('onAccountClosureId')) { + + {{ 'labels.inputs.Action' | translate }} + + @for (closureOption of onAccountClosureOptions; track closureOption) { + + {{ closureOption.value }} + + } + + @if (prematureCloseAccountForm.controls.onAccountClosureId.hasError('required')) { + + {{ 'labels.inputs.Account action' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Transfer to Savings' | translate }} - - - {{ account.accountNo }} - - - - {{ 'labels.inputs.Transfer to savings account' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (prematureCloseAccountForm.contains('toSavingsAccountId')) { + + {{ 'labels.inputs.Transfer to Savings' | translate }} + + @for (account of savingsAccountsData; track account) { + + {{ account.accountNo }} + + } + + @if (prematureCloseAccountForm.controls.toSavingsAccountId.hasError('required')) { + + {{ 'labels.inputs.Transfer to savings account' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Transfer Description' | translate }} - - + @if (prematureCloseAccountForm.contains('transferDescription')) { + + {{ 'labels.inputs.Transfer Description' | translate }} + + + } - - {{ 'labels.inputs.Note' | translate }} - - + @if (prematureCloseAccountForm.contains('note')) { + + {{ 'labels.inputs.Note' | translate }} + + + } diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/premature-close-fixed-deposits-account/premature-close-fixed-deposits-account.component.ts b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/premature-close-fixed-deposits-account/premature-close-fixed-deposits-account.component.ts index 74ed65bd34..8db3a93352 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/premature-close-fixed-deposits-account/premature-close-fixed-deposits-account.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/premature-close-fixed-deposits-account/premature-close-fixed-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -29,6 +29,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class PrematureCloseFixedDepositsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private fixedDepositsService = inject(FixedDepositsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -44,6 +51,9 @@ export class PrematureCloseFixedDepositsAccountComponent implements OnInit { /** Form submission event */ isSubmitted = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {FixedDepositsService} fixedDepositsService Fixed Deposits Service @@ -52,14 +62,7 @@ export class PrematureCloseFixedDepositsAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private fixedDepositsService: FixedDepositsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['fixedDepositAccountId']; } diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/reject-fixed-deposits-account/reject-fixed-deposits-account.component.html b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/reject-fixed-deposits-account/reject-fixed-deposits-account.component.html index 80f732e27b..21703a1619 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/reject-fixed-deposits-account/reject-fixed-deposits-account.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/reject-fixed-deposits-account/reject-fixed-deposits-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Rejected On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (rejectFixedDepositsAccountForm.controls.rejectedOnDate.hasError('required')) { + + {{ 'labels.inputs.Rejected On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/reject-fixed-deposits-account/reject-fixed-deposits-account.component.ts b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/reject-fixed-deposits-account/reject-fixed-deposits-account.component.ts index 9981a5632d..6fb2b1a183 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/reject-fixed-deposits-account/reject-fixed-deposits-account.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/reject-fixed-deposits-account/reject-fixed-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RejectFixedDepositsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private fixedDepositsService = inject(FixedDepositsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class RejectFixedDepositsAccountComponent implements OnInit { /** Fixed Deposits Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {FixedDepositsService} fixedDepositsService Fixed Deposits Service @@ -40,14 +50,7 @@ export class RejectFixedDepositsAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private fixedDepositsService: FixedDepositsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['fixedDepositAccountId']; } diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/undo-approval-fixed-deposits-account/undo-approval-fixed-deposits-account.component.ts b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/undo-approval-fixed-deposits-account/undo-approval-fixed-deposits-account.component.ts index f83943b2ba..b82c08b5a4 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/undo-approval-fixed-deposits-account/undo-approval-fixed-deposits-account.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/undo-approval-fixed-deposits-account/undo-approval-fixed-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -22,6 +22,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UndoApprovalFixedDepositsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private savingsService = inject(SavingsService); + private fixedDepositsService = inject(FixedDepositsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Undo Approval Fixed Deposits Account form. */ undoApprovalFixedDepositsAccountForm: UntypedFormGroup; /** Fixed Deposits Account Id */ @@ -30,6 +36,9 @@ export class UndoApprovalFixedDepositsAccountComponent implements OnInit { undoAction: string; undoCommand: string; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fixed deposits endpoint is not supported so using Savings endpoint. * @param {FormBuilder} formBuilder Form Builder @@ -37,13 +46,7 @@ export class UndoApprovalFixedDepositsAccountComponent implements OnInit { * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private savingsService: SavingsService, - private fixedDepositsService: FixedDepositsService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.undoCommand = 'undoapproval'; // Default command this.undoAction = this.route.snapshot.params['name']; if (this.undoAction === 'Undo Activation') { diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/withdraw-by-client-fixed-deposits-account/withdraw-by-client-fixed-deposits-account.component.html b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/withdraw-by-client-fixed-deposits-account/withdraw-by-client-fixed-deposits-account.component.html index 813a5f48a9..8cdb580b24 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/withdraw-by-client-fixed-deposits-account/withdraw-by-client-fixed-deposits-account.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/withdraw-by-client-fixed-deposits-account/withdraw-by-client-fixed-deposits-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Withdrawn On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (withdrawFixedDepositsAccountForm.controls.withdrawnOnDate.hasError('required')) { + + {{ 'labels.inputs.Withdrawn On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/withdraw-by-client-fixed-deposits-account/withdraw-by-client-fixed-deposits-account.component.ts b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/withdraw-by-client-fixed-deposits-account/withdraw-by-client-fixed-deposits-account.component.ts index 6c018d9cd3..f00041ec31 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/withdraw-by-client-fixed-deposits-account/withdraw-by-client-fixed-deposits-account.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/withdraw-by-client-fixed-deposits-account/withdraw-by-client-fixed-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class WithdrawByClientFixedDepositsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private fixedDepositsService = inject(FixedDepositsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class WithdrawByClientFixedDepositsAccountComponent implements OnInit { /** Fixed Deposits Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {FixedDepositsService} fixedDepositsService Fixed Deposits Service @@ -40,14 +50,7 @@ export class WithdrawByClientFixedDepositsAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private fixedDepositsService: FixedDepositsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['fixedDepositAccountId']; } diff --git a/src/app/deposits/fixed-deposits/fixed-deposits.service.ts b/src/app/deposits/fixed-deposits/fixed-deposits.service.ts index 54dfe24edd..edba286e61 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits.service.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposits.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -12,10 +12,15 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class FixedDepositsService { + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http HttpClient */ - constructor(private http: HttpClient) {} + constructor() {} /** * @param accountId Account Id. diff --git a/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposit-account-actions.resolver.ts b/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposit-account-actions.resolver.ts index 2c293f358e..dee3b54b85 100644 --- a/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposit-account-actions.resolver.ts +++ b/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposit-account-actions.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -14,14 +14,17 @@ import { RecurringDepositsService } from '../recurring-deposits.service'; */ @Injectable() export class RecurringDepositsAccountActionsResolver { + private savingsService = inject(SavingsService); + private recurringDepositsService = inject(RecurringDepositsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SavingsService} SavingsService Savings service. * @param {RecurringDepositsService} recurringDepositsService Recurring Deposits Service. */ - constructor( - private savingsService: SavingsService, - private recurringDepositsService: RecurringDepositsService - ) {} + constructor() {} /** * Returns the Recurring deposits account actions data. diff --git a/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposit-account-and-template.resolver.ts b/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposit-account-and-template.resolver.ts index 7b87772d8d..24763ceed1 100644 --- a/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposit-account-and-template.resolver.ts +++ b/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposit-account-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { RecurringDepositsService } from '../recurring-deposits.service'; */ @Injectable() export class RecurringDepositsAccountAndTemplateResolver { + private recurringDepositsService = inject(RecurringDepositsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {RecurringDepositsService} recurringDepositsService Recurring Deposits service. */ - constructor(private recurringDepositsService: RecurringDepositsService) {} + constructor() {} /** * Returns the Recurring Deposits Account Template. diff --git a/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposit-account-transaction-template.resolver.ts b/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposit-account-transaction-template.resolver.ts index ddd17d7713..4dd234671c 100644 --- a/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposit-account-transaction-template.resolver.ts +++ b/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposit-account-transaction-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { RecurringDepositsService } from '../recurring-deposits.service'; */ @Injectable() export class RecurringDepositsAccountTransactionTemplateResolver { + private recurringDepositsService = inject(RecurringDepositsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {RecurringDepositsService} recurringDepositsService Recurring Deposits service. */ - constructor(private recurringDepositsService: RecurringDepositsService) {} + constructor() {} /** * Returns the Recurring Deposits Account Transaction data. diff --git a/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposit-account-transaction.resolver.ts b/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposit-account-transaction.resolver.ts index 04d7398c63..2eedf2a5be 100644 --- a/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposit-account-transaction.resolver.ts +++ b/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposit-account-transaction.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { RecurringDepositsService } from '../recurring-deposits.service'; */ @Injectable() export class RecurringDepositsAccountTransactionResolver { + private recurringDepositsService = inject(RecurringDepositsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {RecurringDepositsService} recurringDepositsService Recurring Deposits service. */ - constructor(private recurringDepositsService: RecurringDepositsService) {} + constructor() {} /** * Returns the Recurring Deposits Account Transaction data. diff --git a/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposits-account-data.resolver.ts b/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposits-account-data.resolver.ts index 364cbb0c84..adaf4843a1 100644 --- a/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposits-account-data.resolver.ts +++ b/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposits-account-data.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { RecurringDepositsService } from '../recurring-deposits.service'; */ @Injectable() export class RecurringDepositsAccountDataResolver { + private recurringDepositsService = inject(RecurringDepositsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {RecurringDepositsService} RecurringDepositsService RecurringDeposits service. */ - constructor(private recurringDepositsService: RecurringDepositsService) {} + constructor() {} /** * Returns the RecurringDeposits Account data. diff --git a/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposits-account-template.resolver.ts b/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposits-account-template.resolver.ts index df746b0765..48a7bd8d2a 100644 --- a/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposits-account-template.resolver.ts +++ b/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposits-account-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { RecurringDepositsService } from '../recurring-deposits.service'; */ @Injectable() export class RecurringDepositsAccountTemplateResolver { + private recurringDepositsService = inject(RecurringDepositsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {recurringDepositsService} RecurringDepositsService Savings service. */ - constructor(private recurringDepositsService: RecurringDepositsService) {} + constructor() {} /** * Returns the Shares Account Template. diff --git a/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposits-account-view.resolver.ts b/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposits-account-view.resolver.ts index ddf798b293..3a72da613d 100644 --- a/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposits-account-view.resolver.ts +++ b/src/app/deposits/recurring-deposits/common-resolvers/recurring-deposits-account-view.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { RecurringDepositsService } from '../recurring-deposits.service'; */ @Injectable() export class RecurringDepositsAccountViewResolver { + private recurringDepositsService = inject(RecurringDepositsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {RecurringDepositsService} RecurringDepositsService RecurringDeposits service. */ - constructor(private recurringDepositsService: RecurringDepositsService) {} + constructor() {} /** * Returns the RecurringDeposits Account data. diff --git a/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.html b/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.html index 1cf0a39f22..33d597256c 100644 --- a/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.html +++ b/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.html @@ -77,16 +77,17 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (recurringDepositAccountFormValid) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.ts b/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.ts index 1d21e65fdd..b77da5a4e3 100644 --- a/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.ts +++ b/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Services */ @@ -41,6 +41,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateRecurringDepositsAccountComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private recurringDepositsService = inject(RecurringDepositsService); + private settingsService = inject(SettingsService); + /** Imports all the step component */ @ViewChild(RecurringDepositsAccountDetailsStepComponent, { static: true }) recurringDepositsAccountDetailsStep: RecurringDepositsAccountDetailsStepComponent; @@ -56,13 +62,10 @@ export class CreateRecurringDepositsAccountComponent { /** Recurring Deposit Account Product Template */ recurringDepositsAccountProductTemplate: any; - constructor( - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private recurringDepositsService: RecurringDepositsService, - private settingsService: SettingsService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { recurringDepositsAccountTemplate: any }) => { this.recurringDepositsAccountTemplate = data.recurringDepositsAccountTemplate; }); diff --git a/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.html b/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.html index 57186365db..8df2500025 100644 --- a/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.html +++ b/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.html @@ -78,16 +78,17 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (recurringDepositAccountFormValidAndNotPristine) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.ts b/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.ts index e43fede0cf..eb38c28fc4 100644 --- a/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.ts +++ b/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Services */ @@ -41,6 +41,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditRecurringDepositAccountComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private recurringDepositsService = inject(RecurringDepositsService); + private settingsService = inject(SettingsService); + /** Imports all the step component */ @ViewChild(RecurringDepositsAccountDetailsStepComponent, { static: true }) recurringDepositsAccountDetailsStep: RecurringDepositsAccountDetailsStepComponent; @@ -56,13 +62,10 @@ export class EditRecurringDepositAccountComponent { /** Recurring Deposit Account Product Template */ recurringDepositsAccountProductTemplate: any; - constructor( - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private recurringDepositsService: RecurringDepositsService, - private settingsService: SettingsService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { recurringDepositsAccountAndTemplate: any }) => { this.recurringDepositsAccountAndTemplate = data.recurringDepositsAccountAndTemplate; }); diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/activate-recurring-deposits-account/activate-recurring-deposits-account.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/activate-recurring-deposits-account/activate-recurring-deposits-account.component.html index 9938718c94..77a238f30e 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/activate-recurring-deposits-account/activate-recurring-deposits-account.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/activate-recurring-deposits-account/activate-recurring-deposits-account.component.html @@ -14,10 +14,12 @@ /> - - {{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (activateRecurringDepositsAccountForm.controls.activatedOnDate.hasError('required')) { + + {{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/activate-recurring-deposits-account/activate-recurring-deposits-account.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/activate-recurring-deposits-account/activate-recurring-deposits-account.component.ts index 7fe0691fbd..61948c6b11 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/activate-recurring-deposits-account/activate-recurring-deposits-account.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/activate-recurring-deposits-account/activate-recurring-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ActivateRecurringDepositsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private recurringDepositsService = inject(RecurringDepositsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -30,6 +37,9 @@ export class ActivateRecurringDepositsAccountComponent implements OnInit { /** Recurring Deposits Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {recurringDepositsService} recurringDepositsService Recurring Deposits Service @@ -38,14 +48,7 @@ export class ActivateRecurringDepositsAccountComponent implements OnInit { * @param {Router} router Router * @param {SavingsService} savingsService Savings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private recurringDepositsService: RecurringDepositsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId']; } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/add-charge-recurring-deposits-account/add-charge-recurring-deposits-account.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/add-charge-recurring-deposits-account/add-charge-recurring-deposits-account.component.html index a865146244..7633046779 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/add-charge-recurring-deposits-account/add-charge-recurring-deposits-account.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/add-charge-recurring-deposits-account/add-charge-recurring-deposits-account.component.html @@ -6,91 +6,102 @@ {{ 'labels.inputs.Charge' | translate }} - - {{ savingsCharge.name + ' (' + savingsCharge.currency.name + ')' }} - - - - {{ 'labels.inputs.Charge' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - {{ 'labels.inputs.Amount' | translate }} - - - {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Charge Calculation' | translate }} - - - {{ chargeCalculation.value }} - - - - - - {{ 'labels.inputs.Charge time type' | translate }} - - - {{ chargeTime.value }} + @for (savingsCharge of savingsChargeOptions; track savingsCharge) { + + {{ savingsCharge.name + ' (' + savingsCharge.currency.name + ')' }} - - - - - {{ 'labels.inputs.Due for collection on' | translate }} - - - - - {{ 'labels.inputs.Due for collection on' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Due On' | translate }} - - - - - {{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }} + } + + @if (recurringDepositsChargeForm.controls.chargeId.hasError('required')) { + + {{ 'labels.inputs.Charge' | translate }} {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} - + } + - - {{ 'labels.inputs.Repeats Every' | translate }} - - - + @if (chargeDetails) { + + + {{ 'labels.inputs.Amount' | translate }} + + @if (recurringDepositsChargeForm.controls.amount.hasError('required')) { + + {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Charge Calculation' | translate }} + + @for (chargeCalculation of chargeDetails.chargeCalculationTypeOptions; track chargeCalculation) { + + {{ chargeCalculation.value }} + + } + + + + {{ 'labels.inputs.Charge time type' | translate }} + + @for (chargeTime of chargeDetails.chargeTimeTypeOptions; track chargeTime) { + + {{ chargeTime.value }} + + } + + + @if (recurringDepositsChargeForm.contains('dueDate')) { + + {{ 'labels.inputs.Due for collection on' | translate }} + + + + @if (recurringDepositsChargeForm.controls.dueDate.hasError('required')) { + + {{ 'labels.inputs.Due for collection on' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + @if (recurringDepositsChargeForm.contains('feeOnMonthDay')) { + + {{ 'labels.inputs.Due On' | translate }} + + + + @if (recurringDepositsChargeForm.controls.feeOnMonthDay.hasError('required')) { + + {{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + @if (recurringDepositsChargeForm.contains('feeInterval')) { + + {{ 'labels.inputs.Repeats Every' | translate }} + + + } + + } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/add-charge-recurring-deposits-account/add-charge-recurring-deposits-account.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/add-charge-recurring-deposits-account/add-charge-recurring-deposits-account.component.ts index 96dc55c282..5b3c43293b 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/add-charge-recurring-deposits-account/add-charge-recurring-deposits-account.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/add-charge-recurring-deposits-account/add-charge-recurring-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -28,6 +28,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AddChargeRecurringDepositsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private savingsService = inject(SavingsService); + private settingsService = inject(SettingsService); + /** Minimum Due Date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum Due Date allowed. */ @@ -41,6 +48,9 @@ export class AddChargeRecurringDepositsAccountComponent implements OnInit { /** charge details */ chargeDetails: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves charge template data from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -49,14 +59,7 @@ export class AddChargeRecurringDepositsAccountComponent implements OnInit { * @param {Dates} dateUtils Date Utils * @param {SavingsService} savingsService Savings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private savingsService: SavingsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { recurringDepositsAccountActionData: any }) => { this.savingsChargeOptions = data.recurringDepositsAccountActionData.chargeOptions; }); diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/approve-recurring-deposits-account/approve-recurring-deposits-account.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/approve-recurring-deposits-account/approve-recurring-deposits-account.component.html index 9a60055a1a..fd39bbff0d 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/approve-recurring-deposits-account/approve-recurring-deposits-account.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/approve-recurring-deposits-account/approve-recurring-deposits-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Approved On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (approveRecurringDepositsAccountForm.controls.approvedOnDate.hasError('required')) { + + {{ 'labels.inputs.Approved On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/approve-recurring-deposits-account/approve-recurring-deposits-account.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/approve-recurring-deposits-account/approve-recurring-deposits-account.component.ts index 531f05fb04..ee336978d1 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/approve-recurring-deposits-account/approve-recurring-deposits-account.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/approve-recurring-deposits-account/approve-recurring-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ApproveRecurringDepositsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private recurringDepositsService = inject(RecurringDepositsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class ApproveRecurringDepositsAccountComponent implements OnInit { /** Recurring Deposits Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {RecurringDepositsService} recurringDepositsService Recurring Deposits Service @@ -40,14 +50,7 @@ export class ApproveRecurringDepositsAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private recurringDepositsService: RecurringDepositsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId']; } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/close-recurring-deposits-account/close-recurring-deposits-account.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/close-recurring-deposits-account/close-recurring-deposits-account.component.html index 2f1a0f8242..132a77dc3c 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/close-recurring-deposits-account/close-recurring-deposits-account.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/close-recurring-deposits-account/close-recurring-deposits-account.component.html @@ -17,106 +17,123 @@ {{ title }} /> - - {{ 'labels.inputs.Closed On' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeRecurringDepositForm.controls.closedOnDate.hasError('required')) { + + {{ 'labels.inputs.Closed On' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Maturity Amount' | translate }} - - {{ 'labels.inputs.Maturity Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeRecurringDepositForm.controls.maturityAmount.hasError('required')) { + + {{ 'labels.inputs.Maturity Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Action' | translate }} - - {{ onAccountClosureOption.value }} - + @for (onAccountClosureOption of onAccountClosureOptions; track onAccountClosureOption) { + + {{ onAccountClosureOption.value }} + + } - - {{ 'labels.inputs.Action' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeRecurringDepositForm.controls.onAccountClosureId.hasError('required')) { + + {{ 'labels.inputs.Action' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Transfer to Savings' | translate }} - - - {{ account.accountNo }} - - - - {{ 'labels.inputs.Transfer to savings account' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (closeRecurringDepositForm.contains('toSavingsAccountId')) { + + {{ 'labels.inputs.Transfer to Savings' | translate }} + + @for (account of savingsAccountsData; track account) { + + {{ account.accountNo }} + + } + + @if (closeRecurringDepositForm.controls.toSavingsAccountId.hasError('required')) { + + {{ 'labels.inputs.Transfer to savings account' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Transfer Description' | translate }} - - + @if (closeRecurringDepositForm.contains('transferDescription')) { + + {{ 'labels.inputs.Transfer Description' | translate }} + + + } {{ 'labels.inputs.Payment Type Id' | translate }} - - {{ paymentType.name }} - + @for (paymentType of paymentTypes; track paymentType) { + + {{ paymentType.name }} + + } - - {{ 'labels.inputs.Payment Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeRecurringDepositForm.controls.paymentTypeId.hasError('required')) { + + {{ 'labels.inputs.Payment Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Show Payment Details' | translate }} - - - - - - + @if (showPaymentDetails) { + + + + } + @if (!showPaymentDetails) { + + + + } - + @if (showPaymentDetails) { {{ 'labels.inputs.Account' | translate }} # - {{ 'labels.inputs.Cheque' | translate }} # - {{ 'labels.inputs.Routing Code' | translate }} - {{ 'labels.inputs.Reciept' | translate }} # - {{ 'labels.inputs.Bank' | translate }} # - + } {{ 'labels.inputs.Note' | translate }} diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/close-recurring-deposits-account/close-recurring-deposits-account.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/close-recurring-deposits-account/close-recurring-deposits-account.component.ts index 49faff45af..4d4629dca2 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/close-recurring-deposits-account/close-recurring-deposits-account.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/close-recurring-deposits-account/close-recurring-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -29,6 +29,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CloseRecurringDepositsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private recurringDepositsService = inject(RecurringDepositsService); + private settingsService = inject(SettingsService); + /** Maturity Amount */ maturityAmount: any; /** On Account Closure Options */ @@ -50,6 +57,9 @@ export class CloseRecurringDepositsAccountComponent implements OnInit { /** Close Recurring Deposit Account form. */ closeRecurringDepositForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves action details template data from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -58,14 +68,7 @@ export class CloseRecurringDepositsAccountComponent implements OnInit { * @param {Dates} dateUtils Date Utils * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private recurringDepositsService: RecurringDepositsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { recurringDepositsAccountActionData: any }) => { this.savingsAccountsData = data.recurringDepositsAccountActionData.savingsAccounts; this.maturityAmount = data.recurringDepositsAccountActionData.maturityAmount; diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.html index 0e62a592db..ab69fb6c9e 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.html @@ -1,8 +1,10 @@ - - {{ 'labels.menus.' + actionName | translate }} {{ 'labels.heading.Recurring Deposit Transactions' | translate }} - + @if (transactionType.withdrawal) { + + {{ 'labels.menus.' + actionName | translate }} {{ 'labels.heading.Recurring Deposit Transactions' | translate }} + + } @@ -19,10 +21,12 @@ /> - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (depositRecurringDepositForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Payment Type Id' | translate }} - - {{ paymentType.name }} - + @for (paymentType of paymentTypes; track paymentType) { + + {{ paymentType.name }} + + } - - {{ 'labels.inputs.Payment Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (depositRecurringDepositForm.controls.paymentTypeId.hasError('required')) { + + {{ 'labels.inputs.Payment Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -56,32 +64,28 @@ - + @if (showPaymentDetails) { {{ 'labels.inputs.Account' | translate }} # - {{ 'labels.inputs.Cheque' | translate }} # - {{ 'labels.inputs.Routing Code' | translate }} - {{ 'labels.inputs.Reciept' | translate }} # - {{ 'labels.inputs.Bank' | translate }} # - + } {{ 'labels.inputs.Note' | translate }} diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.ts index a2a23bd4c1..c6a5e42115 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -35,6 +35,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DepositRecurringDepositsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private recurringDepositsService = inject(RecurringDepositsService); + private settingsService = inject(SettingsService); + @Input() currency: Currency; /** Transactions Amount */ @@ -59,6 +66,9 @@ export class DepositRecurringDepositsAccountComponent implements OnInit { transactionCommand: TransactionCommand; transactionType: TransactionTypeFlags = { deposit: false, withdrawal: false }; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves action details transactions template data from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -67,14 +77,7 @@ export class DepositRecurringDepositsAccountComponent implements OnInit { * @param {Dates} dateUtils Date Utils * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private recurringDepositsService: RecurringDepositsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { recurringDepositsAccountActionData: any }) => { this.transactionAmount = data.recurringDepositsAccountActionData.amount; this.paymentTypes = data.recurringDepositsAccountActionData.paymentTypeOptions; diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/premature-close-recurring-deposit-account/premature-close-recurring-deposit-account.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/premature-close-recurring-deposit-account/premature-close-recurring-deposit-account.component.html index 1fe35fa58e..a6d7a5a8b9 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/premature-close-recurring-deposit-account/premature-close-recurring-deposit-account.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/premature-close-recurring-deposit-account/premature-close-recurring-deposit-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (prematureCloseRecurringDepositsAccountForm.controls.closedOnDate.hasError('required')) { + + {{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/premature-close-recurring-deposit-account/premature-close-recurring-deposit-account.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/premature-close-recurring-deposit-account/premature-close-recurring-deposit-account.component.ts index 3d7e7a863b..f6e0b0ccf0 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/premature-close-recurring-deposit-account/premature-close-recurring-deposit-account.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/premature-close-recurring-deposit-account/premature-close-recurring-deposit-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -22,6 +22,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class PrematureCloseRecurringDepositAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private recurringDepositsService = inject(RecurringDepositsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -31,6 +38,9 @@ export class PrematureCloseRecurringDepositAccountComponent implements OnInit { /** Recurring Deposits Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {RecurringDepositsService} recurringDepositsService Recurring Deposits Service @@ -39,14 +49,7 @@ export class PrematureCloseRecurringDepositAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private recurringDepositsService: RecurringDepositsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId']; } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/recurring-deposits-account-actions.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/recurring-deposits-account-actions.component.html index daacb93ab9..1a8f1cecb4 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/recurring-deposits-account-actions.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/recurring-deposits-account-actions.component.html @@ -1,20 +1,27 @@ - - - - - - - - - +@if (actions['Activate']) { + +} +@if (actions['Undo Approval'] || actions['Undo Activation']) { + +} +@if (actions['Approve']) { + +} +@if (actions['Reject']) { + +} +@if (actions['Withdrawn by Client']) { + +} +@if (actions['Add Charge']) { + +} +@if (actions['Premature Close']) { + +} +@if (actions['Close']) { + +} +@if (actions['Deposit'] || actions['Withdrawal']) { + +} diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/recurring-deposits-account-actions.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/recurring-deposits-account-actions.component.ts index ede3904fad..2c13d2eb4f 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/recurring-deposits-account-actions.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/recurring-deposits-account-actions.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Currency } from 'app/shared/models/general.model'; import { ActivateRecurringDepositsAccountComponent } from './activate-recurring-deposits-account/activate-recurring-deposits-account.component'; @@ -30,6 +30,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositsAccountActionsComponent { + private route = inject(ActivatedRoute); + /** Flag object to store possible actions and render appropriate UI to the user */ actions: { Activate: boolean; @@ -59,10 +61,13 @@ export class RecurringDepositsAccountActionsComponent { currency: Currency; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { recurringDepositsAccountActionData: any }) => { if (data.recurringDepositsAccountActionData) { this.currency = data.recurringDepositsAccountActionData.currency; diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/reject-recurring-deposits-account/reject-recurring-deposits-account.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/reject-recurring-deposits-account/reject-recurring-deposits-account.component.html index 46603a5682..c1df596a2f 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/reject-recurring-deposits-account/reject-recurring-deposits-account.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/reject-recurring-deposits-account/reject-recurring-deposits-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Rejected On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (rejectRecurringDepositsAccountForm.controls.rejectedOnDate.hasError('required')) { + + {{ 'labels.inputs.Rejected On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/reject-recurring-deposits-account/reject-recurring-deposits-account.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/reject-recurring-deposits-account/reject-recurring-deposits-account.component.ts index 3f64916fa9..0abe2529d9 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/reject-recurring-deposits-account/reject-recurring-deposits-account.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/reject-recurring-deposits-account/reject-recurring-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RejectRecurringDepositsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private recurringDepositsService = inject(RecurringDepositsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class RejectRecurringDepositsAccountComponent implements OnInit { /** Recurring Deposits Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {RecurringDepositsService} recurringDepositsService Recurring Deposits Service @@ -40,14 +50,7 @@ export class RejectRecurringDepositsAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private recurringDepositsService: RecurringDepositsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId']; } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/undo-approval-recurring-deposits-account/undo-approval-recurring-deposits-account.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/undo-approval-recurring-deposits-account/undo-approval-recurring-deposits-account.component.ts index 2b90d94b8b..486906be49 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/undo-approval-recurring-deposits-account/undo-approval-recurring-deposits-account.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/undo-approval-recurring-deposits-account/undo-approval-recurring-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UndoApprovalRecurringDepositsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private recurringDepositsService = inject(RecurringDepositsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Undo Approval Recurring Deposits Account form. */ undoApprovalRecurringDepositsAccountForm: UntypedFormGroup; /** Recurring Deposits Account Id */ @@ -29,18 +34,16 @@ export class UndoApprovalRecurringDepositsAccountComponent implements OnInit { undoAction: string; undoCommand: string; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SavingsService} recurringDepositsService Recurring Deposits Service * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private recurringDepositsService: RecurringDepositsService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.undoCommand = 'undoapproval'; // Default command this.undoAction = this.route.snapshot.params['name']; if (this.undoAction === 'Undo Activation') { diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/withdraw-by-client-recurring-deposits-account/withdraw-by-client-recurring-deposits-account.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/withdraw-by-client-recurring-deposits-account/withdraw-by-client-recurring-deposits-account.component.html index 34174f0b84..4513a705c0 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/withdraw-by-client-recurring-deposits-account/withdraw-by-client-recurring-deposits-account.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/withdraw-by-client-recurring-deposits-account/withdraw-by-client-recurring-deposits-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Withdrawn On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (withdrawRecurringDepositsAccountForm.controls.withdrawnOnDate.hasError('required')) { + + {{ 'labels.inputs.Withdrawn On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/withdraw-by-client-recurring-deposits-account/withdraw-by-client-recurring-deposits-account.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/withdraw-by-client-recurring-deposits-account/withdraw-by-client-recurring-deposits-account.component.ts index b17ea1f30f..e329fa0f2d 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/withdraw-by-client-recurring-deposits-account/withdraw-by-client-recurring-deposits-account.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/withdraw-by-client-recurring-deposits-account/withdraw-by-client-recurring-deposits-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -22,6 +22,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class WithdrawByClientRecurringDepositsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private recurringDepositsService = inject(RecurringDepositsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -31,6 +38,9 @@ export class WithdrawByClientRecurringDepositsAccountComponent implements OnInit /** Recurring Deposits Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {RecurringDepositsService} recurringDepositsService Recurring Deposits Service @@ -39,14 +49,7 @@ export class WithdrawByClientRecurringDepositsAccountComponent implements OnInit * @param {Router} router Router * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private recurringDepositsService: RecurringDepositsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId']; } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.html index 20cfa2b857..78a587f344 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.html @@ -2,9 +2,11 @@ {{ 'labels.inputs.Charge' | translate }} - - {{ charge.name }} - + @for (charge of chargeData; track charge) { + + {{ charge.name }} + + } @@ -55,38 +57,37 @@ {{ 'labels.inputs.Date' | translate }} - - {{ (charge.dueDate | dateFormat) || 'Unassigned' }} - - - {{ (charge.feeOnMonthDay | dateFormat) || 'Unassigned' }} - - - {{ 'labels.inputs.N/A' | translate }} - - + {{ (charge.dueDate | dateFormat) || 'Unassigned' }} + + } + @if (charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee') { + + {{ (charge.feeOnMonthDay | dateFormat) || 'Unassigned' }} + + } + @if ( + !( + charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee' || - charge.chargeTimeType.value === 'Specified due date' - " - (click)="editChargeDate(charge)" - > - - + charge.chargeTimeType.value === 'Specified due date' || + charge.chargeTimeType.value === 'Weekly Fee' + ) + ) { + + {{ 'labels.inputs.N/A' | translate }} + + } + @if ( + charge.chargeTimeType.value === 'Weekly Fee' || + charge.chargeTimeType.value === 'Annual Fee' || + charge.chargeTimeType.value === 'Specified due date' + ) { + + + + } @@ -94,14 +95,11 @@ {{ 'labels.inputs.Repayments Every' | translate }} {{ charge.feeInterval || 'Not Provided' }} - - - + @if (charge.chargeTimeType.value === 'Weekly Fee' || charge.chargeTimeType.value === 'Monthly Fee') { + + + + } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.ts index 6c3abc1f28..79c1e6180d 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, OnChanges } from '@angular/core'; +import { Component, OnInit, Input, OnChanges, inject } from '@angular/core'; import { UntypedFormControl } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; @@ -61,6 +61,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositsAccountChargesStepComponent implements OnInit, OnChanges { + dialog = inject(MatDialog); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + @Input() recurringDepositsAccountTemplate: any; @Input() recurringDepositsAccountProductTemplate: any; @Input() currencyCode: UntypedFormControl; @@ -87,11 +91,10 @@ export class RecurringDepositsAccountChargesStepComponent implements OnInit, OnC /** Currency Code */ currency: Currency | null = null; - constructor( - public dialog: MatDialog, - private dateUtils: Dates, - private settingsService: SettingsService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { this.chargesDataSource = []; diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.html index fc19cc5966..c9a75f2a81 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.html @@ -3,9 +3,11 @@ {{ 'labels.inputs.Product Name' | translate }} - - {{ product.name }} - + @for (product of productData; track product) { + + {{ product.name }} + + } {{ 'labels.inputs.Product Name' | translate }} {{ 'labels.commons.is' | translate }} @@ -13,37 +15,49 @@ - - {{ 'labels.inputs.Submitted On' | translate }} - - - - - {{ 'labels.inputs.Submission Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (isProductSelected) { + + {{ 'labels.inputs.Submitted On' | translate }} + + + + + {{ 'labels.inputs.Submission Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + } - - {{ 'labels.inputs.Field Officer' | translate }} - - - {{ officer.displayName }} - - - + @if (isProductSelected) { + + {{ 'labels.inputs.Field Officer' | translate }} + + @for (officer of fieldOfficerData; track officer) { + + {{ officer.displayName }} + + } + + + } - - {{ 'labels.inputs.External id' | translate }} - - + @if (isProductSelected) { + + {{ 'labels.inputs.External id' | translate }} + + + } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.ts index 60a3c73f5e..e0d0bd41fd 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; +import { Component, OnInit, Input, Output, EventEmitter, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { SettingsService } from 'app/settings/settings.service'; @@ -26,6 +26,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositsAccountDetailsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private recurringDepositsService = inject(RecurringDepositsService); + private settingsService = inject(SettingsService); + /** Recurring Deposits Account Template */ @Input() recurringDepositsAccountTemplate: any; @@ -47,17 +51,16 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit { /** Recurring Deposits Account Template with product data */ @Output() recurringDepositsAccountProductTemplate = new EventEmitter(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Sets recurring deposits account details form. * @param {FormBuilder} formBuilder Form Builder. * @param {RecurringDepositsService} recurringDepositsService Recurring Deposits Service. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private recurringDepositsService: RecurringDepositsService, - private settingsService: SettingsService - ) { + constructor() { this.createRecurringDepositsAccountDetailsForm(); } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.html index 0e563faa97..f298d8120c 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.html @@ -22,25 +22,25 @@ {{ 'labels.heading.Lock-in Period' | translate }} {{ 'labels.inputs.Type' | translate }} - - {{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }} - + @for (lockinPeriodFrequencyType of lockinPeriodFrequencyTypeData; track lockinPeriodFrequencyType) { + + {{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }} + + } {{ 'labels.heading.Recurring Deposit Details' | translate }} - - + @if (currency) { + + + } {{ 'labels.heading.Deposit Period' | translate }} @@ -52,9 +52,11 @@ {{ 'labels.heading.Deposit Period' | translate }} {{ 'labels.inputs.Type' | translate }} - - {{ periodFrequencyType.value | translateKey: 'catalogs' }} - + @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { + + {{ periodFrequencyType.value | translateKey: 'catalogs' }} + + } @@ -62,7 +64,7 @@ {{ 'labels.heading.Deposit Period' | translate }} - + @if (!recurringDepositAccountSettingsForm.value.isCalendarInherited) { {{ 'labels.inputs.Deposit Start Date' | translate }} {{ 'labels.heading.Deposit Period' | translate }} - {{ 'labels.heading.Deposit Frequency' | translate }} - {{ 'labels.inputs.Deposit Frequency' | translate }} @@ -87,20 +87,21 @@ {{ 'labels.heading.Deposit Frequency' | translate }}< {{ 'labels.commons.required' | translate }} - {{ 'labels.inputs.Type' | translate }} - - {{ periodFrequencyType.value | translateKey: 'catalogs' }} - + @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { + + {{ periodFrequencyType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Deposit Frequency Type' | translate }} {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} - + } @@ -118,9 +119,11 @@ {{ 'labels.heading.Minimum Deposit Term' | translate {{ 'labels.inputs.Frequency Type' | translate }} - - {{ periodFrequencyType.value | translateKey: 'catalogs' }} - + @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { + + {{ periodFrequencyType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Minimum Deposit Term Frequency Type' | translate }} {{ 'labels.commons.is' | translate }} @@ -138,9 +141,11 @@ {{ 'labels.heading.And thereafter, in Multiples of' | {{ 'labels.inputs.Type' | translate }} - - {{ periodFrequencyType.value | translateKey: 'catalogs' }} - + @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { + + {{ periodFrequencyType.value | translateKey: 'catalogs' }} + + } @@ -154,9 +159,11 @@ {{ 'labels.heading.Maximum Deposit Term' | translate {{ 'labels.inputs.Type' | translate }} - - {{ periodFrequencyType.value | translateKey: 'catalogs' }} - + @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { + + {{ periodFrequencyType.value | translateKey: 'catalogs' }} + + } @@ -176,12 +183,11 @@ {{ 'labels.heading.For Pre-mature closure' | translat {{ 'labels.inputs.Period' | translate }} - - {{ preClosurePenalInterestOnType.value | translateKey: 'catalogs' }} - + @for (preClosurePenalInterestOnType of preClosurePenalInterestOnTypeData; track preClosurePenalInterestOnType) { + + {{ preClosurePenalInterestOnType.value | translateKey: 'catalogs' }} + + } @@ -192,18 +198,18 @@ {{ 'labels.heading.For Pre-mature closure' | translat - + @if (taxGroup) { {{ 'labels.heading.Tax Group' | translate }} - {{ 'labels.inputs.Is Withhold Tax Applicable' | translate }}? - - - {{ 'labels.inputs.Tax Group' | translate }} - - - + @if (recurringDepositAccountSettingsForm.controls.taxGroupId) { + + {{ 'labels.inputs.Tax Group' | translate }} + + + } + } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.ts index 8ea70f2033..0479f9634a 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, OnChanges } from '@angular/core'; +import { Component, OnInit, Input, OnChanges, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -36,6 +36,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositsAccountSettingsStepComponent implements OnInit, OnChanges { + private formBuilder = inject(UntypedFormBuilder); + private settingsService = inject(SettingsService); + @Input() isNew = true; @Input() recurringDepositsAccountTemplate: any; @Input() recurringDepositsAccountProductTemplate: any; @@ -56,14 +59,14 @@ export class RecurringDepositsAccountSettingsStepComponent implements OnInit, On taxGroup: any; currency: Currency | null = null; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private settingsService: SettingsService - ) { + constructor() { this.createRecurringDepositAccountSettingsForm(); this.buildDependencies(); } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.html index 9bbe705110..2deb0db2da 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.html @@ -3,12 +3,11 @@ {{ 'labels.inputs.Interest Compounding Period' | translate }} - - {{ interestCompoundingPeriodType.value | translateKey: 'catalogs' }} - + @for (interestCompoundingPeriodType of interestCompoundingPeriodTypeData; track interestCompoundingPeriodType) { + + {{ interestCompoundingPeriodType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Interest Compounding Period' | translate }} {{ 'labels.commons.is' | translate }} @@ -19,12 +18,11 @@ {{ 'labels.inputs.Interest Posting Period' | translate }} - - {{ interestPostingPeriodType.value | translateKey: 'catalogs' }} - + @for (interestPostingPeriodType of interestPostingPeriodTypeData; track interestPostingPeriodType) { + + {{ interestPostingPeriodType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Interest Posting Period' | translate }} {{ 'labels.commons.is' | translate }} @@ -35,12 +33,11 @@ {{ 'labels.inputs.Interest Calculated using' | translate }} - - {{ interestCalculationType.value | translateKey: 'catalogs' }} - + @for (interestCalculationType of interestCalculationTypeData; track interestCalculationType) { + + {{ interestCalculationType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Interest Calculated using' | translate }} {{ 'labels.commons.is' | translate }} @@ -51,12 +48,14 @@ {{ 'labels.inputs.Days in Year' | translate }} - - {{ interestCalculationDaysInYearType.value | translateKey: 'catalogs' }} - + @for ( + interestCalculationDaysInYearType of interestCalculationDaysInYearTypeData; + track interestCalculationDaysInYearType + ) { + + {{ interestCalculationDaysInYearType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Days in Year' | translate }} {{ 'labels.commons.is' | translate }} diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.ts index 5246c38411..bbf5012dfc 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, OnChanges } from '@angular/core'; +import { Component, OnInit, Input, OnChanges, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, FormControl, ReactiveFormsModule } from '@angular/forms'; import { SettingsService } from 'app/settings/settings.service'; import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper'; @@ -21,6 +21,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositsAccountTermsStepComponent implements OnInit, OnChanges { + private formBuilder = inject(UntypedFormBuilder); + private settingsService = inject(SettingsService); + @Input() recurringDepositsAccountTemplate: any; @Input() recurringDepositsAccountProductTemplate: any; @@ -39,14 +42,14 @@ export class RecurringDepositsAccountTermsStepComponent implements OnInit, OnCha /** Interest Calculation Days in Year Data */ interestCalculationDaysInYearTypeData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private settingsService: SettingsService - ) { + constructor() { this.createRecurringDepositsAccountTermsForm(); } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/charges-tab/charges-tab.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/charges-tab/charges-tab.component.html index 17ca2aad74..4e5bc40418 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/charges-tab/charges-tab.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/charges-tab/charges-tab.component.html @@ -64,63 +64,65 @@ {{ 'labels.heading.All Charges' | translate }} {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - + @if (recurringDepositsAccountData.status.value === 'Submitted and pending approval') { + - + - + - + } + @if ( + recurringDepositsAccountData.status.value !== 'Submitted and pending approval' && + charge.amountOutstanding !== 0 + ) { + + @if ( + charge.chargeTimeType.value === 'Monthly Fee' || + charge.chargeTimeType.value === 'Annual Fee' || + charge.chargeTimeType.value === 'Specified due date' + ) { + + + + + + + + + } + + } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/charges-tab/charges-tab.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/charges-tab/charges-tab.component.ts index b0f0c2890f..0753413282 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/charges-tab/charges-tab.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/charges-tab/charges-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; import { @@ -59,6 +59,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ChargesTabComponent implements OnInit { + private route = inject(ActivatedRoute); + private savingsService = inject(SavingsService); + private dateUtils = inject(Dates); + private router = inject(Router); + dialog = inject(MatDialog); + private translateService = inject(TranslateService); + private settingsService = inject(SettingsService); + /** Recurring Deposits Account Data */ recurringDepositsAccountData: any; /** Charges Data */ @@ -85,19 +93,14 @@ export class ChargesTabComponent implements OnInit { /** Charges Table Reference */ @ViewChild('chargesTable', { static: true }) chargesTableRef: MatTable; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves Recurring Deposits Account Data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor( - private route: ActivatedRoute, - private savingsService: SavingsService, - private dateUtils: Dates, - private router: Router, - public dialog: MatDialog, - private translateService: TranslateService, - private settingsService: SettingsService - ) { + constructor() { this.route.parent.data.subscribe((data: { recurringDepositsAccountData: any }) => { this.recurringDepositsAccountData = data.recurringDepositsAccountData; this.chargesData = this.recurringDepositsAccountData.charges; diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/custom-dialogs/recurring-deposit-confirmation-dialog/recurring-deposit-confirmation-dialog.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/custom-dialogs/recurring-deposit-confirmation-dialog/recurring-deposit-confirmation-dialog.component.ts index 9e5d75a1f1..5655b2f35f 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/custom-dialogs/recurring-deposit-confirmation-dialog/recurring-deposit-confirmation-dialog.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/custom-dialogs/recurring-deposit-confirmation-dialog/recurring-deposit-confirmation-dialog.component.ts @@ -1,4 +1,4 @@ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -24,12 +24,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositConfirmationDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Provides a confirmation for all the recurring deposit actions. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/datatable-tabs/datatable-tabs.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/datatable-tabs/datatable-tabs.component.ts index a3e791b9be..a889dbf34e 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/datatable-tabs/datatable-tabs.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/datatable-tabs/datatable-tabs.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { EntityDatatableTabComponent } from '../../../../shared/tabs/entity-datatable-tab/entity-datatable-tab.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -17,17 +17,22 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DatatableTabsComponent { + private route = inject(ActivatedRoute); + entityId: string; /** Savings Datatable */ entityDatatable: any; /** Multi Row Datatable Flag */ multiRowDatatableFlag: boolean; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches Savings and datatables data from `resolve` * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.entityId = this.route.parent.parent.snapshot.paramMap.get('recurringDepositAccountId'); this.route.data.subscribe((data: { savingsDatatable: any }) => { diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/general-tab/general-tab.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/general-tab/general-tab.component.html index a9140bb2cc..d5a28fefca 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/general-tab/general-tab.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/general-tab/general-tab.component.html @@ -1,448 +1,500 @@ - - {{ 'labels.inputs.Account Details' | translate }} - - - - {{ 'labels.inputs.External Id' | translate }} - - - - - - {{ 'labels.inputs.Not Available' | translate }} - - - - - {{ 'labels.inputs.Field Officer' | translate }} - - {{ recurringDepositsAccountData.fieldOfficerName - }}{{ - 'labels.inputs.Unassigned' | translate - }} - - - - {{ 'labels.inputs.Activation date' | translate }} - {{ recurringDepositsAccountData.timeline.activatedOnDate | dateFormat }} - - - {{ 'labels.inputs.Maturity Date' | translate }} - - {{ recurringDepositsAccountData.maturityDate | dateFormat }} - - - + {{ 'labels.inputs.Account Details' | translate }} + + + + {{ 'labels.inputs.External Id' | translate }} + + @if (recurringDepositsAccountData.externalId) { + + + + } + @if (!recurringDepositsAccountData.externalId) { + + {{ 'labels.inputs.Not Available' | translate }} + + } + + + + {{ 'labels.inputs.Field Officer' | translate }} + + {{ recurringDepositsAccountData.fieldOfficerName }} + @if (!recurringDepositsAccountData.fieldOfficerName) { + {{ 'labels.inputs.Unassigned' | translate }} + } + + + + {{ 'labels.inputs.Activation date' | translate }} + {{ recurringDepositsAccountData.timeline.activatedOnDate | dateFormat }} + + + {{ 'labels.inputs.Maturity Date' | translate }} + + {{ recurringDepositsAccountData.maturityDate | dateFormat }} + + + @if ( recurringDepositsAccountData.timeline.closedOnDate || recurringDepositsAccountData.summary.totalWitddrawals - " - > - - {{ 'labels.inputs.Closed on Date' | translate }} - - - {{ recurringDepositsAccountData.timeline.closedOnDate | dateFormat }} - - - - - {{ 'labels.inputs.Deposit Frequency' | translate }} - - {{ recurringDepositsAccountData.recurringFrequency }} - {{ recurringDepositsAccountData.recurringFrequencyType.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Balance Required for Interest Calculation' | translate }} - - {{ recurringDepositsAccountData.minBalanceForInterestCalculation }} - - - - {{ 'labels.inputs.Witdhold Tax Group' | translate }} - - {{ recurringDepositsAccountData.taxGroup.name }} - - - - - + ) { + + @if (recurringDepositsAccountData.timeline.closedOnDate) { + + {{ 'labels.inputs.Closed on Date' | translate }} + + } + + {{ recurringDepositsAccountData.timeline.closedOnDate | dateFormat }} + + + } + + + {{ 'labels.inputs.Deposit Frequency' | translate }} + + {{ recurringDepositsAccountData.recurringFrequency }} + {{ recurringDepositsAccountData.recurringFrequencyType.value | translateKey: 'catalogs' }} + + + @if (recurringDepositsAccountData.minBalanceForInterestCalculation) { + + {{ 'labels.inputs.Balance Required for Interest Calculation' | translate }} + + {{ recurringDepositsAccountData.minBalanceForInterestCalculation }} + + + } + @if (recurringDepositsAccountData.witdHoldTax) { + + {{ 'labels.inputs.Witdhold Tax Group' | translate }} + + {{ recurringDepositsAccountData.taxGroup.name }} + + + } + + + + } - - {{ 'labels.heading.Performance History' | translate }} - - - - {{ 'labels.inputs.Principal Amount' | translate }} - - {{ - recurringDepositsAccountData.depositAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Maturity Amount' | translate }} - - {{ - recurringDepositsAccountData.maturityAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Recurring Deposit Amount' | translate }} - - {{ - recurringDepositsAccountData?.mandatoryRecommendedDepositAmount - | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Deposits till Date' | translate }} - - {{ - recurringDepositsAccountData.summary.totalDeposits | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - {{ - 0 | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Withdrwals till Date' | translate }} - - {{ - recurringDepositsAccountData.summary.totalWithdrawals - | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - {{ - 0 | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - = 0"> - {{ 'labels.inputs.Interest Earned' | translate }} - - {{ - recurringDepositsAccountData.summary.totalInterestEarned - | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - - - - - - - - {{ 'labels.inputs.External Id' | translate }} - - - - - - {{ 'labels.inputs.Not Available' | translate }} - - - - - {{ 'labels.inputs.Date of Deposit' | translate }} - - {{ recurringDepositsAccountData.timeline.activatedOnDate | dateFormat }} - {{ - 'labels.inputs.Not Activated' | translate + @if ( + !recurringDepositsAccountData.status.rejected && !recurringDepositsAccountData.status.submittedAndPendingApproval + ) { + + {{ 'labels.heading.Performance History' | translate }} + + + + {{ 'labels.inputs.Principal Amount' | translate }} + + {{ + recurringDepositsAccountData.depositAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - {{ recurringDepositsAccountData.expectedFirstDepositOnDate | dateFormat }} - {{ - 'labels.inputs.Not Activated' | translate + + + + {{ 'labels.inputs.Maturity Amount' | translate }} + + {{ + recurringDepositsAccountData.maturityAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - - - {{ 'labels.inputs.Period' | translate }} - - {{ recurringDepositsAccountData.depositPeriod }} {{ - recurringDepositsAccountData.depositPeriodFrequency.value - }} - - - - {{ 'labels.inputs.Maturity Date' | translate }} - - {{ recurringDepositsAccountData.maturityDate | dateFormat }} - - - - {{ 'labels.inputs.Total Deposits' | translate }} - - {{ - recurringDepositsAccountData.summary.totalDeposits | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - {{ - 0 | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Actual Available Balance' | translate }} - - {{ - recurringDepositsAccountData.summary.accountBalance | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Recurring Deposit Amount' | translate }} - - {{ - recurringDepositsAccountData.mandatoryRecommendedDepositAmount - | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Interests Earned' | translate }} - - {{ recurringDepositsAccountData.currency.displaySymbol }} {{ - recurringDepositsAccountData.summary.totalInterestEarned - }} - - - - {{ 'labels.inputs.Total Withdrawls' | translate }} - - {{ - recurringDepositsAccountData.summary.totalWithdrawals - | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Balance Required for Interest Calculation' | translate }} - - {{ recurringDepositsAccountData.minBalanceForInterestCalculation | number }} - - - - - + + + + {{ 'labels.inputs.Recurring Deposit Amount' | translate }} + + {{ + recurringDepositsAccountData?.mandatoryRecommendedDepositAmount + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + + {{ 'labels.inputs.Deposits till Date' | translate }} + + @if (recurringDepositsAccountData.summary.totalDeposits) { + {{ + recurringDepositsAccountData.summary.totalDeposits + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + } + @if (!recurringDepositsAccountData.summary.totalDeposits) { + {{ 0 | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + } + + + + {{ 'labels.inputs.Withdrwals till Date' | translate }} + + @if (recurringDepositsAccountData.summary.totalWithdrawals) { + {{ + recurringDepositsAccountData.summary.totalWithdrawals + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + } + @if (!recurringDepositsAccountData.summary.totalWithdrawals) { + {{ 0 | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + } + + + @if (recurringDepositsAccountData.summary.totalInterestEarned >= 0) { + + {{ 'labels.inputs.Interest Earned' | translate }} + + {{ + recurringDepositsAccountData.summary.totalInterestEarned + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + } + + + + } + + @if ( + recurringDepositsAccountData.status.rejected || recurringDepositsAccountData.status.submittedAndPendingApproval + ) { + + + + + {{ 'labels.inputs.External Id' | translate }} + + @if (recurringDepositsAccountData.externalId) { + + + + } + @if (!recurringDepositsAccountData.externalId) { + + {{ 'labels.inputs.Not Available' | translate }} + + } + + + + {{ 'labels.inputs.Date of Deposit' | translate }} + + @if (!recurringDepositsAccountData.expectedFirstDepositOnDate) { + {{ recurringDepositsAccountData.timeline.activatedOnDate | dateFormat }} + @if (!recurringDepositsAccountData.timeline.activatedOnDate) { + {{ 'labels.inputs.Not Activated' | translate }} + } + + } + @if (recurringDepositsAccountData.expectedFirstDepositOnDate) { + {{ recurringDepositsAccountData.expectedFirstDepositOnDate | dateFormat }} + @if (!recurringDepositsAccountData.expectedFirstDepositOnDate) { + {{ 'labels.inputs.Not Activated' | translate }} + } + + } + + + + {{ 'labels.inputs.Period' | translate }} + + {{ recurringDepositsAccountData.depositPeriod }} {{ + recurringDepositsAccountData.depositPeriodFrequency.value + }} + + + @if (recurringDepositsAccountData.maturityDate) { + + {{ 'labels.inputs.Maturity Date' | translate }} + + {{ recurringDepositsAccountData.maturityDate | dateFormat }} + + + } + + {{ 'labels.inputs.Total Deposits' | translate }} + + @if (recurringDepositsAccountData.summary.totalDeposits) { + {{ + recurringDepositsAccountData.summary.totalDeposits + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + } + @if (!recurringDepositsAccountData.summary.totalDeposits) { + {{ 0 | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + } + + + + {{ 'labels.inputs.Actual Available Balance' | translate }} + + {{ + recurringDepositsAccountData.summary.accountBalance + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + + {{ 'labels.inputs.Recurring Deposit Amount' | translate }} + + {{ + recurringDepositsAccountData.mandatoryRecommendedDepositAmount + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + @if (recurringDepositsAccountData.summary.totalInterestEarned) { + + {{ 'labels.inputs.Interests Earned' | translate }} + + {{ recurringDepositsAccountData.currency.displaySymbol }} {{ + recurringDepositsAccountData.summary.totalInterestEarned + }} + + + } + @if (recurringDepositsAccountData.summary.totalWithdrawals) { + + {{ 'labels.inputs.Total Withdrawls' | translate }} + + {{ + recurringDepositsAccountData.summary.totalWithdrawals + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + } + @if (recurringDepositsAccountData.minBalanceForInterestCalculation) { + + {{ 'labels.inputs.Balance Required for Interest Calculation' | translate }} + + {{ recurringDepositsAccountData.minBalanceForInterestCalculation | number }} + + + } + + + + } - - - - - {{ 'labels.inputs.Principal Amount' | translate }} - - {{ - recurringDepositsAccountData.depositAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - {{ - 0 | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Rate of Interest' | translate }} - - {{ recurringDepositsAccountData.nominalAnnualInterestRate | formatNumber }} % - - - - {{ 'labels.inputs.Maturity Amount' | translate }} - - {{ - recurringDepositsAccountData.maturityAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Total Withdrawls' | translate }} - - {{ - recurringDepositsAccountData.summary.totalWithdrawals - | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - {{ - 0 | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Closed on Date' | translate }} - - {{ recurringDepositsAccountData.timeline.closedOnDate | dateFormat }} - - - - {{ 'labels.inputs.Deposits Frequency' | translate }} - - {{ recurringDepositsAccountData.recurringFrequency }} {{ - recurringDepositsAccountData.recurringFrequencyType.value | translateKey: 'catalogs' - }} - - - - {{ 'labels.inputs.Interests Posted' | translate }} - - {{ - recurringDepositsAccountData.summary.totalInterestPosted - | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - {{ - 0 | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - - + @if ( + recurringDepositsAccountData.status.rejected || recurringDepositsAccountData.status.submittedAndPendingApproval + ) { + + + + + {{ 'labels.inputs.Principal Amount' | translate }} + + @if (recurringDepositsAccountData.depositAmount) { + {{ + recurringDepositsAccountData.depositAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + } + @if (!recurringDepositsAccountData.depositAmount) { + {{ 0 | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + } + + + + {{ 'labels.inputs.Rate of Interest' | translate }} + + {{ recurringDepositsAccountData.nominalAnnualInterestRate | formatNumber }} % + + + @if (recurringDepositsAccountData.maturityDate) { + + {{ 'labels.inputs.Maturity Amount' | translate }} + + {{ + recurringDepositsAccountData.maturityAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + } + + {{ 'labels.inputs.Total Withdrawls' | translate }} + + @if (recurringDepositsAccountData.summary.totalWithdrawals) { + {{ + recurringDepositsAccountData.summary.totalWithdrawals + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + } + @if (!recurringDepositsAccountData.summary.totalWithdrawals) { + {{ 0 | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + } + + + @if (recurringDepositsAccountData.timeline.closedOnDate) { + + {{ 'labels.inputs.Closed on Date' | translate }} + + {{ recurringDepositsAccountData.timeline.closedOnDate | dateFormat }} + + + } + + {{ 'labels.inputs.Deposits Frequency' | translate }} + + {{ recurringDepositsAccountData.recurringFrequency }} {{ + recurringDepositsAccountData.recurringFrequencyType.value | translateKey: 'catalogs' + }} + + + @if (recurringDepositsAccountData.summary.totalInterestEarned) { + + {{ 'labels.inputs.Interests Posted' | translate }} + + @if (recurringDepositsAccountData.summary.totalInterestPosted) { + {{ + recurringDepositsAccountData.summary.totalInterestPosted + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + } + @if (!recurringDepositsAccountData.summary.totalInterestPosted) { + {{ 0 | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + } + + + } + + + + } - - {{ 'labels.heading.Interest Details' | translate }} - - - - {{ 'labels.inputs.Interest Rate' | translate }} - {{ recurringDepositsAccountData.nominalAnnualInterestRate | formatNumber }} % - - - {{ 'labels.inputs.Interest Compounding Period' | translate }} - - {{ - recurringDepositsAccountData.interestCompoundingPeriodType.value | translateKey: 'catalogs' - }} - - - - {{ 'labels.inputs.Interest Posting Period' | translate }} - - {{ recurringDepositsAccountData.interestPostingPeriodType.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Interest calculated using' | translate }} - - {{ recurringDepositsAccountData.interestCalculationType.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Days in Year' | translate }} - - {{ - recurringDepositsAccountData.interestCalculationDaysInYearType.value | translateKey: 'catalogs' - }} - - - - {{ 'labels.inputs.Pre-closure penal Interest (less)' | translate }} - - {{ recurringDepositsAccountData.preClosurePenalInterest }} % on - {{ recurringDepositsAccountData.preClosurePenalInterestOnType.value | translateKey: 'catalogs' }} - - - - - + @if ( + !recurringDepositsAccountData.status.rejected && !recurringDepositsAccountData.status.submittedAndPendingApproval + ) { + + {{ 'labels.heading.Interest Details' | translate }} + + + + {{ 'labels.inputs.Interest Rate' | translate }} + {{ recurringDepositsAccountData.nominalAnnualInterestRate | formatNumber }} % + + + {{ 'labels.inputs.Interest Compounding Period' | translate }} + + {{ + recurringDepositsAccountData.interestCompoundingPeriodType.value | translateKey: 'catalogs' + }} + + + + {{ 'labels.inputs.Interest Posting Period' | translate }} + + {{ recurringDepositsAccountData.interestPostingPeriodType.value | translateKey: 'catalogs' }} + + + + {{ 'labels.inputs.Interest calculated using' | translate }} + + {{ recurringDepositsAccountData.interestCalculationType.value | translateKey: 'catalogs' }} + + + + {{ 'labels.inputs.Days in Year' | translate }} + + {{ + recurringDepositsAccountData.interestCalculationDaysInYearType.value | translateKey: 'catalogs' + }} + + + @if (recurringDepositsAccountData.preClosurePenalApplicable) { + + {{ 'labels.inputs.Pre-closure penal Interest (less)' | translate }} + + {{ recurringDepositsAccountData.preClosurePenalInterest }} % on + {{ + recurringDepositsAccountData.preClosurePenalInterestOnType.value | translateKey: 'catalogs' + }} + + + } + + + + } - - - - - {{ 'labels.inputs.Interest Compounding Period' | translate }} - - {{ - recurringDepositsAccountData.interestCompoundingPeriodType.value | translateKey: 'catalogs' - }} - - - - {{ 'labels.inputs.Interest Posting Period' | translate }} - - {{ recurringDepositsAccountData.interestPostingPeriodType.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Interest calculated using' | translate }} - - {{ recurringDepositsAccountData.interestCalculationType.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Days in Year' | translate }} - - {{ - recurringDepositsAccountData.interestCalculationDaysInYearType.value | translateKey: 'catalogs' - }} - - - - {{ 'labels.inputs.Pre-closure penal Interest (less)' | translate }} - - {{ recurringDepositsAccountData.preClosurePenalInterest }} % on - {{ recurringDepositsAccountData.preClosurePenalInterestOnType.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Witdhold Tax Group' | translate }} - - {{ recurringDepositsAccountData.taxGroup.name }} - - - - - + @if ( + recurringDepositsAccountData.status.rejected || recurringDepositsAccountData.status.submittedAndPendingApproval + ) { + + + + + {{ 'labels.inputs.Interest Compounding Period' | translate }} + + {{ + recurringDepositsAccountData.interestCompoundingPeriodType.value | translateKey: 'catalogs' + }} + + + + {{ 'labels.inputs.Interest Posting Period' | translate }} + + {{ recurringDepositsAccountData.interestPostingPeriodType.value | translateKey: 'catalogs' }} + + + + {{ 'labels.inputs.Interest calculated using' | translate }} + + {{ recurringDepositsAccountData.interestCalculationType.value | translateKey: 'catalogs' }} + + + + {{ 'labels.inputs.Days in Year' | translate }} + + {{ + recurringDepositsAccountData.interestCalculationDaysInYearType.value | translateKey: 'catalogs' + }} + + + @if (recurringDepositsAccountData.preClosurePenalApplicable) { + + {{ 'labels.inputs.Pre-closure penal Interest (less)' | translate }} + + {{ recurringDepositsAccountData.preClosurePenalInterest }} % on + {{ + recurringDepositsAccountData.preClosurePenalInterestOnType.value | translateKey: 'catalogs' + }} + + + } + @if (recurringDepositsAccountData.witdHoldTax) { + + {{ 'labels.inputs.Witdhold Tax Group' | translate }} + + {{ recurringDepositsAccountData.taxGroup.name }} + + + } + + + + } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/general-tab/general-tab.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/general-tab/general-tab.component.ts index f0e84a72fe..579c47946d 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/general-tab/general-tab.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/general-tab/general-tab.component.ts @@ -1,7 +1,7 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { Currency } from 'app/shared/models/general.model'; -import { NgIf, DecimalPipe, CurrencyPipe } from '@angular/common'; +import { DecimalPipe, CurrencyPipe } from '@angular/common'; import { ExternalIdentifierComponent } from '../../../../shared/external-identifier/external-identifier.component'; import { DateFormatPipe } from '../../../../pipes/date-format.pipe'; import { FormatNumberPipe } from '../../../../pipes/format-number.pipe'; @@ -21,15 +21,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GeneralTabComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + recurringDepositsAccountData: any; isprematureAllowed = false; entityType: string; currency: Currency; - constructor( - private route: ActivatedRoute, - private router: Router - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.parent.data.subscribe((data: { recurringDepositsAccountData: any }) => { this.recurringDepositsAccountData = data.recurringDepositsAccountData; this.currency = this.recurringDepositsAccountData.currency; diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/interest-rate-chart-tab/interest-rate-chart-tab.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/interest-rate-chart-tab/interest-rate-chart-tab.component.ts index 4386261dc7..f1ce65c7ba 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/interest-rate-chart-tab/interest-rate-chart-tab.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/interest-rate-chart-tab/interest-rate-chart-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { animate, state, style, transition, trigger } from '@angular/animations'; import { @@ -52,6 +52,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class InterestRateChartTabComponent { + private route = inject(ActivatedRoute); + /** Interest Rate Chart Data */ interestRateChartData: any = []; /** Columns to be displayed in interest rate chart table. */ @@ -76,11 +78,14 @@ export class InterestRateChartTabComponent { /** Expand Chart Slab Index used in the view */ expandChartSlabIndex: number; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves recurring deposits account data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.parent.data.subscribe((data: { recurringDepositsAccountData: any }) => { this.interestRateChartData = data.recurringDepositsAccountData.accountChart.chartSlabs; }); diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/recurring-deposits-account-view.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/recurring-deposits-account-view.component.html index 9f30458152..238a5571d8 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/recurring-deposits-account-view.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/recurring-deposits-account-view.component.html @@ -29,48 +29,50 @@ {{ 'labels.text.' + entityType | translate }} {{ 'labels.inputs.name' | translate }}: {{ recurringDepositsAccountData.clientName || recurringDepositsAccountData.groupName }} - - - + @if (recurringDepositsAccountData.clientAccountNo) { + + + + } - - {{ 'labels.heading.Account Overview' | translate }} - - - - {{ 'labels.inputs.Current Balance' | translate }} - - {{ - recurringDepositsAccountData.summary.accountBalance - | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Deposit Amount' | translate }} - - {{ - recurringDepositsAccountData.depositAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Deposit Period' | translate }} - {{ recurringDepositsAccountData.depositPeriod | number }} - - - - + @if ( + !recurringDepositsAccountData.status.rejected && + !recurringDepositsAccountData.status.submittedAndPendingApproval + ) { + + {{ 'labels.heading.Account Overview' | translate }} + + + + {{ 'labels.inputs.Current Balance' | translate }} + + {{ + recurringDepositsAccountData.summary.accountBalance + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + + {{ 'labels.inputs.Deposit Amount' | translate }} + + {{ + recurringDepositsAccountData.depositAmount + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + + {{ 'labels.inputs.Deposit Period' | translate }} + {{ recurringDepositsAccountData.depositPeriod | number }} + + + + + } {{ 'labels.heading.Account Overview' | translate }} - + @for (item of buttonConfig.singleButtons; track item) { {{ 'labels.menus.' + item.name | translate }} - + } - + @if (buttonConfig.options.length) { {{ 'labels.menus.More' | translate }} - - - {{ 'labels.menus.' + option.name | translate }} - - + @for (option of buttonConfig.options; track option) { + + + {{ 'labels.menus.' + option.name | translate }} + + + } - + } @@ -129,7 +133,7 @@ {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Interest Rate Chart' | translate }} - + @if (showTransactions) { {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Transactions' | translate }} - + } {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Charges' | translate }} - + @if (recurringDepositsAccountData.clientId) { {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Standing Instructions' | translate }} - - + } + @for (savingsDatatable of savingsDatatables; track savingsDatatable) { {{ 'labels.heading.Account Overview' | translate }} > {{ savingsDatatable.registeredTableName }} - + } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/recurring-deposits-account-view.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/recurring-deposits-account-view.component.ts index 376662e623..064e19aa18 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/recurring-deposits-account-view.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/recurring-deposits-account-view.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -24,7 +24,7 @@ import { MatCardContent } from '@angular/material/card'; import { MatTooltip } from '@angular/material/tooltip'; -import { NgClass, NgIf, NgFor, DecimalPipe, CurrencyPipe } from '@angular/common'; +import { NgClass, DecimalPipe, CurrencyPipe } from '@angular/common'; import { AccountNumberComponent } from '../../../shared/account-number/account-number.component'; import { MatIconButton } from '@angular/material/button'; import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; @@ -67,6 +67,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositsAccountViewComponent implements OnInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private recurringDepositsService = inject(RecurringDepositsService); + private savingsService = inject(SavingsService); + dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** RecurringDeposits Account Data */ recurringDepositsAccountData: any; /** Button Configuration */ @@ -80,20 +87,16 @@ export class RecurringDepositsAccountViewComponent implements OnInit { entityType: string; currency: Currency; showTransactions = false; + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); /** * Fetches recurringDeposits account data from `resolve` * @param {ActivatedRoute} route Activated Route * @param {Router} router Router * @param {RecurringDepositsService} recurringDepositsService RecurringDeposits Service */ - constructor( - private route: ActivatedRoute, - private router: Router, - private recurringDepositsService: RecurringDepositsService, - private savingsService: SavingsService, - public dialog: MatDialog, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { recurringDepositsAccountData: any; savingsDatatables: any }) => { this.recurringDepositsAccountData = data.recurringDepositsAccountData; this.charges = this.recurringDepositsAccountData.charges; diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/standing-instructions-tab/standing-instructions-tab.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/standing-instructions-tab/standing-instructions-tab.component.html index 5b109263af..30262fde08 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/standing-instructions-tab/standing-instructions-tab.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/standing-instructions-tab/standing-instructions-tab.component.html @@ -46,30 +46,34 @@ {{ 'labels.heading.All Standing Instructions' | translate }} {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - + @if (instruction.status.value !== 'Deleted') { + + + + + + } + @if (instruction.status.value !== 'Deleted') { + + + + + + } ; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves Recurring Deposits Account Data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor( - private route: ActivatedRoute, - private recurringDepositsService: RecurringDepositsService, - private dialog: MatDialog, - private accountTransfersService: AccountTransfersService, - private settingsService: SettingsService - ) { + constructor() { this.route.parent.data.subscribe((data: { recurringDepositsAccountData: any }) => { this.recurringDepositsData = data.recurringDepositsAccountData; }); diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/edit-transaction/edit-transaction.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/edit-transaction/edit-transaction.component.html index 0c19a670e3..f2f0786a03 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/edit-transaction/edit-transaction.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/edit-transaction/edit-transaction.component.html @@ -14,10 +14,12 @@ /> - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editTransactionForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentType.name }} - + @for (paymentType of paymentTypeOptions; track paymentType) { + + {{ paymentType.name }} + + } @@ -47,30 +51,40 @@ - - {{ 'labels.inputs.Account Number' | translate }} - - + @if (editTransactionForm.controls['accountNumber']) { + + {{ 'labels.inputs.Account Number' | translate }} + + + } - - {{ 'labels.inputs.Cheque' | translate }} - - + @if (editTransactionForm.controls['checkNumber']) { + + {{ 'labels.inputs.Cheque' | translate }} + + + } - - {{ 'labels.inputs.Routing Code' | translate }} - - + @if (editTransactionForm.controls['routingCode']) { + + {{ 'labels.inputs.Routing Code' | translate }} + + + } - - {{ 'labels.inputs.Receipt Number' | translate }} - - + @if (editTransactionForm.controls['receiptNumber']) { + + {{ 'labels.inputs.Receipt Number' | translate }} + + + } - - {{ 'labels.inputs.Bank' | translate }} - - + @if (editTransactionForm.controls['bankNumber']) { + + {{ 'labels.inputs.Bank' | translate }} + + + } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/edit-transaction/edit-transaction.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/edit-transaction/edit-transaction.component.ts index 64ead6992d..fee7f58aa0 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/edit-transaction/edit-transaction.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/edit-transaction/edit-transaction.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -32,6 +32,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditTransactionComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private recurringDepositsService = inject(RecurringDepositsService); + private settingsService = inject(SettingsService); + /** Minimum Due Date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum Due Date allowed. */ @@ -54,6 +61,9 @@ export class EditTransactionComponent implements OnInit { transactionTemplateData: any; currency: Currency | null = null; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Recurring Deposit Account transaction template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -63,14 +73,7 @@ export class EditTransactionComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private recurringDepositsService: RecurringDepositsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { recurringDepositsAccountTransactionTemplate: any }) => { this.transactionTemplateData = data.recurringDepositsAccountTransactionTemplate; if (this.transactionTemplateData.currency) { diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/transactions-tab.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/transactions-tab.component.html index 5afd45ccf0..c5cd73cf82 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/transactions-tab.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/transactions-tab.component.html @@ -4,14 +4,16 @@ {{ 'labels.heading.All Transactions' | translate }} - - - {{ 'labels.inputs.Hide Reversed' | translate }} - - {{ 'labels.inputs.Hide Accruals' | translate }} - + @if (checkStatus()) { + + + {{ 'labels.inputs.Hide Reversed' | translate }} + + {{ 'labels.inputs.Hide Accruals' | translate }} + + } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/transactions-tab.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/transactions-tab.component.ts index a8f13c2d44..9a4a35bab5 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/transactions-tab.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/transactions-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort } from '@angular/material/sort'; @@ -18,7 +18,7 @@ import { } from '@angular/material/table'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { SavingsAccountTransaction } from 'app/savings/models/savings-account-transaction.model'; -import { NgIf, NgClass } from '@angular/common'; +import { NgClass } from '@angular/common'; import { MatCheckbox } from '@angular/material/checkbox'; import { MatIconButton } from '@angular/material/button'; import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; @@ -60,6 +60,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class TransactionsTabComponent implements OnInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Recurring Deposits Account Status */ status: any; /** Transactions Data */ @@ -83,14 +86,14 @@ export class TransactionsTabComponent implements OnInit { @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator; @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves recurring deposits account data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor( - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.parent.data.subscribe((data: { recurringDepositsAccountData: any }) => { this.transactionsData = data.recurringDepositsAccountData.transactions; this.status = data.recurringDepositsAccountData.status.value; diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/view-transaction/view-transaction.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/view-transaction/view-transaction.component.html index 02ed7777c6..cb8660e218 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/view-transaction/view-transaction.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/view-transaction/view-transaction.component.html @@ -1,23 +1,22 @@ - - +@if (!transactionData.reversed) { + + + @if (!(transactionData.transactionType.value === 'Transfer' || transactionData.reversed === 'true')) { + + {{ 'labels.buttons.Edit' | translate }} + + } + - {{ 'labels.buttons.Edit' | translate }} + {{ 'labels.buttons.Undo' | translate }} - - - {{ 'labels.buttons.Undo' | translate }} - - + +} @@ -65,19 +64,22 @@ {{ transactionData.amount | currency: transactionData.currency.code : 'symbol-narrow' : '1.2-2' }} - - {{ 'labels.inputs.Note' | translate }} - + @if (transactionData.note) { + + {{ 'labels.inputs.Note' | translate }} + + } - - {{ transactionData.note }} - + @if (transactionData.note) { + + {{ transactionData.note }} + + } - - + @if (transactionData.paymentDetailData) { + + + } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/view-transaction/view-transaction.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/view-transaction/view-transaction.component.ts index 5b5f5cb9a1..074e8160f4 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/view-transaction/view-transaction.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/view-transaction/view-transaction.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -11,7 +11,7 @@ import { SettingsService } from 'app/settings/settings.service'; import { RecurringDepositConfirmationDialogComponent } from '../../custom-dialogs/recurring-deposit-confirmation-dialog/recurring-deposit-confirmation-dialog.component'; import { Dates } from 'app/core/utils/dates'; import { TranslateService } from '@ngx-translate/core'; -import { Location, NgIf, NgClass, CurrencyPipe } from '@angular/common'; +import { Location, NgClass, CurrencyPipe } from '@angular/common'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { TransactionPaymentDetailComponent } from '../../../../../shared/transaction-payment-detail/transaction-payment-detail.component'; import { DateFormatPipe } from '../../../../../pipes/date-format.pipe'; @@ -35,9 +35,21 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewTransactionComponent { + private recurringDepositsService = inject(RecurringDepositsService); + private route = inject(ActivatedRoute); + private location = inject(Location); + private dateUtils = inject(Dates); + private router = inject(Router); + dialog = inject(MatDialog); + private translateService = inject(TranslateService); + private settingsService = inject(SettingsService); + /** Transaction data. */ transactionData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Transaction data from `resolve`. * @param {RecurringDepositsService} recurringDepositsService Savings Service @@ -47,16 +59,7 @@ export class ViewTransactionComponent { * @param {Dates} dateUtils Date Utils. * @param {SettingsService} settingsService Settings Service */ - constructor( - private recurringDepositsService: RecurringDepositsService, - private route: ActivatedRoute, - private location: Location, - private dateUtils: Dates, - private router: Router, - public dialog: MatDialog, - private translateService: TranslateService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { recurringDepositsAccountTransaction: any }) => { this.transactionData = data.recurringDepositsAccountTransaction; }); diff --git a/src/app/deposits/recurring-deposits/recurring-deposits.service.ts b/src/app/deposits/recurring-deposits/recurring-deposits.service.ts index 1ba7fa0bd1..cedb9e36c9 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits.service.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -12,7 +12,12 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class RecurringDepositsService { - constructor(private http: HttpClient) {} + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} /** * @params recurringDepositAccountId diff --git a/src/app/directives/format-amount.directive.ts b/src/app/directives/format-amount.directive.ts index 11bd17fa18..508416b426 100644 --- a/src/app/directives/format-amount.directive.ts +++ b/src/app/directives/format-amount.directive.ts @@ -1,10 +1,14 @@ -import { Directive, HostListener, ElementRef, Input, OnInit, Inject } from '@angular/core'; +import { Directive, HostListener, ElementRef, Input, OnInit, inject } from '@angular/core'; import { formatCurrency } from '@angular/common'; import { NgControl } from '@angular/forms'; import { LOCALE_ID } from '@angular/core'; @Directive({ selector: '[mifosxFormatAmount]' }) export class FormatAmountDirective implements OnInit { + private locale = inject(LOCALE_ID); + private el = inject(ElementRef); + private control = inject(NgControl); + format = 'N0'; digitsInfo = '1.0-0'; currencyCode: string; @@ -35,11 +39,10 @@ export class FormatAmountDirective implements OnInit { }); } - constructor( - @Inject(LOCALE_ID) private locale: string, - private el: ElementRef, - private control: NgControl - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} parse(value: any) { return formatCurrency(value, this.locale, this.displaySymbol, this.currencyCode, this.digitsInfo) + this.sufix; diff --git a/src/app/directives/has-permission/has-permission.directive.ts b/src/app/directives/has-permission/has-permission.directive.ts index d6cce82f98..85dde87a5c 100644 --- a/src/app/directives/has-permission/has-permission.directive.ts +++ b/src/app/directives/has-permission/has-permission.directive.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core'; +import { Directive, Input, TemplateRef, ViewContainerRef, inject } from '@angular/core'; /** Custom Services */ import { AuthenticationService } from '../../core/authentication/authentication.service'; @@ -9,20 +9,23 @@ import { AuthenticationService } from '../../core/authentication/authentication. */ @Directive({ selector: '[mifosxHasPermission]', standalone: true }) export class HasPermissionDirective { + private templateRef = inject>(TemplateRef); + private viewContainer = inject(ViewContainerRef); + private authenticationService = inject(AuthenticationService); + /** User Permissions */ private userPermissions: any[]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Extracts User Permissions from User Credentials * @param {TemplateRef} templateRef Template Reference * @param {ViewContainerRef} viewContainer View Container Reference * @param {AuthenticationService} authenticationService AuthenticationService */ - constructor( - private templateRef: TemplateRef, - private viewContainer: ViewContainerRef, - private authenticationService: AuthenticationService - ) { + constructor() { const savedCredentials = this.authenticationService.getCredentials(); this.userPermissions = savedCredentials.permissions; } diff --git a/src/app/directives/validate-on-focus.directive.ts b/src/app/directives/validate-on-focus.directive.ts index 9fe252e8c2..9693a1d640 100644 --- a/src/app/directives/validate-on-focus.directive.ts +++ b/src/app/directives/validate-on-focus.directive.ts @@ -1,12 +1,15 @@ -import { Directive, ElementRef, HostListener } from '@angular/core'; +import { Directive, ElementRef, HostListener, inject } from '@angular/core'; import { NgControl } from '@angular/forms'; @Directive({ selector: '[mifosxValidateOnFocus]' }) export class ValidateOnFocusDirective { - constructor( - private control: NgControl, - private el: ElementRef - ) {} + private control = inject(NgControl); + private el = inject(ElementRef); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} @HostListener('focus') onFocus() { diff --git a/src/app/groups/common-resolvers/glim-account-resolver.ts b/src/app/groups/common-resolvers/glim-account-resolver.ts index bc9989994d..02ea8db6cc 100644 --- a/src/app/groups/common-resolvers/glim-account-resolver.ts +++ b/src/app/groups/common-resolvers/glim-account-resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { GroupsService } from '../groups.service'; */ @Injectable() export class GLIMAccountsResolver { + private groupsService = inject(GroupsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {GroupsService} groupsService Groups service. */ - constructor(private groupsService: GroupsService) {} + constructor() {} /** * Returns the Group's GLIM Loans Acccounts data. diff --git a/src/app/groups/common-resolvers/group-account.resolver.ts b/src/app/groups/common-resolvers/group-account.resolver.ts index 5e3a1a3afa..e992226b6f 100644 --- a/src/app/groups/common-resolvers/group-account.resolver.ts +++ b/src/app/groups/common-resolvers/group-account.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { GroupsService } from '../groups.service'; */ @Injectable() export class GroupAccountsResolver { + private groupsService = inject(GroupsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {GroupsService} GroupsService Groups service. */ - constructor(private groupsService: GroupsService) {} + constructor() {} /** * Returns the Group's Acccounts data. diff --git a/src/app/groups/common-resolvers/group-actions.resolver.ts b/src/app/groups/common-resolvers/group-actions.resolver.ts index 1619e56e85..87db23bee8 100644 --- a/src/app/groups/common-resolvers/group-actions.resolver.ts +++ b/src/app/groups/common-resolvers/group-actions.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { GroupsService } from '../groups.service'; */ @Injectable() export class GroupActionsResolver { + private groupsService = inject(GroupsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {GroupsService} groupsService Groups service. */ - constructor(private groupsService: GroupsService) {} + constructor() {} /** * Returns the group actions data. diff --git a/src/app/groups/common-resolvers/group-data-and-template.resolver.ts b/src/app/groups/common-resolvers/group-data-and-template.resolver.ts index 785c254dd3..72c24401d4 100644 --- a/src/app/groups/common-resolvers/group-data-and-template.resolver.ts +++ b/src/app/groups/common-resolvers/group-data-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { GroupsService } from '../groups.service'; */ @Injectable() export class GroupDataAndTemplateResolver { + private groupsService = inject(GroupsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {GroupsService} GroupsService Groups service. */ - constructor(private groupsService: GroupsService) {} + constructor() {} /** * Returns the Groups data and template. diff --git a/src/app/groups/common-resolvers/group-datatable.resolver.ts b/src/app/groups/common-resolvers/group-datatable.resolver.ts index 882d36b144..15b7bf73fe 100644 --- a/src/app/groups/common-resolvers/group-datatable.resolver.ts +++ b/src/app/groups/common-resolvers/group-datatable.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { GroupsService } from '../groups.service'; */ @Injectable() export class GroupDatatableResolver { + private groupsService = inject(GroupsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {GroupsService} GroupsService Groups service. */ - constructor(private groupsService: GroupsService) {} + constructor() {} /** * Returns the Group's Datatable data. diff --git a/src/app/groups/common-resolvers/group-datatables.resolver.ts b/src/app/groups/common-resolvers/group-datatables.resolver.ts index 53e372fd23..4e78da4cc7 100644 --- a/src/app/groups/common-resolvers/group-datatables.resolver.ts +++ b/src/app/groups/common-resolvers/group-datatables.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { GroupsService } from '../groups.service'; */ @Injectable() export class GroupDatatablesResolver { + private groupsService = inject(GroupsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {GroupsService} GroupsService Groups service. */ - constructor(private groupsService: GroupsService) {} + constructor() {} /** * Returns the Group's Datatables data. diff --git a/src/app/groups/common-resolvers/group-notes.resolver.ts b/src/app/groups/common-resolvers/group-notes.resolver.ts index 40dbe1c7e0..a085a7133a 100644 --- a/src/app/groups/common-resolvers/group-notes.resolver.ts +++ b/src/app/groups/common-resolvers/group-notes.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { GroupsService } from '../groups.service'; */ @Injectable() export class GroupNotesResolver { + private groupsService = inject(GroupsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {GroupsService} GroupsService Groups service. */ - constructor(private groupsService: GroupsService) {} + constructor() {} /** * Returns the Group's Notes data. diff --git a/src/app/groups/common-resolvers/group-summary.resolver.ts b/src/app/groups/common-resolvers/group-summary.resolver.ts index 70243eb13e..844695d3f3 100644 --- a/src/app/groups/common-resolvers/group-summary.resolver.ts +++ b/src/app/groups/common-resolvers/group-summary.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { GroupsService } from '../groups.service'; */ @Injectable() export class GroupSummaryResolver { + private groupsService = inject(GroupsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {GroupsService} GroupsService Groups service. */ - constructor(private groupsService: GroupsService) {} + constructor() {} /** * Returns the Group Summary data. diff --git a/src/app/groups/common-resolvers/group-view.resolver.ts b/src/app/groups/common-resolvers/group-view.resolver.ts index 5b8853e748..e62b834a9c 100644 --- a/src/app/groups/common-resolvers/group-view.resolver.ts +++ b/src/app/groups/common-resolvers/group-view.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { GroupsService } from '../groups.service'; */ @Injectable() export class GroupViewResolver { + private groupsService = inject(GroupsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {GroupsService} GroupsService Groups service. */ - constructor(private groupsService: GroupsService) {} + constructor() {} /** * Returns the Groups data. diff --git a/src/app/groups/common-resolvers/gsim-account-resolver.ts b/src/app/groups/common-resolvers/gsim-account-resolver.ts index c3f28265b4..3ba63c1caf 100644 --- a/src/app/groups/common-resolvers/gsim-account-resolver.ts +++ b/src/app/groups/common-resolvers/gsim-account-resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { GroupsService } from '../groups.service'; */ @Injectable() export class GSIMAccountsResolver { + private groupsService = inject(GroupsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {GroupsService} groupsService Groups service. */ - constructor(private groupsService: GroupsService) {} + constructor() {} /** * Returns the Group's GSIM Acccounts data. diff --git a/src/app/groups/create-group/create-group.component.html b/src/app/groups/create-group/create-group.component.html index eebd943641..2a8c94fa6d 100644 --- a/src/app/groups/create-group/create-group.component.html +++ b/src/app/groups/create-group/create-group.component.html @@ -6,35 +6,45 @@ {{ 'labels.inputs.name' | translate }} - - {{ 'labels.inputs.Group Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Group Name' | translate }} {{ 'labels.inputs.cannot' | translate }} - {{ 'labels.commons.begin with a special character or number' | translate }} - + @if (groupForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Group Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (groupForm.controls.name.hasError('pattern')) { + + {{ 'labels.inputs.Group Name' | translate }} {{ 'labels.inputs.cannot' | translate }} + {{ 'labels.commons.begin with a special character or number' | translate }} + + } {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (groupForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Staff' | translate }} - - {{ staff.displayName }} - + @for (staff of staffData; track staff) { + + {{ staff.displayName }} + + } @@ -50,33 +60,39 @@ /> - - {{ 'labels.inputs.Submission Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (groupForm.controls.submittedOnDate.hasError('required')) { + + {{ 'labels.inputs.Submission Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Active' | translate }} - - {{ 'labels.inputs.Activation Date' | translate }} - - - - - {{ 'labels.inputs.Activation Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (groupForm.controls.active.value) { + + {{ 'labels.inputs.Activation Date' | translate }} + + + + @if (groupForm.controls.activationDate.hasError('required')) { + + {{ 'labels.inputs.Activation Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } {{ 'labels.inputs.External id' | translate }} @@ -90,42 +106,50 @@ - - {{ client.displayName }} - + @for (client of clientsData; track client) { + + {{ client.displayName }} + + } - - - {{ 'labels.inputs.Client Details' | translate }} - - - - - - {{ 'labels.inputs.name' | translate }} - {{ clientChoice.value.displayName }} - - - {{ 'labels.inputs.Id' | translate }} - {{ clientChoice.value.id }} + @if (clientChoice.value) { + + + {{ 'labels.inputs.Client Details' | translate }} + + + + + + {{ 'labels.inputs.name' | translate }} + {{ clientChoice.value.displayName }} + + + {{ 'labels.inputs.Id' | translate }} + {{ clientChoice.value.id }} + + + {{ 'labels.inputs.Office' | translate }} + {{ clientChoice.value.officeName }} + - - {{ 'labels.inputs.Office' | translate }} - {{ clientChoice.value.officeName }} - - + } - - {{ 'labels.heading.Selected Clients' | translate }} - - {{ client.displayName }} - - - - - + @if (clientMembers.length) { + + {{ 'labels.heading.Selected Clients' | translate }} + @for (client of clientMembers; track client; let i = $index) { + + {{ client.displayName }} + + + + + } + + } diff --git a/src/app/groups/create-group/create-group.component.ts b/src/app/groups/create-group/create-group.component.ts index 5a3a029e55..5ddda0f29b 100644 --- a/src/app/groups/create-group/create-group.component.ts +++ b/src/app/groups/create-group/create-group.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, AfterViewInit } from '@angular/core'; +import { Component, OnInit, AfterViewInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -42,6 +42,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateGroupComponent implements OnInit, AfterViewInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private clientsService = inject(ClientsService); + private groupService = inject(GroupsService); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -59,6 +67,9 @@ export class CreateGroupComponent implements OnInit, AfterViewInit { /** ClientChoice. */ clientChoice = new UntypedFormControl(''); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -69,15 +80,7 @@ export class CreateGroupComponent implements OnInit, AfterViewInit { * @param {Dates} dateUtils Date Utils to format date. * @param {SettingsService} settingsService SettingsService */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private clientsService: ClientsService, - private groupService: GroupsService, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { offices: any }) => { this.officeData = data.offices; }); diff --git a/src/app/groups/edit-group/edit-group.component.html b/src/app/groups/edit-group/edit-group.component.html index 20478e1c3f..de81645dd9 100644 --- a/src/app/groups/edit-group/edit-group.component.html +++ b/src/app/groups/edit-group/edit-group.component.html @@ -6,22 +6,28 @@ {{ 'labels.inputs.name' | translate }} - - {{ 'labels.inputs.Group Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Group Name' | translate }} {{ 'labels.inputs.cannot' | translate }} - {{ 'labels.commons.begin with a special character or number' | translate }} - + @if (editGroupForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Group Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (editGroupForm.controls.name.hasError('pattern')) { + + {{ 'labels.inputs.Group Name' | translate }} {{ 'labels.inputs.cannot' | translate }} + {{ 'labels.commons.begin with a special character or number' | translate }} + + } {{ 'labels.inputs.Staff' | translate }} - - {{ staff.displayName }} - + @for (staff of staffData; track staff) { + + {{ staff.displayName }} + + } @@ -37,29 +43,35 @@ /> - - {{ 'labels.inputs.Submission Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editGroupForm.controls.submittedOnDate.hasError('required')) { + + {{ 'labels.inputs.Submission Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Activation Date' | translate }} - - - - - {{ 'labels.inputs.Activation Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (this.editGroupForm.contains('activationDate')) { + + {{ 'labels.inputs.Activation Date' | translate }} + + + + @if (editGroupForm.controls.activationDate.hasError('required')) { + + {{ 'labels.inputs.Activation Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } {{ 'labels.inputs.External id' | translate }} diff --git a/src/app/groups/edit-group/edit-group.component.ts b/src/app/groups/edit-group/edit-group.component.ts index c69b2ae2f1..b3f0ef5f2a 100644 --- a/src/app/groups/edit-group/edit-group.component.ts +++ b/src/app/groups/edit-group/edit-group.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -27,6 +27,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditGroupComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private groupService = inject(GroupsService); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -40,6 +47,9 @@ export class EditGroupComponent implements OnInit { /** Submitted On Date */ submittedOnDate: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -49,14 +59,7 @@ export class EditGroupComponent implements OnInit { * @param {Dates} dateUtils Date Utils to format date. * @param {SettingsService} settingsService SettingsService */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private groupService: GroupsService, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { groupAndTemplateData: any; groupViewData: any }) => { this.staffData = data.groupAndTemplateData.staffOptions; this.groupData = data.groupAndTemplateData; diff --git a/src/app/groups/groups-view/add-role/add-role.component.html b/src/app/groups/groups-view/add-role/add-role.component.html index afd5503cab..5d381e60d8 100644 --- a/src/app/groups/groups-view/add-role/add-role.component.html +++ b/src/app/groups/groups-view/add-role/add-role.component.html @@ -6,27 +6,35 @@ {{ 'labels.inputs.Client' | translate }} - - {{ client.displayName }} - + @for (client of clientMemberData; track client) { + + {{ client.displayName }} + + } - - {{ 'labels.inputs.Client Member' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (groupsAddRoleForm.controls.clientId.hasError('required')) { + + {{ 'labels.inputs.Client Member' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Role' | translate }} - - {{ role.name }} - + @for (role of roleData; track role) { + + {{ role.name }} + + } - - {{ 'labels.inputs.Role' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (groupsAddRoleForm.controls.role.hasError('required')) { + + {{ 'labels.inputs.Role' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/groups/groups-view/add-role/add-role.component.ts b/src/app/groups/groups-view/add-role/add-role.component.ts index 653c8c60f3..be08ac7601 100644 --- a/src/app/groups/groups-view/add-role/add-role.component.ts +++ b/src/app/groups/groups-view/add-role/add-role.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -19,6 +19,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AddRoleComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private groupsService = inject(GroupsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Groups Add Role Form */ groupsAddRoleForm: UntypedFormGroup; /** Client Member Data */ @@ -28,18 +33,16 @@ export class AddRoleComponent implements OnInit { /** Groups Account and Template Data */ groupAndTemplateData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {GroupsService} groupsService Groups Service * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private groupsService: GroupsService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { groupAndTemplateData: any }) => { this.groupAndTemplateData = data.groupAndTemplateData; }); diff --git a/src/app/groups/groups-view/committee-tab/committee-tab.component.html b/src/app/groups/groups-view/committee-tab/committee-tab.component.html index fd86f1eee9..b2463db3a4 100644 --- a/src/app/groups/groups-view/committee-tab/committee-tab.component.html +++ b/src/app/groups/groups-view/committee-tab/committee-tab.component.html @@ -3,55 +3,57 @@ {{ 'labels.heading.Client Members' | translate }} - - - {{ 'labels.buttons.Add' | translate }} - - + @if (groupStatus !== 'Closed') { + + + {{ 'labels.buttons.Add' | translate }} + + + } - - - - {{ 'labels.inputs.name' | translate }} - {{ element.clientName }} - - - - {{ 'labels.inputs.Role' | translate }} - {{ element.role.name }} - - - - {{ 'labels.inputs.Client Id' | translate }} - {{ element.clientId }} - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - + @if (groupRolesData) { + + + + {{ 'labels.inputs.name' | translate }} + {{ element.clientName }} + + + {{ 'labels.inputs.Role' | translate }} + {{ element.role.name }} + + + {{ 'labels.inputs.Client Id' | translate }} + {{ element.clientId }} + + + {{ 'labels.inputs.Actions' | translate }} + + @if (groupStatus !== 'Closed') { + + + + + + } + + + + + + + } diff --git a/src/app/groups/groups-view/committee-tab/committee-tab.component.ts b/src/app/groups/groups-view/committee-tab/committee-tab.component.ts index 47f68fe5ed..b11ac85f6e 100644 --- a/src/app/groups/groups-view/committee-tab/committee-tab.component.ts +++ b/src/app/groups/groups-view/committee-tab/committee-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; import { @@ -46,6 +46,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CommitteeTabComponent { + private route = inject(ActivatedRoute); + private groupsService = inject(GroupsService); + dialog = inject(MatDialog); + /** Group Status */ groupStatus: any; /** Group Roles Data */ @@ -63,17 +67,16 @@ export class CommitteeTabComponent { /** Roles Table */ @ViewChild('rolesTable') rolesTableRef: MatTable; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches groups data from parent's `resolve`. * @param {ActivatedRoute} route Activated Route * @param {GroupsService} groupsService Groups Service * @param {MatDialog} dialog Mat Dialog */ - constructor( - private route: ActivatedRoute, - private groupsService: GroupsService, - public dialog: MatDialog - ) { + constructor() { this.route.parent.data.subscribe((data: { groupViewData: any }) => { this.groupViewData = data.groupViewData; this.groupRolesData = this.groupViewData.groupRoles; diff --git a/src/app/groups/groups-view/custom-dialogs/unassign-role-dialog/unassign-role-dialog.component.ts b/src/app/groups/groups-view/custom-dialogs/unassign-role-dialog/unassign-role-dialog.component.ts index ffb3bbfc35..68b622c32f 100644 --- a/src/app/groups/groups-view/custom-dialogs/unassign-role-dialog/unassign-role-dialog.component.ts +++ b/src/app/groups/groups-view/custom-dialogs/unassign-role-dialog/unassign-role-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,12 +28,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UnassignRoleDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/groups/groups-view/custom-dialogs/unassign-staff-dialog/unassign-staff-dialog.component.ts b/src/app/groups/groups-view/custom-dialogs/unassign-staff-dialog/unassign-staff-dialog.component.ts index cb52774ed7..31f0c4d01a 100644 --- a/src/app/groups/groups-view/custom-dialogs/unassign-staff-dialog/unassign-staff-dialog.component.ts +++ b/src/app/groups/groups-view/custom-dialogs/unassign-staff-dialog/unassign-staff-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,8 +28,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UnassignStaffDialogComponent { + dialogRef = inject>(MatDialogRef); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. */ - constructor(public dialogRef: MatDialogRef) {} + constructor() {} } diff --git a/src/app/groups/groups-view/datatable-tabs/datatable-tabs.component.ts b/src/app/groups/groups-view/datatable-tabs/datatable-tabs.component.ts index 5c6cc98412..8be2898426 100644 --- a/src/app/groups/groups-view/datatable-tabs/datatable-tabs.component.ts +++ b/src/app/groups/groups-view/datatable-tabs/datatable-tabs.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { EntityDatatableTabComponent } from '../../../shared/tabs/entity-datatable-tab/entity-datatable-tab.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -17,17 +17,22 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DatatableTabsComponent { + private route = inject(ActivatedRoute); + entityId: string; /** Group Datatable */ entityDatatable: any; /** Multi Row Datatable Flag */ multiRowDatatableFlag: boolean; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches data table data from `resolve` * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.entityId = this.route.parent.parent.snapshot.paramMap.get('groupId'); this.route.data.subscribe((data: { groupDatatable: any }) => { diff --git a/src/app/groups/groups-view/general-tab/general-tab.component.html b/src/app/groups/groups-view/general-tab/general-tab.component.html index 4065c9500f..36f356feb5 100644 --- a/src/app/groups/groups-view/general-tab/general-tab.component.html +++ b/src/app/groups/groups-view/general-tab/general-tab.component.html @@ -16,449 +16,422 @@ {{ 'labels.heading.Group Details' | translate }} - - {{ 'labels.heading.Client Members' | translate }} - - - - {{ 'labels.inputs.name' | translate }} - - - {{ element.displayName }} - - - - - {{ 'labels.inputs.Account No' | translate }}. - {{ element.accountNo }} - - - - {{ 'labels.inputs.Office' | translate }} - {{ element.officeName }} - - - - {{ 'labels.inputs.JLG Loan Application' | translate }} - - - - + @if (groupClientMembers) { + + {{ 'labels.heading.Client Members' | translate }} + + + {{ 'labels.inputs.name' | translate }} + + + {{ element.displayName }} + + + + {{ 'labels.inputs.Account No' | translate }}. + {{ element.accountNo }} + + + {{ 'labels.inputs.Office' | translate }} + {{ element.officeName }} + + + {{ 'labels.inputs.JLG Loan Application' | translate }} + + @if (element.status.code !== 'clientStatusType.closed') { + + + + + + } + + + + + + + } + + @if (loanAccounts) { + + + + {{ 'labels.heading.Loan Accounts' | translate }} + + @if ((loanAccounts | accountsFilter: 'loan' : 'closed').length) { + + + {{ showClosedLoanAccounts ? 'View Active Accounts' : 'View Closed Accounts' }} - - - - - - - - - - - - {{ 'labels.heading.Loan Accounts' | translate }} - - - - {{ showClosedLoanAccounts ? 'View Active Accounts' : 'View Closed Accounts' }} - + } + + @if (!showClosedLoanAccounts) { + + + {{ 'labels.inputs.Account No' | translate }}. + + + {{ element.accountNo }} + + + + {{ 'labels.inputs.Loan Account' | translate }} + {{ element.productName }} + + + {{ 'labels.inputs.Original Loan' | translate }} + {{ element.originalLoan }} + + + {{ 'labels.inputs.Loan Balance' | translate }} + {{ element.loanBalance }} + + + {{ 'labels.inputs.Amount Paid' | translate }} + {{ element.amountPaid }} + + + {{ 'labels.inputs.Type' | translate }} + + + + + + {{ 'labels.inputs.Actions' | translate }} + + @if (element.status.active) { + + + + } + @if (element.status.pendingApproval) { + + + + } + @if (!element.status.pendingApproval && !element.status.active && !element.status.overpaid) { + + + + } + @if (!element.status.pendingApproval && !element.status.active && element.status.overpaid) { + + + + } + + + + + + } + + @if (showClosedLoanAccounts) { + + + {{ 'labels.inputs.Account No' | translate }}. + + + {{ element.accountNo }} + + + + {{ 'labels.inputs.Loan Account' | translate }} + {{ element.productName }} + + + {{ 'labels.inputs.Original Loan' | translate }} + {{ element.lastActiveTransactionDate | dateFormat }} + + + {{ 'labels.inputs.Loan Balance' | translate }} + {{ element.loanBalance }} + + + {{ 'labels.inputs.Amount Paid' | translate }} + {{ element.accountBalance }} + + + {{ 'labels.inputs.Type' | translate }} + + + + + + {{ 'labels.inputs.Closed Date' | translate }} + {{ element.timeline.closedOnDate | dateFormat }} + + + + + } - - - - - {{ 'labels.inputs.Account No' | translate }}. - - - {{ element.accountNo }} - - - - - {{ 'labels.inputs.Loan Account' | translate }} - {{ element.productName }} - - - - {{ 'labels.inputs.Original Loan' | translate }} - {{ element.originalLoan }} - - - - {{ 'labels.inputs.Loan Balance' | translate }} - {{ element.loanBalance }} - - - - {{ 'labels.inputs.Amount Paid' | translate }} - {{ element.amountPaid }} - - - - {{ 'labels.inputs.Type' | translate }} - - - - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - - - - - - - - - {{ 'labels.inputs.Account No' | translate }}. - - - {{ element.accountNo }} - - - - - {{ 'labels.inputs.Loan Account' | translate }} - {{ element.productName }} - - - - {{ 'labels.inputs.Original Loan' | translate }} - {{ element.lastActiveTransactionDate | dateFormat }} - - - - {{ 'labels.inputs.Loan Balance' | translate }} - {{ element.loanBalance }} - - - - {{ 'labels.inputs.Amount Paid' | translate }} - {{ element.accountBalance }} - - - - {{ 'labels.inputs.Type' | translate }} - - - - - - - {{ 'labels.inputs.Closed Date' | translate }} - {{ element.timeline.closedOnDate | dateFormat }} - - - - - - - - - - - {{ 'labels.heading.GSIM Account Overview' | translate }} + } + + @if (gsimAccounts) { + + + + {{ 'labels.heading.GSIM Account Overview' | translate }} + + + + + {{ 'labels.inputs.GSIM Id' | translate }} + + {{ element.gsimId }} + + + + {{ 'labels.inputs.Account Number' | translate }} + {{ element.accountNumber }} + + + {{ 'labels.inputs.Product' | translate }} + {{ element.childGSIMAccounts[0].productName }} + + + {{ 'labels.inputs.Balance' | translate }} + {{ element.parentBalance }} + + + {{ 'labels.inputs.Status' | translate }} + {{ element.savingsStatus }} + + + + - - - - - {{ 'labels.inputs.GSIM Id' | translate }} - - {{ element.gsimId }} - - - - - {{ 'labels.inputs.Account Number' | translate }} - {{ element.accountNumber }} - - - - {{ 'labels.inputs.Product' | translate }} - {{ element.childGSIMAccounts[0].productName }} - - - - {{ 'labels.inputs.Balance' | translate }} - {{ element.parentBalance }} - - - - {{ 'labels.inputs.Status' | translate }} - {{ element.savingsStatus }} - - - - - - - - - - - {{ 'labels.heading.GLIM Loans Account Overview' | translate }} + } + + @if (glimAccounts) { + + + + {{ 'labels.heading.GLIM Loans Account Overview' | translate }} + + + + + {{ 'labels.inputs.GLIM Id' | translate }} + + {{ element.glimId }} + + + + {{ 'labels.inputs.Account Number' | translate }} + {{ element.accountNumber }} + + + {{ 'labels.inputs.Product' | translate }} + {{ element.childGLIMAccounts[0].productName }} + + + {{ 'labels.inputs.Original Loan' | translate }} + {{ element.parentPrincipalAmount }} + + + {{ 'labels.inputs.Status' | translate }} + {{ element.loanStatus }} + + + + - - - - - {{ 'labels.inputs.GLIM Id' | translate }} - - {{ element.glimId }} - - - - - {{ 'labels.inputs.Account Number' | translate }} - {{ element.accountNumber }} - - - - {{ 'labels.inputs.Product' | translate }} - {{ element.childGLIMAccounts[0].productName }} - - - - {{ 'labels.inputs.Original Loan' | translate }} - {{ element.parentPrincipalAmount }} - - - - {{ 'labels.inputs.Status' | translate }} - {{ element.loanStatus }} - - - - - - - - - - - {{ 'labels.heading.Saving Accounts' | translate }} + } + + @if (savingAccounts) { + + + + {{ 'labels.heading.Saving Accounts' | translate }} + + + @if ((savingAccounts | accountsFilter: 'saving' : 'closed').length) { + + {{ showClosedSavingAccounts ? 'View Active Accounts' : 'View Closed Accounts' }} + + } + - - + @if (!showClosedSavingAccounts) { + + + {{ 'labels.inputs.Account No' | translate }}. + + + {{ element.accountNo }} + + + + {{ 'labels.inputs.Saving Account' | translate }} + {{ element.productName }} + + + {{ 'labels.inputs.Last Active' | translate }} + {{ element.lastActiveTransactionDate | dateFormat }} + + + {{ 'labels.inputs.Balance' | translate }} + {{ element.accountBalance }} + + + {{ 'labels.inputs.Actions' | translate }} + + @if (element.status.active) { + + + + } + @if (element.status.active) { + + + + } + @if (element.status.submittedAndPendingApproval) { + + + + } + @if (!element.status.submittedAndPendingApproval && !element.status.active) { + + + + } + @if (!element.status.submittedAndPendingApproval && !element.status.active) { + + + + } + + + + + + } + + @if (showClosedSavingAccounts) { + - {{ showClosedSavingAccounts ? 'View Active Accounts' : 'View Closed Accounts' }} - - + + {{ 'labels.inputs.Account No' | translate }}. + + + {{ element.accountNo }} + + + + {{ 'labels.inputs.Saving Account' | translate }} + {{ element.productName }} + + + {{ 'labels.inputs.Closed Date' | translate }} + {{ element.timeline.closedOnDate | dateFormat }} + + + + + } - - - - - {{ 'labels.inputs.Account No' | translate }}. - - - {{ element.accountNo }} - - - - - {{ 'labels.inputs.Saving Account' | translate }} - {{ element.productName }} - - - - {{ 'labels.inputs.Last Active' | translate }} - {{ element.lastActiveTransactionDate | dateFormat }} - - - - {{ 'labels.inputs.Balance' | translate }} - {{ element.accountBalance }} - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ 'labels.inputs.Account No' | translate }}. - - - {{ element.accountNo }} - - - - - {{ 'labels.inputs.Saving Account' | translate }} - {{ element.productName }} - - - - {{ 'labels.inputs.Closed Date' | translate }} - {{ element.timeline.closedOnDate | dateFormat }} - - - - - - + } diff --git a/src/app/groups/groups-view/general-tab/general-tab.component.ts b/src/app/groups/groups-view/general-tab/general-tab.component.ts index 5177c01d1d..2563f3bb61 100644 --- a/src/app/groups/groups-view/general-tab/general-tab.component.ts +++ b/src/app/groups/groups-view/general-tab/general-tab.component.ts @@ -1,7 +1,7 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; -import { NgIf, NgClass } from '@angular/common'; +import { NgClass } from '@angular/common'; import { MatTable, MatColumnDef, @@ -48,6 +48,9 @@ import { GroupsService } from '../../groups.service'; ] }) export class GeneralTabComponent { + private route = inject(ActivatedRoute); + private groupsService = inject(GroupsService); + /** Group's all accounts data */ groupAccountData: any; /** Group's loan accounts data */ @@ -124,10 +127,10 @@ export class GeneralTabComponent { /** Boolean for toggling savings accounts table */ showClosedSavingAccounts = false; - constructor( - private route: ActivatedRoute, - private groupsService: GroupsService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe( (data: { groupAccountsData: any; groupClientMembers: any; groupSummary: any; glimData: any; gsimData: any }) => { this.glimAccounts = data.glimData; diff --git a/src/app/groups/groups-view/group-actions/activate-group/activate-group.component.html b/src/app/groups/groups-view/group-actions/activate-group/activate-group.component.html index 1f2b0bf710..a8c8ff9109 100644 --- a/src/app/groups/groups-view/group-actions/activate-group/activate-group.component.html +++ b/src/app/groups/groups-view/group-actions/activate-group/activate-group.component.html @@ -14,10 +14,12 @@ /> - - {{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (activateGroupForm.controls.activationDate.hasError('required')) { + + {{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/groups/groups-view/group-actions/activate-group/activate-group.component.ts b/src/app/groups/groups-view/group-actions/activate-group/activate-group.component.ts index 1b2859d81c..be5ea15d3b 100644 --- a/src/app/groups/groups-view/group-actions/activate-group/activate-group.component.ts +++ b/src/app/groups/groups-view/group-actions/activate-group/activate-group.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ActivateGroupComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private groupsService = inject(GroupsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -30,6 +37,9 @@ export class ActivateGroupComponent implements OnInit { /** Group Id */ groupId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {groupsService} groupsService Groups Service @@ -38,14 +48,7 @@ export class ActivateGroupComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService SettingsService */ - constructor( - private formBuilder: UntypedFormBuilder, - private groupsService: GroupsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.groupId = this.route.parent.snapshot.params['groupId']; } diff --git a/src/app/groups/groups-view/group-actions/attach-group-meeting/attach-group-meeting.component.html b/src/app/groups/groups-view/group-actions/attach-group-meeting/attach-group-meeting.component.html index f298565727..f22f6c594d 100644 --- a/src/app/groups/groups-view/group-actions/attach-group-meeting/attach-group-meeting.component.html +++ b/src/app/groups/groups-view/group-actions/attach-group-meeting/attach-group-meeting.component.html @@ -15,54 +15,74 @@ /> - - {{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (groupMeetingForm.controls.startDate.hasError('required')) { + + {{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Repeats' | translate }}? - - {{ 'labels.inputs.Repetition Frequency' | translate }} - - - {{ option.value }} - - - - {{ 'labels.inputs.Repetition Frequency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (groupMeetingForm.contains('frequency')) { + + {{ 'labels.inputs.Repetition Frequency' | translate }} + + @for (option of frequencyOptions; track option) { + + {{ option.value }} + + } + + @if (groupMeetingForm.controls.frequency.hasError('repeatsOnDay')) { + + {{ 'labels.inputs.Repetition Frequency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Repetition Interval' | translate }} - - - {{ interval }} - - - - {{ 'labels.inputs.Repeition Interval' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (groupMeetingForm.contains('interval')) { + + {{ 'labels.inputs.Repetition Interval' | translate }} + + @for (interval of repetitionIntervals; track interval) { + + {{ interval }} + + } + + @if (groupMeetingForm.controls.interval.hasError('repeatsOnDay')) { + + {{ 'labels.inputs.Repeition Interval' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Repeats on Day' | translate }} - - - {{ day.value }} - - - - {{ 'labels.inputs.At least' | translate }} {{ 'labels.inputs.one' | translate }} - {{ 'labels.inputs.day must be selected' | translate }} - - + @if (groupMeetingForm.contains('repeatsOnDay')) { + + {{ 'labels.inputs.Repeats on Day' | translate }} + + @for (day of repeatsOnDays; track day) { + + {{ day.value }} + + } + + @if (groupMeetingForm.controls.repeatsOnDay.hasError('repeatsOnDay')) { + + {{ 'labels.inputs.At least' | translate }} {{ 'labels.inputs.one' | translate }} + {{ 'labels.inputs.day must be selected' | translate }} + + } + + } diff --git a/src/app/groups/groups-view/group-actions/attach-group-meeting/attach-group-meeting.component.ts b/src/app/groups/groups-view/group-actions/attach-group-meeting/attach-group-meeting.component.ts index 448d965490..e17a9c7083 100644 --- a/src/app/groups/groups-view/group-actions/attach-group-meeting/attach-group-meeting.component.ts +++ b/src/app/groups/groups-view/group-actions/attach-group-meeting/attach-group-meeting.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -29,6 +29,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AttachGroupMeetingComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private groupsService = inject(GroupsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -46,6 +53,9 @@ export class AttachGroupMeetingComponent implements OnInit { /** Repetition Days Data */ repeatsOnDays: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches Calendar Template from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -55,14 +65,7 @@ export class AttachGroupMeetingComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService SettingsService */ - constructor( - private formBuilder: UntypedFormBuilder, - private groupsService: GroupsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { groupActionData: any }) => { this.calendarTemplate = data.groupActionData; this.frequencyOptions = this.calendarTemplate.frequencyOptions; diff --git a/src/app/groups/groups-view/group-actions/close-group/close-group.component.html b/src/app/groups/groups-view/group-actions/close-group/close-group.component.html index 9094256aec..d700c38722 100644 --- a/src/app/groups/groups-view/group-actions/close-group/close-group.component.html +++ b/src/app/groups/groups-view/group-actions/close-group/close-group.component.html @@ -15,23 +15,29 @@ /> - - {{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeGroupForm.controls.closureDate.hasError('required')) { + + {{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Closure Reason' | translate }} - - {{ reason.name }} - + @for (reason of closureData; track reason) { + + {{ reason.name }} + + } - - {{ 'labels.inputs.Closure Reason' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeGroupForm.controls.closureReasonId.hasError('required')) { + + {{ 'labels.inputs.Closure Reason' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/groups/groups-view/group-actions/close-group/close-group.component.ts b/src/app/groups/groups-view/group-actions/close-group/close-group.component.ts index 2fe95c725b..155e69f579 100644 --- a/src/app/groups/groups-view/group-actions/close-group/close-group.component.ts +++ b/src/app/groups/groups-view/group-actions/close-group/close-group.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CloseGroupComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private groupsService = inject(GroupsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class CloseGroupComponent implements OnInit { /** Group Id */ groupId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {GroupsService} groupsService Shares Service @@ -40,14 +50,7 @@ export class CloseGroupComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService SettingsService */ - constructor( - private formBuilder: UntypedFormBuilder, - private groupsService: GroupsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { groupActionData: any }) => { this.closureData = data.groupActionData.closureReasons; }); diff --git a/src/app/groups/groups-view/group-actions/edit-group-meeting-schedule/edit-group-meeting-schedule.component.html b/src/app/groups/groups-view/group-actions/edit-group-meeting-schedule/edit-group-meeting-schedule.component.html index 24820c6572..2d3719841f 100644 --- a/src/app/groups/groups-view/group-actions/edit-group-meeting-schedule/edit-group-meeting-schedule.component.html +++ b/src/app/groups/groups-view/group-actions/edit-group-meeting-schedule/edit-group-meeting-schedule.component.html @@ -6,14 +6,18 @@ {{ 'labels.inputs.Existing Meeting Date' | translate }} - - {{ date | dateFormat }} - + @for (date of nextMeetingDates; track date) { + + {{ date | dateFormat }} + + } - - {{ 'labels.inputs.Existing Meeting Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (groupEditMeetingScheduleForm.controls.presentMeetingDate.hasError('repeatsOnDay')) { + + {{ 'labels.inputs.Existing Meeting Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -28,10 +32,12 @@ /> - - {{ 'labels.inputs.Revised Meeting Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (groupEditMeetingScheduleForm.controls.newMeetingDate.hasError('required')) { + + {{ 'labels.inputs.Revised Meeting Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/groups/groups-view/group-actions/edit-group-meeting-schedule/edit-group-meeting-schedule.component.ts b/src/app/groups/groups-view/group-actions/edit-group-meeting-schedule/edit-group-meeting-schedule.component.ts index 9cd5d19a7d..dd1f03b9d8 100644 --- a/src/app/groups/groups-view/group-actions/edit-group-meeting-schedule/edit-group-meeting-schedule.component.ts +++ b/src/app/groups/groups-view/group-actions/edit-group-meeting-schedule/edit-group-meeting-schedule.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, FormControl, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditGroupMeetingScheduleComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private groupsService = inject(GroupsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -38,6 +45,9 @@ export class EditGroupMeetingScheduleComponent implements OnInit { /** Next meetings data */ nextMeetingDates: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches Calendar Template from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -47,14 +57,7 @@ export class EditGroupMeetingScheduleComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService SettingsService */ - constructor( - private formBuilder: UntypedFormBuilder, - private groupsService: GroupsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { groupActionData: any }) => { this.calendarTemplate = data.groupActionData; this.nextMeetingDates = this.calendarTemplate.nextTenRecurringDates; diff --git a/src/app/groups/groups-view/group-actions/edit-group-meeting/edit-group-meeting.component.html b/src/app/groups/groups-view/group-actions/edit-group-meeting/edit-group-meeting.component.html index 1059c5c3fa..d3a057ce16 100644 --- a/src/app/groups/groups-view/group-actions/edit-group-meeting/edit-group-meeting.component.html +++ b/src/app/groups/groups-view/group-actions/edit-group-meeting/edit-group-meeting.component.html @@ -13,41 +13,55 @@ {{ 'labels.inputs.Repetition Frequency' | translate }} - - {{ option.value }} - + @for (option of frequencyOptions; track option) { + + {{ option.value }} + + } - - {{ 'labels.inputs.Repetition Frequency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (groupEditMeetingForm.controls.frequency.hasError('repeatsOnDay')) { + + {{ 'labels.inputs.Repetition Frequency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Repetition Interval' | translate }} - - {{ interval }} - + @for (interval of repetitionIntervals; track interval) { + + {{ interval }} + + } - - {{ 'labels.inputs.Repeition Interval' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (groupEditMeetingForm.controls.interval.hasError('repeatsOnDay')) { + + {{ 'labels.inputs.Repeition Interval' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Repeats on Day' | translate }} - - - {{ day.value }} - - - - {{ 'labels.inputs.At least' | translate }} {{ 'labels.inputs.one' | translate }} - {{ 'labels.inputs.day must be selected' | translate }} - - + @if (groupEditMeetingForm.contains('repeatsOnDay')) { + + {{ 'labels.inputs.Repeats on Day' | translate }} + + @for (day of repeatsOnDays; track day) { + + {{ day.value }} + + } + + @if (groupEditMeetingForm.controls.repeatsOnDay.hasError('repeatsOnDay')) { + + {{ 'labels.inputs.At least' | translate }} {{ 'labels.inputs.one' | translate }} + {{ 'labels.inputs.day must be selected' | translate }} + + } + + } {{ 'labels.inputs.Above Changes are Effective from' | translate }} @@ -61,10 +75,12 @@ /> - - {{ 'labels.inputs.Changes Affection Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (groupEditMeetingForm.controls.startDate.hasError('required')) { + + {{ 'labels.inputs.Changes Affection Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ "labels.text.Repeats' and 'Repeats every" | translate }} diff --git a/src/app/groups/groups-view/group-actions/edit-group-meeting/edit-group-meeting.component.ts b/src/app/groups/groups-view/group-actions/edit-group-meeting/edit-group-meeting.component.ts index 0a19d79f72..05a83b7e62 100644 --- a/src/app/groups/groups-view/group-actions/edit-group-meeting/edit-group-meeting.component.ts +++ b/src/app/groups/groups-view/group-actions/edit-group-meeting/edit-group-meeting.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -31,6 +31,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditGroupMeetingComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private groupsService = inject(GroupsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -50,6 +57,9 @@ export class EditGroupMeetingComponent implements OnInit { /** CalendarI ID */ calendarId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches Calendar Template from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -59,14 +69,7 @@ export class EditGroupMeetingComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService SettingsService */ - constructor( - private formBuilder: UntypedFormBuilder, - private groupsService: GroupsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { groupActionData: any }) => { this.calendarTemplate = data.groupActionData; this.frequencyOptions = this.calendarTemplate.frequencyOptions; diff --git a/src/app/groups/groups-view/group-actions/group-actions.component.html b/src/app/groups/groups-view/group-actions/group-actions.component.html index 08ee404597..7f97c66f95 100644 --- a/src/app/groups/groups-view/group-actions/group-actions.component.html +++ b/src/app/groups/groups-view/group-actions/group-actions.component.html @@ -1,9 +1,27 @@ - - - - - - - - - +@if (actions['Assign Staff']) { + +} +@if (actions['Close']) { + +} +@if (actions['Activate']) { + +} +@if (actions['Attach Meeting']) { + +} +@if (actions['Attendance']) { + +} +@if (actions['Manage Members']) { + +} +@if (actions['Edit Meeting']) { + +} +@if (actions['Edit Meeting Schedule']) { + +} +@if (actions['Transfer Clients']) { + +} diff --git a/src/app/groups/groups-view/group-actions/group-actions.component.ts b/src/app/groups/groups-view/group-actions/group-actions.component.ts index a9e4a087f2..8d99161d51 100644 --- a/src/app/groups/groups-view/group-actions/group-actions.component.ts +++ b/src/app/groups/groups-view/group-actions/group-actions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { GroupAssignStaffComponent } from './group-assign-staff/group-assign-staff.component'; import { CloseGroupComponent } from './close-group/close-group.component'; @@ -33,6 +33,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GroupActionsComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Flag object to store possible actions and render appropriate UI to the user */ actions: { 'Assign Staff': boolean; @@ -56,14 +59,14 @@ export class GroupActionsComponent { 'Transfer Clients': false }; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.router.routeReuseStrategy.shouldReuseRoute = () => false; const action = this.route.snapshot.params['action']; if (action && action in this.actions) { diff --git a/src/app/groups/groups-view/group-actions/group-assign-staff/group-assign-staff.component.html b/src/app/groups/groups-view/group-actions/group-assign-staff/group-assign-staff.component.html index 6b3f7167a7..cab8a4a62b 100644 --- a/src/app/groups/groups-view/group-actions/group-assign-staff/group-assign-staff.component.html +++ b/src/app/groups/groups-view/group-actions/group-assign-staff/group-assign-staff.component.html @@ -6,14 +6,18 @@ {{ 'labels.inputs.Staff' | translate }} - - {{ staff.displayName }} - + @for (staff of staffData; track staff) { + + {{ staff.displayName }} + + } - - {{ 'labels.inputs.Staff' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (groupAssignStaffForm.controls.staffId.hasError('required')) { + + {{ 'labels.inputs.Staff' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/groups/groups-view/group-actions/group-assign-staff/group-assign-staff.component.ts b/src/app/groups/groups-view/group-actions/group-assign-staff/group-assign-staff.component.ts index 03049329c6..bc0130ba47 100644 --- a/src/app/groups/groups-view/group-actions/group-assign-staff/group-assign-staff.component.ts +++ b/src/app/groups/groups-view/group-actions/group-assign-staff/group-assign-staff.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -19,6 +19,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GroupAssignStaffComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private groupsService = inject(GroupsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Group Assign Staff form. */ groupAssignStaffForm: UntypedFormGroup; /** Staff Data */ @@ -26,6 +31,9 @@ export class GroupAssignStaffComponent implements OnInit { /** Group Data */ groupData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches Group Action Data from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -33,12 +41,7 @@ export class GroupAssignStaffComponent implements OnInit { * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private groupsService: GroupsService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { groupActionData: any }) => { this.groupData = data.groupActionData; }); diff --git a/src/app/groups/groups-view/group-actions/group-attendance/group-attendance.component.ts b/src/app/groups/groups-view/group-actions/group-attendance/group-attendance.component.ts index d64f0ec03a..734a2005bb 100644 --- a/src/app/groups/groups-view/group-actions/group-attendance/group-attendance.component.ts +++ b/src/app/groups/groups-view/group-actions/group-attendance/group-attendance.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; @@ -64,6 +64,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GroupAttendanceComponent implements OnInit { + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private router = inject(Router); + private groupsService = inject(GroupsService); + dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + /** Members data. */ membersData: any; /** Group Data */ @@ -82,6 +89,9 @@ export class GroupAttendanceComponent implements OnInit { /** Data source for client members table. */ dataSource: {}[]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the group members data from `resolve`. * @param {ActivatedRoute} route Route @@ -91,14 +101,7 @@ export class GroupAttendanceComponent implements OnInit { * @param {MatDialog} dialog Mat Dialog * @param {SettingsService} settingsService SettingsService */ - constructor( - private route: ActivatedRoute, - private dateUtils: Dates, - private router: Router, - private groupsService: GroupsService, - public dialog: MatDialog, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { groupActionData: any }) => { this.groupData = data.groupActionData; this.membersData = data.groupActionData.clientMembers; diff --git a/src/app/groups/groups-view/group-actions/group-transfer-clients/group-transfer-clients.component.html b/src/app/groups/groups-view/group-actions/group-transfer-clients/group-transfer-clients.component.html index be1ec2fced..d47f4184ec 100644 --- a/src/app/groups/groups-view/group-actions/group-transfer-clients/group-transfer-clients.component.html +++ b/src/app/groups/groups-view/group-actions/group-transfer-clients/group-transfer-clients.component.html @@ -6,9 +6,11 @@ {{ 'labels.inputs.Select Client Members for Transfer' | translate }} - - {{ member.displayName }} - + @for (member of clientMembers; track member) { + + {{ member.displayName }} + + } @@ -23,50 +25,58 @@ {{ 'labels.inputs.Destination Group' | translate }} - - {{ 'labels.inputs.Destination Group' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (transferClientsForm.controls.destinationGroupId.hasError('required')) { + + {{ 'labels.inputs.Destination Group' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ group.name }} - + @for (group of groupsData; track group) { + + {{ group.name }} + + } - - - {{ 'labels.inputs.Destination Group Details' | translate }} - - - {{ 'labels.inputs.name' | translate }} - {{ transferClientsForm.get('destinationGroupId').value.name }} - - - {{ 'labels.inputs.Id' | translate }} - {{ transferClientsForm.get('destinationGroupId').value.id }} - - - {{ 'labels.inputs.Activation Date' | translate }} - - {{ (transferClientsForm.get('destinationGroupId').value.activationDate | dateFormat) || 'Not Activated' }} + @if (transferClientsForm.get('destinationGroupId').value?.id) { + + + {{ 'labels.inputs.Destination Group Details' | translate }} - - - {{ 'labels.inputs.Staff' | translate }} - - {{ transferClientsForm.get('destinationGroupId').value.staffName || 'Unassigned' }} + + {{ 'labels.inputs.name' | translate }} + {{ transferClientsForm.get('destinationGroupId').value.name }} - - - {{ 'labels.inputs.External Id' | translate }} - - {{ transferClientsForm.get('destinationGroupId').value.externalId || 'Unassigned' }} + + {{ 'labels.inputs.Id' | translate }} + {{ transferClientsForm.get('destinationGroupId').value.id }} + + + {{ 'labels.inputs.Activation Date' | translate }} + + {{ + (transferClientsForm.get('destinationGroupId').value.activationDate | dateFormat) || 'Not Activated' + }} + + + + {{ 'labels.inputs.Staff' | translate }} + + {{ transferClientsForm.get('destinationGroupId').value.staffName || 'Unassigned' }} + + + + {{ 'labels.inputs.External Id' | translate }} + + {{ transferClientsForm.get('destinationGroupId').value.externalId || 'Unassigned' }} + - + } diff --git a/src/app/groups/groups-view/group-actions/group-transfer-clients/group-transfer-clients.component.ts b/src/app/groups/groups-view/group-actions/group-transfer-clients/group-transfer-clients.component.ts index 83fb81f332..f33bd4a88d 100644 --- a/src/app/groups/groups-view/group-actions/group-transfer-clients/group-transfer-clients.component.ts +++ b/src/app/groups/groups-view/group-actions/group-transfer-clients/group-transfer-clients.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, AfterViewInit } from '@angular/core'; +import { Component, OnInit, AfterViewInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, FormControl, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -27,6 +27,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GroupTransferClientsComponent implements OnInit, AfterViewInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private groupsService = inject(GroupsService); + private settingsService = inject(SettingsService); + /** Transfer Clients form. */ transferClientsForm: UntypedFormGroup; /** Group Data */ @@ -38,6 +44,9 @@ export class GroupTransferClientsComponent implements OnInit, AfterViewInit { /** Client Members. */ clientMembers: any[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -46,13 +55,7 @@ export class GroupTransferClientsComponent implements OnInit, AfterViewInit { * @param {GroupsService} groupsService GroupsService. * @param {SettingsService} settingsService SettingsService */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private groupsService: GroupsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { groupActionData: any }) => { this.groupData = data.groupActionData; this.clientMembers = this.groupData.clientMembers; diff --git a/src/app/groups/groups-view/group-actions/manage-group-members/manage-group-members.component.html b/src/app/groups/groups-view/group-actions/manage-group-members/manage-group-members.component.html index 6f94525a1b..4a79fa6ed3 100644 --- a/src/app/groups/groups-view/group-actions/manage-group-members/manage-group-members.component.html +++ b/src/app/groups/groups-view/group-actions/manage-group-members/manage-group-members.component.html @@ -6,9 +6,11 @@ - - {{ client.displayName }} - + @for (client of clientsData; track client) { + + {{ client.displayName }} + + } @@ -36,20 +38,24 @@ {{ 'labels.heading.Client Members' | translate }} - - - {{ client.displayName }} - - - - - - + @if (clientMembers?.length) { + + @for (client of clientMembers; track client; let i = $index) { + + {{ client.displayName }} + + + + + + } + + } diff --git a/src/app/groups/groups-view/group-actions/manage-group-members/manage-group-members.component.ts b/src/app/groups/groups-view/group-actions/manage-group-members/manage-group-members.component.ts index 5abfa5223a..3e0d7aae88 100644 --- a/src/app/groups/groups-view/group-actions/manage-group-members/manage-group-members.component.ts +++ b/src/app/groups/groups-view/group-actions/manage-group-members/manage-group-members.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, AfterViewInit } from '@angular/core'; +import { Component, OnInit, AfterViewInit, inject } from '@angular/core'; import { FormGroup, FormBuilder, UntypedFormControl, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute } from '@angular/router'; @@ -38,6 +38,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ManageGroupMembersComponent implements AfterViewInit { + private route = inject(ActivatedRoute); + private groupsService = inject(GroupsService); + private clientsService = inject(ClientsService); + dialog = inject(MatDialog); + /** Group Data */ groupData: any; /** Client data. */ @@ -47,6 +52,9 @@ export class ManageGroupMembersComponent implements AfterViewInit { /** Client Choice. */ clientChoice = new UntypedFormControl(''); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches group action data from `resolve` * @param {ActivatedRoute} route Activated Route @@ -54,12 +62,7 @@ export class ManageGroupMembersComponent implements AfterViewInit { * @param {ClientsService} clientsService Clients Service * @param {MatDialog} dialog Mat Dialog */ - constructor( - private route: ActivatedRoute, - private groupsService: GroupsService, - private clientsService: ClientsService, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { groupActionData: any }) => { this.groupData = data.groupActionData; this.clientMembers = data.groupActionData.clientMembers || []; diff --git a/src/app/groups/groups-view/groups-view.component.html b/src/app/groups/groups-view/groups-view.component.html index 35183287c0..80c92d9fbb 100644 --- a/src/app/groups/groups-view/groups-view.component.html +++ b/src/app/groups/groups-view/groups-view.component.html @@ -35,22 +35,28 @@ {{ 'labels.inputs.Office Name' | translate }} : {{ groupViewData.officeName }} {{ 'labels.inputs.Activation Date' | translate }} : {{ groupViewData.activationDate ? (groupViewData.activationDate | dateFormat) : 'Not Activated' }} - - {{ 'labels.inputs.Closure Date' | translate }} : - {{ groupViewData.timeline.closedOnDate | dateFormat }} - + @if (!groupViewData.active) { + + {{ 'labels.inputs.Closure Date' | translate }} : + {{ groupViewData.timeline.closedOnDate | dateFormat }} + + } - - - {{ 'labels.inputs.Next Meeting on' | translate }}: - {{ groupViewData.collectionMeetingCalendar?.nextTenRecurringDates[0] | dateFormat }} - - {{ 'labels.inputs.Meeting Frequency' | translate }}: - {{ groupViewData.collectionMeetingCalendar?.frequency.value | lowercase }} - - - + @if (groupViewData.collectionMeetingCalendar) { + + + {{ 'labels.inputs.Next Meeting on' | translate }}: + {{ groupViewData.collectionMeetingCalendar?.nextTenRecurringDates[0] | dateFormat }} + @if (editMeeting) { + + } + + {{ 'labels.inputs.Meeting Frequency' | translate }}: + {{ groupViewData.collectionMeetingCalendar?.frequency.value | lowercase }} + + + } @else { {{ 'labels.inputs.Next Meeting on' | translate }}: {{ 'labels.inputs.Unassigned' | translate }} @@ -58,20 +64,22 @@ {{ 'labels.inputs.Meeting Frequency' | translate }}: {{ 'labels.inputs.N/A' | translate }} - + } - - - - - - {{ 'labels.buttons.Activate' | translate }} - - + @if (!(groupViewData.status.value === 'Active')) { + + + + + + {{ 'labels.buttons.Activate' | translate }} + + + } @@ -91,19 +99,23 @@ {{ 'labels.buttons.Manage Members' | translate }} - - - - - {{ 'labels.buttons.Applications' | translate }} - + @if (groupViewData.active) { + + + + + {{ 'labels.buttons.Applications' | translate }} + + } - - - {{ 'labels.buttons.Bulk JLG Loan Application' | translate }} - + @if (groupViewData.clientMembers) { + + + {{ 'labels.buttons.Bulk JLG Loan Application' | translate }} + + } {{ 'labels.buttons.Group Loan Application' | translate }} - - - {{ 'labels.buttons.GLIM Application' | translate }} - - - - - {{ 'labels.buttons.GSIM Application' | translate }} - - + @if (groupViewData.clientMembers) { + + + {{ 'labels.buttons.GLIM Application' | translate }} + + + } + @if (groupViewData.clientMembers) { + + + {{ 'labels.buttons.GSIM Application' | translate }} + + + } {{ 'labels.buttons.More' | translate }} - - + + {{ 'labels.buttons.Attendance' | translate }} + - {{ 'labels.buttons.Attendance' | translate }} - - - - {{ 'labels.buttons.Assign Staff' | translate }} - - - - {{ 'labels.buttons.Unassign Staff' | translate }} - - - - {{ 'labels.buttons.Attach Meeting' | translate }} - + } + @if (!groupViewData.staffId) { + + + {{ 'labels.buttons.Assign Staff' | translate }} + + } + @if (groupViewData.staffId) { + + + {{ 'labels.buttons.Unassign Staff' | translate }} + + } + @if ( + !(groupViewData.centerId || groupViewData.collectionMeetingCalendar) && + groupViewData.status.value === 'Active' + ) { + + + {{ 'labels.buttons.Attach Meeting' | translate }} + + } {{ 'labels.buttons.Close' | translate }} @@ -206,18 +228,20 @@ > {{ 'labels.inputs.Committee' | translate }} - - - {{ groupDatatable.registeredTableName }} - - + @for (groupDatatable of groupDatatables; track groupDatatable) { + + + {{ groupDatatable.registeredTableName }} + + + } diff --git a/src/app/groups/groups-view/groups-view.component.ts b/src/app/groups/groups-view/groups-view.component.ts index 10113c2857..893b938346 100644 --- a/src/app/groups/groups-view/groups-view.component.ts +++ b/src/app/groups/groups-view/groups-view.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -18,7 +18,7 @@ import { MatCardSubtitle, MatCardContent } from '@angular/material/card'; -import { NgClass, NgIf, NgFor, LowerCasePipe } from '@angular/common'; +import { NgClass, LowerCasePipe } from '@angular/common'; import { MatTooltip } from '@angular/material/tooltip'; import { MatIconButton } from '@angular/material/button'; import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; @@ -62,11 +62,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GroupsViewComponent { + private route = inject(ActivatedRoute); + private groupsService = inject(GroupsService); + private router = inject(Router); + dialog = inject(MatDialog); + /** Group view data */ groupViewData: any; /** Group datatables data */ groupDatatables: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches group data from `resolve` * @param {ActivatedRoute} route Activated Route @@ -74,12 +82,7 @@ export class GroupsViewComponent { * @param {Router} router Router * @param {MatDialog} dialog Dialog */ - constructor( - private route: ActivatedRoute, - private groupsService: GroupsService, - private router: Router, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { groupViewData: any; groupDatatables: any }) => { this.groupViewData = data.groupViewData; this.groupDatatables = data.groupDatatables; diff --git a/src/app/groups/groups-view/notes-tab/notes-tab.component.ts b/src/app/groups/groups-view/notes-tab/notes-tab.component.ts index 69accdb06b..77a742a4da 100644 --- a/src/app/groups/groups-view/notes-tab/notes-tab.component.ts +++ b/src/app/groups/groups-view/notes-tab/notes-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; /** Custom Services */ @@ -23,6 +23,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class NotesTabComponent implements OnInit { + private route = inject(ActivatedRoute); + private authenticationService = inject(AuthenticationService); + private groupsService = inject(GroupsService); + /** Group ID */ entityId: string; /** Username */ @@ -30,17 +34,16 @@ export class NotesTabComponent implements OnInit { /** Client Notes */ entityNotes: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches notes data from `resolve` * @param {Activated Route} route Activated Route. * @param {GroupsService} groupsService Groups Service * @param {AuthenticationService} authenticationService Authentication Service. */ - constructor( - private route: ActivatedRoute, - private authenticationService: AuthenticationService, - private groupsService: GroupsService - ) { + constructor() { this.entityId = this.route.parent.snapshot.params['groupId']; this.addNote = this.addNote.bind(this); } diff --git a/src/app/groups/groups.component.ts b/src/app/groups/groups.component.ts index e6779b49e1..ecf431d213 100644 --- a/src/app/groups/groups.component.ts +++ b/src/app/groups/groups.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatCheckbox } from '@angular/material/checkbox'; import { MatPaginator } from '@angular/material/paginator'; @@ -62,6 +62,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GroupsComponent implements OnInit, AfterViewInit { + private groupsService = inject(GroupsService); + @ViewChild('showClosedGroups', { static: true }) showClosedGroups: MatCheckbox; /** Name form control. */ @@ -89,10 +91,13 @@ export class GroupsComponent implements OnInit, AfterViewInit { /** Sorter for groups table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {GroupsService} groupsService Groups Service */ - constructor(private groupsService: GroupsService) {} + constructor() {} ngOnInit() { this.getGroups(); diff --git a/src/app/groups/groups.service.ts b/src/app/groups/groups.service.ts index 07ab6f1489..7e20f39a4b 100644 --- a/src/app/groups/groups.service.ts +++ b/src/app/groups/groups.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -12,10 +12,15 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class GroupsService { + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. */ - constructor(private http: HttpClient) {} + constructor() {} /** * @param {any} filterBy Properties by which entries should be filtered. diff --git a/src/app/home/dashboard/amount-collected-pie/amount-collected-pie.component.html b/src/app/home/dashboard/amount-collected-pie/amount-collected-pie.component.html index b76a97a6fd..1eac8d8cd4 100644 --- a/src/app/home/dashboard/amount-collected-pie/amount-collected-pie.component.html +++ b/src/app/home/dashboard/amount-collected-pie/amount-collected-pie.component.html @@ -7,9 +7,11 @@ {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } @@ -21,8 +23,10 @@ - - {{ 'labels.text.No Data' | translate }} - + @if (showFallback) { + + {{ 'labels.text.No Data' | translate }} + + } diff --git a/src/app/home/dashboard/amount-collected-pie/amount-collected-pie.component.ts b/src/app/home/dashboard/amount-collected-pie/amount-collected-pie.component.ts index cace219e8b..cb10a3e1c3 100644 --- a/src/app/home/dashboard/amount-collected-pie/amount-collected-pie.component.ts +++ b/src/app/home/dashboard/amount-collected-pie/amount-collected-pie.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; @@ -10,7 +10,7 @@ import { HomeService } from '../../home.service'; import Chart from 'chart.js'; import { MatCard, MatCardHeader, MatCardContent } from '@angular/material/card'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; -import { NgFor, NgStyle, NgIf } from '@angular/common'; +import { NgStyle } from '@angular/common'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; /** @@ -28,6 +28,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AmountCollectedPieComponent implements OnInit { + private homeService = inject(HomeService); + private route = inject(ActivatedRoute); + /** Static Form control for office Id */ officeId = new UntypedFormControl(); /** Office Data */ @@ -39,15 +42,15 @@ export class AmountCollectedPieComponent implements OnInit { /** Shows fallback element */ showFallback = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches offices data from `resolve`. * @param {HomeService} homeService Home Service. * @param {ActivatedRoute} route Activated Route. */ - constructor( - private homeService: HomeService, - private route: ActivatedRoute - ) { + constructor() { this.route.data.subscribe((data: { offices: any }) => { this.officeData = data.offices; }); diff --git a/src/app/home/dashboard/amount-disbursed-pie/amount-disbursed-pie.component.html b/src/app/home/dashboard/amount-disbursed-pie/amount-disbursed-pie.component.html index 50a28f2080..8cf27909c5 100644 --- a/src/app/home/dashboard/amount-disbursed-pie/amount-disbursed-pie.component.html +++ b/src/app/home/dashboard/amount-disbursed-pie/amount-disbursed-pie.component.html @@ -7,9 +7,11 @@ {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } @@ -21,8 +23,10 @@ - - {{ 'labels.text.No Data' | translate }} - + @if (showFallback) { + + {{ 'labels.text.No Data' | translate }} + + } diff --git a/src/app/home/dashboard/amount-disbursed-pie/amount-disbursed-pie.component.ts b/src/app/home/dashboard/amount-disbursed-pie/amount-disbursed-pie.component.ts index 5a33471a96..c3396064bb 100644 --- a/src/app/home/dashboard/amount-disbursed-pie/amount-disbursed-pie.component.ts +++ b/src/app/home/dashboard/amount-disbursed-pie/amount-disbursed-pie.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; @@ -10,7 +10,7 @@ import { HomeService } from '../../home.service'; import Chart from 'chart.js'; import { MatCard, MatCardHeader, MatCardContent } from '@angular/material/card'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; -import { NgFor, NgStyle, NgIf } from '@angular/common'; +import { NgStyle } from '@angular/common'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; /** @@ -28,6 +28,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AmountDisbursedPieComponent implements OnInit { + private homeService = inject(HomeService); + private route = inject(ActivatedRoute); + /** Static Form control for office Id */ officeId = new UntypedFormControl(); /** Office Data */ @@ -39,15 +42,15 @@ export class AmountDisbursedPieComponent implements OnInit { /** Shows fallback element */ showFallback = true; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches offices data from `resolve`. * @param {HomeService} homeService Home Service. * @param {ActivatedRoute} route Activated Route. */ - constructor( - private homeService: HomeService, - private route: ActivatedRoute - ) { + constructor() { this.route.data.subscribe((data: { offices: any }) => { this.officeData = data.offices; }); diff --git a/src/app/home/dashboard/client-trends-bar/client-trends-bar.component.html b/src/app/home/dashboard/client-trends-bar/client-trends-bar.component.html index f203a7bb35..3d7d6c60b6 100644 --- a/src/app/home/dashboard/client-trends-bar/client-trends-bar.component.html +++ b/src/app/home/dashboard/client-trends-bar/client-trends-bar.component.html @@ -7,9 +7,11 @@ {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } diff --git a/src/app/home/dashboard/client-trends-bar/client-trends-bar.component.ts b/src/app/home/dashboard/client-trends-bar/client-trends-bar.component.ts index cc2bea834f..2f9b70acd6 100644 --- a/src/app/home/dashboard/client-trends-bar/client-trends-bar.component.ts +++ b/src/app/home/dashboard/client-trends-bar/client-trends-bar.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; @@ -15,7 +15,7 @@ import { Dates } from 'app/core/utils/dates'; import Chart from 'chart.js'; import { MatCard, MatCardHeader, MatCardContent } from '@angular/material/card'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; -import { NgFor, NgStyle } from '@angular/common'; +import { NgStyle } from '@angular/common'; import { MatButtonToggleGroup, MatButtonToggle } from '@angular/material/button-toggle'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -36,6 +36,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ClientTrendsBarComponent implements OnInit { + private homeService = inject(HomeService); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + /** Static Form control for office Id */ officeId = new UntypedFormControl(); /** Static Form control for time scale */ @@ -47,17 +51,16 @@ export class ClientTrendsBarComponent implements OnInit { /** Substitute for resolver */ hideOutput = true; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches offices data from `resolve` * @param {HomeService} homeService Home Service * @param {ActivatedRoute} route Activated Route * @param {Dates} dateUtils Date Utils */ - constructor( - private homeService: HomeService, - private route: ActivatedRoute, - private dateUtils: Dates - ) { + constructor() { this.route.data.subscribe((data: { offices: any }) => { this.officeData = data.offices; }); diff --git a/src/app/home/dashboard/dashboard.component.html b/src/app/home/dashboard/dashboard.component.html index a52d253754..17f72d402d 100644 --- a/src/app/home/dashboard/dashboard.component.html +++ b/src/app/home/dashboard/dashboard.component.html @@ -8,9 +8,11 @@ - - {{ activity.activity }} - + @for (activity of filteredActivities | async; track activity) { + + {{ activity.activity }} + + } diff --git a/src/app/home/dashboard/dashboard.component.ts b/src/app/home/dashboard/dashboard.component.ts index 1d51d734c6..c4198358cc 100644 --- a/src/app/home/dashboard/dashboard.component.ts +++ b/src/app/home/dashboard/dashboard.component.ts @@ -1,12 +1,12 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { Router, RouterLink } from '@angular/router'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { activities } from '../activities'; import { MatAutocompleteTrigger, MatAutocomplete, MatOption } from '@angular/material/autocomplete'; -import { NgFor, AsyncPipe } from '@angular/common'; +import { AsyncPipe } from '@angular/common'; import { ClientTrendsBarComponent } from './client-trends-bar/client-trends-bar.component'; import { AmountDisbursedPieComponent } from './amount-disbursed-pie/amount-disbursed-pie.component'; import { AmountCollectedPieComponent } from './amount-collected-pie/amount-collected-pie.component'; @@ -29,6 +29,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DashboardComponent implements OnInit { + private router = inject(Router); + /** Array of all user activities */ userActivity: string[]; /** Array of most recent user activities */ @@ -42,10 +44,13 @@ export class DashboardComponent implements OnInit { /** All User Activities. */ allActivities: any[] = activities; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Gets user activities from local storage. */ - constructor(private router: Router) { + constructor() { this.userActivity = JSON.parse(localStorage.getItem('mifosXLocation')); } diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index 4acbdf2973..9f1fc3d9d1 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -22,9 +22,11 @@ - - {{ activity.activity }} - + @for (activity of filteredActivities | async; track activity) { + + {{ activity.activity }} + + } @@ -37,22 +39,24 @@ {{ 'labels.buttons.Close' | translate }} - - {{ 'labels.buttons.Back' | translate }} - - - {{ 'labels.buttons.Next' | translate }} - + @if (prev) { + + {{ 'labels.buttons.Back' | translate }} + + } + @if (next) { + + {{ 'labels.buttons.Next' | translate }} + + } diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index 4537e1650c..4864ef8dfe 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { ActivatedRoute, Router, NavigationEnd, RouterLink } from '@angular/router'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; @@ -22,7 +22,7 @@ import { NextStepDialogComponent } from '../configuration-wizard/next-step-dialo import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatCard, MatCardHeader, MatCardTitle, MatCardContent, MatCardImage } from '@angular/material/card'; import { MatAutocompleteTrigger, MatAutocomplete, MatOption } from '@angular/material/autocomplete'; -import { NgFor, NgIf, AsyncPipe } from '@angular/common'; +import { AsyncPipe } from '@angular/common'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; /** @@ -44,6 +44,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class HomeComponent implements OnInit, AfterViewInit { + private authenticationService = inject(AuthenticationService); + private activatedRoute = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Username of authenticated user. */ username: string; /** Activity Form. */ @@ -64,6 +71,9 @@ export class HomeComponent implements OnInit, AfterViewInit { /* Template for popover on search activity */ @ViewChild('templateSearchActivity', { static: false }) templateSearchActivity: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AuthenticationService} authenticationService Authentication Service. * @param {ActivatedRoute} activatedRoute ActivatedRoute. @@ -72,14 +82,7 @@ export class HomeComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private authenticationService: AuthenticationService, - private activatedRoute: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) {} + constructor() {} /** * Sets the username of the authenticated user. diff --git a/src/app/home/home.service.ts b/src/app/home/home.service.ts index 6c76862d75..96611c2a9f 100644 --- a/src/app/home/home.service.ts +++ b/src/app/home/home.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -12,10 +12,15 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class HomeService { + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. */ - constructor(private http: HttpClient) {} + constructor() {} /** * @param {number} officeId Office Id. diff --git a/src/app/home/timeout-dialog/session-timeout-dialog.component.ts b/src/app/home/timeout-dialog/session-timeout-dialog.component.ts index b7bc6c65ef..460638157d 100644 --- a/src/app/home/timeout-dialog/session-timeout-dialog.component.ts +++ b/src/app/home/timeout-dialog/session-timeout-dialog.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MatDialogTitle, @@ -23,5 +23,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SessionTimeoutDialogComponent { - constructor(public dialogRef: MatDialogRef) {} + dialogRef = inject>(MatDialogRef); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} } diff --git a/src/app/home/warning-dialog/warning-dialog.component.ts b/src/app/home/warning-dialog/warning-dialog.component.ts index d6754af546..01ebf6c5ed 100644 --- a/src/app/home/warning-dialog/warning-dialog.component.ts +++ b/src/app/home/warning-dialog/warning-dialog.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MatDialogTitle, @@ -24,11 +24,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class WarningDialogComponent { + dialogRef = inject>(MatDialogRef); + title: string; content: string; buttonText: string; - constructor(public dialogRef: MatDialogRef) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.title = environment.warningDialog.title; this.content = environment.warningDialog.content; this.buttonText = environment.warningDialog.buttonText; diff --git a/src/app/loans/common-resolvers/external-asset-owner-active-transfer.resolver.ts b/src/app/loans/common-resolvers/external-asset-owner-active-transfer.resolver.ts index 50d22824ed..53dd0a4747 100644 --- a/src/app/loans/common-resolvers/external-asset-owner-active-transfer.resolver.ts +++ b/src/app/loans/common-resolvers/external-asset-owner-active-transfer.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; import { Observable } from 'rxjs'; import { ExternalAssetOwnerService } from '../services/external-asset-owner.service'; @@ -7,10 +7,15 @@ import { ExternalAssetOwnerService } from '../services/external-asset-owner.serv providedIn: 'root' }) export class ExternalAssetOwnerActiveTransferResolver { + private externalAssetOwnerService = inject(ExternalAssetOwnerService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ExternalAssetOwnerService} externalAssetOwnerService External Asset Owner service. */ - constructor(private externalAssetOwnerService: ExternalAssetOwnerService) {} + constructor() {} /** * Returns the Loans with Association data. diff --git a/src/app/loans/common-resolvers/external-asset-owner-journal-entry.resolver.ts b/src/app/loans/common-resolvers/external-asset-owner-journal-entry.resolver.ts index 86ddd0173c..fa700d74b1 100644 --- a/src/app/loans/common-resolvers/external-asset-owner-journal-entry.resolver.ts +++ b/src/app/loans/common-resolvers/external-asset-owner-journal-entry.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; import { Observable, of } from 'rxjs'; import { ExternalAssetOwnerService } from '../services/external-asset-owner.service'; @@ -7,10 +7,15 @@ import { ExternalAssetOwnerService } from '../services/external-asset-owner.serv providedIn: 'root' }) export class ExternalAssetOwnerJournalEntryResolver { + private externalAssetOwnerService = inject(ExternalAssetOwnerService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ExternalAssetOwnerService} externalAssetOwnerService External Asset Owner service. */ - constructor(private externalAssetOwnerService: ExternalAssetOwnerService) {} + constructor() {} /** * Returns the Loans with Association data. diff --git a/src/app/loans/common-resolvers/external-asset-owner.resolver.ts b/src/app/loans/common-resolvers/external-asset-owner.resolver.ts index 76312f60a9..2de3230036 100644 --- a/src/app/loans/common-resolvers/external-asset-owner.resolver.ts +++ b/src/app/loans/common-resolvers/external-asset-owner.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; import { Observable } from 'rxjs'; import { ExternalAssetOwnerService } from '../services/external-asset-owner.service'; @@ -7,10 +7,15 @@ import { ExternalAssetOwnerService } from '../services/external-asset-owner.serv providedIn: 'root' }) export class ExternalAssetOwnerResolver { + private externalAssetOwnerService = inject(ExternalAssetOwnerService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ExternalAssetOwnerService} externalAssetOwnerService External Asset Owner service. */ - constructor(private externalAssetOwnerService: ExternalAssetOwnerService) {} + constructor() {} /** * Returns the Loans with Association data. diff --git a/src/app/loans/common-resolvers/glim-loan-template.resolver.ts b/src/app/loans/common-resolvers/glim-loan-template.resolver.ts index 09dd6ebccf..591ce3c4ec 100644 --- a/src/app/loans/common-resolvers/glim-loan-template.resolver.ts +++ b/src/app/loans/common-resolvers/glim-loan-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class GLIMLoanTemplateResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} loansService Loan service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the loan account template data. diff --git a/src/app/loans/common-resolvers/loan-action-button.resolver.ts b/src/app/loans/common-resolvers/loan-action-button.resolver.ts index 56d19b919f..dc16c2c5df 100644 --- a/src/app/loans/common-resolvers/loan-action-button.resolver.ts +++ b/src/app/loans/common-resolvers/loan-action-button.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class LoanActionButtonResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} LoansService Loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the Loans Notes Data. diff --git a/src/app/loans/common-resolvers/loan-arrear-delinquency.resolver.ts b/src/app/loans/common-resolvers/loan-arrear-delinquency.resolver.ts index cb963ffb70..538470004d 100644 --- a/src/app/loans/common-resolvers/loan-arrear-delinquency.resolver.ts +++ b/src/app/loans/common-resolvers/loan-arrear-delinquency.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; import { SystemService } from 'app/system/system.service'; import { Observable } from 'rxjs'; @@ -7,10 +7,15 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class LoanArrearDelinquencyResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the loan-arrears-delinquency-display-data configuration data. diff --git a/src/app/loans/common-resolvers/loan-buy-down-fees-data.resolver.ts b/src/app/loans/common-resolvers/loan-buy-down-fees-data.resolver.ts index 9b465096c5..3d4059b1e3 100644 --- a/src/app/loans/common-resolvers/loan-buy-down-fees-data.resolver.ts +++ b/src/app/loans/common-resolvers/loan-buy-down-fees-data.resolver.ts @@ -1,11 +1,16 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { Resolve, ActivatedRouteSnapshot } from '@angular/router'; import { Observable } from 'rxjs'; import { LoansService } from '../loans.service'; @Injectable() export class LoanBuyDownFeesDataResolver implements Resolve { - constructor(private loansService: LoansService) {} + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} resolve(route: ActivatedRouteSnapshot): Observable { const loanId = route.paramMap.get('loanId') || route.parent.paramMap.get('loanId'); diff --git a/src/app/loans/common-resolvers/loan-collaterals.resolver.ts b/src/app/loans/common-resolvers/loan-collaterals.resolver.ts index de98818dfc..193b0497a7 100644 --- a/src/app/loans/common-resolvers/loan-collaterals.resolver.ts +++ b/src/app/loans/common-resolvers/loan-collaterals.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; import { Observable } from 'rxjs'; import { LoansService } from '../loans.service'; @@ -7,10 +7,15 @@ import { LoansService } from '../loans.service'; providedIn: 'root' }) export class LoanCollateralsResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} LoansService Loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the Loans data. diff --git a/src/app/loans/common-resolvers/loan-datatable.resolver.ts b/src/app/loans/common-resolvers/loan-datatable.resolver.ts index b9c528efe7..0e0eaf9051 100644 --- a/src/app/loans/common-resolvers/loan-datatable.resolver.ts +++ b/src/app/loans/common-resolvers/loan-datatable.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class LoanDatatableResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} LoansService Loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the Loans Notes Data. diff --git a/src/app/loans/common-resolvers/loan-datatables.resolver.ts b/src/app/loans/common-resolvers/loan-datatables.resolver.ts index 15e26dd620..bbba337b96 100644 --- a/src/app/loans/common-resolvers/loan-datatables.resolver.ts +++ b/src/app/loans/common-resolvers/loan-datatables.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class LoanDatatablesResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {loansService} loansService loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the loan datatables. diff --git a/src/app/loans/common-resolvers/loan-deferred-income-data.resolver.ts b/src/app/loans/common-resolvers/loan-deferred-income-data.resolver.ts index 9076d49a5e..a5dedafb09 100644 --- a/src/app/loans/common-resolvers/loan-deferred-income-data.resolver.ts +++ b/src/app/loans/common-resolvers/loan-deferred-income-data.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class LoanDeferredIncomeDataResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} LoansService Loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the Loans with Association data. diff --git a/src/app/loans/common-resolvers/loan-delinquency-actions.resolver.ts b/src/app/loans/common-resolvers/loan-delinquency-actions.resolver.ts index a9db3afa8c..965f42891b 100644 --- a/src/app/loans/common-resolvers/loan-delinquency-actions.resolver.ts +++ b/src/app/loans/common-resolvers/loan-delinquency-actions.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; import { Observable } from 'rxjs'; import { LoansService } from '../loans.service'; @@ -7,10 +7,15 @@ import { LoansService } from '../loans.service'; providedIn: 'root' }) export class LoanDelinquencyActionsResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} LoansService Loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the Loans with Association data. diff --git a/src/app/loans/common-resolvers/loan-delinquency-data.resolver.ts b/src/app/loans/common-resolvers/loan-delinquency-data.resolver.ts index 6d9e15d7fe..7eae79f889 100644 --- a/src/app/loans/common-resolvers/loan-delinquency-data.resolver.ts +++ b/src/app/loans/common-resolvers/loan-delinquency-data.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class LoanDelinquencyDataResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} LoansService Loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the Loans with Association data. diff --git a/src/app/loans/common-resolvers/loan-delinquency-tags.resolver.ts b/src/app/loans/common-resolvers/loan-delinquency-tags.resolver.ts index 602f54ec4c..d025e556ea 100644 --- a/src/app/loans/common-resolvers/loan-delinquency-tags.resolver.ts +++ b/src/app/loans/common-resolvers/loan-delinquency-tags.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class LoanDelinquencyTagsResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} LoansService Loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the Loans with Association data. diff --git a/src/app/loans/common-resolvers/loan-details.resolver.ts b/src/app/loans/common-resolvers/loan-details.resolver.ts index eb21bed568..61c3d6f607 100644 --- a/src/app/loans/common-resolvers/loan-details.resolver.ts +++ b/src/app/loans/common-resolvers/loan-details.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class LoanDetailsResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} LoansService Loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the Loans with Association data. diff --git a/src/app/loans/common-resolvers/loan-documents.resolver.ts b/src/app/loans/common-resolvers/loan-documents.resolver.ts index b403cfd3b6..871eadcba9 100644 --- a/src/app/loans/common-resolvers/loan-documents.resolver.ts +++ b/src/app/loans/common-resolvers/loan-documents.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class LoanDocumentsResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} LoansService Loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the Loans data. diff --git a/src/app/loans/common-resolvers/loan-notes.resolver.ts b/src/app/loans/common-resolvers/loan-notes.resolver.ts index 867e22f78e..ce4ef800f3 100644 --- a/src/app/loans/common-resolvers/loan-notes.resolver.ts +++ b/src/app/loans/common-resolvers/loan-notes.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class LoanNotesResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} LoansService Loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the Loans data. diff --git a/src/app/loans/common-resolvers/loan-reschedules.resolver.ts b/src/app/loans/common-resolvers/loan-reschedules.resolver.ts index 90eb685bc9..a0bd410c5e 100644 --- a/src/app/loans/common-resolvers/loan-reschedules.resolver.ts +++ b/src/app/loans/common-resolvers/loan-reschedules.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { Router, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router'; import { Observable, of } from 'rxjs'; import { LoansService } from '../loans.service'; @@ -7,10 +7,15 @@ import { LoansService } from '../loans.service'; providedIn: 'root' }) export class LoanReschedulesResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} LoansService Loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the Loans data. diff --git a/src/app/loans/common-resolvers/loan-term-variations.resolver.ts b/src/app/loans/common-resolvers/loan-term-variations.resolver.ts index 6eda3ca32a..b2a95c6434 100644 --- a/src/app/loans/common-resolvers/loan-term-variations.resolver.ts +++ b/src/app/loans/common-resolvers/loan-term-variations.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class LoanTermVariationsResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} LoansService Loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the Loans with Association data. diff --git a/src/app/loans/common-resolvers/loans-account-and-template.resolver.ts b/src/app/loans/common-resolvers/loans-account-and-template.resolver.ts index 8eadecf13e..01ba19ea19 100644 --- a/src/app/loans/common-resolvers/loans-account-and-template.resolver.ts +++ b/src/app/loans/common-resolvers/loans-account-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class LoansAccountAndTemplateResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the loan account template data. diff --git a/src/app/loans/common-resolvers/loans-account-charge.resolver.ts b/src/app/loans/common-resolvers/loans-account-charge.resolver.ts index 4e9e5abbee..eb91b8248f 100644 --- a/src/app/loans/common-resolvers/loans-account-charge.resolver.ts +++ b/src/app/loans/common-resolvers/loans-account-charge.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class LoansAccountChargeResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} LoansService Loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the Loans Account Charge data. diff --git a/src/app/loans/common-resolvers/loans-account-template.resolver.ts b/src/app/loans/common-resolvers/loans-account-template.resolver.ts index 0c1f0efb2e..030eefda2f 100644 --- a/src/app/loans/common-resolvers/loans-account-template.resolver.ts +++ b/src/app/loans/common-resolvers/loans-account-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class LoansAccountTemplateResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the loan account template data. diff --git a/src/app/loans/common-resolvers/loans-account-transaction-template.resolver.ts b/src/app/loans/common-resolvers/loans-account-transaction-template.resolver.ts index 98fe83a630..d44ef2721a 100644 --- a/src/app/loans/common-resolvers/loans-account-transaction-template.resolver.ts +++ b/src/app/loans/common-resolvers/loans-account-transaction-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class LoansAccountTransactionTemplateResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} LoansService Loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the Loans Account Transaction Template data. diff --git a/src/app/loans/common-resolvers/loans-account-transaction.resolver.ts b/src/app/loans/common-resolvers/loans-account-transaction.resolver.ts index e5cfb41664..d921b930f4 100644 --- a/src/app/loans/common-resolvers/loans-account-transaction.resolver.ts +++ b/src/app/loans/common-resolvers/loans-account-transaction.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class LoansAccountTransactionResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} LoansService Loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the Loans Account Transaction data. diff --git a/src/app/loans/common-resolvers/loans-transaction-reciept.resolver.ts b/src/app/loans/common-resolvers/loans-transaction-reciept.resolver.ts index 2dc6a41056..7f6e10e84a 100644 --- a/src/app/loans/common-resolvers/loans-transaction-reciept.resolver.ts +++ b/src/app/loans/common-resolvers/loans-transaction-reciept.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ReportsService } from 'app/reports/reports.service'; */ @Injectable() export class LoansTransactionRecieptResolver { + private reportsService = inject(ReportsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ReportsService} reportsService Reports service. */ - constructor(private reportsService: ReportsService) {} + constructor() {} /** * Returns the Loans Transaction Reciept diff --git a/src/app/loans/create-loans-account/create-loans-account.component.html b/src/app/loans/create-loans-account/create-loans-account.component.html index 782a87d867..e7ff8c8599 100644 --- a/src/app/loans/create-loans-account/create-loans-account.component.html +++ b/src/app/loans/create-loans-account/create-loans-account.component.html @@ -64,35 +64,38 @@ - - {{ 'labels.inputs.REPAYMENT SCHEDULE' | translate }} - - - - - - - {{ datatable.registeredTableName }} - - - - - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (loansAccountFormValid) { + + {{ 'labels.inputs.REPAYMENT SCHEDULE' | translate }} + + + + } + + @for (datatable of datatables; track datatable) { + + {{ datatable.registeredTableName }} + + + } + + @if (loansAccountFormValid) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/loans/create-loans-account/create-loans-account.component.ts b/src/app/loans/create-loans-account/create-loans-account.component.ts index ebbb4abe7d..96910b2acc 100644 --- a/src/app/loans/create-loans-account/create-loans-account.component.ts +++ b/src/app/loans/create-loans-account/create-loans-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, QueryList, ViewChild, ViewChildren } from '@angular/core'; +import { Component, QueryList, ViewChild, ViewChildren, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Services */ @@ -41,6 +41,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateLoansAccountComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private loansService = inject(LoansService); + private settingsService = inject(SettingsService); + private clientService = inject(ClientsService); + /** Imports all the step component */ @ViewChild(LoansAccountDetailsStepComponent, { static: true }) loansAccountDetailsStep: LoansAccountDetailsStepComponent; @@ -64,6 +70,9 @@ export class CreateLoansAccountComponent { /** Currency Code */ currencyCode: string; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Sets loans account create form. * @param {route} ActivatedRoute Activated Route. @@ -72,13 +81,7 @@ export class CreateLoansAccountComponent { * @param {SettingsService} settingsService Settings Service * @param {ClientsService} clientService Client Service */ - constructor( - private route: ActivatedRoute, - private router: Router, - private loansService: LoansService, - private settingsService: SettingsService, - private clientService: ClientsService - ) { + constructor() { this.route.data.subscribe((data: { loansAccountTemplate: any }) => { this.loansAccountTemplate = data.loansAccountTemplate; }); diff --git a/src/app/loans/custom-dialog/loan-delinquency-action-dialog/loan-delinquency-action-dialog.component.html b/src/app/loans/custom-dialog/loan-delinquency-action-dialog/loan-delinquency-action-dialog.component.html index c21e736bd4..cfbdb14667 100644 --- a/src/app/loans/custom-dialog/loan-delinquency-action-dialog/loan-delinquency-action-dialog.component.html +++ b/src/app/loans/custom-dialog/loan-delinquency-action-dialog/loan-delinquency-action-dialog.component.html @@ -13,10 +13,12 @@ {{ 'labels.heading.Loan Delinquency Actions' | translate }} /> - - {{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (delinquencyActionForm.controls.startDate.hasError('required')) { + + {{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -31,10 +33,12 @@ {{ 'labels.heading.Loan Delinquency Actions' | translate }} /> - - {{ 'labels.inputs.End Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (delinquencyActionForm.controls.endDate.hasError('required')) { + + {{ 'labels.inputs.End Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/loans/custom-dialog/loan-delinquency-action-dialog/loan-delinquency-action-dialog.component.ts b/src/app/loans/custom-dialog/loan-delinquency-action-dialog/loan-delinquency-action-dialog.component.ts index 67800d1768..4267017cbd 100644 --- a/src/app/loans/custom-dialog/loan-delinquency-action-dialog/loan-delinquency-action-dialog.component.ts +++ b/src/app/loans/custom-dialog/loan-delinquency-action-dialog/loan-delinquency-action-dialog.component.ts @@ -1,4 +1,4 @@ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { MAT_DIALOG_DATA, @@ -25,17 +25,20 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanDelinquencyActionDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + private formBuilder = inject(UntypedFormBuilder); + delinquencyActionForm: UntypedFormGroup; /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ maxDate = new Date(2100, 0, 1); - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any, - private formBuilder: UntypedFormBuilder - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createDelinquencyActionForm(); } diff --git a/src/app/loans/custom-dialog/loans-account-add-collateral-dialog/loans-account-add-collateral-dialog.component.html b/src/app/loans/custom-dialog/loans-account-add-collateral-dialog/loans-account-add-collateral-dialog.component.html index fbbd6ad231..6cc85b22ec 100644 --- a/src/app/loans/custom-dialog/loans-account-add-collateral-dialog/loans-account-add-collateral-dialog.component.html +++ b/src/app/loans/custom-dialog/loans-account-add-collateral-dialog/loans-account-add-collateral-dialog.component.html @@ -4,9 +4,11 @@ {{ 'labels.heading.Add Loan Collateral' | translate }} {{ 'labels.inputs.Collateral' | translate }} - - {{ collateralType.name }} - + @for (collateralType of collateralTypeData; track collateralType) { + + {{ collateralType.name }} + + } {{ 'labels.inputs.Collateral' | translate }} {{ 'labels.commons.is' | translate }} @@ -17,13 +19,17 @@ {{ 'labels.heading.Add Loan Collateral' | translate }} {{ 'labels.inputs.Quantity' | translate }} - - {{ 'labels.inputs.Quantity' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Quantity can not be more than' | translate }} {{ maxQuantity }} - + @if (addCollateralForm.controls.quantity.hasError('required')) { + + {{ 'labels.inputs.Quantity' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (addCollateralForm.controls.quantity.hasError('max')) { + + {{ 'labels.inputs.Quantity can not be more than' | translate }} {{ maxQuantity }} + + } diff --git a/src/app/loans/custom-dialog/loans-account-add-collateral-dialog/loans-account-add-collateral-dialog.component.ts b/src/app/loans/custom-dialog/loans-account-add-collateral-dialog/loans-account-add-collateral-dialog.component.ts index 280b73c626..12ad345bad 100644 --- a/src/app/loans/custom-dialog/loans-account-add-collateral-dialog/loans-account-add-collateral-dialog.component.ts +++ b/src/app/loans/custom-dialog/loans-account-add-collateral-dialog/loans-account-add-collateral-dialog.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -25,6 +25,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoansAccountAddCollateralDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + private formBuilder = inject(UntypedFormBuilder); + layout: { addButtonText?: string; } = { @@ -39,11 +43,10 @@ export class LoansAccountAddCollateralDialogComponent implements OnInit { /** Maximum ALlowed Quantity of selected collateral */ maxQuantity: any = 0; - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any, - private formBuilder: UntypedFormBuilder - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createAddCollateralForm(); } diff --git a/src/app/loans/custom-dialog/loans-account-view-guarantor-details-dialog/loans-account-view-guarantor-details-dialog.component.html b/src/app/loans/custom-dialog/loans-account-view-guarantor-details-dialog/loans-account-view-guarantor-details-dialog.component.html index 35e8637781..61ab8c66f0 100644 --- a/src/app/loans/custom-dialog/loans-account-view-guarantor-details-dialog/loans-account-view-guarantor-details-dialog.component.html +++ b/src/app/loans/custom-dialog/loans-account-view-guarantor-details-dialog/loans-account-view-guarantor-details-dialog.component.html @@ -25,20 +25,28 @@ {{ 'labels.heading.Guarantor Detail' | translate }} {{ 'labels.inputs.Status' | translate }}: - - {{ 'labels.inputs.Active' | translate }} - - - {{ 'labels.inputs.Deleted' | translate }} - - - - {{ 'labels.inputs.Available Disbursement Amount (with Over Applied)' | translate }}: - {{ - data.loanData.delinquent.availableDisbursementAmountWithOverApplied | formatNumber - }} + @if (data.guarantorData.status) { + + {{ 'labels.inputs.Active' | translate }} + + } + @if (!data.guarantorData.status) { + + {{ 'labels.inputs.Deleted' | translate }} + + } + + @if (data.loanData?.delinquent?.availableDisbursementAmountWithOverApplied !== undefined) { + + {{ 'labels.inputs.Available Disbursement Amount (with Over Applied)' | translate }}: + {{ + data.loanData.delinquent.availableDisbursementAmountWithOverApplied | formatNumber + }} + + } diff --git a/src/app/loans/custom-dialog/loans-account-view-guarantor-details-dialog/loans-account-view-guarantor-details-dialog.component.ts b/src/app/loans/custom-dialog/loans-account-view-guarantor-details-dialog/loans-account-view-guarantor-details-dialog.component.ts index 0adb0a1c32..7bb1bd4f15 100644 --- a/src/app/loans/custom-dialog/loans-account-view-guarantor-details-dialog/loans-account-view-guarantor-details-dialog.component.ts +++ b/src/app/loans/custom-dialog/loans-account-view-guarantor-details-dialog/loans-account-view-guarantor-details-dialog.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -24,10 +24,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoansAccountViewGuarantorDetailsDialogComponent implements OnInit { - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { this.dialogRef.updateSize('400px'); diff --git a/src/app/loans/edit-loans-account/edit-loans-account.component.html b/src/app/loans/edit-loans-account/edit-loans-account.component.html index 2ab2eb89d1..0fc6116b8d 100644 --- a/src/app/loans/edit-loans-account/edit-loans-account.component.html +++ b/src/app/loans/edit-loans-account/edit-loans-account.component.html @@ -70,16 +70,17 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (loansAccountFormValidAndNotPristine) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/loans/edit-loans-account/edit-loans-account.component.ts b/src/app/loans/edit-loans-account/edit-loans-account.component.ts index 5d105b932b..dd2c725c2f 100644 --- a/src/app/loans/edit-loans-account/edit-loans-account.component.ts +++ b/src/app/loans/edit-loans-account/edit-loans-account.component.ts @@ -1,4 +1,4 @@ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { LoansService } from '../loans.service'; import { LoansAccountDetailsStepComponent } from '../loans-account-stepper/loans-account-details-step/loans-account-details-step.component'; @@ -36,6 +36,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditLoansAccountComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private loansService = inject(LoansService); + private settingsService = inject(SettingsService); + @ViewChild(LoansAccountDetailsStepComponent, { static: true }) loansAccountDetailsStep: LoansAccountDetailsStepComponent; @ViewChild(LoansAccountTermsStepComponent, { static: true }) loansAccountTermsStep: LoansAccountTermsStepComponent; @@ -52,6 +58,9 @@ export class EditLoansAccountComponent { /** Currency Code */ currencyCode: string; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Sets loans account edit form. * @param {route} ActivatedRoute Activated Route. @@ -60,13 +69,7 @@ export class EditLoansAccountComponent { * @param {loansService} LoansService Loans Service * @param {SettingsService} settingsService Settings Service */ - constructor( - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private loansService: LoansService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { loansAccountAndTemplate: any }) => { this.loansAccountAndTemplate = data.loansAccountAndTemplate; }); diff --git a/src/app/loans/glim-account/create-glim-account/create-glim-account.component.html b/src/app/loans/glim-account/create-glim-account/create-glim-account.component.html index d33f57f064..4c02a75730 100644 --- a/src/app/loans/glim-account/create-glim-account/create-glim-account.component.html +++ b/src/app/loans/glim-account/create-glim-account/create-glim-account.component.html @@ -71,36 +71,39 @@ - - {{ 'labels.inputs.REPAYMENT SCHEDULE' | translate }} - - - - - - - {{ datatable.registeredTableName }} - - - - - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (loansAccountFormValid) { + + {{ 'labels.inputs.REPAYMENT SCHEDULE' | translate }} + + + + } + + @for (datatable of datatables; track datatable) { + + {{ datatable.registeredTableName }} + + + } + + @if (loansAccountFormValid) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/loans/glim-account/create-glim-account/create-glim-account.component.ts b/src/app/loans/glim-account/create-glim-account/create-glim-account.component.ts index c1d04dcfb7..ea76b56578 100644 --- a/src/app/loans/glim-account/create-glim-account/create-glim-account.component.ts +++ b/src/app/loans/glim-account/create-glim-account/create-glim-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, QueryList, ViewChild, ViewChildren } from '@angular/core'; +import { Component, QueryList, ViewChild, ViewChildren, inject } from '@angular/core'; import { I18nService } from 'app/core/i18n/i18n.service'; import { ActivatedRoute, Router } from '@angular/router'; @@ -42,6 +42,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateGlimAccountComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private loansService = inject(LoansService); + private settingsService = inject(SettingsService); + private clientService = inject(ClientsService); + private dateUtils = inject(Dates); + private i18nService = inject(I18nService); + /** Imports all the step component */ @ViewChild(LoansAccountDetailsStepComponent, { static: true }) loansAccountDetailsStep: LoansAccountDetailsStepComponent; @@ -71,6 +79,9 @@ export class CreateGlimAccountComponent { /** Currency Code */ currencyCode: string; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Sets loans account create form. * @param {route} ActivatedRoute Activated Route. @@ -79,15 +90,7 @@ export class CreateGlimAccountComponent { * @param {SettingsService} settingsService Settings Service * @param {ClientsService} clientService Client Service */ - constructor( - private route: ActivatedRoute, - private router: Router, - private loansService: LoansService, - private settingsService: SettingsService, - private clientService: ClientsService, - private dateUtils: Dates, - private i18nService: I18nService - ) { + constructor() { this.route.data.subscribe((data: { loansAccountTemplate: any; groupsData: any }) => { this.loansAccountTemplate = data.loansAccountTemplate; this.dataSource = data.groupsData.activeClientMembers; diff --git a/src/app/loans/glim-account/glim-account-view.resolver.ts b/src/app/loans/glim-account/glim-account-view.resolver.ts index 656cedb5a9..afeaadefcd 100644 --- a/src/app/loans/glim-account/glim-account-view.resolver.ts +++ b/src/app/loans/glim-account/glim-account-view.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { LoansService } from '../loans.service'; */ @Injectable() export class GLIMViewResolver { + private loansService = inject(LoansService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} loansService Loans service. */ - constructor(private loansService: LoansService) {} + constructor() {} /** * Returns the Savings Account data. diff --git a/src/app/loans/glim-account/glim-account.component.ts b/src/app/loans/glim-account/glim-account.component.ts index 4ac356bd02..001ff9a08c 100644 --- a/src/app/loans/glim-account/glim-account.component.ts +++ b/src/app/loans/glim-account/glim-account.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; import { @@ -40,6 +40,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GlimAccountComponent implements OnInit { + private route = inject(ActivatedRoute); + dialog = inject(MatDialog); + /** Columns to be displayed in GLIM overview table. */ displayedColumns: string[] = [ 'loanId', @@ -57,15 +60,15 @@ export class GlimAccountComponent implements OnInit { /** Paginator for charge overview table. */ @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the charge overview data from `resolve`. * @param {ActivatedRoute} route Activated Route. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private route: ActivatedRoute, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { glimData: any }) => { this.glimOverviewData = data.glimData; }); diff --git a/src/app/loans/loans-account-stepper/loans-account-charges-step/loans-account-charges-step.component.html b/src/app/loans/loans-account-stepper/loans-account-charges-step/loans-account-charges-step.component.html index bec25484fa..23d388d2f3 100644 --- a/src/app/loans/loans-account-stepper/loans-account-charges-step/loans-account-charges-step.component.html +++ b/src/app/loans/loans-account-stepper/loans-account-charges-step/loans-account-charges-step.component.html @@ -2,9 +2,11 @@ {{ 'labels.inputs.Charge' | translate }} - - {{ charge.name }} - + @for (charge of chargeData; track charge) { + + {{ charge.name }} + + } @@ -55,38 +57,37 @@ {{ 'labels.inputs.Date' | translate }} - - {{ (charge.dueDate | dateFormat) || 'Unassigned' }} - - - {{ (charge.feeOnMonthDay | dateFormat) || 'Unassigned' }} - - - {{ 'labels.inputs.N/A' | translate }} - - + {{ (charge.dueDate | dateFormat) || 'Unassigned' }} + + } + @if (charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee') { + + {{ (charge.feeOnMonthDay | dateFormat) || 'Unassigned' }} + + } + @if ( + !( + charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee' || - charge.chargeTimeType.value === 'Specified due date' - " - (click)="editChargeDate(charge)" - > - - + charge.chargeTimeType.value === 'Specified due date' || + charge.chargeTimeType.value === 'Weekly Fee' + ) + ) { + + {{ 'labels.inputs.N/A' | translate }} + + } + @if ( + charge.chargeTimeType.value === 'Weekly Fee' || + charge.chargeTimeType.value === 'Annual Fee' || + charge.chargeTimeType.value === 'Specified due date' + ) { + + + + } @@ -142,7 +143,9 @@ {{ 'labels.heading.Overdue Charges' | translate }} - - {{ 'labels.buttons.Cancel' | translate }} - + @if (loanId) { + + {{ 'labels.buttons.Cancel' | translate }} + + } diff --git a/src/app/loans/loans-account-stepper/loans-account-charges-step/loans-account-charges-step.component.ts b/src/app/loans/loans-account-stepper/loans-account-charges-step/loans-account-charges-step.component.ts index 1dc89530ea..38fd7c0f27 100644 --- a/src/app/loans/loans-account-stepper/loans-account-charges-step/loans-account-charges-step.component.ts +++ b/src/app/loans/loans-account-stepper/loans-account-charges-step/loans-account-charges-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, OnChanges } from '@angular/core'; +import { Component, OnInit, Input, OnChanges, inject } from '@angular/core'; // import { FormControl } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { @@ -65,6 +65,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoansAccountChargesStepComponent implements OnInit, OnChanges { + dialog = inject(MatDialog); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private settingsService = inject(SettingsService); + // @Input loansAccountProductTemplate: LoansAccountProductTemplate @Input() loansAccountProductTemplate: any; // @Imput loansAccountTemplate: LoansAccountTemplate @@ -122,18 +127,16 @@ export class LoansAccountChargesStepComponent implements OnInit, OnChanges { totalCollateralValue: any = 0; loanId: any = null; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Loans Account Charges Form Step * @param {dialog} MatDialog Mat Dialog * @param {Dates} dateUtils Date Utils * @param {SettingsService} settingsService Settings Service */ - constructor( - public dialog: MatDialog, - private dateUtils: Dates, - private route: ActivatedRoute, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-account-stepper/loans-account-datatable-step/loans-account-datatable-step.component.html b/src/app/loans/loans-account-stepper/loans-account-datatable-step/loans-account-datatable-step.component.html index 56a31c0681..6a2bd6c5f3 100644 --- a/src/app/loans/loans-account-stepper/loans-account-datatable-step/loans-account-datatable-step.component.html +++ b/src/app/loans/loans-account-stepper/loans-account-datatable-step/loans-account-datatable-step.component.html @@ -1,58 +1,49 @@ - - - {{ getInputName(datatableInput) }} - - - - {{ code.value }} - - - - - - - - - - - - - - - - - - {{ getInputName(datatableInput) }} - - + @for (datatableInput of datatableInputs; track datatableInput) { + + @if (!isBoolean(datatableInput.columnDisplayType)) { + + {{ getInputName(datatableInput) }} + @if (isDropdown(datatableInput.columnDisplayType)) { + + @for (code of datatableInput.columnValues; track code) { + + {{ code.value }} + + } + + } + @if (isNumeric(datatableInput.columnDisplayType)) { + + } + @if (isString(datatableInput.columnDisplayType)) { + + } + @if (isText(datatableInput.columnDisplayType)) { + + } + @if (isDate(datatableInput.columnDisplayType)) { + + + + + + } + + } + @if (isBoolean(datatableInput.columnDisplayType)) { + + {{ getInputName(datatableInput) }} + + } + + } diff --git a/src/app/loans/loans-account-stepper/loans-account-datatable-step/loans-account-datatable-step.component.ts b/src/app/loans/loans-account-stepper/loans-account-datatable-step/loans-account-datatable-step.component.ts index c530cfe0df..28286b9331 100644 --- a/src/app/loans/loans-account-stepper/loans-account-datatable-step/loans-account-datatable-step.component.ts +++ b/src/app/loans/loans-account-stepper/loans-account-datatable-step/loans-account-datatable-step.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormControl, @@ -26,6 +26,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoansAccountDatatableStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + /** Input Fields Data */ @Input() datatableData: any; /** Create Input Form */ @@ -33,11 +37,10 @@ export class LoansAccountDatatableStepComponent implements OnInit { datatableInputs: any = []; - constructor( - private formBuilder: UntypedFormBuilder, - private settingsService: SettingsService, - private dateUtils: Dates - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.datatableInputs = this.datatableData.columnHeaderData.filter((column: any) => { diff --git a/src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.html b/src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.html index b1b156769c..2b9fdf9b14 100644 --- a/src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.html +++ b/src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.html @@ -14,9 +14,11 @@ [formControl]="filterFormCtrl" > - - {{ product.name }} - + @for (product of productData | async; track product) { + + {{ product.name }} + + } {{ 'labels.inputs.Product Name' | translate }} {{ 'labels.commons.is' | translate }} @@ -25,97 +27,108 @@ - - - {{ 'labels.inputs.External id' | translate }} - - - - - {{ 'labels.inputs.Loan officer' | translate }} - - - {{ loanOfficer.displayName }} - - - - - - {{ 'labels.inputs.Loan Purpose' | translate }} - - - {{ loanPurpose.name }} - - - - - - {{ 'labels.inputs.Fund' | translate }} - - - {{ fund.name }} - - - - - - {{ 'labels.inputs.Submitted on' | translate }} - - - - - {{ 'labels.inputs.Submitted on' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Disbursement on' | translate }} - - - - - {{ 'labels.inputs.Disbursement on' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - {{ 'labels.heading.Savings Linkage' | translate }} - - - {{ 'labels.inputs.Link savings' | translate }} - - - ({{ savingaccount.accountNo }}) {{ savingaccount.productName }} - - - - - - {{ 'labels.inputs.Create standing instructions at disbursement' | translate }} - - + @if (loanProductSelected) { + + + {{ 'labels.inputs.External id' | translate }} + + + @if (loanProductSelected) { + + {{ 'labels.inputs.Loan officer' | translate }} + + @for (loanOfficer of loanOfficerOptions; track loanOfficer) { + + {{ loanOfficer.displayName }} + + } + + + } + + {{ 'labels.inputs.Loan Purpose' | translate }} + + @for (loanPurpose of loanPurposeOptions; track loanPurpose) { + + {{ loanPurpose.name }} + + } + + + + {{ 'labels.inputs.Fund' | translate }} + + @for (fund of fundOptions; track fund) { + + {{ fund.name }} + + } + + + + {{ 'labels.inputs.Submitted on' | translate }} + + + + @if (loansAccountDetailsForm.controls.submittedOnDate?.hasError('required')) { + + {{ 'labels.inputs.Submitted on' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Disbursement on' | translate }} + + + + @if (loansAccountDetailsForm.controls.submittedOnDate?.hasError('required')) { + + {{ 'labels.inputs.Disbursement on' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.heading.Savings Linkage' | translate }} + + {{ 'labels.inputs.Link savings' | translate }} + + @for (savingaccount of accountLinkingOptions; track savingaccount) { + + ({{ savingaccount.accountNo }}) {{ savingaccount.productName }} + + } + + + + {{ 'labels.inputs.Create standing instructions at disbursement' | translate }} + + + } @@ -134,8 +147,10 @@ {{ 'labels.heading.Savings Linkage' | translate }}< {{ 'labels.buttons.Next' | translate }} - - {{ 'labels.buttons.Cancel' | translate }} - + @if (loanId) { + + {{ 'labels.buttons.Cancel' | translate }} + + } diff --git a/src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.ts b/src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.ts index f632d17be3..697fe0312e 100644 --- a/src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.ts +++ b/src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, Output, EventEmitter, OnDestroy } from '@angular/core'; +import { Component, OnInit, Input, Output, EventEmitter, OnDestroy, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -18,7 +18,7 @@ import { takeUntil } from 'rxjs/operators'; import { ReplaySubject, Subject } from 'rxjs'; import { MatTooltip } from '@angular/material/tooltip'; import { NgxMatSelectSearchModule } from 'ngx-mat-select-search'; -import { NgFor, NgIf, AsyncPipe } from '@angular/common'; +import { AsyncPipe } from '@angular/common'; import { MatDivider } from '@angular/material/divider'; import { MatCheckbox } from '@angular/material/checkbox'; import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper'; @@ -45,6 +45,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoansAccountDetailsStepComponent implements OnInit, OnDestroy { + private formBuilder = inject(UntypedFormBuilder); + private loansService = inject(LoansService); + private route = inject(ActivatedRoute); + private translateService = inject(TranslateService); + private settingsService = inject(SettingsService); + private commons = inject(Commons); + //** Defining PlaceHolders for the search bar */ placeHolderLabel = ''; noEntriesFoundLabel = ''; @@ -83,20 +90,16 @@ export class LoansAccountDetailsStepComponent implements OnInit, OnDestroy { /** Loans Account Template with product data */ @Output() loansAccountProductTemplate = new EventEmitter(); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); /** * Sets loans account details form. * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} loansService Loans Service. * @param {SettingsService} settingsService SettingsService */ - constructor( - private formBuilder: UntypedFormBuilder, - private loansService: LoansService, - private route: ActivatedRoute, - private translateService: TranslateService, - private settingsService: SettingsService, - private commons: Commons - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-account-stepper/loans-account-preview-step/loans-account-preview-step.component.html b/src/app/loans/loans-account-stepper/loans-account-preview-step/loans-account-preview-step.component.html index cbe1a36f47..06fa1f6f75 100644 --- a/src/app/loans/loans-account-stepper/loans-account-preview-step/loans-account-preview-step.component.html +++ b/src/app/loans/loans-account-stepper/loans-account-preview-step/loans-account-preview-step.component.html @@ -13,26 +13,32 @@ {{ 'labels.heading.Details' | translate }} > - - {{ 'labels.inputs.Loan officer' | translate }}: - {{ - loansAccount.loanOfficerId | find: loansAccountProductTemplate.loanOfficerOptions : 'id' : 'displayName' - }} - - - - {{ 'labels.inputs.Loan purpose' | translate }}: - {{ - loansAccount.loanPurposeId | find: loansAccountProductTemplate.loanPurposeOptions : 'id' : 'name' - }} - - - - {{ 'labels.inputs.Fund' | translate }}: - {{ - loansAccount.fundId | find: loansAccountProductTemplate.fundOptions : 'id' : 'name' - }} - + @if (loansAccount.loanOfficerId) { + + {{ 'labels.inputs.Loan officer' | translate }}: + {{ + loansAccount.loanOfficerId | find: loansAccountProductTemplate.loanOfficerOptions : 'id' : 'displayName' + }} + + } + + @if (loansAccount.loanPurposeId) { + + {{ 'labels.inputs.Loan purpose' | translate }}: + {{ + loansAccount.loanPurposeId | find: loansAccountProductTemplate.loanPurposeOptions : 'id' : 'name' + }} + + } + + @if (loansAccount.fundId) { + + {{ 'labels.inputs.Fund' | translate }}: + {{ + loansAccount.fundId | find: loansAccountProductTemplate.fundOptions : 'id' : 'name' + }} + + } {{ 'labels.inputs.Submitted on' | translate }}: @@ -44,14 +50,16 @@ {{ 'labels.heading.Details' | translate }} {{ loansAccount.expectedDisbursementDate | dateFormat }} - - {{ 'labels.inputs.External id' | translate }}: - - - - + @if (loansAccount.externalId) { + + {{ 'labels.inputs.External id' | translate }}: + + + + + } - + @if (activeClientMembers) { {{ 'labels.heading.Client Members' | translate }} @@ -61,19 +69,16 @@ {{ 'labels.heading.Client Members' | trans {{ 'labels.inputs.Client ID' | translate }} {{ element.id }} - {{ 'labels.inputs.Client Name' | translate }} {{ element.displayName }} - {{ 'labels.inputs.Loan Purpose' | translate }} {{ element.purpose }} - {{ 'labels.inputs.Original Loan' | translate }} @@ -81,12 +86,11 @@ {{ 'labels.heading.Client Members' | trans {{ element.principal | currency: loansAccountProductTemplate.currency.code : 'symbol-narrow' : '1.2-2' }} - - + } {{ 'labels.heading.Terms' | translate }} @@ -134,39 +138,51 @@ {{ 'labels.heading.Terms' | translate }} > - - {{ 'labels.inputs.Enable Down Payments' | translate }}: - {{ loansAccount.enableDownPayment | yesNo }} - - - - {{ 'labels.inputs.First repayment on' | translate }}: - {{ loansAccount.repaymentsStartingFromDate | dateFormat }} - + @if (productEnableDownPayment) { + + {{ 'labels.inputs.Enable Down Payments' | translate }}: + {{ loansAccount.enableDownPayment | yesNo }} + + } - - {{ 'labels.inputs.Interest charged from' | translate }}: - {{ loansAccount.interestChargedFromDate | dateFormat }} - + @if (loansAccount.repaymentsStartingFromDate) { + + {{ 'labels.inputs.First repayment on' | translate }}: + {{ loansAccount.repaymentsStartingFromDate | dateFormat }} + + } - - {{ 'labels.inputs.Nominal interest rate' | translate }}: - {{ loansAccount.interestRatePerPeriod }} {{ - loansAccountProductTemplate.interestRateFrequencyType.value - }} - + @if (loansAccount.interestChargedFromDate) { + + {{ 'labels.inputs.Interest charged from' | translate }}: + {{ loansAccount.interestChargedFromDate | dateFormat }} + + } + + @if (loansAccount.interestRatePerPeriod) { + + {{ 'labels.inputs.Nominal interest rate' | translate }}: + {{ loansAccount.interestRatePerPeriod }} {{ + loansAccountProductTemplate.interestRateFrequencyType.value + }} + + } - - {{ 'labels.inputs.Interest method' | translate }}: - {{ loansAccount.interestType }} - + @if (loansAccount.interestType) { + + {{ 'labels.inputs.Interest method' | translate }}: + {{ loansAccount.interestType }} + + } - - {{ 'labels.inputs.Is Equal Amortization' | translate }}: - {{ loansAccount.isEqualAmortization }} - + @if (loansAccount.isEqualAmortization) { + + {{ 'labels.inputs.Is Equal Amortization' | translate }}: + {{ loansAccount.isEqualAmortization }} + + } {{ 'labels.inputs.Amortization' | translate }} @@ -183,20 +199,28 @@ {{ 'labels.heading.Terms' | translate }} }} - - {{ 'labels.inputs.Calculate interest for exact days in partial period' | translate }}: - {{ loansAccount.allowPartialPeriodInterestCalculation }} - + @if (loansAccount.allowPartialPeriodInterestCalculation) { + + {{ 'labels.inputs.Calculate interest for exact days in partial period' | translate }}: + {{ loansAccount.allowPartialPeriodInterestCalculation }} + + } - - {{ 'labels.inputs.Arrears tolerance' | translate }}: - {{ loansAccount.inArrearsTolerance }} - + @if (loansAccount.inArrearsTolerance) { + + {{ 'labels.inputs.Arrears tolerance' | translate }}: + {{ loansAccount.inArrearsTolerance }} + + } - - {{ 'labels.inputs.Interest free period' | translate }}: - {{ loansAccount.graceOnInterestCharged }} - + @if (loansAccount.graceOnInterestCharged) { + + {{ 'labels.inputs.Interest free period' | translate }}: + {{ loansAccount.graceOnInterestCharged }} + + } {{ 'labels.inputs.Repayment strategy' | translate }}: @@ -219,138 +243,139 @@ {{ 'labels.heading.Terms' | translate }} {{ 'labels.heading.Moratorium' | translate }} - - {{ 'labels.inputs.On principal payment' | translate }}: - {{ loansAccount.graceOnPrincipalPayment }} - + @if (loansAccount.graceOnPrincipalPayment) { + + {{ 'labels.inputs.On principal payment' | translate }}: + {{ loansAccount.graceOnPrincipalPayment }} + + } - - {{ 'labels.inputs.On interest payment' | translate }}: - {{ loansAccount.graceOnInterestPayment }} - + @if (loansAccount.graceOnInterestPayment) { + + {{ 'labels.inputs.On interest payment' | translate }}: + {{ loansAccount.graceOnInterestPayment }} + + } - - {{ 'labels.inputs.On Arrears Aging' | translate }}: - {{ loansAccount.graceOnArrearsAgeing }} - + @if (loansAccount.graceOnArrearsAgeing) { + + {{ 'labels.inputs.On Arrears Aging' | translate }}: + {{ loansAccount.graceOnArrearsAgeing }} + + } {{ 'labels.inputs.Enable installment level Delinquency' | translate }} {{ loansAccount.enableInstallmentLevelDelinquency | yesNo }} - - {{ 'labels.inputs.Is Topup Loan' | translate }}? - {{ loansAccount.isTopup }} - + @if (loansAccount.isTopup) { + + {{ 'labels.inputs.Is Topup Loan' | translate }}? + {{ loansAccount.isTopup }} + + } {{ 'labels.inputs.Recalculate Interest' | translate }}: {{ loansAccountProductTemplate?.isInterestRecalculationEnabled | yesNo }} - - {{ 'labels.inputs.Days in month' | translate }}: - {{ loansAccountProductTemplate?.daysInMonthType.value }} - - - - {{ 'labels.heading.Charges' | translate }} + @if (loansAccountProductTemplate?.daysInMonthType) { + + {{ 'labels.inputs.Days in month' | translate }}: + {{ loansAccountProductTemplate?.daysInMonthType.value }} + + } - - - - {{ 'labels.inputs.name' | translate }} - - {{ charge.name + ', ' + charge.currency.displaySymbol }} - - - - - {{ 'labels.inputs.Type' | translate }} - - {{ charge.chargeCalculationType.value }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ charge.amount }} - - - - - {{ 'labels.inputs.Collected On' | translate }} - - {{ charge.chargeTimeType.value }} - - - - - {{ 'labels.inputs.Date' | translate }} - - - {{ (charge.dueDate | dateFormat) || 'Unassigned' }} - - - {{ (charge.feeOnMonthDay | dateFormat) || 'Unassigned' }} - - + {{ 'labels.heading.Charges' | translate }} + + + + {{ 'labels.inputs.name' | translate }} + + {{ charge.name + ', ' + charge.currency.displaySymbol }} + + + + {{ 'labels.inputs.Type' | translate }} + + {{ charge.chargeCalculationType.value }} + + + + {{ 'labels.inputs.Amount' | translate }} + + {{ charge.amount }} + + + + {{ 'labels.inputs.Collected On' | translate }} + + {{ charge.chargeTimeType.value }} + + + + {{ 'labels.inputs.Date' | translate }} + + @if (charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee') { + + {{ (charge.dueDate | dateFormat) || 'Unassigned' }} + + } + @if (charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee') { + + {{ (charge.feeOnMonthDay | dateFormat) || 'Unassigned' }} + + } + @if ( !( charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee' || charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee' ) - " - > - {{ 'labels.inputs.N/A' | translate }} - - - - - - - - + ) { + + {{ 'labels.inputs.N/A' | translate }} + + } + + + + + + + } - - {{ 'labels.heading.Overdue Charges' | translate }} - - - - - - {{ 'labels.inputs.name' | translate }} - {{ charge.name }},{{ charge.currency.displaySymbol }} - - - - {{ 'labels.inputs.Type' | translate }} - {{ charge.chargeCalculationType.value }} - - - - {{ 'labels.inputs.Amount' | translate }} - {{ charge.amount | formatNumber }} - - - - {{ 'labels.inputs.Collected On' | translate }} - {{ charge.chargeTimeType.value }} - - - - - - + @if (loansAccountProductTemplate.overdueCharges.length) { + + {{ 'labels.heading.Overdue Charges' | translate }} + + + + {{ 'labels.inputs.name' | translate }} + {{ charge.name }},{{ charge.currency.displaySymbol }} + + + {{ 'labels.inputs.Type' | translate }} + {{ charge.chargeCalculationType.value }} + + + {{ 'labels.inputs.Amount' | translate }} + {{ charge.amount | formatNumber }} + + + {{ 'labels.inputs.Collected On' | translate }} + {{ charge.chargeTimeType.value }} + + + + + + } diff --git a/src/app/loans/loans-account-stepper/loans-account-preview-step/loans-account-preview-step.component.ts b/src/app/loans/loans-account-stepper/loans-account-preview-step/loans-account-preview-step.component.ts index df45d78e9b..7f145674ab 100644 --- a/src/app/loans/loans-account-stepper/loans-account-preview-step/loans-account-preview-step.component.ts +++ b/src/app/loans/loans-account-stepper/loans-account-preview-step/loans-account-preview-step.component.ts @@ -14,7 +14,7 @@ import { MatRow } from '@angular/material/table'; import { LongTextComponent } from '../../../shared/long-text/long-text.component'; -import { NgIf, CurrencyPipe } from '@angular/common'; +import { CurrencyPipe } from '@angular/common'; import { ExternalIdentifierComponent } from '../../../shared/external-identifier/external-identifier.component'; import { MatDivider } from '@angular/material/divider'; import { MatStepperPrevious } from '@angular/material/stepper'; diff --git a/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.html b/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.html index 7f5c1d7503..8eaf5b48a5 100644 --- a/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.html +++ b/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.html @@ -20,7 +20,9 @@ {{ 'labels.buttons.Next' | translate }} - - {{ 'labels.buttons.Cancel' | translate }} - + @if (loanId) { + + {{ 'labels.buttons.Cancel' | translate }} + + } diff --git a/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.ts b/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.ts index 865dadf913..5809dcaa22 100644 --- a/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.ts +++ b/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.ts @@ -1,4 +1,4 @@ -import { Component, Input } from '@angular/core'; +import { Component, Input, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { LoansService } from 'app/loans/loans.service'; import { SettingsService } from 'app/settings/settings.service'; @@ -20,6 +20,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoansAccountScheduleStepComponent { + private loansService = inject(LoansService); + private settingsService = inject(SettingsService); + private route = inject(ActivatedRoute); + /** Currency Code */ @Input() currencyCode: string; /** Loans Account Template */ @@ -33,11 +37,10 @@ export class LoansAccountScheduleStepComponent { loanId: any = null; - constructor( - private loansService: LoansService, - private settingsService: SettingsService, - private route: ActivatedRoute - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.html b/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.html index 82b3c03e95..673c424c53 100644 --- a/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.html +++ b/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.html @@ -1,14 +1,15 @@ - - + @if (currency) { + + + } {{ 'labels.heading.Term Options' | translate }} @@ -18,32 +19,42 @@ {{ 'labels.inputs.Loan Term' | translate }} - - {{ 'labels.inputs.Loan Term' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (loansAccountTermsForm.controls.loanTermFrequency.hasError('required')) { + + {{ 'labels.inputs.Loan Term' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Frequency' | translate }} - - {{ type.value | translateKey: 'catalogs' }} - + @for (type of termFrequencyTypeData; track type) { + + {{ type.value | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Frequency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (loansAccountTermsForm.controls.loanTermFrequencyType.hasError('required')) { + + {{ 'labels.inputs.Frequency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Fixed Length' | translate }} - - - {{ - loansAccountTermsForm.value.loanTermFrequencyType | find: termFrequencyTypeData : 'id' : 'value' - }} + @if (hasFixedLength()) { + + {{ 'labels.inputs.Fixed Length' | translate }} + + + } + @if (hasFixedLength()) { + {{ + loansAccountTermsForm.value.loanTermFrequencyType | find: termFrequencyTypeData : 'id' : 'value' + }} + } {{ 'labels.inputs.Repayments' | translate }} @@ -55,16 +66,20 @@ {{ 'labels.inputs.Repayments' | translate }} formControlName="numberOfRepayments" matTooltip="{{ 'tooltips.Enter the total count of repayments' | translate }}" /> - - {{ 'labels.inputs.Number of repayments' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (loansAccountTermsForm.controls.numberOfRepayments.hasError('required')) { + + {{ 'labels.inputs.Number of repayments' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Installment Amount' | translate }} - - + @if (loansAccountTermsData?.canDefineInstallmentAmount) { + + {{ 'labels.inputs.Installment Amount' | translate }} + + + } {{ 'labels.inputs.First repayment on' | translate }} @@ -111,88 +126,96 @@ formControlName="repaymentEvery" matTooltip="{{ 'tooltips.Fields are input to calculating the repayment schedule' | translate }}" /> - - {{ 'labels.inputs.Repaid every' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (loansAccountTermsForm.controls.repaymentEvery.hasError('required')) { + + {{ 'labels.inputs.Repaid every' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Frequency' | translate }} - - {{ repaymentFrequencyType.value | translateKey: 'catalogs' }} - - - - - - {{ 'labels.inputs.Select On' | translate }} - - - {{ repaymentFrequencyNthDayType.value | translateKey: 'catalogs' }} - + @for (repaymentFrequencyType of termFrequencyTypeData; track repaymentFrequencyType) { + + {{ repaymentFrequencyType.value | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Select Day' | translate }} - - - {{ repaymentFrequencyDayOfWeekType.value | translateKey: 'catalogs' }} - - - + @if (loansAccountTermsForm.controls.repaymentFrequencyType.value === 2) { + + {{ 'labels.inputs.Select On' | translate }} + + @for (repaymentFrequencyNthDayType of repaymentFrequencyNthDayTypeData; track repaymentFrequencyNthDayType) { + + {{ repaymentFrequencyNthDayType.value | translateKey: 'catalogs' }} + + } + + + } + + @if (loansAccountTermsForm.controls.repaymentFrequencyType.value === 2) { + + {{ 'labels.inputs.Select Day' | translate }} + + @for ( + repaymentFrequencyDayOfWeekType of repaymentFrequencyDaysOfWeekTypeData; + track repaymentFrequencyDayOfWeekType + ) { + + {{ repaymentFrequencyDayOfWeekType.value | translateKey: 'catalogs' }} + + } + + + } - - {{ 'labels.inputs.Enable Down Payment' | translate }} - + @if (productEnableDownPayment) { + + {{ 'labels.inputs.Enable Down Payment' | translate }} + + } {{ 'labels.inputs.Nominal interest rate' | translate }} - + @if (!loansAccountTermsData?.isLoanProductLinkedToFloatingRate) { {{ 'labels.inputs.Nominal interest rate' | translate }} % - {{ 'labels.inputs.Frequency' | translate }} - - {{ interestRateFrequencyType.value | translateKey: 'catalogs' }} - + @for (interestRateFrequencyType of interestRateFrequencyTypeData; track interestRateFrequencyType) { + + {{ interestRateFrequencyType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Nominal interest rate frequency' | translate }} {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} - {{ 'labels.inputs.Interest method' | translate }} - - {{ interestType.value | translateKey: 'catalogs' }} - + @for (interestType of interestTypeData; track interestType) { + + {{ interestType.value | translateKey: 'catalogs' }} + + } - {{ 'labels.inputs.Amortization' | translate }} {{ 'labels.inputs.Nominal interest rate' | translate matTooltip="{{ 'tooltips.The Amortization value' | translate }}" formControlName="amortizationType" > - - {{ amortizationType.value | translateKey: 'catalogs' }} - + @for (amortizationType of amortizationTypeData; track amortizationType) { + + {{ amortizationType.value | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Amortization Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Principal Percentage Per Installment' | translate }} - + @if (loansAccountTermsForm.controls.amortizationType.hasError('required')) { + + {{ 'labels.inputs.Amortization Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - + @if (isEqualPrincipalPayments()) { + + {{ 'labels.inputs.Principal Percentage Per Installment' | translate }} + + + } {{ 'labels.inputs.Nominal interest rate' | translate > {{ 'labels.inputs.Is Equal Amortization' | translate }} - + } - + @if (loansAccountTermsData?.isLoanProductLinkedToFloatingRate) { {{ 'labels.inputs.Interest Method' | translate }} - - {{ interestType.value | translateKey: 'catalogs' }} - + @for (interestType of interestTypeData; track interestType) { + + {{ interestType.value | translateKey: 'catalogs' }} + + } - {{ 'labels.inputs.Amortization' | translate }} {{ 'labels.inputs.Nominal interest rate' | translate matTooltip="{{ 'tooltips.The Amortization value' | translate }}" formControlName="amortizationType" > - - {{ amortizationType.value | translateKey: 'catalogs' }} - + @for (amortizationType of amortizationTypeData; track amortizationType) { + + {{ amortizationType.value | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Amortization Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (loansAccountTermsForm.controls.amortizationType.hasError('required')) { + + {{ 'labels.inputs.Amortization Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - {{ 'labels.inputs.Is Floating Rate' | translate }}? - + } {{ 'labels.inputs.Loan Schedule' | translate }} - - - {{ 'labels.inputs.Loan Schedule Type' | translate }} - {{ loanScheduleType.value | translateKey: 'catalogs' }} + @if (loanScheduleType) { + + + {{ 'labels.inputs.Loan Schedule Type' | translate }} + {{ loanScheduleType.value | translateKey: 'catalogs' }} + - + } {{ 'labels.inputs.Repayment Strategy' | translate }} @@ -278,17 +311,21 @@ {{ 'labels.inputs.Loan Schedule' | translate }} matTooltip="{{ 'tooltips.The repayment strategy' | translate }}" [disabled]="repaymentStrategyDisabled" > - - {{ transactionProcessingStrategy.name | translateKey: 'catalogs' }} - + @for ( + transactionProcessingStrategy of transactionProcessingStrategyOptions; + track transactionProcessingStrategy + ) { + + {{ transactionProcessingStrategy.name | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Repayment Strategy' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (loansAccountTermsForm.controls.transactionProcessingStrategyCode.hasError('required')) { + + {{ 'labels.inputs.Repayment Strategy' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.heading.Interest Calculations' | translate }} @@ -299,12 +336,11 @@ {{ 'labels.heading.Interest Calculations' | translate formControlName="interestCalculationPeriodType" matTooltip="{{ 'tooltips.Daily - Will Calculate the interest' | translate }}" > - - {{ interestCalculationPeriodType.value | translateKey: 'catalogs' }} - + @for (interestCalculationPeriodType of interestCalculationPeriodTypeData; track interestCalculationPeriodType) { + + {{ interestCalculationPeriodType.value | translateKey: 'catalogs' }} + + } @@ -316,11 +352,13 @@ {{ 'labels.heading.Interest Calculations' | translate {{ 'labels.inputs.Calculate interest for exact days in partial period' | translate }} - - - {{ 'labels.inputs.Is interest recognition on disbursement date?' | translate }} - - + @if (isProgressive) { + + + {{ 'labels.inputs.Is interest recognition on disbursement date?' | translate }} + + + } {{ 'labels.inputs.Arrears tolerance' | translate }} @@ -361,35 +399,44 @@ - - - {{ 'labels.inputs.Delinquency Bucket' | translate }} - {{ loanProduct?.delinquencyBucket.name }} - - - - - - {{ 'labels.inputs.Enable installment level Delinquency' | translate }} - - + @if (isDelinquencyEnabled()) { + + + {{ 'labels.inputs.Delinquency Bucket' | translate }} + {{ loanProduct?.delinquencyBucket.name }} + + + } - - - {{ 'labels.inputs.Is Topup Loan' | translate }}? - + @if (isDelinquencyEnabled()) { + + + {{ 'labels.inputs.Enable installment level Delinquency' | translate }} + + + } - - {{ 'labels.inputs.Loan closed with Topup' | translate }} - - - {{ clientActiveLoan.accountNo }} - - - - + @if (loansAccountTermsData?.isTopup) { + + + {{ 'labels.inputs.Is Topup Loan' | translate }}? + + @if (loansAccountTermsForm.controls.isTopup.value) { + + {{ 'labels.inputs.Loan closed with Topup' | translate }} + + @for (clientActiveLoan of clientActiveLoanData; track clientActiveLoan) { + + {{ clientActiveLoan.accountNo }} + + } + + + } + + } @@ -400,20 +447,26 @@ {{ loansAccountTermsData?.isInterestRecalculationEnabled | yesNo }} - - {{ 'labels.inputs.Days in year' | translate }} - {{ loansAccountTermsData.daysInYearType.value | translateKey: 'catalogs' }} - - - {{ 'labels.inputs.Days in month' | translate }} - {{ loansAccountTermsData.daysInMonthType.value | translateKey: 'catalogs' }} - - - {{ 'labels.inputs.Advance payments adjustment type' | translate }} - {{ loansAccountTermsData.interestRecalculationData.rescheduleStrategyType.value }} - + @if (loansAccountTermsData?.isInterestRecalculationEnabled) { + + {{ 'labels.inputs.Days in year' | translate }} + {{ loansAccountTermsData.daysInYearType.value | translateKey: 'catalogs' }} + + } + @if (loansAccountTermsData?.isInterestRecalculationEnabled) { + + {{ 'labels.inputs.Days in month' | translate }} + {{ loansAccountTermsData.daysInMonthType.value | translateKey: 'catalogs' }} + + } + @if (loansAccountTermsData?.isInterestRecalculationEnabled) { + + {{ 'labels.inputs.Advance payments adjustment type' | translate }} + {{ loansAccountTermsData.interestRecalculationData.rescheduleStrategyType.value }} + + } - + @if (loansAccountTermsData?.isInterestRecalculationEnabled) { {{ 'labels.inputs.Interest recalculation compounding on' | translate }} {{ @@ -421,52 +474,50 @@ | translateKey: 'catalogs' }} - {{ 'labels.inputs.Frequency Interval for recalculation' | translate }} {{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.value }} - - on {{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday.value }} - on day {{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay }} - on - {{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyNthDay.value }} - {{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday.value }} + @if ( + loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id === 3 && + loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday + ) { + + on {{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday.value }} + } + @if ( + loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id === 4 && + loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay + ) { + on day {{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay }} + } + @if ( + loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id === 4 && + !loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay && + loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyNthDay + ) { + on + {{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyNthDay.value }} + {{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday.value }} + } - - - - {{ 'labels.inputs.Frequency Interval for recalculation' | translate }} - {{ - loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyInterval - }} - + } + + @if ( + loansAccountTermsData?.isInterestRecalculationEnabled && + loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id !== 1 + ) { + + {{ 'labels.inputs.Frequency Interval for recalculation' | translate }} + {{ + loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyInterval + }} + + } {{ enableBuyDownFee | yesNo }} - + @if (multiDisburseLoan) { - - {{ 'labels.heading.Loan Tranche Details' | translate }} - + @if (allowAddDisbursementDetails()) { + + {{ 'labels.heading.Loan Tranche Details' | translate }} + + } {{ 'labels.inputs.Maximum allowed outstanding balance' | translate }} - - {{ 'labels.inputs.Maximum allowed outstanding balance' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (loansAccountTermsForm.controls.maxOutstandingLoanBalance.hasError('required')) { + + {{ 'labels.inputs.Maximum allowed outstanding balance' | translate }} + {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.heading.Loan Tranche Details' | translate - - - {{ 'labels.heading.Loan Tranche Details are not allowed for this Loan Product' | translate }} - - - + @if (!allowAddDisbursementDetails()) { + + + {{ 'labels.heading.Loan Tranche Details are not allowed for this Loan Product' | translate }} + + + } {{ 'labels.inputs.Expected Disbursement Date' | translate }} @@ -522,14 +579,12 @@ {{ row.expectedDisbursementDate | dateFormat }} - {{ 'labels.inputs.Principal' | translate }} {{ row.principal }} - {{ 'labels.inputs.Actions' | translate }} @@ -545,65 +600,63 @@ - - + } - + @if ( + loansAccountTermsData?.isInterestRecalculationEnabled && + loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.id !== 0 + ) { {{ 'labels.inputs.Frequency for compounding' | translate }} {{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.value }} - - on {{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value }} - - on day - {{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay }} - - on - {{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyNthDay.value }} - {{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value }} - + @if ( + loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id === 3 && + loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday + ) { + + on {{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value }} + + } + @if ( + loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id === 4 && + loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay + ) { + on day + {{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay }} + + } + @if ( + loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id === 4 && + !loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay && + loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyNthDay + ) { + on + {{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyNthDay.value }} + {{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value }} + + } - - - - {{ 'labels.inputs.Frequency Interval for compounding' | translate }} - {{ - loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyInterval - }} - + } + + @if ( + loansAccountTermsData?.isInterestRecalculationEnabled && + loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.id !== 0 && + loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id !== 1 + ) { + + {{ 'labels.inputs.Frequency Interval for compounding' | translate }} + {{ + loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyInterval + }} + + } @@ -664,8 +717,10 @@ {{ 'labels.heading.Collaterals Data' | translate }} {{ 'labels.buttons.Next' | translate }} - - {{ 'labels.buttons.Cancel' | translate }} - + @if (loanId) { + + {{ 'labels.buttons.Cancel' | translate }} + + } diff --git a/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts b/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts index fd294e31ad..2230386ed4 100644 --- a/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts +++ b/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, OnChanges } from '@angular/core'; +import { Component, OnInit, Input, OnChanges, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormControl } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute } from '@angular/router'; @@ -77,6 +77,11 @@ interface DisbursementData { ] }) export class LoansAccountTermsStepComponent implements OnInit, OnChanges { + private formBuilder = inject(UntypedFormBuilder); + private settingsService = inject(SettingsService); + private route = inject(ActivatedRoute); + dialog = inject(MatDialog); + /** Loans Product Options */ @Input() loansProductOptions: any; /** Loans Account Product Template */ @@ -157,17 +162,15 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges { enableBuyDownFee = false; isProgressive = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Create Loans Account Terms Form * @param formBuilder FormBuilder * @param {SettingsService} settingsService SettingsService */ - constructor( - private formBuilder: UntypedFormBuilder, - private settingsService: SettingsService, - private route: ActivatedRoute, - public dialog: MatDialog - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; this.createloansAccountTermsForm(); } @@ -348,28 +351,31 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges { interestRecognitionOnDisbursementDate: this.loansAccountTermsData.interestRecognitionOnDisbursementDate || false }); } - this.createloansAccountTermsForm(); + + // This is already done in the constructor + // this.createloansAccountTermsForm(); this.setAdvancedPaymentStrategyControls(); // this.setCustomValidators(); this.setLoanTermListener(); - this.loansAccountTermsForm.removeControl('maxOutstandingLoanBalance'); - if (this.allowAddDisbursementDetails()) { - this.loansAccountTermsForm.removeControl('maxOutstandingLoanBalance'); - this.loansAccountTermsForm.addControl( - 'maxOutstandingLoanBalance', - new UntypedFormControl(this.loansAccountTermsData.maxOutstandingLoanBalance, Validators.required) - ); - } else { - this.loansAccountTermsForm.addControl( - 'maxOutstandingLoanBalance', - new UntypedFormControl(this.loansAccountTermsData.maxOutstandingLoanBalance) - ); - } + // This is already done in ngOnChanges + // this.loansAccountTermsForm.removeControl('maxOutstandingLoanBalance'); + // if (this.allowAddDisbursementDetails()) { + // this.loansAccountTermsForm.removeControl('maxOutstandingLoanBalance'); + // this.loansAccountTermsForm.addControl( + // 'maxOutstandingLoanBalance', + // new UntypedFormControl(this.loansAccountTermsData.maxOutstandingLoanBalance, Validators.required) + // ); + // } else { + // this.loansAccountTermsForm.addControl( + // 'maxOutstandingLoanBalance', + // new UntypedFormControl(this.loansAccountTermsData.maxOutstandingLoanBalance) + // ); + // } } allowAddDisbursementDetails() { - return this.multiDisburseLoan && !this.loansAccountTermsData.disallowExpectedDisbursements; + return this.multiDisburseLoan && !this.loansAccountTermsData?.disallowExpectedDisbursements; } formatDateToDDMMYYYY(date: Date): string { diff --git a/src/app/loans/loans-account-stepper/loans-active-client-members/loans-active-client-members.component.html b/src/app/loans/loans-account-stepper/loans-active-client-members/loans-active-client-members.component.html index 5756e75de1..f475fdf9a6 100644 --- a/src/app/loans/loans-account-stepper/loans-active-client-members/loans-active-client-members.component.html +++ b/src/app/loans/loans-account-stepper/loans-active-client-members/loans-active-client-members.component.html @@ -1,56 +1,55 @@ - - - - - - - - - - - - - - - {{ 'labels.inputs.Client ID' | translate }} - {{ element.id }} - - - - - {{ 'labels.inputs.Client Name' | translate }} - {{ element.displayName }} - - - - - {{ 'labels.inputs.Loan Purpose' | translate }} - - - {{ 'labels.inputs.Select Purpose' | translate }} - - - {{ purpose.name }} - - - - - - - - - {{ 'labels.inputs.Original Loan' | translate }} - - - - - - - - - - - +@if (activeClientMembers) { + + + + + + + + + + + + + + {{ 'labels.inputs.Client ID' | translate }} + {{ element.id }} + + + + {{ 'labels.inputs.Client Name' | translate }} + {{ element.displayName }} + + + + {{ 'labels.inputs.Loan Purpose' | translate }} + + + {{ 'labels.inputs.Select Purpose' | translate }} + + @for (purpose of loanPurposeOptions; track purpose) { + + {{ purpose.name }} + + } + + + + + + + {{ 'labels.inputs.Original Loan' | translate }} + + + + + + + + + + +} @@ -61,7 +60,9 @@ {{ 'labels.buttons.Next' | translate }} - - {{ 'labels.buttons.Cancel' | translate }} - + @if (loanId) { + + {{ 'labels.buttons.Cancel' | translate }} + + } diff --git a/src/app/loans/loans-account-stepper/loans-active-client-members/loans-active-client-members.component.ts b/src/app/loans/loans-account-stepper/loans-active-client-members/loans-active-client-members.component.ts index a187384321..46108df55b 100644 --- a/src/app/loans/loans-account-stepper/loans-active-client-members/loans-active-client-members.component.ts +++ b/src/app/loans/loans-account-stepper/loans-active-client-members/loans-active-client-members.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { MatTableDataSource, MatTable, @@ -43,11 +43,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoansActiveClientMembersComponent implements OnInit { + private route = inject(ActivatedRoute); + loanId: any = null; @Input() activeClientMembers?: any; @Input() loansAccountFormValid: boolean; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.loanId = this.route.snapshot.params['loanId']; } dataSource: any; diff --git a/src/app/loans/loans-view/account-details/account-details.component.html b/src/app/loans/loans-view/account-details/account-details.component.html index e52d8f8add..c347ff35b4 100644 --- a/src/app/loans/loans-view/account-details/account-details.component.html +++ b/src/app/loans/loans-view/account-details/account-details.component.html @@ -13,41 +13,46 @@ {{ 'labels.heading.Loan Details' | translate }} >{{ loanDetails.numberOfRepayments }} every {{ loanDetails.repaymentEvery }} {{ loanDetails.repaymentFrequencyType.value | translateKey: 'catalogs' }} - - - {{ 'labels.commons.on' | translate }}{{ loanDetails.repaymentFrequencyNthDayType?.value }} - {{ - loanDetails.repaymentFrequencyDayOfWeekType?.value | translateKey: 'catalogs' - }} + @if ( + loanDetails.repaymentFrequencyType?.id === 2 && + loanDetails.repaymentFrequencyNthDayType?.id !== 0 && + loanDetails.repaymentFrequencyDayOfWeekType?.id !== 0 + ) { + + @if (loanDetails.repaymentFrequencyDayOfWeekType) { + + {{ 'labels.commons.on' | translate }}{{ loanDetails.repaymentFrequencyNthDayType?.value }} + {{ + loanDetails.repaymentFrequencyDayOfWeekType?.value | translateKey: 'catalogs' + }} + + } - + } - - {{ 'labels.inputs.Fixed Length' | translate }} - - {{ loanDetails.fixedLength }} {{ loanDetails.repaymentFrequencyType.value | translateKey: 'catalogs' }} - + @if (loanDetails.fixedLength) { + + {{ 'labels.inputs.Fixed Length' | translate }} + + {{ loanDetails.fixedLength }} {{ loanDetails.repaymentFrequencyType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Amortization' | translate }} {{ loanDetails.amortizationType.value | translateKey: 'catalogs' }} - - {{ 'labels.inputs.Principal Percentage Per Installment' | translate }} - {{ loanDetails.fixedPrincipalPercentagePerInstallment | formatNumber }} % - + @if (loanDetails.fixedPrincipalPercentagePerInstallment) { + + {{ 'labels.inputs.Principal Percentage Per Installment' | translate }} + {{ loanDetails.fixedPrincipalPercentagePerInstallment | formatNumber }} % + + } {{ 'labels.inputs.Equal Amortization' | translate }} @@ -84,49 +89,63 @@ {{ 'labels.heading.Loan Details' | translate }} {{ loanDetails.enableIncomeCapitalization | yesNo }} - - {{ 'labels.inputs.Income capitalization calculation type' | translate }} - - {{ loanDetails.capitalizedIncomeCalculationType?.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Income capitalization strategy' | translate }} - {{ loanDetails.capitalizedIncomeStrategy?.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Income capitalization type' | translate }} - {{ loanDetails.capitalizedIncomeType?.value | translateKey: 'catalogs' }} - + @if (loanDetails.enableIncomeCapitalization) { + + {{ 'labels.inputs.Income capitalization calculation type' | translate }} + + {{ loanDetails.capitalizedIncomeCalculationType?.value | translateKey: 'catalogs' }} + + + } + + @if (loanDetails.enableIncomeCapitalization) { + + {{ 'labels.inputs.Income capitalization strategy' | translate }} + {{ loanDetails.capitalizedIncomeStrategy?.value | translateKey: 'catalogs' }} + + } + + @if (loanDetails.enableIncomeCapitalization) { + + {{ 'labels.inputs.Income capitalization type' | translate }} + {{ loanDetails.capitalizedIncomeType?.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Enable Buy down fee' | translate }} {{ loanDetails.enableBuyDownFee | yesNo }} - - {{ 'labels.inputs.Buy down fee calculation type' | translate }} - - {{ loanDetails.buyDownFeeCalculationType?.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Buy down fee strategy' | translate }} - {{ loanDetails.buyDownFeeStrategy?.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Buy down fee income type' | translate }} - {{ loanDetails.buyDownFeeIncomeType?.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Merchant Buy down fee' | translate }} - {{ loanDetails.merchantBuyDownFee | yesNo }} - + @if (loanDetails.enableBuyDownFee) { + + {{ 'labels.inputs.Buy down fee calculation type' | translate }} + + {{ loanDetails.buyDownFeeCalculationType?.value | translateKey: 'catalogs' }} + + + } + + @if (loanDetails.enableBuyDownFee) { + + {{ 'labels.inputs.Buy down fee strategy' | translate }} + {{ loanDetails.buyDownFeeStrategy?.value | translateKey: 'catalogs' }} + + } + + @if (loanDetails.enableBuyDownFee) { + + {{ 'labels.inputs.Buy down fee income type' | translate }} + {{ loanDetails.buyDownFeeIncomeType?.value | translateKey: 'catalogs' }} + + } + + @if (loanDetails.enableBuyDownFee) { + + {{ 'labels.inputs.Merchant Buy down fee' | translate }} + {{ loanDetails.merchantBuyDownFee | yesNo }} + + } {{ 'labels.inputs.Grace: On Principal Payment' | translate }} @@ -150,8 +169,12 @@ {{ 'labels.heading.Loan Details' | translate }} {{ 'labels.inputs.Fund Source' | translate }} - {{ loanDetails.fundName }} - {{ 'labels.inputs.Unassigned' | translate }} + @if (loanDetails.fundName) { + {{ loanDetails.fundName }} + } + @if (!loanDetails.fundName) { + {{ 'labels.inputs.Unassigned' | translate }} + } @@ -196,27 +219,35 @@ {{ 'labels.heading.Loan Details' | translate }} {{ loanDetails.timeline.expectedMaturityDate | dateFormat }} - - {{ 'labels.inputs.Fixed EMI amount' | translate }} - {{ loanDetails.fixedEmiAmount | formatNumber }} - - - - {{ 'labels.inputs.Is Topup Loan' | translate }}? - {{ loanDetails.isTopup | yesNo }} - - - - {{ 'labels.inputs.Loan closed with Topup' | translate }} - - {{ loanDetails.closureLoanAccountNo }} - - + @if (loanDetails.canDefineInstallmentAmount) { + + {{ 'labels.inputs.Fixed EMI amount' | translate }} + {{ loanDetails.fixedEmiAmount | formatNumber }} + + } + + @if (loanDetails.isTopup) { + + {{ 'labels.inputs.Is Topup Loan' | translate }}? + {{ loanDetails.isTopup | yesNo }} + + } + + @if (loanDetails.isTopup) { + + {{ 'labels.inputs.Loan closed with Topup' | translate }} + + {{ loanDetails.closureLoanAccountNo }} + + + } - - {{ 'labels.inputs.Topup closure amount' | translate }} - {{ loanDetails.topupAmount | formatNumber }} - + @if (loanDetails.isTopup) { + + {{ 'labels.inputs.Topup closure amount' | translate }} + {{ loanDetails.topupAmount | formatNumber }} + + } {{ 'labels.inputs.Recalculate Interest based on new terms' | translate }} @@ -233,64 +264,72 @@ {{ 'labels.heading.Loan Details' | translate }} {{ loanDetails.daysInMonthType.value | translateKey: 'catalogs' }} - - {{ 'labels.inputs.Interest recalculation compounding on' | translate }} - - {{ - loanDetails.interestRecalculationData.interestRecalculationCompoundingType.value | translateKey: 'catalogs' - }} - - - - - {{ 'labels.inputs.Advance payments adjustment type' | translate }} - - {{ loanDetails.interestRecalculationData.rescheduleStrategyType.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Frequency for recalculate Outstanding Principal' | translate }} - {{ loanDetails.interestRecalculationData.calendarData.humanReadable }} - - - - {{ 'labels.inputs.Frequency for compounding' | translate }} - {{ loanDetails.interestRecalculationData.compoundingCalendarData.humanReadable }} - - - - {{ 'labels.inputs.Variable Installments Allowed' | translate }} - {{ loanDetails.isVariableInstallmentsAllowed | yesNo }} - - - - {{ 'labels.inputs.Gap between Installments' | translate }} - - {{ loanDetails.minimumGap | formatNumber }} {{ 'labels.text.Days' | translate }} , Max:{{ - loanDetails.maximumGap | formatNumber - }} {{ 'labels.text.Days' | translate }} - - - - - {{ 'labels.inputs.Available Disbursement Amount (with Over Applied)' | translate }} - {{ - loanDetails.delinquent.availableDisbursementAmountWithOverApplied | formatNumber - }} - + @if (loanDetails.isInterestRecalculationEnabled) { + + {{ 'labels.inputs.Interest recalculation compounding on' | translate }} + + {{ + loanDetails.interestRecalculationData.interestRecalculationCompoundingType.value | translateKey: 'catalogs' + }} + + + } + + @if (loanDetails.isInterestRecalculationEnabled) { + + {{ 'labels.inputs.Advance payments adjustment type' | translate }} + + {{ loanDetails.interestRecalculationData.rescheduleStrategyType.value | translateKey: 'catalogs' }} + + + } + + @if (loanDetails.isInterestRecalculationEnabled) { + + {{ 'labels.inputs.Frequency for recalculate Outstanding Principal' | translate }} + {{ loanDetails.interestRecalculationData.calendarData.humanReadable }} + + } + + @if ( + loanDetails.isInterestRecalculationEnabled && + loanDetails.interestRecalculationData.interestRecalculationCompoundingType.id !== 0 + ) { + + {{ 'labels.inputs.Frequency for compounding' | translate }} + {{ loanDetails.interestRecalculationData.compoundingCalendarData.humanReadable }} + + } + + @if (loanDetails.isVariableInstallmentsAllowed) { + + {{ 'labels.inputs.Variable Installments Allowed' | translate }} + {{ loanDetails.isVariableInstallmentsAllowed | yesNo }} + + } + + @if (loanDetails.isVariableInstallmentsAllowed) { + + {{ 'labels.inputs.Gap between Installments' | translate }} + + {{ loanDetails.minimumGap | formatNumber }} {{ 'labels.text.Days' | translate }} , Max:{{ + loanDetails.maximumGap | formatNumber + }} {{ 'labels.text.Days' | translate }} + + + } + + @if ( + loanDetails && + loanDetails.delinquent && + loanDetails.delinquent.availableDisbursementAmountWithOverApplied !== undefined + ) { + + {{ 'labels.inputs.Available Disbursement Amount (with Over Applied)' | translate }} + {{ + loanDetails.delinquent.availableDisbursementAmountWithOverApplied | formatNumber + }} + + } diff --git a/src/app/loans/loans-view/account-details/account-details.component.ts b/src/app/loans/loans-view/account-details/account-details.component.ts index 40cb0a0b6e..194c110ae8 100644 --- a/src/app/loans/loans-view/account-details/account-details.component.ts +++ b/src/app/loans/loans-view/account-details/account-details.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { DateFormatPipe } from '../../../pipes/date-format.pipe'; import { FormatNumberPipe } from '../../../pipes/format-number.pipe'; @@ -17,13 +17,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AccountDetailsComponent { + private route = inject(ActivatedRoute); + loanDetails: any; dataObject: { property: string; value: string; }[]; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.parent.data.subscribe((data: { loanDetailsData: any }) => { this.loanDetails = data.loanDetailsData; }); diff --git a/src/app/loans/loans-view/charges-tab/charges-tab.component.html b/src/app/loans/loans-view/charges-tab/charges-tab.component.html index 101fca9a94..e903785cc3 100644 --- a/src/app/loans/loans-view/charges-tab/charges-tab.component.html +++ b/src/app/loans/loans-view/charges-tab/charges-tab.component.html @@ -8,8 +8,12 @@ {{ 'labels.inputs.Fee/Penalty' | translate }} - {{ 'labels.inputs.Penalty' | translate }} - {{ 'labels.inputs.Fee' | translate }} + @if (charge.penalty) { + {{ 'labels.inputs.Penalty' | translate }} + } + @if (!charge.penalty) { + {{ 'labels.inputs.Fee' | translate }} + } @@ -25,12 +29,20 @@ - {{ 'labels.inputs.Due As Of' | translate }} - {{ 'labels.inputs.Submitted On' | translate }} + @if (useDueDate) { + {{ 'labels.inputs.Due As Of' | translate }} + } + @if (!useDueDate) { + {{ 'labels.inputs.Submitted On' | translate }} + } - {{ charge.dueDate | dateFormat }} - {{ charge.submittedOnDate | dateFormat }} + @if (useDueDate) { + {{ charge.dueDate | dateFormat }} + } + @if (!useDueDate) { + {{ charge.submittedOnDate | dateFormat }} + } @@ -76,56 +88,61 @@ {{ 'labels.inputs.Actions' | translate }} - + @if (status === 'Submitted and pending approval') { + + + + + + + + + } + @if (!charge.paid && status === 'Active') { + } + @if (charge.chargePayable && !charge.paid && status === 'Active') { + + + + } + @if (!charge.actionFlag) { - + - - - - - - - - - - + } diff --git a/src/app/loans/loans-view/charges-tab/charges-tab.component.ts b/src/app/loans/loans-view/charges-tab/charges-tab.component.ts index 26defec75e..f1f946487b 100644 --- a/src/app/loans/loans-view/charges-tab/charges-tab.component.ts +++ b/src/app/loans/loans-view/charges-tab/charges-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; @@ -35,7 +35,7 @@ import { Dates } from 'app/core/utils/dates'; import { SystemService } from 'app/system/system.service'; import { GlobalConfiguration } from 'app/system/configurations/global-configurations-tab/configuration.model'; import { TranslateService } from '@ngx-translate/core'; -import { NgIf, CurrencyPipe } from '@angular/common'; +import { CurrencyPipe } from '@angular/common'; import { MatTooltip } from '@angular/material/tooltip'; import { DateFormatPipe } from '../../../pipes/date-format.pipe'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -65,6 +65,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ChargesTabComponent implements OnInit { + private loansService = inject(LoansService); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private router = inject(Router); + private translateService = inject(TranslateService); + dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + private systemService = inject(SystemService); + /** Loan Details Data */ loanDetails: any; /** Charges Data */ @@ -94,21 +103,15 @@ export class ChargesTabComponent implements OnInit { /** Sorter for charges table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the loans data from `resolve`. * @param {ActivatedRoute} route Activated Route. * @param {SettingsService} settingsService Settings Service */ - constructor( - private loansService: LoansService, - private route: ActivatedRoute, - private dateUtils: Dates, - private router: Router, - private translateService: TranslateService, - public dialog: MatDialog, - private settingsService: SettingsService, - private systemService: SystemService - ) { + constructor() { this.route.parent.data.subscribe((data: { loanDetailsData: any }) => { this.loanDetails = data.loanDetailsData; }); diff --git a/src/app/loans/loans-view/datatable-tab/datatable-tab.component.ts b/src/app/loans/loans-view/datatable-tab/datatable-tab.component.ts index ed5ce8f568..be6a45702b 100644 --- a/src/app/loans/loans-view/datatable-tab/datatable-tab.component.ts +++ b/src/app/loans/loans-view/datatable-tab/datatable-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { EntityDatatableTabComponent } from '../../../shared/tabs/entity-datatable-tab/entity-datatable-tab.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -13,17 +13,22 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DatatableTabComponent implements OnInit { + private route = inject(ActivatedRoute); + entityId: string; /** Loan Datatable */ entityDatatable: any = null; /** Multi Row Datatable Flag */ multiRowDatatableFlag: boolean; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches data table data from `resolve` * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.entityId = this.route.parent.parent.snapshot.paramMap.get('loanId'); this.entityDatatable = null; this.route.data.subscribe((data: { loanDatatable: any }) => { diff --git a/src/app/loans/loans-view/external-asset-owner-tab/external-asset-owner-tab.component.html b/src/app/loans/loans-view/external-asset-owner-tab/external-asset-owner-tab.component.html index 839792f262..382ec34296 100644 --- a/src/app/loans/loans-view/external-asset-owner-tab/external-asset-owner-tab.component.html +++ b/src/app/loans/loans-view/external-asset-owner-tab/external-asset-owner-tab.component.html @@ -1,200 +1,210 @@ - - {{ 'labels.heading.Active Asset Transfer' | translate }} - - - - - - {{ 'labels.inputs.Status' | translate }} : - - - - - {{ activeTransferData.status }} - - - - {{ 'labels.inputs.Owner External Id' | translate }} : - - - - - - - - {{ 'labels.inputs.Settlement Date' | translate }} : - - - {{ activeTransferData.settlementDate | dateFormat }} - - - {{ 'labels.inputs.Effective Date' | translate }} : - - - {{ activeTransferData.effectiveFrom | dateFormat }} - - - - - {{ 'labels.inputs.Details' | translate }} : - - - - - - - {{ 'labels.inputs.Principal Outstanding' | translate }} : - - - {{ activeTransferData.details.totalPrincipalOutstanding | formatNumber }} - - - - - {{ 'labels.inputs.Interest Outstanding' | translate }} : - - - {{ activeTransferData.details.totalInterestOutstanding | formatNumber }} - - - - - {{ 'labels.inputs.Fees Outstanding' | translate }} : - - - {{ activeTransferData.details.totalFeeChargesOutstanding | formatNumber }} - - - - - {{ 'labels.inputs.Penalties Outstanding' | translate }} : - - - {{ activeTransferData.details.totalPenaltyChargesOutstanding | formatNumber }} - - - - - {{ 'labels.inputs.Outstanding' | translate }} : - - - {{ activeTransferData.details.totalOutstanding | formatNumber }} - - - - - {{ 'labels.inputs.Overpaid' | translate }} : - - {{ activeTransferData.details.totalOverpaid | formatNumber }} - - - - - - - + @if (existActiveTransfer) { + + {{ 'labels.heading.Active Asset Transfer' | translate }} + + + + + + {{ 'labels.inputs.Status' | translate }} : + + + + + {{ activeTransferData.status }} + + + + {{ 'labels.inputs.Owner External Id' | translate }} : + + + + + + + + {{ 'labels.inputs.Settlement Date' | translate }} : + + + {{ activeTransferData.settlementDate | dateFormat }} + + + {{ 'labels.inputs.Effective Date' | translate }} : + + + {{ activeTransferData.effectiveFrom | dateFormat }} + + + + + {{ 'labels.inputs.Details' | translate }} : + + + + + + + {{ 'labels.inputs.Principal Outstanding' | translate }} : + + + {{ activeTransferData.details.totalPrincipalOutstanding | formatNumber }} + + + + + {{ 'labels.inputs.Interest Outstanding' | translate }} : + + + {{ activeTransferData.details.totalInterestOutstanding | formatNumber }} + + + + + {{ 'labels.inputs.Fees Outstanding' | translate }} : + + + {{ activeTransferData.details.totalFeeChargesOutstanding | formatNumber }} + + + + + {{ 'labels.inputs.Penalties Outstanding' | translate }} : + + + {{ activeTransferData.details.totalPenaltyChargesOutstanding | formatNumber }} + + + + + {{ 'labels.inputs.Outstanding' | translate }} : + + + {{ activeTransferData.details.totalOutstanding | formatNumber }} + + + + + {{ 'labels.inputs.Overpaid' | translate }} : + + {{ activeTransferData.details.totalOverpaid | formatNumber }} + + + + + + + + - + } {{ 'labels.heading.External Asset Owner' | translate }} - - - {{ 'labels.buttons.Sell Loan' | translate }} - - - - - - {{ 'labels.buttons.Cancel Sell Loan' | translate }} - - - - - - {{ 'labels.buttons.Buy Back Loan' | translate }} - - - - - 0"> - - {{ 'labels.inputs.Status' | translate }} - - - - - {{ itemCurrentStatus(item) | translate }} - - - - - - - {{ 'labels.inputs.Effective From' | translate }} - {{ item.effectiveFrom | dateFormat }} - - - - {{ 'labels.inputs.Owner External Id' | translate }} - - - - - - - {{ 'labels.inputs.Transfer External Id' | translate }} - - - - - - - {{ 'labels.inputs.Settlement Date' | translate }} - {{ item.settlementDate | dateFormat }} - + @if (canBeSold()) { + + + {{ 'labels.buttons.Sell Loan' | translate }} + + + } - - {{ 'labels.inputs.Purchase Price Ratio' | translate }} - {{ item.purchasePriceRatio | number }} - + @if (canBeCancelled()) { + + + {{ 'labels.buttons.Cancel Sell Loan' | translate }} + + + } - - {{ 'labels.inputs.Actions' | translate }} - + @if (canBeBuyed()) { + - + {{ 'labels.buttons.Buy Back Loan' | translate }} - - + + } + - - - + @if (loanTransfersData.length > 0) { + + + {{ 'labels.inputs.Status' | translate }} + + + + + {{ itemCurrentStatus(item) | translate }} + + + + + + {{ 'labels.inputs.Effective From' | translate }} + {{ item.effectiveFrom | dateFormat }} + + + {{ 'labels.inputs.Owner External Id' | translate }} + + + + + + {{ 'labels.inputs.Transfer External Id' | translate }} + + + + + + {{ 'labels.inputs.Settlement Date' | translate }} + {{ item.settlementDate | dateFormat }} + + + {{ 'labels.inputs.Purchase Price Ratio' | translate }} + {{ item.purchasePriceRatio | number }} + + + {{ 'labels.inputs.Actions' | translate }} + + @if (!isPendingOrCanceled(item)) { + + + + } + + + + + + } diff --git a/src/app/loans/loans-view/external-asset-owner-tab/external-asset-owner-tab.component.ts b/src/app/loans/loans-view/external-asset-owner-tab/external-asset-owner-tab.component.ts index 423bb84c77..7cb181e89c 100644 --- a/src/app/loans/loans-view/external-asset-owner-tab/external-asset-owner-tab.component.ts +++ b/src/app/loans/loans-view/external-asset-owner-tab/external-asset-owner-tab.component.ts @@ -1,10 +1,10 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { ExternalAssetOwner } from 'app/loans/services/external-asset-owner'; import { ExternalAssetOwnerService } from 'app/loans/services/external-asset-owner.service'; import { CancelDialogComponent } from 'app/shared/cancel-dialog/cancel-dialog.component'; -import { NgIf, NgClass, DecimalPipe } from '@angular/common'; +import { NgClass, DecimalPipe } from '@angular/common'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { ExternalIdentifierComponent } from '../../../shared/external-identifier/external-identifier.component'; import { @@ -50,6 +50,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ExternalAssetOwnerTabComponent implements OnInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private externalAssetOwner = inject(ExternalAssetOwner); + private externalAssetOwnerService = inject(ExternalAssetOwnerService); + defaultDate = '9999-12-31'; loanTransfersData: any[] = []; activeTransferData: any; @@ -66,13 +72,10 @@ export class ExternalAssetOwnerTabComponent implements OnInit { currentItem: any; existActiveTransfer = false; - constructor( - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private externalAssetOwner: ExternalAssetOwner, - private externalAssetOwnerService: ExternalAssetOwnerService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { loanTransfersData: any; activeTransferData: any }) => { this.loanTransfersData = data.loanTransfersData.empty ? [] : data.loanTransfersData.content; this.activeTransferData = data.activeTransferData || null; diff --git a/src/app/loans/loans-view/external-asset-owner-tab/external-asset-transfer/external-asset-transfer.component.ts b/src/app/loans/loans-view/external-asset-owner-tab/external-asset-transfer/external-asset-transfer.component.ts index bf3ba98ea4..f6b4fbacfc 100644 --- a/src/app/loans/loans-view/external-asset-owner-tab/external-asset-transfer/external-asset-transfer.component.ts +++ b/src/app/loans/loans-view/external-asset-owner-tab/external-asset-transfer/external-asset-transfer.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { ExternalAssetOwner } from 'app/loans/services/external-asset-owner'; import { NgClass } from '@angular/common'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @@ -21,10 +21,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ExternalAssetTransferComponent { + private externalAssetOwner = inject(ExternalAssetOwner); + /** Input Fields Data */ @Input() transferData: any; - constructor(private externalAssetOwner: ExternalAssetOwner) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} itemStatus(status: string): string { return this.externalAssetOwner.itemStatus(status); diff --git a/src/app/loans/loans-view/floating-interest-rates/floating-interest-rates.component.ts b/src/app/loans/loans-view/floating-interest-rates/floating-interest-rates.component.ts index 4571c7e87b..133d776a41 100644 --- a/src/app/loans/loans-view/floating-interest-rates/floating-interest-rates.component.ts +++ b/src/app/loans/loans-view/floating-interest-rates/floating-interest-rates.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { MatTable, @@ -35,6 +35,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FloatingInterestRatesComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Loan Details */ loanDetails: any; /** Interest Rate Data */ @@ -45,11 +47,14 @@ export class FloatingInterestRatesComponent implements OnInit { 'interestRate' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the loans data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.parent.data.subscribe((data: { loanDetailsData: any }) => { this.loanDetails = data.loanDetailsData; }); diff --git a/src/app/loans/loans-view/general-tab/general-tab.component.html b/src/app/loans/loans-view/general-tab/general-tab.component.html index 5569f5bc8c..2fe7f6c858 100644 --- a/src/app/loans/loans-view/general-tab/general-tab.component.html +++ b/src/app/loans/loans-view/general-tab/general-tab.component.html @@ -1,5 +1,5 @@ - + @if (loanDetails.summary) { {{ 'labels.heading.Performance History' | translate }} @@ -21,219 +21,245 @@ {{ 'labels.heading.Performance History' | translate }} - + } - - {{ 'labels.heading.Loan Summary' | translate }} - - - - - {{ ele.property }} - - - - {{ 'labels.inputs.Original' | translate }} - - {{ ele.original | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - {{ 'labels.inputs.Paid' | translate }} - - {{ ele.paid | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - {{ 'labels.inputs.Credit Adjustments' | translate }} - - {{ ele.adjustment | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - {{ 'labels.inputs.Waived' | translate }} - - {{ ele.waived | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - {{ 'labels.inputs.Written Off' | translate }} - - {{ ele.writtenOff | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - {{ 'labels.inputs.Outstanding' | translate }} - - {{ ele.outstanding | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - {{ 'labels.inputs.Over Due' | translate }} - - {{ ele.overdue | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - - - - - - {{ 'labels.heading.Loan Details' | translate }} - - - {{ 'labels.inputs.' + ele.key | translate }} - - - - - - - {{ loanDetails.timeline.actualDisbursementDate | dateFormat }} - - - {{ 'labels.inputs.Not Available' | translate }} - - - - - {{ loanDetails.loanPurposeName }} - {{ 'labels.inputs.Not Available' | translate }} - - - - {{ 'labels.inputs.Unassigned' | translate }} - - {{ loanDetails.loanOfficerName }} - - - - - - {{ loanDetails.currency.name }} {{ loanDetails.currency.code }} - - - - - - - {{ 'labels.inputs.Not Available' | translate }} - - - - {{ ele.value }} - - - - - - - - - - {{ 'labels.heading.Loan Details' | translate }} - - - {{ 'labels.inputs.' + ele.key | translate }} - - - - - - - {{ loanDetails.timeline.actualDisbursementDate | dateFormat }} - - - {{ 'labels.inputs.Not Available' | translate }} - - - - - {{ 'labels.inputs.Unassigned' | translate }} - - {{ loanDetails.loanOfficerName }} - - - - - - {{ loanDetails.currency.name }} {{ loanDetails.currency.code }} - - - - - - - {{ 'labels.inputs.Not Available' | translate }} - - - - - - - - - - {{ 'labels.heading.Loan Purpose' | translate }} - - - - {{ 'labels.inputs.Loan Purpose' | translate }}: - - {{ loanDetails.loanPurposeName }} - - - {{ 'labels.inputs.Not Provided' | translate }} - - - - - {{ 'labels.inputs.Proposed Amount' | translate }}: - {{ - loanDetails.proposedPrincipal | currency: currencyCode : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Approved Amount' | translate }}: - {{ - loanDetails.approvedPrincipal | currency: currencyCode : 'symbol-narrow' : '1.2-2' - }} - + @if (loanDetails.summary) { + + {{ 'labels.heading.Loan Summary' | translate }} + + + + {{ ele.property }} + + + {{ 'labels.inputs.Original' | translate }} + + {{ ele.original | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + + + + {{ 'labels.inputs.Paid' | translate }} + + {{ ele.paid | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + + + + + {{ 'labels.inputs.Credit Adjustments' | translate }} + + + {{ ele.adjustment | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + + + + {{ 'labels.inputs.Waived' | translate }} + + {{ ele.waived | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + + + + {{ 'labels.inputs.Written Off' | translate }} + + {{ ele.writtenOff | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + + + + {{ 'labels.inputs.Outstanding' | translate }} + + {{ ele.outstanding | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + + + + {{ 'labels.inputs.Over Due' | translate }} + + {{ ele.overdue | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + + + + + + + } - - {{ 'labels.inputs.Disburse Amount' | translate }}: - {{ loanDetails.principal | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - + @if (loanDetails.summary) { + + {{ 'labels.heading.Loan Details' | translate }} + + + {{ 'labels.inputs.' + ele.key | translate }} + + + + @if (ele.key === 'Disbursement Date') { + @if (loanDetails.timeline.actualDisbursementDate) { + + {{ loanDetails.timeline.actualDisbursementDate | dateFormat }} + + } + @if (!loanDetails.timeline.actualDisbursementDate) { + + {{ 'labels.inputs.Not Available' | translate }} + + } + } + @if (ele.key === 'Loan Purpose') { + @if (loanDetails.loanPurposeName) { + {{ loanDetails.loanPurposeName }} + } + @if (!loanDetails.loanPurposeName) { + {{ 'labels.inputs.Not Available' | translate }} + } + } + @if (ele.key === 'Loan Officer') { + @if (!loanDetails.loanOfficerName) { + {{ 'labels.inputs.Unassigned' | translate }} + } + @if (loanDetails.loanOfficerName) { + + {{ loanDetails.loanOfficerName }} + @if (loanDetails.loanOfficerName) { + + } + + } + } + @if (ele.key === 'Currency') { + {{ loanDetails.currency.name }} {{ loanDetails.currency.code }} + } + @if (ele.key === 'External Id') { + @if (loanDetails.externalId) { + + + + } + @if (!loanDetails.externalId) { + {{ 'labels.inputs.Not Available' | translate }} + } + } + @if (ele.key === 'Proposed Amount' || ele.key === 'Approved Amount' || ele.key === 'Disburse Amount') { + {{ ele.value }} + } + + + + + + } - 0"> - {{ 'labels.inputs.Balloon Repayment Amount' | translate }}: - {{ - loanDetails.balloonRepaymentAmount | currency: currencyCode : 'symbol-narrow' : '1.2-2' - }} - + @if (!loanDetails.summary) { + + {{ 'labels.heading.Loan Details' | translate }} + + + {{ 'labels.inputs.' + ele.key | translate }} + + + + @if (ele.key === 'Disbursement Date') { + @if (loanDetails.timeline.actualDisbursementDate) { + + {{ loanDetails.timeline.actualDisbursementDate | dateFormat }} + + } + @if (!loanDetails.timeline.actualDisbursementDate) { + + {{ 'labels.inputs.Not Available' | translate }} + + } + } + @if (ele.key === 'Loan Officer') { + @if (!loanDetails.loanOfficerName) { + {{ 'labels.inputs.Unassigned' | translate }} + } + @if (loanDetails.loanOfficerName) { + + {{ loanDetails.loanOfficerName }} + @if (loanDetails.loanOfficerName) { + + } + + } + } + @if (ele.key === 'Currency') { + {{ loanDetails.currency.name }} {{ loanDetails.currency.code }} + } + @if (ele.key === 'External Id') { + @if (loanDetails.externalId) { + + + + } + @if (!loanDetails.externalId) { + {{ 'labels.inputs.Not Available' | translate }} + } + } + + + + + + } - - {{ 'labels.inputs.Arrears By' | translate }}: - {{ 'labels.inputs.Not Provided' | translate }} + @if (!loanDetails.summary) { + + {{ 'labels.heading.Loan Purpose' | translate }} + + + + {{ 'labels.inputs.Loan Purpose' | translate }}: + @if (loanDetails.loanPurposeName) { + + {{ loanDetails.loanPurposeName }} + + } + @if (!loanDetails.loanPurposeName) { + + {{ 'labels.inputs.Not Provided' | translate }} + + } + + + {{ 'labels.inputs.Proposed Amount' | translate }}: + {{ + loanDetails.proposedPrincipal | currency: currencyCode : 'symbol-narrow' : '1.2-2' + }} + + @if (showApprovedAmountBasedOnStatus()) { + + {{ 'labels.inputs.Approved Amount' | translate }}: + {{ + loanDetails.approvedPrincipal | currency: currencyCode : 'symbol-narrow' : '1.2-2' + }} + + } + @if (showDisbursedAmountBasedOnStatus()) { + + {{ 'labels.inputs.Disburse Amount' | translate }}: + {{ + loanDetails.principal | currency: currencyCode : 'symbol-narrow' : '1.2-2' + }} + + } + @if (loanDetails.balloonRepaymentAmount > 0) { + + {{ 'labels.inputs.Balloon Repayment Amount' | translate }}: + {{ + loanDetails.balloonRepaymentAmount | currency: currencyCode : 'symbol-narrow' : '1.2-2' + }} + + } + + {{ 'labels.inputs.Arrears By' | translate }}: + {{ 'labels.inputs.Not Provided' | translate }} + - + } diff --git a/src/app/loans/loans-view/general-tab/general-tab.component.ts b/src/app/loans/loans-view/general-tab/general-tab.component.ts index 1cce2c0432..9aae63df97 100644 --- a/src/app/loans/loans-view/general-tab/general-tab.component.ts +++ b/src/app/loans/loans-view/general-tab/general-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { MatTableDataSource, @@ -13,7 +13,7 @@ import { MatRowDef, MatRow } from '@angular/material/table'; -import { NgIf, CurrencyPipe } from '@angular/common'; +import { CurrencyPipe } from '@angular/common'; import { ExternalIdentifierComponent } from '../../../shared/external-identifier/external-identifier.component'; import { DateFormatPipe } from '../../../pipes/date-format.pipe'; import { FormatNumberPipe } from '../../../pipes/format-number.pipe'; @@ -42,6 +42,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GeneralTabComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Currency Code */ currencyCode: string; loanDetails: any; @@ -78,7 +80,10 @@ export class GeneralTabComponent implements OnInit { dataSource: MatTableDataSource; detailsDataSource: MatTableDataSource; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.parent.data.subscribe((data: { loanDetailsData: any }) => { this.loanDetails = data.loanDetailsData; this.currencyCode = this.loanDetails.currency.code; diff --git a/src/app/loans/loans-view/loan-account-actions/add-collateral/add-collateral.component.html b/src/app/loans/loans-view/loan-account-actions/add-collateral/add-collateral.component.html index 03570ed4dc..53b3c48885 100644 --- a/src/app/loans/loans-view/loan-account-actions/add-collateral/add-collateral.component.html +++ b/src/app/loans/loans-view/loan-account-actions/add-collateral/add-collateral.component.html @@ -6,23 +6,27 @@ {{ 'labels.inputs.Collateral Type' | translate }} - - {{ collateral.name }} + @for (collateral of dataObject.allowedCollateralTypes; track collateral) { + {{ collateral.name }} + } - - {{ 'labels.inputs.Collateral Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (collateralForm.controls.collateralTypeId.hasError('required')) { + + {{ 'labels.inputs.Collateral Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Value' | translate }} - - {{ 'labels.inputs.Value' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (collateralForm.controls.value.hasError('required')) { + + {{ 'labels.inputs.Value' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/loans/loans-view/loan-account-actions/add-collateral/add-collateral.component.ts b/src/app/loans/loans-view/loan-account-actions/add-collateral/add-collateral.component.ts index 0b13a955a8..7465d0aa48 100644 --- a/src/app/loans/loans-view/loan-account-actions/add-collateral/add-collateral.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/add-collateral/add-collateral.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AddCollateralComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private router = inject(Router); + private route = inject(ActivatedRoute); + private loanService = inject(LoansService); + @Input() dataObject: any; /** Collateral form. */ @@ -28,6 +33,9 @@ export class AddCollateralComponent implements OnInit { /** Loan Id. */ loanId: string; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieve data from `Resolver`. * @param {FormBuilder} formBuilder Form Builder. @@ -35,12 +43,7 @@ export class AddCollateralComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {LoansService} LoansService loans service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private router: Router, - private route: ActivatedRoute, - private loanService: LoansService - ) {} + constructor() {} ngOnInit() { this.createAddCollateralForm(); diff --git a/src/app/loans/loans-view/loan-account-actions/add-interest-pause/add-interest-pause.component.html b/src/app/loans/loans-view/loan-account-actions/add-interest-pause/add-interest-pause.component.html index cb8890f69d..aaba011960 100644 --- a/src/app/loans/loans-view/loan-account-actions/add-interest-pause/add-interest-pause.component.html +++ b/src/app/loans/loans-view/loan-account-actions/add-interest-pause/add-interest-pause.component.html @@ -1,8 +1,10 @@ - - {{ 'Maturity Date' | translateKey: 'inputs' }} : {{ maturityDate | dateFormat }} - + @if (maturityDate) { + + {{ 'Maturity Date' | translateKey: 'inputs' }} : {{ maturityDate | dateFormat }} + + } @@ -18,9 +20,11 @@ /> - - {{ 'labels.inputs.Start Date' | translate }}{{ 'labels.commons.required' | translate }} - + @if (interestPauseLoanForm.controls.startDate.hasError('required')) { + + {{ 'labels.inputs.Start Date' | translate }}{{ 'labels.commons.required' | translate }} + + } @@ -35,9 +39,11 @@ /> - - {{ 'labels.inputs.End Date' | translate }}{{ 'labels.commons.required' | translate }} - + @if (interestPauseLoanForm.controls.endDate.hasError('required')) { + + {{ 'labels.inputs.End Date' | translate }}{{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/loans/loans-view/loan-account-actions/add-interest-pause/add-interest-pause.component.ts b/src/app/loans/loans-view/loan-account-actions/add-interest-pause/add-interest-pause.component.ts index f5d6623c23..e5148e2d3a 100644 --- a/src/app/loans/loans-view/loan-account-actions/add-interest-pause/add-interest-pause.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/add-interest-pause/add-interest-pause.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -17,6 +17,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AddInterestPauseComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private loanService = inject(LoansService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + @Input() dataObject: any; /** Loan Id */ loanId: string; @@ -33,6 +40,9 @@ export class AddInterestPauseComponent implements OnInit { /** Interest Pause Loan Form */ interestPauseLoanForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} loanService Loan Service. @@ -40,14 +50,7 @@ export class AddInterestPauseComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private loanService: LoansService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.html b/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.html index 43a8e98b92..425d6b293f 100644 --- a/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.html +++ b/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.html @@ -6,23 +6,29 @@ {{ 'labels.inputs.Charge' | translate }} - - {{ loanCharge.name + ' (' + loanCharge?.currency.name + ')' }} - + @for (loanCharge of loanChargeOptions; track loanCharge) { + + {{ loanCharge.name + ' (' + loanCharge?.currency.name + ')' }} + + } - - {{ 'labels.inputs.Charge' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (loanChargeForm.controls.chargeId.hasError('required')) { + + {{ 'labels.inputs.Charge' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Amount' | translate }} - - {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (loanChargeForm.controls.amount.hasError('required')) { + + {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -35,23 +41,27 @@ - - {{ 'labels.inputs.Due On' | translate }} - - - - - {{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (loanChargeForm.controls['dueDate']) { + + {{ 'labels.inputs.Due On' | translate }} + + + + @if (loanChargeForm.controls.dueDate.hasError('required')) { + + {{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } diff --git a/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.ts b/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.ts index a695407cfe..5deb91b9ca 100644 --- a/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/add-loan-charge/add-loan-charge.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -27,6 +27,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AddLoanChargeComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private loansService = inject(LoansService); + private settingsService = inject(SettingsService); + /** Minimum Due Date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum Due Date allowed. */ @@ -52,6 +59,9 @@ export class AddLoanChargeComponent implements OnInit { /** loan Id of the loan account. */ loanId: string; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the loan charge template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -60,14 +70,7 @@ export class AddLoanChargeComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private loansService: LoansService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { actionButtonData: any }) => { this.loanChargeOptions = data.actionButtonData.chargeOptions; }); diff --git a/src/app/loans/loans-view/loan-account-actions/adjust-loan-charge/adjust-loan-charge.component.html b/src/app/loans/loans-view/loan-account-actions/adjust-loan-charge/adjust-loan-charge.component.html index 74afcf9106..8f26082a10 100644 --- a/src/app/loans/loans-view/loan-account-actions/adjust-loan-charge/adjust-loan-charge.component.html +++ b/src/app/loans/loans-view/loan-account-actions/adjust-loan-charge/adjust-loan-charge.component.html @@ -8,10 +8,12 @@ {{ loanDetailsData.currency.code }} - - {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (adjustLoanChargeForm.controls.amount.hasError('required')) { + + {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -22,9 +24,11 @@ {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentType.name }} - + @for (paymentType of paymentTypes; track paymentType) { + + {{ paymentType.name }} + + } @@ -38,32 +42,28 @@ - + @if (showPaymentDetails) { {{ 'labels.inputs.Account' | translate }} # - {{ 'labels.inputs.Cheque' | translate }} # - {{ 'labels.inputs.Routing Code' | translate }} - {{ 'labels.inputs.Reciept' | translate }} # - {{ 'labels.inputs.Bank' | translate }} # - + } {{ 'labels.inputs.Note' | translate }} diff --git a/src/app/loans/loans-view/loan-account-actions/adjust-loan-charge/adjust-loan-charge.component.ts b/src/app/loans/loans-view/loan-account-actions/adjust-loan-charge/adjust-loan-charge.component.ts index 254adf4d30..c9e896e348 100644 --- a/src/app/loans/loans-view/loan-account-actions/adjust-loan-charge/adjust-loan-charge.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/adjust-loan-charge/adjust-loan-charge.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormControl, @@ -25,6 +25,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AdjustLoanChargeComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private loanService = inject(LoansService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + private organizationService = inject(OrganizationService); + /** Loan Id */ loanId: string; chargeId: string; @@ -43,6 +50,9 @@ export class AdjustLoanChargeComponent implements OnInit { /** Repayment Loan Form */ adjustLoanChargeForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} loanService Loan Service. @@ -50,14 +60,7 @@ export class AdjustLoanChargeComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private loanService: LoansService, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService, - private organizationService: OrganizationService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; this.chargeId = this.route.snapshot.params['id']; this.route.data.subscribe((data: { loansAccountCharge: any; loanDetailsData: any }) => { diff --git a/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.html b/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.html index 93983fcf5a..2fc617610b 100644 --- a/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.html +++ b/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.html @@ -14,10 +14,12 @@ /> - - {{ 'labels.inputs.Approved Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (approveLoanForm.controls.approvedOnDate.hasError('required')) { + + {{ 'labels.inputs.Approved Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -49,10 +51,12 @@ {{ 'labels.inputs.Transaction Amount' | translate }} - - {{ 'labels.inputs.Transaction Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (approveLoanForm.controls.approvedLoanAmount.hasError('required')) { + + {{ 'labels.inputs.Transaction Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.ts b/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.ts index a8fbf82e1c..31c26354ac 100644 --- a/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -28,6 +28,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ApproveLoanComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private loanService = inject(LoansService); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Approve Loan form. */ approveLoanForm: UntypedFormGroup; /** Loan data. */ @@ -40,6 +47,9 @@ export class ApproveLoanComponent implements OnInit { loanId: any; currency: Currency; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieve data from `Resolver`. * @param formBuilder Form Builder. @@ -49,14 +59,7 @@ export class ApproveLoanComponent implements OnInit { * @param router Router. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private dateUtils: Dates, - private loanService: LoansService, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { actionButtonData: any }) => { this.loanData = data.actionButtonData; this.currency = data.actionButtonData.currency; diff --git a/src/app/loans/loans-view/loan-account-actions/asset-transfer-loan/asset-transfer-loan.component.html b/src/app/loans/loans-view/loan-account-actions/asset-transfer-loan/asset-transfer-loan.component.html index ff89f0df69..0639f9cb0d 100644 --- a/src/app/loans/loans-view/loan-account-actions/asset-transfer-loan/asset-transfer-loan.component.html +++ b/src/app/loans/loans-view/loan-account-actions/asset-transfer-loan/asset-transfer-loan.component.html @@ -15,29 +15,39 @@ /> - - {{ 'labels.inputs.Settlement Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (saleLoanForm.controls.settlementDate.hasError('required')) { + + {{ 'labels.inputs.Settlement Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Purchase Price Ratio' | translate }} - - - {{ 'labels.inputs.Purchase Price Ratio' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (!isBuyBack()) { + + {{ 'labels.inputs.Purchase Price Ratio' | translate }} + + @if (saleLoanForm.controls.purchasePriceRatio.hasError('required')) { + + {{ 'labels.inputs.Purchase Price Ratio' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Owner External Id' | translate }} - - - {{ 'labels.inputs.Owner External Id' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (!isBuyBack()) { + + {{ 'labels.inputs.Owner External Id' | translate }} + + @if (saleLoanForm.controls.ownerExternalId.hasError('required')) { + + {{ 'labels.inputs.Owner External Id' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } {{ 'labels.inputs.Transfer External Id' | translate }} diff --git a/src/app/loans/loans-view/loan-account-actions/asset-transfer-loan/asset-transfer-loan.component.ts b/src/app/loans/loans-view/loan-account-actions/asset-transfer-loan/asset-transfer-loan.component.ts index f70e5fa54d..2397a220c1 100644 --- a/src/app/loans/loans-view/loan-account-actions/asset-transfer-loan/asset-transfer-loan.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/asset-transfer-loan/asset-transfer-loan.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -15,6 +15,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AssetTransferLoanComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private externalAssetOwnerService = inject(ExternalAssetOwnerService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + BUYBACK_COMMAND = 'buyback'; SALE_COMMAND = 'sale'; @@ -28,14 +35,10 @@ export class AssetTransferLoanComponent implements OnInit { /** Sell Loan Form */ saleLoanForm: UntypedFormGroup; - constructor( - private formBuilder: UntypedFormBuilder, - private externalAssetOwnerService: ExternalAssetOwnerService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.loanId = this.route.snapshot.params['loanId']; const actionName = this.route.snapshot.params['action']; this.command = actionName === 'Sell Loan' ? this.SALE_COMMAND : this.BUYBACK_COMMAND; diff --git a/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.html b/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.html index 8294ed0023..ab63525dcf 100644 --- a/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.html +++ b/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.html @@ -6,14 +6,18 @@ {{ 'labels.inputs.To Loan Officer' | translate }} - - {{ loanOfficer.displayName }} - + @for (loanOfficer of loanOfficers; track loanOfficer) { + + {{ loanOfficer.displayName }} + + } - - {{ 'labels.inputs.Loan Officer' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (assignOfficerForm.controls.toLoanOfficerId.hasError('required')) { + + {{ 'labels.inputs.Loan Officer' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -28,10 +32,12 @@ /> - - {{ 'labels.inputs.Assignment Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (assignOfficerForm.controls.assignmentDate.hasError('required')) { + + {{ 'labels.inputs.Assignment Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.ts b/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.ts index f31223890c..55f4c051c7 100644 --- a/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/assign-loan-officer/assign-loan-officer.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { LoansService } from 'app/loans/loans.service'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; @@ -17,6 +17,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AssignLoanOfficerComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private loanService = inject(LoansService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + @Input() dataObject: any; /** Loan Id */ loanId: string; @@ -28,6 +35,9 @@ export class AssignLoanOfficerComponent implements OnInit { /** Assign loan Officer form. */ assignOfficerForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} systemService Loan Service. @@ -35,14 +45,7 @@ export class AssignLoanOfficerComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private loanService: LoansService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.html b/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.html index a5acf58489..9c06fe4903 100644 --- a/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.html +++ b/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.html @@ -15,23 +15,29 @@ /> - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (chargeoffLoanForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Reason for Charge-Off' | translate }} - - {{ chargeOffReason.name }} - + @for (chargeOffReason of chargeOffReasonOptions; track chargeOffReason) { + + {{ chargeOffReason.name }} + + } - - {{ 'labels.inputs.Reason for Charge-Off' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (chargeoffLoanForm.controls.chargeOffReasonId.hasError('required')) { + + {{ 'labels.inputs.Reason for Charge-Off' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.ts b/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.ts index 71cd14b36f..3fda07cb1d 100644 --- a/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/charge-off/charge-off.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -17,6 +17,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ChargeOffComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private loanService = inject(LoansService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + @Input() dataObject: any; /** Loan Id */ @@ -34,6 +41,9 @@ export class ChargeOffComponent implements OnInit { chargeOffReasonOptions: any = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} loanService Loan Service. @@ -41,14 +51,7 @@ export class ChargeOffComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private loanService: LoansService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/close-as-rescheduled/close-as-rescheduled.component.html b/src/app/loans/loans-view/loan-account-actions/close-as-rescheduled/close-as-rescheduled.component.html index ee2c0fff41..ac4e62fc1a 100644 --- a/src/app/loans/loans-view/loan-account-actions/close-as-rescheduled/close-as-rescheduled.component.html +++ b/src/app/loans/loans-view/loan-account-actions/close-as-rescheduled/close-as-rescheduled.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Closed Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeLoanForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Closed Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/loans/loans-view/loan-account-actions/close-as-rescheduled/close-as-rescheduled.component.ts b/src/app/loans/loans-view/loan-account-actions/close-as-rescheduled/close-as-rescheduled.component.ts index acad14c096..b018d29d7c 100644 --- a/src/app/loans/loans-view/loan-account-actions/close-as-rescheduled/close-as-rescheduled.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/close-as-rescheduled/close-as-rescheduled.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { LoansService } from 'app/loans/loans.service'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -19,6 +19,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CloseAsRescheduledComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private loanService = inject(LoansService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + @Input() dataObject: any; /** Close form. */ @@ -30,6 +37,9 @@ export class CloseAsRescheduledComponent implements OnInit { /** Maximum Date allowed. */ maxDate = new Date(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} systemService Loan Service. @@ -37,14 +47,7 @@ export class CloseAsRescheduledComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private loanService: LoansService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/create-guarantor/create-guarantor.component.html b/src/app/loans/loans-view/loan-account-actions/create-guarantor/create-guarantor.component.html index 955d8a794e..eb7f55ac19 100644 --- a/src/app/loans/loans-view/loan-account-actions/create-guarantor/create-guarantor.component.html +++ b/src/app/loans/loans-view/loan-account-actions/create-guarantor/create-guarantor.component.html @@ -7,118 +7,119 @@ {{ 'labels.inputs.Existing Client' | translate }} - + @if (!showClientDetailsForm) { {{ 'labels.inputs.name' | translate }} - - {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (newGuarantorForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - - {{ client.displayName }} - + @for (client of clientsData; track client) { + + {{ client.displayName }} + + } - {{ 'labels.inputs.Relationship' | translate }} - - {{ relationType.name }} - + @for (relationType of relationTypes; track relationType) { + + {{ relationType.name }} + + } - - 0"> + @if (accountOptions?.length > 0) { {{ 'labels.inputs.Account' | translate }} - - {{ accountOption.productName }} - {{ accountOption.accountNo }} - + @for (accountOption of accountOptions; track accountOption) { + + {{ accountOption.productName }} - {{ accountOption.accountNo }} + + } - {{ 'labels.inputs.Amount' | translate }} - - + } + } - + @if (showClientDetailsForm) { {{ 'labels.inputs.Relationship' | translate }} - - {{ relationType.name }} - + @for (relationType of relationTypes; track relationType) { + + {{ relationType.name }} + + } - {{ 'labels.inputs.First Name' | translate }} - - {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} - + @if (newGuarantorForm.controls.firstname.hasError('required')) { + + {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} + + } - {{ 'labels.inputs.Last Name' | translate }} - - {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} - + @if (newGuarantorForm.controls.lastname.hasError('required')) { + + {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} + + } - {{ 'labels.inputs.Date Of Birth' | translate }} - {{ 'labels.inputs.Address Line' | translate }} 1 - {{ 'labels.inputs.Address Line' | translate }} 2 - {{ 'labels.inputs.City' | translate }} - {{ 'labels.inputs.Zip' | translate }} - {{ 'labels.inputs.Mobile' | translate }} - {{ 'labels.inputs.Residence Phone' | translate }} # - + } @@ -137,7 +138,7 @@ - + @if (newGuarantorForm?.controls?.name?.value) { {{ 'labels.inputs.Client Details' | translate }} @@ -155,6 +156,6 @@ {{ newGuarantorForm.controls.name.value.officeName }} - + } diff --git a/src/app/loans/loans-view/loan-account-actions/create-guarantor/create-guarantor.component.ts b/src/app/loans/loans-view/loan-account-actions/create-guarantor/create-guarantor.component.ts index 6133f152dd..ddea46380c 100644 --- a/src/app/loans/loans-view/loan-account-actions/create-guarantor/create-guarantor.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/create-guarantor/create-guarantor.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, AfterViewInit } from '@angular/core'; +import { Component, OnInit, Input, AfterViewInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -33,6 +33,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateGuarantorComponent implements OnInit, AfterViewInit { + private formBuilder = inject(UntypedFormBuilder); + private loanService = inject(LoansService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private clientsService = inject(ClientsService); + private settingsService = inject(SettingsService); + @Input() dataObject: any; /** New Guarantor Form */ newGuarantorForm: UntypedFormGroup; @@ -51,6 +59,9 @@ export class CreateGuarantorComponent implements OnInit, AfterViewInit { /** Account Options */ accountOptions: any = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} loanService Loan Service. @@ -58,15 +69,7 @@ export class CreateGuarantorComponent implements OnInit, AfterViewInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private loanService: LoansService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private clientsService: ClientsService, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/disburse-to-savings-account/disburse-to-savings-account.component.html b/src/app/loans/loans-view/loan-account-actions/disburse-to-savings-account/disburse-to-savings-account.component.html index 8718832808..d7d31a58d7 100644 --- a/src/app/loans/loans-view/loan-account-actions/disburse-to-savings-account/disburse-to-savings-account.component.html +++ b/src/app/loans/loans-view/loan-account-actions/disburse-to-savings-account/disburse-to-savings-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Disbursement Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (disbursementForm.controls.actualDisbursementDate.hasError('required')) { + + {{ 'labels.inputs.Disbursement Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Fixed EMI amount' | translate }} - - + @if (dataObject.fixedEmiAmount) { + + {{ 'labels.inputs.Fixed EMI amount' | translate }} + + + } {{ 'labels.inputs.Note' | translate }} diff --git a/src/app/loans/loans-view/loan-account-actions/disburse-to-savings-account/disburse-to-savings-account.component.ts b/src/app/loans/loans-view/loan-account-actions/disburse-to-savings-account/disburse-to-savings-account.component.ts index a58dc832ab..03a0929505 100644 --- a/src/app/loans/loans-view/loan-account-actions/disburse-to-savings-account/disburse-to-savings-account.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/disburse-to-savings-account/disburse-to-savings-account.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -22,6 +22,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DisburseToSavingsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private loanService = inject(LoansService); + private settingsService = inject(SettingsService); + @Input() dataObject: any; /** Minimum Date allowed. */ @@ -32,6 +39,9 @@ export class DisburseToSavingsAccountComponent implements OnInit { disbursementForm: UntypedFormGroup; currency: Currency; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Get data from `Resolver`. * @param {FormBuilder} formBuilder FormBuilder. @@ -40,14 +50,7 @@ export class DisburseToSavingsAccountComponent implements OnInit { * @param {LoansService} loanService Loan Service. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private loanService: LoansService, - private settingsService: SettingsService - ) {} + constructor() {} ngOnInit() { this.maxDate = this.settingsService.businessDate; diff --git a/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.html b/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.html index 7d0e4793bb..faa539c261 100644 --- a/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.html +++ b/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Disbursed On Date' | translate - }}{{ 'labels.commons.required' | translate }} - + @if (disbursementLoanForm.controls.actualDisbursementDate.hasError('required')) { + + {{ 'labels.inputs.Disbursed On Date' | translate + }}{{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentType.name }} - + @for (paymentType of paymentTypes; track paymentType) { + + {{ paymentType.name }} + + } @@ -59,32 +63,28 @@ - + @if (showPaymentDetails) { {{ 'labels.inputs.Account' | translate }} # - {{ 'labels.inputs.Cheque' | translate }} # - {{ 'labels.inputs.Routing Code' | translate }} - {{ 'labels.inputs.Reciept' | translate }} # - {{ 'labels.inputs.Bank' | translate }} # - + } {{ 'labels.inputs.Note' | translate }} diff --git a/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.ts b/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.ts index 068e822aef..fcfdc28655 100644 --- a/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormControl } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; @@ -30,6 +30,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DisburseComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private loanService = inject(LoansService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + @Input() dataObject: any; /** Loan Id */ loanId: string; @@ -45,6 +52,9 @@ export class DisburseComponent implements OnInit { disbursementLoanForm: UntypedFormGroup; currency: Currency; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} loanService Loan Service. @@ -52,14 +62,7 @@ export class DisburseComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private loanService: LoansService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/edit-repayment-schedule/edit-repayment-schedule.component.html b/src/app/loans/loans-view/loan-account-actions/edit-repayment-schedule/edit-repayment-schedule.component.html index 560fe0ee09..701520fdaa 100644 --- a/src/app/loans/loans-view/loan-account-actions/edit-repayment-schedule/edit-repayment-schedule.component.html +++ b/src/app/loans/loans-view/loan-account-actions/edit-repayment-schedule/edit-repayment-schedule.component.html @@ -2,13 +2,14 @@ - - + @if (repaymentScheduleDetails) { + + + } diff --git a/src/app/loans/loans-view/loan-account-actions/edit-repayment-schedule/edit-repayment-schedule.component.ts b/src/app/loans/loans-view/loan-account-actions/edit-repayment-schedule/edit-repayment-schedule.component.ts index 1e74b1ee8a..ce3a753eb6 100644 --- a/src/app/loans/loans-view/loan-account-actions/edit-repayment-schedule/edit-repayment-schedule.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/edit-repayment-schedule/edit-repayment-schedule.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; @@ -23,6 +23,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditRepaymentScheduleComponent implements OnInit { + private loansService = inject(LoansService); + private router = inject(Router); + private route = inject(ActivatedRoute); + private dialog = inject(MatDialog); + private dateUtils = inject(Dates); + private translateService = inject(TranslateService); + private settingsService = inject(SettingsService); + /** Loan ID. */ loanId: string; /** Indicates If the Schedule has been changed */ @@ -36,6 +44,9 @@ export class EditRepaymentScheduleComponent implements OnInit { /** Stores the Installments changed */ repaymentScheduleChanges: any = {}; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} systemService Loan Service. * @param {Router} router Router for navigation. @@ -44,15 +55,7 @@ export class EditRepaymentScheduleComponent implements OnInit { * @param {Dates} dateUtils Dates Utils. * @param {SettingsService} settingsService Settings Service */ - constructor( - private loansService: LoansService, - private router: Router, - private route: ActivatedRoute, - private dialog: MatDialog, - private dateUtils: Dates, - private translateService: TranslateService, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; this.getRepaymentSchedule(); } diff --git a/src/app/loans/loans-view/loan-account-actions/foreclosure/foreclosure.component.html b/src/app/loans/loans-view/loan-account-actions/foreclosure/foreclosure.component.html index 084aa346e3..a9101f21fc 100644 --- a/src/app/loans/loans-view/loan-account-actions/foreclosure/foreclosure.component.html +++ b/src/app/loans/loans-view/loan-account-actions/foreclosure/foreclosure.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (foreclosureForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/loans/loans-view/loan-account-actions/foreclosure/foreclosure.component.ts b/src/app/loans/loans-view/loan-account-actions/foreclosure/foreclosure.component.ts index dbf6f72ce2..1708aa079f 100644 --- a/src/app/loans/loans-view/loan-account-actions/foreclosure/foreclosure.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/foreclosure/foreclosure.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { LoansService } from 'app/loans/loans.service'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -19,6 +19,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ForeclosureComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private loanService = inject(LoansService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + @Input() dataObject: any; loanId: any; @@ -29,6 +36,9 @@ export class ForeclosureComponent implements OnInit { maxDate = new Date(); foreclosuredata: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} systemService Loan Service. @@ -36,14 +46,7 @@ export class ForeclosureComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private loanService: LoansService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.html b/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.html index c13b67ae2b..1f3caebbfd 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.html +++ b/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.html @@ -1,69 +1,108 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@if (actions['Close']) { + +} +@if (actions['Undo Approval']) { + +} +@if (actions['Assign Loan Officer']) { + +} +@if (actions['Foreclosure']) { + +} +@if (actions['Prepay Loan'] || actions['Contract Termination']) { + +} +@if (actions['Make Repayment']) { + +} +@if (actions['Capitalized Income']) { + +} +@if (actions['Goodwill Credit']) { + +} +@if (actions['Buy Down Fee']) { + +} +@if (actions['Interest Payment Waiver']) { + +} +@if (actions['Payout Refund']) { + +} +@if (actions['Merchant Issued Refund']) { + +} +@if (actions['Credit Balance Refund']) { + +} +@if (actions['Waive Interest']) { + +} +@if (actions['Write Off']) { + +} +@if (actions['Close (as Rescheduled)']) { + +} +@if (actions['Reschedule']) { + +} +@if (actions['Recovery Payment']) { + +} +@if (actions['View Guarantors']) { + +} +@if (actions['Create Guarantor']) { + +} +@if (actions['Disburse to Savings']) { + +} +@if (actions['Reject']) { + +} +@if (actions['Disburse']) { + +} +@if (actions['Withdrawn by Client']) { + +} +@if (actions['Add Collateral']) { + +} +@if (actions['Undo Disbursal'] || actions['Undo Last Disbursal']) { + +} +@if (actions['Loan Screen Reports']) { + +} +@if (actions['Approve']) { + +} +@if (actions['Add Loan Charge']) { + +} +@if (actions['Edit Repayment Schedule']) { + +} +@if (actions['Charge-Off']) { + +} +@if (actions['Sell Loan'] || actions['Buy Back Loan']) { + +} +@if (actions['Re-Age']) { + +} +@if (actions['Re-Amortize']) { + +} +@if (actions['Add Interest Pause']) { + +} +@if (actions['Undo Write-off']) { + +} diff --git a/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.ts b/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.ts index 65fb34cf6c..d31dad03ce 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { LoansAccountCloseComponent } from './loans-account-close/loans-account-close.component'; import { UndoApprovalComponent } from './undo-approval/undo-approval.component'; @@ -75,6 +75,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanAccountActionsComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Loan Details Data */ navigationData: any; @@ -164,14 +167,14 @@ export class LoanAccountActionsComponent { actionButtonData: any; actionName: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param route Activated Route. */ - constructor( - private route: ActivatedRoute, - private router: Router - ) { - const currentNavigation = this.router.getCurrentNavigation(); + constructor() { + const currentNavigation = this.router.currentNavigation(); // Safely access data with optional chaining this.navigationData = currentNavigation?.extras?.state?.data; diff --git a/src/app/loans/loans-view/loan-account-actions/loan-credit-balance-refund/loan-credit-balance-refund.component.html b/src/app/loans/loans-view/loan-account-actions/loan-credit-balance-refund/loan-credit-balance-refund.component.html index 016ee84d71..589d14149d 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-credit-balance-refund/loan-credit-balance-refund.component.html +++ b/src/app/loans/loans-view/loan-account-actions/loan-credit-balance-refund/loan-credit-balance-refund.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (creditBalanceLoanForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Frequency Type' | translate }} - - {{ frequencyType }} - + @for (frequencyType of periodFrequencyOptions; track frequencyType) { + + {{ frequencyType }} + + } @@ -34,30 +36,33 @@ /> - - {{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (reagingLoanForm.controls.startDate.hasError('required')) { + + {{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Interest Handling' | translate }} - - {{ reAgeInterestHandlingOption.value | translateKey: 'catalogs' }} - + @for (reAgeInterestHandlingOption of reAgeInterestHandlingOptions; track reAgeInterestHandlingOption) { + + {{ reAgeInterestHandlingOption.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Reason' | translate }} - - {{ reAgeReasonOption.name }} - + @for (reAgeReasonOption of reAgeReasonOptions; track reAgeReasonOption) { + + {{ reAgeReasonOption.name }} + + } diff --git a/src/app/loans/loans-view/loan-account-actions/loan-reaging/loan-reaging.component.ts b/src/app/loans/loans-view/loan-account-actions/loan-reaging/loan-reaging.component.ts index ed05825b57..60d341d78b 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-reaging/loan-reaging.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/loan-reaging/loan-reaging.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -16,6 +16,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanReagingComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + private loanService = inject(LoansService); + private dateUtils = inject(Dates); + @Input() dataObject: any; /** Loan Id */ loanId: string; @@ -31,14 +38,10 @@ export class LoanReagingComponent implements OnInit { /** Maximum Date allowed. */ maxDate = new Date(); - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService, - private loanService: LoansService, - private dateUtils: Dates - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/loan-reamortize/loan-reamortize.component.html b/src/app/loans/loans-view/loan-account-actions/loan-reamortize/loan-reamortize.component.html index 8ea48c3a95..938e085b39 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-reamortize/loan-reamortize.component.html +++ b/src/app/loans/loans-view/loan-account-actions/loan-reamortize/loan-reamortize.component.html @@ -6,15 +6,14 @@ {{ 'labels.inputs.Interest Handling' | translate }} - - {{ reAmortizationInterestHandlingOption.value | translateKey: 'catalogs' }} - + @for ( + reAmortizationInterestHandlingOption of reAmortizationInterestHandlingOptions; + track trackByInterestHandlingOption($index, reAmortizationInterestHandlingOption) + ) { + + {{ reAmortizationInterestHandlingOption.value | translateKey: 'catalogs' }} + + } @@ -23,12 +22,14 @@ {{ 'labels.inputs.Reason' | translate }} - - {{ reAmortizationReasonOption.name }} - + @for ( + reAmortizationReasonOption of reAmortizationReasonOptions; + track trackByReasonOption($index, reAmortizationReasonOption) + ) { + + {{ reAmortizationReasonOption.name }} + + } diff --git a/src/app/loans/loans-view/loan-account-actions/loan-reamortize/loan-reamortize.component.ts b/src/app/loans/loans-view/loan-account-actions/loan-reamortize/loan-reamortize.component.ts index b6fd5a17e7..b3143a2d40 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-reamortize/loan-reamortize.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/loan-reamortize/loan-reamortize.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { LoansService } from 'app/loans/loans.service'; @@ -15,6 +15,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanReamortizeComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private loanService = inject(LoansService); + @Input() dataObject: any; /** Loan Id */ loanId: string; @@ -23,12 +28,10 @@ export class LoanReamortizeComponent implements OnInit { reAmortizationReasonOptions: CodeValue[] = []; reAmortizationInterestHandlingOptions: OptionData[] = []; - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private loanService: LoansService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.html b/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.html index 6138f1e3c8..5f2a5b26f6 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.html +++ b/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.html @@ -14,23 +14,29 @@ /> - - {{ 'labels.inputs.Reschedule Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (rescheduleLoanForm.controls.rescheduleFromDate.hasError('required')) { + + {{ 'labels.inputs.Reschedule Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Reason for Rescheduling' | translate }} - - {{ rescheduleReasonCode.name }} - + @for (rescheduleReasonCode of codes; track rescheduleReasonCode) { + + {{ rescheduleReasonCode.name }} + + } - - {{ 'labels.inputs.Reason for Rescheduling' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (rescheduleLoanForm.controls.rescheduleReasonId.hasError('required')) { + + {{ 'labels.inputs.Reason for Rescheduling' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -44,10 +50,12 @@ /> - - {{ 'labels.inputs.Submitted On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (rescheduleLoanForm.controls.submittedOnDate.hasError('required')) { + + {{ 'labels.inputs.Submitted On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -59,7 +67,7 @@ {{ 'labels.inputs.Change Repayment Date' | translate }} - + @if (changeRepaymentDate.value) { {{ 'labels.inputs.Installment Rescheduled to' | translate }} - + } {{ 'labels.inputs.Introduce Mid-term grace periods' | translate }} - + @if (introduceGracePeriods.value) { {{ 'labels.inputs.Principal Grace Periods' | translate }} - {{ 'labels.inputs.Interest Grace Periods' | translate }} - + } {{ 'labels.inputs.Extend Repayment Period' | translate }} - + @if (extendRepaymentPeriod.value) { {{ 'labels.inputs.Number Of new Repayments' | translate }} - + } {{ 'labels.inputs.Adjust interest rates for remainder of loan' | translate }} - + @if (adjustinterestrates.value) { {{ 'labels.inputs.New Interest Rate' | translate }} - + } diff --git a/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.ts b/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.ts index 077e590c65..4df3d23575 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/loan-reschedule/loan-reschedule.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { LoansService } from 'app/loans/loans.service'; import { UntypedFormBuilder, @@ -25,6 +25,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanRescheduleComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private loanService = inject(LoansService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + @Input() dataObject: any; loanId: any; rescheduleLoanForm: UntypedFormGroup; @@ -40,6 +47,9 @@ export class LoanRescheduleComponent implements OnInit { extendRepaymentPeriod = new UntypedFormControl(false); adjustinterestrates = new UntypedFormControl(false); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} systemService Loan Service. @@ -47,14 +57,7 @@ export class LoanRescheduleComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private loanService: LoansService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html b/src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html index f42b97567e..042e4a0ed2 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html +++ b/src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html @@ -6,14 +6,18 @@ {{ 'labels.inputs.Loan Screen Reports' | translate }} - - {{ template.name }} - + @for (template of templatesData; track template) { + + {{ template.name }} + + } - - {{ 'labels.inputs.Screen Report' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (loanScreenReportForm.controls.templateId.hasError('required')) { + + {{ 'labels.inputs.Screen Report' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.ts b/src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.ts index a22823d4c8..1584ff377e 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Renderer2, ViewChild, ElementRef, SecurityContext, Input } from '@angular/core'; +import { Component, OnInit, Renderer2, ViewChild, ElementRef, SecurityContext, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -22,6 +22,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanScreenReportsComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private loansService = inject(LoansService); + private route = inject(ActivatedRoute); + private sanitizer = inject(DomSanitizer); + private renderer = inject(Renderer2); + @Input() dataObject: any; /** Loan Screen Reportform. */ loanScreenReportForm: UntypedFormGroup; @@ -35,6 +41,9 @@ export class LoanScreenReportsComponent implements OnInit { /** Screen report output reference */ @ViewChild('screenReport', { static: true }) screenReportRef: ElementRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches Loan Action Data from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -43,13 +52,7 @@ export class LoanScreenReportsComponent implements OnInit { * @param {DomSanitizer} sanitizer DOM Sanitizer * @param {Renderer2} renderer Renderer 2 */ - constructor( - private formBuilder: UntypedFormBuilder, - private loansService: LoansService, - private route: ActivatedRoute, - private sanitizer: DomSanitizer, - private renderer: Renderer2 - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/loans-account-close/loans-account-close.component.html b/src/app/loans/loans-view/loan-account-actions/loans-account-close/loans-account-close.component.html index 4939d03fe5..b1157675ff 100644 --- a/src/app/loans/loans-view/loan-account-actions/loans-account-close/loans-account-close.component.html +++ b/src/app/loans/loans-view/loan-account-actions/loans-account-close/loans-account-close.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Closed Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeLoanForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Closed Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/loans/loans-view/loan-account-actions/loans-account-close/loans-account-close.component.ts b/src/app/loans/loans-view/loan-account-actions/loans-account-close/loans-account-close.component.ts index aed7f7725c..5af96abef1 100644 --- a/src/app/loans/loans-view/loan-account-actions/loans-account-close/loans-account-close.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/loans-account-close/loans-account-close.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; import { LoansService } from 'app/loans/loans.service'; @@ -20,6 +20,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoansAccountCloseComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private loanService = inject(LoansService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + @Input() dataObject: any; /** Close form. */ @@ -31,6 +38,9 @@ export class LoansAccountCloseComponent implements OnInit { /** Maximum Date allowed. */ maxDate = new Date(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} systemService Loan Service. @@ -38,14 +48,7 @@ export class LoansAccountCloseComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private loanService: LoansService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.html b/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.html index 50f521baeb..7db7238b4b 100644 --- a/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.html +++ b/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.html @@ -15,45 +15,42 @@ /> - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (repaymentLoanForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - - {{ 'labels.inputs.Principal' | translate }} + @if (showDetails()) { + + + {{ 'labels.inputs.Principal' | translate }} + + + {{ dataObject.principalPortion | formatNumber }} + + + {{ 'labels.inputs.Interest' | translate }} + + + {{ dataObject.interestPortion | formatNumber }} + + + {{ 'labels.inputs.Fees' | translate }} + + + {{ dataObject.feeChargesPortion | formatNumber }} + + + {{ 'labels.inputs.Penalties' | translate }} + + + {{ dataObject.penaltyChargesPortion | formatNumber }} + - - - {{ dataObject.principalPortion | formatNumber }} - - - - {{ 'labels.inputs.Interest' | translate }} - - - - {{ dataObject.interestPortion | formatNumber }} - - - - {{ 'labels.inputs.Fees' | translate }} - - - - {{ dataObject.feeChargesPortion | formatNumber }} - - - - {{ 'labels.inputs.Penalties' | translate }} - - - - {{ dataObject.penaltyChargesPortion | formatNumber }} - - + } - - {{ 'labels.inputs.Classification' | translate }} - - - {{ classificationOption.name }} - - - + @if (isCapitalizedIncome() || isBuyDownFee()) { + + {{ 'labels.inputs.Classification' | translate }} + + @for (classificationOption of classificationOptions; track classificationOption) { + + {{ classificationOption.name }} + + } + + + } {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentType.name }} - + @for (paymentType of paymentTypes; track paymentType) { + + {{ paymentType.name }} + + } @@ -96,41 +99,39 @@ - + @if (showPaymentDetails) { {{ 'labels.inputs.Account' | translate }} # - {{ 'labels.inputs.Cheque' | translate }} # - {{ 'labels.inputs.Routing Code' | translate }} - {{ 'labels.inputs.Reciept' | translate }} # - {{ 'labels.inputs.Bank' | translate }} # - + } {{ 'labels.inputs.Note' | translate }} - - {{ 'labels.inputs.Skip Interest Refund Transaction Posting' | translate }} - + @if (showInterestRefundCheckbox()) { + + {{ 'labels.inputs.Skip Interest Refund Transaction Posting' | translate }} + + } diff --git a/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts b/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts index d19035350f..2483b48ac6 100644 --- a/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormControl } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; @@ -30,6 +30,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class MakeRepaymentComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private loanService = inject(LoansService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + @Input() dataObject: any; /** Loan Id */ loanId: string; @@ -49,6 +56,9 @@ export class MakeRepaymentComponent implements OnInit { classificationOptions: any[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} loanService Loan Service. @@ -56,14 +66,7 @@ export class MakeRepaymentComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private loanService: LoansService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.html b/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.html index 017d9cc281..72992a8f85 100644 --- a/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.html +++ b/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.html @@ -3,23 +3,27 @@ - - {{ 'labels.inputs.Transaction Date' | translate }} - - - - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (!contractTermination) { + + {{ 'labels.inputs.Transaction Date' | translate }} + + + + @if (prepayLoanForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } @@ -55,65 +59,68 @@ - - + @if (!contractTermination) { + + + } {{ 'labels.inputs.External Id' | translate }} - - {{ 'labels.inputs.Payment Type' | translate }} - - - {{ paymentType.name }} - - - - - - - - - {{ 'labels.inputs.Show Payment Details' | translate }} - - - - + @if (!contractTermination) { + + {{ 'labels.inputs.Payment Type' | translate }} + + @for (paymentType of paymentTypes; track paymentType) { + + {{ paymentType.name }} + + } + + + } + + @if (!contractTermination) { + + + + + {{ 'labels.inputs.Show Payment Details' | translate }} + + + + + } - + @if (showPaymentDetails) { {{ 'labels.inputs.Account' | translate }} # - {{ 'labels.inputs.Cheque' | translate }} # - {{ 'labels.inputs.Routing Code' | translate }} - {{ 'labels.inputs.Reciept' | translate }} # - {{ 'labels.inputs.Bank' | translate }} # - + } {{ 'labels.inputs.Note' | translate }} diff --git a/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.ts b/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.ts index 82253c563b..2017e97890 100644 --- a/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/prepay-loan/prepay-loan.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -36,6 +36,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class PrepayLoanComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private loanService = inject(LoansService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + @Input() dataObject: any; /** Loan Id */ loanId: string; @@ -58,6 +65,9 @@ export class PrepayLoanComponent implements OnInit { currency: Currency | null = null; contractTermination: boolean; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} loanService Loan Service. @@ -65,14 +75,7 @@ export class PrepayLoanComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private loanService: LoansService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/recovery-repayment/recovery-repayment.component.html b/src/app/loans/loans-view/loan-account-actions/recovery-repayment/recovery-repayment.component.html index 4f6d670058..863f3212f5 100644 --- a/src/app/loans/loans-view/loan-account-actions/recovery-repayment/recovery-repayment.component.html +++ b/src/app/loans/loans-view/loan-account-actions/recovery-repayment/recovery-repayment.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (recoveryRepaymentLoanForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentType.name }} - + @for (paymentType of paymentTypes; track paymentType) { + + {{ paymentType.name }} + + } @@ -53,32 +57,28 @@ - + @if (showPaymentDetails) { {{ 'labels.inputs.Account' | translate }} # - {{ 'labels.inputs.Cheque' | translate }} # - {{ 'labels.inputs.Routing Code' | translate }} - {{ 'labels.inputs.Reciept' | translate }} # - {{ 'labels.inputs.Bank' | translate }} # - + } {{ 'labels.inputs.Note' | translate }} diff --git a/src/app/loans/loans-view/loan-account-actions/recovery-repayment/recovery-repayment.component.ts b/src/app/loans/loans-view/loan-account-actions/recovery-repayment/recovery-repayment.component.ts index bfa2d8d978..07a00a1543 100644 --- a/src/app/loans/loans-view/loan-account-actions/recovery-repayment/recovery-repayment.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/recovery-repayment/recovery-repayment.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -34,6 +34,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecoveryRepaymentComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private loanService = inject(LoansService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + @Input() dataObject: any; /** Loan Id */ loanId: string; @@ -49,6 +56,9 @@ export class RecoveryRepaymentComponent implements OnInit { recoveryRepaymentLoanForm: UntypedFormGroup; currency: Currency | null = null; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} loanService Loan Service. @@ -56,14 +66,7 @@ export class RecoveryRepaymentComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private loanService: LoansService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/reject-loan/reject-loan.component.html b/src/app/loans/loans-view/loan-account-actions/reject-loan/reject-loan.component.html index f6e0123ea8..721a5338ac 100644 --- a/src/app/loans/loans-view/loan-account-actions/reject-loan/reject-loan.component.html +++ b/src/app/loans/loans-view/loan-account-actions/reject-loan/reject-loan.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Rejected Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (rejectLoanForm.controls.rejectedOnDate.hasError('required')) { + + {{ 'labels.inputs.Rejected Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/loans/loans-view/loan-account-actions/reject-loan/reject-loan.component.ts b/src/app/loans/loans-view/loan-account-actions/reject-loan/reject-loan.component.ts index 6835b6c4f7..450077fc36 100644 --- a/src/app/loans/loans-view/loan-account-actions/reject-loan/reject-loan.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/reject-loan/reject-loan.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RejectLoanComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private router = inject(Router); + private route = inject(ActivatedRoute); + private loanService = inject(LoansService); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + /** Loan Id. */ loanId: any; /** Reject Loan form. */ @@ -32,6 +39,9 @@ export class RejectLoanComponent implements OnInit { /** Maximum Date allowed. */ maxDate = new Date(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieve data from `Resolver`. * @param formBuilder Form Builder. @@ -39,14 +49,7 @@ export class RejectLoanComponent implements OnInit { * @param route Activated Route. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private router: Router, - private route: ActivatedRoute, - private loanService: LoansService, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/undo-approval/undo-approval.component.ts b/src/app/loans/loans-view/loan-account-actions/undo-approval/undo-approval.component.ts index c227307d8e..8c6b7ad3f4 100644 --- a/src/app/loans/loans-view/loan-account-actions/undo-approval/undo-approval.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/undo-approval/undo-approval.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormControl, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -18,20 +18,23 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UndoApprovalComponent implements OnInit { + private loanService = inject(LoansService); + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Form Controller. */ note: UntypedFormControl; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param loanService Loan Service. * @param route Activated Route. * @param router Router. */ - constructor( - private loanService: LoansService, - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router - ) {} + constructor() {} ngOnInit() { this.note = this.formBuilder.control(''); diff --git a/src/app/loans/loans-view/loan-account-actions/undo-disbursal/undo-disbursal.component.ts b/src/app/loans/loans-view/loan-account-actions/undo-disbursal/undo-disbursal.component.ts index dc649c14ff..4ec82d743a 100644 --- a/src/app/loans/loans-view/loan-account-actions/undo-disbursal/undo-disbursal.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/undo-disbursal/undo-disbursal.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormControl, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -21,6 +21,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UndoDisbursalComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private loansService = inject(LoansService); + private router = inject(Router); + private route = inject(ActivatedRoute); + @Input() actionName: string; /** Loan ID. */ @@ -28,18 +33,16 @@ export class UndoDisbursalComponent implements OnInit { /** Undo disbursal form. */ note: UntypedFormControl; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} loansService Loans Service. * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private loansService: LoansService, - private router: Router, - private route: ActivatedRoute - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/undo-write-off/undo-write-off.component.ts b/src/app/loans/loans-view/loan-account-actions/undo-write-off/undo-write-off.component.ts index ba17220776..6a33564ca7 100644 --- a/src/app/loans/loans-view/loan-account-actions/undo-write-off/undo-write-off.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/undo-write-off/undo-write-off.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; @@ -24,6 +24,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UndoWriteOffComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private loanService = inject(LoansService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + private alertService = inject(AlertService); + @Input() dataObject: any; /** Loan Id */ loanId: string; @@ -34,6 +42,9 @@ export class UndoWriteOffComponent implements OnInit { /** Undo Write-off Loan Form */ undoWriteOffLoanForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} loanService Loan Service. @@ -41,15 +52,7 @@ export class UndoWriteOffComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private loanService: LoansService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService, - private alertService: AlertService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/view-guarantors/view-guarantors.component.html b/src/app/loans/loans-view/loan-account-actions/view-guarantors/view-guarantors.component.html index e5f8106685..8e3a55fabf 100644 --- a/src/app/loans/loans-view/loan-account-actions/view-guarantors/view-guarantors.component.html +++ b/src/app/loans/loans-view/loan-account-actions/view-guarantors/view-guarantors.component.html @@ -7,10 +7,10 @@ {{ 'labels.inputs.Disbursement Date' | translate }} - {{ dataObject.timeline.actualDisbursementDate - }}{{ - 'labels.inputs.Not Available' | translate - }} + {{ dataObject.timeline.actualDisbursementDate }} + @if (!dataObject.timeline.actualDisbursementDate) { + {{ 'labels.inputs.Not Available' | translate }} + } @@ -21,10 +21,14 @@ {{ 'labels.inputs.Loan Officer' | translate }} {{ dataObject.loanOfficerName }} - {{ 'labels.inputs.Unassigned' | translate }} - - - + @if (!dataObject.loanOfficerName) { + {{ 'labels.inputs.Unassigned' | translate }} + } + @if (dataObject.loanOfficerName) { + + + + } @@ -44,7 +48,9 @@ {{ 'labels.inputs.Loan Purpose' | translate }} {{ dataObject.loanPurposeName }} - {{ 'labels.inputs.Not Provided' | translate }} + @if (!dataObject.loanPurposeName) { + {{ 'labels.inputs.Not Provided' | translate }} + } @@ -63,7 +69,9 @@ {{ 'labels.inputs.Arrears By' | translate }} {{ dataObject.summary?.totalOverdue | formatNumber }} - {{ 'labels.inputs.Not Provided' | translate }} + @if (dataObject.summary?.totalOverdue < 0) { + {{ 'labels.inputs.Not Provided' | translate }} + } @@ -71,129 +79,139 @@ - - - - - - {{ 'labels.heading.Guarantors Details' | translate }} + @if (guarantorDetails) { + + + + + + {{ 'labels.heading.Guarantors Details' | translate }} + - - - - - {{ showDeletedGuarantorsAccounts ? 'Hide Deleted Guarantors' : 'Show Deleted Guarantors' }} - + + + + {{ showDeletedGuarantorsAccounts ? 'Hide Deleted Guarantors' : 'Show Deleted Guarantors' }} + + + + + {{ 'labels.inputs.name' | translate }} + + @if (!guarantor.guarantorFundingDetails) { + {{ guarantor.firstname }} {{ guarantor.lastname }} + } + + + + {{ 'labels.inputs.Relationship' | translate }} + + @if (!guarantor.guarantorFundingDetails) { + + {{ guarantor.clientRelationshipType?.name }} + + } + + + + {{ 'labels.inputs.Guarantor Type' | translate }} + + @if (!guarantor.guarantorFundingDetails) { + + {{ guarantor.guarantorType.value }} + + } + + + + {{ 'labels.inputs.Deposit Account' | translate }} + + @if (!guarantor.guarantorFundingDetails) { + + } + + + + {{ 'labels.inputs.Amount' | translate }} + + @if (!guarantor.guarantorFundingDetails) { + + } + + + + {{ 'labels.inputs.Remaining Amount' | translate }} + + @if (!guarantor.guarantorFundingDetails) { + + } + + + + {{ 'labels.inputs.Status' | translate }} + + @if (!guarantor.guarantorFundingDetails) { + + @if (guarantor.status) { + + {{ 'labels.inputs.Active' | translate }} + + } + @if (!guarantor.status) { + + {{ 'labels.inputs.Deleted' | translate }} + + } + + } + + + + {{ 'labels.inputs.Action' | translate }} + + @if (!guarantor.guarantorFundingDetails) { + + + + + @if (guarantor.status && guarantor.guarantorType.id === 3 && guarantor.id) { + + + + } + @if (guarantor.status) { + + + + + + } + + } + + + + + - - - - {{ 'labels.inputs.name' | translate }} - - - {{ guarantor.firstname }} {{ guarantor.lastname }} - - - - - - {{ 'labels.inputs.Relationship' | translate }} - - - {{ guarantor.clientRelationshipType?.name }} - - - - - - {{ 'labels.inputs.Guarantor Type' | translate }} - - - {{ guarantor.guarantorType.value }} - - - - - - {{ 'labels.inputs.Deposit Account' | translate }} - - - - - - - {{ 'labels.inputs.Amount' | translate }} - - - - - - - {{ 'labels.inputs.Remaining Amount' | translate }} - - - - - - - {{ 'labels.inputs.Status' | translate }} - - - - {{ 'labels.inputs.Active' | translate }} - - - {{ 'labels.inputs.Deleted' | translate }} - - - - - - - {{ 'labels.inputs.Action' | translate }} - - - - - - - - - - - - - - - - - - - - - + } diff --git a/src/app/loans/loans-view/loan-account-actions/view-guarantors/view-guarantors.component.ts b/src/app/loans/loans-view/loan-account-actions/view-guarantors/view-guarantors.component.ts index 7491640cd7..8e7a4b377a 100644 --- a/src/app/loans/loans-view/loan-account-actions/view-guarantors/view-guarantors.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/view-guarantors/view-guarantors.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -54,6 +54,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewGuarantorsComponent implements OnInit { + dialog = inject(MatDialog); + loansService = inject(LoansService); + private route = inject(ActivatedRoute); + private router = inject(Router); + @Input() dataObject: any; guarantorDetails: any; showDeletedGuarantorsAccounts = false; @@ -69,18 +74,16 @@ export class ViewGuarantorsComponent implements OnInit { 'action' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** View and perform various action on existing list of guarantors * @param {MatDialog} dialog Dialog * @param {LoansService} loansService Loans Service * @param {route} Route Route * @param {router} Router Router */ - constructor( - public dialog: MatDialog, - public loansService: LoansService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/waive-interest/waive-interest.component.html b/src/app/loans/loans-view/loan-account-actions/waive-interest/waive-interest.component.html index 48b88bb416..3b5ed5e7b1 100644 --- a/src/app/loans/loans-view/loan-account-actions/waive-interest/waive-interest.component.html +++ b/src/app/loans/loans-view/loan-account-actions/waive-interest/waive-interest.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Interest Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (loanInterestForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Interest Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Withdrawn On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (withdrawnByClientLoanForm.controls.withdrawnOnDate.hasError('required')) { + + {{ 'labels.inputs.Withdrawn On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/loans/loans-view/loan-account-actions/withdrawn-by-client/withdrawn-by-client.component.ts b/src/app/loans/loans-view/loan-account-actions/withdrawn-by-client/withdrawn-by-client.component.ts index a938f9250a..928d193287 100644 --- a/src/app/loans/loans-view/loan-account-actions/withdrawn-by-client/withdrawn-by-client.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/withdrawn-by-client/withdrawn-by-client.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, FormControl, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class WithdrawnByClientComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private loanService = inject(LoansService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + @Input() dataObject: any; /** Loan Id */ loanId: string; @@ -33,6 +40,9 @@ export class WithdrawnByClientComponent implements OnInit { /** Withdrawn By Applicant Loan Form */ withdrawnByClientLoanForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} loanService Loan Service. @@ -40,14 +50,7 @@ export class WithdrawnByClientComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private loanService: LoansService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-account-actions/write-off-page/write-off-page.component.html b/src/app/loans/loans-view/loan-account-actions/write-off-page/write-off-page.component.html index e5785f3542..0b1db01ae7 100644 --- a/src/app/loans/loans-view/loan-account-actions/write-off-page/write-off-page.component.html +++ b/src/app/loans/loans-view/loan-account-actions/write-off-page/write-off-page.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Write Off Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (writeOffForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Write Off Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -29,9 +31,11 @@ {{ 'labels.inputs.Reason for Write-Off' | translate }} - - {{ writeOffReason.name }} - + @for (writeOffReason of writeOffReasonOptions; track writeOffReason) { + + {{ writeOffReason.name }} + + } diff --git a/src/app/loans/loans-view/loan-account-actions/write-off-page/write-off-page.component.ts b/src/app/loans/loans-view/loan-account-actions/write-off-page/write-off-page.component.ts index 90a35587c3..0ebf0539ba 100644 --- a/src/app/loans/loans-view/loan-account-actions/write-off-page/write-off-page.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/write-off-page/write-off-page.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class WriteOffPageComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private loanService = inject(LoansService); + private dateUtils = inject(Dates); + private router = inject(Router); + private settingsService = inject(SettingsService); + @Input() dataObject: any; /** Loan Id */ loanId: string; @@ -35,6 +42,9 @@ export class WriteOffPageComponent implements OnInit { writeOffForm: UntypedFormGroup; writeOffReasonOptions: any[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Get data from `Resolver`. * @param {FormBuilder} formBuilder Form Builder. @@ -44,14 +54,7 @@ export class WriteOffPageComponent implements OnInit { * @param {Router} router Router. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private loanService: LoansService, - private dateUtils: Dates, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.loanId = this.route.snapshot.params['loanId']; } diff --git a/src/app/loans/loans-view/loan-buy-down-fees-tab/loan-buy-down-fees-tab.component.html b/src/app/loans/loans-view/loan-buy-down-fees-tab/loan-buy-down-fees-tab.component.html index 308bc2581e..07ddb3e2aa 100644 --- a/src/app/loans/loans-view/loan-buy-down-fees-tab/loan-buy-down-fees-tab.component.html +++ b/src/app/loans/loans-view/loan-buy-down-fees-tab/loan-buy-down-fees-tab.component.html @@ -1,60 +1,61 @@ {{ 'labels.heading.Buy Down Fees' | translate }} - - - - - - - {{ 'labels.messages.No Data Found' | translate }} + @if (isLoading) { + + - - 0"> - - {{ 'labels.heading.Date' | translate }} - - {{ item.buyDownFeeDate | dateFormat }} - - - - - {{ 'labels.heading.Fee Amount' | translate }} - - {{ item.buyDownFeeAmount | formatNumber: '0.00' }} - - - - - {{ 'labels.heading.Amortized Amount' | translate }} - - {{ item.amortizedAmount | formatNumber: '0.00' }} - - - - - {{ 'labels.heading.Not Yet Amortized Amount' | translate }} - - {{ item.notYetAmortizedAmount | formatNumber: '0.00' }} - - - - - {{ 'labels.heading.Adjusted Amount' | translate }} - - {{ item.adjustedAmount | formatNumber: '0.00' }} - - - - - {{ 'labels.heading.Charged Off Amount' | translate }} - - {{ item.chargedOffAmount | formatNumber: '0.00' }} - - - - - - - + } + + @if (!isLoading) { + + @if (buyDownFeeData.length === 0) { + + {{ 'labels.messages.No Data Found' | translate }} + + } + @if (buyDownFeeData.length > 0) { + + + {{ 'labels.heading.Date' | translate }} + + {{ item.buyDownFeeDate | dateFormat }} + + + + {{ 'labels.heading.Fee Amount' | translate }} + + {{ item.buyDownFeeAmount | formatNumber: '0.00' }} + + + + {{ 'labels.heading.Amortized Amount' | translate }} + + {{ item.amortizedAmount | formatNumber: '0.00' }} + + + + {{ 'labels.heading.Not Yet Amortized Amount' | translate }} + + {{ item.notYetAmortizedAmount | formatNumber: '0.00' }} + + + + {{ 'labels.heading.Adjusted Amount' | translate }} + + {{ item.adjustedAmount | formatNumber: '0.00' }} + + + + {{ 'labels.heading.Charged Off Amount' | translate }} + + {{ item.chargedOffAmount | formatNumber: '0.00' }} + + + + + + } + + } diff --git a/src/app/loans/loans-view/loan-buy-down-fees-tab/loan-buy-down-fees-tab.component.ts b/src/app/loans/loans-view/loan-buy-down-fees-tab/loan-buy-down-fees-tab.component.ts index 0e791156ff..01a382a2a2 100644 --- a/src/app/loans/loans-view/loan-buy-down-fees-tab/loan-buy-down-fees-tab.component.ts +++ b/src/app/loans/loans-view/loan-buy-down-fees-tab/loan-buy-down-fees-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatCell, MatCellDef, @@ -39,6 +39,9 @@ import { DateFormatPipe } from '@pipes/date-format.pipe'; ] }) export class LoanBuyDownFeesTabComponent implements OnInit { + private route = inject(ActivatedRoute); + private loansService = inject(LoansService); + buyDownFeeData: BuyDownFeeAmortizationDetails[] = []; loanId: string; isLoading = true; @@ -52,10 +55,10 @@ export class LoanBuyDownFeesTabComponent implements OnInit { 'chargedOffAmount' ]; - constructor( - private route: ActivatedRoute, - private loansService: LoansService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.getLoanId(); diff --git a/src/app/loans/loans-view/loan-collateral-tab/loan-collateral-tab.component.html b/src/app/loans/loans-view/loan-collateral-tab/loan-collateral-tab.component.html index c4b205da31..7f9a789680 100644 --- a/src/app/loans/loans-view/loan-collateral-tab/loan-collateral-tab.component.html +++ b/src/app/loans/loans-view/loan-collateral-tab/loan-collateral-tab.component.html @@ -8,49 +8,49 @@ {{ 'labels.inputs.Loan Collateral Details' | translate }} - 0"> - - - - - {{ 'labels.inputs.Number of Collaterals' | translate }} : - - - {{ loanCollaterals?.length | formatNumber }} - - - {{ 'labels.inputs.Total Amount' | translate }} : - - - {{ totalAmount | formatNumber }} - - - - - - - 0" [dataSource]="loanCollaterals"> - - {{ 'labels.inputs.ID' | translate }} - {{ ele.id }} - - - - {{ 'labels.inputs.Currency' | translate }} - {{ ele.currency.code }} - - - - {{ 'labels.inputs.Description' | translate }} - {{ ele.description }} - - - - {{ 'labels.inputs.Value' | translate }} - {{ ele.value | formatNumber }} - + @if (loanCollaterals?.length > 0) { + + + + + + {{ 'labels.inputs.Number of Collaterals' | translate }} : + + + {{ loanCollaterals?.length | formatNumber }} + + + {{ 'labels.inputs.Total Amount' | translate }} : + + + {{ totalAmount | formatNumber }} + + + + + + } - - - + @if (loanCollaterals?.length > 0) { + + + {{ 'labels.inputs.ID' | translate }} + {{ ele.id }} + + + {{ 'labels.inputs.Currency' | translate }} + {{ ele.currency.code }} + + + {{ 'labels.inputs.Description' | translate }} + {{ ele.description }} + + + {{ 'labels.inputs.Value' | translate }} + {{ ele.value | formatNumber }} + + + + + } diff --git a/src/app/loans/loans-view/loan-collateral-tab/loan-collateral-tab.component.ts b/src/app/loans/loans-view/loan-collateral-tab/loan-collateral-tab.component.ts index edde01c226..e4d81576b4 100644 --- a/src/app/loans/loans-view/loan-collateral-tab/loan-collateral-tab.component.ts +++ b/src/app/loans/loans-view/loan-collateral-tab/loan-collateral-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { MatTable, @@ -35,6 +35,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanCollateralTabComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Loan Collateral Details */ loanCollaterals: any[] = []; /** Columns to be displayed in collateral table. */ @@ -47,11 +49,14 @@ export class LoanCollateralTabComponent implements OnInit { totalAmount: number; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the loans data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { loanCollaterals: any }) => { this.loanCollaterals = data.loanCollaterals; }); diff --git a/src/app/loans/loans-view/loan-deferred-income-tab/loan-deferred-income-tab.component.html b/src/app/loans/loans-view/loan-deferred-income-tab/loan-deferred-income-tab.component.html index b518d537f9..146a9f234f 100644 --- a/src/app/loans/loans-view/loan-deferred-income-tab/loan-deferred-income-tab.component.html +++ b/src/app/loans/loans-view/loan-deferred-income-tab/loan-deferred-income-tab.component.html @@ -1,36 +1,34 @@ {{ 'labels.inputs.Deferred income' | translate }} - {{ 'labels.menus.Capitalized Income' | translate }} - 0"> - - {{ 'labels.inputs.Amount' | translate }} - - {{ item.amount | formatNumber }} - - - - - {{ 'labels.inputs.Amortized Amount' | translate }} - - {{ item.amortizedAmount | formatNumber }} - - - - - {{ 'labels.inputs.Unrecognized Amount' | translate }} - - {{ item.unrecognizedAmount | formatNumber }} - - - - - {{ 'labels.inputs.Adjustment Amount' | translate }} - - {{ item.amountAdjustment | formatNumber: '-' }} - - - - - - + @if (capitalizedIncomeData.length > 0) { + + + {{ 'labels.inputs.Amount' | translate }} + + {{ item.amount | formatNumber }} + + + + {{ 'labels.inputs.Amortized Amount' | translate }} + + {{ item.amortizedAmount | formatNumber }} + + + + {{ 'labels.inputs.Unrecognized Amount' | translate }} + + {{ item.unrecognizedAmount | formatNumber }} + + + + {{ 'labels.inputs.Adjustment Amount' | translate }} + + {{ item.amountAdjustment | formatNumber: '-' }} + + + + + + } diff --git a/src/app/loans/loans-view/loan-deferred-income-tab/loan-deferred-income-tab.component.ts b/src/app/loans/loans-view/loan-deferred-income-tab/loan-deferred-income-tab.component.ts index 0aa9625eae..b9f3d98d88 100644 --- a/src/app/loans/loans-view/loan-deferred-income-tab/loan-deferred-income-tab.component.ts +++ b/src/app/loans/loans-view/loan-deferred-income-tab/loan-deferred-income-tab.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatCell, MatCellDef, @@ -36,6 +36,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanDeferredIncomeTabComponent { + private route = inject(ActivatedRoute); + capitalizedIncomeData: LoanCapitalizedIncomeData[] = []; loanId: any; @@ -47,7 +49,10 @@ export class LoanDeferredIncomeTabComponent { 'amountAdjustment' ]; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.loanId = this.route.parent.parent.snapshot.params['loanId']; this.capitalizedIncomeData = []; diff --git a/src/app/loans/loans-view/loan-delinquency-tags-tab/loan-delinquency-tags-tab.component.html b/src/app/loans/loans-view/loan-delinquency-tags-tab/loan-delinquency-tags-tab.component.html index d0f184d2da..f83aa61292 100644 --- a/src/app/loans/loans-view/loan-delinquency-tags-tab/loan-delinquency-tags-tab.component.html +++ b/src/app/loans/loans-view/loan-delinquency-tags-tab/loan-delinquency-tags-tab.component.html @@ -1,120 +1,124 @@ {{ 'labels.heading.Loan Delinquency Tags' | translate }} - 0"> - - {{ 'labels.inputs.Delinquency Classification' | translate }} - - {{ item.delinquencyRange.classification }} - ( {{ item.delinquencyRange.minimumAgeDays }} - {{ item.delinquencyRange.maximumAgeDays }} ) - ( {{ item.delinquencyRange.minimumAgeDays }} ) - - - - - {{ 'labels.inputs.Added On' | translate }} - - - {{ item.addedOnDate | dateFormat }} - - - - - - {{ 'labels.inputs.Lifted On' | translate }} - - - {{ item.liftedOnDate | dateFormat }} - - - - - - - - - 0"> - {{ 'labels.heading.Loan Delinquency Installment Tags' | translate }} - - + @if (loanDelinquencyTags.length > 0) { + {{ 'labels.inputs.Delinquency Classification' | translate }} - {{ item.classification }} - - - - {{ 'labels.inputs.Days' | translate }} - {{ item.minimumAgeDays | formatNumber }} - - - - {{ 'labels.inputs.Amount' | translate }} - {{ item.delinquentAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + {{ item.delinquencyRange.classification }} + @if (item.delinquencyRange.maximumAgeDays) { + ( {{ item.delinquencyRange.minimumAgeDays }} - {{ item.delinquencyRange.maximumAgeDays }} ) + } + @if (!item.delinquencyRange.maximumAgeDays) { + ( {{ item.delinquencyRange.minimumAgeDays }} ) + } - - - - - - - - - {{ 'labels.buttons.Pause Delinquency Classification' | translate }} - - - - 0" class="m-t-10"> - {{ 'labels.heading.Loan Delinquency Actions' | translate }} - - - - {{ 'labels.inputs.Action' | translate }} - {{ item.action }} - - - - {{ 'labels.inputs.Start Date' | translate }} - {{ item.startDate | dateFormat }} - - - - {{ 'labels.inputs.End Date' | translate }} - {{ item.endDate | dateFormat }} - - - - {{ 'labels.inputs.Created On' | translate }} - {{ item.createdOn | datetimeFormat }} + + {{ 'labels.inputs.Added On' | translate }} + + @if (item.addedOnDate) { + + {{ item.addedOnDate | dateFormat }} + + } + - - - {{ 'labels.inputs.Actions' | translate }} + + {{ 'labels.inputs.Lifted On' | translate }} - - - - - + @if (item.liftedOnDate) { + + {{ item.liftedOnDate | dateFormat }} + + } - - - + + - + } + + @if (installmentLevelDelinquency.length > 0) { + + {{ 'labels.heading.Loan Delinquency Installment Tags' | translate }} + + + {{ 'labels.inputs.Delinquency Classification' | translate }} + {{ item.classification }} + + + {{ 'labels.inputs.Days' | translate }} + {{ item.minimumAgeDays | formatNumber }} + + + {{ 'labels.inputs.Amount' | translate }} + + {{ item.delinquentAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + + + + + + + } + + @if (allowPause) { + + + {{ 'labels.buttons.Pause Delinquency Classification' | translate }} + + + } + + @if (loanDelinquencyActions.length > 0) { + + {{ 'labels.heading.Loan Delinquency Actions' | translate }} + + + {{ 'labels.inputs.Action' | translate }} + {{ item.action }} + + + {{ 'labels.inputs.Start Date' | translate }} + {{ item.startDate | dateFormat }} + + + {{ 'labels.inputs.End Date' | translate }} + {{ item.endDate | dateFormat }} + + + {{ 'labels.inputs.Created On' | translate }} + {{ item.createdOn | datetimeFormat }} + + + {{ 'labels.inputs.Actions' | translate }} + + @if (isCurrentAndPauseAction(item)) { + + + + + + } + + + + + + + } diff --git a/src/app/loans/loans-view/loan-delinquency-tags-tab/loan-delinquency-tags-tab.component.ts b/src/app/loans/loans-view/loan-delinquency-tags-tab/loan-delinquency-tags-tab.component.ts index b0488d496c..a0ee798d60 100644 --- a/src/app/loans/loans-view/loan-delinquency-tags-tab/loan-delinquency-tags-tab.component.ts +++ b/src/app/loans/loans-view/loan-delinquency-tags-tab/loan-delinquency-tags-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; @@ -14,7 +14,7 @@ import { import { SettingsService } from 'app/settings/settings.service'; import { ConfirmationDialogComponent } from 'app/shared/confirmation-dialog/confirmation-dialog.component'; import { Currency } from 'app/shared/models/general.model'; -import { NgIf, NgClass, CurrencyPipe } from '@angular/common'; +import { NgClass, CurrencyPipe } from '@angular/common'; import { MatTable, MatColumnDef, @@ -60,6 +60,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanDelinquencyTagsTabComponent implements OnInit { + private route = inject(ActivatedRoute); + private loansServices = inject(LoansService); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + private translateService = inject(TranslateService); + dialog = inject(MatDialog); + loanDelinquencyTags: LoanDelinquencyTags[] = []; loanDelinquencyActions: LoanDelinquencyAction[] = []; currentLoanDelinquencyAction: LoanDelinquencyAction | null; @@ -89,14 +96,10 @@ export class LoanDelinquencyTagsTabComponent implements OnInit { locale: string; dateFormat: string; - constructor( - private route: ActivatedRoute, - private loansServices: LoansService, - private dateUtils: Dates, - private settingsService: SettingsService, - private translateService: TranslateService, - public dialog: MatDialog - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.loanId = this.route.parent.parent.snapshot.params['loanId']; this.route.parent.data.subscribe( diff --git a/src/app/loans/loans-view/loan-documents-tab/loan-documents-tab.component.ts b/src/app/loans/loans-view/loan-documents-tab/loan-documents-tab.component.ts index b0119b0868..8ca3a92b1a 100644 --- a/src/app/loans/loans-view/loan-documents-tab/loan-documents-tab.component.ts +++ b/src/app/loans/loans-view/loan-documents-tab/loan-documents-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; /** Custom Services */ @@ -22,21 +22,24 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanDocumentsTabComponent implements OnInit { + private route = inject(ActivatedRoute); + private loansService = inject(LoansService); + private settingsService = inject(SettingsService); + /** Stores the resolved loan documents data */ entityDocuments: any; /** Loan account Id */ entityId: string; entityType = 'loans'; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the loans data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor( - private route: ActivatedRoute, - private loansService: LoansService, - private settingsService: SettingsService - ) { + constructor() { this.entityId = this.route.parent.snapshot.params['loanId']; this.route.data.subscribe((data: { loanDocuments: any }) => { diff --git a/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.html b/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.html index 0e62d9c728..eabed2f2aa 100644 --- a/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.html +++ b/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.html @@ -1,62 +1,60 @@ - - {{ 'labels.heading.' + loanTermVariation.label | translate }} - - - # - {{ idx + 1 }} - - - - {{ 'labels.inputs.Start Date' | translate }} - {{ item.termVariationApplicableFrom | dateFormat }} - - - - {{ 'labels.inputs.End Date' | translate }} - {{ item.dateValue | dateFormat }} - - - - {{ 'labels.inputs.Value' | translate }} - {{ item.decimalValue | formatNumber }} - - - - {{ 'labels.inputs.Days' | translate }} - {{ item.days | formatNumber }} - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - + @for (loanTermVariation of loanTermVariationsData; track loanTermVariation) { + + {{ 'labels.heading.' + loanTermVariation.label | translate }} + + + # + {{ idx + 1 }} + + + {{ 'labels.inputs.Start Date' | translate }} + {{ item.termVariationApplicableFrom | dateFormat }} + + + {{ 'labels.inputs.End Date' | translate }} + {{ item.dateValue | dateFormat }} + + + {{ 'labels.inputs.Value' | translate }} + {{ item.decimalValue | formatNumber }} + + + {{ 'labels.inputs.Days' | translate }} + {{ item.days | formatNumber }} + + + {{ 'labels.inputs.Actions' | translate }} + + @if (allowActions(item.termType.value)) { + + + + + + + + + } + + + + + + + } diff --git a/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.ts b/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.ts index 5fffef7f43..952af8dd60 100644 --- a/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.ts +++ b/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -8,7 +8,6 @@ import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.co import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component'; import { DatepickerBase } from 'app/shared/form-dialog/formfield/model/datepicker-base'; import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base'; -import { AnyKindOfDictionary } from 'cypress/types/lodash'; import { MatTable, MatColumnDef, @@ -52,6 +51,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanTermVariationsTabComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dates = inject(Dates); + private settingsService = inject(SettingsService); + private loansService = inject(LoansService); + private dialog = inject(MatDialog); + /** Loan Term Variation Data */ loanTermVariationsData: any[] = []; loanDTermVariationsColumns: string[] = [ @@ -76,16 +82,14 @@ export class LoanTermVariationsTabComponent { invalidData: any[] = []; loanId: number; - clientId: AnyKindOfDictionary; + clientId: string; + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { + const dates = this.dates; - constructor( - private route: ActivatedRoute, - private router: Router, - private dates: Dates, - private settingsService: SettingsService, - private loansService: LoansService, - private dialog: MatDialog - ) { this.interestPausesData = []; this.clientId = this.route.parent.parent.snapshot.paramMap.get('clientId'); this.route.data.subscribe((data: { loanDetailsData: any }) => { diff --git a/src/app/loans/loans-view/loan-tranche-details/loan-tranche-details.component.html b/src/app/loans/loans-view/loan-tranche-details/loan-tranche-details.component.html index 3f851cc980..aec2525819 100644 --- a/src/app/loans/loans-view/loan-tranche-details/loan-tranche-details.component.html +++ b/src/app/loans/loans-view/loan-tranche-details/loan-tranche-details.component.html @@ -7,85 +7,92 @@ {{ 'labels.heading.Loan Tranche Details' | translate }} - - {{ 'labels.buttons.Add' | translate }} - - - {{ 'labels.buttons.Apply Changes' | translate }} - + @if (showAddTrancheButtons()) { + + {{ 'labels.buttons.Add' | translate }} + + } + @if (!pristine) { + + {{ 'labels.buttons.Apply Changes' | translate }} + + } - 0"> - - {{ 'labels.inputs.Expected Disbursement On' | translate }} - {{ ele.expectedDisbursementDate | dateFormat }} - - - - {{ 'labels.inputs.Disbursed On' | translate }} - - - {{ ele.actualDisbursementDate | dateFormat }} - - - - - - {{ 'labels.inputs.Principal' | translate }} - {{ ele.principal }} - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - - - 0"> - {{ 'labels.heading.Installment Amount Variations' | translate }}: - - - - {{ 'labels.inputs.Applicable From Date' | translate }} - {{ ele.termVariationApplicableFrom | dateFormat }} + @if (disbursementDataSource.length > 0) { + + + {{ 'labels.inputs.Expected Disbursement On' | translate }} + {{ ele.expectedDisbursementDate | dateFormat }} - - - {{ 'labels.inputs.Installment Amount' | translate }} - {{ ele.termValue }} + + {{ 'labels.inputs.Disbursed On' | translate }} + + @if (ele.actualDisbursementDate) { + + {{ ele.actualDisbursementDate | dateFormat }} + + } + - - - + + {{ 'labels.inputs.Principal' | translate }} + {{ ele.principal }} + + + {{ 'labels.inputs.Actions' | translate }} + + @if (ele.actualDisbursementDate) { + + + + } + @if (!ele.actualDisbursementDate && showActionsTrancheButtons()) { + + + + } + @if (!ele.actualDisbursementDate && showActionsTrancheButtons()) { + + + + } + + + + - + } + + @if (loanDetails.emiAmountVariations.length > 0) { + + {{ 'labels.heading.Installment Amount Variations' | translate }}: + + + {{ 'labels.inputs.Applicable From Date' | translate }} + {{ ele.termVariationApplicableFrom | dateFormat }} + + + {{ 'labels.inputs.Installment Amount' | translate }} + {{ ele.termValue }} + + + + + + } diff --git a/src/app/loans/loans-view/loan-tranche-details/loan-tranche-details.component.ts b/src/app/loans/loans-view/loan-tranche-details/loan-tranche-details.component.ts index 33c004fb60..2776cea04e 100644 --- a/src/app/loans/loans-view/loan-tranche-details/loan-tranche-details.component.ts +++ b/src/app/loans/loans-view/loan-tranche-details/loan-tranche-details.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -53,6 +53,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanTrancheDetailsComponent implements OnInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private loanServices = inject(LoansService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + loanDetails: any; return: any; status: any; @@ -77,18 +84,14 @@ export class LoanTrancheDetailsComponent implements OnInit { disallowExpectedDisbursements = false; pristine = true; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the loans data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private loanServices: LoansService, - private settingsService: SettingsService, - private dateUtils: Dates - ) { + constructor() { this.route.parent.data.subscribe((data: { loanDetailsData: any }) => { this.loanId = data.loanDetailsData.id; this.loanDetails = data.loanDetailsData; diff --git a/src/app/loans/loans-view/loans-view.component.html b/src/app/loans/loans-view/loans-view.component.html index c531dbc73e..07b91117d9 100644 --- a/src/app/loans/loans-view/loans-view.component.html +++ b/src/app/loans/loans-view/loans-view.component.html @@ -41,118 +41,147 @@ }}({{ loanDetailsData.clientAccountNo || loanDetailsData.group.accountNo }}) - - - - - {{ 'labels.inputs.Delinquency Classification' | translate }} : - - - {{ loanDetailsData?.delinquencyRange.classification }} - - - 0"> - {{ 'labels.inputs.Past Due Days' | translate }} : - {{ loanDetailsData?.delinquent.pastDueDays | formatNumber }} - - + + + @if (loanDetailsData.delinquencyRange) { + + {{ 'labels.inputs.Delinquency Classification' | translate }} : + + + {{ loanDetailsData?.delinquencyRange.classification }} + + + } + @if (loanDetailsData.delinquent && loanDetailsData.delinquent.pastDueDays > 0) { + + {{ 'labels.inputs.Past Due Days' | translate }} : + {{ loanDetailsData?.delinquent.pastDueDays | formatNumber }} + + } + @if ( loanDetailsData.delinquent && loanDetailsData.delinquent.delinquentDays > 0 && loanDetailsData.delinquent.pastDueDays !== loanDetailsData.delinquent.delinquentDays - " - > - {{ 'labels.inputs.Delinquent Days' | translate }} : - {{ loanDetailsData?.delinquent.delinquentDays | formatNumber }} + ) { + + {{ 'labels.inputs.Delinquent Days' | translate }} : + {{ loanDetailsData?.delinquent.delinquentDays | formatNumber }} + + } + + + + } + + + @if (loanDetailsData.summary) { + + {{ 'labels.heading.Account Overview' | translate }} + + + + {{ 'labels.inputs.Current Balance' | translate }} + + {{ + loanDetailsData.summary.totalOutstanding | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + @if (loanDisplayArrearsDelinquency < 2) { + + {{ 'labels.inputs.Arrears By' | translate }} + @if (loanDetailsData.summary.totalOverdue >= 0) { + + {{ + loanDetailsData.summary.totalOverdue | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + } + @if (!(loanDetailsData.summary.totalOverdue >= 0)) { + + {{ 'labels.inputs.Not Provided' | translate }} + + } + + } + @if (loanDetailsData.inArrears) { + + {{ 'labels.inputs.Arrears Since' | translate }} + {{ loanDetailsData.summary.overdueSinceDate | dateFormat }} + + } + @if (loanDetailsData.totalOverpaid && loanDetailsData.totalOverpaid > 0) { + + {{ 'labels.inputs.Overpaid By' | translate }} + + {{ loanDetailsData.totalOverpaid | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + + + } - - - - {{ 'labels.heading.Account Overview' | translate }} - - - - {{ 'labels.inputs.Current Balance' | translate }} - - {{ - loanDetailsData.summary.totalOutstanding | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Arrears By' | translate }} - = 0"> - {{ loanDetailsData.summary.totalOverdue | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - = 0)"> - {{ 'labels.inputs.Not Provided' | translate }} - - - - {{ 'labels.inputs.Arrears Since' | translate }} - {{ loanDetailsData.summary.overdueSinceDate | dateFormat }} - - 0"> - {{ 'labels.inputs.Overpaid By' | translate }} - - {{ loanDetailsData.totalOverpaid | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - - - + } - 0" - > - - - - + @if (buttonConfig.singleButtons.length > 0) { + + + + + + } - + @for (item of buttonConfig.singleButtons; track item) { {{ 'labels.menus.' + item.name | translate }} - + } - - {{ 'labels.menus.Payments' | translate }} - - - - {{ 'labels.menus.' + item.name | translate }} - - - - + @if (buttonConfig.optionsPayment.length) { + + {{ 'labels.menus.Payments' | translate }} + + @for (item of buttonConfig.optionsPayment; track item) { + + + {{ 'labels.menus.' + item.name | translate }} + + + } + + + } - - {{ 'labels.menus.More' | translate }} - - - - {{ 'labels.menus.' + item.name | translate }} - - - - + @if (buttonConfig.options.length) { + + {{ 'labels.menus.More' | translate }} + + @for (item of buttonConfig.options; track item) { + + + {{ 'labels.menus.' + item.name | translate }} + + + } + + + } @@ -177,7 +206,7 @@ {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Account Details' | translate }} - + @if (loanDetailsData.originalSchedule) { {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Original Schedule' | translate }} - + } {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Repayment Schedule' | translate }} - + @if (loanDetailsData.transactions) { {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Transactions' | translate }} - - + } + @if (loanDetailsData.enableIncomeCapitalization) { {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Deferred income' | translate }} - - + } + @if (loanDetailsData.enableBuyDownFee) { {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.heading.Buy Down Fees' | translate }} - - + } + @if (loanDetailsData.status.active) { {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Delinquency Tags' | translate }} - - + } + @if (loanDetailsData.collateral) { {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Loan Collateral Details' | translate }} - - + } + @if (loanDetailsData.multiDisburseLoan) { {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Loan Tranche Details' | translate }} - - + } + @if (loanDetailsData.loanTermVariations) { {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Term Variations' | translate }} - - 0"> + } + @if (loanDetailsData.overdueCharges.length > 0) { {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Overdue Charges' | translate }} - - + } + @if (loanDetailsData.isLoanProductLinkedToFloatingRate) { {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Floating Interest Rates' | translate }} - - + } + @if (loanDetailsData.charges) { {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Charges' | translate }} - - + } + @if (loanDetailsData.status.active || loanDetailsData.status.closed || loanDetailsData.status.overpaid) { {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Loan Reschedules' | translate }} - + } {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Notes' | translate }} - + @if (loanDetailsData.clientId) { {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.Standing Instruction' | translate }} - - + } + @if (loanDetailsData.status.active) { {{ 'labels.heading.Account Overview' | translate }} > {{ 'labels.inputs.External Asset Owner' | translate }} - - + } + @for (loanDatatable of loanDatatables; track loanDatatable) { {{ 'labels.heading.Account Overview' | translate }} > {{ loanDatatable.registeredTableName }} - + } diff --git a/src/app/loans/loans-view/loans-view.component.ts b/src/app/loans/loans-view/loans-view.component.ts index b47d2fe5d8..262540fa41 100644 --- a/src/app/loans/loans-view/loans-view.component.ts +++ b/src/app/loans/loans-view/loans-view.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, NavigationExtras, Router, RouterLinkActive, RouterOutlet } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -67,6 +67,12 @@ import { LoanProducts } from 'app/products/loan-products/loan-products'; ] }) export class LoansViewComponent implements OnInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + loansService = inject(LoansService); + private translateService = inject(TranslateService); + dialog = inject(MatDialog); + /** Loan Details Data */ loanDetailsData: any; /** Loan Datatables */ @@ -94,13 +100,12 @@ export class LoansViewComponent implements OnInit { loanReAged = false; loanReAmortized = false; - constructor( - private route: ActivatedRoute, - private router: Router, - public loansService: LoansService, - private translateService: TranslateService, - public dialog: MatDialog - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { + const loansService = this.loansService; + this.route.data.subscribe( (data: { loanDetailsData: any; loanDatatables: any; loanArrearsDelinquencyConfig: any }) => { this.loanDetailsData = data.loanDetailsData; diff --git a/src/app/loans/loans-view/notes-tab/notes-tab.component.ts b/src/app/loans/loans-view/notes-tab/notes-tab.component.ts index d20016f799..d4f48f6e47 100644 --- a/src/app/loans/loans-view/notes-tab/notes-tab.component.ts +++ b/src/app/loans/loans-view/notes-tab/notes-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; /** Custom Components */ @@ -19,15 +19,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class NotesTabComponent implements OnInit { + private route = inject(ActivatedRoute); + private loansService = inject(LoansService); + private authenticationService = inject(AuthenticationService); + entityId: string; username: string; entityNotes: any; - constructor( - private route: ActivatedRoute, - private loansService: LoansService, - private authenticationService: AuthenticationService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { const savedCredentials = this.authenticationService.getCredentials(); this.username = savedCredentials.username; this.entityId = this.route.parent.snapshot.params['loanId']; diff --git a/src/app/loans/loans-view/original-schedule-tab/original-schedule-tab.component.ts b/src/app/loans/loans-view/original-schedule-tab/original-schedule-tab.component.ts index 8f057a00b3..b66f10d4bf 100644 --- a/src/app/loans/loans-view/original-schedule-tab/original-schedule-tab.component.ts +++ b/src/app/loans/loans-view/original-schedule-tab/original-schedule-tab.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Currency } from 'app/shared/models/general.model'; import { @@ -50,6 +50,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class OriginalScheduleTabComponent { + private route = inject(ActivatedRoute); + /** Loan Details Data */ originalScheduleDetails: any; /** Columns to be displayed in original schedule table. */ @@ -66,11 +68,14 @@ export class OriginalScheduleTabComponent { currency: Currency | null = null; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the loans with associations data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.parent.data.subscribe((data: { loanDetailsData: any }) => { this.currency = data.loanDetailsData.currency; this.originalScheduleDetails = data.loanDetailsData.originalSchedule; diff --git a/src/app/loans/loans-view/overdue-charges-tab/overdue-charges-tab.component.ts b/src/app/loans/loans-view/overdue-charges-tab/overdue-charges-tab.component.ts index 632390c125..2c633efb10 100644 --- a/src/app/loans/loans-view/overdue-charges-tab/overdue-charges-tab.component.ts +++ b/src/app/loans/loans-view/overdue-charges-tab/overdue-charges-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -45,6 +45,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class OverdueChargesTabComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Stores the resolved loan data */ loanDetails: any; /** Stores the overdue data */ @@ -65,11 +67,14 @@ export class OverdueChargesTabComponent implements OnInit { /** Sorter for codes table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the loans data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.parent.data.subscribe((data: { loanDetailsData: any }) => { this.loanDetails = data.loanDetailsData; }); diff --git a/src/app/loans/loans-view/repayment-schedule-tab/repayment-schedule-tab.component.html b/src/app/loans/loans-view/repayment-schedule-tab/repayment-schedule-tab.component.html index 4da711a54f..754a324b40 100644 --- a/src/app/loans/loans-view/repayment-schedule-tab/repayment-schedule-tab.component.html +++ b/src/app/loans/loans-view/repayment-schedule-tab/repayment-schedule-tab.component.html @@ -1,319 +1,317 @@ - - - Export to PDF - - + @if (!forEditing) { + + + Export to PDF + + + } - - - # - {{ item.period }} - - - - - {{ 'labels.inputs.Days' | translate }} - {{ item.daysInPeriod }} - Total - - - - {{ 'labels.inputs.Date' | translate }} - - {{ item.dueDate | dateFormat }} - - - - - - - {{ 'labels.inputs.Paid Date' | translate }} - - - {{ item.obligationsMetOnDate | dateFormat }} - - - - - - - - - - - - - - - {{ 'labels.inputs.Balance Of Loan' | translate }} - - - {{ item.principalLoanBalanceOutstanding | formatNumber }} - - - - - - - {{ 'labels.inputs.Principal Due' | translate }} - - - {{ item.principalDue | formatNumber }} - - - - {{ repaymentScheduleDetails.totalPrincipalExpected | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - - {{ 'labels.inputs.Interest' | translate }} - - - {{ item.interestOriginalDue | formatNumber }} - - - - {{ repaymentScheduleDetails.totalInterestCharged | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - - {{ 'labels.inputs.Fees' | translate }} - - {{ item.feeChargesDue | formatNumber }} - - - - {{ repaymentScheduleDetails.totalFeeChargesCharged | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - - - {{ 'labels.inputs.Penalties' | translate }} - - - {{ item.penaltyChargesDue | formatNumber }} - - - - {{ repaymentScheduleDetails.totalPenaltyChargesCharged | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - - {{ 'labels.inputs.Due' | translate }} - - {{ item.totalDueForPeriod | formatNumber }} - - - - {{ repaymentScheduleDetails.totalRepaymentExpected | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - - {{ 'labels.inputs.Paid' | translate }} - - {{ item.totalPaidForPeriod | formatNumber }} - - - {{ repaymentScheduleDetails.totalRepayment | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - - {{ 'labels.inputs.In advance' | translate }} - - - {{ item.totalPaidInAdvanceForPeriod | formatNumber }} - - - {{ repaymentScheduleDetails.totalPaidInAdvance | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - {{ 'labels.inputs.Late' | translate }} - - {{ item.totalPaidLateForPeriod | formatNumber }} - - - {{ repaymentScheduleDetails.totalPaidLate | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - + @if (!forEditing) { + + + # + {{ item.period }} + + + + {{ 'labels.inputs.Days' | translate }} + + {{ item.daysInPeriod }} + + Total + + + {{ 'labels.inputs.Date' | translate }} + + {{ item.dueDate | dateFormat }} + + + + + + {{ 'labels.inputs.Paid Date' | translate }} + + + {{ item.obligationsMetOnDate | dateFormat }} + + + + + + + @if (item.obligationsMetOnDate) { + + } + + + + + + {{ 'labels.inputs.Balance Of Loan' | translate }} + + + {{ item.principalLoanBalanceOutstanding | formatNumber }} + + + + + + {{ 'labels.inputs.Principal Due' | translate }} + + + {{ item.principalDue | formatNumber }} + + + + {{ + repaymentScheduleDetails.totalPrincipalExpected | currency: currencyCode : 'symbol-narrow' : '1.2-2' + }} + + + - {{ 'labels.inputs.Waived' | translate }} + {{ 'labels.inputs.Interest' | translate }} - {{ item.totalWaivedForPeriod | formatNumber }} + {{ item.interestOriginalDue | formatNumber }} - {{ repaymentScheduleDetails.totalWaived | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + + {{ repaymentScheduleDetails.totalInterestCharged | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + - - - - - - - + + + {{ 'labels.inputs.Fees' | translate }} + + + {{ item.feeChargesDue | formatNumber }} + + + + {{ repaymentScheduleDetails.totalFeeChargesCharged | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + + - - - - - {{ 'labels.inputs.Outstanding' | translate }} - - {{ item.totalOutstandingForPeriod | formatNumber }} - - {{ repaymentScheduleDetails.totalOutstanding | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} - - - - - - - - - - {{ 'labels.inputs.Loan Amount and Balance' | translate }} - - - - - - {{ 'labels.inputs.Total Cost of Loan' | translate }} - - - - - - {{ 'labels.inputs.Installment Totals' | translate }} - - - - - - - - - - - 0" - id="repaymentScheduleEdit" - > - - # - {{ item.period }} - - - - {{ 'labels.inputs.Date' | translate }} - - - {{ item.dueDate | dateFormat }} + + + {{ 'labels.inputs.Penalties' | translate }} + + + {{ item.penaltyChargesDue | formatNumber }} + + + + {{ + repaymentScheduleDetails.totalPenaltyChargesCharged | currency: currencyCode : 'symbol-narrow' : '1.2-2' + }} + + + + + + {{ 'labels.inputs.Due' | translate }} + + + {{ item.totalDueForPeriod | formatNumber }} + + + + {{ repaymentScheduleDetails.totalRepaymentExpected | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + + + + + + {{ 'labels.inputs.Paid' | translate }} + + + {{ item.totalPaidForPeriod | formatNumber }} + + + {{ repaymentScheduleDetails.totalRepayment | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + + + + + {{ 'labels.inputs.In advance' | translate }} + + + {{ item.totalPaidInAdvanceForPeriod | formatNumber }} + + + + {{ repaymentScheduleDetails.totalPaidInAdvance | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + + + + + + {{ 'labels.inputs.Late' | translate }} + + + {{ item.totalPaidLateForPeriod | formatNumber }} + + + {{ repaymentScheduleDetails.totalPaidLate | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + + + @if (isWaived) { + + + {{ 'labels.inputs.Waived' | translate }} + + + {{ item.totalWaivedForPeriod | formatNumber }} + + + {{ repaymentScheduleDetails.totalWaived | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + - - - - - - {{ 'labels.inputs.Balance Of Loan' | translate }} - - - {{ item.principalLoanBalanceOutstanding | formatNumber }} - - - - - - {{ 'labels.inputs.Principal Due' | translate }} - - - - {{ item.principalDue | formatNumber }} + } + @if (!isWaived) { + + + + - - - - - - {{ 'labels.inputs.Interest' | translate }} - - {{ item.interestOriginalDue | formatNumber }} - - - - {{ 'labels.inputs.Fees' | translate }} - {{ item.feeChargesDue | formatNumber }} - - - - - {{ 'labels.inputs.Installment Amount' | translate }} - - - - {{ item.totalDueForPeriod | formatNumber }} - - - {{ item.totalDueForPeriod | formatNumber }} - - - + } + + + {{ 'labels.inputs.Outstanding' | translate }} + + {{ item.totalOutstandingForPeriod | formatNumber }} + + {{ repaymentScheduleDetails.totalOutstanding | currency: currencyCode : 'symbol-narrow' : '1.2-2' }} + + + + + + + + {{ 'labels.inputs.Loan Amount and Balance' | translate }} + + + + + {{ 'labels.inputs.Total Cost of Loan' | translate }} + + + + + {{ 'labels.inputs.Installment Totals' | translate }} + + + + + + + + } - - {{ 'labels.inputs.Actions' | translate }} - - + + @if (forEditing && repaymentScheduleDetails.periods.length > 0) { + + + # + {{ item.period }} + + + {{ 'labels.inputs.Date' | translate }} + - - - - - - + {{ item.dueDate | dateFormat }} - - - - - - - - + + + + + {{ 'labels.inputs.Balance Of Loan' | translate }} + + + {{ item.principalLoanBalanceOutstanding | formatNumber }} + + + + + {{ 'labels.inputs.Principal Due' | translate }} + + + + {{ item.principalDue | formatNumber }} + + + + + + {{ 'labels.inputs.Interest' | translate }} + + {{ item.interestOriginalDue | formatNumber }} + + + + {{ 'labels.inputs.Fees' | translate }} + + {{ item.feeChargesDue | formatNumber }} + + + + {{ 'labels.inputs.Installment Amount' | translate }} + + + @if (!item.changed) { + + {{ item.totalDueForPeriod | formatNumber }} + + } + @if (item.changed) { + + {{ item.totalDueForPeriod | formatNumber }} + + } + + + + {{ 'labels.inputs.Actions' | translate }} + + @if (item.period && item.period + 1 < repaymentScheduleDetails.periods.length) { + + + + + + + + + + + } + + + + + + + } diff --git a/src/app/loans/loans-view/repayment-schedule-tab/repayment-schedule-tab.component.ts b/src/app/loans/loans-view/repayment-schedule-tab/repayment-schedule-tab.component.ts index 64d23abdeb..665362b276 100644 --- a/src/app/loans/loans-view/repayment-schedule-tab/repayment-schedule-tab.component.ts +++ b/src/app/loans/loans-view/repayment-schedule-tab/repayment-schedule-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; +import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -65,6 +65,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RepaymentScheduleTabComponent implements OnInit, OnChanges { + private route = inject(ActivatedRoute); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private dialog = inject(MatDialog); + /** Currency Code */ @Input() currencyCode: string; /** Loan Repayment Schedule to be Edited */ @@ -118,16 +123,14 @@ export class RepaymentScheduleTabComponent implements OnInit, OnChanges { businessDate: Date = new Date(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the loans with associations data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor( - private route: ActivatedRoute, - private settingsService: SettingsService, - private dateUtils: Dates, - private dialog: MatDialog - ) { + constructor() { this.route.parent.data.subscribe((data: { loanDetailsData: any }) => { if (data.loanDetailsData) { this.currencyCode = data.loanDetailsData.currency.code; diff --git a/src/app/loans/loans-view/reschedule-loan-tab/reschedule-loan-tab.component.html b/src/app/loans/loans-view/reschedule-loan-tab/reschedule-loan-tab.component.html index 8b9c8eba1d..f6a3e8dcaf 100644 --- a/src/app/loans/loans-view/reschedule-loan-tab/reschedule-loan-tab.component.html +++ b/src/app/loans/loans-view/reschedule-loan-tab/reschedule-loan-tab.component.html @@ -41,28 +41,30 @@ {{ 'labels.inputs.Actions' | translate }} - - - - - - - - + @if (item.statusEnum.pendingApproval) { + + + + + + + + + } diff --git a/src/app/loans/loans-view/reschedule-loan-tab/reschedule-loan-tab.component.ts b/src/app/loans/loans-view/reschedule-loan-tab/reschedule-loan-tab.component.ts index 25583e8ec3..d43d79877a 100644 --- a/src/app/loans/loans-view/reschedule-loan-tab/reschedule-loan-tab.component.ts +++ b/src/app/loans/loans-view/reschedule-loan-tab/reschedule-loan-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, Input } from '@angular/core'; +import { Component, Input, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; @@ -19,7 +19,7 @@ import { MatRowDef, MatRow } from '@angular/material/table'; -import { NgClass, NgIf } from '@angular/common'; +import { NgClass } from '@angular/common'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatTooltip } from '@angular/material/tooltip'; import { StatusLookupPipe } from '../../../pipes/status-lookup.pipe'; @@ -50,6 +50,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RescheduleLoanTabComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private loansServices = inject(LoansService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private translateService = inject(TranslateService); + private dialog = inject(MatDialog); + @Input() loanStatus: LoanStatus; loanRescheduleData: any; @@ -62,15 +70,10 @@ export class RescheduleLoanTabComponent { ]; clientId: any; - constructor( - private route: ActivatedRoute, - private router: Router, - private loansServices: LoansService, - private settingsService: SettingsService, - private dateUtils: Dates, - private translateService: TranslateService, - private dialog: MatDialog - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.clientId = this.route.parent.parent.snapshot.paramMap.get('clientId'); this.route.parent.data.subscribe((data: { loanRescheduleData: any }) => { this.loanRescheduleData = data.loanRescheduleData; diff --git a/src/app/loans/loans-view/standing-instructions-tab/standing-instructions-tab.component.html b/src/app/loans/loans-view/standing-instructions-tab/standing-instructions-tab.component.html index 11eb51061f..1d7daa912d 100644 --- a/src/app/loans/loans-view/standing-instructions-tab/standing-instructions-tab.component.html +++ b/src/app/loans/loans-view/standing-instructions-tab/standing-instructions-tab.component.html @@ -22,12 +22,14 @@ {{ 'labels.heading.All Standing Instructions' | translate }} {{ 'labels.inputs.Beneficiary' | translate }} - - {{ instruction.toClient.displayName }} - - {{ - 'labels.inputs.Own Account' | translate - }} + @if (instruction.fromClient.id !== instruction.toClient.id) { + + {{ instruction.toClient.displayName }} + + } + @if (instruction.fromClient.id === instruction.toClient.id) { + {{ 'labels.inputs.Own Account' | translate }} + } @@ -53,29 +55,33 @@ {{ 'labels.heading.All Standing Instructions' | translate }} {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - + @if (instruction.status.value !== 'Deleted') { + + + + + + } + @if (instruction.status.value !== 'Deleted') { + + + + + + } ; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves Loans Account Data from `resolve`. * @param {ActivatedRoute} route Activated Route. * @param {SettingsService} settingsService Settings Service */ - constructor( - private route: ActivatedRoute, - private loansService: LoansService, - private dialog: MatDialog, - private accountTransfersService: AccountTransfersService, - private settingsService: SettingsService - ) { + constructor() { this.route.parent.data.subscribe((data: { loanDetailsData: any }) => { this.loanDetailsData = data.loanDetailsData; }); diff --git a/src/app/loans/loans-view/transactions-tab/transactions-tab.component.html b/src/app/loans/loans-view/transactions-tab/transactions-tab.component.html index fc4b524943..c9a5e5a37a 100644 --- a/src/app/loans/loans-view/transactions-tab/transactions-tab.component.html +++ b/src/app/loans/loans-view/transactions-tab/transactions-tab.component.html @@ -1,15 +1,17 @@ - - - {{ 'labels.inputs.Hide Reversed' | translate }} - - {{ 'labels.inputs.Hide Accruals' | translate }} - - {{ 'labels.buttons.Export' | translate }} - - + @if (checkStatus()) { + + + {{ 'labels.inputs.Hide Reversed' | translate }} + + {{ 'labels.inputs.Hide Accruals' | translate }} + + {{ 'labels.buttons.Export' | translate }} + + + } @@ -143,93 +145,105 @@ - - more_vert - + @if (displaySubMenu(transaction)) { + + more_vert + + } - - - - {{ 'labels.text.View Transaction' | translate }} - - - - - - {{ 'tooltips.Create Interest Refund' | translate }} - - - - - - {{ 'tooltips.Undo Transaction' | translate }} - - - - {{ 'tooltips.View Receipts' | translate }} - - - - - - {{ 'labels.menus.Undo Re-Age' | translate }} - - - - - - {{ 'labels.menus.Undo Re-Amortize' | translate }} - - - - - - {{ 'labels.menus.Capitalized Income Adjustment' | translate }} - - - - - - {{ 'labels.menus.Buy Down Fee Adjustment' | translate }} - - - - - - {{ 'tooltips.View Journal Entries' | translate }} - - + @if (showTransaction(transaction)) { + + + + {{ 'labels.text.View Transaction' | translate }} + + + } + @if (canCreateInterestRefund(transaction)) { + + + + {{ 'tooltips.Create Interest Refund' | translate }} + + + } + @if (allowUndoTransaction(transaction)) { + + + + {{ 'tooltips.Undo Transaction' | translate }} + + + + {{ 'tooltips.View Receipts' | translate }} + + + } + @if (isReAge(transaction.type) && !transaction.manuallyReversed) { + + + + {{ 'labels.menus.Undo Re-Age' | translate }} + + + } + @if (isReAmortize(transaction.type) && !transaction.manuallyReversed) { + + + + {{ 'labels.menus.Undo Re-Amortize' | translate }} + + + } + @if (isCapitalizedIncome(transaction.type) && !transaction.manuallyReversed) { + + + + {{ 'labels.menus.Capitalized Income Adjustment' | translate }} + + + } + @if (isBuyDownFee(transaction.type) && !transaction.manuallyReversed) { + + + + {{ 'labels.menus.Buy Down Fee Adjustment' | translate }} + + + } + @if (viewJournalEntry(transaction.type)) { + + + + {{ 'tooltips.View Journal Entries' | translate }} + + + } diff --git a/src/app/loans/loans-view/transactions-tab/transactions-tab.component.ts b/src/app/loans/loans-view/transactions-tab/transactions-tab.component.ts index 37cb580376..26d9ad087c 100644 --- a/src/app/loans/loans-view/transactions-tab/transactions-tab.component.ts +++ b/src/app/loans/loans-view/transactions-tab/transactions-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { UntypedFormControl, Validators } from '@angular/forms'; import { MatPaginator } from '@angular/material/paginator'; @@ -72,6 +72,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class TransactionsTabComponent implements OnInit { + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private router = inject(Router); + private dialog = inject(MatDialog); + private loansService = inject(LoansService); + private translateService = inject(TranslateService); + private settingsService = inject(SettingsService); + private alertService = inject(AlertService); + /** Loan Details Data */ transactionsData: LoanTransaction[] = []; loanDetailsData: any; @@ -123,20 +132,14 @@ export class TransactionsTabComponent implements OnInit { @ViewChild(MatSort, { static: true }) sort: MatSort; loanId: number; + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); /** * Retrieves the loans with associations data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor( - private route: ActivatedRoute, - private dateUtils: Dates, - private router: Router, - private dialog: MatDialog, - private loansService: LoansService, - private translateService: TranslateService, - private settingsService: SettingsService, - private alertService: AlertService - ) { + constructor() { this.route.parent.parent.data.subscribe((data: { loanDetailsData: any }) => { this.loanDetailsData = data.loanDetailsData; this.status = data.loanDetailsData.status.value; diff --git a/src/app/loans/loans-view/transactions/edit-transaction/edit-transaction.component.html b/src/app/loans/loans-view/transactions/edit-transaction/edit-transaction.component.html index a6bf74e23a..fcbedd1623 100644 --- a/src/app/loans/loans-view/transactions/edit-transaction/edit-transaction.component.html +++ b/src/app/loans/loans-view/transactions/edit-transaction/edit-transaction.component.html @@ -14,10 +14,12 @@ /> - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editTransactionForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentType.name }} - + @for (paymentType of paymentTypeOptions; track paymentType) { + + {{ paymentType.name }} + + } @@ -52,30 +56,40 @@ - - {{ 'labels.inputs.Account Number' | translate }} - - + @if (editTransactionForm.controls['accountNumber']) { + + {{ 'labels.inputs.Account Number' | translate }} + + + } - - {{ 'labels.inputs.Cheque' | translate }} - - + @if (editTransactionForm.controls['checkNumber']) { + + {{ 'labels.inputs.Cheque' | translate }} + + + } - - {{ 'labels.inputs.Routing Code' | translate }} - - + @if (editTransactionForm.controls['routingCode']) { + + {{ 'labels.inputs.Routing Code' | translate }} + + + } - - {{ 'labels.inputs.Receipt Number' | translate }} - - + @if (editTransactionForm.controls['receiptNumber']) { + + {{ 'labels.inputs.Receipt Number' | translate }} + + + } - - {{ 'labels.inputs.Bank' | translate }} - - + @if (editTransactionForm.controls['bankNumber']) { + + {{ 'labels.inputs.Bank' | translate }} + + + } diff --git a/src/app/loans/loans-view/transactions/edit-transaction/edit-transaction.component.ts b/src/app/loans/loans-view/transactions/edit-transaction/edit-transaction.component.ts index f60c4f3706..e41e454ddf 100644 --- a/src/app/loans/loans-view/transactions/edit-transaction/edit-transaction.component.ts +++ b/src/app/loans/loans-view/transactions/edit-transaction/edit-transaction.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -32,6 +32,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditTransactionComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private loansService = inject(LoansService); + private settingsService = inject(SettingsService); + /** Minimum Due Date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum Due Date allowed. */ @@ -54,6 +61,9 @@ export class EditTransactionComponent implements OnInit { transactionTemplateData: any; currency: Currency; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Loan Account transaction template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -63,14 +73,7 @@ export class EditTransactionComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private loansService: LoansService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { loansAccountTransactionTemplate: any }) => { this.transactionTemplateData = data.loansAccountTransactionTemplate; if (data.loansAccountTransactionTemplate.currency) { diff --git a/src/app/loans/loans-view/transactions/export-transactions/export-transactions.component.html b/src/app/loans/loans-view/transactions/export-transactions/export-transactions.component.html index 70a715c05d..9ee2613436 100644 --- a/src/app/loans/loans-view/transactions/export-transactions/export-transactions.component.html +++ b/src/app/loans/loans-view/transactions/export-transactions/export-transactions.component.html @@ -45,4 +45,6 @@ - +@if (!hideOutput) { + +} diff --git a/src/app/loans/loans-view/transactions/export-transactions/export-transactions.component.ts b/src/app/loans/loans-view/transactions/export-transactions/export-transactions.component.ts index 1804bf856e..f241f5caf0 100644 --- a/src/app/loans/loans-view/transactions/export-transactions/export-transactions.component.ts +++ b/src/app/loans/loans-view/transactions/export-transactions/export-transactions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; import { UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, RouterLink } from '@angular/router'; @@ -24,6 +24,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ExportTransactionsComponent implements OnInit { + private sanitizer = inject(DomSanitizer); + private reportsService = inject(ReportsService); + private formBuilder = inject(UntypedFormBuilder); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -37,6 +44,9 @@ export class ExportTransactionsComponent implements OnInit { /** Loans Account Id */ loansAccountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches loans account data from grandparent's `resolve` * @param {DomSanitizer} sanitizer DOM Sanitizer @@ -46,14 +56,7 @@ export class ExportTransactionsComponent implements OnInit { * @param {ActivatedRoute} route Activated Route * @param {SettingsService} settingsService Settings Service */ - constructor( - private sanitizer: DomSanitizer, - private reportsService: ReportsService, - private formBuilder: UntypedFormBuilder, - private dateUtils: Dates, - private route: ActivatedRoute, - private settingsService: SettingsService - ) { + constructor() { this.route.parent.parent.data.subscribe((data: { loanDetailsData: any }) => { this.loansAccountId = data.loanDetailsData.accountNo; }); diff --git a/src/app/loans/loans-view/transactions/view-reciept/view-reciept.component.ts b/src/app/loans/loans-view/transactions/view-reciept/view-reciept.component.ts index 4f1e6e68a1..8b71bb5277 100644 --- a/src/app/loans/loans-view/transactions/view-reciept/view-reciept.component.ts +++ b/src/app/loans/loans-view/transactions/view-reciept/view-reciept.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @@ -18,20 +18,23 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewRecieptComponent implements OnInit { + private sanitizer = inject(DomSanitizer); + private route = inject(ActivatedRoute); + /** trusted resource url for pentaho output */ pentahoUrl: any; /** Transaction Reciept Data */ transactionRecieptData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches transaction reciept `resolve` * @param {DomSanitizer} sanitizer DOM Sanitizer * @param {ActivatedRoute} route Activated Route */ - constructor( - private sanitizer: DomSanitizer, - private route: ActivatedRoute - ) { + constructor() { this.route.data.subscribe((data: { loansTransactionReciept: any }) => { this.transactionRecieptData = data.loansTransactionReciept; }); diff --git a/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.html b/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.html index c646695f4d..1d7fbc8293 100644 --- a/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.html +++ b/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.html @@ -1,19 +1,20 @@ - - - - {{ 'Edit' | translate }} - - - - {{ 'Undo' | translate }} - - - - - {{ 'Chargeback' | translate }} - - - +@if (!transactionData.type.contra) { + + + + {{ 'Edit' | translate }} + + + {{ 'Undo' | translate }} + + + + + {{ 'Chargeback' | translate }} + + + +} @@ -29,15 +30,19 @@ {{ transactionData.id }} - - {{ 'Repayment Transaction' | translateKey: 'catalogs' }} - + @if (transactionData.toLoanTransactionRelation) { + + {{ 'Repayment Transaction' | translateKey: 'catalogs' }} + + } - - - {{ transactionData.toLoanTransactionRelation.fromLoanTransaction }} - - + @if (transactionData.toLoanTransactionRelation) { + + + {{ transactionData.toLoanTransactionRelation.fromLoanTransaction }} + + + } {{ 'Type' | translateKey: 'catalogs' }} @@ -71,64 +76,72 @@ {{ transactionData.amount | currency: transactionData.currency.code : 'symbol-narrow' : '1.2-2' }} - - {{ 'External Id' | translate }} - - - - - - - - {{ 'Classification' | translateKey: 'catalogs' }} - - - - {{ transactionData.classification.name }} - - - - - - {{ 'Linked Transactions' | translate }} - - - - - {{ 'labels.inputs.Relation Type' | translate }} - - {{ transactionRel.relationType | translate }} - - - - - {{ 'labels.inputs.Transaction' | translate }} - - - {{ transactionRel.toLoanTransaction }} - - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ transactionRel.amount | currency: transactionData.currency.code : 'symbol-narrow' : '1.2-2' }} - - - - - - - - - + @if (transactionData.externalId) { + + {{ 'External Id' | translate }} + + } + + @if (transactionData.externalId) { + + + + } + + @if (transactionData.classification) { + + {{ 'Classification' | translateKey: 'catalogs' }} + + } + + @if (transactionData.classification) { + + {{ transactionData.classification.name }} + + } + + @if (existTransactionRelations) { + + } + + @if (existTransactionRelations) { + + {{ 'Linked Transactions' | translate }} + + + + {{ 'labels.inputs.Relation Type' | translate }} + + {{ transactionRel.relationType | translate }} + + + + {{ 'labels.inputs.Transaction' | translate }} + + + {{ transactionRel.toLoanTransaction }} + + + + + {{ 'labels.inputs.Amount' | translate }} + + {{ transactionRel.amount | currency: transactionData.currency.code : 'symbol-narrow' : '1.2-2' }} + + + + + + + } + + @if (transactionData.paymentDetailData) { + + + } diff --git a/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.ts b/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.ts index 576cc451c9..f3010ac3eb 100644 --- a/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.ts +++ b/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -29,7 +29,7 @@ import { import { LoanTransactionType } from 'app/loans/models/loan-transaction-type.model'; import { AlertService } from 'app/core/alert/alert.service'; import { TranslateService } from '@ngx-translate/core'; -import { NgIf, NgClass, CurrencyPipe } from '@angular/common'; +import { NgClass, CurrencyPipe } from '@angular/common'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { ExternalIdentifierComponent } from '../../../../shared/external-identifier/external-identifier.component'; import { MatDivider } from '@angular/material/divider'; @@ -71,6 +71,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewTransactionComponent implements OnInit { + private loansService = inject(LoansService); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private router = inject(Router); + dialog = inject(MatDialog); + private translateService = inject(TranslateService); + private settingsService = inject(SettingsService); + private organizationService = inject(OrganizationService); + private alertService = inject(AlertService); + /** Transaction data. */ transactionData: any; transactionType: LoanTransactionType; @@ -96,6 +106,9 @@ export class ViewTransactionComponent implements OnInit { clientId: number; loanId: number; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Transaction data from `resolve`. * @param {LoansService} loansService Loans Service @@ -106,17 +119,7 @@ export class ViewTransactionComponent implements OnInit { * @param {SettingsService} settingsService Settings Service * @param {AlertService} alertService Alert Service */ - constructor( - private loansService: LoansService, - private route: ActivatedRoute, - private dateUtils: Dates, - private router: Router, - public dialog: MatDialog, - private translateService: TranslateService, - private settingsService: SettingsService, - private organizationService: OrganizationService, - private alertService: AlertService - ) { + constructor() { this.route.data.subscribe((data: { loansAccountTransaction: any }) => { this.transactionData = data.loansAccountTransaction; this.transactionType = this.transactionData.type; diff --git a/src/app/loans/loans-view/view-charge/view-charge.component.html b/src/app/loans/loans-view/view-charge/view-charge.component.html index 961ae039b5..323f96cf5e 100644 --- a/src/app/loans/loans-view/view-charge/view-charge.component.html +++ b/src/app/loans/loans-view/view-charge/view-charge.component.html @@ -1,54 +1,76 @@ - - - - {{ 'labels.buttons.Edit' | translate }} - - - - - {{ 'labels.buttons.Pay' | translate }} - - - +@if (loansAccountData.status.value === 'Active' && chargeData.amountOutstanding !== 0) { + - {{ 'labels.buttons.Waive' | translate }} + {{ 'labels.buttons.Edit' | translate }} - - + @if (allowPayCharge) { + + + + {{ 'labels.buttons.Pay' | translate }} + + + } + @if (allowWaive) { + + + + {{ 'labels.buttons.Waive' | translate }} + + + } + + + + {{ 'labels.buttons.Adjustment' | translate }} + + + +} + +@if (loansAccountData.status.value === 'Submitted and pending approval') { + - - {{ 'labels.buttons.Adjustment' | translate }} + + {{ 'labels.buttons.Edit' | translate }} - - - - - - - {{ 'labels.buttons.Edit' | translate }} - - - - {{ 'labels.buttons.Delete' | translate }} - - + + + {{ 'labels.buttons.Delete' | translate }} + + +} diff --git a/src/app/loans/loans-view/view-charge/view-charge.component.ts b/src/app/loans/loans-view/view-charge/view-charge.component.ts index 4ffc097170..880b8486d5 100644 --- a/src/app/loans/loans-view/view-charge/view-charge.component.ts +++ b/src/app/loans/loans-view/view-charge/view-charge.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -18,7 +18,7 @@ import { InputBase } from 'app/shared/form-dialog/formfield/model/input-base'; import { DatepickerBase } from 'app/shared/form-dialog/formfield/model/datepicker-base'; import { Dates } from 'app/core/utils/dates'; import { TranslateService } from '@ngx-translate/core'; -import { NgIf, NgClass } from '@angular/common'; +import { NgClass } from '@angular/common'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { DateFormatPipe } from '../../../pipes/date-format.pipe'; import { FormatNumberPipe } from '../../../pipes/format-number.pipe'; @@ -40,6 +40,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewChargeComponent { + private loansService = inject(LoansService); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private router = inject(Router); + private translateService = inject(TranslateService); + dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + /** Charge data. */ chargeData: any; /** Loans Account Data */ @@ -47,6 +55,9 @@ export class ViewChargeComponent { allowPayCharge = true; allowWaive = true; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Charge data from `resolve`. * @param {LoansService} loansService Loans Service @@ -56,15 +67,7 @@ export class ViewChargeComponent { * @param {Dates} dateUtils Date Utils. * @param {SettingsService} settingsService Settings Service */ - constructor( - private loansService: LoansService, - private route: ActivatedRoute, - private dateUtils: Dates, - private router: Router, - private translateService: TranslateService, - public dialog: MatDialog, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { loansAccountCharge: any; loanDetailsData: any }) => { this.chargeData = data.loansAccountCharge; this.allowPayCharge = this.chargeData.chargePayable && !this.chargeData.paid; diff --git a/src/app/loans/loans.service.ts b/src/app/loans/loans.service.ts index 2259bb0c7e..d5c82107af 100644 --- a/src/app/loans/loans.service.ts +++ b/src/app/loans/loans.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -15,11 +15,14 @@ import { DisbursementData } from './models/loan-account.model'; providedIn: 'root' }) export class LoansService { - constructor( - private http: HttpClient, - private settingsService: SettingsService, - private dateUtils: Dates - ) {} + private http = inject(HttpClient); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} /** * @param {string} loanId loanId of the loan. * @returns {Observable} diff --git a/src/app/loans/services/external-asset-owner.service.ts b/src/app/loans/services/external-asset-owner.service.ts index 29db09f09c..592443b881 100644 --- a/src/app/loans/services/external-asset-owner.service.ts +++ b/src/app/loans/services/external-asset-owner.service.ts @@ -1,14 +1,19 @@ import { HttpClient, HttpParams } from '@angular/common/http'; -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { Observable } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class ExternalAssetOwnerService { + private http = inject(HttpClient); + basePath = '/external-asset-owners'; - constructor(private http: HttpClient) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} /** * @param {string} loanId Loan Id diff --git a/src/app/login/login-form/login-form.component.html b/src/app/login/login-form/login-form.component.html index 1d108cfd95..f268587c17 100644 --- a/src/app/login/login-form/login-form.component.html +++ b/src/app/login/login-form/login-form.component.html @@ -1,73 +1,93 @@ - - - - - - - {{ 'labels.inputs.Username' | translate }} - - - {{ 'labels.inputs.Username' | translate }} {{ 'labels.commons.is required' | translate }} - - - - - - - - {{ 'labels.inputs.Password' | translate }} - +@if (!oidcServerEnabled) { + + + + + + + {{ 'labels.inputs.Username' | translate }} + + @if (loginForm.controls.username.hasError('required')) { + + {{ 'labels.inputs.Username' | translate }} {{ 'labels.commons.is required' | translate }} + + } + + + + + + {{ 'labels.inputs.Password' | translate }} + + @if (loginForm.controls.password.value && !loading) { + + @if (passwordInputType === 'password') { + + } + @if (passwordInputType === 'text') { + + } + + } + @if (loginForm.controls.password.hasError('required')) { + + {{ 'labels.inputs.Password' | translate }} + {{ 'labels.commons.pass is required' | translate }} + + } + + @if (loading) { + + } + + {{ 'labels.buttons.Login' | translate }} + @if (loading) { + + } + - - + {{ 'labels.links.Forgot Password?' | translate }} - - {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.pass is required' | translate }} - - - - - - - {{ 'labels.buttons.Login' | translate }} - - - - - {{ 'labels.links.Forgot Password?' | translate }} - - - - - - - - {{ 'labels.buttons.Login' | translate }} - - + - - Welcome! You are logged in. - Logout - Load Protected Data - {{ protectedData | json }} +} + +@if (oidcServerEnabled) { + + @if (!isLoggedIn) { + + + {{ 'labels.buttons.Login' | translate }} + @if (loading) { + + } + + + } + @if (isLoggedIn) { + + Welcome! You are logged in. + Logout + Load Protected Data + {{ protectedData | json }} + + } - +} diff --git a/src/app/login/login-form/login-form.component.ts b/src/app/login/login-form/login-form.component.ts index dcf93cae15..29c317e714 100644 --- a/src/app/login/login-form/login-form.component.ts +++ b/src/app/login/login-form/login-form.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { FormGroup, FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; /** rxjs Imports */ @@ -36,6 +36,10 @@ import { environment } from '../../../environments/environment'; ] }) export class LoginFormComponent implements OnInit { + private formBuilder = inject(FormBuilder); + private authenticationService = inject(AuthenticationService); + private authService = inject(AuthService); + /** Login form group. */ loginForm: FormGroup; /** Password input field type. */ @@ -46,15 +50,14 @@ export class LoginFormComponent implements OnInit { /** Whether remember me functionality is enabled */ enableRememberMe = environment.enableRememberMe === true; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {AuthenticationService} authenticationService Authentication Service. */ - constructor( - private formBuilder: FormBuilder, - private authenticationService: AuthenticationService, - private authService: AuthService - ) {} + constructor() {} /** * Creates login form. diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html index 03d17513f9..a0e0ae9167 100644 --- a/src/app/login/login.component.html +++ b/src/app/login/login.component.html @@ -1,12 +1,12 @@ @@ -30,20 +30,22 @@ {{ 'APP_NAME' | translate }} + --> - + @if (allowServerSwitch()) { + + } @@ -54,20 +56,28 @@ {{ 'APP_NAME' | translate }} - + @if (displayTenantSelector()) { + + } - + --> + @if (!resetPassword && !twoFactorAuthenticationRequired) { + + } - - + @if (resetPassword) { + + } + @if (twoFactorAuthenticationRequired) { + + } diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts index f58f9ebf45..d93724cd77 100644 --- a/src/app/login/login.component.ts +++ b/src/app/login/login.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, OnDestroy } from '@angular/core'; +import { Component, OnInit, OnDestroy, inject } from '@angular/core'; import { Router } from '@angular/router'; /** rxjs Imports */ @@ -53,6 +53,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoginComponent implements OnInit, OnDestroy { + private alertService = inject(AlertService); + private settingsService = inject(SettingsService); + private router = inject(Router); + public environment = environment; /** True if password requires a reset. */ @@ -62,15 +66,14 @@ export class LoginComponent implements OnInit, OnDestroy { /** Subscription to alerts. */ alert$: Subscription; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AlertService} alertService Alert Service. * @param {Router} router Router for navigation. */ - constructor( - private alertService: AlertService, - private settingsService: SettingsService, - private router: Router - ) {} + constructor() {} /** * Subscribes to alert event of alert service. diff --git a/src/app/login/reset-password/reset-password.component.html b/src/app/login/reset-password/reset-password.component.html index 3cdb4d7326..10486a55c9 100644 --- a/src/app/login/reset-password/reset-password.component.html +++ b/src/app/login/reset-password/reset-password.component.html @@ -9,20 +9,27 @@ {{ 'labels.inputs.Password' | translate }} - - - - - - {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.is required' | translate }} - + @if (resetPasswordForm.controls.password.value && !loading) { + + @if (passwordInputType === 'password') { + + } + @if (passwordInputType === 'text') { + + } + + } + @if (resetPasswordForm.controls.password.hasError('required')) { + + {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.is required' | translate }} + + } @@ -31,44 +38,49 @@ {{ 'labels.inputs.Confirm Password' | translate }} - - {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.is required' | translate }} - - - {{ 'labels.commons.Password should be at least' | translate }} - {{ 'labels.commons.12 characters long' | translate }} - - - {{ 'labels.commons.Password should not be more than' | translate }} - {{ 'labels.commons.50 characters long' | translate }} - - - {{ 'labels.commons.Password should include a' | translate }} - {{ 'labels.commons.numeral' | translate }} {{ 'labels.commons.and at' | translate }} - {{ 'labels.commons.least one uppercase' | translate }} ,{{ - 'labels.commons.lowercase and special character' | translate - }} - + @if (resetPasswordForm.controls.password.hasError('required')) { + + {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.is required' | translate }} + + } + @if (resetPasswordForm.controls.password.hasError('minlength')) { + + {{ 'labels.commons.Password should be at least' | translate }} + {{ 'labels.commons.12 characters long' | translate }} + + } + @if (resetPasswordForm.controls.password.hasError('maxlength')) { + + {{ 'labels.commons.Password should not be more than' | translate }} + {{ 'labels.commons.50 characters long' | translate }} + + } + @if ( + resetPasswordForm.controls.password.hasError('pattern') && + !( + resetPasswordForm.controls.password.hasError('minlength') || + resetPasswordForm.controls.password.hasError('maxlength') + ) + ) { + + {{ 'labels.commons.Password should include a' | translate }} + {{ 'labels.commons.numeral' | translate }} {{ 'labels.commons.and at' | translate }} + {{ 'labels.commons.least one uppercase' | translate }} ,{{ + 'labels.commons.lowercase and special character' | translate + }} + + } - - {{ 'labels.text.Passwords' | translate }} {{ 'labels.text.do not match' | translate }} - + @if ( + resetPasswordForm.errors?.passwordsDoNotMatch && + !resetPasswordForm.controls.password.hasError('required') && + !resetPasswordForm.controls.repeatPassword.hasError('required') + ) { + + {{ 'labels.text.Passwords' | translate }} {{ 'labels.text.do not match' | translate }} + + } {{ 'labels.buttons.Reset Password' | translate }} - + @if (loading) { + + } diff --git a/src/app/login/reset-password/reset-password.component.ts b/src/app/login/reset-password/reset-password.component.ts index 9e17b1d460..aaf0ae47a9 100644 --- a/src/app/login/reset-password/reset-password.component.ts +++ b/src/app/login/reset-password/reset-password.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; /** rxjs Imports */ @@ -35,6 +35,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ResetPasswordComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private authenticationService = inject(AuthenticationService); + private passwordsUtility = inject(PasswordsUtility); + /** Reset password form group. */ resetPasswordForm: UntypedFormGroup; /** Password input field type. */ @@ -42,15 +46,14 @@ export class ResetPasswordComponent implements OnInit { /** True if loading. */ loading = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {AuthenticationService} authenticationService Authentication Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private authenticationService: AuthenticationService, - private passwordsUtility: PasswordsUtility - ) {} + constructor() {} /** * Creates reset password form. diff --git a/src/app/login/two-factor-authentication/two-factor-authentication.component.html b/src/app/login/two-factor-authentication/two-factor-authentication.component.html index 3e5b9031e8..af4510b855 100644 --- a/src/app/login/two-factor-authentication/two-factor-authentication.component.html +++ b/src/app/login/two-factor-authentication/two-factor-authentication.component.html @@ -5,85 +5,94 @@ -{{ 'labels.text.Please select a delivery method' | translate }}: +@if (!otpRequested) { + {{ 'labels.text.Please select a delivery method' | translate }}: +} - - - - {{ 'labels.inputs.Send' | translate }} {{ twoFactorAuthenticationDeliveryMethod.name }} - {{ 'labels.inputs.to' | translate }} {{ twoFactorAuthenticationDeliveryMethod.target }} - - - - - {{ 'labels.buttons.Request OTP' | translate }} - - - + @for ( + twoFactorAuthenticationDeliveryMethod of twoFactorAuthenticationDeliveryMethods; + track twoFactorAuthenticationDeliveryMethod + ) { + + {{ 'labels.inputs.Send' | translate }} {{ twoFactorAuthenticationDeliveryMethod.name }} + {{ 'labels.inputs.to' | translate }} {{ twoFactorAuthenticationDeliveryMethod.target }} + + } + + + {{ 'labels.buttons.Request OTP' | translate }} + @if (loading) { + + } + + +} -{{ 'labels.text.Please enter the OTP' | translate }}: +@if (otpRequested) { + {{ 'labels.text.Please enter the OTP' | translate }}: +} - - - - - - {{ 'labels.inputs.OTP' | translate }} - - - {{ 'labels.inputs.Delivery Method' | translate }}: - {{ selectedTwoFactorAuthenticationDeliveryMethod.name }} - - - {{ 'labels.inputs.Validity' | translate }}: {{ tokenValidityTime / 60 }} - {{ 'labels.inputs.mins' | translate }} - - - {{ 'labels.inputs.OTP' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.buttons.Validate OTP' | translate }} - - - - - {{ 'labels.buttons.Resend OTP' | translate }} - - - +@if (otpRequested) { + + + + + + {{ 'labels.inputs.OTP' | translate }} + + + {{ 'labels.inputs.Delivery Method' | translate }}: + {{ selectedTwoFactorAuthenticationDeliveryMethod.name }} + + + {{ 'labels.inputs.Validity' | translate }}: {{ tokenValidityTime / 60 }} + {{ 'labels.inputs.mins' | translate }} + + @if (twoFactorAuthenticationForm.controls.otp.hasError('required')) { + + {{ 'labels.inputs.OTP' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.buttons.Validate OTP' | translate }} + @if (loading) { + + } + + + {{ 'labels.buttons.Resend OTP' | translate }} + @if (resendOTPLoading) { + + } + + +} diff --git a/src/app/login/two-factor-authentication/two-factor-authentication.component.ts b/src/app/login/two-factor-authentication/two-factor-authentication.component.ts index 282007c594..ca24b68f19 100644 --- a/src/app/login/two-factor-authentication/two-factor-authentication.component.ts +++ b/src/app/login/two-factor-authentication/two-factor-authentication.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; /** rxjs Imports */ @@ -33,6 +33,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class TwoFactorAuthenticationComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private authenticationService = inject(AuthenticationService); + /** Available delivery methods to receive OTP. */ twoFactorAuthenticationDeliveryMethods: any; /** Delivery method selected to receive OTP. */ @@ -50,14 +53,14 @@ export class TwoFactorAuthenticationComponent implements OnInit { /** True if loading. */ resendOTPLoading = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {AuthenticationService} authenticationService Authentication Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private authenticationService: AuthenticationService - ) {} + constructor() {} /** * Creates two factor authentication delivery method form. diff --git a/src/app/navigation/center-navigation/center-navigation.component.html b/src/app/navigation/center-navigation/center-navigation.component.html index f84b6277e4..b77a4b6856 100644 --- a/src/app/navigation/center-navigation/center-navigation.component.html +++ b/src/app/navigation/center-navigation/center-navigation.component.html @@ -20,10 +20,12 @@ {{ 'labels.inputs.Account No' | translate }}: - - {{ 'labels.inputs.External Id' | translate }}: - - + @if (centerData.externalId) { + + {{ 'labels.inputs.External Id' | translate }}: + + + } @@ -49,73 +51,89 @@ {{ centerData.staffName }} - - {{ 'labels.inputs.Number of Active Clients' | translate }} - - - - {{ centerSummaryData.activeClients }} - - - - {{ 'labels.inputs.Number of Active Client Loans' | translate }} - - - - {{ centerSummaryData.activeClientLoans }} - - - - {{ 'labels.inputs.Number of Active Client Borrowers' | translate }} - - - - {{ centerSummaryData.activeClientBorrowers }} - - - - {{ 'labels.inputs.Number of Active Overdue Group Loans' | translate }} - - - - {{ centerSummaryData.overdueGroupLoans }} - - - - {{ 'labels.inputs.Number of Active Overdue Client Loans' | translate }} - - - - {{ centerSummaryData.overdueClientLoans }} - - - - {{ 'labels.inputs.Next Meeting Date' | translate }} - - - - {{ centerSummaryData.collectionMeetingCalendar.nextTenRecurringDates[0] | dateFormat }} - - - - {{ 'labels.inputs.Meeting Frequency' | translate }} - - - - {{ centerSummaryData.collectionMeetingCalendar.humanReadable }} - + @if (centerSummaryData) { + + {{ 'labels.inputs.Number of Active Clients' | translate }} + + } + + @if (centerSummaryData) { + + {{ centerSummaryData.activeClients }} + + } + + @if (centerSummaryData) { + + {{ 'labels.inputs.Number of Active Client Loans' | translate }} + + } + + @if (centerSummaryData) { + + {{ centerSummaryData.activeClientLoans }} + + } + + @if (centerSummaryData) { + + {{ 'labels.inputs.Number of Active Client Borrowers' | translate }} + + } + + @if (centerSummaryData) { + + {{ centerSummaryData.activeClientBorrowers }} + + } + + @if (centerSummaryData) { + + {{ 'labels.inputs.Number of Active Overdue Group Loans' | translate }} + + } + + @if (centerSummaryData) { + + {{ centerSummaryData.overdueGroupLoans }} + + } + + @if (centerSummaryData) { + + {{ 'labels.inputs.Number of Active Overdue Client Loans' | translate }} + + } + + @if (centerSummaryData) { + + {{ centerSummaryData.overdueClientLoans }} + + } + + @if (centerData.collectionMeetingCalendar && centerData.collectionMeetingCalendar.nextTenRecurringDates[0]) { + + {{ 'labels.inputs.Next Meeting Date' | translate }} + + } + + @if (centerData.collectionMeetingCalendar && centerData.collectionMeetingCalendar.nextTenRecurringDates[0]) { + + {{ centerSummaryData.collectionMeetingCalendar.nextTenRecurringDates[0] | dateFormat }} + + } + + @if (centerData.collectionMeetingCalendar && centerData.collectionMeetingCalendar.humanReadable) { + + {{ 'labels.inputs.Meeting Frequency' | translate }} + + } + + @if (centerData.collectionMeetingCalendar && centerData.collectionMeetingCalendar.humanReadable) { + + {{ centerSummaryData.collectionMeetingCalendar.humanReadable }} + + } {{ 'labels.inputs.Number of Groups' | translate }} @@ -127,14 +145,18 @@ - - - - - - - + @if (centerAccountsData && centerAccountsData.loanAccounts) { + + + + } + + @if (centerAccountsData && centerAccountsData.savingsAccounts) { + + + + } diff --git a/src/app/navigation/client-navigation/client-navigation.component.html b/src/app/navigation/client-navigation/client-navigation.component.html index d84362e0b3..1faf743e51 100644 --- a/src/app/navigation/client-navigation/client-navigation.component.html +++ b/src/app/navigation/client-navigation/client-navigation.component.html @@ -29,45 +29,65 @@ - - {{ 'labels.inputs.First Name' | translate }} - - - - {{ clientData.firstName }} - - - - {{ 'labels.inputs.Middle Name' | translate }} - - - - {{ clientData.middleName }} - - - - {{ 'labels.inputs.Last Name' | translate }} - - - - {{ clientData.lastName }} - - - - {{ 'labels.inputs.Date of Birth' | translate }} - - - - {{ clientData.dateOfBirth | dateFormat }} - - - - {{ 'labels.inputs.Mobile Number' | translate }} - - - - {{ clientData.mobileNo }} - + @if (clientData.firstName) { + + {{ 'labels.inputs.First Name' | translate }} + + } + + @if (clientData.firstName) { + + {{ clientData.firstName }} + + } + + @if (clientData.middleName) { + + {{ 'labels.inputs.Middle Name' | translate }} + + } + + @if (clientData.middleName) { + + {{ clientData.middleName }} + + } + + @if (clientData.lastName) { + + {{ 'labels.inputs.Last Name' | translate }} + + } + + @if (clientData.lastName) { + + {{ clientData.lastName }} + + } + + @if (clientData.dateOfBirth) { + + {{ 'labels.inputs.Date of Birth' | translate }} + + } + + @if (clientData.dateOfBirth) { + + {{ clientData.dateOfBirth | dateFormat }} + + } + + @if (clientData.mobileNo) { + + {{ 'labels.inputs.Mobile Number' | translate }} + + } + + @if (clientData.mobileNo) { + + {{ clientData.mobileNo }} + + } {{ 'labels.inputs.Activation Date' | translate }} @@ -77,40 +97,56 @@ {{ clientData.activationDate | dateFormat }} - - {{ 'labels.inputs.Associated Office' | translate }} - - - - {{ clientData.officeName }} - - - - {{ 'labels.inputs.Associated Staff' | translate }} - - - - {{ clientData.staffName }} - + @if (clientData.officeName) { + + {{ 'labels.inputs.Associated Office' | translate }} + + } + + @if (clientData.officeName) { + + {{ clientData.officeName }} + + } + + @if (clientData.staffName) { + + {{ 'labels.inputs.Associated Staff' | translate }} + + } + + @if (clientData.staffName) { + + {{ clientData.staffName }} + + } - - - - - - - - - - - - - - - + @if (clientAccountsData && clientAccountsData.loanAccounts) { + + + + } + + @if (clientAccountsData && clientAccountsData.savingsAccounts) { + + + + } + + @if (clientAccountsData && clientAccountsData.shareAccounts) { + + + + } + + @if (clientData.groups && clientData.groups.length !== 0) { + + + + } diff --git a/src/app/navigation/group-navigation/group-navigation.component.html b/src/app/navigation/group-navigation/group-navigation.component.html index d754404bc9..5f1ff367d4 100644 --- a/src/app/navigation/group-navigation/group-navigation.component.html +++ b/src/app/navigation/group-navigation/group-navigation.component.html @@ -45,41 +45,41 @@ {{ groupData.staffName }} - - {{ 'labels.inputs.Associated Center' | translate }} - + @if (groupData.centerName) { + + {{ 'labels.inputs.Associated Center' | translate }} + + } - - {{ groupData.centerName }} - + @if (groupData.centerName) { + + {{ groupData.centerName }} + + } - - {{ 'labels.inputs.Next Meeting Date' | translate }} - + @if (groupData.collectionMeetingCalendar && groupData.collectionMeetingCalendar.nextTenRecurringDates[0]) { + + {{ 'labels.inputs.Next Meeting Date' | translate }} + + } - - {{ groupData.collectionMeetingCalendar.nextTenRecurringDates[0] | dateFormat }} - + @if (groupData.collectionMeetingCalendar && groupData.collectionMeetingCalendar.nextTenRecurringDates[0]) { + + {{ groupData.collectionMeetingCalendar.nextTenRecurringDates[0] | dateFormat }} + + } - - {{ 'labels.inputs.Meeting Frequency' | translate }} - + @if (groupData.collectionMeetingCalendar && groupData.collectionMeetingCalendar.humanReadable) { + + {{ 'labels.inputs.Meeting Frequency' | translate }} + + } - - {{ groupData.collectionMeetingCalendar.humanReadable }} - + @if (groupData.collectionMeetingCalendar && groupData.collectionMeetingCalendar.humanReadable) { + + {{ groupData.collectionMeetingCalendar.humanReadable }} + + } {{ 'labels.inputs.Number of Clients' | translate }} @@ -91,14 +91,18 @@ - - - + @if (groupAccountsData && groupAccountsData.loanAccounts) { + + + + } - - - + @if (groupAccountsData && groupAccountsData.savingsAccounts) { + + + + } diff --git a/src/app/navigation/loan-account-table/loan-account-table.component.ts b/src/app/navigation/loan-account-table/loan-account-table.component.ts index 085c16f7f8..8c2ba76e50 100644 --- a/src/app/navigation/loan-account-table/loan-account-table.component.ts +++ b/src/app/navigation/loan-account-table/loan-account-table.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Input, ViewChild } from '@angular/core'; +import { Component, Input, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -48,6 +48,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanAccountTableComponent { + private accountsFilterPipe = inject(AccountsFilterPipe); + /** Columns to be displayed in the loan accounts table. */ displayedColumns: string[] = [ 'accountNo', @@ -81,10 +83,13 @@ export class LoanAccountTableComponent { this.dataSource.sort = this.sort; } + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountsFilterPipe} accountsFilterPipe Accounts Filter Pipe. */ - constructor(private accountsFilterPipe: AccountsFilterPipe) {} + constructor() {} /** * Filters data in users table based on passed value. diff --git a/src/app/navigation/navigation.component.html b/src/app/navigation/navigation.component.html index d4a6ef3bf1..a69c24a23a 100644 --- a/src/app/navigation/navigation.component.html +++ b/src/app/navigation/navigation.component.html @@ -3,91 +3,109 @@ - - {{ 'labels.inputs.Office' | translate }} - - - {{ office.name }} - - - + @if (!(officeData === undefined || officeData === null)) { + + {{ 'labels.inputs.Office' | translate }} + + @for (office of officeData; track office) { + + {{ office.name }} + + } + + + } - - {{ employeeData.length ? 'Officer' : 'No Associated Officers' }} - - - {{ employee.displayName }} - - - + @if (!(employeeData === undefined || employeeData === null)) { + + {{ employeeData.length ? 'Officer' : 'No Associated Officers' }} + + @for (employee of employeeData; track employee) { + + {{ employee.displayName }} + + } + + + } - - {{ centerData.length ? 'Center' : 'No Associated Centers' }} - - - {{ center.name }} - - - + @if (!(centerData === undefined || centerData === null)) { + + {{ centerData.length ? 'Center' : 'No Associated Centers' }} + + @for (center of centerData; track center) { + + {{ center.name }} + + } + + + } - - {{ groupData.length ? 'Group' : 'No Associated Groups' }} - - - {{ group.name }} - - - + @if (!(groupData === undefined || groupData === null)) { + + {{ groupData.length ? 'Group' : 'No Associated Groups' }} + + @for (group of groupData; track group) { + + {{ group.name }} + + } + + + } - - {{ clientData.length ? 'Client' : 'No Associated Clients' }} - - - {{ client.displayName }} - - - + @if (!(clientData === undefined || clientData === null)) { + + {{ clientData.length ? 'Client' : 'No Associated Clients' }} + + @for (client of clientData; track client) { + + {{ client.displayName }} + + } + + + } - - - - - - - - - - - - - - - - - - - - - + @if (selectedItem) { + + @if (selectedItem.itemType === 'office') { + + } + @if (selectedItem.itemType === 'employee') { + + } + @if (selectedItem.itemType === 'center') { + + } + @if (selectedItem.itemType === 'group') { + + } + @if (selectedItem.itemType === 'client') { + + } + + } diff --git a/src/app/navigation/navigation.component.ts b/src/app/navigation/navigation.component.ts index cc60e4c739..999f2055f9 100644 --- a/src/app/navigation/navigation.component.ts +++ b/src/app/navigation/navigation.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; @@ -31,6 +31,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class NavigationComponent implements OnInit { + private navigationService = inject(NavigationService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Navigation Components */ @ViewChild(OfficeNavigationComponent) officeNavigationComponent: OfficeNavigationComponent; @ViewChild(StaffNavigationComponent) staffNavigationComponent: StaffNavigationComponent; @@ -67,6 +71,9 @@ export class NavigationComponent implements OnInit { /** Selected Item Summary */ selectedItemSummary: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -74,11 +81,7 @@ export class NavigationComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private navigationService: NavigationService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { offices: any }) => { this.officeData = data.offices; }); diff --git a/src/app/navigation/navigation.service.ts b/src/app/navigation/navigation.service.ts index 79cb05ea98..981e0a3a07 100644 --- a/src/app/navigation/navigation.service.ts +++ b/src/app/navigation/navigation.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -12,10 +12,15 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class NavigationService { + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. */ - constructor(private http: HttpClient) {} + constructor() {} /** * @returns {Observable} Offices. diff --git a/src/app/navigation/office-navigation/office-navigation.component.html b/src/app/navigation/office-navigation/office-navigation.component.html index 8c52dcebfc..5cab854dbd 100644 --- a/src/app/navigation/office-navigation/office-navigation.component.html +++ b/src/app/navigation/office-navigation/office-navigation.component.html @@ -8,11 +8,13 @@ - - {{ 'labels.inputs.External Id' | translate }}: - + @if (officeData.externalId) { + + {{ 'labels.inputs.External Id' | translate }}: + + } @@ -28,13 +30,17 @@ {{ officeData.openingDate | dateFormat }} - - {{ 'labels.inputs.Parent officeData' | translate }} - + @if (officeData.parentName) { + + {{ 'labels.inputs.Parent officeData' | translate }} + + } - - {{ officeData.parentName }} - + @if (officeData.parentName) { + + {{ officeData.parentName }} + + } {{ 'labels.inputs.Number of Staff' | translate }} diff --git a/src/app/navigation/offices.resolver.ts b/src/app/navigation/offices.resolver.ts index 575b6f7a1e..dca009f634 100644 --- a/src/app/navigation/offices.resolver.ts +++ b/src/app/navigation/offices.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { NavigationService } from './navigation.service'; */ @Injectable() export class OfficesResolver { + private navigationService = inject(NavigationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {NavigationService} navigationService Navigation service. */ - constructor(private navigationService: NavigationService) {} + constructor() {} /** * Returns the Offices data. diff --git a/src/app/navigation/savings-account-table/savings-account-table.component.ts b/src/app/navigation/savings-account-table/savings-account-table.component.ts index 19e39c2048..31fff2c0b0 100644 --- a/src/app/navigation/savings-account-table/savings-account-table.component.ts +++ b/src/app/navigation/savings-account-table/savings-account-table.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Input, ViewChild } from '@angular/core'; +import { Component, Input, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -48,6 +48,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingsAccountTableComponent { + private accountsFilterPipe = inject(AccountsFilterPipe); + /** Columns to be displayed in the savings accounts table. */ displayedColumns: string[] = [ 'accountNo', @@ -81,10 +83,13 @@ export class SavingsAccountTableComponent { this.dataSource.sort = this.sort; } + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountsFilterPipe} accountsFilterPipe Accounts Filter Pipe. */ - constructor(private accountsFilterPipe: AccountsFilterPipe) {} + constructor() {} /** * Filters data in users table based on passed value. diff --git a/src/app/navigation/share-account-table/share-account-table.component.ts b/src/app/navigation/share-account-table/share-account-table.component.ts index f8f213081d..03c19ba6d5 100644 --- a/src/app/navigation/share-account-table/share-account-table.component.ts +++ b/src/app/navigation/share-account-table/share-account-table.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Input, ViewChild } from '@angular/core'; +import { Component, Input, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -48,6 +48,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ShareAccountTableComponent { + private accountsFilterPipe = inject(AccountsFilterPipe); + /** Columns to be displayed in the share accounts table. */ displayedColumns: string[] = [ 'accountNo', @@ -81,10 +83,13 @@ export class ShareAccountTableComponent { this.dataSource.sort = this.sort; } + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountsFilterPipe} accountsFilterPipe Accounts Filter Pipe. */ - constructor(private accountsFilterPipe: AccountsFilterPipe) {} + constructor() {} /** * Filters data in users table based on passed value. diff --git a/src/app/navigation/staff-navigation/staff-navigation.component.html b/src/app/navigation/staff-navigation/staff-navigation.component.html index 05cc3159f8..24667c5468 100644 --- a/src/app/navigation/staff-navigation/staff-navigation.component.html +++ b/src/app/navigation/staff-navigation/staff-navigation.component.html @@ -40,13 +40,17 @@ {{ employeeData.isLoanOfficer | yesNo }} - - {{ 'labels.inputs.Mobile Number' | translate }} - - - - {{ employeeData.mobileNo }} - + @if (employeeData.mobileNo) { + + {{ 'labels.inputs.Mobile Number' | translate }} + + } + + @if (employeeData.mobileNo) { + + {{ employeeData.mobileNo }} + + } {{ 'labels.inputs.Number of Centers' | translate }} diff --git a/src/app/not-found/not-found.component.ts b/src/app/not-found/not-found.component.ts index 795406155e..b50cb1819b 100644 --- a/src/app/not-found/not-found.component.ts +++ b/src/app/not-found/not-found.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { Location } from '@angular/common'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -13,7 +13,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class NotFoundComponent { - constructor(private location: Location) {} + private location = inject(Location); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} goBack(): void { this.location.back(); diff --git a/src/app/notifications/notifications-page/notifications-page.component.ts b/src/app/notifications/notifications-page/notifications-page.component.ts index 8d1e1b5c4f..f8bf5ec26c 100644 --- a/src/app/notifications/notifications-page/notifications-page.component.ts +++ b/src/app/notifications/notifications-page/notifications-page.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -45,6 +45,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class NotificationsPageComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Notifications data. */ notificationsData: any; /** Columns to be displayed in notifications table. */ @@ -77,11 +79,14 @@ export class NotificationsPageComponent implements OnInit { /** Sorter for notifications table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the notifications data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { notifications: any }) => { this.notificationsData = data.notifications.pageItems; }); diff --git a/src/app/notifications/notifications.resolver.ts b/src/app/notifications/notifications.resolver.ts index a7fccdf8b9..411f259354 100644 --- a/src/app/notifications/notifications.resolver.ts +++ b/src/app/notifications/notifications.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { NotificationsService } from './notifications.service'; */ @Injectable() export class NotificationsResolver { + private notificationsService = inject(NotificationsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {NotificationsService} notificationsService Notifications service. */ - constructor(private notificationsService: NotificationsService) {} + constructor() {} /** * Returns the Notifications data. diff --git a/src/app/notifications/notifications.service.ts b/src/app/notifications/notifications.service.ts index ca9e1d099e..04ee0fad7d 100644 --- a/src/app/notifications/notifications.service.ts +++ b/src/app/notifications/notifications.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -12,10 +12,15 @@ import { Observable, of } from 'rxjs'; providedIn: 'root' }) export class NotificationsService { + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. */ - constructor(private http: HttpClient) {} + constructor() {} /** * @returns {Observable} Notifications. diff --git a/src/app/organization/adhoc-query/adhoc-query-template.resolver.ts b/src/app/organization/adhoc-query/adhoc-query-template.resolver.ts index a4511c011a..f4750e4ca0 100644 --- a/src/app/organization/adhoc-query/adhoc-query-template.resolver.ts +++ b/src/app/organization/adhoc-query/adhoc-query-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from 'app/organization/organization.service'; */ @Injectable() export class AdhocQueryTemplateResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the adhoc query template data. diff --git a/src/app/organization/adhoc-query/adhoc-query.component.ts b/src/app/organization/adhoc-query/adhoc-query.component.ts index 050ace331e..07ecd80184 100644 --- a/src/app/organization/adhoc-query/adhoc-query.component.ts +++ b/src/app/organization/adhoc-query/adhoc-query.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -50,6 +50,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AdhocQueryComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Adhoc Queries data. */ adhocQueriesData: any; /** Columns to be displayed in adhoc queries table. */ @@ -70,11 +72,14 @@ export class AdhocQueryComponent implements OnInit { /** Sorter for adhoc queries table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the adhoc queries data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { adhocQueries: any }) => { this.adhocQueriesData = data.adhocQueries; }); diff --git a/src/app/organization/adhoc-query/common-resolvers/adhoc-queries.resolver.ts b/src/app/organization/adhoc-query/common-resolvers/adhoc-queries.resolver.ts index 941317e5ea..516cf27512 100644 --- a/src/app/organization/adhoc-query/common-resolvers/adhoc-queries.resolver.ts +++ b/src/app/organization/adhoc-query/common-resolvers/adhoc-queries.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from '../../organization.service'; */ @Injectable() export class AdhocQueriesResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the adhoc queries data. diff --git a/src/app/organization/adhoc-query/common-resolvers/adhoc-query-and-template.resolver.ts b/src/app/organization/adhoc-query/common-resolvers/adhoc-query-and-template.resolver.ts index 610bdad63c..9365752d34 100644 --- a/src/app/organization/adhoc-query/common-resolvers/adhoc-query-and-template.resolver.ts +++ b/src/app/organization/adhoc-query/common-resolvers/adhoc-query-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from 'app/organization/organization.service'; */ @Injectable() export class AdhocQueryAndTemplateResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the adhoc query and template data. diff --git a/src/app/organization/adhoc-query/common-resolvers/adhoc-query.resolver.ts b/src/app/organization/adhoc-query/common-resolvers/adhoc-query.resolver.ts index d1b777767e..4b948dd16a 100644 --- a/src/app/organization/adhoc-query/common-resolvers/adhoc-query.resolver.ts +++ b/src/app/organization/adhoc-query/common-resolvers/adhoc-query.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from 'app/organization/organization.service'; */ @Injectable() export class AdhocQueryResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the adhoc query data. diff --git a/src/app/organization/adhoc-query/create-adhoc-query/create-adhoc-query.component.html b/src/app/organization/adhoc-query/create-adhoc-query/create-adhoc-query.component.html index dcece277d9..2d498e7069 100644 --- a/src/app/organization/adhoc-query/create-adhoc-query/create-adhoc-query.component.html +++ b/src/app/organization/adhoc-query/create-adhoc-query/create-adhoc-query.component.html @@ -6,69 +6,87 @@ {{ 'labels.inputs.name' | translate }} - - {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (adhocQueryForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.SQL Query' | translate }} - - {{ 'labels.inputs.SQL Query' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (adhocQueryForm.controls.query.hasError('required')) { + + {{ 'labels.inputs.SQL Query' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Insert into table' | translate }} - - {{ 'labels.inputs.Insert into table' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (adhocQueryForm.controls.tableName.hasError('required')) { + + {{ 'labels.inputs.Insert into table' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Table Fields' | translate }} - - {{ 'labels.inputs.Table Fields' | translate }} {{ 'labels.commons.are' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (adhocQueryForm.controls.tableFields.hasError('required')) { + + {{ 'labels.inputs.Table Fields' | translate }} {{ 'labels.commons.are' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Email' | translate }} - - {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.invalid' | translate }} - + @if (adhocQueryForm.controls.email.hasError('email')) { + + {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.invalid' | translate }} + + } {{ 'labels.inputs.Report Run Frequency' | translate }} - - {{ reportRunFrequency.value }} - + @for (reportRunFrequency of reportRunFrequencyData; track reportRunFrequency) { + + {{ reportRunFrequency.value }} + + } - - {{ 'labels.inputs.Custom Report Run Frequency (Days)' | translate }} - - - {{ 'labels.inputs.Custom Report Run Frequency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Custom Report Run Frequency' | translate }} - {{ 'labels.commons.must be larger than 0' | translate }} - - + @if (adhocQueryForm.controls.reportRunFrequency.value === 5) { + + {{ 'labels.inputs.Custom Report Run Frequency (Days)' | translate }} + + @if (adhocQueryForm.controls.reportRunEvery.hasError('required')) { + + {{ 'labels.inputs.Custom Report Run Frequency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (adhocQueryForm.controls.reportRunEvery.hasError('min')) { + + {{ 'labels.inputs.Custom Report Run Frequency' | translate }} + {{ 'labels.commons.must be larger than 0' | translate }} + + } + + } {{ 'labels.inputs.Active' | translate }} diff --git a/src/app/organization/adhoc-query/create-adhoc-query/create-adhoc-query.component.ts b/src/app/organization/adhoc-query/create-adhoc-query/create-adhoc-query.component.ts index ac69bc3d68..58bea081f5 100644 --- a/src/app/organization/adhoc-query/create-adhoc-query/create-adhoc-query.component.ts +++ b/src/app/organization/adhoc-query/create-adhoc-query/create-adhoc-query.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -27,6 +27,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateAdhocQueryComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private organizationService = inject(OrganizationService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Adhoc Query form. */ adhocQueryForm: UntypedFormGroup; /** Adhoc Query template data. */ @@ -34,6 +39,9 @@ export class CreateAdhocQueryComponent implements OnInit { /** Report run frequencies data. */ reportRunFrequencyData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the adhoc query template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -41,12 +49,7 @@ export class CreateAdhocQueryComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private organizationService: OrganizationService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { adhocQueryTemplate: any }) => { this.adhocQueryTemplateData = data.adhocQueryTemplate; }); diff --git a/src/app/organization/adhoc-query/edit-adhoc-query/edit-adhoc-query.component.html b/src/app/organization/adhoc-query/edit-adhoc-query/edit-adhoc-query.component.html index 9e388f5a33..4529fe3fc2 100644 --- a/src/app/organization/adhoc-query/edit-adhoc-query/edit-adhoc-query.component.html +++ b/src/app/organization/adhoc-query/edit-adhoc-query/edit-adhoc-query.component.html @@ -6,69 +6,87 @@ {{ 'labels.inputs.name' | translate }} - - {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editAdhocQueryForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.SQL Query' | translate }} - - {{ 'labels.inputs.SQL Query' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editAdhocQueryForm.controls.query.hasError('required')) { + + {{ 'labels.inputs.SQL Query' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Insert into table' | translate }} - - {{ 'labels.inputs.Insert into table' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editAdhocQueryForm.controls.tableName.hasError('required')) { + + {{ 'labels.inputs.Insert into table' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Table Fields' | translate }} - - {{ 'labels.inputs.Table Fields' | translate }} {{ 'labels.commons.are' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editAdhocQueryForm.controls.tableFields.hasError('required')) { + + {{ 'labels.inputs.Table Fields' | translate }} {{ 'labels.commons.are' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Email' | translate }} - - {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.invalid' | translate }} - + @if (editAdhocQueryForm.controls.email.hasError('email')) { + + {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.invalid' | translate }} + + } {{ 'labels.inputs.Report Run Frequency' | translate }} - - {{ reportRunFrequency.value }} - + @for (reportRunFrequency of reportRunFrequencyData; track reportRunFrequency) { + + {{ reportRunFrequency.value }} + + } - - {{ 'labels.inputs.Custom Report Run Frequency (Days)' | translate }} - - - {{ 'labels.inputs.Custom Report Run Frequency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Custom Report Run Frequency' | translate }} - {{ 'labels.commons.must be larger than 0' | translate }} - - + @if (editAdhocQueryForm.controls.reportRunFrequency.value === 5) { + + {{ 'labels.inputs.Custom Report Run Frequency (Days)' | translate }} + + @if (editAdhocQueryForm.controls.reportRunEvery.hasError('required')) { + + {{ 'labels.inputs.Custom Report Run Frequency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (editAdhocQueryForm.controls.reportRunEvery.hasError('min')) { + + {{ 'labels.inputs.Custom Report Run Frequency' | translate }} + {{ 'labels.commons.must be larger than 0' | translate }} + + } + + } {{ 'labels.inputs.Active' | translate }} diff --git a/src/app/organization/adhoc-query/edit-adhoc-query/edit-adhoc-query.component.ts b/src/app/organization/adhoc-query/edit-adhoc-query/edit-adhoc-query.component.ts index ce0c9a904e..771eaefb89 100644 --- a/src/app/organization/adhoc-query/edit-adhoc-query/edit-adhoc-query.component.ts +++ b/src/app/organization/adhoc-query/edit-adhoc-query/edit-adhoc-query.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -27,6 +27,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditAdhocQueryComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private organizationService = inject(OrganizationService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Edit Adhoc Query form. */ editAdhocQueryForm: UntypedFormGroup; /** Adhoc Query template data. */ @@ -34,6 +39,9 @@ export class EditAdhocQueryComponent implements OnInit { /** Report run frequencies data. */ reportRunFrequencyData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the adhoc query template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -41,12 +49,7 @@ export class EditAdhocQueryComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private organizationService: OrganizationService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { adhocQueryAndTemplate: any }) => { this.adhocQueryTemplateData = data.adhocQueryAndTemplate; }); diff --git a/src/app/organization/adhoc-query/view-adhoc-query/view-adhoc-query.component.html b/src/app/organization/adhoc-query/view-adhoc-query/view-adhoc-query.component.html index 68cfeb346b..9480f12295 100644 --- a/src/app/organization/adhoc-query/view-adhoc-query/view-adhoc-query.component.html +++ b/src/app/organization/adhoc-query/view-adhoc-query/view-adhoc-query.component.html @@ -37,13 +37,17 @@ {{ adhocQueryData.tableName }} - - {{ 'labels.inputs.Report Run Frequency' | translate }} - + @if (adhocQueryData.reportRunFrequency) { + + {{ 'labels.inputs.Report Run Frequency' | translate }} + + } - - {{ reportRunFrequency }} - + @if (adhocQueryData.reportRunFrequency) { + + {{ reportRunFrequency }} + + } {{ 'labels.inputs.Status' | translate }} diff --git a/src/app/organization/adhoc-query/view-adhoc-query/view-adhoc-query.component.ts b/src/app/organization/adhoc-query/view-adhoc-query/view-adhoc-query.component.ts index dbf4fc9085..9a150a6b95 100644 --- a/src/app/organization/adhoc-query/view-adhoc-query/view-adhoc-query.component.ts +++ b/src/app/organization/adhoc-query/view-adhoc-query/view-adhoc-query.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -24,9 +24,17 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewAdhocQueryComponent { + private organizationService = inject(OrganizationService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + /** Adhoc query data. */ adhocQueryData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the adhoc query data from `resolve`. * @param {OrganizationService} organizationService Organization Service. @@ -34,12 +42,7 @@ export class ViewAdhocQueryComponent { * @param {Router} router Router for navigation. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private organizationService: OrganizationService, - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { adhocQuery: any }) => { this.adhocQueryData = data.adhocQuery; }); diff --git a/src/app/organization/bulk-import/bulk-import.component.html b/src/app/organization/bulk-import/bulk-import.component.html index 0817a9b2f9..b0a3b1ef45 100644 --- a/src/app/organization/bulk-import/bulk-import.component.html +++ b/src/app/organization/bulk-import/bulk-import.component.html @@ -9,11 +9,17 @@ {{ 'labels.heading.Offices' | translate }} - - - - {{ 'labels.text.Download, Upload Offices Template' | translate }} - + @if (!arrowBooleans[0]) { + + } + @if (arrowBooleans[0]) { + + } + @if (arrowBooleans[0]) { + + {{ 'labels.text.Download, Upload Offices Template' | translate }} + + } @@ -21,11 +27,17 @@ {{ 'labels.heading.Offices' | translate } {{ 'labels.heading.Users' | translate }} - - - - {{ 'labels.text.Download offices template and Upload office excel files' | translate }} - + @if (!arrowBooleans[1]) { + + } + @if (arrowBooleans[1]) { + + } + @if (arrowBooleans[1]) { + + {{ 'labels.text.Download offices template and Upload office excel files' | translate }} + + } @@ -33,11 +45,17 @@ {{ 'labels.heading.Users' | translate }} {{ 'labels.heading.Groups' | translate }} - - - - {{ 'labels.text.Download groups template and Upload group excel files' | translate }} - + @if (!arrowBooleans[2]) { + + } + @if (arrowBooleans[2]) { + + } + @if (arrowBooleans[2]) { + + {{ 'labels.text.Download groups template and Upload group excel files' | translate }} + + } @@ -45,11 +63,17 @@ {{ 'labels.heading.Groups' | translate }}< {{ 'labels.heading.Loan Accounts' | translate }} - - - - {{ 'labels.text.Download loan accounts template and upload loan account excel files' | translate }} - + @if (!arrowBooleans[3]) { + + } + @if (arrowBooleans[3]) { + + } + @if (arrowBooleans[3]) { + + {{ 'labels.text.Download loan accounts template and upload loan account excel files' | translate }} + + } @@ -57,11 +81,19 @@ {{ 'labels.heading.Loan Accounts' | {{ 'labels.heading.Savings Accounts' | translate }} - - - - {{ 'labels.text.Download savings accounts template and upload savings account excel files' | translate }} - + @if (!arrowBooleans[4]) { + + } + @if (arrowBooleans[4]) { + + } + @if (arrowBooleans[4]) { + + {{ + 'labels.text.Download savings accounts template and upload savings account excel files' | translate + }} + + } @@ -71,14 +103,20 @@ {{ 'labels.heading.Savings Accou {{ 'labels.heading.Fixed Deposit Accounts' | translate }} - - - - {{ - 'labels.text.Download fixed deposit accounts template and upload fixed deposit account excel files' - | translate - }} - + @if (!arrowBooleans[5]) { + + } + @if (arrowBooleans[5]) { + + } + @if (arrowBooleans[5]) { + + {{ + 'labels.text.Download fixed deposit accounts template and upload fixed deposit account excel files' + | translate + }} + + } @@ -86,13 +124,19 @@ {{ 'labels.heading.Chart of Accounts' | translate }} - - - - {{ - 'labels.text.Download chart of accounts template and upload chart of account excel files' | translate - }} - + @if (!arrowBooleans[6]) { + + } + @if (arrowBooleans[6]) { + + } + @if (arrowBooleans[6]) { + + {{ + 'labels.text.Download chart of accounts template and upload chart of account excel files' | translate + }} + + } @@ -100,11 +144,17 @@ {{ 'labels.heading.Chart of Acc {{ 'labels.heading.Share Accounts' | translate }} - - - - {{ 'labels.text.Download share accounts template and upload share account excel files' | translate }} - + @if (!arrowBooleans[7]) { + + } + @if (arrowBooleans[7]) { + + } + @if (arrowBooleans[7]) { + + {{ 'labels.text.Download share accounts template and upload share account excel files' | translate }} + + } @@ -116,11 +166,17 @@ {{ 'labels.heading.Share Accounts' {{ 'labels.heading.Employees' | translate }} - - - - {{ 'labels.text.Download loan accounts template and upload loan account excel files' | translate }} - + @if (!arrowBooleans[8]) { + + } + @if (arrowBooleans[8]) { + + } + @if (arrowBooleans[8]) { + + {{ 'labels.text.Download loan accounts template and upload loan account excel files' | translate }} + + } @@ -128,11 +184,17 @@ {{ 'labels.heading.Employees' | transla {{ 'labels.heading.Clients' | translate }} - - - - {{ 'labels.text.Download clients template and upload clients excel files' | translate }} - + @if (!arrowBooleans[9]) { + + } + @if (arrowBooleans[9]) { + + } + @if (arrowBooleans[9]) { + + {{ 'labels.text.Download clients template and upload clients excel files' | translate }} + + } @@ -140,11 +202,17 @@ {{ 'labels.heading.Clients' | translate } {{ 'labels.heading.Centers' | translate }} - - - - {{ 'labels.text.Download centers template and upload centers excel files' | translate }} - + @if (!arrowBooleans[10]) { + + } + @if (arrowBooleans[10]) { + + } + @if (arrowBooleans[10]) { + + {{ 'labels.text.Download centers template and upload centers excel files' | translate }} + + } @@ -152,11 +220,17 @@ {{ 'labels.heading.Centers' | translate } {{ 'labels.heading.Loan Repayments' | translate }} - - - - {{ 'labels.text.Download loan repayments template and upload loan repayment excel files' | translate }} - + @if (!arrowBooleans[11]) { + + } + @if (arrowBooleans[11]) { + + } + @if (arrowBooleans[11]) { + + {{ 'labels.text.Download loan repayments template and upload loan repayment excel files' | translate }} + + } @@ -166,14 +240,20 @@ {{ 'labels.heading.Loan Repayment {{ 'labels.heading.Savings Transactions' | translate }} - - - - {{ - 'labels.text.Download savings transactions template and upload savings transaction excel files' - | translate - }} - + @if (!arrowBooleans[12]) { + + } + @if (arrowBooleans[12]) { + + } + @if (arrowBooleans[12]) { + + {{ + 'labels.text.Download savings transactions template and upload savings transaction excel files' + | translate + }} + + } @@ -183,14 +263,20 @@ {{ 'labels.heading.Fixed Deposit Transactions' | translate }} - - - - {{ - 'labels.text.Download fixed deposit transactions template and upload fixed deposit transaction excel files' - | translate - }} - + @if (!arrowBooleans[13]) { + + } + @if (arrowBooleans[13]) { + + } + @if (arrowBooleans[13]) { + + {{ + 'labels.text.Download fixed deposit transactions template and upload fixed deposit transaction excel files' + | translate + }} + + } @@ -200,14 +286,20 @@ {{ 'labels.heading.Recurring Deposit Transactions' | translate }} - - - - {{ - 'labels.text.Download recurring deposit transactions template and upload recurring deposit transaction excel files' - | translate - }} - + @if (!arrowBooleans[14]) { + + } + @if (arrowBooleans[14]) { + + } + @if (arrowBooleans[14]) { + + {{ + 'labels.text.Download recurring deposit transactions template and upload recurring deposit transaction excel files' + | translate + }} + + } @@ -215,11 +307,17 @@ {{ 'labels.heading.Journal Entries' | translate }} - - - - {{ 'labels.text.Download journal entries template and upload journal entries excel files' | translate }} - + @if (!arrowBooleans[15]) { + + } + @if (arrowBooleans[15]) { + + } + @if (arrowBooleans[15]) { + + {{ 'labels.text.Download journal entries template and upload journal entries excel files' | translate }} + + } @@ -227,11 +325,17 @@ {{ 'labels.heading.Journal Entrie {{ 'labels.heading.Guarantors' | translate }} - - - - {{ 'labels.text.Download guarantors template and upload guarantor excel files' | translate }} - + @if (!arrowBooleans[16]) { + + } + @if (arrowBooleans[16]) { + + } + @if (arrowBooleans[16]) { + + {{ 'labels.text.Download guarantors template and upload guarantor excel files' | translate }} + + } diff --git a/src/app/organization/bulk-import/bulk-import.resolver.ts b/src/app/organization/bulk-import/bulk-import.resolver.ts index 3212a19ee5..26c17014db 100644 --- a/src/app/organization/bulk-import/bulk-import.resolver.ts +++ b/src/app/organization/bulk-import/bulk-import.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -16,12 +16,17 @@ import { BulkImports } from './view-bulk-import/bulk-imports'; */ @Injectable() export class BulkImportResolver { + private organizationService = inject(OrganizationService); + bulkImportsArray = BulkImports; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Gets bulk-import's entity name diff --git a/src/app/organization/bulk-import/view-bulk-import/view-bulk-import.component.html b/src/app/organization/bulk-import/view-bulk-import/view-bulk-import.component.html index d4dd3ae756..c8c4b33d19 100644 --- a/src/app/organization/bulk-import/view-bulk-import/view-bulk-import.component.html +++ b/src/app/organization/bulk-import/view-bulk-import/view-bulk-import.component.html @@ -7,37 +7,47 @@ - = 1"> - - {{ 'labels.inputs.Office' | translate }} - - - {{ office.name }} - - - - - - = 2"> - - {{ 'labels.inputs.Staff' | translate }} - - - {{ staff.displayName }} - - - - - - - - {{ 'labels.inputs.Legal Form' | translate }} - - {{ 'labels.inputs.Entity' | translate }} - {{ 'labels.inputs.Person' | translate }} - - - + @if (bulkImport.formFields >= 1) { + + + {{ 'labels.inputs.Office' | translate }} + + @for (office of officeData; track office) { + + {{ office.name }} + + } + + + + } + + @if (bulkImport.formFields >= 2) { + + + {{ 'labels.inputs.Staff' | translate }} + + @for (staff of staffData; track staff) { + + {{ staff.displayName }} + + } + + + + } + + @if (bulkImport.formFields === 3) { + + + {{ 'labels.inputs.Legal Form' | translate }} + + {{ 'labels.inputs.Entity' | translate }} + {{ 'labels.inputs.Person' | translate }} + + + + } @@ -62,9 +72,9 @@ {{ 'labels.heading.Select Excel File' | translate }} - {{ - 'labels.text.Please retain the value Entity/Person in the filename.' | translate - }} + @if (bulkImport.name === 'Clients') { + {{ 'labels.text.Please retain the value Entity/Person in the filename.' | translate }} + } @@ -72,7 +82,9 @@ {{ 'labels.heading.Select Excel File' | translate }} - = 2" class="flex cover"> + @if (bulkImport.formFields >= 2) { + + } diff --git a/src/app/organization/bulk-import/view-bulk-import/view-bulk-import.component.ts b/src/app/organization/bulk-import/view-bulk-import/view-bulk-import.component.ts index d08cfc1dd3..e97e43f7cb 100644 --- a/src/app/organization/bulk-import/view-bulk-import/view-bulk-import.component.ts +++ b/src/app/organization/bulk-import/view-bulk-import/view-bulk-import.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -58,6 +58,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewBulkImportComponent implements OnInit { + private route = inject(ActivatedRoute); + private formBuilder = inject(UntypedFormBuilder); + private organizationService = inject(OrganizationService); + /** offices Data */ officeData: any; /** staff Data */ @@ -93,17 +97,16 @@ export class ViewBulkImportComponent implements OnInit { /** Imports table reference */ @ViewChild('importsTable', { static: true }) importsTableRef: MatTable; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * fetches offices and imports data from resolve * @param {ActivatedRoute} route ActivatedRoute * @param {FormBuilder} formBuilder FormBuilder * @param {OrganizationService} organizationService OrganizationService */ - constructor( - private route: ActivatedRoute, - private formBuilder: UntypedFormBuilder, - private organizationService: OrganizationService - ) { + constructor() { this.bulkImport.name = this.route.snapshot.params['import-name']; this.route.data.subscribe((data: any) => { this.officeData = data.offices; diff --git a/src/app/organization/bulk-loan-reassignmnet/bulk-loan-reassignmnet.component.html b/src/app/organization/bulk-loan-reassignmnet/bulk-loan-reassignmnet.component.html index 4c6b9d24fb..17c4d5a0cd 100644 --- a/src/app/organization/bulk-loan-reassignmnet/bulk-loan-reassignmnet.component.html +++ b/src/app/organization/bulk-loan-reassignmnet/bulk-loan-reassignmnet.component.html @@ -6,9 +6,11 @@ {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of offices; track office) { + + {{ office.name }} + + } @@ -26,93 +28,117 @@ /> - - {{ 'labels.inputs.Assignment Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (bulkLoanForm.controls.assignmentDate.hasError('required')) { + + {{ 'labels.inputs.Assignment Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.From loan officer' | translate }} - - - {{ fromOfficers.displayName }} - - - - {{ 'labels.inputs.From Loan Officer' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (fromLoanOfficers !== undefined) { + + {{ 'labels.inputs.From loan officer' | translate }} + + @for (fromOfficers of fromLoanOfficers; track fromOfficers) { + + {{ fromOfficers.displayName }} + + } + + @if (bulkLoanForm.controls.fromLoanOfficerId.hasError('required')) { + + {{ 'labels.inputs.From Loan Officer' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } {{ 'labels.inputs.To loan officer' | translate }} - - {{ toOfficers.displayName }} - + @for (toOfficers of toLoanOfficers; track toOfficers) { + + {{ toOfficers.displayName }} + + } - - {{ 'labels.inputs.To Loan Officer' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (bulkLoanForm.controls.toLoanOfficerId.hasError('required')) { + + {{ 'labels.inputs.To Loan Officer' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - - {{ 'labels.inputs.Clients' | translate }} - - - - - + @if (officerTemplate !== undefined) { + + + {{ 'labels.inputs.Clients' | translate }} + + + @for (clients of officerTemplate.accountSummaryCollection.clients; track clients) { - - {{ clients.displayName }} - - - - - - {{ loans.productName }}({{ loans.accountNo }}) - + + + + {{ clients.displayName }} + + + @for (loans of clients.loans; track loans) { + + + {{ loans.productName }}({{ loans.accountNo }}) + + + } + - - - - - - - - {{ 'labels.inputs.Groups' | translate }} - + } + + + } - - - + @if (officerTemplate !== undefined) { + + + {{ 'labels.inputs.Groups' | translate }} + + + @for (groups of officerTemplate.accountSummaryCollection.groups; track groups) { - - {{ groups.displayName }} - - - - - - {{ loans.productName }}({{ loans.accountNo }}) - + + + + {{ groups.displayName }} + + + @for (loans of groups.loans; track loans) { + + + {{ loans.productName }}({{ loans.accountNo }}) + + + } + - - - - + } + + + } diff --git a/src/app/organization/bulk-loan-reassignmnet/bulk-loan-reassignmnet.component.ts b/src/app/organization/bulk-loan-reassignmnet/bulk-loan-reassignmnet.component.ts index 4f3d65c78d..71e475b33b 100644 --- a/src/app/organization/bulk-loan-reassignmnet/bulk-loan-reassignmnet.component.ts +++ b/src/app/organization/bulk-loan-reassignmnet/bulk-loan-reassignmnet.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -29,6 +29,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class BulkLoanReassignmnetComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private organizationSevice = inject(OrganizationService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private router = inject(Router); + /** Bulk Loan form. */ bulkLoanForm: UntypedFormGroup; /** Office data. */ @@ -48,6 +55,9 @@ export class BulkLoanReassignmnetComponent implements OnInit { /** Maximum Date allowed. */ maxDate = new Date(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Get Office data from `resolver`. * @param {FormBuilder} formBuilder Form Builder. @@ -56,14 +66,7 @@ export class BulkLoanReassignmnetComponent implements OnInit { * @param {SettingsService} settingsService Settings Service. * @param {Router} router Router. */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private organizationSevice: OrganizationService, - private settingsService: SettingsService, - private dateUtils: Dates, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { offices: any }) => { this.offices = data.offices; }); diff --git a/src/app/organization/currencies/currencies.component.ts b/src/app/organization/currencies/currencies.component.ts index 7d99ea15b6..32c7984766 100644 --- a/src/app/organization/currencies/currencies.component.ts +++ b/src/app/organization/currencies/currencies.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -52,6 +52,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CurrenciesComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Currencies data. */ currenciesData: any; /** Columns to be displayed in currencies table. */ @@ -76,6 +81,9 @@ export class CurrenciesComponent implements OnInit, AfterViewInit { /* Template for currencies table */ @ViewChild('templateTableCurrencies') templateTableCurrencies: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the currencies data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -83,12 +91,7 @@ export class CurrenciesComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { currencies: any }) => { this.currenciesData = data.currencies.selectedCurrencyOptions; }); diff --git a/src/app/organization/currencies/currencies.resolver.ts b/src/app/organization/currencies/currencies.resolver.ts index ba2d751180..e9b3fabf35 100644 --- a/src/app/organization/currencies/currencies.resolver.ts +++ b/src/app/organization/currencies/currencies.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from '../organization.service'; */ @Injectable() export class CurrenciesResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the currencies data. diff --git a/src/app/organization/currencies/manage-currencies/manage-currencies.component.html b/src/app/organization/currencies/manage-currencies/manage-currencies.component.html index b7dae201e0..415e3b24d7 100644 --- a/src/app/organization/currencies/manage-currencies/manage-currencies.component.html +++ b/src/app/organization/currencies/manage-currencies/manage-currencies.component.html @@ -17,14 +17,16 @@ [formControl]="filterFormCtrl" > - - ({{ currency.code }}) {{ currency.name }} - + @for (currency of currencyData | async; track currency) { + ({{ currency.code }}) {{ currency.name }} + } - - {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (currencyForm.controls.currency.hasError('required')) { + + {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - - - + + + + + + + {{ currency.name }} - - - - {{ currency.name }} - - + + } diff --git a/src/app/organization/currencies/manage-currencies/manage-currencies.component.ts b/src/app/organization/currencies/manage-currencies/manage-currencies.component.ts index e2d5f09c92..3bf3ec689b 100644 --- a/src/app/organization/currencies/manage-currencies/manage-currencies.component.ts +++ b/src/app/organization/currencies/manage-currencies/manage-currencies.component.ts @@ -8,7 +8,8 @@ import { AfterViewInit, OnDestroy, OnChanges, - SimpleChanges + SimpleChanges, + inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -29,7 +30,7 @@ import { takeUntil } from 'rxjs/operators'; import { ReplaySubject, Subject } from 'rxjs'; import { Currency } from 'app/shared/models/general.model'; import { NgxMatSelectSearchModule } from 'ngx-mat-select-search'; -import { NgFor, NgIf, AsyncPipe } from '@angular/common'; +import { AsyncPipe } from '@angular/common'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatGridList, MatGridTile } from '@angular/material/grid-list'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -51,6 +52,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ManageCurrenciesComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges { + private route = inject(ActivatedRoute); + private formBuilder = inject(UntypedFormBuilder); + private organizationservice = inject(OrganizationService); + dialog = inject(MatDialog); + private router = inject(Router); + private translateService = inject(TranslateService); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + //** Defining PlaceHolders for the search bar */ placeHolderLabel = ''; noEntriesFoundLabel = ''; @@ -75,6 +85,9 @@ export class ManageCurrenciesComponent implements OnInit, AfterViewInit, OnDestr /** Subject that emits when the component has been destroyed. */ protected _onDestroy = new Subject(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the currency data from `resolve`. * @param {ActivatedRoute} route Activated Route @@ -82,16 +95,7 @@ export class ManageCurrenciesComponent implements OnInit, AfterViewInit, OnDestr * @param {OrganizationService} organizationservice Organization Service * @param {MatDialog} dialog Mat Dialog */ - constructor( - private route: ActivatedRoute, - private formBuilder: UntypedFormBuilder, - private organizationservice: OrganizationService, - public dialog: MatDialog, - private router: Router, - private translateService: TranslateService, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.parent.data.subscribe((data: { currencies: any }) => { this.selectedCurrencies = data.currencies.selectedCurrencyOptions; this.currencyList = data.currencies.currencyOptions; diff --git a/src/app/organization/employees/create-employee/create-employee.component.html b/src/app/organization/employees/create-employee/create-employee.component.html index fe69ac1103..1dbb7da6cf 100644 --- a/src/app/organization/employees/create-employee/create-employee.component.html +++ b/src/app/organization/employees/create-employee/create-employee.component.html @@ -6,40 +6,52 @@ {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (employeeForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.First Name' | translate }} - - {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.First Name' | translate }} {{ 'labels.inputs.cannot' | translate }} - {{ 'labels.inputs.begin with a special character or number' | translate }} - + @if (employeeForm.controls.firstname.hasError('required')) { + + {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (employeeForm.controls.firstname.hasError('pattern')) { + + {{ 'labels.inputs.First Name' | translate }} {{ 'labels.inputs.cannot' | translate }} + {{ 'labels.inputs.begin with a special character or number' | translate }} + + } {{ 'labels.inputs.Last Name' | translate }} - - {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.inputs.cannot' | translate }} - {{ 'labels.inputs.begin with a special character or number' | translate }} - + @if (employeeForm.controls.lastname.hasError('required')) { + + {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (employeeForm.controls.lastname.hasError('pattern')) { + + {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.inputs.cannot' | translate }} + {{ 'labels.inputs.begin with a special character or number' | translate }} + + } @@ -63,10 +75,12 @@ /> - - {{ 'labels.inputs.Joining Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (employeeForm.controls.joiningDate.hasError('required')) { + + {{ 'labels.inputs.Joining Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/organization/employees/create-employee/create-employee.component.ts b/src/app/organization/employees/create-employee/create-employee.component.ts index 646efe656e..7ef9d1ff8a 100644 --- a/src/app/organization/employees/create-employee/create-employee.component.ts +++ b/src/app/organization/employees/create-employee/create-employee.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -29,6 +29,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateEmployeeComponent implements OnInit, AfterViewInit { + private formBuilder = inject(UntypedFormBuilder); + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + dialog = inject(MatDialog); + /** Minimum joining date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum joining date allowed. */ @@ -43,6 +53,9 @@ export class CreateEmployeeComponent implements OnInit, AfterViewInit { /* Template for popover on employee form */ @ViewChild('templateCreateEmployeeForm') templateCreateEmployeeForm: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -55,17 +68,7 @@ export class CreateEmployeeComponent implements OnInit, AfterViewInit { * @param {PopoverService} popoverService PopoverService. * @param {MatDialog} dialog MatDialog. */ - constructor( - private formBuilder: UntypedFormBuilder, - private organizationService: OrganizationService, - private settingsService: SettingsService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { offices: any }) => { this.officeData = data.offices; }); diff --git a/src/app/organization/employees/edit-employee.resolver.ts b/src/app/organization/employees/edit-employee.resolver.ts index da2702b70d..e6f7c957b3 100644 --- a/src/app/organization/employees/edit-employee.resolver.ts +++ b/src/app/organization/employees/edit-employee.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from '../organization.service'; */ @Injectable() export class EditEmployeeResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the employees data. diff --git a/src/app/organization/employees/edit-employee/edit-employee.component.html b/src/app/organization/employees/edit-employee/edit-employee.component.html index 2ff77879aa..61c4b345d2 100644 --- a/src/app/organization/employees/edit-employee/edit-employee.component.html +++ b/src/app/organization/employees/edit-employee/edit-employee.component.html @@ -6,40 +6,52 @@ {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editEmployeeForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.First Name' | translate }} - - {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.First Name' | translate }} {{ 'labels.inputs.cannot' | translate }} - {{ 'labels.inputs.begin with a special character or number' | translate }} - + @if (editEmployeeForm.controls.firstname.hasError('required')) { + + {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (editEmployeeForm.controls.firstname.hasError('pattern')) { + + {{ 'labels.inputs.First Name' | translate }} {{ 'labels.inputs.cannot' | translate }} + {{ 'labels.inputs.begin with a special character or number' | translate }} + + } {{ 'labels.inputs.Last Name' | translate }} - - {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.inputs.cannot' | translate }} - {{ 'labels.inputs.begin with a special character or number' | translate }} - + @if (editEmployeeForm.controls.lastname.hasError('required')) { + + {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (editEmployeeForm.controls.lastname.hasError('pattern')) { + + {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.inputs.cannot' | translate }} + {{ 'labels.inputs.begin with a special character or number' | translate }} + + } @@ -67,10 +79,12 @@ /> - - {{ 'labels.inputs.Joining Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editEmployeeForm.controls.joiningDate.hasError('required')) { + + {{ 'labels.inputs.Joining Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/organization/employees/edit-employee/edit-employee.component.ts b/src/app/organization/employees/edit-employee/edit-employee.component.ts index 57d831b450..7100374565 100644 --- a/src/app/organization/employees/edit-employee/edit-employee.component.ts +++ b/src/app/organization/employees/edit-employee/edit-employee.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditEmployeeComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + /** Employee data. */ employeeData: any; /** Minimum joining date allowed. */ @@ -34,6 +41,9 @@ export class EditEmployeeComponent implements OnInit { /** Office data. */ officeData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -43,14 +53,7 @@ export class EditEmployeeComponent implements OnInit { * @param {Router} router Router for navigation. * @param {Dates} dateUtils Date Utils to format date. */ - constructor( - private formBuilder: UntypedFormBuilder, - private organizationService: OrganizationService, - private settingsService: SettingsService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates - ) { + constructor() { this.route.data.subscribe((data: { employee: any; offices: any }) => { this.employeeData = data.employee; this.officeData = data.employee.allowedOffices; diff --git a/src/app/organization/employees/employee.resolver.ts b/src/app/organization/employees/employee.resolver.ts index a64b8f1091..f92ff1dedb 100644 --- a/src/app/organization/employees/employee.resolver.ts +++ b/src/app/organization/employees/employee.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from 'app/organization/organization.service'; */ @Injectable() export class EmployeeResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the employee data. diff --git a/src/app/organization/employees/employees.component.html b/src/app/organization/employees/employees.component.html index 2e309e9510..cb6bf59786 100644 --- a/src/app/organization/employees/employees.component.html +++ b/src/app/organization/employees/employees.component.html @@ -37,20 +37,22 @@ {{ 'labels.inputs.Loan Officer' | translate }} - - + @if (employee.isLoanOfficer) { + + } + @if (!employee.isLoanOfficer) { + + } diff --git a/src/app/organization/employees/employees.component.ts b/src/app/organization/employees/employees.component.ts index f8dbf07776..d7b08b1c53 100644 --- a/src/app/organization/employees/employees.component.ts +++ b/src/app/organization/employees/employees.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -54,6 +54,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EmployeesComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Employees data. */ employeesData: any; /** Columns to be displayed in employees table. */ @@ -80,6 +85,9 @@ export class EmployeesComponent implements OnInit, AfterViewInit { /* Template for popover on employees table */ @ViewChild('templateTableEmployees') templateTableEmployees: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the employees data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -87,12 +95,7 @@ export class EmployeesComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { employees: any }) => { this.employeesData = data.employees; }); diff --git a/src/app/organization/employees/employees.resolver.ts b/src/app/organization/employees/employees.resolver.ts index 6b5f5b56fb..26188a3541 100644 --- a/src/app/organization/employees/employees.resolver.ts +++ b/src/app/organization/employees/employees.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from '../organization.service'; */ @Injectable() export class EmployeesResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the employees data. diff --git a/src/app/organization/employees/view-employee/view-employee.component.html b/src/app/organization/employees/view-employee/view-employee.component.html index 848d81d978..32477e0b35 100644 --- a/src/app/organization/employees/view-employee/view-employee.component.html +++ b/src/app/organization/employees/view-employee/view-employee.component.html @@ -41,13 +41,17 @@ {{ employeeData.isLoanOfficer === true | yesNo }} - - {{ 'labels.inputs.Mobile Number for SMS' | translate }} - + @if (employeeData.mobileNo) { + + {{ 'labels.inputs.Mobile Number for SMS' | translate }} + + } - - {{ employeeData.mobileNo }} - + @if (employeeData.mobileNo) { + + {{ employeeData.mobileNo }} + + } {{ 'labels.inputs.Status' | translate }} diff --git a/src/app/organization/employees/view-employee/view-employee.component.ts b/src/app/organization/employees/view-employee/view-employee.component.ts index 4cf7de254f..29374a129b 100644 --- a/src/app/organization/employees/view-employee/view-employee.component.ts +++ b/src/app/organization/employees/view-employee/view-employee.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { DateFormatPipe } from '../../../pipes/date-format.pipe'; @@ -21,14 +21,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewEmployeeComponent { + private route = inject(ActivatedRoute); + /** Employee data. */ employeeData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the employee data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { employee: any }) => { this.employeeData = data.employee; }); diff --git a/src/app/organization/entity-data-table-checks/create-entity-data-table-checks/create-entity-data-table-checks.component.html b/src/app/organization/entity-data-table-checks/create-entity-data-table-checks/create-entity-data-table-checks.component.html index 0f4c8a6938..e18cd7b9cf 100644 --- a/src/app/organization/entity-data-table-checks/create-entity-data-table-checks/create-entity-data-table-checks.component.html +++ b/src/app/organization/entity-data-table-checks/create-entity-data-table-checks/create-entity-data-table-checks.component.html @@ -6,70 +6,91 @@ {{ 'labels.inputs.Entity' | translate }} - - {{ entity.name }} - + @for (entity of entityTypes; track entity) { + + {{ entity.name }} + + } - - {{ 'labels.inputs.Entity' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createEntityForm.controls.entity.hasError('required')) { + + {{ 'labels.inputs.Entity' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Status' | translate }} - - {{ status.name }} - + @for (status of statusList; track status) { + + {{ status.name }} + + } - - {{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createEntityForm.controls.status.hasError('required')) { + + {{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Data Table' | translate }} - - {{ dataTable.dataTableName }} - + @for (dataTable of dataTableList; track dataTable) { + + {{ dataTable.dataTableName }} + + } - - {{ 'labels.inputs.Data Table' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createEntityForm.controls.datatableName.hasError('required')) { + + {{ 'labels.inputs.Data Table' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Products' | translate }} - - - {{ loanProducts.name }} - - - - {{ 'labels.inputs.Loan Product' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (entityType === 'm_loan') { + + {{ 'labels.inputs.Products' | translate }} + + @for (loanProducts of createEntityData.loanProductDatas; track loanProducts) { + + {{ loanProducts.name }} + + } + + @if (createEntityForm.controls.productId.hasError('required')) { + + {{ 'labels.inputs.Loan Product' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Products' | translate }} - - - {{ savingsProducts.name }} - - - - {{ 'labels.inputs.Loan Product' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (entityType === 'm_savings_account') { + + {{ 'labels.inputs.Products' | translate }} + + @for (savingsProducts of createEntityData.savingsProductDatas; track savingsProducts) { + + {{ savingsProducts.name }} + + } + + @if (createEntityForm.controls.productId.hasError('required')) { + + {{ 'labels.inputs.Loan Product' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } diff --git a/src/app/organization/entity-data-table-checks/create-entity-data-table-checks/create-entity-data-table-checks.component.ts b/src/app/organization/entity-data-table-checks/create-entity-data-table-checks/create-entity-data-table-checks.component.ts index 1a7c236550..769e721aaf 100644 --- a/src/app/organization/entity-data-table-checks/create-entity-data-table-checks/create-entity-data-table-checks.component.ts +++ b/src/app/organization/entity-data-table-checks/create-entity-data-table-checks/create-entity-data-table-checks.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, @@ -25,6 +25,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateEntityDataTableChecksComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private organizationService = inject(OrganizationService); + private router = inject(Router); + /** Create Entity Datatable Checks form. */ createEntityForm: UntypedFormGroup; /** Entity Datatable Checks data. */ @@ -38,6 +43,9 @@ export class CreateEntityDataTableChecksComponent implements OnInit { /** Loan and Savings status list. */ statusList: any[]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves Entity Datatable Checks data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -45,12 +53,7 @@ export class CreateEntityDataTableChecksComponent implements OnInit { * @param {OrganizationService} organizationService Organization Service. * @param {Router} router Router. */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private organizationService: OrganizationService, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { dataTableEntity: any }) => { this.createEntityData = data.dataTableEntity; // hardcoded, because data.dataTableEntity.entities might change anytime its order diff --git a/src/app/organization/entity-data-table-checks/enitity-data-table-checks-template.resolver.ts b/src/app/organization/entity-data-table-checks/enitity-data-table-checks-template.resolver.ts index 476a046e94..6c075d3790 100644 --- a/src/app/organization/entity-data-table-checks/enitity-data-table-checks-template.resolver.ts +++ b/src/app/organization/entity-data-table-checks/enitity-data-table-checks-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from '../organization.service'; */ @Injectable() export class EntityDataTableChecksTemplateResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the Entity Data Table Checks data. diff --git a/src/app/organization/entity-data-table-checks/entity-data-table-checks.component.html b/src/app/organization/entity-data-table-checks/entity-data-table-checks.component.html index a54f2f49dc..d4333b0549 100644 --- a/src/app/organization/entity-data-table-checks/entity-data-table-checks.component.html +++ b/src/app/organization/entity-data-table-checks/entity-data-table-checks.component.html @@ -44,20 +44,22 @@ {{ 'labels.inputs.System Defined' | translate }} - - + @if (entityDataTableCheck.systemDefined) { + + } + @if (!entityDataTableCheck.systemDefined) { + + } diff --git a/src/app/organization/entity-data-table-checks/entity-data-table-checks.component.ts b/src/app/organization/entity-data-table-checks/entity-data-table-checks.component.ts index 0583119e72..d001e2abee 100644 --- a/src/app/organization/entity-data-table-checks/entity-data-table-checks.component.ts +++ b/src/app/organization/entity-data-table-checks/entity-data-table-checks.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -54,6 +54,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EntityDataTableChecksComponent implements OnInit { + private organizationService = inject(OrganizationService); + private route = inject(ActivatedRoute); + private dialog = inject(MatDialog); + /** Entity Data Table Checks data. */ entityDataTableChecksData: any; /** Columns to be displayed in entity data table checks table. */ @@ -92,17 +96,16 @@ export class EntityDataTableChecksComponent implements OnInit { /** Sorter for entity data table checks table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the entity data table checks data from `resolve`. * @param {OrganizationService} organizationService Organization Service. * @param {ActivatedRoute} route Activated Route. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private organizationService: OrganizationService, - private route: ActivatedRoute, - private dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { entityDataTableChecks: any }) => { this.entityDataTableChecksData = data.entityDataTableChecks.pageItems; }); diff --git a/src/app/organization/entity-data-table-checks/entity-data-table-checks.resolver.ts b/src/app/organization/entity-data-table-checks/entity-data-table-checks.resolver.ts index 6471626026..ddddd9974a 100644 --- a/src/app/organization/entity-data-table-checks/entity-data-table-checks.resolver.ts +++ b/src/app/organization/entity-data-table-checks/entity-data-table-checks.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from '../organization.service'; */ @Injectable() export class EntityDataTableChecksResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the Entity Data Table Checks data. diff --git a/src/app/organization/fund-mapping/advance-search-template.resolver.ts b/src/app/organization/fund-mapping/advance-search-template.resolver.ts index 381e0c90a3..a3cec09670 100644 --- a/src/app/organization/fund-mapping/advance-search-template.resolver.ts +++ b/src/app/organization/fund-mapping/advance-search-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from '../organization.service'; */ @Injectable() export class AdvanceSearchTemplateResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the Advance Search template. diff --git a/src/app/organization/fund-mapping/fund-mapping.component.html b/src/app/organization/fund-mapping/fund-mapping.component.html index 043f9d2b14..1a9544e894 100644 --- a/src/app/organization/fund-mapping/fund-mapping.component.html +++ b/src/app/organization/fund-mapping/fund-mapping.component.html @@ -1,282 +1,306 @@ - - - - - - {{ 'labels.inputs.Loan Status' | translate }} - - {{ 'labels.inputs.All' | translate }} - {{ 'labels.inputs.Active' | translate }} - {{ 'labels.inputs.Overpaid' | translate }} - {{ 'labels.inputs.Closed (obligations met)' | translate }} - {{ 'labels.inputs.Closed (written-off)' | translate }} - - - - - - - {{ 'labels.inputs.Product' | translate }} - - - {{ product.name }} - - - - - - {{ 'labels.inputs.Office' | translate }} - - - {{ office.name }} - - - - - - {{ 'labels.inputs.Date Type' | translate }} - - {{ 'labels.inputs.Approval Date' | translate }} - {{ 'labels.inputs.Creation Date' | translate }} - {{ 'labels.inputs.Disbursement Date' | translate }} - - - {{ 'labels.inputs.Date Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.From Date' | translate }} - - - - - {{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.To Date' | translate }} - - - - - {{ 'labels.inputs.To Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Loan Outstanding Percentage' | translate }} - - - - - {{ 'labels.inputs.Comparison Condition' | translate }} - - {{ 'labels.inputs.between' | translate }} - <= - >= - < - > - = +@if (!isCollapsed) { + + + + + + {{ 'labels.inputs.Loan Status' | translate }} + + {{ 'labels.inputs.All' | translate }} + {{ 'labels.inputs.Active' | translate }} + {{ 'labels.inputs.Overpaid' | translate }} + {{ 'labels.inputs.Closed (obligations met)' | translate }} + {{ 'labels.inputs.Closed (written-off)' | translate }} - - {{ 'labels.inputs.Comparison Condition' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - {{ 'labels.inputs.Minimum Value' | translate }} - - - {{ 'labels.inputs.Minimum Value' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Comparison Value' | translate }} - - - {{ 'labels.inputs.Comparison Value' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Maximum Value' | translate }} - - - {{ 'labels.inputs.Maximum Value' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + + + {{ 'labels.inputs.Product' | translate }} + + @for (product of advanceSearchTemplate.loanProducts; track product) { + + {{ product.name }} + + } + - - - - {{ 'labels.inputs.Loan Outstanding Amount' | translate }} - - - - - {{ 'labels.inputs.Comparison Condition' | translate }} - - {{ 'labels.inputs.between' | translate }} - <= - >= - < - > - = + + {{ 'labels.inputs.Office' | translate }} + + @for (office of advanceSearchTemplate.offices; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Comparison Condition' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - {{ 'labels.inputs.Minimum Value' | translate }} - - - {{ 'labels.inputs.Minimum Value' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + + {{ 'labels.inputs.Date Type' | translate }} + + {{ 'labels.inputs.Approval Date' | translate }} + {{ 'labels.inputs.Creation Date' | translate }} + {{ 'labels.inputs.Disbursement Date' | translate }} + + @if (fundMappingForm.controls.loanDateOption.hasError('required')) { + + {{ 'labels.inputs.Date Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - - {{ 'labels.inputs.Comparison Value' | translate }} + + {{ 'labels.inputs.From Date' | translate }} - - {{ 'labels.inputs.Comparison Value' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + + + @if (fundMappingForm.controls.loanFromDate.hasError('required')) { + + {{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - - {{ 'labels.inputs.Maximum Value' | translate }} + + {{ 'labels.inputs.To Date' | translate }} - - {{ 'labels.inputs.Maximum Value' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + + + @if (fundMappingForm.controls.loanToDate.hasError('required')) { + + {{ 'labels.inputs.To Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - - - - - {{ 'labels.buttons.Cancel' | translate }} - - {{ 'labels.buttons.Summary' | translate }} - - - - - - - - - - {{ 'labels.buttons.Parameters' | translate }} - - - - - - {{ 'labels.inputs.Office Name' | translate }} - {{ loan.officeName }} - - - - {{ 'labels.inputs.Product Name' | translate }} - {{ loan.loanProductName }} - + + {{ 'labels.inputs.Loan Outstanding Percentage' | translate }} + + @if (fundMappingForm.value.includeOutStandingAmountPercentage) { + + @if (fundMappingForm.contains('outStandingAmountPercentageCondition')) { + + {{ 'labels.inputs.Comparison Condition' | translate }} + + {{ 'labels.inputs.between' | translate }} + <= + >= + < + > + = + + @if (fundMappingForm.controls.outStandingAmountPercentageCondition.hasError('required')) { + + {{ 'labels.inputs.Comparison Condition' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Count' | translate }} - {{ loan.count }} - + @if (fundMappingForm.contains('minOutStandingAmountPercentage')) { + + {{ 'labels.inputs.Minimum Value' | translate }} + + @if (fundMappingForm.controls.minOutStandingAmountPercentage.hasError('required')) { + + {{ 'labels.inputs.Minimum Value' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + @if (fundMappingForm.contains('outStandingAmountPercentage')) { + + {{ 'labels.inputs.Comparison Value' | translate }} + + @if (fundMappingForm.controls.outStandingAmountPercentage.hasError('required')) { + + {{ 'labels.inputs.Comparison Value' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + @if (fundMappingForm.contains('maxOutStandingAmountPercentage')) { + + {{ 'labels.inputs.Maximum Value' | translate }} + + @if (fundMappingForm.controls.maxOutStandingAmountPercentage.hasError('required')) { + + {{ 'labels.inputs.Maximum Value' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + + } + + {{ 'labels.inputs.Loan Outstanding Amount' | translate }} + + @if (fundMappingForm.value.includeOutstandingAmount) { + + @if (fundMappingForm.contains('outstandingAmountCondition')) { + + {{ 'labels.inputs.Comparison Condition' | translate }} + + {{ 'labels.inputs.between' | translate }} + <= + >= + < + > + = + + @if (fundMappingForm.controls.outstandingAmountCondition.hasError('required')) { + + {{ 'labels.inputs.Comparison Condition' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Outstanding' | translate }} - {{ loan.loanOutStanding }} - - - - {{ 'labels.inputs.Percentage' | translate }} - {{ loan.percentage }} - - - - - - - + @if (fundMappingForm.contains('minOutstandingAmount')) { + + {{ 'labels.inputs.Minimum Value' | translate }} + + @if (fundMappingForm.controls.minOutstandingAmount.hasError('required')) { + + {{ 'labels.inputs.Minimum Value' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + @if (fundMappingForm.contains('outstandingAmount')) { + + {{ 'labels.inputs.Comparison Value' | translate }} + + @if (fundMappingForm.controls.outstandingAmount.hasError('required')) { + + {{ 'labels.inputs.Comparison Value' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + @if (fundMappingForm.contains('maxOutstandingAmount')) { + + {{ 'labels.inputs.Maximum Value' | translate }} + + @if (fundMappingForm.controls.maxOutstandingAmount.hasError('required')) { + + {{ 'labels.inputs.Maximum Value' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + + } + + + + + {{ 'labels.buttons.Cancel' | translate }} + + + {{ 'labels.buttons.Summary' | translate }} + + + - +} + +@if (isCollapsed) { + + + + + {{ 'labels.buttons.Parameters' | translate }} + + + + + {{ 'labels.inputs.Office Name' | translate }} + {{ loan.officeName }} + + + {{ 'labels.inputs.Product Name' | translate }} + {{ loan.loanProductName }} + + + {{ 'labels.inputs.Count' | translate }} + {{ loan.count }} + + + {{ 'labels.inputs.Outstanding' | translate }} + {{ loan.loanOutStanding }} + + + {{ 'labels.inputs.Percentage' | translate }} + {{ loan.percentage }} + + + + + + + +} diff --git a/src/app/organization/fund-mapping/fund-mapping.component.ts b/src/app/organization/fund-mapping/fund-mapping.component.ts index 1e1ad51ec4..a4ef7a1cf6 100644 --- a/src/app/organization/fund-mapping/fund-mapping.component.ts +++ b/src/app/organization/fund-mapping/fund-mapping.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -59,6 +59,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FundMappingComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + /** Minimum Date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum Date allowed. */ @@ -86,6 +92,9 @@ export class FundMappingComponent implements OnInit { /** Sorter for loans table. */ @ViewChild(MatSort) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the advance search template from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -94,13 +103,7 @@ export class FundMappingComponent implements OnInit { * @param {Router} router Router for navigation. * @param {Dates} dateUtils Date Utils to format date. */ - constructor( - private formBuilder: UntypedFormBuilder, - private organizationService: OrganizationService, - private settingsService: SettingsService, - private route: ActivatedRoute, - private dateUtils: Dates - ) { + constructor() { this.route.data.subscribe((data: { advanceSearchTemplate: any }) => { this.advanceSearchTemplate = data.advanceSearchTemplate; }); diff --git a/src/app/organization/holidays/create-holiday/create-holiday.component.html b/src/app/organization/holidays/create-holiday/create-holiday.component.html index 59357aff04..5ac34dca84 100644 --- a/src/app/organization/holidays/create-holiday/create-holiday.component.html +++ b/src/app/organization/holidays/create-holiday/create-holiday.component.html @@ -6,10 +6,12 @@ {{ 'labels.inputs.name' | translate }} - - {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (holidayForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -24,10 +26,12 @@ /> - - {{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (holidayForm.controls.fromDate.hasError('required')) { + + {{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -42,42 +46,52 @@ /> - - {{ 'labels.inputs.To Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (holidayForm.controls.toDate.hasError('required')) { + + {{ 'labels.inputs.To Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Repayment Scheduling Type' | translate }} - - {{ repayments.value }} - + @for (repayments of repaymentSchedulingTypes; track repayments) { + + {{ repayments.value }} + + } - - {{ 'labels.inputs.Repayment Scheduling Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (holidayForm.controls.reschedulingType.hasError('required')) { + + {{ 'labels.inputs.Repayment Scheduling Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Repayment scheduled to' | translate }} - - - - - {{ 'labels.inputs.Repayment scheduled to' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (holidayForm.contains('repaymentsRescheduledTo')) { + + {{ 'labels.inputs.Repayment scheduled to' | translate }} + + + + @if (holidayForm.controls.repaymentsRescheduledTo.hasError('required')) { + + {{ 'labels.inputs.Repayment scheduled to' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } {{ 'labels.inputs.Description' | translate }} diff --git a/src/app/organization/holidays/create-holiday/create-holiday.component.ts b/src/app/organization/holidays/create-holiday/create-holiday.component.ts index 4ce0073adb..0fa68ac702 100644 --- a/src/app/organization/holidays/create-holiday/create-holiday.component.ts +++ b/src/app/organization/holidays/create-holiday/create-holiday.component.ts @@ -1,6 +1,6 @@ /** Angular Imports. */ import { SelectionModel } from '@angular/cdk/collections'; -import { Component, OnInit, ViewChild, Injectable } from '@angular/core'; +import { Component, OnInit, ViewChild, Injectable, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, @@ -53,6 +53,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateHolidayComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private organizationService = inject(OrganizationService); + private settings = inject(SettingsService); + private router = inject(Router); + private _database = inject(ChecklistDatabase); + private createHoliday = inject(CreateHoliday); + /** Create Holiday form. */ holidayForm: UntypedFormGroup; /** Repayment Scheduling data. */ @@ -91,6 +100,9 @@ export class CreateHolidayComponent implements OnInit { /** The selection for checklist */ checklistSelection = new SelectionModel(true /* multiple */); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + // Angular Material Tree Configuration end ------------ /** @@ -101,16 +113,9 @@ export class CreateHolidayComponent implements OnInit { * @param {OrganizationService} organizationService Organization Service. * @param {Router} router Router. */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private dateUtils: Dates, - private organizationService: OrganizationService, - private settings: SettingsService, - private router: Router, - private _database: ChecklistDatabase, - private createHoliday: CreateHoliday - ) { + constructor() { + const _database = this._database; + this.route.data.subscribe((data: { offices: any; holidayTemplate: any }) => { this.officesData = data.offices; this.repaymentSchedulingTypes = data.holidayTemplate; diff --git a/src/app/organization/holidays/edit-holiday/edit-holiday.component.html b/src/app/organization/holidays/edit-holiday/edit-holiday.component.html index 4598fd6629..3083abd2ad 100644 --- a/src/app/organization/holidays/edit-holiday/edit-holiday.component.html +++ b/src/app/organization/holidays/edit-holiday/edit-holiday.component.html @@ -6,78 +6,98 @@ {{ 'labels.inputs.name' | translate }} - - {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (holidayForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.From Date' | translate }} - - - - - {{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (!isActiveHoliday) { + + {{ 'labels.inputs.From Date' | translate }} + + + + @if (holidayForm.controls.fromDate.hasError('required')) { + + {{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.To Date' | translate }} - - - - - {{ 'labels.inputs.To Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (!isActiveHoliday) { + + {{ 'labels.inputs.To Date' | translate }} + + + + @if (holidayForm.controls.toDate.hasError('required')) { + + {{ 'labels.inputs.To Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Repayment Scheduling Type' | translate }} - - - {{ repayments.value }} - - - - {{ 'labels.inputs.Repayment Scheduling Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (!isActiveHoliday) { + + {{ 'labels.inputs.Repayment Scheduling Type' | translate }} + + @for (repayments of holidayData.repaymentSchedulingTypes; track repayments) { + + {{ repayments.value }} + + } + + @if (holidayForm.controls.reschedulingType.hasError('required')) { + + {{ 'labels.inputs.Repayment Scheduling Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Repayment scheduled to' | translate }} - - - - - {{ 'labels.inputs.Repayment scheduled to' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (!isActiveHoliday && reSchedulingType === 2) { + + {{ 'labels.inputs.Repayment scheduled to' | translate }} + + + + @if (holidayForm.controls.repaymentsRescheduledTo.hasError('required')) { + + {{ 'labels.inputs.Repayment scheduled to' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } {{ 'labels.inputs.Description' | translate }} diff --git a/src/app/organization/holidays/edit-holiday/edit-holiday.component.ts b/src/app/organization/holidays/edit-holiday/edit-holiday.component.ts index 2795f206cb..cdb8888618 100644 --- a/src/app/organization/holidays/edit-holiday/edit-holiday.component.ts +++ b/src/app/organization/holidays/edit-holiday/edit-holiday.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, @@ -27,6 +27,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditHolidayComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private organizatioService = inject(OrganizationService); + private settingsService = inject(SettingsService); + private router = inject(Router); + /** Edit Holiday form. */ holidayForm: UntypedFormGroup; /** Holiday data. */ @@ -40,6 +47,9 @@ export class EditHolidayComponent implements OnInit { /** Maximum Date allowed. */ maxDate = new Date(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Get holiday and holiday template from `Resolver`. * @param {FormBuilder} formBuilder Form Builder. @@ -48,14 +58,7 @@ export class EditHolidayComponent implements OnInit { * @param {OrganizationService} organizatioService Organization Service. * @param {Router} router Router. */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private dateUtils: Dates, - private organizatioService: OrganizationService, - private settingsService: SettingsService, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { holiday: any; holidayTemplate: any }) => { this.holidayData = data.holiday; this.holidayData.repaymentSchedulingTypes = data.holidayTemplate; diff --git a/src/app/organization/holidays/holiday-template.resolver.ts b/src/app/organization/holidays/holiday-template.resolver.ts index 4ba7497dc9..c0dd8bc4ad 100644 --- a/src/app/organization/holidays/holiday-template.resolver.ts +++ b/src/app/organization/holidays/holiday-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from 'app/organization/organization.service'; */ @Injectable() export class HolidayTemplateResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the holiday data. diff --git a/src/app/organization/holidays/holiday.resolver.ts b/src/app/organization/holidays/holiday.resolver.ts index 8f4e4cbefc..4188532755 100644 --- a/src/app/organization/holidays/holiday.resolver.ts +++ b/src/app/organization/holidays/holiday.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from 'app/organization/organization.service'; */ @Injectable() export class HolidayResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the holiday data. diff --git a/src/app/organization/holidays/holidays.component.html b/src/app/organization/holidays/holidays.component.html index f471e831b2..c80d06e962 100644 --- a/src/app/organization/holidays/holidays.component.html +++ b/src/app/organization/holidays/holidays.component.html @@ -16,9 +16,11 @@ {{ 'labels.inputs.Select Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } diff --git a/src/app/organization/holidays/holidays.component.ts b/src/app/organization/holidays/holidays.component.ts index fc32739858..4c57e3a899 100644 --- a/src/app/organization/holidays/holidays.component.ts +++ b/src/app/organization/holidays/holidays.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -56,6 +56,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class HolidaysComponent implements OnInit, AfterViewInit { + private organizationService = inject(OrganizationService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Office selector. */ officeSelector = new UntypedFormControl(); /** Holidays data. */ @@ -87,6 +93,9 @@ export class HolidaysComponent implements OnInit, AfterViewInit { /* Template to show popover on filter */ @ViewChild('templateFilterRef') templateFilterRef: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {OrganizationService} organizationService Organization Service. @@ -96,13 +105,7 @@ export class HolidaysComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private organizationService: OrganizationService, - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { offices: any }) => { this.officeData = data.offices; }); diff --git a/src/app/organization/holidays/view-holidays/view-holidays.component.html b/src/app/organization/holidays/view-holidays/view-holidays.component.html index 8459cb973a..1a1c6aa318 100644 --- a/src/app/organization/holidays/view-holidays/view-holidays.component.html +++ b/src/app/organization/holidays/view-holidays/view-holidays.component.html @@ -1,9 +1,11 @@ - - - {{ 'labels.buttons.Activate' | translate }} - + @if (holidayData.status.value !== 'Active') { + + + {{ 'labels.buttons.Activate' | translate }} + + } @@ -47,19 +49,17 @@ {{ 'labels.inputs.Repayments Scheduled To' | translate }} - - {{ holidayData.repaymentsRescheduledTo | dateFormat }} - + @if (holidayData.repaymentsRescheduledTo !== undefined && holidayData.repaymentsRescheduledTo !== null) { + + {{ holidayData.repaymentsRescheduledTo | dateFormat }} + + } - - {{ 'labels.inputs.Next Repayment Date' | translate }} - + @if (holidayData.repaymentsRescheduledTo === undefined || holidayData.repaymentsRescheduledTo === null) { + + {{ 'labels.inputs.Next Repayment Date' | translate }} + + } diff --git a/src/app/organization/holidays/view-holidays/view-holidays.component.ts b/src/app/organization/holidays/view-holidays/view-holidays.component.ts index 0d3b8205e9..b44d07cb17 100644 --- a/src/app/organization/holidays/view-holidays/view-holidays.component.ts +++ b/src/app/organization/holidays/view-holidays/view-holidays.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -28,20 +28,23 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewHolidaysComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + private organizationService = inject(OrganizationService); + /** Holiday data. */ holidayData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves hioliday data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private translateService: TranslateService, - private organizationService: OrganizationService - ) { + constructor() { this.route.data.subscribe((data: { holidays: any }) => { this.holidayData = data.holidays; }); diff --git a/src/app/organization/investors/investors.component.html b/src/app/organization/investors/investors.component.html index 91165da6ff..d09b15b936 100644 --- a/src/app/organization/investors/investors.component.html +++ b/src/app/organization/investors/investors.component.html @@ -66,164 +66,176 @@ - - - - - - - - - - - - - {{ record.status }} - - - {{ 'labels.inputs.Owner External Id' | translate }} - - - - {{ 'labels.inputs.Transfer External Id' | translate }} - - - - {{ 'labels.inputs.Effective From' | translate }} - {{ record.effectiveFrom | dateFormat }} - - - - - - - - - - - {{ 'labels.inputs.Status' | translate }} : - - - - - {{ record.status }} - - - - {{ 'labels.inputs.Owner External Id' | translate }} : - - - - - - - - {{ 'labels.inputs.Settlement Date' | translate }} : - - - {{ record.settlementDate | dateFormat }} - - - {{ 'labels.inputs.Effective Date' | translate }} : - - - {{ record.effectiveFrom | dateFormat }} - - - - - {{ 'labels.inputs.Details' | translate }} : - - - - - - - {{ 'labels.inputs.Principal Outstanding' | translate }} : - - - {{ record.details.totalPrincipalOutstanding | formatNumber }} - - - - - {{ 'labels.inputs.Interest Outstanding' | translate }} : - - - {{ record.details.totalInterestOutstanding | formatNumber }} - - - - - {{ 'labels.inputs.Fees Outstanding' | translate }} : - - - {{ record.details.totalFeeChargesOutstanding | formatNumber }} - - - - - {{ 'labels.inputs.Penalties Outstanding' | translate }} : - - - {{ record.details.totalPenaltyChargesOutstanding | formatNumber }} - - - - - {{ 'labels.inputs.Outstanding' | translate }} : - - {{ record.details.totalOutstanding | formatNumber }} - - - - {{ 'labels.inputs.Overpaid' | translate }} : - - {{ record.details.totalOverpaid | formatNumber }} - - - - - - - - - - + @if (isLoading) { + + + + } + @if (existsDataToFilter) { + + @for (record of searchResults; track record; let i = $index) { + + + + + + + + + {{ record.status }} + + + {{ 'labels.inputs.Owner External Id' | translate }} + + + + {{ 'labels.inputs.Transfer External Id' | translate }} + + + + {{ 'labels.inputs.Effective From' | translate }} + {{ record.effectiveFrom | dateFormat }} + + + + + + + + + + {{ 'labels.inputs.Status' | translate }} : + + + + + {{ record.status }} + + + + {{ 'labels.inputs.Owner External Id' | translate }} : + + + + + + + + {{ 'labels.inputs.Settlement Date' | translate }} : + + + {{ record.settlementDate | dateFormat }} + + + {{ 'labels.inputs.Effective Date' | translate }} : + + + {{ record.effectiveFrom | dateFormat }} + + + @if (record.details) { + + + {{ 'labels.inputs.Details' | translate }} : + + + + + + + {{ 'labels.inputs.Principal Outstanding' | translate }} : + + + {{ record.details.totalPrincipalOutstanding | formatNumber }} + + + + + {{ 'labels.inputs.Interest Outstanding' | translate }} : + + + {{ record.details.totalInterestOutstanding | formatNumber }} + + + + + {{ 'labels.inputs.Fees Outstanding' | translate }} : + + + {{ record.details.totalFeeChargesOutstanding | formatNumber }} + + + + + {{ 'labels.inputs.Penalties Outstanding' | translate }} : + + + {{ record.details.totalPenaltyChargesOutstanding | formatNumber }} + + + + + {{ 'labels.inputs.Outstanding' | translate }} : + + {{ record.details.totalOutstanding | formatNumber }} + + + + {{ 'labels.inputs.Overpaid' | translate }} : + + {{ record.details.totalOverpaid | formatNumber }} + + + + + + } + + + + + @if (canBeCancelled(record)) { + + + + + + } + + } + + } - - - - - - - - - + @if (existsDataToFilter) { + + } - - - - {{ 'labels.text.No data found' | translate }} + @if (!existsDataToFilter) { + + + + {{ 'labels.text.No data found' | translate }} + - + } diff --git a/src/app/organization/investors/investors.component.ts b/src/app/organization/investors/investors.component.ts index 9126da559c..24e580afca 100644 --- a/src/app/organization/investors/investors.component.ts +++ b/src/app/organization/investors/investors.component.ts @@ -1,5 +1,5 @@ import { animate, state, style, transition, trigger } from '@angular/animations'; -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator, PageEvent } from '@angular/material/paginator'; @@ -12,7 +12,7 @@ import { ExternalAssetOwnerService } from 'app/loans/services/external-asset-own import { SettingsService } from 'app/settings/settings.service'; import { CancelDialogComponent } from 'app/shared/cancel-dialog/cancel-dialog.component'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; -import { NgIf, NgFor, NgClass } from '@angular/common'; +import { NgClass } from '@angular/common'; import { MatAccordion, MatExpansionPanel, @@ -54,6 +54,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class InvestorsComponent implements OnInit { + private settingsService = inject(SettingsService); + private router = inject(Router); + private dialog = inject(MatDialog); + private externalAssetOwner = inject(ExternalAssetOwner); + private externalAssetOwnerService = inject(ExternalAssetOwnerService); + private dateUtils = inject(Dates); + /** Minimum transaction date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum transaction date allowed. */ @@ -113,14 +120,10 @@ export class InvestorsComponent implements OnInit { 'totalAmount', 'actions' ]; - constructor( - private settingsService: SettingsService, - private router: Router, - private dialog: MatDialog, - private externalAssetOwner: ExternalAssetOwner, - private externalAssetOwnerService: ExternalAssetOwnerService, - private dateUtils: Dates - ) {} + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + constructor() {} ngOnInit(): void { this.maxDate = this.settingsService.maxAllowedDate; diff --git a/src/app/organization/loan-provisioning-criteria/common-resolvers/loan-provisioning-criteria-and-template.resolver.ts b/src/app/organization/loan-provisioning-criteria/common-resolvers/loan-provisioning-criteria-and-template.resolver.ts index b47d533552..e143bf2c3c 100644 --- a/src/app/organization/loan-provisioning-criteria/common-resolvers/loan-provisioning-criteria-and-template.resolver.ts +++ b/src/app/organization/loan-provisioning-criteria/common-resolvers/loan-provisioning-criteria-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from '../../organization.service'; */ @Injectable() export class LoanProvisioningCriteriaAndTemplateResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Products service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the Pprovisioning criteria and template data. diff --git a/src/app/organization/loan-provisioning-criteria/common-resolvers/loan-provisioning-criteria-template.resolver.ts b/src/app/organization/loan-provisioning-criteria/common-resolvers/loan-provisioning-criteria-template.resolver.ts index 39b2307316..732cc357f5 100644 --- a/src/app/organization/loan-provisioning-criteria/common-resolvers/loan-provisioning-criteria-template.resolver.ts +++ b/src/app/organization/loan-provisioning-criteria/common-resolvers/loan-provisioning-criteria-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from '../../organization.service'; */ @Injectable() export class LoanProvisioningCriteriaTemplateResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Products service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the Pprovisioning criteria template diff --git a/src/app/organization/loan-provisioning-criteria/common-resolvers/loan-provisioning-criteria.resolver.ts b/src/app/organization/loan-provisioning-criteria/common-resolvers/loan-provisioning-criteria.resolver.ts index ac97acabc2..e5868ff756 100644 --- a/src/app/organization/loan-provisioning-criteria/common-resolvers/loan-provisioning-criteria.resolver.ts +++ b/src/app/organization/loan-provisioning-criteria/common-resolvers/loan-provisioning-criteria.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from '../../organization.service'; */ @Injectable() export class LoanProvisioningCriteriaResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the loan provisioning criteria data. diff --git a/src/app/organization/loan-provisioning-criteria/common-resolvers/loan-provisioning-criterias.resolver.ts b/src/app/organization/loan-provisioning-criteria/common-resolvers/loan-provisioning-criterias.resolver.ts index 32b7593013..d19831f3a9 100644 --- a/src/app/organization/loan-provisioning-criteria/common-resolvers/loan-provisioning-criterias.resolver.ts +++ b/src/app/organization/loan-provisioning-criteria/common-resolvers/loan-provisioning-criterias.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from '../../organization.service'; */ @Injectable() export class LoanProvisioningCriteriasResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Products service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the products data. diff --git a/src/app/organization/loan-provisioning-criteria/create-loan-provisioning-criteria/create-loan-provisioning-criteria.component.html b/src/app/organization/loan-provisioning-criteria/create-loan-provisioning-criteria/create-loan-provisioning-criteria.component.html index 0fa5577ebb..921141155d 100644 --- a/src/app/organization/loan-provisioning-criteria/create-loan-provisioning-criteria/create-loan-provisioning-criteria.component.html +++ b/src/app/organization/loan-provisioning-criteria/create-loan-provisioning-criteria/create-loan-provisioning-criteria.component.html @@ -6,18 +6,22 @@ {{ 'labels.inputs.Provisioning Criteria' | translate }} - - {{ 'labels.inputs.Provisioning Criteria' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (provisioningCriteriaForm.controls.criteriaName.hasError('required')) { + + {{ 'labels.inputs.Provisioning Criteria' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Selected Products' | translate }} - - {{ product.name }} - + @for (product of loanProvisioningCriteriaTemplate.loanProducts; track product) { + + {{ product.name }} + + } @@ -25,9 +29,9 @@ - - {{ 'labels.text.Provisioning criteria definitions' | translate }} + @if (!provisioningCriteriaFormValid) { + {{ 'labels.text.Provisioning criteria definitions' | translate }} + } diff --git a/src/app/organization/loan-provisioning-criteria/create-loan-provisioning-criteria/create-loan-provisioning-criteria.component.ts b/src/app/organization/loan-provisioning-criteria/create-loan-provisioning-criteria/create-loan-provisioning-criteria.component.ts index 95727b2aba..2a8cc9df25 100644 --- a/src/app/organization/loan-provisioning-criteria/create-loan-provisioning-criteria/create-loan-provisioning-criteria.component.ts +++ b/src/app/organization/loan-provisioning-criteria/create-loan-provisioning-criteria/create-loan-provisioning-criteria.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { @@ -58,6 +58,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateLoanProvisioningCriteriaComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + private router = inject(Router); + dialog = inject(MatDialog); + private route = inject(ActivatedRoute); + /** Loan Provisioning Criteria form. */ provisioningCriteriaForm: UntypedFormGroup; /** Loan Provisioning Criteria Template */ @@ -90,6 +97,9 @@ export class CreateLoanProvisioningCriteriaComponent implements OnInit { /** Checks Definitons Table Validity */ isDefinitionValid: any = {}; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -98,14 +108,7 @@ export class CreateLoanProvisioningCriteriaComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private organizationService: OrganizationService, - private settingsService: SettingsService, - private router: Router, - public dialog: MatDialog, - private route: ActivatedRoute - ) { + constructor() { this.route.data.subscribe((data: { loanProvisioningCriteriaTemplate: any }) => { this.loanProvisioningCriteriaTemplate = data.loanProvisioningCriteriaTemplate; this.definitions = this.loanProvisioningCriteriaTemplate.definitions; diff --git a/src/app/organization/loan-provisioning-criteria/edit-loan-provisioning-criteria/edit-loan-provisioning-criteria.component.html b/src/app/organization/loan-provisioning-criteria/edit-loan-provisioning-criteria/edit-loan-provisioning-criteria.component.html index c429259a45..3b27ca4a71 100644 --- a/src/app/organization/loan-provisioning-criteria/edit-loan-provisioning-criteria/edit-loan-provisioning-criteria.component.html +++ b/src/app/organization/loan-provisioning-criteria/edit-loan-provisioning-criteria/edit-loan-provisioning-criteria.component.html @@ -6,18 +6,22 @@ {{ 'labels.inputs.Provisioning Criteria' | translate }} - - {{ 'labels.inputs.Provisioning Criteria' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (provisioningCriteriaForm.controls.criteriaName.hasError('required')) { + + {{ 'labels.inputs.Provisioning Criteria' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Selected Products' | translate }} - - {{ product.name }} - + @for (product of loanProducts; track product) { + + {{ product.name }} + + } @@ -25,9 +29,9 @@ - {{ - 'labels.text.Provisioning criteria definitions' | translate - }} + @if (!provisioningCriteriaFormValid) { + {{ 'labels.text.Provisioning criteria definitions' | translate }} + } diff --git a/src/app/organization/loan-provisioning-criteria/edit-loan-provisioning-criteria/edit-loan-provisioning-criteria.component.ts b/src/app/organization/loan-provisioning-criteria/edit-loan-provisioning-criteria/edit-loan-provisioning-criteria.component.ts index 9dffeac86c..ff73a701f0 100644 --- a/src/app/organization/loan-provisioning-criteria/edit-loan-provisioning-criteria/edit-loan-provisioning-criteria.component.ts +++ b/src/app/organization/loan-provisioning-criteria/edit-loan-provisioning-criteria/edit-loan-provisioning-criteria.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { @@ -58,6 +58,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditLoanProvisioningCriteriaComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private organizationService = inject(OrganizationService); + private router = inject(Router); + private settingsService = inject(SettingsService); + dialog = inject(MatDialog); + private route = inject(ActivatedRoute); + /** Loan Provisioning Criteria form. */ provisioningCriteriaForm: UntypedFormGroup; /** Loan Provisioning Criteria Template */ @@ -90,6 +97,9 @@ export class EditLoanProvisioningCriteriaComponent implements OnInit { provisioningPercentage?: number; }[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -98,14 +108,7 @@ export class EditLoanProvisioningCriteriaComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private organizationService: OrganizationService, - private router: Router, - private settingsService: SettingsService, - public dialog: MatDialog, - private route: ActivatedRoute - ) { + constructor() { this.route.data.subscribe((data: { loanProvisioningCriteriaAndTemplate: any }) => { this.loanProvisioningCriteriaAndTemplate = data.loanProvisioningCriteriaAndTemplate; this.definitions = this.loanProvisioningCriteriaAndTemplate.definitions; diff --git a/src/app/organization/loan-provisioning-criteria/loan-provisioning-criteria.component.ts b/src/app/organization/loan-provisioning-criteria/loan-provisioning-criteria.component.ts index 686bc53527..e6503e2957 100644 --- a/src/app/organization/loan-provisioning-criteria/loan-provisioning-criteria.component.ts +++ b/src/app/organization/loan-provisioning-criteria/loan-provisioning-criteria.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -48,6 +48,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanProvisioningCriteriaComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Loan Provisioning Criteria data. */ loanProvisioningCriteriaData: any; /** Columns to be displayed in loan provisioning criteria table. */ @@ -63,11 +65,14 @@ export class LoanProvisioningCriteriaComponent implements OnInit { /** Sorter for loan provisioning criteria table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the loan provisioning criteria data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { loanProvisioningCriterias: any }) => { this.loanProvisioningCriteriaData = data.loanProvisioningCriterias; }); diff --git a/src/app/organization/loan-provisioning-criteria/view-loan-provisioning-criteria/view-loan-provisioning-criteria.component.ts b/src/app/organization/loan-provisioning-criteria/view-loan-provisioning-criteria/view-loan-provisioning-criteria.component.ts index 2da20bf563..e6f902b49a 100644 --- a/src/app/organization/loan-provisioning-criteria/view-loan-provisioning-criteria/view-loan-provisioning-criteria.component.ts +++ b/src/app/organization/loan-provisioning-criteria/view-loan-provisioning-criteria/view-loan-provisioning-criteria.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; import { @@ -49,6 +49,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewLoanProvisioningCriteriaComponent implements OnInit { + private organizationService = inject(OrganizationService); + private route = inject(ActivatedRoute); + private router = inject(Router); + dialog = inject(MatDialog); + /** Loan Provisioning data. */ provisioningData: any; /** Loan Product String. */ @@ -65,6 +70,9 @@ export class ViewLoanProvisioningCriteriaComponent implements OnInit { /** Data source for loan provisioning criteria table. */ dataSource: MatTableDataSource; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Provisioning data from `resolve`. * @param {OrganizationService} organizationService Organization Service. @@ -72,12 +80,7 @@ export class ViewLoanProvisioningCriteriaComponent implements OnInit { * @param {Router} router Router for navigation. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private organizationService: OrganizationService, - private route: ActivatedRoute, - private router: Router, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { loanProvisioningCriteria: any }) => { this.provisioningData = data.loanProvisioningCriteria; }); diff --git a/src/app/organization/manage-funds/create-fund/create-fund.component.html b/src/app/organization/manage-funds/create-fund/create-fund.component.html index 23f2474e3e..8a874cd2f9 100644 --- a/src/app/organization/manage-funds/create-fund/create-fund.component.html +++ b/src/app/organization/manage-funds/create-fund/create-fund.component.html @@ -6,10 +6,12 @@ {{ 'labels.inputs.name' | translate }} - - {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (fundForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/organization/manage-funds/create-fund/create-fund.component.ts b/src/app/organization/manage-funds/create-fund/create-fund.component.ts index 58735b5183..2e57514403 100644 --- a/src/app/organization/manage-funds/create-fund/create-fund.component.ts +++ b/src/app/organization/manage-funds/create-fund/create-fund.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { OrganizationService } from 'app/organization/organization.service'; @@ -13,9 +13,17 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateFundComponent implements OnInit { + private organizationService = inject(OrganizationService); + private formBuilder = inject(UntypedFormBuilder); + private router = inject(Router); + private route = inject(ActivatedRoute); + /** Charge form. */ fundForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the charge data from `resolve`. * @param {ProductsService} productsService Products Service. @@ -23,12 +31,7 @@ export class CreateFundComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private organizationService: OrganizationService, - private formBuilder: UntypedFormBuilder, - private router: Router, - private route: ActivatedRoute - ) {} + constructor() {} ngOnInit() { this.createFundForm(); diff --git a/src/app/organization/manage-funds/edit-fund/edit-fund.component.html b/src/app/organization/manage-funds/edit-fund/edit-fund.component.html index 3b98b258ae..5b454999aa 100644 --- a/src/app/organization/manage-funds/edit-fund/edit-fund.component.html +++ b/src/app/organization/manage-funds/edit-fund/edit-fund.component.html @@ -6,10 +6,12 @@ {{ 'labels.inputs.name' | translate }} - - {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (fundForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/organization/manage-funds/edit-fund/edit-fund.component.ts b/src/app/organization/manage-funds/edit-fund/edit-fund.component.ts index 7d24b67199..8570efaf9f 100644 --- a/src/app/organization/manage-funds/edit-fund/edit-fund.component.ts +++ b/src/app/organization/manage-funds/edit-fund/edit-fund.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { OrganizationService } from 'app/organization/organization.service'; @@ -13,11 +13,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditFundComponent implements OnInit { + private organizationService = inject(OrganizationService); + private formBuilder = inject(UntypedFormBuilder); + private router = inject(Router); + private route = inject(ActivatedRoute); + /** Selected Data. */ fundData: any; /** Charge form. */ fundForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the charge data from `resolve`. * @param {ProductsService} productsService Products Service. @@ -25,12 +33,7 @@ export class EditFundComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private organizationService: OrganizationService, - private formBuilder: UntypedFormBuilder, - private router: Router, - private route: ActivatedRoute - ) { + constructor() { this.route.data.subscribe((data: { fundData: any }) => { this.fundData = data.fundData; }); diff --git a/src/app/organization/manage-funds/manage-fund.resolver.ts b/src/app/organization/manage-funds/manage-fund.resolver.ts index 1f3f47893c..3d70997d73 100644 --- a/src/app/organization/manage-funds/manage-fund.resolver.ts +++ b/src/app/organization/manage-funds/manage-fund.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; import { Observable } from 'rxjs'; import { OrganizationService } from '../organization.service'; @@ -7,10 +7,15 @@ import { OrganizationService } from '../organization.service'; providedIn: 'root' }) export class ManageFundResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the manage funds data. diff --git a/src/app/organization/manage-funds/manage-funds.component.ts b/src/app/organization/manage-funds/manage-funds.component.ts index ead5bea216..a487e77c18 100644 --- a/src/app/organization/manage-funds/manage-funds.component.ts +++ b/src/app/organization/manage-funds/manage-funds.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; import { UntypedFormBuilder, Validators } from '@angular/forms'; @@ -64,6 +64,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ManageFundsComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private formBuilder = inject(UntypedFormBuilder); + private organizationservice = inject(OrganizationService); + dialog = inject(MatDialog); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Manage Funds data. */ fundsData: any; /** New Fund form */ @@ -88,6 +96,9 @@ export class ManageFundsComponent implements OnInit, AfterViewInit { /** Sorter for charges table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the manage funds data from `resolve`. * @param {ActivatedRoute} route Activated Route @@ -98,15 +109,7 @@ export class ManageFundsComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private formBuilder: UntypedFormBuilder, - private organizationservice: OrganizationService, - public dialog: MatDialog, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { funds: any }) => { this.fundsData = data.funds; }); diff --git a/src/app/organization/manage-funds/manage-funds.resolver.ts b/src/app/organization/manage-funds/manage-funds.resolver.ts index 3348d44dc0..8394d341ee 100644 --- a/src/app/organization/manage-funds/manage-funds.resolver.ts +++ b/src/app/organization/manage-funds/manage-funds.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from '../organization.service'; */ @Injectable() export class ManageFundsResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the manage funds data. diff --git a/src/app/organization/manage-funds/view-fund/view-fund.component.ts b/src/app/organization/manage-funds/view-fund/view-fund.component.ts index 1b30354222..5309937c36 100644 --- a/src/app/organization/manage-funds/view-fund/view-fund.component.ts +++ b/src/app/organization/manage-funds/view-fund/view-fund.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { ExternalIdentifierComponent } from '../../../shared/external-identifier/external-identifier.component'; @@ -15,14 +15,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewFundComponent { + private route = inject(ActivatedRoute); + /** Fund data. */ fundData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the charge data from `resolve`. * @param {Router} router Router for navigation. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { fundData: any }) => { this.fundData = data.fundData; }); diff --git a/src/app/organization/offices/common-resolvers/edit-office.resolver.ts b/src/app/organization/offices/common-resolvers/edit-office.resolver.ts index 1155ab264a..e376bee654 100644 --- a/src/app/organization/offices/common-resolvers/edit-office.resolver.ts +++ b/src/app/organization/offices/common-resolvers/edit-office.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from '../../organization.service'; */ @Injectable() export class EditOfficeResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the office and template data. diff --git a/src/app/organization/offices/common-resolvers/office-datatable.resolver.ts b/src/app/organization/offices/common-resolvers/office-datatable.resolver.ts index fe41092296..55e90f5055 100644 --- a/src/app/organization/offices/common-resolvers/office-datatable.resolver.ts +++ b/src/app/organization/offices/common-resolvers/office-datatable.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; import { SystemService } from 'app/system/system.service'; @@ -11,10 +11,15 @@ import { Observable } from 'rxjs'; */ @Injectable() export class OfficeDatatableResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService Products service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Office's Datatable data. diff --git a/src/app/organization/offices/common-resolvers/office-datatables.resolver.ts b/src/app/organization/offices/common-resolvers/office-datatables.resolver.ts index 58baf8b996..6dc99db68a 100644 --- a/src/app/organization/offices/common-resolvers/office-datatables.resolver.ts +++ b/src/app/organization/offices/common-resolvers/office-datatables.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; import { SystemService } from 'app/system/system.service'; @@ -11,10 +11,15 @@ import { Observable } from 'rxjs'; */ @Injectable() export class OfficeDatatablesResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService Products service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the loan product data. diff --git a/src/app/organization/offices/common-resolvers/office.resolver.ts b/src/app/organization/offices/common-resolvers/office.resolver.ts index 4d470f9ff7..fbd3d9779e 100644 --- a/src/app/organization/offices/common-resolvers/office.resolver.ts +++ b/src/app/organization/offices/common-resolvers/office.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from '../../organization.service'; */ @Injectable() export class OfficeResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the office data. diff --git a/src/app/organization/offices/common-resolvers/offices.resolver.ts b/src/app/organization/offices/common-resolvers/offices.resolver.ts index a8323a2eef..489b59cffd 100644 --- a/src/app/organization/offices/common-resolvers/offices.resolver.ts +++ b/src/app/organization/offices/common-resolvers/offices.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from '../../organization.service'; */ @Injectable() export class OfficesResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the offices data. diff --git a/src/app/organization/offices/create-office/create-office.component.html b/src/app/organization/offices/create-office/create-office.component.html index 3a35107857..8e6d915633 100644 --- a/src/app/organization/offices/create-office/create-office.component.html +++ b/src/app/organization/offices/create-office/create-office.component.html @@ -6,23 +6,29 @@ {{ 'labels.inputs.Office' | translate }} - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (officeForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Parent Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Parent Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (officeForm.controls.parentId.hasError('required')) { + + {{ 'labels.inputs.Parent Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -37,10 +43,12 @@ /> - - {{ 'labels.inputs.Opening Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (officeForm.controls.openingDate.hasError('required')) { + + {{ 'labels.inputs.Opening Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/organization/offices/create-office/create-office.component.ts b/src/app/organization/offices/create-office/create-office.component.ts index c30ab04fe6..a4f44bdfe6 100644 --- a/src/app/organization/offices/create-office/create-office.component.ts +++ b/src/app/organization/offices/create-office/create-office.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -27,6 +27,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateOfficeComponent implements OnInit, AfterViewInit { + private formBuilder = inject(UntypedFormBuilder); + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + private router = inject(Router); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private popoverService = inject(PopoverService); + private configurationWizardService = inject(ConfigurationWizardService); + dialog = inject(MatDialog); + /** Office form. */ officeForm: UntypedFormGroup; /** Office Data */ @@ -41,6 +51,9 @@ export class CreateOfficeComponent implements OnInit, AfterViewInit { /* template for popover on create office form */ @ViewChild('templateCreateOfficeForm') templateCreateOfficeForm: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -53,17 +66,7 @@ export class CreateOfficeComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private formBuilder: UntypedFormBuilder, - private organizationService: OrganizationService, - private settingsService: SettingsService, - private router: Router, - private route: ActivatedRoute, - private dateUtils: Dates, - private popoverService: PopoverService, - private configurationWizardService: ConfigurationWizardService, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { offices: any }) => { this.officeData = data.offices; }); diff --git a/src/app/organization/offices/edit-office/edit-office.component.html b/src/app/organization/offices/edit-office/edit-office.component.html index c110d1874a..152f099dfd 100644 --- a/src/app/organization/offices/edit-office/edit-office.component.html +++ b/src/app/organization/offices/edit-office/edit-office.component.html @@ -6,24 +6,32 @@ {{ 'labels.inputs.Office' | translate }} - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (officeForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Parent Office' | translate }} - - - {{ office.name }} - - - - {{ 'labels.inputs.Parent Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (officeForm.contains('parentId')) { + + {{ 'labels.inputs.Parent Office' | translate }} + + @for (office of officeData.allowedParents; track office) { + + {{ office.name }} + + } + + @if (officeForm.controls.parentId.hasError('required')) { + + {{ 'labels.inputs.Parent Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } {{ 'labels.inputs.Opened On' | translate }} @@ -37,10 +45,12 @@ /> - - {{ 'labels.inputs.Opening Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (officeForm.controls.openingDate.hasError('required')) { + + {{ 'labels.inputs.Opening Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/organization/offices/edit-office/edit-office.component.ts b/src/app/organization/offices/edit-office/edit-office.component.ts index b2d8a30d30..f2e3ade7e6 100644 --- a/src/app/organization/offices/edit-office/edit-office.component.ts +++ b/src/app/organization/offices/edit-office/edit-office.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditOfficeComponent implements OnInit { + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + /** Selected Data. */ officeData: any; /** Office form. */ @@ -30,6 +37,9 @@ export class EditOfficeComponent implements OnInit { /** Maximum Date allowed. */ maxDate = new Date(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the charge data from `resolve`. * @param {ProductsService} organizationService Organization Service. @@ -40,14 +50,7 @@ export class EditOfficeComponent implements OnInit { * @param {MatDialog} dialog Dialog reference. * @param {Dates} dateUtils Date Utils */ - constructor( - private organizationService: OrganizationService, - private settingsService: SettingsService, - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates - ) { + constructor() { this.route.data.subscribe((data: { officeTemplate: any }) => { this.officeData = data.officeTemplate; }); diff --git a/src/app/organization/offices/offices.component.html b/src/app/organization/offices/offices.component.html index 2c162288d4..4173c43919 100644 --- a/src/app/organization/offices/offices.component.html +++ b/src/app/organization/offices/offices.component.html @@ -117,55 +117,59 @@ - - - - - - {{ office.name }} - - - - - - + @if (office) { + + + + + + {{ office.name }} + + + + + + - - - - - - - {{ 'Parent Office' | translate }} - - - - {{ office.parentName }} - - - - {{ ' Opened On' | translate }} - - - - {{ office.openingDate | date }} - - - - {{ 'External Id' | translate }} - - - - + + + + @if (office.parentId) { + + {{ 'Parent Office' | translate }} + + } + @if (office.parentId) { + + {{ office.parentName }} + + } + + {{ ' Opened On' | translate }} + + + {{ office.openingDate | date }} + + @if (office.externalId) { + + {{ 'External Id' | translate }} + + } + @if (office.externalId) { + + + + } - - - - - - - - + + @for (dataTable of dataTablesData; track dataTable) { + + } + + + + + } diff --git a/src/app/organization/offices/offices.component.ts b/src/app/organization/offices/offices.component.ts index d41a2e1d3c..ebbad0a988 100644 --- a/src/app/organization/offices/offices.component.ts +++ b/src/app/organization/offices/offices.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -41,7 +41,7 @@ import { MatButtonToggleGroup, MatButtonToggle } from '@angular/material/button- import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatButton, MatIconButton } from '@angular/material/button'; import { MatCard, MatCardContent, MatCardTitle } from '@angular/material/card'; -import { NgIf, NgFor, DatePipe } from '@angular/common'; +import { DatePipe } from '@angular/common'; import { MatTabGroup, MatTab } from '@angular/material/tabs'; import { ExternalIdentifierComponent } from '../../shared/external-identifier/external-identifier.component'; import { DateFormatPipe } from '../../pipes/date-format.pipe'; @@ -88,6 +88,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class OfficesComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private officeTreeService = inject(OfficeTreeService); + private treeControlService = inject(TreeControlService); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Button toggle group form control for type of view. (list/tree) */ viewGroup = new UntypedFormControl('listView'); @@ -127,6 +134,9 @@ export class OfficesComponent implements OnInit, AfterViewInit { /* Template for popover on offices table */ @ViewChild('templateTableOffices') templateTableOffices: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -135,14 +145,9 @@ export class OfficesComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private officeTreeService: OfficeTreeService, - private treeControlService: TreeControlService, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { + const officeTreeService = this.officeTreeService; + this.route.data.subscribe((data: { offices: any; officeDataTables: any }) => { this.officesData = data.offices; officeTreeService.initialize(this.officesData); diff --git a/src/app/organization/offices/view-office/datatable-tabs/datatable-tabs.component.ts b/src/app/organization/offices/view-office/datatable-tabs/datatable-tabs.component.ts index e3ea0df494..517a406095 100644 --- a/src/app/organization/offices/view-office/datatable-tabs/datatable-tabs.component.ts +++ b/src/app/organization/offices/view-office/datatable-tabs/datatable-tabs.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { EntityDatatableTabComponent } from '../../../../shared/tabs/entity-datatable-tab/entity-datatable-tab.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -17,17 +17,22 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DatatableTabsComponent { + private route = inject(ActivatedRoute); + entityId: string; /** Office Datatable */ entityDatatable: any; /** Multi Row Datatable Flag */ multiRowDatatableFlag: boolean; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches data table data from `resolve` * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.entityId = this.route.parent.parent.snapshot.paramMap.get('officeId'); this.route.data.subscribe((data: { officeDatatable: any }) => { diff --git a/src/app/organization/offices/view-office/general-tab/general-tab.component.html b/src/app/organization/offices/view-office/general-tab/general-tab.component.html index 2dec268cee..abda67080c 100644 --- a/src/app/organization/offices/view-office/general-tab/general-tab.component.html +++ b/src/app/organization/offices/view-office/general-tab/general-tab.component.html @@ -19,12 +19,16 @@ {{ 'labels.inputs.External Id' | translate }} - - - - - {{ 'labels.inputs.Unassigned' | translate }} - + @if (officeData.externalId) { + + + + } + @if (!officeData.externalId) { + + {{ 'labels.inputs.Unassigned' | translate }} + + } diff --git a/src/app/organization/offices/view-office/general-tab/general-tab.component.ts b/src/app/organization/offices/view-office/general-tab/general-tab.component.ts index b3c0fe6123..23cdaa8d2c 100644 --- a/src/app/organization/offices/view-office/general-tab/general-tab.component.ts +++ b/src/app/organization/offices/view-office/general-tab/general-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { ExternalIdentifierComponent } from '../../../../shared/external-identifier/external-identifier.component'; @@ -21,14 +21,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GeneralTabComponent { + private route = inject(ActivatedRoute); + /** Office data */ officeData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches office data from `resolve` * @param {ActivatedRoute} route Activated Route */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { office: any }) => { this.officeData = data.office; }); diff --git a/src/app/organization/offices/view-office/view-office.component.html b/src/app/organization/offices/view-office/view-office.component.html index 45594bf8d8..f784452950 100644 --- a/src/app/organization/offices/view-office/view-office.component.html +++ b/src/app/organization/offices/view-office/view-office.component.html @@ -12,19 +12,21 @@ > {{ 'labels.inputs.General' | translate }} - - - {{ officeDatatable.registeredTableName }} - - + @for (officeDatatable of officeDatatables; track officeDatatable) { + + + {{ officeDatatable.registeredTableName }} + + + } diff --git a/src/app/organization/offices/view-office/view-office.component.ts b/src/app/organization/offices/view-office/view-office.component.ts index 126531b617..397ce30393 100644 --- a/src/app/organization/offices/view-office/view-office.component.ts +++ b/src/app/organization/offices/view-office/view-office.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router'; import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -21,14 +21,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewOfficeComponent { + private route = inject(ActivatedRoute); + /** Office datatables data */ officeDatatables: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches office datatables from `resolve` * @param {ActivatedRoute} route Activated Route */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { officeDatatables: any }) => { this.officeDatatables = data.officeDatatables; }); diff --git a/src/app/organization/organization.component.html b/src/app/organization/organization.component.html index cc3889f517..305d3f96ee 100644 --- a/src/app/organization/organization.component.html +++ b/src/app/organization/organization.component.html @@ -12,24 +12,20 @@ {{ 'labels.heading.Manage Offices' | translate }} - - {{ 'labels.text.Add new office or modify or deactivate office' | translate }} - + @if (arrowBooleans[0]) { + + {{ 'labels.text.Add new office or modify or deactivate office' | translate }} + + } - - + @if (!arrowBooleans[0]) { + + } + @if (arrowBooleans[0]) { + + } @@ -44,24 +40,20 @@ {{ 'labels.heading.Manage Holidays' | translate }} - - {{ 'labels.text.Define holidays for office' | translate }} - + @if (arrowBooleans[1]) { + + {{ 'labels.text.Define holidays for office' | translate }} + + } - - + @if (!arrowBooleans[1]) { + + } + @if (arrowBooleans[1]) { + + } @@ -76,24 +68,20 @@ {{ 'labels.heading.Manage Employees' | translate }} - - {{ 'labels.text.Employee represents loan officers' | translate }} - + @if (arrowBooleans[2]) { + + {{ 'labels.text.Employee represents loan officers' | translate }} + + } - - + @if (!arrowBooleans[2]) { + + } + @if (arrowBooleans[2]) { + + } @@ -108,29 +96,20 @@ {{ 'labels.heading.Standing Instructions History' | translate }} - - {{ 'labels.text.View logged history' | translate }} - + @if (arrowBooleans[3]) { + + {{ 'labels.text.View logged history' | translate }} + + } - - + @if (!arrowBooleans[3]) { + + } + @if (arrowBooleans[3]) { + + } @@ -145,24 +124,20 @@ {{ 'labels.text.Investors' | translate }} - - {{ 'labels.text.View the loan account details associated with the investors' | translate }} - + @if (arrowBooleans[4]) { + + {{ 'labels.text.View the loan account details associated with the investors' | translate }} + + } - - + @if (!arrowBooleans[4]) { + + } + @if (arrowBooleans[4]) { + + } @@ -177,24 +152,20 @@ {{ 'labels.heading.Fund Mapping' | translate }} - - {{ 'labels.text.Bulk entry screen for mapping' | translate }} - + @if (arrowBooleans[5]) { + + {{ 'labels.text.Bulk entry screen for mapping' | translate }} + + } - - + @if (!arrowBooleans[5]) { + + } + @if (arrowBooleans[5]) { + + } @@ -209,29 +180,20 @@ {{ 'labels.heading.Password Preferences' | translate }} - - {{ 'labels.text.The usage of stronger passwords' | translate }} - + @if (arrowBooleans[6]) { + + {{ 'labels.text.The usage of stronger passwords' | translate }} + + } - - + @if (!arrowBooleans[6]) { + + } + @if (arrowBooleans[6]) { + + } @@ -246,29 +208,20 @@ {{ 'labels.heading.Loan Provisioning Criteria' | translate }} - - {{ 'labels.text.Loan Provisioning Criteria Organization' | translate }} - + @if (arrowBooleans[7]) { + + {{ 'labels.text.Loan Provisioning Criteria Organization' | translate }} + + } - - + @if (!arrowBooleans[7]) { + + } + @if (arrowBooleans[7]) { + + } @@ -283,29 +236,20 @@ {{ 'labels.heading.Entity Data Table Checks' | translate }} - - {{ 'labels.text.Entity Data Table Checks Organization' | translate }} - + @if (arrowBooleans[8]) { + + {{ 'labels.text.Entity Data Table Checks Organization' | translate }} + + } - - + @if (!arrowBooleans[8]) { + + } + @if (arrowBooleans[8]) { + + } @@ -324,24 +268,20 @@ {{ 'labels.heading.Currency Configuration' | translate }} - - {{ 'labels.text.Currencies available across organization' | translate }} - + @if (arrowBooleans[9]) { + + {{ 'labels.text.Currencies available across organization' | translate }} + + } - - + @if (!arrowBooleans[9]) { + + } + @if (arrowBooleans[9]) { + + } @@ -356,24 +296,20 @@ {{ 'labels.heading.Manage Funds' | translate }} - - {{ 'labels.text.Funds are associated with loans' | translate }} - + @if (arrowBooleans[10]) { + + {{ 'labels.text.Funds are associated with loans' | translate }} + + } - - + @if (!arrowBooleans[10]) { + + } + @if (arrowBooleans[10]) { + + } @@ -388,24 +324,20 @@ {{ 'labels.heading.Bulk Loan Reassignment' | translate }} - - {{ 'labels.text.Easy way to reassign all the loan' | translate }} - + @if (arrowBooleans[11]) { + + {{ 'labels.text.Easy way to reassign all the loan' | translate }} + + } - - + @if (!arrowBooleans[11]) { + + } + @if (arrowBooleans[11]) { + + } @@ -420,24 +352,20 @@ {{ 'labels.heading.Teller / Cashier Management' | translate }} - - {{ 'labels.text.Manage Tellers / Cashiers' | translate }} - + @if (arrowBooleans[12]) { + + {{ 'labels.text.Manage Tellers / Cashiers' | translate }} + + } - - + @if (!arrowBooleans[12]) { + + } + @if (arrowBooleans[12]) { + + } @@ -452,24 +380,20 @@ {{ 'labels.heading.Working Days' | translate }} - - {{ 'labels.text.Working days and configure behaviour of payments' | translate }} - + @if (arrowBooleans[13]) { + + {{ 'labels.text.Working days and configure behaviour of payments' | translate }} + + } - - + @if (!arrowBooleans[13]) { + + } + @if (arrowBooleans[13]) { + + } @@ -484,24 +408,20 @@ {{ 'labels.heading.Payment Type' | translate }} - - {{ 'labels.text.Manage payment types' | translate }} - + @if (arrowBooleans[14]) { + + {{ 'labels.text.Manage payment types' | translate }} + + } - - + @if (!arrowBooleans[14]) { + + } + @if (arrowBooleans[14]) { + + } @@ -516,24 +436,20 @@ {{ 'labels.heading.SMS Campaigns' | translate }} - - {{ 'labels.text.Define SMS Campaigns for Organization' | translate }} - + @if (arrowBooleans[15]) { + + {{ 'labels.text.Define SMS Campaigns for Organization' | translate }} + + } - - + @if (!arrowBooleans[15]) { + + } + @if (arrowBooleans[15]) { + + } @@ -548,24 +464,20 @@ {{ 'labels.heading.AdHocQuery' | translate }} - - {{ 'labels.text.Define AdHocQuery for Organization' | translate }} - + @if (arrowBooleans[16]) { + + {{ 'labels.text.Define AdHocQuery for Organization' | translate }} + + } - - + @if (!arrowBooleans[16]) { + + } + @if (arrowBooleans[16]) { + + } @@ -580,24 +492,20 @@ {{ 'labels.heading.Bulk Import' | translate }} - - {{ 'labels.text.Bulk data import using excel spreadsheet templates' | translate }} - + @if (arrowBooleans[17]) { + + {{ 'labels.text.Bulk data import using excel spreadsheet templates' | translate }} + + } - - + @if (!arrowBooleans[17]) { + + } + @if (arrowBooleans[17]) { + + } diff --git a/src/app/organization/organization.component.ts b/src/app/organization/organization.component.ts index 25b0fe3a83..0177771c4d 100644 --- a/src/app/organization/organization.component.ts +++ b/src/app/organization/organization.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { AfterViewInit, Component, ElementRef, TemplateRef, ViewChild } from '@angular/core'; +import { AfterViewInit, Component, ElementRef, TemplateRef, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; /** Custom Services */ @@ -28,6 +28,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class OrganizationComponent implements AfterViewInit { + private activatedRoute = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + shouldShowFundMapping = false; /* Reference of manage offices */ @ViewChild('office') office: ElementRef; @@ -56,18 +61,16 @@ export class OrganizationComponent implements AfterViewInit { // Initialize an array of 18 boolean values, all set to false arrowBooleans: boolean[] = new Array(18).fill(false); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} activatedRoute ActivatedRoute. * @param {Router} router Router. * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private activatedRoute: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) {} + constructor() {} /** * Popover function diff --git a/src/app/organization/organization.service.ts b/src/app/organization/organization.service.ts index fb43dfe1d2..39264fd6c6 100644 --- a/src/app/organization/organization.service.ts +++ b/src/app/organization/organization.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -15,13 +15,16 @@ import { SettingsService } from 'app/settings/settings.service'; providedIn: 'root' }) export class OrganizationService { + private http = inject(HttpClient); + private settingsService = inject(SettingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. */ - constructor( - private http: HttpClient, - private settingsService: SettingsService - ) {} + constructor() {} /** * @returns {Observable} Loan Provisioning Criteria data diff --git a/src/app/organization/password-preferences/password-preferences-template.resolver.ts b/src/app/organization/password-preferences/password-preferences-template.resolver.ts index 855c62a846..a24ad71e1a 100644 --- a/src/app/organization/password-preferences/password-preferences-template.resolver.ts +++ b/src/app/organization/password-preferences/password-preferences-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from '../organization.service'; */ @Injectable() export class PasswordPreferencesTemplateResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the password preferences template data. diff --git a/src/app/organization/password-preferences/password-preferences.component.html b/src/app/organization/password-preferences/password-preferences.component.html index 642d3c0f0e..2b7986f1eb 100644 --- a/src/app/organization/password-preferences/password-preferences.component.html +++ b/src/app/organization/password-preferences/password-preferences.component.html @@ -3,9 +3,11 @@ - - {{ passwordPreference.description }} - + @for (passwordPreference of passwordPreferencesData; track passwordPreference) { + + {{ passwordPreference.description }} + + } diff --git a/src/app/organization/password-preferences/password-preferences.component.ts b/src/app/organization/password-preferences/password-preferences.component.ts index cae38e7b40..3ab044dea4 100644 --- a/src/app/organization/password-preferences/password-preferences.component.ts +++ b/src/app/organization/password-preferences/password-preferences.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -22,11 +22,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class PasswordPreferencesComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private organizationService = inject(OrganizationService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Password preferences form. */ passwordPreferencesForm: UntypedFormGroup; /** Password preferences data. */ passwordPreferencesData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the password preferences data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -34,12 +42,7 @@ export class PasswordPreferencesComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private organizationService: OrganizationService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { passwordPreferencesTemplate: any }) => { this.passwordPreferencesData = data.passwordPreferencesTemplate; }); diff --git a/src/app/organization/payment-types/create-payment-type/create-payment-type.component.html b/src/app/organization/payment-types/create-payment-type/create-payment-type.component.html index c1049ef832..a144cd8a2c 100644 --- a/src/app/organization/payment-types/create-payment-type/create-payment-type.component.html +++ b/src/app/organization/payment-types/create-payment-type/create-payment-type.component.html @@ -6,10 +6,12 @@ {{ 'labels.inputs.Payment Type' | translate }} - - {{ 'labels.inputs.Payment Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (paymentTypeForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Payment Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -24,10 +26,12 @@ {{ 'labels.inputs.Position' | translate }} - - {{ 'labels.inputs.Position' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (paymentTypeForm.controls.position.hasError('required')) { + + {{ 'labels.inputs.Position' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/organization/payment-types/create-payment-type/create-payment-type.component.ts b/src/app/organization/payment-types/create-payment-type/create-payment-type.component.ts index 142490e74c..58f26f4c1d 100644 --- a/src/app/organization/payment-types/create-payment-type/create-payment-type.component.ts +++ b/src/app/organization/payment-types/create-payment-type/create-payment-type.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -23,21 +23,24 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreatePaymentTypeComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private organizationService = inject(OrganizationService); + private router = inject(Router); + private route = inject(ActivatedRoute); + /** Payment Type form. */ paymentTypeForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {OrganizationService} organizationService Organization Service. * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private organizationService: OrganizationService, - private router: Router, - private route: ActivatedRoute - ) {} + constructor() {} /** * Creates and sets the payment type form. diff --git a/src/app/organization/payment-types/edit-payment-type/edit-payment-type.component.html b/src/app/organization/payment-types/edit-payment-type/edit-payment-type.component.html index 9825db70e3..e9c1a66200 100644 --- a/src/app/organization/payment-types/edit-payment-type/edit-payment-type.component.html +++ b/src/app/organization/payment-types/edit-payment-type/edit-payment-type.component.html @@ -6,10 +6,12 @@ {{ 'labels.inputs.Payment Type' | translate }} - - {{ 'labels.inputs.Payment Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (paymentTypeForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Payment Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -24,10 +26,12 @@ {{ 'labels.inputs.Position' | translate }} - - {{ 'labels.inputs.Position' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (paymentTypeForm.controls.position.hasError('required')) { + + {{ 'labels.inputs.Position' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/organization/payment-types/edit-payment-type/edit-payment-type.component.ts b/src/app/organization/payment-types/edit-payment-type/edit-payment-type.component.ts index 893b23b6c3..d590b10b37 100644 --- a/src/app/organization/payment-types/edit-payment-type/edit-payment-type.component.ts +++ b/src/app/organization/payment-types/edit-payment-type/edit-payment-type.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -23,11 +23,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditPaymentTypeComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private organizationService = inject(OrganizationService); + private router = inject(Router); + private route = inject(ActivatedRoute); + /** Payment Type form. */ paymentTypeForm: UntypedFormGroup; /** Payment Type Data. */ paymentTypeData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the payment type data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -35,12 +43,7 @@ export class EditPaymentTypeComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private organizationService: OrganizationService, - private router: Router, - private route: ActivatedRoute - ) { + constructor() { this.route.data.subscribe((data: { paymentType: any }) => { this.paymentTypeData = data.paymentType; }); diff --git a/src/app/organization/payment-types/payment-types.component.html b/src/app/organization/payment-types/payment-types.component.html index eb52045449..c374f780e5 100644 --- a/src/app/organization/payment-types/payment-types.component.html +++ b/src/app/organization/payment-types/payment-types.component.html @@ -34,20 +34,22 @@ {{ 'labels.inputs.System Defined' | translate }} - - + @if (paymentType.isSystemDefined) { + + } + @if (!paymentType.isSystemDefined) { + + } @@ -56,20 +58,22 @@ {{ 'labels.inputs.Cash Payment' | translate }} - - + @if (paymentType.isCashPayment) { + + } + @if (!paymentType.isCashPayment) { + + } @@ -82,24 +86,16 @@ {{ 'labels.inputs.Actions' | translate }} - - {{ 'labels.buttons.Edit' | translate }} - - - {{ 'labels.buttons.Delete' | translate }} - + @if (!paymentType.isSystemDefined) { + + {{ 'labels.buttons.Edit' | translate }} + + } + @if (!paymentType.isSystemDefined) { + + {{ 'labels.buttons.Delete' | translate }} + + } diff --git a/src/app/organization/payment-types/payment-types.component.ts b/src/app/organization/payment-types/payment-types.component.ts index e95a5502c9..2570c92a08 100644 --- a/src/app/organization/payment-types/payment-types.component.ts +++ b/src/app/organization/payment-types/payment-types.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -54,6 +54,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class PaymentTypesComponent implements OnInit { + private organizationService = inject(OrganizationService); + private route = inject(ActivatedRoute); + private dialog = inject(MatDialog); + /** Payment Types data. */ paymentTypesData: any; /** Columns to be displayed in payment types table. */ @@ -74,17 +78,16 @@ export class PaymentTypesComponent implements OnInit { /** Sorter for payment types table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the payment types data from `resolve`. * @param {OrganizationService} organizationService Organization Service. * @param {ActivatedRoute} route Activated Route. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private organizationService: OrganizationService, - private route: ActivatedRoute, - private dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { paymentTypes: any }) => { this.paymentTypesData = data.paymentTypes; }); diff --git a/src/app/organization/payment-types/payment-types.resolver.ts b/src/app/organization/payment-types/payment-types.resolver.ts index 69cbe9467b..bf121b350b 100644 --- a/src/app/organization/payment-types/payment-types.resolver.ts +++ b/src/app/organization/payment-types/payment-types.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from '../organization.service'; */ @Injectable() export class PaymentTypesResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the payment types data. diff --git a/src/app/organization/sms-campaigns/common-resolvers/sms-campaign-template.resolver.ts b/src/app/organization/sms-campaigns/common-resolvers/sms-campaign-template.resolver.ts index d7c0bbb14a..8ff6f125c6 100644 --- a/src/app/organization/sms-campaigns/common-resolvers/sms-campaign-template.resolver.ts +++ b/src/app/organization/sms-campaigns/common-resolvers/sms-campaign-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from '../../organization.service'; */ @Injectable() export class SmsCampaignTemplateResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the SMS Campaign Template. diff --git a/src/app/organization/sms-campaigns/common-resolvers/sms-campaign.resolver.ts b/src/app/organization/sms-campaigns/common-resolvers/sms-campaign.resolver.ts index 7682ff4a68..c8408ae287 100644 --- a/src/app/organization/sms-campaigns/common-resolvers/sms-campaign.resolver.ts +++ b/src/app/organization/sms-campaigns/common-resolvers/sms-campaign.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from 'app/organization/organization.service'; */ @Injectable() export class SmsCampaignResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the SMS Campaign data. diff --git a/src/app/organization/sms-campaigns/common-resolvers/sms-campaigns.resolver.ts b/src/app/organization/sms-campaigns/common-resolvers/sms-campaigns.resolver.ts index 7ac25e0c4f..4073738d21 100644 --- a/src/app/organization/sms-campaigns/common-resolvers/sms-campaigns.resolver.ts +++ b/src/app/organization/sms-campaigns/common-resolvers/sms-campaigns.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from '../../organization.service'; */ @Injectable() export class SmsCampaignsResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the SMS Campaigns data. diff --git a/src/app/organization/sms-campaigns/create-campaign/create-campaign.component.html b/src/app/organization/sms-campaigns/create-campaign/create-campaign.component.html index d04abeef61..19fb760f51 100644 --- a/src/app/organization/sms-campaigns/create-campaign/create-campaign.component.html +++ b/src/app/organization/sms-campaigns/create-campaign/create-campaign.component.html @@ -46,15 +46,16 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (smsCampaignForm.valid) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/organization/sms-campaigns/create-campaign/create-campaign.component.ts b/src/app/organization/sms-campaigns/create-campaign/create-campaign.component.ts index 71421e4a0b..553f38da42 100644 --- a/src/app/organization/sms-campaigns/create-campaign/create-campaign.component.ts +++ b/src/app/organization/sms-campaigns/create-campaign/create-campaign.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Components */ @@ -35,6 +35,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateCampaignComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + /** SMS Campaign Template */ smsCampaignTemplate: any; /** Run report headers */ @@ -45,6 +51,9 @@ export class CreateCampaignComponent { /** Campaign Message Step */ @ViewChild(CampaignMessageStepComponent, { static: true }) campaignMessageStep: CampaignMessageStepComponent; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches campaign template from `resolve` * @param {ActivatedRoute} route Activated Route @@ -53,13 +62,7 @@ export class CreateCampaignComponent { * @param {SettingsService} settingsService Settings Service * @param {Dates} dateUtils Date Utils */ - constructor( - private route: ActivatedRoute, - private router: Router, - private organizationService: OrganizationService, - private settingsService: SettingsService, - private dateUtils: Dates - ) { + constructor() { this.route.data.subscribe((data: { smsCampaignTemplate: any }) => { this.smsCampaignTemplate = data.smsCampaignTemplate; }); diff --git a/src/app/organization/sms-campaigns/edit-campaign/edit-campaign.component.ts b/src/app/organization/sms-campaigns/edit-campaign/edit-campaign.component.ts index 9b5495c661..5874149a81 100644 --- a/src/app/organization/sms-campaigns/edit-campaign/edit-campaign.component.ts +++ b/src/app/organization/sms-campaigns/edit-campaign/edit-campaign.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -35,6 +35,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditCampaignComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + /** smsCampaign */ smsCampaign: any; /** SMS Campaign Template */ @@ -45,6 +51,9 @@ export class EditCampaignComponent { /** Campaign Message Step */ @ViewChild(CampaignMessageStepComponent, { static: true }) campaignMessageStep: CampaignMessageStepComponent; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches campaign template from `resolve` * @param {ActivatedRoute} route Activated Route @@ -53,13 +62,7 @@ export class EditCampaignComponent { * @param {OrganizationService} organizationService Organiztion Service * @param {SettingsService} settingsService Settings Service */ - constructor( - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private organizationService: OrganizationService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { smsCampaign: any; smsCampaignTemplate: any }) => { this.smsCampaignTemplate = data.smsCampaignTemplate; this.smsCampaign = data.smsCampaign; diff --git a/src/app/organization/sms-campaigns/sms-campaign-stepper/campaign-message-step/campaign-message-step.component.html b/src/app/organization/sms-campaigns/sms-campaign-stepper/campaign-message-step/campaign-message-step.component.html index 0804e7c30d..1ad8ad4a2e 100644 --- a/src/app/organization/sms-campaigns/sms-campaign-stepper/campaign-message-step/campaign-message-step.component.html +++ b/src/app/organization/sms-campaigns/sms-campaign-stepper/campaign-message-step/campaign-message-step.component.html @@ -7,15 +7,11 @@ {{ 'labels.heading.Template Parameters' | translate }} - - {{ label }} - + @for (label of parameterLabels; track label) { + + {{ label }} + + } diff --git a/src/app/organization/sms-campaigns/sms-campaign-stepper/edit-sms-campaign-step/edit-business-rule-parameters/edit-business-rule-parameters.component.ts b/src/app/organization/sms-campaigns/sms-campaign-stepper/edit-sms-campaign-step/edit-business-rule-parameters/edit-business-rule-parameters.component.ts index 3f4c956898..95971d88ed 100644 --- a/src/app/organization/sms-campaigns/sms-campaign-stepper/edit-sms-campaign-step/edit-business-rule-parameters/edit-business-rule-parameters.component.ts +++ b/src/app/organization/sms-campaigns/sms-campaign-stepper/edit-sms-campaign-step/edit-business-rule-parameters/edit-business-rule-parameters.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnChanges, Input, Output, EventEmitter, OnInit } from '@angular/core'; +import { Component, OnChanges, Input, Output, EventEmitter, OnInit, inject } from '@angular/core'; import { Validators, UntypedFormGroup, UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; /** Rxjs Imports */ @@ -37,6 +37,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditBusinessRuleParametersComponent implements OnInit, OnChanges { + private reportsService = inject(ReportsService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + /** Run Report Parameters Data */ @Input() paramData: any; /** SMS Campaign */ @@ -55,15 +59,14 @@ export class EditBusinessRuleParametersComponent implements OnInit, OnChanges { /** Maximum Date allowed. */ maxDate = new Date(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ReportsService} reportsService Reports Service * @param {SettingsService} settingsService Settings Service. */ - constructor( - private reportsService: ReportsService, - private settingsService: SettingsService, - private dateUtils: Dates - ) {} + constructor() {} ngOnInit(): void { this.maxDate = this.settingsService.businessDate; diff --git a/src/app/organization/sms-campaigns/sms-campaign-stepper/edit-sms-campaign-step/edit-sms-campaign-step.component.html b/src/app/organization/sms-campaigns/sms-campaign-stepper/edit-sms-campaign-step/edit-sms-campaign-step.component.html index 8da355667e..7cb3bfdec5 100644 --- a/src/app/organization/sms-campaigns/sms-campaign-stepper/edit-sms-campaign-step/edit-sms-campaign-step.component.html +++ b/src/app/organization/sms-campaigns/sms-campaign-stepper/edit-sms-campaign-step/edit-sms-campaign-step.component.html @@ -9,21 +9,27 @@ - - {{ 'labels.inputs.SMS Provider' | translate }} - - - {{ provider.value }} - - - + @if (!smsCampaignDetailsForm.controls.isNotification.value) { + + {{ 'labels.inputs.SMS Provider' | translate }} + + @for (provider of smsProviders; track provider) { + + {{ provider.value }} + + } + + + } {{ 'labels.inputs.Trigger Type' | translate }} - - {{ triggerType.value }} - + @for (triggerType of triggerTypes; track triggerType) { + + {{ triggerType.value }} + + } {{ 'labels.inputs.Trigger Type' | translate }} {{ 'labels.commons.is' | translate }} @@ -35,34 +41,34 @@ {{ 'labels.inputs.Is Notification' | translate }}? - - {{ 'labels.inputs.Schedule Date' | translate }} - - - - - {{ 'labels.inputs.Schedule Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (smsCampaignDetailsForm.controls.recurrenceStartDate) { + + {{ 'labels.inputs.Schedule Date' | translate }} + + + + + {{ 'labels.inputs.Schedule Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + } {{ 'labels.inputs.Business Rule' | translate }} - - {{ rule.reportName }} - + @for (rule of businessRules; track rule) { + + {{ rule.reportName }} + + } {{ 'labels.inputs.Business Rule' | translate }} {{ 'labels.commons.is' | translate }} diff --git a/src/app/organization/sms-campaigns/sms-campaign-stepper/edit-sms-campaign-step/edit-sms-campaign-step.component.ts b/src/app/organization/sms-campaigns/sms-campaign-stepper/edit-sms-campaign-step/edit-sms-campaign-step.component.ts index 9409de4c66..06f446b278 100644 --- a/src/app/organization/sms-campaigns/sms-campaign-stepper/edit-sms-campaign-step/edit-sms-campaign-step.component.ts +++ b/src/app/organization/sms-campaigns/sms-campaign-stepper/edit-sms-campaign-step/edit-sms-campaign-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Output, Input, EventEmitter } from '@angular/core'; +import { Component, OnInit, Output, Input, EventEmitter, inject } from '@angular/core'; import { UntypedFormGroup, Validators, @@ -32,6 +32,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditSmsCampaignStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private reportService = inject(ReportsService); + private settingsService = inject(SettingsService); + /** SMS Campaign Template */ @Input() smsCampaignTemplate: any; /** SMS Campaign */ @@ -57,16 +61,15 @@ export class EditSmsCampaignStepComponent implements OnInit { /** Template Parameters Event Emitter */ @Output() templateParameters = new EventEmitter(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {ReportsService} reportService Reports Service * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private reportService: ReportsService, - private settingsService: SettingsService - ) { + constructor() { this.createSMSCampaignDetailsForm(); } diff --git a/src/app/organization/sms-campaigns/sms-campaign-stepper/sms-campaign-step/business-rule-parameters/business-rule-parameters.component.ts b/src/app/organization/sms-campaigns/sms-campaign-stepper/sms-campaign-step/business-rule-parameters/business-rule-parameters.component.ts index 3189e986dc..92084d3829 100644 --- a/src/app/organization/sms-campaigns/sms-campaign-stepper/sms-campaign-step/business-rule-parameters/business-rule-parameters.component.ts +++ b/src/app/organization/sms-campaigns/sms-campaign-stepper/sms-campaign-step/business-rule-parameters/business-rule-parameters.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnChanges, Input, Output, EventEmitter, OnInit } from '@angular/core'; +import { Component, OnChanges, Input, Output, EventEmitter, OnInit, inject } from '@angular/core'; import { Validators, UntypedFormGroup, UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; /** Custom Services */ @@ -31,6 +31,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class BusinessRuleParametersComponent implements OnInit, OnChanges { + private reportsService = inject(ReportsService); + private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + /** Run Report Parameters Data */ @Input() paramData: any; @@ -48,16 +52,15 @@ export class BusinessRuleParametersComponent implements OnInit, OnChanges { /** Template Parameters Event Emitter */ @Output() templateParameters = new EventEmitter(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ReportsService} reportsService Reports Service. * @param {SettingsService} settingsService Settings Service. * @param {Dates} dateUtils Date Utils. */ - constructor( - private reportsService: ReportsService, - private settingsService: SettingsService, - private dateUtils: Dates - ) {} + constructor() {} ngOnInit(): void { this.maxDate = this.settingsService.businessDate; diff --git a/src/app/organization/sms-campaigns/sms-campaign-stepper/sms-campaign-step/sms-campaign-step.component.html b/src/app/organization/sms-campaigns/sms-campaign-stepper/sms-campaign-step/sms-campaign-step.component.html index 12fc99a570..9d159482d4 100644 --- a/src/app/organization/sms-campaigns/sms-campaign-stepper/sms-campaign-step/sms-campaign-step.component.html +++ b/src/app/organization/sms-campaigns/sms-campaign-stepper/sms-campaign-step/sms-campaign-step.component.html @@ -9,21 +9,27 @@ - - {{ 'labels.inputs.SMS Provider' | translate }} - - - {{ provider.value }} - - - + @if (!smsCampaignDetailsForm.controls.isNotification.value) { + + {{ 'labels.inputs.SMS Provider' | translate }} + + @for (provider of smsProviders; track provider) { + + {{ provider.value }} + + } + + + } {{ 'labels.inputs.Trigger Type' | translate }} - - {{ triggerType.value }} - + @for (triggerType of triggerTypes; track triggerType) { + + {{ triggerType.value }} + + } {{ 'labels.inputs.Trigger Type' | translate }} {{ 'labels.commons.is' | translate }} @@ -35,78 +41,86 @@ {{ 'labels.inputs.Is Notification' | translate }}? - - {{ 'labels.inputs.Schedule Date' | translate }} - - - - - {{ 'labels.inputs.Schedule Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (smsCampaignDetailsForm.contains('recurrenceStartDate')) { + + {{ 'labels.inputs.Schedule Date' | translate }} + + + + + {{ 'labels.inputs.Schedule Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + } - - {{ 'labels.inputs.Repeats' | translate }} - - {{ 'labels.inputs.Daily' | translate }} - {{ 'labels.inputs.Weekly' | translate }} - {{ 'labels.inputs.Monthly' | translate }} - {{ 'labels.inputs.Yearly' | translate }} - - - {{ 'labels.inputs.Repetition Frequency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (smsCampaignDetailsForm.contains('frequency')) { + + {{ 'labels.inputs.Repeats' | translate }} + + {{ 'labels.inputs.Daily' | translate }} + {{ 'labels.inputs.Weekly' | translate }} + {{ 'labels.inputs.Monthly' | translate }} + {{ 'labels.inputs.Yearly' | translate }} + + + {{ 'labels.inputs.Repetition Frequency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + } - - {{ 'labels.inputs.Repetition Interval' | translate }} - - - {{ interval }} - - - - {{ 'labels.inputs.Repetition Interval' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (smsCampaignDetailsForm.contains('interval')) { + + {{ 'labels.inputs.Repetition Interval' | translate }} + + @for (interval of repetitionIntervals; track interval) { + + {{ interval }} + + } + + + {{ 'labels.inputs.Repetition Interval' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + } - - {{ 'labels.inputs.Repeats on Day' | translate }} - - {{ 'labels.inputs.Monday' | translate }} - {{ 'labels.inputs.Tuesday' | translate }} - {{ 'labels.inputs.Wednesday' | translate }} - {{ 'labels.inputs.Thursday' | translate }} - {{ 'labels.inputs.Friday' | translate }} - {{ 'labels.inputs.Saturday' | translate }} - {{ 'labels.inputs.Sunday' | translate }} - - - {{ 'labels.inputs.At least' | translate }} {{ 'labels.inputs.one' | translate }} - {{ 'labels.inputs.day must be selected' | translate }} - - + @if (smsCampaignDetailsForm.contains('repeatsOnDay')) { + + {{ 'labels.inputs.Repeats on Day' | translate }} + + {{ 'labels.inputs.Monday' | translate }} + {{ 'labels.inputs.Tuesday' | translate }} + {{ 'labels.inputs.Wednesday' | translate }} + {{ 'labels.inputs.Thursday' | translate }} + {{ 'labels.inputs.Friday' | translate }} + {{ 'labels.inputs.Saturday' | translate }} + {{ 'labels.inputs.Sunday' | translate }} + + + {{ 'labels.inputs.At least' | translate }} {{ 'labels.inputs.one' | translate }} + {{ 'labels.inputs.day must be selected' | translate }} + + + } {{ 'labels.inputs.Business Rule' | translate }} - - {{ rule.reportName }} - + @for (rule of businessRules; track rule) { + + {{ rule.reportName }} + + } {{ 'labels.inputs.Business Rule' | translate }} {{ 'labels.commons.is' | translate }} @@ -115,24 +129,21 @@ - - - - {{ 'labels.buttons.Previous' | translate }} - - - {{ 'labels.buttons.Next' | translate }} - - - + @if (!smsCampaignDetailsForm.controls.runReportId.value) { + + + + {{ 'labels.buttons.Previous' | translate }} + + + {{ 'labels.buttons.Next' | translate }} + + + + } - - + @if (smsCampaignDetailsForm.controls.runReportId.value) { + + + } diff --git a/src/app/organization/sms-campaigns/sms-campaign-stepper/sms-campaign-step/sms-campaign-step.component.ts b/src/app/organization/sms-campaigns/sms-campaign-stepper/sms-campaign-step/sms-campaign-step.component.ts index e3894108a2..c814149708 100644 --- a/src/app/organization/sms-campaigns/sms-campaign-stepper/sms-campaign-step/sms-campaign-step.component.ts +++ b/src/app/organization/sms-campaigns/sms-campaign-stepper/sms-campaign-step/sms-campaign-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, ViewChild, EventEmitter, Output } from '@angular/core'; +import { Component, OnInit, Input, ViewChild, EventEmitter, Output, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -38,6 +38,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SmsCampaignStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private reportService = inject(ReportsService); + /** SMS Campaign Template */ @Input() smsCampaignTemplate: any; /** Business Rule Parameters Component */ @@ -64,14 +67,14 @@ export class SmsCampaignStepComponent implements OnInit { /** Template Parameters Event Emitter */ @Output() templateParameters = new EventEmitter(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {ReportsService} reportService Reports Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private reportService: ReportsService - ) { + constructor() { this.createSMSCampaignDetailsForm(); this.buildDependencies(); } diff --git a/src/app/organization/sms-campaigns/sms-campaigns.component.ts b/src/app/organization/sms-campaigns/sms-campaigns.component.ts index 28eefc6205..406a06e395 100644 --- a/src/app/organization/sms-campaigns/sms-campaigns.component.ts +++ b/src/app/organization/sms-campaigns/sms-campaigns.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -54,6 +54,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SmsCampaignsComponent implements OnInit { + private route = inject(ActivatedRoute); + /** SMS Campaigns data. */ smsCampaignsData: any; /** Columns to be displayed in sms campaigns table. */ @@ -73,11 +75,14 @@ export class SmsCampaignsComponent implements OnInit { /** Sorter for SMS campaigns table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the SMS campaigns data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { smsCampaigns: any }) => { this.smsCampaignsData = data.smsCampaigns.pageItems; }); diff --git a/src/app/organization/sms-campaigns/view-campaign/view-campaign.component.html b/src/app/organization/sms-campaigns/view-campaign/view-campaign.component.html index 509bdab315..92400fbe7c 100644 --- a/src/app/organization/sms-campaigns/view-campaign/view-campaign.component.html +++ b/src/app/organization/sms-campaigns/view-campaign/view-campaign.component.html @@ -1,46 +1,54 @@ - - - {{ 'labels.buttons.Edit' | translate }} - - - - - - {{ 'labels.buttons.Activate' | translate }} - - - - - - {{ 'labels.buttons.Close' | translate }} - - - - - - {{ 'labels.buttons.Reactivate' | translate }} - - - - - - {{ 'labels.buttons.Delete' | translate }} - - + @if (smsCampaignData.campaignStatus.value !== 'active') { + + + {{ 'labels.buttons.Edit' | translate }} + + + } + + @if (smsCampaignData.campaignStatus.value === 'Pending') { + + + {{ 'labels.buttons.Activate' | translate }} + + + } + + @if (smsCampaignData.campaignStatus.value !== 'closed') { + + + {{ 'labels.buttons.Close' | translate }} + + + } + + @if (smsCampaignData.campaignStatus.value !== 'Pending' && smsCampaignData.campaignStatus.value !== 'active') { + + + {{ 'labels.buttons.Reactivate' | translate }} + + + } + + @if (smsCampaignData.campaignStatus.value === 'closed') { + + + {{ 'labels.buttons.Delete' | translate }} + + + } @@ -70,9 +78,11 @@ {{ smsCampaignData.smsCampaignTimeLine.submittedOnDate | dateFormat }} - - {{ 'labels.inputs.Recurrence' | translate }} : {{ smsCampaignData.recurrence }} - + @if (smsCampaignData.recurrence) { + + {{ 'labels.inputs.Recurrence' | translate }} : {{ smsCampaignData.recurrence }} + + } {{ 'labels.heading.Template Message' | translate }} : @@ -82,70 +92,65 @@ {{ 'labels.heading.Template Message' | translate }} : - - - - - - {{ 'labels.inputs.From Date' | translate }} - - - - - - - {{ 'labels.inputs.To Date' | translate }} - - - - - - - - {{ 'labels.buttons.Search' | translate }} - + @for (tab of smsTabs; track tab) { + + + + + + {{ 'labels.inputs.From Date' | translate }} + + + + + + {{ 'labels.inputs.To Date' | translate }} + + + + + + + {{ 'labels.buttons.Search' | translate }} + + - - - - - - {{ 'labels.inputs.Message' | translate }} - {{ sms.message }} - - - - {{ 'labels.inputs.Status' | translate }} - {{ sms.status.value }} - - - - {{ 'labels.inputs.Mobile No' | translate }}. - {{ sms.mobileNo }} - - - - {{ 'labels.inputs.Campaign Name' | translate }} - {{ sms.campaignName }} - - - - - - - + + + + {{ 'labels.inputs.Message' | translate }} + {{ sms.message }} + + + {{ 'labels.inputs.Status' | translate }} + {{ sms.status.value }} + + + {{ 'labels.inputs.Mobile No' | translate }}. + {{ sms.mobileNo }} + + + {{ 'labels.inputs.Campaign Name' | translate }} + {{ sms.campaignName }} + + + + + + + } diff --git a/src/app/organization/sms-campaigns/view-campaign/view-campaign.component.ts b/src/app/organization/sms-campaigns/view-campaign/view-campaign.component.ts index 3cdac76e42..20b7964b6c 100644 --- a/src/app/organization/sms-campaigns/view-campaign/view-campaign.component.ts +++ b/src/app/organization/sms-campaigns/view-campaign/view-campaign.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { @@ -63,6 +63,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewCampaignComponent implements OnInit { + private router = inject(Router); + private route = inject(ActivatedRoute); + dialog = inject(MatDialog); + private formBuilder = inject(UntypedFormBuilder); + private dateUtils = inject(Dates); + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -110,6 +118,9 @@ export class ViewCampaignComponent implements OnInit { } ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the SMS Campaign data from `resolve * @param {Router} router Router @@ -120,15 +131,7 @@ export class ViewCampaignComponent implements OnInit { * @param {OrganizationService} organizationService Organization Service * @param {SettingsService} settingsService Setting Service */ - constructor( - private router: Router, - private route: ActivatedRoute, - public dialog: MatDialog, - private formBuilder: UntypedFormBuilder, - private dateUtils: Dates, - private organizationService: OrganizationService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { smsCampaign: any }) => { this.smsCampaignData = data.smsCampaign; }); diff --git a/src/app/organization/standing-instructions-history/standing-instructions-history.component.html b/src/app/organization/standing-instructions-history/standing-instructions-history.component.html index 15ff00fa44..d09b3337fb 100644 --- a/src/app/organization/standing-instructions-history/standing-instructions-history.component.html +++ b/src/app/organization/standing-instructions-history/standing-instructions-history.component.html @@ -1,153 +1,136 @@ - - - - - - {{ 'labels.inputs.Client Name' | translate }} - - - - - {{ 'labels.inputs.Client Id' | translate }} - - - - - {{ 'labels.inputs.Transfer Type' | translate }} - - - {{ transferType.value }} - - - - - - {{ 'labels.inputs.Account Type' | translate }} - - - {{ accountType.value }} - - - - - - {{ 'labels.inputs.From Account ID' | translate }} - - - - - {{ 'labels.inputs.From Date' | translate }} - - - - - - - {{ 'labels.inputs.To Date' | translate }} - - - - - - - - - - {{ 'labels.buttons.Cancel' | translate }} - - - - {{ 'labels.buttons.Search Instructions' | translate }} - - - - - - - - - - - {{ 'labels.buttons.Parameters' | translate }} - - - - - - {{ 'labels.inputs.From Client' | translate }} - - {{ instruction.fromClient.displayName }}({{ instruction.fromClient.id }}) - - - - - {{ 'labels.inputs.From Account' | translate }} - - {{ instruction.fromAccount.productName }}({{ instruction.fromAccount.id }}) - - - - - {{ 'labels.inputs.To Client' | translate }} - - {{ instruction.toClient.displayName }}({{ instruction.toClient.id }}) - - - - - {{ 'labels.inputs.To Account' | translate }} - - {{ instruction.toAccount.productName }}({{ instruction.toAccount.id }}) - - - - - {{ 'labels.inputs.Execution Time' | translate }} - {{ instruction.executionTime }} - - - - {{ 'labels.inputs.Amount' | translate }} - {{ instruction.amount | formatNumber }} - - - - {{ 'labels.inputs.Status' | translate }} - {{ instruction.status }} - - - - {{ 'labels.inputs.Error Log' | translate }} - - - + @if (!isCollapsed) { + + + + + + {{ 'labels.inputs.Client Name' | translate }} + + + + {{ 'labels.inputs.Client Id' | translate }} + + + + {{ 'labels.inputs.Transfer Type' | translate }} + + @for (transferType of standingInstructionsTemplate.transferTypeOptions; track transferType) { + + {{ transferType.value }} + + } + + + + {{ 'labels.inputs.Account Type' | translate }} + + @for (accountType of standingInstructionsTemplate.fromAccountTypeOptions; track accountType) { + + {{ accountType.value }} + + } + + + @if (instructionForm.contains('fromAccountId')) { + + {{ 'labels.inputs.From Account ID' | translate }} + + + } + + {{ 'labels.inputs.From Date' | translate }} + + + + + + {{ 'labels.inputs.To Date' | translate }} + + + + + + + + + {{ 'labels.buttons.Cancel' | translate }} - - - - - - - - - + + + {{ 'labels.buttons.Search Instructions' | translate }} + + + + + } + +@if (isCollapsed) { + + + + + {{ 'labels.buttons.Parameters' | translate }} + + + + + {{ 'labels.inputs.From Client' | translate }} + + {{ instruction.fromClient.displayName }}({{ instruction.fromClient.id }}) + + + + {{ 'labels.inputs.From Account' | translate }} + + {{ instruction.fromAccount.productName }}({{ instruction.fromAccount.id }}) + + + + {{ 'labels.inputs.To Client' | translate }} + + {{ instruction.toClient.displayName }}({{ instruction.toClient.id }}) + + + + {{ 'labels.inputs.To Account' | translate }} + + {{ instruction.toAccount.productName }}({{ instruction.toAccount.id }}) + + + + {{ 'labels.inputs.Execution Time' | translate }} + {{ instruction.executionTime }} + + + {{ 'labels.inputs.Amount' | translate }} + {{ instruction.amount | formatNumber }} + + + {{ 'labels.inputs.Status' | translate }} + {{ instruction.status }} + + + {{ 'labels.inputs.Error Log' | translate }} + + @if (instruction.status === 'failed') { + + + + } + + + + + + + + +} diff --git a/src/app/organization/standing-instructions-history/standing-instructions-history.component.ts b/src/app/organization/standing-instructions-history/standing-instructions-history.component.ts index ede15cacca..11c1def756 100644 --- a/src/app/organization/standing-instructions-history/standing-instructions-history.component.ts +++ b/src/app/organization/standing-instructions-history/standing-instructions-history.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -55,6 +55,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class StandingInstructionsHistoryComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + private router = inject(Router); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + /** Minimum Date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum Date allowed. */ @@ -85,6 +92,9 @@ export class StandingInstructionsHistoryComponent implements OnInit { /** Sorter for instructions table. */ @ViewChild(MatSort) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the instructions template from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -94,14 +104,7 @@ export class StandingInstructionsHistoryComponent implements OnInit { * @param {Router} router Router for navigation. * @param {Dates} dateUtils Date Utils to format date. */ - constructor( - private formBuilder: UntypedFormBuilder, - private organizationService: OrganizationService, - private settingsService: SettingsService, - private router: Router, - private route: ActivatedRoute, - private dateUtils: Dates - ) { + constructor() { this.route.data.subscribe((data: { standingInstructionsTemplate: any }) => { this.standingInstructionsTemplate = data.standingInstructionsTemplate; }); diff --git a/src/app/organization/standing-instructions-history/standing-instructions-template.resolver.ts b/src/app/organization/standing-instructions-history/standing-instructions-template.resolver.ts index 3b68cf9382..6cd6311260 100644 --- a/src/app/organization/standing-instructions-history/standing-instructions-template.resolver.ts +++ b/src/app/organization/standing-instructions-history/standing-instructions-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from '../organization.service'; */ @Injectable() export class StandingInstructionsTemplateResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the Standing Instruction template. diff --git a/src/app/organization/tellers/cashiers/allocate-cash/allocate-cash.component.html b/src/app/organization/tellers/cashiers/allocate-cash/allocate-cash.component.html index 4116c7d749..d15eea40f8 100644 --- a/src/app/organization/tellers/cashiers/allocate-cash/allocate-cash.component.html +++ b/src/app/organization/tellers/cashiers/allocate-cash/allocate-cash.component.html @@ -35,41 +35,51 @@ /> - - {{ 'labels.inputs.Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (allocateCashForm.controls.txnDate.hasError('required')) { + + {{ 'labels.inputs.Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Currency' | translate }} - - {{ currency.name }} - + @for (currency of cashierData.currencyOptions; track currency) { + + {{ currency.name }} + + } - - {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (allocateCashForm.controls.currencyCode.hasError('required')) { + + {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Amount' | translate }} - - {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (allocateCashForm.controls.txnAmount.hasError('required')) { + + {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Notes/Comments' | translate }} - - {{ 'labels.inputs.Notes/Comments' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (allocateCashForm.controls.txnNote.hasError('required')) { + + {{ 'labels.inputs.Notes/Comments' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/organization/tellers/cashiers/allocate-cash/allocate-cash.component.ts b/src/app/organization/tellers/cashiers/allocate-cash/allocate-cash.component.ts index 772ccee1ec..3da2ff0ca7 100644 --- a/src/app/organization/tellers/cashiers/allocate-cash/allocate-cash.component.ts +++ b/src/app/organization/tellers/cashiers/allocate-cash/allocate-cash.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AllocateCashComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + private router = inject(Router); + /** Minimum Date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum Date allowed. */ @@ -30,6 +37,9 @@ export class AllocateCashComponent implements OnInit { /** Cashier Form. */ allocateCashForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Get cashier data from `Resolver`. * @param {FormBuilder} formBuilder Form Builder. @@ -39,14 +49,7 @@ export class AllocateCashComponent implements OnInit { * @param {SettingsService} settingsService Settings Service. * @param {Router} router Router. */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private dateUtils: Dates, - private organizationService: OrganizationService, - private settingsService: SettingsService, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { cashierTemplate: any }) => { this.cashierData = data.cashierTemplate; }); diff --git a/src/app/organization/tellers/cashiers/cashiers.component.ts b/src/app/organization/tellers/cashiers/cashiers.component.ts index de009cb010..d2a4d950db 100644 --- a/src/app/organization/tellers/cashiers/cashiers.component.ts +++ b/src/app/organization/tellers/cashiers/cashiers.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -51,6 +51,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CashiersComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Cashiers data. */ cashiersData: any; /** Columns to be displayed in cashiers table. */ @@ -68,11 +70,14 @@ export class CashiersComponent implements OnInit { /** Sorter for cashiers table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the cashiers data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { cashiersData: any }) => { this.cashiersData = data.cashiersData.cashiers; }); diff --git a/src/app/organization/tellers/cashiers/create-cashier/create-cashier.component.html b/src/app/organization/tellers/cashiers/create-cashier/create-cashier.component.html index ebc7af16ba..347b0e57ca 100644 --- a/src/app/organization/tellers/cashiers/create-cashier/create-cashier.component.html +++ b/src/app/organization/tellers/cashiers/create-cashier/create-cashier.component.html @@ -16,14 +16,18 @@ {{ 'labels.inputs.Cashier' | translate }} - - {{ staff.displayName }} - + @for (staff of cashierTemplate.staffOptions; track staff) { + + {{ staff.displayName }} + + } - - {{ 'labels.inputs.Cashier' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createCashierForm.controls.staffId.hasError('required')) { + + {{ 'labels.inputs.Cashier' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -43,10 +47,12 @@ /> - - {{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createCashierForm.controls.startDate.hasError('required')) { + + {{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -61,10 +67,12 @@ /> - - {{ 'labels.inputs.To Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createCashierForm.controls.endDate.hasError('required')) { + + {{ 'labels.inputs.To Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/organization/tellers/cashiers/create-cashier/create-cashier.component.ts b/src/app/organization/tellers/cashiers/create-cashier/create-cashier.component.ts index f2c54407d8..4bf0ef9d6b 100644 --- a/src/app/organization/tellers/cashiers/create-cashier/create-cashier.component.ts +++ b/src/app/organization/tellers/cashiers/create-cashier/create-cashier.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateCashierComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + /** Minimum Date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum Date allowed. */ @@ -32,6 +39,9 @@ export class CreateCashierComponent implements OnInit { /** Create cashier form. */ createCashierForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches cashier template from `resolve` * @param {FormBuilder} formBuilder Form Builder. @@ -41,14 +51,7 @@ export class CreateCashierComponent implements OnInit { * @param {OrganizationService} organizationService Organization Service. * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private organizationService: OrganizationService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { cashierTemplate: any }) => { this.cashierTemplate = data.cashierTemplate; }); diff --git a/src/app/organization/tellers/cashiers/edit-cashier/edit-cashier.component.html b/src/app/organization/tellers/cashiers/edit-cashier/edit-cashier.component.html index 1da783ac41..758f42ea9f 100644 --- a/src/app/organization/tellers/cashiers/edit-cashier/edit-cashier.component.html +++ b/src/app/organization/tellers/cashiers/edit-cashier/edit-cashier.component.html @@ -13,23 +13,31 @@ - - {{ 'labels.inputs.Cashier' | translate }} - - - {{ staff.displayName }} - - - + @if (isStaffId) { + + {{ 'labels.inputs.Cashier' | translate }} + + @for (staff of cashierData.template.staffOptions; track staff) { + + {{ staff.displayName }} + + } + + + } - - {{ 'labels.inputs.Cashier' | translate }} - - - {{ 'labels.inputs.Select Option' | translate }} - - - + @if (!isStaffId) { + + {{ 'labels.inputs.Cashier' | translate }} + @if (!isStaffId) { + + + {{ 'labels.inputs.Select Option' | translate }} + + + } + + } {{ 'labels.inputs.Description/Notes' | translate }} @@ -48,10 +56,12 @@ /> - - {{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editCashierForm.controls.startDate.hasError('required')) { + + {{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -66,10 +76,12 @@ /> - - {{ 'labels.inputs.To Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editCashierForm.controls.endDate.hasError('required')) { + + {{ 'labels.inputs.To Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/organization/tellers/cashiers/edit-cashier/edit-cashier.component.ts b/src/app/organization/tellers/cashiers/edit-cashier/edit-cashier.component.ts index 4abf0bab33..9b2d606441 100644 --- a/src/app/organization/tellers/cashiers/edit-cashier/edit-cashier.component.ts +++ b/src/app/organization/tellers/cashiers/edit-cashier/edit-cashier.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditCashierComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + /** Cashier Data. */ cashierData: any = new Object(); /** Edit cashier form. */ @@ -34,6 +41,9 @@ export class EditCashierComponent implements OnInit { /** Maximum Date allowed. */ maxDate = new Date(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * * @param {FormBuilder} formBuilder Form Builder. @@ -43,14 +53,7 @@ export class EditCashierComponent implements OnInit { * @param {OrganizationService} organizationService Organization Service. * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private organizationService: OrganizationService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { cashier: any; cashierTemplate: any }) => { this.cashierData.data = data.cashier; this.cashierData.template = data.cashierTemplate; diff --git a/src/app/organization/tellers/cashiers/settle-cash/settle-cash.component.html b/src/app/organization/tellers/cashiers/settle-cash/settle-cash.component.html index 68c41fd962..9c52e8693b 100644 --- a/src/app/organization/tellers/cashiers/settle-cash/settle-cash.component.html +++ b/src/app/organization/tellers/cashiers/settle-cash/settle-cash.component.html @@ -35,41 +35,51 @@ /> - - {{ 'labels.inputs.Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (settleCashForm.controls.txnDate.hasError('required')) { + + {{ 'labels.inputs.Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Currency' | translate }} - - {{ currency.name }} - + @for (currency of cashierData.currencyOptions; track currency) { + + {{ currency.name }} + + } - - {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (settleCashForm.controls.currencyCode.hasError('required')) { + + {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Amount' | translate }} - - {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (settleCashForm.controls.txnAmount.hasError('required')) { + + {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Notes/Comments' | translate }} - - {{ 'labels.inputs.Notes/Comments' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (settleCashForm.controls.txnNote.hasError('required')) { + + {{ 'labels.inputs.Notes/Comments' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/organization/tellers/cashiers/settle-cash/settle-cash.component.ts b/src/app/organization/tellers/cashiers/settle-cash/settle-cash.component.ts index 72012689b5..ded5c0314e 100644 --- a/src/app/organization/tellers/cashiers/settle-cash/settle-cash.component.ts +++ b/src/app/organization/tellers/cashiers/settle-cash/settle-cash.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -18,6 +18,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SettleCashComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + private router = inject(Router); + /** Minimum Date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum Date allowed. */ @@ -27,6 +34,9 @@ export class SettleCashComponent implements OnInit { /** Cashier Form. */ settleCashForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Get cashier data from `Resolver`. * @param {FormBuilder} formBuilder Form Builder. @@ -36,14 +46,7 @@ export class SettleCashComponent implements OnInit { * @param {SettingsService} settingsService Settings Service. * @param {Router} router Router. */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private dateUtils: Dates, - private organizationService: OrganizationService, - private settingsService: SettingsService, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { cashierTemplate: any }) => { this.cashierData = data.cashierTemplate; }); diff --git a/src/app/organization/tellers/cashiers/transactions/transactions.component.html b/src/app/organization/tellers/cashiers/transactions/transactions.component.html index 928de59ec8..01248b12d7 100644 --- a/src/app/organization/tellers/cashiers/transactions/transactions.component.html +++ b/src/app/organization/tellers/cashiers/transactions/transactions.component.html @@ -19,43 +19,38 @@ - - - - - - {{ 'labels.inputs.Branch' | translate }} +@if (cashierData) { + + + + + + {{ 'labels.inputs.Branch' | translate }} + + + {{ cashierData.officeName }} + + + {{ 'labels.inputs.Teller' | translate }} + + + {{ cashierData.tellerName }} + + + {{ 'labels.inputs.Cashier' | translate }} + + + {{ cashierData.cashierName }} + + + {{ 'labels.inputs.Net Cash' | translate }} + + {{ cashierData.netCash | formatNumber }} [{{ currencySelector.value }}] - - - {{ cashierData.officeName }} - - - - {{ 'labels.inputs.Teller' | translate }} - - - - {{ cashierData.tellerName }} - - - - {{ 'labels.inputs.Cashier' | translate }} - - - - {{ cashierData.cashierName }} - - - - {{ 'labels.inputs.Net Cash' | translate }} - - - {{ cashierData.netCash | formatNumber }} [{{ currencySelector.value }}] - - - - + + + +} @@ -68,66 +63,63 @@ {{ 'labels.inputs.Select Currency' | translate }} - - {{ currency.name }} - + @for (currency of currencyData; track currency) { + + {{ currency.name }} + + } - - - - {{ 'labels.inputs.Date' | translate }} - {{ transaction.txnDate | dateFormat }} - - - - {{ 'labels.inputs.Transactions' | translate }} - {{ transaction.txnType.value }} - - - - - {{ 'labels.inputs.Allocation' | translate }} ({{ cashierData.sumCashAllocation | formatNumber }}) - - - {{ transaction.txnType.value === 'Allocate Cash' ? (transaction.txnAmount | formatNumber) : '-' }} - - - - - - {{ 'labels.inputs.Cash In' | translate }} ({{ cashierData.sumInwardCash | formatNumber }}) - - - {{ transaction.txnType.value === 'Cash In' ? (transaction.txnAmount | formatNumber) : '-' }} - - - - - - {{ 'labels.inputs.Cash Out' | translate }} ({{ cashierData.sumOutwardCash | formatNumber }}) - - - {{ transaction.txnType.value === 'Cash Out' ? (transaction.txnAmount | formatNumber) : '-' }} - - - - - - {{ 'labels.inputs.Settlement' | translate }} ({{ cashierData.sumCashSettlement | formatNumber }}) - - - {{ transaction.txnType.value === 'Settle Cash' ? (transaction.txnAmount | formatNumber) : '-' }} - - - - - - - - - + @if (cashierData) { + + + + {{ 'labels.inputs.Date' | translate }} + {{ transaction.txnDate | dateFormat }} + + + {{ 'labels.inputs.Transactions' | translate }} + {{ transaction.txnType.value }} + + + + {{ 'labels.inputs.Allocation' | translate }} ({{ cashierData.sumCashAllocation | formatNumber }}) + + + {{ transaction.txnType.value === 'Allocate Cash' ? (transaction.txnAmount | formatNumber) : '-' }} + + + + + {{ 'labels.inputs.Cash In' | translate }} ({{ cashierData.sumInwardCash | formatNumber }}) + + + {{ transaction.txnType.value === 'Cash In' ? (transaction.txnAmount | formatNumber) : '-' }} + + + + + {{ 'labels.inputs.Cash Out' | translate }} ({{ cashierData.sumOutwardCash | formatNumber }}) + + + {{ transaction.txnType.value === 'Cash Out' ? (transaction.txnAmount | formatNumber) : '-' }} + + + + + {{ 'labels.inputs.Settlement' | translate }} ({{ cashierData.sumCashSettlement | formatNumber }}) + + + {{ transaction.txnType.value === 'Settle Cash' ? (transaction.txnAmount | formatNumber) : '-' }} + + + + + + + + } diff --git a/src/app/organization/tellers/cashiers/transactions/transactions.component.ts b/src/app/organization/tellers/cashiers/transactions/transactions.component.ts index 58f3ca3b1c..b8303a5584 100644 --- a/src/app/organization/tellers/cashiers/transactions/transactions.component.ts +++ b/src/app/organization/tellers/cashiers/transactions/transactions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -53,6 +53,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class TransactionsComponent implements OnInit { + private organizationService = inject(OrganizationService); + private route = inject(ActivatedRoute); + /** Currency selector. */ currencySelector = new UntypedFormControl(); /** Cashier Id */ @@ -80,15 +83,15 @@ export class TransactionsComponent implements OnInit { /** Sorter for transactions table. */ @ViewChild(MatSort) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the currencies data from `resolve`. * @param {OrganizationService} organizationService Organization Service. * @param {ActivatedRoute} route Activated Route. */ - constructor( - private organizationService: OrganizationService, - private route: ActivatedRoute - ) { + constructor() { this.route.data.subscribe((data: { currencies: any }) => { this.currencyData = data.currencies.selectedCurrencyOptions; }); diff --git a/src/app/organization/tellers/cashiers/view-cashier/view-cashier.component.html b/src/app/organization/tellers/cashiers/view-cashier/view-cashier.component.html index d1441c3661..2e4571609a 100644 --- a/src/app/organization/tellers/cashiers/view-cashier/view-cashier.component.html +++ b/src/app/organization/tellers/cashiers/view-cashier/view-cashier.component.html @@ -29,13 +29,17 @@ {{ cashierData.tellerName }} - - {{ 'labels.inputs.Description' | translate }} - + @if (cashierData.description !== '') { + + {{ 'labels.inputs.Description' | translate }} + + } - - {{ cashierData.description }} - + @if (cashierData.description !== '') { + + {{ cashierData.description }} + + } {{ 'labels.inputs.Start Date' | translate }} diff --git a/src/app/organization/tellers/cashiers/view-cashier/view-cashier.component.ts b/src/app/organization/tellers/cashiers/view-cashier/view-cashier.component.ts index 4903726d41..24b1bd2b46 100644 --- a/src/app/organization/tellers/cashiers/view-cashier/view-cashier.component.ts +++ b/src/app/organization/tellers/cashiers/view-cashier/view-cashier.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; /** Custom Dialogs */ @@ -26,9 +26,17 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewCashierComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private organizationService = inject(OrganizationService); + dialog = inject(MatDialog); + /** Cashier data. */ cashierData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Get cashier data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -36,12 +44,7 @@ export class ViewCashierComponent { * @param {OrganizationService} organizationService Organization Service * @param {MatDialog} dialog Mat Dialog */ - constructor( - private route: ActivatedRoute, - private router: Router, - private organizationService: OrganizationService, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { cashier: any }) => { this.cashierData = data.cashier; }); diff --git a/src/app/organization/tellers/common-resolvers/cashier.resolver.ts b/src/app/organization/tellers/common-resolvers/cashier.resolver.ts index 9b2b52e2cd..d858cc4998 100644 --- a/src/app/organization/tellers/common-resolvers/cashier.resolver.ts +++ b/src/app/organization/tellers/common-resolvers/cashier.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from 'app/organization/organization.service'; */ @Injectable() export class CashierResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the cashier data. diff --git a/src/app/organization/tellers/common-resolvers/cashiers.resolver.ts b/src/app/organization/tellers/common-resolvers/cashiers.resolver.ts index d8cd28ae05..7a67a66a09 100644 --- a/src/app/organization/tellers/common-resolvers/cashiers.resolver.ts +++ b/src/app/organization/tellers/common-resolvers/cashiers.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from 'app/organization/organization.service'; */ @Injectable() export class CashiersResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the cashiers data. diff --git a/src/app/organization/tellers/common-resolvers/edit-cashier.resolver.ts b/src/app/organization/tellers/common-resolvers/edit-cashier.resolver.ts index 067ef36235..a9d59778a6 100644 --- a/src/app/organization/tellers/common-resolvers/edit-cashier.resolver.ts +++ b/src/app/organization/tellers/common-resolvers/edit-cashier.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from 'app/organization/organization.service'; */ @Injectable() export class EditCashierResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the cashier template. diff --git a/src/app/organization/tellers/common-resolvers/teller-transaction-template.resolver.ts b/src/app/organization/tellers/common-resolvers/teller-transaction-template.resolver.ts index 69ed4cd6be..8c478ee606 100644 --- a/src/app/organization/tellers/common-resolvers/teller-transaction-template.resolver.ts +++ b/src/app/organization/tellers/common-resolvers/teller-transaction-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from 'app/organization/organization.service'; */ @Injectable() export class CashierTransactionTemplateResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the cashier transaction data. diff --git a/src/app/organization/tellers/common-resolvers/teller.resolver.ts b/src/app/organization/tellers/common-resolvers/teller.resolver.ts index 40ea8cf2b9..318812d300 100644 --- a/src/app/organization/tellers/common-resolvers/teller.resolver.ts +++ b/src/app/organization/tellers/common-resolvers/teller.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { OrganizationService } from 'app/organization/organization.service'; */ @Injectable() export class TellerResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the teller data. diff --git a/src/app/organization/tellers/common-resolvers/tellers.resolver.ts b/src/app/organization/tellers/common-resolvers/tellers.resolver.ts index 022c8383d9..df7cc8f717 100644 --- a/src/app/organization/tellers/common-resolvers/tellers.resolver.ts +++ b/src/app/organization/tellers/common-resolvers/tellers.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from '../../organization.service'; */ @Injectable() export class TellersResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the Tellers data. diff --git a/src/app/organization/tellers/create-teller/create-teller.component.html b/src/app/organization/tellers/create-teller/create-teller.component.html index 8f903d70f1..df5f75ecf4 100644 --- a/src/app/organization/tellers/create-teller/create-teller.component.html +++ b/src/app/organization/tellers/create-teller/create-teller.component.html @@ -6,27 +6,35 @@ {{ 'labels.inputs.Teller Name' | translate }} - - {{ 'labels.inputs.Teller Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Teller Name' | translate }} {{ 'labels.commons.cannot' | translate }} - {{ 'labels.commons.begin with a special character or number' | translate }} - + @if (tellerForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Teller Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (tellerForm.controls.name.hasError('pattern')) { + + {{ 'labels.inputs.Teller Name' | translate }} {{ 'labels.commons.cannot' | translate }} + {{ 'labels.commons.begin with a special character or number' | translate }} + + } {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (tellerForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -46,10 +54,12 @@ /> - - {{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (tellerForm.controls.startDate.hasError('required')) { + + {{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -68,14 +78,18 @@ {{ 'labels.inputs.Status' | translate }} - - {{ tellerStatus.value }} - + @for (tellerStatus of tellerStatusesData; track tellerStatus) { + + {{ tellerStatus.value }} + + } - - {{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (tellerForm.controls.status.hasError('required')) { + + {{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/organization/tellers/create-teller/create-teller.component.ts b/src/app/organization/tellers/create-teller/create-teller.component.ts index 7e25df92c7..61d1907f82 100644 --- a/src/app/organization/tellers/create-teller/create-teller.component.ts +++ b/src/app/organization/tellers/create-teller/create-teller.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateTellerComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -34,6 +41,9 @@ export class CreateTellerComponent implements OnInit { /** TellerStatuses data. */ tellerStatusesData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -43,14 +53,7 @@ export class CreateTellerComponent implements OnInit { * @param {Router} router Router for navigation. * @param {Dates} dateUtils Date Utils to format date. */ - constructor( - private formBuilder: UntypedFormBuilder, - private organizationService: OrganizationService, - private settingsService: SettingsService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates - ) { + constructor() { this.route.data.subscribe((data: { offices: any }) => { this.officeData = data.offices; }); diff --git a/src/app/organization/tellers/edit-teller/edit-teller.component.html b/src/app/organization/tellers/edit-teller/edit-teller.component.html index 9a53cefb16..cb24882630 100644 --- a/src/app/organization/tellers/edit-teller/edit-teller.component.html +++ b/src/app/organization/tellers/edit-teller/edit-teller.component.html @@ -6,22 +6,28 @@ {{ 'labels.inputs.Teller Name' | translate }} - - {{ 'labels.inputs.Teller Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Teller Name' | translate }} {{ 'labels.commons.cannot' | translate }} - {{ 'labels.commons.begin with a special character or number' | translate }} - + @if (tellerForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Teller Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (tellerForm.controls.name.hasError('pattern')) { + + {{ 'labels.inputs.Teller Name' | translate }} {{ 'labels.commons.cannot' | translate }} + {{ 'labels.commons.begin with a special character or number' | translate }} + + } {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officeData; track office) { + + {{ office.name }} + + } @@ -42,10 +48,12 @@ /> - - {{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (tellerForm.controls.startDate.hasError('required')) { + + {{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -64,14 +72,18 @@ {{ 'labels.inputs.Status' | translate }} - - {{ tellerStatus.value }} - + @for (tellerStatus of tellerStatusesData; track tellerStatus) { + + {{ tellerStatus.value }} + + } - - {{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (tellerForm.controls.status.hasError('required')) { + + {{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/organization/tellers/edit-teller/edit-teller.component.ts b/src/app/organization/tellers/edit-teller/edit-teller.component.ts index d481111c74..8b3f4f2eb6 100644 --- a/src/app/organization/tellers/edit-teller/edit-teller.component.ts +++ b/src/app/organization/tellers/edit-teller/edit-teller.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -22,6 +22,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditTellerComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -35,6 +42,9 @@ export class EditTellerComponent implements OnInit { /** Teller data. */ tellerData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -44,14 +54,7 @@ export class EditTellerComponent implements OnInit { * @param {Router} router Router for navigation. * @param {Dates} dateUtils Date Utils to format date. */ - constructor( - private formBuilder: UntypedFormBuilder, - private organizationService: OrganizationService, - private settingsService: SettingsService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates - ) { + constructor() { this.route.data.subscribe((data: { teller: any; offices: any }) => { this.tellerData = data.teller; this.officeData = data.offices; diff --git a/src/app/organization/tellers/tellers.component.ts b/src/app/organization/tellers/tellers.component.ts index 00ee160e03..3fa45e4551 100644 --- a/src/app/organization/tellers/tellers.component.ts +++ b/src/app/organization/tellers/tellers.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -52,6 +52,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class TellersComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Tellers data. */ tellersData: any; /** Columns to be displayed in tellers table. */ @@ -70,11 +72,14 @@ export class TellersComponent implements OnInit { /** Sorter for tellers table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the tellers data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { tellers: any }) => { this.tellersData = data.tellers; }); diff --git a/src/app/organization/tellers/view-teller/view-teller.component.html b/src/app/organization/tellers/view-teller/view-teller.component.html index c4b17c3d81..7336f27ced 100644 --- a/src/app/organization/tellers/view-teller/view-teller.component.html +++ b/src/app/organization/tellers/view-teller/view-teller.component.html @@ -29,13 +29,17 @@ {{ tellerData.officeName }} - - {{ 'labels.inputs.Description' | translate }} - + @if (tellerData.description) { + + {{ 'labels.inputs.Description' | translate }} + + } - - {{ tellerData.description }} - + @if (tellerData.description) { + + {{ tellerData.description }} + + } {{ 'labels.inputs.Start Date' | translate }} @@ -45,13 +49,17 @@ {{ tellerData.startDate | dateFormat }} - - {{ 'labels.inputs.End Date' | translate }} - + @if (tellerData.endDate) { + + {{ 'labels.inputs.End Date' | translate }} + + } - - {{ tellerData.endDate | dateFormat }} - + @if (tellerData.endDate) { + + {{ tellerData.endDate | dateFormat }} + + } {{ 'labels.inputs.Status' | translate }} diff --git a/src/app/organization/tellers/view-teller/view-teller.component.ts b/src/app/organization/tellers/view-teller/view-teller.component.ts index e99791a4c9..dfc8cd12b6 100644 --- a/src/app/organization/tellers/view-teller/view-teller.component.ts +++ b/src/app/organization/tellers/view-teller/view-teller.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -9,7 +9,7 @@ import { OrganizationService } from 'app/organization/organization.service'; /** Custom Components */ import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dialog.component'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; -import { NgIf, TitleCasePipe } from '@angular/common'; +import { TitleCasePipe } from '@angular/common'; import { DateFormatPipe } from '../../../pipes/date-format.pipe'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -28,9 +28,17 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewTellerComponent { + private organizationService = inject(OrganizationService); + private route = inject(ActivatedRoute); + private router = inject(Router); + dialog = inject(MatDialog); + /** Teller data. */ tellerData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Teller data from `resolve`. * @param {OrganizationService} organizationService Organization Service. @@ -38,12 +46,7 @@ export class ViewTellerComponent { * @param {Router} router Router for navigation. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private organizationService: OrganizationService, - private route: ActivatedRoute, - private router: Router, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { teller: any }) => { this.tellerData = data.teller; }); diff --git a/src/app/organization/working-days/working-days.component.html b/src/app/organization/working-days/working-days.component.html index d08c4359a7..ccb1254ad9 100644 --- a/src/app/organization/working-days/working-days.component.html +++ b/src/app/organization/working-days/working-days.component.html @@ -6,23 +6,24 @@ {{ 'labels.inputs.Working Days' | translate }} - - - {{ weekDays[i].name }} - - + @for (day of recurrence.controls; track day; let i = $index) { + + + {{ weekDays[i].name }} + + + } {{ 'labels.inputs.Payments due on non working days' | translate }} - - {{ repaymentRescheduleType.value }} - + @for (repaymentRescheduleType of repaymentRescheduleTypeData; track repaymentRescheduleType) { + + {{ repaymentRescheduleType.value }} + + } diff --git a/src/app/organization/working-days/working-days.component.ts b/src/app/organization/working-days/working-days.component.ts index e7ac526338..c8cb32dc32 100644 --- a/src/app/organization/working-days/working-days.component.ts +++ b/src/app/organization/working-days/working-days.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -37,6 +37,15 @@ const recurrenceDefaultValue = 'FREQ=WEEKLY;INTERVAL=1;BYDAY='; ] }) export class WorkingDaysComponent implements OnInit, AfterViewInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private organizationService = inject(OrganizationService); + private settingsService = inject(SettingsService); + private router = inject(Router); + private dialog = inject(MatDialog); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Working days form. */ workingDaysForm: UntypedFormGroup; /** Working days data. */ @@ -59,6 +68,9 @@ export class WorkingDaysComponent implements OnInit, AfterViewInit { /* Template for popover on define working days form */ @ViewChild('templateWorkingDaysFormRef') templateWorkingDaysFormRef: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the working days data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -70,16 +82,7 @@ export class WorkingDaysComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private organizationService: OrganizationService, - private settingsService: SettingsService, - private router: Router, - private dialog: MatDialog, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { workingDays: any }) => { this.workingDaysData = data.workingDays; }); diff --git a/src/app/organization/working-days/working-days.resolver.ts b/src/app/organization/working-days/working-days.resolver.ts index 29eb016d7e..d74aa4bf54 100644 --- a/src/app/organization/working-days/working-days.resolver.ts +++ b/src/app/organization/working-days/working-days.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { OrganizationService } from '../organization.service'; */ @Injectable() export class WorkingDaysResolver { + private organizationService = inject(OrganizationService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {OrganizationService} organizationService Organization service. */ - constructor(private organizationService: OrganizationService) {} + constructor() {} /** * Returns the working days data. diff --git a/src/app/pipes/date-format.pipe.ts b/src/app/pipes/date-format.pipe.ts index b15e937792..8061a93e0a 100644 --- a/src/app/pipes/date-format.pipe.ts +++ b/src/app/pipes/date-format.pipe.ts @@ -1,10 +1,15 @@ -import { Pipe, PipeTransform } from '@angular/core'; +import { Pipe, PipeTransform, inject } from '@angular/core'; import { SettingsService } from 'app/settings/settings.service'; import moment from 'moment'; @Pipe({ name: 'dateFormat' }) export class DateFormatPipe implements PipeTransform { - constructor(private settingsService: SettingsService) {} + private settingsService = inject(SettingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} transform(value: any, dateFormat?: string): any { const defaultDateFormat = this.settingsService.dateFormat.replace('dd', 'DD'); diff --git a/src/app/pipes/format-number.pipe.ts b/src/app/pipes/format-number.pipe.ts index c147b0a332..c2ed30602c 100644 --- a/src/app/pipes/format-number.pipe.ts +++ b/src/app/pipes/format-number.pipe.ts @@ -1,13 +1,16 @@ import { DecimalPipe } from '@angular/common'; -import { Pipe, PipeTransform } from '@angular/core'; +import { Pipe, PipeTransform, inject } from '@angular/core'; import { SettingsService } from 'app/settings/settings.service'; @Pipe({ name: 'formatNumber' }) export class FormatNumberPipe implements PipeTransform { - constructor( - private decimalFormat: DecimalPipe, - private settingsService: SettingsService - ) {} + private decimalFormat = inject(DecimalPipe); + private settingsService = inject(SettingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} transform(value: string | number, defaultValue: any): string { if (value === undefined) { diff --git a/src/app/pipes/translate.pipe.ts b/src/app/pipes/translate.pipe.ts index d0c4c13585..1dd2835979 100644 --- a/src/app/pipes/translate.pipe.ts +++ b/src/app/pipes/translate.pipe.ts @@ -1,9 +1,14 @@ -import { Pipe, PipeTransform } from '@angular/core'; +import { Pipe, PipeTransform, inject } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; @Pipe({ name: 'translateKey', standalone: true }) export class TranslatePipe implements PipeTransform { - constructor(private translateService: TranslateService) {} + private translateService = inject(TranslateService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} transform(attributeValue: any, group: string, prefix: string = 'labels'): string { const translationKey = `${prefix}.${group}.${attributeValue}`; diff --git a/src/app/pipes/yesno.pipe.ts b/src/app/pipes/yesno.pipe.ts index 945ee06638..57673ee9b6 100644 --- a/src/app/pipes/yesno.pipe.ts +++ b/src/app/pipes/yesno.pipe.ts @@ -1,9 +1,14 @@ -import { Pipe, PipeTransform } from '@angular/core'; +import { Pipe, PipeTransform, inject } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; @Pipe({ name: 'yesNo' }) export class YesnoPipe implements PipeTransform { - constructor(private translateService: TranslateService) {} + private translateService = inject(TranslateService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} transform(value: boolean, ...args: unknown[]): string { if (value == null) { diff --git a/src/app/products/charges/charge.resolver.ts b/src/app/products/charges/charge.resolver.ts index 0dbe5983d4..2a8ab219b5 100644 --- a/src/app/products/charges/charge.resolver.ts +++ b/src/app/products/charges/charge.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from 'app/products/products.service'; */ @Injectable() export class ChargeResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {productsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the charge data. diff --git a/src/app/products/charges/charges-template-and-resolver.ts b/src/app/products/charges/charges-template-and-resolver.ts index 8dcf9af504..abbfe09120 100644 --- a/src/app/products/charges/charges-template-and-resolver.ts +++ b/src/app/products/charges/charges-template-and-resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRoute, ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -10,7 +10,12 @@ import { ProductsService } from '../products.service'; @Injectable() export class ChargesTemplateAndResolver { - constructor(private productsService: ProductsService) {} + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} /** * Returns the changes template and data. diff --git a/src/app/products/charges/charges-template.resolver.ts b/src/app/products/charges/charges-template.resolver.ts index 3409f6244c..e216ab63cd 100644 --- a/src/app/products/charges/charges-template.resolver.ts +++ b/src/app/products/charges/charges-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class ChargesTemplateResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the charges template data. diff --git a/src/app/products/charges/charges.component.html b/src/app/products/charges/charges.component.html index 764eee1c17..befac6d585 100644 --- a/src/app/products/charges/charges.component.html +++ b/src/app/products/charges/charges.component.html @@ -18,9 +18,11 @@ placeholder="{{ 'labels.inputs.Filter' | translate }}" (selectionChange)="filterByAppliesTo($event.value)" > - - {{ chargeAppliesTo.value | translateKey: 'catalogs' }} - + @for (chargeAppliesTo of chargeAppliesToOptions; track chargeAppliesTo) { + + {{ chargeAppliesTo.value | translateKey: 'catalogs' }} + + } @@ -57,22 +59,24 @@ {{ 'labels.commons.Is' | translate }} {{ 'labels.inputs.Penalty' | translate }}? - - + @if (charge.penalty) { + + } + @if (!charge.penalty) { + + } diff --git a/src/app/products/charges/charges.component.ts b/src/app/products/charges/charges.component.ts index 7f9c7e4192..633aa2c2c1 100644 --- a/src/app/products/charges/charges.component.ts +++ b/src/app/products/charges/charges.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -59,6 +59,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ChargesComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + private charges = inject(Charges); + /** Charge data. */ chargeData: Charge[] = []; /** Columns to be displayed in charges table. */ @@ -90,6 +96,9 @@ export class ChargesComponent implements OnInit, AfterViewInit { chargeAppliesToOptions: OptionData[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the charges data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -97,13 +106,7 @@ export class ChargesComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService, - private charges: Charges - ) { + constructor() { this.route.data.subscribe((data: { charges: any }) => { this.chargeData = data.charges; }); diff --git a/src/app/products/charges/charges.resolver.ts b/src/app/products/charges/charges.resolver.ts index c70ca5a264..d392a40da4 100644 --- a/src/app/products/charges/charges.resolver.ts +++ b/src/app/products/charges/charges.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class ChargesResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the products data. diff --git a/src/app/products/charges/create-charge/create-charge.component.html b/src/app/products/charges/create-charge/create-charge.component.html index 18c3601be4..9358edc647 100644 --- a/src/app/products/charges/create-charge/create-charge.component.html +++ b/src/app/products/charges/create-charge/create-charge.component.html @@ -6,248 +6,265 @@ {{ 'labels.inputs.Charge Applies To' | translate }} - - {{ chargeAppliesTo.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Charge Applies To' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - - - {{ 'labels.inputs.Charge Name' | translate }} - - - {{ 'labels.inputs.Charge Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Currency' | translate }} - - - {{ currency.name }} + @for (chargeAppliesTo of chargesTemplateData.chargeAppliesToOptions; track chargeAppliesTo) { + + {{ chargeAppliesTo.value | translateKey: 'catalogs' }} - - - {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Charge Time Type' | translate }} - - - {{ chargeTimeType.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Charge Time Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Charge Calculation Type' | translate }} - - - {{ chargeCalculationType.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Charge Calculation Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Charge Payment Mode' | translate }} - - - {{ chargePaymentMode.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Charge Payment Mode' | translate }} {{ 'labels.commons.is' | translate }} + } + + @if (chargeForm.controls.chargeAppliesTo.hasError('required')) { + + {{ 'labels.inputs.Charge Applies To' | translate }} {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Add Fee Frequency' | translate }} - - + } + - - {{ 'labels.inputs.Frequency Interval' | translate }} - - - {{ 'labels.inputs.Frequency Interval' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Frequency Interval' | translate }} - {{ 'labels.commons.must be a positive integer' | translate }} - - + - - {{ 'labels.inputs.Charge Frequency' | translate }} - - + + {{ 'labels.inputs.Charge Name' | translate }} + + @if (chargeForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Charge Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Currency' | translate }} + + @for (currency of chargesTemplateData.currencyOptions; track currency) { + + {{ currency.name }} + + } + + @if (chargeForm.controls.currencyCode.hasError('required')) { + + {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Charge Time Type' | translate }} + + @for (chargeTimeType of chargeTimeTypeData; track chargeTimeType) { + + {{ chargeTimeType.value | translateKey: 'catalogs' }} + + } + + @if (chargeForm.controls.chargeTimeType.hasError('required')) { + + {{ 'labels.inputs.Charge Time Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Charge Calculation Type' | translate }} + + @for (chargeCalculationType of filteredChargeCalculationType(); track chargeCalculationType) { + + {{ chargeCalculationType.value | translateKey: 'catalogs' }} + + } + + @if (chargeForm.controls.chargeCalculationType.hasError('required')) { + + {{ 'labels.inputs.Charge Calculation Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + @if (chargeForm.controls.chargeAppliesTo.value === 1) { + + {{ 'labels.inputs.Charge Payment Mode' | translate }} + + @for (chargePaymentMode of chargesTemplateData.chargePaymetModeOptions; track chargePaymentMode) { + + {{ chargePaymentMode.value | translateKey: 'catalogs' }} + + } + + @if (chargeForm.controls.chargePaymentMode.hasError('required')) { + + {{ 'labels.inputs.Charge Payment Mode' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + @if (chargeForm.controls.chargeTimeType.value === 9) { + + + {{ 'labels.inputs.Add Fee Frequency' | translate }} + + + } + @if (chargeForm.controls.chargeTimeType.value === 9 && chargeForm.controls.addFeeFrequency.value) { + + {{ 'labels.inputs.Frequency Interval' | translate }} + + @if (chargeForm.controls.feeInterval.hasError('required')) { + + {{ 'labels.inputs.Frequency Interval' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (chargeForm.controls.feeInterval.hasError('pattern')) { + + {{ 'labels.inputs.Frequency Interval' | translate }} + {{ 'labels.commons.must be a positive integer' | translate }} + + } + + } + @if (chargeForm.controls.chargeTimeType.value === 9 && chargeForm.controls.addFeeFrequency.value) { + + {{ 'labels.inputs.Charge Frequency' | translate }} + + @for (feeFrequency of chargesTemplateData.feeFrequencyOptions; track feeFrequency) { + + {{ feeFrequency.value | translateKey: 'catalogs' }} + + } + + @if (chargeForm.controls.feeFrequency.hasError('required')) { + + {{ 'labels.inputs.Charge Frequency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + @if (chargeForm.controls.chargeTimeType.value === 6 || chargeForm.controls.chargeTimeType.value === 7) { + + {{ 'labels.inputs.Due Date' | translate }} + + + + @if (chargeForm.controls.feeOnMonthDay.hasError('required')) { + + {{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + @if (chargeForm.controls.chargeTimeType.value === 7 || chargeForm.controls.chargeTimeType.value === 11) { + + {{ 'labels.inputs.Repeat Every' | translate }} ({{ repeatEveryLabel }}) + + @if (chargeForm.controls.feeInterval.hasError('required')) { + + {{ 'labels.inputs.Repeat Every' | translate }} ({{ repeatEveryLabel }}) + {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} + + } + @if ( + (chargeForm.controls.feeInterval.hasError('min') || + chargeForm.controls.feeInterval.hasError('max')) && + !chargeForm.controls.feeInterval.hasError('pattern') + ) { + + {{ 'labels.inputs.Repeat Every' | translate }} ({{ repeatEveryLabel }}) + {{ 'labels.commons.must be between 1 and 12' | translate }} + + } + @if (chargeForm.controls.feeInterval.hasError('pattern')) { + + {{ 'labels.inputs.Repeat Every' | translate }} ({{ repeatEveryLabel }}) + {{ 'labels.commons.must be a positive integer' | translate }} + + } + + } + + {{ 'labels.inputs.Amount' | translate }} + + @if (chargeForm.controls.amount.hasError('required')) { + + {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + @if (showMinMaxCap()) { + + {{ 'labels.inputs.Minimum Charge Cap' | translate }} + + @if (chargeForm.controls.minCap.hasError('maxValue')) { + + {{ 'errors.validation.msg.loanproduct.minimumGap.not.greater.than.specified.number' | translate }} + ({{ chargeForm.controls.maxCap.value }}) + + } + + } + @if (showMinMaxCap()) { + + {{ 'labels.inputs.Maximum Charge Cap' | translate }} + + @if (chargeForm.controls.maxCap.hasError('minValue')) { + + {{ 'errors.validation.msg.loanproduct.maximumGap.not.greater.than.specified.number' | translate }} + ({{ chargeForm.controls.minCap.value }}) + + } + + } + @if (chargeForm.controls.chargeAppliesTo.value === 3) { + - {{ feeFrequency.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Charge Frequency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Due Date' | translate }} - - - - - {{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Repeat Every' | translate }} ({{ repeatEveryLabel }}) - - - {{ 'labels.inputs.Repeat Every' | translate }} ({{ repeatEveryLabel }}) - {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Repeat Every' | translate }} ({{ repeatEveryLabel }}) - {{ 'labels.commons.must be between 1 and 12' | translate }} - - - {{ 'labels.inputs.Repeat Every' | translate }} ({{ repeatEveryLabel }}) - {{ 'labels.commons.must be a positive integer' | translate }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - - {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Minimum Charge Cap' | translate }} - - - {{ 'errors.validation.msg.loanproduct.minimumGap.not.greater.than.specified.number' | translate }} ({{ - chargeForm.controls.maxCap.value - }}) - - - - - {{ 'labels.inputs.Maximum Charge Cap' | translate }} - - - - {{ 'errors.validation.msg.loanproduct.maximumGap.not.greater.than.specified.number' | translate }} ({{ - chargeForm.controls.minCap.value - }}) - - - - - - - - {{ 'labels.inputs.Tax Group' | translate }} - - - {{ taxGroup.name }} - - - - - - - - {{ 'labels.status.Active' | translate }} - - - - - - {{ 'labels.commons.Is' | translate }} {{ 'labels.inputs.Penalty' | translate }} - + + } + + {{ 'labels.inputs.Tax Group' | translate }} + + @for (taxGroup of chargesTemplateData.taxGroupOptions; track taxGroup) { + + {{ taxGroup.name }} + + } + + + + + + {{ 'labels.status.Active' | translate }} + + + + + {{ 'labels.commons.Is' | translate }} {{ 'labels.inputs.Penalty' | translate }} + + - + } diff --git a/src/app/products/charges/create-charge/create-charge.component.ts b/src/app/products/charges/create-charge/create-charge.component.ts index d0ee75ee6e..a23c21465c 100644 --- a/src/app/products/charges/create-charge/create-charge.component.ts +++ b/src/app/products/charges/create-charge/create-charge.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -37,6 +37,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateChargeComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private productsService = inject(ProductsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + /** Charge form. */ chargeForm: UntypedFormGroup; /** Charges template data. */ @@ -56,6 +63,9 @@ export class CreateChargeComponent implements OnInit { /** Currency decimal places */ currencyDecimalPlaces: number; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the charges template data and income and liability account data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -65,14 +75,7 @@ export class CreateChargeComponent implements OnInit { * @param {Dates} dateUtils Date Utils to format date. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private productsService: ProductsService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { chargesTemplate: any }) => { this.chargesTemplateData = data.chargesTemplate; if (data.chargesTemplate.incomeOrLiabilityAccountOptions.liabilityAccountOptions) { diff --git a/src/app/products/charges/edit-charge/edit-charge.component.html b/src/app/products/charges/edit-charge/edit-charge.component.html index 540997a01c..f0c35fec1c 100644 --- a/src/app/products/charges/edit-charge/edit-charge.component.html +++ b/src/app/products/charges/edit-charge/edit-charge.component.html @@ -6,12 +6,11 @@ {{ 'labels.inputs.Charge Applies To' | translate }} - - {{ chargeAppliesTo.value | translateKey: 'catalogs' }} - + @for (chargeAppliesTo of chargeData.chargeAppliesToOptions; track chargeAppliesTo) { + + {{ chargeAppliesTo.value | translateKey: 'catalogs' }} + + } @@ -20,187 +19,228 @@ {{ 'labels.inputs.Name' | translate }} - - {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (chargeForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Currency' | translate }} - - {{ currency.name }} - + @for (currency of chargeData.currencyOptions; track currency) { + + {{ currency.name }} + + } - - {{ 'labels.inputs.Currency' | translate }} {{ 'labels.inputs.Type' | translate }} - {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} - + @if (chargeForm.controls.currencyCode.hasError('required')) { + + {{ 'labels.inputs.Currency' | translate }} {{ 'labels.inputs.Type' | translate }} + {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Charge Time Type' | translate }} - - {{ chargeTime.value | translateKey: 'catalogs' }} - + @for (chargeTime of chargeTimeTypeOptions; track chargeTime) { + + {{ chargeTime.value | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Charge Time Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (chargeForm.controls.chargeTimeType.hasError('required')) { + + {{ 'labels.inputs.Charge Time Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Charge Calculation' | translate }} - - {{ chargeCalculation.value | translateKey: 'catalogs' }} - + @for (chargeCalculation of chargeCalculationTypeOptions; track chargeCalculation) { + + {{ chargeCalculation.value | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Charge Calculation Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (chargeForm.controls.chargeCalculationType.hasError('required')) { + + {{ 'labels.inputs.Charge Calculation Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Charge Payment By' | translate }} - - - {{ chargePaymentMode.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Charge Payment Mode' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (chargePaymentMode) { + + {{ 'labels.inputs.Charge Payment By' | translate }} + + @for (chargePaymentMode of chargeData.chargePaymetModeOptions; track chargePaymentMode) { + + {{ chargePaymentMode.value | translateKey: 'catalogs' }} + + } + + @if (chargeForm.controls.chargePaymentMode.hasError('required')) { + + {{ 'labels.inputs.Charge Payment Mode' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } {{ 'labels.inputs.Amount' | translate }} - - {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (chargeForm.controls.amount.hasError('required')) { + + {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Minimum Charge Cap' | translate }} - - - {{ 'errors.validation.msg.loanproduct.minimumGap.not.greater.than.specified.number' | translate }} ({{ - chargeForm.controls.maxCap.value - }}) - - - - {{ 'labels.inputs.Maximum Charge Cap' | translate }} - + * minCap and maxCap only allowed for loan ,shares and savings entitites + * In Loan case: Only for the "charge calculation type" set as "%amount", "% loan amount+interest", "%interest",and "%disbursement amount". + * In saving case: Only for 1. charge time type is "withdrawlfee" or "savings no activity fee" with charge calculation type as "% amount" + * In shares case: Only for charge time type: SHARE_PURCHASE and SHARE_REDEEM and with charge calculation type as % amount only + --> + @if ( + (chargeForm.controls.chargeAppliesTo.value === 1 && + (chargeForm.controls.chargeCalculationType.value === 2 || + chargeForm.controls.chargeCalculationType.value === 3 || + chargeForm.controls.chargeCalculationType.value === 4 || + chargeForm.controls.chargeCalculationType.value === 5)) || + (chargeForm.controls.chargeAppliesTo.value === 2 && + (chargeForm.controls.chargeTimeType.value === 16 || chargeForm.controls.chargeTimeType.value === 5) && + chargeForm.controls.chargeCalculationType.value === 2) || + (chargeForm.controls.chargeAppliesTo.value === 4 && + (chargeForm.controls.chargeTimeType.value === 14 || chargeForm.controls.chargeTimeType.value === 15) && + chargeForm.controls.chargeCalculationType.value === 2) + ) { + + {{ 'labels.inputs.Minimum Charge Cap' | translate }} + + @if (chargeForm.controls.minCap.hasError('maxValue')) { + + {{ 'errors.validation.msg.loanproduct.minimumGap.not.greater.than.specified.number' | translate }} ({{ + chargeForm.controls.maxCap.value + }}) + + } + + } + @if ( + (chargeForm.controls.chargeAppliesTo.value === 1 && + (chargeForm.controls.chargeCalculationType.value === 2 || + chargeForm.controls.chargeCalculationType.value === 3 || + chargeForm.controls.chargeCalculationType.value === 4 || + chargeForm.controls.chargeCalculationType.value === 5)) || + (chargeForm.controls.chargeAppliesTo.value === 2 && + (chargeForm.controls.chargeTimeType.value === 16 || chargeForm.controls.chargeTimeType.value === 5) && + chargeForm.controls.chargeCalculationType.value === 2) || + (chargeForm.controls.chargeAppliesTo.value === 4 && + (chargeForm.controls.chargeTimeType.value === 14 || chargeForm.controls.chargeTimeType.value === 15) && + chargeForm.controls.chargeCalculationType.value === 2) + ) { + + {{ 'labels.inputs.Maximum Charge Cap' | translate }} + + @if (chargeForm.controls.maxCap.hasError('minValue')) { + + {{ 'errors.validation.msg.loanproduct.maximumGap.not.greater.than.specified.number' | translate }} ({{ + chargeForm.controls.minCap.value + }}) + + } + + } - - {{ 'errors.validation.msg.loanproduct.maximumGap.not.greater.than.specified.number' | translate }} ({{ - chargeForm.controls.minCap.value - }}) - - - - - + @if (showGLAccount) { + + + } {{ 'labels.inputs.Tax Group' | translate }} - - - {{ taxGroup.name }} - - + @if (chargeData.taxGroup) { + + @for (taxGroup of chargeData.taxGroupOptions; track taxGroup) { + + {{ taxGroup.name }} + + } + + } - - - {{ taxGroup.name }} - - + @if (!chargeData.taxGroup) { + + @for (taxGroup of chargeData.taxGroupOptions; track taxGroup) { + + {{ taxGroup.name }} + + } + + } - - - {{ 'labels.inputs.Add Fee Frequency' | translate }} - - + @if (addFeeFrequency) { + + + {{ 'labels.inputs.Add Fee Frequency' | translate }} + + + } - - {{ 'labels.inputs.Frequency Interval' | translate }} - - - {{ 'labels.inputs.Frequency Interval' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (addFeeFrequency && showFeeOptions) { + + {{ 'labels.inputs.Frequency Interval' | translate }} + + @if (chargeForm.controls.feeInterval.hasError('required')) { + + {{ 'labels.inputs.Frequency Interval' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Charge Frequency' | translate }} - - - {{ chargeFrequency.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Add Fee Frequency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (addFeeFrequency && showFeeOptions) { + + {{ 'labels.inputs.Charge Frequency' | translate }} + + @for (chargeFrequency of chargeData.feeFrequencyOptions; track chargeFrequency) { + + {{ chargeFrequency.value | translateKey: 'catalogs' }} + + } + + @if (chargeForm.controls.feeFrequency.hasError('required')) { + + {{ 'labels.inputs.Add Fee Frequency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } @@ -210,11 +250,13 @@ - - - {{ 'labels.commons.Is' | translate }} {{ 'labels.inputs.Penalty' | translate }} - - + @if (showPenalty) { + + + {{ 'labels.commons.Is' | translate }} {{ 'labels.inputs.Penalty' | translate }} + + + } diff --git a/src/app/products/charges/edit-charge/edit-charge.component.ts b/src/app/products/charges/edit-charge/edit-charge.component.ts index eefd18e756..39f371a24e 100644 --- a/src/app/products/charges/edit-charge/edit-charge.component.ts +++ b/src/app/products/charges/edit-charge/edit-charge.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -28,6 +28,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditChargeComponent implements OnInit { + private productsService = inject(ProductsService); + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Selected Data. */ chargeData: any; /** Charge form. */ @@ -55,6 +61,9 @@ export class EditChargeComponent implements OnInit { /** Show Fee Options. */ showFeeOptions = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the charge data from `resolve`. * @param {ProductsService} productsService Products Service. @@ -63,13 +72,7 @@ export class EditChargeComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private productsService: ProductsService, - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { chargesTemplate: any }) => { this.chargeData = data.chargesTemplate; }); diff --git a/src/app/products/charges/view-charge/view-charge.component.html b/src/app/products/charges/view-charge/view-charge.component.html index d604b71132..232e32dc60 100644 --- a/src/app/products/charges/view-charge/view-charge.component.html +++ b/src/app/products/charges/view-charge/view-charge.component.html @@ -53,21 +53,29 @@ {{ chargeData.amount }} - - {{ 'labels.inputs.Minimum Charge Cap' | translate }} - - - - {{ chargeData.minCap }} - - - - {{ 'labels.inputs.Maximum Charge Cap' | translate }} - - - - {{ chargeData.maxCap }} - + @if (minCap) { + + {{ 'labels.inputs.Minimum Charge Cap' | translate }} + + } + + @if (minCap) { + + {{ chargeData.minCap }} + + } + + @if (maxCap) { + + {{ 'labels.inputs.Maximum Charge Cap' | translate }} + + } + + @if (maxCap) { + + {{ chargeData.maxCap }} + + } {{ 'labels.inputs.Charge Time Type' | translate }} @@ -101,41 +109,51 @@ {{ chargeData.active === true | yesNo }} - - {{ 'labels.inputs.Add Fee Frequency' | translate }} - - - - {{ chargeData.feeFrequency.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Frequency Interval' | translate }} - - - - {{ chargeData.feeInterval }} - - - - - - - {{ 'labels.inputs.Tax Group' | translate }} - - - - {{ chargeData.taxGroup.name }} - + @if (chargeData.chargeTimeType.id === 9 && chargeData.feeFrequency) { + + {{ 'labels.inputs.Add Fee Frequency' | translate }} + + } + + @if (chargeData.chargeTimeType.id === 9 && chargeData.feeFrequency && chargeData.feeFrequency) { + + {{ chargeData.feeFrequency.value | translateKey: 'catalogs' }} + + } + + @if (chargeData.chargeTimeType.id === 9 && chargeData.feeInterval) { + + {{ 'labels.inputs.Frequency Interval' | translate }} + + } + + @if (chargeData.chargeTimeType.id === 9 && chargeData.feeInterval) { + + {{ chargeData.feeInterval }} + + } + + @if (chargeData.incomeOrLiabilityAccount) { + + + } + + @if (chargeData.taxGroup) { + + {{ 'labels.inputs.Tax Group' | translate }} + + } + + @if (chargeData.taxGroup) { + + {{ chargeData.taxGroup.name }} + + } diff --git a/src/app/products/charges/view-charge/view-charge.component.ts b/src/app/products/charges/view-charge/view-charge.component.ts index c0649fd6c9..fc3be34957 100644 --- a/src/app/products/charges/view-charge/view-charge.component.ts +++ b/src/app/products/charges/view-charge/view-charge.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -29,11 +29,20 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewChargeComponent { + private productsService = inject(ProductsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** Charge data. */ chargeData: any; /** Boolean for MinCap and MaxCap */ minCap: boolean; maxCap: boolean; + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); /** * Retrieves the charge data from `resolve`. * @param {ProductsService} productsService Products Service. @@ -42,13 +51,7 @@ export class ViewChargeComponent { * @param {MatDialog} dialog Dialog reference. * @param {TranslateService} translateService Translate Service. */ - constructor( - private productsService: ProductsService, - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { charge: any }) => { this.chargeData = data.charge; if (this.chargeData.minCap) { diff --git a/src/app/products/collaterals/collateral.resolver.ts b/src/app/products/collaterals/collateral.resolver.ts index 3ceb9c6793..2d98f530f3 100644 --- a/src/app/products/collaterals/collateral.resolver.ts +++ b/src/app/products/collaterals/collateral.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class CollateralResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the products data. diff --git a/src/app/products/collaterals/collaterals-template.resolver.ts b/src/app/products/collaterals/collaterals-template.resolver.ts index 01a4a76747..b1ab70261e 100644 --- a/src/app/products/collaterals/collaterals-template.resolver.ts +++ b/src/app/products/collaterals/collaterals-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class CollateralTemplateResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService products Service */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the product Data. diff --git a/src/app/products/collaterals/collaterals.component.ts b/src/app/products/collaterals/collaterals.component.ts index 4301233f51..050040b8dc 100644 --- a/src/app/products/collaterals/collaterals.component.ts +++ b/src/app/products/collaterals/collaterals.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild, OnInit } from '@angular/core'; +import { Component, ViewChild, OnInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -42,6 +42,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CollateralsComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Collateral Data */ collateralData: any; /** Columns to be displayed in the Collaterals Table */ @@ -60,11 +62,14 @@ export class CollateralsComponent implements OnInit { /** Sorter for Collateral Table */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Collaterals data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { collaterals: any }) => { this.collateralData = data.collaterals; }); diff --git a/src/app/products/collaterals/collaterals.resolver.ts b/src/app/products/collaterals/collaterals.resolver.ts index f97274ebd4..d032a690a7 100644 --- a/src/app/products/collaterals/collaterals.resolver.ts +++ b/src/app/products/collaterals/collaterals.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class CollateralsResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the All Collaterals Data diff --git a/src/app/products/collaterals/create-collateral/create-collateral.component.html b/src/app/products/collaterals/create-collateral/create-collateral.component.html index b4e8219924..825a50aff4 100644 --- a/src/app/products/collaterals/create-collateral/create-collateral.component.html +++ b/src/app/products/collaterals/create-collateral/create-collateral.component.html @@ -6,54 +6,68 @@ {{ 'labels.inputs.Name' | translate }} - - {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (collateralForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Type/Quality' | translate }} - - {{ 'labels.inputs.Type/Quality' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (collateralForm.controls.quality.hasError('required')) { + + {{ 'labels.inputs.Type/Quality' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Unit Type' | translate }} - - {{ 'labels.inputs.Unit Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (collateralForm.controls.unitType.hasError('required')) { + + {{ 'labels.inputs.Unit Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Base Price' | translate }} - - {{ 'labels.inputs.Base Price' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (collateralForm.controls.basePrice.hasError('required')) { + + {{ 'labels.inputs.Base Price' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Percentage to Base' | translate }} - - {{ 'labels.inputs.Percentage to Base' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (collateralForm.controls.pctToBase.hasError('required')) { + + {{ 'labels.inputs.Percentage to Base' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.heading.Currency' | translate }} - - {{ currency.name }} - + @for (currency of collateralTemplateData; track currency) { + + {{ currency.name }} + + } - - {{ 'labels.heading.Currency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (collateralForm.controls.currency.hasError('required')) { + + {{ 'labels.heading.Currency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/products/collaterals/create-collateral/create-collateral.component.ts b/src/app/products/collaterals/create-collateral/create-collateral.component.ts index beaa9dada4..1cfc66015b 100644 --- a/src/app/products/collaterals/create-collateral/create-collateral.component.ts +++ b/src/app/products/collaterals/create-collateral/create-collateral.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { OrganizationService } from 'app/organization/organization.service'; import { UntypedFormGroup, UntypedFormBuilder, FormControl, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -22,11 +22,21 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateCollateralComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private productsService = inject(ProductsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + private organizationService = inject(OrganizationService); + /** Collateral form */ collateralForm: UntypedFormGroup; /** Charges Template data */ collateralTemplateData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the collateral template data * @param {FormBuilder} formBuilder Form Builder @@ -35,14 +45,7 @@ export class CreateCollateralComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private productsService: ProductsService, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService, - private organizationService: OrganizationService - ) { + constructor() { this.route.data.subscribe((data: { collateralTemplate: any }) => { this.organizationService.getCurrencies().subscribe((orgCurrencies: any) => { let orgCurrencyList = Array.isArray(orgCurrencies.selectedCurrencyOptions) diff --git a/src/app/products/collaterals/edit-collateral/edit-collateral.component.html b/src/app/products/collaterals/edit-collateral/edit-collateral.component.html index 3191c47205..c88a684fa0 100644 --- a/src/app/products/collaterals/edit-collateral/edit-collateral.component.html +++ b/src/app/products/collaterals/edit-collateral/edit-collateral.component.html @@ -6,59 +6,73 @@ {{ 'labels.inputs.Name' | translate }} - - {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (collateralForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Type/Quality' | translate }} - - {{ 'labels.inputs.Type/Quality' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (collateralForm.controls.quality.hasError('required')) { + + {{ 'labels.inputs.Type/Quality' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Unit Type' | translate }} - - {{ 'labels.inputs.Unit Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (collateralForm.controls.unitType.hasError('required')) { + + {{ 'labels.inputs.Unit Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Base Price' | translate }} - - {{ 'labels.inputs.Base Price' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (collateralForm.controls.basePrice.hasError('required')) { + + {{ 'labels.inputs.Base Price' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Percentage to Base' | translate }} - - {{ 'labels.inputs.Percentage to Base' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (collateralForm.controls.pctToBase.hasError('required')) { + + {{ 'labels.inputs.Percentage to Base' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.heading.Currency' | translate }} - - {{ currency.name }} - + @for (currency of collateralTemplateData; track currency) { + + {{ currency.name }} + + } - - {{ 'labels.heading.Currency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (collateralForm.controls.currency.hasError('required')) { + + {{ 'labels.heading.Currency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/products/collaterals/edit-collateral/edit-collateral.component.ts b/src/app/products/collaterals/edit-collateral/edit-collateral.component.ts index ca2d71df73..929ca3740e 100644 --- a/src/app/products/collaterals/edit-collateral/edit-collateral.component.ts +++ b/src/app/products/collaterals/edit-collateral/edit-collateral.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -17,6 +17,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditCollateralComponent implements OnInit { + private productsService = inject(ProductsService); + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Colalteral Data */ collateralData: any; /** Collateral Template */ @@ -24,6 +30,9 @@ export class EditCollateralComponent implements OnInit { /** Collateral Form */ collateralForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Collateral Data from `resolve` * @param {ProductsService} productsService Products Service. @@ -32,13 +41,7 @@ export class EditCollateralComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service. */ - constructor( - private productsService: ProductsService, - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { collateral: any; collateralTemplate: any }) => { this.collateralData = data.collateral; this.collateralTemplateData = data.collateralTemplate; diff --git a/src/app/products/collaterals/view-collateral/view-collateral.component.ts b/src/app/products/collaterals/view-collateral/view-collateral.component.ts index 52e02bce65..1916c6b39b 100644 --- a/src/app/products/collaterals/view-collateral/view-collateral.component.ts +++ b/src/app/products/collaterals/view-collateral/view-collateral.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -24,9 +24,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewCollateralComponent { + private productsService = inject(ProductsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** Collateral Data */ collateralData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Collateral Data from 'resolve. * @param {ProductsService} productsService Products Service. @@ -35,13 +44,7 @@ export class ViewCollateralComponent { * @param {MatDialog} dialog Dialog reference. * @param {TranslateService} translateService Translate Service. */ - constructor( - private productsService: ProductsService, - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { collateral: any }) => { this.collateralData = data.collateral; }); diff --git a/src/app/products/deposit-product-incentive-form-dialog/deposit-product-incentive-form-dialog.component.html b/src/app/products/deposit-product-incentive-form-dialog/deposit-product-incentive-form-dialog.component.html index 25c14332c1..605994dd77 100644 --- a/src/app/products/deposit-product-incentive-form-dialog/deposit-product-incentive-form-dialog.component.html +++ b/src/app/products/deposit-product-incentive-form-dialog/deposit-product-incentive-form-dialog.component.html @@ -4,9 +4,11 @@ {{ title }} {{ 'labels.inputs.Attribute' | translate }} - - {{ attributeName.value }} - + @for (attributeName of attributeNameData; track attributeName) { + + {{ attributeName.value }} + + } {{ 'labels.inputs.Attribute' | translate }} {{ 'labels.commons.is' | translate }} @@ -17,9 +19,11 @@ {{ title }} {{ 'labels.inputs.Condition' | translate }} - - {{ conditionType.value }} - + @for (conditionType of conditionTypeData; track conditionType) { + + {{ conditionType.value }} + + } {{ 'labels.inputs.Condition' | translate }} {{ 'labels.commons.is' | translate }} @@ -27,32 +31,36 @@ {{ title }} - - {{ 'labels.inputs.Value' | translate }} - - - {{ attributeValue.name }} - - - - - {{ 'labels.inputs.Value' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (depositProductIncentiveForm.value.attributeName) { + + {{ 'labels.inputs.Value' | translate }} + @if (depositProductIncentiveForm.value.attributeName !== 3) { + + @for (attributeValue of attributeValueData; track attributeValue) { + + {{ attributeValue.name }} + + } + + } + @if (depositProductIncentiveForm.value.attributeName === 3) { + + } + + {{ 'labels.inputs.Value' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + } {{ 'labels.inputs.Type' | translate }} - - {{ incentiveType.value }} - + @for (incentiveType of incentiveTypeData; track incentiveType) { + + {{ incentiveType.value }} + + } {{ 'labels.inputs.Type' | translate }} {{ 'labels.commons.is' | translate }} diff --git a/src/app/products/deposit-product-incentive-form-dialog/deposit-product-incentive-form-dialog.component.ts b/src/app/products/deposit-product-incentive-form-dialog/deposit-product-incentive-form-dialog.component.ts index 409aa1d0c9..4f024198c9 100644 --- a/src/app/products/deposit-product-incentive-form-dialog/deposit-product-incentive-form-dialog.component.ts +++ b/src/app/products/deposit-product-incentive-form-dialog/deposit-product-incentive-form-dialog.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -26,6 +26,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DepositProductIncentiveFormDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + private formBuilder = inject(UntypedFormBuilder); + private translateService = inject(TranslateService); + layout: { addButtonText?: string; } = { @@ -42,12 +47,12 @@ export class DepositProductIncentiveFormDialogComponent implements OnInit { attributeValueData: any; incentiveTypeData: any; - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any, - private formBuilder: UntypedFormBuilder, - private translateService: TranslateService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { + const data = this.data; + this.createDepositProductIncentiveForm(); this.setConditionalControls(); this.layout = { ...this.layout, ...data.layout }; diff --git a/src/app/products/fixed-deposit-products/create-fixed-deposit-product/create-fixed-deposit-product.component.html b/src/app/products/fixed-deposit-products/create-fixed-deposit-product/create-fixed-deposit-product.component.html index 895db4a93a..9657b96d17 100644 --- a/src/app/products/fixed-deposit-products/create-fixed-deposit-product/create-fixed-deposit-product.component.html +++ b/src/app/products/fixed-deposit-products/create-fixed-deposit-product/create-fixed-deposit-product.component.html @@ -85,17 +85,18 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (fixedDepositProductFormValid) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/products/fixed-deposit-products/create-fixed-deposit-product/create-fixed-deposit-product.component.ts b/src/app/products/fixed-deposit-products/create-fixed-deposit-product/create-fixed-deposit-product.component.ts index b7b7fd1feb..cfbf2a754c 100644 --- a/src/app/products/fixed-deposit-products/create-fixed-deposit-product/create-fixed-deposit-product.component.ts +++ b/src/app/products/fixed-deposit-products/create-fixed-deposit-product/create-fixed-deposit-product.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Components */ @@ -42,6 +42,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateFixedDepositProductComponent { + private route = inject(ActivatedRoute); + private productsService = inject(ProductsService); + private router = inject(Router); + private settingsService = inject(SettingsService); + private accounting = inject(Accounting); + @ViewChild(FixedDepositProductDetailsStepComponent, { static: true }) fixedDepositProductDetailsStep: FixedDepositProductDetailsStepComponent; @ViewChild(FixedDepositProductCurrencyStepComponent, { static: true }) @@ -60,6 +66,9 @@ export class CreateFixedDepositProductComponent { fixedDepositProductsTemplate: any; accountingRuleData: string[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route. * @param {ProductsService} productsService Products Service. @@ -67,13 +76,7 @@ export class CreateFixedDepositProductComponent { * @param {SettingsService} settingsService Settings Service. */ - constructor( - private route: ActivatedRoute, - private productsService: ProductsService, - private router: Router, - private settingsService: SettingsService, - private accounting: Accounting - ) { + constructor() { this.route.data.subscribe((data: { fixedDepositProductsTemplate: any }) => { this.fixedDepositProductsTemplate = data.fixedDepositProductsTemplate; }); diff --git a/src/app/products/fixed-deposit-products/edit-fixed-deposit-product/edit-fixed-deposit-product.component.html b/src/app/products/fixed-deposit-products/edit-fixed-deposit-product/edit-fixed-deposit-product.component.html index f741c0d777..f0b50fa181 100644 --- a/src/app/products/fixed-deposit-products/edit-fixed-deposit-product/edit-fixed-deposit-product.component.html +++ b/src/app/products/fixed-deposit-products/edit-fixed-deposit-product/edit-fixed-deposit-product.component.html @@ -84,17 +84,18 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (fixedDepositProductFormValidAndNotPrinstine) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/products/fixed-deposit-products/edit-fixed-deposit-product/edit-fixed-deposit-product.component.ts b/src/app/products/fixed-deposit-products/edit-fixed-deposit-product/edit-fixed-deposit-product.component.ts index 1ba92c739c..d7c0b1ac8c 100644 --- a/src/app/products/fixed-deposit-products/edit-fixed-deposit-product/edit-fixed-deposit-product.component.ts +++ b/src/app/products/fixed-deposit-products/edit-fixed-deposit-product/edit-fixed-deposit-product.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Components */ @@ -42,6 +42,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditFixedDepositProductComponent { + private route = inject(ActivatedRoute); + private productsService = inject(ProductsService); + private router = inject(Router); + private settingsService = inject(SettingsService); + private accounting = inject(Accounting); + @ViewChild(FixedDepositProductDetailsStepComponent, { static: true }) fixedDepositProductDetailsStep: FixedDepositProductDetailsStepComponent; @ViewChild(FixedDepositProductCurrencyStepComponent, { static: true }) @@ -60,6 +66,9 @@ export class EditFixedDepositProductComponent { fixedDepositProductsTemplate: any; accountingRuleData: string[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route. * @param {ProductsService} productsService Products Service. @@ -67,13 +76,7 @@ export class EditFixedDepositProductComponent { * @param {SettingsService} settingsService Settings Service */ - constructor( - private route: ActivatedRoute, - private productsService: ProductsService, - private router: Router, - private settingsService: SettingsService, - private accounting: Accounting - ) { + constructor() { this.route.data.subscribe((data: { fixedDepositProductAndTemplate: any }) => { this.fixedDepositProductsTemplate = data.fixedDepositProductAndTemplate; }); diff --git a/src/app/products/fixed-deposit-products/edit-fixed-deposit-product/fixed-deposit-product-and-template.resolver.ts b/src/app/products/fixed-deposit-products/edit-fixed-deposit-product/fixed-deposit-product-and-template.resolver.ts index 480493a050..1032b8478c 100644 --- a/src/app/products/fixed-deposit-products/edit-fixed-deposit-product/fixed-deposit-product-and-template.resolver.ts +++ b/src/app/products/fixed-deposit-products/edit-fixed-deposit-product/fixed-deposit-product-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../../products.service'; */ @Injectable() export class FixedDepositProductAndTemplateResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the Fixed Deposits Product and Template. diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-accounting-step/fixed-deposit-product-accounting-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-accounting-step/fixed-deposit-product-accounting-step.component.html index 7a4ae8ff16..7d8d22f745 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-accounting-step/fixed-deposit-product-accounting-step.component.html +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-accounting-step/fixed-deposit-product-accounting-step.component.html @@ -4,291 +4,265 @@ class="flex-98 layout-row gap-5percent layout-lt-md-column radio-group-spacing" formControlName="accountingRule" > - - {{ 'labels.accounting.' + accountingRule | translate }} - + @for (accountingRule of accountingRuleData; track accountingRule; let i = $index) { + + {{ 'labels.accounting.' + accountingRule | translate }} + + } - - {{ 'labels.heading.Assets' | translate }} - - - - - - - - - - - - - {{ 'labels.heading.Liabilities' | translate }} - - - - - - - - - - - - - {{ 'labels.heading.Expenses' | translate }} - - - - - - - {{ 'labels.heading.Income' | translate }} - - - - - - - - - - {{ 'labels.heading.Advanced Accounting Rules' | translate }} - - - - - - - {{ 'labels.heading.Configure Fund Sources for Payment Channels' | translate }} - - - - - - {{ 'labels.buttons.Add' | translate }} - - - - + {{ 'labels.heading.Assets' | translate }} + + + @if (isAccrualAccounting()) { + - - {{ 'labels.heading.Payment Type' | translate }} - - {{ paymentFundSource.paymentTypeId | find: paymentTypeData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Fund Source' | translate }} - - {{ paymentFundSource.fundSourceAccountId | find: assetAccountData : 'id' : 'name' }} - - - - - {{ 'labels.buttons.Actions' | translate }} - - - - - - - - - - - - - - - - {{ 'labels.heading.Map Fees to Specific Income Accounts' | translate }} - - - - - {{ 'labels.buttons.Add' | translate }} - - - - + } + @if (isAccrualAccounting()) { + - - {{ 'labels.catalogs.Fees' | translate }} - - {{ feesIncome.chargeId | find: chargeData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ feesIncome.incomeAccountId | find: incomeAccountData : 'id' : 'name' }} - - - - - {{ 'labels.buttons.Actions' | translate }} - - - - - - - - - - - - - - - - - - {{ 'labels.catalogs.Penalties' | translate }} - {{ 'labels.heading.Map Penalties to Specific Income Accounts' | translate }} - - - - - - {{ 'labels.buttons.Add' | translate }} - - - - + } + + {{ 'labels.heading.Liabilities' | translate }} + + + + + @if (isAccrualAccounting()) { + - - {{ 'labels.inputs.Penalty' | translate }} - - {{ penaltyIncome.chargeId | find: penaltyData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ penaltyIncome.incomeAccountId | find: incomeAccountData : 'id' : 'name' }} - - - - - {{ 'labels.buttons.Actions' | translate }} - + + } + + {{ 'labels.heading.Expenses' | translate }} + + + + {{ 'labels.heading.Income' | translate }} + + + + + + {{ 'labels.heading.Advanced Accounting Rules' | translate }} + + @if (fixedDepositProductAccountingForm.value.advancedAccountingRules) { + + + + {{ 'labels.heading.Configure Fund Sources for Payment Channels' | translate }} + + - - - - + + {{ 'labels.buttons.Add' | translate }} - - - - - - - + + @if (paymentChannelToFundSourceMappings.value.length !== 0) { + + + {{ 'labels.heading.Payment Type' | translate }} + + {{ paymentFundSource.paymentTypeId | find: paymentTypeData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Fund Source' | translate }} + + {{ paymentFundSource.fundSourceAccountId | find: assetAccountData : 'id' : 'name' }} + + + + {{ 'labels.buttons.Actions' | translate }} + + + + + + + + + + + + + } + + @if (existCharges()) { + + {{ 'labels.heading.Map Fees to Specific Income Accounts' | translate }} + + + + {{ 'labels.buttons.Add' | translate }} + + + @if (feeToIncomeAccountMappings.value.length !== 0) { + + + {{ 'labels.catalogs.Fees' | translate }} + + {{ feesIncome.chargeId | find: chargeData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ feesIncome.incomeAccountId | find: incomeAccountData : 'id' : 'name' }} + + + + {{ 'labels.buttons.Actions' | translate }} + + + + + + + + + + + + + } + + } + @if (existCharges()) { + + + {{ 'labels.catalogs.Penalties' | translate }} + {{ 'labels.heading.Map Penalties to Specific Income Accounts' | translate }} + + + + + {{ 'labels.buttons.Add' | translate }} + + + @if (penaltyToIncomeAccountMappings.value.length !== 0) { + + + {{ 'labels.inputs.Penalty' | translate }} + + {{ penaltyIncome.chargeId | find: penaltyData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ penaltyIncome.incomeAccountId | find: incomeAccountData : 'id' : 'name' }} + + + + {{ 'labels.buttons.Actions' | translate }} + + + + + + + + + + + + + } + + } + + } - + } diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-accounting-step/fixed-deposit-product-accounting-step.component.ts b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-accounting-step/fixed-deposit-product-accounting-step.component.ts index bba7ccfaea..d6fbebe30a 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-accounting-step/fixed-deposit-product-accounting-step.component.ts +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-accounting-step/fixed-deposit-product-accounting-step.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormArray, UntypedFormBuilder, @@ -67,6 +67,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositProductAccountingStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + dialog = inject(MatDialog); + private accounting = inject(Accounting); + private translateService = inject(TranslateService); + @Input() fixedDepositProductsTemplate: any; @Input() accountingRuleData: any; @Input() fixedDepositProductFormValid: boolean; @@ -92,12 +97,10 @@ export class FixedDepositProductAccountingStepComponent implements OnInit { 'actions' ]; - constructor( - private formBuilder: UntypedFormBuilder, - public dialog: MatDialog, - private accounting: Accounting, - private translateService: TranslateService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createfixedDepositProductAccountingForm(); this.setConditionalControls(); } diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-charges-step/fixed-deposit-product-charges-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-charges-step/fixed-deposit-product-charges-step.component.html index f036c5fccd..f98a034459 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-charges-step/fixed-deposit-product-charges-step.component.html +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-charges-step/fixed-deposit-product-charges-step.component.html @@ -2,12 +2,11 @@ {{ 'labels.inputs.Charge' | translate }} - - {{ charge.name }} - + @for (charge of chargeData | chargesFilter: chargesDataSource : currencyCode.value; track charge) { + + {{ charge.name }} + + } diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-charges-step/fixed-deposit-product-charges-step.component.ts b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-charges-step/fixed-deposit-product-charges-step.component.ts index ce1416aae1..c12540489d 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-charges-step/fixed-deposit-product-charges-step.component.ts +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-charges-step/fixed-deposit-product-charges-step.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormControl } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; @@ -48,6 +48,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositProductChargesStepComponent implements OnInit { + dialog = inject(MatDialog); + private translateService = inject(TranslateService); + @Input() fixedDepositProductsTemplate: any; @Input() currencyCode: UntypedFormControl; @@ -62,10 +65,10 @@ export class FixedDepositProductChargesStepComponent implements OnInit { 'action' ]; - constructor( - public dialog: MatDialog, - private translateService: TranslateService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { this.chargeData = this.fixedDepositProductsTemplate.chargeOptions; diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.html index fe00ee1192..79a0e64f68 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.html +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.html @@ -3,9 +3,11 @@ {{ 'labels.inputs.Currency' | translate }} - - {{ currency.name }} - + @for (currency of currencyData; track currency) { + + {{ currency.name }} + + } {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.ts b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.ts index fdde5e9bdd..0c639e9a48 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.ts +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @@ -16,13 +16,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositProductCurrencyStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() fixedDepositProductsTemplate: any; fixedDepositProductCurrencyForm: UntypedFormGroup; currencyData: any; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createFixedDepositProductCurrencyForm(); } diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.html index 4948d4a22c..a55de800cd 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.html +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.html @@ -3,28 +3,34 @@ {{ 'labels.inputs.Product Name' | translate }} - - {{ 'labels.inputs.Product Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (fixedDepositProductDetailsForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Product Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Short Name' | translate }} - - {{ 'labels.inputs.Short Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (fixedDepositProductDetailsForm.controls.shortName.hasError('required')) { + + {{ 'labels.inputs.Short Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Description' | translate }} - - {{ 'labels.inputs.Description' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (fixedDepositProductDetailsForm.controls.description.hasError('required')) { + + {{ 'labels.inputs.Description' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.ts b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.ts index 2092b0df6b..c6bdabd127 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.ts +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @@ -16,11 +16,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositProductDetailsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() fixedDepositProductsTemplate: any; fixedDepositProductDetailsForm: UntypedFormGroup; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createFixedDepositProductDetailsForm(); } diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-interest-rate-chart-step/fixed-deposit-product-interest-rate-chart-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-interest-rate-chart-step/fixed-deposit-product-interest-rate-chart-step.component.html index 7a66dcef82..a7d490230f 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-interest-rate-chart-step/fixed-deposit-product-interest-rate-chart-step.component.html +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-interest-rate-chart-step/fixed-deposit-product-interest-rate-chart-step.component.html @@ -12,268 +12,263 @@ - - - - - - - - - - - - {{ 'labels.inputs.Name' | translate }} - - - - - {{ 'labels.inputs.Description' | translate }} - - - - - {{ 'labels.inputs.From Date' | translate }} - - - - - {{ 'labels.inputs.Valid from Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.End Date' | translate }} - - - - - - - - {{ 'labels.inputs.Is primary grouping by amount?' | translate }} - - - - - - - {{ 'labels.buttons.Add Slab' | translate }} - - - - - {{ 'labels.heading.It is required to add at least one Slab' | translate }} - - - - - {{ 'labels.inputs.Period' | translate }} - - {{ - chartSlab.fromPeriod + - ' - ' + - chartSlab.toPeriod + - ' ' + - (chartSlab.periodType | find: periodTypeData : 'id' : 'value') - }} - - - - - {{ 'labels.inputs.Amount Range' | translate }} - - {{ chartSlab.amountRangeFrom + ' - ' + chartSlab.amountRangeTo }} - - - - - {{ 'labels.inputs.Interest' | translate }} - {{ chartSlab.annualInterestRate }} % - - - - {{ 'labels.inputs.Description' | translate }} - - {{ chartSlab.description }} - - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - {{ 'labels.buttons.View Incentives' | translate }} - - - - {{ 'labels.buttons.Hide Incentives' | translate }} - - - - - - - + + + + - - - - {{ 'labels.heading.Incentives' | translate }} - - - - - - {{ 'labels.buttons.Add' | translate }} - - - - + + + + {{ 'labels.inputs.Name' | translate }} + + + + {{ 'labels.inputs.Description' | translate }} + + + + {{ 'labels.inputs.From Date' | translate }} + + + + + {{ 'labels.inputs.Valid from Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + + {{ 'labels.inputs.End Date' | translate }} + + + + + + + {{ 'labels.inputs.Is primary grouping by amount?' | translate }} + + + + + + {{ 'labels.buttons.Add Slab' | translate }} + + + @if (chart.value.chartSlabs.length === 0) { + + {{ 'labels.heading.It is required to add at least one Slab' | translate }} + + } + @if (chart.value.chartSlabs.length !== 0) { + + + {{ 'labels.inputs.Period' | translate }} + + {{ + chartSlab.fromPeriod + + ' - ' + + chartSlab.toPeriod + + ' ' + + (chartSlab.periodType | find: periodTypeData : 'id' : 'value') + }} + + + + {{ 'labels.inputs.Amount Range' | translate }} + + {{ chartSlab.amountRangeFrom + ' - ' + chartSlab.amountRangeTo }} + + + + {{ 'labels.inputs.Interest' | translate }} + {{ chartSlab.annualInterestRate }} % + + + {{ 'labels.inputs.Description' | translate }} + + {{ chartSlab.description }} + + + + {{ 'labels.inputs.Actions' | translate }} + + - - {{ 'labels.inputs.Entity Type' | translate }} - - {{ incentive.entityType | find: entityTypeData : 'id' : 'value' }} - - - - - {{ 'labels.inputs.Attribute Name' | translate }} - - {{ incentive.attributeName | find: attributeNameData : 'id' : 'value' }} - - - - - {{ 'labels.inputs.Condition Type' | translate }} - - {{ incentive.conditionType | find: conditionTypeData : 'id' : 'value' }} - - - - - {{ 'labels.inputs.Attribute Value' | translate }} - - {{ incentive.attributeValue | find: genderData : 'id' : 'name' }} - {{ incentive.attributeValue }} - {{ - incentive.attributeValue | find: clientTypeData : 'id' : 'name' - }} - {{ - incentive.attributeValue | find: clientClassificationData : 'id' : 'name' - }} - - - - - {{ 'labels.inputs.Incentive Type' | translate }} - - {{ incentive.incentiveType | find: incentiveTypeData : 'id' : 'value' }} - - - - - {{ 'labels.inputs.Interest' | translate }} - - {{ incentive.amount }} - - - - - {{ 'labels.inputs.Actions' | translate }} - + + + + + + + @if (expandChartSlabIndex[chartIndex] !== chartSlabIndex) { + + + {{ 'labels.buttons.View Incentives' | translate }} + + } + @if (expandChartSlabIndex[chartIndex] === chartSlabIndex) { + + + {{ 'labels.buttons.Hide Incentives' | translate }} + + } + + + + + + + + + {{ 'labels.heading.Incentives' | translate }} + + - + + {{ 'labels.buttons.Add' | translate }} - - - - - - - - - - - - - - - - - - + + @if (chartSlab.incentives.length) { + + + {{ 'labels.inputs.Entity Type' | translate }} + + {{ incentive.entityType | find: entityTypeData : 'id' : 'value' }} + + + + {{ 'labels.inputs.Attribute Name' | translate }} + + {{ incentive.attributeName | find: attributeNameData : 'id' : 'value' }} + + + + {{ 'labels.inputs.Condition Type' | translate }} + + {{ incentive.conditionType | find: conditionTypeData : 'id' : 'value' }} + + + + {{ 'labels.inputs.Attribute Value' | translate }} + + @switch (incentive.attributeName) { + @case (2) { + {{ incentive.attributeValue | find: genderData : 'id' : 'name' }} + } + @case (3) { + {{ incentive.attributeValue }} + } + @case (4) { + {{ incentive.attributeValue | find: clientTypeData : 'id' : 'name' }} + } + @case (5) { + {{ + incentive.attributeValue | find: clientClassificationData : 'id' : 'name' + }} + } + } + + + + {{ 'labels.inputs.Incentive Type' | translate }} + + {{ incentive.incentiveType | find: incentiveTypeData : 'id' : 'value' }} + + + + {{ 'labels.inputs.Interest' | translate }} + + {{ incentive.amount }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } + + + + + + + + + } + - + } diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-interest-rate-chart-step/fixed-deposit-product-interest-rate-chart-step.component.ts b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-interest-rate-chart-step/fixed-deposit-product-interest-rate-chart-step.component.ts index a23aefb2d2..f7d62a27c1 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-interest-rate-chart-step/fixed-deposit-product-interest-rate-chart-step.component.ts +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-interest-rate-chart-step/fixed-deposit-product-interest-rate-chart-step.component.ts @@ -1,6 +1,6 @@ /** Angular Imports */ import { animate, state, style, transition, trigger } from '@angular/animations'; -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormArray, UntypedFormBuilder, @@ -27,7 +27,7 @@ import { SettingsService } from 'app/settings/settings.service'; import { MatTooltip } from '@angular/material/tooltip'; import { MatButton, MatIconButton } from '@angular/material/button'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; -import { NgFor, NgIf, NgSwitch, NgSwitchCase } from '@angular/common'; + import { MatDivider } from '@angular/material/divider'; import { MatCheckbox } from '@angular/material/checkbox'; import { @@ -70,8 +70,6 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; MatHeaderCell, MatCellDef, MatCell, - NgSwitch, - NgSwitchCase, MatHeaderRowDef, MatHeaderRow, MatRowDef, @@ -82,6 +80,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositProductInterestRateChartStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + dialog = inject(MatDialog); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + private translateService = inject(TranslateService); + @Input() fixedDepositProductsTemplate: any; fixedDepositProductInterestRateChartForm: UntypedFormGroup; @@ -114,6 +118,9 @@ export class FixedDepositProductInterestRateChartStepComponent implements OnInit chartDetailData: any = []; chartsDetail: any[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {MatDialog} dialog Dialog reference. @@ -121,13 +128,7 @@ export class FixedDepositProductInterestRateChartStepComponent implements OnInit * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - public dialog: MatDialog, - private dateUtils: Dates, - private settingsService: SettingsService, - private translateService: TranslateService - ) { + constructor() { this.createFixedDepositProductInterestRateChartForm(); } diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-preview-step/fixed-deposit-product-preview-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-preview-step/fixed-deposit-product-preview-step.component.html index d35286e436..9367fef718 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-preview-step/fixed-deposit-product-preview-step.component.html +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-preview-step/fixed-deposit-product-preview-step.component.html @@ -10,10 +10,12 @@ {{ 'labels.inputs.Details' | translate }} {{ fixedDepositProduct.shortName }} - - {{ 'labels.inputs.Description' | translate }}: - {{ fixedDepositProduct.description }} - + @if (fixedDepositProduct.description) { + + {{ 'labels.inputs.Description' | translate }}: + {{ fixedDepositProduct.description }} + + } {{ 'labels.inputs.Currency' | translate }} @@ -89,15 +91,17 @@ {{ 'labels.heading.Terms' | translate }} {{ 'labels.heading.Settings' | translate }} - - {{ 'labels.inputs.Lock-in Period' | translate }}: - {{ - fixedDepositProduct.lockinPeriodFrequency + - ' ' + - (fixedDepositProduct.lockinPeriodFrequencyType - | find: fixedDepositProductsTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value') - }} - + @if (fixedDepositProduct.lockinPeriodFrequency) { + + {{ 'labels.inputs.Lock-in Period' | translate }}: + {{ + fixedDepositProduct.lockinPeriodFrequency + + ' ' + + (fixedDepositProduct.lockinPeriodFrequencyType + | find: fixedDepositProductsTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value') + }} + + } {{ 'labels.inputs.Minimum Deposit Term' | translate }}: @@ -109,407 +113,405 @@ {{ 'labels.heading.Settings' | translate }} }} - - {{ 'labels.inputs.And thereafter, in Multiples of' | translate }}: - {{ - fixedDepositProduct.inMultiplesOfDepositTerm + - ' ' + - (fixedDepositProduct.inMultiplesOfDepositTermTypeId - | find: fixedDepositProductsTemplate.periodFrequencyTypeOptions : 'id' : 'value') - }} - - - - {{ 'labels.inputs.Maximum Deposit Term' | translate }}: - {{ - fixedDepositProduct.maxDepositTerm + - ' ' + - (fixedDepositProduct.maxDepositTermTypeId - | find: fixedDepositProductsTemplate.periodFrequencyTypeOptions : 'id' : 'value') - }} - + @if (fixedDepositProduct.inMultiplesOfDepositTerm) { + + {{ 'labels.inputs.And thereafter, in Multiples of' | translate }}: + {{ + fixedDepositProduct.inMultiplesOfDepositTerm + + ' ' + + (fixedDepositProduct.inMultiplesOfDepositTermTypeId + | find: fixedDepositProductsTemplate.periodFrequencyTypeOptions : 'id' : 'value') + }} + + } + + @if (fixedDepositProduct.maxDepositTerm) { + + {{ 'labels.inputs.Maximum Deposit Term' | translate }}: + {{ + fixedDepositProduct.maxDepositTerm + + ' ' + + (fixedDepositProduct.maxDepositTermTypeId + | find: fixedDepositProductsTemplate.periodFrequencyTypeOptions : 'id' : 'value') + }} + + } {{ 'labels.inputs.Apply Penal Interest (less)' | translate }}: {{ fixedDepositProduct.preClosurePenalApplicable | yesNo }} - - {{ 'labels.inputs.Penal Interest' | translate }} (%): - {{ - fixedDepositProduct.preClosurePenalInterest + - '% (' + - (fixedDepositProduct.preClosurePenalInterestOnTypeId - | find: fixedDepositProductsTemplate.preClosurePenalInterestOnTypeOptions : 'id' : 'value') + - ')' - }} - + @if (fixedDepositProduct.preClosurePenalApplicable) { + + {{ 'labels.inputs.Penal Interest' | translate }} (%): + {{ + fixedDepositProduct.preClosurePenalInterest + + '% (' + + (fixedDepositProduct.preClosurePenalInterestOnTypeId + | find: fixedDepositProductsTemplate.preClosurePenalInterestOnTypeOptions : 'id' : 'value') + + ')' + }} + + } {{ 'labels.inputs.Withhold Tax is Applicable' | translate }}: {{ fixedDepositProduct.withHoldTax | yesNo }} - - {{ 'labels.inputs.Tax Group' | translate }}: - {{ - fixedDepositProduct.taxGroupId | find: fixedDepositProductsTemplate.taxGroupOptions : 'id' : 'name' - }} - - - - {{ 'labels.heading.Interest Rate Charts' | translate }} - - - - - {{ 'labels.inputs.Name' | translate }}: - {{ chart.name }} - - - - {{ 'labels.inputs.Description' | translate }}: - {{ chart.description }} - - - - {{ 'labels.inputs.From Date' | translate }}: - {{ chart.fromDate | dateFormat }} - - - - {{ 'labels.inputs.End Date' | translate }}: - {{ chart.endDate | dateFormat }} - - - - {{ 'labels.inputs.Primary Grouping by Amount' | translate }}: - {{ fixedDepositProduct.isPrimaryGroupingByAmount | yesNo }} - - - - - {{ 'labels.inputs.Period' | translate }} - - {{ - chartSlab.fromPeriod + - ' - ' + - chartSlab.toPeriod + - ' ' + - (chartSlab.periodType | find: fixedDepositProductsTemplate.chartTemplate.periodTypes : 'id' : 'value') - }} - - - - - {{ 'labels.inputs.Amount Range' | translate }} - - {{ chartSlab.amountRangeFrom + ' - ' + chartSlab.amountRangeTo }} - - - - - {{ 'labels.inputs.Interest' | translate }} - - {{ chartSlab.annualInterestRate }} - - - - - {{ 'labels.inputs.Description' | translate }} - - {{ chartSlab.description }} - - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - {{ 'labels.buttons.View Incentives' | translate }} - - - - {{ 'labels.buttons.Hide Incentives' | translate }} - - - - - - - - - - - {{ 'labels.heading.Incentives' | translate }} - - - - - {{ 'labels.inputs.Entity Type' | translate }} - - {{ - incentive.entityType - | find: fixedDepositProductsTemplate.chartTemplate.entityTypeOptions : 'id' : 'value' - }} - - - - - {{ 'labels.inputs.Attribute Name' | translate }} - - {{ - incentive.attributeName - | find: fixedDepositProductsTemplate.chartTemplate.attributeNameOptions : 'id' : 'value' - }} - - - - - {{ 'labels.inputs.Condition Type' | translate }} - - {{ - incentive.conditionType - | find: fixedDepositProductsTemplate.chartTemplate.conditionTypeOptions : 'id' : 'value' - }} - - - - - {{ 'labels.inputs.Attribute Value' | translate }} - - {{ - incentive.attributeValue - | find: fixedDepositProductsTemplate.chartTemplate.genderOptions : 'id' : 'name' - }} - {{ incentive.attributeValue }} - {{ - incentive.attributeValue - | find: fixedDepositProductsTemplate.chartTemplate.clientTypeOptions : 'id' : 'name' - }} - {{ - incentive.attributeValue - | find: fixedDepositProductsTemplate.chartTemplate.clientClassificationOptions : 'id' : 'name' - }} - - - - - {{ 'labels.inputs.Incentive Type' | translate }} - - {{ - incentive.incentiveType - | find: fixedDepositProductsTemplate.chartTemplate.incentiveTypeOptions : 'id' : 'value' - }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ incentive.amount | formatNumber }} - - - - - - - - - - - - - - - + @if (fixedDepositProduct.withHoldTax) { + + {{ 'labels.inputs.Tax Group' | translate }}: + {{ + fixedDepositProduct.taxGroupId | find: fixedDepositProductsTemplate.taxGroupOptions : 'id' : 'name' + }} + + } + @if (fixedDepositProduct.charts.length !== 0) { + + {{ 'labels.heading.Interest Rate Charts' | translate }} + @for (chart of fixedDepositProduct.charts; track chart; let chartIndex = $index) { + + @if (chart.name) { + + {{ 'labels.inputs.Name' | translate }}: + {{ chart.name }} + + } + @if (chart.description) { + + {{ 'labels.inputs.Description' | translate }}: + {{ chart.description }} + + } + + {{ 'labels.inputs.From Date' | translate }}: + {{ chart.fromDate | dateFormat }} + + @if (chart.endDate) { + + {{ 'labels.inputs.End Date' | translate }}: + {{ chart.endDate | dateFormat }} + + } + + {{ 'labels.inputs.Primary Grouping by Amount' | translate }}: + {{ fixedDepositProduct.isPrimaryGroupingByAmount | yesNo }} + + @if (chart.chartSlabs.length !== 0) { + + + {{ 'labels.inputs.Period' | translate }} + + {{ + chartSlab.fromPeriod + + ' - ' + + chartSlab.toPeriod + + ' ' + + (chartSlab.periodType + | find: fixedDepositProductsTemplate.chartTemplate.periodTypes : 'id' : 'value') + }} + + + + {{ 'labels.inputs.Amount Range' | translate }} + + {{ chartSlab.amountRangeFrom + ' - ' + chartSlab.amountRangeTo }} + + + + {{ 'labels.inputs.Interest' | translate }} + + {{ chartSlab.annualInterestRate }} + + + + {{ 'labels.inputs.Description' | translate }} + + {{ chartSlab.description }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + @if (expandChartSlabIndex[chartIndex] !== chartSlabIndex) { + + + {{ 'labels.buttons.View Incentives' | translate }} + + } + @if (expandChartSlabIndex[chartIndex] === chartSlabIndex) { + + + {{ 'labels.buttons.Hide Incentives' | translate }} + + } + + + + + + + + + {{ 'labels.heading.Incentives' | translate }} + + + + {{ 'labels.inputs.Entity Type' | translate }} + + {{ + incentive.entityType + | find: fixedDepositProductsTemplate.chartTemplate.entityTypeOptions : 'id' : 'value' + }} + + + + {{ 'labels.inputs.Attribute Name' | translate }} + + {{ + incentive.attributeName + | find: fixedDepositProductsTemplate.chartTemplate.attributeNameOptions : 'id' : 'value' + }} + + + + {{ 'labels.inputs.Condition Type' | translate }} + + {{ + incentive.conditionType + | find: fixedDepositProductsTemplate.chartTemplate.conditionTypeOptions : 'id' : 'value' + }} + + + + {{ 'labels.inputs.Attribute Value' | translate }} + + @switch (incentive.attributeName) { + @case (2) { + {{ + incentive.attributeValue + | find: fixedDepositProductsTemplate.chartTemplate.genderOptions : 'id' : 'name' + }} + } + @case (3) { + {{ incentive.attributeValue }} + } + @case (4) { + {{ + incentive.attributeValue + | find: fixedDepositProductsTemplate.chartTemplate.clientTypeOptions : 'id' : 'name' + }} + } + @case (5) { + {{ + incentive.attributeValue + | find + : fixedDepositProductsTemplate.chartTemplate.clientClassificationOptions + : 'id' + : 'name' + }} + } + } + + + + {{ 'labels.inputs.Incentive Type' | translate }} + + {{ + incentive.incentiveType + | find: fixedDepositProductsTemplate.chartTemplate.incentiveTypeOptions : 'id' : 'value' + }} + + + + {{ 'labels.inputs.Amount' | translate }} + + {{ incentive.amount | formatNumber }} + + + + + + + + + + + + + + } + + + } - - - - {{ 'labels.heading.Charges' | translate }} - - - - - {{ 'labels.inputs.Name' | translate }} - - {{ charge.name + ', ' + charge.currency.displaySymbol }} - - - - - {{ 'labels.inputs.Type' | translate }} - - {{ charge.chargeCalculationType.value }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ charge.amount }} - - + } - - {{ 'labels.inputs.Collected On' | translate }} - - {{ charge.chargeTimeType.value }} - - - - - - - - - {{ 'labels.heading.Accounting' | translate }} - - - - - - - {{ 'labels.heading.Advanced Accounting Rules' | translate }} - - - - {{ 'labels.heading.Fund Sources for Payment Channels' | translate }} - - - {{ 'labels.inputs.Payment Type' | translate }} - - {{ - paymentFundSource.paymentTypeId | find: fixedDepositProductsTemplate.paymentTypeOptions : 'id' : 'name' - }} + @if (fixedDepositProduct.charges.length) { + + {{ 'labels.heading.Charges' | translate }} + + + + {{ 'labels.inputs.Name' | translate }} + + {{ charge.name + ', ' + charge.currency.displaySymbol }} - - - {{ 'labels.inputs.Fund Source' | translate }} - - {{ - paymentFundSource.fundSourceAccountId - | find: fixedDepositProductsTemplate.accountingMappingOptions.assetAccountOptions : 'id' : 'name' - }} + + {{ 'labels.inputs.Type' | translate }} + + {{ charge.chargeCalculationType.value }} - - - - - - - - {{ 'labels.heading.Fees to Specific Income Accounts' | translate }} - - - - {{ 'labels.inputs.Fees' | translate }} - - {{ feesIncome.chargeId | find: fixedDepositProductsTemplate.chargeOptions : 'id' : 'name' }} + + {{ 'labels.inputs.Amount' | translate }} + + {{ charge.amount }} - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ - feesIncome.incomeAccountId - | find: fixedDepositProductsTemplate.accountingMappingOptions.incomeAccountOptions : 'id' : 'name' - }} + + {{ 'labels.inputs.Collected On' | translate }} + + {{ charge.chargeTimeType.value }} - - - + + + } - - {{ 'labels.heading.Penalties to Specific Income Accounts' | translate }} - - - - {{ 'labels.inputs.Penalty' | translate }} - - {{ penaltyIncome.chargeId | find: fixedDepositProductsTemplate.penaltyOptions : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ - penaltyIncome.incomeAccountId - | find: fixedDepositProductsTemplate.accountingMappingOptions.incomeAccountOptions : 'id' : 'name' - }} - - + {{ 'labels.heading.Accounting' | translate }} - - - + + @if (!isNoneAccounting()) { + + + } + + @if ( + fixedDepositProduct.advancedAccountingRules && + (fixedDepositProduct.paymentChannelToFundSourceMappings?.length || + fixedDepositProduct.feeToIncomeAccountMappings?.length || + fixedDepositProduct.penaltyToIncomeAccountMappings?.length) + ) { + + {{ 'labels.heading.Advanced Accounting Rules' | translate }} + + @if (fixedDepositProduct.paymentChannelToFundSourceMappings?.length) { + + {{ 'labels.heading.Fund Sources for Payment Channels' | translate }} + + + {{ 'labels.inputs.Payment Type' | translate }} + + {{ + paymentFundSource.paymentTypeId + | find: fixedDepositProductsTemplate.paymentTypeOptions : 'id' : 'name' + }} + + + + {{ 'labels.inputs.Fund Source' | translate }} + + {{ + paymentFundSource.fundSourceAccountId + | find: fixedDepositProductsTemplate.accountingMappingOptions.assetAccountOptions : 'id' : 'name' + }} + + + + + + + } + @if (fixedDepositProduct.feeToIncomeAccountMappings?.length) { + + {{ 'labels.heading.Fees to Specific Income Accounts' | translate }} + + + {{ 'labels.inputs.Fees' | translate }} + + {{ feesIncome.chargeId | find: fixedDepositProductsTemplate.chargeOptions : 'id' : 'name' }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ + feesIncome.incomeAccountId + | find: fixedDepositProductsTemplate.accountingMappingOptions.incomeAccountOptions : 'id' : 'name' + }} + + + + + + + } + @if (fixedDepositProduct.penaltyToIncomeAccountMappings?.length) { + + {{ 'labels.heading.Penalties to Specific Income Accounts' | translate }} + + + {{ 'labels.inputs.Penalty' | translate }} + + {{ penaltyIncome.chargeId | find: fixedDepositProductsTemplate.penaltyOptions : 'id' : 'name' }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ + penaltyIncome.incomeAccountId + | find: fixedDepositProductsTemplate.accountingMappingOptions.incomeAccountOptions : 'id' : 'name' + }} + + + + + + + } - + } diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-preview-step/fixed-deposit-product-preview-step.component.ts b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-preview-step/fixed-deposit-product-preview-step.component.ts index cc197ab607..03b5c462cc 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-preview-step/fixed-deposit-product-preview-step.component.ts +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-preview-step/fixed-deposit-product-preview-step.component.ts @@ -1,9 +1,9 @@ -import { Component, OnInit, Input, Output, EventEmitter, SimpleChanges, OnChanges } from '@angular/core'; +import { Component, OnInit, Input, Output, EventEmitter, SimpleChanges, OnChanges, inject } from '@angular/core'; import { trigger, state, transition, animate, style } from '@angular/animations'; import { Accounting } from 'app/core/utils/accounting'; import { OptionData } from 'app/shared/models/option-data.model'; import { MatDivider } from '@angular/material/divider'; -import { NgIf, NgFor, NgSwitch, NgSwitchCase } from '@angular/common'; + import { MatTable, MatColumnDef, @@ -46,8 +46,6 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; MatCellDef, MatCell, FaIconComponent, - NgSwitch, - NgSwitchCase, MatHeaderRowDef, MatHeaderRow, MatRowDef, @@ -61,6 +59,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositProductPreviewStepComponent implements OnInit, OnChanges { + private accounting = inject(Accounting); + @Input() fixedDepositProductsTemplate: any; @Input() chartSlabsDisplayedColumns: any[]; @Input() accountingRuleData: any; @@ -96,7 +96,10 @@ export class FixedDepositProductPreviewStepComponent implements OnInit, OnChange accountingMappings: any = {}; accountingRule: OptionData; - constructor(private accounting: Accounting) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { this.setCurrentValues(); diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-settings-step/fixed-deposit-product-settings-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-settings-step/fixed-deposit-product-settings-step.component.html index b851dae1b4..09817f818b 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-settings-step/fixed-deposit-product-settings-step.component.html +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-settings-step/fixed-deposit-product-settings-step.component.html @@ -16,12 +16,11 @@ {{ 'labels.inputs.Type' | translate }} - - {{ lockinPeriodFrequencyType.value }} - + @for (lockinPeriodFrequencyType of lockinPeriodFrequencyTypeData; track lockinPeriodFrequencyType) { + + {{ lockinPeriodFrequencyType.value }} + + } @@ -42,9 +41,11 @@ {{ 'labels.inputs.Frequency Type' | translate }} - - {{ periodFrequencyType.value }} - + @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { + + {{ periodFrequencyType.value }} + + } {{ 'labels.inputs.Minimum Deposit Term Frequency Type' | translate }} {{ 'labels.commons.is' | translate }} @@ -68,9 +69,11 @@ {{ 'labels.inputs.Type' | translate }} - - {{ periodFrequencyType.value }} - + @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { + + {{ periodFrequencyType.value }} + + } @@ -87,9 +90,11 @@ {{ 'labels.inputs.Type' | translate }} - - {{ periodFrequencyType.value }} - + @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { + + {{ periodFrequencyType.value }} + + } @@ -115,12 +120,11 @@ {{ 'labels.inputs.Period' | translate }} - - {{ preClosurePenalInterestOnType.value }} - + @for (preClosurePenalInterestOnType of preClosurePenalInterestOnTypeData; track preClosurePenalInterestOnType) { + + {{ preClosurePenalInterestOnType.value }} + + } @@ -135,18 +139,22 @@ {{ 'labels.inputs.Is Withhold Tax Applicable' | translate }} - - {{ 'labels.inputs.Tax Group' | translate }} - - - {{ taxGroup.name }} - - - - {{ 'labels.inputs.Tax Group' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (fixedDepositProductSettingsForm.value.withHoldTax) { + + {{ 'labels.inputs.Tax Group' | translate }} + + @for (taxGroup of taxGroupData; track taxGroup) { + + {{ taxGroup.name }} + + } + + + {{ 'labels.inputs.Tax Group' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + } diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-settings-step/fixed-deposit-product-settings-step.component.ts b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-settings-step/fixed-deposit-product-settings-step.component.ts index 647b4a35e7..307926840c 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-settings-step/fixed-deposit-product-settings-step.component.ts +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-settings-step/fixed-deposit-product-settings-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -28,6 +28,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositProductSettingsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() fixedDepositProductsTemplate: any; fixedDepositProductSettingsForm: UntypedFormGroup; @@ -37,7 +39,10 @@ export class FixedDepositProductSettingsStepComponent implements OnInit { preClosurePenalInterestOnTypeData: any; taxGroupData: any; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createFixedDepositProductSettingsForm(); this.setConditionalControls(); } diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.html index c60d0a5ad8..50e43ead8f 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.html +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.html @@ -47,12 +47,11 @@ {{ 'labels.inputs.Deposit Amount' | translate }} matTooltip="{{ 'tooltips.The period at which interest rate' | translate }}" required > - - {{ interestCompoundingPeriodType.value }} - + @for (interestCompoundingPeriodType of interestCompoundingPeriodTypeData; track interestCompoundingPeriodType) { + + {{ interestCompoundingPeriodType.value }} + + } {{ 'labels.inputs.Interest Compounding Period' | translate }} {{ 'labels.commons.is' | translate }} @@ -67,12 +66,11 @@ {{ 'labels.inputs.Deposit Amount' | translate }} matTooltip="{{ 'tooltips.The period at which interest rate is posted or credited' | translate }}" required > - - {{ interestPostingPeriodType.value }} - + @for (interestPostingPeriodType of interestPostingPeriodTypeData; track interestPostingPeriodType) { + + {{ interestPostingPeriodType.value }} + + } {{ 'labels.inputs.Interest Posting Period' | translate }} {{ 'labels.commons.is' | translate }} @@ -87,12 +85,11 @@ {{ 'labels.inputs.Deposit Amount' | translate }} matTooltip="{{ 'tooltips.The method used to calculate interest' | translate }}" required > - - {{ interestCalculationType.value }} - + @for (interestCalculationType of interestCalculationTypeData; track interestCalculationType) { + + {{ interestCalculationType.value }} + + } {{ 'labels.inputs.Interest Calculated using' | translate }} {{ 'labels.commons.is' | translate }} @@ -107,12 +104,14 @@ {{ 'labels.inputs.Deposit Amount' | translate }} matTooltip="{{ 'tooltips.The setting for number of days' | translate }}" required > - - {{ interestCalculationDaysInYearType.value }} - + @for ( + interestCalculationDaysInYearType of interestCalculationDaysInYearTypeData; + track interestCalculationDaysInYearType + ) { + + {{ interestCalculationDaysInYearType.value }} + + } {{ 'labels.inputs.Days in Year' | translate }} {{ 'labels.commons.is' | translate }} diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.ts b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.ts index 476c7cf87c..0432025a95 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.ts +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatTooltip } from '@angular/material/tooltip'; import { MatDivider } from '@angular/material/divider'; @@ -20,6 +20,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositProductTermsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() fixedDepositProductsTemplate: any; fixedDepositProductTermsForm: UntypedFormGroup; @@ -29,7 +31,10 @@ export class FixedDepositProductTermsStepComponent implements OnInit { interestCalculationTypeData: any; interestCalculationDaysInYearTypeData: any; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createFixedDepositProductTermsForm(); } diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product.resolver.ts b/src/app/products/fixed-deposit-products/fixed-deposit-product.resolver.ts index 3273b2fe3d..109d8763d1 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product.resolver.ts +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class FixedDepositProductResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the fixed deposit product data. diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-products-template.resolver.ts b/src/app/products/fixed-deposit-products/fixed-deposit-products-template.resolver.ts index 9a758362fb..0e2eba1b7b 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-products-template.resolver.ts +++ b/src/app/products/fixed-deposit-products/fixed-deposit-products-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -9,7 +9,12 @@ import { ProductsService } from '../products.service'; @Injectable() export class FixedDepositProductsTemplateResolver { - constructor(private productsService: ProductsService) {} + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} /** * Returns the fixed deposit products template data. diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-products.component.ts b/src/app/products/fixed-deposit-products/fixed-deposit-products.component.ts index 9ac73e42d8..d7f2da60d3 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-products.component.ts +++ b/src/app/products/fixed-deposit-products/fixed-deposit-products.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -52,6 +52,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositProductsComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Fixed deposit products data. */ fixedDepositProductData: any; /** Columns to be displayed in fixed deposit products table. */ @@ -76,6 +81,9 @@ export class FixedDepositProductsComponent implements OnInit, AfterViewInit { /* Template for popover on fixed deposit products table */ @ViewChild('templateFixedProductsTable') templateFixedProductsTable: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the fixed deposit products data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -83,12 +91,7 @@ export class FixedDepositProductsComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { fixedDepositProducts: any }) => { this.fixedDepositProductData = data.fixedDepositProducts; }); diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-products.resolver.ts b/src/app/products/fixed-deposit-products/fixed-deposit-products.resolver.ts index 312a5f7419..c87d0cfd52 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-products.resolver.ts +++ b/src/app/products/fixed-deposit-products/fixed-deposit-products.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class FixedDepositProductsResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the fixed deposit products data. diff --git a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-datatable-tab/fixed-deposit-datatable-tab.component.ts b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-datatable-tab/fixed-deposit-datatable-tab.component.ts index a08c4f857d..ed92104fa6 100644 --- a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-datatable-tab/fixed-deposit-datatable-tab.component.ts +++ b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-datatable-tab/fixed-deposit-datatable-tab.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { EntityDatatableTabComponent } from '../../../../shared/tabs/entity-datatable-tab/entity-datatable-tab.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -13,11 +13,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositDatatableTabComponent { + private route = inject(ActivatedRoute); + entityId: string; entityDatatable: any; multiRowDatatableFlag: boolean; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.entityId = this.route.parent.parent.snapshot.paramMap.get('productId'); this.route.data.subscribe((data: { fixedDepositDatatable: any }) => { diff --git a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.html b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.html index dac0a3e913..4e4ed735a5 100644 --- a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.html +++ b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.html @@ -21,10 +21,12 @@ {{ 'labels.inputs.Details' | translate }} {{ fixedDepositProductData.shortName }} - - {{ 'labels.inputs.Description' | translate }}: - {{ fixedDepositProductData.description }} - + @if (fixedDepositProductData.description) { + + {{ 'labels.inputs.Description' | translate }}: + {{ fixedDepositProductData.description }} + + } {{ 'labels.inputs.Currency' | translate }} @@ -91,300 +93,332 @@ {{ 'labels.heading.Settings' | translate }} - - {{ 'labels.inputs.Lock-in Period' | translate }}: - - {{ fixedDepositProductData.lockinPeriodFrequency }} - {{ fixedDepositProductData.lockinPeriodFrequencyType.value }} - - - - {{ 'labels.inputs.Minimum Deposit Term' | translate }}: - {{ fixedDepositProductData.minDepositTerm }} - - {{ fixedDepositProductData.minDepositTermType.value }} - - - - {{ 'labels.inputs.Maximum Deposit Term' | translate }}: - {{ fixedDepositProductData.maxDepositTerm }} - - {{ fixedDepositProductData.maxDepositTermType.value }} - - - - {{ 'labels.inputs.Deposit Term In multiple of' | translate }}: - {{ fixedDepositProductData.inMultiplesOfDepositTerm }} - - - {{ fixedDepositProductData.inMultiplesOfDepositTermType.value }} - + @if (fixedDepositProductData.lockinPeriodFrequency) { + + {{ 'labels.inputs.Lock-in Period' | translate }}: + + {{ fixedDepositProductData.lockinPeriodFrequency }} + {{ fixedDepositProductData.lockinPeriodFrequencyType.value }} + + } + + @if (fixedDepositProductData.minDepositTerm) { + + {{ 'labels.inputs.Minimum Deposit Term' | translate }}: + @if (fixedDepositProductData.minDepositTerm !== undefined) { + {{ fixedDepositProductData.minDepositTerm }} + + {{ fixedDepositProductData.minDepositTermType.value }} + } + + } + + @if (fixedDepositProductData.maxDepositTerm) { + + {{ 'labels.inputs.Maximum Deposit Term' | translate }}: + @if (fixedDepositProductData.maxDepositTerm !== undefined) { + {{ fixedDepositProductData.maxDepositTerm }} + + {{ fixedDepositProductData.maxDepositTermType.value }} + } + + } + + @if (fixedDepositProductData.inMultiplesOfDepositTerm) { + + {{ 'labels.inputs.Deposit Term In multiple of' | translate }}: + {{ fixedDepositProductData.inMultiplesOfDepositTerm }} + - + {{ fixedDepositProductData.inMultiplesOfDepositTermType.value }} + + } {{ 'labels.inputs.Apply Penal Interest (less)' | translate }}: {{ fixedDepositProductData.preClosurePenalApplicable | yesNo }} - - {{ 'labels.inputs.Penal Interest' | translate }} (%): - {{ fixedDepositProductData.preClosurePenalInterest }} % On - {{ fixedDepositProductData.preClosurePenalInterestOnType.value }} - + @if (fixedDepositProductData.preClosurePenalApplicable) { + + {{ 'labels.inputs.Penal Interest' | translate }} (%): + {{ fixedDepositProductData.preClosurePenalInterest }} % On + {{ fixedDepositProductData.preClosurePenalInterestOnType.value }} + + } - - {{ 'labels.inputs.Balance Required for Interest Calculation' | translate }}: - {{ fixedDepositProductData.minBalanceForInterestCalculation | formatNumber }} - + @if (fixedDepositProductData.minBalanceForInterestCalculation) { + + {{ 'labels.inputs.Balance Required for Interest Calculation' | translate }}: + {{ fixedDepositProductData.minBalanceForInterestCalculation | formatNumber }} + + } {{ 'labels.inputs.Withhold Tax is Applicable' | translate }}: {{ fixedDepositProductData.withHoldTax | yesNo }} - - {{ 'labels.inputs.Withhold Tax group' | translate }}: - {{ fixedDepositProductData.taxGroup.name }} - - - - {{ 'labels.heading.Interest Rate Chart' | translate }} - - + @if (fixedDepositProductData.withHoldTax) { + + {{ 'labels.inputs.Withhold Tax group' | translate }}: + {{ fixedDepositProductData.taxGroup.name }} + + } + @if (fixedDepositProductData.activeChart) { - - {{ 'labels.inputs.Name' | translate }}: - {{ fixedDepositProductData.activeChart.name }} - - - - {{ 'labels.inputs.Description' | translate }}: - {{ fixedDepositProductData.activeChart.description }} - - - - {{ 'labels.inputs.From Date' | translate }}: - {{ fixedDepositProductData.activeChart.fromDate | dateFormat }} - - - - {{ 'labels.inputs.End Date' | translate }}: - {{ fixedDepositProductData.activeChart.endDate | dateFormat }} - - - - {{ 'labels.inputs.Primary Grouping by Amount' | translate }}: - {{ fixedDepositProductData.activeChart.isPrimaryGroupingByAmount | yesNo }} + {{ 'labels.heading.Interest Rate Chart' | translate }} + + + @if (fixedDepositProductData.activeChart.name) { + + {{ 'labels.inputs.Name' | translate }}: + {{ fixedDepositProductData.activeChart.name }} + + } + @if (fixedDepositProductData.activeChart.description) { + + {{ 'labels.inputs.Description' | translate }}: + {{ fixedDepositProductData.activeChart.description }} + + } + + {{ 'labels.inputs.From Date' | translate }}: + {{ fixedDepositProductData.activeChart.fromDate | dateFormat }} + + @if (fixedDepositProductData.activeChart.endDate) { + + {{ 'labels.inputs.End Date' | translate }}: + {{ fixedDepositProductData.activeChart.endDate | dateFormat }} + + } + + {{ 'labels.inputs.Primary Grouping by Amount' | translate }}: + {{ fixedDepositProductData.activeChart.isPrimaryGroupingByAmount | yesNo }} + + + + {{ 'labels.inputs.Period' | translate }} + + @if (chartSlab.fromPeriod !== undefined) { + {{ chartSlab.fromPeriod }} - {{ chartSlab.toPeriod }} {{ chartSlab.periodType.value }} + } + @if (chartSlab.fromPeriod === undefined) { + + } + + + + {{ 'labels.inputs.Amount Range' | translate }} + + @if (chartSlab.amountRangeFrom !== undefined) { + {{ chartSlab.amountRangeFrom }} - {{ chartSlab.amountRangeTo }} + } + @if (chartSlab.amountRangeFrom === undefined) { + + } + + + + {{ 'labels.inputs.Interest' | translate }} + {{ chartSlab.annualInterestRate }} % + + + {{ 'labels.inputs.Description' | translate }} + + {{ chartSlab.description }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + @if (expandChartSlabIndex !== chartSlabIndex) { + + + {{ 'labels.buttons.View Incentives' | translate }} + + } + @if (expandChartSlabIndex === chartSlabIndex) { + + + {{ 'labels.buttons.Hide Incentives' | translate }} + + } + + + + + + + + + {{ 'labels.heading.Incentives' | translate }} + + + + {{ 'labels.inputs.Entity Type' | translate }} + + {{ + incentive.entityType + | find: fixedDepositProductsTemplate.chartTemplate.entityTypeOptions : 'id' : 'value' + }} + + + + {{ 'labels.inputs.Attribute Name' | translate }} + + {{ + incentive.attributeName + | find + : fixedDepositProductsTemplate.chartTemplate.attributeNameOptions + : 'id' + : 'value' + }} + + + + {{ 'labels.inputs.Condition Type' | translate }} + + {{ + incentive.conditionType + | find + : fixedDepositProductsTemplate.chartTemplate.conditionTypeOptions + : 'id' + : 'value' + }} + + + + {{ 'labels.inputs.Attribute Value' | translate }} + + @switch (incentive.attributeName) { + @case (2) { + {{ + incentive.attributeValue + | find: fixedDepositProductsTemplate.chartTemplate.genderOptions : 'id' : 'name' + }} + } + @case (3) { + {{ incentive.attributeValue }} + } + @case (4) { + {{ + incentive.attributeValue + | find + : fixedDepositProductsTemplate.chartTemplate.clientTypeOptions + : 'id' + : 'name' + }} + } + @case (5) { + {{ + incentive.attributeValue + | find + : fixedDepositProductsTemplate.chartTemplate.clientClassificationOptions + : 'id' + : 'name' + }} + } + } + + + + {{ 'labels.inputs.Incentive Type' | translate }} + + {{ + incentive.incentiveType + | find + : fixedDepositProductsTemplate.chartTemplate.incentiveTypeOptions + : 'id' + : 'value' + }} + + + + {{ 'labels.inputs.Amount' | translate }} + + {{ incentive.amount | formatNumber }} + + + + + + + + + + + + + - - - - {{ 'labels.inputs.Period' | translate }} - - - {{ chartSlab.fromPeriod }} - {{ chartSlab.toPeriod }} {{ chartSlab.periodType.value }} - - - - - - - {{ 'labels.inputs.Amount Range' | translate }} - - - {{ chartSlab.amountRangeFrom }} - {{ chartSlab.amountRangeTo }} - - - + + } + + @if (fixedDepositProductData.charges.length) { + + {{ 'labels.inputs.Charges' | translate }} + + + + {{ 'labels.inputs.Name' | translate }} + + {{ charge.name }} - - - {{ 'labels.inputs.Interest' | translate }} - {{ chartSlab.annualInterestRate }} % - - - - {{ 'labels.inputs.Description' | translate }} - - {{ chartSlab.description }} + + {{ 'labels.inputs.Type' | translate }} + + {{ charge.chargeCalculationType.value }} - - - {{ 'labels.inputs.Actions' | translate }} - - - - - {{ 'labels.buttons.View Incentives' | translate }} - - - - {{ 'labels.buttons.Hide Incentives' | translate }} - - + + {{ 'labels.inputs.Amount' | translate }} + + {{ charge.amount | formatNumber }} - - - - - - - {{ 'labels.heading.Incentives' | translate }} - - - - - {{ 'labels.inputs.Entity Type' | translate }} - - {{ - incentive.entityType - | find: fixedDepositProductsTemplate.chartTemplate.entityTypeOptions : 'id' : 'value' - }} - - - - - {{ 'labels.inputs.Attribute Name' | translate }} - - {{ - incentive.attributeName - | find: fixedDepositProductsTemplate.chartTemplate.attributeNameOptions : 'id' : 'value' - }} - - - - - {{ 'labels.inputs.Condition Type' | translate }} - - {{ - incentive.conditionType - | find: fixedDepositProductsTemplate.chartTemplate.conditionTypeOptions : 'id' : 'value' - }} - - - - - {{ 'labels.inputs.Attribute Value' | translate }} - - {{ - incentive.attributeValue - | find: fixedDepositProductsTemplate.chartTemplate.genderOptions : 'id' : 'name' - }} - {{ incentive.attributeValue }} - {{ - incentive.attributeValue - | find: fixedDepositProductsTemplate.chartTemplate.clientTypeOptions : 'id' : 'name' - }} - {{ - incentive.attributeValue - | find - : fixedDepositProductsTemplate.chartTemplate.clientClassificationOptions - : 'id' - : 'name' - }} - - - - - {{ 'labels.inputs.Incentive Type' | translate }} - - {{ - incentive.incentiveType - | find: fixedDepositProductsTemplate.chartTemplate.incentiveTypeOptions : 'id' : 'value' - }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ incentive.amount | formatNumber }} - - - - - - - - + + {{ 'labels.inputs.Collected On' | translate }} + + {{ charge.chargeTimeType.value }} - - - - + + - - - - {{ 'labels.inputs.Charges' | translate }} - - - - - {{ 'labels.inputs.Name' | translate }} - - {{ charge.name }} - - - - - {{ 'labels.inputs.Type' | translate }} - - {{ charge.chargeCalculationType.value }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ charge.amount | formatNumber }} - - - - - {{ 'labels.inputs.Collected On' | translate }} - - {{ charge.chargeTimeType.value }} - - - - - - - + } {{ 'labels.heading.Accounting' | translate }} @@ -397,113 +431,97 @@ {{ 'labels.heading.Accounting' | translate }} > - - {{ 'labels.heading.Advanced Accounting Rules' | translate }} - - - - - - - - {{ 'labels.inputs.Configure Fund Sources for Payment Channels' | translate }} - - - - - {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentFundSource.paymentType.name }} - - - - - {{ 'labels.inputs.Fund Source' | translate }} - - {{ paymentFundSource.fundSourceAccount.name }} - - - - - - - - - - {{ 'labels.inputs.Fees to Specific Income Accounts' | translate }} - - - - {{ 'labels.inputs.Fees' | translate }} - - {{ feesIncome.charge.name }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ feesIncome.incomeAccount.name }} - - - - - - - - - - {{ 'labels.heading.Penalties to Specific Income Accounts' | translate }} - - - - {{ 'labels.inputs.Penalty' | translate }} - - {{ penaltyIncome.charge.name }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ penaltyIncome.incomeAccount.name }} - - - - - - + @if ( + fixedDepositProductData.advancedAccountingRules && + (fixedDepositProductData.paymentChannelToFundSourceMappings?.length || + fixedDepositProductData.feeToIncomeAccountMappings?.length || + fixedDepositProductData.penaltyToIncomeAccountMappings?.length) + ) { + + {{ 'labels.heading.Advanced Accounting Rules' | translate }} + + + @if (fixedDepositProductData.paymentChannelToFundSourceMappings?.length) { + + + {{ 'labels.inputs.Configure Fund Sources for Payment Channels' | translate }} + + + + {{ 'labels.inputs.Payment Type' | translate }} + + {{ paymentFundSource.paymentType.name }} + + + + {{ 'labels.inputs.Fund Source' | translate }} + + {{ paymentFundSource.fundSourceAccount.name }} + + + + + + + } + @if (fixedDepositProductData.feeToIncomeAccountMappings?.length) { + + {{ 'labels.inputs.Fees to Specific Income Accounts' | translate }} + + + {{ 'labels.inputs.Fees' | translate }} + + {{ feesIncome.charge.name }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ feesIncome.incomeAccount.name }} + + + + + + + } + @if (fixedDepositProductData.penaltyToIncomeAccountMappings?.length) { + + + {{ 'labels.heading.Penalties to Specific Income Accounts' | translate }} + + + + {{ 'labels.inputs.Penalty' | translate }} + + {{ penaltyIncome.charge.name }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ penaltyIncome.incomeAccount.name }} + + + + + + + } - + } diff --git a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.ts b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.ts index 7a70ba21cc..e16514958c 100644 --- a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.ts +++ b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/fixed-deposit-general-tab/fixed-deposit-general-tab.component.ts @@ -1,9 +1,9 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { trigger, state, transition, animate, style } from '@angular/animations'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatDivider } from '@angular/material/divider'; -import { NgIf, NgSwitch, NgSwitchCase } from '@angular/common'; + import { MatTable, MatColumnDef, @@ -44,8 +44,6 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; MatHeaderCell, MatCellDef, MatCell, - NgSwitch, - NgSwitchCase, MatHeaderRowDef, MatHeaderRow, MatRowDef, @@ -58,6 +56,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FixedDepositGeneralTabComponent { + private route = inject(ActivatedRoute); + /** Fixed Deposit Product data. */ fixedDepositProductData: any; fixedDepositProductsTemplate: any; @@ -93,11 +93,14 @@ export class FixedDepositGeneralTabComponent { 'incomeAccountId' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the fixed deposit product data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { fixedDepositProduct: any; fixedDepositProductsTemplate: any }) => { this.fixedDepositProductData = data.fixedDepositProduct; this.fixedDepositProductsTemplate = data.fixedDepositProductsTemplate; diff --git a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.html b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.html index b1f53b880c..33cb052baa 100644 --- a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.html +++ b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.html @@ -10,7 +10,7 @@ > {{ 'labels.heading.General' | translate }} - + @for (fixedDepositDatatable of fixedDepositDatatables; track fixedDepositDatatable) { {{ fixedDepositDatatable.registeredTableName }} - + } diff --git a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.ts b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.ts index 7db6a95e09..36b1b152ef 100644 --- a/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.ts +++ b/src/app/products/fixed-deposit-products/view-fixed-deposit-product/view-fixed-deposit-product.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router'; import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -21,9 +21,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewFixedDepositProductComponent { + private route = inject(ActivatedRoute); + fixedDepositDatatables: any = []; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { fixedDepositDatatables: any }) => { this.fixedDepositDatatables = []; data.fixedDepositDatatables.forEach((datatable: any) => { diff --git a/src/app/products/floating-rates/create-floating-rate/create-floating-rate.component.html b/src/app/products/floating-rates/create-floating-rate/create-floating-rate.component.html index f639edeedc..1d142d3496 100644 --- a/src/app/products/floating-rates/create-floating-rate/create-floating-rate.component.html +++ b/src/app/products/floating-rates/create-floating-rate/create-floating-rate.component.html @@ -11,10 +11,12 @@ matTooltip="{{ 'tooltips.Unique name for the floating rate scheme' | translate }}" formControlName="name" /> - - {{ 'labels.inputs.Floating Rate Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (floatingRateForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Floating Rate Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -93,22 +95,24 @@ {{ 'labels.inputs.Is Differential' | translate }}? - - + @if (floatingRate.isDifferentialToBaseLendingRate) { + + } + @if (!floatingRate.isDifferentialToBaseLendingRate) { + + } diff --git a/src/app/products/floating-rates/create-floating-rate/create-floating-rate.component.ts b/src/app/products/floating-rates/create-floating-rate/create-floating-rate.component.ts index 923f6530e6..cfd75b3178 100644 --- a/src/app/products/floating-rates/create-floating-rate/create-floating-rate.component.ts +++ b/src/app/products/floating-rates/create-floating-rate/create-floating-rate.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; @@ -70,6 +70,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateFloatingRateComponent implements OnInit { + private router = inject(Router); + private formBuilder = inject(UntypedFormBuilder); + private productsService = inject(ProductsService); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + private translateService = inject(TranslateService); + /** Floating Rate Period Data. */ floatingRatePeriodsData: any[] = []; /** Minimum floating rate period date allowed. */ @@ -93,6 +102,9 @@ export class CreateFloatingRateComponent implements OnInit { /** Sorter for floating rate periods table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {Router} router Router for navigation. * @param {FormBuilder} formBuilder Form Builder. @@ -103,16 +115,7 @@ export class CreateFloatingRateComponent implements OnInit { * @param {SettingsService} settingsService Settings Service. * @param {TranslateService} translateService Translate Service. */ - constructor( - private router: Router, - private formBuilder: UntypedFormBuilder, - private productsService: ProductsService, - private route: ActivatedRoute, - private dateUtils: Dates, - private dialog: MatDialog, - private settingsService: SettingsService, - private translateService: TranslateService - ) {} + constructor() {} /** * Sets the floating rate periods table. diff --git a/src/app/products/floating-rates/edit-floating-rate/edit-floating-rate.component.html b/src/app/products/floating-rates/edit-floating-rate/edit-floating-rate.component.html index 44e99bce7c..af4d6ed574 100644 --- a/src/app/products/floating-rates/edit-floating-rate/edit-floating-rate.component.html +++ b/src/app/products/floating-rates/edit-floating-rate/edit-floating-rate.component.html @@ -11,10 +11,12 @@ matTooltip="{{ 'tooltips.Unique name for the floating rate scheme' | translate }}" formControlName="name" /> - - {{ 'labels.inputs.Floating Rate Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (floatingRateForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Floating Rate Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -97,22 +99,24 @@ {{ 'labels.inputs.Is Differential' | translate }}? - - + @if (floatingRate.isDifferentialToBaseLendingRate) { + + } + @if (!floatingRate.isDifferentialToBaseLendingRate) { + + } diff --git a/src/app/products/floating-rates/edit-floating-rate/edit-floating-rate.component.ts b/src/app/products/floating-rates/edit-floating-rate/edit-floating-rate.component.ts index 35b94e7f36..caa031888f 100644 --- a/src/app/products/floating-rates/edit-floating-rate/edit-floating-rate.component.ts +++ b/src/app/products/floating-rates/edit-floating-rate/edit-floating-rate.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; @@ -68,6 +68,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditFloatingRateComponent implements OnInit { + private router = inject(Router); + private formBuilder = inject(UntypedFormBuilder); + private productsService = inject(ProductsService); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + private translateService = inject(TranslateService); + /** Floating Rate Form. */ floatingRateForm: UntypedFormGroup; /** Floating Rate Data. */ @@ -95,6 +104,9 @@ export class EditFloatingRateComponent implements OnInit { /** Sorter for floating rate periods table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the floating rate data from `resolve`. * @param {Router} router Router for navigation. @@ -106,16 +118,7 @@ export class EditFloatingRateComponent implements OnInit { * @param {SettingsService} settingsService Settings Service. * @param {TranslateService} translateService Translate Service. */ - constructor( - private router: Router, - private formBuilder: UntypedFormBuilder, - private productsService: ProductsService, - private route: ActivatedRoute, - private dateUtils: Dates, - private dialog: MatDialog, - private settingsService: SettingsService, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { floatingRate: any }) => { this.floatingRateData = data.floatingRate; this.floatingRatePeriodsData = data.floatingRate.ratePeriods ? data.floatingRate.ratePeriods : []; diff --git a/src/app/products/floating-rates/floating-rate-period-dialog/floating-rate-period-dialog.component.html b/src/app/products/floating-rates/floating-rate-period-dialog/floating-rate-period-dialog.component.html index 4a1ef4d897..e56b609d19 100644 --- a/src/app/products/floating-rates/floating-rate-period-dialog/floating-rate-period-dialog.component.html +++ b/src/app/products/floating-rates/floating-rate-period-dialog/floating-rate-period-dialog.component.html @@ -8,19 +8,23 @@ {{ 'labels.inputs.Floating Rate Periods' | translate }} - - {{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (floatingRatePeriodForm.controls.fromDate.hasError('required')) { + + {{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Interest Rate' | translate }} - - {{ 'labels.inputs.Interest Rate' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (floatingRatePeriodForm.controls.interestRate.hasError('required')) { + + {{ 'labels.inputs.Interest Rate' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/products/floating-rates/floating-rate-period-dialog/floating-rate-period-dialog.component.ts b/src/app/products/floating-rates/floating-rate-period-dialog/floating-rate-period-dialog.component.ts index e1fd03e0a5..9e422c5ebd 100644 --- a/src/app/products/floating-rates/floating-rate-period-dialog/floating-rate-period-dialog.component.ts +++ b/src/app/products/floating-rates/floating-rate-period-dialog/floating-rate-period-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef, @@ -32,22 +32,25 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FloatingRatePeriodDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + formBuilder = inject(UntypedFormBuilder); + private settingsService = inject(SettingsService); + data = inject(MAT_DIALOG_DATA); + /** Floating Rate Period Form. */ floatingRatePeriodForm: UntypedFormGroup; /** Minimum floating rate period date allowed. */ minDate = new Date(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {FormBuilder} formBuilder Form Builder. * @param {any} data Provides values for the form (if available). */ - constructor( - public dialogRef: MatDialogRef, - public formBuilder: UntypedFormBuilder, - private settingsService: SettingsService, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} /** * Creates the floating rate period form. diff --git a/src/app/products/floating-rates/floating-rate.resolver.ts b/src/app/products/floating-rates/floating-rate.resolver.ts index ba19d0adc8..1ca6ddc79e 100644 --- a/src/app/products/floating-rates/floating-rate.resolver.ts +++ b/src/app/products/floating-rates/floating-rate.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class FloatingRateResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the floating rate data. diff --git a/src/app/products/floating-rates/floating-rates.component.html b/src/app/products/floating-rates/floating-rates.component.html index 62d15f85d9..69d64f60e1 100644 --- a/src/app/products/floating-rates/floating-rates.component.html +++ b/src/app/products/floating-rates/floating-rates.component.html @@ -30,44 +30,48 @@ {{ 'labels.inputs.Is Base Lending Rate' | translate }}? - - + @if (floatingRate.isBaseLendingRate) { + + } + @if (!floatingRate.isBaseLendingRate) { + + } {{ 'labels.catalogs.Active' | translate }} - - + @if (floatingRate.isActive) { + + } + @if (!floatingRate.isActive) { + + } diff --git a/src/app/products/floating-rates/floating-rates.component.ts b/src/app/products/floating-rates/floating-rates.component.ts index 4ed8e6ca48..ea03a4d308 100644 --- a/src/app/products/floating-rates/floating-rates.component.ts +++ b/src/app/products/floating-rates/floating-rates.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -47,6 +47,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FloatingRatesComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Floating Rates data. */ floatingRatesData: any; /** Columns to be displayed in floating rates table. */ @@ -64,11 +66,14 @@ export class FloatingRatesComponent implements OnInit { /** Sorter for floating rates table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the floating rates data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { floatingrates: any }) => { this.floatingRatesData = data.floatingrates; }); diff --git a/src/app/products/floating-rates/floating-rates.resolver.ts b/src/app/products/floating-rates/floating-rates.resolver.ts index c417c2acd7..5795d47df2 100644 --- a/src/app/products/floating-rates/floating-rates.resolver.ts +++ b/src/app/products/floating-rates/floating-rates.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class FloatingRatesResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the floating rates data. diff --git a/src/app/products/floating-rates/view-floating-rate/view-floating-rate.component.html b/src/app/products/floating-rates/view-floating-rate/view-floating-rate.component.html index a12c52207d..a65b86054b 100644 --- a/src/app/products/floating-rates/view-floating-rate/view-floating-rate.component.html +++ b/src/app/products/floating-rates/view-floating-rate/view-floating-rate.component.html @@ -53,22 +53,24 @@ {{ 'labels.inputs.Is Differential' | translate }}? - - + @if (floatingRate.isDifferentialToBaseLendingRate) { + + } + @if (!floatingRate.isDifferentialToBaseLendingRate) { + + } diff --git a/src/app/products/floating-rates/view-floating-rate/view-floating-rate.component.ts b/src/app/products/floating-rates/view-floating-rate/view-floating-rate.component.ts index 97e8e3a851..ecb1ee838f 100644 --- a/src/app/products/floating-rates/view-floating-rate/view-floating-rate.component.ts +++ b/src/app/products/floating-rates/view-floating-rate/view-floating-rate.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -18,7 +18,7 @@ import { } from '@angular/material/table'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatDivider } from '@angular/material/divider'; -import { NgIf, DecimalPipe } from '@angular/common'; +import { DecimalPipe } from '@angular/common'; import { MatTooltip } from '@angular/material/tooltip'; import { DateFormatPipe } from '../../../pipes/date-format.pipe'; import { YesnoPipe } from '../../../pipes/yesno.pipe'; @@ -55,6 +55,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewFloatingRateComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Floating Rate Data. */ floatingRateData: any; /** Columns to be displayed in floating rate periods table. */ @@ -71,11 +73,14 @@ export class ViewFloatingRateComponent implements OnInit { /** Sorter for floating rate periods table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the floating rate data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { floatingRate: any }) => { this.floatingRateData = data.floatingRate; }); diff --git a/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.html b/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.html index 3222ceb895..b951cacd4b 100644 --- a/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.html +++ b/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.html @@ -1,1347 +1,1338 @@ - - {{ loanProduct.name }} - - {{ 'labels.heading.Details' | translate }} - - - - - {{ 'labels.inputs.Short Name' | translate }}: - {{ loanProduct.shortName }} - - - - {{ 'labels.inputs.External Id' | translate }}: - {{ loanProduct.externalId }} - - - - {{ 'labels.inputs.Fund' | translate }}: - {{ loanProduct.fundName }} - - - - {{ 'labels.inputs.Include in Customer Loan Counter' | translate }}: - {{ loanProduct.includeInBorrowerCycle | yesNo }} - - - - {{ 'labels.inputs.Start Date' | translate }}: - {{ loanProduct.startDate | dateFormat }} - - - - {{ 'labels.inputs.Close Date' | translate }}: - {{ loanProduct.closeDate | dateFormat }} - - - - {{ 'labels.inputs.Description' | translate }}: - {{ loanProduct.description }} - - - {{ 'labels.inputs.Currency' | translate }} - - - - - {{ 'labels.inputs.Currency' | translate }}: - {{ loanProduct.currency.code }} - - - - {{ 'labels.inputs.Currency' | translate }}: - {{ loanProduct.currency.displayLabel }} - - - - {{ 'labels.inputs.Decimal Places' | translate }}: - {{ loanProduct.currency.decimalPlaces }} - - - - {{ 'labels.inputs.Currency in multiples of' | translate }}: - {{ loanProduct.currency.inMultiplesOf }} - - - - {{ 'labels.inputs.Installment in multiples of' | translate }}: - {{ loanProduct.installmentAmountInMultiplesOf }} - - - {{ 'labels.heading.Terms' | translate }} - - - - - {{ 'labels.inputs.Principal' | translate }}: - {{ loanProduct.principal | formatNumber }} (Min - {{ (loanProduct.minPrincipal ? loanProduct.minPrincipal : loanProduct.principal) | formatNumber }} : Max - {{ (loanProduct.maxPrincipal ? loanProduct.maxPrincipal : loanProduct.principal) | formatNumber }}) - - - - - {{ 'labels.inputs.Allow Approved / Disbursed Amounts Over Applied' | translate }}: - {{ loanProduct.allowApprovedDisbursedAmountsOverApplied | yesNo }} - - - - {{ 'labels.inputs.Over Amount' | translate }}: - {{ loanProduct.overAppliedNumber | formatNumber: 0 }} % - {{ loanProduct.overAppliedNumber | formatNumber }} {{ loanProduct.currencyCode }} - - - - {{ 'labels.inputs.Installment day calculation from' | translate }}: - {{ loanProduct.repaymentStartDateType?.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Number of Repayments' | translate }}: - {{ - loanProduct.numberOfRepayments + - ' (Min: ' + - (loanProduct.minNumberOfRepayments ? loanProduct.minNumberOfRepayments : loanProduct.numberOfRepayments) + - ', Max: ' + - (loanProduct.maxNumberOfRepayments ? loanProduct.maxNumberOfRepayments : loanProduct.numberOfRepayments) + - ')' - }} - - - - {{ 'labels.inputs.Linked to floating interest rates' | translate }}: - {{ loanProduct.isLinkedToFloatingInterestRates | yesNo }} - - - - {{ 'labels.inputs.Nominal interest rate' | translate }}: - {{ - loanProduct.interestRatePerPeriod + - ' (Min: ' + - (loanProduct.minInterestRatePerPeriod - ? loanProduct.minInterestRatePerPeriod - : loanProduct.interestRatePerPeriod) + - ', Max: ' + - (loanProduct.maxInterestRatePerPeriod - ? loanProduct.maxInterestRatePerPeriod - : loanProduct.interestRatePerPeriod) + - ')' - }} - {{ loanProduct.interestRateFrequencyType?.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Floating Lending Interest Rate' | translate }}: - {{ loanProduct.floatingRateName }} +@if (loanProduct) { + + {{ loanProduct.name }} + {{ 'labels.heading.Details' | translate }} + + + {{ 'labels.inputs.Short Name' | translate }}: + {{ loanProduct.shortName }} - - {{ 'labels.inputs.Interest Rate Differential' | translate }}: - {{ loanProduct.interestRateDifferential }} + @if (loanProduct.externalId) { + + {{ 'labels.inputs.External Id' | translate }}: + {{ loanProduct.externalId }} + + } + @if (loanProduct.fundId) { + + {{ 'labels.inputs.Fund' | translate }}: + {{ loanProduct.fundName }} + + } + + {{ 'labels.inputs.Include in Customer Loan Counter' | translate }}: + {{ loanProduct.includeInBorrowerCycle | yesNo }} - - {{ 'labels.inputs.Floating Interest Rate Calculation Allowed' | translate }}: - {{ loanProduct.isFloatingInterestRateCalculationAllowed | yesNo }} + @if (loanProduct.startDate) { + + {{ 'labels.inputs.Start Date' | translate }}: + {{ loanProduct.startDate | dateFormat }} + + } + @if (loanProduct.closeDate) { + + {{ 'labels.inputs.Close Date' | translate }}: + {{ loanProduct.closeDate | dateFormat }} + + } + @if (loanProduct.description) { + + {{ 'labels.inputs.Description' | translate }}: + {{ loanProduct.description }} + + } + {{ 'labels.inputs.Currency' | translate }} + + + {{ 'labels.inputs.Currency' | translate }}: + {{ loanProduct.currency.code }} - - {{ 'labels.inputs.Floating Interest Rate' | translate }}: - {{ - loanProduct.defaultDifferentialLendingRate + - ' (Min: ' + - (loanProduct.minDifferentialLendingRate - ? loanProduct.minDifferentialLendingRate - : loanProduct.defaultDifferentialLendingRate) + - ', Max: ' + - (loanProduct.maxDifferentialLendingRate - ? loanProduct.maxDifferentialLendingRate - : loanProduct.defaultDifferentialLendingRate) + - ')' - }} + + {{ 'labels.inputs.Currency' | translate }}: + {{ loanProduct.currency.displayLabel }} - - - - {{ 'labels.inputs.Terms vary based on loan cycle' | translate }}: - {{ loanProduct.useBorrowerCycle | yesNo }} - - - - {{ 'labels.inputs.Principal by loan cycle' | translate }} - - - - {{ 'labels.inputs.Condition' | translate }} - - {{ variation.valueConditionType.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Loan Cycle' | translate }} - - {{ variation.borrowerCycleNumber }} - - - - - {{ 'labels.inputs.Minimum' | translate }} - - {{ variation.minValue | formatNumber }} - - - - - {{ 'labels.inputs.Default' | translate }} - - {{ variation.defaultValue | formatNumber }} - - - - - {{ 'labels.inputs.Maximum' | translate }} - - {{ variation.maxValue | formatNumber }} - - - - - - - - - - {{ 'labels.inputs.Number of Repayments by loan cycle' | translate }} - - - - {{ 'labels.inputs.Condition' | translate }} - - {{ variation.valueConditionType.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Loan Cycle' | translate }} - - {{ variation.borrowerCycleNumber }} - - - - - {{ 'labels.inputs.Minimum' | translate }} - - {{ variation.minValue }} - - - - - {{ 'labels.inputs.Default' | translate }} - - {{ variation.defaultValue }} - - - - - {{ 'labels.inputs.Maximum' | translate }} - - {{ variation.maxValue }} - - - - - - - - - - {{ 'labels.inputs.Nominal Interest Rate by loan cycle' | translate }} - - - - {{ 'labels.inputs.Condition' | translate }} - - {{ variation.valueConditionType.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Loan Cycle' | translate }} - - {{ variation.borrowerCycleNumber }} - - - - - {{ 'labels.inputs.Minimum' | translate }} - - {{ variation.minValue }} - - - - - {{ 'labels.inputs.Default' | translate }} - - {{ variation.defaultValue }} - - - - - {{ 'labels.inputs.Maximum' | translate }} - - {{ variation.maxValue }} - - - - - - - - - - {{ 'labels.inputs.Repay Every' | translate }}: - {{ loanProduct.repaymentEvery }} {{ loanProduct.repaymentFrequencyType.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Fixed Length' | translate }}: - {{ loanProduct.fixedLength }} {{ loanProduct.repaymentFrequencyType.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Minimum days between disbursal and first repayment date' | translate }}: - {{ loanProduct.minimumDaysBetweenDisbursalAndFirstRepayment | formatNumber }} - - - {{ 'labels.heading.Settings' | translate }} - - - - - {{ 'labels.inputs.Amortization' | translate }}: - {{ loanProduct.amortizationType.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Is Equal Amortization' | translate }}: - {{ loanProduct.isEqualAmortization | yesNo }} - - - - {{ 'labels.inputs.Interest Method' | translate }}: - {{ loanProduct.interestType?.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Interest Calculation Period' | translate }}: - {{ loanProduct.interestCalculationPeriodType?.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Allow Partial Interest Calculation with same as repayment' | translate }}: - {{ loanProduct.allowPartialPeriodInterestCalculation | yesNo }} - - - - {{ 'labels.inputs.Is interest recognition on disbursement date?' | translate }}: - {{ loanProduct.interestRecognitionOnDisbursementDate | yesNo }} - - - {{ 'labels.inputs.Loan Schedule' | translate }} - - - - - {{ 'labels.inputs.Loan Schedule Type' | translate }}: - {{ loanProduct.loanScheduleType.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Repayment Strategy' | translate }}: - {{ - loanProduct.transactionProcessingStrategyName | translateKey: 'catalogs' - }} - - - - {{ 'labels.inputs.Loan Schedule Processing Type' | translate }}: - {{ loanProduct.loanScheduleProcessingType.value }} - - - - {{ 'labels.inputs.Advanced Payment Allocation Transactions' | translate }}: - - - - - - - - - 0"> - {{ 'labels.inputs.Advanced Credit Allocation Transactions' | translate }}: - - - - - - - - - 0"> - {{ 'labels.inputs.Supported Interest Refund Types' | translate }}: - - {{ mapHumanReadableValueStringEnumOptionDataList(supportedInterestRefundTypes) }} - - - - {{ 'labels.inputs.Down Payments' | translate }} - - - - - {{ 'labels.inputs.Enable Down Payments' | translate }}: - {{ loanProduct.enableDownPayment | yesNo }} - - - - {{ 'labels.inputs.Disbursed Amount Percentage Down Payment' | translate }} (%): - {{ loanProduct.disbursedAmountPercentageForDownPayment }} % - - - - {{ 'labels.inputs.Enable Auto Repayment for Down Payment' | translate }}: - {{ loanProduct.enableAutoRepaymentForDownPayment | yesNo }} - - - - {{ 'labels.inputs.Loan Charge-off behaviour' | translate }} - + + {{ 'labels.inputs.Decimal Places' | translate }}: + {{ loanProduct.currency.decimalPlaces }} + + + {{ 'labels.inputs.Currency in multiples of' | translate }}: + {{ loanProduct.currency.inMultiplesOf }} + + + {{ 'labels.inputs.Installment in multiples of' | translate }}: + {{ loanProduct.installmentAmountInMultiplesOf }} + + {{ 'labels.heading.Terms' | translate }} - - - {{ 'labels.inputs.Loan Charge-off behaviour' | translate }}: - {{ loanProduct.chargeOffBehaviour.value | translateKey: 'catalogs' }} + + {{ 'labels.inputs.Principal' | translate }}: + {{ loanProduct.principal | formatNumber }} (Min + {{ (loanProduct.minPrincipal ? loanProduct.minPrincipal : loanProduct.principal) | formatNumber }} : Max + {{ (loanProduct.maxPrincipal ? loanProduct.maxPrincipal : loanProduct.principal) | formatNumber }}) + - - - {{ 'labels.heading.Moratorium' | translate }} - - - {{ 'labels.inputs.Delinquency Bucket' | translate }}: - {{ loanProduct.delinquencyBucket.name }} - {{ - 'labels.inputs.Unassigned' | translate - }} - - - - {{ 'labels.inputs.Delinquency Bucket' | translate }}: - {{ 'labels.inputs.Unassigned' | translate }} - - - - {{ 'labels.inputs.Enable installment level Delinquency' | translate }}: - {{ loanProduct.enableInstallmentLevelDelinquency | yesNo }} - - - - {{ 'labels.inputs.Grace on principal payment' | translate }}: - {{ loanProduct.graceOnPrincipalPayment }} - - - - {{ 'labels.inputs.Grace on interest payment' | translate }}: - {{ loanProduct.graceOnInterestPayment }} - - - - {{ 'labels.inputs.Interest free period' | translate }}: - {{ loanProduct.graceOnInterestCharged }} - - - - {{ 'labels.inputs.Arrears tolerance' | translate }}: - {{ loanProduct.inArrearsTolerance }} - - - - {{ 'labels.inputs.Days in year' | translate }}: - {{ loanProduct.daysInYearType?.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Days in year custom strategy' | translate }}: - {{ loanProduct.daysInYearCustomStrategy.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Days in month' | translate }}: - {{ loanProduct.daysInMonthType?.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Allow fixing of the installment amount' | translate }}: - {{ loanProduct.canDefineInstallmentAmount | yesNo }} - - - - {{ 'labels.inputs.Number of days a loan may be overdue before moving into arrears' | translate }}: - {{ loanProduct.graceOnArrearsAgeing }} - - - - {{ - 'labels.inputs.Maximum number of days a loan may be overdue before becoming a NPA (non performing asset)' - | translate - }}: - {{ loanProduct.overdueDaysForNPA }} - - - - {{ 'labels.inputs.Account moves out of NPA only after all arrears have been cleared' | translate }}: - {{ loanProduct.accountMovesOutOfNPAOnlyOnArrearsCompletion | yesNo }} - - - - {{ 'labels.inputs.Principal Threshold (%) for Last Instalment' | translate }}: - {{ loanProduct.principalThresholdForLastInstallment }} - - - - {{ 'labels.inputs.Variable Installments allowed' | translate }}: - {{ loanProduct.allowVariableInstallments | yesNo }} - - - - {{ 'labels.inputs.Variable Installments' | translate }}: - {{ - '(Min: ' + - loanProduct.minimumGap + - ', Max: ' + - (loanProduct.maximumGap ? loanProduct.maximumGap : loanProduct.minimumGap) + - ')' - }} - - - - {{ 'labels.inputs.Allowed to be used for providing Topup Loans' | translate }}: - {{ loanProduct.canUseForTopup | yesNo }} - - - {{ 'labels.heading.Interest Recalculation' | translate }} - - - - - {{ 'labels.inputs.Recalculate Interest' | translate }}: - {{ loanProduct.isInterestRecalculationEnabled | yesNo }} - - - - - {{ 'labels.inputs.Pre-closure interest calculation rule' | translate }}: - {{ - loanProduct.interestRecalculationData.preClosureInterestCalculationStrategy.value - }} + + {{ 'labels.inputs.Allow Approved / Disbursed Amounts Over Applied' | translate }}: + {{ loanProduct.allowApprovedDisbursedAmountsOverApplied | yesNo }} - - {{ 'labels.inputs.Advance payments adjustment type' | translate }}: - {{ loanProduct.interestRecalculationData.rescheduleStrategyType.value }} + @if (loanProduct.allowApprovedDisbursedAmountsOverApplied) { + + {{ 'labels.inputs.Over Amount' | translate }}: + @if (loanProduct.overAppliedCalculationType === 'percentage') { + {{ loanProduct.overAppliedNumber | formatNumber: 0 }} % + } + @if (loanProduct.overAppliedCalculationType === 'flat') { + {{ loanProduct.overAppliedNumber | formatNumber }} {{ loanProduct.currencyCode }} + } + + } + + {{ 'labels.inputs.Installment day calculation from' | translate }}: + {{ loanProduct.repaymentStartDateType?.value | translateKey: 'catalogs' }} - - {{ 'labels.inputs.Interest recalculation compounding on' | translate }}: + + {{ 'labels.inputs.Number of Repayments' | translate }}: {{ - loanProduct.interestRecalculationData.interestRecalculationCompoundingType.value + loanProduct.numberOfRepayments + + ' (Min: ' + + (loanProduct.minNumberOfRepayments ? loanProduct.minNumberOfRepayments : loanProduct.numberOfRepayments) + + ', Max: ' + + (loanProduct.maxNumberOfRepayments ? loanProduct.maxNumberOfRepayments : loanProduct.numberOfRepayments) + + ')' }} - - {{ 'labels.inputs.Frequency for compounding' | translate }}: - - {{ loanProduct.interestRecalculationData.recalculationCompoundingFrequencyType.value }} - {{ - 'on ' + loanProduct.interestRecalculationData.recalculationCompoundingFrequencyNthDay?.value - }} - {{ loanProduct.interestRecalculationData.recalculationCompoundingFrequencyWeekday?.value }} - {{ - 'on day ' + loanProduct.interestRecalculationData.recalculationCompoundingFrequencyOnDay - }} + {{ 'labels.inputs.Linked to floating interest rates' | translate }}: + {{ loanProduct.isLinkedToFloatingInterestRates | yesNo }} + + @if (!loanProduct.isLinkedToFloatingInterestRates) { + + {{ 'labels.inputs.Nominal interest rate' | translate }}: + {{ + loanProduct.interestRatePerPeriod + + ' (Min: ' + + (loanProduct.minInterestRatePerPeriod + ? loanProduct.minInterestRatePerPeriod + : loanProduct.interestRatePerPeriod) + + ', Max: ' + + (loanProduct.maxInterestRatePerPeriod + ? loanProduct.maxInterestRatePerPeriod + : loanProduct.interestRatePerPeriod) + + ')' + }} + {{ loanProduct.interestRateFrequencyType?.value | translateKey: 'catalogs' }} - - - {{ 'labels.inputs.Frequency Interval for compounding' | translate }}: - {{ - loanProduct.interestRecalculationData.recalculationCompoundingFrequencyInterval - }} + } + @if (loanProduct.isLinkedToFloatingInterestRates) { + + + {{ 'labels.inputs.Floating Lending Interest Rate' | translate }}: + {{ loanProduct.floatingRateName }} + + + {{ 'labels.inputs.Interest Rate Differential' | translate }}: + {{ loanProduct.interestRateDifferential }} + + + {{ 'labels.inputs.Floating Interest Rate Calculation Allowed' | translate }}: + {{ loanProduct.isFloatingInterestRateCalculationAllowed | yesNo }} + + + {{ 'labels.inputs.Floating Interest Rate' | translate }}: + {{ + loanProduct.defaultDifferentialLendingRate + + ' (Min: ' + + (loanProduct.minDifferentialLendingRate + ? loanProduct.minDifferentialLendingRate + : loanProduct.defaultDifferentialLendingRate) + + ', Max: ' + + (loanProduct.maxDifferentialLendingRate + ? loanProduct.maxDifferentialLendingRate + : loanProduct.defaultDifferentialLendingRate) + + ')' + }} + + + } + + {{ 'labels.inputs.Terms vary based on loan cycle' | translate }}: + {{ loanProduct.useBorrowerCycle | yesNo }} - - {{ 'labels.inputs.Frequency for recalculate Outstanding Principal' | translate }}: - - {{ loanProduct.interestRecalculationData.recalculationRestFrequencyType.value }} - {{ 'on ' + loanProduct.interestRecalculationData.recalculationRestFrequencyNthDay?.value }} + {{ 'labels.inputs.Principal by loan cycle' | translate }} + - {{ loanProduct.interestRecalculationData.recalculationRestFrequencyWeekday?.value }} + {{ 'labels.inputs.Condition' | translate }} + + {{ variation.valueConditionType.value | translateKey: 'catalogs' }} + + + + {{ 'labels.inputs.Loan Cycle' | translate }} + + {{ variation.borrowerCycleNumber }} + + + + {{ 'labels.inputs.Minimum' | translate }} + + {{ variation.minValue | formatNumber }} + + + + {{ 'labels.inputs.Default' | translate }} + + {{ variation.defaultValue | formatNumber }} + + + + {{ 'labels.inputs.Maximum' | translate }} + + {{ variation.maxValue | formatNumber }} + + + + + + + } + @if (loanProduct.numberOfRepaymentVariationsForBorrowerCycle?.length) { + + {{ 'labels.inputs.Number of Repayments by loan cycle' | translate }} + - {{ 'on day ' + loanProduct.interestRecalculationData.recalculationRestFrequencyOnDay }} + {{ 'labels.inputs.Condition' | translate }} + + {{ variation.valueConditionType.value | translateKey: 'catalogs' }} + + + + {{ 'labels.inputs.Loan Cycle' | translate }} + + {{ variation.borrowerCycleNumber }} + + + + {{ 'labels.inputs.Minimum' | translate }} + + {{ variation.minValue }} + + + + {{ 'labels.inputs.Default' | translate }} + + {{ variation.defaultValue }} + + + + {{ 'labels.inputs.Maximum' | translate }} + + {{ variation.maxValue }} + + + + + + + } + @if (loanProduct.interestRateVariationsForBorrowerCycle?.length) { + + {{ 'labels.inputs.Nominal Interest Rate by loan cycle' | translate }} + - - - - {{ 'labels.inputs.Frequency Interval for recalculation' | translate }}: - {{ loanProduct.interestRecalculationData.recalculationRestFrequencyInterval }} - - {{ 'labels.inputs.Rest Frequency Date' | translate }}: - {{ loanProduct.interestRecalculationData.recalculationRestFrequencyDate }} + + {{ 'labels.inputs.Condition' | translate }} + + {{ variation.valueConditionType.value | translateKey: 'catalogs' }} + + + + {{ 'labels.inputs.Loan Cycle' | translate }} + + {{ variation.borrowerCycleNumber }} + + + + {{ 'labels.inputs.Minimum' | translate }} + + {{ variation.minValue }} + + + + {{ 'labels.inputs.Default' | translate }} + + {{ variation.defaultValue }} + + + + {{ 'labels.inputs.Maximum' | translate }} + + {{ variation.maxValue }} + + + + + - - - {{ 'labels.inputs.Is Arrears recognization based on original schedule' | translate }}: - {{ loanProduct.interestRecalculationData.isArrearsBasedOnOriginalSchedule | yesNo }} - - - {{ 'labels.inputs.Do not calculate interest on past due principal balances' | translate }}: + {{ 'labels.inputs.Repay Every' | translate }}: + {{ loanProduct.repaymentEvery }} + {{ loanProduct.repaymentFrequencyType.value | translateKey: 'catalogs' }} - {{ - loanProduct.interestRecalculationData.disallowInterestCalculationOnPastDue | yesNo - }} - - - {{ 'labels.heading.Guarantee Requirements' | translate }} - - - - - {{ 'labels.inputs.Place Guarantee Funds On-Hold' | translate }}: - {{ loanProduct.holdGuaranteeFunds | yesNo }} - - - - {{ 'labels.inputs.Mandatory Guarantee' | translate }} (%): - {{ loanProduct.productGuaranteeData.mandatoryGuarantee }} - - {{ 'labels.inputs.Minimum Guarantee from Own Funds' | translate }} (%): - {{ loanProduct.productGuaranteeData.minimumGuaranteeFromOwnFunds }} + @if (loanProduct.fixedLength) { + + {{ 'labels.inputs.Fixed Length' | translate }}: + {{ loanProduct.fixedLength }} {{ loanProduct.repaymentFrequencyType.value | translateKey: 'catalogs' }} + + } + @if (loanProduct.minimumDaysBetweenDisbursalAndFirstRepayment) { + + {{ 'labels.inputs.Minimum days between disbursal and first repayment date' | translate }}: + {{ loanProduct.minimumDaysBetweenDisbursalAndFirstRepayment | formatNumber }} + + } + {{ 'labels.heading.Settings' | translate }} + + @if (loanProduct.amortizationType?.value) { + + {{ 'labels.inputs.Amortization' | translate }}: + {{ loanProduct.amortizationType.value | translateKey: 'catalogs' }} + + } + + {{ 'labels.inputs.Is Equal Amortization' | translate }}: + {{ loanProduct.isEqualAmortization | yesNo }} - - {{ 'labels.inputs.Minimum Guarantee from Guarantor Funds' | translate }} (%): - {{ loanProduct.productGuaranteeData.minimumGuaranteeFromGuarantor }} + + {{ 'labels.inputs.Interest Method' | translate }}: + {{ loanProduct.interestType?.value | translateKey: 'catalogs' }} - - - {{ 'labels.heading.Loan Tranche Details' | translate }} - - - - - {{ 'labels.inputs.Enable Multiple Disbursals' | translate }}: - {{ loanProduct.multiDisburseLoan | yesNo }} - - - - {{ 'labels.inputs.Maximum Tranche count' | translate }}: - {{ loanProduct.maxTrancheCount }} - - {{ 'labels.inputs.Maximum allowed outstanding balance' | translate }}: - {{ loanProduct.outstandingLoanBalance }} + + {{ 'labels.inputs.Interest Calculation Period' | translate }}: + {{ loanProduct.interestCalculationPeriodType?.value | translateKey: 'catalogs' }} - {{ 'labels.inputs.Disallow Expected Disbursements' | translate }}: - {{ loanProduct.disallowExpectedDisbursements | yesNo }} + {{ 'labels.inputs.Allow Partial Interest Calculation with same as repayment' | translate }}: + {{ loanProduct.allowPartialPeriodInterestCalculation | yesNo }} - - - {{ 'labels.heading.Event Settings' | translate }} - - - {{ - 'labels.inputs.Use the Global Configurations values to the Repayment Event (notifications)' | translate - }}: - {{ useDueForRepaymentsConfigurations | yesNo }} - - - - {{ 'labels.inputs.Due days for repayment event' | translate }}: - {{ loanProduct.dueDaysForRepaymentEvent | number }} - - - - {{ 'labels.inputs.OverDue days for repayment event' | translate }}: - {{ loanProduct.overDueDaysForRepaymentEvent | number }} - - - {{ 'labels.inputs.Configurable Terms and Settings' | translate }} - - - - - {{ 'labels.inputs.Allow overriding select terms and settings in loan accounts' | translate }}: - {{ loanProduct.allowAttributeConfiguration | yesNo }} - - - - {{ 'labels.inputs.Amortization' | translate }}: - {{ loanProduct.allowAttributeOverrides.amortizationType | yesNo }} + {{ 'labels.inputs.Is interest recognition on disbursement date?' | translate }}: + {{ loanProduct.interestRecognitionOnDisbursementDate | yesNo }} + {{ 'labels.inputs.Loan Schedule' | translate }} + - {{ 'labels.inputs.Interest method' | translate }}: - {{ loanProduct.allowAttributeOverrides.interestType | yesNo }} + {{ 'labels.inputs.Loan Schedule Type' | translate }}: + {{ loanProduct.loanScheduleType.value | translateKey: 'catalogs' }} - {{ 'labels.inputs.Repayment strategy' | translate }}: - {{ loanProduct.allowAttributeOverrides.transactionProcessingStrategyCode | yesNo }} + {{ 'labels.inputs.Repayment Strategy' | translate }}: + {{ + loanProduct.transactionProcessingStrategyName | translateKey: 'catalogs' + }} + @if (isAdvancedPaymentAllocation) { + + {{ 'labels.inputs.Loan Schedule Processing Type' | translate }}: + {{ loanProduct.loanScheduleProcessingType.value }} + + } + @if (isAdvancedPaymentAllocation) { + + {{ 'labels.inputs.Advanced Payment Allocation Transactions' | translate }}: + + + @for (paymentAllocation of paymentAllocations; track paymentAllocation) { + + + } + + + + } + @if (isAdvancedPaymentAllocation && creditAllocations.length > 0) { + + {{ 'labels.inputs.Advanced Credit Allocation Transactions' | translate }}: + + + @for (creditAllocation of creditAllocations; track creditAllocation) { + + + } + + + + } + @if (isAdvancedPaymentAllocation && supportedInterestRefundTypes?.length > 0) { + + {{ 'labels.inputs.Supported Interest Refund Types' | translate }}: + + {{ mapHumanReadableValueStringEnumOptionDataList(supportedInterestRefundTypes) }} + + + } + {{ 'labels.inputs.Down Payments' | translate }} + - {{ 'labels.inputs.Interest calculation period' | translate }}: - {{ loanProduct.allowAttributeOverrides.interestCalculationPeriodType | yesNo }} + {{ 'labels.inputs.Enable Down Payments' | translate }}: + {{ loanProduct.enableDownPayment | yesNo }} + @if (loanProduct.enableDownPayment) { + + {{ 'labels.inputs.Disbursed Amount Percentage Down Payment' | translate }} (%): + {{ loanProduct.disbursedAmountPercentageForDownPayment }} % + + } + @if (loanProduct.enableDownPayment) { + + {{ 'labels.inputs.Enable Auto Repayment for Down Payment' | translate }}: + {{ loanProduct.enableAutoRepaymentForDownPayment | yesNo }} + + } + @if (isAdvancedPaymentAllocation) { + + {{ 'labels.inputs.Loan Charge-off behaviour' | translate }} + + + {{ 'labels.inputs.Loan Charge-off behaviour' | translate }}: + {{ loanProduct.chargeOffBehaviour.value | translateKey: 'catalogs' }} + + + } + {{ 'labels.heading.Moratorium' | translate }} + @if (loanProduct.delinquencyBucket) { + + {{ 'labels.inputs.Delinquency Bucket' | translate }}: + @if (loanProduct.delinquencyBucket.name) { + {{ loanProduct.delinquencyBucket.name }} + } + @if (!loanProduct.delinquencyBucket.name) { + {{ 'labels.inputs.Unassigned' | translate }} + } + + } + @if (!loanProduct.delinquencyBucket) { + + {{ 'labels.inputs.Delinquency Bucket' | translate }}: + {{ 'labels.inputs.Unassigned' | translate }} + + } + @if (loanProduct.delinquencyBucket) { + + {{ 'labels.inputs.Enable installment level Delinquency' | translate }}: + {{ loanProduct.enableInstallmentLevelDelinquency | yesNo }} + + } + @if (loanProduct.graceOnPrincipalPayment) { + + {{ 'labels.inputs.Grace on principal payment' | translate }}: + {{ loanProduct.graceOnPrincipalPayment }} + + } + @if (loanProduct.graceOnInterestPayment) { + + {{ 'labels.inputs.Grace on interest payment' | translate }}: + {{ loanProduct.graceOnInterestPayment }} + + } + @if (loanProduct.graceOnInterestCharged) { + + {{ 'labels.inputs.Interest free period' | translate }}: + {{ loanProduct.graceOnInterestCharged }} + + } + @if (loanProduct.inArrearsTolerance) { + + {{ 'labels.inputs.Arrears tolerance' | translate }}: + {{ loanProduct.inArrearsTolerance }} + + } - {{ 'labels.inputs.Arrears tolerance' | translate }}: - {{ loanProduct.allowAttributeOverrides.inArrearsTolerance | yesNo }} + {{ 'labels.inputs.Days in year' | translate }}: + {{ loanProduct.daysInYearType?.value | translateKey: 'catalogs' }} + @if (isAdvancedPaymentAllocation && loanProduct.daysInYearCustomStrategy) { + + {{ 'labels.inputs.Days in year custom strategy' | translate }}: + {{ loanProduct.daysInYearCustomStrategy.value | translateKey: 'catalogs' }} + + } - {{ 'labels.inputs.Repaid every' | translate }}: - {{ loanProduct.allowAttributeOverrides.repaymentEvery | yesNo }} + {{ 'labels.inputs.Days in month' | translate }}: + {{ loanProduct.daysInMonthType?.value | translateKey: 'catalogs' }} - {{ 'labels.inputs.Moratorium' | translate }}: - {{ loanProduct.allowAttributeOverrides.graceOnPrincipalAndInterestPayment | yesNo }} + {{ 'labels.inputs.Allow fixing of the installment amount' | translate }}: + {{ loanProduct.canDefineInstallmentAmount | yesNo }} + @if (loanProduct.graceOnArrearsAgeing) { + + {{ 'labels.inputs.Number of days a loan may be overdue before moving into arrears' | translate }}: + {{ loanProduct.graceOnArrearsAgeing }} + + } + @if (loanProduct.overdueDaysForNPA) { + + {{ + 'labels.inputs.Maximum number of days a loan may be overdue before becoming a NPA (non performing asset)' + | translate + }}: + {{ loanProduct.overdueDaysForNPA }} + + } {{ 'labels.inputs.Number of days a loan may be overdue before moving into arrears' | translate }}:{{ 'labels.inputs.Account moves out of NPA only after all arrears have been cleared' | translate }}: - {{ loanProduct.allowAttributeOverrides.graceOnArrearsAgeing | yesNo }} + {{ loanProduct.accountMovesOutOfNPAOnlyOnArrearsCompletion | yesNo }} - - - - {{ 'labels.heading.Charges' | translate }} - - - - - - {{ 'labels.inputs.Name' | translate }} - - {{ charge.name + ', ' + charge.currency.displaySymbol }} - - - - - {{ 'labels.inputs.Charge Type' | translate }} - - {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ charge.amount | formatNumber }} - - - - - {{ 'labels.inputs.Collected On' | translate }} - - {{ charge.chargeTimeType.value | translateKey: 'catalogs' }} - - - - - - - - {{ 'labels.inputs.Overdue Charges' | translate }} - - - - - - {{ 'labels.inputs.Name' | translate }} - - {{ overdueCharge.name + ', ' + overdueCharge.currency.displaySymbol }} - - - - - {{ 'labels.inputs.Charge Type' | translate }} - - {{ overdueCharge.chargeCalculationType.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ overdueCharge.amount | formatNumber }} - - - - - {{ 'labels.inputs.Collected On' | translate }} - - {{ overdueCharge.chargeTimeType.value | translateKey: 'catalogs' }} - - - - - - - - - - {{ 'labels.inputs.Income capitalization' | translate }} - - - - - {{ 'labels.inputs.Enable income capitalization' | translate }}: - {{ loanProduct.enableIncomeCapitalization | yesNo }} - - - - {{ 'labels.inputs.Income capitalization calculation type' | translate }}: - {{ loanProduct.capitalizedIncomeCalculationType?.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Income capitalization strategy' | translate }}: - {{ loanProduct.capitalizedIncomeStrategy?.value | translateKey: 'catalogs' }} + @if (loanProduct.principalThresholdForLastInstallment) { + + {{ 'labels.inputs.Principal Threshold (%) for Last Instalment' | translate }}: + {{ loanProduct.principalThresholdForLastInstallment }} + + } + + {{ 'labels.inputs.Variable Installments allowed' | translate }}: + {{ loanProduct.allowVariableInstallments | yesNo }} - - - {{ 'labels.inputs.Income type' | translate }}: - {{ loanProduct.capitalizedIncomeType?.value | translateKey: 'catalogs' }} + @if (loanProduct.allowVariableInstallments) { + + {{ 'labels.inputs.Variable Installments' | translate }}: + {{ + '(Min: ' + + loanProduct.minimumGap + + ', Max: ' + + (loanProduct.maximumGap ? loanProduct.maximumGap : loanProduct.minimumGap) + + ')' + }} + + } + + {{ 'labels.inputs.Allowed to be used for providing Topup Loans' | translate }}: + {{ loanProduct.canUseForTopup | yesNo }} - - - - {{ 'labels.inputs.Buy down fees' | translate }} - + {{ 'labels.heading.Interest Recalculation' | translate }} - - - {{ 'labels.inputs.Enable Buy down fee' | translate }}: - {{ loanProduct.enableBuyDownFee | yesNo }} - - - - {{ 'labels.inputs.Buy down fee calculation type' | translate }}: - {{ loanProduct.buyDownFeeCalculationType?.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Buy down fee strategy' | translate }}: - {{ loanProduct.buyDownFeeStrategy?.value | translateKey: 'catalogs' }} + + {{ 'labels.inputs.Recalculate Interest' | translate }}: + {{ loanProduct.isInterestRecalculationEnabled | yesNo }} - - - {{ 'labels.inputs.Buy down fee income type' | translate }}: - {{ loanProduct.buyDownFeeIncomeType?.value | translateKey: 'catalogs' }} + @if (loanProduct.isInterestRecalculationEnabled) { + + + {{ 'labels.inputs.Pre-closure interest calculation rule' | translate }}: + {{ + loanProduct.interestRecalculationData.preClosureInterestCalculationStrategy.value + }} + + + {{ 'labels.inputs.Advance payments adjustment type' | translate }}: + {{ loanProduct.interestRecalculationData.rescheduleStrategyType.value }} + + + {{ 'labels.inputs.Interest recalculation compounding on' | translate }}: + {{ + loanProduct.interestRecalculationData.interestRecalculationCompoundingType.value + }} + + @if (loanProduct.interestRecalculationData.interestRecalculationCompoundingType.id !== 0) { + + {{ 'labels.inputs.Frequency for compounding' | translate }}: + + {{ loanProduct.interestRecalculationData.recalculationCompoundingFrequencyType.value }} + @if ( + loanProduct.interestRecalculationData.recalculationCompoundingFrequencyType.id === 4 && + loanProduct.interestRecalculationData.recalculationCompoundingFrequencyNthDay + ) { + {{ + 'on ' + loanProduct.interestRecalculationData.recalculationCompoundingFrequencyNthDay?.value + }} + } + @if ( + (loanProduct.interestRecalculationData.recalculationCompoundingFrequencyType.id === 4 && + !loanProduct.interestRecalculationData.recalculationCompoundingFrequencyOnDay) || + loanProduct.interestRecalculationData.recalculationCompoundingFrequencyType.id === 3 + ) { + {{ + loanProduct.interestRecalculationData.recalculationCompoundingFrequencyWeekday?.value + }} + } + @if ( + loanProduct.interestRecalculationData.recalculationCompoundingFrequencyType.id === 4 && + loanProduct.interestRecalculationData.recalculationCompoundingFrequencyOnDay + ) { + {{ + 'on day ' + loanProduct.interestRecalculationData.recalculationCompoundingFrequencyOnDay + }} + } + + @if (loanProduct.interestRecalculationData.recalculationCompoundingFrequencyType.id !== 1) { + + {{ 'labels.inputs.Frequency Interval for compounding' | translate }}: + {{ + loanProduct.interestRecalculationData.recalculationCompoundingFrequencyInterval + }} + + } + + } + + {{ 'labels.inputs.Frequency for recalculate Outstanding Principal' | translate }}: + + {{ loanProduct.interestRecalculationData.recalculationRestFrequencyType.value }} + @if ( + loanProduct.interestRecalculationData.recalculationRestFrequencyType.id === 4 && + loanProduct.interestRecalculationData.recalculationRestFrequencyNthDay + ) { + {{ + 'on ' + loanProduct.interestRecalculationData.recalculationRestFrequencyNthDay?.value + }} + } + @if ( + (loanProduct.interestRecalculationData.recalculationRestFrequencyType.id === 4 && + !loanProduct.interestRecalculationData.recalculationRestFrequencyOnDay) || + loanProduct.interestRecalculationData.recalculationRestFrequencyType.id === 3 + ) { + {{ loanProduct.interestRecalculationData.recalculationRestFrequencyWeekday?.value }} + } + @if ( + loanProduct.interestRecalculationData.recalculationRestFrequencyType.id === 4 && + loanProduct.interestRecalculationData.recalculationRestFrequencyOnDay + ) { + {{ + 'on day ' + loanProduct.interestRecalculationData.recalculationRestFrequencyOnDay + }} + } + + + @if (loanProduct.interestRecalculationData.recalculationRestFrequencyType.id !== 1) { + + {{ 'labels.inputs.Frequency Interval for recalculation' | translate }}: + {{ loanProduct.interestRecalculationData.recalculationRestFrequencyInterval }} + @if (loanProduct.recalculationRestFrequencyDate) { + + {{ 'labels.inputs.Rest Frequency Date' | translate }}: + {{ loanProduct.interestRecalculationData.recalculationRestFrequencyDate }} + + } + + } + + {{ 'labels.inputs.Is Arrears recognization based on original schedule' | translate }}: + {{ + loanProduct.interestRecalculationData.isArrearsBasedOnOriginalSchedule | yesNo + }} + + @if (loanProduct.loanScheduleType.code === 'PROGRESSIVE') { + + {{ 'labels.inputs.Do not calculate interest on past due principal balances' | translate }}: + {{ + loanProduct.interestRecalculationData.disallowInterestCalculationOnPastDue | yesNo + }} + + } + + } + {{ 'labels.heading.Guarantee Requirements' | translate }} + + + {{ 'labels.inputs.Place Guarantee Funds On-Hold' | translate }}: + {{ loanProduct.holdGuaranteeFunds | yesNo }} - - - {{ 'labels.inputs.Merchant Buy down fee' | translate }}: - {{ loanProduct.merchantBuyDownFee | yesNo }} + @if (loanProduct.holdGuaranteeFunds) { + + {{ 'labels.inputs.Mandatory Guarantee' | translate }} (%): + {{ loanProduct.productGuaranteeData.mandatoryGuarantee }} + @if (loanProduct.productGuaranteeData.minimumGuaranteeFromOwnFunds) { + + {{ 'labels.inputs.Minimum Guarantee from Own Funds' | translate }} (%): + {{ loanProduct.productGuaranteeData.minimumGuaranteeFromOwnFunds }} + + } + @if (loanProduct.productGuaranteeData.minimumGuaranteeFromGuarantor) { + + {{ 'labels.inputs.Minimum Guarantee from Guarantor Funds' | translate }} (%): + {{ loanProduct.productGuaranteeData.minimumGuaranteeFromGuarantor }} + + } + + } + {{ 'labels.heading.Loan Tranche Details' | translate }} + + + {{ 'labels.inputs.Enable Multiple Disbursals' | translate }}: + {{ loanProduct.multiDisburseLoan | yesNo }} - - - {{ 'labels.heading.Accounting' | translate }} - - - - - {{ 'labels.inputs.Type' | translate }}: - {{ - 'labels.accounting.' + getAccountingRuleName(accountingRuleData[accountingRule() - 1]) | translate - }} - - - - {{ 'labels.inputs.Enable Accrual Activity Posting on Installment Due Date' | translate }}: - {{ loanProduct.enableAccrualActivityPosting | yesNo }} - - - - - {{ 'labels.heading.Assets' | translate }} / {{ 'labels.heading.Liabilities' | translate }} - - - - + {{ 'labels.inputs.Maximum Tranche count' | translate }}: + {{ loanProduct.maxTrancheCount }} + @if (loanProduct.outstandingLoanBalance) { + + {{ 'labels.inputs.Maximum allowed outstanding balance' | translate }}: + {{ loanProduct.outstandingLoanBalance }} + + } + + {{ 'labels.inputs.Disallow Expected Disbursements' | translate }}: + {{ loanProduct.disallowExpectedDisbursements | yesNo }} + + + } + {{ 'labels.heading.Event Settings' | translate }} + + {{ + 'labels.inputs.Use the Global Configurations values to the Repayment Event (notifications)' | translate + }}: - + {{ useDueForRepaymentsConfigurations | yesNo }} - - {{ 'labels.heading.Assets' | translate }} - - - - + {{ 'labels.inputs.Due days for repayment event' | translate }}: + {{ loanProduct.dueDaysForRepaymentEvent | number }} + + } + @if (loanProduct.overDueDaysForRepaymentEvent) { + + {{ 'labels.inputs.OverDue days for repayment event' | translate }}: + {{ loanProduct.overDueDaysForRepaymentEvent | number }} + + } + {{ 'labels.inputs.Configurable Terms and Settings' | translate }} + + + {{ 'labels.inputs.Allow overriding select terms and settings in loan accounts' | translate }}: + {{ loanProduct.allowAttributeConfiguration | yesNo }} + + @if (loanProduct.allowAttributeConfiguration) { + + + {{ 'labels.inputs.Amortization' | translate }}: + {{ loanProduct.allowAttributeOverrides.amortizationType | yesNo }} + + + {{ 'labels.inputs.Interest method' | translate }}: + {{ loanProduct.allowAttributeOverrides.interestType | yesNo }} + + + {{ 'labels.inputs.Repayment strategy' | translate }}: + {{ + loanProduct.allowAttributeOverrides.transactionProcessingStrategyCode | yesNo + }} + + + {{ 'labels.inputs.Interest calculation period' | translate }}: + {{ loanProduct.allowAttributeOverrides.interestCalculationPeriodType | yesNo }} + + + {{ 'labels.inputs.Arrears tolerance' | translate }}: + {{ loanProduct.allowAttributeOverrides.inArrearsTolerance | yesNo }} + + + {{ 'labels.inputs.Repaid every' | translate }}: + {{ loanProduct.allowAttributeOverrides.repaymentEvery | yesNo }} + + + {{ 'labels.inputs.Moratorium' | translate }}: + {{ + loanProduct.allowAttributeOverrides.graceOnPrincipalAndInterestPayment | yesNo + }} + + + {{ 'labels.inputs.Number of days a loan may be overdue before moving into arrears' | translate }}: + {{ loanProduct.allowAttributeOverrides.graceOnArrearsAgeing | yesNo }} + + + } + @if (loanProduct.charges.length) { + + {{ 'labels.heading.Charges' | translate }} + + + + {{ 'labels.inputs.Name' | translate }} + + {{ charge.name + ', ' + charge.currency.displaySymbol }} + + + + {{ 'labels.inputs.Charge Type' | translate }} + + {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} + + + + {{ 'labels.inputs.Amount' | translate }} + + {{ charge.amount | formatNumber }} + + + + {{ 'labels.inputs.Collected On' | translate }} + + {{ charge.chargeTimeType.value | translateKey: 'catalogs' }} + + + + + + {{ 'labels.inputs.Overdue Charges' | translate }} + + + + {{ 'labels.inputs.Name' | translate }} + + {{ overdueCharge.name + ', ' + overdueCharge.currency.displaySymbol }} + + + + {{ 'labels.inputs.Charge Type' | translate }} + + {{ overdueCharge.chargeCalculationType.value | translateKey: 'catalogs' }} + + + + {{ 'labels.inputs.Amount' | translate }} + + {{ overdueCharge.amount | formatNumber }} + + + + {{ 'labels.inputs.Collected On' | translate }} + + {{ overdueCharge.chargeTimeType.value | translateKey: 'catalogs' }} + + + + + + + } + @if (isAdvancedPaymentAllocation) { + + {{ 'labels.inputs.Income capitalization' | translate }} + + + {{ 'labels.inputs.Enable income capitalization' | translate }}: + {{ loanProduct.enableIncomeCapitalization | yesNo }} + + @if (loanProduct.enableIncomeCapitalization) { + + {{ 'labels.inputs.Income capitalization calculation type' | translate }}: + {{ + loanProduct.capitalizedIncomeCalculationType?.value | translateKey: 'catalogs' + }} + + } + @if (loanProduct.enableIncomeCapitalization) { + + {{ 'labels.inputs.Income capitalization strategy' | translate }}: + {{ loanProduct.capitalizedIncomeStrategy?.value | translateKey: 'catalogs' }} + + } + @if (loanProduct.enableIncomeCapitalization) { + + {{ 'labels.inputs.Income type' | translate }}: + {{ loanProduct.capitalizedIncomeType?.value | translateKey: 'catalogs' }} + + } + + } + @if (isAdvancedPaymentAllocation) { + + {{ 'labels.inputs.Buy down fees' | translate }} + + + {{ 'labels.inputs.Enable Buy down fee' | translate }}: + {{ loanProduct.enableBuyDownFee | yesNo }} + + @if (loanProduct.enableBuyDownFee) { + + {{ 'labels.inputs.Buy down fee calculation type' | translate }}: + {{ loanProduct.buyDownFeeCalculationType?.value | translateKey: 'catalogs' }} + + } + @if (loanProduct.enableBuyDownFee) { + + {{ 'labels.inputs.Buy down fee strategy' | translate }}: + {{ loanProduct.buyDownFeeStrategy?.value | translateKey: 'catalogs' }} + + } + @if (loanProduct.enableBuyDownFee) { + + {{ 'labels.inputs.Buy down fee income type' | translate }}: + {{ loanProduct.buyDownFeeIncomeType?.value | translateKey: 'catalogs' }} + + } + @if (loanProduct.enableBuyDownFee) { + + {{ 'labels.inputs.Merchant Buy down fee' | translate }}: + {{ loanProduct.merchantBuyDownFee | yesNo }} + + } + + } + {{ 'labels.heading.Accounting' | translate }} + + + {{ 'labels.inputs.Type' | translate }}: + {{ + 'labels.accounting.' + getAccountingRuleName(accountingRuleData[accountingRule() - 1]) | translate + }} + + @if (isAccountingAccrualBased) { + + {{ 'labels.inputs.Enable Accrual Activity Posting on Installment Due Date' | translate }}: + {{ loanProduct.enableAccrualActivityPosting | yesNo }} + + } + @if (isAccountingEnabled()) { + + + {{ 'labels.heading.Assets' | translate }} / {{ 'labels.heading.Liabilities' | translate }} + + + + + + {{ 'labels.heading.Assets' | translate }} + + + + @if (loanProduct.accountingRule.id === 3 || loanProduct.accountingRule.id === 4) { + + + + + + + + + } + + + + {{ 'labels.heading.Income' | translate }} - - - - - - {{ 'labels.heading.Income' | translate }} - - - - - - - - - - - - - - - - - - - - - {{ 'labels.heading.Expenses' | translate }} - - - - - - - - - - - - - - {{ 'labels.heading.Liabilities' | translate }} - - - - - - - {{ 'labels.heading.Advanced Accounting Rules' | translate }} - - - - 0" class="flex-100 layout-row-wrap responsive-column"> - - {{ 'labels.heading.Configure Fund Sources for Payment Channels' | translate }} - - - - - {{ 'labels.heading.Payment Type' | translate }} - - {{ paymentFundSource.paymentType.name }} - - - - - {{ 'labels.inputs.Fund Source' | translate }} - - {{ paymentFundSource.fundSourceAccount.name }} - - - - - - - - - 0" class="flex-100 layout-row-wrap responsive-column"> - {{ 'labels.heading.Map Fees to Specific Income Accounts' | translate }} - - - - {{ 'labels.catalogs.Fees' | translate }} - - {{ feesIncome.charge.name }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - - {{ feesIncome.incomeAccount.name }} - - - - - - - - - - 0" class="flex-100 layout-row-wrap responsive-column"> - - {{ 'labels.heading.Map Penalties to Specific Income Accounts' | translate }} - - - - - {{ 'labels.inputs.Penalty' | translate }} - - {{ penaltyIncome.charge.name }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ penaltyIncome.incomeAccount.name }} - - - - - - - - - 0" - class="flex-100 layout-row-wrap responsive-column" + - - {{ 'labels.heading.Map Charge-off reasons to Expense accounts' | translate }} - - - - - {{ 'labels.inputs.Charge-off reason' | translate }} - - {{ chargeOffReasonToExpenseAccountMapping.reasonCodeValue.name }} - - - - - {{ 'labels.inputs.Expense Account' | translate }} - - ({{ chargeOffReasonToExpenseAccountMapping.expenseAccount.glCode }}) - {{ chargeOffReasonToExpenseAccountMapping.expenseAccount.name }} - - - - - - - - - - - {{ 'labels.heading.Buydown Fee classifications to Income accounts' | translate }} - - - + @if (accountingMappings.incomeFromChargeOffInterestAccount) { + - - {{ 'labels.inputs.Classification' | translate }} - - {{ classificationToIncomeAccountMapping.classificationCodeValue.name }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - ({{ classificationToIncomeAccountMapping.incomeAccount.glCode }}) - {{ classificationToIncomeAccountMapping.incomeAccount.name }} - - - - - - - - - 0" - class="flex-100 layout-row-wrap responsive-column" - > - - {{ 'labels.heading.Capitalized Income classifications to Income accounts' | translate }} - - - + } + @if (accountingMappings.incomeFromChargeOffFeesAccount) { + - - {{ 'labels.inputs.Classification' | translate }} - - {{ capitalizedIncomeClassificationToIncomeAccountMapping.classificationCodeValue.name }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - ({{ capitalizedIncomeClassificationToIncomeAccountMapping.incomeAccount.glCode }}) - {{ capitalizedIncomeClassificationToIncomeAccountMapping.incomeAccount.name }} - - - - - - - - - 0" class="flex-100 layout-row-wrap responsive-column"> - - {{ 'labels.heading.WriteOff reasons to Expense accounts' | translate }} - - - - - {{ 'labels.inputs.WriteOff Reason' | translate }} - - {{ writeOffReasonsToExpenseMapping.reasonCodeValue.name }} - - - - - {{ 'labels.inputs.Expense Account' | translate }} - - ({{ writeOffReasonsToExpenseMapping.expenseAccount.glCode }}) - {{ writeOffReasonsToExpenseMapping.expenseAccount.name }} - - - - - - + + } + @if (accountingMappings.incomeFromChargeOffPenaltyAccount) { + + + } + @if (accountingMappings.incomeFromCapitalizationAccount) { + + + } + @if (accountingMappings.incomeFromBuyDownAccount) { + + + } + {{ 'labels.heading.Expenses' | translate }} + + + + + + @if (accountingMappings.chargeOffExpenseAccount) { + + + } + @if (accountingMappings.chargeOffFraudExpenseAccount) { + + + } + @if (accountingMappings.buyDownExpenseAccount) { + + + } + {{ 'labels.heading.Liabilities' | translate }} + + + @if (accountingMappings.deferredIncomeLiabilityAccount) { + + + } + @if (isAdvancedAccountingEnabled()) { + + {{ 'labels.heading.Advanced Accounting Rules' | translate }} + + @if (paymentChannelToFundSourceMappings?.length > 0) { + + + {{ 'labels.heading.Configure Fund Sources for Payment Channels' | translate }} + + + + {{ 'labels.heading.Payment Type' | translate }} + + {{ paymentFundSource.paymentType.name }} + + + + {{ 'labels.inputs.Fund Source' | translate }} + + {{ paymentFundSource.fundSourceAccount.name }} + + + + + + + } + @if (feeToIncomeAccountMappings?.length > 0) { + + + {{ 'labels.heading.Map Fees to Specific Income Accounts' | translate }} + + + + {{ 'labels.catalogs.Fees' | translate }} + + {{ feesIncome.charge.name }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + @if (feesIncome.incomeAccount) { + + {{ feesIncome.incomeAccount.name }} + + } + + + + + + + } + @if (penaltyToIncomeAccountMappings?.length > 0) { + + + {{ 'labels.heading.Map Penalties to Specific Income Accounts' | translate }} + + + + {{ 'labels.inputs.Penalty' | translate }} + + {{ penaltyIncome.charge.name }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ penaltyIncome.incomeAccount.name }} + + + + + + + } + @if (chargeOffReasonToExpenseAccountMappings?.length > 0) { + + + {{ 'labels.heading.Map Charge-off reasons to Expense accounts' | translate }} + + + + {{ 'labels.inputs.Charge-off reason' | translate }} + + {{ chargeOffReasonToExpenseAccountMapping.reasonCodeValue.name }} + + + + {{ 'labels.inputs.Expense Account' | translate }} + + ({{ chargeOffReasonToExpenseAccountMapping.expenseAccount.glCode }}) + {{ chargeOffReasonToExpenseAccountMapping.expenseAccount.name }} + + + + + + + } + + + {{ 'labels.heading.Buydown Fee classifications to Income accounts' | translate }} + + + + {{ 'labels.inputs.Classification' | translate }} + + {{ classificationToIncomeAccountMapping.classificationCodeValue.name }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + ({{ classificationToIncomeAccountMapping.incomeAccount.glCode }}) + {{ classificationToIncomeAccountMapping.incomeAccount.name }} + + + + + + + @if (capitalizedIncomeClassificationToIncomeAccountMappings?.length > 0) { + + + {{ 'labels.heading.Capitalized Income classifications to Income accounts' | translate }} + + + + {{ 'labels.inputs.Classification' | translate }} + + {{ capitalizedIncomeClassificationToIncomeAccountMapping.classificationCodeValue.name }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + ({{ capitalizedIncomeClassificationToIncomeAccountMapping.incomeAccount.glCode }}) + {{ capitalizedIncomeClassificationToIncomeAccountMapping.incomeAccount.name }} + + + + + + + } + @if (writeOffReasonsToExpenseMappings?.length > 0) { + + + {{ 'labels.heading.WriteOff reasons to Expense accounts' | translate }} + + + + {{ 'labels.inputs.WriteOff Reason' | translate }} + + {{ writeOffReasonsToExpenseMapping.reasonCodeValue.name }} + + + + {{ 'labels.inputs.Expense Account' | translate }} + + ({{ writeOffReasonsToExpenseMapping.expenseAccount.glCode }}) + {{ writeOffReasonsToExpenseMapping.expenseAccount.name }} + + + + + + + } + + } - + } - +} diff --git a/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.ts b/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.ts index e189bbdd41..0ff03a36bf 100644 --- a/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.ts +++ b/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'; +import { Component, Input, OnChanges, OnInit, SimpleChanges, inject } from '@angular/core'; import { AccountingMappingDTO, DelinquencyBucket, LoanProduct } from '../../models/loan-product.model'; import { AccountingMapping, @@ -71,6 +71,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanProductSummaryComponent implements OnInit, OnChanges { + private accounting = inject(Accounting); + @Input() action: string; @Input() loanProduct: LoanProduct; @Input() loanProductsTemplate: any | null; @@ -119,7 +121,10 @@ export class LoanProductSummaryComponent implements OnInit, OnChanges { capitalizedIncomeClassificationToIncomeAccountMappings: ClassificationToIncomeAccountMapping[] = []; writeOffReasonsToExpenseMappings: ChargeOffReasonToExpenseAccountMapping[] = []; - constructor(private accounting: Accounting) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { this.accountingRuleData = this.accounting.getAccountingRulesForLoans(); diff --git a/src/app/products/loan-products/create-loan-product/create-loan-product.component.html b/src/app/products/loan-products/create-loan-product/create-loan-product.component.html index ac962bfe64..1c864086e6 100644 --- a/src/app/products/loan-products/create-loan-product/create-loan-product.component.html +++ b/src/app/products/loan-products/create-loan-product/create-loan-product.component.html @@ -53,34 +53,35 @@ - - {{ 'labels.inputs.INTEREST REFUND' | translate }} - - - - - - - - {{ 'labels.inputs.PAYMENT ALLOCATION' | translate }} - - - - - - + @if (isAdvancedPaymentStrategy) { + + {{ 'labels.inputs.INTEREST REFUND' | translate }} + + + + + } + + @if (isAdvancedPaymentStrategy) { + + {{ 'labels.inputs.PAYMENT ALLOCATION' | translate }} + + + + + } {{ 'labels.inputs.TERMS' | translate }} @@ -99,22 +100,23 @@ - - {{ 'labels.inputs.DEFERRED INCOME RECOGNITION' | translate }} - - - - - + @if (isAdvancedPaymentStrategy) { + + {{ 'labels.inputs.DEFERRED INCOME RECOGNITION' | translate }} + + + + + } {{ 'labels.inputs.ACCOUNTING' | translate }} @@ -128,16 +130,17 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (loanProductFormValid) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/products/loan-products/create-loan-product/create-loan-product.component.ts b/src/app/products/loan-products/create-loan-product/create-loan-product.component.ts index 0d64dad7fa..438172c820 100644 --- a/src/app/products/loan-products/create-loan-product/create-loan-product.component.ts +++ b/src/app/products/loan-products/create-loan-product/create-loan-product.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Components */ @@ -58,6 +58,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateLoanProductComponent implements OnInit { + private route = inject(ActivatedRoute); + private productsService = inject(ProductsService); + private loanProducts = inject(LoanProducts); + private router = inject(Router); + private accounting = inject(Accounting); + private advancedPaymentStrategy = inject(AdvancedPaymentStrategy); + @ViewChild(LoanProductDetailsStepComponent, { static: true }) loanProductDetailsStep: LoanProductDetailsStepComponent; @ViewChild(LoanProductCurrencyStepComponent, { static: true }) loanProductCurrencyStep: LoanProductCurrencyStepComponent; @@ -86,20 +93,18 @@ export class CreateLoanProductComponent implements OnInit { deferredIncomeRecognition: DeferredIncomeRecognition | null = null; loanIncomeCapitalizationForm: UntypedFormGroup | null = null; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route. * @param {ProductsService} productsService Product Service. * @param {LoanProducts} loanProducts LoanProducts * @param {Router} router Router for navigation. */ - constructor( - private route: ActivatedRoute, - private productsService: ProductsService, - private loanProducts: LoanProducts, - private router: Router, - private accounting: Accounting, - private advancedPaymentStrategy: AdvancedPaymentStrategy - ) { + constructor() { + const loanProducts = this.loanProducts; + this.route.data.subscribe((data: { loanProductsTemplate: any; configurations: any }) => { this.loanProductsTemplate = data.loanProductsTemplate; const assetAccountData = this.loanProductsTemplate.accountingMappingOptions.assetAccountOptions || []; diff --git a/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.html b/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.html index 1315fd3647..1cca5bf1f9 100644 --- a/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.html +++ b/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.html @@ -53,34 +53,35 @@ - - {{ 'labels.inputs.INTEREST REFUND' | translate }} - - - - - - - - {{ 'labels.inputs.PAYMENT ALLOCATION' | translate }} - - - - - - + @if (isAdvancedPaymentStrategy) { + + {{ 'labels.inputs.INTEREST REFUND' | translate }} + + + + + } + + @if (isAdvancedPaymentStrategy) { + + {{ 'labels.inputs.PAYMENT ALLOCATION' | translate }} + + + + + } {{ 'labels.inputs.TERMS' | translate }} @@ -99,23 +100,23 @@ - - {{ 'labels.inputs.DEFERRED INCOME RECOGNITION' | translate }} - - - - - - + @if (isAdvancedPaymentStrategy) { + + {{ 'labels.inputs.DEFERRED INCOME RECOGNITION' | translate }} + + + + + } {{ 'labels.inputs.ACCOUNTING' | translate }} @@ -129,16 +130,17 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (loanProductFormValidAndNotPristine) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.ts b/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.ts index a1d56a9799..d2ab7d6093 100644 --- a/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.ts +++ b/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Components */ @@ -61,6 +61,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditLoanProductComponent implements OnInit { + private route = inject(ActivatedRoute); + private productsService = inject(ProductsService); + private loanProducts = inject(LoanProducts); + private router = inject(Router); + private accounting = inject(Accounting); + private advancedPaymentStrategy = inject(AdvancedPaymentStrategy); + @ViewChild(LoanProductDetailsStepComponent, { static: true }) loanProductDetailsStep: LoanProductDetailsStepComponent; @ViewChild(LoanProductCurrencyStepComponent, { static: true }) loanProductCurrencyStep: LoanProductCurrencyStepComponent; @@ -90,6 +97,9 @@ export class EditLoanProductComponent implements OnInit { deferredIncomeRecognition: DeferredIncomeRecognition | null = null; loanIncomeCapitalizationForm: UntypedFormGroup | null = null; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route. * @param {ProductsService} productsService Product Service. @@ -97,14 +107,9 @@ export class EditLoanProductComponent implements OnInit { * @param {Router} router Router for navigation. */ - constructor( - private route: ActivatedRoute, - private productsService: ProductsService, - private loanProducts: LoanProducts, - private router: Router, - private accounting: Accounting, - private advancedPaymentStrategy: AdvancedPaymentStrategy - ) { + constructor() { + const loanProducts = this.loanProducts; + this.route.data.subscribe((data: { loanProductAndTemplate: any; configurations: any }) => { this.loanProductAndTemplate = data.loanProductAndTemplate; const assetAccountData = this.loanProductAndTemplate.accountingMappingOptions.assetAccountOptions || []; diff --git a/src/app/products/loan-products/edit-loan-product/loan-product-and-template.resolver.ts b/src/app/products/loan-products/edit-loan-product/loan-product-and-template.resolver.ts index 6fe9cfd4a1..71ff9de2e4 100644 --- a/src/app/products/loan-products/edit-loan-product/loan-product-and-template.resolver.ts +++ b/src/app/products/loan-products/edit-loan-product/loan-product-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../../products.service'; */ @Injectable() export class LoanProductAndTemplateResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the loan product and template data. diff --git a/src/app/products/loan-products/loan-product-datatable.resolver.ts b/src/app/products/loan-products/loan-product-datatable.resolver.ts index 983512ee39..a7cef5356f 100644 --- a/src/app/products/loan-products/loan-product-datatable.resolver.ts +++ b/src/app/products/loan-products/loan-product-datatable.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; import { SystemService } from 'app/system/system.service'; import { Observable } from 'rxjs'; @@ -7,10 +7,15 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class LoanProductDatatableResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService Products service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the loan product data. diff --git a/src/app/products/loan-products/loan-product-datatables.resolver.ts b/src/app/products/loan-products/loan-product-datatables.resolver.ts index 0f4e6059d0..850d32d7b3 100644 --- a/src/app/products/loan-products/loan-product-datatables.resolver.ts +++ b/src/app/products/loan-products/loan-product-datatables.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; import { SystemService } from 'app/system/system.service'; import { Observable } from 'rxjs'; @@ -7,10 +7,15 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class LoanProductDatatablesResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService Products service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the loan product data. diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/advanced-accounting-mapping-rule/advanced-accounting-mapping-rule.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/advanced-accounting-mapping-rule/advanced-accounting-mapping-rule.component.html index 97b1931296..c7e16ea9af 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/advanced-accounting-mapping-rule/advanced-accounting-mapping-rule.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/advanced-accounting-mapping-rule/advanced-accounting-mapping-rule.component.html @@ -9,32 +9,31 @@ {{ 'labels.buttons.Add' | translate }} - - - {{ 'labels.inputs.' + textField | translate }} - - {{ item.value.name }} - - - - - {{ 'labels.inputs.GL Account Name or Code' | translate }} - ({{ item.glAccount.glCode }}) {{ item.glAccount.name }} - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - + @if (tableData.length !== 0) { + + + {{ 'labels.inputs.' + textField | translate }} + + {{ item.value.name }} + + + + {{ 'labels.inputs.GL Account Name or Code' | translate }} + ({{ item.glAccount.glCode }}) {{ item.glAccount.name }} + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/advanced-accounting-mapping-rule/advanced-accounting-mapping-rule.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/advanced-accounting-mapping-rule/advanced-accounting-mapping-rule.component.ts index 12e3825edd..604f589d5a 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/advanced-accounting-mapping-rule/advanced-accounting-mapping-rule.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/advanced-accounting-mapping-rule/advanced-accounting-mapping-rule.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { Component, EventEmitter, Input, OnInit, Output, inject } from '@angular/core'; import { UntypedFormArray } from '@angular/forms'; import { MatIconButton } from '@angular/material/button'; import { MatDialog } from '@angular/material/dialog'; @@ -45,6 +45,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; styleUrl: './advanced-accounting-mapping-rule.component.scss' }) export class AdvancedAccountingMappingRuleComponent implements OnInit { + dialog = inject(MatDialog); + translateService = inject(TranslateService); + @Input() formType: string; @Input() formArray: UntypedFormArray; @Input() textHeading: string; @@ -73,10 +76,10 @@ export class AdvancedAccountingMappingRuleComponent implements OnInit { 'actions' ]; - constructor( - public dialog: MatDialog, - public translateService: TranslateService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.tableData = this.formArray?.value || []; diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/loan-product-accounting-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/loan-product-accounting-step.component.html index 0e237c1bbc..4239bcb8e9 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/loan-product-accounting-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/loan-product-accounting-step.component.html @@ -4,551 +4,493 @@ class="flex-98 layout-row gap-5percent layout-lt-md-column radio-group-spacing" formControlName="accountingRule" > - - {{ 'labels.accounting.' + accountingRule | translate }} - + @for (accountingRule of accountingRuleData; track accountingRule; let i = $index) { + + {{ 'labels.accounting.' + accountingRule | translate }} + + } - = 2 && loanProductAccountingForm.value.accountingRule <= 4" - class="flex-100 layout-row-wrap responsive-column" - > - {{ - 'labels.inputs.Enable Accrual Activity Posting on Installment Due Date' | translate - }} - - - {{ 'labels.heading.Assets' | translate }} / {{ 'labels.heading.Liabilities' | translate }} - - - - - - {{ 'labels.heading.Assets' | translate }} - - - - - - - - + @if (loanProductAccountingForm.value.accountingRule >= 2 && loanProductAccountingForm.value.accountingRule <= 4) { + + @if (isAccountingAccrualBased) { + {{ + 'labels.inputs.Enable Accrual Activity Posting on Installment Due Date' | translate + }} + } + + {{ 'labels.heading.Assets' | translate }} / {{ 'labels.heading.Liabilities' | translate }} + - + {{ 'labels.heading.Assets' | translate }} - - - - - - {{ 'labels.heading.Income' | translate }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ 'labels.heading.Expenses' | translate }} - - - - - - - - - - - - - - + + + + + + + + } + + {{ 'labels.heading.Income' | translate }} + + + + + + + + + + + + + + + + + + + + + @if (deferredIncomeRecognition?.capitalizedIncome?.enableIncomeCapitalization) { + + + } + @if (deferredIncomeRecognition?.buyDownFee?.enableBuyDownFee) { + + + } + + {{ 'labels.heading.Expenses' | translate }} + + + + + + + + + @if ( deferredIncomeRecognition?.buyDownFee?.enableBuyDownFee && deferredIncomeRecognition?.buyDownFee?.merchantBuyDownFee - " - [inputFormControl]="loanProductAccountingForm.controls.buyDownExpenseAccountId" - [glAccountList]="expenseAccountData" - [required]="true" - [inputLabel]="'Buy down fee Expense'" - > - - - - - {{ 'labels.heading.Liabilities' | translate }} - - - - - + + } + + {{ 'labels.heading.Liabilities' | translate }} + + + @if ( deferredIncomeRecognition?.capitalizedIncome?.enableIncomeCapitalization || deferredIncomeRecognition?.buyDownFee?.enableBuyDownFee - " - class="flex-48" - [inputFormControl]="loanProductAccountingForm.controls.deferredIncomeLiabilityAccountId" - [glAccountList]="liabilityAccountData" - [required]="true" - [inputLabel]="'Deferred income'" - > - - - - - {{ - 'labels.heading.Advanced Accounting Rules' | translate - }} - - - - {{ 'labels.heading.Configure Fund Sources for Payment Channels' | translate }} - - - - - - {{ 'labels.buttons.Add' | translate }} - - - - - - {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentFundSource.paymentTypeId | find: paymentTypeData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Fund Source' | translate }} - - {{ paymentFundSource.fundSourceAccountId | find: assetAccountData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Actions' | translate }} - + + } + + {{ + 'labels.heading.Advanced Accounting Rules' | translate + }} + @if (loanProductAccountingForm.value.advancedAccountingRules) { + + + {{ 'labels.heading.Configure Fund Sources for Payment Channels' | translate }} + + - + + {{ 'labels.buttons.Add' | translate }} + + @if (paymentChannelToFundSourceMappings.value.length !== 0) { + + + {{ 'labels.inputs.Payment Type' | translate }} + + {{ paymentFundSource.paymentTypeId | find: paymentTypeData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Fund Source' | translate }} + + {{ paymentFundSource.fundSourceAccountId | find: assetAccountData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } + {{ 'labels.heading.Map Fees to Specific Income Accounts' | translate }} + - - - - - - - - - - {{ 'labels.heading.Map Fees to Specific Income Accounts' | translate }} - - - - - {{ 'labels.buttons.Add' | translate }} - - - - - - {{ 'labels.inputs.Fees' | translate }} - - {{ feesIncome.chargeId | find: chargeData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ feesIncome.incomeAccountId | find: incomeAndLiabilityAccountData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Actions' | translate }} - - - + + {{ 'labels.buttons.Add' | translate }} - - - - - - - - - - - - {{ 'labels.heading.Map Penalties to Specific Income Accounts' | translate }} - - - - - - {{ 'labels.buttons.Add' | translate }} - - - - - - {{ 'labels.inputs.Penalty' | translate }} - - {{ penaltyIncome.chargeId | find: penaltyData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ penaltyIncome.incomeAccountId | find: incomeAccountData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Actions' | translate }} - + + @if (feeToIncomeAccountMappings.value.length !== 0) { + + + {{ 'labels.inputs.Fees' | translate }} + + {{ feesIncome.chargeId | find: chargeData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ feesIncome.incomeAccountId | find: incomeAndLiabilityAccountData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } + + {{ 'labels.heading.Map Penalties to Specific Income Accounts' | translate }} + + - + + {{ 'labels.buttons.Add' | translate }} - - - - - - - - - - - - {{ 'labels.heading.Map Charge-off reasons to Expense accounts' | translate }} - - - - - - {{ 'labels.buttons.Add' | translate }} - - - - - {{ 'labels.inputs.Charge-off reason' | translate }} - - {{ chargeOffReasonExpense.chargeOffReasonCodeValueId | find: chargeOffReasonOptions : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Expense Account' | translate }} - - {{ chargeOffReasonExpense.expenseAccountId | find: expenseAccountData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Actions' | translate }} - + + @if (penaltyToIncomeAccountMappings.value.length !== 0) { + + + {{ 'labels.inputs.Penalty' | translate }} + + {{ penaltyIncome.chargeId | find: penaltyData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ penaltyIncome.incomeAccountId | find: incomeAccountData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } + + {{ 'labels.heading.Map Charge-off reasons to Expense accounts' | translate }} + + - + + {{ 'labels.buttons.Add' | translate }} - + @if (chargeOffReasonToExpenseAccountMappings.value.length !== 0) { + - - - - - - - - - - - - - - + + {{ 'labels.inputs.Charge-off reason' | translate }} + + {{ + chargeOffReasonExpense.chargeOffReasonCodeValueId | find: chargeOffReasonOptions : 'id' : 'name' + }} + + + + {{ 'labels.inputs.Expense Account' | translate }} + + {{ chargeOffReasonExpense.expenseAccountId | find: expenseAccountData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } + + + + + } - + } diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/loan-product-accounting-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/loan-product-accounting-step.component.ts index d05072957f..0174b4bf4c 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/loan-product-accounting-step.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/loan-product-accounting-step.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'; +import { Component, Input, OnChanges, OnInit, SimpleChanges, inject } from '@angular/core'; import { UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; @@ -67,6 +67,10 @@ import { AccountingMappingDTO, AdvancedMappingDTO } from '../../models/loan-prod ] }) export class LoanProductAccountingStepComponent implements OnInit, OnChanges { + private formBuilder = inject(UntypedFormBuilder); + dialog = inject(MatDialog); + private translateService = inject(TranslateService); + @Input() loanProductsTemplate: any; @Input() accountingRuleData: any; @Input() loanProductFormValid: boolean; @@ -107,11 +111,10 @@ export class LoanProductAccountingStepComponent implements OnInit, OnChanges { 'actions' ]; - constructor( - private formBuilder: UntypedFormBuilder, - public dialog: MatDialog, - private translateService: TranslateService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createLoanProductAccountingForm(); this.setConditionalControls(); } diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-capitalized-income-step/loan-product-deferred-income-recognition-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-capitalized-income-step/loan-product-deferred-income-recognition-step.component.html index 5d01f78525..6e0902f536 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-capitalized-income-step/loan-product-deferred-income-recognition-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-capitalized-income-step/loan-product-deferred-income-recognition-step.component.html @@ -4,75 +4,92 @@ {{ 'labels.inputs.Enable income capitalization' | translate }} - - {{ 'labels.inputs.Income capitalization calculation type' | translate }} - - - {{ capitalizedIncomeCalculationType.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Income capitalization strategy' | translate }} - - - {{ capitalizedIncomeStrategy.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Income type' | translate }} - - - {{ capitalizedIncomeType.value | translateKey: 'catalogs' }} - - - + @if (enableIncomeCapitalization) { + + {{ 'labels.inputs.Income capitalization calculation type' | translate }} + + @for ( + capitalizedIncomeCalculationType of capitalizedIncomeCalculationTypeOptions; + track capitalizedIncomeCalculationType + ) { + + {{ capitalizedIncomeCalculationType.value | translateKey: 'catalogs' }} + + } + + + } + @if (enableIncomeCapitalization) { + + {{ 'labels.inputs.Income capitalization strategy' | translate }} + + @for (capitalizedIncomeStrategy of capitalizedIncomeStrategyOptions; track capitalizedIncomeStrategy) { + + {{ capitalizedIncomeStrategy.value | translateKey: 'catalogs' }} + + } + + + } + @if (enableIncomeCapitalization) { + + {{ 'labels.inputs.Income type' | translate }} + + @for (capitalizedIncomeType of capitalizedIncomeTypeOptions; track capitalizedIncomeType) { + + {{ capitalizedIncomeType.value | translateKey: 'catalogs' }} + + } + + + } {{ 'labels.inputs.Enable Buy down fee' | translate }} - - {{ 'labels.inputs.Buy down fee calculation type' | translate }} - - - {{ buyDownFeeCalculationType.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Buy down fee strategy' | translate }} - - - {{ buyDownFeeStrategy.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Buy down fee income type' | translate }} - - - {{ buyDownFeeIncomeType.value | translateKey: 'catalogs' }} - - - + @if (enableBuyDownFee) { + + {{ 'labels.inputs.Buy down fee calculation type' | translate }} + + @for (buyDownFeeCalculationType of buyDownFeeCalculationTypeOptions; track buyDownFeeCalculationType) { + + {{ buyDownFeeCalculationType.value | translateKey: 'catalogs' }} + + } + + + } + @if (enableBuyDownFee) { + + {{ 'labels.inputs.Buy down fee strategy' | translate }} + + @for (buyDownFeeStrategy of buyDownFeeStrategyOptions; track buyDownFeeStrategy) { + + {{ buyDownFeeStrategy.value | translateKey: 'catalogs' }} + + } + + + } + @if (enableBuyDownFee) { + + {{ 'labels.inputs.Buy down fee income type' | translate }} + + @for (buyDownFeeIncomeType of buyDownFeeIncomeTypeOptions; track buyDownFeeIncomeType) { + + {{ buyDownFeeIncomeType.value | translateKey: 'catalogs' }} + + } + + + } - - {{ 'labels.inputs.Merchant Buy down fee' | translate }} - + @if (enableBuyDownFee) { + + {{ 'labels.inputs.Merchant Buy down fee' | translate }} + + } diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-capitalized-income-step/loan-product-deferred-income-recognition-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-capitalized-income-step/loan-product-deferred-income-recognition-step.component.ts index 798849afd9..c58d6ddff7 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-capitalized-income-step/loan-product-deferred-income-recognition-step.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-capitalized-income-step/loan-product-deferred-income-recognition-step.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { Component, EventEmitter, Input, OnInit, Output, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms'; import { DeferredIncomeRecognition } from '../loan-product-payment-strategy-step/payment-allocation-model'; import { StringEnumOptionData } from 'app/shared/models/option-data.model'; @@ -15,6 +15,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanProductDeferredIncomeRecognitionStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() deferredIncomeRecognition: DeferredIncomeRecognition; @Input() capitalizedIncomeCalculationTypeOptions: StringEnumOptionData[]; @Input() capitalizedIncomeStrategyOptions: StringEnumOptionData[]; @@ -30,7 +32,10 @@ export class LoanProductDeferredIncomeRecognitionStepComponent implements OnInit @Output() setViewChildForm = new EventEmitter(); - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.enableIncomeCapitalization = this.deferredIncomeRecognition != null ? this.deferredIncomeRecognition.capitalizedIncome.enableIncomeCapitalization diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-charges-step/loan-product-charges-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-charges-step/loan-product-charges-step.component.html index 6d72b42662..5b7ec36d61 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-charges-step/loan-product-charges-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-charges-step/loan-product-charges-step.component.html @@ -2,14 +2,14 @@ {{ 'labels.inputs.Charge' | translate }} - - {{ charge.name }} - + @for ( + charge of chargeData | chargesFilter: chargesDataSource : currencyCode.value : multiDisburseLoan.value; + track charge + ) { + + {{ charge.name }} + + } @@ -77,12 +77,14 @@ {{ 'labels.inputs.Overdue Charges' | translate }} {{ 'labels.inputs.Overdue Charge' | translate }} - - {{ overdueCharge.name }} - + @for ( + overdueCharge of overdueChargeData | chargesFilter: chargesDataSource : currencyCode.value; + track overdueCharge + ) { + + {{ overdueCharge.name }} + + } diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-charges-step/loan-product-charges-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-charges-step/loan-product-charges-step.component.ts index d236fb5003..3a0df3a313 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-charges-step/loan-product-charges-step.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-charges-step/loan-product-charges-step.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormControl } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; @@ -52,6 +52,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanProductChargesStepComponent implements OnInit { + dialog = inject(MatDialog); + private translateService = inject(TranslateService); + @Input() loanProductsTemplate: any; @Input() currencyCode: UntypedFormControl; @Input() multiDisburseLoan: UntypedFormControl; @@ -70,10 +73,10 @@ export class LoanProductChargesStepComponent implements OnInit { pristine = true; - constructor( - public dialog: MatDialog, - private translateService: TranslateService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { this.chargeData = this.loanProductsTemplate.chargeOptions; diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.html index b255bdf2d1..fe4ea19ef6 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.html @@ -7,9 +7,11 @@ matTooltip="{{ 'tooltips.The currency in which the loan will be disbursed' | translate }}" required > - - {{ currency.name }} - + @for (currency of currencyData; track currency) { + + {{ currency.name }} + + } {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.ts index af84f34f38..a91e92a17a 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatTooltip } from '@angular/material/tooltip'; import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper'; @@ -18,13 +18,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanProductCurrencyStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() loanProductsTemplate: any; loanProductCurrencyForm: UntypedFormGroup; currencyData: any; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createLoanProductCurrencyForm(); } diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-details-step/loan-product-details-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-details-step/loan-product-details-step.component.html index 9a41e62b85..d6710f44ce 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-details-step/loan-product-details-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-details-step/loan-product-details-step.component.html @@ -41,9 +41,11 @@ {{ 'labels.inputs.Fund' | translate }} - - {{ fund.name }} - + @for (fund of fundData; track fund) { + + {{ fund.name }} + + } diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-details-step/loan-product-details-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-details-step/loan-product-details-step.component.ts index ff2138ea40..7286714b52 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-details-step/loan-product-details-step.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-details-step/loan-product-details-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { Dates } from 'app/core/utils/dates'; @@ -27,6 +27,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanProductDetailsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + @Input() loanProductsTemplate: any; loanProductDetailsForm: UntypedFormGroup; @@ -36,17 +40,16 @@ export class LoanProductDetailsStepComponent implements OnInit { minDate = new Date(2000, 0, 1); maxDate = new Date(new Date().setFullYear(new Date().getFullYear() + 10)); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {Dates} dateUtils Date Utils. * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.createLoanProductDetailsForm(); } diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-interest-refund-step/loan-product-interest-refund-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-interest-refund-step/loan-product-interest-refund-step.component.html index 3c8192a2bf..dcf19219ec 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-interest-refund-step/loan-product-interest-refund-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-interest-refund-step/loan-product-interest-refund-step.component.html @@ -9,12 +9,11 @@ 'tooltips.Refund transactions where interest refund will automatically be calculated' | translate }}" > - - {{ supportedTransaction.value | translateKey: 'catalogs' }} - + @for (supportedTransaction of supportedInterestRefundTypesOptions; track supportedTransaction) { + + {{ supportedTransaction.value | translateKey: 'catalogs' }} + + } diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-interest-refund-step/loan-product-interest-refund-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-interest-refund-step/loan-product-interest-refund-step.component.ts index 7a5dd7de2f..dc7ee31fb1 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-interest-refund-step/loan-product-interest-refund-step.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-interest-refund-step/loan-product-interest-refund-step.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { Component, EventEmitter, Input, OnInit, Output, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, ReactiveFormsModule } from '@angular/forms'; import { StringEnumOptionData } from '../../../../shared/models/option-data.model'; import { MatTooltip } from '@angular/material/tooltip'; @@ -14,6 +14,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanProductInterestRefundStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() loanProductsTemplate: any; @Output() supportedInterestRefundTypes = new EventEmitter(); @@ -21,7 +23,10 @@ export class LoanProductInterestRefundStepComponent implements OnInit { supportedInterestRefundTypesOptions: StringEnumOptionData[]; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createLoanProductInterestRefundForm(); this.setConditionalControls(); } diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/advance-payment-allocation-tab/advance-payment-allocation-tab.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/advance-payment-allocation-tab/advance-payment-allocation-tab.component.html index 880640c682..7a9f54c3df 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/advance-payment-allocation-tab/advance-payment-allocation-tab.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/advance-payment-allocation-tab/advance-payment-allocation-tab.component.html @@ -3,86 +3,87 @@ {{ 'labels.heading.You can drag and drop the rows to set a Payment Allocations order' | translate }} - - - - - + @if (!isDefault()) { + + + + + + } - - - - - - - - - - - {{ 'labels.inputs.Order' | translate }} - {{ rowIndex + 1 }} - - - - {{ 'labels.inputs.Payment Allocation Rule' | translate }} - {{ paymentAllocation.value | translateKey: 'catalogs' }} - - - - - - - - - - - - - - - - - - {{ 'labels.inputs.Order' | translate }} - {{ rowIndex + 1 }} - - - - {{ 'labels.inputs.Credit Allocation Rule' | translate }} - {{ creditAllocation.value | translateKey: 'catalogs' }} - - - - - - + @if (paymentAllocationsData) { + + + + + + + + + + {{ 'labels.inputs.Order' | translate }} + {{ rowIndex + 1 }} + + + {{ 'labels.inputs.Payment Allocation Rule' | translate }} + {{ paymentAllocation.value | translateKey: 'catalogs' }} + + + + + + } - - {{ 'labels.inputs.Future Installment Allocation Rule' | translate }} - - + - {{ futureInstallmentAllocationRule.value | translateKey: 'catalogs' }} - - - + + + + + + + + {{ 'labels.inputs.Order' | translate }} + {{ rowIndex + 1 }} + + + {{ 'labels.inputs.Credit Allocation Rule' | translate }} + {{ creditAllocation.value | translateKey: 'catalogs' }} + + + + + + } + + @if (advancedPaymentAllocation && advancedPaymentAllocation.futureInstallmentAllocationRules) { + + {{ 'labels.inputs.Future Installment Allocation Rule' | translate }} + + @for ( + futureInstallmentAllocationRule of advancedPaymentAllocation.futureInstallmentAllocationRules; + track futureInstallmentAllocationRule + ) { + + {{ futureInstallmentAllocationRule.value | translateKey: 'catalogs' }} + + } + + + } diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/advance-payment-allocation-tab/advance-payment-allocation-tab.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/advance-payment-allocation-tab/advance-payment-allocation-tab.component.ts index ec44dc020f..518280152d 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/advance-payment-allocation-tab/advance-payment-allocation-tab.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/advance-payment-allocation-tab/advance-payment-allocation-tab.component.ts @@ -1,5 +1,5 @@ import { CdkDragDrop, moveItemInArray, CdkDropList, CdkDrag } from '@angular/cdk/drag-drop'; -import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'; +import { Component, EventEmitter, Input, OnInit, Output, ViewChild, inject } from '@angular/core'; import { UntypedFormControl, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { @@ -50,6 +50,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AdvancePaymentAllocationTabComponent implements OnInit { + private dialog = inject(MatDialog); + private advancedPaymentStrategy = inject(AdvancedPaymentStrategy); + private translateService = inject(TranslateService); + @Input() advancedPaymentAllocation: AdvancedPaymentAllocation; @Input() advancedCreditAllocation: AdvancedCreditAllocation; @@ -70,11 +74,10 @@ export class AdvancePaymentAllocationTabComponent implements OnInit { @ViewChild('table') table: MatTable; - constructor( - private dialog: MatDialog, - private advancedPaymentStrategy: AdvancedPaymentStrategy, - private translateService: TranslateService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { if (this.advancedCreditAllocation) { diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/loan-product-payment-strategy-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/loan-product-payment-strategy-step.component.html index 33b89d0a0d..df6fe76974 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/loan-product-payment-strategy-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/loan-product-payment-strategy-step.component.html @@ -1,27 +1,31 @@ - - - {{ advancedPaymentAllocation.transaction.value | translateKey: 'catalogs' }} - - - - + @for (advancedPaymentAllocation of advancedPaymentAllocations; track advancedPaymentAllocation) { + + + {{ advancedPaymentAllocation.transaction.value | translateKey: 'catalogs' }} + + + + + } - - - {{ advancedCreditAllocation.transaction.value | translateKey: 'catalogs' }} - - - - + @for (advancedCreditAllocation of advancedCreditAllocations; track advancedCreditAllocation) { + + + {{ advancedCreditAllocation.transaction.value | translateKey: 'catalogs' }} + + + + + } diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/loan-product-payment-strategy-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/loan-product-payment-strategy-step.component.ts index e335ed5ff9..69563c3999 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/loan-product-payment-strategy-step.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/loan-product-payment-strategy-step.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'; +import { Component, EventEmitter, Input, OnInit, Output, ViewChild, inject } from '@angular/core'; import { AdvancedCreditAllocation, AdvancedPaymentAllocation, @@ -38,6 +38,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanProductPaymentStrategyStepComponent implements OnInit { + private dialog = inject(MatDialog); + private advancedPaymentStrategy = inject(AdvancedPaymentStrategy); + private translateService = inject(TranslateService); + @Input() advancedPaymentAllocations: AdvancedPaymentAllocation[] = []; @Input() advancedCreditAllocations: AdvancedCreditAllocation[] = []; @Input() advancedPaymentAllocationTransactionTypes: PaymentAllocationTransactionType[] = []; @@ -51,11 +55,10 @@ export class LoanProductPaymentStrategyStepComponent implements OnInit { @ViewChild(MatTabGroup) tabGroup: MatTabGroup; - constructor( - private dialog: MatDialog, - private advancedPaymentStrategy: AdvancedPaymentStrategy, - private translateService: TranslateService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.sendAllocations(); diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html index 5e4752302c..a7ce18150f 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html @@ -7,9 +7,11 @@ matTooltip="{{ 'tooltips.The Amortization value' | translate }}" required > - - {{ 'labels.inputs.products.loan.amortizationType.' + amortizationType.value | translate }} - + @for (amortizationType of amortizationTypeData; track amortizationType) { + + {{ 'labels.inputs.products.loan.amortizationType.' + amortizationType.value | translate }} + + } {{ 'labels.inputs.products.loan.Amortization' | translate }} {{ 'labels.commons.is' | translate }} @@ -24,9 +26,11 @@ matTooltip="{{ 'tooltips.The Interest method value' | translate }}" required > - - {{ interestType.value | translateKey: 'catalogs' }} - + @for (interestType of interestTypeData; track interestType) { + + {{ interestType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Interest Method' | translate }} {{ 'labels.commons.is' | translate }} @@ -41,12 +45,11 @@ matTooltip="{{ 'tooltips.Daily - Will Calculate the interest' | translate }}" required > - - {{ interestCalculationPeriodType.value | translateKey: 'catalogs' }} - + @for (interestCalculationPeriodType of interestCalculationPeriodTypeData; track interestCalculationPeriodType) { + + {{ interestCalculationPeriodType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Interest calculation period' | translate }} {{ 'labels.commons.is' | translate }} @@ -58,15 +61,16 @@ {{ 'labels.inputs.products.loan.Is Equal Amortization?' | translate }} - - {{ 'labels.inputs.Calculate interest for exact days in partial period' | translate }} - + @if (loanProductSettingsForm.value.interestCalculationPeriodType === 1) { + + {{ 'labels.inputs.Calculate interest for exact days in partial period' | translate }} + + } @@ -75,9 +79,11 @@ {{ 'labels.inputs.Loan Schedule' | translate }} {{ 'labels.inputs.Loan Schedule Type' | translate }} - - {{ loanScheduleType.value | translateKey: 'catalogs' }} - + @for (loanScheduleType of loanScheduleTypeData; track loanScheduleType) { + + {{ loanScheduleType.value | translateKey: 'catalogs' }} + + } @@ -89,12 +95,11 @@ {{ 'labels.inputs.Loan Schedule' | translate }} required [disabled]="advancedTransactionProcessingStrategyDisabled" > - - {{ transactionProcessingStrategy.name | translateKey: 'catalogs' }} - + @for (transactionProcessingStrategy of transactionProcessingStrategyData; track transactionProcessingStrategy) { + + {{ transactionProcessingStrategy.name | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Repayment strategy' | translate }} {{ 'labels.commons.is' | translate }} @@ -102,17 +107,18 @@ {{ 'labels.inputs.Loan Schedule' | translate }} - - {{ 'labels.inputs.Loan Schedule Processing Type' | translate }} - - - {{ loanScheduleProcessingType.value | translateKey: 'catalogs' }} - - - + @if (isAdvancedTransactionProcessingStrategy) { + + {{ 'labels.inputs.Loan Schedule Processing Type' | translate }} + + @for (loanScheduleProcessingType of loanScheduleProcessingTypeData; track loanScheduleProcessingType) { + + {{ loanScheduleProcessingType.value | translateKey: 'catalogs' }} + + } + + + } {{ 'labels.inputs.Loan Tranche Details' | translate }} @@ -125,39 +131,38 @@ {{ 'labels.inputs.Loan Tranche Details' | translate } {{ 'labels.inputs.Enable Multiple Disbursals' | translate }} - - - {{ 'labels.inputs.Maximum Tranche count' | translate }} - - - {{ 'labels.inputs.Maximum Tranche count' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Maximum allowed outstanding balance' | translate }} - - - - - {{ 'labels.inputs.Disallow Expected Disbursements' | translate }} - - + @if (loanProductSettingsForm.value.multiDisburseLoan) { + + + {{ 'labels.inputs.Maximum Tranche count' | translate }} + + @if (loanProductSettingsForm.controls.maxTrancheCount.hasError('required')) { + + {{ 'labels.inputs.Maximum Tranche count' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Maximum allowed outstanding balance' | translate }} + + + + {{ 'labels.inputs.Disallow Expected Disbursements' | translate }} + + + } {{ 'labels.heading.Down Payment' | translate }} @@ -170,61 +175,64 @@ {{ 'labels.heading.Down Payment' | translate }} {{ 'labels.inputs.Enable Down Payment' | translate }} - - - {{ 'labels.inputs.Disbursed Amount Percentage Down Payment' | translate }} (%) - - + + {{ 'labels.inputs.Disbursed Amount Percentage Down Payment' | translate }} (%) + + @if (loanProductSettingsForm.controls.disbursedAmountPercentageForDownPayment.hasError('required')) { + + {{ 'labels.inputs.Disbursed Amount Percentage Down Payment' | translate }} + {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} + + } + @if (loanProductSettingsForm.controls.disbursedAmountPercentageForDownPayment.errors?.range) { + + {{ 'labels.inputs.Disbursed Amount Percentage Down Payment' | translate }} + {{ 'labels.commons.is' | translate }} {{ 'labels.text.out' | translate }} + {{ 'labels.text.percentage range' | translate }} + + } + + - {{ 'labels.inputs.Disbursed Amount Percentage Down Payment' | translate }} - {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Disbursed Amount Percentage Down Payment' | translate }} - {{ 'labels.commons.is' | translate }} {{ 'labels.text.out' | translate }} - {{ 'labels.text.percentage range' | translate }} - - - - - {{ 'labels.inputs.Enable Auto Repayment for Down Payment' | translate }} - - + {{ 'labels.inputs.Enable Auto Repayment for Down Payment' | translate }} + + + } - - {{ 'labels.inputs.Loan Charge-off behaviour' | translate }} - - - {{ 'labels.inputs.Loan Charge-off behaviour' | translate }} - - - {{ chargeOffBehaviour.value | translateKey: 'catalogs' }} - - - - + @if (isAdvancedTransactionProcessingStrategy) { + + {{ 'labels.inputs.Loan Charge-off behaviour' | translate }} + + {{ 'labels.inputs.Loan Charge-off behaviour' | translate }} + + @for (chargeOffBehaviour of chargeOffBehaviourData; track chargeOffBehaviour) { + + {{ chargeOffBehaviour.value | translateKey: 'catalogs' }} + + } + + + + } @@ -247,29 +255,24 @@ {{ 'labels.inputs.Delinquency Bucket' | translate }} - - {{ delinquencyBucket.name }} - + @for (delinquencyBucket of delinquencyBucketData; track delinquencyBucket) { + + {{ delinquencyBucket.name }} + + } - - - + @if (loanProductSettingsForm.controls.delinquencyBucketId) { + + + + } - - {{ 'labels.inputs.Enable installment level Delinquency' | translate }} - + @if (loanProductSettingsForm.value.delinquencyBucketId) { + + {{ 'labels.inputs.Enable installment level Delinquency' | translate }} + + } @@ -300,9 +303,11 @@ formControlName="daysInYearType" required > - - {{ daysInYearType.value | translateKey: 'catalogs' }} - + @for (daysInYearType of daysInYearTypeData; track daysInYearType) { + + {{ daysInYearType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Days in year' | translate }} {{ 'labels.commons.is' | translate }} @@ -310,20 +315,21 @@ - - {{ 'labels.inputs.Days in year custom strategy' | translate }} - - + {{ 'labels.inputs.Days in year custom strategy' | translate }} + - {{ daysInYearCustomStrategy.value | translateKey: 'catalogs' }} - - - + @for (daysInYearCustomStrategy of daysInYearCustomStrategyOptions; track daysInYearCustomStrategy) { + + {{ daysInYearCustomStrategy.value | translateKey: 'catalogs' }} + + } + + + } {{ 'labels.inputs.Days in month' | translate }} @@ -332,9 +338,11 @@ formControlName="daysInMonthType" required > - - {{ daysInMonthType.value | translateKey: 'catalogs' }} - + @for (daysInMonthType of daysInMonthTypeData; track daysInMonthType) { + + {{ daysInMonthType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Days in month' | translate }} {{ 'labels.commons.is' | translate }} @@ -397,30 +405,27 @@ {{ 'labels.inputs.Are Variable Installments allowed?' | translate }} - - {{ 'labels.inputs.Variable Installments' | translate }} - - - {{ 'labels.inputs.Minimum gap between Installments' | translate }} - - - {{ 'labels.inputs.Minimum gap between Installments' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Maximum gap between Installments' | translate }} - - - {{ 'labels.inputs.Maximum gap between Installments' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - + @if (loanProductSettingsForm.value.allowVariableInstallments) { + + {{ 'labels.inputs.Variable Installments' | translate }} + + {{ 'labels.inputs.Minimum gap between Installments' | translate }} + + + {{ 'labels.inputs.Minimum gap between Installments' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + + {{ 'labels.inputs.Maximum gap between Installments' | translate }} + + + {{ 'labels.inputs.Maximum gap between Installments' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + + } {{ 'labels.heading.Interest Recalculation' | translat {{ 'labels.inputs.Recalculate Interest' | translate }} - - - {{ 'labels.inputs.Pre-closure interest calculation rule' | translate }} - - - {{ preClosureInterestCalculationStrategy.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Pre-closure interest calculation rule' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Advance payments adjustment type' | translate }} - - - {{ rescheduleStrategyType.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Advance payments adjustment type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Interest recalculation compounding on' | translate }} - - - {{ interestRecalculationCompoundingType.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Interest recalculation compounding on' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - - - {{ 'labels.inputs.Frequency Interval for compounding' | translate }} - + @if (loanProductSettingsForm.value.isInterestRecalculationEnabled) { + + + {{ 'labels.inputs.Pre-closure interest calculation rule' | translate }} + + @for ( + preClosureInterestCalculationStrategy of preClosureInterestCalculationStrategyData; + track preClosureInterestCalculationStrategy + ) { + + {{ preClosureInterestCalculationStrategy.value | translateKey: 'catalogs' }} + + } + - {{ 'labels.inputs.Frequency Interval for compounding' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.inputs.Pre-closure interest calculation rule' | translate }} + {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Frequency Interval for recalculation' | translate }} - + + {{ 'labels.inputs.Advance payments adjustment type' | translate }} + + @for (rescheduleStrategyType of rescheduleStrategyTypeData; track rescheduleStrategyType) { + + {{ rescheduleStrategyType.value | translateKey: 'catalogs' }} + + } + - {{ 'labels.inputs.Frequency Interval for recalculation' | translate }} - {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} + {{ 'labels.inputs.Advance payments adjustment type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Frequency for compounding' | translate }} - - - {{ interestRecalculationFrequencyType.value }} - + + {{ 'labels.inputs.Interest recalculation compounding on' | translate }} + + @for ( + interestRecalculationCompoundingType of interestRecalculationCompoundingTypeData; + track interestRecalculationCompoundingType + ) { + + {{ interestRecalculationCompoundingType.value | translateKey: 'catalogs' }} + + } + + {{ 'labels.inputs.Interest recalculation compounding on' | translate }} + {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + - - - - - - {{ interestRecalculationNthDayType.value | translateKey: 'catalogs' }} - - - - - - - - - - {{ interestRecalculationDayOfWeekType.value | translateKey: 'catalogs' }} - - - + + + @if ( + loanProductSettingsForm.value.interestRecalculationCompoundingMethod !== 0 && + loanProductSettingsForm.value.recalculationCompoundingFrequencyType !== 1 + ) { + + {{ 'labels.inputs.Frequency Interval for compounding' | translate }} + + + {{ 'labels.inputs.Frequency Interval for compounding' | translate }} + {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + } + @if (loanProductSettingsForm.value.recalculationRestFrequencyType !== 1) { + + {{ 'labels.inputs.Frequency Interval for recalculation' | translate }} + + + {{ 'labels.inputs.Frequency Interval for recalculation' | translate }} + {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} + + + } - - - - - - {{ interestRecalculationOnDayType }} + @if (loanProductSettingsForm.value.interestRecalculationCompoundingMethod !== 0) { + + + {{ 'labels.inputs.Frequency for compounding' | translate }} + + @for ( + interestRecalculationFrequencyType of interestRecalculationFrequencyTypeData; + track interestRecalculationFrequencyType + ) { + + {{ interestRecalculationFrequencyType.value }} + + } + + + @if (loanProductSettingsForm.value.recalculationCompoundingFrequencyType === 4) { + + + + @for ( + interestRecalculationNthDayType of interestRecalculationNthDayTypeData; + track interestRecalculationNthDayType + ) { + + {{ interestRecalculationNthDayType.value | translateKey: 'catalogs' }} + + } + + + + } + @if ( + (loanProductSettingsForm.value.recalculationCompoundingFrequencyType === 4 && + loanProductSettingsForm.value.recalculationCompoundingFrequencyNthDayType !== -2) || + loanProductSettingsForm.value.recalculationCompoundingFrequencyType === 3 + ) { + + + + @for ( + interestRecalculationDayOfWeekType of interestRecalculationDayOfWeekTypeData; + track interestRecalculationDayOfWeekType + ) { + + {{ interestRecalculationDayOfWeekType.value | translateKey: 'catalogs' }} + + } + + + + } + @if ( + loanProductSettingsForm.value.recalculationCompoundingFrequencyType === 4 && + loanProductSettingsForm.value.recalculationCompoundingFrequencyNthDayType === -2 + ) { + + + + @for ( + interestRecalculationOnDayType of interestRecalculationOnDayTypeData; + track interestRecalculationOnDayType + ) { + + {{ interestRecalculationOnDayType }} + + } + + + + } + + } + + {{ 'labels.inputs.Frequency for recalculate Outstanding Principal' | translate }} + + @for ( + interestRecalculationFrequencyType of interestRecalculationFrequencyTypeData; + track interestRecalculationFrequencyType + ) { + + {{ interestRecalculationFrequencyType.value | translateKey: 'catalogs' }} - - - - - - - {{ 'labels.inputs.Frequency for recalculate Outstanding Principal' | translate }} - - - {{ interestRecalculationFrequencyType.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Frequency for recalculate Outstanding Principal' | translate }} - {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} - - - - - - - - {{ interestRecalculationNthDayType.value | translateKey: 'catalogs' }} - + } + + {{ 'labels.inputs.Frequency for recalculate Outstanding Principal' | translate }} + {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} + - - - + + + @for ( + interestRecalculationNthDayType of interestRecalculationNthDayTypeData; + track interestRecalculationNthDayType + ) { + + {{ interestRecalculationNthDayType.value | translateKey: 'catalogs' }} + + } + + + + } + @if ( (loanProductSettingsForm.value.recalculationRestFrequencyType === 4 && loanProductSettingsForm.value.recalculationRestFrequencyNthDayType !== -2) || loanProductSettingsForm.value.recalculationRestFrequencyType === 3 - " - class="flex-31 layout-row layout-lt-md-column" - > - - - - {{ interestRecalculationDayOfWeekType.value | translateKey: 'catalogs' }} - - - - - - + + + @for ( + interestRecalculationDayOfWeekType of interestRecalculationDayOfWeekTypeData; + track interestRecalculationDayOfWeekType + ) { + + {{ interestRecalculationDayOfWeekType.value | translateKey: 'catalogs' }} + + } + + + + } + @if ( loanProductSettingsForm.value.recalculationRestFrequencyType === 4 && loanProductSettingsForm.value.recalculationRestFrequencyNthDayType === -2 - " - class="flex-31 layout-row layout-lt-md-column" - > - - - - {{ interestRecalculationOnDayType }} - - - + ) { + + + + @for ( + interestRecalculationOnDayType of interestRecalculationOnDayTypeData; + track interestRecalculationOnDayType + ) { + + {{ interestRecalculationOnDayType }} + + } + + + + } + + {{ 'labels.inputs.Is Arrears recognization based on original schedule' | translate }}? + + @if (loanProductSettingsForm.value.loanScheduleType === 'PROGRESSIVE') { + + {{ 'labels.inputs.Do not calculate interest on past due principal balances' | translate }} + + } - - - {{ 'labels.inputs.Is Arrears recognization based on original schedule' | translate }}? - - - - {{ 'labels.inputs.Do not calculate interest on past due principal balances' | translate }} - - + } @@ -684,29 +694,26 @@ {{ 'labels.heading.Guarantee Requirements' | translat {{ 'labels.inputs.Place Guarantee Funds On-Hold' | translate }} - - - {{ 'labels.inputs.Mandatory Guarantee(%)' | translate }} - - - {{ 'labels.inputs.Mandatory Guarantee' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Minimum Guarantee from Own Funds(%)' | translate }} - - - - - {{ 'labels.inputs.Minimum Guarantee from Guarantor Funds(%)' | translate }} - - - + @if (loanProductSettingsForm.value.holdGuaranteeFunds) { + + + {{ 'labels.inputs.Mandatory Guarantee(%)' | translate }} + + + {{ 'labels.inputs.Mandatory Guarantee' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + + {{ 'labels.inputs.Minimum Guarantee from Own Funds(%)' | translate }} + + + + {{ 'labels.inputs.Minimum Guarantee from Guarantor Funds(%)' | translate }} + + + + } @@ -727,30 +734,28 @@ {{ 'labels.inputs.Use the Global Configurations values to the Repayment Event (notifications)' | translate }} - - - {{ 'labels.inputs.Due days for repayment event' | translate }} - - - - - {{ 'labels.inputs.OverDue days for repayment event' | translate }} - - - + @if (!loanProductSettingsForm.value.useDueForRepaymentsConfigurations) { + + + {{ 'labels.inputs.Due days for repayment event' | translate }} + + + + {{ 'labels.inputs.OverDue days for repayment event' | translate }} + + + + } @@ -760,47 +765,42 @@ {{ 'labels.inputs.Configurable Terms and Settings' | {{ 'labels.inputs.Allow overriding select terms and settings in loan accounts' | translate }} - - - {{ 'labels.inputs.Amortization' | translate }} - - - - {{ 'labels.inputs.Interest method' | translate }} - - - - {{ 'labels.inputs.Repayment strategy' | translate }} - - - - {{ 'labels.inputs.Interest calculation period' | translate }} - - - - {{ 'labels.inputs.Arrears tolerance' | translate }} - - - - {{ 'labels.inputs.Repaid every' | translate }} - - - - {{ 'labels.inputs.Moratorium' | translate }} - - - - {{ 'labels.inputs.Number of days a loan may be overdue before moving into arrears' | translate }} - - + @if (loanProductSettingsForm.value.allowAttributeConfiguration) { + + + {{ 'labels.inputs.Amortization' | translate }} + + + {{ 'labels.inputs.Interest method' | translate }} + + + {{ 'labels.inputs.Repayment strategy' | translate }} + + + {{ 'labels.inputs.Interest calculation period' | translate }} + + + {{ 'labels.inputs.Arrears tolerance' | translate }} + + + {{ 'labels.inputs.Repaid every' | translate }} + + + {{ 'labels.inputs.Moratorium' | translate }} + + + {{ 'labels.inputs.Number of days a loan may be overdue before moving into arrears' | translate }} + + + } diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts index cd3665d815..ea641608e6 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; +import { Component, OnInit, Input, Output, EventEmitter, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -35,6 +35,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanProductSettingsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private processingStrategyService = inject(ProcessingStrategyService); + DAYS_BEFORE_REPAYMENT_IS_DUE = LoanProducts.DAYS_BEFORE_REPAYMENT_IS_DUE; DAYS_AFTER_REPAYMENT_IS_OVERDUE = LoanProducts.DAYS_AFTER_REPAYMENT_IS_OVERDUE; @@ -74,10 +77,10 @@ export class LoanProductSettingsStepComponent implements OnInit { /** Values to Days for Repayments */ defaultConfigValues: GlobalConfiguration[] = []; - constructor( - private formBuilder: UntypedFormBuilder, - private processingStrategyService: ProcessingStrategyService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createLoanProductSettingsForm(); this.setConditionalControls(); } diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-terms-step/loan-product-terms-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-terms-step/loan-product-terms-step.component.html index d622f4f30f..d51c7314d3 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-terms-step/loan-product-terms-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-terms-step/loan-product-terms-step.component.html @@ -43,28 +43,25 @@ - - {{ 'labels.inputs.Over Amount Calculation Type' | translate }} - - - {{ overAppliedCalculationType.value | translateKey: 'catalogs' }} - - - - - - {{ 'labels.inputs.Over Amount' | translate }} - - + @if (loanProductTermsForm.value.allowApprovedDisbursedAmountsOverApplied) { + + {{ 'labels.inputs.Over Amount Calculation Type' | translate }} + + @for (overAppliedCalculationType of overAppliedCalculationTypeData; track overAppliedCalculationType) { + + {{ overAppliedCalculationType.value | translateKey: 'catalogs' }} + + } + + + } + + @if (loanProductTermsForm.value.allowApprovedDisbursedAmountsOverApplied) { + + {{ 'labels.inputs.Over Amount' | translate }} + + + } @@ -76,12 +73,11 @@ > - - {{ repaymentStartDateType.value | translateKey: 'catalogs' }} - + @for (repaymentStartDateType of repaymentStartDateTypeOptions; track repaymentStartDateType) { + + {{ repaymentStartDateType.value | translateKey: 'catalogs' }} + + } @@ -133,171 +129,154 @@ {{ 'labels.inputs.Interest Rates' | translate }} - - {{ 'labels.inputs.Is Zero Interest Rate?' | translate }} - - - - {{ 'labels.inputs.Is Linked to floating interest rates?' | translate }} - - - - - {{ 'labels.inputs.Nominal interest rate' | translate }} - - - - - {{ 'labels.inputs.Minimum' | translate }} - - - {{ 'labels.commons.Minimum Value must be' | translate }} - {{ 'labels.commons.greater equal to than 0' | translate }} - - - - - {{ 'labels.inputs.Default' | translate }} - - - {{ 'labels.catalogs.Default' | translate }} {{ 'labels.inputs.Nominal interest rate' | translate }} - {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Maximum' | translate }} - - - {{ 'labels.commons.Maximum Value must be' | translate }} - {{ 'labels.commons.greater equal to than 0' | translate }} - {{ 'labels.commons.and must be greater than' | translate }} - {{ 'labels.commons.Minimum Principal' | translate }} - - - - - {{ 'labels.inputs.Frequency' | translate }} - - - {{ interestRateFrequencyType.value | translateKey: 'catalogs' }} - - - - {{ 'labels.inputs.Nominal interest rate frequency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - - {{ 'labels.inputs.Floating Interest Rate' | translate }} - - - - - {{ 'labels.inputs.Floating Rate' | translate }} - - - {{ floatingRate.name }} - - - - {{ 'labels.inputs.Floating rate' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Differential Rate' | translate }} - - - {{ 'labels.inputs.Differential rate' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Is Floating calculation allowed?' | translate }} + @if (!loanProductTermsForm.value.isLinkedToFloatingInterestRates) { + + {{ 'labels.inputs.Is Zero Interest Rate?' | translate }} + } - - {{ 'labels.inputs.Minimum' | translate }} - - - {{ 'labels.inputs.Minimum interest rate' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Default' | translate }} - - - {{ 'labels.catalogs.Default' | translate }} {{ 'labels.inputs.Interest rate' | translate }} - {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Maximum' | translate }} - - - {{ 'labels.inputs.Maximum interest rate' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - + @if (!isZeroInterest()) { + + {{ 'labels.inputs.Is Linked to floating interest rates?' | translate }} + + } + + @if (!loanProductTermsForm.value.isLinkedToFloatingInterestRates) { + + + {{ 'labels.inputs.Nominal interest rate' | translate }} + + + + {{ 'labels.inputs.Minimum' | translate }} + + + {{ 'labels.commons.Minimum Value must be' | translate }} + {{ 'labels.commons.greater equal to than 0' | translate }} + + + + {{ 'labels.inputs.Default' | translate }} + + + {{ 'labels.catalogs.Default' | translate }} {{ 'labels.inputs.Nominal interest rate' | translate }} + {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + + {{ 'labels.inputs.Maximum' | translate }} + + + {{ 'labels.commons.Maximum Value must be' | translate }} + {{ 'labels.commons.greater equal to than 0' | translate }} + {{ 'labels.commons.and must be greater than' | translate }} + {{ 'labels.commons.Minimum Principal' | translate }} + + + + {{ 'labels.inputs.Frequency' | translate }} + + @for (interestRateFrequencyType of interestRateFrequencyTypeData; track interestRateFrequencyType) { + + {{ interestRateFrequencyType.value | translateKey: 'catalogs' }} + + } + + + {{ 'labels.inputs.Nominal interest rate frequency' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + + } + + @if (loanProductTermsForm.value.isLinkedToFloatingInterestRates && !isZeroInterest()) { + + + {{ 'labels.inputs.Floating Interest Rate' | translate }} + + + + {{ 'labels.inputs.Floating Rate' | translate }} + + @for (floatingRate of floatingRateData; track floatingRate) { + + {{ floatingRate.name }} + + } + + + {{ 'labels.inputs.Floating rate' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + + {{ 'labels.inputs.Differential Rate' | translate }} + + + {{ 'labels.inputs.Differential rate' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + + {{ 'labels.inputs.Is Floating calculation allowed?' | translate }} + + + {{ 'labels.inputs.Minimum' | translate }} + + + {{ 'labels.inputs.Minimum interest rate' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + + {{ 'labels.inputs.Default' | translate }} + + + {{ 'labels.catalogs.Default' | translate }} {{ 'labels.inputs.Interest rate' | translate }} + {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + + {{ 'labels.inputs.Maximum' | translate }} + + + {{ 'labels.inputs.Maximum interest rate' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + + } @@ -307,249 +286,219 @@ {{ 'labels.inputs.Variations' | translate }} {{ 'labels.inputs.Terms vary based on loan cycle' | translate }} - - {{ 'labels.inputs.Principal by loan cycle' | translate }} - - - - - {{ 'labels.buttons.Add' | translate }} - - - - - - {{ 'labels.inputs.Condition' | translate }} - - {{ variation.valueConditionType | find: valueConditionTypeData : 'id' : 'value' }} - - - - - {{ 'labels.inputs.Loan Cycle' | translate }} - - {{ variation.borrowerCycleNumber }} - - - - - {{ 'labels.inputs.Minimum' | translate }} - - {{ variation.minValue }} - - - - - {{ 'labels.inputs.Default' | translate }} - - {{ variation.defaultValue }} - - - - - {{ 'labels.inputs.Maximum' | translate }} - - {{ variation.maxValue }} - - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - {{ 'labels.inputs.Number of repayments by loan cycle' | translate }} - - - - - {{ 'labels.buttons.Add' | translate }} - - - - - - {{ 'labels.inputs.Condition' | translate }} - - {{ variation.valueConditionType | find: valueConditionTypeData : 'id' : 'value' }} - - - - - {{ 'labels.inputs.Loan Cycle' | translate }} - - {{ variation.borrowerCycleNumber }} - - - - - {{ 'labels.inputs.Minimum' | translate }} - - {{ variation.minValue }} - - - - - {{ 'labels.inputs.Default' | translate }} - - {{ variation.defaultValue }} - - - - - {{ 'labels.inputs.Maximum' | translate }} - - {{ variation.maxValue }} - - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - {{ 'labels.inputs.Nominal interest rate by loan cycle' | translate }} - - - - - {{ 'labels.buttons.Add' | translate }} - + @if (loanProductTermsForm.value.useBorrowerCycle) { + + {{ 'labels.inputs.Principal by loan cycle' | translate }} + + + + {{ 'labels.buttons.Add' | translate }} + + + @if (principalVariationsForBorrowerCycle.value.length) { + + + {{ 'labels.inputs.Condition' | translate }} + + {{ variation.valueConditionType | find: valueConditionTypeData : 'id' : 'value' }} + + + + {{ 'labels.inputs.Loan Cycle' | translate }} + + {{ variation.borrowerCycleNumber }} + + + + {{ 'labels.inputs.Minimum' | translate }} + + {{ variation.minValue }} + + + + {{ 'labels.inputs.Default' | translate }} + + {{ variation.defaultValue }} + + + + {{ 'labels.inputs.Maximum' | translate }} + + {{ variation.maxValue }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } + {{ 'labels.inputs.Number of repayments by loan cycle' | translate }} + + + + {{ 'labels.buttons.Add' | translate }} + + + @if (numberOfRepaymentVariationsForBorrowerCycle.value.length) { + + + {{ 'labels.inputs.Condition' | translate }} + + {{ variation.valueConditionType | find: valueConditionTypeData : 'id' : 'value' }} + + + + {{ 'labels.inputs.Loan Cycle' | translate }} + + {{ variation.borrowerCycleNumber }} + + + + {{ 'labels.inputs.Minimum' | translate }} + + {{ variation.minValue }} + + + + {{ 'labels.inputs.Default' | translate }} + + {{ variation.defaultValue }} + + + + {{ 'labels.inputs.Maximum' | translate }} + + {{ variation.maxValue }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } + {{ 'labels.inputs.Nominal interest rate by loan cycle' | translate }} + + + + {{ 'labels.buttons.Add' | translate }} + + + @if (interestRateVariationsForBorrowerCycle.value.length) { + + + {{ 'labels.inputs.Condition' | translate }} + + {{ variation.valueConditionType | find: valueConditionTypeData : 'id' : 'value' }} + + + + {{ 'labels.inputs.Loan Cycle' | translate }} + + {{ variation.borrowerCycleNumber }} + + + + {{ 'labels.inputs.Minimum' | translate }} + + {{ variation.minValue }} + + + + {{ 'labels.inputs.Default' | translate }} + + {{ variation.defaultValue }} + + + + {{ 'labels.inputs.Maximum' | translate }} + + {{ variation.maxValue }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } - - - - {{ 'labels.inputs.Condition' | translate }} - - {{ variation.valueConditionType | find: valueConditionTypeData : 'id' : 'value' }} - - - - - {{ 'labels.inputs.Loan Cycle' | translate }} - - {{ variation.borrowerCycleNumber }} - - - - - {{ 'labels.inputs.Minimum' | translate }} - - {{ variation.minValue }} - - - - - {{ 'labels.inputs.Default' | translate }} - - {{ variation.defaultValue }} - - - - - {{ 'labels.inputs.Maximum' | translate }} - - {{ variation.maxValue }} - - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - + } @@ -574,12 +523,11 @@ {{ 'labels.inputs.Frequency Type' | translate }} - - {{ repaymentFrequencyType.value | translateKey: 'catalogs' }} - + @for (repaymentFrequencyType of repaymentFrequencyTypeData; track repaymentFrequencyType) { + + {{ repaymentFrequencyType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Repaid every type' | translate }} {{ 'labels.commons.is' | translate }} @@ -587,23 +535,29 @@ - - {{ 'labels.inputs.Fixed Length' | translate }} - - + @if (allowFixedLength()) { + + {{ 'labels.inputs.Fixed Length' | translate }} + + + } - - {{ 'labels.inputs.Fixed Length' | translate }} - - - {{ - loanProductTermsForm.value.repaymentFrequencyType - | find: repaymentFrequencyTypeData : 'id' : 'value' - | translateKey: 'catalogs' - }} + @if (allowFixedLength()) { + + {{ 'labels.inputs.Fixed Length' | translate }} + + + } + @if (allowFixedLength()) { + {{ + loanProductTermsForm.value.repaymentFrequencyType + | find: repaymentFrequencyTypeData : 'id' : 'value' + | translateKey: 'catalogs' + }} + } {{ 'labels.inputs.Minimum days between disbursal and first repayment date' | translate }} diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-terms-step/loan-product-terms-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-terms-step/loan-product-terms-step.component.ts index e9192df72f..bab474fd76 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-terms-step/loan-product-terms-step.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-terms-step/loan-product-terms-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core'; +import { Component, OnInit, Input, OnChanges, SimpleChanges, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -65,6 +65,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanProductTermsStepComponent implements OnInit, OnChanges { + private formBuilder = inject(UntypedFormBuilder); + private processingStrategyService = inject(ProcessingStrategyService); + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + @Input() loanProductsTemplate: any; loanProductTermsForm: UntypedFormGroup; @@ -89,12 +94,10 @@ export class LoanProductTermsStepComponent implements OnInit, OnChanges { ]; isAdvancedTransactionProcessingStrategy = false; - constructor( - private formBuilder: UntypedFormBuilder, - private processingStrategyService: ProcessingStrategyService, - private dialog: MatDialog, - private translateService: TranslateService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createLoanProductTermsForm(); this.setConditionalControls(); } diff --git a/src/app/products/loan-products/loan-product.resolver.ts b/src/app/products/loan-products/loan-product.resolver.ts index 873ae8a858..7a7486ee6f 100644 --- a/src/app/products/loan-products/loan-product.resolver.ts +++ b/src/app/products/loan-products/loan-product.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class LoanProductResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the loan product data. diff --git a/src/app/products/loan-products/loan-products-template.resolver.ts b/src/app/products/loan-products/loan-products-template.resolver.ts index 60f1e3f681..80ddd37d4f 100644 --- a/src/app/products/loan-products/loan-products-template.resolver.ts +++ b/src/app/products/loan-products/loan-products-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -9,7 +9,12 @@ import { ProductsService } from '../products.service'; @Injectable() export class LoanProductsTemplateResolver { - constructor(private productsService: ProductsService) {} + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} /** * Returns the loan products template data. diff --git a/src/app/products/loan-products/loan-products.component.ts b/src/app/products/loan-products/loan-products.component.ts index 007a3ff932..0ba824eccf 100644 --- a/src/app/products/loan-products/loan-products.component.ts +++ b/src/app/products/loan-products/loan-products.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -52,6 +52,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanProductsComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + loanProductsData: any; displayedColumns: string[] = [ 'name', @@ -73,18 +78,16 @@ export class LoanProductsComponent implements OnInit, AfterViewInit { /* Template for popover on loan products table */ @ViewChild('templateLoanProductsTable') templateLoanProductsTable: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route ActivatedRoute. * @param {Router} router Router. * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { loanProducts: any }) => { this.loanProductsData = data.loanProducts; }); diff --git a/src/app/products/loan-products/loan-products.resolver.ts b/src/app/products/loan-products/loan-products.resolver.ts index 284f24f33a..0cf01510f3 100644 --- a/src/app/products/loan-products/loan-products.resolver.ts +++ b/src/app/products/loan-products/loan-products.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,11 +12,16 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class LoanProductsResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the loan products data. diff --git a/src/app/products/loan-products/loan-products.ts b/src/app/products/loan-products/loan-products.ts index 557ef16ee1..6de4dc762e 100644 --- a/src/app/products/loan-products/loan-products.ts +++ b/src/app/products/loan-products/loan-products.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { SettingsService } from 'app/settings/settings.service'; import { GlobalConfiguration } from 'app/system/configurations/global-configurations-tab/configuration.model'; @@ -6,6 +6,8 @@ import { GlobalConfiguration } from 'app/system/configurations/global-configurat providedIn: 'root' }) export class LoanProducts { + private settingsService = inject(SettingsService); + public static LOAN_SCHEDULE_TYPE_CUMULATIVE = 'CUMULATIVE'; public static LOAN_SCHEDULE_TYPE_PROGRESSIVE = 'PROGRESSIVE'; @@ -30,7 +32,10 @@ export class LoanProducts { return code === this.ADVANCED_PAYMENT_ALLOCATION_STRATEGY; } - constructor(private settingsService: SettingsService) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} public setItemsByDefault(configurations: any) { const itemsByDefault: GlobalConfiguration[] = []; diff --git a/src/app/products/loan-products/view-loan-product/datatable-tab/datatable-tab.component.ts b/src/app/products/loan-products/view-loan-product/datatable-tab/datatable-tab.component.ts index b1c2451c48..c8d6ef68a6 100644 --- a/src/app/products/loan-products/view-loan-product/datatable-tab/datatable-tab.component.ts +++ b/src/app/products/loan-products/view-loan-product/datatable-tab/datatable-tab.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { EntityDatatableTabComponent } from '../../../../shared/tabs/entity-datatable-tab/entity-datatable-tab.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -13,11 +13,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DatatableTabComponent { + private route = inject(ActivatedRoute); + entityId: string; entityDatatable: any; multiRowDatatableFlag: boolean; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.entityId = this.route.parent.parent.snapshot.paramMap.get('productId'); this.route.data.subscribe((data: { loanProductDatatable: any }) => { diff --git a/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.ts b/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.ts index 6e47f7f9b1..66e14b63d0 100644 --- a/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.ts +++ b/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { LoanProduct } from '../../models/loan-product.model'; import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base'; @@ -23,17 +23,20 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GeneralTabComponent implements OnInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private productsService = inject(ProductsService); + private settingsService = inject(SettingsService); + private translateService = inject(TranslateService); + loanProduct: LoanProduct; useDueForRepaymentsConfigurations = false; - constructor( - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private productsService: ProductsService, - private settingsService: SettingsService, - private translateService: TranslateService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { loanProduct: any }) => { this.loanProduct = data.loanProduct; this.useDueForRepaymentsConfigurations = diff --git a/src/app/products/loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component.html b/src/app/products/loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component.html index 2c39f0a759..a4bc81f2be 100644 --- a/src/app/products/loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component.html +++ b/src/app/products/loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component.html @@ -1,71 +1,84 @@ - - - +@if (paymentAllocation) { + + + + + {{ 'labels.inputs.Transaction Type' | translate }}: + {{ transactionTypeValue(paymentAllocation.transactionType) }} + + + + - {{ 'labels.inputs.Transaction Type' | translate }}: - {{ transactionTypeValue(paymentAllocation.transactionType) }} + {{ 'labels.inputs.Future Installment Allocation Rule' | translate }}: + {{ + futureInstallmentRuleValue(paymentAllocation.futureInstallmentAllocationRule) | translateKey: 'catalogs' + }} + + + {{ 'labels.inputs.Payment Allocation Order' | translate }} + + + + + {{ 'labels.inputs.Order' | translate }} + {{ 'labels.inputs.Payment Allocation Rule' | translate }} + + + + @for ( + paymentAllocation of paymentAllocation.paymentAllocationOrder; + track paymentAllocation; + let idx = $index + ) { + + {{ idx + 1 }} + {{ allocationRuleValue(paymentAllocation.paymentAllocationRule) | translateKey: 'catalogs' }} + + } + + + - - - - - - {{ 'labels.inputs.Future Installment Allocation Rule' | translate }}: - {{ - futureInstallmentRuleValue(paymentAllocation.futureInstallmentAllocationRule) | translateKey: 'catalogs' - }} - + +} +@if (creditAllocation) { + + + + + {{ 'labels.inputs.Transaction Type' | translate }}: + {{ transactionTypeValue(creditAllocation.transactionType) }} + + + - {{ 'labels.inputs.Payment Allocation Order' | translate }} - - - - - {{ 'labels.inputs.Order' | translate }} - {{ 'labels.inputs.Payment Allocation Rule' | translate }} - - - - - {{ idx + 1 }} - {{ allocationRuleValue(paymentAllocation.paymentAllocationRule) | translateKey: 'catalogs' }} - - - - - - - - - - - {{ 'labels.inputs.Transaction Type' | translate }}: - {{ transactionTypeValue(creditAllocation.transactionType) }} + {{ 'labels.inputs.Credit Allocation Order' | translate }} + + + + + {{ 'labels.inputs.Order' | translate }} + {{ 'labels.inputs.Credit Allocation Rule' | translate }} + + + + @for ( + creditAllocation of creditAllocation.creditAllocationOrder; + track creditAllocation; + let idx = $index + ) { + + {{ idx + 1 }} + {{ allocationRuleValue(creditAllocation.creditAllocationRule) | translateKey: 'catalogs' }} + + } + + + - - - - - - {{ 'labels.inputs.Credit Allocation Order' | translate }} - - - - - {{ 'labels.inputs.Order' | translate }} - {{ 'labels.inputs.Credit Allocation Rule' | translate }} - - - - - {{ idx + 1 }} - {{ allocationRuleValue(creditAllocation.creditAllocationRule) | translateKey: 'catalogs' }} - - - - - - + +} diff --git a/src/app/products/loan-products/view-loan-product/view-loan-product.component.html b/src/app/products/loan-products/view-loan-product/view-loan-product.component.html index c6f1db237c..01bcae50de 100644 --- a/src/app/products/loan-products/view-loan-product/view-loan-product.component.html +++ b/src/app/products/loan-products/view-loan-product/view-loan-product.component.html @@ -10,7 +10,7 @@ > {{ 'labels.heading.General' | translate }} - + @for (loanProductDatatable of loanProductDatatables; track loanProductDatatable) { {{ loanProductDatatable.registeredTableName }} - + } diff --git a/src/app/products/loan-products/view-loan-product/view-loan-product.component.ts b/src/app/products/loan-products/view-loan-product/view-loan-product.component.ts index 8d6614e14e..690b0fcfaf 100644 --- a/src/app/products/loan-products/view-loan-product/view-loan-product.component.ts +++ b/src/app/products/loan-products/view-loan-product/view-loan-product.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router'; import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -17,9 +17,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewLoanProductComponent { + private route = inject(ActivatedRoute); + loanProductDatatables: any = []; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { loanProductDatatables: any }) => { this.loanProductDatatables = data.loanProductDatatables; }); diff --git a/src/app/products/manage-delinquency-buckets/delinquency-bucket/create-bucket/create-bucket.component.html b/src/app/products/manage-delinquency-buckets/delinquency-bucket/create-bucket/create-bucket.component.html index a7c5412cd3..9733551c52 100644 --- a/src/app/products/manage-delinquency-buckets/delinquency-bucket/create-bucket/create-bucket.component.html +++ b/src/app/products/manage-delinquency-buckets/delinquency-bucket/create-bucket/create-bucket.component.html @@ -6,10 +6,12 @@ {{ 'labels.inputs.Name' | translate }} - - {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (bucketForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.heading.Delinquency Ranges' | translate }} diff --git a/src/app/products/manage-delinquency-buckets/delinquency-bucket/create-bucket/create-bucket.component.ts b/src/app/products/manage-delinquency-buckets/delinquency-bucket/create-bucket/create-bucket.component.ts index 1276a69cee..1ca7702669 100644 --- a/src/app/products/manage-delinquency-buckets/delinquency-bucket/create-bucket/create-bucket.component.ts +++ b/src/app/products/manage-delinquency-buckets/delinquency-bucket/create-bucket/create-bucket.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -49,6 +49,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateBucketComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private productsService = inject(ProductsService); + private router = inject(Router); + private route = inject(ActivatedRoute); + dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** Delinquency Bucket form. */ bucketForm: UntypedFormGroup; /** Delinquency Bucket template data. */ @@ -67,14 +74,10 @@ export class CreateBucketComponent implements OnInit { 'actions' ]; - constructor( - private formBuilder: UntypedFormBuilder, - private productsService: ProductsService, - private router: Router, - private route: ActivatedRoute, - public dialog: MatDialog, - private translateService: TranslateService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { delinquencyRanges: any }) => { this.delinquencyRangesData = data.delinquencyRanges; this.delinquencyRangesData = this.delinquencyRangesData.sort( diff --git a/src/app/products/manage-delinquency-buckets/delinquency-bucket/delinquency-bucket.component.resolver.ts b/src/app/products/manage-delinquency-buckets/delinquency-bucket/delinquency-bucket.component.resolver.ts index ede45e660e..91f7e598fe 100644 --- a/src/app/products/manage-delinquency-buckets/delinquency-bucket/delinquency-bucket.component.resolver.ts +++ b/src/app/products/manage-delinquency-buckets/delinquency-bucket/delinquency-bucket.component.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../../products.service'; */ @Injectable() export class DelinquencyBucketComponentsResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the delinquency buckets data. diff --git a/src/app/products/manage-delinquency-buckets/delinquency-bucket/delinquency-bucket.component.ts b/src/app/products/manage-delinquency-buckets/delinquency-bucket/delinquency-bucket.component.ts index a87b3f16e8..c55513b77e 100644 --- a/src/app/products/manage-delinquency-buckets/delinquency-bucket/delinquency-bucket.component.ts +++ b/src/app/products/manage-delinquency-buckets/delinquency-bucket/delinquency-bucket.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -41,6 +41,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DelinquencyBucketComponent implements OnInit { + private route = inject(ActivatedRoute); + delinquencyBucketData: any; /** Columns to be displayed in delinquency bucket table. */ displayedColumns: string[] = ['name']; @@ -52,7 +54,10 @@ export class DelinquencyBucketComponent implements OnInit { /** Sorter for delinquency bucket table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { delinquencyBuckets: any }) => { this.delinquencyBucketData = data.delinquencyBuckets; }); diff --git a/src/app/products/manage-delinquency-buckets/delinquency-bucket/edit-bucket/edit-bucket.component.html b/src/app/products/manage-delinquency-buckets/delinquency-bucket/edit-bucket/edit-bucket.component.html index bd064a7455..5385612bcf 100644 --- a/src/app/products/manage-delinquency-buckets/delinquency-bucket/edit-bucket/edit-bucket.component.html +++ b/src/app/products/manage-delinquency-buckets/delinquency-bucket/edit-bucket/edit-bucket.component.html @@ -6,10 +6,12 @@ {{ 'labels.inputs.Name' | translate }} - - {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (bucketForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.heading.Delinquency Ranges' | translate }} diff --git a/src/app/products/manage-delinquency-buckets/delinquency-bucket/edit-bucket/edit-bucket.component.ts b/src/app/products/manage-delinquency-buckets/delinquency-bucket/edit-bucket/edit-bucket.component.ts index 9ce1b68c73..72125bec8b 100644 --- a/src/app/products/manage-delinquency-buckets/delinquency-bucket/edit-bucket/edit-bucket.component.ts +++ b/src/app/products/manage-delinquency-buckets/delinquency-bucket/edit-bucket/edit-bucket.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -49,6 +49,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditBucketComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private productsService = inject(ProductsService); + private router = inject(Router); + private route = inject(ActivatedRoute); + dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** Delinquency Bucket form. */ bucketForm: UntypedFormGroup; /** Delinquency Bucket template data. */ @@ -73,14 +80,10 @@ export class EditBucketComponent implements OnInit { 'actions' ]; - constructor( - private formBuilder: UntypedFormBuilder, - private productsService: ProductsService, - private router: Router, - private route: ActivatedRoute, - public dialog: MatDialog, - private translateService: TranslateService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { delinquencyBucket: any; delinquencyRanges: any }) => { this.delinquencyRangesData = data.delinquencyRanges; this.rangesDataSource = []; diff --git a/src/app/products/manage-delinquency-buckets/delinquency-bucket/view-bucket/view-bucket.component.html b/src/app/products/manage-delinquency-buckets/delinquency-bucket/view-bucket/view-bucket.component.html index 8eab82c7fb..95156da528 100644 --- a/src/app/products/manage-delinquency-buckets/delinquency-bucket/view-bucket/view-bucket.component.html +++ b/src/app/products/manage-delinquency-buckets/delinquency-bucket/view-bucket/view-bucket.component.html @@ -42,19 +42,19 @@ - - - {{ range.classification }} - - - - {{ range.minimumAgeDays }} - - - - {{ range.maximumAgeDays }} + @for (range of delinquencyBucketData.ranges; track range) { + + + {{ range.classification }} + + + {{ range.minimumAgeDays }} + + + {{ range.maximumAgeDays }} + - + } diff --git a/src/app/products/manage-delinquency-buckets/delinquency-bucket/view-bucket/view-bucket.component.ts b/src/app/products/manage-delinquency-buckets/delinquency-bucket/view-bucket/view-bucket.component.ts index e9e524fd58..e9231df567 100644 --- a/src/app/products/manage-delinquency-buckets/delinquency-bucket/view-bucket/view-bucket.component.ts +++ b/src/app/products/manage-delinquency-buckets/delinquency-bucket/view-bucket/view-bucket.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { ProductsService } from 'app/products/products.service'; @@ -16,15 +16,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewBucketComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private productsService = inject(ProductsService); + /** Delinquency Bucket Data. */ delinquencyBucketData: any; - constructor( - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private productsService: ProductsService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { delinquencyBucket: any }) => { this.delinquencyBucketData = data.delinquencyBucket; this.delinquencyBucketData.ranges = this.delinquencyBucketData.ranges.sort( diff --git a/src/app/products/manage-delinquency-buckets/delinquency-range/create-range/create-range.component.html b/src/app/products/manage-delinquency-buckets/delinquency-range/create-range/create-range.component.html index 7fbb99019b..008ebc84de 100644 --- a/src/app/products/manage-delinquency-buckets/delinquency-range/create-range/create-range.component.html +++ b/src/app/products/manage-delinquency-buckets/delinquency-range/create-range/create-range.component.html @@ -6,19 +6,23 @@ {{ 'labels.inputs.Classification' | translate }} - - {{ 'labels.inputs.Classification' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (delinquencyRangeForm.controls.classification.hasError('required')) { + + {{ 'labels.inputs.Classification' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Days From' | translate }} - - {{ 'labels.inputs.Days From' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (delinquencyRangeForm.controls.minimumAgeDays.hasError('required')) { + + {{ 'labels.inputs.Days From' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/products/manage-delinquency-buckets/delinquency-range/create-range/create-range.component.ts b/src/app/products/manage-delinquency-buckets/delinquency-range/create-range/create-range.component.ts index d22d9275d1..4a3fa00b19 100644 --- a/src/app/products/manage-delinquency-buckets/delinquency-range/create-range/create-range.component.ts +++ b/src/app/products/manage-delinquency-buckets/delinquency-range/create-range/create-range.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { ProductsService } from 'app/products/products.service'; @@ -14,16 +14,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateRangeComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private productsService = inject(ProductsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Delinquency Range form. */ delinquencyRangeForm: UntypedFormGroup; - constructor( - private formBuilder: UntypedFormBuilder, - private productsService: ProductsService, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.setInputForm(); diff --git a/src/app/products/manage-delinquency-buckets/delinquency-range/delinquency-range.component.resolver.ts b/src/app/products/manage-delinquency-buckets/delinquency-range/delinquency-range.component.resolver.ts index 35f36abc04..4782c614a3 100644 --- a/src/app/products/manage-delinquency-buckets/delinquency-range/delinquency-range.component.resolver.ts +++ b/src/app/products/manage-delinquency-buckets/delinquency-range/delinquency-range.component.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../../products.service'; */ @Injectable() export class DelinquencyRangeComponentsResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the delinquency ranges data. diff --git a/src/app/products/manage-delinquency-buckets/delinquency-range/delinquency-range.component.ts b/src/app/products/manage-delinquency-buckets/delinquency-range/delinquency-range.component.ts index 1a1d9b730e..a24d1e63fe 100644 --- a/src/app/products/manage-delinquency-buckets/delinquency-range/delinquency-range.component.ts +++ b/src/app/products/manage-delinquency-buckets/delinquency-range/delinquency-range.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -41,6 +41,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DelinquencyRangeComponent implements OnInit { + private route = inject(ActivatedRoute); + delinquencyRangeData: any; /** Columns to be displayed in delinquency range table. */ displayedColumns: string[] = [ @@ -56,7 +58,10 @@ export class DelinquencyRangeComponent implements OnInit { /** Sorter for delinquency range table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { delinquencyRanges: any }) => { this.delinquencyRangeData = data.delinquencyRanges; }); diff --git a/src/app/products/manage-delinquency-buckets/delinquency-range/edit-range/edit-range.component.html b/src/app/products/manage-delinquency-buckets/delinquency-range/edit-range/edit-range.component.html index c0c848fce6..279964e923 100644 --- a/src/app/products/manage-delinquency-buckets/delinquency-range/edit-range/edit-range.component.html +++ b/src/app/products/manage-delinquency-buckets/delinquency-range/edit-range/edit-range.component.html @@ -6,19 +6,23 @@ {{ 'labels.inputs.Classification' | translate }} - - {{ 'labels.inputs.Classification' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (delinquencyRangeForm.controls.classification.hasError('required')) { + + {{ 'labels.inputs.Classification' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Days From' | translate }} - - {{ 'labels.inputs.Days From' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (delinquencyRangeForm.controls.minimumAgeDays.hasError('required')) { + + {{ 'labels.inputs.Days From' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/products/manage-delinquency-buckets/delinquency-range/edit-range/edit-range.component.ts b/src/app/products/manage-delinquency-buckets/delinquency-range/edit-range/edit-range.component.ts index 42494824ed..c69e99594b 100644 --- a/src/app/products/manage-delinquency-buckets/delinquency-range/edit-range/edit-range.component.ts +++ b/src/app/products/manage-delinquency-buckets/delinquency-range/edit-range/edit-range.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { ProductsService } from 'app/products/products.service'; @@ -14,18 +14,21 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditRangeComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private productsService = inject(ProductsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Delinquency Range Data. */ delinquencyRangeData: any; /** Delinquency Range form. */ delinquencyRangeForm: UntypedFormGroup; - constructor( - private formBuilder: UntypedFormBuilder, - private productsService: ProductsService, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { delinquencyRange: any }) => { this.delinquencyRangeData = data.delinquencyRange; }); diff --git a/src/app/products/manage-delinquency-buckets/delinquency-range/view-range/view-range.component.ts b/src/app/products/manage-delinquency-buckets/delinquency-range/view-range/view-range.component.ts index 208b49bd98..4b48849bba 100644 --- a/src/app/products/manage-delinquency-buckets/delinquency-range/view-range/view-range.component.ts +++ b/src/app/products/manage-delinquency-buckets/delinquency-range/view-range/view-range.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { ProductsService } from 'app/products/products.service'; @@ -16,15 +16,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewRangeComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private productsService = inject(ProductsService); + /** Delinquency Range Data. */ delinquencyRangeData: any; - constructor( - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private productsService: ProductsService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { delinquencyRange: any }) => { this.delinquencyRangeData = data.delinquencyRange; }); diff --git a/src/app/products/manage-delinquency-buckets/manage-delinquency-buckets.component.html b/src/app/products/manage-delinquency-buckets/manage-delinquency-buckets.component.html index 6a22fed231..726428c058 100644 --- a/src/app/products/manage-delinquency-buckets/manage-delinquency-buckets.component.html +++ b/src/app/products/manage-delinquency-buckets/manage-delinquency-buckets.component.html @@ -8,21 +8,17 @@ {{ 'labels.heading.Manage Delinquency Ranges' | translate }} - - - - {{ 'labels.text.Define delinquency day ranges' | translate }} - + @if (!arrowBooleans[0]) { + + } + @if (arrowBooleans[0]) { + + } + @if (arrowBooleans[0]) { + + {{ 'labels.text.Define delinquency day ranges' | translate }} + + } @@ -34,21 +30,17 @@ {{ 'labels.heading.Manage Delinquency Rang {{ 'labels.heading.Manage Delinquency Buckets' | translate }} - - - - {{ 'labels.text.Define delinquency bucket as set of ranges' | translate }} - + @if (!arrowBooleans[1]) { + + } + @if (arrowBooleans[1]) { + + } + @if (arrowBooleans[1]) { + + {{ 'labels.text.Define delinquency bucket as set of ranges' | translate }} + + } diff --git a/src/app/products/manage-tax-components/create-tax-component/create-tax-component.component.html b/src/app/products/manage-tax-components/create-tax-component/create-tax-component.component.html index 98c83aad3d..6c5a486dac 100644 --- a/src/app/products/manage-tax-components/create-tax-component/create-tax-component.component.html +++ b/src/app/products/manage-tax-components/create-tax-component/create-tax-component.component.html @@ -6,65 +6,75 @@ {{ 'labels.inputs.Name' | translate }} - - {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (taxComponentForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Percentage' | translate }} - - {{ 'labels.inputs.Percentage ' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Percentage' | translate }} {{ 'labels.commons.should' | translate }} - {{ 'labels.commons.be larger than 0 and at most 100' | translate }} - + @if (taxComponentForm.controls.percentage.hasError('required')) { + + {{ 'labels.inputs.Percentage ' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if ( + taxComponentForm.controls.percentage.hasError('pattern') || + taxComponentForm.controls.percentage.hasError('max') + ) { + + {{ 'labels.inputs.Percentage' | translate }} {{ 'labels.commons.should' | translate }} + {{ 'labels.commons.be larger than 0 and at most 100' | translate }} + + } {{ 'labels.inputs.Debit Account Type' | translate }} - - {{ debitAccountType.value | translateKey: 'inputs.accounting' }} - + @for (debitAccountType of debitAccountTypeData; track debitAccountType) { + + {{ debitAccountType.value | translateKey: 'inputs.accounting' }} + + } - 0" - [inputFormControl]="taxComponentForm.controls.debitAccountId" - [glAccountList]="debitAccountData" - [required]="false" - [inputLabel]="'Debit Account'" - > - + @if (debitAccountData.length > 0) { + + + } {{ 'labels.inputs.Credit Account Type' | translate }} - - {{ creditAccountType.value | translateKey: 'inputs.accounting' }} - + @for (creditAccountType of creditAccountTypeData; track creditAccountType) { + + {{ creditAccountType.value | translateKey: 'inputs.accounting' }} + + } - 0" - [inputFormControl]="taxComponentForm.controls.creditAccountId" - [glAccountList]="creditAccountData" - [required]="false" - [inputLabel]="'Credit Account'" - > - + @if (creditAccountData.length > 0) { + + + } {{ 'labels.inputs.Start Date' | translate }} @@ -78,10 +88,12 @@ /> - - {{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (taxComponentForm.controls.startDate.hasError('required')) { + + {{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/products/manage-tax-components/create-tax-component/create-tax-component.component.ts b/src/app/products/manage-tax-components/create-tax-component/create-tax-component.component.ts index 55c651a4ec..6cd2831e98 100644 --- a/src/app/products/manage-tax-components/create-tax-component/create-tax-component.component.ts +++ b/src/app/products/manage-tax-components/create-tax-component/create-tax-component.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -29,6 +29,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateTaxComponentComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private productsService = inject(ProductsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + /** Minimum start date allowed. */ minDate = new Date(); /** Maximum start date allowed. */ @@ -46,6 +53,9 @@ export class CreateTaxComponentComponent implements OnInit { /** Debit Account data. */ debitAccountData: any[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the tax Component template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -55,14 +65,7 @@ export class CreateTaxComponentComponent implements OnInit { * @param {Dates} dateUtils Date Utils to format date. * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private productsService: ProductsService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { taxComponentTemplate: any }) => { this.taxComponentTemplateData = data.taxComponentTemplate; }); diff --git a/src/app/products/manage-tax-components/edit-tax-component/edit-tax-component.component.html b/src/app/products/manage-tax-components/edit-tax-component/edit-tax-component.component.html index 8a79a44b7a..558c8f52c6 100644 --- a/src/app/products/manage-tax-components/edit-tax-component/edit-tax-component.component.html +++ b/src/app/products/manage-tax-components/edit-tax-component/edit-tax-component.component.html @@ -6,30 +6,38 @@ {{ 'labels.inputs.Name' | translate }} - - {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (taxComponentForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Percentage' | translate }} - - {{ 'labels.inputs.Percentage' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (taxComponentForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Percentage' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Credit Account Type' | translate }} - - + @if (taxComponentData?.creditAccountType?.value) { + + {{ 'labels.inputs.Credit Account Type' | translate }} + + + } - - {{ 'labels.inputs.Credit Account' | translate }} - - + @if (taxComponentData?.creditAccount?.name) { + + {{ 'labels.inputs.Credit Account' | translate }} + + + } {{ 'labels.inputs.Start Date' | translate }} @@ -43,10 +51,12 @@ /> - - {{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (taxComponentForm.controls.startDate.hasError('required')) { + + {{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/products/manage-tax-components/edit-tax-component/edit-tax-component.component.ts b/src/app/products/manage-tax-components/edit-tax-component/edit-tax-component.component.ts index ef3ad80b18..1daf1b6808 100644 --- a/src/app/products/manage-tax-components/edit-tax-component/edit-tax-component.component.ts +++ b/src/app/products/manage-tax-components/edit-tax-component/edit-tax-component.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -22,6 +22,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditTaxComponentComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private productsService = inject(ProductsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + private translateService = inject(TranslateService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum start date allowed. */ @@ -31,6 +39,9 @@ export class EditTaxComponentComponent implements OnInit { /** Tax Component data. */ taxComponentData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -40,15 +51,7 @@ export class EditTaxComponentComponent implements OnInit { * @param {Dates} dateUtils Date Utils to format date. * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private productsService: ProductsService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private settingsService: SettingsService, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { taxComponent: any }) => { this.taxComponentData = data.taxComponent; }); diff --git a/src/app/products/manage-tax-components/manage-tax-components.component.ts b/src/app/products/manage-tax-components/manage-tax-components.component.ts index 166d8bd4bd..d73934382c 100644 --- a/src/app/products/manage-tax-components/manage-tax-components.component.ts +++ b/src/app/products/manage-tax-components/manage-tax-components.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -52,6 +52,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ManageTaxComponentsComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Tax Components data. */ taxComponentData: any; /** Columns to be displayed in tax component table. */ @@ -69,11 +71,14 @@ export class ManageTaxComponentsComponent implements OnInit { /** Sorter for tax component table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the tax component data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { taxComponents: any }) => { this.taxComponentData = data.taxComponents; }); diff --git a/src/app/products/manage-tax-components/manage-tax-components.resolver.ts b/src/app/products/manage-tax-components/manage-tax-components.resolver.ts index 46a3bc88c2..4ed02ee372 100644 --- a/src/app/products/manage-tax-components/manage-tax-components.resolver.ts +++ b/src/app/products/manage-tax-components/manage-tax-components.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class ManageTaxComponentsResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the tax components data. diff --git a/src/app/products/manage-tax-components/tax-component-template.resolver.ts b/src/app/products/manage-tax-components/tax-component-template.resolver.ts index 9ef01666b9..bdf965e5aa 100644 --- a/src/app/products/manage-tax-components/tax-component-template.resolver.ts +++ b/src/app/products/manage-tax-components/tax-component-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class TaxComponentTemplateResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the tax components template data. diff --git a/src/app/products/manage-tax-components/tax-component.resolver.ts b/src/app/products/manage-tax-components/tax-component.resolver.ts index 8e137e88d8..87bcba8254 100644 --- a/src/app/products/manage-tax-components/tax-component.resolver.ts +++ b/src/app/products/manage-tax-components/tax-component.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class TaxComponentResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the tax Component data. diff --git a/src/app/products/manage-tax-components/view-tax-component/view-tax-component.component.html b/src/app/products/manage-tax-components/view-tax-component/view-tax-component.component.html index bab697b0f6..5d90e057c4 100644 --- a/src/app/products/manage-tax-components/view-tax-component/view-tax-component.component.html +++ b/src/app/products/manage-tax-components/view-tax-component/view-tax-component.component.html @@ -23,39 +23,55 @@ {{ taxComponentData.percentage | formatNumber }} % - - {{ 'labels.inputs.Debit Account Type' | translate }} - + @if (taxComponentData.debitAccountType) { + + {{ 'labels.inputs.Debit Account Type' | translate }} + + } - - {{ taxComponentData.debitAccountType.value }} - + @if (taxComponentData.debitAccountType) { + + {{ taxComponentData.debitAccountType.value }} + + } - - {{ 'labels.inputs.Debit Account' | translate }} - + @if (taxComponentData.debitAccount) { + + {{ 'labels.inputs.Debit Account' | translate }} + + } - - ({{ 'labels.inputs.accounting.' + taxComponentData.debitAccount.glCode }}) - {{ taxComponentData.debitAccount.name | translate }} - + @if (taxComponentData.debitAccount) { + + ({{ 'labels.inputs.accounting.' + taxComponentData.debitAccount.glCode }}) + {{ taxComponentData.debitAccount.name | translate }} + + } - - {{ 'labels.inputs.Credit Account Type' | translate }} - + @if (taxComponentData.creditAccountType) { + + {{ 'labels.inputs.Credit Account Type' | translate }} + + } - - {{ taxComponentData.creditAccountType.value | translateKey: 'catalogs' }} - + @if (taxComponentData.creditAccountType) { + + {{ taxComponentData.creditAccountType.value | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Credit Account' | translate }} - + @if (taxComponentData.creditAccount) { + + {{ 'labels.inputs.Credit Account' | translate }} + + } - - ({{ taxComponentData.creditAccount.glCode }}) - {{ taxComponentData.creditAccount.name }} - + @if (taxComponentData.creditAccount) { + + ({{ taxComponentData.creditAccount.glCode }}) + {{ taxComponentData.creditAccount.name }} + + } {{ 'labels.inputs.Start Date' | translate }} diff --git a/src/app/products/manage-tax-components/view-tax-component/view-tax-component.component.ts b/src/app/products/manage-tax-components/view-tax-component/view-tax-component.component.ts index 65662a8784..6445c7abfb 100644 --- a/src/app/products/manage-tax-components/view-tax-component/view-tax-component.component.ts +++ b/src/app/products/manage-tax-components/view-tax-component/view-tax-component.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { DateFormatPipe } from '../../../pipes/date-format.pipe'; @@ -21,14 +21,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewTaxComponentComponent { + private route = inject(ActivatedRoute); + /** tax Component Data. */ taxComponentData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the tax Component data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { taxComponent: any }) => { this.taxComponentData = data.taxComponent; }); diff --git a/src/app/products/manage-tax-configurations/manage-tax-configurations.component.html b/src/app/products/manage-tax-configurations/manage-tax-configurations.component.html index 649da59b08..545ce1b4f0 100644 --- a/src/app/products/manage-tax-configurations/manage-tax-configurations.component.html +++ b/src/app/products/manage-tax-configurations/manage-tax-configurations.component.html @@ -8,21 +8,17 @@ {{ 'labels.heading.Manage Tax Components' | translate }} - - - - {{ 'labels.heading.Define Tax Components' | translate }} - + @if (!arrowBooleans[0]) { + + } + @if (arrowBooleans[0]) { + + } + @if (arrowBooleans[0]) { + + {{ 'labels.heading.Define Tax Components' | translate }} + + } @@ -34,21 +30,17 @@ {{ 'labels.heading.Manage Tax Comp {{ 'labels.heading.Manage Tax Groups' | translate }} - - - - {{ 'labels.heading.Define Tax Groups' | translate }} - + @if (!arrowBooleans[1]) { + + } + @if (arrowBooleans[1]) { + + } + @if (arrowBooleans[1]) { + + {{ 'labels.heading.Define Tax Groups' | translate }} + + } diff --git a/src/app/products/manage-tax-groups/create-tax-group/create-tax-group.component.html b/src/app/products/manage-tax-groups/create-tax-group/create-tax-group.component.html index 0a635d319e..e1a0d61fe4 100644 --- a/src/app/products/manage-tax-groups/create-tax-group/create-tax-group.component.html +++ b/src/app/products/manage-tax-groups/create-tax-group/create-tax-group.component.html @@ -6,10 +6,12 @@ {{ 'labels.inputs.Name' | translate }} - - {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (taxGroupForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Tax Components' | translate }} diff --git a/src/app/products/manage-tax-groups/create-tax-group/create-tax-group.component.ts b/src/app/products/manage-tax-groups/create-tax-group/create-tax-group.component.ts index a22bc9e6c5..d09cc9b7f0 100644 --- a/src/app/products/manage-tax-groups/create-tax-group/create-tax-group.component.ts +++ b/src/app/products/manage-tax-groups/create-tax-group/create-tax-group.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -67,6 +67,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateTaxGroupComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private productsService = inject(ProductsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + private translateService = inject(TranslateService); + /** Minimum start date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum start date allowed. */ @@ -87,6 +96,9 @@ export class CreateTaxGroupComponent implements OnInit { 'actions' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the tax Group template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -97,16 +109,7 @@ export class CreateTaxGroupComponent implements OnInit { * @param {MatDialog} dialog Dialog reference. * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private productsService: ProductsService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private dialog: MatDialog, - private settingsService: SettingsService, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { taxGroupTemplate: any }) => { this.taxGroupTemplateData = data.taxGroupTemplate; this.taxComponentOptions = this.taxGroupTemplateData.taxComponents; diff --git a/src/app/products/manage-tax-groups/create-tax-group/manage-tax-group-template.resolver.ts b/src/app/products/manage-tax-groups/create-tax-group/manage-tax-group-template.resolver.ts index 6f0b206fcb..a577099e0e 100644 --- a/src/app/products/manage-tax-groups/create-tax-group/manage-tax-group-template.resolver.ts +++ b/src/app/products/manage-tax-groups/create-tax-group/manage-tax-group-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { ProductsService } from '../../products.service'; */ @Injectable() export class ManageTaxGroupTemplateResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the tax groups template data. diff --git a/src/app/products/manage-tax-groups/edit-tax-group/edit-tax-group.component.html b/src/app/products/manage-tax-groups/edit-tax-group/edit-tax-group.component.html index ac4e80e2e2..cb87141a0c 100644 --- a/src/app/products/manage-tax-groups/edit-tax-group/edit-tax-group.component.html +++ b/src/app/products/manage-tax-groups/edit-tax-group/edit-tax-group.component.html @@ -6,10 +6,12 @@ {{ 'labels.inputs.Name' | translate }} - - {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (taxGroupForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Tax Components' | translate }} @@ -51,17 +53,18 @@ {{ 'labels.inputs.Tax Components' | translate }} > - - - + @if (taxComponent.isNew) { + + + + } diff --git a/src/app/products/manage-tax-groups/edit-tax-group/edit-tax-group.component.ts b/src/app/products/manage-tax-groups/edit-tax-group/edit-tax-group.component.ts index dbebd39816..046307c23c 100644 --- a/src/app/products/manage-tax-groups/edit-tax-group/edit-tax-group.component.ts +++ b/src/app/products/manage-tax-groups/edit-tax-group/edit-tax-group.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -62,6 +62,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditTaxGroupComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private productsService = inject(ProductsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + private translateService = inject(TranslateService); + /** Minimum start date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum start date allowed. */ @@ -82,6 +91,9 @@ export class EditTaxGroupComponent implements OnInit { 'actions' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the tax Group template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -93,16 +105,7 @@ export class EditTaxGroupComponent implements OnInit { * @param {SettingsService} settingsService Settings Service. * @param {TranslateService} translateService translate Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private productsService: ProductsService, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - public dialog: MatDialog, - private settingsService: SettingsService, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { taxGroup: any }) => { this.taxGroupData = data.taxGroup; this.taxComponentOptions = this.taxGroupData.taxComponents; diff --git a/src/app/products/manage-tax-groups/edit-tax-group/edit-tax-group.resolver.ts b/src/app/products/manage-tax-groups/edit-tax-group/edit-tax-group.resolver.ts index eee7d31e5b..8424cb626d 100644 --- a/src/app/products/manage-tax-groups/edit-tax-group/edit-tax-group.resolver.ts +++ b/src/app/products/manage-tax-groups/edit-tax-group/edit-tax-group.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../../products.service'; */ @Injectable() export class EditTaxGroupResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the tax Group data. diff --git a/src/app/products/manage-tax-groups/manage-tax-groups.component.ts b/src/app/products/manage-tax-groups/manage-tax-groups.component.ts index b65d4942b6..9464f77d19 100644 --- a/src/app/products/manage-tax-groups/manage-tax-groups.component.ts +++ b/src/app/products/manage-tax-groups/manage-tax-groups.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -48,6 +48,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ManageTaxGroupsComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Tax Groups data. */ taxGroupsData: any; /** Columns to be displayed in tax groups table. */ @@ -60,11 +62,14 @@ export class ManageTaxGroupsComponent implements OnInit { /** Sorter for tax groups table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the tax groups data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { taxGroups: any }) => { this.taxGroupsData = data.taxGroups; }); diff --git a/src/app/products/manage-tax-groups/manage-tax-groups.resolver.ts b/src/app/products/manage-tax-groups/manage-tax-groups.resolver.ts index e1049ec08c..18e9c79148 100644 --- a/src/app/products/manage-tax-groups/manage-tax-groups.resolver.ts +++ b/src/app/products/manage-tax-groups/manage-tax-groups.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class ManageTaxGroupsResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the tax groups data. diff --git a/src/app/products/manage-tax-groups/tax-group.resolver.ts b/src/app/products/manage-tax-groups/tax-group.resolver.ts index 1540ad3515..579811701e 100644 --- a/src/app/products/manage-tax-groups/tax-group.resolver.ts +++ b/src/app/products/manage-tax-groups/tax-group.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class TaxGroupResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the tax Group data. diff --git a/src/app/products/manage-tax-groups/view-tax-group/view-tax-group.component.html b/src/app/products/manage-tax-groups/view-tax-group/view-tax-group.component.html index a873183208..bc8740087a 100644 --- a/src/app/products/manage-tax-groups/view-tax-group/view-tax-group.component.html +++ b/src/app/products/manage-tax-groups/view-tax-group/view-tax-group.component.html @@ -30,20 +30,22 @@ - - - {{ taxcomponent.taxComponent.glCode }} - {{ taxcomponent.taxComponent.name }} - - - - {{ taxcomponent.startDate | dateFormat }} - - - - {{ taxcomponent.endDate | dateFormat }} - - + @for (taxcomponent of taxGroupData.taxAssociations; track taxcomponent) { + + + {{ taxcomponent.taxComponent.glCode }} + {{ taxcomponent.taxComponent.name }} + + + {{ taxcomponent.startDate | dateFormat }} + + @if (taxcomponent.endDate !== undefined || taxcomponent.endDate !== null) { + + {{ taxcomponent.endDate | dateFormat }} + + } + + } diff --git a/src/app/products/manage-tax-groups/view-tax-group/view-tax-group.component.ts b/src/app/products/manage-tax-groups/view-tax-group/view-tax-group.component.ts index 98d9c3bf29..77c449a6e2 100644 --- a/src/app/products/manage-tax-groups/view-tax-group/view-tax-group.component.ts +++ b/src/app/products/manage-tax-groups/view-tax-group/view-tax-group.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { DateFormatPipe } from '../../../pipes/date-format.pipe'; @@ -19,14 +19,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewTaxGroupComponent { + private route = inject(ActivatedRoute); + /** tax Group Data. */ taxGroupData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the tax Group data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { taxGroup: any }) => { this.taxGroupData = data.taxGroup; }); diff --git a/src/app/products/products-mix/create-product-mix/create-product-mix.component.html b/src/app/products/products-mix/create-product-mix/create-product-mix.component.html index ac7947bf33..ff9b5d0a16 100644 --- a/src/app/products/products-mix/create-product-mix/create-product-mix.component.html +++ b/src/app/products/products-mix/create-product-mix/create-product-mix.component.html @@ -6,28 +6,38 @@ {{ 'labels.inputs.Product' | translate }} - - {{ productOption.name }} - + @for (productOption of productOptionData; track productOption) { + + {{ productOption.name }} + + } - - {{ 'labels.inputs.Product' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (productMixForm.controls.productId.hasError('required')) { + + {{ 'labels.inputs.Product' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Restricted products' | translate }} - - - {{ product.name }} - - - - {{ 'labels.commons.At least one restricted product' | translate }} - {{ 'labels.commons.must be selected' | translate }} - - + @if (productData) { + + {{ 'labels.inputs.Restricted products' | translate }} + + @for (product of productData; track product) { + + {{ product.name }} + + } + + @if (productMixForm.controls.restrictedProducts.hasError('required')) { + + {{ 'labels.commons.At least one restricted product' | translate }} + {{ 'labels.commons.must be selected' | translate }} + + } + + } diff --git a/src/app/products/products-mix/create-product-mix/create-product-mix.component.ts b/src/app/products/products-mix/create-product-mix/create-product-mix.component.ts index c17da579a0..db59ae1726 100644 --- a/src/app/products/products-mix/create-product-mix/create-product-mix.component.ts +++ b/src/app/products/products-mix/create-product-mix/create-product-mix.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, FormControl, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -19,6 +19,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateProductMixComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private productsService = inject(ProductsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Product mix form. */ productMixForm: UntypedFormGroup; /** Products mix template data. */ @@ -28,6 +33,9 @@ export class CreateProductMixComponent implements OnInit { /** Product data. */ productData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Products mix template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -35,12 +43,7 @@ export class CreateProductMixComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private productsService: ProductsService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { productsMixTemplate: any }) => { this.productsMixTemplateData = data.productsMixTemplate; }); diff --git a/src/app/products/products-mix/edit-product-mix/edit-product-mix.component.html b/src/app/products/products-mix/edit-product-mix/edit-product-mix.component.html index a6ab61d6e2..9b8399ab8d 100644 --- a/src/app/products/products-mix/edit-product-mix/edit-product-mix.component.html +++ b/src/app/products/products-mix/edit-product-mix/edit-product-mix.component.html @@ -8,18 +8,24 @@ - - {{ 'labels.inputs.Restricted products' | translate }} - - - {{ product.name }} - - - - {{ 'labels.commons.At least one restricted product' | translate }} - {{ 'labels.commons.must be selected' | translate }} - - + @if (productData) { + + {{ 'labels.inputs.Restricted products' | translate }} + + @for (product of productData; track product) { + + {{ product.name }} + + } + + @if (productMixForm.controls.restrictedProducts.hasError('required')) { + + {{ 'labels.commons.At least one restricted product' | translate }} + {{ 'labels.commons.must be selected' | translate }} + + } + + } diff --git a/src/app/products/products-mix/edit-product-mix/edit-product-mix.component.ts b/src/app/products/products-mix/edit-product-mix/edit-product-mix.component.ts index 92d94839fc..43cceaafb8 100644 --- a/src/app/products/products-mix/edit-product-mix/edit-product-mix.component.ts +++ b/src/app/products/products-mix/edit-product-mix/edit-product-mix.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, FormControl, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -19,6 +19,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditProductMixComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private productsService = inject(ProductsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Product mix form. */ productMixForm: UntypedFormGroup; /** Products mix template data. */ @@ -28,6 +33,9 @@ export class EditProductMixComponent implements OnInit { /** Product data. */ productData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Products mix template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -35,12 +43,7 @@ export class EditProductMixComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private productsService: ProductsService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { productMix: any }) => { this.productMixData = data.productMix; }); diff --git a/src/app/products/products-mix/products-mix-template.resolver.ts b/src/app/products/products-mix/products-mix-template.resolver.ts index 3f99520a4f..0aeaf5a618 100644 --- a/src/app/products/products-mix/products-mix-template.resolver.ts +++ b/src/app/products/products-mix/products-mix-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class ProductsMixTemplateResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the products mix template data. diff --git a/src/app/products/products-mix/products-mix.component.ts b/src/app/products/products-mix/products-mix.component.ts index bd68dbad1c..276dea215c 100644 --- a/src/app/products/products-mix/products-mix.component.ts +++ b/src/app/products/products-mix/products-mix.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -48,6 +48,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ProductsMixComponent implements OnInit { + private route = inject(ActivatedRoute); + /** productMix data. */ productMixData: any; /** Columns to be displayed in products mix table. */ @@ -59,11 +61,14 @@ export class ProductsMixComponent implements OnInit { /** Sorter for manage data tables table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the products data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { products: any }) => { this.productMixData = data.products; }); diff --git a/src/app/products/products-mix/products-mix.resolver.ts b/src/app/products/products-mix/products-mix.resolver.ts index ce5cd2395c..f8b27cca81 100644 --- a/src/app/products/products-mix/products-mix.resolver.ts +++ b/src/app/products/products-mix/products-mix.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class ProductsMixResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the products mix data. diff --git a/src/app/products/products-mix/view-product-mix/view-product-mix.component.ts b/src/app/products/products-mix/view-product-mix/view-product-mix.component.ts index eae3ac7f5c..20fb482dbf 100644 --- a/src/app/products/products-mix/view-product-mix/view-product-mix.component.ts +++ b/src/app/products/products-mix/view-product-mix/view-product-mix.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -53,6 +53,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewProductMixComponent implements OnInit { + private route = inject(ActivatedRoute); + private dialog = inject(MatDialog); + private productsService = inject(ProductsService); + private router = inject(Router); + private translateService = inject(TranslateService); + /** Product mix data. */ productMixData: any; /** Allowed products datasource. */ @@ -73,18 +79,15 @@ export class ViewProductMixComponent implements OnInit { /** Sorter for restricted products table. */ @ViewChild(MatSort, { static: true }) restrictedSort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the product mix data from `resolve`. * @param {ActivatedRoute} route Activated Route. * @param {TranslateService} translateService Translate Service. */ - constructor( - private route: ActivatedRoute, - private dialog: MatDialog, - private productsService: ProductsService, - private router: Router, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { productMix: any }) => { this.productMixData = data.productMix; }); diff --git a/src/app/products/products-mix/view-product-mix/view-product-mix.resolver.ts b/src/app/products/products-mix/view-product-mix/view-product-mix.resolver.ts index 2e6869596a..afd4145e24 100644 --- a/src/app/products/products-mix/view-product-mix/view-product-mix.resolver.ts +++ b/src/app/products/products-mix/view-product-mix/view-product-mix.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../../products.service'; */ @Injectable() export class ViewProductMixResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the product mix. diff --git a/src/app/products/products.component.html b/src/app/products/products.component.html index 3c77d0000b..803c6c8a64 100644 --- a/src/app/products/products.component.html +++ b/src/app/products/products.component.html @@ -12,24 +12,28 @@ {{ 'labels.heading.Loan Products' | translate }} - - {{ 'labels.text.Add new loan product or modify or inactivate loan product' | translate }} - + @if (arrowBooleans[0]) { + + {{ 'labels.text.Add new loan product or modify or inactivate loan product' | translate }} + + } - - + @if (!arrowBooleans[0]) { + + } + @if (arrowBooleans[0]) { + + } @@ -44,24 +48,28 @@ {{ 'labels.heading.Savings Products' | translate }} - - {{ 'labels.text.Add new savings product or modify or inactivate savings product' | translate }} - + @if (arrowBooleans[1]) { + + {{ 'labels.text.Add new savings product or modify or inactivate savings product' | translate }} + + } - - + @if (!arrowBooleans[1]) { + + } + @if (arrowBooleans[1]) { + + } @@ -76,24 +84,28 @@ {{ 'labels.heading.Share Products' | translate }} - - {{ 'labels.text.Add new share product or modify or inactivate share product' | translate }} - + @if (arrowBooleans[2]) { + + {{ 'labels.text.Add new share product or modify or inactivate share product' | translate }} + + } - - + @if (!arrowBooleans[2]) { + + } + @if (arrowBooleans[2]) { + + } @@ -108,27 +120,31 @@ {{ 'labels.heading.Charges' | translate }} - - {{ - 'labels.text.Define charges/penalties for loan products, savings and deposit products' - | translate - }} - + @if (arrowBooleans[3]) { + + {{ + 'labels.text.Define charges/penalties for loan products, savings and deposit products' + | translate + }} + + } - - + @if (!arrowBooleans[3]) { + + } + @if (arrowBooleans[3]) { + + } @@ -142,24 +158,28 @@ {{ 'labels.heading.Collateral Management' | translate }} - - {{ 'labels.text.Define collaterals for Collateral Management' | translate }} - + @if (arrowBooleans[4]) { + + {{ 'labels.text.Define collaterals for Collateral Management' | translate }} + + } - - + @if (!arrowBooleans[4]) { + + } + @if (arrowBooleans[4]) { + + } @@ -175,29 +195,28 @@ {{ 'labels.heading.Delinquency Buckets' | translate }} - - {{ 'labels.text.Define delinquency day ranges and bucket set for loan products' | translate }} - + @if (arrowBooleans[5]) { + + {{ 'labels.text.Define delinquency day ranges and bucket set for loan products' | translate }} + + } - - + @if (!arrowBooleans[5]) { + + } + @if (arrowBooleans[5]) { + + } @@ -214,24 +233,28 @@ {{ 'labels.heading.Products Mix' | translate }} - - {{ 'labels.text.Defines rules for taking multiple rules' | translate }} - + @if (arrowBooleans[6]) { + + {{ 'labels.text.Defines rules for taking multiple rules' | translate }} + + } - - + @if (!arrowBooleans[6]) { + + } + @if (arrowBooleans[6]) { + + } @@ -245,29 +268,28 @@ {{ 'labels.heading.Fixed Deposit Products' | translate }} - - {{ 'labels.text.Add, modify or inactivate a Fixed deposit product' | translate }} - + @if (arrowBooleans[7]) { + + {{ 'labels.text.Add, modify or inactivate a Fixed deposit product' | translate }} + + } - - + @if (!arrowBooleans[7]) { + + } + @if (arrowBooleans[7]) { + + } @@ -285,29 +307,28 @@ {{ 'labels.heading.Recurring Deposit Products' | translate }} - - {{ 'labels.text.Add, modify or inactivate a Recurring Deposit product' | translate }} - + @if (arrowBooleans[8]) { + + {{ 'labels.text.Add, modify or inactivate a Recurring Deposit product' | translate }} + + } - - + @if (!arrowBooleans[8]) { + + } + @if (arrowBooleans[8]) { + + } @@ -321,24 +342,28 @@ {{ 'labels.heading.Manage Tax Configurations' | translate }} - - {{ 'labels.text.Define Tax components and Tax groups' | translate }} - + @if (arrowBooleans[9]) { + + {{ 'labels.text.Define Tax components and Tax groups' | translate }} + + } - - + @if (!arrowBooleans[9]) { + + } + @if (arrowBooleans[9]) { + + } @@ -351,24 +376,28 @@ {{ 'labels.heading.Floating Rates' | translate }} - - {{ 'labels.text.Define floating rates for loan products' | translate }} - + @if (arrowBooleans[10]) { + + {{ 'labels.text.Define floating rates for loan products' | translate }} + + } - - + @if (!arrowBooleans[10]) { + + } + @if (arrowBooleans[10]) { + + } diff --git a/src/app/products/products.component.ts b/src/app/products/products.component.ts index 566d63df23..a97035285b 100644 --- a/src/app/products/products.component.ts +++ b/src/app/products/products.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { AfterViewInit, Component, ElementRef, TemplateRef, ViewChild } from '@angular/core'; +import { AfterViewInit, Component, ElementRef, TemplateRef, ViewChild, inject } from '@angular/core'; import { Router, RouterLink } from '@angular/router'; /** Custom Services */ @@ -28,6 +28,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ProductsComponent implements AfterViewInit { + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /* Reference of charges */ @ViewChild('charges') charges: ElementRef; /* Template for popover on charges */ @@ -55,16 +59,15 @@ export class ProductsComponent implements AfterViewInit { // Initialize an array of 11 boolean values, all set to false arrowBooleans: boolean[] = new Array(11).fill(false); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {Router} router Router. * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) {} + constructor() {} /** * To show popover. diff --git a/src/app/products/products.service.ts b/src/app/products/products.service.ts index 0da88bf65e..f163a9bffe 100644 --- a/src/app/products/products.service.ts +++ b/src/app/products/products.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -15,14 +15,17 @@ import { SettingsService } from 'app/settings/settings.service'; providedIn: 'root' }) export class ProductsService { + private http = inject(HttpClient); + private settingsService = inject(SettingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. * @param {SettingsService} settingsService Settings Service. */ - constructor( - private http: HttpClient, - private settingsService: SettingsService - ) {} + constructor() {} /** * @returns {Observable} Loan products data diff --git a/src/app/products/recurring-deposit-products/create-recurring-deposit-product/create-recurring-deposit-product.component.html b/src/app/products/recurring-deposit-products/create-recurring-deposit-product/create-recurring-deposit-product.component.html index a7fc8c94e0..32e5dc73ed 100644 --- a/src/app/products/recurring-deposit-products/create-recurring-deposit-product/create-recurring-deposit-product.component.html +++ b/src/app/products/recurring-deposit-products/create-recurring-deposit-product/create-recurring-deposit-product.component.html @@ -92,17 +92,18 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (recurringDepositProductFormValid) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/products/recurring-deposit-products/create-recurring-deposit-product/create-recurring-deposit-product.component.ts b/src/app/products/recurring-deposit-products/create-recurring-deposit-product/create-recurring-deposit-product.component.ts index a2cbe7015c..ee26645946 100644 --- a/src/app/products/recurring-deposit-products/create-recurring-deposit-product/create-recurring-deposit-product.component.ts +++ b/src/app/products/recurring-deposit-products/create-recurring-deposit-product/create-recurring-deposit-product.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Components */ @@ -42,6 +42,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateRecurringDepositProductComponent { + private route = inject(ActivatedRoute); + private productsService = inject(ProductsService); + private router = inject(Router); + private settingsService = inject(SettingsService); + private accounting = inject(Accounting); + @ViewChild(RecurringDepositProductDetailsStepComponent, { static: true }) recurringDepositProductDetailsStep: RecurringDepositProductDetailsStepComponent; @ViewChild(RecurringDepositProductCurrencyStepComponent, { static: true }) @@ -60,6 +66,9 @@ export class CreateRecurringDepositProductComponent { recurringDepositProductsTemplate: any; accountingRuleData: string[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route. * @param {ProductsService} productsService Products Service. @@ -67,13 +76,7 @@ export class CreateRecurringDepositProductComponent { * @param {SettingsService} settingsService Settings Service. */ - constructor( - private route: ActivatedRoute, - private productsService: ProductsService, - private router: Router, - private settingsService: SettingsService, - private accounting: Accounting - ) { + constructor() { this.route.data.subscribe((data: { recurringDepositProductsTemplate: any }) => { this.recurringDepositProductsTemplate = data.recurringDepositProductsTemplate; }); diff --git a/src/app/products/recurring-deposit-products/edit-recurring-deposit-product/edit-recurring-deposit-product.component.html b/src/app/products/recurring-deposit-products/edit-recurring-deposit-product/edit-recurring-deposit-product.component.html index e5fddebd38..1e5ae88c50 100644 --- a/src/app/products/recurring-deposit-products/edit-recurring-deposit-product/edit-recurring-deposit-product.component.html +++ b/src/app/products/recurring-deposit-products/edit-recurring-deposit-product/edit-recurring-deposit-product.component.html @@ -92,17 +92,18 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (recurringDepositProductFormValidAndNotPrinstine) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/products/recurring-deposit-products/edit-recurring-deposit-product/edit-recurring-deposit-product.component.ts b/src/app/products/recurring-deposit-products/edit-recurring-deposit-product/edit-recurring-deposit-product.component.ts index 3cf86db910..b3f4b63b2f 100644 --- a/src/app/products/recurring-deposit-products/edit-recurring-deposit-product/edit-recurring-deposit-product.component.ts +++ b/src/app/products/recurring-deposit-products/edit-recurring-deposit-product/edit-recurring-deposit-product.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Components */ @@ -42,6 +42,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditRecurringDepositProductComponent { + private route = inject(ActivatedRoute); + private productsService = inject(ProductsService); + private router = inject(Router); + private settingsService = inject(SettingsService); + private accounting = inject(Accounting); + @ViewChild(RecurringDepositProductDetailsStepComponent, { static: true }) recurringDepositProductDetailsStep: RecurringDepositProductDetailsStepComponent; @ViewChild(RecurringDepositProductCurrencyStepComponent, { static: true }) @@ -60,6 +66,9 @@ export class EditRecurringDepositProductComponent { recurringDepositProductsTemplate: any; accountingRuleData: string[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route. * @param {ProductsService} productsService Products Service. @@ -67,13 +76,7 @@ export class EditRecurringDepositProductComponent { * @param {SettingsService} settingsService Settings Service. */ - constructor( - private route: ActivatedRoute, - private productsService: ProductsService, - private router: Router, - private settingsService: SettingsService, - private accounting: Accounting - ) { + constructor() { this.route.data.subscribe((data: { recurringDepositProductAndTemplate: any }) => { this.recurringDepositProductsTemplate = data.recurringDepositProductAndTemplate; }); diff --git a/src/app/products/recurring-deposit-products/edit-recurring-deposit-product/recurring-deposit-product-and-template.resolver.ts b/src/app/products/recurring-deposit-products/edit-recurring-deposit-product/recurring-deposit-product-and-template.resolver.ts index 57b0cf4df5..bce6bcedf0 100644 --- a/src/app/products/recurring-deposit-products/edit-recurring-deposit-product/recurring-deposit-product-and-template.resolver.ts +++ b/src/app/products/recurring-deposit-products/edit-recurring-deposit-product/recurring-deposit-product-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../../products.service'; */ @Injectable() export class RecurringDepositProductAndTemplateResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the Recurring Deposits Product and Template. diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-accounting-step/recurring-deposit-product-accounting-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-accounting-step/recurring-deposit-product-accounting-step.component.html index 3480b088b5..73e7b0f9d1 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-accounting-step/recurring-deposit-product-accounting-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-accounting-step/recurring-deposit-product-accounting-step.component.html @@ -4,290 +4,264 @@ class="flex-98 layout-row gap-5percent layout-column.lt-md radio-group-spacing" formControlName="accountingRule" > - - {{ 'labels.accounting.' + accountingRule | translate }} - + @for (accountingRule of accountingRuleData; track accountingRule; let i = $index) { + + {{ 'labels.accounting.' + accountingRule | translate }} + + } - - {{ 'labels.heading.Assets' | translate }} - - - - - - - - - - - - - {{ 'labels.heading.Liabilities' | translate }} - - - - - - - - - - - - - {{ 'labels.heading.Expenses' | translate }} - - - - - - - {{ 'labels.heading.Income' | translate }} - - - - - - - - - - {{ 'labels.heading.Advanced Accounting Rules' | translate }} - - - - - - - {{ 'labels.heading.Configure Fund Sources for Payment Channels' | translate }} - - - - - - {{ 'labels.buttons.Add' | translate }} - - - - + {{ 'labels.heading.Assets' | translate }} + + + @if (isAccrualAccounting()) { + - - {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentFundSource.paymentTypeId | find: paymentTypeData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Fund Source' | translate }} - - {{ paymentFundSource.fundSourceAccountId | find: assetAccountData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - {{ 'labels.heading.Map Fees to Specific Income Accounts' | translate }} - - - - - {{ 'labels.buttons.Add' | translate }} - - - - + } + @if (isAccrualAccounting()) { + - - {{ 'labels.inputs.Fees' | translate }} - - {{ feesIncome.chargeId | find: chargeData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ feesIncome.incomeAccountId | find: incomeAccountData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - - - {{ 'labels.heading.Map Penalties to Specific Income Accounts' | translate }} - - - - - - {{ 'labels.buttons.Add' | translate }} - - - - + } + + {{ 'labels.heading.Liabilities' | translate }} + + + + + @if (isAccrualAccounting()) { + - - {{ 'labels.inputs.Penalty' | translate }} - - {{ penaltyIncome.chargeId | find: penaltyData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ penaltyIncome.incomeAccountId | find: incomeAccountData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Actions' | translate }} - + + } + + {{ 'labels.heading.Expenses' | translate }} + + + + {{ 'labels.heading.Income' | translate }} + + + + + + {{ 'labels.heading.Advanced Accounting Rules' | translate }} + + @if (recurringDepositProductAccountingForm.value.advancedAccountingRules) { + + + + {{ 'labels.heading.Configure Fund Sources for Payment Channels' | translate }} + + - - - - + + {{ 'labels.buttons.Add' | translate }} - - - - - - - + + @if (paymentChannelToFundSourceMappings.value.length !== 0) { + + + {{ 'labels.inputs.Payment Type' | translate }} + + {{ paymentFundSource.paymentTypeId | find: paymentTypeData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Fund Source' | translate }} + + {{ paymentFundSource.fundSourceAccountId | find: assetAccountData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } + + @if (existCharges()) { + + {{ 'labels.heading.Map Fees to Specific Income Accounts' | translate }} + + + + {{ 'labels.buttons.Add' | translate }} + + + @if (feeToIncomeAccountMappings.value.length !== 0) { + + + {{ 'labels.inputs.Fees' | translate }} + + {{ feesIncome.chargeId | find: chargeData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ feesIncome.incomeAccountId | find: incomeAccountData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } + + } + @if (existCharges()) { + + + {{ 'labels.heading.Map Penalties to Specific Income Accounts' | translate }} + + + + + {{ 'labels.buttons.Add' | translate }} + + + @if (penaltyToIncomeAccountMappings.value.length !== 0) { + + + {{ 'labels.inputs.Penalty' | translate }} + + {{ penaltyIncome.chargeId | find: penaltyData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ penaltyIncome.incomeAccountId | find: incomeAccountData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } + + } + + } - + } diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-accounting-step/recurring-deposit-product-accounting-step.component.ts b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-accounting-step/recurring-deposit-product-accounting-step.component.ts index 3b9b0c5db9..9b578a14e6 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-accounting-step/recurring-deposit-product-accounting-step.component.ts +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-accounting-step/recurring-deposit-product-accounting-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -67,6 +67,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositProductAccountingStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private dialog = inject(MatDialog); + private accounting = inject(Accounting); + private translateService = inject(TranslateService); + @Input() recurringDepositProductsTemplate: any; @Input() accountingRuleData: any; @Input() recurringDepositProductFormValid: boolean; @@ -92,12 +97,10 @@ export class RecurringDepositProductAccountingStepComponent implements OnInit { 'actions' ]; - constructor( - private formBuilder: UntypedFormBuilder, - private dialog: MatDialog, - private accounting: Accounting, - private translateService: TranslateService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createrecurringDepositProductAccountingForm(); this.setConditionalControls(); } diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-charges-step/recurring-deposit-product-charges-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-charges-step/recurring-deposit-product-charges-step.component.html index 94f5bad985..2ce77f498c 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-charges-step/recurring-deposit-product-charges-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-charges-step/recurring-deposit-product-charges-step.component.html @@ -2,12 +2,11 @@ {{ 'labels.inputs.Charge' | translate }} - - {{ charge.name }} - + @for (charge of chargeData | chargesFilter: chargesDataSource : currencyCode.value; track charge) { + + {{ charge.name }} + + } diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-charges-step/recurring-deposit-product-charges-step.component.ts b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-charges-step/recurring-deposit-product-charges-step.component.ts index 6fe08177aa..2f6ac499cd 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-charges-step/recurring-deposit-product-charges-step.component.ts +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-charges-step/recurring-deposit-product-charges-step.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormControl } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; @@ -46,6 +46,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositProductChargesStepComponent implements OnInit { + dialog = inject(MatDialog); + private translateService = inject(TranslateService); + @Input() recurringDepositProductsTemplate: any; @Input() currencyCode: UntypedFormControl; @@ -60,10 +63,10 @@ export class RecurringDepositProductChargesStepComponent implements OnInit { 'action' ]; - constructor( - public dialog: MatDialog, - private translateService: TranslateService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { this.chargeData = this.recurringDepositProductsTemplate.chargeOptions; diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.html index d31e9b6a23..e3445c9708 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.html @@ -7,9 +7,11 @@ matTooltip="{{ 'tooltips.The currency in which the deposit will be disbursed' | translate }}" required > - - {{ currency.name }} - + @for (currency of currencyData; track currency) { + + {{ currency.name }} + + } {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.ts b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.ts index 896c34b331..1b996d9879 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.ts +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatTooltip } from '@angular/material/tooltip'; import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper'; @@ -18,13 +18,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositProductCurrencyStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() recurringDepositProductsTemplate: any; recurringDepositProductCurrencyForm: UntypedFormGroup; currencyData: any; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createrecurringDepositProductCurrencyForm(); } diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-details-step/recurring-deposit-product-details-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-details-step/recurring-deposit-product-details-step.component.html index d64b41c2fd..35784aad1a 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-details-step/recurring-deposit-product-details-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-details-step/recurring-deposit-product-details-step.component.html @@ -8,10 +8,12 @@ matTooltip="{{ 'tooltips.Product name is a unique identifier' | translate }}" required /> - - {{ 'labels.inputs.Product Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (recurringDepositProductDetailsForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Product Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -23,10 +25,12 @@ matTooltip="{{ 'tooltips.Short name is a unique identifier' | translate }}" required /> - - {{ 'labels.inputs.Short Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (recurringDepositProductDetailsForm.controls.shortName.hasError('required')) { + + {{ 'labels.inputs.Short Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -40,10 +44,12 @@ cdkTextareaAutosize cdkAutosizeMinRows="2" > - - {{ 'labels.inputs.Description' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (recurringDepositProductDetailsForm.controls.description.hasError('required')) { + + {{ 'labels.inputs.Description' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-details-step/recurring-deposit-product-details-step.component.ts b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-details-step/recurring-deposit-product-details-step.component.ts index 7fd759aa3e..d818c95ad0 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-details-step/recurring-deposit-product-details-step.component.ts +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-details-step/recurring-deposit-product-details-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatTooltip } from '@angular/material/tooltip'; import { CdkTextareaAutosize } from '@angular/cdk/text-field'; @@ -20,11 +20,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositProductDetailsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() recurringDepositProductsTemplate: any; recurringDepositProductDetailsForm: UntypedFormGroup; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createrecurringDepositProductDetailsForm(); } diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-interest-rate-chart-step/recurring-deposit-product-interest-rate-chart-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-interest-rate-chart-step/recurring-deposit-product-interest-rate-chart-step.component.html index d8b41391ca..ed003be989 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-interest-rate-chart-step/recurring-deposit-product-interest-rate-chart-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-interest-rate-chart-step/recurring-deposit-product-interest-rate-chart-step.component.html @@ -9,269 +9,265 @@ {{ 'labels.heading.Interest Rate Charts' | translate - - - - - - - - - - - - {{ 'labels.inputs.Name' | translate }} - - - - - {{ 'labels.inputs.Description' | translate }} - - - - - {{ 'labels.inputs.From Date' | translate }} - - - - - {{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.End Date' | translate }} - - - - - - - - {{ 'labels.inputs.Is primary grouping by amount?' | translate }} - - - - - - {{ 'labels.buttons.Add Slab' | translate }} - - - - - {{ 'labels.heading.It is required to add at least one Slab' | translate }} - - - - - {{ 'labels.inputs.Period' | translate }} - - {{ - chartSlab.fromPeriod + - ' - ' + - chartSlab.toPeriod + - ' ' + - (chartSlab.periodType | find: periodTypeData : 'id' : 'value') - }} - - - - - {{ 'labels.inputs.Amount Range' | translate }} - - {{ chartSlab.amountRangeFrom + ' - ' + chartSlab.amountRangeTo }} - - - - - {{ 'labels.inputs.Interest' | translate }} - - {{ chartSlab.annualInterestRate }} - - - - - {{ 'labels.inputs.Description' | translate }} - - {{ chartSlab.description }} - - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - {{ 'labels.buttons.View Incentives' | translate }} - - - - {{ 'labels.buttons.Hide Incentives' | translate }} - - - - - - - + + + + - - - - {{ 'labels.heading.Incentives' | translate }} - - - - - - {{ 'labels.buttons.Add' | translate }} - - - - + + + + {{ 'labels.inputs.Name' | translate }} + + + + {{ 'labels.inputs.Description' | translate }} + + + + {{ 'labels.inputs.From Date' | translate }} + + + + + {{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + + {{ 'labels.inputs.End Date' | translate }} + + + + + + + {{ 'labels.inputs.Is primary grouping by amount?' | translate }} + + + + + + {{ 'labels.buttons.Add Slab' | translate }} + + + @if (chart.value.chartSlabs.length === 0) { + + {{ 'labels.heading.It is required to add at least one Slab' | translate }} + + } + @if (chart.value.chartSlabs.length !== 0) { + + + {{ 'labels.inputs.Period' | translate }} + + {{ + chartSlab.fromPeriod + + ' - ' + + chartSlab.toPeriod + + ' ' + + (chartSlab.periodType | find: periodTypeData : 'id' : 'value') + }} + + + + {{ 'labels.inputs.Amount Range' | translate }} + + {{ chartSlab.amountRangeFrom + ' - ' + chartSlab.amountRangeTo }} + + + + {{ 'labels.inputs.Interest' | translate }} + + {{ chartSlab.annualInterestRate }} + + + + {{ 'labels.inputs.Description' | translate }} + + {{ chartSlab.description }} + + + + {{ 'labels.inputs.Actions' | translate }} + + - - {{ 'labels.inputs.Entity Type' | translate }} - - {{ incentive.entityType | find: entityTypeData : 'id' : 'value' }} - - - - - {{ 'labels.inputs.Attribute Name' | translate }} - - {{ incentive.attributeName | find: attributeNameData : 'id' : 'value' }} - - - - - {{ 'labels.inputs.Condition Type' | translate }} - - {{ incentive.conditionType | find: conditionTypeData : 'id' : 'value' }} - - - - - {{ 'labels.inputs.Attribute Value' | translate }} - - {{ incentive.attributeValue | find: genderData : 'id' : 'name' }} - {{ incentive.attributeValue }} - {{ - incentive.attributeValue | find: clientTypeData : 'id' : 'name' - }} - {{ - incentive.attributeValue | find: clientClassificationData : 'id' : 'name' - }} - - - - - {{ 'labels.inputs.Incentive Type' | translate }} - - {{ incentive.incentiveType | find: incentiveTypeData : 'id' : 'value' }} - - - - - {{ 'labels.inputs.Interest' | translate }} - - {{ incentive.amount }} - - - - - {{ 'labels.inputs.Actions' | translate }} - + + + + + + + @if (expandChartSlabIndex[chartIndex] !== chartSlabIndex) { + + + {{ 'labels.buttons.View Incentives' | translate }} + + } + @if (expandChartSlabIndex[chartIndex] === chartSlabIndex) { + + + {{ 'labels.buttons.Hide Incentives' | translate }} + + } + + + + + + + + + {{ 'labels.heading.Incentives' | translate }} + + - + + {{ 'labels.buttons.Add' | translate }} - - - - - - - - - - - - - - - - - - + + @if (chartSlab.incentives.length) { + + + {{ 'labels.inputs.Entity Type' | translate }} + + {{ incentive.entityType | find: entityTypeData : 'id' : 'value' }} + + + + {{ 'labels.inputs.Attribute Name' | translate }} + + {{ incentive.attributeName | find: attributeNameData : 'id' : 'value' }} + + + + {{ 'labels.inputs.Condition Type' | translate }} + + {{ incentive.conditionType | find: conditionTypeData : 'id' : 'value' }} + + + + {{ 'labels.inputs.Attribute Value' | translate }} + + @switch (incentive.attributeName) { + @case (2) { + {{ incentive.attributeValue | find: genderData : 'id' : 'name' }} + } + @case (3) { + {{ incentive.attributeValue }} + } + @case (4) { + {{ incentive.attributeValue | find: clientTypeData : 'id' : 'name' }} + } + @case (5) { + {{ + incentive.attributeValue | find: clientClassificationData : 'id' : 'name' + }} + } + } + + + + {{ 'labels.inputs.Incentive Type' | translate }} + + {{ incentive.incentiveType | find: incentiveTypeData : 'id' : 'value' }} + + + + {{ 'labels.inputs.Interest' | translate }} + + {{ incentive.amount }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } + + + + + + + + + } + - + } diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-interest-rate-chart-step/recurring-deposit-product-interest-rate-chart-step.component.ts b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-interest-rate-chart-step/recurring-deposit-product-interest-rate-chart-step.component.ts index 64083bf3a6..cecbbaba7b 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-interest-rate-chart-step/recurring-deposit-product-interest-rate-chart-step.component.ts +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-interest-rate-chart-step/recurring-deposit-product-interest-rate-chart-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -25,7 +25,7 @@ import { Dates } from 'app/core/utils/dates'; import { TranslateService } from '@ngx-translate/core'; import { MatButton, MatIconButton } from '@angular/material/button'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; -import { NgFor, NgIf, NgSwitch, NgSwitchCase } from '@angular/common'; + import { MatDivider } from '@angular/material/divider'; import { MatTooltip } from '@angular/material/tooltip'; import { MatCheckbox } from '@angular/material/checkbox'; @@ -69,8 +69,6 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; MatHeaderCell, MatCellDef, MatCell, - NgSwitch, - NgSwitchCase, MatHeaderRowDef, MatHeaderRow, MatRowDef, @@ -81,6 +79,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositProductInterestRateChartStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + dialog = inject(MatDialog); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + private translateService = inject(TranslateService); + @Input() recurringDepositProductsTemplate: any; recurringDepositProductInterestRateChartForm: UntypedFormGroup; @@ -113,6 +117,9 @@ export class RecurringDepositProductInterestRateChartStepComponent implements On chartDetailData: any = []; chartsDetail: any[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {MatDialog} dialog Dialog reference. @@ -120,13 +127,7 @@ export class RecurringDepositProductInterestRateChartStepComponent implements On * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - public dialog: MatDialog, - private dateUtils: Dates, - private settingsService: SettingsService, - private translateService: TranslateService - ) { + constructor() { this.createrecurringDepositProductInterestRateChartForm(); } diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-preview-step/recurring-deposit-product-preview-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-preview-step/recurring-deposit-product-preview-step.component.html index 0fb571c6b5..31ea3fcafb 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-preview-step/recurring-deposit-product-preview-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-preview-step/recurring-deposit-product-preview-step.component.html @@ -10,10 +10,12 @@ {{ 'labels.inputs.Details' | translate }} {{ recurringDepositProduct.shortName }} - - {{ 'labels.inputs.Description' | translate }}: - {{ recurringDepositProduct.description }} - + @if (recurringDepositProduct.description) { + + {{ 'labels.inputs.Description' | translate }}: + {{ recurringDepositProduct.description }} + + } {{ 'labels.inputs.Currency' | translate }} @@ -89,15 +91,17 @@ {{ 'labels.heading.Terms' | translate }} {{ 'labels.heading.Settings' | translate }} - - {{ 'labels.inputs.Lock-in Period' | translate }}: - {{ - recurringDepositProduct.lockinPeriodFrequency + - ' ' + - (recurringDepositProduct.lockinPeriodFrequencyType - | find: recurringDepositProductsTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value') - }} - + @if (recurringDepositProduct.lockinPeriodFrequency) { + + {{ 'labels.inputs.Lock-in Period' | translate }}: + {{ + recurringDepositProduct.lockinPeriodFrequency + + ' ' + + (recurringDepositProduct.lockinPeriodFrequencyType + | find: recurringDepositProductsTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value') + }} + + } {{ 'labels.inputs.Minimum Deposit Term' | translate }}: @@ -109,425 +113,443 @@ {{ 'labels.heading.Settings' | translate }} }} - - {{ 'labels.inputs.And thereafter, in Multiples of' | translate }}: - {{ - recurringDepositProduct.inMultiplesOfDepositTerm + - ' ' + - (recurringDepositProduct.inMultiplesOfDepositTermTypeId - | find: recurringDepositProductsTemplate.periodFrequencyTypeOptions : 'id' : 'value') - }} - - - - {{ 'labels.inputs.Minimum Deposit Term' | translate }}: - {{ - recurringDepositProduct.maxDepositTerm + - ' ' + - (recurringDepositProduct.maxDepositTermTypeId - | find: recurringDepositProductsTemplate.periodFrequencyTypeOptions : 'id' : 'value') - }} - + @if (recurringDepositProduct.inMultiplesOfDepositTerm) { + + {{ 'labels.inputs.And thereafter, in Multiples of' | translate }}: + {{ + recurringDepositProduct.inMultiplesOfDepositTerm + + ' ' + + (recurringDepositProduct.inMultiplesOfDepositTermTypeId + | find: recurringDepositProductsTemplate.periodFrequencyTypeOptions : 'id' : 'value') + }} + + } + + @if (recurringDepositProduct.maxDepositTerm) { + + {{ 'labels.inputs.Minimum Deposit Term' | translate }}: + {{ + recurringDepositProduct.maxDepositTerm + + ' ' + + (recurringDepositProduct.maxDepositTermTypeId + | find: recurringDepositProductsTemplate.periodFrequencyTypeOptions : 'id' : 'value') + }} + + } {{ 'labels.inputs.Apply Penal Interest (less)' | translate }}: {{ recurringDepositProduct.preClosurePenalApplicable | yesNo }} - - {{ 'labels.inputs.Penal Interest' | translate }} (%): - {{ - recurringDepositProduct.preClosurePenalInterest + - '% (' + - (recurringDepositProduct.preClosurePenalInterestOnTypeId - | find: recurringDepositProductsTemplate.preClosurePenalInterestOnTypeOptions : 'id' : 'value') + - ')' - }} - - - - {{ 'labels.inputs.Recurring Deposit Type' | translate }}: - - {{ 'labels.text.Mandatory' | translate }} - - - {{ 'labels.text.Voluntary' | translate }} - - + @if (recurringDepositProduct.preClosurePenalApplicable) { + + {{ 'labels.inputs.Penal Interest' | translate }} (%): + {{ + recurringDepositProduct.preClosurePenalInterest + + '% (' + + (recurringDepositProduct.preClosurePenalInterestOnTypeId + | find: recurringDepositProductsTemplate.preClosurePenalInterestOnTypeOptions : 'id' : 'value') + + ')' + }} + + } + + @if (recurringDepositProduct.isMandatoryDeposit !== undefined) { + + {{ 'labels.inputs.Recurring Deposit Type' | translate }}: + @if (recurringDepositProduct.isMandatoryDeposit) { + + {{ 'labels.text.Mandatory' | translate }} + + } + @if (!recurringDepositProduct.isMandatoryDeposit) { + + {{ 'labels.text.Voluntary' | translate }} + + } + + } {{ 'labels.inputs.Withhold Tax is Applicable' | translate }}: {{ recurringDepositProduct.withHoldTax | yesNo }} - - {{ 'labels.inputs.Tax Group' | translate }}: - {{ - recurringDepositProduct.taxGroupId | find: recurringDepositProductsTemplate.taxGroupOptions : 'id' : 'name' - }} - - - - {{ 'labels.heading.Interest Rate Charts' | translate }} - - - - - {{ 'labels.inputs.Name' | translate }}: - {{ chart.name }} - - - - {{ 'labels.inputs.From Date' | translate }}: - {{ chart.fromDate | dateFormat }} - - - - {{ 'labels.inputs.End Date' | translate }}: - {{ chart.endDate | dateFormat }} - - - - {{ 'labels.inputs.Description' | translate }}: - {{ chart.description }} - - - - {{ 'labels.inputs.Primary Grouping by Amount' | translate }}: - {{ recurringDepositProduct.isPrimaryGroupingByAmount | yesNo }} - - - - - {{ 'labels.inputs.Period' | translate }} - - {{ - chartSlab.fromPeriod + - ' - ' + - chartSlab.toPeriod + - ' ' + - (chartSlab.periodType - | find: recurringDepositProductsTemplate.chartTemplate.periodTypes : 'id' : 'value') - }} - - - - - {{ 'labels.inputs.Amount Range' | translate }} - - {{ chartSlab.amountRangeFrom + ' - ' + chartSlab.amountRangeTo }} - - - - - {{ 'labels.inputs.Interest' | translate }} - {{ chartSlab.annualInterestRate | formatNumber }} % - - - - {{ 'labels.inputs.Description' | translate }} - - {{ chartSlab.description }} - - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - {{ 'labels.buttons.View Incentives' | translate }} - - - - {{ 'labels.buttons.Hide Incentives' | translate }} - - - - - - - - - - - {{ 'labels.heading.Incentives' | translate }} - - - - - {{ 'labels.inputs.Entity Type' | translate }} - - {{ - incentive.entityType - | find: recurringDepositProductsTemplate.chartTemplate.entityTypeOptions : 'id' : 'value' - }} - - - - - {{ 'labels.inputs.Attribute Name' | translate }} - - {{ - incentive.attributeName - | find: recurringDepositProductsTemplate.chartTemplate.attributeNameOptions : 'id' : 'value' - }} - - - - - {{ 'labels.inputs.Condition Type' | translate }} - - {{ - incentive.conditionType - | find: recurringDepositProductsTemplate.chartTemplate.conditionTypeOptions : 'id' : 'value' - }} - - - - - {{ 'labels.inputs.Attribute Value' | translate }} - - {{ - incentive.attributeValue - | find: recurringDepositProductsTemplate.chartTemplate.genderOptions : 'id' : 'name' - }} - {{ incentive.attributeValue }} - {{ - incentive.attributeValue - | find: recurringDepositProductsTemplate.chartTemplate.clientTypeOptions : 'id' : 'name' - }} - {{ - incentive.attributeValue - | find - : recurringDepositProductsTemplate.chartTemplate.clientClassificationOptions - : 'id' - : 'name' - }} - - - - - {{ 'labels.inputs.Incentive Type' | translate }} - - {{ - incentive.incentiveType - | find: recurringDepositProductsTemplate.chartTemplate.incentiveTypeOptions : 'id' : 'value' - }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ incentive.amount | formatNumber }} - - - - - - - - - - - - - - - + @if (recurringDepositProduct.withHoldTax) { + + {{ 'labels.inputs.Tax Group' | translate }}: + {{ + recurringDepositProduct.taxGroupId | find: recurringDepositProductsTemplate.taxGroupOptions : 'id' : 'name' + }} + + } + @if (recurringDepositProduct.charts.length !== 0) { + + {{ 'labels.heading.Interest Rate Charts' | translate }} + @for (chart of recurringDepositProduct.charts; track chart; let chartIndex = $index) { + + @if (chart.name) { + + {{ 'labels.inputs.Name' | translate }}: + {{ chart.name }} + + } + + {{ 'labels.inputs.From Date' | translate }}: + {{ chart.fromDate | dateFormat }} + + @if (chart.endDate) { + + {{ 'labels.inputs.End Date' | translate }}: + {{ chart.endDate | dateFormat }} + + } + @if (chart.description) { + + {{ 'labels.inputs.Description' | translate }}: + {{ chart.description }} + + } + + {{ 'labels.inputs.Primary Grouping by Amount' | translate }}: + {{ recurringDepositProduct.isPrimaryGroupingByAmount | yesNo }} + + @if (chart.chartSlabs.length !== 0) { + + + {{ 'labels.inputs.Period' | translate }} + + {{ + chartSlab.fromPeriod + + ' - ' + + chartSlab.toPeriod + + ' ' + + (chartSlab.periodType + | find: recurringDepositProductsTemplate.chartTemplate.periodTypes : 'id' : 'value') + }} + + + + {{ 'labels.inputs.Amount Range' | translate }} + + {{ chartSlab.amountRangeFrom + ' - ' + chartSlab.amountRangeTo }} + + + + {{ 'labels.inputs.Interest' | translate }} + {{ chartSlab.annualInterestRate | formatNumber }} % + + + {{ 'labels.inputs.Description' | translate }} + + {{ chartSlab.description }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + @if (expandChartSlabIndex[chartIndex] !== chartSlabIndex) { + + + {{ 'labels.buttons.View Incentives' | translate }} + + } + @if (expandChartSlabIndex[chartIndex] === chartSlabIndex) { + + + {{ 'labels.buttons.Hide Incentives' | translate }} + + } + + + + + + + + + {{ 'labels.heading.Incentives' | translate }} + + + + {{ 'labels.inputs.Entity Type' | translate }} + + {{ + incentive.entityType + | find + : recurringDepositProductsTemplate.chartTemplate.entityTypeOptions + : 'id' + : 'value' + }} + + + + {{ 'labels.inputs.Attribute Name' | translate }} + + {{ + incentive.attributeName + | find + : recurringDepositProductsTemplate.chartTemplate.attributeNameOptions + : 'id' + : 'value' + }} + + + + {{ 'labels.inputs.Condition Type' | translate }} + + {{ + incentive.conditionType + | find + : recurringDepositProductsTemplate.chartTemplate.conditionTypeOptions + : 'id' + : 'value' + }} + + + + {{ 'labels.inputs.Attribute Value' | translate }} + + @switch (incentive.attributeName) { + @case (2) { + {{ + incentive.attributeValue + | find: recurringDepositProductsTemplate.chartTemplate.genderOptions : 'id' : 'name' + }} + } + @case (3) { + {{ incentive.attributeValue }} + } + @case (4) { + {{ + incentive.attributeValue + | find + : recurringDepositProductsTemplate.chartTemplate.clientTypeOptions + : 'id' + : 'name' + }} + } + @case (5) { + {{ + incentive.attributeValue + | find + : recurringDepositProductsTemplate.chartTemplate.clientClassificationOptions + : 'id' + : 'name' + }} + } + } + + + + {{ 'labels.inputs.Incentive Type' | translate }} + + {{ + incentive.incentiveType + | find + : recurringDepositProductsTemplate.chartTemplate.incentiveTypeOptions + : 'id' + : 'value' + }} + + + + {{ 'labels.inputs.Amount' | translate }} + + {{ incentive.amount | formatNumber }} + + + + + + + + + + + + + + } + + + } - - - - {{ 'labels.heading.Charges' | translate }} - - - - - {{ 'labels.inputs.Name' | translate }} - - {{ charge.name + ', ' + charge.currency.displaySymbol }} - - - - - {{ 'labels.inputs.Type' | translate }} - - {{ charge.chargeCalculationType.value }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ charge.amount }} - - + } - - {{ 'labels.inputs.Collected On' | translate }} - - {{ charge.chargeTimeType.value }} - - - - - - - - - {{ 'labels.heading.Accounting' | translate }} - - - - - - - {{ 'labels.heading.Advanced Accounting Rules' | translate }} - - - - {{ 'labels.heading.Fund Sources for Payment Channels' | translate }} - - - - {{ 'labels.inputs.Payment Type' | translate }} - - {{ - paymentFundSource.paymentTypeId - | find: recurringDepositProductsTemplate.paymentTypeOptions : 'id' : 'name' - }} + @if (recurringDepositProduct.charges.length) { + + {{ 'labels.heading.Charges' | translate }} + + + + {{ 'labels.inputs.Name' | translate }} + + {{ charge.name + ', ' + charge.currency.displaySymbol }} - - - {{ 'labels.inputs.Fund Source' | translate }} - - {{ - paymentFundSource.fundSourceAccountId - | find: recurringDepositProductsTemplate.accountingMappingOptions.assetAccountOptions : 'id' : 'name' - }} + + {{ 'labels.inputs.Type' | translate }} + + {{ charge.chargeCalculationType.value }} - - - - - - - - {{ 'labels.heading.Fees to Specific Income Accounts' | translate }} - - - - {{ 'labels.inputs.Fees' | translate }} - - {{ feesIncome.chargeId | find: recurringDepositProductsTemplate.chargeOptions : 'id' : 'name' }} + + {{ 'labels.inputs.Amount' | translate }} + + {{ charge.amount }} - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ - feesIncome.incomeAccountId - | find: recurringDepositProductsTemplate.accountingMappingOptions.incomeAccountOptions : 'id' : 'name' - }} + + {{ 'labels.inputs.Collected On' | translate }} + + {{ charge.chargeTimeType.value }} - - - + + + } - - {{ 'labels.heading.Penalties to Specific Income Accounts' | translate }} - - - - {{ 'labels.inputs.Penalty' | translate }} - - {{ penaltyIncome.chargeId | find: recurringDepositProductsTemplate.penaltyOptions : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ - penaltyIncome.incomeAccountId - | find: recurringDepositProductsTemplate.accountingMappingOptions.incomeAccountOptions : 'id' : 'name' - }} - - + {{ 'labels.heading.Accounting' | translate }} - - - + + @if (!isNoneAccounting()) { + + + } + + @if ( + recurringDepositProduct.advancedAccountingRules && + (recurringDepositProduct.paymentChannelToFundSourceMappings?.length || + recurringDepositProduct.feeToIncomeAccountMappings?.length || + recurringDepositProduct.penaltyToIncomeAccountMappings?.length) + ) { + + {{ 'labels.heading.Advanced Accounting Rules' | translate }} + + @if (recurringDepositProduct.paymentChannelToFundSourceMappings?.length) { + + {{ 'labels.heading.Fund Sources for Payment Channels' | translate }} + + + {{ 'labels.inputs.Payment Type' | translate }} + + {{ + paymentFundSource.paymentTypeId + | find: recurringDepositProductsTemplate.paymentTypeOptions : 'id' : 'name' + }} + + + + {{ 'labels.inputs.Fund Source' | translate }} + + {{ + paymentFundSource.fundSourceAccountId + | find + : recurringDepositProductsTemplate.accountingMappingOptions.assetAccountOptions + : 'id' + : 'name' + }} + + + + + + + } + @if (recurringDepositProduct.feeToIncomeAccountMappings?.length) { + + {{ 'labels.heading.Fees to Specific Income Accounts' | translate }} + + + {{ 'labels.inputs.Fees' | translate }} + + {{ feesIncome.chargeId | find: recurringDepositProductsTemplate.chargeOptions : 'id' : 'name' }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ + feesIncome.incomeAccountId + | find + : recurringDepositProductsTemplate.accountingMappingOptions.incomeAccountOptions + : 'id' + : 'name' + }} + + + + + + + } + @if (recurringDepositProduct.penaltyToIncomeAccountMappings?.length) { + + {{ 'labels.heading.Penalties to Specific Income Accounts' | translate }} + + + {{ 'labels.inputs.Penalty' | translate }} + + {{ penaltyIncome.chargeId | find: recurringDepositProductsTemplate.penaltyOptions : 'id' : 'name' }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ + penaltyIncome.incomeAccountId + | find + : recurringDepositProductsTemplate.accountingMappingOptions.incomeAccountOptions + : 'id' + : 'name' + }} + + + + + + + } - + } diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-preview-step/recurring-deposit-product-preview-step.component.ts b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-preview-step/recurring-deposit-product-preview-step.component.ts index 965a30601b..49ded63d84 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-preview-step/recurring-deposit-product-preview-step.component.ts +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-preview-step/recurring-deposit-product-preview-step.component.ts @@ -1,9 +1,9 @@ -import { Component, OnInit, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core'; +import { Component, OnInit, Input, Output, EventEmitter, OnChanges, SimpleChanges, inject } from '@angular/core'; import { trigger, state, transition, animate, style } from '@angular/animations'; import { OptionData } from 'app/shared/models/option-data.model'; import { Accounting } from 'app/core/utils/accounting'; import { MatDivider } from '@angular/material/divider'; -import { NgIf, NgFor, NgSwitch, NgSwitchCase } from '@angular/common'; + import { MatTable, MatColumnDef, @@ -46,8 +46,6 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; MatCellDef, MatCell, FaIconComponent, - NgSwitch, - NgSwitchCase, MatHeaderRowDef, MatHeaderRow, MatRowDef, @@ -61,6 +59,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositProductPreviewStepComponent implements OnInit, OnChanges { + private accounting = inject(Accounting); + @Input() recurringDepositProductsTemplate: any; @Input() chartSlabsDisplayedColumns: any[]; @Input() accountingRuleData: any; @@ -96,7 +96,10 @@ export class RecurringDepositProductPreviewStepComponent implements OnInit, OnCh accountingMappings: any = {}; accountingRule: OptionData; - constructor(private accounting: Accounting) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { this.setCurrentValues(); diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-settings-step/recurring-deposit-product-settings-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-settings-step/recurring-deposit-product-settings-step.component.html index bc2f294788..4c2dad522f 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-settings-step/recurring-deposit-product-settings-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-settings-step/recurring-deposit-product-settings-step.component.html @@ -27,12 +27,11 @@ {{ 'labels.inputs.Lock-in Period' | translate }} {{ 'labels.inputs.Type' | translate }} - - {{ lockinPeriodFrequencyType.value }} - + @for (lockinPeriodFrequencyType of lockinPeriodFrequencyTypeData; track lockinPeriodFrequencyType) { + + {{ lockinPeriodFrequencyType.value }} + + } @@ -56,9 +55,11 @@ {{ 'labels.inputs.Minimum Deposit Term' | translate } {{ 'labels.inputs.Frequency Type' | translate }} - - {{ periodFrequencyType.value }} - + @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { + + {{ periodFrequencyType.value }} + + } {{ 'labels.inputs.Minimum Deposit Term Frequency Type' | translate }} {{ 'labels.commons.is' | translate }} @@ -81,9 +82,11 @@ {{ 'labels.heading.And thereafter, in Multiples of' | {{ 'labels.inputs.Type' | translate }} - - {{ periodFrequencyType.value }} - + @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { + + {{ periodFrequencyType.value }} + + } @@ -102,9 +105,11 @@ {{ 'labels.inputs.Maximum Deposit Term' | translate } {{ 'labels.inputs.Type' | translate }} - - {{ periodFrequencyType.value }} - + @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { + + {{ periodFrequencyType.value }} + + } @@ -124,12 +129,11 @@ {{ 'labels.heading.For Pre-mature closure' | translat {{ 'labels.inputs.Period' | translate }} - - {{ preClosurePenalInterestOnType.value }} - + @for (preClosurePenalInterestOnType of preClosurePenalInterestOnTypeData; track preClosurePenalInterestOnType) { + + {{ preClosurePenalInterestOnType.value }} + + } @@ -139,18 +143,22 @@ {{ 'labels.heading.For Pre-mature closure' | translat {{ 'labels.inputs.Is Withhold Tax Applicable' | translate }} - - {{ 'labels.inputs.Tax Group' | translate }} - - - {{ taxGroup.name }} - - - - {{ 'labels.inputs.Tax Group' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (recurringDepositProductSettingsForm.value.withHoldTax) { + + {{ 'labels.inputs.Tax Group' | translate }} + + @for (taxGroup of taxGroupData; track taxGroup) { + + {{ taxGroup.name }} + + } + + + {{ 'labels.inputs.Tax Group' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + } diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-settings-step/recurring-deposit-product-settings-step.component.ts b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-settings-step/recurring-deposit-product-settings-step.component.ts index 1df538935a..f42d500e63 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-settings-step/recurring-deposit-product-settings-step.component.ts +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-settings-step/recurring-deposit-product-settings-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -28,6 +28,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositProductSettingsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() recurringDepositProductsTemplate: any; recurringDepositProductSettingsForm: UntypedFormGroup; @@ -37,7 +39,10 @@ export class RecurringDepositProductSettingsStepComponent implements OnInit { preClosurePenalInterestOnTypeData: any; taxGroupData: any; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createrecurringDepositProductSettingsForm(); this.setConditionalControls(); } diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-terms-step/recurring-deposit-product-terms-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-terms-step/recurring-deposit-product-terms-step.component.html index f2c181bd26..3a846e18fd 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-terms-step/recurring-deposit-product-terms-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-terms-step/recurring-deposit-product-terms-step.component.html @@ -26,12 +26,11 @@ {{ 'labels.inputs.Deposit Amount' | translate }} {{ 'labels.inputs.Interest Compounding Period' | translate }} - - {{ interestCompoundingPeriodType.value }} - + @for (interestCompoundingPeriodType of interestCompoundingPeriodTypeData; track interestCompoundingPeriodType) { + + {{ interestCompoundingPeriodType.value }} + + } {{ 'labels.inputs.Interest Compounding Period' | translate }} {{ 'labels.commons.is' | translate }} @@ -42,12 +41,11 @@ {{ 'labels.inputs.Deposit Amount' | translate }} {{ 'labels.inputs.Interest Posting Period' | translate }} - - {{ interestPostingPeriodType.value }} - + @for (interestPostingPeriodType of interestPostingPeriodTypeData; track interestPostingPeriodType) { + + {{ interestPostingPeriodType.value }} + + } {{ 'labels.inputs.Interest Posting Period' | translate }} {{ 'labels.commons.is' | translate }} @@ -58,12 +56,11 @@ {{ 'labels.inputs.Deposit Amount' | translate }} {{ 'labels.inputs.Interest Calculated using' | translate }} - - {{ interestCalculationType.value }} - + @for (interestCalculationType of interestCalculationTypeData; track interestCalculationType) { + + {{ interestCalculationType.value }} + + } {{ 'labels.inputs.Interest Calculated using' | translate }} {{ 'labels.commons.is' | translate }} @@ -74,12 +71,14 @@ {{ 'labels.inputs.Deposit Amount' | translate }} {{ 'labels.inputs.Days in Year' | translate }} - - {{ interestCalculationDaysInYearType.value }} - + @for ( + interestCalculationDaysInYearType of interestCalculationDaysInYearTypeData; + track interestCalculationDaysInYearType + ) { + + {{ interestCalculationDaysInYearType.value }} + + } {{ 'labels.inputs.Days in Year' | translate }} {{ 'labels.commons.is' | translate }} diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-terms-step/recurring-deposit-product-terms-step.component.ts b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-terms-step/recurring-deposit-product-terms-step.component.ts index fd38ece54b..3c60d2336b 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-terms-step/recurring-deposit-product-terms-step.component.ts +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-terms-step/recurring-deposit-product-terms-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDivider } from '@angular/material/divider'; import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper'; @@ -18,6 +18,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositProductTermsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() recurringDepositProductsTemplate: any; recurringDepositProductTermsForm: UntypedFormGroup; @@ -27,7 +29,10 @@ export class RecurringDepositProductTermsStepComponent implements OnInit { interestCalculationTypeData: any; interestCalculationDaysInYearTypeData: any; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createrecurringDepositProductTermsForm(); } diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product.resolver.ts b/src/app/products/recurring-deposit-products/recurring-deposit-product.resolver.ts index 30d8f858bb..1578d25730 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product.resolver.ts +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class RecurringDepositProductResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the recurring deposit product data. diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-products-template.resolver.ts b/src/app/products/recurring-deposit-products/recurring-deposit-products-template.resolver.ts index d3b96a564f..c7f2499f6b 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-products-template.resolver.ts +++ b/src/app/products/recurring-deposit-products/recurring-deposit-products-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -9,7 +9,12 @@ import { ProductsService } from '../products.service'; @Injectable() export class RecurringDepositProductsTemplateResolver { - constructor(private productsService: ProductsService) {} + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} /** * Returns the recurring deposit products template data. diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-products.component.ts b/src/app/products/recurring-deposit-products/recurring-deposit-products.component.ts index 7de5753b5c..52d60e5759 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-products.component.ts +++ b/src/app/products/recurring-deposit-products/recurring-deposit-products.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -58,6 +58,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositProductsComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Data table data. */ recurringDepositProductData: any; /** Columns to be displayed in recurring deposit products table. */ @@ -82,6 +88,9 @@ export class RecurringDepositProductsComponent implements OnInit, AfterViewInit /* Template for popover on recurring deposit products table */ @ViewChild('templateRecurringProductsTable') templateRecurringProductsTable: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the recurring deposit products data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -89,13 +98,7 @@ export class RecurringDepositProductsComponent implements OnInit, AfterViewInit * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { recurringDepositProducts: any }) => { this.recurringDepositProductData = data.recurringDepositProducts; }); diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-products.resolver.ts b/src/app/products/recurring-deposit-products/recurring-deposit-products.resolver.ts index de2985320e..f7f78052f3 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-products.resolver.ts +++ b/src/app/products/recurring-deposit-products/recurring-deposit-products.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class RecurringDepositProductsResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the recurring deposit products data. diff --git a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component.ts b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component.ts index 6002660288..9a134c18ab 100644 --- a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component.ts +++ b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-datatable-tab/recurring-deposit-datatable-tab.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { EntityDatatableTabComponent } from '../../../../shared/tabs/entity-datatable-tab/entity-datatable-tab.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -13,11 +13,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositDatatableTabComponent { + private route = inject(ActivatedRoute); + entityId: string; entityDatatable: any; multiRowDatatableFlag: boolean; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.entityId = this.route.parent.parent.snapshot.paramMap.get('productId'); this.route.data.subscribe((data: { recurringDepositDatatable: any }) => { diff --git a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.html b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.html index 126e68b2f3..c2c0b42be3 100644 --- a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.html +++ b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.html @@ -22,10 +22,12 @@ {{ 'labels.inputs.Details' | translate }} {{ recurringDepositProduct.shortName }} - - {{ 'labels.inputs.Description' | translate }}: - {{ recurringDepositProduct.description }} - + @if (recurringDepositProduct.description) { + + {{ 'labels.inputs.Description' | translate }}: + {{ recurringDepositProduct.description }} + + } {{ 'labels.inputs.Currency' | translate }} @@ -92,315 +94,350 @@ {{ 'labels.heading.Settings' | translate }} - - {{ 'labels.inputs.Lock-in Period' | translate }}: - - {{ recurringDepositProduct.lockinPeriodFrequency }} - {{ recurringDepositProduct.lockinPeriodFrequencyType.value }} - - - - {{ 'labels.inputs.Minimum Deposit Term' | translate }}: - {{ recurringDepositProduct.minDepositTerm }} - - {{ recurringDepositProduct.minDepositTermType.value }} - - - - {{ 'labels.inputs.Maximum Deposit Term' | translate }}: - {{ recurringDepositProduct.maxDepositTerm }} - - {{ recurringDepositProduct.maxDepositTermType.value }} - - - - {{ 'labels.inputs.Deposit Term In multiple of' | translate }}: - {{ recurringDepositProduct.inMultipleOfDepositTerm }} - - - {{ recurringDepositProduct.inMultipleOfDepositTermType.value }} - - - - {{ 'labels.inputs.Recurring Deposit Type' | translate }}: - - {{ 'labels.text.Mandatory' | translate }} - - - {{ 'labels.text.Voluntary' | translate }} - - - - - {{ 'labels.inputs.Apply penal interest (less)' | translate }}: - {{ recurringDepositProduct.preClosurePenalInterest }}%On - {{ recurringDepositProduct.preClosurePenalInterestOnType.value }} - - + @if (recurringDepositProduct.lockinPeriodFrequency) { + + {{ 'labels.inputs.Lock-in Period' | translate }}: + @if (recurringDepositProduct.lockinPeriodFrequency !== undefined) { + + {{ recurringDepositProduct.lockinPeriodFrequency }} + {{ recurringDepositProduct.lockinPeriodFrequencyType.value }} + } + + } + + @if (recurringDepositProduct.minDepositTerm) { + + {{ 'labels.inputs.Minimum Deposit Term' | translate }}: + @if (recurringDepositProduct.minDepositTerm !== undefined) { + {{ recurringDepositProduct.minDepositTerm }} + + {{ recurringDepositProduct.minDepositTermType.value }} + } + + } + + @if (recurringDepositProduct.maxDepositTerm) { + + {{ 'labels.inputs.Maximum Deposit Term' | translate }}: + @if (recurringDepositProduct.maxDepositTerm !== undefined) { + {{ recurringDepositProduct.maxDepositTerm }} + + {{ recurringDepositProduct.maxDepositTermType.value }} + } + + } + + @if (recurringDepositProduct.inMultipleOfDepositTerm) { + + {{ 'labels.inputs.Deposit Term In multiple of' | translate }}: + @if (recurringDepositProduct.inMultipleOfDepositTerm !== undefined) { + {{ recurringDepositProduct.inMultipleOfDepositTerm }} + - + {{ recurringDepositProduct.inMultipleOfDepositTermType.value }} + } + + } + + @if (recurringDepositProduct.isMandatoryDeposit !== undefined) { + + {{ 'labels.inputs.Recurring Deposit Type' | translate }}: + @if (recurringDepositProduct.isMandatoryDeposit) { + + {{ 'labels.text.Mandatory' | translate }} + + } + @if (!recurringDepositProduct.isMandatoryDeposit) { + + {{ 'labels.text.Voluntary' | translate }} + + } + + } + + @if (recurringDepositProduct.preClosurePenalInterest) { + + {{ 'labels.inputs.Apply penal interest (less)' | translate }}: + {{ recurringDepositProduct.preClosurePenalInterest }}%On + {{ recurringDepositProduct.preClosurePenalInterestOnType.value }} + + + } {{ 'labels.inputs.Withhold Tax is Applicable' | translate }}: {{ recurringDepositProduct.withHoldTax | yesNo }} - - {{ 'labels.inputs.Withhold Tax group' | translate }}: - {{ recurringDepositProduct.taxGroup.name }} - - - - {{ 'labels.heading.Interest Rate Charts' | translate }} - - + @if (recurringDepositProduct.withHoldTax) { + + {{ 'labels.inputs.Withhold Tax group' | translate }}: + {{ recurringDepositProduct.taxGroup.name }} + + } + @if (recurringDepositProduct.activeChart) { - - {{ 'labels.inputs.Name' | translate }}: - {{ recurringDepositProduct.activeChart.name }} - - - - {{ 'labels.inputs.Valid from Date' | translate }}: - {{ recurringDepositProduct.activeChart.fromDate | dateFormat }} - - - - {{ 'labels.inputs.End Date' | translate }}: - {{ recurringDepositProduct.activeChart.endDate | dateFormat }} - - - - {{ 'labels.inputs.Description' | translate }}: - {{ recurringDepositProduct.activeChart.description }} - - - - {{ 'labels.inputs.Primary Grouping by Amount' | translate }}: - {{ recurringDepositProduct.activeChart.isPrimaryGroupingByAmount | yesNo }} + {{ 'labels.heading.Interest Rate Charts' | translate }} + + + @if (recurringDepositProduct.activeChart.name) { + + {{ 'labels.inputs.Name' | translate }}: + {{ recurringDepositProduct.activeChart.name }} + + } + + {{ 'labels.inputs.Valid from Date' | translate }}: + {{ recurringDepositProduct.activeChart.fromDate | dateFormat }} + + @if (recurringDepositProduct.activeChart.endDate) { + + {{ 'labels.inputs.End Date' | translate }}: + {{ recurringDepositProduct.activeChart.endDate | dateFormat }} + + } + @if (recurringDepositProduct.activeChart.description) { + + {{ 'labels.inputs.Description' | translate }}: + {{ recurringDepositProduct.activeChart.description }} + + } + + {{ 'labels.inputs.Primary Grouping by Amount' | translate }}: + {{ recurringDepositProduct.activeChart.isPrimaryGroupingByAmount | yesNo }} + + + + {{ 'labels.inputs.Period' | translate }} + + @if (chartSlab.fromPeriod !== undefined) { + {{ chartSlab.fromPeriod }} - {{ chartSlab.toPeriod }} {{ chartSlab.periodType.value }} + } + @if (chartSlab.fromPeriod === undefined) { + + } + + + + {{ 'labels.inputs.Amount Range' | translate }} + + @if (chartSlab.amountRangeFrom !== undefined) { + {{ chartSlab.amountRangeFrom }} - {{ chartSlab.amountRangeTo }} + } + @if (chartSlab.amountRangeFrom === undefined) { + + } + + + + {{ 'labels.inputs.Interest' | translate }} + + {{ chartSlab.annualInterestRate }} + + + + {{ 'labels.inputs.Description' | translate }} + + {{ chartSlab.description }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + @if (expandChartSlabIndex !== chartSlabIndex) { + + + {{ 'labels.buttons.View Incentives' | translate }} + + } + @if (expandChartSlabIndex === chartSlabIndex) { + + + {{ 'labels.buttons.Hide Incentives' | translate }} + + } + + + + + + + + + {{ 'labels.heading.Incentives' | translate }} + + + + {{ 'labels.inputs.Entity Type' | translate }} + + {{ + incentive.entityType + | find + : recurringDepositProductTemplate.chartTemplate.entityTypeOptions + : 'id' + : 'value' + }} + + + + {{ 'labels.inputs.Attribute Name' | translate }} + + {{ + incentive.attributeName + | find + : recurringDepositProductTemplate.chartTemplate.attributeNameOptions + : 'id' + : 'value' + }} + + + + {{ 'labels.inputs.Condition Type' | translate }} + + {{ + incentive.conditionType + | find + : recurringDepositProductTemplate.chartTemplate.conditionTypeOptions + : 'id' + : 'value' + }} + + + + {{ 'labels.inputs.Attribute Value' | translate }} + + @switch (incentive.attributeName) { + @case (2) { + {{ + incentive.attributeValue + | find + : recurringDepositProductTemplate.chartTemplate.genderOptions + : 'id' + : 'name' + }} + } + @case (3) { + {{ incentive.attributeValue }} + } + @case (4) { + {{ + incentive.attributeValue + | find + : recurringDepositProductTemplate.chartTemplate.clientTypeOptions + : 'id' + : 'name' + }} + } + @case (5) { + {{ + incentive.attributeValue + | find + : recurringDepositProductTemplate.chartTemplate.clientClassificationOptions + : 'id' + : 'name' + }} + } + } + + + + {{ 'labels.inputs.Incentive Type' | translate }} + + {{ + incentive.incentiveType + | find + : recurringDepositProductTemplate.chartTemplate.incentiveTypeOptions + : 'id' + : 'value' + }} + + + + {{ 'labels.inputs.Amount' | translate }} + + {{ incentive.amount }} + + + + + + + + + + + + + + + + } - - - {{ 'labels.inputs.Period' | translate }} - - - {{ chartSlab.fromPeriod }} - {{ chartSlab.toPeriod }} {{ chartSlab.periodType.value }} - - - - - - - {{ 'labels.inputs.Amount Range' | translate }} - - - {{ chartSlab.amountRangeFrom }} - {{ chartSlab.amountRangeTo }} - - - - - - - - {{ 'labels.inputs.Interest' | translate }} - - {{ chartSlab.annualInterestRate }} + @if (recurringDepositProduct.charges.length) { + + {{ 'labels.heading.Charges' | translate }} + + + + {{ 'labels.inputs.Name' | translate }} + + {{ charge.name }} - - - {{ 'labels.inputs.Description' | translate }} - - {{ chartSlab.description }} + + {{ 'labels.inputs.Type' | translate }} + + {{ charge.chargeCalculationType.value }} - - - {{ 'labels.inputs.Actions' | translate }} - - - - - {{ 'labels.buttons.View Incentives' | translate }} - - - - {{ 'labels.buttons.Hide Incentives' | translate }} - - + + {{ 'labels.inputs.Amount' | translate }} + + {{ charge.amount | formatNumber }} - - - - - - - {{ 'labels.heading.Incentives' | translate }} - - - - - {{ 'labels.inputs.Entity Type' | translate }} - - {{ - incentive.entityType - | find: recurringDepositProductTemplate.chartTemplate.entityTypeOptions : 'id' : 'value' - }} - - - - - {{ 'labels.inputs.Attribute Name' | translate }} - - {{ - incentive.attributeName - | find - : recurringDepositProductTemplate.chartTemplate.attributeNameOptions - : 'id' - : 'value' - }} - - - - - {{ 'labels.inputs.Condition Type' | translate }} - - {{ - incentive.conditionType - | find - : recurringDepositProductTemplate.chartTemplate.conditionTypeOptions - : 'id' - : 'value' - }} - - - - - {{ 'labels.inputs.Attribute Value' | translate }} - - {{ - incentive.attributeValue - | find: recurringDepositProductTemplate.chartTemplate.genderOptions : 'id' : 'name' - }} - {{ incentive.attributeValue }} - {{ - incentive.attributeValue - | find: recurringDepositProductTemplate.chartTemplate.clientTypeOptions : 'id' : 'name' - }} - {{ - incentive.attributeValue - | find - : recurringDepositProductTemplate.chartTemplate.clientClassificationOptions - : 'id' - : 'name' - }} - - - - - {{ 'labels.inputs.Incentive Type' | translate }} - - {{ - incentive.incentiveType - | find - : recurringDepositProductTemplate.chartTemplate.incentiveTypeOptions - : 'id' - : 'value' - }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ incentive.amount }} - - - - - - - - + + {{ 'labels.inputs.Collected On' | translate }} + + {{ charge.chargeTimeType.value }} - - - - + + - - - - - - {{ 'labels.heading.Charges' | translate }} - - - - - - {{ 'labels.inputs.Name' | translate }} - - {{ charge.name }} - - - - - {{ 'labels.inputs.Type' | translate }} - - {{ charge.chargeCalculationType.value }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ charge.amount | formatNumber }} - - - - - {{ 'labels.inputs.Collected On' | translate }} - - {{ charge.chargeTimeType.value }} - - - - - - - + } {{ 'labels.heading.Accounting' | translate }} @@ -413,110 +450,93 @@ {{ 'labels.heading.Accounting' | translate }} > - - {{ 'labels.inputs.Advanced Accounting Rules' | translate }} - - - - - - {{ 'labels.inputs.Configure Fund Sources for Payment Channels' | translate }} - - - - - {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentFundSource.paymentType.name }} - - - - - {{ 'labels.inputs.Fund Source' | translate }} - - {{ paymentFundSource.fundSourceAccount.name }} - - - - - - - - - - {{ 'labels.inputs.Fees to Specific Income Accounts' | translate }} - - - - {{ 'labels.inputs.Fees' | translate }} - - {{ feesIncome.charge.name }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ feesIncome.incomeAccount.name }} - - - - - - - - - - {{ 'labels.inputs.Penalties to Specific Income Accounts' | translate }} - - - - {{ 'labels.inputs.Penalty' | translate }} - - {{ penaltyIncome.charge.name }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ penaltyIncome.incomeAccount.name }} - - - - - - + @if ( + recurringDepositProduct.paymentChannelToFundSourceMappings?.length || + recurringDepositProduct.feeToIncomeAccountMappings?.length || + recurringDepositProduct.penaltyToIncomeAccountMappings?.length + ) { + + {{ 'labels.inputs.Advanced Accounting Rules' | translate }} + + @if (recurringDepositProduct.paymentChannelToFundSourceMappings?.length) { + + + {{ 'labels.inputs.Configure Fund Sources for Payment Channels' | translate }} + + + + {{ 'labels.inputs.Payment Type' | translate }} + + {{ paymentFundSource.paymentType.name }} + + + + {{ 'labels.inputs.Fund Source' | translate }} + + {{ paymentFundSource.fundSourceAccount.name }} + + + + + + + } + @if (recurringDepositProduct.feeToIncomeAccountMappings?.length) { + + {{ 'labels.inputs.Fees to Specific Income Accounts' | translate }} + + + {{ 'labels.inputs.Fees' | translate }} + + {{ feesIncome.charge.name }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ feesIncome.incomeAccount.name }} + + + + + + + } + @if (recurringDepositProduct.penaltyToIncomeAccountMappings?.length) { + + {{ 'labels.inputs.Penalties to Specific Income Accounts' | translate }} + + + {{ 'labels.inputs.Penalty' | translate }} + + {{ penaltyIncome.charge.name }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ penaltyIncome.incomeAccount.name }} + + + + + + + } - + } diff --git a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.ts b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.ts index 7fc623daf5..1b628a2411 100644 --- a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.ts +++ b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/recurring-deposit-general-tab/recurring-deposit-general-tab.component.ts @@ -1,9 +1,9 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { trigger, state, transition, animate, style } from '@angular/animations'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatDivider } from '@angular/material/divider'; -import { NgIf, NgSwitch, NgSwitchCase } from '@angular/common'; + import { MatTable, MatColumnDef, @@ -44,8 +44,6 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; MatHeaderCell, MatCellDef, MatCell, - NgSwitch, - NgSwitchCase, MatHeaderRowDef, MatHeaderRow, MatRowDef, @@ -58,6 +56,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RecurringDepositGeneralTabComponent { + private route = inject(ActivatedRoute); + recurringDepositProduct: any; recurringDepositProductTemplate: any; @@ -92,7 +92,10 @@ export class RecurringDepositGeneralTabComponent { 'incomeAccountId' ]; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { recurringDepositProduct: any; recurringDepositProductsTemplate: any }) => { this.recurringDepositProduct = data.recurringDepositProduct; this.recurringDepositProductTemplate = data.recurringDepositProductsTemplate; diff --git a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.html b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.html index 0c56f4448f..4e7ac5751e 100644 --- a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.html +++ b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.html @@ -10,7 +10,7 @@ > {{ 'labels.heading.General' | translate }} - + @for (recurringDepositDatatable of recurringDepositDatatables; track recurringDepositDatatable) { {{ recurringDepositDatatable.registeredTableName }} - + } diff --git a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.ts b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.ts index 19840a9144..4ae8000ce3 100644 --- a/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.ts +++ b/src/app/products/recurring-deposit-products/view-recurring-deposit-product/view-recurring-deposit-product.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router'; import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -17,9 +17,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewRecurringDepositProductComponent { + private route = inject(ActivatedRoute); + recurringDepositDatatables: any = []; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { recurringDepositDatatables: any }) => { this.recurringDepositDatatables = []; data.recurringDepositDatatables.forEach((datatable: any) => { diff --git a/src/app/products/saving-products/create-saving-product/create-saving-product.component.html b/src/app/products/saving-products/create-saving-product/create-saving-product.component.html index cccfae0642..1c8cf87221 100644 --- a/src/app/products/saving-products/create-saving-product/create-saving-product.component.html +++ b/src/app/products/saving-products/create-saving-product/create-saving-product.component.html @@ -78,17 +78,18 @@ > - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (savingProductFormValid) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/products/saving-products/create-saving-product/create-saving-product.component.ts b/src/app/products/saving-products/create-saving-product/create-saving-product.component.ts index 91ec179181..8ca824c5a7 100644 --- a/src/app/products/saving-products/create-saving-product/create-saving-product.component.ts +++ b/src/app/products/saving-products/create-saving-product/create-saving-product.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Components */ @@ -40,6 +40,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateSavingProductComponent { + private route = inject(ActivatedRoute); + private productsService = inject(ProductsService); + private router = inject(Router); + private settingsService = inject(SettingsService); + private accounting = inject(Accounting); + @ViewChild(SavingProductDetailsStepComponent, { static: true }) savingProductDetailsStep: SavingProductDetailsStepComponent; @ViewChild(SavingProductCurrencyStepComponent, { static: true }) @@ -55,6 +61,9 @@ export class CreateSavingProductComponent { savingProductsTemplate: any; accountingRuleData: string[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route. * @param {ProductsService} productsService Products Service. @@ -62,13 +71,7 @@ export class CreateSavingProductComponent { * @param {SettingsService} settingsService Settings Service. */ - constructor( - private route: ActivatedRoute, - private productsService: ProductsService, - private router: Router, - private settingsService: SettingsService, - private accounting: Accounting - ) { + constructor() { this.route.data.subscribe((data: { savingProductsTemplate: any }) => { this.savingProductsTemplate = data.savingProductsTemplate; }); diff --git a/src/app/products/saving-products/edit-saving-product/edit-saving-product.component.html b/src/app/products/saving-products/edit-saving-product/edit-saving-product.component.html index 479a8d965a..26c2e6ca30 100644 --- a/src/app/products/saving-products/edit-saving-product/edit-saving-product.component.html +++ b/src/app/products/saving-products/edit-saving-product/edit-saving-product.component.html @@ -81,17 +81,18 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (savingProductFormValidAndNotPristine) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/products/saving-products/edit-saving-product/edit-saving-product.component.ts b/src/app/products/saving-products/edit-saving-product/edit-saving-product.component.ts index f462af8eae..23d2b7e26a 100644 --- a/src/app/products/saving-products/edit-saving-product/edit-saving-product.component.ts +++ b/src/app/products/saving-products/edit-saving-product/edit-saving-product.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Components */ @@ -40,6 +40,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditSavingProductComponent { + private route = inject(ActivatedRoute); + private productsService = inject(ProductsService); + private router = inject(Router); + private settingsService = inject(SettingsService); + private accounting = inject(Accounting); + @ViewChild(SavingProductDetailsStepComponent, { static: true }) savingProductDetailsStep: SavingProductDetailsStepComponent; @ViewChild(SavingProductCurrencyStepComponent, { static: true }) @@ -55,6 +61,9 @@ export class EditSavingProductComponent { savingProductAndTemplate: any; accountingRuleData: string[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route. * @param {ProductsService} productsService Products Service. @@ -62,13 +71,7 @@ export class EditSavingProductComponent { * @param {SettingsService} settingsService Settings Service. */ - constructor( - private route: ActivatedRoute, - private productsService: ProductsService, - private router: Router, - private settingsService: SettingsService, - private accounting: Accounting - ) { + constructor() { this.route.data.subscribe((data: { savingProductAndTemplate: any }) => { this.savingProductAndTemplate = data.savingProductAndTemplate; }); diff --git a/src/app/products/saving-products/edit-saving-product/saving-product-and-template.resolver.ts b/src/app/products/saving-products/edit-saving-product/saving-product-and-template.resolver.ts index bfe94b1e17..d163b1b4d9 100644 --- a/src/app/products/saving-products/edit-saving-product/saving-product-and-template.resolver.ts +++ b/src/app/products/saving-products/edit-saving-product/saving-product-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../../products.service'; */ @Injectable() export class SavingProductAndTemplateResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the saving product and template data. diff --git a/src/app/products/saving-products/saving-product-datatable.resolver.ts b/src/app/products/saving-products/saving-product-datatable.resolver.ts index c020f4b5ab..66d445056e 100644 --- a/src/app/products/saving-products/saving-product-datatable.resolver.ts +++ b/src/app/products/saving-products/saving-product-datatable.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; import { SystemService } from 'app/system/system.service'; import { Observable } from 'rxjs'; @@ -7,10 +7,15 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class SavingProductDatatableResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService Products service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the loan product data. diff --git a/src/app/products/saving-products/saving-product-datatables.resolver.ts b/src/app/products/saving-products/saving-product-datatables.resolver.ts index 625fd08b68..f8209f2c1f 100644 --- a/src/app/products/saving-products/saving-product-datatables.resolver.ts +++ b/src/app/products/saving-products/saving-product-datatables.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { Router, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router'; import { SystemService } from 'app/system/system.service'; import { Observable, of } from 'rxjs'; @@ -7,10 +7,15 @@ import { Observable, of } from 'rxjs'; providedIn: 'root' }) export class SavingProductDatatablesResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService Products service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the loan product data. diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-accounting-step/saving-product-accounting-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-accounting-step/saving-product-accounting-step.component.html index 6fea08bcac..b8df355879 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-accounting-step/saving-product-accounting-step.component.html +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-accounting-step/saving-product-accounting-step.component.html @@ -4,338 +4,312 @@ class="flex-98 layout-row gap-5percent layout-column.lt-md radio-group-spacing" formControlName="accountingRule" > - - {{ 'labels.accounting.' + accountingRule | translate }} - + @for (accountingRule of accountingRuleData; track accountingRule; let i = $index) { + + {{ 'labels.accounting.' + accountingRule | translate }} + + } - - {{ 'labels.heading.Assets' | translate }} - - - - - - - - - - - - - - - - - - - {{ 'labels.heading.Liabilities' | translate }} - - - - - - - - - - - - - - {{ 'labels.heading.Expenses' | translate }} - - - - - - - - - - {{ 'labels.heading.Income' | translate }} - - - - - - - - - - - - - {{ - 'labels.heading.Advanced Accounting Rules' | translate - }} - - - - - {{ 'labels.heading.Configure Fund Sources for Payment Channels' | translate }} - - - - - - {{ 'labels.buttons.Add' | translate }} - - - - - - + {{ 'labels.heading.Assets' | translate }} + + + + + @if (isAccrualAccounting()) { + - - {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentFundSource.paymentTypeId | find: paymentTypeData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Fund Source' | translate }} - - {{ paymentFundSource.fundSourceAccountId | find: combinedAccountData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - - {{ 'labels.heading.Map Fees to Specific Income Accounts' | translate }} - - - - - {{ 'labels.buttons.Add' | translate }} - - - - + } + @if (isAccrualAccounting()) { + - - {{ 'labels.inputs.Fees' | translate }} - - {{ feesIncome.chargeId | find: chargeData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ feesIncome.incomeAccountId | find: incomeAccountData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - - - {{ 'labels.heading.Map Penalties to Specific Income Accounts' | translate }} - - - - - - {{ 'labels.buttons.Add' | translate }} - - - - + } + @if (isAccrualAccounting() && allowOverdraft.value) { + - - {{ 'labels.inputs.Penalty' | translate }} - - {{ penaltyIncome.chargeId | find: penaltyData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ penaltyIncome.incomeAccountId | find: incomeAccountData : 'id' : 'name' }} - - - - - {{ 'labels.inputs.Actions' | translate }} - + + } + + {{ 'labels.heading.Liabilities' | translate }} + + + + + @if (isAccrualAccounting()) { + + + } + @if (isDormancyTrackingActive.value) { + + + } + {{ 'labels.heading.Expenses' | translate }} + + + + + + {{ 'labels.heading.Income' | translate }} + + + + + + + + {{ + 'labels.heading.Advanced Accounting Rules' | translate + }} + @if (savingProductAccountingForm.value.advancedAccountingRules) { + + + + {{ 'labels.heading.Configure Fund Sources for Payment Channels' | translate }} + + - - - - + + {{ 'labels.buttons.Add' | translate }} - - - - - - - + + + + @if (paymentChannelToFundSourceMappings.value.length !== 0) { + + + {{ 'labels.inputs.Payment Type' | translate }} + + {{ paymentFundSource.paymentTypeId | find: paymentTypeData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Fund Source' | translate }} + + {{ paymentFundSource.fundSourceAccountId | find: combinedAccountData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } + + @if (existCharges()) { + + {{ 'labels.heading.Map Fees to Specific Income Accounts' | translate }} + @if (existCharges()) { + + + + {{ 'labels.buttons.Add' | translate }} + + + } + @if (feeToIncomeAccountMappings.value.length !== 0) { + + + {{ 'labels.inputs.Fees' | translate }} + + {{ feesIncome.chargeId | find: chargeData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ feesIncome.incomeAccountId | find: incomeAccountData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } + + } + @if (existCharges()) { + + + {{ 'labels.heading.Map Penalties to Specific Income Accounts' | translate }} + + + + + {{ 'labels.buttons.Add' | translate }} + + + @if (penaltyToIncomeAccountMappings.value.length !== 0) { + + + {{ 'labels.inputs.Penalty' | translate }} + + {{ penaltyIncome.chargeId | find: penaltyData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ penaltyIncome.incomeAccountId | find: incomeAccountData : 'id' : 'name' }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } + + } + + } - + } diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-accounting-step/saving-product-accounting-step.component.ts b/src/app/products/saving-products/saving-product-stepper/saving-product-accounting-step/saving-product-accounting-step.component.ts index d744664816..253272011a 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-accounting-step/saving-product-accounting-step.component.ts +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-accounting-step/saving-product-accounting-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -66,6 +66,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingProductAccountingStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + @Input() savingProductsTemplate: any; @Input() accountingRuleData: any; @Input() isDormancyTrackingActive: UntypedFormControl; @@ -95,11 +99,10 @@ export class SavingProductAccountingStepComponent implements OnInit { 'actions' ]; - constructor( - private formBuilder: UntypedFormBuilder, - private dialog: MatDialog, - private translateService: TranslateService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createsavingProductAccountingForm(); this.setConditionalControls(); } diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-charges-step/saving-product-charges-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-charges-step/saving-product-charges-step.component.html index b7cccc4401..88119b9830 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-charges-step/saving-product-charges-step.component.html +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-charges-step/saving-product-charges-step.component.html @@ -2,12 +2,11 @@ {{ 'labels.inputs.Charge' | translate }} - - {{ charge.name }} - + @for (charge of chargeData | chargesFilter: chargesDataSource : currencyCode.value; track charge) { + + {{ charge.name }} + + } diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-charges-step/saving-product-charges-step.component.ts b/src/app/products/saving-products/saving-product-stepper/saving-product-charges-step/saving-product-charges-step.component.ts index ccee9c8b03..b5583971f9 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-charges-step/saving-product-charges-step.component.ts +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-charges-step/saving-product-charges-step.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormControl } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; @@ -48,6 +48,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingProductChargesStepComponent implements OnInit { + dialog = inject(MatDialog); + private translateService = inject(TranslateService); + @Input() savingProductsTemplate: any; @Input() currencyCode: UntypedFormControl; @@ -64,10 +67,10 @@ export class SavingProductChargesStepComponent implements OnInit { pristine = true; - constructor( - public dialog: MatDialog, - private translateService: TranslateService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { this.chargeData = this.savingProductsTemplate.chargeOptions; diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-currency-step/saving-product-currency-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-currency-step/saving-product-currency-step.component.html index cf1b232277..b2c8e2ec30 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-currency-step/saving-product-currency-step.component.html +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-currency-step/saving-product-currency-step.component.html @@ -7,9 +7,11 @@ matTooltip="{{ 'tooltips.The currency to be used' | translate }}" required > - - {{ currency.name }} - + @for (currency of currencyData; track currency) { + + {{ currency.name }} + + } {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-currency-step/saving-product-currency-step.component.ts b/src/app/products/saving-products/saving-product-stepper/saving-product-currency-step/saving-product-currency-step.component.ts index df8ef887ae..1b6df75e5e 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-currency-step/saving-product-currency-step.component.ts +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-currency-step/saving-product-currency-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatTooltip } from '@angular/material/tooltip'; import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper'; @@ -18,13 +18,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingProductCurrencyStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() savingProductsTemplate: any; savingProductCurrencyForm: UntypedFormGroup; currencyData: any; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createSavingProductCurrencyForm(); } diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-details-step/saving-product-details-step.component.ts b/src/app/products/saving-products/saving-product-stepper/saving-product-details-step/saving-product-details-step.component.ts index f4bceeef46..d357d1e8ca 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-details-step/saving-product-details-step.component.ts +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-details-step/saving-product-details-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatTooltip } from '@angular/material/tooltip'; import { CdkTextareaAutosize } from '@angular/cdk/text-field'; @@ -20,11 +20,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingProductDetailsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() savingProductsTemplate: any; savingProductDetailsForm: UntypedFormGroup; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createSavingProductDetailsForm(); } diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-preview-step/saving-product-preview-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-preview-step/saving-product-preview-step.component.html index 4f5f93e8ac..4ed8abcbca 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-preview-step/saving-product-preview-step.component.html +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-preview-step/saving-product-preview-step.component.html @@ -10,10 +10,12 @@ {{ 'labels.inputs.Details' | translate }} {{ savingProduct.shortName }} - - {{ 'labels.inputs.Description' | translate }}: - {{ savingProduct.description }} - + @if (savingProduct.description) { + + {{ 'labels.inputs.Description' | translate }}: + {{ savingProduct.description }} + + } {{ 'labels.inputs.Currency' | translate }} @@ -82,232 +84,240 @@ {{ 'labels.inputs.Terms' | translate }} {{ 'labels.inputs.Settings' | translate }} - - {{ 'labels.inputs.Minimum Opening Balance' | translate }}: - {{ savingProduct.minRequiredOpeningBalance | formatNumber }} - - - - {{ 'labels.inputs.Lock-in Period' | translate }}: - {{ - savingProduct.lockinPeriodFrequency + - ' ' + - (savingProduct.lockinPeriodFrequencyType - | find: savingProductsTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value') | translateKey: 'catalogs' - }} - + @if (savingProduct.minRequiredOpeningBalance) { + + {{ 'labels.inputs.Minimum Opening Balance' | translate }}: + {{ savingProduct.minRequiredOpeningBalance | formatNumber }} + + } + + @if (savingProduct.lockinPeriodFrequency) { + + {{ 'labels.inputs.Lock-in Period' | translate }}: + {{ + savingProduct.lockinPeriodFrequency + + ' ' + + (savingProduct.lockinPeriodFrequencyType + | find: savingProductsTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value') | translateKey: 'catalogs' + }} + + } {{ 'labels.inputs.Apply Withdrawal Fee for Transfers' | translate }}: {{ savingProduct.withdrawalFeeForTransfers | yesNo }} - - {{ 'labels.inputs.Balance Required for Interest Calculation' | translate }}: - {{ savingProduct.minBalanceForInterestCalculation | formatNumber }} - + @if (savingProduct.minBalanceForInterestCalculation) { + + {{ 'labels.inputs.Balance Required for Interest Calculation' | translate }}: + {{ savingProduct.minBalanceForInterestCalculation | formatNumber }} + + } {{ 'labels.inputs.Enforce Minimum Balance' | translate }}: {{ savingProduct.enforceMinRequiredBalance | yesNo }} - - {{ 'labels.inputs.Minimum Balance' | translate }}: - {{ savingProduct.minRequiredBalance | formatNumber }} - + @if (savingProduct.minRequiredBalance) { + + {{ 'labels.inputs.Minimum Balance' | translate }}: + {{ savingProduct.minRequiredBalance | formatNumber }} + + } {{ 'labels.inputs.Withhold Tax is Applicable' | translate }}: {{ savingProduct.withHoldTax | yesNo }} - - {{ 'labels.inputs.Tax Group' | translate }}: - {{ - savingProduct.taxGroupId | find: savingProductsTemplate.taxGroupOptions : 'id' : 'name' - }} - + @if (savingProduct.withHoldTax) { + + {{ 'labels.inputs.Tax Group' | translate }}: + {{ + savingProduct.taxGroupId | find: savingProductsTemplate.taxGroupOptions : 'id' : 'name' + }} + + } {{ 'labels.inputs.Is Overdraft Allowed' | translate }}: {{ savingProduct.allowOverdraft | yesNo }} - - {{ 'labels.inputs.Minimum Overdraft Required for Interest Calculation' | translate }}: - {{ savingProduct.minOverdraftForInterestCalculation | formatNumber }} - + @if (savingProduct.minOverdraftForInterestCalculation) { + + {{ 'labels.inputs.Minimum Overdraft Required for Interest Calculation' | translate }}: + {{ savingProduct.minOverdraftForInterestCalculation | formatNumber }} + + } - - {{ 'labels.inputs.Nominal Annual Interest for Overdraft' | translate }}: - {{ savingProduct.nominalAnnualInterestRateOverdraft | formatNumber }} % - + @if (savingProduct.nominalAnnualInterestRateOverdraft) { + + {{ 'labels.inputs.Nominal Annual Interest for Overdraft' | translate }}: + {{ savingProduct.nominalAnnualInterestRateOverdraft | formatNumber }} % + + } - - {{ 'labels.inputs.Maximum Overdraft Amount Limit' | translate }}: - {{ savingProduct.overdraftLimit | formatNumber }} - + @if (savingProduct.overdraftLimit) { + + {{ 'labels.inputs.Maximum Overdraft Amount Limit' | translate }}: + {{ savingProduct.overdraftLimit | formatNumber }} + + } {{ 'labels.inputs.Enable Dormancy Tracking' | translate }}: {{ savingProduct.isDormancyTrackingActive | yesNo }} - - {{ 'labels.inputs.Number of Days to Inactive sub-status' | translate }}: - {{ savingProduct.daysToInactive }} - {{ 'labels.inputs.Number of Days to Dormant sub-status' | translate }}: - {{ savingProduct.daysToDormancy }} - {{ 'labels.inputs.Number of Days to Escheat' | translate }}: - {{ savingProduct.daysToEscheat }} - - - - {{ 'labels.inputs.Charges' | translate }} - - - - - {{ 'labels.inputs.Name' | translate }} - - {{ charge.name + ', ' + charge.currency.displaySymbol }} - - - - - {{ 'labels.inputs.Type' | translate }} - - {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ charge.amount | formatNumber }} - - - - - {{ 'labels.inputs.Collected On' | translate }} - - {{ charge.chargeTimeType.value | translateKey: 'catalogs' }} - - - - - - - - - {{ 'labels.heading.Accounting' | translate }} - - - - - - - - {{ 'labels.heading.Advanced Accounting Rules' | translate }} - - - - {{ 'labels.heading.Fund Sources for Payment Channels' | translate }} - - - - {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentFundSource.paymentTypeId | find: savingProductsTemplate.paymentTypeOptions : 'id' : 'name' }} + @if (savingProduct.isDormancyTrackingActive) { + + {{ 'labels.inputs.Number of Days to Inactive sub-status' | translate }}: + {{ savingProduct.daysToInactive }} + {{ 'labels.inputs.Number of Days to Dormant sub-status' | translate }}: + {{ savingProduct.daysToDormancy }} + {{ 'labels.inputs.Number of Days to Escheat' | translate }}: + {{ savingProduct.daysToEscheat }} + + } + + @if (savingProduct.charges.length) { + + {{ 'labels.inputs.Charges' | translate }} + + + + {{ 'labels.inputs.Name' | translate }} + + {{ charge.name + ', ' + charge.currency.displaySymbol }} - - - {{ 'labels.inputs.Fund Source' | translate }} - - {{ - paymentFundSource.fundSourceAccountId - | find: savingProductsTemplate.accountingMappingOptions.assetAccountOptions : 'id' : 'name' - }} + + {{ 'labels.inputs.Type' | translate }} + + {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} - - - - - - - - {{ 'labels.heading.Fees to Specific Income Accounts' | translate }} - - - - {{ 'labels.inputs.Fees' | translate }} - - {{ feesIncome.chargeId | find: savingProductsTemplate.chargeOptions : 'id' : 'name' }} + + {{ 'labels.inputs.Amount' | translate }} + + {{ charge.amount | formatNumber }} - - - {{ 'labels.inputs.Income Account' | translate }} - - {{ - feesIncome.incomeAccountId - | find: savingProductsTemplate.accountingMappingOptions.incomeAccountOptions : 'id' : 'name' - }} + + {{ 'labels.inputs.Collected On' | translate }} + + {{ charge.chargeTimeType.value | translateKey: 'catalogs' }} - - - + + + } - - {{ 'labels.heading.Penalties to Specific Income Accounts' | translate }} - - - - {{ 'labels.inputs.Penalty' | translate }} - - {{ penaltyIncome.chargeId | find: savingProductsTemplate.penaltyOptions : 'id' : 'name' }} - - + {{ 'labels.heading.Accounting' | translate }} - - {{ 'labels.inputs.Income Account' | translate }} - - {{ - penaltyIncome.incomeAccountId - | find: savingProductsTemplate.accountingMappingOptions.incomeAccountOptions : 'id' : 'name' - }} - - + - - - + + + + @if ( + savingProduct.advancedAccountingRules && + (savingProduct.paymentChannelToFundSourceMappings?.length || + savingProduct.feeToIncomeAccountMappings?.length || + savingProduct.penaltyToIncomeAccountMappings?.length) + ) { + + {{ 'labels.heading.Advanced Accounting Rules' | translate }} + + @if (savingProduct.paymentChannelToFundSourceMappings?.length) { + + {{ 'labels.heading.Fund Sources for Payment Channels' | translate }} + + + {{ 'labels.inputs.Payment Type' | translate }} + + {{ paymentFundSource.paymentTypeId | find: savingProductsTemplate.paymentTypeOptions : 'id' : 'name' }} + + + + {{ 'labels.inputs.Fund Source' | translate }} + + {{ + paymentFundSource.fundSourceAccountId + | find: savingProductsTemplate.accountingMappingOptions.assetAccountOptions : 'id' : 'name' + }} + + + + + + + } + @if (savingProduct.feeToIncomeAccountMappings?.length) { + + {{ 'labels.heading.Fees to Specific Income Accounts' | translate }} + + + {{ 'labels.inputs.Fees' | translate }} + + {{ feesIncome.chargeId | find: savingProductsTemplate.chargeOptions : 'id' : 'name' }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ + feesIncome.incomeAccountId + | find: savingProductsTemplate.accountingMappingOptions.incomeAccountOptions : 'id' : 'name' + }} + + + + + + + } + @if (savingProduct.penaltyToIncomeAccountMappings?.length) { + + {{ 'labels.heading.Penalties to Specific Income Accounts' | translate }} + + + {{ 'labels.inputs.Penalty' | translate }} + + {{ penaltyIncome.chargeId | find: savingProductsTemplate.penaltyOptions : 'id' : 'name' }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + {{ + penaltyIncome.incomeAccountId + | find: savingProductsTemplate.accountingMappingOptions.incomeAccountOptions : 'id' : 'name' + }} + + + + + + + } - + } diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-preview-step/saving-product-preview-step.component.ts b/src/app/products/saving-products/saving-product-stepper/saving-product-preview-step/saving-product-preview-step.component.ts index 31a8f65feb..cb2333e8e6 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-preview-step/saving-product-preview-step.component.ts +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-preview-step/saving-product-preview-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core'; +import { Component, OnInit, Input, Output, EventEmitter, OnChanges, SimpleChanges, inject } from '@angular/core'; import { Accounting } from 'app/core/utils/accounting'; import { OptionData } from 'app/shared/models/option-data.model'; import { MatDivider } from '@angular/material/divider'; @@ -48,6 +48,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingProductPreviewStepComponent implements OnInit, OnChanges { + private accounting = inject(Accounting); + @Input() savingProductsTemplate: any; @Input() accountingRuleData: any; @Input() savingProduct: any; @@ -72,7 +74,10 @@ export class SavingProductPreviewStepComponent implements OnInit, OnChanges { accountingMappings: any = {}; accountingRule: OptionData; - constructor(private accounting: Accounting) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { this.setCurrentValues(); diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.html index f05de08267..02edaa69d5 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.html +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.html @@ -24,12 +24,11 @@ - - {{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }} - + @for (lockinPeriodFrequencyType of lockinPeriodFrequencyTypeData; track lockinPeriodFrequencyType) { + + {{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }} + + } @@ -80,18 +79,22 @@ {{ 'labels.inputs.Is Withhold Tax Applicable' | translate }} - - {{ 'labels.inputs.Tax Group' | translate }} - - - {{ taxGroup.name }} - - - - {{ 'labels.inputs.Tax Group' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (savingProductSettingsForm.value.withHoldTax) { + + {{ 'labels.inputs.Tax Group' | translate }} + + @for (taxGroup of taxGroupData; track taxGroup) { + + {{ taxGroup.name }} + + } + + + {{ 'labels.inputs.Tax Group' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + } @@ -106,40 +109,37 @@ {{ 'labels.inputs.Overdraft' | translate }} {{ 'labels.inputs.Is Overdraft Allowed' | translate }} - - - {{ 'labels.inputs.Minimum Overdraft Required for Interest Calculation' | translate }} - - - - - {{ 'labels.inputs.Nominal Annual Interest for Overdraft' | translate }} - - - - - {{ 'labels.inputs.Maximum Overdraft Amount Limit' | translate }} - - - + @if (savingProductSettingsForm.value.allowOverdraft) { + + + {{ 'labels.inputs.Minimum Overdraft Required for Interest Calculation' | translate }} + + + + {{ 'labels.inputs.Nominal Annual Interest for Overdraft' | translate }} + + + + {{ 'labels.inputs.Maximum Overdraft Amount Limit' | translate }} + + + + } @@ -154,55 +154,53 @@ {{ 'labels.inputs.Dormancy Tracking' | translate }} {{ 'labels.inputs.Enable Dormancy Tracking' | translate }} - - - {{ 'labels.inputs.Number of Days to Inactive sub-status' | translate }} - - - {{ 'labels.inputs.Number of Days to Inactive sub-status' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Number of Days to Dormant sub-status' | translate }} - - - {{ 'labels.inputs.Number of Days to Dormant sub-status' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Number of Days to Escheat' | translate }} - - - {{ 'labels.inputs.Number of Days to Escheat' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - + @if (savingProductSettingsForm.value.isDormancyTrackingActive) { + + + {{ 'labels.inputs.Number of Days to Inactive sub-status' | translate }} + + + {{ 'labels.inputs.Number of Days to Inactive sub-status' | translate }} + {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + + {{ 'labels.inputs.Number of Days to Dormant sub-status' | translate }} + + + {{ 'labels.inputs.Number of Days to Dormant sub-status' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + + {{ 'labels.inputs.Number of Days to Escheat' | translate }} + + + {{ 'labels.inputs.Number of Days to Escheat' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + + } diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.ts b/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.ts index 85da9bd36c..6613275809 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.ts +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -28,6 +28,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingProductSettingsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() savingProductsTemplate: any; savingProductSettingsForm: UntypedFormGroup; @@ -35,7 +37,10 @@ export class SavingProductSettingsStepComponent implements OnInit { lockinPeriodFrequencyTypeData: any; taxGroupData: any; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createSavingProductSettingsForm(); this.setConditionalControls(); } diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-terms-step/saving-product-terms-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-terms-step/saving-product-terms-step.component.html index 7790e26408..225c72a65f 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-terms-step/saving-product-terms-step.component.html +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-terms-step/saving-product-terms-step.component.html @@ -24,12 +24,11 @@ matTooltip="{{ 'tooltips.The period at which interest rate' | translate }}" required > - - {{ interestCompoundingPeriodType.value | translateKey: 'catalogs' }} - + @for (interestCompoundingPeriodType of interestCompoundingPeriodTypeData; track interestCompoundingPeriodType) { + + {{ interestCompoundingPeriodType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Interest Compounding Period' | translate }} {{ 'labels.commons.is' | translate }} @@ -44,12 +43,11 @@ matTooltip="{{ 'tooltips.Interest rate is posted or credited to a saving account' | translate }}" required > - - {{ interestPostingPeriodType.value | translateKey: 'catalogs' }} - + @for (interestPostingPeriodType of interestPostingPeriodTypeData; track interestPostingPeriodType) { + + {{ interestPostingPeriodType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Interest Posting Period' | translate }} {{ 'labels.commons.is' | translate }} @@ -64,12 +62,11 @@ matTooltip="{{ 'tooltips.The method used to calculate interest' | translate }}" required > - - {{ interestCalculationType.value | translateKey: 'catalogs' }} - + @for (interestCalculationType of interestCalculationTypeData; track interestCalculationType) { + + {{ interestCalculationType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Interest Calculated using' | translate }} {{ 'labels.commons.is' | translate }} @@ -84,12 +81,14 @@ matTooltip="{{ 'tooltips.To calculate interest' | translate }}" required > - - {{ interestCalculationDaysInYearType.value | translateKey: 'catalogs' }} - + @for ( + interestCalculationDaysInYearType of interestCalculationDaysInYearTypeData; + track interestCalculationDaysInYearType + ) { + + {{ interestCalculationDaysInYearType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Days in Year' | translate }} {{ 'labels.commons.is' | translate }} diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-terms-step/saving-product-terms-step.component.ts b/src/app/products/saving-products/saving-product-stepper/saving-product-terms-step/saving-product-terms-step.component.ts index 60288417f2..6596aa8fee 100644 --- a/src/app/products/saving-products/saving-product-stepper/saving-product-terms-step/saving-product-terms-step.component.ts +++ b/src/app/products/saving-products/saving-product-stepper/saving-product-terms-step/saving-product-terms-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatTooltip } from '@angular/material/tooltip'; import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper'; @@ -18,6 +18,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingProductTermsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() savingProductsTemplate: any; savingProductTermsForm: UntypedFormGroup; @@ -27,7 +29,10 @@ export class SavingProductTermsStepComponent implements OnInit { interestCalculationTypeData: any; interestCalculationDaysInYearTypeData: any; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createSavingProductTermsForm(); } diff --git a/src/app/products/saving-products/saving-product.resolver.ts b/src/app/products/saving-products/saving-product.resolver.ts index 7b3364a3b8..e10efc3d69 100644 --- a/src/app/products/saving-products/saving-product.resolver.ts +++ b/src/app/products/saving-products/saving-product.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class SavingProductResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the saving product data. diff --git a/src/app/products/saving-products/saving-products-template.resolver.ts b/src/app/products/saving-products/saving-products-template.resolver.ts index d868b688da..3c6fea0477 100644 --- a/src/app/products/saving-products/saving-products-template.resolver.ts +++ b/src/app/products/saving-products/saving-products-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -9,7 +9,12 @@ import { ProductsService } from '../products.service'; @Injectable() export class SavingProductsTemplateResolver { - constructor(private productsService: ProductsService) {} + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} /** * Returns the saving products template data. diff --git a/src/app/products/saving-products/saving-products.component.ts b/src/app/products/saving-products/saving-products.component.ts index 746196bdb0..b98656b0d2 100644 --- a/src/app/products/saving-products/saving-products.component.ts +++ b/src/app/products/saving-products/saving-products.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -46,6 +46,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingProductsComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + savingProductsData: any; displayedColumns: string[] = [ 'name', @@ -65,18 +70,16 @@ export class SavingProductsComponent implements OnInit, AfterViewInit { /* Template for popover on saving products table */ @ViewChild('templateSavingProductTable') templateSavingProductTable: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route ActivatedRoute. * @param {Router} router Router. * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { savingProducts: any }) => { this.savingProductsData = data.savingProducts; }); diff --git a/src/app/products/saving-products/saving-products.resolver.ts b/src/app/products/saving-products/saving-products.resolver.ts index db747a9770..1d4cc241ce 100644 --- a/src/app/products/saving-products/saving-products.resolver.ts +++ b/src/app/products/saving-products/saving-products.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,11 +12,16 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class SavingProductsResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the saving products data. diff --git a/src/app/products/saving-products/view-saving-product/saving-product-datatable-tab/saving-product-datatable-tab.component.ts b/src/app/products/saving-products/view-saving-product/saving-product-datatable-tab/saving-product-datatable-tab.component.ts index d1d9c675e8..3e0969c762 100644 --- a/src/app/products/saving-products/view-saving-product/saving-product-datatable-tab/saving-product-datatable-tab.component.ts +++ b/src/app/products/saving-products/view-saving-product/saving-product-datatable-tab/saving-product-datatable-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { EntityDatatableTabComponent } from '../../../../shared/tabs/entity-datatable-tab/entity-datatable-tab.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -13,11 +13,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingProductDatatableTabComponent { + private route = inject(ActivatedRoute); + entityId: string; entityDatatable: any; multiRowDatatableFlag: boolean; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.entityId = this.route.parent.parent.snapshot.paramMap.get('productId'); this.route.data.subscribe((data: { savingProductDatatable: any }) => { diff --git a/src/app/products/saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component.html b/src/app/products/saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component.html index 846bf7f361..8c64dbd0e3 100644 --- a/src/app/products/saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component.html +++ b/src/app/products/saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component.html @@ -25,10 +25,12 @@ {{ 'labels.heading.Details' | translate }} {{ savingProduct.shortName }} - - {{ 'labels.inputs.Description' | translate }}: - {{ savingProduct.description }} - + @if (savingProduct.description) { + + {{ 'labels.inputs.Description' | translate }}: + {{ savingProduct.description }} + + } {{ 'labels.inputs.Currency' | translate }} @@ -84,224 +86,228 @@ {{ 'labels.heading.Settings' | translate }} - - {{ 'labels.inputs.Minimum Opening Balance' | translate }}: - {{ savingProduct.minRequiredOpeningBalance | formatNumber }} - - - - {{ 'labels.inputs.Lock-in Period' | translate }}: - {{ - savingProduct.lockinPeriodFrequency + ' ' + savingProduct.lockinPeriodFrequencyType.value - }} - + @if (savingProduct.minRequiredOpeningBalance) { + + {{ 'labels.inputs.Minimum Opening Balance' | translate }}: + {{ savingProduct.minRequiredOpeningBalance | formatNumber }} + + } + + @if (savingProduct.lockinPeriodFrequency) { + + {{ 'labels.inputs.Lock-in Period' | translate }}: + {{ + savingProduct.lockinPeriodFrequency + ' ' + savingProduct.lockinPeriodFrequencyType.value + }} + + } {{ 'labels.inputs.Apply Withdrawal Fee for Transfers' | translate }}: {{ savingProduct.withdrawalFeeForTransfers | yesNo }} - - {{ 'labels.inputs.Balance Required for Interest Calculation' | translate }}: - {{ savingProduct.minBalanceForInterestCalculation | formatNumber }} - + @if (savingProduct.minBalanceForInterestCalculation) { + + {{ 'labels.inputs.Balance Required for Interest Calculation' | translate }}: + {{ savingProduct.minBalanceForInterestCalculation | formatNumber }} + + } {{ 'labels.inputs.Enforce Minimum Balance' | translate }}: {{ savingProduct.enforceMinRequiredBalance | yesNo }} - - {{ 'labels.inputs.Minimum Balance' | translate }}: - {{ savingProduct.minRequiredBalance | formatNumber }} - + @if (savingProduct.minRequiredBalance) { + + {{ 'labels.inputs.Minimum Balance' | translate }}: + {{ savingProduct.minRequiredBalance | formatNumber }} + + } {{ 'labels.inputs.Withhold Tax is Applicable' | translate }}: {{ savingProduct.withHoldTax | yesNo }} - - {{ 'labels.inputs.Tax Group' | translate }}: - {{ savingProduct.taxGroup.name }} - + @if (savingProduct.withHoldTax) { + + {{ 'labels.inputs.Tax Group' | translate }}: + {{ savingProduct.taxGroup.name }} + + } {{ 'labels.inputs.Is Overdraft Allowed' | translate }}: {{ savingProduct.allowOverdraft | yesNo }} - - {{ 'labels.inputs.Minimum Overdraft Required for Interest Calculation' | translate }}: - {{ savingProduct.minOverdraftForInterestCalculation }} - + @if (savingProduct.minOverdraftForInterestCalculation) { + + {{ 'labels.inputs.Minimum Overdraft Required for Interest Calculation' | translate }}: + {{ savingProduct.minOverdraftForInterestCalculation }} + + } - - {{ 'labels.inputs.Nominal Annual Interest for Overdraft' | translate }}: - {{ savingProduct.nominalAnnualInterestRateOverdraft }} % - + @if (savingProduct.nominalAnnualInterestRateOverdraft) { + + {{ 'labels.inputs.Nominal Annual Interest for Overdraft' | translate }}: + {{ savingProduct.nominalAnnualInterestRateOverdraft }} % + + } - - {{ 'labels.inputs.Maximum Overdraft Amount Limit' | translate }}: - {{ savingProduct.overdraftLimit | formatNumber }} - + @if (savingProduct.overdraftLimit) { + + {{ 'labels.inputs.Maximum Overdraft Amount Limit' | translate }}: + {{ savingProduct.overdraftLimit | formatNumber }} + + } {{ 'labels.inputs.Enable Dormancy Tracking' | translate }}: {{ savingProduct.isDormancyTrackingActive | yesNo }} - - {{ 'labels.inputs.Number of Days to Inactive sub-status' | translate }}: - {{ savingProduct.daysToInactive }} - {{ 'labels.inputs.Number of Days to Dormant sub-status' | translate }}: - {{ savingProduct.daysToDormancy }} - {{ 'labels.inputs.Number of Days to Escheat' | translate }}: - {{ savingProduct.daysToEscheat }} - - - - {{ 'labels.heading.Charges' | translate }} - - - - - - {{ 'labels.inputs.Name' | translate }} - - {{ charge.name + ', ' + charge.currency.displaySymbol }} - - - - - {{ 'labels.inputs.Type' | translate }} - - {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ charge.amount | formatNumber }} - - - - - {{ 'labels.inputs.Collected On' | translate }} - - {{ charge.chargeTimeType.value | translateKey: 'catalogs' }} - - - - - - - - - {{ 'labels.heading.Accounting' | translate }} - - - - - - - - {{ 'labels.inputs.Advanced Accounting Rules' | translate }} - - - - - {{ 'labels.inputs.Fund Sources for Payment Channels' | translate }} - - - - {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentFundSource.paymentType.name }} + @if (savingProduct.isDormancyTrackingActive) { + + {{ 'labels.inputs.Number of Days to Inactive sub-status' | translate }}: + {{ savingProduct.daysToInactive }} + {{ 'labels.inputs.Number of Days to Dormant sub-status' | translate }}: + {{ savingProduct.daysToDormancy }} + {{ 'labels.inputs.Number of Days to Escheat' | translate }}: + {{ savingProduct.daysToEscheat }} + + } + + @if (savingProduct.charges.length) { + + {{ 'labels.heading.Charges' | translate }} + + + + {{ 'labels.inputs.Name' | translate }} + + {{ charge.name + ', ' + charge.currency.displaySymbol }} - - - {{ 'labels.inputs.Fund Source' | translate }} - - ({{ paymentFundSource.fundSourceAccount.glCode }}) {{ paymentFundSource.fundSourceAccount.name }} + + {{ 'labels.inputs.Type' | translate }} + + {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} - - - - - - - - {{ 'labels.inputs.Fees to Specific Income Accounts' | translate }} - - - - {{ 'labels.inputs.Fees' | translate }} - - {{ feesIncome.charge.name }} + + {{ 'labels.inputs.Amount' | translate }} + + {{ charge.amount | formatNumber }} - - - {{ 'labels.inputs.Income Account' | translate }} - - ({{ feesIncome.incomeAccount.glCode }}) {{ feesIncome.incomeAccount.name }} + + {{ 'labels.inputs.Collected On' | translate }} + + {{ charge.chargeTimeType.value | translateKey: 'catalogs' }} - - - + + + } - - {{ 'labels.inputs.Penalties to Specific Income Accounts' | translate }} - - - - {{ 'labels.inputs.Penalty' | translate }} - - {{ penaltyIncome.charge.name }} - - + {{ 'labels.heading.Accounting' | translate }} - - {{ 'labels.inputs.Income Account' | translate }} - - ({{ penaltyIncome.incomeAccount.glCode }}) {{ penaltyIncome.incomeAccount.name }} - - + - - - + + + + @if ( + savingProduct.paymentChannelToFundSourceMappings?.length || + savingProduct.feeToIncomeAccountMappings?.length || + savingProduct.penaltyToIncomeAccountMappings?.length + ) { + + {{ 'labels.inputs.Advanced Accounting Rules' | translate }} + + @if (savingProduct.paymentChannelToFundSourceMappings?.length) { + + {{ 'labels.inputs.Fund Sources for Payment Channels' | translate }} + + + {{ 'labels.inputs.Payment Type' | translate }} + + {{ paymentFundSource.paymentType.name }} + + + + {{ 'labels.inputs.Fund Source' | translate }} + + ({{ paymentFundSource.fundSourceAccount.glCode }}) {{ paymentFundSource.fundSourceAccount.name }} + + + + + + + } + @if (savingProduct.feeToIncomeAccountMappings?.length) { + + {{ 'labels.inputs.Fees to Specific Income Accounts' | translate }} + + + {{ 'labels.inputs.Fees' | translate }} + + {{ feesIncome.charge.name }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + ({{ feesIncome.incomeAccount.glCode }}) {{ feesIncome.incomeAccount.name }} + + + + + + + } + @if (savingProduct.penaltyToIncomeAccountMappings?.length) { + + {{ 'labels.inputs.Penalties to Specific Income Accounts' | translate }} + + + {{ 'labels.inputs.Penalty' | translate }} + + {{ penaltyIncome.charge.name }} + + + + {{ 'labels.inputs.Income Account' | translate }} + + ({{ penaltyIncome.incomeAccount.glCode }}) {{ penaltyIncome.incomeAccount.name }} + + + + + + + } - + } diff --git a/src/app/products/saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component.ts b/src/app/products/saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component.ts index 3c1e6be6d1..5876d88ee9 100644 --- a/src/app/products/saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component.ts +++ b/src/app/products/saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { Accounting } from 'app/core/utils/accounting'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @@ -44,6 +44,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingProductGeneralTabComponent { + private route = inject(ActivatedRoute); + private accounting = inject(Accounting); + savingProduct: any; chargesDisplayedColumns: string[] = [ @@ -61,10 +64,10 @@ export class SavingProductGeneralTabComponent { 'incomeAccountId' ]; - constructor( - private route: ActivatedRoute, - private accounting: Accounting - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { savingProduct: any }) => { this.savingProduct = data.savingProduct; }); diff --git a/src/app/products/saving-products/view-saving-product/view-saving-product.component.html b/src/app/products/saving-products/view-saving-product/view-saving-product.component.html index 3038858b3b..c9c0ec6882 100644 --- a/src/app/products/saving-products/view-saving-product/view-saving-product.component.html +++ b/src/app/products/saving-products/view-saving-product/view-saving-product.component.html @@ -10,7 +10,7 @@ > {{ 'labels.heading.General' | translate }} - + @for (savingProductDatatable of savingProductDatatables; track savingProductDatatable) { {{ savingProductDatatable.registeredTableName }} - + } diff --git a/src/app/products/saving-products/view-saving-product/view-saving-product.component.ts b/src/app/products/saving-products/view-saving-product/view-saving-product.component.ts index 702936a0bd..7faa0fdc0e 100644 --- a/src/app/products/saving-products/view-saving-product/view-saving-product.component.ts +++ b/src/app/products/saving-products/view-saving-product/view-saving-product.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router'; import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -17,9 +17,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewSavingProductComponent { + private route = inject(ActivatedRoute); + savingProductDatatables: any = []; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { savingProductDatatables: any }) => { this.savingProductDatatables = []; data.savingProductDatatables.forEach((datatable: any) => { diff --git a/src/app/products/share-products/create-dividend/create-dividend.component.html b/src/app/products/share-products/create-dividend/create-dividend.component.html index 8179b41dd1..8ebb09bbd9 100644 --- a/src/app/products/share-products/create-dividend/create-dividend.component.html +++ b/src/app/products/share-products/create-dividend/create-dividend.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Starting Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createDividendForm.controls.dividendPeriodStartDate.hasError('required')) { + + {{ 'labels.inputs.Starting Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -33,19 +35,23 @@ /> - - {{ 'labels.inputs.End Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createDividendForm.controls.dividendPeriodEndDate.hasError('required')) { + + {{ 'labels.inputs.End Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Dividend Amount' | translate }} - - {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (createDividendForm.controls.dividendAmount.hasError('required')) { + + {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/products/share-products/create-dividend/create-dividend.component.ts b/src/app/products/share-products/create-dividend/create-dividend.component.ts index d8f325dff2..20efdb54ba 100644 --- a/src/app/products/share-products/create-dividend/create-dividend.component.ts +++ b/src/app/products/share-products/create-dividend/create-dividend.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateDividendComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private productService = inject(ProductsService); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Create Dividend Form. */ createDividendForm: UntypedFormGroup; /** Share Product data. */ @@ -30,6 +37,9 @@ export class CreateDividendComponent implements OnInit { /** Maximum Date allowed. */ maxDate = new Date(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Get Share Product data from `Resolver`. * @param {FormBuilder} formBuilder Form Builder. @@ -39,14 +49,7 @@ export class CreateDividendComponent implements OnInit { * @param {Router} router Router. * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private dateUtils: Dates, - private productService: ProductsService, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { shareProduct: any }) => { this.shareProductData = data.shareProduct; }); diff --git a/src/app/products/share-products/create-share-product/create-share-product.component.html b/src/app/products/share-products/create-share-product/create-share-product.component.html index a8d79daa0c..72c51d60f9 100644 --- a/src/app/products/share-products/create-share-product/create-share-product.component.html +++ b/src/app/products/share-products/create-share-product/create-share-product.component.html @@ -81,17 +81,18 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (shareProductFormValid) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/products/share-products/create-share-product/create-share-product.component.ts b/src/app/products/share-products/create-share-product/create-share-product.component.ts index 552f4595b2..98ef13507d 100644 --- a/src/app/products/share-products/create-share-product/create-share-product.component.ts +++ b/src/app/products/share-products/create-share-product/create-share-product.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Components */ @@ -42,6 +42,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateShareProductComponent { + private route = inject(ActivatedRoute); + private productsService = inject(ProductsService); + private router = inject(Router); + private settingsService = inject(SettingsService); + private accounting = inject(Accounting); + @ViewChild(ShareProductDetailsStepComponent, { static: true }) shareProductDetailsStep: ShareProductDetailsStepComponent; @ViewChild(ShareProductCurrencyStepComponent, { static: true }) @@ -59,6 +65,9 @@ export class CreateShareProductComponent { shareProductsTemplate: any; accountingRuleData: string[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route. * @param {ProductsService} productsService Products Service. @@ -66,13 +75,7 @@ export class CreateShareProductComponent { * @param {SettingsService} settingsService Settings Service. */ - constructor( - private route: ActivatedRoute, - private productsService: ProductsService, - private router: Router, - private settingsService: SettingsService, - private accounting: Accounting - ) { + constructor() { this.route.data.subscribe((data: { shareProductsTemplate: any }) => { this.shareProductsTemplate = data.shareProductsTemplate; }); diff --git a/src/app/products/share-products/dividends-share-product/dividends.components.ts b/src/app/products/share-products/dividends-share-product/dividends.components.ts index ade7fc7cc0..39406fd5d0 100644 --- a/src/app/products/share-products/dividends-share-product/dividends.components.ts +++ b/src/app/products/share-products/dividends-share-product/dividends.components.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -57,6 +57,9 @@ import { DateFormatPipe } from '../../../pipes/date-format.pipe'; ] }) export class ShareProductsDividendsComponent implements OnInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Dividends data. */ dividendData: any; /** Columns to be displayed in dividends table. */ @@ -75,14 +78,14 @@ export class ShareProductsDividendsComponent implements OnInit { /** Sorter for dividends table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the dividends data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor( - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { dividends: any }) => { this.dividendData = data.dividends.pageItems; }); diff --git a/src/app/products/share-products/dividends-share-product/dividends.resolver.ts b/src/app/products/share-products/dividends-share-product/dividends.resolver.ts index 9b0f470655..47424ee360 100644 --- a/src/app/products/share-products/dividends-share-product/dividends.resolver.ts +++ b/src/app/products/share-products/dividends-share-product/dividends.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../../products.service'; */ @Injectable() export class DividendsResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the share products data. diff --git a/src/app/products/share-products/edit-share-product/edit-share-product.component.html b/src/app/products/share-products/edit-share-product/edit-share-product.component.html index 2e0de9f4eb..50bfa03549 100644 --- a/src/app/products/share-products/edit-share-product/edit-share-product.component.html +++ b/src/app/products/share-products/edit-share-product/edit-share-product.component.html @@ -87,17 +87,18 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (shareProductFormValidAndNotPristine) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/products/share-products/edit-share-product/edit-share-product.component.ts b/src/app/products/share-products/edit-share-product/edit-share-product.component.ts index c8d20c2ab8..9c3324b29a 100644 --- a/src/app/products/share-products/edit-share-product/edit-share-product.component.ts +++ b/src/app/products/share-products/edit-share-product/edit-share-product.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; /** Custom Components */ @@ -42,6 +42,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditShareProductComponent { + private route = inject(ActivatedRoute); + private productsService = inject(ProductsService); + private router = inject(Router); + private settingsService = inject(SettingsService); + private accounting = inject(Accounting); + @ViewChild(ShareProductDetailsStepComponent, { static: true }) shareProductDetailsStep: ShareProductDetailsStepComponent; @ViewChild(ShareProductCurrencyStepComponent, { static: true }) @@ -59,6 +65,9 @@ export class EditShareProductComponent { shareProductAndTemplate: any; accountingRuleData: string[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route. * @param {ProductsService} productsService Products Service. @@ -66,13 +75,7 @@ export class EditShareProductComponent { * @param {SettingsService} settingsService Settings Service. */ - constructor( - private route: ActivatedRoute, - private productsService: ProductsService, - private router: Router, - private settingsService: SettingsService, - private accounting: Accounting - ) { + constructor() { this.route.data.subscribe((data: { shareProductAndTemplate: any }) => { this.shareProductAndTemplate = data.shareProductAndTemplate; }); diff --git a/src/app/products/share-products/edit-share-product/share-product-and-template.resolver.ts b/src/app/products/share-products/edit-share-product/share-product-and-template.resolver.ts index efc1c65654..257b3109f4 100644 --- a/src/app/products/share-products/edit-share-product/share-product-and-template.resolver.ts +++ b/src/app/products/share-products/edit-share-product/share-product-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../../products.service'; */ @Injectable() export class ShareProductAndTemplateResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the share product and template data. diff --git a/src/app/products/share-products/share-product-datatable.resolver.ts b/src/app/products/share-products/share-product-datatable.resolver.ts index 8e37eda26b..5dd7e0f388 100644 --- a/src/app/products/share-products/share-product-datatable.resolver.ts +++ b/src/app/products/share-products/share-product-datatable.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { Router, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router'; import { SystemService } from 'app/system/system.service'; import { Observable, of } from 'rxjs'; @@ -7,10 +7,15 @@ import { Observable, of } from 'rxjs'; providedIn: 'root' }) export class ShareProductDatatableResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService Products service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the loan product data. diff --git a/src/app/products/share-products/share-product-datatables.resolver.ts b/src/app/products/share-products/share-product-datatables.resolver.ts index b1082e2a98..a37e74f4a2 100644 --- a/src/app/products/share-products/share-product-datatables.resolver.ts +++ b/src/app/products/share-products/share-product-datatables.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { Router, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router'; import { SystemService } from 'app/system/system.service'; import { Observable, of } from 'rxjs'; @@ -7,10 +7,15 @@ import { Observable, of } from 'rxjs'; providedIn: 'root' }) export class ShareProductDatatablesResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService Products service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the loan product data. diff --git a/src/app/products/share-products/share-product-resolver.ts b/src/app/products/share-products/share-product-resolver.ts index ec25d40c2f..c9e699f1e2 100644 --- a/src/app/products/share-products/share-product-resolver.ts +++ b/src/app/products/share-products/share-product-resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class ShareProductResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the share product data. diff --git a/src/app/products/share-products/share-product-stepper/share-product-accounting-step/share-product-accounting-step.component.html b/src/app/products/share-products/share-product-stepper/share-product-accounting-step/share-product-accounting-step.component.html index f8b361bb8a..52fca95f5e 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-accounting-step/share-product-accounting-step.component.html +++ b/src/app/products/share-products/share-product-stepper/share-product-accounting-step/share-product-accounting-step.component.html @@ -4,67 +4,58 @@ class="flex-98 layout-row gap-5percent layout-column.lt-md radio-group-spacing" formControlName="accountingRule" > - - {{ 'labels.accounting.' + accountingRule | translate }} - + @for (accountingRule of accountingRuleData; track accountingRule; let i = $index) { + + {{ 'labels.accounting.' + accountingRule | translate }} + + } - - {{ 'labels.heading.Assets' | translate }} - - - - - - - {{ 'labels.heading.Liabilities' | translate }} - - - - - - - {{ 'labels.heading.Share Equity' | translate }} - - - - - - - {{ 'labels.heading.Income' | translate }} - - - - + @if (shareProductAccountingForm.value.accountingRule === 2) { + + {{ 'labels.heading.Assets' | translate }} + + + + {{ 'labels.heading.Liabilities' | translate }} + + + + {{ 'labels.heading.Share Equity' | translate }} + + + + {{ 'labels.heading.Income' | translate }} + + + + } diff --git a/src/app/products/share-products/share-product-stepper/share-product-accounting-step/share-product-accounting-step.component.ts b/src/app/products/share-products/share-product-stepper/share-product-accounting-step/share-product-accounting-step.component.ts index 4f228235d5..5ca13cf97b 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-accounting-step/share-product-accounting-step.component.ts +++ b/src/app/products/share-products/share-product-stepper/share-product-accounting-step/share-product-accounting-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -29,6 +29,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ShareProductAccountingStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() shareProductsTemplate: any; @Input() accountingRuleData: any; @Input() shareProductFormValid: boolean; @@ -40,7 +42,10 @@ export class ShareProductAccountingStepComponent implements OnInit { equityAccountData: any; liabilityAccountData: any; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createShareProductAccountingForm(); this.setConditionalControls(); } diff --git a/src/app/products/share-products/share-product-stepper/share-product-charges-step/share-product-charges-step.component.html b/src/app/products/share-products/share-product-stepper/share-product-charges-step/share-product-charges-step.component.html index b7cccc4401..88119b9830 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-charges-step/share-product-charges-step.component.html +++ b/src/app/products/share-products/share-product-stepper/share-product-charges-step/share-product-charges-step.component.html @@ -2,12 +2,11 @@ {{ 'labels.inputs.Charge' | translate }} - - {{ charge.name }} - + @for (charge of chargeData | chargesFilter: chargesDataSource : currencyCode.value; track charge) { + + {{ charge.name }} + + } diff --git a/src/app/products/share-products/share-product-stepper/share-product-charges-step/share-product-charges-step.component.ts b/src/app/products/share-products/share-product-stepper/share-product-charges-step/share-product-charges-step.component.ts index 73bc5ccf13..b3266d94ee 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-charges-step/share-product-charges-step.component.ts +++ b/src/app/products/share-products/share-product-stepper/share-product-charges-step/share-product-charges-step.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormControl } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; @@ -48,6 +48,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ShareProductChargesStepComponent implements OnInit { + dialog = inject(MatDialog); + private translateService = inject(TranslateService); + @Input() shareProductsTemplate: any; @Input() currencyCode: UntypedFormControl; @@ -64,10 +67,10 @@ export class ShareProductChargesStepComponent implements OnInit { pristine = true; - constructor( - public dialog: MatDialog, - private translateService: TranslateService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { this.chargeData = this.shareProductsTemplate.chargeOptions; diff --git a/src/app/products/share-products/share-product-stepper/share-product-currency-step/share-product-currency-step.component.html b/src/app/products/share-products/share-product-stepper/share-product-currency-step/share-product-currency-step.component.html index d38e63ea4d..b1ce564ce0 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-currency-step/share-product-currency-step.component.html +++ b/src/app/products/share-products/share-product-stepper/share-product-currency-step/share-product-currency-step.component.html @@ -7,9 +7,11 @@ formControlName="currencyCode" required > - - {{ currency.name }} - + @for (currency of currencyData; track currency) { + + {{ currency.name }} + + } {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }} diff --git a/src/app/products/share-products/share-product-stepper/share-product-currency-step/share-product-currency-step.component.ts b/src/app/products/share-products/share-product-stepper/share-product-currency-step/share-product-currency-step.component.ts index 7d821466a9..e82b468e0f 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-currency-step/share-product-currency-step.component.ts +++ b/src/app/products/share-products/share-product-stepper/share-product-currency-step/share-product-currency-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatTooltip } from '@angular/material/tooltip'; import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper'; @@ -18,13 +18,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ShareProductCurrencyStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() shareProductsTemplate: any; shareProductCurrencyForm: UntypedFormGroup; currencyData: any; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createShareProductCurrencyForm(); } diff --git a/src/app/products/share-products/share-product-stepper/share-product-details-step/share-product-details-step.component.ts b/src/app/products/share-products/share-product-stepper/share-product-details-step/share-product-details-step.component.ts index f07d321997..041970a743 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-details-step/share-product-details-step.component.ts +++ b/src/app/products/share-products/share-product-stepper/share-product-details-step/share-product-details-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatTooltip } from '@angular/material/tooltip'; import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper'; @@ -18,11 +18,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ShareProductDetailsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() shareProductsTemplate: any; shareProductDetailsForm: UntypedFormGroup; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createShareProductDetailsForm(); } diff --git a/src/app/products/share-products/share-product-stepper/share-product-market-price-step/share-product-market-price-step.component.html b/src/app/products/share-products/share-product-stepper/share-product-market-price-step/share-product-market-price-step.component.html index 7850b68574..1400826e50 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-market-price-step/share-product-market-price-step.component.html +++ b/src/app/products/share-products/share-product-stepper/share-product-market-price-step/share-product-market-price-step.component.html @@ -13,41 +13,35 @@ - - - {{ 'labels.inputs.From Date' | translate }} - - {{ marketPricePeriod.fromDate | dateFormat }} - - - - - {{ 'labels.inputs.Nominal/Unit Price' | translate }} - - {{ marketPricePeriod.shareValue }} - - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - + @if (marketPricePeriods.value.length) { + + + {{ 'labels.inputs.From Date' | translate }} + + {{ marketPricePeriod.fromDate | dateFormat }} + + + + {{ 'labels.inputs.Nominal/Unit Price' | translate }} + + {{ marketPricePeriod.shareValue }} + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + + + } diff --git a/src/app/products/share-products/share-product-stepper/share-product-market-price-step/share-product-market-price-step.component.ts b/src/app/products/share-products/share-product-stepper/share-product-market-price-step/share-product-market-price-step.component.ts index 34cc97b413..f311ddd2c5 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-market-price-step/share-product-market-price-step.component.ts +++ b/src/app/products/share-products/share-product-stepper/share-product-market-price-step/share-product-market-price-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, UntypedFormArray } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; @@ -58,6 +58,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ShareProductMarketPriceStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + dialog = inject(MatDialog); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + private translateService = inject(TranslateService); + @Input() shareProductsTemplate: any; shareProductMarketPriceForm: UntypedFormGroup; @@ -69,19 +75,16 @@ export class ShareProductMarketPriceStepComponent implements OnInit { 'actions' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {Dates} dateUtils Date Utils to format date. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - public dialog: MatDialog, - private dateUtils: Dates, - private settingsService: SettingsService, - private translateService: TranslateService - ) { + constructor() { this.createShareProductMarketPriceForm(); } diff --git a/src/app/products/share-products/share-product-stepper/share-product-preview-step/share-product-preview-step.component.html b/src/app/products/share-products/share-product-stepper/share-product-preview-step/share-product-preview-step.component.html index 2ad9cef55f..25d5cad5b9 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-preview-step/share-product-preview-step.component.html +++ b/src/app/products/share-products/share-product-stepper/share-product-preview-step/share-product-preview-step.component.html @@ -10,10 +10,12 @@ {{ 'labels.heading.Details' | translate }} {{ shareProduct.shortName }} - - {{ 'labels.inputs.Description' | translate }}: - {{ shareProduct.description }} - + @if (shareProduct.description) { + + {{ 'labels.inputs.Description' | translate }}: + {{ shareProduct.description }} + + } {{ 'labels.heading.Currency' | translate }} @@ -73,92 +75,92 @@ {{ 'labels.heading.Settings' | translate }} }} - - {{ 'labels.inputs.Minimum Active Period' | translate }}: - {{ - shareProduct.minimumActivePeriodForDividends + - ' ' + - (shareProduct.minimumactiveperiodFrequencyType - | find: shareProductsTemplate.minimumActivePeriodFrequencyTypeOptions : 'id' : 'value') - }} - + @if (shareProduct.minimumActivePeriodForDividends) { + + {{ 'labels.inputs.Minimum Active Period' | translate }}: + {{ + shareProduct.minimumActivePeriodForDividends + + ' ' + + (shareProduct.minimumactiveperiodFrequencyType + | find: shareProductsTemplate.minimumActivePeriodFrequencyTypeOptions : 'id' : 'value') + }} + + } - - {{ 'labels.inputs.Lock-in Period' | translate }}: - {{ - shareProduct.lockinPeriodFrequency + - ' ' + - (shareProduct.lockinPeriodFrequencyType - | find: shareProductsTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value') - }} - + @if (shareProduct.lockinPeriodFrequency) { + + {{ 'labels.inputs.Lock-in Period' | translate }}: + {{ + shareProduct.lockinPeriodFrequency + + ' ' + + (shareProduct.lockinPeriodFrequencyType + | find: shareProductsTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value') + }} + + } {{ 'labels.inputs.Allow dividends for inactive clients' | translate }}: {{ shareProduct.allowDividendCalculationForInactiveClients | yesNo }} - - {{ 'labels.inputs.Market Price Period' | translate }} - - - - - {{ 'labels.inputs.From Date' | translate }} - - {{ marketPricePeriod.fromDate | dateFormat }} - - - - - {{ 'labels.inputs.Nominal/Unit Price' | translate }} - - {{ marketPricePeriod.shareValue | formatNumber }} - - - - - - - - - - {{ 'labels.heading.Charges' | translate }} - - - - - {{ 'labels.inputs.Name' | translate }} - - {{ charge.name + ', ' + charge.currency.displaySymbol }} - - - - - {{ 'labels.inputs.Type' | translate }} - - {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ charge.amount | formatNumber }} - - - - - {{ 'labels.inputs.Collected On' | translate }} - - {{ charge.chargeTimeType.value | translateKey: 'catalogs' }} - - - - - - - + @if (shareProduct.marketPricePeriods.length) { + + {{ 'labels.inputs.Market Price Period' | translate }} + + + + {{ 'labels.inputs.From Date' | translate }} + + {{ marketPricePeriod.fromDate | dateFormat }} + + + + {{ 'labels.inputs.Nominal/Unit Price' | translate }} + + {{ marketPricePeriod.shareValue | formatNumber }} + + + + + + + } + + @if (shareProduct.chargesSelected.length) { + + {{ 'labels.heading.Charges' | translate }} + + + + {{ 'labels.inputs.Name' | translate }} + + {{ charge.name + ', ' + charge.currency.displaySymbol }} + + + + {{ 'labels.inputs.Type' | translate }} + + {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} + + + + {{ 'labels.inputs.Amount' | translate }} + + {{ charge.amount | formatNumber }} + + + + {{ 'labels.inputs.Collected On' | translate }} + + {{ charge.chargeTimeType.value | translateKey: 'catalogs' }} + + + + + + + } {{ 'labels.heading.Accounting' | translate }} @@ -168,47 +170,42 @@ {{ 'labels.heading.Accounting' | translate }} {{ accountingRuleData[shareProduct.accountingRule - 1] }} - - {{ 'labels.heading.Assets' | translate }} - - - {{ 'labels.inputs.Share reference' | translate }}: - {{ - shareProduct.shareReferenceId - | find: shareProductsTemplate.accountingMappingOptions.assetAccountOptions : 'id' : 'name' - }} - - - {{ 'labels.heading.Liabilities' | translate }} - - - {{ 'labels.inputs.Share suspense control' | translate }}: - {{ - shareProduct.shareSuspenseId - | find: shareProductsTemplate.accountingMappingOptions.liabilityAccountOptions : 'id' : 'name' - }} - - - {{ 'labels.heading.Share Equity' | translate }} - - - {{ 'labels.inputs.Equity' | translate }}: - {{ - shareProduct.shareEquityId - | find: shareProductsTemplate.accountingMappingOptions.equityAccountOptions : 'id' : 'name' - }} + @if (shareProduct.accountingRule === 2) { + + {{ 'labels.heading.Assets' | translate }} + + {{ 'labels.inputs.Share reference' | translate }}: + {{ + shareProduct.shareReferenceId + | find: shareProductsTemplate.accountingMappingOptions.assetAccountOptions : 'id' : 'name' + }} + + {{ 'labels.heading.Liabilities' | translate }} + + {{ 'labels.inputs.Share suspense control' | translate }}: + {{ + shareProduct.shareSuspenseId + | find: shareProductsTemplate.accountingMappingOptions.liabilityAccountOptions : 'id' : 'name' + }} + + {{ 'labels.heading.Share Equity' | translate }} + + {{ 'labels.inputs.Equity' | translate }}: + {{ + shareProduct.shareEquityId + | find: shareProductsTemplate.accountingMappingOptions.equityAccountOptions : 'id' : 'name' + }} + + {{ 'labels.heading.Income' | translate }} + + {{ 'labels.inputs.Income from fees' | translate }}: + {{ + shareProduct.incomeFromFeeAccountId + | find: shareProductsTemplate.accountingMappingOptions.incomeAccountOptions : 'id' : 'name' + }} + - - {{ 'labels.heading.Income' | translate }} - - - {{ 'labels.inputs.Income from fees' | translate }}: - {{ - shareProduct.incomeFromFeeAccountId - | find: shareProductsTemplate.accountingMappingOptions.incomeAccountOptions : 'id' : 'name' - }} - - + } diff --git a/src/app/products/share-products/share-product-stepper/share-product-settings-step/share-product-settings-step.component.html b/src/app/products/share-products/share-product-stepper/share-product-settings-step/share-product-settings-step.component.html index 8ffe34b5bc..07b523a443 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-settings-step/share-product-settings-step.component.html +++ b/src/app/products/share-products/share-product-stepper/share-product-settings-step/share-product-settings-step.component.html @@ -45,12 +45,14 @@ {{ 'labels.inputs.Type' | translate }} - - {{ minimumActivePeriodFrequencyType.value | translateKey: 'catalogs' }} - + @for ( + minimumActivePeriodFrequencyType of minimumActivePeriodFrequencyTypeData; + track minimumActivePeriodFrequencyType + ) { + + {{ minimumActivePeriodFrequencyType.value | translateKey: 'catalogs' }} + + } @@ -67,12 +69,11 @@ {{ 'labels.inputs.Type' | translate }} - - {{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }} - + @for (lockinPeriodFrequencyType of lockinPeriodFrequencyTypeData; track lockinPeriodFrequencyType) { + + {{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }} + + } diff --git a/src/app/products/share-products/share-product-stepper/share-product-settings-step/share-product-settings-step.component.ts b/src/app/products/share-products/share-product-stepper/share-product-settings-step/share-product-settings-step.component.ts index b054d33c60..feaaca1bd8 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-settings-step/share-product-settings-step.component.ts +++ b/src/app/products/share-products/share-product-stepper/share-product-settings-step/share-product-settings-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, FormControl, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatTooltip } from '@angular/material/tooltip'; import { MatCheckbox } from '@angular/material/checkbox'; @@ -20,6 +20,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ShareProductSettingsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() shareProductsTemplate: any; shareProductSettingsForm: UntypedFormGroup; @@ -27,7 +29,10 @@ export class ShareProductSettingsStepComponent implements OnInit { minimumActivePeriodFrequencyTypeData: any; lockinPeriodFrequencyTypeData: any; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createShareProductSettingsForm(); } diff --git a/src/app/products/share-products/share-product-stepper/share-product-terms-step/share-product-terms-step.component.ts b/src/app/products/share-products/share-product-stepper/share-product-terms-step/share-product-terms-step.component.ts index 174accbe87..026df22e40 100644 --- a/src/app/products/share-products/share-product-stepper/share-product-terms-step/share-product-terms-step.component.ts +++ b/src/app/products/share-products/share-product-stepper/share-product-terms-step/share-product-terms-step.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { combineLatest } from 'rxjs'; import { MatFormField, MatLabel, MatError, MatHint } from '@angular/material/form-field'; @@ -21,11 +21,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ShareProductTermsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + @Input() shareProductsTemplate: any; shareProductTermsForm: UntypedFormGroup; - constructor(private formBuilder: UntypedFormBuilder) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.createShareProductTermsForm(); } diff --git a/src/app/products/share-products/share-products-template.resolver.ts b/src/app/products/share-products/share-products-template.resolver.ts index 5103ac3883..163431fc71 100644 --- a/src/app/products/share-products/share-products-template.resolver.ts +++ b/src/app/products/share-products/share-products-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -9,7 +9,12 @@ import { ProductsService } from '../products.service'; @Injectable() export class ShareProductsTemplateResolver { - constructor(private productsService: ProductsService) {} + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} /** * Returns the share products template data. diff --git a/src/app/products/share-products/share-products.component.ts b/src/app/products/share-products/share-products.component.ts index 3c42ee60a0..0d131e687f 100644 --- a/src/app/products/share-products/share-products.component.ts +++ b/src/app/products/share-products/share-products.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -46,6 +46,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ShareProductsComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + shareProductsData: any; displayedColumns: string[] = [ 'name', @@ -66,18 +71,16 @@ export class ShareProductsComponent implements OnInit, AfterViewInit { /* Template for popover on share products table */ @ViewChild('templateShareProductsTable') templateShareProductsTable: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route ActivatedRoute. * @param {Router} router Router. * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { shareProducts: any }) => { this.shareProductsData = data.shareProducts.pageItems; }); diff --git a/src/app/products/share-products/share-products.resolver.ts b/src/app/products/share-products/share-products.resolver.ts index f25fc24ca3..2406d038db 100644 --- a/src/app/products/share-products/share-products.resolver.ts +++ b/src/app/products/share-products/share-products.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,11 +12,16 @@ import { ProductsService } from '../products.service'; */ @Injectable() export class ShareProductsResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the share products data. diff --git a/src/app/products/share-products/view-dividend/view-dividend-data.resolver.ts b/src/app/products/share-products/view-dividend/view-dividend-data.resolver.ts index 7bd1625bc2..38459e6c84 100644 --- a/src/app/products/share-products/view-dividend/view-dividend-data.resolver.ts +++ b/src/app/products/share-products/view-dividend/view-dividend-data.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ProductsService } from '../../products.service'; */ @Injectable() export class ViewDividendDataResolver { + private productsService = inject(ProductsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ProductsService} productsService Products service. */ - constructor(private productsService: ProductsService) {} + constructor() {} /** * Returns the share products data. diff --git a/src/app/products/share-products/view-dividend/view-dividend.component.html b/src/app/products/share-products/view-dividend/view-dividend.component.html index fba495713d..078ecb01cf 100644 --- a/src/app/products/share-products/view-dividend/view-dividend.component.html +++ b/src/app/products/share-products/view-dividend/view-dividend.component.html @@ -1,9 +1,11 @@ - - - - {{ 'labels.buttons.buttons' | translate }} - - +@if (!isdividendPosted) { + + + + {{ 'labels.buttons.buttons' | translate }} + + +} diff --git a/src/app/products/share-products/view-dividend/view-dividend.component.ts b/src/app/products/share-products/view-dividend/view-dividend.component.ts index cd2c79018e..c9712713e3 100644 --- a/src/app/products/share-products/view-dividend/view-dividend.component.ts +++ b/src/app/products/share-products/view-dividend/view-dividend.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -42,6 +42,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewDividendComponent implements OnInit { + private route = inject(ActivatedRoute); + private productsService = inject(ProductsService); + private router = inject(Router); + dividendData: any; status: any; isdividendPosted = false; @@ -56,11 +60,10 @@ export class ViewDividendComponent implements OnInit { ]; dataSource: MatTableDataSource; - constructor( - private route: ActivatedRoute, - private productsService: ProductsService, - private router: Router - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { dividendData: any }) => { this.dividendData = data.dividendData; }); diff --git a/src/app/products/share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component.ts b/src/app/products/share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component.ts index 1d964d5247..71e83c4c25 100644 --- a/src/app/products/share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component.ts +++ b/src/app/products/share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { EntityDatatableTabComponent } from '../../../../shared/tabs/entity-datatable-tab/entity-datatable-tab.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -13,11 +13,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ShareProductDatatableTabComponent { + private route = inject(ActivatedRoute); + entityId: string; entityDatatable: any; multiRowDatatableFlag: boolean; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.entityId = this.route.parent.parent.snapshot.paramMap.get('productId'); this.route.data.subscribe((data: { shareProductDatatable: any }) => { diff --git a/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.html b/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.html index 7c4576c530..2e3a716a2a 100644 --- a/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.html +++ b/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.html @@ -16,7 +16,7 @@ + --> {{ shareProduct.name }} @@ -31,10 +31,12 @@ {{ 'labels.inputs.Details' | translate }} {{ shareProduct.shortName }} - - {{ 'labels.inputs.Description' | translate }}: - {{ shareProduct.description }} - + @if (shareProduct.description) { + + {{ 'labels.inputs.Description' | translate }}: + {{ shareProduct.description }} + + } {{ 'labels.heading.Currency' | translate }} @@ -95,89 +97,87 @@ {{ 'labels.heading.Settings' | translate }} }} - - {{ 'labels.inputs.Minimum Active Period' | translate }}: - {{ shareProduct.minimumActivePeriod }} - {{ shareProduct.minimumActivePeriodForDividendsTypeEnum.value | translateKey: 'catalogs' }} - + @if (shareProduct.minimumActivePeriod) { + + {{ 'labels.inputs.Minimum Active Period' | translate }}: + {{ shareProduct.minimumActivePeriod }} + {{ shareProduct.minimumActivePeriodForDividendsTypeEnum.value | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Lock-in Period' | translate }}: - {{ shareProduct.lockinPeriod }} {{ shareProduct.lockPeriodTypeEnum.value | translateKey: 'catalogs' }} - + @if (shareProduct.lockinPeriod) { + + {{ 'labels.inputs.Lock-in Period' | translate }}: + {{ shareProduct.lockinPeriod }} {{ shareProduct.lockPeriodTypeEnum.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Allow dividends for inactive clients' | translate }}: {{ shareProduct.allowDividendCalculationForInactiveClients | yesNo }} - - {{ 'labels.inputs.Market Price Period' | translate }} - - - - - - {{ 'labels.inputs.From Date' | translate }} - - {{ marketPrice.fromDate | dateFormat }} - - - - - {{ 'labels.inputs.Nominal/Unit Price' | translate }} - - {{ marketPrice.shareValue | formatNumber }} - - - - - - - - - - {{ 'labels.heading.Charges' | translate }} - - - - - - {{ 'labels.inputs.Name' | translate }} - - {{ charge.name + ', ' + charge.currency.displaySymbol }} - - - - - {{ 'labels.inputs.Type' | translate }} - - {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ charge.amount | numberFormat }} - - - - - {{ 'labels.inputs.Collected On' | translate }} - - {{ charge.chargeTimeType.value | translateKey: 'catalogs' }} - - - - - - - + @if (shareProduct.marketPrice?.length) { + + {{ 'labels.inputs.Market Price Period' | translate }} + + + + {{ 'labels.inputs.From Date' | translate }} + + {{ marketPrice.fromDate | dateFormat }} + + + + {{ 'labels.inputs.Nominal/Unit Price' | translate }} + + {{ marketPrice.shareValue | formatNumber }} + + + + + + + } + + @if (shareProduct.charges.length) { + + {{ 'labels.heading.Charges' | translate }} + + + + {{ 'labels.inputs.Name' | translate }} + + {{ charge.name + ', ' + charge.currency.displaySymbol }} + + + + {{ 'labels.inputs.Type' | translate }} + + {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} + + + + {{ 'labels.inputs.Amount' | translate }} + + {{ charge.amount | numberFormat }} + + + + {{ 'labels.inputs.Collected On' | translate }} + + {{ charge.chargeTimeType.value | translateKey: 'catalogs' }} + + + + + + + } {{ 'labels.heading.Accounting' | translate }} @@ -190,55 +190,50 @@ {{ 'labels.heading.Accounting' | translate }} }} - - {{ 'labels.heading.Assets' | translate }} - - - - - - - {{ 'labels.heading.Liabilities' | translate }} - - - - - - - {{ 'labels.heading.Share Equity' | translate }} - - - - + @if (shareProduct.accountingRule.id === 2) { + + {{ 'labels.heading.Assets' | translate }} + + + + + {{ 'labels.heading.Liabilities' | translate }} + + + + + {{ 'labels.heading.Share Equity' | translate }} + + + + + {{ 'labels.heading.Income' | translate }} + + + + - - {{ 'labels.heading.Income' | translate }} - - - - - - + } diff --git a/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.ts b/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.ts index 1b5b08b18d..11e7b2f53c 100644 --- a/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.ts +++ b/src/app/products/share-products/view-share-product/share-product-general-tab/share-product-general-tab.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { Accounting } from 'app/core/utils/accounting'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @@ -46,6 +46,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ShareProductGeneralTabComponent { + private route = inject(ActivatedRoute); + private accounting = inject(Accounting); + shareProduct: any; marketPriceDisplayedColumns: string[] = [ @@ -59,10 +62,10 @@ export class ShareProductGeneralTabComponent { 'chargeTimeType' ]; - constructor( - private route: ActivatedRoute, - private accounting: Accounting - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { shareProduct: any }) => { this.shareProduct = data.shareProduct; }); diff --git a/src/app/products/share-products/view-share-product/view-share-product.component.html b/src/app/products/share-products/view-share-product/view-share-product.component.html index fb95239ad1..7640e466c4 100644 --- a/src/app/products/share-products/view-share-product/view-share-product.component.html +++ b/src/app/products/share-products/view-share-product/view-share-product.component.html @@ -10,7 +10,7 @@ > {{ 'labels.inputs.General' | translate }} - + @for (shareProductDatatable of shareProductDatatables; track shareProductDatatable) { {{ shareProductDatatable.registeredTableName }} - + } diff --git a/src/app/products/share-products/view-share-product/view-share-product.component.ts b/src/app/products/share-products/view-share-product/view-share-product.component.ts index 9f22984989..103d25696f 100644 --- a/src/app/products/share-products/view-share-product/view-share-product.component.ts +++ b/src/app/products/share-products/view-share-product/view-share-product.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router'; import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -17,9 +17,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewShareProductComponent { + private route = inject(ActivatedRoute); + shareProductDatatables: any = []; - constructor(private route: ActivatedRoute) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { shareProductDatatables: any }) => { this.shareProductDatatables = []; data.shareProductDatatables.forEach((datatable: any) => { diff --git a/src/app/profile/profile.component.ts b/src/app/profile/profile.component.ts index 3c11986b84..1b1a530e09 100644 --- a/src/app/profile/profile.component.ts +++ b/src/app/profile/profile.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatTableDataSource, @@ -46,6 +46,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ProfileComponent implements OnInit { + private authenticationService = inject(AuthenticationService); + private settingsService = inject(SettingsService); + private router = inject(Router); + dialog = inject(MatDialog); + /** Profile Data */ profileData: any; /** Language, TODO: Update when df, locale settings are setup */ @@ -59,18 +64,18 @@ export class ProfileComponent implements OnInit { 'description' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AuthenticationService} authenticationService Authentication Service * @param {UserService} userService Users Service * @param {Router} router Router * @param {MatDialog} dialog Mat Dialog */ - constructor( - private authenticationService: AuthenticationService, - private settingsService: SettingsService, - private router: Router, - public dialog: MatDialog - ) { + constructor() { + const authenticationService = this.authenticationService; + this.profileData = authenticationService.getCredentials(); } diff --git a/src/app/reports/common-resolvers/reports.resolver.ts b/src/app/reports/common-resolvers/reports.resolver.ts index c17d9fe348..400e586007 100644 --- a/src/app/reports/common-resolvers/reports.resolver.ts +++ b/src/app/reports/common-resolvers/reports.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { ReportsService } from '../reports.service'; */ @Injectable() export class ReportsResolver { + private reportsService = inject(ReportsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ReportsService} reportsService Reports service. */ - constructor(private reportsService: ReportsService) {} + constructor() {} /** * Returns the reports data. diff --git a/src/app/reports/common-resolvers/run-report.resolver.ts b/src/app/reports/common-resolvers/run-report.resolver.ts index 7de92cd337..4dd8069887 100644 --- a/src/app/reports/common-resolvers/run-report.resolver.ts +++ b/src/app/reports/common-resolvers/run-report.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { ReportsService } from '../reports.service'; */ @Injectable() export class RunReportResolver { + private reportsService = inject(ReportsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ReportsService} reportsService Reports service. */ - constructor(private reportsService: ReportsService) {} + constructor() {} /** * Returns the report parameters data. diff --git a/src/app/reports/reports.component.ts b/src/app/reports/reports.component.ts index b2057414f6..9aef759d6c 100644 --- a/src/app/reports/reports.component.ts +++ b/src/app/reports/reports.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -43,6 +43,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ReportsComponent implements OnInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Reports data. */ reportsData: any; /** Report category filter. */ @@ -61,16 +64,16 @@ export class ReportsComponent implements OnInit { /** Sorter for reports table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the reports data from `resolve`. * @param {ActivatedRoute} route Activated Route. * Prevents reuse of route parameter `filter`. * @param {Router} router: Router. */ - constructor( - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.router.routeReuseStrategy.shouldReuseRoute = () => false; this.route.data.subscribe((data: { reports: any }) => { this.reportsData = data.reports; diff --git a/src/app/reports/reports.service.ts b/src/app/reports/reports.service.ts index a3337e3508..2a51bb132e 100644 --- a/src/app/reports/reports.service.ts +++ b/src/app/reports/reports.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -18,10 +18,15 @@ import { ChartData } from './common-models/chart-data.model'; providedIn: 'root' }) export class ReportsService { + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. */ - constructor(private http: HttpClient) {} + constructor() {} /** * @returns {Observable} Reports data diff --git a/src/app/reports/run-report/chart/chart.component.ts b/src/app/reports/run-report/chart/chart.component.ts index 0379ed8f14..ae09c89010 100644 --- a/src/app/reports/run-report/chart/chart.component.ts +++ b/src/app/reports/run-report/chart/chart.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnChanges, Input } from '@angular/core'; +import { Component, OnChanges, Input, inject } from '@angular/core'; /** Custom Services */ import { ReportsService } from '../../reports.service'; @@ -28,6 +28,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ChartComponent implements OnChanges { + private reportsService = inject(ReportsService); + /** Run Report Data */ @Input() dataObject: any; @@ -38,10 +40,13 @@ export class ChartComponent implements OnChanges { /** Data object for witching charts in view. */ inputData: ChartData; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ReportsService} reportsService Reports Service */ - constructor(private reportsService: ReportsService) {} + constructor() {} /** * Fetches run report data post changes in run report form. diff --git a/src/app/reports/run-report/pentaho/pentaho.component.html b/src/app/reports/run-report/pentaho/pentaho.component.html index f4ae97fb1b..cc955b2762 100644 --- a/src/app/reports/run-report/pentaho/pentaho.component.html +++ b/src/app/reports/run-report/pentaho/pentaho.component.html @@ -1 +1,3 @@ - +@if (!hideOutput) { + +} diff --git a/src/app/reports/run-report/pentaho/pentaho.component.ts b/src/app/reports/run-report/pentaho/pentaho.component.ts index 2bf2a6afd0..b2a32ca495 100644 --- a/src/app/reports/run-report/pentaho/pentaho.component.ts +++ b/src/app/reports/run-report/pentaho/pentaho.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnChanges, Input } from '@angular/core'; +import { Component, OnChanges, Input, inject } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; /** Custom Services */ @@ -20,6 +20,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class PentahoComponent implements OnChanges { + private sanitizer = inject(DomSanitizer); + private reportsService = inject(ReportsService); + private settingsService = inject(SettingsService); + private progressBarService = inject(ProgressBarService); + /** Run Report Data */ @Input() dataObject: any; @@ -28,17 +33,15 @@ export class PentahoComponent implements OnChanges { /** trusted resource url for pentaho output */ pentahoUrl: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {DomSanitizer} sanitizer DOM Sanitizer * @param {ReportsService} reportsService Reports Service * @param {SettingsService} settingsService Settings Service */ - constructor( - private sanitizer: DomSanitizer, - private reportsService: ReportsService, - private settingsService: SettingsService, - private progressBarService: ProgressBarService - ) {} + constructor() {} /** * Fetches run report data post changes in run report form. diff --git a/src/app/reports/run-report/run-report.component.ts b/src/app/reports/run-report/run-report.component.ts index d6818b0147..7dbc0a3d69 100644 --- a/src/app/reports/run-report/run-report.component.ts +++ b/src/app/reports/run-report/run-report.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { UntypedFormControl, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; @@ -42,6 +42,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RunReportComponent implements OnInit { + private route = inject(ActivatedRoute); + private reportsService = inject(ReportsService); + private settingsService = inject(SettingsService); + private alertService = inject(AlertService); + private dateUtils = inject(Dates); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -80,6 +86,9 @@ export class RunReportComponent implements OnInit { isProcessing = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches report specifications from route params and retrieves report parameters data from `resolve`. * @param {ActivatedRoute} route ActivatedRoute. @@ -87,13 +96,7 @@ export class RunReportComponent implements OnInit { * @param {SettingsService} settingsService Settings Service * @param {Dates} dateUtils Date Utils */ - constructor( - private route: ActivatedRoute, - private reportsService: ReportsService, - private settingsService: SettingsService, - private alertService: AlertService, - private dateUtils: Dates - ) { + constructor() { this.report.name = this.route.snapshot.params['name']; this.route.queryParams.subscribe((queryParams: { type: any; id: any }) => { this.report.type = queryParams.type; diff --git a/src/app/reports/run-report/table-and-sms/table-and-sms.component.html b/src/app/reports/run-report/table-and-sms/table-and-sms.component.html index 2da12c5464..5d15003d3a 100644 --- a/src/app/reports/run-report/table-and-sms/table-and-sms.component.html +++ b/src/app/reports/run-report/table-and-sms/table-and-sms.component.html @@ -1,65 +1,79 @@ - - - - {{ 'labels.buttons.Export CSV' | translate }} - - - {{ 'labels.buttons.Export XLS' | translate }} - - - - - - - - {{ column }} - - {{ toDecimal(param.row[i]) }} - {{ param.row[i] }} - - + @if (!hideOutput && !toBeExportedToRepo) { + + @if (dataObject.report.type === 'Table') { + + + {{ 'labels.buttons.Export CSV' | translate }} + + + {{ 'labels.buttons.Export XLS' | translate }} + + + } + + + @for (column of displayedColumns; track column; let i = $index) { + + + {{ column }} + + @if (isDecimal(i)) { + {{ toDecimal(param.row[i]) }} + } + @if (!isDecimal(i)) { + {{ param.row[i] }} + } + + + + } + + + + + + + + + {{ 'labels.text.No report data was generated' | translate }} - - - - + + } - + @if (!hideOutput && toBeExportedToRepo) { + - {{ 'labels.text.No report data was generated' | translate }} + {{ 'labels.text.The report request' | translate }} - + } - - - - {{ 'labels.text.The report request' | translate }} + @if (hideOutput) { + + - - - - - + } - - - {{ 'labels.buttons.Back' | translate }} - - + @if (!hideOutput) { + + + {{ 'labels.buttons.Back' | translate }} + + + } diff --git a/src/app/reports/run-report/table-and-sms/table-and-sms.component.ts b/src/app/reports/run-report/table-and-sms/table-and-sms.component.ts index 88cdddc31f..4e6f9d0c98 100644 --- a/src/app/reports/run-report/table-and-sms/table-and-sms.component.ts +++ b/src/app/reports/run-report/table-and-sms/table-and-sms.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Input, ViewChild, OnChanges } from '@angular/core'; +import { Component, Input, ViewChild, OnChanges, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatTableDataSource, @@ -14,7 +14,7 @@ import { MatRowDef, MatRow } from '@angular/material/table'; -import { DecimalPipe, NgIf, NgFor } from '@angular/common'; +import { DecimalPipe } from '@angular/common'; /** Custom Servies */ import { ReportsService } from '../../reports.service'; @@ -54,6 +54,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class TableAndSmsComponent implements OnChanges { + private reportsService = inject(ReportsService); + dialog = inject(MatDialog); + private decimalPipe = inject(DecimalPipe); + private progressBarService = inject(ProgressBarService); + /** Run Report Data */ @Input() dataObject: any; @@ -73,16 +78,14 @@ export class TableAndSmsComponent implements OnChanges { /** Paginator for run-report table. */ @ViewChild(MatPaginator) paginator: MatPaginator; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ReportsService} reportsService Reports Service * @param {DecimalPipe} decimalPipe Decimal Pipe */ - constructor( - private reportsService: ReportsService, - public dialog: MatDialog, - private decimalPipe: DecimalPipe, - private progressBarService: ProgressBarService - ) {} + constructor() {} /** * Fetches run report data post changes in run report form. diff --git a/src/app/savings/common-resolvers/saving-documents.resolver.ts b/src/app/savings/common-resolvers/saving-documents.resolver.ts index 3cc0ad858c..7f476bd14f 100644 --- a/src/app/savings/common-resolvers/saving-documents.resolver.ts +++ b/src/app/savings/common-resolvers/saving-documents.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; import { Observable } from 'rxjs'; import { SavingsService } from '../savings.service'; @@ -7,10 +7,15 @@ import { SavingsService } from '../savings.service'; providedIn: 'root' }) export class SavingDocumentsResolver { + private savingsService = inject(SavingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SavingsService} savingsService Savings service. */ - constructor(private savingsService: SavingsService) {} + constructor() {} /** * Returns the Savings data. diff --git a/src/app/savings/common-resolvers/saving-notes.resolver.ts b/src/app/savings/common-resolvers/saving-notes.resolver.ts index 7bcddb1ed8..326b8483f0 100644 --- a/src/app/savings/common-resolvers/saving-notes.resolver.ts +++ b/src/app/savings/common-resolvers/saving-notes.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; import { Observable } from 'rxjs'; import { SavingsService } from '../savings.service'; @@ -7,10 +7,15 @@ import { SavingsService } from '../savings.service'; providedIn: 'root' }) export class SavingNotesResolver { + private savingsService = inject(SavingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SavingsService} savingsService Savings service. */ - constructor(private savingsService: SavingsService) {} + constructor() {} /** * Returns the Savings data. diff --git a/src/app/savings/common-resolvers/savings-account-actions.resolver.ts b/src/app/savings/common-resolvers/savings-account-actions.resolver.ts index cabbc7a740..b4ab44ec37 100644 --- a/src/app/savings/common-resolvers/savings-account-actions.resolver.ts +++ b/src/app/savings/common-resolvers/savings-account-actions.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SavingsService } from '../savings.service'; */ @Injectable() export class SavingsAccountActionsResolver { + private savingsService = inject(SavingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SavingsService} SavingsService Savings service. */ - constructor(private savingsService: SavingsService) {} + constructor() {} /** * Returns the Savings account actions data. diff --git a/src/app/savings/common-resolvers/savings-account-and-template.resolver.ts b/src/app/savings/common-resolvers/savings-account-and-template.resolver.ts index 2e76f3b834..e1fbf2d6a8 100644 --- a/src/app/savings/common-resolvers/savings-account-and-template.resolver.ts +++ b/src/app/savings/common-resolvers/savings-account-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SavingsService } from '../savings.service'; */ @Injectable() export class SavingsAccountAndTemplateResolver { + private savingsService = inject(SavingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SavingsService} SavingsService Savings service. */ - constructor(private savingsService: SavingsService) {} + constructor() {} /** * Returns the Savings Account data and template. diff --git a/src/app/savings/common-resolvers/savings-account-charge.resolver.ts b/src/app/savings/common-resolvers/savings-account-charge.resolver.ts index 0fef92e1e3..395c454043 100644 --- a/src/app/savings/common-resolvers/savings-account-charge.resolver.ts +++ b/src/app/savings/common-resolvers/savings-account-charge.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SavingsService } from '../savings.service'; */ @Injectable() export class SavingsAccountChargeResolver { + private savingsService = inject(SavingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SavingsService} SavingsService Savings service. */ - constructor(private savingsService: SavingsService) {} + constructor() {} /** * Returns the Savings Account Charge data. diff --git a/src/app/savings/common-resolvers/savings-account-template.resolver.ts b/src/app/savings/common-resolvers/savings-account-template.resolver.ts index 6ad4c31175..8bfef3538b 100644 --- a/src/app/savings/common-resolvers/savings-account-template.resolver.ts +++ b/src/app/savings/common-resolvers/savings-account-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SavingsService } from '../savings.service'; */ @Injectable() export class SavingsAccountTemplateResolver { + private savingsService = inject(SavingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {savingsService} SavingsService Savings service. */ - constructor(private savingsService: SavingsService) {} + constructor() {} /** * Returns the Shares Account Template. diff --git a/src/app/savings/common-resolvers/savings-account-transaction-template.resolver.ts b/src/app/savings/common-resolvers/savings-account-transaction-template.resolver.ts index e21566a8e3..603538eb77 100644 --- a/src/app/savings/common-resolvers/savings-account-transaction-template.resolver.ts +++ b/src/app/savings/common-resolvers/savings-account-transaction-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SavingsService } from '../savings.service'; */ @Injectable() export class SavingsAccountTransactionTemplateResolver { + private savingsService = inject(SavingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SavingsService} SavingsService Savings service. */ - constructor(private savingsService: SavingsService) {} + constructor() {} /** * Returns the Savings Account Transaction Template data. diff --git a/src/app/savings/common-resolvers/savings-account-transaction.resolver.ts b/src/app/savings/common-resolvers/savings-account-transaction.resolver.ts index 538be0d02d..6173cc8a9a 100644 --- a/src/app/savings/common-resolvers/savings-account-transaction.resolver.ts +++ b/src/app/savings/common-resolvers/savings-account-transaction.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SavingsService } from '../savings.service'; */ @Injectable() export class SavingsAccountTransactionResolver { + private savingsService = inject(SavingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SavingsService} SavingsService Savings service. */ - constructor(private savingsService: SavingsService) {} + constructor() {} /** * Returns the Savings Account Transaction data. diff --git a/src/app/savings/common-resolvers/savings-account-view.resolver.ts b/src/app/savings/common-resolvers/savings-account-view.resolver.ts index b95cadcbac..41107ee0d5 100644 --- a/src/app/savings/common-resolvers/savings-account-view.resolver.ts +++ b/src/app/savings/common-resolvers/savings-account-view.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SavingsService } from '../savings.service'; */ @Injectable() export class SavingsAccountViewResolver { + private savingsService = inject(SavingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SavingsService} SavingsService Savings service. */ - constructor(private savingsService: SavingsService) {} + constructor() {} /** * Returns the Savings Account data. diff --git a/src/app/savings/common-resolvers/savings-datatable.resolver.ts b/src/app/savings/common-resolvers/savings-datatable.resolver.ts index 6ea418d8e1..1392ff8673 100644 --- a/src/app/savings/common-resolvers/savings-datatable.resolver.ts +++ b/src/app/savings/common-resolvers/savings-datatable.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SavingsService } from '../savings.service'; */ @Injectable() export class SavingsDatatableResolver { + private savingsService = inject(SavingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SavingsService} SavingsService Savings service. */ - constructor(private savingsService: SavingsService) {} + constructor() {} /** * Returns the Savings Account's Datatable data. diff --git a/src/app/savings/common-resolvers/savings-datatables.resolver.ts b/src/app/savings/common-resolvers/savings-datatables.resolver.ts index a68cdb06fa..13e6b1fc90 100644 --- a/src/app/savings/common-resolvers/savings-datatables.resolver.ts +++ b/src/app/savings/common-resolvers/savings-datatables.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SavingsService } from '../savings.service'; */ @Injectable() export class SavingsDatatablesResolver { + private savingsService = inject(SavingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SavingsService} SavingsService Savings service. */ - constructor(private savingsService: SavingsService) {} + constructor() {} /** * Returns the Saving Account's Datatables data. diff --git a/src/app/savings/common-resolvers/savings-transaction-reciept.resolver.ts b/src/app/savings/common-resolvers/savings-transaction-reciept.resolver.ts index f7feaaaa13..090fa6f7ce 100644 --- a/src/app/savings/common-resolvers/savings-transaction-reciept.resolver.ts +++ b/src/app/savings/common-resolvers/savings-transaction-reciept.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -14,14 +14,17 @@ import { SettingsService } from 'app/settings/settings.service'; */ @Injectable() export class SavingsTransactionRecieptResolver { + private reportsService = inject(ReportsService); + private settingsService = inject(SettingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ReportsService} reportsService Reports service. * @param {SettingsService} settingsService Settings Service. */ - constructor( - private reportsService: ReportsService, - private settingsService: SettingsService - ) {} + constructor() {} /** * Returns the Savings Transaction Reciept diff --git a/src/app/savings/common-resolvers/transaction-datatable.resolver.ts b/src/app/savings/common-resolvers/transaction-datatable.resolver.ts index 8799f9753f..f6b839bd2f 100644 --- a/src/app/savings/common-resolvers/transaction-datatable.resolver.ts +++ b/src/app/savings/common-resolvers/transaction-datatable.resolver.ts @@ -1,5 +1,5 @@ // Angular Imports -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; // rxjs Imports @@ -10,11 +10,16 @@ import { SavingsService } from '../savings.service'; @Injectable() export class TransactionDatatableResolver { + private savingsService = inject(SavingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * * @param {SavingsService} savingsService */ - constructor(private savingsService: SavingsService) {} + constructor() {} /** * Returns the Transactions Account's Datatable data. * @returns {Observable} diff --git a/src/app/savings/common-resolvers/transaction-datatables.resolver.ts b/src/app/savings/common-resolvers/transaction-datatables.resolver.ts index eef095be58..57199c8be5 100644 --- a/src/app/savings/common-resolvers/transaction-datatables.resolver.ts +++ b/src/app/savings/common-resolvers/transaction-datatables.resolver.ts @@ -1,5 +1,5 @@ // Angular Imports -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; // rxjs Imports @@ -10,11 +10,16 @@ import { SavingsService } from '../savings.service'; @Injectable() export class TransactionDatatablesResolver { + private savingsService = inject(SavingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * * @param savingsService Savings Service */ - constructor(private savingsService: SavingsService) {} + constructor() {} /** * * @param route diff --git a/src/app/savings/create-savings-account/create-savings-account.component.html b/src/app/savings/create-savings-account/create-savings-account.component.html index cd98bc5586..e1fb0d9c4d 100644 --- a/src/app/savings/create-savings-account/create-savings-account.component.html +++ b/src/app/savings/create-savings-account/create-savings-account.component.html @@ -55,17 +55,18 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (savingsAccountFormValid) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/savings/create-savings-account/create-savings-account.component.ts b/src/app/savings/create-savings-account/create-savings-account.component.ts index e1511acd37..de41c24472 100644 --- a/src/app/savings/create-savings-account/create-savings-account.component.ts +++ b/src/app/savings/create-savings-account/create-savings-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; /** Custom Components */ @@ -37,6 +37,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateSavingsAccountComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private savingsService = inject(SavingsService); + private settingsService = inject(SettingsService); + /** Savings Account Template */ savingsAccountTemplate: any; /** Savings Account Product Template */ @@ -52,6 +58,9 @@ export class CreateSavingsAccountComponent { @ViewChild(SavingsAccountChargesStepComponent, { static: true }) savingsAccountChargesStep: SavingsAccountChargesStepComponent; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches savings account template from `resolve` * @param {ActivatedRoute} route Activated Route @@ -60,13 +69,7 @@ export class CreateSavingsAccountComponent { * @param {SavingsService} savingsService Savings Service * @param {SettingsService} settingsService Settings Service */ - constructor( - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private savingsService: SavingsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { savingsAccountTemplate: any }) => { this.savingsAccountTemplate = data.savingsAccountTemplate; }); diff --git a/src/app/savings/edit-savings-account/edit-savings-account.component.html b/src/app/savings/edit-savings-account/edit-savings-account.component.html index 2eaff20c6f..f0785d68b9 100644 --- a/src/app/savings/edit-savings-account/edit-savings-account.component.html +++ b/src/app/savings/edit-savings-account/edit-savings-account.component.html @@ -56,17 +56,18 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (savingsAccountFormValidAndNotPristine) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/savings/edit-savings-account/edit-savings-account.component.ts b/src/app/savings/edit-savings-account/edit-savings-account.component.ts index 015288e35c..9614fa219b 100644 --- a/src/app/savings/edit-savings-account/edit-savings-account.component.ts +++ b/src/app/savings/edit-savings-account/edit-savings-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; /** Custom Components */ @@ -37,6 +37,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditSavingsAccountComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private savingsService = inject(SavingsService); + private settingsService = inject(SettingsService); + /** Savings Account Template */ savingsAccountAndTemplate: any; /** Savings Account Product Template */ @@ -52,6 +58,9 @@ export class EditSavingsAccountComponent { @ViewChild(SavingsAccountChargesStepComponent, { static: true }) savingsAccountChargesStep: SavingsAccountChargesStepComponent; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches savings account template from `resolve` * @param {ActivatedRoute} route Activated Route @@ -60,13 +69,7 @@ export class EditSavingsAccountComponent { * @param {SavingsService} savingsService Savings Service * @param {SettingsService} settingsService Settings Service */ - constructor( - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private savingsService: SavingsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { savingsAccountAndTemplate: any }) => { this.savingsAccountAndTemplate = data.savingsAccountAndTemplate; }); diff --git a/src/app/savings/gsim-account/create-gsim-account/create-gsim-account.component.html b/src/app/savings/gsim-account/create-gsim-account/create-gsim-account.component.html index 9e101818cc..075dd6bd98 100644 --- a/src/app/savings/gsim-account/create-gsim-account/create-gsim-account.component.html +++ b/src/app/savings/gsim-account/create-gsim-account/create-gsim-account.component.html @@ -63,18 +63,19 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (savingsAccountFormValid) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/savings/gsim-account/create-gsim-account/create-gsim-account.component.ts b/src/app/savings/gsim-account/create-gsim-account/create-gsim-account.component.ts index 654b120bb9..c7f2074855 100644 --- a/src/app/savings/gsim-account/create-gsim-account/create-gsim-account.component.ts +++ b/src/app/savings/gsim-account/create-gsim-account/create-gsim-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; /** Custom Components */ @@ -39,6 +39,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateGsimAccountComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private savingsService = inject(SavingsService); + private settingsService = inject(SettingsService); + /** Savings Account Template */ savingsAccountTemplate: any; /** Savings Account Product Template */ @@ -61,6 +67,9 @@ export class CreateGsimAccountComponent { @ViewChild(SavingsActiveClientMembersComponent, { static: true }) savingsActiveClientMembers: SavingsActiveClientMembersComponent; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches savings account template from `resolve` * @param {ActivatedRoute} route Activated Route @@ -69,13 +78,7 @@ export class CreateGsimAccountComponent { * @param {SavingsService} savingsService Savings Service * @param {SettingsService} settingsService Settings Service */ - constructor( - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private savingsService: SavingsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { savingsAccountTemplate: any; groupsData: any }) => { this.savingsAccountTemplate = data.savingsAccountTemplate; this.dataSource = data.groupsData.activeClientMembers; diff --git a/src/app/savings/gsim-account/gsim-account.component.html b/src/app/savings/gsim-account/gsim-account.component.html index 3d9c70577e..8304c0d782 100644 --- a/src/app/savings/gsim-account/gsim-account.component.html +++ b/src/app/savings/gsim-account/gsim-account.component.html @@ -33,56 +33,61 @@ {{ 'labels.heading.GSIM Account Overview' | translate }} {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - + @if (element.status.active) { + + + + } + @if (element.status.active) { + + + + } + @if (element.status.submittedAndPendingApproval) { + + + + } + @if (!element.status.submittedAndPendingApproval && !element.status.active) { + + + + } + @if (!element.status.submittedAndPendingApproval && !element.status.active) { + + + + } diff --git a/src/app/savings/gsim-account/gsim-account.component.ts b/src/app/savings/gsim-account/gsim-account.component.ts index 25be3c3553..f7d3346bc9 100644 --- a/src/app/savings/gsim-account/gsim-account.component.ts +++ b/src/app/savings/gsim-account/gsim-account.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; import { @@ -15,7 +15,7 @@ import { MatRow } from '@angular/material/table'; import { ActivatedRoute, RouterLink } from '@angular/router'; -import { NgClass, NgIf } from '@angular/common'; +import { NgClass } from '@angular/common'; import { MatTooltip } from '@angular/material/tooltip'; import { StatusLookupPipe } from '../../pipes/status-lookup.pipe'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -46,6 +46,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GsimAccountComponent implements OnInit { + private route = inject(ActivatedRoute); + dialog = inject(MatDialog); + /** Columns to be displayed in charge overview table. */ displayedColumns: string[] = [ 'clientDetails', @@ -66,15 +69,15 @@ export class GsimAccountComponent implements OnInit { /** Paginator for charge overview table. */ @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the charge overview data from `resolve`. * @param {ActivatedRoute} route Activated Route. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private route: ActivatedRoute, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { gsimData: any; savingAccountData: any; groupsData: any }) => { this.gsimOverviewData = data.gsimData[0].childGSIMAccounts; this.savingAccountData = data.savingAccountData; diff --git a/src/app/savings/gsim-account/gsim-account.resolver.ts b/src/app/savings/gsim-account/gsim-account.resolver.ts index ebe8d26b6d..d08df90221 100644 --- a/src/app/savings/gsim-account/gsim-account.resolver.ts +++ b/src/app/savings/gsim-account/gsim-account.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SavingsService } from '../savings.service'; */ @Injectable() export class GSIMViewResolver { + private savingsService = inject(SavingsService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SavingsService} savingsService Savings service. */ - constructor(private savingsService: SavingsService) {} + constructor() {} /** * Returns the Savings Account data. diff --git a/src/app/savings/saving-account-actions/activate-savings-account/activate-savings-account.component.html b/src/app/savings/saving-account-actions/activate-savings-account/activate-savings-account.component.html index d4d0fb725d..0958b88b03 100644 --- a/src/app/savings/saving-account-actions/activate-savings-account/activate-savings-account.component.html +++ b/src/app/savings/saving-account-actions/activate-savings-account/activate-savings-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (activateSavingsAccountForm.controls.activatedOnDate.hasError('required')) { + + {{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/savings/saving-account-actions/activate-savings-account/activate-savings-account.component.ts b/src/app/savings/saving-account-actions/activate-savings-account/activate-savings-account.component.ts index e5b96869e4..86dfcba84c 100644 --- a/src/app/savings/saving-account-actions/activate-savings-account/activate-savings-account.component.ts +++ b/src/app/savings/saving-account-actions/activate-savings-account/activate-savings-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ActivateSavingsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private savingsService = inject(SavingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -30,6 +37,9 @@ export class ActivateSavingsAccountComponent implements OnInit { /** Savings Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SavingsService} savingsService Savings Service @@ -38,14 +48,7 @@ export class ActivateSavingsAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private savingsService: SavingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.snapshot.params['savingAccountId']; } diff --git a/src/app/savings/saving-account-actions/add-charge-savings-account/add-charge-savings-account.component.html b/src/app/savings/saving-account-actions/add-charge-savings-account/add-charge-savings-account.component.html index bad85f108f..26dc79cd67 100644 --- a/src/app/savings/saving-account-actions/add-charge-savings-account/add-charge-savings-account.component.html +++ b/src/app/savings/saving-account-actions/add-charge-savings-account/add-charge-savings-account.component.html @@ -6,88 +6,102 @@ {{ 'labels.inputs.Charge' | translate }} - - {{ savingsCharge.name + ' (' + savingsCharge.currency.name + ')' }} - - - - {{ 'labels.inputs.Charge' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - {{ 'labels.inputs.Amount' | translate }} - - - {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Charge Calculation' | translate }} - - - {{ chargeCalculation.value }} - - - - - - {{ 'labels.inputs.Charge time type' | translate }} - - - {{ chargeTime.value }} + @for (savingsCharge of savingsChargeOptions; track savingsCharge) { + + {{ savingsCharge.name + ' (' + savingsCharge.currency.name + ')' }} - - - - - {{ 'labels.inputs.Due for collection on' | translate }} - - - - - {{ 'labels.inputs.Due for collection on' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Due On' | translate }} - - - - - {{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }} + } + + @if (savingsChargeForm.controls.chargeId.hasError('required')) { + + {{ 'labels.inputs.Charge' | translate }} {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} - + } + - - {{ 'labels.inputs.Repeats Every' | translate }} - - - + @if (chargeDetails) { + + + {{ 'labels.inputs.Amount' | translate }} + + @if (savingsChargeForm.controls.amount.hasError('required')) { + + {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Charge Calculation' | translate }} + + @for (chargeCalculation of chargeDetails.chargeCalculationTypeOptions; track chargeCalculation) { + + {{ chargeCalculation.value }} + + } + + + + {{ 'labels.inputs.Charge time type' | translate }} + + @for (chargeTime of chargeDetails.chargeTimeTypeOptions; track chargeTime) { + + {{ chargeTime.value }} + + } + + + @if (savingsChargeForm.contains('dueDate')) { + + {{ 'labels.inputs.Due for collection on' | translate }} + + + + @if (savingsChargeForm.controls.dueDate.hasError('required')) { + + {{ 'labels.inputs.Due for collection on' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + @if (savingsChargeForm.contains('feeOnMonthDay')) { + + {{ 'labels.inputs.Due On' | translate }} + + + + @if (savingsChargeForm.controls.feeOnMonthDay.hasError('required')) { + + {{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + @if (savingsChargeForm.contains('feeInterval')) { + + {{ 'labels.inputs.Repeats Every' | translate }} + + + } + + } diff --git a/src/app/savings/saving-account-actions/add-charge-savings-account/add-charge-savings-account.component.ts b/src/app/savings/saving-account-actions/add-charge-savings-account/add-charge-savings-account.component.ts index aee8073fec..d3c258e0d9 100644 --- a/src/app/savings/saving-account-actions/add-charge-savings-account/add-charge-savings-account.component.ts +++ b/src/app/savings/saving-account-actions/add-charge-savings-account/add-charge-savings-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -27,6 +27,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AddChargeSavingsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private savingsService = inject(SavingsService); + private settingsService = inject(SettingsService); + /** Minimum Due Date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum Due Date allowed. */ @@ -40,6 +47,9 @@ export class AddChargeSavingsAccountComponent implements OnInit { /** charge details */ chargeDetails: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves charge template data from `resolve` * @param {FormBuilder} formBuilder Form Builder @@ -49,14 +59,7 @@ export class AddChargeSavingsAccountComponent implements OnInit { * @param {SavingsService} savingsService Savings Service * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private savingsService: SavingsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { savingsAccountActionData: any }) => { this.savingsChargeOptions = data.savingsAccountActionData.chargeOptions; }); diff --git a/src/app/savings/saving-account-actions/apply-annual-fees-savings-account/apply-annual-fees-savings-account.component.html b/src/app/savings/saving-account-actions/apply-annual-fees-savings-account/apply-annual-fees-savings-account.component.html index b201c347c6..150f0f33f7 100644 --- a/src/app/savings/saving-account-actions/apply-annual-fees-savings-account/apply-annual-fees-savings-account.component.html +++ b/src/app/savings/saving-account-actions/apply-annual-fees-savings-account/apply-annual-fees-savings-account.component.html @@ -15,19 +15,23 @@ /> - - {{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (applyAnnualFeesForm.controls.dueDate.hasError('required')) { + + {{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Amount' | translate }} - - {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (applyAnnualFeesForm.controls.amount.hasError('required')) { + + {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/savings/saving-account-actions/apply-annual-fees-savings-account/apply-annual-fees-savings-account.component.ts b/src/app/savings/saving-account-actions/apply-annual-fees-savings-account/apply-annual-fees-savings-account.component.ts index a2e195ca08..fa63957e23 100644 --- a/src/app/savings/saving-account-actions/apply-annual-fees-savings-account/apply-annual-fees-savings-account.component.ts +++ b/src/app/savings/saving-account-actions/apply-annual-fees-savings-account/apply-annual-fees-savings-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ApplyAnnualFeesSavingsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private savingsService = inject(SavingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -34,6 +41,9 @@ export class ApplyAnnualFeesSavingsAccountComponent implements OnInit { /** Savings Account Data */ savingsAccountData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SavingsService} savingsService Savings Service @@ -42,14 +52,7 @@ export class ApplyAnnualFeesSavingsAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private savingsService: SavingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.snapshot.params['savingAccountId']; this.route.data.subscribe((data: { savingsAccountActionData: any }) => { this.savingsAccountData = data.savingsAccountActionData; diff --git a/src/app/savings/saving-account-actions/approve-savings-account/approve-savings-account.component.html b/src/app/savings/saving-account-actions/approve-savings-account/approve-savings-account.component.html index d42204f99a..38837153e4 100644 --- a/src/app/savings/saving-account-actions/approve-savings-account/approve-savings-account.component.html +++ b/src/app/savings/saving-account-actions/approve-savings-account/approve-savings-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Approved On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (approveSavingsAccountForm.controls.approvedOnDate.hasError('required')) { + + {{ 'labels.inputs.Approved On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/savings/saving-account-actions/approve-savings-account/approve-savings-account.component.ts b/src/app/savings/saving-account-actions/approve-savings-account/approve-savings-account.component.ts index 9a3c59b9cd..4420372b51 100644 --- a/src/app/savings/saving-account-actions/approve-savings-account/approve-savings-account.component.ts +++ b/src/app/savings/saving-account-actions/approve-savings-account/approve-savings-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ApproveSavingsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private savingsService = inject(SavingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class ApproveSavingsAccountComponent implements OnInit { /** Savings Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SavingsService} savingsService Savings Service @@ -40,14 +50,7 @@ export class ApproveSavingsAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private savingsService: SavingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.snapshot.params['savingAccountId']; } diff --git a/src/app/savings/saving-account-actions/close-savings-account/close-savings-account.component.html b/src/app/savings/saving-account-actions/close-savings-account/close-savings-account.component.html index 3fa57d3a7f..453922ad21 100644 --- a/src/app/savings/saving-account-actions/close-savings-account/close-savings-account.component.html +++ b/src/app/savings/saving-account-actions/close-savings-account/close-savings-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeSavingsAccountForm.controls.closedOnDate.hasError('required')) { + + {{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -29,56 +31,67 @@ {{ 'labels.inputs.Is Interest Posting required on closure date' | translate }}? - - - {{ 'labels.inputs.Transaction Amount' | translate }} - - - - - {{ 'labels.inputs.Payment Type' | translate }} - - - {{ paymentType.name }} - - - - - - - - - {{ 'labels.inputs.Show Payment Details' | translate }} - - - + @if (closeSavingsAccountForm.controls['withdrawBalance'].value) { + + @if (closeSavingsAccountForm.controls['amount']) { + + {{ 'labels.inputs.Transaction Amount' | translate }} + + + } + @if (closeSavingsAccountForm.controls['paymentTypeId']) { + + {{ 'labels.inputs.Payment Type' | translate }} + + @for (paymentType of paymentTypeOptions; track paymentType) { + + {{ paymentType.name }} + + } + + + } + + + + + {{ 'labels.inputs.Show Payment Details' | translate }} + + + + + @if (closeSavingsAccountForm.controls['accountNumber']) { + + {{ 'labels.inputs.Account Number' | translate }} + + + } + @if (closeSavingsAccountForm.controls['checkNumber']) { + + {{ 'labels.inputs.Cheque' | translate }} + + + } + @if (closeSavingsAccountForm.controls['routingCode']) { + + {{ 'labels.inputs.Routing Code' | translate }} + + + } + @if (closeSavingsAccountForm.controls['receiptNumber']) { + + {{ 'labels.inputs.Receipt Number' | translate }} + + + } + @if (closeSavingsAccountForm.controls['bankNumber']) { + + {{ 'labels.inputs.Bank' | translate }} + + + } - - - {{ 'labels.inputs.Account Number' | translate }} - - - - - {{ 'labels.inputs.Cheque' | translate }} - - - - - {{ 'labels.inputs.Routing Code' | translate }} - - - - - {{ 'labels.inputs.Receipt Number' | translate }} - - - - - {{ 'labels.inputs.Bank' | translate }} - - - + } {{ 'labels.inputs.Note' | translate }} diff --git a/src/app/savings/saving-account-actions/close-savings-account/close-savings-account.component.ts b/src/app/savings/saving-account-actions/close-savings-account/close-savings-account.component.ts index b0e0761d26..d59de3ff57 100644 --- a/src/app/savings/saving-account-actions/close-savings-account/close-savings-account.component.ts +++ b/src/app/savings/saving-account-actions/close-savings-account/close-savings-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -33,6 +33,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CloseSavingsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private savingsService = inject(SavingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -48,6 +55,9 @@ export class CloseSavingsAccountComponent implements OnInit { /** Transaction Amount */ transactionAmount: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SavingsService} savingsService Savings Service @@ -56,14 +66,7 @@ export class CloseSavingsAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private savingsService: SavingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { savingsAccountActionData: any }) => { this.paymentTypeOptions = data.savingsAccountActionData[0].paymentTypeOptions; this.transactionAmount = data.savingsAccountActionData[1].summary.accountBalance; diff --git a/src/app/savings/saving-account-actions/manage-savings-account/manage-savings-account.component.html b/src/app/savings/saving-account-actions/manage-savings-account/manage-savings-account.component.html index 0d66b0e7ab..6dd9ef8299 100644 --- a/src/app/savings/saving-account-actions/manage-savings-account/manage-savings-account.component.html +++ b/src/app/savings/saving-account-actions/manage-savings-account/manage-savings-account.component.html @@ -1,52 +1,63 @@ - {{ 'labels.heading.Hold Amount' | translate }} - {{ - 'labels.heading.Block Savings Account' | translate - }} + @if (transactionType.holdamount) { + {{ 'labels.heading.Hold Amount' | translate }} + } + @if (transactionType.blockaccount) { + {{ 'labels.heading.Block Savings Account' | translate }} + } {{ 'labels.inputs.Reason' | translate }} - - {{ codeValue.name }} - + @for (codeValue of reasonOptions; track codeValue) { + + {{ codeValue.name }} + + } - - {{ 'labels.inputs.Reason' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (manageSavingsAccountForm.controls.reasonForBlock.hasError('required')) { + + {{ 'labels.inputs.Reason' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Transaction Date' | translate }} - - - - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (transactionType.holdamount) { + + {{ 'labels.inputs.Transaction Date' | translate }} + + + + @if (manageSavingsAccountForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - + @if (transactionType.holdamount) { + + + } diff --git a/src/app/savings/saving-account-actions/manage-savings-account/manage-savings-account.component.ts b/src/app/savings/saving-account-actions/manage-savings-account/manage-savings-account.component.ts index 1c544b2606..e353c66c71 100644 --- a/src/app/savings/saving-account-actions/manage-savings-account/manage-savings-account.component.ts +++ b/src/app/savings/saving-account-actions/manage-savings-account/manage-savings-account.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -30,6 +30,14 @@ interface TransactionType { ] }) export class ManageSavingsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private savingsService = inject(SavingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private systemService = inject(SystemService); + private settingsService = inject(SettingsService); + @Input() currency: Currency; /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); @@ -50,6 +58,9 @@ export class ManageSavingsAccountComponent implements OnInit { blockwithdrawal: false }; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SavingsService} savingsService Savings Service @@ -58,15 +69,7 @@ export class ManageSavingsAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private savingsService: SavingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private systemService: SystemService, - private settingsService: SettingsService - ) { + constructor() { this.transactionCommand = this.route.snapshot.params['name'].toLowerCase().replaceAll(' ', ''); this.transactionType[this.transactionCommand] = true; this.savingAccountId = this.route.snapshot.params['savingAccountId']; diff --git a/src/app/savings/saving-account-actions/post-interest-as-on-savings-account/post-interest-as-on-savings-account.component.html b/src/app/savings/saving-account-actions/post-interest-as-on-savings-account/post-interest-as-on-savings-account.component.html index ab4680ba9a..059ef8f3b9 100644 --- a/src/app/savings/saving-account-actions/post-interest-as-on-savings-account/post-interest-as-on-savings-account.component.html +++ b/src/app/savings/saving-account-actions/post-interest-as-on-savings-account/post-interest-as-on-savings-account.component.html @@ -14,10 +14,12 @@ /> - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (postInterestSavingsAccountForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/savings/saving-account-actions/post-interest-as-on-savings-account/post-interest-as-on-savings-account.component.ts b/src/app/savings/saving-account-actions/post-interest-as-on-savings-account/post-interest-as-on-savings-account.component.ts index 23d11d8ff6..a403b4d2fa 100644 --- a/src/app/savings/saving-account-actions/post-interest-as-on-savings-account/post-interest-as-on-savings-account.component.ts +++ b/src/app/savings/saving-account-actions/post-interest-as-on-savings-account/post-interest-as-on-savings-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class PostInterestAsOnSavingsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private savingsService = inject(SavingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -30,6 +37,9 @@ export class PostInterestAsOnSavingsAccountComponent implements OnInit { /** Savings Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SavingsService} savingsService Savings Service @@ -38,14 +48,7 @@ export class PostInterestAsOnSavingsAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private savingsService: SavingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.snapshot.params['savingAccountId']; } diff --git a/src/app/savings/saving-account-actions/reject-savings-account/reject-savings-account.component.html b/src/app/savings/saving-account-actions/reject-savings-account/reject-savings-account.component.html index 22750700cd..c9216fabeb 100644 --- a/src/app/savings/saving-account-actions/reject-savings-account/reject-savings-account.component.html +++ b/src/app/savings/saving-account-actions/reject-savings-account/reject-savings-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Rejected On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (rejectSavingsAccountForm.controls.rejectedOnDate.hasError('required')) { + + {{ 'labels.inputs.Rejected On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/savings/saving-account-actions/reject-savings-account/reject-savings-account.component.ts b/src/app/savings/saving-account-actions/reject-savings-account/reject-savings-account.component.ts index 82526ca861..e3d845c79d 100644 --- a/src/app/savings/saving-account-actions/reject-savings-account/reject-savings-account.component.ts +++ b/src/app/savings/saving-account-actions/reject-savings-account/reject-savings-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RejectSavingsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private savingsService = inject(SavingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class RejectSavingsAccountComponent implements OnInit { /** Savings Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SavingsService} savingsService Savings Service @@ -40,14 +50,7 @@ export class RejectSavingsAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private savingsService: SavingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.snapshot.params['savingAccountId']; } diff --git a/src/app/savings/saving-account-actions/saving-account-actions.component.html b/src/app/savings/saving-account-actions/saving-account-actions.component.html index ff99afec42..a857dbca17 100644 --- a/src/app/savings/saving-account-actions/saving-account-actions.component.html +++ b/src/app/savings/saving-account-actions/saving-account-actions.component.html @@ -1,23 +1,39 @@ - - - - - - - - - - - - - - +@if (actions['Approve']) { + +} +@if (actions['Reject']) { + +} +@if (actions['Activate']) { + +} +@if (actions['Undo Approval']) { + +} +@if (actions['Post Interest As On']) { + +} +@if (actions['Assign Staff']) { + +} +@if (actions['Unassign Staff']) { + +} +@if (actions['Withdrawn by Client']) { + +} +@if (actions['Add Charge']) { + +} +@if (actions['Withdrawal'] || actions['Deposit']) { + +} +@if (actions['Close']) { + +} +@if (actions['Apply Annual Fees']) { + +} +@if (actions['Hold Amount'] || actions['Block Account'] || actions['Block Deposit'] || actions['Block Withdrawal']) { + +} diff --git a/src/app/savings/saving-account-actions/saving-account-actions.component.ts b/src/app/savings/saving-account-actions/saving-account-actions.component.ts index e5f6fa8c48..19af4f174c 100644 --- a/src/app/savings/saving-account-actions/saving-account-actions.component.ts +++ b/src/app/savings/saving-account-actions/saving-account-actions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Currency } from 'app/shared/models/general.model'; import { ApproveSavingsAccountComponent } from './approve-savings-account/approve-savings-account.component'; @@ -42,6 +42,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingAccountActionsComponent { + private route = inject(ActivatedRoute); + /** Flag object to store possible actions and render appropriate UI to the user */ actions: { Approve: boolean; @@ -89,10 +91,13 @@ export class SavingAccountActionsComponent { currency: Currency; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { savingsAccountActionData: any }) => { if (data.savingsAccountActionData) { this.currency = data.savingsAccountActionData.currency; diff --git a/src/app/savings/saving-account-actions/savings-account-assign-staff/savings-account-assign-staff.component.html b/src/app/savings/saving-account-actions/savings-account-assign-staff/savings-account-assign-staff.component.html index 89fc1679de..d50f24fffa 100644 --- a/src/app/savings/saving-account-actions/savings-account-assign-staff/savings-account-assign-staff.component.html +++ b/src/app/savings/saving-account-actions/savings-account-assign-staff/savings-account-assign-staff.component.html @@ -6,9 +6,11 @@ {{ 'labels.inputs.To Savings Officer' | translate }} - - {{ officer.displayName }} - + @for (officer of fieldOfficerData; track officer) { + + {{ officer.displayName }} + + } @@ -24,10 +26,12 @@ /> - - {{ 'labels.inputs.Assignment Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (savingsAssignStaffForm.controls.assignmentDate.hasError('required')) { + + {{ 'labels.inputs.Assignment Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/savings/saving-account-actions/savings-account-assign-staff/savings-account-assign-staff.component.ts b/src/app/savings/saving-account-actions/savings-account-assign-staff/savings-account-assign-staff.component.ts index 510c86992b..ee87ef5601 100644 --- a/src/app/savings/saving-account-actions/savings-account-assign-staff/savings-account-assign-staff.component.ts +++ b/src/app/savings/saving-account-actions/savings-account-assign-staff/savings-account-assign-staff.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingsAccountAssignStaffComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private savingsService = inject(SavingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -34,6 +41,9 @@ export class SavingsAccountAssignStaffComponent implements OnInit { /** Savings Account Data */ savingsAccountData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SavingsService} savingsService Savings Service @@ -42,14 +52,7 @@ export class SavingsAccountAssignStaffComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private savingsService: SavingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.snapshot.params['savingAccountId']; this.route.data.subscribe((data: { savingsAccountActionData: any }) => { this.savingsAccountData = data.savingsAccountActionData; diff --git a/src/app/savings/saving-account-actions/savings-account-transactions/savings-account-transactions.component.html b/src/app/savings/saving-account-actions/savings-account-transactions/savings-account-transactions.component.html index 37303a661a..292aa19400 100644 --- a/src/app/savings/saving-account-actions/savings-account-transactions/savings-account-transactions.component.html +++ b/src/app/savings/saving-account-actions/savings-account-transactions/savings-account-transactions.component.html @@ -1,11 +1,15 @@ - - {{ 'labels.heading.Withdraw Money From Saving Account' | translate }} - - - {{ 'labels.heading.Deposit Money To Saving Account' | translate }} - + @if (transactionType.withdrawal) { + + {{ 'labels.heading.Withdraw Money From Saving Account' | translate }} + + } + @if (transactionType.deposit) { + + {{ 'labels.heading.Deposit Money To Saving Account' | translate }} + + } @@ -22,10 +26,12 @@ /> - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (savingAccountTransactionForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentType.name }} - + @for (paymentType of paymentTypeOptions; track paymentType) { + + {{ paymentType.name }} + + } @@ -55,30 +63,40 @@ - - {{ 'labels.inputs.Account Number' | translate }} - - + @if (addPaymentDetailsFlag) { + + {{ 'labels.inputs.Account Number' | translate }} + + + } - - {{ 'labels.inputs.Cheque' | translate }} - - + @if (addPaymentDetailsFlag) { + + {{ 'labels.inputs.Cheque' | translate }} + + + } - - {{ 'labels.inputs.Routing Code' | translate }} - - + @if (addPaymentDetailsFlag) { + + {{ 'labels.inputs.Routing Code' | translate }} + + + } - - {{ 'labels.inputs.Receipt Number' | translate }} - - + @if (addPaymentDetailsFlag) { + + {{ 'labels.inputs.Receipt Number' | translate }} + + + } - - {{ 'labels.inputs.Bank' | translate }} - - + @if (addPaymentDetailsFlag) { + + {{ 'labels.inputs.Bank' | translate }} + + + } {{ 'labels.inputs.Notes' | translate }} diff --git a/src/app/savings/saving-account-actions/savings-account-transactions/savings-account-transactions.component.ts b/src/app/savings/saving-account-actions/savings-account-transactions/savings-account-transactions.component.ts index fd754247af..e23d7ec480 100644 --- a/src/app/savings/saving-account-actions/savings-account-transactions/savings-account-transactions.component.ts +++ b/src/app/savings/saving-account-actions/savings-account-transactions/savings-account-transactions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -34,6 +34,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingsAccountTransactionsComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private savingsService = inject(SavingsService); + private settingsService = inject(SettingsService); + /** Minimum Due Date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum Due Date allowed. */ @@ -58,6 +65,9 @@ export class SavingsAccountTransactionsComponent implements OnInit { savingAccountId: string; currency: Currency | null = null; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Saving Account transaction template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -67,14 +77,7 @@ export class SavingsAccountTransactionsComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private savingsService: SavingsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { savingsAccountActionData: any }) => { this.paymentTypeOptions = data.savingsAccountActionData.paymentTypeOptions; if (data.savingsAccountActionData.currency) { diff --git a/src/app/savings/saving-account-actions/savings-account-unassign-staff/savings-account-unassign-staff.component.html b/src/app/savings/saving-account-actions/savings-account-unassign-staff/savings-account-unassign-staff.component.html index 43eb265734..e4a6baa19b 100644 --- a/src/app/savings/saving-account-actions/savings-account-unassign-staff/savings-account-unassign-staff.component.html +++ b/src/app/savings/saving-account-actions/savings-account-unassign-staff/savings-account-unassign-staff.component.html @@ -14,10 +14,12 @@ /> - - {{ 'labels.inputs.Unassignment Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (savingsUnassignStaffForm.controls.unassignedDate.hasError('required')) { + + {{ 'labels.inputs.Unassignment Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/savings/saving-account-actions/savings-account-unassign-staff/savings-account-unassign-staff.component.ts b/src/app/savings/saving-account-actions/savings-account-unassign-staff/savings-account-unassign-staff.component.ts index 9f75abb96e..85f701ff09 100644 --- a/src/app/savings/saving-account-actions/savings-account-unassign-staff/savings-account-unassign-staff.component.ts +++ b/src/app/savings/saving-account-actions/savings-account-unassign-staff/savings-account-unassign-staff.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingsAccountUnassignStaffComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private savingsService = inject(SavingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -30,6 +37,9 @@ export class SavingsAccountUnassignStaffComponent implements OnInit { /** Savings Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SavingsService} savingsService Savings Service @@ -38,14 +48,7 @@ export class SavingsAccountUnassignStaffComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private savingsService: SavingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.snapshot.params['savingAccountId']; } diff --git a/src/app/savings/saving-account-actions/undo-approval-savings-account/undo-approval-savings-account.component.ts b/src/app/savings/saving-account-actions/undo-approval-savings-account/undo-approval-savings-account.component.ts index d033837c52..045454ead2 100644 --- a/src/app/savings/saving-account-actions/undo-approval-savings-account/undo-approval-savings-account.component.ts +++ b/src/app/savings/saving-account-actions/undo-approval-savings-account/undo-approval-savings-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,23 +21,26 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UndoApprovalSavingsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private savingsService = inject(SavingsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Undo Approval Savings Account form. */ undoApprovalSavingsAccountForm: UntypedFormGroup; /** Savings Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SavingsService} savingsService Savings Service * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private formBuilder: UntypedFormBuilder, - private savingsService: SavingsService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.accountId = this.route.snapshot.params['savingAccountId']; } diff --git a/src/app/savings/saving-account-actions/withdraw-by-client-savings-account/withdraw-by-client-savings-account.component.html b/src/app/savings/saving-account-actions/withdraw-by-client-savings-account/withdraw-by-client-savings-account.component.html index e1c8d594dd..a2e7882b47 100644 --- a/src/app/savings/saving-account-actions/withdraw-by-client-savings-account/withdraw-by-client-savings-account.component.html +++ b/src/app/savings/saving-account-actions/withdraw-by-client-savings-account/withdraw-by-client-savings-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Withdrawn On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (withdrawSavingsAccountForm.controls.withdrawnOnDate.hasError('required')) { + + {{ 'labels.inputs.Withdrawn On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/savings/saving-account-actions/withdraw-by-client-savings-account/withdraw-by-client-savings-account.component.ts b/src/app/savings/saving-account-actions/withdraw-by-client-savings-account/withdraw-by-client-savings-account.component.ts index defefd0a53..dbac1e8241 100644 --- a/src/app/savings/saving-account-actions/withdraw-by-client-savings-account/withdraw-by-client-savings-account.component.ts +++ b/src/app/savings/saving-account-actions/withdraw-by-client-savings-account/withdraw-by-client-savings-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class WithdrawByClientSavingsAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private savingsService = inject(SavingsService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class WithdrawByClientSavingsAccountComponent implements OnInit { /** Savings Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SavingsService} savingsService Savings Service @@ -40,14 +50,7 @@ export class WithdrawByClientSavingsAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private savingsService: SavingsService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.snapshot.params['savingAccountId']; } diff --git a/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.html b/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.html index fba5d8ef65..73601f161d 100644 --- a/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.html +++ b/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.html @@ -2,12 +2,11 @@ {{ 'labels.inputs.Charge' | translate }} - - {{ charge.name }} - + @for (charge of chargeData | chargesFilter: chargesDataSource : currencyCode.value; track charge) { + + {{ charge.name }} + + } @@ -18,110 +17,98 @@ - 0" - > - - {{ 'labels.inputs.Name' | translate }} - - {{ charge.name + ', ' + charge.currency.displaySymbol }} - - - - - {{ 'labels.inputs.Type' | translate }} - - {{ charge.chargeCalculationType.value }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ charge.amount | formatNumber }} - - - - - - - - {{ 'labels.inputs.Collected On' | translate }} - - {{ charge.chargeTimeType.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Date' | translate }} - - - {{ (charge.dueDate | dateFormat) || 'Unassigned' }} - - - {{ (charge.feeOnMonthDay | dateFormat) || 'Unassigned' }} - - 0) { + + + {{ 'labels.inputs.Name' | translate }} + + {{ charge.name + ', ' + charge.currency.displaySymbol }} + + + + {{ 'labels.inputs.Type' | translate }} + + {{ charge.chargeCalculationType.value }} + + + + {{ 'labels.inputs.Amount' | translate }} + + {{ charge.amount | formatNumber }} + + + + + + + {{ 'labels.inputs.Collected On' | translate }} + + {{ charge.chargeTimeType.value | translateKey: 'catalogs' }} + + + + {{ 'labels.inputs.Date' | translate }} + + @if (charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee') { + + {{ (charge.dueDate | dateFormat) || 'Unassigned' }} + + } + @if (charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee') { + + {{ (charge.feeOnMonthDay | dateFormat) || 'Unassigned' }} + + } + @if ( !( charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee' || charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee' ) - " - > - N/A - - N/A + } + @if ( charge.chargeTimeType.value === 'Weekly Fee' || charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee' || charge.chargeTimeType.value === 'Specified due date' - " - (click)="editChargeDate(charge)" - > - - - - - - - {{ 'labels.inputs.Repayments Every' | translate }} - - {{ charge.feeInterval }} - {{ 'labels.inputs.Not Provided' | translate }} - - - - - - - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - + ) { + + + + } + + + + {{ 'labels.inputs.Repayments Every' | translate }} + + @if (charge.feeInterval) { + {{ charge.feeInterval }} + } + @if (!charge.feeInterval) { + {{ 'labels.inputs.Not Provided' | translate }} + } + @if (charge.chargeTimeType.value === 'Weekly Fee' || charge.chargeTimeType.value === 'Monthly Fee') { + + + + } + + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + } diff --git a/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.ts b/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.ts index aae05c0994..7835045d23 100644 --- a/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.ts +++ b/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, OnChanges, Input } from '@angular/core'; +import { Component, OnInit, OnChanges, Input, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { UntypedFormControl } from '@angular/forms'; @@ -62,6 +62,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingsAccountChargesStepComponent implements OnInit, OnChanges { + private dialog = inject(MatDialog); + private dateUtils = inject(Dates); + private translateService = inject(TranslateService); + /** Savings Account Product Template */ @Input() savingsAccountProductTemplate: any; /** Savings Account Template */ @@ -102,14 +106,13 @@ export class SavingsAccountChargesStepComponent implements OnInit, OnChanges { 'name' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialog} dialog Mat Dialog */ - constructor( - private dialog: MatDialog, - private dateUtils: Dates, - private translateService: TranslateService - ) {} + constructor() {} ngOnInit() { if (this.savingsAccountTemplate) { diff --git a/src/app/savings/savings-account-stepper/savings-account-details-step/savings-account-details-step.component.html b/src/app/savings/savings-account-stepper/savings-account-details-step/savings-account-details-step.component.html index d97d4e8ffd..efa762ac92 100644 --- a/src/app/savings/savings-account-stepper/savings-account-details-step/savings-account-details-step.component.html +++ b/src/app/savings/savings-account-stepper/savings-account-details-step/savings-account-details-step.component.html @@ -3,9 +3,11 @@ {{ 'labels.inputs.Product Name' | translate }} - - {{ product.name }} - + @for (product of productData; track product) { + + {{ product.name }} + + } {{ 'labels.inputs.Product Name' | translate }} {{ 'labels.commons.is' | translate }} @@ -13,37 +15,45 @@ - - {{ 'labels.inputs.Submitted On' | translate }} - - - - - {{ 'labels.inputs.Submitted On' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (savingsProductSelected) { + + {{ 'labels.inputs.Submitted On' | translate }} + + + + + {{ 'labels.inputs.Submitted On' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + } - - {{ 'labels.inputs.Field Officer' | translate }} - - - {{ officer.displayName }} - - - + @if (savingsProductSelected) { + + {{ 'labels.inputs.Field Officer' | translate }} + + @for (officer of fieldOfficerData; track officer) { + + {{ officer.displayName }} + + } + + + } - - {{ 'labels.inputs.External ID' | translate }} - - + @if (savingsProductSelected) { + + {{ 'labels.inputs.External ID' | translate }} + + + } diff --git a/src/app/savings/savings-account-stepper/savings-account-details-step/savings-account-details-step.component.ts b/src/app/savings/savings-account-stepper/savings-account-details-step/savings-account-details-step.component.ts index ebc1230cfc..33b71503e1 100644 --- a/src/app/savings/savings-account-stepper/savings-account-details-step/savings-account-details-step.component.ts +++ b/src/app/savings/savings-account-stepper/savings-account-details-step/savings-account-details-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; +import { Component, OnInit, Input, Output, EventEmitter, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; /** Custom Services */ @@ -24,6 +24,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingsAccountDetailsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private savingsService = inject(SavingsService); + private settingsService = inject(SettingsService); + /** Savings Account Template */ @Input() savingsAccountTemplate: any; @@ -45,17 +49,16 @@ export class SavingsAccountDetailsStepComponent implements OnInit { /** Savings Account Template with product data */ @Output() savingsAccountProductTemplate = new EventEmitter(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Sets share account details form. * @param {FormBuilder} formBuilder Form Builder. * @param {SavingsService} savingsService Savings Service. * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private savingsService: SavingsService, - private settingsService: SettingsService - ) { + constructor() { this.createSavingsAccountDetailsForm(); } diff --git a/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.html b/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.html index c38ffd20eb..e07880aa35 100644 --- a/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.html +++ b/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.html @@ -16,12 +16,16 @@ {{ 'labels.heading.Details' | translate }} {{ 'labels.inputs.External Id' | translate }} - - - - - {{ 'labels.inputs.Unassigned' | translate }} - + @if (savingsAccount.externalId) { + + + + } + @if (!savingsAccount.externalId) { + + {{ 'labels.inputs.Unassigned' | translate }} + + } @@ -31,7 +35,7 @@ {{ 'labels.heading.Details' | translate }} }} - + @if (activeClientMembers) { {{ 'labels.heading.Client Members' | translate }} @@ -41,18 +45,16 @@ {{ 'labels.heading.Client Members' | trans {{ 'labels.inputs.Client ID' | translate }} {{ element.id }} - {{ 'labels.inputs.Client Name' | translate }} {{ element.displayName }} - - + } {{ 'labels.heading.Terms' | translate }} @@ -112,128 +114,137 @@ {{ 'labels.heading.Terms' | translate }} }} - - {{ 'labels.inputs.Minimum Opening Balance' | translate }}: - {{ savingsAccount.minRequiredOpeningBalance | formatNumber }} - + @if (savingsAccount.minRequiredOpeningBalance) { + + {{ 'labels.inputs.Minimum Opening Balance' | translate }}: + {{ savingsAccount.minRequiredOpeningBalance | formatNumber }} + + } {{ 'labels.inputs.Apply Withdrawal Fee for Transfers' | translate }}: {{ savingsAccount.withdrawalFeeForTransfers | yesNo }} - - {{ 'labels.inputs.Lock-in Period' | translate }}: - {{ - getCatalogTranslation( - savingsAccount.lockinPeriodFrequency + - ' ' + - (savingsAccount.lockinPeriodFrequencyType - | find: savingsAccountProductTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value') - ) - }} - + @if (savingsAccount.lockinPeriodFrequency) { + + {{ 'labels.inputs.Lock-in Period' | translate }}: + {{ + getCatalogTranslation( + savingsAccount.lockinPeriodFrequency + + ' ' + + (savingsAccount.lockinPeriodFrequencyType + | find: savingsAccountProductTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value') + ) + }} + + } {{ 'labels.inputs.Is Overdraft Allowed' | translate }}: {{ savingsAccount.allowOverdraft | yesNo }} - - {{ 'labels.inputs.Minimum Overdraft Required for Interest Calculation' | translate }}: - {{ savingsAccount.minOverdraftForInterestCalculation | formatNumber }} - + @if (savingsAccount.minOverdraftForInterestCalculation) { + + {{ 'labels.inputs.Minimum Overdraft Required for Interest Calculation' | translate }}: + {{ savingsAccount.minOverdraftForInterestCalculation | formatNumber }} + + } - - {{ 'labels.inputs.Nominal Annual Interest for Overdraft' | translate }}: - {{ savingsAccount.nominalAnnualInterestRateOverdraft | formatNumber }} % - + @if (savingsAccount.nominalAnnualInterestRateOverdraft) { + + {{ 'labels.inputs.Nominal Annual Interest for Overdraft' | translate }}: + {{ savingsAccount.nominalAnnualInterestRateOverdraft | formatNumber }} % + + } - - {{ 'labels.inputs.Maximum Overdraft Amount Limit' | translate }}: - {{ savingsAccount.overdraftLimit | formatNumber }} - + @if (savingsAccount.overdraftLimit) { + + {{ 'labels.inputs.Maximum Overdraft Amount Limit' | translate }}: + {{ savingsAccount.overdraftLimit | formatNumber }} + + } {{ 'labels.inputs.Enforce Minimum Balance' | translate }}: {{ savingsAccount.enforceMinRequiredBalance | yesNo }} - - {{ 'labels.inputs.Minimum Balance' | translate }}: - {{ savingsAccount.minRequiredBalance }} - - - - {{ 'labels.inputs.Charges' | translate }} + @if (savingsAccount.minRequiredBalance) { + + {{ 'labels.inputs.Minimum Balance' | translate }}: + {{ savingsAccount.minRequiredBalance }} + + } - - - - {{ 'labels.inputs.Name' | translate }} - - {{ charge.name + ', ' + charge.currency.displaySymbol }} - - - - - {{ 'labels.inputs.Type' | translate }} - - {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ charge.amount | formatNumber }} - - - - - {{ 'labels.inputs.Date' | translate }} - - - {{ (charge.dueDate | dateFormat) || 'Unassigned' }} - - - {{ (charge.feeOnMonthDay | dateFormat) || 'Unassigned' }} - - + {{ 'labels.inputs.Charges' | translate }} + + + + {{ 'labels.inputs.Name' | translate }} + + {{ charge.name + ', ' + charge.currency.displaySymbol }} + + + + {{ 'labels.inputs.Type' | translate }} + + {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} + + + + {{ 'labels.inputs.Amount' | translate }} + + {{ charge.amount | formatNumber }} + + + + {{ 'labels.inputs.Date' | translate }} + + @if (charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee') { + + {{ (charge.dueDate | dateFormat) || 'Unassigned' }} + + } + @if (charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee') { + + {{ (charge.feeOnMonthDay | dateFormat) || 'Unassigned' }} + + } + @if ( !( charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee' || charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee' ) - " - > - N/A - - - - - - {{ 'labels.inputs.Repayments Every' | translate }} - - {{ charge.feeInterval || 'Not Provided' }} - - - - - {{ 'labels.inputs.Collected On' | translate }} - - {{ charge.chargeTimeType.value }} - - - - - - - + ) { + N/A + } + + + + {{ 'labels.inputs.Repayments Every' | translate }} + + {{ charge.feeInterval || 'Not Provided' }} + + + + {{ 'labels.inputs.Collected On' | translate }} + + {{ charge.chargeTimeType.value }} + + + + + + + } diff --git a/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.ts b/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.ts index fd60c70ca6..d494b0c5fb 100644 --- a/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.ts +++ b/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Input, Output, EventEmitter, OnChanges } from '@angular/core'; +import { Component, Input, Output, EventEmitter, OnChanges, inject } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { MatTableDataSource, @@ -54,6 +54,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingsAccountPreviewStepComponent implements OnChanges { + private translateService = inject(TranslateService); + /** Savings Account Product Template */ @Input() savingsAccountProductTemplate: any; /** Savings Account Template */ @@ -86,7 +88,10 @@ export class SavingsAccountPreviewStepComponent implements OnChanges { /** Form submission event */ @Output() submitEvent = new EventEmitter(); - constructor(private translateService: TranslateService) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnChanges(): void { if (this.activeClientMembers?.length > 0) { diff --git a/src/app/savings/savings-account-stepper/savings-account-terms-step/savings-account-terms-step.component.html b/src/app/savings/savings-account-stepper/savings-account-terms-step/savings-account-terms-step.component.html index d725dc13ae..2970713e56 100644 --- a/src/app/savings/savings-account-stepper/savings-account-terms-step/savings-account-terms-step.component.html +++ b/src/app/savings/savings-account-stepper/savings-account-terms-step/savings-account-terms-step.component.html @@ -22,12 +22,11 @@ {{ 'labels.inputs.Interest Compounding Period' | translate }} - - {{ interestCompoundingPeriodType.value | translateKey: 'catalogs' }} - + @for (interestCompoundingPeriodType of interestCompoundingPeriodTypeData; track interestCompoundingPeriodType) { + + {{ interestCompoundingPeriodType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Interest Compounding Period' | translate }} {{ 'labels.commons.is' | translate }} @@ -38,12 +37,11 @@ {{ 'labels.inputs.Interest Posting Period' | translate }} - - {{ interestPostingPeriodType.value | translateKey: 'catalogs' }} - + @for (interestPostingPeriodType of interestPostingPeriodTypeData; track interestPostingPeriodType) { + + {{ interestPostingPeriodType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Interest Posting Period' | translate }} {{ 'labels.commons.is' | translate }} @@ -54,12 +52,11 @@ {{ 'labels.inputs.Interest Calculated using' | translate }} - - {{ interestCalculationType.value | translateKey: 'catalogs' }} - + @for (interestCalculationType of interestCalculationTypeData; track interestCalculationType) { + + {{ interestCalculationType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Interest Calculated using' | translate }} {{ 'labels.commons.is' | translate }} @@ -70,12 +67,14 @@ {{ 'labels.inputs.Days in Year' | translate }} - - {{ interestCalculationDaysInYearType.value | translateKey: 'catalogs' }} - + @for ( + interestCalculationDaysInYearType of interestCalculationDaysInYearTypeData; + track interestCalculationDaysInYearType + ) { + + {{ interestCalculationDaysInYearType.value | translateKey: 'catalogs' }} + + } {{ 'labels.inputs.Days in Year' | translate }} {{ 'labels.commons.is' | translate }} @@ -102,12 +101,11 @@ {{ 'labels.inputs.Lock-in Period' | translate }} {{ 'labels.inputs.Type' | translate }} - - {{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }} - + @for (lockinPeriodFrequencyType of lockinPeriodFrequencyTypeData; track lockinPeriodFrequencyType) { + + {{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }} + + } @@ -119,25 +117,22 @@ {{ 'labels.inputs.Overdraft' | translate }} {{ 'labels.inputs.Is Overdraft Allowed' | translate }} - - - {{ 'labels.inputs.Minimum Overdraft Required for Interest Calculation' | translate }} - - - - - {{ 'labels.inputs.Nominal Annual Interest for Overdraft' | translate }} - - - - - {{ 'labels.inputs.Maximum Overdraft Amount Limit' | translate }} - - - + @if (savingsAccountTermsForm.value.allowOverdraft) { + + + {{ 'labels.inputs.Minimum Overdraft Required for Interest Calculation' | translate }} + + + + {{ 'labels.inputs.Nominal Annual Interest for Overdraft' | translate }} + + + + {{ 'labels.inputs.Maximum Overdraft Amount Limit' | translate }} + + + + } @@ -150,10 +145,12 @@ {{ 'labels.inputs.Overdraft' | translate }} - - {{ 'labels.inputs.Balance Required for Interest Calculation' | translate }} - - + @if (savingsAccountTermsForm.controls.minBalanceForInterestCalculation.value) { + + {{ 'labels.inputs.Balance Required for Interest Calculation' | translate }} + + + } diff --git a/src/app/savings/savings-account-stepper/savings-account-terms-step/savings-account-terms-step.component.ts b/src/app/savings/savings-account-stepper/savings-account-terms-step/savings-account-terms-step.component.ts index d218f68a69..620ef61c59 100644 --- a/src/app/savings/savings-account-stepper/savings-account-terms-step/savings-account-terms-step.component.ts +++ b/src/app/savings/savings-account-stepper/savings-account-terms-step/savings-account-terms-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnChanges, OnInit, Input } from '@angular/core'; +import { Component, OnChanges, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -31,6 +31,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingsAccountTermsStepComponent implements OnChanges, OnInit { + private formBuilder = inject(UntypedFormBuilder); + private settingsService = inject(SettingsService); + /** Savings Account and Product Template */ @Input() savingsAccountProductTemplate: any; /** Savings Account Template */ @@ -53,14 +56,14 @@ export class SavingsAccountTermsStepComponent implements OnChanges, OnInit { /** Interest Calculation Days in Year Data */ interestCalculationDaysInYearTypeData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private settingsService: SettingsService - ) { + constructor() { this.createSavingsAccountTermsForm(); this.buildDependencies(); } diff --git a/src/app/savings/savings-account-stepper/savings-active-client-members/savings-active-client-members.component.html b/src/app/savings/savings-account-stepper/savings-active-client-members/savings-active-client-members.component.html index 59030eab24..9fbec5dc04 100644 --- a/src/app/savings/savings-account-stepper/savings-active-client-members/savings-active-client-members.component.html +++ b/src/app/savings/savings-account-stepper/savings-active-client-members/savings-active-client-members.component.html @@ -1,32 +1,30 @@ - - - - - - - - - - - - - - - - {{ 'labels.inputs.Client ID' | translate }} - {{ element.id }} - - - - - {{ 'labels.inputs.Client Name' | translate }} - {{ element.displayName }} - - - - - - +@if (activeClientMembers) { + + + + + + + + + + + + + + {{ 'labels.inputs.Client ID' | translate }} + {{ element.id }} + + + + {{ 'labels.inputs.Client Name' | translate }} + {{ element.displayName }} + + + + + +} diff --git a/src/app/savings/savings-account-view/charges-tab/charges-tab.component.html b/src/app/savings/savings-account-view/charges-tab/charges-tab.component.html index 19c2734c99..e610e129be 100644 --- a/src/app/savings/savings-account-view/charges-tab/charges-tab.component.html +++ b/src/app/savings/savings-account-view/charges-tab/charges-tab.component.html @@ -3,15 +3,17 @@ {{ 'labels.inputs.Charges' | translate }} - - - {{ - showInactiveCharges - ? viewAllChargeButtons('View Active Charges') - : viewAllChargeButtons('View Inactive Charges') - }} - - + @if (this.chargesData) { + + + {{ + showInactiveCharges + ? viewAllChargeButtons('View Active Charges') + : viewAllChargeButtons('View Inactive Charges') + }} + + + } @@ -77,62 +79,66 @@ {{ 'labels.inputs.Charges' | translate }} {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - + @if (savingsAccountData.status.value === 'Submitted and pending approval') { + + + + + + + + + } + @if (savingsAccountData.status.value === 'Active' && charge.amountOutstanding !== 0) { + + + + - + - - + @if (isRecurringCharge(charge)) { + + + + } + + } diff --git a/src/app/savings/savings-account-view/charges-tab/charges-tab.component.ts b/src/app/savings/savings-account-view/charges-tab/charges-tab.component.ts index e784122c99..ad4142f6ff 100644 --- a/src/app/savings/savings-account-view/charges-tab/charges-tab.component.ts +++ b/src/app/savings/savings-account-view/charges-tab/charges-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; import { @@ -32,7 +32,7 @@ import { InputBase } from 'app/shared/form-dialog/formfield/model/input-base'; import { DatepickerBase } from 'app/shared/form-dialog/formfield/model/datepicker-base'; import { Dates } from 'app/core/utils/dates'; import { TranslateService } from '@ngx-translate/core'; -import { NgIf, CurrencyPipe } from '@angular/common'; +import { CurrencyPipe } from '@angular/common'; import { MatTooltip } from '@angular/material/tooltip'; import { DateFormatPipe } from '../../../pipes/date-format.pipe'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -62,6 +62,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ChargesTabComponent implements OnInit { + private savingsService = inject(SavingsService); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private router = inject(Router); + private dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + private translateService = inject(TranslateService); + /** Savings Account Data */ savingsAccountData: any; /** Charges Data */ @@ -88,6 +96,9 @@ export class ChargesTabComponent implements OnInit { /** Charges Table Reference */ @ViewChild('chargesTable', { static: true }) chargesTableRef: MatTable; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Savings account data from `resolve`. * @param {SavingsService} savingsService Savings Service @@ -97,15 +108,7 @@ export class ChargesTabComponent implements OnInit { * @param {Dates} dateUtils Date Utils. * @param {SettingsService} settingsService Setting service */ - constructor( - private savingsService: SavingsService, - private route: ActivatedRoute, - private dateUtils: Dates, - private router: Router, - private dialog: MatDialog, - private settingsService: SettingsService, - private translateService: TranslateService - ) { + constructor() { this.route.parent.data.subscribe((data: { savingsAccountData: any }) => { this.savingsAccountData = data.savingsAccountData; this.chargesData = this.savingsAccountData.charges; diff --git a/src/app/savings/savings-account-view/custom-dialogs/calculate-interest-dialog/calculate-interest-dialog.component.ts b/src/app/savings/savings-account-view/custom-dialogs/calculate-interest-dialog/calculate-interest-dialog.component.ts index 3c269b9313..17672f6780 100644 --- a/src/app/savings/savings-account-view/custom-dialogs/calculate-interest-dialog/calculate-interest-dialog.component.ts +++ b/src/app/savings/savings-account-view/custom-dialogs/calculate-interest-dialog/calculate-interest-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MatDialogTitle, @@ -27,8 +27,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CalculateInterestDialogComponent { + dialogRef = inject>(MatDialogRef); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. */ - constructor(public dialogRef: MatDialogRef) {} + constructor() {} } diff --git a/src/app/savings/savings-account-view/custom-dialogs/inactivate-charge-dialog/inactivate-charge-dialog.component.ts b/src/app/savings/savings-account-view/custom-dialogs/inactivate-charge-dialog/inactivate-charge-dialog.component.ts index f228f63230..4a592cd81a 100644 --- a/src/app/savings/savings-account-view/custom-dialogs/inactivate-charge-dialog/inactivate-charge-dialog.component.ts +++ b/src/app/savings/savings-account-view/custom-dialogs/inactivate-charge-dialog/inactivate-charge-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,12 +28,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class InactivateChargeDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/savings/savings-account-view/custom-dialogs/post-interest-dialog/post-interest-dialog.component.ts b/src/app/savings/savings-account-view/custom-dialogs/post-interest-dialog/post-interest-dialog.component.ts index 894cf6df91..cf4d5923aa 100644 --- a/src/app/savings/savings-account-view/custom-dialogs/post-interest-dialog/post-interest-dialog.component.ts +++ b/src/app/savings/savings-account-view/custom-dialogs/post-interest-dialog/post-interest-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MatDialogTitle, @@ -27,8 +27,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class PostInterestDialogComponent { + dialogRef = inject>(MatDialogRef); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. */ - constructor(public dialogRef: MatDialogRef) {} + constructor() {} } diff --git a/src/app/savings/savings-account-view/custom-dialogs/release-amount-dialog/release-amount-dialog.component.ts b/src/app/savings/savings-account-view/custom-dialogs/release-amount-dialog/release-amount-dialog.component.ts index bade3f5922..e35069ae96 100644 --- a/src/app/savings/savings-account-view/custom-dialogs/release-amount-dialog/release-amount-dialog.component.ts +++ b/src/app/savings/savings-account-view/custom-dialogs/release-amount-dialog/release-amount-dialog.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MatDialogTitle, @@ -23,8 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ReleaseAmountDialogComponent { + dialogRef = inject>(MatDialogRef); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. */ - constructor(public dialogRef: MatDialogRef) {} + constructor() {} } diff --git a/src/app/savings/savings-account-view/custom-dialogs/toggle-withhold-tax-dialog/toggle-withhold-tax-dialog.component.ts b/src/app/savings/savings-account-view/custom-dialogs/toggle-withhold-tax-dialog/toggle-withhold-tax-dialog.component.ts index d53f653f11..581fd05762 100644 --- a/src/app/savings/savings-account-view/custom-dialogs/toggle-withhold-tax-dialog/toggle-withhold-tax-dialog.component.ts +++ b/src/app/savings/savings-account-view/custom-dialogs/toggle-withhold-tax-dialog/toggle-withhold-tax-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,12 +28,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ToggleWithholdTaxDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/savings/savings-account-view/custom-dialogs/undo-transaction-dialog/undo-transaction-dialog.component.ts b/src/app/savings/savings-account-view/custom-dialogs/undo-transaction-dialog/undo-transaction-dialog.component.ts index e04e0c33b5..be48edf816 100644 --- a/src/app/savings/savings-account-view/custom-dialogs/undo-transaction-dialog/undo-transaction-dialog.component.ts +++ b/src/app/savings/savings-account-view/custom-dialogs/undo-transaction-dialog/undo-transaction-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MatDialogTitle, @@ -26,8 +26,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UndoTransactionDialogComponent { + dialogRef = inject>(MatDialogRef); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. */ - constructor(public dialogRef: MatDialogRef) {} + constructor() {} } diff --git a/src/app/savings/savings-account-view/custom-dialogs/waive-charge-dialog/waive-charge-dialog.component.ts b/src/app/savings/savings-account-view/custom-dialogs/waive-charge-dialog/waive-charge-dialog.component.ts index df4e9b488e..6b07007c20 100644 --- a/src/app/savings/savings-account-view/custom-dialogs/waive-charge-dialog/waive-charge-dialog.component.ts +++ b/src/app/savings/savings-account-view/custom-dialogs/waive-charge-dialog/waive-charge-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,12 +28,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class WaiveChargeDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/savings/savings-account-view/datatable-tabs/datatable-tabs.component.ts b/src/app/savings/savings-account-view/datatable-tabs/datatable-tabs.component.ts index c067dc7597..395b8890f3 100644 --- a/src/app/savings/savings-account-view/datatable-tabs/datatable-tabs.component.ts +++ b/src/app/savings/savings-account-view/datatable-tabs/datatable-tabs.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { EntityDatatableTabComponent } from '../../../shared/tabs/entity-datatable-tab/entity-datatable-tab.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -17,17 +17,22 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DatatableTabsComponent { + private route = inject(ActivatedRoute); + entityId: string; /** Savings Datatable */ entityDatatable: any; /** Multi Row Datatable Flag */ multiRowDatatableFlag: boolean; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches Savings and datatables data from `resolve` * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.entityId = this.route.parent.parent.snapshot.paramMap.get('savingAccountId'); this.route.data.subscribe((data: { savingsDatatable: any }) => { diff --git a/src/app/savings/savings-account-view/general-tab/general-tab.component.html b/src/app/savings/savings-account-view/general-tab/general-tab.component.html index 7504f12f07..5504c95959 100644 --- a/src/app/savings/savings-account-view/general-tab/general-tab.component.html +++ b/src/app/savings/savings-account-view/general-tab/general-tab.component.html @@ -1,279 +1,359 @@ - - - +@if (isLoading) { + + + +} - - - - {{ 'labels.heading.Savings Details' | translate }} - - - - {{ 'labels.inputs.External Id' | translate }} - - - - {{ 'labels.inputs.Not Provided' | translate }} - - - {{ 'labels.inputs.Activated On' | translate }} - - {{ - savingsAccountData.timeline.activatedOnDate - ? (savingsAccountData.timeline.activatedOnDate | dateFormat) - : 'Not Activated' - }} - - - - {{ 'labels.inputs.Field Officer' | translate }} - {{ savingsAccountData.fieldOfficerName ? savingsAccountData.fieldOfficerName : 'Unassigned' }} - - - {{ 'labels.inputs.Currency' | translate }} - {{ savingsAccountData.currency.name }} [{{ savingsAccountData.currency.code }}] - - - {{ 'labels.inputs.Nominal Interest Rate' | translate }} - - {{ savingsAccountData.nominalAnnualInterestRate | formatNumber }} % - 0 % - - - - +@if (!isLoading) { + + + @if (!savingsAccountData.status.rejected && !savingsAccountData.status.submittedAndPendingApproval) { + + {{ 'labels.heading.Savings Details' | translate }} + + + + {{ 'labels.inputs.External Id' | translate }} + @if (savingsAccountData.externalId) { + + + + } + @if (!savingsAccountData.externalId) { + {{ 'labels.inputs.Not Provided' | translate }} + } + + + {{ 'labels.inputs.Activated On' | translate }} + + {{ + savingsAccountData.timeline.activatedOnDate + ? (savingsAccountData.timeline.activatedOnDate | dateFormat) + : 'Not Activated' + }} + + + + {{ 'labels.inputs.Field Officer' | translate }} + {{ savingsAccountData.fieldOfficerName ? savingsAccountData.fieldOfficerName : 'Unassigned' }} + + + {{ 'labels.inputs.Currency' | translate }} + {{ savingsAccountData.currency.name }} [{{ savingsAccountData.currency.code }}] + + + {{ 'labels.inputs.Nominal Interest Rate' | translate }} + + @if (savingsAccountData.nominalAnnualInterestRate) { + {{ savingsAccountData.nominalAnnualInterestRate | formatNumber }} % + } + @if (!savingsAccountData.nominalAnnualInterestRate) { + 0 % + } + + + + + + } @else { + + {{ 'labels.heading.Savings Details' | translate }} + + + + {{ 'labels.inputs.Field Officer' | translate }} + {{ savingsAccountData.fieldOfficerName ? savingsAccountData.fieldOfficerName : 'Unassigned' }} + + + {{ 'labels.inputs.Balance' | translate }} + + {{ savingsAccountData.summary.accountBalance | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + + + + + + } + @if (!savingsAccountData.status.rejected && !savingsAccountData.status.submittedAndPendingApproval) { + + {{ 'labels.heading.Performance History' | translate }} + + + @if (savingsAccountData.summary.totalDeposits) { + + {{ 'labels.inputs.Total Deposits' | translate }} + + {{ savingsAccountData.summary.totalDeposits | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + + + } + @if (savingsAccountData.summary.totalInterestEarned >= 0) { + + {{ 'labels.inputs.Total Interest Earned' | translate }} + + {{ + savingsAccountData.summary.totalInterestEarned + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + } + + + + } - - - - {{ 'labels.heading.Savings Details' | translate }} + @if (isActive) { + + {{ 'labels.heading.Account Summary' | translate }} + @if (savingsAccountData.summary.totalWithdrawals) { + + {{ 'labels.inputs.Total Withdrawls' | translate }} + + {{ + savingsAccountData.summary.totalWithdrawals | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + } + @if (savingsAccountData.summary.totalWithdrawalFees) { + + {{ 'labels.inputs.Withdrawals Fees' | translate }} + + {{ + savingsAccountData.summary.totalWithdrawalFees | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + } + @if (savingsAccountData.summary.totalAnnualFees) { + + {{ 'labels.inputs.Annual Fees' | translate }} + + {{ savingsAccountData.summary.totalAnnualFees | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + + + } + @if (savingsAccountData.summary.totalInterestEarned >= 0) { + + {{ 'labels.inputs.Interest Earned' | translate }} + + {{ + savingsAccountData.summary.totalInterestEarned | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + } + @if (savingsAccountData.summary.totalInterestPosted) { + + {{ 'labels.inputs.Interest Posted' | translate }} + + {{ + savingsAccountData.summary.totalInterestPosted | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + } + @if (savingsAccountData.summary.interestNotPosted >= 0) { + + {{ 'labels.inputs.Interest Earned Not Posted' | translate }} + + {{ + savingsAccountData.summary.interestNotPosted | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + } + @if (savingsAccountData.summary.totalOverdraftInterestDerived) { + + {{ 'labels.inputs.Interest On Overdraft' | translate }} + + {{ + savingsAccountData.summary.totalOverdraftInterestDerived + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + } + @if (savingsAccountData.summary.interestNotPosted < 0) { + + {{ 'labels.inputs.Overdraft Interest Not Posted' | translate }} + + {{ + savingsAccountData.summary.interestNotPosted | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + } + @if (savingsAccountData.nominalAnnualInterestRate) { + + {{ 'labels.inputs.Nominal Interest Rate' | translate }} + {{ savingsAccountData.nominalAnnualInterestRate | formatNumber }} % + + } + + {{ 'labels.inputs.Interest Compounding Period' | translate }} + {{ savingsAccountData.interestCompoundingPeriodType.value | translateKey: 'catalogs' }} + + + {{ 'labels.inputs.Interest Posting Period' | translate }} + {{ savingsAccountData.interestPostingPeriodType.value | translateKey: 'catalogs' }} + - {{ 'labels.inputs.Field Officer' | translate }} - {{ savingsAccountData.fieldOfficerName ? savingsAccountData.fieldOfficerName : 'Unassigned' }} + {{ 'labels.inputs.Interest Calculated Using' | translate }} + {{ savingsAccountData.interestCalculationType.value | translateKey: 'catalogs' }} - {{ 'labels.inputs.Balance' | translate }} - - {{ savingsAccountData.summary.accountBalance | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + {{ 'labels.inputs.Days in Year' | translate }} + {{ savingsAccountData.interestCalculationDaysInYearType.value | translateKey: 'catalogs' }} + + @if (savingsAccountData.withdrawalFee) { + + {{ 'labels.inputs.Withdrawal Fee' | translate }} + + {{ savingsAccountData.withdrawalFee.amount | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + + + } + @if (savingsAccountData.lastActiveTransactionDate) { + + {{ 'labels.inputs.Last Active Transaction Date' | translate }} + {{ savingsAccountData.lastActiveTransactionDate | dateFormat }} + + } + @if (!(savingsAccountData.subStatus.id === 0)) { + + {{ 'labels.inputs.Substatus' | translate }} + {{ savingsAccountData.subStatus.value }} + + } + @if (savingsAccountData.daysToInactive) { + + {{ 'labels.inputs.Days to Inactive' | translate }} + {{ savingsAccountData.daysToInactive }} + + } + @if (savingsAccountData.daysToDormancy) { + + {{ 'labels.inputs.Days to Dormancy' | translate }} + {{ savingsAccountData.daysToDormancy }} + + } + @if (savingsAccountData.daysToEscheat) { + + {{ 'labels.inputs.Days to Escheat' | translate }} + {{ savingsAccountData.daysToEscheat }} + + } + @if (savingsAccountData.annualFee) { + + {{ 'labels.inputs.Annual Fee' | translate }} + + {{ savingsAccountData.annualFee.amount | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + + + } + @if (savingsAccountData.allowOverdraft) { + + {{ 'labels.inputs.Overdraft Limit' | translate }} + + {{ savingsAccountData.overdraftLimit | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + + + } + @if (savingsAccountData.allowOverdraft) { + + {{ 'labels.inputs.Minimum Overdraft Required for Interest Calculation' | translate }} + + {{ + savingsAccountData.minOverdraftForInterestCalculation + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + } + @if (savingsAccountData.minBalanceForInterestCalculation) { + + {{ 'labels.inputs.Min Balance Required for Interest Calculation' | translate }} + {{ savingsAccountData.minBalanceForInterestCalculation | formatNumber }} + + } + @if (savingsAccountData.minRequiredBalance) { + + {{ 'labels.inputs.Minimum Required Balance' | translate }} + {{ savingsAccountData.minRequiredBalance | formatNumber }} + + } + @if (savingsAccountData.enforceMinRequiredBalance) { + + {{ 'labels.inputs.Enforce Minimum Required Balance' | translate }} + {{ savingsAccountData.enforceMinRequiredBalance | yesNo }} + + } + @if (savingsAccountData.summary.lastInterestCalculationDate) { + + {{ 'labels.inputs.Interest Recalculation Date' | translate }} + {{ savingsAccountData.summary.lastInterestCalculationDate | dateFormat }} + + } + @if (savingsAccountData.onHoldFunds) { + + {{ 'labels.inputs.On Hold Funds' | translate }} + + {{ + savingsAccountData.onHoldFunds | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + } + @if (savingsAccountData.withHoldTax) { + + {{ 'labels.inputs.Withhold Tax Group' | translate }} + {{ savingsAccountData.taxGroup.name }} + + } + + + + } @else { + + {{ 'labels.heading.Account Summary' | translate }} + + + + {{ 'labels.inputs.External Id' | translate }} + @if (savingsAccountData.externalId) { + + + + } + @if (!savingsAccountData.externalId) { + {{ 'labels.inputs.Not Provided' | translate }} + } + + + {{ 'labels.inputs.Activated On' | translate }} + + {{ + savingsAccountData.timeline.activatedOnDate + ? (savingsAccountData.timeline.activatedOnDate | dateFormat) + : 'Not Activated' + }} + + {{ 'labels.inputs.Currency' | translate }} + {{ savingsAccountData.currency.name }} [{{ savingsAccountData.currency.code }}] + - - - - {{ 'labels.heading.Performance History' | translate }} - - - - {{ 'labels.inputs.Total Deposits' | translate }} - - {{ savingsAccountData.summary.totalDeposits | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - = 0"> - {{ 'labels.inputs.Total Interest Earned' | translate }} - - {{ savingsAccountData.summary.totalInterestEarned | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - - - - - - - {{ 'labels.heading.Account Summary' | translate }} - - - - {{ 'labels.inputs.Total Withdrawls' | translate }} - - {{ savingsAccountData.summary.totalWithdrawals | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - - {{ 'labels.inputs.Withdrawals Fees' | translate }} - - {{ savingsAccountData.summary.totalWithdrawalFees | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - - {{ 'labels.inputs.Annual Fees' | translate }} - - {{ savingsAccountData.summary.totalAnnualFees | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - = 0"> - {{ 'labels.inputs.Interest Earned' | translate }} - - {{ savingsAccountData.summary.totalInterestEarned | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - - {{ 'labels.inputs.Interest Posted' | translate }} - - {{ savingsAccountData.summary.totalInterestPosted | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - = 0"> - {{ 'labels.inputs.Interest Earned Not Posted' | translate }} - - {{ savingsAccountData.summary.interestNotPosted | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - - {{ 'labels.inputs.Interest On Overdraft' | translate }} - - {{ - savingsAccountData.summary.totalOverdraftInterestDerived - | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Overdraft Interest Not Posted' | translate }} - - {{ savingsAccountData.summary.interestNotPosted | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - - {{ 'labels.inputs.Nominal Interest Rate' | translate }} - {{ savingsAccountData.nominalAnnualInterestRate | formatNumber }} % - - - {{ 'labels.inputs.Interest Compounding Period' | translate }} - {{ savingsAccountData.interestCompoundingPeriodType.value | translateKey: 'catalogs' }} - - - {{ 'labels.inputs.Interest Posting Period' | translate }} - {{ savingsAccountData.interestPostingPeriodType.value | translateKey: 'catalogs' }} - - - {{ 'labels.inputs.Interest Calculated Using' | translate }} - {{ savingsAccountData.interestCalculationType.value | translateKey: 'catalogs' }} - - - {{ 'labels.inputs.Days in Year' | translate }} - {{ savingsAccountData.interestCalculationDaysInYearType.value | translateKey: 'catalogs' }} - - - {{ 'labels.inputs.Withdrawal Fee' | translate }} - - {{ savingsAccountData.withdrawalFee.amount | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - - {{ 'labels.inputs.Last Active Transaction Date' | translate }} - {{ savingsAccountData.lastActiveTransactionDate | dateFormat }} - - - {{ 'labels.inputs.Substatus' | translate }} - {{ savingsAccountData.subStatus.value }} - - - {{ 'labels.inputs.Days to Inactive' | translate }} - {{ savingsAccountData.daysToInactive }} - - - {{ 'labels.inputs.Days to Dormancy' | translate }} - {{ savingsAccountData.daysToDormancy }} - - - {{ 'labels.inputs.Days to Escheat' | translate }} - {{ savingsAccountData.daysToEscheat }} - - - {{ 'labels.inputs.Annual Fee' | translate }} - - {{ savingsAccountData.annualFee.amount | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - - {{ 'labels.inputs.Overdraft Limit' | translate }} - - {{ savingsAccountData.overdraftLimit | currency: currency.code : 'symbol-narrow' : '1.2-2' }} - - - - {{ 'labels.inputs.Minimum Overdraft Required for Interest Calculation' | translate }} - - {{ - savingsAccountData.minOverdraftForInterestCalculation - | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Min Balance Required for Interest Calculation' | translate }} - {{ savingsAccountData.minBalanceForInterestCalculation | formatNumber }} - - - {{ 'labels.inputs.Minimum Required Balance' | translate }} - {{ savingsAccountData.minRequiredBalance | formatNumber }} - - - {{ 'labels.inputs.Enforce Minimum Required Balance' | translate }} - {{ savingsAccountData.enforceMinRequiredBalance | yesNo }} - - - {{ 'labels.inputs.Interest Recalculation Date' | translate }} - {{ savingsAccountData.summary.lastInterestCalculationDate | dateFormat }} - - - {{ 'labels.inputs.On Hold Funds' | translate }} - - {{ - savingsAccountData.onHoldFunds | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Withhold Tax Group' | translate }} - {{ savingsAccountData.taxGroup.name }} - - - + } - - - - {{ 'labels.heading.Account Summary' | translate }} - - - - {{ 'labels.inputs.External Id' | translate }} - - - - {{ 'labels.inputs.Not Provided' | translate }} - - - {{ 'labels.inputs.Activated On' | translate }} - - {{ - savingsAccountData.timeline.activatedOnDate - ? (savingsAccountData.timeline.activatedOnDate | dateFormat) - : 'Not Activated' - }} - - - - {{ 'labels.inputs.Currency' | translate }} - {{ savingsAccountData.currency.name }} [{{ savingsAccountData.currency.code }}] - - - - - - +} diff --git a/src/app/savings/savings-account-view/general-tab/general-tab.component.ts b/src/app/savings/savings-account-view/general-tab/general-tab.component.ts index a13cdffa11..9196fc5e00 100644 --- a/src/app/savings/savings-account-view/general-tab/general-tab.component.ts +++ b/src/app/savings/savings-account-view/general-tab/general-tab.component.ts @@ -1,7 +1,7 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { Currency } from 'app/shared/models/general.model'; -import { NgIf, CurrencyPipe } from '@angular/common'; +import { CurrencyPipe } from '@angular/common'; import { ExternalIdentifierComponent } from '../../../shared/external-identifier/external-identifier.component'; import { DateFormatPipe } from '../../../pipes/date-format.pipe'; import { FormatNumberPipe } from '../../../pipes/format-number.pipe'; @@ -22,6 +22,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GeneralTabComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + isLoading = true; isActive = false; entityType: string; @@ -29,10 +32,10 @@ export class GeneralTabComponent { savingsAccountData: any; currency: Currency; - constructor( - private route: ActivatedRoute, - private router: Router - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.parent.parent.data.subscribe((data: { savingsAccountData: any }) => { this.savingsAccountData = data.savingsAccountData; this.currency = this.savingsAccountData.currency; diff --git a/src/app/savings/savings-account-view/notes-tab/notes-tab.component.ts b/src/app/savings/savings-account-view/notes-tab/notes-tab.component.ts index d63c551e2e..5667ebc744 100644 --- a/src/app/savings/savings-account-view/notes-tab/notes-tab.component.ts +++ b/src/app/savings/savings-account-view/notes-tab/notes-tab.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { AuthenticationService } from 'app/core/authentication/authentication.service'; import { SavingsService } from 'app/savings/savings.service'; @@ -15,15 +15,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class NotesTabComponent { + private route = inject(ActivatedRoute); + private savingsService = inject(SavingsService); + private authenticationService = inject(AuthenticationService); + entityId: string; username: string; entityNotes: any; - constructor( - private route: ActivatedRoute, - private savingsService: SavingsService, - private authenticationService: AuthenticationService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { const savedCredentials = this.authenticationService.getCredentials(); this.username = savedCredentials.username; this.entityId = this.route.parent.snapshot.params['savingAccountId']; diff --git a/src/app/savings/savings-account-view/savings-account-view.component.html b/src/app/savings/savings-account-view/savings-account-view.component.html index a62e5c622a..36868ade0d 100644 --- a/src/app/savings/savings-account-view/savings-account-view.component.html +++ b/src/app/savings/savings-account-view/savings-account-view.component.html @@ -16,18 +16,20 @@ - - + @if (!savingsAccountData.subStatus.block) { + + } + @if (savingsAccountData.subStatus.block) { + + } {{ 'labels.inputs.Savings Product' | translate }} : {{ 'labels.text.' + entityType | translate }} {{ 'labels.inputs.name' | translate }}: {{ savingsAccountData.clientName || savingsAccountData.groupName }} - - - + @if (savingsAccountData.clientAccountNo) { + + + + } - - {{ 'labels.heading.Account Overview' | translate }} - - - - {{ 'labels.inputs.Current Balance' | translate }} - - {{ - savingsAccountData.summary.accountBalance | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - {{ 'labels.inputs.Available Balance' | translate }} - - {{ - savingsAccountData.summary.availableBalance | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} - - - - - + @if (!savingsAccountData.status.rejected && !savingsAccountData.status.submittedAndPendingApproval) { + + {{ 'labels.heading.Account Overview' | translate }} + + + + {{ 'labels.inputs.Current Balance' | translate }} + + {{ + savingsAccountData.summary.accountBalance | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + + {{ 'labels.inputs.Available Balance' | translate }} + + {{ + savingsAccountData.summary.availableBalance + | currency: currency.code : 'symbol-narrow' : '1.2-2' + }} + + + + + + } {{ 'labels.heading.Account Overview' | translate }} - + @for (item of buttonConfig.singleButtons; track item) { {{ 'labels.menus.' + item.name | translate }} - + } - + @if (buttonConfig.options && !savingsAccountData.subStatus.block) { {{ 'labels.menus.More' | translate }} - - - {{ 'labels.menus.' + option.name | translate }} - - + @for (option of buttonConfig.options; track option) { + + + {{ 'labels.menus.' + option.name | translate }} + + + } - + } - - - {{ 'labels.inputs.General' | translate }} - - - {{ 'labels.inputs.Transactions' | translate }} - - - {{ 'labels.inputs.Charges' | translate }} - - - {{ 'labels.inputs.Documents' | translate }} - - - {{ 'labels.inputs.Notes' | translate }} - - + @if (isActive) { + - {{ 'labels.inputs.Standing Instructions' | translate }} + {{ 'labels.inputs.General' | translate }} - - - {{ savingsDatatable.registeredTableName }} + {{ 'labels.inputs.Transactions' | translate }} - - + + {{ 'labels.inputs.Charges' | translate }} + + + {{ 'labels.inputs.Documents' | translate }} + + + {{ 'labels.inputs.Notes' | translate }} + + + @if (savingsAccountData.clientId) { + + {{ 'labels.inputs.Standing Instructions' | translate }} + + } + + @for (savingsDatatable of savingsDatatables; track savingsDatatable) { + + {{ savingsDatatable.registeredTableName }} + + } + + } diff --git a/src/app/savings/savings-account-view/savings-account-view.component.ts b/src/app/savings/savings-account-view/savings-account-view.component.ts index 3a65074d84..d059e3d782 100644 --- a/src/app/savings/savings-account-view/savings-account-view.component.ts +++ b/src/app/savings/savings-account-view/savings-account-view.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -27,7 +27,7 @@ import { MatCardContent } from '@angular/material/card'; import { MatTooltip } from '@angular/material/tooltip'; -import { NgIf, NgClass, NgFor, CurrencyPipe } from '@angular/common'; +import { NgClass, CurrencyPipe } from '@angular/common'; import { LongTextComponent } from '../../shared/long-text/long-text.component'; import { AccountNumberComponent } from '../../shared/account-number/account-number.component'; import { MatIconButton } from '@angular/material/button'; @@ -71,6 +71,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingsAccountViewComponent implements OnInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private savingsService = inject(SavingsService); + private translateService = inject(TranslateService); + dialog = inject(MatDialog); + /** Savings Account Data */ savingsAccountData: any; /** Savings Data Tables */ @@ -83,19 +89,16 @@ export class SavingsAccountViewComponent implements OnInit { isActive = false; currency: Currency; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches savings account data from `resolve` * @param {ActivatedRoute} route Activated Route * @param {Router} router Router * @param {SavingsService} savingsService Savings Service */ - constructor( - private route: ActivatedRoute, - private router: Router, - private savingsService: SavingsService, - private translateService: TranslateService, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { savingsAccountData: any; savingsDatatables: any }) => { this.savingsAccountData = data.savingsAccountData; this.currency = this.savingsAccountData.currency; diff --git a/src/app/savings/savings-account-view/savings-documents-tab/savings-documents-tab.component.ts b/src/app/savings/savings-account-view/savings-documents-tab/savings-documents-tab.component.ts index 45d1349b0c..beea740478 100644 --- a/src/app/savings/savings-account-view/savings-documents-tab/savings-documents-tab.component.ts +++ b/src/app/savings/savings-account-view/savings-documents-tab/savings-documents-tab.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute } from '@angular/router'; import { SavingsService } from 'app/savings/savings.service'; @@ -17,22 +17,25 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingsDocumentsTabComponent { + private route = inject(ActivatedRoute); + private savingsService = inject(SavingsService); + private settingsService = inject(SettingsService); + dialog = inject(MatDialog); + /** Stores the resolved savings documents data */ entityDocuments: any; /** Stores the saving Account Id */ entityId: string; entityType = 'savings'; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the savings data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor( - private route: ActivatedRoute, - private savingsService: SavingsService, - private settingsService: SettingsService, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { savingsDocuments: any }) => { this.setSavingsDocumentsData(data.savingsDocuments); }); diff --git a/src/app/savings/savings-account-view/standing-instructions-tab/standing-instructions-tab.component.html b/src/app/savings/savings-account-view/standing-instructions-tab/standing-instructions-tab.component.html index 4a8144a57c..ca9563b42c 100644 --- a/src/app/savings/savings-account-view/standing-instructions-tab/standing-instructions-tab.component.html +++ b/src/app/savings/savings-account-view/standing-instructions-tab/standing-instructions-tab.component.html @@ -47,29 +47,33 @@ {{ 'labels.heading.All Standing Instructions' | translate }} {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - + @if (instruction.status.value !== 'Deleted') { + + + + + + } + @if (instruction.status.value !== 'Deleted') { + + + + + + } ; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves Savings Account Data from `resolve`. * @param {ActivatedRoute} route Activated Route. * @param {SettingsService} settingsService Setting service */ - constructor( - private route: ActivatedRoute, - private savingsService: SavingsService, - private dialog: MatDialog, - private accountTransfersService: AccountTransfersService, - private settingsService: SettingsService - ) { + constructor() { this.route.parent.data.subscribe((data: { savingsAccountData: any }) => { this.savingsData = data.savingsAccountData; }); diff --git a/src/app/savings/savings-account-view/transactions-tab/export-transactions/export-transactions.component.html b/src/app/savings/savings-account-view/transactions-tab/export-transactions/export-transactions.component.html index 273766f4ca..32b2d9ab9d 100644 --- a/src/app/savings/savings-account-view/transactions-tab/export-transactions/export-transactions.component.html +++ b/src/app/savings/savings-account-view/transactions-tab/export-transactions/export-transactions.component.html @@ -45,4 +45,6 @@ - +@if (!hideOutput) { + +} diff --git a/src/app/savings/savings-account-view/transactions-tab/export-transactions/export-transactions.component.ts b/src/app/savings/savings-account-view/transactions-tab/export-transactions/export-transactions.component.ts index 54de7fad62..6b5e8d3842 100644 --- a/src/app/savings/savings-account-view/transactions-tab/export-transactions/export-transactions.component.ts +++ b/src/app/savings/savings-account-view/transactions-tab/export-transactions/export-transactions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; import { UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, RouterLink } from '@angular/router'; @@ -24,6 +24,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ExportTransactionsComponent implements OnInit { + private sanitizer = inject(DomSanitizer); + private reportsService = inject(ReportsService); + private formBuilder = inject(UntypedFormBuilder); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -37,6 +44,9 @@ export class ExportTransactionsComponent implements OnInit { /** Savings Account Id */ savingsAccountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches savings account data from grandparent's `resolve` * @param {DomSanitizer} sanitizer DOM Sanitizer @@ -46,14 +56,7 @@ export class ExportTransactionsComponent implements OnInit { * @param {ActivatedRoute} route Activated Route * @param {SettingsService} settingsService Settings Service */ - constructor( - private sanitizer: DomSanitizer, - private reportsService: ReportsService, - private formBuilder: UntypedFormBuilder, - private dateUtils: Dates, - private route: ActivatedRoute, - private settingsService: SettingsService - ) { + constructor() { this.route.parent.parent.data.subscribe((data: { savingsAccountData: any }) => { this.savingsAccountId = data.savingsAccountData.accountNo; }); diff --git a/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.html b/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.html index 3208689ea4..1486d789ee 100644 --- a/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.html +++ b/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.html @@ -1,17 +1,19 @@ - - - {{ 'labels.inputs.Hide Reversed' | translate }} - - {{ 'labels.inputs.Hide Accruals' | translate }} - - {{ 'labels.buttons.Export' | translate }} - - + @if (checkStatus()) { + + + {{ 'labels.inputs.Hide Reversed' | translate }} + + {{ 'labels.inputs.Hide Accruals' | translate }} + + {{ 'labels.buttons.Export' | translate }} + + + } @@ -118,16 +120,18 @@ {{ 'labels.text.View Transaction' | translate }} - - - - {{ 'tooltips.Undo Transaction' | translate }} - - + @if (!transaction.reversed) { + + + + {{ 'tooltips.Undo Transaction' | translate }} + + + } { this.transactionsData = data.savingsAccountData.transactions; this.status = data.savingsAccountData.status.value; diff --git a/src/app/savings/savings-account-view/transactions/edit-transaction/edit-transaction.component.html b/src/app/savings/savings-account-view/transactions/edit-transaction/edit-transaction.component.html index cf2ec09f1c..478838e5cc 100644 --- a/src/app/savings/savings-account-view/transactions/edit-transaction/edit-transaction.component.html +++ b/src/app/savings/savings-account-view/transactions/edit-transaction/edit-transaction.component.html @@ -14,10 +14,12 @@ /> - - {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editTransactionForm.controls.transactionDate.hasError('required')) { + + {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Payment Type' | translate }} - - {{ paymentType.name }} - + @for (paymentType of paymentTypeOptions; track paymentType) { + + {{ paymentType.name }} + + } @@ -47,30 +51,40 @@ - - {{ 'labels.inputs.Account Number' | translate }} - - + @if (editTransactionForm.controls['accountNumber']) { + + {{ 'labels.inputs.Account Number' | translate }} + + + } - - {{ 'labels.inputs.Cheque' | translate }} - - + @if (editTransactionForm.controls['checkNumber']) { + + {{ 'labels.inputs.Cheque' | translate }} + + + } - - {{ 'labels.inputs.Routing Code' | translate }} - - + @if (editTransactionForm.controls['routingCode']) { + + {{ 'labels.inputs.Routing Code' | translate }} + + + } - - {{ 'labels.inputs.Receipt Number' | translate }} - - + @if (editTransactionForm.controls['receiptNumber']) { + + {{ 'labels.inputs.Receipt Number' | translate }} + + + } - - {{ 'labels.inputs.Bank' | translate }} - - + @if (editTransactionForm.controls['bankNumber']) { + + {{ 'labels.inputs.Bank' | translate }} + + + } diff --git a/src/app/savings/savings-account-view/transactions/edit-transaction/edit-transaction.component.ts b/src/app/savings/savings-account-view/transactions/edit-transaction/edit-transaction.component.ts index ed3ed98664..a893718297 100644 --- a/src/app/savings/savings-account-view/transactions/edit-transaction/edit-transaction.component.ts +++ b/src/app/savings/savings-account-view/transactions/edit-transaction/edit-transaction.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -32,6 +32,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditTransactionComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private savingsService = inject(SavingsService); + private settingsService = inject(SettingsService); + /** Minimum Due Date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum Due Date allowed. */ @@ -54,6 +61,9 @@ export class EditTransactionComponent implements OnInit { transactionTemplateData: any; currency: Currency; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Saving Account transaction template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -63,14 +73,7 @@ export class EditTransactionComponent implements OnInit { * @param {Router} router Router for navigation. * @param {SettingsService} settingsService Setting service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private savingsService: SavingsService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { savingsAccountTransactionTemplate: any }) => { this.transactionTemplateData = data.savingsAccountTransactionTemplate; if (data.savingsAccountTransactionTemplate.currency) { diff --git a/src/app/savings/savings-account-view/transactions/view-reciept/view-reciept.component.ts b/src/app/savings/savings-account-view/transactions/view-reciept/view-reciept.component.ts index 8fb92db62c..6fac2ae0cb 100644 --- a/src/app/savings/savings-account-view/transactions/view-reciept/view-reciept.component.ts +++ b/src/app/savings/savings-account-view/transactions/view-reciept/view-reciept.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @@ -18,20 +18,23 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewRecieptComponent implements OnInit { + private sanitizer = inject(DomSanitizer); + private route = inject(ActivatedRoute); + /** trusted resource url for pentaho output */ pentahoUrl: any; /** Transaction Reciept Data */ transactionRecieptData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches transaction reciept `resolve` * @param {DomSanitizer} sanitizer DOM Sanitizer * @param {ActivatedRoute} route Activated Route */ - constructor( - private sanitizer: DomSanitizer, - private route: ActivatedRoute - ) { + constructor() { this.route.data.subscribe((data: { savingsTransactionReciept: any }) => { this.transactionRecieptData = data.savingsTransactionReciept; }); diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/datatable-transaction-tab/datatable-transaction-tab.component.ts b/src/app/savings/savings-account-view/transactions/view-transaction/datatable-transaction-tab/datatable-transaction-tab.component.ts index ad7a9a680c..496331c6da 100644 --- a/src/app/savings/savings-account-view/transactions/view-transaction/datatable-transaction-tab/datatable-transaction-tab.component.ts +++ b/src/app/savings/savings-account-view/transactions/view-transaction/datatable-transaction-tab/datatable-transaction-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { EntityDatatableTabComponent } from '../../../../../shared/tabs/entity-datatable-tab/entity-datatable-tab.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -13,13 +13,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DatatableTransactionTabComponent { + private route = inject(ActivatedRoute); + /** Transaction Id */ entityId: string; /** Savings Datatable */ entityDatatable: any; /** Multi Row Datatable Flag */ multiRowDatatableFlag: boolean; - constructor(private route: ActivatedRoute) { + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + constructor() { this.entityId = this.route.parent.parent.snapshot.paramMap.get('id'); this.route.data.subscribe((data: { transactionDatatable: any }) => { this.entityDatatable = data.transactionDatatable; diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.html b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.html index 215384d373..b6e717ab23 100644 --- a/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.html +++ b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.html @@ -1,48 +1,49 @@ - - - + + @if ( transactionData.transactionType.value === 'Transfer' || transactionData.reversed === 'true' || transactionData.transactionType.id === 3 || transactionData.transactionType.id === 17 - " - [routerLink]="'edit'" + ) { + + {{ 'labels.buttons.Edit' | translate }} + + } + + + } + @if (!transactionData.reversed && transactionData.transactionType.amountHold) { + + - {{ 'labels.buttons.Edit' | translate }} + {{ 'labels.buttons.Release Amount' | translate }} - - - - {{ 'labels.buttons.Release Amount' | translate }} - - - - - {{ 'labels.buttons.Undo' | translate }} - - + } + @if (allowUndo()) { + + + {{ 'labels.buttons.Undo' | translate }} + + + } @@ -91,19 +92,22 @@ {{ transactionData.amount | currency: transactionData.currency.code : 'symbol-narrow' : '1.2-2' }} - - {{ 'labels.inputs.Note' | translate }} - + @if (transactionData.note) { + + {{ 'labels.inputs.Note' | translate }} + + } - - {{ transactionData.note }} - + @if (transactionData.note) { + + {{ transactionData.note }} + + } - - + @if (transactionData.paymentDetailData) { + + + } diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.ts b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.ts index a428dbe9ab..98562000dd 100644 --- a/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.ts +++ b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; @@ -6,7 +6,7 @@ import { ReleaseAmountDialogComponent } from 'app/savings/savings-account-view/c import { UndoTransactionDialogComponent } from 'app/savings/savings-account-view/custom-dialogs/undo-transaction-dialog/undo-transaction-dialog.component'; import { SavingsService } from 'app/savings/savings.service'; import { SettingsService } from 'app/settings/settings.service'; -import { NgIf, NgClass, CurrencyPipe } from '@angular/common'; +import { NgClass, CurrencyPipe } from '@angular/common'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { TransactionPaymentDetailComponent } from '../../../../../shared/transaction-payment-detail/transaction-payment-detail.component'; import { DateFormatPipe } from '../../../../../pipes/date-format.pipe'; @@ -26,18 +26,21 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SavingsTransactionGeneralTabComponent { + private savingsService = inject(SavingsService); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private router = inject(Router); + dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + accountId: string; transactionId: string; transactionData: any; - constructor( - private savingsService: SavingsService, - private route: ActivatedRoute, - private dateUtils: Dates, - private router: Router, - public dialog: MatDialog, - private settingsService: SettingsService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { savingsAccountTransaction: any }) => { this.accountId = this.route.parent.snapshot.params['savingAccountId']; this.transactionData = data.savingsAccountTransaction; diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/view-transaction.component.html b/src/app/savings/savings-account-view/transactions/view-transaction/view-transaction.component.html index 99c9e9d27d..9303b2b1a7 100644 --- a/src/app/savings/savings-account-view/transactions/view-transaction/view-transaction.component.html +++ b/src/app/savings/savings-account-view/transactions/view-transaction/view-transaction.component.html @@ -9,7 +9,7 @@ > {{ 'labels.heading.General' | translate }} - + @for (entityDatatable of entityDatatables; track entityDatatable) { {{ entityDatatable.registeredTableName }} - + } diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/view-transaction.component.ts b/src/app/savings/savings-account-view/transactions/view-transaction/view-transaction.component.ts index e7ede7f030..bbbd17400f 100644 --- a/src/app/savings/savings-account-view/transactions/view-transaction/view-transaction.component.ts +++ b/src/app/savings/savings-account-view/transactions/view-transaction/view-transaction.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; @@ -19,6 +19,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewTransactionComponent { + private route = inject(ActivatedRoute); + dialog = inject(MatDialog); + /** Transaction data. */ transactionData: any; @@ -26,14 +29,14 @@ export class ViewTransactionComponent { /** Transaction Data Tables */ entityDatatables: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {Router} router Router for navigation. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private route: ActivatedRoute, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { transactionDatatables: any }) => { this.accountId = this.route.snapshot.params['savingAccountId']; this.entityDatatables = data.transactionDatatables; diff --git a/src/app/savings/savings-account-view/view-charge/view-charge.component.html b/src/app/savings/savings-account-view/view-charge/view-charge.component.html index 614299dc33..3bac9804dc 100644 --- a/src/app/savings/savings-account-view/view-charge/view-charge.component.html +++ b/src/app/savings/savings-account-view/view-charge/view-charge.component.html @@ -1,41 +1,56 @@ - - - - Pay - - - - Waive - - +@if (savingsAccountData.status.value === 'Active' && chargeData.amountOutstanding !== 0) { + + + + Pay + + + + Waive + + @if (isRecurringCharge()) { + + + + Inactivate + + + } + +} + +@if (savingsAccountData.status.value === 'Submitted and pending approval') { + + + + Edit + - Inactivate + Delete - - - - - - - Edit - - - - Delete - - + +} diff --git a/src/app/savings/savings-account-view/view-charge/view-charge.component.ts b/src/app/savings/savings-account-view/view-charge/view-charge.component.ts index 823482a9be..fc21ea3508 100644 --- a/src/app/savings/savings-account-view/view-charge/view-charge.component.ts +++ b/src/app/savings/savings-account-view/view-charge/view-charge.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -38,11 +38,21 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewChargeComponent { + private savingsService = inject(SavingsService); + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private router = inject(Router); + dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + /** Charge data. */ chargeData: any; /** Savings Account Data */ savingsAccountData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Charge data from `resolve`. * @param {SavingsService} savingsService Savings Service @@ -52,14 +62,7 @@ export class ViewChargeComponent { * @param {Dates} dateUtils Date Utils. * @param {SettingsService} settingsService Setting service */ - constructor( - private savingsService: SavingsService, - private route: ActivatedRoute, - private dateUtils: Dates, - private router: Router, - public dialog: MatDialog, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { savingsAccountCharge: any }) => { this.chargeData = data.savingsAccountCharge; }); diff --git a/src/app/savings/savings.service.ts b/src/app/savings/savings.service.ts index d637b3697a..58f030411c 100644 --- a/src/app/savings/savings.service.ts +++ b/src/app/savings/savings.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -12,7 +12,12 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class SavingsService { - constructor(private http: HttpClient) {} + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} /** * @param {string} savingAccountId is saving account's Id. diff --git a/src/app/search/search-page/search-page.component.html b/src/app/search/search-page/search-page.component.html index c038902e70..eadaa7fb96 100644 --- a/src/app/search/search-page/search-page.component.html +++ b/src/app/search/search-page/search-page.component.html @@ -1,71 +1,68 @@ - - {{ 'error.Searched query resulted more than 200 records' | translate }} + @if (hasResults) { + + @if (overload) { + {{ 'error.Searched query resulted more than 200 records' | translate }} + } + + + {{ 'labels.inputs.Entity Type' | translate }} + {{ entity.entityType }} + + + {{ 'labels.inputs.Entity Name' | translate }} + {{ entity.entityName }} + + + {{ 'labels.inputs.Account No' | translate }} + + + + + + {{ 'labels.inputs.External Id' | translate }} + + + + + + {{ 'labels.inputs.Parent Type' | translate }} + + {{ ['CLIENT', 'GROUP', 'CENTER'].includes(entity.entityType) ? 'Office' : 'Client' }} + + + + {{ 'labels.inputs.Parent Name' | translate }} + {{ entity.parentName }} + + + {{ 'labels.inputs.Details' | translate }} + + + + + + + + + + + + } - - - {{ 'labels.inputs.Entity Type' | translate }} - {{ entity.entityType }} - - - - {{ 'labels.inputs.Entity Name' | translate }} - {{ entity.entityName }} - - - - {{ 'labels.inputs.Account No' | translate }} - - - - - - - {{ 'labels.inputs.External Id' | translate }} - - - - - - - {{ 'labels.inputs.Parent Type' | translate }} - - {{ ['CLIENT', 'GROUP', 'CENTER'].includes(entity.entityType) ? 'Office' : 'Client' }} - - - - - {{ 'labels.inputs.Parent Name' | translate }} - {{ entity.parentName }} - - - - {{ 'labels.inputs.Details' | translate }} - - - - - - - - - - - - - - - - - - - {{ 'labels.text.No data found' | translate }} + @if (!hasResults) { + + + + + {{ 'labels.text.No data found' | translate }} + - - + + } diff --git a/src/app/search/search-page/search-page.component.ts b/src/app/search/search-page/search-page.component.ts index d4b3722be4..207a1a0854 100644 --- a/src/app/search/search-page/search-page.component.ts +++ b/src/app/search/search-page/search-page.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatTableDataSource, @@ -51,6 +51,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SearchPageComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Flags if number of search results exceed 200 */ overload: boolean; /** Datasource for loans disbursal table */ @@ -70,14 +73,14 @@ export class SearchPageComponent { hasResults = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { searchResults: any }) => { this.dataSource = new MatTableDataSource(data.searchResults); this.dataSource.paginator = this.paginator; diff --git a/src/app/search/search.resolver.ts b/src/app/search/search.resolver.ts index 31f2cd2a44..7a942681ca 100644 --- a/src/app/search/search.resolver.ts +++ b/src/app/search/search.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SearchService } from './search.service'; */ @Injectable() export class SearchResolver { + private searchService = inject(SearchService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SearchService} searchService Notifications service. */ - constructor(private searchService: SearchService) {} + constructor() {} /** * Returns the Search Resultsdata. diff --git a/src/app/search/search.service.ts b/src/app/search/search.service.ts index 2fbae84a13..5b095dd5dd 100644 --- a/src/app/search/search.service.ts +++ b/src/app/search/search.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -12,10 +12,15 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class SearchService { + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. */ - constructor(private http: HttpClient) {} + constructor() {} /** * @param {string} query Query String diff --git a/src/app/settings/settings.component.html b/src/app/settings/settings.component.html index 6e3957cf7d..05b431069e 100644 --- a/src/app/settings/settings.component.html +++ b/src/app/settings/settings.component.html @@ -14,27 +14,33 @@ {{ 'labels.inputs.Default Language' | translate }} - - {{ language.name }} - + @for (language of languages; track language) { + + {{ language.name }} + + } {{ 'labels.inputs.Default Date Format' | translate }} - - {{ dateFormat }} - + @for (dateFormat of dateFormats; track dateFormat) { + + {{ dateFormat }} + + } {{ 'labels.inputs.Decimals to Display' | translate }} - - {{ decimalOpt }} - + @for (decimalOpt of decimals; track decimalOpt) { + + {{ decimalOpt }} + + } @@ -76,9 +82,11 @@ {{ 'labels.inputs.Default Font' | translate }} - - {{ font }} - + @for (font of fonts; track font) { + + {{ font }} + + } diff --git a/src/app/settings/settings.component.ts b/src/app/settings/settings.component.ts index d9218afabe..7402b58b83 100644 --- a/src/app/settings/settings.component.ts +++ b/src/app/settings/settings.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; /** Custom Service */ import { SettingsService } from './settings.service'; @@ -32,6 +32,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SettingsComponent implements OnInit { + private settingsService = inject(SettingsService); + /** Placeholder for languages. update once translations are set up */ languages: any[] = [ { @@ -73,10 +75,13 @@ export class SettingsComponent implements OnInit { /** Decimals to Display Setting */ decimalsToDisplay = new UntypedFormControl(''); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SettingsService} settingsService Settings Service */ - constructor(private settingsService: SettingsService) {} + constructor() {} ngOnInit() { this.language.patchValue(this.settingsService.language); diff --git a/src/app/settings/settings.service.ts b/src/app/settings/settings.service.ts index 228c574cf2..fbd29b8853 100644 --- a/src/app/settings/settings.service.ts +++ b/src/app/settings/settings.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { AlertService } from 'app/core/alert/alert.service'; import { Dates } from 'app/core/utils/dates'; @@ -13,6 +13,9 @@ import { environment } from '../../environments/environment'; providedIn: 'root' }) export class SettingsService { + private alertService = inject(AlertService); + private dateUtils = inject(Dates); + public static businessDateFormat = 'yyyy-MM-dd'; public static businessDateConfigName = 'enable-business-date'; public static businessDateType = 'BUSINESS_DATE'; @@ -20,10 +23,10 @@ export class SettingsService { minAllowedDate = new Date(1950, 0, 1); maxAllowedDate = new Date(2100, 0, 1); - constructor( - private alertService: AlertService, - private dateUtils: Dates - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} /** * Sets date format setting throughout the app. diff --git a/src/app/shared/account-number/account-number.component.html b/src/app/shared/account-number/account-number.component.html index e9eea878bb..5cacc51dca 100644 --- a/src/app/shared/account-number/account-number.component.html +++ b/src/app/shared/account-number/account-number.component.html @@ -1,12 +1,20 @@ - - - {{ accountNo }} - - {{ accountNo }} - + @if (displayL && iconVisible) { + + } + @if (accountType) { + + {{ accountNo }} + + } + @if (!accountType) { + {{ accountNo }} + } + @if (displayR && iconVisible) { + + } diff --git a/src/app/shared/account-number/account-number.component.ts b/src/app/shared/account-number/account-number.component.ts index 6318411552..2971ff0127 100644 --- a/src/app/shared/account-number/account-number.component.ts +++ b/src/app/shared/account-number/account-number.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { Clipboard } from '@angular/cdk/clipboard'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -13,6 +13,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AccountNumberComponent implements OnInit { + private clipboard = inject(Clipboard); + @Input() accountNo: string; @Input() display = 'right'; @Input() clientId: number | null = null; @@ -23,7 +25,10 @@ export class AccountNumberComponent implements OnInit { displayL = false; displayR = true; - constructor(private clipboard: Clipboard) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.displayL = this.display === 'left'; diff --git a/src/app/shared/accounting/gl-account-display/gl-account-display.component.html b/src/app/shared/accounting/gl-account-display/gl-account-display.component.html index 49636ded3b..16863c276a 100644 --- a/src/app/shared/accounting/gl-account-display/gl-account-display.component.html +++ b/src/app/shared/accounting/gl-account-display/gl-account-display.component.html @@ -1,13 +1,16 @@ - - - {{ 'labels.inputs.' + accountTitle | translate }} - +@if (accountTitle) { + + + {{ 'labels.inputs.' + accountTitle | translate }} + + + {{ glAccountValue() }} + + +} - +@if (!accountTitle) { + {{ glAccountValue() }} - - - - {{ glAccountValue() }} - +} diff --git a/src/app/shared/accounting/gl-account-display/gl-account-display.component.ts b/src/app/shared/accounting/gl-account-display/gl-account-display.component.ts index 5d8aa6c75f..a8b9f3b97a 100644 --- a/src/app/shared/accounting/gl-account-display/gl-account-display.component.ts +++ b/src/app/shared/accounting/gl-account-display/gl-account-display.component.ts @@ -1,6 +1,6 @@ import { Component, Input } from '@angular/core'; import { GLAccount } from 'app/shared/models/general.model'; -import { NgIf, NgClass } from '@angular/common'; +import { NgClass } from '@angular/common'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @Component({ diff --git a/src/app/shared/accounting/gl-account-selector/gl-account-selector.component.html b/src/app/shared/accounting/gl-account-selector/gl-account-selector.component.html index 0bf2379865..9f7932092c 100644 --- a/src/app/shared/accounting/gl-account-selector/gl-account-selector.component.html +++ b/src/app/shared/accounting/gl-account-selector/gl-account-selector.component.html @@ -1,40 +1,48 @@ - - {{ 'labels.inputs.' + inputLabel | translate }} + @if (required) { + + {{ 'labels.inputs.' + inputLabel | translate }} + + + + + @for (glAccount of glAccountData | async; track glAccount) { + + {{ '(' + glAccount.glCode + ') ' + glAccount.name }} + + } + + @if (inputFormControl.hasError('required')) { + + {{ 'labels.inputs.Account' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - - - - - {{ '(' + glAccount.glCode + ') ' + glAccount.name }} - - - - {{ 'labels.inputs.Account' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.' + inputLabel | translate }} - - - - - - - - {{ '(' + glAccount.glCode + ') ' + glAccount.name }} - - - + @if (!required) { + + {{ 'labels.inputs.' + inputLabel | translate }} + + + + + + @for (glAccount of glAccountData | async; track glAccount) { + + {{ '(' + glAccount.glCode + ') ' + glAccount.name }} + + } + + + } diff --git a/src/app/shared/accounting/gl-account-selector/gl-account-selector.component.ts b/src/app/shared/accounting/gl-account-selector/gl-account-selector.component.ts index f5528438a3..8806070e51 100644 --- a/src/app/shared/accounting/gl-account-selector/gl-account-selector.component.ts +++ b/src/app/shared/accounting/gl-account-selector/gl-account-selector.component.ts @@ -1,10 +1,10 @@ -import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core'; +import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { TranslateService } from '@ngx-translate/core'; import { GLAccount } from 'app/shared/models/general.model'; import { ReplaySubject, Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; -import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { AsyncPipe } from '@angular/common'; import { NgxMatSelectSearchModule } from 'ngx-mat-select-search'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -19,6 +19,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GlAccountSelectorComponent implements OnInit, OnChanges, OnDestroy { + private translateService = inject(TranslateService); + @Input() inputFormControl: UntypedFormControl; @Input() glAccountList: GLAccount[] = []; @Input() required = false; @@ -36,7 +38,10 @@ export class GlAccountSelectorComponent implements OnInit, OnChanges, OnDestroy placeHolderLabel = ''; noEntriesFoundLabel = ''; - constructor(private translateService: TranslateService) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { // listen for search field value changes diff --git a/src/app/shared/accounting/view-journal-entry-transaction/view-journal-entry-transaction.component.html b/src/app/shared/accounting/view-journal-entry-transaction/view-journal-entry-transaction.component.html index 29a2051fe9..13a9ba625a 100644 --- a/src/app/shared/accounting/view-journal-entry-transaction/view-journal-entry-transaction.component.html +++ b/src/app/shared/accounting/view-journal-entry-transaction/view-journal-entry-transaction.component.html @@ -1,155 +1,158 @@ - - - - - {{ 'labels.buttons.Revert Transaction' | translate }} - - {{ 'labels.buttons.Transaction Reverted' | translate }} - - - - - - - - - {{ 'labels.inputs.Office' | translate }} - - - - {{ dataSource.data[0].officeName }} - - - - {{ 'labels.inputs.Transaction Date' | translate }} - - - - {{ dataSource.data[0].transactionDate | dateFormat }} - - - - {{ 'labels.inputs.Created By' | translate }} - - - - {{ dataSource.data[0].createdByUserName }} - - - - {{ 'labels.inputs.Submitted on' | translate }} - - - - {{ dataSource.data[0].submittedOnDate | datetimeFormat }} - - - - {{ 'labels.inputs.Manual Journal Entry' | translate }} - - - - {{ dataSource.data[0].manualEntry | yesNo }} - - - - {{ 'labels.inputs.External Asset Owner' | translate }} - - - - {{ dataSource.data[0].externalAssetOwner }} - - - - +@if (isJournalEntryLoaded) { + + @if (dataSource?.data[0].manualEntry) { + + + @if (!dataSource.data[0].reversed) { + + {{ 'labels.buttons.Revert Transaction' | translate }} + + } + @if (dataSource.data[0].reversed) { + {{ 'labels.buttons.Transaction Reverted' | translate }} + } + + + } + @if (isViewTransaction()) { + + @if (dataSource) { + + + + + {{ 'labels.inputs.Office' | translate }} + + + {{ dataSource.data[0].officeName }} + + + {{ 'labels.inputs.Transaction Date' | translate }} + + + {{ dataSource.data[0].transactionDate | dateFormat }} + + + {{ 'labels.inputs.Created By' | translate }} + + + {{ dataSource.data[0].createdByUserName }} + + + {{ 'labels.inputs.Submitted on' | translate }} + + + {{ dataSource.data[0].submittedOnDate | datetimeFormat }} + + + {{ 'labels.inputs.Manual Journal Entry' | translate }} + + + {{ dataSource.data[0].manualEntry | yesNo }} + + @if (dataSource.data[0].externalAssetOwner) { + + {{ 'labels.inputs.External Asset Owner' | translate }} + + } + @if (dataSource.data[0].externalAssetOwner) { + + {{ dataSource.data[0].externalAssetOwner }} + + } + + + + } + + } + + + + + {{ 'labels.inputs.Entry ID' | translate }} + + {{ transaction.id }} + + + + {{ 'labels.inputs.Type' | translate }} + + {{ transaction.glAccountType.value }} + + + + {{ 'labels.inputs.Account Code' | translate }} + + {{ transaction.glAccountCode }} + + + + {{ 'labels.inputs.Account Name' | translate }} + + {{ transaction.glAccountName }} + + + + {{ 'labels.inputs.Debit' | translate }} + + + @if (transaction.entryType.value === 'DEBIT') { + + {{ transaction.currency.displaySymbol || transaction.currency.code }} + {{ transaction.amount | formatNumber }} + + } + + + + + {{ 'labels.inputs.Credit' | translate }} + + + @if (transaction.entryType.value === 'CREDIT') { + + {{ transaction.currency.displaySymbol || transaction.currency.code }} + {{ transaction.amount | formatNumber }} + + } + + + + + + + + {{ 'labels.buttons.Back' | translate }} + + + - - - - - - {{ 'labels.inputs.Entry ID' | translate }} - - {{ transaction.id }} - - - - {{ 'labels.inputs.Type' | translate }} - {{ transaction.glAccountType.value }} - - - - - {{ 'labels.inputs.Account Code' | translate }} - - {{ transaction.glAccountCode }} - - - - - {{ 'labels.inputs.Account Name' | translate }} - - {{ transaction.glAccountName }} - - - - - {{ 'labels.inputs.Debit' | translate }} - - - - {{ transaction.currency.displaySymbol || transaction.currency.code }} - {{ transaction.amount | formatNumber }} - - - - - - - {{ 'labels.inputs.Credit' | translate }} - - - - {{ transaction.currency.displaySymbol || transaction.currency.code }} - {{ transaction.amount | formatNumber }} - - - - - - - - +} + +@if (!isJournalEntryLoaded) { + + + + + {{ 'labels.text.No data found' | translate }} + + {{ 'labels.buttons.Back' | translate }} - - - - - - - {{ 'labels.text.No data found' | translate }} - - - - - - {{ 'labels.buttons.Back' | translate }} - - - +} diff --git a/src/app/shared/accounting/view-journal-entry-transaction/view-journal-entry-transaction.component.ts b/src/app/shared/accounting/view-journal-entry-transaction/view-journal-entry-transaction.component.ts index 57436d9cfd..196a433679 100644 --- a/src/app/shared/accounting/view-journal-entry-transaction/view-journal-entry-transaction.component.ts +++ b/src/app/shared/accounting/view-journal-entry-transaction/view-journal-entry-transaction.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ViewJournalEntryComponent } from '../view-journal-entry/view-journal-entry.component'; import { RevertTransactionComponent } from 'app/accounting/revert-transaction/revert-transaction.component'; import { AccountingService } from 'app/accounting/accounting.service'; @@ -19,7 +19,7 @@ import { MatRowDef, MatRow } from '@angular/material/table'; -import { Location, NgIf } from '@angular/common'; +import { Location } from '@angular/common'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { DateFormatPipe } from '../../../pipes/date-format.pipe'; import { DatetimeFormatPipe } from '../../../pipes/datetime-format.pipe'; @@ -53,6 +53,12 @@ import { YesnoPipe } from '@pipes/yesno.pipe'; ] }) export class ViewJournalEntryTransactionComponent implements OnInit { + private accountingService = inject(AccountingService); + private route = inject(ActivatedRoute); + private router = inject(Router); + dialog = inject(MatDialog); + private location = inject(Location); + title: string; journalEntriesData: any[]; /** Transaction data. */ @@ -80,19 +86,16 @@ export class ViewJournalEntryTransactionComponent implements OnInit { isManualJournalEntry = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {AccountingService} accountingService Accounting Service. * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private accountingService: AccountingService, - private route: ActivatedRoute, - private router: Router, - public dialog: MatDialog, - private location: Location - ) {} + constructor() {} /** * Retrieves the transaction data from `resolve` and sets the transaction table. diff --git a/src/app/shared/accounting/view-journal-entry/view-journal-entry.component.html b/src/app/shared/accounting/view-journal-entry/view-journal-entry.component.html index 0906b5b60f..da508a5cf7 100644 --- a/src/app/shared/accounting/view-journal-entry/view-journal-entry.component.html +++ b/src/app/shared/accounting/view-journal-entry/view-journal-entry.component.html @@ -39,8 +39,12 @@ {{ 'labels.heading.View Journal Entry' | translate }} - {{ 'labels.inputs.Credit' | translate }} - {{ 'labels.inputs.Debit' | translate }} + @if (data.journalEntry.entryType.value === 'CREDIT') { + {{ 'labels.inputs.Credit' | translate }} + } + @if (data.journalEntry.entryType.value === 'DEBIT') { + {{ 'labels.inputs.Debit' | translate }} + } {{ data.journalEntry.currency.displaySymbol }} {{ data.journalEntry.amount | formatNumber }} @@ -50,54 +54,74 @@ {{ 'labels.heading.View Journal Entry' | translate }} ({{ data.journalEntry.currency.code }}) {{ data.journalEntry.currency.name }} - - {{ 'labels.inputs.Reference Number' | translate }} - {{ data.journalEntry.referenceNumber }} - - - - {{ 'labels.inputs.Comments' | translate }} - {{ data.journalEntry.comments }} - - - - {{ 'labels.inputs.Payment Details' | translate }} - - - - {{ 'labels.inputs.Payment Type' | translate }} - {{ data.journalEntry.transactionDetails.paymentDetails.paymentType.name }} - - - - {{ 'labels.inputs.Account Number' | translate }} - {{ data.journalEntry.transactionDetails.paymentDetails.accountNumber }} - - - - {{ 'labels.inputs.Cheque Number' | translate }} - {{ data.journalEntry.transactionDetails.paymentDetails.checkNumber }} - - - - {{ 'labels.inputs.Routing Code' | translate }} - {{ data.journalEntry.transactionDetails.paymentDetails.routingCode }} - - - - {{ 'labels.inputs.Receipt Number' | translate }} - {{ data.journalEntry.transactionDetails.paymentDetails.receiptNumber }} - - - - {{ 'labels.inputs.Bank Number' | translate }} - {{ data.journalEntry.transactionDetails.paymentDetails.bankNumber }} - - - - {{ 'labels.inputs.Created by' | translate }} - {{ data.journalEntry.createdByUserName }} - + @if (data.journalEntry.referenceNumber) { + + {{ 'labels.inputs.Reference Number' | translate }} + {{ data.journalEntry.referenceNumber }} + + } + + @if (data.journalEntry.comments) { + + {{ 'labels.inputs.Comments' | translate }} + {{ data.journalEntry.comments }} + + } + + @if (existsPaymentDetails) { + + {{ 'labels.inputs.Payment Details' | translate }} + + } + + @if (existsPaymentDetails && data.journalEntry.transactionDetails.paymentDetails?.paymentType) { + + {{ 'labels.inputs.Payment Type' | translate }} + {{ data.journalEntry.transactionDetails.paymentDetails.paymentType.name }} + + } + + @if (existsPaymentDetails && data.journalEntry.transactionDetails.paymentDetails?.accountNumber) { + + {{ 'labels.inputs.Account Number' | translate }} + {{ data.journalEntry.transactionDetails.paymentDetails.accountNumber }} + + } + + @if (existsPaymentDetails && data.journalEntry.transactionDetails.paymentDetails?.checkNumber) { + + {{ 'labels.inputs.Cheque Number' | translate }} + {{ data.journalEntry.transactionDetails.paymentDetails.checkNumber }} + + } + + @if (existsPaymentDetails && data.journalEntry.transactionDetails.paymentDetails?.routingCode) { + + {{ 'labels.inputs.Routing Code' | translate }} + {{ data.journalEntry.transactionDetails.paymentDetails.routingCode }} + + } + + @if (existsPaymentDetails && data.journalEntry.transactionDetails.paymentDetails?.receiptNumber) { + + {{ 'labels.inputs.Receipt Number' | translate }} + {{ data.journalEntry.transactionDetails.paymentDetails.receiptNumber }} + + } + + @if (existsPaymentDetails && data.journalEntry.transactionDetails.paymentDetails?.bankNumber) { + + {{ 'labels.inputs.Bank Number' | translate }} + {{ data.journalEntry.transactionDetails.paymentDetails.bankNumber }} + + } + + @if (existsPaymentDetails) { + + {{ 'labels.inputs.Created by' | translate }} + {{ data.journalEntry.createdByUserName }} + + } {{ 'labels.inputs.Submitted on' | translate }} diff --git a/src/app/shared/accounting/view-journal-entry/view-journal-entry.component.ts b/src/app/shared/accounting/view-journal-entry/view-journal-entry.component.ts index 69e20b13d5..3f4615cc97 100644 --- a/src/app/shared/accounting/view-journal-entry/view-journal-entry.component.ts +++ b/src/app/shared/accounting/view-journal-entry/view-journal-entry.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -34,15 +34,20 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewJournalEntryComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + existsPaymentDetails = false; + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Provides journal entry. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) { + constructor() { + const data = this.data; + this.existsPaymentDetails = data.journalEntry.transactionDetails != null && data.journalEntry.transactionDetails.paymentDetails != null; } diff --git a/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.html b/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.html index 7756a9a622..1460392947 100644 --- a/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.html +++ b/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.html @@ -1,150 +1,159 @@ - - {{ 'labels.inputs.Type' | translate }}: - {{ 'labels.accounting.' + getAccountingRuleName(accountingRule.value) | translate }} - + @if (accountingRule) { + + {{ 'labels.inputs.Type' | translate }}: + {{ 'labels.accounting.' + getAccountingRuleName(accountingRule.value) | translate }} + + } - - {{ 'labels.heading.Assets' | translate }} - - - - - - - - - - - - - - - - - - - {{ 'labels.heading.Liabilities' | translate }} + @if (isCashOrAccrualAccounting()) { + + {{ 'labels.heading.Assets' | translate }} - - - - - - + @if (accountingMappings.overdraftPortfolioControl) { + + + } - - + @if (isAccrualAccounting()) { + + + } - - {{ 'labels.heading.Income' | translate }} - - - - - - - - - - - - - {{ 'labels.heading.Expenses' | translate }} - - - - - - - + @if (isAccrualAccounting()) { + + + } + @if (isAccrualAccounting()) { + + + } + {{ 'labels.heading.Liabilities' | translate }} + + + + + + + + + + @if (isAccrualAccounting()) { + + + } + + + @if (accountingMappings.escheatLiabilityAccount) { + + + } + + {{ 'labels.heading.Income' | translate }} + + + + + + + + + + @if (accountingMappings.incomeFromInterest) { + + + } + + {{ 'labels.heading.Expenses' | translate }} + + + + + + @if (accountingMappings.writeOffAccount) { + + + } + - + } diff --git a/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.ts b/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.ts index 5785a5b748..105fd1a62e 100644 --- a/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.ts +++ b/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.ts @@ -1,4 +1,4 @@ -import { Component, Input } from '@angular/core'; +import { Component, Input, inject } from '@angular/core'; import { Accounting } from 'app/core/utils/accounting'; import { OptionData } from 'app/shared/models/option-data.model'; import { GlAccountDisplayComponent } from '../gl-account-display/gl-account-display.component'; @@ -14,10 +14,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewSavingsAccountingDetailsComponent { + private accounting = inject(Accounting); + @Input() accountingRule: OptionData; @Input() accountingMappings: any[] = []; - constructor(private accounting: Accounting) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} isCashOrAccrualAccounting(): boolean { if (this.accountingRule) { diff --git a/src/app/shared/cancel-dialog/cancel-dialog.component.html b/src/app/shared/cancel-dialog/cancel-dialog.component.html index 4503d3be16..9c7231c469 100644 --- a/src/app/shared/cancel-dialog/cancel-dialog.component.html +++ b/src/app/shared/cancel-dialog/cancel-dialog.component.html @@ -1,11 +1,11 @@ {{ 'labels.buttons.Cancel' | translate }} - - {{ 'labels.text.Are you sure you want to leave this page and lose all inputted data' | translate }}? - - - {{ 'labels.text.Are you sure you want to cancel' | translate }} {{ data.cancelContext }} ? - + @if (!data.cancelContext) { + {{ 'labels.text.Are you sure you want to leave this page and lose all inputted data' | translate }}? + } + @if (data.cancelContext) { + {{ 'labels.text.Are you sure you want to cancel' | translate }} {{ data.cancelContext }} ? + } {{ 'labels.buttons.No' | translate }} diff --git a/src/app/shared/cancel-dialog/cancel-dialog.component.ts b/src/app/shared/cancel-dialog/cancel-dialog.component.ts index f57908075e..e0a3a6909b 100644 --- a/src/app/shared/cancel-dialog/cancel-dialog.component.ts +++ b/src/app/shared/cancel-dialog/cancel-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef, @@ -28,11 +28,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CancelDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/shared/change-password-dialog/change-password-dialog.component.html b/src/app/shared/change-password-dialog/change-password-dialog.component.html index a9d83fc97c..576ac5925f 100644 --- a/src/app/shared/change-password-dialog/change-password-dialog.component.html +++ b/src/app/shared/change-password-dialog/change-password-dialog.component.html @@ -9,17 +9,17 @@ {{ 'labels.heading.Change Password' | translate }} label="{{ 'Password' | translateKey: 'inputs' }}" > - - {{ 'labels.commons.Password validation' | translate: { minchar: minPasswordLength } }} - + @if ( + changePasswordForm.get('password').errors?.['uppercase'] || + changePasswordForm.get('password').errors?.['number'] || + changePasswordForm.get('password').errors?.['repeated'] || + changePasswordForm.get('password').errors?.['specialChar'] || + changePasswordForm.get('password').errors?.['minlength'] + ) { + + {{ 'labels.commons.Password validation' | translate: { minchar: minPasswordLength } }} + + } {{ 'labels.heading.Change Password' | translate }} - - {{ 'Passwords do not match' | translateKey: 'inputs' }} - + @if (changePasswordForm.get('repeatPassword').errors?.['notequal']) { + + {{ 'Passwords do not match' | translateKey: 'inputs' }} + + } diff --git a/src/app/shared/change-password-dialog/change-password-dialog.component.ts b/src/app/shared/change-password-dialog/change-password-dialog.component.ts index feb7b1fffd..aff6703df9 100644 --- a/src/app/shared/change-password-dialog/change-password-dialog.component.ts +++ b/src/app/shared/change-password-dialog/change-password-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -41,6 +41,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ChangePasswordDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + private formBuilder = inject(UntypedFormBuilder); + private passwordsUtility = inject(PasswordsUtility); + minPasswordLength: number = environment.minPasswordLength | 12; /** Change Password Form */ @@ -51,16 +56,14 @@ export class ChangePasswordDialogComponent implements OnInit { 'password' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Provides any data. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any, - private formBuilder: UntypedFormBuilder, - private passwordsUtility: PasswordsUtility - ) {} + constructor() {} ngOnInit() { this.createChangePasswordForm(); diff --git a/src/app/shared/confirmation-dialog/confirmation-dialog.component.ts b/src/app/shared/confirmation-dialog/confirmation-dialog.component.ts index 53c5699421..65b1df0540 100644 --- a/src/app/shared/confirmation-dialog/confirmation-dialog.component.ts +++ b/src/app/shared/confirmation-dialog/confirmation-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -30,16 +30,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ConfirmationDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + private dialogs = inject(Dialogs); + data = inject(MAT_DIALOG_DATA); + color: string; + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Provides a deleteContext. */ - constructor( - public dialogRef: MatDialogRef, - private dialogs: Dialogs, - @Inject(MAT_DIALOG_DATA) public data: DialogData - ) {} + constructor() {} ngOnInit() { this.setColor(); diff --git a/src/app/shared/datetime-picker-stub/datetime-picker-stub.component.ts b/src/app/shared/datetime-picker-stub/datetime-picker-stub.component.ts index 36cea67cb6..aff347e3d9 100644 --- a/src/app/shared/datetime-picker-stub/datetime-picker-stub.component.ts +++ b/src/app/shared/datetime-picker-stub/datetime-picker-stub.component.ts @@ -2,7 +2,6 @@ import { Component, Input } from '@angular/core'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; /* eslint-disable @angular-eslint/component-selector */ -/* eslint-disable @angular-eslint/prefer-standalone */ @Component({ selector: 'ngx-mat-datetime-picker', template: ` diff --git a/src/app/shared/delete-dialog/delete-dialog.component.ts b/src/app/shared/delete-dialog/delete-dialog.component.ts index 17d6ef77c4..80c414bddb 100644 --- a/src/app/shared/delete-dialog/delete-dialog.component.ts +++ b/src/app/shared/delete-dialog/delete-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,12 +28,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DeleteDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Provides a deleteContext. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/shared/disable-dialog/disable-dialog.component.ts b/src/app/shared/disable-dialog/disable-dialog.component.ts index 7836d3ed31..c714d83670 100644 --- a/src/app/shared/disable-dialog/disable-dialog.component.ts +++ b/src/app/shared/disable-dialog/disable-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,12 +28,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DisableDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Provides a disableContext. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/shared/dropdown/dropdown.component.html b/src/app/shared/dropdown/dropdown.component.html index b1643a1757..fd86d87ac4 100644 --- a/src/app/shared/dropdown/dropdown.component.html +++ b/src/app/shared/dropdown/dropdown.component.html @@ -1,11 +1,15 @@ {{ getLabelText() }} - - {{ option.value | translateKey: 'catalogs' }} - + @for (option of selectOptions; track option) { + + {{ option.value | translateKey: 'catalogs' }} + + } - - {{ 'labels.buttons.Close' | translate }} - + @if (controlSelect) { + + {{ 'labels.buttons.Close' | translate }} + + } diff --git a/src/app/shared/dropdown/dropdown.component.ts b/src/app/shared/dropdown/dropdown.component.ts index fbe98e3a41..a6faa72d25 100644 --- a/src/app/shared/dropdown/dropdown.component.ts +++ b/src/app/shared/dropdown/dropdown.component.ts @@ -1,4 +1,4 @@ -import { Component, Input } from '@angular/core'; +import { Component, Input, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { TranslateService } from '@ngx-translate/core'; import { MatIconButton } from '@angular/material/button'; @@ -16,13 +16,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DropdownComponent { + private translateService = inject(TranslateService); + @Input() placeHolderText: string; @Input() labelText: string; @Input() selectOptions: any[] = []; @Input() controlSelect: UntypedFormControl; @Input() required: boolean; - constructor(private translateService: TranslateService) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} getPlaceHolderText(): string { return this.placeHolderText ? this.translateService.instant('labels.inputs.' + this.placeHolderText) : ''; diff --git a/src/app/shared/enable-dialog/enable-dialog.component.ts b/src/app/shared/enable-dialog/enable-dialog.component.ts index 4974c15dc7..7b1d8a1bd1 100644 --- a/src/app/shared/enable-dialog/enable-dialog.component.ts +++ b/src/app/shared/enable-dialog/enable-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,12 +28,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EnableDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Provides a enableContext. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/shared/entity-name/entity-name.component.html b/src/app/shared/entity-name/entity-name.component.html index 663449335d..1c0fc9256e 100644 --- a/src/app/shared/entity-name/entity-name.component.html +++ b/src/app/shared/entity-name/entity-name.component.html @@ -1,11 +1,15 @@ - + @if (displayL && iconVisible) { + + } {{ entityName }} - + @if (displayR && iconVisible) { + + } diff --git a/src/app/shared/entity-name/entity-name.component.ts b/src/app/shared/entity-name/entity-name.component.ts index a981775072..904c5662b8 100644 --- a/src/app/shared/entity-name/entity-name.component.ts +++ b/src/app/shared/entity-name/entity-name.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { Clipboard } from '@angular/cdk/clipboard'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -13,6 +13,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EntityNameComponent implements OnInit { + private clipboard = inject(Clipboard); + @Input() entityName: string; @Input() display = 'right'; @@ -20,7 +22,10 @@ export class EntityNameComponent implements OnInit { displayL = false; displayR = true; - constructor(private clipboard: Clipboard) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.displayL = this.display === 'left'; diff --git a/src/app/shared/error-dialog/error-dialog.component.html b/src/app/shared/error-dialog/error-dialog.component.html index 299b066e82..d1bc1b0436 100644 --- a/src/app/shared/error-dialog/error-dialog.component.html +++ b/src/app/shared/error-dialog/error-dialog.component.html @@ -1,8 +1,12 @@ {{ 'Error Log' | translate }} - {{ data }} - + @if (!showAsCode) { + {{ data }} + } + @if (showAsCode) { + + } diff --git a/src/app/shared/error-dialog/error-dialog.component.ts b/src/app/shared/error-dialog/error-dialog.component.ts index 4b41417f0d..74d1df6033 100644 --- a/src/app/shared/error-dialog/error-dialog.component.ts +++ b/src/app/shared/error-dialog/error-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -25,15 +25,20 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ErrorDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + showAsCode = false; + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Provides any data. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: string - ) { + constructor() { + const data = this.data; + this.showAsCode = data.startsWith(''); } } diff --git a/src/app/shared/external-identifier/external-identifier.component.html b/src/app/shared/external-identifier/external-identifier.component.html index 55899e3211..2738d1a9f6 100644 --- a/src/app/shared/external-identifier/external-identifier.component.html +++ b/src/app/shared/external-identifier/external-identifier.component.html @@ -1,16 +1,24 @@ - - - - {{ externalId | externalIdentifier }} - {{ externalId }} - - - +@if (!emptyValue) { + + @if (displayL && iconVisible) { + + } + @if (displayL && !completed && iconVisible && isLongValue()) { + + } + @if (!completed) { + {{ externalId | externalIdentifier }} + } + @if (completed) { + {{ externalId }} + } + @if (displayR && !completed && iconVisible && isLongValue()) { + + } + @if (displayR && iconVisible) { + + } + +} diff --git a/src/app/shared/external-identifier/external-identifier.component.ts b/src/app/shared/external-identifier/external-identifier.component.ts index 2f5f6b7580..0f5bd8dc34 100644 --- a/src/app/shared/external-identifier/external-identifier.component.ts +++ b/src/app/shared/external-identifier/external-identifier.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { Clipboard } from '@angular/cdk/clipboard'; import { AlertService } from 'app/core/alert/alert.service'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @@ -16,6 +16,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ExternalIdentifierComponent implements OnInit { + private clipboard = inject(Clipboard); + private alertService = inject(AlertService); + @Input() externalId: string; @Input() completed = false; @Input() display = 'right'; @@ -25,10 +28,10 @@ export class ExternalIdentifierComponent implements OnInit { displayR = true; emptyValue = false; - constructor( - private clipboard: Clipboard, - private alertService: AlertService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.emptyValue = !this.externalId || this.externalId === ''; diff --git a/src/app/shared/footer/footer.component.html b/src/app/shared/footer/footer.component.html index 7c3eefa0b7..66c48c161a 100644 --- a/src/app/shared/footer/footer.component.html +++ b/src/app/shared/footer/footer.component.html @@ -1,35 +1,41 @@ - - - +} {{ 'APP_NAME' | translate }} {{ 'labels.text.by' | translate }} Mifos diff --git a/src/app/shared/footer/footer.component.ts b/src/app/shared/footer/footer.component.ts index 36d21b3aeb..c048e6d6b6 100644 --- a/src/app/shared/footer/footer.component.ts +++ b/src/app/shared/footer/footer.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Input, OnDestroy, OnInit } from '@angular/core'; +import { Component, Input, OnDestroy, OnInit, inject } from '@angular/core'; import { Alert } from 'app/core/alert/alert.model'; import { AlertService } from 'app/core/alert/alert.service'; import { AuthenticationService } from 'app/core/authentication/authentication.service'; @@ -11,7 +11,7 @@ import { VersionService } from 'app/system/version.service'; /** Environment Configuration */ import { environment } from '../../../environments/environment'; import { Subscription } from 'rxjs'; -import { NgIf, NgClass, DatePipe } from '@angular/common'; +import { NgClass, DatePipe } from '@angular/common'; import { MatDivider } from '@angular/material/divider'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -30,6 +30,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FooterComponent implements OnInit, OnDestroy { + private systemService = inject(SystemService); + private settingsService = inject(SettingsService); + private authenticationService = inject(AuthenticationService); + private alertService = inject(AlertService); + private dateUtils = inject(Dates); + private versionService = inject(VersionService); + @Input() styleClass: string = ''; /** Mifos X version. */ @@ -54,14 +61,10 @@ export class FooterComponent implements OnInit, OnDestroy { displayBackEndInfo = true; - constructor( - private systemService: SystemService, - private settingsService: SettingsService, - private authenticationService: AuthenticationService, - private alertService: AlertService, - private dateUtils: Dates, - private versionService: VersionService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.displayBackEndInfo = environment.displayBackEndInfo === 'true'; } diff --git a/src/app/shared/form-dialog/form-dialog.component.html b/src/app/shared/form-dialog/form-dialog.component.html index 4fc3ba965f..21400e4d92 100644 --- a/src/app/shared/form-dialog/form-dialog.component.html +++ b/src/app/shared/form-dialog/form-dialog.component.html @@ -8,9 +8,11 @@ {{ data.title }} 'responsive-column' ]" > - - - + @for (formfield of formfields; track formfield) { + + + + } diff --git a/src/app/shared/form-dialog/form-dialog.component.ts b/src/app/shared/form-dialog/form-dialog.component.ts index 88177e9bf8..139b33a429 100644 --- a/src/app/shared/form-dialog/form-dialog.component.ts +++ b/src/app/shared/form-dialog/form-dialog.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -13,7 +13,7 @@ import { FormfieldBase } from './formfield/model/formfield-base'; import { FormGroupService } from './form-group.service'; import { CdkScrollable } from '@angular/cdk/scrolling'; -import { NgClass, NgFor } from '@angular/common'; +import { NgClass } from '@angular/common'; import { FormfieldComponent } from './formfield/formfield.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -35,6 +35,10 @@ const layoutGap = 2; ] }) export class FormDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + private formGroupService = inject(FormGroupService); + layout: { columns: number; columnWidth?: number; @@ -54,11 +58,12 @@ export class FormDialogComponent implements OnInit { formfields: FormfieldBase[]; pristine: boolean; - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any, - private formGroupService: FormGroupService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { + const data = this.data; + this.dialogRef.disableClose = data.disableClose !== undefined ? data.disableClose : true; this.formfields = data.formfields.sort( (formfieldA: FormfieldBase, formfieldB: FormfieldBase) => formfieldA.order - formfieldB.order diff --git a/src/app/shared/form-dialog/formfield/formfield.component.html b/src/app/shared/form-dialog/formfield/formfield.component.html index 360bea335e..7cf6a9298f 100644 --- a/src/app/shared/form-dialog/formfield/formfield.component.html +++ b/src/app/shared/form-dialog/formfield/formfield.component.html @@ -1,80 +1,95 @@ - - - {{ formfield.label }} + @if (formfield.controlType === 'input' || formfield.controlType === 'select') { + + + {{ formfield.label }} + @if (formfield.controlType === 'input') { + + } + @if (form.controls[formfield.controlName].hasError('max')) { + + {{ 'labels.commons.Maximum Value must be' | translate }} {{ formfield.max }} + + } + @if (form.controls[formfield.controlName].hasError('min')) { + + {{ 'labels.commons.Minimum Value must be' | translate }} {{ formfield.min }} + + } + @if (formfield.controlType === 'select') { + + @for (option of formfield.options.data; track option) { + + {{ option[formfield.options.label] }} + + } + + } + @if (form.controls[formfield.controlName].hasError('required')) { + + {{ formfield.label }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + } + @if (formfield.controlType === 'datepicker') { + + {{ formfield.label }} - - {{ 'labels.commons.Maximum Value must be' | translate }} {{ formfield.max }} - - - {{ 'labels.commons.Minimum Value must be' | translate }} {{ formfield.min }} - + + + @if (form.controls[formfield.controlName].hasError('required')) { + + {{ formfield.label }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - + {{ formfield.label }} + - - {{ option[formfield.options.label] }} - - - - - {{ formfield.label }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + /> + @if (form.controls[formfield.controlName].hasError('required')) { + + {{ formfield.label }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - - - {{ formfield.label }} - - - - - {{ formfield.label }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + } - - {{ formfield.label }} - - - {{ formfield.label }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ formfield.label }} - + > + {{ formfield.label }} + + } diff --git a/src/app/shared/icons.module.ts b/src/app/shared/icons.module.ts index 3b07074325..39920a40cd 100644 --- a/src/app/shared/icons.module.ts +++ b/src/app/shared/icons.module.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { NgModule } from '@angular/core'; +import { NgModule, inject } from '@angular/core'; /** Angular Font Awesome Imports */ import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome'; @@ -124,7 +124,12 @@ import { exports: [FontAwesomeModule] }) export class IconsModule { - constructor(library: FaIconLibrary) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { + const library = inject(FaIconLibrary); + library.addIcons( faAnchor, faArchive, diff --git a/src/app/shared/input-amount/input-amount.component.html b/src/app/shared/input-amount/input-amount.component.html index 7e79760022..bf4475e25d 100644 --- a/src/app/shared/input-amount/input-amount.component.html +++ b/src/app/shared/input-amount/input-amount.component.html @@ -1,40 +1,50 @@ - - {{ 'labels.inputs.' + inputLabel | translate }} - - {{ currency.code }} +@if (isRequired) { + + {{ 'labels.inputs.' + inputLabel | translate }} + + {{ currency.code }} + + + @if (inputFormControl.hasError('required')) { + + {{ 'labels.inputs.' + inputLabel | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (displayHint) { + {{ + inputFormControl.value | currency: currency.code : currency.displaySymbol : '1.2-2' + }} + } + +} +@if (!isRequired) { + + {{ 'labels.inputs.' + inputLabel | translate }} + {{ currency.code }} + - - - {{ 'labels.inputs.' + inputLabel | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - {{ - inputFormControl.value | currency: currency.code : currency.displaySymbol : '1.2-2' - }} - - - {{ 'labels.inputs.' + inputLabel | translate }} - {{ currency.code }} - - - {{ - inputFormControl.value | currency: currency.code : currency.displaySymbol : '1.2-2' - }} - + @if (displayHint) { + {{ + inputFormControl.value | currency: currency.code : currency.displaySymbol : '1.2-2' + }} + } + +} diff --git a/src/app/shared/input-amount/input-amount.component.ts b/src/app/shared/input-amount/input-amount.component.ts index 3a4eb68817..a28cf16f9f 100644 --- a/src/app/shared/input-amount/input-amount.component.ts +++ b/src/app/shared/input-amount/input-amount.component.ts @@ -1,7 +1,7 @@ import { Component, Input } from '@angular/core'; import { Currency } from '../models/general.model'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; -import { NgIf, CurrencyPipe } from '@angular/common'; +import { CurrencyPipe } from '@angular/common'; import { MatFormField, MatLabel, MatError, MatHint, MatSuffix } from '@angular/material/form-field'; import { FormatAmountDirective } from '../../directives/format-amount.directive'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; diff --git a/src/app/shared/input-password/input-password.component.html b/src/app/shared/input-password/input-password.component.html index 9a5061c273..ed65556733 100644 --- a/src/app/shared/input-password/input-password.component.html +++ b/src/app/shared/input-password/input-password.component.html @@ -11,6 +11,10 @@ [value]="value" /> {{ icon }} - {{ label }} is a required field. - {{ customErrorMessage }} + @if (ngControl.hasError('required')) { + {{ label }} is a required field. + } + @if (ngControl.hasError(customErrorName)) { + {{ customErrorMessage }} + } diff --git a/src/app/shared/input-password/input-password.component.ts b/src/app/shared/input-password/input-password.component.ts index fefa12f2e4..79cb18fe84 100644 --- a/src/app/shared/input-password/input-password.component.ts +++ b/src/app/shared/input-password/input-password.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, Optional, Self, ViewChild } from '@angular/core'; +import { Component, Input, ViewChild, inject } from '@angular/core'; import { AbstractControl, ControlValueAccessor, @@ -22,6 +22,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class InputPasswordComponent implements ControlValueAccessor, ErrorStateMatcher { + ngControl = inject(NgControl, { optional: true, self: true }); + disabled = false; icon = 'visibility_off'; @@ -61,7 +63,12 @@ export class InputPasswordComponent implements ControlValueAccessor, ErrorStateM private _visible = false; - constructor(@Optional() @Self() public ngControl: NgControl) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { + const ngControl = this.ngControl; + if (ngControl !== null) { ngControl.valueAccessor = this; } diff --git a/src/app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component.html b/src/app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component.html index af94c4c659..c84c542e2c 100644 --- a/src/app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component.html +++ b/src/app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component.html @@ -2,25 +2,33 @@ {{ 'labels.heading.Keyboard Shortcuts' | translate }} - + @for (item of buttonConfig.buttonCombinations; track item) { - - {{ 'labels.inputs.Ctrl' | translate }} + - - - {{ 'labels.inputs.Shift' | translate }} + - - - {{ 'labels.inputs.Alt' | translate }} + - - - {{ item.key }} + @if (item.ctrlKey) { + + {{ 'labels.inputs.Ctrl' | translate }} + + + } + @if (item.shiftKey) { + + {{ 'labels.inputs.Shift' | translate }} + + + } + @if (item.altKey) { + + {{ 'labels.inputs.Alt' | translate }} + + + } + @if (item.key) { + + {{ item.key }} + } {{ item.title }} - + } diff --git a/src/app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component.ts b/src/app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component.ts index acba005c77..3e3ccd61f1 100644 --- a/src/app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component.ts +++ b/src/app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; import { KeyboardShortcutsConfiguration } from '../../keyboards-shortcut-config'; import { CdkScrollable } from '@angular/cdk/scrolling'; @@ -21,13 +21,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class KeyboardShortcutsDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + buttonConfig: KeyboardShortcutsConfiguration; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Provides a deleteContext. */ - constructor(public dialogRef: MatDialogRef) {} + constructor() {} ngOnInit() { this.dialogRef.updateSize(`800px`); diff --git a/src/app/shared/language-selector/language-selector.component.html b/src/app/shared/language-selector/language-selector.component.html index 903a76ca38..c8eacfd024 100644 --- a/src/app/shared/language-selector/language-selector.component.html +++ b/src/app/shared/language-selector/language-selector.component.html @@ -1,8 +1,10 @@ {{ 'labels.inputs.Language' | translate }} - - {{ 'languages.' + language | translate }} - + @for (language of languages; track language) { + + {{ 'languages.' + language | translate }} + + } diff --git a/src/app/shared/language-selector/language-selector.component.ts b/src/app/shared/language-selector/language-selector.component.ts index 6a56a5a2a6..dd7d0dae97 100644 --- a/src/app/shared/language-selector/language-selector.component.ts +++ b/src/app/shared/language-selector/language-selector.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; /** Custom Services */ @@ -22,17 +22,20 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LanguageSelectorComponent { + private translateService = inject(TranslateService); + private settingsService = inject(SettingsService); + /** Language selector form control. */ languageSelector = new UntypedFormControl(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Sets the language of the application in the selector on initial setup. * @param {TranslateService} translateService Translate Service. */ - constructor( - private translateService: TranslateService, - private settingsService: SettingsService - ) { + constructor() { this.languageSelector.setValue(this.currentLanguage); } diff --git a/src/app/shared/long-text/long-text.component.html b/src/app/shared/long-text/long-text.component.html index 47ff2f21b4..a99cf9a3cd 100644 --- a/src/app/shared/long-text/long-text.component.html +++ b/src/app/shared/long-text/long-text.component.html @@ -1,7 +1,13 @@ - - - {{ textValue | truncateText: printChars }}... - {{ textValue }} - +@if (!emptyValue) { + + @if (isLongValue()) { + + } + @if (isLongValue()) { + {{ textValue | truncateText: printChars }}... + } + @if (!isLongValue()) { + {{ textValue }} + } + +} diff --git a/src/app/shared/notifications-tray/notifications-tray.component.html b/src/app/shared/notifications-tray/notifications-tray.component.html index c08fc4c905..cc6e7a1966 100644 --- a/src/app/shared/notifications-tray/notifications-tray.component.html +++ b/src/app/shared/notifications-tray/notifications-tray.component.html @@ -13,29 +13,26 @@ - - - {{ 'labels.menus.Notifications' | translate }} - - {{ 'labels.text.No notifications' | translate }} - + @if (unreadNotifications.length === 0) { + + + {{ 'labels.menus.Notifications' | translate }} + + {{ 'labels.text.No notifications' | translate }} + + } - - {{ notification.content }}* - [{{ notification.createdAt }}] - + @for (notification of unreadNotifications; track notification) { + + {{ notification.content }}* + [{{ notification.createdAt }}] + + } - - {{ notification.content }} - [{{ notification.createdAt }}] - + @for (notification of displayedReadNotifications; track notification) { + + {{ notification.content }} + [{{ notification.createdAt }}] + + } diff --git a/src/app/shared/notifications-tray/notifications-tray.component.ts b/src/app/shared/notifications-tray/notifications-tray.component.ts index 53a175dc90..6324f95f90 100644 --- a/src/app/shared/notifications-tray/notifications-tray.component.ts +++ b/src/app/shared/notifications-tray/notifications-tray.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, OnDestroy, ViewEncapsulation } from '@angular/core'; +import { Component, OnInit, OnDestroy, ViewEncapsulation, inject } from '@angular/core'; /** RxJS Imports */ import { forkJoin } from 'rxjs'; @@ -36,6 +36,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class NotificationsTrayComponent implements OnInit, OnDestroy { + notificationsService = inject(NotificationsService); + /** Wait time between API status calls 60 seg */ waitTime = environment.waitTimeForNotifications || 60; /** Read Notifications */ @@ -64,10 +66,13 @@ export class NotificationsTrayComponent implements OnInit, OnDestroy { loanProduct: '/products/loan-products/' }; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {NotificationsService} notificationsService Notifications Service */ - constructor(public notificationsService: NotificationsService) { + constructor() { forkJoin([ this.notificationsService.getNotifications(true, 9), this.notificationsService.getNotifications(false, 9)]).subscribe((response: any[]) => { diff --git a/src/app/shared/search-tool/search-tool.component.html b/src/app/shared/search-tool/search-tool.component.html index 16083fcfaa..c0e950e7b3 100644 --- a/src/app/shared/search-tool/search-tool.component.html +++ b/src/app/shared/search-tool/search-tool.component.html @@ -1,19 +1,22 @@ - - - {{ 'labels.text.Search' | translate }} - - - - - {{ 'labels.inputs.Resource' | translate }} - - - {{ 'labels.text.' + option.name | translate }} - - - - + @if (searchVisible) { + + + {{ 'labels.text.Search' | translate }} + + + + {{ 'labels.inputs.Resource' | translate }} + + @for (option of resourceOptions; track option) { + + {{ 'labels.text.' + option.name | translate }} + + } + + + + } diff --git a/src/app/shared/search-tool/search-tool.component.ts b/src/app/shared/search-tool/search-tool.component.ts index 452da202e1..f8f1876d3a 100644 --- a/src/app/shared/search-tool/search-tool.component.ts +++ b/src/app/shared/search-tool/search-tool.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { style, animate, transition, trigger } from '@angular/animations'; import { Router } from '@angular/router'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; @@ -34,6 +34,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SearchToolComponent { + private router = inject(Router); + /** Query Form Control */ query = new UntypedFormControl(''); /** Resource Form Control */ @@ -69,10 +71,13 @@ export class SearchToolComponent { } ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {Router} router Router */ - constructor(private router: Router) { + constructor() { this.resource.patchValue('clients,clientIdentifiers,groups,savings,shares,loans'); } diff --git a/src/app/shared/server-selector/server-selector.component.html b/src/app/shared/server-selector/server-selector.component.html index a9ff7558a1..72496177dd 100644 --- a/src/app/shared/server-selector/server-selector.component.html +++ b/src/app/shared/server-selector/server-selector.component.html @@ -1,31 +1,36 @@ - - {{ 'labels.inputs.Server' | translate }} - - - - - - language - {{ 'labels.placeholders.Add new server' | translate }} - - - {{ 'labels.inputs.Url' | translate }} {{ 'labels.commons.is required' | translate }} - - - - - {{ 'labels.buttons.Add' | translate }} - - - - - - {{ server }} - - - +@if (existMoreThanOneServer) { + + {{ 'labels.inputs.Server' | translate }} + + + + + + language + {{ 'labels.placeholders.Add new server' | translate }} + + @if (form.controls.url.hasError('required')) { + + {{ 'labels.inputs.Url' | translate }} {{ 'labels.commons.is required' | translate }} + + } + + + {{ 'labels.buttons.Add' | translate }} + + + + + @for (server of servers; track server) { + + {{ server }} + + } + + +} diff --git a/src/app/shared/server-selector/server-selector.component.ts b/src/app/shared/server-selector/server-selector.component.ts index cf7dcb1193..ff57da0730 100644 --- a/src/app/shared/server-selector/server-selector.component.ts +++ b/src/app/shared/server-selector/server-selector.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { UntypedFormBuilder, Validators } from '@angular/forms'; @@ -23,6 +23,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ServerSelectorComponent implements OnInit { + private settingsService = inject(SettingsService); + dialog = inject(MatDialog); + private formBuilder = inject(UntypedFormBuilder); + /** Input server. */ form: any; @@ -35,14 +39,13 @@ export class ServerSelectorComponent implements OnInit { /** Server list to show */ existMoreThanOneServer = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SettingsService} settingsService Settings Service */ - constructor( - private settingsService: SettingsService, - public dialog: MatDialog, - private formBuilder: UntypedFormBuilder - ) {} + constructor() {} ngOnInit(): void { this.servers = this.settingsService.servers; diff --git a/src/app/shared/tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component.html b/src/app/shared/tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component.html index 0fbc194850..a35fec7b57 100644 --- a/src/app/shared/tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component.html +++ b/src/app/shared/tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component.html @@ -10,47 +10,52 @@ {{ datatableName }} - - - - {{ 'labels.buttons.Delete Selected' | translate }} - - + @if (isSelected) { + + + + {{ 'labels.buttons.Delete Selected' | translate }} + + + } - 0"> - - - {{ 'labels.buttons.Delete All' | translate }} - - + @if (datatableData.length > 0) { + + + + {{ 'labels.buttons.Delete All' | translate }} + + + } - - - - - - - + @for (datatableColumn of datatableColumns; track datatableColumn; let i = $index) { + + @if (i === 0) { + + + + + + } + @if (i > 0) { + {{ getInputName(datatableColumn) }} + + {{ formatValue(data, datatableColumn) }} + + } - - 0"> - {{ getInputName(datatableColumn) }} - - {{ formatValue(data, datatableColumn) }} - - - + } diff --git a/src/app/shared/tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component.ts b/src/app/shared/tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component.ts index 3d77caca30..7a660bd70c 100644 --- a/src/app/shared/tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component.ts +++ b/src/app/shared/tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component.ts @@ -1,6 +1,6 @@ import { SelectionModel } from '@angular/cdk/collections'; -import { DecimalPipe, NgIf, NgFor, NgClass } from '@angular/common'; -import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from '@angular/core'; +import { DecimalPipe, NgClass } from '@angular/common'; +import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild, inject } from '@angular/core'; import { MatCheckboxChange as MatCheckboxChange, MatCheckbox } from '@angular/material/checkbox'; import { MatDialog } from '@angular/material/dialog'; import { @@ -51,6 +51,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DatatableMultiRowComponent implements OnInit, OnDestroy, OnChanges { + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private systemService = inject(SystemService); + private settingsService = inject(SettingsService); + private dialog = inject(MatDialog); + private datatables = inject(Datatables); + private dateFormat = inject(DateFormatPipe); + private dateTimeFormat = inject(DatetimeFormatPipe); + private numberFormat = inject(DecimalPipe); + SELECT_NAME_FIELD = 'select'; /** Data Object */ @Input() dataObject: any; @@ -74,6 +84,9 @@ export class DatatableMultiRowComponent implements OnInit, OnDestroy, OnChanges /** Data Table Reference */ @ViewChild('dataTable') dataTableRef: MatTable; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches center Id from parent route params. * @param {ActivatedRoute} route Activated Route. @@ -83,17 +96,7 @@ export class DatatableMultiRowComponent implements OnInit, OnDestroy, OnChanges * @param {MatDialog} dialog Mat Dialog. * @param {Datatables} datatables Datatable utils */ - constructor( - private route: ActivatedRoute, - private dateUtils: Dates, - private systemService: SystemService, - private settingsService: SettingsService, - private dialog: MatDialog, - private datatables: Datatables, - private dateFormat: DateFormatPipe, - private dateTimeFormat: DatetimeFormatPipe, - private numberFormat: DecimalPipe - ) {} + constructor() {} /** * Fetches data table name from route params. diff --git a/src/app/shared/tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component.html b/src/app/shared/tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component.html index d42b7bdd0d..79dcb86c24 100644 --- a/src/app/shared/tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component.html +++ b/src/app/shared/tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component.html @@ -1,70 +1,92 @@ {{ datatableName }} - - {{ 'labels.buttons.Add' | translate }} - - - {{ 'labels.buttons.Edit' | translate }} - - - {{ 'labels.buttons.Delete' | translate }} - + @if (!dataObject.data[0]) { + + {{ 'labels.buttons.Add' | translate }} + + } + @if (dataObject.data[0]) { + + {{ 'labels.buttons.Edit' | translate }} + + } + @if (dataObject.data[0]) { + + {{ 'labels.buttons.Delete' | translate }} + + } - 0"> - - - {{ columnHeader.columnDisplayName }} - {{ getInputName(columnHeader.columnName) }} - - - - - {{ dataObject.data[0].row[i] | dateFormat }} - - - {{ dataObject.data[0].row[i] | datetimeFormat }} - - - {{ dataObject.data[0].row[i] }} - - - {{ dataObject.data[0].row[i] | formatNumber }} - - - {{ dataObject.data[0].row[i] }} - - - - - - - - - - {{ dataObject.data[0].row[i] }} - - + @if (dataObject.data.length > 0) { + + @for (columnHeader of dataObject.columnHeaders; track columnHeader; let i = $index) { + + + {{ columnHeader.columnDisplayName }} + {{ getInputName(columnHeader.columnName) }} + + + @switch (getColumnType(columnHeader.columnDisplayType, columnHeader.columnType)) { + @case ('DATE') { + + {{ dataObject.data[0].row[i] | dateFormat }} + + } + @case ('DATETIME') { + + {{ dataObject.data[0].row[i] | datetimeFormat }} + + } + @case ('INTEGER') { + + {{ dataObject.data[0].row[i] }} + + } + @case ('DECIMAL') { + + {{ dataObject.data[0].row[i] | formatNumber }} + + } + @case ('TEXT') { + + {{ dataObject.data[0].row[i] }} + + } + @case ('JSON') { + + + } + @default { + + @if (isValidUrl(dataObject.data[0].row[i])) { + + + + + + } + {{ dataObject.data[0].row[i] }} + + } + } + + + } - + } diff --git a/src/app/shared/tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component.ts b/src/app/shared/tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component.ts index c76f9c2703..3a1a98af28 100644 --- a/src/app/shared/tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component.ts +++ b/src/app/shared/tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute } from '@angular/router'; import { Datatables } from 'app/core/utils/datatables'; @@ -8,7 +8,7 @@ import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.co import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component'; import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base'; import { SystemService } from 'app/system/system.service'; -import { NgIf, NgFor, NgClass, NgSwitch, NgSwitchCase, NgSwitchDefault } from '@angular/common'; +import { NgClass } from '@angular/common'; import { MatButton, MatIconButton } from '@angular/material/button'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatDivider } from '@angular/material/divider'; @@ -29,10 +29,7 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; FaIconComponent, MatDivider, NgClass, - NgSwitch, - NgSwitchCase, CdkTextareaAutosize, - NgSwitchDefault, MatIconButton, MatTooltip, DateFormatPipe, @@ -42,11 +39,21 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DatatableSingleRowComponent implements OnInit { + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + private datatables = inject(Datatables); + private systemService = inject(SystemService); + @Input() dataObject: any; @Input() entityId: string; @Input() entityType: string; datatableName: string; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route. * @param {Dates} dateUtils Date Utils. @@ -54,14 +61,7 @@ export class DatatableSingleRowComponent implements OnInit { * @param {SettingsService} settingsService Settings Service * @param {Datatables} datatables Datatable utils */ - constructor( - private route: ActivatedRoute, - private dateUtils: Dates, - private dialog: MatDialog, - private settingsService: SettingsService, - private datatables: Datatables, - private systemService: SystemService - ) {} + constructor() {} ngOnInit() { this.route.params.subscribe((routeParams: any) => { diff --git a/src/app/shared/tabs/entity-datatable-tab/entity-datatable-tab.component.html b/src/app/shared/tabs/entity-datatable-tab/entity-datatable-tab.component.html index ced0a15137..0d51165c10 100644 --- a/src/app/shared/tabs/entity-datatable-tab/entity-datatable-tab.component.html +++ b/src/app/shared/tabs/entity-datatable-tab/entity-datatable-tab.component.html @@ -1,14 +1,16 @@ - - + @if (multiRowDatatableFlag) { + + } + @if (!multiRowDatatableFlag) { + + } diff --git a/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.html b/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.html index a42a3764bb..4958523d3c 100644 --- a/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.html +++ b/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.html @@ -51,9 +51,7 @@ {{ 'labels.heading.Documents' | translate }} - 10" - [pageSizeOptions]="[10, 25, 50]" - showFirstLastButtons - > + @if (entityDocuments && entityDocuments.length > 10) { + + } diff --git a/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.ts b/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.ts index ecff9021ec..6d81002128 100644 --- a/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.ts +++ b/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit, ViewChild } from '@angular/core'; +import { Component, Input, OnInit, ViewChild, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -47,6 +47,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EntityDocumentsTabComponent implements OnInit { + dialog = inject(MatDialog); + private savingsService = inject(SavingsService); + private loansService = inject(LoansService); + private clientsService = inject(ClientsService); + @ViewChild('documentsTable', { static: true }) documentsTable: MatTable; @Input() entityId: string; @@ -77,6 +82,9 @@ export class EntityDocumentsTabComponent implements OnInit { /** Sorter for codes table. */ @ViewChild(MatSort) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * * @param {MatDialog} dialog Dialog for Inputs. @@ -84,12 +92,7 @@ export class EntityDocumentsTabComponent implements OnInit { * @param {LoansService} loansService Loan Account services. * @param {ClientsService} clientsService Client services. */ - constructor( - public dialog: MatDialog, - private savingsService: SavingsService, - private loansService: LoansService, - private clientsService: ClientsService - ) {} + constructor() {} ngOnInit() { this.dataSource = new MatTableDataSource(this.entityDocuments); diff --git a/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.html b/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.html index 1ca4d303ba..62a279afe3 100644 --- a/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.html +++ b/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.html @@ -25,32 +25,32 @@ {{ 'labels.heading.Notes' | translate }} - 0; else emptyState"> - - - {{ entityNote.note }} - - - diff --git a/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.ts b/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.ts index 604862f8fe..664f180018 100644 --- a/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.ts +++ b/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit, ViewChild } from '@angular/core'; +import { Component, Input, OnInit, ViewChild, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { ClientsService } from 'app/clients/clients.service'; @@ -24,6 +24,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EntityNotesTabComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private savingsService = inject(SavingsService); + private loansService = inject(LoansService); + private clientsService = inject(ClientsService); + private groupsService = inject(GroupsService); + private dialog = inject(MatDialog); + @ViewChild('formRef', { static: true }) formRef: any; @Input() entityId: string; @@ -35,14 +42,10 @@ export class EntityNotesTabComponent implements OnInit { noteForm: UntypedFormGroup; - constructor( - private formBuilder: UntypedFormBuilder, - private savingsService: SavingsService, - private loansService: LoansService, - private clientsService: ClientsService, - private groupsService: GroupsService, - private dialog: MatDialog - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { this.createNoteForm(); diff --git a/src/app/shared/tenant-selector/tenant-selector.component.html b/src/app/shared/tenant-selector/tenant-selector.component.html index fd5e1ba228..5993470b81 100644 --- a/src/app/shared/tenant-selector/tenant-selector.component.html +++ b/src/app/shared/tenant-selector/tenant-selector.component.html @@ -4,8 +4,10 @@ {{ 'labels.inputs.Tenant' | translate }} - - {{ tenant }} - + @for (tenant of tenants; track tenant) { + + {{ tenant }} + + } diff --git a/src/app/shared/tenant-selector/tenant-selector.component.ts b/src/app/shared/tenant-selector/tenant-selector.component.ts index e139303cc3..1835078d6e 100644 --- a/src/app/shared/tenant-selector/tenant-selector.component.ts +++ b/src/app/shared/tenant-selector/tenant-selector.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { SettingsService } from 'app/settings/settings.service'; import { MatFormField, MatPrefix, MatLabel } from '@angular/material/form-field'; @@ -16,14 +16,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class TenantSelectorComponent implements OnInit { + private settingsService = inject(SettingsService); + /** Tenant selector form control. */ tenantSelector = new UntypedFormControl(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Sets the Tenant Identifier of the application in the selector on initial setup. * @param {SettingsService} settingsService Settings Service. */ - constructor(private settingsService: SettingsService) {} + constructor() {} ngOnInit(): void { this.tenantSelector.setValue(this.settingsService.tenantIdentifier); diff --git a/src/app/shared/theme-picker/theme-picker.component.html b/src/app/shared/theme-picker/theme-picker.component.html index 560d696229..6b8aeb910c 100644 --- a/src/app/shared/theme-picker/theme-picker.component.html +++ b/src/app/shared/theme-picker/theme-picker.component.html @@ -4,19 +4,18 @@ - - - - - - + @for (theme of themes; track theme) { + + + + @if (currentTheme.href === theme.href) { + + } + + + - - + + } diff --git a/src/app/shared/theme-picker/theme-picker.component.ts b/src/app/shared/theme-picker/theme-picker.component.ts index a585cb3632..c74e058fe3 100644 --- a/src/app/shared/theme-picker/theme-picker.component.ts +++ b/src/app/shared/theme-picker/theme-picker.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, OnInit, ViewEncapsulation, inject } from '@angular/core'; /** Custom Model */ import { Theme } from './theme.model'; @@ -36,6 +36,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ThemePickerComponent implements OnInit { + themeStorageService = inject(ThemeStorageService); + /** Default theme for the application. */ currentTheme: Theme = { href: 'denim-yellowgreen.css', @@ -79,10 +81,13 @@ export class ThemePickerComponent implements OnInit { } ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ThemeStorageService} themeStorageService Theme Storage Service. */ - constructor(public themeStorageService: ThemeStorageService) {} + constructor() {} /** * Initializes the theme for the application. diff --git a/src/app/shared/theme-picker/theme-storage.service.ts b/src/app/shared/theme-picker/theme-storage.service.ts index 8fc4d9adf5..54a3da3428 100644 --- a/src/app/shared/theme-picker/theme-storage.service.ts +++ b/src/app/shared/theme-picker/theme-storage.service.ts @@ -1,4 +1,4 @@ -import { Injectable, EventEmitter } from '@angular/core'; +import { Injectable, EventEmitter, inject } from '@angular/core'; import { Theme } from './theme.model'; import { ThemeManagerService } from './theme-manager.service'; @@ -6,10 +6,15 @@ import { ThemeManagerService } from './theme-manager.service'; providedIn: 'root' }) export class ThemeStorageService { + themeManagerService = inject(ThemeManagerService); + private themeStorageKey = 'mifosXTheme'; onThemeUpdate: EventEmitter; - constructor(public themeManagerService: ThemeManagerService) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.onThemeUpdate = new EventEmitter(); } diff --git a/src/app/shared/theme-toggle/theme-toggle.component.ts b/src/app/shared/theme-toggle/theme-toggle.component.ts index 5ab9502028..87858f14e2 100644 --- a/src/app/shared/theme-toggle/theme-toggle.component.ts +++ b/src/app/shared/theme-toggle/theme-toggle.component.ts @@ -1,4 +1,4 @@ -import { Component, OnChanges, OnInit, SimpleChanges } from '@angular/core'; +import { Component, OnChanges, OnInit, SimpleChanges, inject } from '@angular/core'; import { ThemingService } from './theming.service'; import { SettingsService } from 'app/settings/settings.service'; import { MatIconButton } from '@angular/material/button'; @@ -16,12 +16,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ThemeToggleComponent implements OnInit, OnChanges { + private themingService = inject(ThemingService); + private settingsService = inject(SettingsService); + darkModeOn: boolean; - constructor( - private themingService: ThemingService, - private settingsService: SettingsService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.darkModeOn = !!this.settingsService.themeDarkEnabled; diff --git a/src/app/shared/theme-toggle/theming.service.ts b/src/app/shared/theme-toggle/theming.service.ts index a8c0334cc1..dc2508e6bf 100644 --- a/src/app/shared/theme-toggle/theming.service.ts +++ b/src/app/shared/theme-toggle/theming.service.ts @@ -1,19 +1,24 @@ -import { ApplicationRef, Injectable } from '@angular/core'; +import { ApplicationRef, Injectable, inject } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class ThemingService { + private ref = inject(ApplicationRef); + private darkModeOn = false; themes = [ 'dark-theme', 'light-theme' ]; // <- list all themes in this array - theme = new BehaviorSubject('light-theme'); // <- initial theme + theme = new BehaviorSubject('light-theme'); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); // <- initial theme - constructor(private ref: ApplicationRef) { + constructor() { // Initially check if dark mode is enabled on system this.darkModeOn = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; diff --git a/src/app/shared/transaction-payment-detail/transaction-payment-detail.component.html b/src/app/shared/transaction-payment-detail/transaction-payment-detail.component.html index c34c18246e..3cbae27c74 100644 --- a/src/app/shared/transaction-payment-detail/transaction-payment-detail.component.html +++ b/src/app/shared/transaction-payment-detail/transaction-payment-detail.component.html @@ -7,30 +7,42 @@ {{ paymentDetailData.paymentType.name }} - - - - {{ 'labels.inputs.Payment Details' | translate }} - - - {{ 'labels.inputs.Account No' | translate }} - {{ paymentDetailData.accountNumber }} - - - {{ 'labels.inputs.Cheque Number' | translate }} - {{ paymentDetailData.checkNumber }} - - - {{ 'labels.inputs.Routing Code' | translate }} - {{ paymentDetailData.routingCode }} - - - {{ 'labels.inputs.Receipt No' | translate }} - {{ paymentDetailData.receiptNumber }} - - - {{ 'labels.inputs.Bank No' | translate }} - {{ paymentDetailData.bankNumber }} - - - +@if (hasSomeValue()) { + + + + {{ 'labels.inputs.Payment Details' | translate }} + + @if (isNotNullOrEmpty(paymentDetailData.accountNumber)) { + + {{ 'labels.inputs.Account No' | translate }} + {{ paymentDetailData.accountNumber }} + + } + @if (isNotNullOrEmpty(paymentDetailData.checkNumber)) { + + {{ 'labels.inputs.Cheque Number' | translate }} + {{ paymentDetailData.checkNumber }} + + } + @if (isNotNullOrEmpty(paymentDetailData.routingCode)) { + + {{ 'labels.inputs.Routing Code' | translate }} + {{ paymentDetailData.routingCode }} + + } + @if (isNotNullOrEmpty(paymentDetailData.receiptNumber)) { + + {{ 'labels.inputs.Receipt No' | translate }} + {{ paymentDetailData.receiptNumber }} + + } + @if (isNotNullOrEmpty(paymentDetailData.bankNumber)) { + + {{ 'labels.inputs.Bank No' | translate }} + {{ paymentDetailData.bankNumber }} + + } + + +} diff --git a/src/app/shares/common-resolvers/share-account-actions.resolver.ts b/src/app/shares/common-resolvers/share-account-actions.resolver.ts index e0e6610cf7..431d73cb2e 100644 --- a/src/app/shares/common-resolvers/share-account-actions.resolver.ts +++ b/src/app/shares/common-resolvers/share-account-actions.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SharesService } from '../shares.service'; */ @Injectable() export class ShareAccountActionsResolver { + private sharesService = inject(SharesService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {sharesService} SharesService Shares service. */ - constructor(private sharesService: SharesService) {} + constructor() {} /** * Returns the Shares account actions data. diff --git a/src/app/shares/common-resolvers/share-account-and-template.resolver.ts b/src/app/shares/common-resolvers/share-account-and-template.resolver.ts index d9bd450558..0fa1bd9146 100644 --- a/src/app/shares/common-resolvers/share-account-and-template.resolver.ts +++ b/src/app/shares/common-resolvers/share-account-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SharesService } from '../shares.service'; */ @Injectable() export class SharesAccountAndTemplateResolver { + private sharesService = inject(SharesService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SharesService} SharesService Shares service. */ - constructor(private sharesService: SharesService) {} + constructor() {} /** * Returns the Shares Account data and template. diff --git a/src/app/shares/common-resolvers/share-account-view.resolver.ts b/src/app/shares/common-resolvers/share-account-view.resolver.ts index 841a1241b6..2c848878d5 100644 --- a/src/app/shares/common-resolvers/share-account-view.resolver.ts +++ b/src/app/shares/common-resolvers/share-account-view.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SharesService } from '../shares.service'; */ @Injectable() export class SharesAccountViewResolver { + private sharesService = inject(SharesService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SharesService} SharesService Shares service. */ - constructor(private sharesService: SharesService) {} + constructor() {} /** * Returns the Shares Account data. diff --git a/src/app/shares/common-resolvers/shares-account-template.resolver.ts b/src/app/shares/common-resolvers/shares-account-template.resolver.ts index cf61532e0b..e6442f97d6 100644 --- a/src/app/shares/common-resolvers/shares-account-template.resolver.ts +++ b/src/app/shares/common-resolvers/shares-account-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SharesService } from '../shares.service'; */ @Injectable() export class SharesAccountTemplateResolver { + private sharesService = inject(SharesService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SharesService} SharesService Shares service. */ - constructor(private sharesService: SharesService) {} + constructor() {} /** * Returns the Shares Account Template. diff --git a/src/app/shares/create-shares-account/create-shares-account.component.html b/src/app/shares/create-shares-account/create-shares-account.component.html index 01c452c90a..0505c000db 100644 --- a/src/app/shares/create-shares-account/create-shares-account.component.html +++ b/src/app/shares/create-shares-account/create-shares-account.component.html @@ -55,17 +55,18 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (sharesAccountFormValid) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/shares/create-shares-account/create-shares-account.component.ts b/src/app/shares/create-shares-account/create-shares-account.component.ts index eb599490ba..8677290bee 100644 --- a/src/app/shares/create-shares-account/create-shares-account.component.ts +++ b/src/app/shares/create-shares-account/create-shares-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; /** Custom Components */ @@ -37,6 +37,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateSharesAccountComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private sharesService = inject(SharesService); + private settingsService = inject(SettingsService); + /** Shares Account Template */ sharesAccountTemplate: any; /** Shares Account Product Template */ @@ -51,6 +57,9 @@ export class CreateSharesAccountComponent { @ViewChild(SharesAccountChargesStepComponent, { static: true }) sharesAccountChargesStep: SharesAccountChargesStepComponent; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches shares account template from `resolve` * @param {ActivatedRoute} route Activated Route @@ -59,13 +68,7 @@ export class CreateSharesAccountComponent { * @param {SharesService} sharesService Shares Service * @param {SettingsService} settingsService Settings Service */ - constructor( - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private sharesService: SharesService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { sharesAccountTemplate: any }) => { this.sharesAccountTemplate = data.sharesAccountTemplate; }); diff --git a/src/app/shares/edit-shares-account/edit-shares-account.component.html b/src/app/shares/edit-shares-account/edit-shares-account.component.html index 61131f7d71..13794f5780 100644 --- a/src/app/shares/edit-shares-account/edit-shares-account.component.html +++ b/src/app/shares/edit-shares-account/edit-shares-account.component.html @@ -57,17 +57,18 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (sharesAccountFormValidAndNotPristine) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/shares/edit-shares-account/edit-shares-account.component.ts b/src/app/shares/edit-shares-account/edit-shares-account.component.ts index 8c45a7268c..657a871e23 100644 --- a/src/app/shares/edit-shares-account/edit-shares-account.component.ts +++ b/src/app/shares/edit-shares-account/edit-shares-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; /** Custom Components */ @@ -37,6 +37,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditSharesAccountComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private sharesService = inject(SharesService); + private settingsService = inject(SettingsService); + /** Shares Account and Template */ sharesAccountAndTemplate: any; /** Shares Account Product Template */ @@ -51,6 +57,9 @@ export class EditSharesAccountComponent { @ViewChild(SharesAccountChargesStepComponent, { static: true }) sharesAccountChargesStep: SharesAccountChargesStepComponent; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches shares account template from `resolve` * @param {ActivatedRoute} route Activated Route @@ -59,13 +68,7 @@ export class EditSharesAccountComponent { * @param {SharesService} sharesService Shares Service * @param {SettingsService} settingsService Settings Service */ - constructor( - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private sharesService: SharesService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { sharesAccountAndTemplate: any }) => { this.sharesAccountAndTemplate = data.sharesAccountAndTemplate; }); diff --git a/src/app/shares/shares-account-actions/activate-shares-account/activate-shares-account.component.html b/src/app/shares/shares-account-actions/activate-shares-account/activate-shares-account.component.html index b3e3cf48c0..74162f2904 100644 --- a/src/app/shares/shares-account-actions/activate-shares-account/activate-shares-account.component.html +++ b/src/app/shares/shares-account-actions/activate-shares-account/activate-shares-account.component.html @@ -14,10 +14,12 @@ /> - - {{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (activateSharesAccountForm.controls.activatedDate.hasError('required')) { + + {{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/shares/shares-account-actions/activate-shares-account/activate-shares-account.component.ts b/src/app/shares/shares-account-actions/activate-shares-account/activate-shares-account.component.ts index 5de245df72..251c22c65b 100644 --- a/src/app/shares/shares-account-actions/activate-shares-account/activate-shares-account.component.ts +++ b/src/app/shares/shares-account-actions/activate-shares-account/activate-shares-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ActivateSharesAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private sharesService = inject(SharesService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -30,6 +37,9 @@ export class ActivateSharesAccountComponent implements OnInit { /** Shares Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SharesService} sharesService Shares Service @@ -38,14 +48,7 @@ export class ActivateSharesAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private sharesService: SharesService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; } diff --git a/src/app/shares/shares-account-actions/apply-shares/apply-shares.component.html b/src/app/shares/shares-account-actions/apply-shares/apply-shares.component.html index 12e60ba12f..de3358ee76 100644 --- a/src/app/shares/shares-account-actions/apply-shares/apply-shares.component.html +++ b/src/app/shares/shares-account-actions/apply-shares/apply-shares.component.html @@ -15,19 +15,23 @@ /> - - {{ 'labels.inputs.Request Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (applySharesForm.controls.requestedDate.hasError('required')) { + + {{ 'labels.inputs.Request Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Total No. of Shares' | translate }} - - {{ 'labels.inputs.Requested Shares' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (applySharesForm.controls.requestedShares.hasError('required')) { + + {{ 'labels.inputs.Requested Shares' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/shares/shares-account-actions/apply-shares/apply-shares.component.ts b/src/app/shares/shares-account-actions/apply-shares/apply-shares.component.ts index 304ae1d50b..6cb3744392 100644 --- a/src/app/shares/shares-account-actions/apply-shares/apply-shares.component.ts +++ b/src/app/shares/shares-account-actions/apply-shares/apply-shares.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ApplySharesComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private sharesService = inject(SharesService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Shares account data. */ sharesAccountData: any; @@ -33,6 +40,9 @@ export class ApplySharesComponent implements OnInit { /** Shares Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SharesService} sharesService Shares Service @@ -41,14 +51,7 @@ export class ApplySharesComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private sharesService: SharesService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; this.route.data.subscribe((data: { shareAccountActionData: any }) => { this.sharesAccountData = data.shareAccountActionData; diff --git a/src/app/shares/shares-account-actions/approve-shares-account/approve-shares-account.component.html b/src/app/shares/shares-account-actions/approve-shares-account/approve-shares-account.component.html index 79647529f1..73a37d9297 100644 --- a/src/app/shares/shares-account-actions/approve-shares-account/approve-shares-account.component.html +++ b/src/app/shares/shares-account-actions/approve-shares-account/approve-shares-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Approved On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (approveSharesAccountForm.controls.approvedDate.hasError('required')) { + + {{ 'labels.inputs.Approved On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/shares/shares-account-actions/approve-shares-account/approve-shares-account.component.ts b/src/app/shares/shares-account-actions/approve-shares-account/approve-shares-account.component.ts index a7be399614..1096141acc 100644 --- a/src/app/shares/shares-account-actions/approve-shares-account/approve-shares-account.component.ts +++ b/src/app/shares/shares-account-actions/approve-shares-account/approve-shares-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ApproveSharesAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private sharesService = inject(SharesService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class ApproveSharesAccountComponent implements OnInit { /** Shares Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SharesService} sharesService Shares Service @@ -40,14 +50,7 @@ export class ApproveSharesAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private sharesService: SharesService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; } diff --git a/src/app/shares/shares-account-actions/approve-shares/approve-share-dialog/approve-share-dialog.component.ts b/src/app/shares/shares-account-actions/approve-shares/approve-share-dialog/approve-share-dialog.component.ts index 67886ceea3..e4b6516e68 100644 --- a/src/app/shares/shares-account-actions/approve-shares/approve-share-dialog/approve-share-dialog.component.ts +++ b/src/app/shares/shares-account-actions/approve-shares/approve-share-dialog/approve-share-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,12 +28,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ApproveShareDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Provides a deleteContext. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/shares/shares-account-actions/approve-shares/approve-shares.component.ts b/src/app/shares/shares-account-actions/approve-shares/approve-shares.component.ts index cf0c2eeb8a..028aafc6f4 100644 --- a/src/app/shares/shares-account-actions/approve-shares/approve-shares.component.ts +++ b/src/app/shares/shares-account-actions/approve-shares/approve-shares.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild, Input } from '@angular/core'; +import { Component, OnInit, ViewChild, Input, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -59,6 +59,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ApproveSharesComponent implements OnInit { + private sharesService = inject(SharesService); + private route = inject(ActivatedRoute); + dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + /** Shares account data. */ sharesAccountData: any; @@ -84,18 +89,16 @@ export class ApproveSharesComponent implements OnInit { /** Shares table reference */ @ViewChild('sharesTable', { static: true }) sharesTableRef: MatTable; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SharesService} sharesService Shares Service * @param {ActivatedRoute} route Activated Route * @param {MatDialog} dialog Dialog reference. * @param {SettingsService} settingsService Settings Service */ - constructor( - private sharesService: SharesService, - private route: ActivatedRoute, - public dialog: MatDialog, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; this.route.data.subscribe((data: { shareAccountActionData: any }) => { this.sharesAccountData = data.shareAccountActionData; diff --git a/src/app/shares/shares-account-actions/close-shares-account/close-shares-account.component.html b/src/app/shares/shares-account-actions/close-shares-account/close-shares-account.component.html index 4d221ba2ee..71d6b11908 100644 --- a/src/app/shares/shares-account-actions/close-shares-account/close-shares-account.component.html +++ b/src/app/shares/shares-account-actions/close-shares-account/close-shares-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeSharesAccountForm.controls.closedDate.hasError('required')) { + + {{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/shares/shares-account-actions/close-shares-account/close-shares-account.component.ts b/src/app/shares/shares-account-actions/close-shares-account/close-shares-account.component.ts index 81eabd3665..73de4dcde8 100644 --- a/src/app/shares/shares-account-actions/close-shares-account/close-shares-account.component.ts +++ b/src/app/shares/shares-account-actions/close-shares-account/close-shares-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CloseSharesAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private sharesService = inject(SharesService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class CloseSharesAccountComponent implements OnInit { /** Shares Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SharesService} sharesService Shares Service @@ -40,14 +50,7 @@ export class CloseSharesAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private sharesService: SharesService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; } diff --git a/src/app/shares/shares-account-actions/redeem-shares/redeem-shares.component.html b/src/app/shares/shares-account-actions/redeem-shares/redeem-shares.component.html index 0a1da554e4..80d86767cd 100644 --- a/src/app/shares/shares-account-actions/redeem-shares/redeem-shares.component.html +++ b/src/app/shares/shares-account-actions/redeem-shares/redeem-shares.component.html @@ -15,19 +15,23 @@ /> - - {{ 'labels.inputs.Request Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (redeemSharesForm.controls.requestedDate.hasError('required')) { + + {{ 'labels.inputs.Request Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Total No. of Shares' | translate }} - - {{ 'labels.inputs.Requested Shares' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (redeemSharesForm.controls.requestedShares.hasError('required')) { + + {{ 'labels.inputs.Requested Shares' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/shares/shares-account-actions/redeem-shares/redeem-shares.component.ts b/src/app/shares/shares-account-actions/redeem-shares/redeem-shares.component.ts index c3c8606472..62064c5ef0 100644 --- a/src/app/shares/shares-account-actions/redeem-shares/redeem-shares.component.ts +++ b/src/app/shares/shares-account-actions/redeem-shares/redeem-shares.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RedeemSharesComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private sharesService = inject(SharesService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Shares account data. */ sharesAccountData: any; @@ -33,6 +40,9 @@ export class RedeemSharesComponent implements OnInit { /** Shares Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SharesService} sharesService Shares Service @@ -41,14 +51,7 @@ export class RedeemSharesComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private sharesService: SharesService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; this.route.data.subscribe((data: { shareAccountActionData: any }) => { this.sharesAccountData = data.shareAccountActionData; diff --git a/src/app/shares/shares-account-actions/reject-shares-account/reject-shares-account.component.html b/src/app/shares/shares-account-actions/reject-shares-account/reject-shares-account.component.html index 1b4f7629fb..c135a7b070 100644 --- a/src/app/shares/shares-account-actions/reject-shares-account/reject-shares-account.component.html +++ b/src/app/shares/shares-account-actions/reject-shares-account/reject-shares-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Rejected On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (rejectSharesAccountForm.controls.rejectedDate.hasError('required')) { + + {{ 'labels.inputs.Rejected On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/shares/shares-account-actions/reject-shares-account/reject-shares-account.component.ts b/src/app/shares/shares-account-actions/reject-shares-account/reject-shares-account.component.ts index 7a68cacb68..0d1670b6de 100644 --- a/src/app/shares/shares-account-actions/reject-shares-account/reject-shares-account.component.ts +++ b/src/app/shares/shares-account-actions/reject-shares-account/reject-shares-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RejectSharesAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private sharesService = inject(SharesService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class RejectSharesAccountComponent implements OnInit { /** Shares Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SharesService} sharesService Shares Service @@ -40,14 +50,7 @@ export class RejectSharesAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private sharesService: SharesService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; } diff --git a/src/app/shares/shares-account-actions/reject-shares/reject-share-dialog/reject-share-dialog.component.ts b/src/app/shares/shares-account-actions/reject-shares/reject-share-dialog/reject-share-dialog.component.ts index 959607f53f..584dce17ed 100644 --- a/src/app/shares/shares-account-actions/reject-shares/reject-share-dialog/reject-share-dialog.component.ts +++ b/src/app/shares/shares-account-actions/reject-shares/reject-share-dialog/reject-share-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,12 +28,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RejectShareDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Provides a deleteContext. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/shares/shares-account-actions/reject-shares/reject-shares.component.ts b/src/app/shares/shares-account-actions/reject-shares/reject-shares.component.ts index 8ba2310205..402feeb135 100644 --- a/src/app/shares/shares-account-actions/reject-shares/reject-shares.component.ts +++ b/src/app/shares/shares-account-actions/reject-shares/reject-shares.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild, Input } from '@angular/core'; +import { Component, OnInit, ViewChild, Input, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -59,6 +59,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RejectSharesComponent implements OnInit { + private sharesService = inject(SharesService); + private route = inject(ActivatedRoute); + dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + /** Shares account data. */ sharesAccountData: any; @@ -84,18 +89,16 @@ export class RejectSharesComponent implements OnInit { /** Shares table reference */ @ViewChild('sharesTable', { static: true }) sharesTableRef: MatTable; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SharesService} sharesService Shares Service * @param {ActivatedRoute} route Activated Route * @param {MatDialog} dialog Mat Dialog * @param {SettingsService} settingsService Settings Service. */ - constructor( - private sharesService: SharesService, - private route: ActivatedRoute, - public dialog: MatDialog, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; this.route.data.subscribe((data: { shareAccountActionData: any }) => { this.sharesAccountData = data.shareAccountActionData; diff --git a/src/app/shares/shares-account-actions/shares-account-actions.component.html b/src/app/shares/shares-account-actions/shares-account-actions.component.html index be861323e4..59fbf529e9 100644 --- a/src/app/shares/shares-account-actions/shares-account-actions.component.html +++ b/src/app/shares/shares-account-actions/shares-account-actions.component.html @@ -1,9 +1,27 @@ - - - - - - - - - +@if (actions['Approve']) { + +} +@if (actions['Reject']) { + +} +@if (actions['Close']) { + +} +@if (actions['Activate']) { + +} +@if (actions['Undo Approval']) { + +} +@if (actions['Apply Additional Shares']) { + +} +@if (actions['Redeem Shares']) { + +} +@if (actions['Approve Additional Shares']) { + +} +@if (actions['Reject Additional Shares']) { + +} diff --git a/src/app/shares/shares-account-actions/shares-account-actions.component.ts b/src/app/shares/shares-account-actions/shares-account-actions.component.ts index 0f5bc984fe..1ed31a581e 100644 --- a/src/app/shares/shares-account-actions/shares-account-actions.component.ts +++ b/src/app/shares/shares-account-actions/shares-account-actions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; /** Custom Services */ @@ -36,6 +36,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SharesAccountActionsComponent { + private route = inject(ActivatedRoute); + /** Shares Account Data */ sharesAccountData: any; /** Flag object to store possible actions and render appropriate UI to the user */ @@ -61,10 +63,13 @@ export class SharesAccountActionsComponent { 'Reject Additional Shares': false }; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route */ - constructor(private route: ActivatedRoute) { + constructor() { const name = this.route.snapshot.params['name']; if (name && name in this.actions) { this.actions[name as keyof typeof this.actions] = true; diff --git a/src/app/shares/shares-account-actions/undo-approval-shares-account/undo-approval-shares-account.component.ts b/src/app/shares/shares-account-actions/undo-approval-shares-account/undo-approval-shares-account.component.ts index d32cd9f30e..0e08560786 100644 --- a/src/app/shares/shares-account-actions/undo-approval-shares-account/undo-approval-shares-account.component.ts +++ b/src/app/shares/shares-account-actions/undo-approval-shares-account/undo-approval-shares-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; /** Custom Services */ @@ -20,19 +20,22 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UndoApprovalSharesAccountComponent { + private sharesService = inject(SharesService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Shares Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SharesService} sharesService Shares Service * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private sharesService: SharesService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; } diff --git a/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.html b/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.html index 1a276957ee..a5ae93d554 100644 --- a/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.html +++ b/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.html @@ -2,12 +2,11 @@ {{ 'labels.inputs.Charge' | translate }} - - {{ charge.name }} - + @for (charge of chargeData | chargesFilter: chargesDataSource : currencyCode.value; track charge) { + + {{ charge.name }} + + } diff --git a/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.ts b/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.ts index 1bbd294942..c3e4098a0a 100644 --- a/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.ts +++ b/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, OnChanges, Input } from '@angular/core'; +import { Component, OnInit, OnChanges, Input, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { UntypedFormControl } from '@angular/forms'; @@ -56,6 +56,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SharesAccountChargesStepComponent implements OnInit, OnChanges { + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** Shares Account Product Template */ @Input() sharesAccountProductTemplate: any; /** Shares Account Template */ @@ -80,13 +83,13 @@ export class SharesAccountChargesStepComponent implements OnInit, OnChanges { 'action' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialog} dialog Mat Dialog */ - constructor( - private dialog: MatDialog, - private translateService: TranslateService - ) {} + constructor() {} ngOnInit() { this.currencyCode.valueChanges.subscribe(() => { diff --git a/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.html b/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.html index 561388678f..55d09aed42 100644 --- a/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.html +++ b/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.html @@ -3,9 +3,11 @@ {{ 'labels.inputs.Product Name' | translate }} - - {{ product.name }} - + @for (product of productData; track product) { + + {{ product.name }} + + } {{ 'labels.inputs.Product Name' | translate }} {{ 'labels.commons.is' | translate }} diff --git a/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.ts b/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.ts index b904b9a7c1..190c697a5a 100644 --- a/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.ts +++ b/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; +import { Component, OnInit, Input, Output, EventEmitter, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { SettingsService } from 'app/settings/settings.service'; @@ -24,6 +24,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SharesAccountDetailsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private sharesService = inject(SharesService); + private settingsService = inject(SettingsService); + /** Shares Account Template */ @Input() sharesAccountTemplate: any; @@ -39,17 +43,16 @@ export class SharesAccountDetailsStepComponent implements OnInit { /** Shares Account Template with product data */ @Output() sharesAccountProductTemplate = new EventEmitter(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Sets share account details form. * @param {FormBuilder} formBuilder Form Builder. * @param {SharesService} sharesService Shares Service. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private sharesService: SharesService, - private settingsService: SettingsService - ) { + constructor() { this.createSharesAccountDetailsForm(); } diff --git a/src/app/shares/shares-account-stepper/shares-account-preview-step/shares-account-preview-step.component.html b/src/app/shares/shares-account-stepper/shares-account-preview-step/shares-account-preview-step.component.html index cb6ff52560..d176c03545 100644 --- a/src/app/shares/shares-account-stepper/shares-account-preview-step/shares-account-preview-step.component.html +++ b/src/app/shares/shares-account-stepper/shares-account-preview-step/shares-account-preview-step.component.html @@ -16,12 +16,16 @@ {{ 'labels.heading.Details' | translate }} {{ 'labels.inputs.External Id' | translate }} - - - - - {{ 'labels.inputs.Unassigned' | translate }} - + @if (sharesAccount.externalId) { + + + + } + @if (!sharesAccount.externalId) { + + {{ 'labels.inputs.Unassigned' | translate }} + + } {{ 'labels.heading.Terms' | translate }} @@ -59,27 +63,31 @@ {{ 'labels.heading.Terms' | translate }} }} - - {{ 'labels.inputs.Minimum Active Period' | translate }} - {{ sharesAccount.minimumActivePeriod }} {{ - sharesAccount.minimumActivePeriodFrequencyType - | find: sharesAccountProductTemplate.minimumActivePeriodFrequencyTypeOptions : 'id' : 'value' - | translateKey: 'catalogs' - }} - - - - {{ 'labels.inputs.Lock-in Period' | translate }} - {{ sharesAccount.lockinPeriodFrequency }} {{ - sharesAccount.lockinPeriodFrequencyType - | find: sharesAccountProductTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value' - | translateKey: 'catalogs' - }} - + @if (sharesAccount.minimumActivePeriod) { + + {{ 'labels.inputs.Minimum Active Period' | translate }} + {{ sharesAccount.minimumActivePeriod }} {{ + sharesAccount.minimumActivePeriodFrequencyType + | find: sharesAccountProductTemplate.minimumActivePeriodFrequencyTypeOptions : 'id' : 'value' + | translateKey: 'catalogs' + }} + + } + + @if (sharesAccount.lockinPeriodFrequency) { + + {{ 'labels.inputs.Lock-in Period' | translate }} + {{ sharesAccount.lockinPeriodFrequency }} {{ + sharesAccount.lockinPeriodFrequencyType + | find: sharesAccountProductTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value' + | translateKey: 'catalogs' + }} + + } {{ 'labels.inputs.Application Date' | translate }} @@ -91,43 +99,40 @@ {{ 'labels.heading.Terms' | translate }} {{ sharesAccount.allowDividendCalculationForInactiveClients | yesNo }} - - {{ 'labels.heading.Charges' | translate }} - - - - - {{ 'labels.inputs.name' | translate }} - - {{ charge.name + ', ' + charge.currency.displaySymbol }} - - - - - {{ 'labels.inputs.Type' | translate }} - - {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ charge.amount || charge.amountOrPercentage }} - - - - - {{ 'labels.inputs.Collected On' | translate }} - - {{ charge.chargeTimeType.value | translateKey: 'catalogs' }} - - - - - - - + @if (sharesAccount.charges.length) { + + {{ 'labels.heading.Charges' | translate }} + + + + {{ 'labels.inputs.name' | translate }} + + {{ charge.name + ', ' + charge.currency.displaySymbol }} + + + + {{ 'labels.inputs.Type' | translate }} + + {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} + + + + {{ 'labels.inputs.Amount' | translate }} + + {{ charge.amount || charge.amountOrPercentage }} + + + + {{ 'labels.inputs.Collected On' | translate }} + + {{ charge.chargeTimeType.value | translateKey: 'catalogs' }} + + + + + + + } diff --git a/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.html b/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.html index 580b0acf9d..f3f6d15a2e 100644 --- a/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.html +++ b/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.html @@ -18,16 +18,16 @@ {{ 'labels.commons.required' | translate }} - {{ - calculateCurrenValue() | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} + @if (currency) { + {{ calculateCurrenValue() | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + } {{ 'labels.inputs.Default Savings Account' | translate }} - - {{ account.accountNo }} - {{ account.savingsProductName }} - + @for (account of savingsAccountsData; track account) { + {{ account.accountNo }} - {{ account.savingsProductName }} + } {{ 'labels.inputs.Default Savings Account' | translate }} {{ 'labels.commons.is' | translate }} @@ -67,12 +67,14 @@ {{ 'labels.heading.Minimum Active Period' | translate {{ 'labels.inputs.Type' | translate }} - - {{ minimumActivePeriodFrequencyType.value | translateKey: 'catalogs' }} - + @for ( + minimumActivePeriodFrequencyType of minimumActivePeriodFrequencyTypeData; + track minimumActivePeriodFrequencyType + ) { + + {{ minimumActivePeriodFrequencyType.value | translateKey: 'catalogs' }} + + } @@ -86,12 +88,11 @@ {{ 'labels.heading.Lock-in Period' | translate }} {{ 'labels.inputs.Type' | translate }} - - {{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }} - + @for (lockinPeriodFrequencyType of lockinPeriodFrequencyTypeData; track lockinPeriodFrequencyType) { + + {{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }} + + } diff --git a/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.ts b/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.ts index bc07c5e37e..220d7e3890 100644 --- a/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.ts +++ b/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.ts @@ -1,9 +1,9 @@ /** Angular Imports */ -import { Component, OnChanges, OnInit, Input } from '@angular/core'; +import { Component, OnChanges, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { SettingsService } from 'app/settings/settings.service'; import { Currency } from 'app/shared/models/general.model'; -import { NgIf, NgFor, CurrencyPipe } from '@angular/common'; +import { CurrencyPipe } from '@angular/common'; import { MatCheckbox } from '@angular/material/checkbox'; import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @@ -26,6 +26,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SharesAccountTermsStepComponent implements OnChanges, OnInit { + private formBuilder = inject(UntypedFormBuilder); + private settingsService = inject(SettingsService); + /** Shares Account and Product Template */ @Input() sharesAccountProductTemplate: any; /** [Optional] Shares Account Template */ @@ -48,14 +51,14 @@ export class SharesAccountTermsStepComponent implements OnChanges, OnInit { currency: Currency | null = null; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private settingsService: SettingsService - ) { + constructor() { this.createSharesAccountTermsForm(); } diff --git a/src/app/shares/shares-account-view/charges-tab/charges-tab.component.html b/src/app/shares/shares-account-view/charges-tab/charges-tab.component.html index 072b2a4c47..d607936311 100644 --- a/src/app/shares/shares-account-view/charges-tab/charges-tab.component.html +++ b/src/app/shares/shares-account-view/charges-tab/charges-tab.component.html @@ -56,50 +56,54 @@ {{ 'labels.heading.All Charges' | translate }} {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - + @if (sharesAccountData.status.value === 'Submitted and pending approval') { + + + + + + + + + } + @if (sharesAccountData.status.value === 'Active') { + + + + + + + + + } diff --git a/src/app/shares/shares-account-view/charges-tab/charges-tab.component.ts b/src/app/shares/shares-account-view/charges-tab/charges-tab.component.ts index ac2b53505d..e0ee918639 100644 --- a/src/app/shares/shares-account-view/charges-tab/charges-tab.component.ts +++ b/src/app/shares/shares-account-view/charges-tab/charges-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatTableDataSource, MatTable, @@ -14,7 +14,7 @@ import { MatRow } from '@angular/material/table'; import { ActivatedRoute } from '@angular/router'; -import { NgIf, CurrencyPipe } from '@angular/common'; +import { CurrencyPipe } from '@angular/common'; import { MatTooltip } from '@angular/material/tooltip'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -42,6 +42,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ChargesTabComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Shares Account Data */ sharesAccountData: any; /** Charges Data */ @@ -61,11 +63,14 @@ export class ChargesTabComponent implements OnInit { 'actions' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves shares account aata from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.parent.data.subscribe((data: { sharesAccountData: any }) => { this.sharesAccountData = data.sharesAccountData; this.chargesData = this.sharesAccountData.charges; diff --git a/src/app/shares/shares-account-view/dividends-tab/dividends-tab.component.ts b/src/app/shares/shares-account-view/dividends-tab/dividends-tab.component.ts index 02496e9ca1..050226b4ab 100644 --- a/src/app/shares/shares-account-view/dividends-tab/dividends-tab.component.ts +++ b/src/app/shares/shares-account-view/dividends-tab/dividends-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatTableDataSource, MatTable, @@ -42,6 +42,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DividendsTabComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Shares Account Data */ shareAccountData: any; /** Dividends Data */ @@ -56,11 +58,14 @@ export class DividendsTabComponent implements OnInit { 'status' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves shares account data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.parent.data.subscribe((data: { sharesAccountData: any }) => { this.shareAccountData = data.sharesAccountData; this.dividendsData = this.shareAccountData.dividends; diff --git a/src/app/shares/shares-account-view/general-tab/general-tab.component.html b/src/app/shares/shares-account-view/general-tab/general-tab.component.html index ef06402970..f2389d83c4 100644 --- a/src/app/shares/shares-account-view/general-tab/general-tab.component.html +++ b/src/app/shares/shares-account-view/general-tab/general-tab.component.html @@ -6,12 +6,16 @@ {{ 'labels.heading.Shares Details' | translate }} {{ 'labels.inputs.Activated On' | translate }} - - {{ sharesAccountData.timeline.activatedDate | dateFormat }} - - - {{ 'labels.text.Not Activated' | translate }} - + @if (sharesAccountData.timeline.activatedDate) { + + {{ sharesAccountData.timeline.activatedDate | dateFormat }} + + } + @if (!sharesAccountData.timeline.activatedDate) { + + {{ 'labels.text.Not Activated' | translate }} + + } {{ 'labels.inputs.Currency' | translate }} @@ -19,26 +23,36 @@ {{ 'labels.heading.Shares Details' | translate }} {{ 'labels.inputs.External Id' | translate }} - - - - - {{ 'labels.inputs.Unassigned' | translate }} - + @if (sharesAccountData.externalId) { + + + + } + @if (!sharesAccountData.externalId) { + + {{ 'labels.inputs.Unassigned' | translate }} + + } {{ 'labels.inputs.Linked Savings Account(Dividend Posting)' | translate }} - - - - - {{ 'labels.inputs.Unassigned' | translate }} - + @if (sharesAccountData.savingsAccountNumber) { + + + + } + @if (!sharesAccountData.savingsAccountNumber) { + + {{ 'labels.inputs.Unassigned' | translate }} + + } diff --git a/src/app/shares/shares-account-view/general-tab/general-tab.component.ts b/src/app/shares/shares-account-view/general-tab/general-tab.component.ts index b090ddb82a..f1522a8bfa 100644 --- a/src/app/shares/shares-account-view/general-tab/general-tab.component.ts +++ b/src/app/shares/shares-account-view/general-tab/general-tab.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { ExternalIdentifierComponent } from '../../../shared/external-identifier/external-identifier.component'; import { AccountNumberComponent } from '../../../shared/account-number/account-number.component'; @@ -19,14 +19,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GeneralTabComponent { + private route = inject(ActivatedRoute); + /** Shares Account Data */ sharesAccountData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches shares account data from `resolve` * @param {ActivatedRoute} route Activated Route */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { sharesAccountData: any }) => { this.sharesAccountData = data.sharesAccountData; }); diff --git a/src/app/shares/shares-account-view/shares-account-view.component.html b/src/app/shares/shares-account-view/shares-account-view.component.html index bb8d227adf..42ad3381cf 100644 --- a/src/app/shares/shares-account-view/shares-account-view.component.html +++ b/src/app/shares/shares-account-view/shares-account-view.component.html @@ -35,9 +35,11 @@ {{ 'labels.text.' + entityType | translate }} {{ 'labels.inputs.name' | translate }} :{{ sharesAccountData.clientName || sharesAccountData.groupName }} - - - + @if (sharesAccountData.clientAccountNo) { + + + + } @@ -46,13 +48,15 @@ {{ 'labels.inputs.Current Market Price' | translate }} : {{ sharesAccountData.currentMarketPrice | formatNumber }} - - {{ 'labels.inputs.Lockin Period' | translate }} : - - {{ sharesAccountData.lockinPeriod }} - {{ sharesAccountData.lockPeriodTypeEnum.value | translateKey: 'catalogs' }} - - + @if (sharesAccountData.lockinPeriod) { + + {{ 'labels.inputs.Lockin Period' | translate }} : + + {{ sharesAccountData.lockinPeriod }} + {{ sharesAccountData.lockPeriodTypeEnum.value | translateKey: 'catalogs' }} + + + } @@ -60,17 +64,18 @@ - 0" - > - - - - + @if (buttonConfig.singleButtons.length > 0) { + + + + + + } @@ -78,25 +83,27 @@ - + @for (item of buttonConfig.singleButtons; track item) { {{ 'labels.menus.' + item.name | translate }} - + } - + @if (buttonConfig.options.length) { {{ 'labels.menus.More' | translate }} - - - {{ 'labels.menus.' + option.name | translate }} - - + @for (option of buttonConfig.options; track option) { + + + {{ 'labels.menus.' + option.name | translate }} + + + } - + } diff --git a/src/app/shares/shares-account-view/shares-account-view.component.ts b/src/app/shares/shares-account-view/shares-account-view.component.ts index 51b3b9527c..299d7a228c 100644 --- a/src/app/shares/shares-account-view/shares-account-view.component.ts +++ b/src/app/shares/shares-account-view/shares-account-view.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -20,7 +20,7 @@ import { MatCardContent } from '@angular/material/card'; import { MatTooltip } from '@angular/material/tooltip'; -import { NgClass, NgIf, NgFor } from '@angular/common'; +import { NgClass } from '@angular/common'; import { LongTextComponent } from '../../shared/long-text/long-text.component'; import { AccountNumberComponent } from '../../shared/account-number/account-number.component'; import { MatIconButton } from '@angular/material/button'; @@ -65,6 +65,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SharesAccountViewComponent implements OnInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private sharesService = inject(SharesService); + dialog = inject(MatDialog); + /** Shares Account Data */ sharesAccountData: any; /** Button Configurations */ @@ -72,6 +77,9 @@ export class SharesAccountViewComponent implements OnInit { entityType: string; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches shares account data from `resolve` * @param {ActivatedRoute} route Activated Route @@ -79,12 +87,7 @@ export class SharesAccountViewComponent implements OnInit { * @param {SharesService} sharesService Shares Service * @param {MatDialog} dialog Mat Dialog */ - constructor( - private route: ActivatedRoute, - private router: Router, - private sharesService: SharesService, - public dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { sharesAccountData: any }) => { this.sharesAccountData = data.sharesAccountData; }); diff --git a/src/app/shares/shares-account-view/transactions-tab/transactions-tab.component.ts b/src/app/shares/shares-account-view/transactions-tab/transactions-tab.component.ts index fdd28c9437..1cde572e06 100644 --- a/src/app/shares/shares-account-view/transactions-tab/transactions-tab.component.ts +++ b/src/app/shares/shares-account-view/transactions-tab/transactions-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatTableDataSource, MatTable, @@ -40,6 +40,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class TransactionsTabComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Shares Account Data */ shareAccountData: any; /** Transactions Data */ @@ -56,11 +58,14 @@ export class TransactionsTabComponent implements OnInit { 'amountRecievedOrReturned' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves shares account data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.parent.data.subscribe((data: { sharesAccountData: any }) => { this.shareAccountData = data.sharesAccountData; this.transactionsData = this.shareAccountData.purchasedShares; diff --git a/src/app/shares/shares.service.ts b/src/app/shares/shares.service.ts index bffbe39d37..c52e27c38f 100644 --- a/src/app/shares/shares.service.ts +++ b/src/app/shares/shares.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -12,10 +12,15 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class SharesService { + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client */ - constructor(private http: HttpClient) {} + constructor() {} /** * @param {string} accountId Shares Account Id of account to get data for. diff --git a/src/app/system/account-number-preferences/account-number-preferences.component.ts b/src/app/system/account-number-preferences/account-number-preferences.component.ts index 6b9db27eda..62f8ad9136 100644 --- a/src/app/system/account-number-preferences/account-number-preferences.component.ts +++ b/src/app/system/account-number-preferences/account-number-preferences.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -45,6 +45,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AccountNumberPreferencesComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Account Number Preferences data. */ accountNumberPreferencesData: any; /** Columns to be displayed in account number preferences table. */ @@ -57,11 +59,14 @@ export class AccountNumberPreferencesComponent implements OnInit { /** Sorter for account number preferences table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the account number preferences data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { accountNumberPreferences: any }) => { this.accountNumberPreferencesData = data.accountNumberPreferences; }); diff --git a/src/app/system/account-number-preferences/account-number-preferences.resolver.ts b/src/app/system/account-number-preferences/account-number-preferences.resolver.ts index 80af3b9977..b171129ec6 100644 --- a/src/app/system/account-number-preferences/account-number-preferences.resolver.ts +++ b/src/app/system/account-number-preferences/account-number-preferences.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../system.service'; */ @Injectable() export class AccountNumberPreferencesResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Account Number Preferences data. diff --git a/src/app/system/account-number-preferences/create-account-number-preference/account-number-preferences-template.resolver.ts b/src/app/system/account-number-preferences/create-account-number-preference/account-number-preferences-template.resolver.ts index 0a681edebc..3d233af638 100644 --- a/src/app/system/account-number-preferences/create-account-number-preference/account-number-preferences-template.resolver.ts +++ b/src/app/system/account-number-preferences/create-account-number-preference/account-number-preferences-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../../system.service'; */ @Injectable() export class AccountNumberPreferencesTemplateResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Account Number Preferences Template data. diff --git a/src/app/system/account-number-preferences/create-account-number-preference/create-account-number-preference.component.html b/src/app/system/account-number-preferences/create-account-number-preference/create-account-number-preference.component.html index 676836bf48..fd973b5e58 100644 --- a/src/app/system/account-number-preferences/create-account-number-preference/create-account-number-preference.component.html +++ b/src/app/system/account-number-preferences/create-account-number-preference/create-account-number-preference.component.html @@ -6,25 +6,28 @@ {{ 'labels.inputs.Account Type' | translate }} - - {{ accountType.value | translateKey: 'catalogs' }} - + @for (accountType of accountNumberPreferencesTemplateData.accountTypeOptions; track accountType) { + + {{ accountType.value | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Account Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (accountNumberPreferenceForm.controls.accountType.hasError('required')) { + + {{ 'labels.inputs.Account Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Prefix Field' | translate }} - - {{ prefixType.value }} - + @for (prefixType of prefixTypeData; track prefixType) { + + {{ prefixType.value }} + + } diff --git a/src/app/system/account-number-preferences/create-account-number-preference/create-account-number-preference.component.ts b/src/app/system/account-number-preferences/create-account-number-preference/create-account-number-preference.component.ts index 02bf01f01d..26abbd9d9e 100644 --- a/src/app/system/account-number-preferences/create-account-number-preference/create-account-number-preference.component.ts +++ b/src/app/system/account-number-preferences/create-account-number-preference/create-account-number-preference.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -19,6 +19,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateAccountNumberPreferenceComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private systemService = inject(SystemService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Account Number Preferences Form */ accountNumberPreferenceForm: UntypedFormGroup; /** Account Number Preferences Template Data */ @@ -26,6 +31,9 @@ export class CreateAccountNumberPreferenceComponent implements OnInit { /** Prefix Type Data */ prefixTypeData: any[]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the account number preferences template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -33,12 +41,7 @@ export class CreateAccountNumberPreferenceComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private systemService: SystemService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { accountNumberPreferencesTemplate: any }) => { this.accountNumberPreferencesTemplateData = data.accountNumberPreferencesTemplate; }); diff --git a/src/app/system/account-number-preferences/edit-account-number-preference/edit-account-number-preference.component.html b/src/app/system/account-number-preferences/edit-account-number-preference/edit-account-number-preference.component.html index ec2d899b77..cb6398e78b 100644 --- a/src/app/system/account-number-preferences/edit-account-number-preference/edit-account-number-preference.component.html +++ b/src/app/system/account-number-preferences/edit-account-number-preference/edit-account-number-preference.component.html @@ -6,25 +6,28 @@ {{ 'labels.inputs.Account Type' | translate }} - - {{ accountType.value | translateKey: 'catalogs' }} - + @for (accountType of accountNumberPreferencesTemplateData.accountTypeOptions; track accountType) { + + {{ accountType.value | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Account Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (accountNumberPreferenceForm.controls.accountType.hasError('required')) { + + {{ 'labels.inputs.Account Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Prefix Field' | translate }} - - {{ prefixType.value }} - + @for (prefixType of prefixTypeData; track prefixType) { + + {{ prefixType.value }} + + } diff --git a/src/app/system/account-number-preferences/edit-account-number-preference/edit-account-number-preference.component.ts b/src/app/system/account-number-preferences/edit-account-number-preference/edit-account-number-preference.component.ts index 0a74f9e316..923e2eeb01 100644 --- a/src/app/system/account-number-preferences/edit-account-number-preference/edit-account-number-preference.component.ts +++ b/src/app/system/account-number-preferences/edit-account-number-preference/edit-account-number-preference.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -19,6 +19,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditAccountNumberPreferenceComponent implements OnInit { + private route = inject(ActivatedRoute); + private formBuilder = inject(UntypedFormBuilder); + private systemService = inject(SystemService); + private router = inject(Router); + /** Account Number Preference Form */ accountNumberPreferenceForm: UntypedFormGroup; /** Account Number Preference Data */ @@ -28,6 +33,9 @@ export class EditAccountNumberPreferenceComponent implements OnInit { /** Prefix Type Data */ prefixTypeData: any[]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the account number preference and account number preferences template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -35,12 +43,7 @@ export class EditAccountNumberPreferenceComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private route: ActivatedRoute, - private formBuilder: UntypedFormBuilder, - private systemService: SystemService, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { accountNumberPreference: any; accountNumberPreferencesTemplate: any }) => { this.accountNumberPreferenceData = data.accountNumberPreference; this.accountNumberPreferencesTemplateData = data.accountNumberPreferencesTemplate; diff --git a/src/app/system/account-number-preferences/view-account-number-preference/account-number-preference.resolver.ts b/src/app/system/account-number-preferences/view-account-number-preference/account-number-preference.resolver.ts index 93da450278..c22da531f9 100644 --- a/src/app/system/account-number-preferences/view-account-number-preference/account-number-preference.resolver.ts +++ b/src/app/system/account-number-preferences/view-account-number-preference/account-number-preference.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SystemService } from '../../system.service'; */ @Injectable() export class AccountNumberPreferenceResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Account Number Preference data. diff --git a/src/app/system/account-number-preferences/view-account-number-preference/view-account-number-preference.component.html b/src/app/system/account-number-preferences/view-account-number-preference/view-account-number-preference.component.html index 7bcacef644..93f615fb74 100644 --- a/src/app/system/account-number-preferences/view-account-number-preference/view-account-number-preference.component.html +++ b/src/app/system/account-number-preferences/view-account-number-preference/view-account-number-preference.component.html @@ -22,13 +22,17 @@ {{ accountNumberPreferenceData.accountType.value | translateKey: 'catalogs' }} - - {{ 'labels.inputs.Prefix Type' | translate }} - + @if (accountNumberPreferenceData.prefixType) { + + {{ 'labels.inputs.Prefix Type' | translate }} + + } - - {{ accountNumberPreferenceData.prefixType.value }} - + @if (accountNumberPreferenceData.prefixType) { + + {{ accountNumberPreferenceData.prefixType.value }} + + } diff --git a/src/app/system/account-number-preferences/view-account-number-preference/view-account-number-preference.component.ts b/src/app/system/account-number-preferences/view-account-number-preference/view-account-number-preference.component.ts index 8b6030c120..80ddc55f09 100644 --- a/src/app/system/account-number-preferences/view-account-number-preference/view-account-number-preference.component.ts +++ b/src/app/system/account-number-preferences/view-account-number-preference/view-account-number-preference.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -25,9 +25,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewAccountNumberPreferenceComponent { + private route = inject(ActivatedRoute); + private systemService = inject(SystemService); + private router = inject(Router); + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** Account Number Preference Data */ accountNumberPreferenceData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the account number preference data from `resolve`. * @param {SystemService} systemService Accounting Service. @@ -36,13 +45,7 @@ export class ViewAccountNumberPreferenceComponent { * @param {MatDialog} dialog Dialog reference. * @param {TranslateService} translateService Translate Service. */ - constructor( - private route: ActivatedRoute, - private systemService: SystemService, - private router: Router, - private dialog: MatDialog, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { accountNumberPreference: any }) => { this.accountNumberPreferenceData = data.accountNumberPreference; }); diff --git a/src/app/system/audit-trails/audit-trail-search-template.resolver.ts b/src/app/system/audit-trails/audit-trail-search-template.resolver.ts index 465e177105..755b01606c 100644 --- a/src/app/system/audit-trails/audit-trail-search-template.resolver.ts +++ b/src/app/system/audit-trails/audit-trail-search-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../system.service'; */ @Injectable() export class AuditTrailSearchTemplateResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Audit Trail Search Template data. diff --git a/src/app/system/audit-trails/audit-trails.component.html b/src/app/system/audit-trails/audit-trails.component.html index e6e078e81e..6b41103993 100644 --- a/src/app/system/audit-trails/audit-trails.component.html +++ b/src/app/system/audit-trails/audit-trails.component.html @@ -14,12 +14,11 @@ {{ 'labels.inputs.Status' | translate }} - - {{ processingResult.processingResult }} - + @for (processingResult of auditTrailSearchTemplateData.processingResults; track processingResult) { + + {{ processingResult.processingResult }} + + } @@ -130,98 +129,100 @@ - - {{ user.username }} - + @for (user of filteredUserData | async; track user) { + + {{ user.username }} + + } - - {{ action }} - + @for (action of filteredActionData | async; track action) { + + {{ action }} + + } - - {{ entity }} - + @for (entity of filteredEntityData | async; track entity) { + + {{ entity }} + + } - - {{ user.username }} - + @for (user of filteredCheckerData | async; track user) { + + {{ user.username }} + + } - - - - - - {{ 'labels.inputs.Trail ID' | translate }} - {{ auditTrail.id }} - - - - {{ 'labels.inputs.Resource ID' | translate }} - {{ auditTrail.resourceId }} - - - - {{ 'labels.inputs.Status' | translate }} - {{ auditTrail.processingResult }} - - - - {{ 'labels.inputs.Made By' | translate }} - {{ auditTrail.maker }} - - - - {{ 'labels.inputs.Action' | translate }} - {{ auditTrail.actionName }} - - - - {{ 'labels.inputs.Entity' | translate }} - {{ auditTrail.entityName }} - - - - {{ 'labels.inputs.Office' | translate }} - {{ auditTrail.officeName }} - - - - {{ 'labels.inputs.Made Date' | translate }} - {{ auditTrail.madeOnDate | datetimeFormat }} - - - - {{ 'labels.inputs.Checker' | translate }} - {{ auditTrail.checker }} - - - - {{ 'labels.inputs.Checked Date' | translate }} - {{ auditTrail.checkedOnDate | datetimeFormat }} - - - - {{ 'labels.inputs.Client Ip' | translate }} - {{ auditTrail.ip }} - - - - - - - + @if (isLoading) { + + + + } + @if (!isLoading) { + + + {{ 'labels.inputs.Trail ID' | translate }} + {{ auditTrail.id }} + + + {{ 'labels.inputs.Resource ID' | translate }} + {{ auditTrail.resourceId }} + + + {{ 'labels.inputs.Status' | translate }} + {{ auditTrail.processingResult }} + + + {{ 'labels.inputs.Made By' | translate }} + {{ auditTrail.maker }} + + + {{ 'labels.inputs.Action' | translate }} + {{ auditTrail.actionName }} + + + {{ 'labels.inputs.Entity' | translate }} + {{ auditTrail.entityName }} + + + {{ 'labels.inputs.Office' | translate }} + {{ auditTrail.officeName }} + + + {{ 'labels.inputs.Made Date' | translate }} + {{ auditTrail.madeOnDate | datetimeFormat }} + + + {{ 'labels.inputs.Checker' | translate }} + {{ auditTrail.checker }} + + + {{ 'labels.inputs.Checked Date' | translate }} + {{ auditTrail.checkedOnDate | datetimeFormat }} + + + {{ 'labels.inputs.Client Ip' | translate }} + {{ auditTrail.ip }} + + + + + } + + @if (!isLoading) { + + } diff --git a/src/app/system/audit-trails/audit-trails.component.ts b/src/app/system/audit-trails/audit-trails.component.ts index 24ce9f8e38..50959cedd3 100644 --- a/src/app/system/audit-trails/audit-trails.component.ts +++ b/src/app/system/audit-trails/audit-trails.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { ActivatedRoute, RouterLink } from '@angular/router'; @@ -17,7 +17,7 @@ import { merge } from 'rxjs'; import { tap, debounceTime, distinctUntilChanged, startWith, map } from 'rxjs/operators'; import { Dates } from 'app/core/utils/dates'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; -import { NgFor, NgIf, AsyncPipe } from '@angular/common'; +import { AsyncPipe } from '@angular/common'; import { MatOption, MatAutocompleteTrigger, MatAutocomplete } from '@angular/material/autocomplete'; import { MatProgressBar } from '@angular/material/progress-bar'; import { @@ -66,6 +66,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AuditTrailsComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private systemService = inject(SystemService); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -185,6 +190,9 @@ export class AuditTrailsComponent implements OnInit, AfterViewInit { /** Sorter for audit trails table. */ @ViewChild(MatSort) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the audit trail search template data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -192,12 +200,7 @@ export class AuditTrailsComponent implements OnInit, AfterViewInit { * @param {Dates} dateUtils Dates utils * @param {SettingsService} settingsService Settings Service */ - constructor( - private route: ActivatedRoute, - private systemService: SystemService, - private dateUtils: Dates, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { auditTrailSearchTemplate: any }) => { this.auditTrailSearchTemplateData = data.auditTrailSearchTemplate; }); diff --git a/src/app/system/audit-trails/view-audit/audit-trail.resolver.ts b/src/app/system/audit-trails/view-audit/audit-trail.resolver.ts index 24747ce2c6..ee6e6f956c 100644 --- a/src/app/system/audit-trails/view-audit/audit-trail.resolver.ts +++ b/src/app/system/audit-trails/view-audit/audit-trail.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SystemService } from '../../system.service'; */ @Injectable() export class AuditTrailResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Audit Trail data. diff --git a/src/app/system/audit-trails/view-audit/view-audit.component.html b/src/app/system/audit-trails/view-audit/view-audit.component.html index d76dcc2411..c8be4d8b82 100644 --- a/src/app/system/audit-trails/view-audit/view-audit.component.html +++ b/src/app/system/audit-trails/view-audit/view-audit.component.html @@ -60,38 +60,54 @@ {{ auditTrailData.madeOnDate | datetimeFormat }} - - {{ 'labels.inputs.Office' | translate }} - - - - {{ auditTrailData.officeName }} - - - - {{ 'labels.inputs.Savings Account No' | translate }} - - - - {{ auditTrailData.savingsAccountNo }} - + @if (auditTrailData.officeName) { + + {{ 'labels.inputs.Office' | translate }} + + } + + @if (auditTrailData.officeName) { + + {{ auditTrailData.officeName }} + + } + + @if (auditTrailData.savingsAccountNo) { + + {{ 'labels.inputs.Savings Account No' | translate }} + + } + + @if (auditTrailData.savingsAccountNo) { + + {{ auditTrailData.savingsAccountNo }} + + } + + @if (auditTrailData.groupLevelName) { + + {{ 'labels.inputs.Group Level' | translate }} + + } + + @if (auditTrailData.groupLevelName) { + + {{ auditTrailData.groupLevelName }} + + } + - - {{ 'labels.inputs.Group Level' | translate }} + @if (auditTrailData.ip) { + + {{ 'labels.inputs.Client Ip' | translate }} + } - - {{ auditTrailData.groupLevelName }} + @if (auditTrailData.ip) { + + {{ auditTrailData.ip }} - - - - {{ 'labels.inputs.Client Ip' | translate }} - - - - {{ auditTrailData.ip }} - + } diff --git a/src/app/system/audit-trails/view-audit/view-audit.component.ts b/src/app/system/audit-trails/view-audit/view-audit.component.ts index d4cccee9f8..c303156f47 100644 --- a/src/app/system/audit-trails/view-audit/view-audit.component.ts +++ b/src/app/system/audit-trails/view-audit/view-audit.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -44,6 +44,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewAuditComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Audit Trail Data. */ auditTrailData: any; /** Columns to be displayed in audit trail table. */ @@ -59,11 +61,14 @@ export class ViewAuditComponent implements OnInit { /** Sorter for audit trails table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the audit trail data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { auditTrail: any }) => { this.auditTrailData = data.auditTrail; }); diff --git a/src/app/system/codes/code.resolver.ts b/src/app/system/codes/code.resolver.ts index d059b75011..e49924efa2 100644 --- a/src/app/system/codes/code.resolver.ts +++ b/src/app/system/codes/code.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SystemService } from '../system.service'; */ @Injectable() export class CodeResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Code data. diff --git a/src/app/system/codes/codes.component.html b/src/app/system/codes/codes.component.html index d3b2965642..90a4701d8c 100644 --- a/src/app/system/codes/codes.component.html +++ b/src/app/system/codes/codes.component.html @@ -25,22 +25,24 @@ {{ 'labels.inputs.System Defined' | translate }} - - + @if (code.systemDefined) { + + } + @if (!code.systemDefined) { + + } diff --git a/src/app/system/codes/codes.component.ts b/src/app/system/codes/codes.component.ts index 487d372356..421a6a5724 100644 --- a/src/app/system/codes/codes.component.ts +++ b/src/app/system/codes/codes.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -48,6 +48,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CodesComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Codes data. */ codesData: any; /** Columns to be displayed in codes table. */ @@ -72,6 +77,9 @@ export class CodesComponent implements OnInit, AfterViewInit { /* Template for popover on codes table */ @ViewChild('templateTableCodes') templateTableCodes: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the codes data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -79,12 +87,7 @@ export class CodesComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { codes: any }) => { this.codesData = data.codes; }); diff --git a/src/app/system/codes/codes.resolver.ts b/src/app/system/codes/codes.resolver.ts index 8de813bada..118b32ab4e 100644 --- a/src/app/system/codes/codes.resolver.ts +++ b/src/app/system/codes/codes.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../system.service'; */ @Injectable() export class CodesResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Codes data. diff --git a/src/app/system/codes/create-code/create-code.component.html b/src/app/system/codes/create-code/create-code.component.html index ca4b4be581..f0417a5334 100644 --- a/src/app/system/codes/create-code/create-code.component.html +++ b/src/app/system/codes/create-code/create-code.component.html @@ -6,10 +6,12 @@ {{ 'labels.inputs.Code Name' | translate }} - - {{ 'labels.inputs.Code Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (codeForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Code Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/system/codes/create-code/create-code.component.ts b/src/app/system/codes/create-code/create-code.component.ts index b5babaa63a..7bcde13084 100644 --- a/src/app/system/codes/create-code/create-code.component.ts +++ b/src/app/system/codes/create-code/create-code.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -19,6 +19,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateCodeComponent implements OnInit, AfterViewInit { + private formBuilder = inject(UntypedFormBuilder); + private systemService = inject(SystemService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Code form. */ codeForm: UntypedFormGroup; @@ -27,6 +34,9 @@ export class CreateCodeComponent implements OnInit, AfterViewInit { /* Template for popover on create code form */ @ViewChild('templateCodeFormRef') templateCodeFormRef: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {SystemService} systemService Accounting Service. @@ -35,14 +45,7 @@ export class CreateCodeComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private formBuilder: UntypedFormBuilder, - private systemService: SystemService, - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) {} + constructor() {} /** * Creates the code form. diff --git a/src/app/system/codes/edit-code/edit-code.component.html b/src/app/system/codes/edit-code/edit-code.component.html index 5a841fe61b..67efb1b8fa 100644 --- a/src/app/system/codes/edit-code/edit-code.component.html +++ b/src/app/system/codes/edit-code/edit-code.component.html @@ -6,10 +6,12 @@ {{ 'labels.inputs.Code Name' | translate }} - - {{ 'labels.inputs.Code Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (codeForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Code Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/system/codes/edit-code/edit-code.component.ts b/src/app/system/codes/edit-code/edit-code.component.ts index 228cd0e223..4387adafa8 100644 --- a/src/app/system/codes/edit-code/edit-code.component.ts +++ b/src/app/system/codes/edit-code/edit-code.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -19,11 +19,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditCodeComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private systemService = inject(SystemService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Code Form */ codeForm: UntypedFormGroup; /** Code Data */ codeData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the code data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -31,12 +39,7 @@ export class EditCodeComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private systemService: SystemService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { code: any }) => { this.codeData = data.code; }); diff --git a/src/app/system/codes/view-code/code-values.resolver.ts b/src/app/system/codes/view-code/code-values.resolver.ts index b494341128..28c97409fc 100644 --- a/src/app/system/codes/view-code/code-values.resolver.ts +++ b/src/app/system/codes/view-code/code-values.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SystemService } from '../../system.service'; */ @Injectable() export class CodeValuesResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Code Values data. diff --git a/src/app/system/codes/view-code/view-code.component.html b/src/app/system/codes/view-code/view-code.component.html index 186bf8b15a..96188f8d07 100644 --- a/src/app/system/codes/view-code/view-code.component.html +++ b/src/app/system/codes/view-code/view-code.component.html @@ -4,19 +4,23 @@ {{ 'labels.buttons.Add Code Value' | translate }} - - - - {{ 'labels.buttons.Edit Code' | translate }} - - + @if (!codeData.systemDefined) { + + + + {{ 'labels.buttons.Edit Code' | translate }} + + + } - - - - {{ 'labels.buttons.Delete Code' | translate }} - - + @if (!codeData.systemDefined) { + + + + {{ 'labels.buttons.Delete Code' | translate }} + + + } @@ -27,103 +31,111 @@ - - - - {{ 'labels.inputs.name' | translate }} - - - {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Description' | translate }} - - - - - {{ 'labels.inputs.Position' | translate }} - - - {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ - 'labels.inputs.Active' | translate - }} - - - - + @for (codeValue of codeValues.controls; track codeValue; let i = $index) { + + + + {{ 'labels.inputs.name' | translate }} + + @if (codeValues.at(i).controls.name.hasError('required')) { + + {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Description' | translate }} + + + + {{ 'labels.inputs.Position' | translate }} + + @if (codeValues.at(i).controls.position.hasError('required')) { + + {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ + 'labels.inputs.Active' | translate + }} + + + @if (codeValueRowStatus[i] === 'edit') { + + + {{ 'labels.buttons.Submit' | translate }} + + + } + @if (codeValueRowStatus[i] === 'edit') { + + {{ 'labels.buttons.Cancel' | translate }} + + } + @if (codeValueRowStatus[i] === 'new') { + + + + } + @if (codeValueRowStatus[i] === 'disabled') { + + + + } - {{ 'labels.buttons.Submit' | translate }} + - - - {{ 'labels.buttons.Cancel' | translate }} - - - - - - - - - - + - + } diff --git a/src/app/system/codes/view-code/view-code.component.ts b/src/app/system/codes/view-code/view-code.component.ts index f3683e9922..95b5ac40df 100644 --- a/src/app/system/codes/view-code/view-code.component.ts +++ b/src/app/system/codes/view-code/view-code.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormArray, UntypedFormBuilder, @@ -40,6 +40,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewCodeComponent implements OnInit { + private route = inject(ActivatedRoute); + private systemService = inject(SystemService); + private router = inject(Router); + private formBuilder = inject(UntypedFormBuilder); + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** Code Data */ codeData: any; /** Code Values Data */ @@ -49,6 +56,9 @@ export class ViewCodeComponent implements OnInit { /** Code Value Row Status */ codeValueRowStatus: string[] = []; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the codes and code values data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -58,14 +68,7 @@ export class ViewCodeComponent implements OnInit { * @param {MatDialog} dialog Dialog reference. * @param {TranslateService} translateService Translate Service. */ - constructor( - private route: ActivatedRoute, - private systemService: SystemService, - private router: Router, - private formBuilder: UntypedFormBuilder, - private dialog: MatDialog, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { code: any; codeValues: any }) => { this.codeData = data.code; this.codeValuesData = data.codeValues; diff --git a/src/app/system/configurations/business-date-tab/business-date-tab.component.html b/src/app/system/configurations/business-date-tab/business-date-tab.component.html index 3e6f97422b..c660e96dfd 100644 --- a/src/app/system/configurations/business-date-tab/business-date-tab.component.html +++ b/src/app/system/configurations/business-date-tab/business-date-tab.component.html @@ -1,130 +1,149 @@ - - - {{ 'labels.text.Business Date functionality is not enabled' | translate }}: {{ configurationName }} - - + @if (!isBusinessDateEnabled) { + + + {{ 'labels.text.Business Date functionality is not enabled' | translate }}: + {{ configurationName }} + + + } - - - - - - - {{ 'labels.inputs.User date format' | translate }}: - {{ userDateFormat }} + @if (isBusinessDateEnabled) { + + + + + + + {{ 'labels.inputs.User date format' | translate }}: + {{ userDateFormat }} + - - - - - - {{ 'labels.inputs.Business Date' | translate }}: - {{ businessDate | dateFormat }} - - - - {{ 'labels.inputs.Business Date' | translate }} - - - - - {{ 'labels.inputs.Business Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - - {{ 'labels.buttons.Submit' | translate }} - - - {{ 'labels.buttons.Cancel' | translate }} - - - - - + + + @if (!isEditInProgress) { + + {{ 'labels.inputs.Business Date' | translate }}: + {{ businessDate | dateFormat }} + + } + @if (isEditInProgress && dateIndex === 0) { + + {{ 'labels.inputs.Business Date' | translate }} + + + + @if (businessDateForm.controls.businessDate.hasError('required')) { + + {{ 'labels.inputs.Business Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + + @if (isEditInProgress && dateIndex === 0) { + + + {{ 'labels.buttons.Submit' | translate }} + + + {{ 'labels.buttons.Cancel' | translate }} + + + } + @if (!isEditInProgress) { + + + + } + - - - - - - {{ 'labels.inputs.COB Date' | translate }}: - {{ cobDate | dateFormat }} - - - - {{ 'labels.inputs.COB Date' | translate }} - - - - - {{ 'labels.inputs.COB Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - - - {{ 'labels.buttons.Submit' | translate }} - - - - {{ 'labels.buttons.Cancel' | translate }} - - - - + + + @if (!isEditInProgress) { + + {{ 'labels.inputs.COB Date' | translate }}: + {{ cobDate | dateFormat }} + + } + @if (isEditInProgress && dateIndex === 1) { + + {{ 'labels.inputs.COB Date' | translate }} + + + + @if (businessDateForm.controls.cobDate.hasError('required')) { + + {{ 'labels.inputs.COB Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + + @if (isEditInProgress && dateIndex === 1) { + + + {{ 'labels.buttons.Submit' | translate }} + + + } + @if (isEditInProgress && dateIndex === 1) { + + {{ 'labels.buttons.Cancel' | translate }} + + } + @if (!isEditInProgress) { + + + + } + - - - - - + + + + + } diff --git a/src/app/system/configurations/business-date-tab/business-date-tab.component.ts b/src/app/system/configurations/business-date-tab/business-date-tab.component.ts index 0fbbd7d98e..f3bc30d758 100644 --- a/src/app/system/configurations/business-date-tab/business-date-tab.component.ts +++ b/src/app/system/configurations/business-date-tab/business-date-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { Alert } from 'app/core/alert/alert.model'; @@ -29,6 +29,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class BusinessDateTabComponent implements OnInit { + private systemService = inject(SystemService); + private settingsService = inject(SettingsService); + private formBuilder = inject(UntypedFormBuilder); + private dateUtils = inject(Dates); + private alertService = inject(AlertService); + /** Subscription to alerts. */ alert$: Subscription; @@ -50,6 +56,9 @@ export class BusinessDateTabComponent implements OnInit { isBusinessDateEnabled = false; isEditInProgress = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the configurations data from `resolve`. * @param {SystemService} systemService System Service. @@ -57,13 +66,7 @@ export class BusinessDateTabComponent implements OnInit { * @param {FormBuilder} formBuilder Form Builder. * @param {Dates} dateUtils Date Utils. */ - constructor( - private systemService: SystemService, - private settingsService: SettingsService, - private formBuilder: UntypedFormBuilder, - private dateUtils: Dates, - private alertService: AlertService - ) {} + constructor() {} ngOnInit(): void { this.alert$ = this.alertService.alertEvent.subscribe((alertEvent: Alert) => { diff --git a/src/app/system/configurations/configurations.component.html b/src/app/system/configurations/configurations.component.html index 9cfb6ec135..98c995dca2 100644 --- a/src/app/system/configurations/configurations.component.html +++ b/src/app/system/configurations/configurations.component.html @@ -4,9 +4,11 @@ - - - + @if (isBusinessDateEnabled) { + + + + } diff --git a/src/app/system/configurations/configurations.component.ts b/src/app/system/configurations/configurations.component.ts index b718e3047d..d2c5e67e7e 100644 --- a/src/app/system/configurations/configurations.component.ts +++ b/src/app/system/configurations/configurations.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { Alert } from 'app/core/alert/alert.model'; import { AlertService } from 'app/core/alert/alert.service'; import { SettingsService } from 'app/settings/settings.service'; @@ -22,15 +22,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ConfigurationsComponent implements OnInit { + private alertService = inject(AlertService); + private systemService = inject(SystemService); + /** Subscription to alerts. */ alert$: Subscription; isBusinessDateEnabled = false; - constructor( - private alertService: AlertService, - private systemService: SystemService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.alert$ = this.alertService.alertEvent.subscribe((alertEvent: Alert) => { diff --git a/src/app/system/configurations/global-configurations-tab/edit-configuration/edit-configuration.component.ts b/src/app/system/configurations/global-configurations-tab/edit-configuration/edit-configuration.component.ts index a5db5ed60c..a4f15b8be4 100644 --- a/src/app/system/configurations/global-configurations-tab/edit-configuration/edit-configuration.component.ts +++ b/src/app/system/configurations/global-configurations-tab/edit-configuration/edit-configuration.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { SettingsService } from 'app/settings/settings.service'; @@ -22,6 +22,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditConfigurationComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private systemService = inject(SystemService); + private settingsService = inject(SettingsService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Minimum transaction date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum transaction date allowed. */ @@ -32,6 +38,9 @@ export class EditConfigurationComponent implements OnInit { /** Configuration. */ configuration: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the configuration data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -40,13 +49,7 @@ export class EditConfigurationComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private systemService: SystemService, - private settingsService: SettingsService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { configuration: any }) => { this.configuration = data.configuration; }); diff --git a/src/app/system/configurations/global-configurations-tab/global-configuration.resolver.ts b/src/app/system/configurations/global-configurations-tab/global-configuration.resolver.ts index 45cf20d1b6..45bbe75d19 100644 --- a/src/app/system/configurations/global-configurations-tab/global-configuration.resolver.ts +++ b/src/app/system/configurations/global-configurations-tab/global-configuration.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SystemService } from '../../system.service'; */ @Injectable() export class GlobalConfigurationResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Configuration data. diff --git a/src/app/system/configurations/global-configurations-tab/global-configurations-tab.component.html b/src/app/system/configurations/global-configurations-tab/global-configurations-tab.component.html index dfe5186c8f..6107df820a 100644 --- a/src/app/system/configurations/global-configurations-tab/global-configurations-tab.component.html +++ b/src/app/system/configurations/global-configurations-tab/global-configurations-tab.component.html @@ -12,12 +12,13 @@ {{ 'labels.inputs.name' | translate }} {{ configuration.name }} - + @if (configuration.description) { + + } @@ -30,8 +31,12 @@ (click)="toggleStatus(configuration)" > - {{ 'labels.inputs.Enabled' | translate }} - {{ 'labels.inputs.Disabled' | translate }} + @if (configuration.enabled) { + {{ 'labels.inputs.Enabled' | translate }} + } + @if (!configuration.enabled) { + {{ 'labels.inputs.Disabled' | translate }} + } diff --git a/src/app/system/configurations/global-configurations-tab/global-configurations-tab.component.ts b/src/app/system/configurations/global-configurations-tab/global-configurations-tab.component.ts index 9805828d2e..8337346043 100644 --- a/src/app/system/configurations/global-configurations-tab/global-configurations-tab.component.ts +++ b/src/app/system/configurations/global-configurations-tab/global-configurations-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -57,6 +57,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class GlobalConfigurationsTabComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private alertService = inject(AlertService); + private systemService = inject(SystemService); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Configuration data. */ configurationData: any; /** Columns to be displayed in configurations table. */ @@ -85,6 +92,9 @@ export class GlobalConfigurationsTabComponent implements OnInit, AfterViewInit { /* Template for popover on configurations table */ @ViewChild('templateConfigurationsTable') templateConfigurationsTable: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the configurations data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -93,14 +103,7 @@ export class GlobalConfigurationsTabComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private alertService: AlertService, - private systemService: SystemService, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { configurations: any }) => { this.configurationData = data.configurations; }); diff --git a/src/app/system/configurations/global-configurations-tab/global-configurations.resolver.ts b/src/app/system/configurations/global-configurations-tab/global-configurations.resolver.ts index 4ce53d1d7f..5f88b216b4 100644 --- a/src/app/system/configurations/global-configurations-tab/global-configurations.resolver.ts +++ b/src/app/system/configurations/global-configurations-tab/global-configurations.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../../system.service'; */ @Injectable() export class GlobalConfigurationsResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the configurations data. diff --git a/src/app/system/configure-maker-checker-tasks/configure-maker-checker-tasks.component.html b/src/app/system/configure-maker-checker-tasks/configure-maker-checker-tasks.component.html index d8ea1e8cb7..5d39742b25 100644 --- a/src/app/system/configure-maker-checker-tasks/configure-maker-checker-tasks.component.html +++ b/src/app/system/configure-maker-checker-tasks/configure-maker-checker-tasks.component.html @@ -18,15 +18,16 @@ - - - {{ formatName(grouping) }} - - + @for (grouping of groupings; track grouping) { + + + {{ formatName(grouping) }} + + + } @@ -34,29 +35,33 @@ - - - - {{ permissionName(permission.code) }} - + @for (permission of permissions.permissions; track permission; let i = $index) { + + + + {{ permissionName(permission.code) }} + + - + } - - - - {{ 'labels.buttons.Cancel' | translate }} - - - {{ 'labels.buttons.Submit' | translate }} - - - + @if (!isDisabled) { + + + + {{ 'labels.buttons.Cancel' | translate }} + + + {{ 'labels.buttons.Submit' | translate }} + + + + } diff --git a/src/app/system/configure-maker-checker-tasks/configure-maker-checker-tasks.component.ts b/src/app/system/configure-maker-checker-tasks/configure-maker-checker-tasks.component.ts index f1fa641822..e0eecca8bf 100644 --- a/src/app/system/configure-maker-checker-tasks/configure-maker-checker-tasks.component.ts +++ b/src/app/system/configure-maker-checker-tasks/configure-maker-checker-tasks.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import * as _ from 'lodash'; @@ -9,7 +9,7 @@ import { ConfigurationWizardService } from '../../configuration-wizard/configura import { SystemService } from '../system.service'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatList, MatListItem } from '@angular/material/list'; -import { NgFor, NgClass, NgIf } from '@angular/common'; +import { NgClass } from '@angular/common'; import { MatDivider } from '@angular/material/divider'; import { MatCheckbox } from '@angular/material/checkbox'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -50,6 +50,13 @@ interface SubmitPermissionData { ] }) export class ConfigureMakerCheckerTasksComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private systemService = inject(SystemService); + private formBuilder = inject(UntypedFormBuilder); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + permissionsData: Permission[] = []; groupings: string[] = []; currentGrouping = ''; @@ -74,6 +81,9 @@ export class ConfigureMakerCheckerTasksComponent implements OnInit, AfterViewIni /* Template for popover on maker checker taks table */ @ViewChild('templateMcTable') templateMcTable: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {SystemService} systemService Accounting Service. @@ -82,14 +92,7 @@ export class ConfigureMakerCheckerTasksComponent implements OnInit, AfterViewIni * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private systemService: SystemService, - private formBuilder: UntypedFormBuilder, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { permissions: any }) => { this.permissionsData = data.permissions; }); diff --git a/src/app/system/configure-maker-checker-tasks/configure-maker-checker-tasks.resolver.ts b/src/app/system/configure-maker-checker-tasks/configure-maker-checker-tasks.resolver.ts index 3eb5976e1e..cbd1a39b76 100644 --- a/src/app/system/configure-maker-checker-tasks/configure-maker-checker-tasks.resolver.ts +++ b/src/app/system/configure-maker-checker-tasks/configure-maker-checker-tasks.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../system.service'; */ @Injectable() export class MakerCheckerTasksResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns all the Configurable Maker Checker Tasks. diff --git a/src/app/system/entity-to-entity-mapping/entity-to-entity-mapping.component.html b/src/app/system/entity-to-entity-mapping/entity-to-entity-mapping.component.html index d89a9f8ed7..f23d1f490a 100644 --- a/src/app/system/entity-to-entity-mapping/entity-to-entity-mapping.component.html +++ b/src/app/system/entity-to-entity-mapping/entity-to-entity-mapping.component.html @@ -4,21 +4,31 @@ {{ 'labels.inputs.Mapping Between Entities' | translate }} - - {{ 'labels.inputs.Offices Loan Products' | translate }} - - - {{ 'labels.inputs.Offices Savings Products' | translate }} - - - {{ 'labels.inputs.Offices Charges/Fees' | translate }} - - - {{ 'labels.inputs.Roles Loan Products' | translate }} - - - {{ 'labels.inputs.Roles Savings Products' | translate }} - + @if (mappingType.mappingTypes === 'office_access_to_loan_products') { + + {{ 'labels.inputs.Offices Loan Products' | translate }} + + } + @if (mappingType.mappingTypes === 'office_access_to_savings_products') { + + {{ 'labels.inputs.Offices Savings Products' | translate }} + + } + @if (mappingType.mappingTypes === 'office_access_to_fees/charges') { + + {{ 'labels.inputs.Offices Charges/Fees' | translate }} + + } + @if (mappingType.mappingTypes === 'role_access_to_loan_products') { + + {{ 'labels.inputs.Roles Loan Products' | translate }} + + } + @if (mappingType.mappingTypes === 'role_access_to_savings_products') { + + {{ 'labels.inputs.Roles Savings Products' | translate }} + + } @@ -27,7 +37,7 @@ - 0"> + @if (selectedMappingType > 0) { @@ -42,73 +52,71 @@ {{ 'labels.inputs.All' | translate }} - - {{ firstEntity.name }} - + @for (firstEntity of firstEntityData; track firstEntity) { + + {{ firstEntity.name }} + + } - - {{ firstMappingEntity | translateKey: 'inputs' }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (filterPreferenceForm.controls.mappingFirstParamId.hasError('required')) { + + {{ firstMappingEntity | translateKey: 'inputs' }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - {{ secondMappingEntity | translateKey: 'text' }} {{ 'labels.inputs.All' | translate }} - - {{ secondEntity.name }} - + @for (secondEntity of secondEntityData; track secondEntity) { + + {{ secondEntity.name }} + + } - - {{ secondMappingEntity | translateKey: 'text' }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (filterPreferenceForm.controls.mappingSecondParamId.hasError('required')) { + + {{ secondMappingEntity | translateKey: 'text' }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - {{ 'labels.buttons.Submit' | translate }} - - {{ 'labels.buttons.Add' | translate }} - + @if (hasClickedFilters) { + + {{ 'labels.buttons.Add' | translate }} + + } - - + @if (hasClickedFilters) { {{ firstMappingEntity | translateKey: 'inputs' }} {{ listdata.fromEntity }} - {{ secondMappingEntity | translateKey: 'text' }} {{ listdata.toEntity }} - {{ 'labels.inputs.Start Date' | translate }} {{ listdata.startDate | dateFormat }} - {{ 'labels.inputs.End Date' | translate }} {{ listdata.endDate | dateFormat }} - @@ -125,7 +133,6 @@ - @@ -142,14 +149,13 @@ - - + } - + } diff --git a/src/app/system/entity-to-entity-mapping/entity-to-entity-mapping.component.ts b/src/app/system/entity-to-entity-mapping/entity-to-entity-mapping.component.ts index 1563205528..8b214adb5d 100644 --- a/src/app/system/entity-to-entity-mapping/entity-to-entity-mapping.component.ts +++ b/src/app/system/entity-to-entity-mapping/entity-to-entity-mapping.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort } from '@angular/material/sort'; @@ -66,6 +66,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EntityToEntityMappingComponent implements OnInit { + private route = inject(ActivatedRoute); + private formBuilder = inject(UntypedFormBuilder); + private systemService = inject(SystemService); + private dateUtils = inject(Dates); + private dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + private translateService = inject(TranslateService); + /** Stores entity to entity mapping data */ entityMappings: string[] = []; /** Stores Id of selected mapping type */ @@ -118,20 +126,15 @@ export class EntityToEntityMappingComponent implements OnInit { /** Sorter for entity table. */ @ViewChild(MatSort) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the codes data from `resolve`. * @param {ActivatedRoute} route Activated Route. * @param {TranslateService} translateService Translate Service. */ - constructor( - private route: ActivatedRoute, - private formBuilder: UntypedFormBuilder, - private systemService: SystemService, - private dateUtils: Dates, - private dialog: MatDialog, - private settingsService: SettingsService, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { entityMappings: any }) => { this.entityMappings = data.entityMappings; }); diff --git a/src/app/system/entity-to-entity-mapping/entity-to-entity-mapping.resolver.ts b/src/app/system/entity-to-entity-mapping/entity-to-entity-mapping.resolver.ts index dac85c3874..92b798bc7e 100644 --- a/src/app/system/entity-to-entity-mapping/entity-to-entity-mapping.resolver.ts +++ b/src/app/system/entity-to-entity-mapping/entity-to-entity-mapping.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../system.service'; */ @Injectable() export class EntityToEntityMappingResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Mapping data. diff --git a/src/app/system/external-services/amazon-s3/amazon-s3.component.ts b/src/app/system/external-services/amazon-s3/amazon-s3.component.ts index 378d4ec7b1..04c807d935 100644 --- a/src/app/system/external-services/amazon-s3/amazon-s3.component.ts +++ b/src/app/system/external-services/amazon-s3/amazon-s3.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { MatTableDataSource, @@ -43,6 +43,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AmazonS3Component implements OnInit { + private route = inject(ActivatedRoute); + /** Amazon S3 configuration data. */ amazonS3ConfigurationData: any; /** Columns to be displayed in Amazon S3 configuration table. */ @@ -56,11 +58,14 @@ export class AmazonS3Component implements OnInit { /** Sorter for Amazon S3 configuration table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Amazon S3 configuration data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { amazonS3Configuration: any }) => { this.amazonS3ConfigurationData = data.amazonS3Configuration; }); diff --git a/src/app/system/external-services/amazon-s3/amazon-s3.resolver.ts b/src/app/system/external-services/amazon-s3/amazon-s3.resolver.ts index 2e5ee5be77..5c600e68f0 100644 --- a/src/app/system/external-services/amazon-s3/amazon-s3.resolver.ts +++ b/src/app/system/external-services/amazon-s3/amazon-s3.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../../system.service'; */ @Injectable() export class AmazonS3ConfigurationResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Amazon S3 Configuration data. diff --git a/src/app/system/external-services/amazon-s3/edit-amazon-s3/edit-amazon-s3.component.html b/src/app/system/external-services/amazon-s3/edit-amazon-s3/edit-amazon-s3.component.html index 6520bfa4d0..ad245100b1 100644 --- a/src/app/system/external-services/amazon-s3/edit-amazon-s3/edit-amazon-s3.component.html +++ b/src/app/system/external-services/amazon-s3/edit-amazon-s3/edit-amazon-s3.component.html @@ -6,50 +6,66 @@ {{ 'labels.inputs.S3 Bucket Name' | translate }} - - {{ 'labels.inputs.S3 Bucket Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (amazonS3ConfigurationForm.controls.s3_bucket_name.hasError('required')) { + + {{ 'labels.inputs.S3 Bucket Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.S3 Access Key' | translate }} - - - - - - {{ 'labels.inputs.S3 Access Key' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (amazonS3ConfigurationForm.controls.s3_access_key.value) { + + @if (accessKeyInputType === 'password') { + + } + @if (accessKeyInputType === 'text') { + + } + + } + @if (amazonS3ConfigurationForm.controls.s3_access_key.hasError('required')) { + + {{ 'labels.inputs.S3 Access Key' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.S3 Secret Key' | translate }} - - - - - - {{ 'labels.inputs.S3 Secret Key' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (amazonS3ConfigurationForm.controls.s3_secret_key.value) { + + @if (secretKeyInputType === 'password') { + + } + @if (secretKeyInputType === 'text') { + + } + + } + @if (amazonS3ConfigurationForm.controls.s3_secret_key.hasError('required')) { + + {{ 'labels.inputs.S3 Secret Key' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/system/external-services/amazon-s3/edit-amazon-s3/edit-amazon-s3.component.ts b/src/app/system/external-services/amazon-s3/edit-amazon-s3/edit-amazon-s3.component.ts index d5a83653b0..4777815757 100644 --- a/src/app/system/external-services/amazon-s3/edit-amazon-s3/edit-amazon-s3.component.ts +++ b/src/app/system/external-services/amazon-s3/edit-amazon-s3/edit-amazon-s3.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; @@ -23,6 +23,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditAmazonS3Component implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private systemService = inject(SystemService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Amazon S3 Configuration data */ amazonS3ConfigurationData: any; /** Amazon S3 Configuration Form */ @@ -32,6 +37,9 @@ export class EditAmazonS3Component implements OnInit { /** Access Key field type. */ accessKeyInputType: string; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Amazon S3 configuration data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -39,12 +47,7 @@ export class EditAmazonS3Component implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private systemService: SystemService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { amazonS3Configuration: any }) => { this.amazonS3ConfigurationData = data.amazonS3Configuration; }); diff --git a/src/app/system/external-services/email/edit-email/edit-email.component.html b/src/app/system/external-services/email/edit-email/edit-email.component.html index db140c9227..0d1d10e077 100644 --- a/src/app/system/external-services/email/edit-email/edit-email.component.html +++ b/src/app/system/external-services/email/edit-email/edit-email.component.html @@ -6,48 +6,61 @@ {{ 'labels.inputs.Username' | translate }} - - {{ 'labels.inputs.Username' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (emailConfigurationForm.controls.username.hasError('required')) { + + {{ 'labels.inputs.Username' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Password' | translate }} - - - - - - {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (emailConfigurationForm.controls.password.value) { + + @if (passwordInputType === 'password') { + + } + @if (passwordInputType === 'text') { + + } + + } + @if (emailConfigurationForm.controls.password.hasError('required')) { + + {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Host' | translate }} - - {{ 'labels.inputs.Host' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (emailConfigurationForm.controls.host.hasError('required')) { + + {{ 'labels.inputs.Host' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Port' | translate }} - - {{ 'labels.inputs.Port' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (emailConfigurationForm.controls.port.hasError('required')) { + + {{ 'labels.inputs.Port' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -57,19 +70,23 @@ {{ 'labels.inputs.From Email' | translate }} - - {{ 'labels.inputs.From Email' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (emailConfigurationForm.controls.fromEmail.hasError('required')) { + + {{ 'labels.inputs.From Email' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.From Name' | translate }} - - {{ 'labels.inputs.From Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (emailConfigurationForm.controls.fromName.hasError('required')) { + + {{ 'labels.inputs.From Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/system/external-services/email/edit-email/edit-email.component.ts b/src/app/system/external-services/email/edit-email/edit-email.component.ts index 86c8cb1e52..d5dd21b237 100644 --- a/src/app/system/external-services/email/edit-email/edit-email.component.ts +++ b/src/app/system/external-services/email/edit-email/edit-email.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; @@ -25,6 +25,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditEmailComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private systemService = inject(SystemService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Password input field type. */ passwordInputType: string; /** Email Configuration data */ @@ -32,6 +37,9 @@ export class EditEmailComponent implements OnInit { /** Email Configuration Form */ emailConfigurationForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Email configuration data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -39,12 +47,7 @@ export class EditEmailComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private systemService: SystemService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { emailConfiguration: any }) => { this.emailConfigurationData = data.emailConfiguration; }); diff --git a/src/app/system/external-services/email/email.component.ts b/src/app/system/external-services/email/email.component.ts index faf1c4d516..ff542537f4 100644 --- a/src/app/system/external-services/email/email.component.ts +++ b/src/app/system/external-services/email/email.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -43,6 +43,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EmailComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Email configuration data. */ emailConfigurationData: any; /** Columns to be displayed in Email configuration table. */ @@ -56,11 +58,14 @@ export class EmailComponent implements OnInit { /** Sorter for Email configuration table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Email configuration data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { emailConfiguration: any }) => { this.emailConfigurationData = data.emailConfiguration; }); diff --git a/src/app/system/external-services/email/email.resolver.ts b/src/app/system/external-services/email/email.resolver.ts index e7237b2f53..6825d5d370 100644 --- a/src/app/system/external-services/email/email.resolver.ts +++ b/src/app/system/external-services/email/email.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../../system.service'; */ @Injectable() export class EmailConfigurationResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Email Configuration data. diff --git a/src/app/system/external-services/external-services.component.html b/src/app/system/external-services/external-services.component.html index 2dfa8ca40e..5965d0b027 100644 --- a/src/app/system/external-services/external-services.component.html +++ b/src/app/system/external-services/external-services.component.html @@ -8,21 +8,17 @@ {{ 'labels.heading.S3 Amazon External Service' | translate }} - - - - {{ 'labels.text.S3 Amazon Service Configuration' | translate }} - + @if (!arrowBooleans[0]) { + + } + @if (arrowBooleans[0]) { + + } + @if (arrowBooleans[0]) { + + {{ 'labels.text.S3 Amazon Service Configuration' | translate }} + + } @@ -30,21 +26,17 @@ {{ 'labels.heading.S3 Amazon External S {{ 'labels.heading.SMS External Service' | translate }} - - - - {{ 'labels.text.SMS Service Configuration' | translate }} - + @if (!arrowBooleans[1]) { + + } + @if (arrowBooleans[1]) { + + } + @if (arrowBooleans[1]) { + + {{ 'labels.text.SMS Service Configuration' | translate }} + + } @@ -56,21 +48,17 @@ {{ 'labels.heading.SMS External Service' | tr {{ 'labels.heading.Email External Service' | translate }} - - - - {{ 'labels.text.Email Service Configuration' | translate }} - + @if (!arrowBooleans[2]) { + + } + @if (arrowBooleans[2]) { + + } + @if (arrowBooleans[2]) { + + {{ 'labels.text.Email Service Configuration' | translate }} + + } @@ -80,21 +68,17 @@ {{ 'labels.heading.Email External Service' {{ 'labels.heading.Notification External Service' | translate }} - - - - {{ 'labels.text.Notification Service Configuration' | translate }} - + @if (!arrowBooleans[3]) { + + } + @if (arrowBooleans[3]) { + + } + @if (arrowBooleans[3]) { + + {{ 'labels.text.Notification Service Configuration' | translate }} + + } diff --git a/src/app/system/external-services/notification/edit-notification/edit-notification.component.html b/src/app/system/external-services/notification/edit-notification/edit-notification.component.html index 29a2f5b3f1..775bef9341 100644 --- a/src/app/system/external-services/notification/edit-notification/edit-notification.component.html +++ b/src/app/system/external-services/notification/edit-notification/edit-notification.component.html @@ -6,28 +6,34 @@ {{ 'labels.inputs.Server Key' | translate }} - - {{ 'labels.inputs.Server Key' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (notificationConfigurationForm.controls.server_key.hasError('required')) { + + {{ 'labels.inputs.Server Key' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.GCM End Point' | translate }} - - {{ 'labels.inputs.GCM End Point' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (notificationConfigurationForm.controls.gcm_end_point.hasError('required')) { + + {{ 'labels.inputs.GCM End Point' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.FCM End Point' | translate }} - - {{ 'labels.inputs.FCM End Point' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (notificationConfigurationForm.controls.fcm_end_point.hasError('required')) { + + {{ 'labels.inputs.FCM End Point' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/system/external-services/notification/edit-notification/edit-notification.component.ts b/src/app/system/external-services/notification/edit-notification/edit-notification.component.ts index ab24de9fe1..de6d5f50d4 100644 --- a/src/app/system/external-services/notification/edit-notification/edit-notification.component.ts +++ b/src/app/system/external-services/notification/edit-notification/edit-notification.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; @@ -19,11 +19,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditNotificationComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private systemService = inject(SystemService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Notification Configuration data */ notificationConfigurationData: any; /** Notification Configuration Form */ notificationConfigurationForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Notification configuration data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -31,12 +39,7 @@ export class EditNotificationComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private systemService: SystemService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { notificationConfiguration: any }) => { this.notificationConfigurationData = data.notificationConfiguration; }); diff --git a/src/app/system/external-services/notification/notification.component.ts b/src/app/system/external-services/notification/notification.component.ts index 317405fbf2..8302777393 100644 --- a/src/app/system/external-services/notification/notification.component.ts +++ b/src/app/system/external-services/notification/notification.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -43,6 +43,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class NotificationComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Notification configuration data. */ notificationConfigurationData: any; /** Columns to be displayed in Notification configuration table. */ @@ -56,11 +58,14 @@ export class NotificationComponent implements OnInit { /** Sorter for Notification configuration table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the Notification configuration data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { notificationConfiguration: any }) => { this.notificationConfigurationData = data.notificationConfiguration; }); diff --git a/src/app/system/external-services/notification/notification.resolver.ts b/src/app/system/external-services/notification/notification.resolver.ts index ab3cadd65e..85d61b7ea3 100644 --- a/src/app/system/external-services/notification/notification.resolver.ts +++ b/src/app/system/external-services/notification/notification.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../../system.service'; */ @Injectable() export class NotificationConfigurationResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Notification Configuration data. diff --git a/src/app/system/external-services/sms/edit-sms/edit-sms.component.html b/src/app/system/external-services/sms/edit-sms/edit-sms.component.html index 5df13aa5b7..19ce1ca1ba 100644 --- a/src/app/system/external-services/sms/edit-sms/edit-sms.component.html +++ b/src/app/system/external-services/sms/edit-sms/edit-sms.component.html @@ -6,37 +6,45 @@ {{ 'labels.inputs.Host Name' | translate }} - - {{ 'labels.inputs.Host Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (smsConfigurationForm.controls.host_name.hasError('required')) { + + {{ 'labels.inputs.Host Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Port Number' | translate }} - - {{ 'labels.inputs.Port Number' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (smsConfigurationForm.controls.port_number.hasError('required')) { + + {{ 'labels.inputs.Port Number' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.End Point' | translate }} - - {{ 'labels.inputs.End Point' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (smsConfigurationForm.controls.end_point.hasError('required')) { + + {{ 'labels.inputs.End Point' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Tenant App Key' | translate }} - - {{ 'labels.inputs.Tenant App Key' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (smsConfigurationForm.controls.tenant_app_key.hasError('required')) { + + {{ 'labels.inputs.Tenant App Key' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/system/external-services/sms/edit-sms/edit-sms.component.ts b/src/app/system/external-services/sms/edit-sms/edit-sms.component.ts index 2e07284016..084c77e62b 100644 --- a/src/app/system/external-services/sms/edit-sms/edit-sms.component.ts +++ b/src/app/system/external-services/sms/edit-sms/edit-sms.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; @@ -19,11 +19,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditSMSComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private systemService = inject(SystemService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** SMS Configuration data */ smsConfigurationData: any; /** SMS Configuration Form */ smsConfigurationForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the SMS configuration data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -31,12 +39,7 @@ export class EditSMSComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private systemService: SystemService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { smsConfiguration: any }) => { this.smsConfigurationData = data.smsConfiguration; }); diff --git a/src/app/system/external-services/sms/sms.component.ts b/src/app/system/external-services/sms/sms.component.ts index 50094931f7..ee6b81fc61 100644 --- a/src/app/system/external-services/sms/sms.component.ts +++ b/src/app/system/external-services/sms/sms.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -43,6 +43,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SMSComponent implements OnInit { + private route = inject(ActivatedRoute); + /** SMS configuration data. */ smsConfigurationData: any; /** Columns to be displayed in SMS configuration table. */ @@ -56,11 +58,14 @@ export class SMSComponent implements OnInit { /** Sorter for SMS configuration table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the SMS configuration data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { smsConfiguration: any }) => { this.smsConfigurationData = data.smsConfiguration; }); diff --git a/src/app/system/external-services/sms/sms.resolver.ts b/src/app/system/external-services/sms/sms.resolver.ts index 719700abb4..0e76ed09d3 100644 --- a/src/app/system/external-services/sms/sms.resolver.ts +++ b/src/app/system/external-services/sms/sms.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../../system.service'; */ @Injectable() export class SMSConfigurationResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the SMS Configuration data. diff --git a/src/app/system/manage-data-tables/column-dialog/column-dialog.component.html b/src/app/system/manage-data-tables/column-dialog/column-dialog.component.html index b1d9ee3fe9..1c6df85bba 100644 --- a/src/app/system/manage-data-tables/column-dialog/column-dialog.component.html +++ b/src/app/system/manage-data-tables/column-dialog/column-dialog.component.html @@ -9,34 +9,44 @@ {{ 'labels.inputs.Column Name' | translate }} - - {{ 'labels.inputs.Column Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (columnForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Column Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Column Type' | translate }} - - {{ columnType.displayValue | translateKey: 'inputs' }} - + @for (columnType of columnTypeData; track columnType) { + + {{ columnType.displayValue | translateKey: 'inputs' }} + + } - - {{ 'labels.inputs.Column Length' | translate }} - - + @if (columnForm.value.type === 'String') { + + {{ 'labels.inputs.Column Length' | translate }} + + + } - - {{ 'labels.inputs.Column Code' | translate }} - - - {{ columnCode.name }} - - - + @if (columnForm.value.type === 'Dropdown') { + + {{ 'labels.inputs.Column Code' | translate }} + + @for (columnCode of data.columnCodes; track columnCode) { + + {{ columnCode.name }} + + } + + + } {{ diff --git a/src/app/system/manage-data-tables/column-dialog/column-dialog.component.ts b/src/app/system/manage-data-tables/column-dialog/column-dialog.component.ts index 4fa3934a1e..72e46d2b32 100644 --- a/src/app/system/manage-data-tables/column-dialog/column-dialog.component.ts +++ b/src/app/system/manage-data-tables/column-dialog/column-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef, @@ -34,21 +34,24 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ColumnDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + formBuilder = inject(UntypedFormBuilder); + data = inject(MAT_DIALOG_DATA); + /** Column Form. */ columnForm: UntypedFormGroup; /** Column Type Data */ columnTypeData = columnTypeData; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {FormBuilder} formBuilder Form Builder. * @param {any} data Provides the column codes and values for the form (if available). */ - constructor( - public dialogRef: MatDialogRef, - public formBuilder: UntypedFormBuilder, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} /** * Creates the add column form. diff --git a/src/app/system/manage-data-tables/create-data-table/create-data-table.component.html b/src/app/system/manage-data-tables/create-data-table/create-data-table.component.html index 277ff04f48..bad2b5ea38 100644 --- a/src/app/system/manage-data-tables/create-data-table/create-data-table.component.html +++ b/src/app/system/manage-data-tables/create-data-table/create-data-table.component.html @@ -6,42 +6,56 @@ {{ 'labels.inputs.Data Table Name' | translate }} - - {{ 'labels.inputs.Data Table Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (dataTableForm.controls.datatableName.hasError('required')) { + + {{ 'labels.inputs.Data Table Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Entity Type' | translate }} - - {{ appTable.displayValue | translateKey: 'inputs' }} - + @for (appTable of appTableData; track appTable) { + + {{ appTable.displayValue | translateKey: 'inputs' }} + + } - - {{ 'labels.inputs.Application Table Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (dataTableForm.controls.apptableName.hasError('required')) { + + {{ 'labels.inputs.Application Table Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Entity SubType' | translate }} - - - {{ entitySubType.displayValue | translateKey: 'inputs' }} - - - - - - {{ 'labels.inputs.Savings SubType' | translate }} - - - {{ savingsSubType.displayValue | translateKey: 'inputs' }} - - - + @if (showEntitySubType) { + + {{ 'labels.inputs.Entity SubType' | translate }} + + @for (entitySubType of entitySubTypeData; track entitySubType) { + + {{ entitySubType.displayValue | translateKey: 'inputs' }} + + } + + + } + + @if (showSavingsSubType) { + + {{ 'labels.inputs.Savings SubType' | translate }} + + @for (savingsSubType of savingsSubTypeData; track savingsSubType) { + + {{ savingsSubType.displayValue | translateKey: 'inputs' }} + + } + + + } {{ @@ -67,14 +81,15 @@ {{ 'labels.inputs.Name' | translate }} {{ column.columnName }} - + @if (column.isColumnPrimaryKey) { + + } @@ -96,22 +111,24 @@ {{ 'labels.text.Mandatory' | translate }} - - + @if (!column.isColumnNullable) { + + } + @if (column.isColumnNullable) { + + } @@ -120,22 +137,24 @@ {{ 'labels.inputs.Unique' | translate }} - - + @if (column.isColumnUnique) { + + } + @if (!column.isColumnUnique) { + + } @@ -144,22 +163,24 @@ {{ 'labels.inputs.Indexed' | translate }} - - + @if (column.isColumnIndexed) { + + } + @if (!column.isColumnIndexed) { + + } diff --git a/src/app/system/manage-data-tables/create-data-table/create-data-table.component.ts b/src/app/system/manage-data-tables/create-data-table/create-data-table.component.ts index 5894f3bf9d..387ac23bec 100644 --- a/src/app/system/manage-data-tables/create-data-table/create-data-table.component.ts +++ b/src/app/system/manage-data-tables/create-data-table/create-data-table.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { AfterViewInit, Component, ElementRef, OnInit, TemplateRef, ViewChild } from '@angular/core'; +import { AfterViewInit, Component, ElementRef, OnInit, TemplateRef, ViewChild, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; @@ -70,6 +70,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateDataTableComponent implements OnInit, AfterViewInit { + private formBuilder = inject(UntypedFormBuilder); + private systemService = inject(SystemService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + private translateService = inject(TranslateService); + /** Data Table Form */ dataTableForm: UntypedFormGroup; /** Application Table Data */ @@ -115,6 +124,9 @@ export class CreateDataTableComponent implements OnInit, AfterViewInit { /* Template for popover on create datatables form */ @ViewChild('templateDataTableFormRef') templateDataTableFormRef: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the column codes data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -126,16 +138,7 @@ export class CreateDataTableComponent implements OnInit, AfterViewInit { * @param {PopoverService} popoverService PopoverService. * @param {TranslateService} translateService Translate Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private systemService: SystemService, - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { columnCodes: any }) => { this.dataForDialog.columnCodes = data.columnCodes; }); diff --git a/src/app/system/manage-data-tables/data-table.resolver.ts b/src/app/system/manage-data-tables/data-table.resolver.ts index fb748f1fa8..16d767bf29 100644 --- a/src/app/system/manage-data-tables/data-table.resolver.ts +++ b/src/app/system/manage-data-tables/data-table.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SystemService } from '../system.service'; */ @Injectable() export class DataTableResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Data Table data. diff --git a/src/app/system/manage-data-tables/edit-data-table/edit-data-table.component.html b/src/app/system/manage-data-tables/edit-data-table/edit-data-table.component.html index cacad64d9e..eac1a584fc 100644 --- a/src/app/system/manage-data-tables/edit-data-table/edit-data-table.component.html +++ b/src/app/system/manage-data-tables/edit-data-table/edit-data-table.component.html @@ -11,24 +11,32 @@ {{ 'labels.inputs.Application Table Name' | translate }} - - {{ appTable.displayValue | translateKey: 'inputs' }} - + @for (appTable of appTableData; track appTable) { + + {{ appTable.displayValue | translateKey: 'inputs' }} + + } - - {{ 'labels.inputs.Application Table Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (dataTableForm.controls.apptableName.hasError('required')) { + + {{ 'labels.inputs.Application Table Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Entity SubType' | translate }} - - - {{ entitySubType.displayValue | translateKey: 'inputs' }} - - - + @if (showEntitySubType) { + + {{ 'labels.inputs.Entity SubType' | translate }} + + @for (entitySubType of entitySubTypeData; track entitySubType) { + + {{ entitySubType.displayValue | translateKey: 'inputs' }} + + } + + + } @@ -78,22 +86,24 @@ {{ 'labels.text.Mandatory' | translate }} - - + @if (!column.isColumnNullable) { + + } + @if (column.isColumnNullable) { + + } @@ -102,22 +112,24 @@ {{ 'labels.inputs.Unique' | translate }} - - + @if (column.isColumnUnique) { + + } + @if (!column.isColumnUnique) { + + } @@ -126,22 +138,24 @@ {{ 'labels.inputs.Indexed' | translate }} - - + @if (column.isColumnIndexed) { + + } + @if (!column.isColumnIndexed) { + + } @@ -150,12 +164,16 @@ {{ 'labels.inputs.Actions' | translate }} - - - - - - + @if (!column.system) { + + + + } + @if (!column.system) { + + + + } diff --git a/src/app/system/manage-data-tables/edit-data-table/edit-data-table.component.ts b/src/app/system/manage-data-tables/edit-data-table/edit-data-table.component.ts index adf9068ef1..9318b75833 100644 --- a/src/app/system/manage-data-tables/edit-data-table/edit-data-table.component.ts +++ b/src/app/system/manage-data-tables/edit-data-table/edit-data-table.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; @@ -63,6 +63,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditDataTableComponent implements OnInit { + private systemService = inject(SystemService); + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** Data Table Form. */ dataTableForm: UntypedFormGroup; /** Data Table Data. */ @@ -136,6 +143,9 @@ export class EditDataTableComponent implements OnInit { /** Sorter for columns table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the data table and column codes data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -144,14 +154,7 @@ export class EditDataTableComponent implements OnInit { * @param {FormBuilder} formBuilder Form Builder. * @param {MatDialog} dialog Dialog Reference. */ - constructor( - private systemService: SystemService, - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { dataTable: any; columnCodes: any }) => { this.dataTableData = data.dataTable; this.dataTableData.columnHeaderData.forEach((item: any) => { diff --git a/src/app/system/manage-data-tables/manage-data-tables.component.ts b/src/app/system/manage-data-tables/manage-data-tables.component.ts index 18c2d47ce5..3008af68f9 100644 --- a/src/app/system/manage-data-tables/manage-data-tables.component.ts +++ b/src/app/system/manage-data-tables/manage-data-tables.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -52,6 +52,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ManageDataTablesComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Data table data. */ dataTableData: any; /** Columns to be displayed in manage data tables table. */ @@ -77,6 +82,9 @@ export class ManageDataTablesComponent implements OnInit, AfterViewInit { /* Template for popover on list of datatables */ @ViewChild('templateDatatablesList') templateDatatablesList: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the data tables data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -84,12 +92,7 @@ export class ManageDataTablesComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { dataTables: any }) => { this.dataTableData = data.dataTables; }); diff --git a/src/app/system/manage-data-tables/manage-data-tables.resolver.ts b/src/app/system/manage-data-tables/manage-data-tables.resolver.ts index 877230b162..173fd93ca3 100644 --- a/src/app/system/manage-data-tables/manage-data-tables.resolver.ts +++ b/src/app/system/manage-data-tables/manage-data-tables.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../system.service'; */ @Injectable() export class ManageDataTablesResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the manage data tables data. diff --git a/src/app/system/manage-data-tables/view-data-table/view-data-table.component.html b/src/app/system/manage-data-tables/view-data-table/view-data-table.component.html index 84c2d72b82..738d54d972 100644 --- a/src/app/system/manage-data-tables/view-data-table/view-data-table.component.html +++ b/src/app/system/manage-data-tables/view-data-table/view-data-table.component.html @@ -54,44 +54,48 @@ {{ 'labels.text.Mandatory' | translate }} - - + @if (!dataTable.isColumnNullable) { + + } + @if (dataTable.isColumnNullable) { + + } {{ 'labels.inputs.Unique' | translate }} - - + @if (dataTable.isColumnUnique) { + + } + @if (!dataTable.isColumnUnique) { + + } @@ -100,22 +104,24 @@ {{ 'labels.inputs.Indexed' | translate }} - - + @if (dataTable.isColumnIndexed) { + + } + @if (!dataTable.isColumnIndexed) { + + } diff --git a/src/app/system/manage-data-tables/view-data-table/view-data-table.component.ts b/src/app/system/manage-data-tables/view-data-table/view-data-table.component.ts index 1e999d14f5..2f2cd39f93 100644 --- a/src/app/system/manage-data-tables/view-data-table/view-data-table.component.ts +++ b/src/app/system/manage-data-tables/view-data-table/view-data-table.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -55,6 +55,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewDataTableComponent implements OnInit { + private route = inject(ActivatedRoute); + private systemService = inject(SystemService); + private router = inject(Router); + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** Data Table Data */ dataTableData: any; /** Column Data */ @@ -77,6 +83,9 @@ export class ViewDataTableComponent implements OnInit { /** Sorter for columns table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the data table data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -85,13 +94,7 @@ export class ViewDataTableComponent implements OnInit { * @param {MatDialog} dialog Dialog reference. * @param {TranslateService} translateService Translate Service. */ - constructor( - private route: ActivatedRoute, - private systemService: SystemService, - private router: Router, - private dialog: MatDialog, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { dataTable: any }) => { this.dataTableData = data.dataTable; this.columnsData = this.dataTableData.columnHeaderData; diff --git a/src/app/system/manage-external-events/manage-external-events.component.html b/src/app/system/manage-external-events/manage-external-events.component.html index 3a9f5563ba..7254bdb322 100644 --- a/src/app/system/manage-external-events/manage-external-events.component.html +++ b/src/app/system/manage-external-events/manage-external-events.component.html @@ -30,8 +30,12 @@ - {{ 'labels.inputs.Enabled' | translate }} - {{ 'labels.inputs.Disabled' | translate }} + @if (event.enabled) { + {{ 'labels.inputs.Enabled' | translate }} + } + @if (!event.enabled) { + {{ 'labels.inputs.Disabled' | translate }} + } diff --git a/src/app/system/manage-external-events/manage-external-events.component.ts b/src/app/system/manage-external-events/manage-external-events.component.ts index c74b8c9fd1..0299a4890a 100644 --- a/src/app/system/manage-external-events/manage-external-events.component.ts +++ b/src/app/system/manage-external-events/manage-external-events.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -44,6 +44,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ManageExternalEventsComponent implements OnInit { + private route = inject(ActivatedRoute); + private systemService = inject(SystemService); + /** Events Data. */ eventsData: any; externalEventConfigurations: any = {}; @@ -63,10 +66,10 @@ export class ManageExternalEventsComponent implements OnInit { /** Sorter for reports table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; - constructor( - private route: ActivatedRoute, - private systemService: SystemService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.route.data.subscribe((data: { events: any }) => { this.eventsData = data.events.externalEventConfiguration; }); diff --git a/src/app/system/manage-external-events/manage-external-events.resolver.ts b/src/app/system/manage-external-events/manage-external-events.resolver.ts index 6f8855e164..71dce39cab 100644 --- a/src/app/system/manage-external-events/manage-external-events.resolver.ts +++ b/src/app/system/manage-external-events/manage-external-events.resolver.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { Router, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router'; import { Observable, of } from 'rxjs'; import { SystemService } from '../system.service'; @@ -7,10 +7,15 @@ import { SystemService } from '../system.service'; providedIn: 'root' }) export class ManageExternalEventsResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Configuration data. diff --git a/src/app/system/manage-hooks/add-event-dialog/add-event-dialog.component.html b/src/app/system/manage-hooks/add-event-dialog/add-event-dialog.component.html index bdf3864bf2..0c3be6799f 100644 --- a/src/app/system/manage-hooks/add-event-dialog/add-event-dialog.component.html +++ b/src/app/system/manage-hooks/add-event-dialog/add-event-dialog.component.html @@ -6,40 +6,52 @@ {{ 'labels.buttons.Add Event' | translate }} {{ 'labels.inputs.Select Grouping' | translate }} - - {{ grouping.name | translateKey: 'catalogs' }} - + @for (grouping of data.groupings; track grouping) { + + {{ grouping.name | translateKey: 'catalogs' }} + + } - - {{ 'labels.inputs.Grouping' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (eventForm.controls.grouping.hasError('required')) { + + {{ 'labels.inputs.Grouping' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Select Entity' | translate }} - - {{ entity.name }} - + @for (entity of entityData; track entity) { + + {{ entity.name }} + + } - - {{ 'labels.inputs.Entity' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (eventForm.controls.entity.hasError('required')) { + + {{ 'labels.inputs.Entity' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Select Action' | translate }} - - {{ action }} - + @for (action of actionData; track action) { + + {{ action }} + + } - - {{ 'labels.inputs.Action' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (eventForm.controls.action.hasError('required')) { + + {{ 'labels.inputs.Action' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/system/manage-hooks/add-event-dialog/add-event-dialog.component.ts b/src/app/system/manage-hooks/add-event-dialog/add-event-dialog.component.ts index 134430683c..00a52a1f5c 100644 --- a/src/app/system/manage-hooks/add-event-dialog/add-event-dialog.component.ts +++ b/src/app/system/manage-hooks/add-event-dialog/add-event-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -29,6 +29,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class AddEventDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + formBuilder = inject(UntypedFormBuilder); + data = inject(MAT_DIALOG_DATA); + /** Event Form. */ eventForm: UntypedFormGroup; /** Entity Data. */ @@ -36,16 +40,15 @@ export class AddEventDialogComponent implements OnInit { /** Action Data. */ actionData: Array = new Array(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {FormBuilder} formBuilder Form Builder. * @param {any} data Provides grouping, entities and actions data to fill dropdowns. */ - constructor( - public dialogRef: MatDialogRef, - public formBuilder: UntypedFormBuilder, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} /** * Creates add event form. diff --git a/src/app/system/manage-hooks/create-hook/create-hook.component.html b/src/app/system/manage-hooks/create-hook/create-hook.component.html index aa8f7517a3..3e3ff2fe1f 100644 --- a/src/app/system/manage-hooks/create-hook/create-hook.component.html +++ b/src/app/system/manage-hooks/create-hook/create-hook.component.html @@ -6,23 +6,29 @@ {{ 'labels.inputs.Hook Template' | translate }} - - {{ hookTemplate.name | translateKey: 'text' }} - + @for (hookTemplate of hooksTemplateData.templates; track hookTemplate) { + + {{ hookTemplate.name | translateKey: 'text' }} + + } - - {{ 'labels.inputs.Hook Template' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (hookForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Hook Template' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Display Name' | translate }} - - {{ 'labels.inputs.Display Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (hookForm.controls.displayName.hasError('required')) { + + {{ 'labels.inputs.Display Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -33,73 +39,86 @@ - - {{ 'labels.inputs.Content Type' | translate }} - - - {{ 'labels.inputs.json' | translate }} - - - {{ 'labels.inputs.form' | translate }} - - - - {{ 'labels.inputs.Content Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Phone Number' | translate }} - - {{ input.value?.length || 0 }}/10 - - {{ 'labels.inputs.Payload URL' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (hookForm.controls.name.value === 'Web') { + + {{ 'labels.inputs.Content Type' | translate }} + + + {{ 'labels.inputs.json' | translate }} + + + {{ 'labels.inputs.form' | translate }} + + + @if (hookForm.controls.contentType.hasError('required')) { + + {{ 'labels.inputs.Content Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + + @if (hookForm.controls.name.value === 'SMS Bridge') { + + {{ 'labels.inputs.Phone Number' | translate }} + + {{ input.value?.length || 0 }}/10 + @if (hookForm.controls.phoneNumber.hasError('required')) { + + {{ 'labels.inputs.Payload URL' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } {{ 'labels.inputs.Payload URL' | translate }} - - {{ 'labels.inputs.Payload URL' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (hookForm.controls.payloadUrl.hasError('required')) { + + {{ 'labels.inputs.Payload URL' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - - {{ 'labels.inputs.SMS Provider' | translate }} - - - {{ 'labels.inputs.SMS Provider' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.SMS Provider Account ID' | translate }} - - - {{ 'labels.inputs.SMS Provider Account ID' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.SMS Provider Token' | translate }} - - - {{ 'labels.inputs.SMS Provider Token' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - + @if (hookForm.controls.name.value === 'SMS Bridge') { + + + {{ 'labels.inputs.SMS Provider' | translate }} + + @if (hookForm.controls.smsProvider.hasError('required')) { + + {{ 'labels.inputs.SMS Provider' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.SMS Provider Account ID' | translate }} + + @if (hookForm.controls.smsProviderAccountId.hasError('required')) { + + {{ 'labels.inputs.SMS Provider Account ID' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.SMS Provider Token' | translate }} + + @if (hookForm.controls.smsProviderToken.hasError('required')) { + + {{ 'labels.inputs.SMS Provider Token' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + } diff --git a/src/app/system/manage-hooks/create-hook/create-hook.component.ts b/src/app/system/manage-hooks/create-hook/create-hook.component.ts index 5d72a9f418..95d6c9d048 100644 --- a/src/app/system/manage-hooks/create-hook/create-hook.component.ts +++ b/src/app/system/manage-hooks/create-hook/create-hook.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -59,6 +59,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateHookComponent implements OnInit { + private route = inject(ActivatedRoute); + private systemService = inject(SystemService); + private router = inject(Router); + private formBuilder = inject(UntypedFormBuilder); + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** Hooks Template Data. */ hooksTemplateData: any; /** Hook Form. */ @@ -76,6 +83,9 @@ export class CreateHookComponent implements OnInit { /** Sorter for events table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the hooks template data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -85,14 +95,7 @@ export class CreateHookComponent implements OnInit { * @param {MatDialog} dialog Dialog Reference. * @param {TranslateService} translateService Translate Service. */ - constructor( - private route: ActivatedRoute, - private systemService: SystemService, - private router: Router, - private formBuilder: UntypedFormBuilder, - private dialog: MatDialog, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { hooksTemplate: any }) => { this.hooksTemplateData = data.hooksTemplate; }); diff --git a/src/app/system/manage-hooks/edit-hook/edit-hook.component.html b/src/app/system/manage-hooks/edit-hook/edit-hook.component.html index 83973670ef..9351c6edd9 100644 --- a/src/app/system/manage-hooks/edit-hook/edit-hook.component.html +++ b/src/app/system/manage-hooks/edit-hook/edit-hook.component.html @@ -6,23 +6,29 @@ {{ 'labels.inputs.Hook Template' | translate }} - - {{ hookTemplate.name | translateKey: 'text' }} - + @for (hookTemplate of hooksTemplateData.templates; track hookTemplate) { + + {{ hookTemplate.name | translateKey: 'text' }} + + } - - {{ 'labels.inputs.Hook Template' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (hookForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Hook Template' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Display Name' | translate }} - - {{ 'labels.inputs.Display Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (hookForm.controls.displayName.hasError('required')) { + + {{ 'labels.inputs.Display Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -33,73 +39,86 @@ - - {{ 'labels.inputs.Content Type' | translate }} - - - {{ 'labels.inputs.json' | translate }} - - - {{ 'labels.inputs.form' | translate }} - - - - {{ 'labels.inputs.Content Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Phone Number' | translate }} - - {{ input.value?.length || 0 }}/10 - - {{ 'labels.inputs.Payload URL' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (hookForm.controls.name.value === 'Web') { + + {{ 'labels.inputs.Content Type' | translate }} + + + {{ 'labels.inputs.json' | translate }} + + + {{ 'labels.inputs.form' | translate }} + + + @if (hookForm.controls.contentType.hasError('required')) { + + {{ 'labels.inputs.Content Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } + + @if (hookForm.controls.name.value === 'SMS Bridge') { + + {{ 'labels.inputs.Phone Number' | translate }} + + {{ input.value?.length || 0 }}/10 + @if (hookForm.controls.phoneNumber.hasError('required')) { + + {{ 'labels.inputs.Payload URL' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } {{ 'labels.inputs.Payload URL' | translate }} - - {{ 'labels.inputs.Payload URL' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (hookForm.controls.payloadUrl.hasError('required')) { + + {{ 'labels.inputs.Payload URL' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - - {{ 'labels.inputs.SMS Provider' | translate }} - - - {{ 'labels.inputs.SMS Provider' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.SMS Provider Account ID' | translate }} - - - {{ 'labels.inputs.SMS Provider Account ID' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.SMS Provider Token' | translate }} - - - {{ 'labels.inputs.SMS Provider Token' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - + @if (hookForm.controls.name.value === 'SMS Bridge') { + + + {{ 'labels.inputs.SMS Provider' | translate }} + + @if (hookForm.controls.smsProvider.hasError('required')) { + + {{ 'labels.inputs.SMS Provider' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.SMS Provider Account ID' | translate }} + + @if (hookForm.controls.smsProviderAccountId.hasError('required')) { + + {{ 'labels.inputs.SMS Provider Account ID' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.SMS Provider Token' | translate }} + + @if (hookForm.controls.smsProviderToken.hasError('required')) { + + {{ 'labels.inputs.SMS Provider Token' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + } @@ -129,9 +148,11 @@ {{ event.actionName }} - - At least one event is required. Cannot delete the last event. - + @if (cannotDeleteLastEvent) { + + At least one event is required. Cannot delete the last event. + + } {{ 'labels.inputs.Actions' | translate }} diff --git a/src/app/system/manage-hooks/edit-hook/edit-hook.component.ts b/src/app/system/manage-hooks/edit-hook/edit-hook.component.ts index e7e1b5dd2a..2132c44a9a 100644 --- a/src/app/system/manage-hooks/edit-hook/edit-hook.component.ts +++ b/src/app/system/manage-hooks/edit-hook/edit-hook.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -67,6 +67,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditHookComponent implements OnInit { + private route = inject(ActivatedRoute); + private systemService = inject(SystemService); + private router = inject(Router); + private formBuilder = inject(UntypedFormBuilder); + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + private snackBar = inject(MatSnackBar); + private cdr = inject(ChangeDetectorRef); + @NgModule({ imports: [ MatSnackBarModule @@ -94,6 +103,9 @@ export class EditHookComponent implements OnInit { /** Sorter for events table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the hooks template data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -103,16 +115,7 @@ export class EditHookComponent implements OnInit { * @param {MatDialog} dialog Dialog Reference. * @param {TranslateService} translateService Translate Service. */ - constructor( - private route: ActivatedRoute, - private systemService: SystemService, - private router: Router, - private formBuilder: UntypedFormBuilder, - private dialog: MatDialog, - private translateService: TranslateService, - private snackBar: MatSnackBar, - private cdr: ChangeDetectorRef - ) { + constructor() { this.route.data.subscribe((data: { hooksTemplate: any; hook: any }) => { this.hooksTemplateData = data.hooksTemplate; this.hookData = data.hook; diff --git a/src/app/system/manage-hooks/hooks-template.resolver.ts b/src/app/system/manage-hooks/hooks-template.resolver.ts index ed42198b7d..858bf73c6f 100644 --- a/src/app/system/manage-hooks/hooks-template.resolver.ts +++ b/src/app/system/manage-hooks/hooks-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../system.service'; */ @Injectable() export class HooksTemplateResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the hooks template data. diff --git a/src/app/system/manage-hooks/manage-hooks.component.ts b/src/app/system/manage-hooks/manage-hooks.component.ts index 903bc77d1b..e1b21cfd05 100644 --- a/src/app/system/manage-hooks/manage-hooks.component.ts +++ b/src/app/system/manage-hooks/manage-hooks.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -47,6 +47,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ManageHooksComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Hook data. */ hookData: any; /** Columns to be displayed in manage hooks table. */ @@ -63,11 +65,14 @@ export class ManageHooksComponent implements OnInit { /** Sorter for manage hooks table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the hooks data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { hooks: any }) => { this.hookData = data.hooks; }); diff --git a/src/app/system/manage-hooks/manage-hooks.resolver.ts b/src/app/system/manage-hooks/manage-hooks.resolver.ts index 06fa2829a5..79f02e34d1 100644 --- a/src/app/system/manage-hooks/manage-hooks.resolver.ts +++ b/src/app/system/manage-hooks/manage-hooks.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../system.service'; */ @Injectable() export class ManageHooksResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the hooks data. diff --git a/src/app/system/manage-hooks/view-hook/hook.resolver.ts b/src/app/system/manage-hooks/view-hook/hook.resolver.ts index a8a070cd20..623009590c 100644 --- a/src/app/system/manage-hooks/view-hook/hook.resolver.ts +++ b/src/app/system/manage-hooks/view-hook/hook.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SystemService } from '../../system.service'; */ @Injectable() export class HookResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the manage hooks data. diff --git a/src/app/system/manage-hooks/view-hook/view-hook.component.html b/src/app/system/manage-hooks/view-hook/view-hook.component.html index 67f4fe9f0a..81d3bcc099 100644 --- a/src/app/system/manage-hooks/view-hook/view-hook.component.html +++ b/src/app/system/manage-hooks/view-hook/view-hook.component.html @@ -41,62 +41,77 @@ {{ 'labels.inputs.Events' | translate }}: - - {{ event.actionName + ' - ' + event.entityName }} - - - + @for (event of hookData.events; track event) { + + {{ event.actionName + ' - ' + event.entityName }} + + + } - - {{ 'labels.inputs.Content Type' | translate }}: - + @if (hookData.name === 'Web') { + {{ 'labels.inputs.Content Type' | translate }}: + } - - {{ hookData.config[0].fieldValue }} - + @if (hookData.name === 'Web') { + + {{ hookData.config[0].fieldValue }} + + } {{ 'labels.inputs.Payload URL' | translate }}: - - {{ hookData.config[1].fieldValue }} - - - - {{ hookData.config[0].fieldValue }} - - - - {{ 'labels.inputs.Phone Number' | translate }}: - - - - {{ hookData.config[1].fieldValue }} - - - - {{ 'labels.inputs.SMS Provider' | translate }}: - - - - {{ hookData.config[2].fieldValue }} - - - - {{ 'labels.inputs.SMS Provider Account ID' | translate }}: - - - - {{ hookData.config[3].fieldValue }} - - - - {{ 'labels.inputs.SMS Provider Token' | translate }}: - - - - {{ hookData.config[4].fieldValue }} - + @if (hookData.name === 'Web') { + + {{ hookData.config[1].fieldValue }} + + } + + @if (hookData.name === 'SMS Bridge') { + + {{ hookData.config[0].fieldValue }} + + } + + @if (hookData.name === 'SMS Bridge') { + {{ 'labels.inputs.Phone Number' | translate }}: + } + + @if (hookData.name === 'SMS Bridge') { + + {{ hookData.config[1].fieldValue }} + + } + + @if (hookData.name === 'SMS Bridge') { + {{ 'labels.inputs.SMS Provider' | translate }}: + } + + @if (hookData.name === 'SMS Bridge') { + + {{ hookData.config[2].fieldValue }} + + } + + @if (hookData.name === 'SMS Bridge') { + {{ 'labels.inputs.SMS Provider Account ID' | translate }}: + } + + @if (hookData.name === 'SMS Bridge') { + + {{ hookData.config[3].fieldValue }} + + } + + @if (hookData.name === 'SMS Bridge') { + {{ 'labels.inputs.SMS Provider Token' | translate }}: + } + + @if (hookData.name === 'SMS Bridge') { + + {{ hookData.config[4].fieldValue }} + + } diff --git a/src/app/system/manage-hooks/view-hook/view-hook.component.ts b/src/app/system/manage-hooks/view-hook/view-hook.component.ts index b8a459f1ff..8d6a6b9a96 100644 --- a/src/app/system/manage-hooks/view-hook/view-hook.component.ts +++ b/src/app/system/manage-hooks/view-hook/view-hook.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -27,9 +27,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewHookComponent { + private route = inject(ActivatedRoute); + private dialog = inject(MatDialog); + private systemService = inject(SystemService); + private router = inject(Router); + private translateService = inject(TranslateService); + /** Hook Data. */ hookData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the hook data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -38,13 +47,7 @@ export class ViewHookComponent { * @param {Router} router Router for navigation. * @param {TranslateService} translateService Translate Service. */ - constructor( - private route: ActivatedRoute, - private dialog: MatDialog, - private systemService: SystemService, - private router: Router, - private translateService: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { hook: any }) => { this.hookData = data.hook; }); diff --git a/src/app/system/manage-jobs/cob-workflow/cob-workflow.component.html b/src/app/system/manage-jobs/cob-workflow/cob-workflow.component.html index a912a26a4f..2671a8d03d 100644 --- a/src/app/system/manage-jobs/cob-workflow/cob-workflow.component.html +++ b/src/app/system/manage-jobs/cob-workflow/cob-workflow.component.html @@ -6,10 +6,12 @@ }} - - - {{ 'labels.buttons.Run Catch-Up' | translate }} - + @if (!isCatchUpRunning) { + + + {{ 'labels.buttons.Run Catch-Up' | translate }} + + } diff --git a/src/app/system/manage-jobs/cob-workflow/cob-workflow.component.ts b/src/app/system/manage-jobs/cob-workflow/cob-workflow.component.ts index 28f4fd43aa..312f040034 100644 --- a/src/app/system/manage-jobs/cob-workflow/cob-workflow.component.ts +++ b/src/app/system/manage-jobs/cob-workflow/cob-workflow.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnDestroy, OnInit } from '@angular/core'; +import { Component, Input, OnDestroy, OnInit, inject } from '@angular/core'; import { SystemService } from 'app/system/system.service'; import { environment } from '../../../../environments/environment'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @@ -16,6 +16,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CobWorkflowComponent implements OnInit, OnDestroy { + private systemService = inject(SystemService); + /** Wait time between API status calls 30 seg */ waitTime = environment.waitTimeForCOBCatchUp || 30; /** Process running flag */ @@ -23,7 +25,10 @@ export class CobWorkflowComponent implements OnInit, OnDestroy { /** Timer to refetch COB Catch-Up status every 5 seconds */ timer: any; - constructor(private systemService: SystemService) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.getCOBCatchUpStatus(); diff --git a/src/app/system/manage-jobs/cob-workflow/loan-locked/loan-locked.component.html b/src/app/system/manage-jobs/cob-workflow/loan-locked/loan-locked.component.html index 1757a931e6..a2303b1309 100644 --- a/src/app/system/manage-jobs/cob-workflow/loan-locked/loan-locked.component.html +++ b/src/app/system/manage-jobs/cob-workflow/loan-locked/loan-locked.component.html @@ -1,100 +1,103 @@ - 0"> - - - - - - - - - {{ 'Start inline COB' | translate }} - +@if (loans && loans.length > 0) { + + + + + + + + @if (allowRunInlineJob) { + + + {{ 'Start inline COB' | translate }} + + + } + + + + + + + + + + + + + {{ 'labels.inputs.Loan Id' | translate }} + {{ loan.loanId }} + + + {{ 'labels.inputs.Lock Placed On' | translate }} + {{ loan.lockPlacedOn | datetimeFormat }} + + + {{ 'labels.inputs.Lock Owner' | translate }} + {{ loan.lockOwner }} + + + {{ 'labels.inputs.Error' | translate }} + {{ loan.error }} + + + {{ 'labels.heading.Details' | translate }} + + + + + + + + + + + + + + +} - - - - - - - - - - - - - - {{ 'labels.inputs.Loan Id' | translate }} - {{ loan.loanId }} - - - - {{ 'labels.inputs.Lock Placed On' | translate }} - {{ loan.lockPlacedOn | datetimeFormat }} - - - - {{ 'labels.inputs.Lock Owner' | translate }} - {{ loan.lockOwner }} - - - - {{ 'labels.inputs.Error' | translate }} - {{ loan.error }} - - - - {{ 'labels.heading.Details' | translate }} - - - - - - - - - - - - - - - - - - - - - - {{ 'labels.text.No loan locked available' | translate }}. +@if (loans && loans.length === 0) { + + + + {{ 'labels.text.No loan locked available' | translate }}. + - +} diff --git a/src/app/system/manage-jobs/cob-workflow/loan-locked/loan-locked.component.ts b/src/app/system/manage-jobs/cob-workflow/loan-locked/loan-locked.component.ts index 12fea69cef..25fbd2cd57 100644 --- a/src/app/system/manage-jobs/cob-workflow/loan-locked/loan-locked.component.ts +++ b/src/app/system/manage-jobs/cob-workflow/loan-locked/loan-locked.component.ts @@ -1,5 +1,5 @@ import { SelectionModel } from '@angular/cdk/collections'; -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; import { @@ -53,6 +53,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanLockedComponent implements OnInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private loansService = inject(LoansService); + private systemService = inject(SystemService); + private tasksService = inject(TasksService); + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** Loans Data */ loans: any[] = []; /** Batch Requests */ @@ -89,21 +97,16 @@ export class LoanLockedComponent implements OnInit { showPaginator = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {LoansService} loansService Loans Service * @param {Router} router Router for navigation. * @param {MatDialog} dialog Dialog reference. * @param {TranslateService} translateService Translate Service. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private loansService: LoansService, - private systemService: SystemService, - private tasksService: TasksService, - private dialog: MatDialog, - private translateService: TranslateService - ) {} + constructor() {} ngOnInit(): void { this.allowRunInlineJob = false; diff --git a/src/app/system/manage-jobs/manage-jobs.component.ts b/src/app/system/manage-jobs/manage-jobs.component.ts index c3dfa436fb..5626f8055a 100644 --- a/src/app/system/manage-jobs/manage-jobs.component.ts +++ b/src/app/system/manage-jobs/manage-jobs.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatTabChangeEvent, MatTabGroup, MatTab } from '@angular/material/tabs'; import { SystemService } from '../system.service'; import { TranslateService } from '@ngx-translate/core'; @@ -21,13 +21,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ManageJobsComponent { + private systemService = inject(SystemService); + private translateService = inject(TranslateService); + /** Process running flag */ isCatchUpRunning = true; - constructor( - private systemService: SystemService, - private translateService: TranslateService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} onJobTabChange(event: MatTabChangeEvent) { if (event.index === 2) { diff --git a/src/app/system/manage-jobs/scheduler-jobs/custom-parameters-popover/custom-parameters-popover.component.html b/src/app/system/manage-jobs/scheduler-jobs/custom-parameters-popover/custom-parameters-popover.component.html index ef67f56061..180523f5ec 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/custom-parameters-popover/custom-parameters-popover.component.html +++ b/src/app/system/manage-jobs/scheduler-jobs/custom-parameters-popover/custom-parameters-popover.component.html @@ -2,22 +2,26 @@ {{ 'labels.buttons.Edit Job Custom Parameters' | translate - - - - + @for (job of selectedJobs; track job) { + + + + + } - - {{ message.message }} - + @for (message of messages; track message) { + + {{ message.message }} + + } diff --git a/src/app/system/manage-jobs/scheduler-jobs/custom-parameters-popover/custom-parameters-popover.component.ts b/src/app/system/manage-jobs/scheduler-jobs/custom-parameters-popover/custom-parameters-popover.component.ts index e0a4e4cc2d..62035291bb 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/custom-parameters-popover/custom-parameters-popover.component.ts +++ b/src/app/system/manage-jobs/scheduler-jobs/custom-parameters-popover/custom-parameters-popover.component.ts @@ -1,5 +1,5 @@ import { SelectionModel } from '@angular/cdk/collections'; -import { Component, Inject, OnInit, QueryList, ViewChildren } from '@angular/core'; +import { Component, OnInit, QueryList, ViewChildren, inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogTitle, @@ -71,6 +71,9 @@ interface JobDataType { ] }) export class CustomParametersPopoverComponent implements OnInit { + private systemService = inject(SystemService); + data = inject(MAT_DIALOG_DATA); + /* Job table childer */ @ViewChildren(CustomParametersTableComponent) tableComponents: QueryList; @@ -81,10 +84,10 @@ export class CustomParametersPopoverComponent implements OnInit { /* API call response message */ messages: { message: string; status: number }[] = []; - constructor( - private systemService: SystemService, - @Inject(MAT_DIALOG_DATA) public data: SelectedJobsDataType - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.selectedJobs = this.data.selectedJobs.selected.map((jobJSON) => ({ diff --git a/src/app/system/manage-jobs/scheduler-jobs/edit-scheduler-job/edit-scheduler-job.component.html b/src/app/system/manage-jobs/scheduler-jobs/edit-scheduler-job/edit-scheduler-job.component.html index a543b55a78..9e330bd53d 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/edit-scheduler-job/edit-scheduler-job.component.html +++ b/src/app/system/manage-jobs/scheduler-jobs/edit-scheduler-job/edit-scheduler-job.component.html @@ -6,19 +6,23 @@ {{ 'labels.inputs.Job Name' | translate }} - - {{ 'labels.inputs.Job Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (jobForm.controls.displayName.hasError('required')) { + + {{ 'labels.inputs.Job Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Cron Expression' | translate }} - - {{ 'labels.inputs.Cron Expression' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (jobForm.controls.cronExpression.hasError('required')) { + + {{ 'labels.inputs.Cron Expression' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/system/manage-jobs/scheduler-jobs/edit-scheduler-job/edit-scheduler-job.component.ts b/src/app/system/manage-jobs/scheduler-jobs/edit-scheduler-job/edit-scheduler-job.component.ts index c9388a54dc..73c28cb30e 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/edit-scheduler-job/edit-scheduler-job.component.ts +++ b/src/app/system/manage-jobs/scheduler-jobs/edit-scheduler-job/edit-scheduler-job.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; @@ -21,11 +21,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditSchedulerJobComponent implements OnInit { + private route = inject(ActivatedRoute); + private systemService = inject(SystemService); + private router = inject(Router); + private formBuilder = inject(UntypedFormBuilder); + /** Job Data. */ jobData: any; /** Job Form. */ jobForm: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the selected job data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -33,12 +41,7 @@ export class EditSchedulerJobComponent implements OnInit { * @param {Router} router Router for navigation. * @param {ActivatedRoute} route Activated Route. */ - constructor( - private route: ActivatedRoute, - private systemService: SystemService, - private router: Router, - private formBuilder: UntypedFormBuilder - ) { + constructor() { this.route.data.subscribe((data: { jobSelected: any }) => { this.jobData = data.jobSelected; }); diff --git a/src/app/system/manage-jobs/scheduler-jobs/error-log-popover/error-log-popover.component.html b/src/app/system/manage-jobs/scheduler-jobs/error-log-popover/error-log-popover.component.html index f5f3ca2db8..3ff99c0dee 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/error-log-popover/error-log-popover.component.html +++ b/src/app/system/manage-jobs/scheduler-jobs/error-log-popover/error-log-popover.component.html @@ -15,9 +15,11 @@ 18"> {{ job.lastRunHistory.jobRunErrorLog }} - 18" class="show-button" (click)="show = !show"> - {{ buttonLabel() }} - + @if (content.scrollHeight > 18) { + + {{ buttonLabel() }} + + } diff --git a/src/app/system/manage-jobs/scheduler-jobs/error-log-popover/error-log-popover.component.ts b/src/app/system/manage-jobs/scheduler-jobs/error-log-popover/error-log-popover.component.ts index ed9eb96446..2f1cb3d630 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/error-log-popover/error-log-popover.component.ts +++ b/src/app/system/manage-jobs/scheduler-jobs/error-log-popover/error-log-popover.component.ts @@ -1,4 +1,4 @@ -import { Component, Inject, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogTitle, @@ -31,15 +31,18 @@ interface ErrorJobDataType { ] }) export class ErrorLogPopoverComponent implements OnInit { + data = inject(MAT_DIALOG_DATA); + private translateService = inject(TranslateService); + show = false; /* Initialize Selected Job */ job: SchedulerJob; - constructor( - @Inject(MAT_DIALOG_DATA) public data: ErrorJobDataType, - private translateService: TranslateService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.job = this.data.job; diff --git a/src/app/system/manage-jobs/scheduler-jobs/manage-scheduler-job.resolver.ts b/src/app/system/manage-jobs/scheduler-jobs/manage-scheduler-job.resolver.ts index 71f89e6b4f..9e302c25ec 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/manage-scheduler-job.resolver.ts +++ b/src/app/system/manage-jobs/scheduler-jobs/manage-scheduler-job.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SystemService } from '../../system.service'; */ @Injectable() export class ManageSchedulerJobResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the edit scheduler jobs data. diff --git a/src/app/system/manage-jobs/scheduler-jobs/manage-scheduler-jobs.component.html b/src/app/system/manage-jobs/scheduler-jobs/manage-scheduler-jobs.component.html index 0c2e518e58..74be0ef82c 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/manage-scheduler-jobs.component.html +++ b/src/app/system/manage-jobs/scheduler-jobs/manage-scheduler-jobs.component.html @@ -6,14 +6,18 @@ }} - - - {{ 'labels.buttons.Suspend' | translate }} - - - - {{ 'labels.buttons.Activate' | translate }} - + @if (schedulerActive) { + + + {{ 'labels.buttons.Suspend' | translate }} + + } + @if (!schedulerActive) { + + + {{ 'labels.buttons.Activate' | translate }} + + } @@ -52,14 +56,15 @@ - - + @if (!row.currentlyRunning) { + + + } @@ -85,27 +90,31 @@ {{ 'labels.inputs.Previous Run' | translate }} - - - - - {{ job.lastRunHistory.jobRunStartTime | datetimeFormat }} - + @if (job.lastRunHistory) { + + @if (job.lastRunHistory.status === 'success') { + + } + @if (!(job.lastRunHistory.status === 'success')) { + + } + @if (job.lastRunHistory) { + {{ job.lastRunHistory.jobRunStartTime | datetimeFormat }} + } + + } @@ -131,16 +140,17 @@ {{ 'labels.inputs.Error Log' | translate }} - - - + @if (jobWithError(job)) { + + + + } diff --git a/src/app/system/manage-jobs/scheduler-jobs/manage-scheduler-jobs.component.ts b/src/app/system/manage-jobs/scheduler-jobs/manage-scheduler-jobs.component.ts index c7f35200fb..ac5f1728a7 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/manage-scheduler-jobs.component.ts +++ b/src/app/system/manage-jobs/scheduler-jobs/manage-scheduler-jobs.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -32,7 +32,7 @@ import { CustomParametersPopoverComponent } from './custom-parameters-popover/cu import { SchedulerJob } from './models/scheduler-job.model'; import { ErrorLogPopoverComponent } from './error-log-popover/error-log-popover.component'; import { RunSelectedJobsPopoverComponent } from './run-selected-jobs-popover/run-selected-jobs-popover.component'; -import { NgIf, NgClass } from '@angular/common'; +import { NgClass } from '@angular/common'; import { MatButton, MatIconButton } from '@angular/material/button'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatCheckbox } from '@angular/material/checkbox'; @@ -73,6 +73,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ManageSchedulerJobsComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private systemService = inject(SystemService); + private router = inject(Router); + private dialog = inject(MatDialog); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Jobs data. */ jobData: any; /** Scheduler data */ @@ -110,6 +117,9 @@ export class ManageSchedulerJobsComponent implements OnInit, AfterViewInit { /* Template for popover on jobs table */ @ViewChild('templateJobsTable') templateJobsTable: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the scheduler jobs data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -118,14 +128,7 @@ export class ManageSchedulerJobsComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private systemService: SystemService, - private router: Router, - private dialog: MatDialog, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { jobsScheduler: any }) => { if (data.jobsScheduler) { this.jobData = data.jobsScheduler[0]; diff --git a/src/app/system/manage-jobs/scheduler-jobs/run-selected-jobs-popover/run-selected-jobs-popover.component.html b/src/app/system/manage-jobs/scheduler-jobs/run-selected-jobs-popover/run-selected-jobs-popover.component.html index 30c4adc00c..c3e143ddb6 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/run-selected-jobs-popover/run-selected-jobs-popover.component.html +++ b/src/app/system/manage-jobs/scheduler-jobs/run-selected-jobs-popover/run-selected-jobs-popover.component.html @@ -8,9 +8,11 @@ {{ 'labels.heading.Selected Jobs' | translate }}: - - {{ message.message }} - + @for (message of messages; track message) { + + {{ message.message }} + + } diff --git a/src/app/system/manage-jobs/scheduler-jobs/run-selected-jobs-popover/run-selected-jobs-popover.component.ts b/src/app/system/manage-jobs/scheduler-jobs/run-selected-jobs-popover/run-selected-jobs-popover.component.ts index 71b25ff151..ede68ed97c 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/run-selected-jobs-popover/run-selected-jobs-popover.component.ts +++ b/src/app/system/manage-jobs/scheduler-jobs/run-selected-jobs-popover/run-selected-jobs-popover.component.ts @@ -1,5 +1,5 @@ import { SelectionModel } from '@angular/cdk/collections'; -import { Component, EventEmitter, Inject, OnInit, Output, QueryList, ViewChildren } from '@angular/core'; +import { Component, EventEmitter, OnInit, Output, QueryList, ViewChildren, inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogTitle, @@ -52,6 +52,9 @@ export interface JobDataType { ] }) export class RunSelectedJobsPopoverComponent implements OnInit { + private systemService = inject(SystemService); + data = inject(MAT_DIALOG_DATA); + /** Confirmed jobs event emitter */ @Output() confirmedJobs = new EventEmitter(); @@ -67,11 +70,10 @@ export class RunSelectedJobsPopoverComponent implements OnInit { /** API call response message */ messages: { message: string; status: number }[] = []; - constructor( - private systemService: SystemService, - @Inject(MAT_DIALOG_DATA) - public data: SelectedJobsDataType - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.selectedJobs = this.data.selectedJobs.selected.sort((a, b) => a.jobId - b.jobId); } diff --git a/src/app/system/manage-jobs/scheduler-jobs/view-history-scheduler-job/view-history-scheduler-job.component.html b/src/app/system/manage-jobs/scheduler-jobs/view-history-scheduler-job/view-history-scheduler-job.component.html index 72a631c9d5..a1fc52fc8d 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/view-history-scheduler-job/view-history-scheduler-job.component.html +++ b/src/app/system/manage-jobs/scheduler-jobs/view-history-scheduler-job/view-history-scheduler-job.component.html @@ -26,22 +26,24 @@ {{ 'labels.inputs.Status' | translate }} - - + @if (jobHistoryData.status === 'success') { + + } + @if (!(jobHistoryData.status === 'success')) { + + } @@ -53,16 +55,17 @@ {{ 'labels.inputs.Error Log' | translate }} - - - + @if (!(jobHistoryData.status === 'success')) { + + + + } diff --git a/src/app/system/manage-jobs/scheduler-jobs/view-history-scheduler-job/view-history-scheduler-job.component.ts b/src/app/system/manage-jobs/scheduler-jobs/view-history-scheduler-job/view-history-scheduler-job.component.ts index 8cc8aadd2f..418ae50299 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/view-history-scheduler-job/view-history-scheduler-job.component.ts +++ b/src/app/system/manage-jobs/scheduler-jobs/view-history-scheduler-job/view-history-scheduler-job.component.ts @@ -1,5 +1,5 @@ /** Angular Imports. */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatTableDataSource, @@ -50,6 +50,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewHistorySchedulerJobComponent implements OnInit { + private route = inject(ActivatedRoute); + private dialog = inject(MatDialog); + private router = inject(Router); + /** Job History data. */ jobHistoryData: any; /** Columns to be displayed in Scheduler Job History. */ @@ -69,15 +73,14 @@ export class ViewHistorySchedulerJobComponent implements OnInit { /** Sorter for Scheduler Job History table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the scheduler Job History data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor( - private route: ActivatedRoute, - private dialog: MatDialog, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { jobsSchedulerHistory: any }) => { this.jobHistoryData = data.jobsSchedulerHistory; }); diff --git a/src/app/system/manage-jobs/scheduler-jobs/view-history-scheduler-job/view-history-scheduler-job.resolver.ts b/src/app/system/manage-jobs/scheduler-jobs/view-history-scheduler-job/view-history-scheduler-job.resolver.ts index 29c2b17dae..268be1b3af 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/view-history-scheduler-job/view-history-scheduler-job.resolver.ts +++ b/src/app/system/manage-jobs/scheduler-jobs/view-history-scheduler-job/view-history-scheduler-job.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SystemService } from '../../../system.service'; */ @Injectable() export class ViewHistorySchedulerJobsResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Scheduler Jobs History data. diff --git a/src/app/system/manage-jobs/scheduler-jobs/view-scheduler-job/view-scheduler-job.component.ts b/src/app/system/manage-jobs/scheduler-jobs/view-scheduler-job/view-scheduler-job.component.ts index 7c79c74c0f..8f1ae802d7 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/view-scheduler-job/view-scheduler-job.component.ts +++ b/src/app/system/manage-jobs/scheduler-jobs/view-scheduler-job/view-scheduler-job.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { YesnoPipe } from '../../../../pipes/yesno.pipe'; @@ -19,14 +19,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewSchedulerJobComponent { + private route = inject(ActivatedRoute); + /** Job Data. */ jobData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the selected job data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { selectedJob: any }) => { this.jobData = data.selectedJob; }); diff --git a/src/app/system/manage-jobs/scheduler-jobs/view-scheduler-job/view-scheduler-job.resolver.ts b/src/app/system/manage-jobs/scheduler-jobs/view-scheduler-job/view-scheduler-job.resolver.ts index a1e403ae32..b5d9d59f0e 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/view-scheduler-job/view-scheduler-job.resolver.ts +++ b/src/app/system/manage-jobs/scheduler-jobs/view-scheduler-job/view-scheduler-job.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SystemService } from '../../../system.service'; */ @Injectable() export class ViewSchedulerJobResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the selected scheduler job data. diff --git a/src/app/system/manage-jobs/workflow-jobs/workflow-diagram/workflow-diagram.component.html b/src/app/system/manage-jobs/workflow-jobs/workflow-diagram/workflow-diagram.component.html index 1a8e84f669..33889d1816 100644 --- a/src/app/system/manage-jobs/workflow-jobs/workflow-diagram/workflow-diagram.component.html +++ b/src/app/system/manage-jobs/workflow-jobs/workflow-diagram/workflow-diagram.component.html @@ -40,13 +40,11 @@ - - - {{ link.data.linkText | translateKey: 'text' }} - + @if (link.midPoint) { + + + {{ link.data.linkText | translateKey: 'text' }} + + } diff --git a/src/app/system/manage-jobs/workflow-jobs/workflow-jobs.component.html b/src/app/system/manage-jobs/workflow-jobs/workflow-jobs.component.html index bf08a1673c..d9454412d1 100644 --- a/src/app/system/manage-jobs/workflow-jobs/workflow-jobs.component.html +++ b/src/app/system/manage-jobs/workflow-jobs/workflow-jobs.component.html @@ -2,71 +2,75 @@ {{ 'labels.inputs.Job Name' | translate }} - - {{ job | translateKey: 'catalogs' }} - + @for (job of jobNameOptions; track job) { + + {{ job | translateKey: 'catalogs' }} + + } - - - {{ 'labels.buttons.Link Job Step' | translate }} - - + @if (jobStepName) { + + + {{ 'labels.buttons.Link Job Step' | translate }} + + + } - 0"> - - - {{ 'labels.inputs.Step Name' | translate }} - {{ jobStep.stepName }} - + @if (jobStepsData.length > 0) { + + + + {{ 'labels.inputs.Step Name' | translate }} + {{ jobStep.stepName }} + + + {{ 'labels.inputs.Order' | translate }} + {{ jobStep.order }} + + + {{ 'labels.inputs.Actions' | translate }} + + + + + + + + + + + } - - {{ 'labels.inputs.Order' | translate }} - {{ jobStep.order }} - + @if (stepOrderHasChanged) { + + + {{ 'labels.buttons.Cancel' | translate }} + + + {{ 'labels.buttons.Apply Changes' | translate }} + + + } - - {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - {{ 'labels.buttons.Cancel' | translate }} - - - {{ 'labels.buttons.Apply Changes' | translate }} - - - - 0 && !stepOrderHasChanged"> - - + @if (jobStepsData.length > 0 && !stepOrderHasChanged) { + + + + } diff --git a/src/app/system/manage-jobs/workflow-jobs/workflow-jobs.component.ts b/src/app/system/manage-jobs/workflow-jobs/workflow-jobs.component.ts index c14d39be29..3ce83cb3b7 100644 --- a/src/app/system/manage-jobs/workflow-jobs/workflow-jobs.component.ts +++ b/src/app/system/manage-jobs/workflow-jobs/workflow-jobs.component.ts @@ -1,5 +1,5 @@ import { CdkDragDrop, moveItemInArray, CdkDropList, CdkDrag } from '@angular/cdk/drag-drop'; -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { UntypedFormControl, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { @@ -57,6 +57,10 @@ export interface JobStep { ] }) export class WorkflowJobsComponent implements OnInit { + private systemService = inject(SystemService); + dialog = inject(MatDialog); + private translateService = inject(TranslateService); + stepOrderHasChanged = false; jobNameOptions: any = []; @@ -76,11 +80,10 @@ export class WorkflowJobsComponent implements OnInit { 'actions' ]; - constructor( - private systemService: SystemService, - public dialog: MatDialog, - private translateService: TranslateService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.systemService diff --git a/src/app/system/manage-reports/create-report/create-report.component.html b/src/app/system/manage-reports/create-report/create-report.component.html index 46fc4e4b28..970c757cb6 100644 --- a/src/app/system/manage-reports/create-report/create-report.component.html +++ b/src/app/system/manage-reports/create-report/create-report.component.html @@ -6,46 +6,50 @@ {{ 'labels.inputs.Report Name' | translate }} - - {{ 'labels.inputs.Report Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (reportForm.controls.reportName.hasError('required')) { + + {{ 'labels.inputs.Report Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Report Type' | translate }} - - {{ allowedReportType | translateKey: 'text' }} - + @for (allowedReportType of reportTemplateData.allowedReportTypes; track allowedReportType) { + + {{ allowedReportType | translateKey: 'text' }} + + } - - {{ 'labels.inputs.Report Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (reportForm.controls.reportType.hasError('required')) { + + {{ 'labels.inputs.Report Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Report Sub Type' | translate }} - - {{ allowedReportSubType | translateKey: 'text' }} - + @for (allowedReportSubType of reportTemplateData.allowedReportSubTypes; track allowedReportSubType) { + + {{ allowedReportSubType | translateKey: 'text' }} + + } {{ 'labels.inputs.Report Category' | translate }} - - {{ reportCategoryType | translateKey: 'catalogs' }} - + @for (reportCategoryType of reportCategoryTypeOptions; track reportCategoryType) { + + {{ reportCategoryType | translateKey: 'catalogs' }} + + } @@ -69,10 +73,12 @@ cdkTextareaAutosize cdkAutosizeMinRows="6" > - - {{ 'labels.inputs.SQL' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (reportForm.controls.reportSql.hasError('required')) { + + {{ 'labels.inputs.SQL' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/system/manage-reports/create-report/create-report.component.ts b/src/app/system/manage-reports/create-report/create-report.component.ts index 9ec6794fc4..61e2ef95f6 100644 --- a/src/app/system/manage-reports/create-report/create-report.component.ts +++ b/src/app/system/manage-reports/create-report/create-report.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; @@ -61,6 +61,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateReportComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private systemService = inject(SystemService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private translateServices = inject(TranslateService); + /** Report Form. */ reportForm: UntypedFormGroup; /** Report Template Data. */ @@ -94,6 +101,9 @@ export class CreateReportComponent implements OnInit { 'Accounting' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the report template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -103,14 +113,7 @@ export class CreateReportComponent implements OnInit { * @param {MatDialog} dialog Dialog Reference. * @param {TranslateService} translateService Translate Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private systemService: SystemService, - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private translateServices: TranslateService - ) { + constructor() { this.route.data.subscribe((data: { reportTemplate: any }) => { this.reportTemplateData = data.reportTemplate; this.dataForDialog.allowedParameters = this.reportTemplateData.allowedParameters; diff --git a/src/app/system/manage-reports/edit-report/edit-report.component.html b/src/app/system/manage-reports/edit-report/edit-report.component.html index 40dac37aaa..49168cf51f 100644 --- a/src/app/system/manage-reports/edit-report/edit-report.component.html +++ b/src/app/system/manage-reports/edit-report/edit-report.component.html @@ -6,43 +6,50 @@ {{ 'labels.inputs.Report Name' | translate }} - - {{ 'labels.inputs.Report Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (reportForm.controls.reportName.hasError('required')) { + + {{ 'labels.inputs.Report Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Report Type' | translate }} - - {{ allowedReportType | translateKey: 'text' }} - + @for (allowedReportType of reportData.allowedReportTypes; track allowedReportType) { + + {{ allowedReportType | translateKey: 'text' }} + + } - - {{ 'labels.inputs.Report Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (reportForm.controls.reportType.hasError('required')) { + + {{ 'labels.inputs.Report Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Report Sub Type' | translate }} - - {{ allowedReportSubType | translateKey: 'text' }} - + @for (allowedReportSubType of reportData.allowedReportSubTypes; track allowedReportSubType) { + + {{ allowedReportSubType | translateKey: 'text' }} + + } {{ 'labels.inputs.Report Category' | translate }} - - {{ reportCategoryType | translateKey: 'catalogs' }} - + @for (reportCategoryType of reportCategoryTypeOptions; track reportCategoryType) { + + {{ reportCategoryType | translateKey: 'catalogs' }} + + } @@ -66,10 +73,12 @@ cdkTextareaAutosize cdkAutosizeMinRows="6" > - - {{ 'labels.inputs.SQL' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (reportForm.controls.reportSql.hasError('required')) { + + {{ 'labels.inputs.SQL' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -78,17 +87,12 @@ {{ 'labels.inputs.Report Parameters' | translate }} - - - {{ 'labels.buttons.Add Report Parameter' | translate }} - + @if (!reportData.coreReport) { + + + {{ 'labels.buttons.Add Report Parameter' | translate }} + + } @@ -107,26 +111,28 @@ {{ 'labels.inputs.Actions' | translate }} - - - - - - + @if (!reportData.coreReport) { + + + + } + @if (!reportData.coreReport) { + + + + } diff --git a/src/app/system/manage-reports/edit-report/edit-report.component.ts b/src/app/system/manage-reports/edit-report/edit-report.component.ts index ceb2b42d2c..253e9b2818 100644 --- a/src/app/system/manage-reports/edit-report/edit-report.component.ts +++ b/src/app/system/manage-reports/edit-report/edit-report.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -60,6 +60,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditReportComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private systemService = inject(SystemService); + private dialog = inject(MatDialog); + /** Report Data. */ reportData: any; /** Report Template Data. */ @@ -98,6 +104,9 @@ export class EditReportComponent implements OnInit { /** Sorter for report parameters table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the report and report template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -106,13 +115,7 @@ export class EditReportComponent implements OnInit { * @param {Router} router Router for navigation. * @param {MatDialog} dialog Dialog Reference. */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private systemService: SystemService, - private dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { report: any; reportTemplate: any }) => { this.reportData = data.report; this.reportParametersData = data.report.reportParameters ? data.report.reportParameters : []; diff --git a/src/app/system/manage-reports/manage-reports.component.html b/src/app/system/manage-reports/manage-reports.component.html index 4276d79aff..6944eb3a4f 100644 --- a/src/app/system/manage-reports/manage-reports.component.html +++ b/src/app/system/manage-reports/manage-reports.component.html @@ -40,44 +40,48 @@ {{ 'labels.inputs.Core Report' | translate }} - - + @if (report.coreReport) { + + } + @if (!report.coreReport) { + + } {{ 'labels.inputs.User Report' | translate }} - - + @if (report.useReport) { + + } + @if (!report.useReport) { + + } diff --git a/src/app/system/manage-reports/manage-reports.component.ts b/src/app/system/manage-reports/manage-reports.component.ts index 6b92d9511e..d414183a9e 100644 --- a/src/app/system/manage-reports/manage-reports.component.ts +++ b/src/app/system/manage-reports/manage-reports.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -55,6 +55,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ManageReportsComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + private dialog = inject(MatDialog); + /** Reports Data. */ reportsData: any; /** Columns to be displayed in reports table. */ @@ -79,6 +85,9 @@ export class ManageReportsComponent implements OnInit, AfterViewInit { /* Template for popover on Create Report Button */ @ViewChild('templateButtonCreateReport') templateButtonCreateReport: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the reports data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -87,13 +96,7 @@ export class ManageReportsComponent implements OnInit, AfterViewInit { * @param {PopoverService} popoverService PopoverService. * @param {Matdialog} matdialog Matdialog. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService, - private dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { reports: any }) => { this.reportsData = data.reports; }); diff --git a/src/app/system/manage-reports/report-parameter-dialog/report-parameter-dialog.component.html b/src/app/system/manage-reports/report-parameter-dialog/report-parameter-dialog.component.html index 53565c01dc..33fbbff20e 100644 --- a/src/app/system/manage-reports/report-parameter-dialog/report-parameter-dialog.component.html +++ b/src/app/system/manage-reports/report-parameter-dialog/report-parameter-dialog.component.html @@ -9,14 +9,18 @@ {{ 'labels.inputs.Select allowed parameter' | translate }} - - {{ allowedParameter.parameterName }} - + @for (allowedParameter of data.allowedParameters; track allowedParameter) { + + {{ allowedParameter.parameterName }} + + } - - {{ 'labels.inputs.Report Parameters' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (reportParameterForm.controls.parameterName.hasError('required')) { + + {{ 'labels.inputs.Report Parameters' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/system/manage-reports/report-parameter-dialog/report-parameter-dialog.component.ts b/src/app/system/manage-reports/report-parameter-dialog/report-parameter-dialog.component.ts index 84a0a8658c..6453c83dbf 100644 --- a/src/app/system/manage-reports/report-parameter-dialog/report-parameter-dialog.component.ts +++ b/src/app/system/manage-reports/report-parameter-dialog/report-parameter-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef, @@ -29,19 +29,22 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ReportParameterDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + formBuilder = inject(UntypedFormBuilder); + data = inject(MAT_DIALOG_DATA); + /** Report Parameter Form. */ reportParameterForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {FormBuilder} formBuilder Form Builder. * @param {any} data Provides the allowed parameters and values for the form (if available). */ - constructor( - public dialogRef: MatDialogRef, - public formBuilder: UntypedFormBuilder, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} /** * Creates the add report parameter form. diff --git a/src/app/system/manage-reports/report-template.resolver.ts b/src/app/system/manage-reports/report-template.resolver.ts index ef6eb4744a..5c837eac29 100644 --- a/src/app/system/manage-reports/report-template.resolver.ts +++ b/src/app/system/manage-reports/report-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../system.service'; */ @Injectable() export class ReportTemplateResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Report Template data. diff --git a/src/app/system/manage-reports/report.resolver.ts b/src/app/system/manage-reports/report.resolver.ts index c3f8cb229b..5bcf3ab2de 100644 --- a/src/app/system/manage-reports/report.resolver.ts +++ b/src/app/system/manage-reports/report.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SystemService } from '../system.service'; */ @Injectable() export class ReportResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Report data. diff --git a/src/app/system/manage-reports/reports.resolver.ts b/src/app/system/manage-reports/reports.resolver.ts index 03cd427b8a..93ac8f9e3e 100644 --- a/src/app/system/manage-reports/reports.resolver.ts +++ b/src/app/system/manage-reports/reports.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../system.service'; */ @Injectable() export class ReportsResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Reports data. diff --git a/src/app/system/manage-reports/view-report/view-report.component.html b/src/app/system/manage-reports/view-report/view-report.component.html index 0ea090b111..8403143410 100644 --- a/src/app/system/manage-reports/view-report/view-report.component.html +++ b/src/app/system/manage-reports/view-report/view-report.component.html @@ -4,12 +4,14 @@ {{ 'labels.buttons.Edit' | translate }} - - - - {{ 'labels.buttons.Delete' | translate }} - - + @if (!reportData.coreReport) { + + + + {{ 'labels.buttons.Delete' | translate }} + + + } @@ -28,13 +30,15 @@ {{ reportData.reportType | translateKey: 'text' }} - - {{ 'labels.inputs.Report Sub Type' | translate }}: - + @if (reportData.reportSubType) { + {{ 'labels.inputs.Report Sub Type' | translate }}: + } - - {{ reportData.reportSubType | translateKey: 'text' }} - + @if (reportData.reportSubType) { + + {{ reportData.reportSubType | translateKey: 'text' }} + + } {{ 'labels.inputs.Report Category' | translate }}: diff --git a/src/app/system/manage-reports/view-report/view-report.component.ts b/src/app/system/manage-reports/view-report/view-report.component.ts index f6d1b1f98c..5038d242f2 100644 --- a/src/app/system/manage-reports/view-report/view-report.component.ts +++ b/src/app/system/manage-reports/view-report/view-report.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -28,9 +28,17 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewReportComponent { + private route = inject(ActivatedRoute); + private systemService = inject(SystemService); + private dialog = inject(MatDialog); + private router = inject(Router); + /** Report Data. */ reportData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the report data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -38,12 +46,7 @@ export class ViewReportComponent { * @param {MatDialog} dialog Dialog Reference. * @param {Router} router Router for navigation. */ - constructor( - private route: ActivatedRoute, - private systemService: SystemService, - private dialog: MatDialog, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { report: any }) => { this.reportData = data.report; }); diff --git a/src/app/system/manage-surveys/create-survey/create-survey.component.html b/src/app/system/manage-surveys/create-survey/create-survey.component.html index 8fec713b92..96e8bf1cb5 100644 --- a/src/app/system/manage-surveys/create-survey/create-survey.component.html +++ b/src/app/system/manage-surveys/create-survey/create-survey.component.html @@ -7,32 +7,40 @@ {{ 'labels.inputs.Key' | translate }} - - {{ 'labels.inputs.Key' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (surveyForm.controls.key.hasError('required')) { + + {{ 'labels.inputs.Key' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Name' | translate }} - - {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (surveyForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Country Code' | translate }} - - {{ 'labels.inputs.Country Code' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Country Code' | translate }} - {{ 'labels.commons.must consist of 2 alphabetic characters' | translate }} - + @if (surveyForm.controls.countryCode.hasError('required')) { + + {{ 'labels.inputs.Country Code' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (surveyForm.controls.countryCode.hasError('pattern')) { + + {{ 'labels.inputs.Country Code' | translate }} + {{ 'labels.commons.must consist of 2 alphabetic characters' | translate }} + + } @@ -40,159 +48,170 @@ - - - {{ 'labels.buttons.Cancel' | translate }} - - - {{ 'labels.buttons.Proceed' | translate }} - - - - - - - - - - - - {{ 'labels.heading.Question' | translate }} {{ questionIndex + 1 }} + @if (!questionDatas.length) { + + + {{ 'labels.buttons.Cancel' | translate }} + - - {{ 'labels.buttons.Delete' | translate }} {{ 'labels.heading.Question' | translate }} - - - - - {{ 'labels.inputs.Key' | translate }} - - - {{ 'labels.inputs.Key' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Text' | translate }} - - - {{ 'labels.inputs.Text' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Description' | translate }} - - - - - - - {{ 'labels.heading.Options' | translate }} - - - {{ 'labels.buttons.Add' | translate }} {{ 'labels.inputs.Option' | translate }} + {{ 'labels.buttons.Proceed' | translate }} + } + + + - + + @for (question of questionDatas.controls; track question; let questionIndex = $index; let isLast = $last) { + + + + + {{ 'labels.heading.Question' | translate }} {{ questionIndex + 1 }} + + + {{ 'labels.buttons.Delete' | translate }} {{ 'labels.heading.Question' | translate }} + + + + {{ 'labels.inputs.Key' | translate }} + + @if (question.controls.key.hasError('required')) { + + {{ 'labels.inputs.Key' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Text' | translate }} + + @if (question.controls.text.hasError('required')) { + + {{ 'labels.inputs.Text' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Description' | translate }} + + + + + {{ 'labels.heading.Options' | translate }} + + + {{ 'labels.buttons.Add' | translate }} {{ 'labels.inputs.Option' | translate }} + + - - - {{ 'labels.inputs.Text' | translate }} - - - {{ 'labels.inputs.Text' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Value' | translate }} - - - {{ 'labels.inputs.Value' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Value' | translate }} - {{ 'labels.commons.must be an integer between -9999 and 9999' | translate }} - - - - - - - - + @for ( + response of getResponseDatas(questionIndex).controls; + track response; + let responseIndex = $index + ) { + + + + {{ 'labels.inputs.Text' | translate }} + + @if (response.controls.text.hasError('required')) { + + {{ 'labels.inputs.Text' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Value' | translate }} + + @if (response.controls.value.hasError('required')) { + + {{ 'labels.inputs.Value' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (response.controls.value.hasError('pattern')) { + + {{ 'labels.inputs.Value' | translate }} + {{ + 'labels.commons.must be an integer between -9999 and 9999' | translate + }} + + } + + + + + + + + - + } + + + @if (isLast) { + + + {{ 'labels.buttons.Cancel' | translate }} + + + + {{ 'labels.buttons.Add' | translate }} {{ 'labels.heading.Question' | translate }} + + + {{ 'labels.buttons.Submit' | translate }} + + + } - - - - - - {{ 'labels.buttons.Cancel' | translate }} - - - - {{ 'labels.buttons.Add' | translate }} {{ 'labels.heading.Question' | translate }} - - - {{ 'labels.buttons.Submit' | translate }} - - - - + + } diff --git a/src/app/system/manage-surveys/create-survey/create-survey.component.ts b/src/app/system/manage-surveys/create-survey/create-survey.component.ts index 30b6a1f6da..a983c5fba8 100644 --- a/src/app/system/manage-surveys/create-survey/create-survey.component.ts +++ b/src/app/system/manage-surveys/create-survey/create-survey.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -42,9 +42,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateSurveyComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private systemService = inject(SystemService); + private route = inject(ActivatedRoute); + private router = inject(Router); + dialog = inject(MatDialog); + /** Survey form. */ surveyForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {SystemService} systemService System Service. @@ -52,13 +61,7 @@ export class CreateSurveyComponent implements OnInit { * @param {Router} router Router for navigation. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private formBuilder: UntypedFormBuilder, - private systemService: SystemService, - private route: ActivatedRoute, - private router: Router, - public dialog: MatDialog - ) {} + constructor() {} /** * Creates the survey form. diff --git a/src/app/system/manage-surveys/edit-survey/edit-survey.component.html b/src/app/system/manage-surveys/edit-survey/edit-survey.component.html index 9dc21b0a3a..bfccd4503c 100644 --- a/src/app/system/manage-surveys/edit-survey/edit-survey.component.html +++ b/src/app/system/manage-surveys/edit-survey/edit-survey.component.html @@ -7,32 +7,40 @@ {{ 'labels.inputs.Key' | translate }} - - {{ 'labels.inputs.Key' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (surveyForm.controls.key.hasError('required')) { + + {{ 'labels.inputs.Key' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Name' | translate }} - - {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (surveyForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Country Code' | translate }} - - {{ 'labels.inputs.Country Code' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Country Code' | translate }} - {{ 'labels.commons.must consist of 2 alphabetic characters' | translate }} - + @if (surveyForm.controls.countryCode.hasError('required')) { + + {{ 'labels.inputs.Country Code' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (surveyForm.controls.countryCode.hasError('pattern')) { + + {{ 'labels.inputs.Country Code' | translate }} + {{ 'labels.commons.must consist of 2 alphabetic characters' | translate }} + + } @@ -44,131 +52,143 @@ - - - - - {{ 'labels.heading.Question' | translate }} {{ questionIndex + 1 }} - - - {{ 'labels.buttons.Delete' | translate }} {{ 'labels.heading.Question' | translate }} - - - - - {{ 'labels.inputs.Key' | translate }} - - - {{ 'labels.inputs.Key' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Text' | translate }} - - - {{ 'labels.inputs.Text' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Description' | translate }} - - - - - - - {{ 'labels.heading.Options' | translate }} - - - {{ 'labels.buttons.Add' | translate }} {{ 'labels.inputs.Option' | translate }} - - - - + @for (question of questionDatas.controls; track question; let questionIndex = $index; let isLast = $last) { + + + + + {{ 'labels.heading.Question' | translate }} {{ questionIndex + 1 }} + + + {{ 'labels.buttons.Delete' | translate }} {{ 'labels.heading.Question' | translate }} + + + + {{ 'labels.inputs.Key' | translate }} + + @if (question.get('key').hasError('required')) { + + {{ 'labels.inputs.Key' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Text' | translate }} + + @if (question.get('text').hasError('required')) { + + {{ 'labels.inputs.Text' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Description' | translate }} + + + + + {{ 'labels.heading.Options' | translate }} + + + {{ 'labels.buttons.Add' | translate }} {{ 'labels.inputs.Option' | translate }} + + - - - {{ 'labels.inputs.Text' | translate }} - - - {{ 'labels.inputs.Text' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Value' | translate }} - - - {{ 'labels.inputs.Value' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.inputs.Value' | translate - }}{{ 'labels.commons.must be an integer between -9999 and 9999' | translate }} - - - - - - - - + @for ( + response of getResponseDatas(questionIndex).controls; + track response; + let responseIndex = $index + ) { + + + + {{ 'labels.inputs.Text' | translate }} + + @if (response.get('text').hasError('required')) { + + {{ 'labels.inputs.Text' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Value' | translate }} + + @if (response.get('value').hasError('required')) { + + {{ 'labels.inputs.Value' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (response.get('value').hasError('pattern')) { + + {{ 'labels.inputs.Value' | translate + }}{{ + 'labels.commons.must be an integer between -9999 and 9999' | translate + }} + + } + + + + + + + + - + } + + + @if (isLast) { + + + {{ 'labels.buttons.Cancel' | translate }} + + + + {{ 'labels.buttons.Add' | translate }} {{ 'labels.heading.Question' | translate }} + + + {{ 'labels.text.Edit Survey' | translate }} + + + } - - - - - - {{ 'labels.buttons.Cancel' | translate }} - - - - {{ 'labels.buttons.Add' | translate }} {{ 'labels.heading.Question' | translate }} - - - {{ 'labels.text.Edit Survey' | translate }} - - - - + + } diff --git a/src/app/system/manage-surveys/edit-survey/edit-survey.component.ts b/src/app/system/manage-surveys/edit-survey/edit-survey.component.ts index 4b60874c54..b35e116c6c 100644 --- a/src/app/system/manage-surveys/edit-survey/edit-survey.component.ts +++ b/src/app/system/manage-surveys/edit-survey/edit-survey.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -46,9 +46,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditSurveyComponent { + private formBuilder = inject(UntypedFormBuilder); + private systemService = inject(SystemService); + private route = inject(ActivatedRoute); + private router = inject(Router); + dialog = inject(MatDialog); + /** Survey form. */ surveyForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder. * @param {SystemService} systemService System Service. @@ -56,13 +65,7 @@ export class EditSurveyComponent { * @param {Router} router Router for navigation. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private formBuilder: UntypedFormBuilder, - private systemService: SystemService, - private route: ActivatedRoute, - private router: Router, - public dialog: MatDialog - ) { + constructor() { this.createSurveyForm(); this.route.data.subscribe((data: { survey: any }) => { this.prepareSurveyForm(data.survey); diff --git a/src/app/system/manage-surveys/manage-surveys.component.html b/src/app/system/manage-surveys/manage-surveys.component.html index 88248bbd63..fd8ff11fea 100644 --- a/src/app/system/manage-surveys/manage-surveys.component.html +++ b/src/app/system/manage-surveys/manage-surveys.component.html @@ -56,22 +56,16 @@ {{ 'labels.inputs.Action' | translate }} - - {{ 'labels.buttons.Activate' | translate }} - - - {{ 'labels.buttons.Deactivate' | translate }} - + @if (!isActive(survey.validFrom, survey.validTo)) { + + {{ 'labels.buttons.Activate' | translate }} + + } + @if (isActive(survey.validFrom, survey.validTo)) { + + {{ 'labels.buttons.Deactivate' | translate }} + + } diff --git a/src/app/system/manage-surveys/manage-surveys.component.ts b/src/app/system/manage-surveys/manage-surveys.component.ts index 7da6be00ec..0711eca958 100644 --- a/src/app/system/manage-surveys/manage-surveys.component.ts +++ b/src/app/system/manage-surveys/manage-surveys.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -50,6 +50,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ManageSurveysComponent implements OnInit { + private route = inject(ActivatedRoute); + private systemService = inject(SystemService); + /* Surveys data */ surveysData: any; /* Columns to be displayed in manage surveys data table */ @@ -69,14 +72,14 @@ export class ManageSurveysComponent implements OnInit { /** Sorter for manage surveys table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the surveys data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor( - private route: ActivatedRoute, - private systemService: SystemService - ) { + constructor() { this.route.data.subscribe((data: { surveys: any }) => { this.surveysData = data.surveys; }); diff --git a/src/app/system/manage-surveys/manage-surveys.resolver.ts b/src/app/system/manage-surveys/manage-surveys.resolver.ts index 4ca08b8149..b300c2255e 100644 --- a/src/app/system/manage-surveys/manage-surveys.resolver.ts +++ b/src/app/system/manage-surveys/manage-surveys.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../system.service'; */ @Injectable() export class ManageSurveysResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Surveys data. diff --git a/src/app/system/manage-surveys/survey.resolver.ts b/src/app/system/manage-surveys/survey.resolver.ts index 4cf3733ce8..ce319f0ce0 100644 --- a/src/app/system/manage-surveys/survey.resolver.ts +++ b/src/app/system/manage-surveys/survey.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SystemService } from '../system.service'; */ @Injectable() export class SurveyResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the Survey data. diff --git a/src/app/system/manage-surveys/view-survey/view-survey.component.html b/src/app/system/manage-surveys/view-survey/view-survey.component.html index 13b2cdf40a..a5c968398b 100644 --- a/src/app/system/manage-surveys/view-survey/view-survey.component.html +++ b/src/app/system/manage-surveys/view-survey/view-survey.component.html @@ -56,53 +56,58 @@ - - - - {{ 'labels.heading.Question' | translate }}: {{ i + 1 }} - - - {{ 'labels.inputs.Key' | translate }}: + @for (questionData of surveyData.questionDatas; track questionData; let i = $index) { + + + + {{ 'labels.heading.Question' | translate }}: {{ i + 1 }} + + + {{ 'labels.inputs.Key' | translate }}: + + + {{ questionData.key }} + + + {{ 'labels.inputs.Text' | translate }}: + + + {{ questionData.text }} + - - - {{ questionData.key }} - - - {{ 'labels.inputs.Text' | translate }}: + + + {{ 'labels.inputs.Description' | translate }}: + + + {{ questionData.description }} + - - - {{ questionData.text }} + + + {{ 'labels.inputs.Option' | translate }}: + + + + @for (column of displayedColumns; track column) { + {{ column | titlecase }} + } + + @for (row of questionData.responseDatas; track row) { + + @for (column of displayedColumns; track column) { + + {{ row[column] }} + + } + + } + - - - - {{ 'labels.inputs.Description' | translate }}: - - - - {{ questionData.description }} - - - - - {{ 'labels.inputs.Option' | translate }}: - - - - {{ column | titlecase }} - - - - {{ row[column] }} - - - - - - - + + + + } diff --git a/src/app/system/manage-surveys/view-survey/view-survey.component.ts b/src/app/system/manage-surveys/view-survey/view-survey.component.ts index 0c744ff487..f0d4164acc 100644 --- a/src/app/system/manage-surveys/view-survey/view-survey.component.ts +++ b/src/app/system/manage-surveys/view-survey/view-survey.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -8,7 +8,7 @@ import { SystemService } from 'app/system/system.service'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatCard, MatCardHeader, MatCardTitle, MatCardContent } from '@angular/material/card'; import { MatDivider } from '@angular/material/divider'; -import { NgFor, TitleCasePipe } from '@angular/common'; +import { TitleCasePipe } from '@angular/common'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; /** @@ -28,6 +28,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewSurveyComponent { + private route = inject(ActivatedRoute); + private systemService = inject(SystemService); + private dialog = inject(MatDialog); + private router = inject(Router); + /** Survey Data */ surveyData: any; @@ -37,6 +42,9 @@ export class ViewSurveyComponent { 'value' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the survey data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -44,12 +52,7 @@ export class ViewSurveyComponent { * @param {MatDialog} dialog Dialog Reference. * @param {Router} router Router for navigation. */ - constructor( - private route: ActivatedRoute, - private systemService: SystemService, - private dialog: MatDialog, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { survey: any }) => { this.surveyData = data.survey; }); diff --git a/src/app/system/roles-and-permissions/add-role/add-role.component.html b/src/app/system/roles-and-permissions/add-role/add-role.component.html index 0a24fd21b2..ca7978e58c 100644 --- a/src/app/system/roles-and-permissions/add-role/add-role.component.html +++ b/src/app/system/roles-and-permissions/add-role/add-role.component.html @@ -6,19 +6,23 @@ {{ 'labels.inputs.Name' | translate }} - - {{ 'labels.inputs.Role Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (roleForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.Role Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Description' | translate }} - - {{ 'labels.inputs.Role Description' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (roleForm.controls.description.hasError('required')) { + + {{ 'labels.inputs.Role Description' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/system/roles-and-permissions/add-role/add-role.component.ts b/src/app/system/roles-and-permissions/add-role/add-role.component.ts index c29c055f03..1453431f28 100644 --- a/src/app/system/roles-and-permissions/add-role/add-role.component.ts +++ b/src/app/system/roles-and-permissions/add-role/add-role.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterLink } from '@angular/router'; @@ -23,8 +23,17 @@ import { AuthService } from 'app/zitadel/auth.service'; ] }) export class AddRoleComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private systemService = inject(SystemService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private authService = inject(AuthService); + /** Role form. */ roleForm: UntypedFormGroup; + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); /** Add role zitadel */ /** @@ -33,13 +42,7 @@ export class AddRoleComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private systemService: SystemService, - private route: ActivatedRoute, - private router: Router, - private authService: AuthService - ) {} + constructor() {} /** * Creates the role form. diff --git a/src/app/system/roles-and-permissions/edit-role/edit-role.component.html b/src/app/system/roles-and-permissions/edit-role/edit-role.component.html index 0be390e262..06c57bfa41 100644 --- a/src/app/system/roles-and-permissions/edit-role/edit-role.component.html +++ b/src/app/system/roles-and-permissions/edit-role/edit-role.component.html @@ -11,10 +11,12 @@ {{ 'labels.inputs.Role Description' | translate }} - - {{ 'labels.inputs.Description' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (roleForm.controls.description.hasError('required')) { + + {{ 'labels.inputs.Description' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/system/roles-and-permissions/edit-role/edit-role.component.ts b/src/app/system/roles-and-permissions/edit-role/edit-role.component.ts index 609dccf847..71e7339f31 100644 --- a/src/app/system/roles-and-permissions/edit-role/edit-role.component.ts +++ b/src/app/system/roles-and-permissions/edit-role/edit-role.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -23,11 +23,20 @@ import { AuthService } from 'app/zitadel/auth.service'; ] }) export class EditRoleComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private systemService = inject(SystemService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private authService = inject(AuthService); + /** Role Form */ roleForm: UntypedFormGroup; /** Role Data */ roleData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the code data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -35,13 +44,7 @@ export class EditRoleComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private systemService: SystemService, - private route: ActivatedRoute, - private router: Router, - private authService: AuthService - ) { + constructor() { this.route.data.subscribe((data: { role: any }) => { this.roleData = data.role; }); diff --git a/src/app/system/roles-and-permissions/roles-and-permissions.component.html b/src/app/system/roles-and-permissions/roles-and-permissions.component.html index 29095166ed..b3f90870c6 100644 --- a/src/app/system/roles-and-permissions/roles-and-permissions.component.html +++ b/src/app/system/roles-and-permissions/roles-and-permissions.component.html @@ -46,15 +46,11 @@ {{ 'labels.inputs.Actions' | translate }} - - {{ 'labels.buttons.Edit' | translate }} - + @if (role.name !== 'Super user') { + + {{ 'labels.buttons.Edit' | translate }} + + } diff --git a/src/app/system/roles-and-permissions/roles-and-permissions.component.ts b/src/app/system/roles-and-permissions/roles-and-permissions.component.ts index ee5d792adc..bc884f2478 100644 --- a/src/app/system/roles-and-permissions/roles-and-permissions.component.ts +++ b/src/app/system/roles-and-permissions/roles-and-permissions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -56,6 +56,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RolesAndPermissionsComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Role data. */ roleData: any; /** Columns to be displayed in roles and permissions table. */ @@ -81,6 +86,9 @@ export class RolesAndPermissionsComponent implements OnInit, AfterViewInit { @ViewChild('tableRolesandPermissions') tableRolesandPermissions: ElementRef; /* Template for roles and permission table */ @ViewChild('templateTableRolesandPermissions') templateTableRolesandPermissions: TemplateRef; + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); /** * Retrieves the roles data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -88,12 +96,7 @@ export class RolesAndPermissionsComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { roles: any }) => { this.roleData = data.roles; }); diff --git a/src/app/system/roles-and-permissions/roles-and-permissions.resolver.ts b/src/app/system/roles-and-permissions/roles-and-permissions.resolver.ts index 3798e75c9f..f80fced9b8 100644 --- a/src/app/system/roles-and-permissions/roles-and-permissions.resolver.ts +++ b/src/app/system/roles-and-permissions/roles-and-permissions.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { SystemService } from '../system.service'; */ @Injectable() export class RolesAndPermissionsResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the roles and permissions data. diff --git a/src/app/system/roles-and-permissions/view-role/view-role.component.html b/src/app/system/roles-and-permissions/view-role/view-role.component.html index 8f055d48dc..b4c77f1134 100644 --- a/src/app/system/roles-and-permissions/view-role/view-role.component.html +++ b/src/app/system/roles-and-permissions/view-role/view-role.component.html @@ -9,27 +9,29 @@ {{ 'labels.text.Edit Role' | translate }} - - - {{ 'labels.buttons.Disable' | translate }} {{ 'labels.inputs.Role' | translate }} - + @if (!isRoleEnable(rolePermissionService.disabled)) { + + + {{ 'labels.buttons.Disable' | translate }} {{ 'labels.inputs.Role' | translate }} + + } - - - {{ 'labels.buttons.Enable' | translate }} {{ 'labels.inputs.Role' | translate }} - + @if (isRoleEnable(rolePermissionService.disabled)) { + + + {{ 'labels.buttons.Enable' | translate }} {{ 'labels.inputs.Role' | translate }} + + } - - - {{ 'labels.buttons.Select All' | translate }} - - - {{ 'labels.buttons.Deselect All' | translate }} - - + @if (!isDisabled) { + + + {{ 'labels.buttons.Select All' | translate }} + + + {{ 'labels.buttons.Deselect All' | translate }} + + + } - - - {{ formatName(grouping) }} - - + @for (grouping of groupings; track grouping) { + + + {{ formatName(grouping) }} + + + } @@ -105,27 +110,33 @@ - - - - - {{ permissionName(permission.code) }} - + @for (permission of permissions.permissions; track permission) { + + + + + {{ permissionName(permission.code) }} + + - + } - - - - {{ 'labels.buttons.Cancel' | translate }} - - {{ 'labels.buttons.Submit' | translate }} - - + @if (!isDisabled) { + + + + {{ 'labels.buttons.Cancel' | translate }} + + + {{ 'labels.buttons.Submit' | translate }} + + + + } diff --git a/src/app/system/roles-and-permissions/view-role/view-role.component.ts b/src/app/system/roles-and-permissions/view-role/view-role.component.ts index de66bac4f1..8f27a5441d 100644 --- a/src/app/system/roles-and-permissions/view-role/view-role.component.ts +++ b/src/app/system/roles-and-permissions/view-role/view-role.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, FormArray, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router } from '@angular/router'; @@ -12,7 +12,7 @@ import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dial import { DisableDialogComponent } from '../../../shared/disable-dialog/disable-dialog.component'; import { EnableDialogComponent } from '../../../shared/enable-dialog/enable-dialog.component'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; -import { NgIf, NgFor, NgClass } from '@angular/common'; +import { NgClass } from '@angular/common'; import { MatList, MatListItem } from '@angular/material/list'; import { MatDivider } from '@angular/material/divider'; import { MatCheckbox } from '@angular/material/checkbox'; @@ -40,6 +40,14 @@ import { AuthService } from 'app/zitadel/auth.service'; ] }) export class ViewRoleComponent implements OnInit { + private route = inject(ActivatedRoute); + private systemService = inject(SystemService); + private router = inject(Router); + private formBuilder = inject(UntypedFormBuilder); + private translateService = inject(TranslateService); + dialog = inject(MatDialog); + private authService = inject(AuthService); + /** Role Permissions Data */ rolePermissionService: any; /** Stores the current grouping */ @@ -72,6 +80,9 @@ export class ViewRoleComponent implements OnInit { permissions: { permissions: { code: string; id: number }[]; } = { permissions: [] }; + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); /** Add role zitadel */ /** @@ -83,15 +94,7 @@ export class ViewRoleComponent implements OnInit { * @param {MatDialog} dialog Shared Dialog Boxes. * @param {TranslateService} translateService Translate Service. */ - constructor( - private route: ActivatedRoute, - private systemService: SystemService, - private router: Router, - private formBuilder: UntypedFormBuilder, - private translateService: TranslateService, - public dialog: MatDialog, - private authService: AuthService - ) { + constructor() { this.route.data.subscribe((data: { roledetails: any }) => { this.rolePermissionService = data.roledetails; }); diff --git a/src/app/system/roles-and-permissions/view-role/view-role.resolver.ts b/src/app/system/roles-and-permissions/view-role/view-role.resolver.ts index 36dea86e83..6aedc24f1c 100644 --- a/src/app/system/roles-and-permissions/view-role/view-role.resolver.ts +++ b/src/app/system/roles-and-permissions/view-role/view-role.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SystemService } from '../../system.service'; */ @Injectable() export class ViewRoleResolver { + private systemService = inject(SystemService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SystemService} systemService System service. */ - constructor(private systemService: SystemService) {} + constructor() {} /** * Returns the roles and permissions data. diff --git a/src/app/system/system.component.html b/src/app/system/system.component.html index a41aa9dd91..36a719e120 100644 --- a/src/app/system/system.component.html +++ b/src/app/system/system.component.html @@ -12,24 +12,28 @@ {{ 'labels.heading.Manage Data tables' | translate }} - - {{ 'labels.text.Add new extra fields to any entity' | translate }} - + @if (arrowBooleans[0]) { + + {{ 'labels.text.Add new extra fields to any entity' | translate }} + + } - - + @if (!arrowBooleans[0]) { + + } + @if (arrowBooleans[0]) { + + } @@ -44,24 +48,28 @@ {{ 'labels.heading.Manage Codes' | translate }} - - {{ 'labels.text.Codes are used to define drop down values' | translate }} - + @if (arrowBooleans[1]) { + + {{ 'labels.text.Codes are used to define drop down values' | translate }} + + } - - + @if (!arrowBooleans[1]) { + + } + @if (arrowBooleans[1]) { + + } @@ -76,29 +84,28 @@ {{ 'labels.heading.Manage Roles and Permissions' | translate }} - - {{ 'labels.text.Define or modify roles and associated permissions' | translate }} - + @if (arrowBooleans[2]) { + + {{ 'labels.text.Define or modify roles and associated permissions' | translate }} + + } - - + @if (!arrowBooleans[2]) { + + } + @if (arrowBooleans[2]) { + + } @@ -113,24 +120,28 @@ {{ 'labels.heading.Configure Maker Checker Tasks' | translate }} - - {{ 'labels.text.Define or modify Maker Checker tasks' | translate }} - + @if (arrowBooleans[3]) { + + {{ 'labels.text.Define or modify Maker Checker tasks' | translate }} + + } - - + @if (!arrowBooleans[3]) { + + } + @if (arrowBooleans[3]) { + + } @@ -144,24 +155,28 @@ {{ 'labels.heading.Manage Hooks' | translate }} - - {{ 'labels.text.Define Hooks' | translate }} - + @if (arrowBooleans[4]) { + + {{ 'labels.text.Define Hooks' | translate }} + + } - - + @if (!arrowBooleans[4]) { + + } + @if (arrowBooleans[4]) { + + } @@ -174,29 +189,28 @@ {{ 'labels.heading.Entity to Entity Mapping' | translate }} - - {{ 'labels.text.Define or modify entity to entity mappings' | translate }} - + @if (arrowBooleans[5]) { + + {{ 'labels.text.Define or modify entity to entity mappings' | translate }} + + } - - + @if (!arrowBooleans[5]) { + + } + @if (arrowBooleans[5]) { + + } @@ -209,24 +223,28 @@ {{ 'labels.heading.Manage Surveys' | translate }} - - {{ 'labels.text.Manage Surveys' | translate }} - + @if (arrowBooleans[6]) { + + {{ 'labels.text.Manage Surveys' | translate }} + + } - - + @if (!arrowBooleans[6]) { + + } + @if (arrowBooleans[6]) { + + } @@ -239,24 +257,28 @@ {{ 'labels.heading.Manage External Events' | translate }} - - {{ 'labels.text.External Events configuration, to enable or disable' | translate }} - + @if (arrowBooleans[7]) { + + {{ 'labels.text.External Events configuration, to enable or disable' | translate }} + + } - - + @if (!arrowBooleans[7]) { + + } + @if (arrowBooleans[7]) { + + } @@ -273,24 +295,28 @@ {{ 'labels.heading.Audit Trails' | translate }} - - {{ 'labels.text.Audit logs of all the activities' | translate }} - + @if (arrowBooleans[8]) { + + {{ 'labels.text.Audit logs of all the activities' | translate }} + + } - - + @if (!arrowBooleans[8]) { + + } + @if (arrowBooleans[8]) { + + } @@ -304,24 +330,28 @@ {{ 'labels.heading.Manage Reports' | translate }} - - {{ 'labels.text.Add new report and classify reports' | translate }} - + @if (arrowBooleans[9]) { + + {{ 'labels.text.Add new report and classify reports' | translate }} + + } - - + @if (!arrowBooleans[9]) { + + } + @if (arrowBooleans[9]) { + + } @@ -335,24 +365,28 @@ {{ 'labels.heading.Manage Jobs' | translate }} - - {{ 'labels.text.Manage Schedule and Workflow jobs, modify jobs' | translate }} - + @if (arrowBooleans[10]) { + + {{ 'labels.text.Manage Schedule and Workflow jobs, modify jobs' | translate }} + + } - - + @if (!arrowBooleans[10]) { + + } + @if (arrowBooleans[10]) { + + } @@ -365,24 +399,28 @@ {{ 'labels.heading.Configurations' | translate }} - - {{ 'labels.text.Global configurations, Cache and Business Date' | translate }} - + @if (arrowBooleans[11]) { + + {{ 'labels.text.Global configurations, Cache and Business Date' | translate }} + + } - - + @if (!arrowBooleans[11]) { + + } + @if (arrowBooleans[11]) { + + } @@ -395,29 +433,28 @@ {{ 'labels.heading.Account Number Preferences' | translate }} - - {{ 'labels.text.Preferences for generating account numbers for client' | translate }} - + @if (arrowBooleans[12]) { + + {{ 'labels.text.Preferences for generating account numbers for client' | translate }} + + } - - + @if (!arrowBooleans[12]) { + + } + @if (arrowBooleans[12]) { + + } @@ -430,24 +467,28 @@ {{ 'labels.heading.External Services' | translate }} - - {{ 'labels.text.External Services Configuration' | translate }} - + @if (arrowBooleans[13]) { + + {{ 'labels.text.External Services Configuration' | translate }} + + } - - + @if (!arrowBooleans[13]) { + + } + @if (arrowBooleans[13]) { + + } @@ -460,24 +501,28 @@ {{ 'labels.heading.Two-Factor Authentication' | translate }} - - {{ 'labels.text.Two-factor authentication configuration' | translate }} - + @if (arrowBooleans[14]) { + + {{ 'labels.text.Two-factor authentication configuration' | translate }} + + } - - + @if (!arrowBooleans[14]) { + + } + @if (arrowBooleans[14]) { + + } diff --git a/src/app/system/system.component.ts b/src/app/system/system.component.ts index 84dd99c3bd..62a77f92e6 100644 --- a/src/app/system/system.component.ts +++ b/src/app/system/system.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { AfterViewInit, Component, ElementRef, TemplateRef, ViewChild } from '@angular/core'; +import { AfterViewInit, Component, ElementRef, TemplateRef, ViewChild, inject } from '@angular/core'; import { Router, RouterLink } from '@angular/router'; /** Custom Services */ @@ -9,7 +9,7 @@ import { MatNavList, MatListItem } from '@angular/material/list'; import { MatIcon } from '@angular/material/icon'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatLine } from '@angular/material/grid-list'; -import { NgIf, NgClass } from '@angular/common'; +import { NgClass } from '@angular/common'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @Component({ @@ -27,6 +27,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SystemComponent implements AfterViewInit { + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /* Reference of manage datatables */ @ViewChild('datatables') datatables: ElementRef; /* Template for popover on manage datables */ @@ -59,16 +63,15 @@ export class SystemComponent implements AfterViewInit { isDisabled: boolean = true; arrowBooleans: boolean[] = new Array(15).fill(false); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {Router} router Router. * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) {} + constructor() {} /** * Popover function diff --git a/src/app/system/system.service.ts b/src/app/system/system.service.ts index 2e62da2727..06fe552e88 100644 --- a/src/app/system/system.service.ts +++ b/src/app/system/system.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -13,14 +13,19 @@ import { RunJobWithParamPayloadType } from './manage-jobs/scheduler-jobs/custom- providedIn: 'root' }) export class SystemService { + private http = inject(HttpClient); + public static CONFIG_ASSET_EXTERNALIZATION = 'asset-externalization-of-non-active-loans'; emptyPayload: any = {}; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. */ - constructor(private http: HttpClient) {} + constructor() {} /** * @returns {Observable} Data tables. diff --git a/src/app/system/version.service.ts b/src/app/system/version.service.ts index 8e3ecc02e6..3cb5491676 100644 --- a/src/app/system/version.service.ts +++ b/src/app/system/version.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient } from '@angular/common/http'; /** rxjs Imports */ @@ -9,7 +9,12 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class VersionService { - constructor(private http: HttpClient) {} + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} getBackendInfo(): Observable { return this.http.get('/fineract-provider/actuator/info'); diff --git a/src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.html b/src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.html index c130951bac..0695d12a55 100644 --- a/src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.html +++ b/src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.html @@ -1,151 +1,153 @@ - - - - - - - - - - {{ 'labels.buttons.Approve' | translate }} - - - {{ 'labels.buttons.Delete' | translate }} - - - {{ 'labels.buttons.Reject' | translate }} - +@if (checkerData) { + + + + + + + + + + {{ 'labels.buttons.Approve' | translate }} + + + {{ 'labels.buttons.Delete' | translate }} + + + {{ 'labels.buttons.Reject' | translate }} + + + + + + {{ 'labels.inputs.From Date' | translate }} + + + + + + {{ 'labels.inputs.To Date' | translate }} + + + + + + {{ 'labels.inputs.Action' | translate }} + + @for (action of makerCheckerTemplate.actionNames; track action) { + + {{ action }} + + } + + + + {{ 'labels.inputs.Entity' | translate }} + + @for (entity of makerCheckerTemplate.entityNames; track entity) { + + {{ entity }} + + } + + + + {{ 'labels.inputs.Resource ID' | translate }} + + + + {{ 'labels.buttons.Search' | translate }} + + + + @if (!noSearchedData) { + + + + + + + + + + + + + {{ 'labels.inputs.ID' | translate }} + {{ makerChecker.id }} + + + {{ 'labels.inputs.Made on Date' | translate }} + {{ makerChecker.madeOnDate | dateFormat }} + + + {{ 'labels.inputs.Status' | translate }} + {{ makerChecker.processingResult }} + + + {{ 'labels.inputs.User' | translate }} + {{ makerChecker.maker }} + + + {{ 'labels.inputs.Action' | translate }} + {{ makerChecker.actionName }} + + + {{ 'labels.inputs.Entity' | translate }} + {{ makerChecker.entityName }} + + + + + } + @if (noSearchedData) { + + + + {{ 'labels.text.No checker inbox data available for this search' | translate }} + + + } +} - - - - {{ 'labels.inputs.From Date' | translate }} - - - - - - - {{ 'labels.inputs.To Date' | translate }} - - - - - - - {{ 'labels.inputs.Action' | translate }} - - - {{ action }} - - - - - - {{ 'labels.inputs.Entity' | translate }} - - - {{ entity }} - - - - - - {{ 'labels.inputs.Resource ID' | translate }} - - - - - {{ 'labels.buttons.Search' | translate }} - - - - - - - - - - - - - - - - - - {{ 'labels.inputs.ID' | translate }} - {{ makerChecker.id }} - - - - {{ 'labels.inputs.Made on Date' | translate }} - {{ makerChecker.madeOnDate | dateFormat }} - - - - {{ 'labels.inputs.Status' | translate }} - {{ makerChecker.processingResult }} - - - - {{ 'labels.inputs.User' | translate }} - {{ makerChecker.maker }} - - - - {{ 'labels.inputs.Action' | translate }} - {{ makerChecker.actionName }} - - - - {{ 'labels.inputs.Entity' | translate }} - {{ makerChecker.entityName }} - - - - - - - +@if (!checkerData) { + - {{ 'labels.text.No checker inbox data available for this search' | translate }} + {{ 'labels.text.No checker inbox data available for this account' | translate }} - - - - - - {{ 'labels.text.No checker inbox data available for this account' | translate }} - - +} diff --git a/src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.ts b/src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.ts index 4bfd52dc6f..f9bf871134 100644 --- a/src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.ts +++ b/src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { SelectionModel } from '@angular/cdk/collections'; import { UntypedFormBuilder, UntypedFormGroup, ReactiveFormsModule } from '@angular/forms'; @@ -53,6 +53,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CheckerInboxComponent implements OnInit { + private route = inject(ActivatedRoute); + private dialog = inject(MatDialog); + private dateUtils = inject(Dates); + private router = inject(Router); + private translateService = inject(TranslateService); + private tasksService = inject(TasksService); + private settingsService = inject(SettingsService); + private formBuilder = inject(UntypedFormBuilder); + /** Data to be displayed */ searchData: any; /** Maker Checker Template */ @@ -82,6 +91,9 @@ export class CheckerInboxComponent implements OnInit { 'entity' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the maker checker data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -92,16 +104,7 @@ export class CheckerInboxComponent implements OnInit { * @param {TasksService} tasksService Tasks Service. * @param {FormBuilder} formBuilder Form Builder. */ - constructor( - private route: ActivatedRoute, - private dialog: MatDialog, - private dateUtils: Dates, - private router: Router, - private translateService: TranslateService, - private tasksService: TasksService, - private settingsService: SettingsService, - private formBuilder: UntypedFormBuilder - ) { + constructor() { this.route.data.subscribe((data: { makerCheckerResource: any; makerCheckerTemplate: any }) => { this.searchData = data.makerCheckerResource; if (this.searchData.length > 0) { diff --git a/src/app/tasks/checker-inbox-and-tasks-tabs/client-approval/client-approval.component.html b/src/app/tasks/checker-inbox-and-tasks-tabs/client-approval/client-approval.component.html index 10918a6f58..9eea26cc37 100644 --- a/src/app/tasks/checker-inbox-and-tasks-tabs/client-approval/client-approval.component.html +++ b/src/app/tasks/checker-inbox-and-tasks-tabs/client-approval/client-approval.component.html @@ -1,78 +1,76 @@ - - - - - - - - - - {{ 'labels.buttons.Approve' | translate }} - +@if (showData) { + + + + + + + + + + {{ 'labels.buttons.Approve' | translate }} + + + @for (client of groupedClients | keyvalue; track client) { + {{ client.key }} + @if (client.value.length > 0) { + + + + + + + + + + + + + {{ 'labels.inputs.name' | translate }} + + {{ element.displayName }} + + + + {{ 'labels.inputs.Account Number' | translate }} + + {{ element.accountNo }} + + + + {{ 'labels.inputs.Staff' | translate }} + + {{ element.staffName }} + + + + + + } + } +} - - {{ client.key }} - - 0"> - - - - - - - - - - - - - - {{ 'labels.inputs.name' | translate }} - - {{ element.displayName }} - - - - - {{ 'labels.inputs.Account Number' | translate }} - - {{ element.accountNo }} - - - - - {{ 'labels.inputs.Staff' | translate }} - - {{ element.staffName }} - - - - - - - - - - - - - - {{ 'labels.text.No pending loans for approval' | translate }} +@if (!showData) { + + + + {{ 'labels.text.No pending loans for approval' | translate }} + - +} diff --git a/src/app/tasks/checker-inbox-and-tasks-tabs/client-approval/client-approval.component.ts b/src/app/tasks/checker-inbox-and-tasks-tabs/client-approval/client-approval.component.ts index f0fd0cb0e9..f1b006f878 100644 --- a/src/app/tasks/checker-inbox-and-tasks-tabs/client-approval/client-approval.component.ts +++ b/src/app/tasks/checker-inbox-and-tasks-tabs/client-approval/client-approval.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { SelectionModel } from '@angular/cdk/collections'; import * as _ from 'lodash'; @@ -27,7 +27,7 @@ import { DatepickerBase } from 'app/shared/form-dialog/formfield/model/datepicke import { TasksService } from '../../tasks.service'; import { SettingsService } from 'app/settings/settings.service'; import { Dates } from 'app/core/utils/dates'; -import { NgIf, NgFor, KeyValuePipe } from '@angular/common'; +import { KeyValuePipe } from '@angular/common'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatCheckbox } from '@angular/material/checkbox'; import { AccountsFilterPipe } from '../../../pipes/accounts-filter.pipe'; @@ -56,6 +56,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ClientApprovalComponent { + private route = inject(ActivatedRoute); + private dialog = inject(MatDialog); + private dateUtils = inject(Dates); + private router = inject(Router); + private settingsService = inject(SettingsService); + private tasksService = inject(TasksService); + /** Grouped Clients Data */ groupedClients: any; /** Checks to show the data */ @@ -74,6 +81,9 @@ export class ClientApprovalComponent { 'staff' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the grouped client data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -83,14 +93,7 @@ export class ClientApprovalComponent { * @param {SettingsService} settingsService Settings Service. * @param {TasksService} tasksService Tasks Service. */ - constructor( - private route: ActivatedRoute, - private dialog: MatDialog, - private dateUtils: Dates, - private router: Router, - private settingsService: SettingsService, - private tasksService: TasksService - ) { + constructor() { this.route.data.subscribe((data: { groupedClientData: any }) => { this.groupedClients = _.groupBy(data.groupedClientData.pageItems, 'officeName'); if (Object.keys(this.groupedClients).length) { diff --git a/src/app/tasks/checker-inbox-and-tasks-tabs/loan-approval/loan-approval.component.html b/src/app/tasks/checker-inbox-and-tasks-tabs/loan-approval/loan-approval.component.html index 7c1b5edde0..a9d335a18e 100644 --- a/src/app/tasks/checker-inbox-and-tasks-tabs/loan-approval/loan-approval.component.html +++ b/src/app/tasks/checker-inbox-and-tasks-tabs/loan-approval/loan-approval.component.html @@ -1,91 +1,88 @@ - - - - - - +@if (showData) { + + + + + + + + + + {{ 'labels.buttons.Approve' | translate }} + + - - - {{ 'labels.buttons.Approve' | translate }} - - - - - - {{ office.name }} - - 0"> - - - - {{ office.name }} + @if (office.loans.length > 0) { + + + + + + + + + + + + + {{ 'labels.inputs.Client' | translate }} + - - - - + + + {{ 'labels.inputs.Loan' | translate }} + - - - - - - {{ 'labels.inputs.Client' | translate }} - - {{ loan.clientName }} - - - - - {{ 'labels.inputs.Loan' | translate }} - - {{ loan.loanProductName }}({{ loan.accountNo }}) - - - - - {{ 'labels.inputs.Amount' | translate }} - {{ loan.principal | formatNumber }} - - - - {{ 'labels.inputs.Loan Purpose' | translate }} - {{ loan.loanPurposeName }} - - - - - - - - + {{ loan.loanProductName }}({{ loan.accountNo }}) + + + + {{ 'labels.inputs.Amount' | translate }} + {{ loan.principal | formatNumber }} + + + {{ 'labels.inputs.Loan Purpose' | translate }} + {{ loan.loanPurposeName }} + + + + + } + } + +} - - - - {{ 'labels.text.No pending loans for approval' | translate }} +@if (!showData) { + + + + {{ 'labels.text.No pending loans for approval' | translate }} + - +} diff --git a/src/app/tasks/checker-inbox-and-tasks-tabs/loan-approval/loan-approval.component.ts b/src/app/tasks/checker-inbox-and-tasks-tabs/loan-approval/loan-approval.component.ts index 4a129c9e79..c4f6ca2d83 100644 --- a/src/app/tasks/checker-inbox-and-tasks-tabs/loan-approval/loan-approval.component.ts +++ b/src/app/tasks/checker-inbox-and-tasks-tabs/loan-approval/loan-approval.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { SelectionModel } from '@angular/cdk/collections'; import * as _ from 'lodash'; @@ -59,6 +59,14 @@ interface OfficeNode { ] }) export class LoanApprovalComponent { + private route = inject(ActivatedRoute); + private dialog = inject(MatDialog); + private dateUtils = inject(Dates); + private router = inject(Router); + private translateService = inject(TranslateService); + private settingsService = inject(SettingsService); + private tasksService = inject(TasksService); + /** Offices Data */ offices: any; /** Loans Data */ @@ -84,6 +92,9 @@ export class LoanApprovalComponent { 'loanPurpose' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices and loans data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -93,15 +104,7 @@ export class LoanApprovalComponent { * @param {SettingsService} settingsService Settings Service. * @param {TasksService} tasksService Tasks Service. */ - constructor( - private route: ActivatedRoute, - private dialog: MatDialog, - private dateUtils: Dates, - private router: Router, - private translateService: TranslateService, - private settingsService: SettingsService, - private tasksService: TasksService - ) { + constructor() { this.route.data.subscribe((data: { officesData: any; loansData: any }) => { this.offices = data.officesData; this.loans = data.loansData.pageItems; diff --git a/src/app/tasks/checker-inbox-and-tasks-tabs/loan-disbursal/loan-disbursal.component.html b/src/app/tasks/checker-inbox-and-tasks-tabs/loan-disbursal/loan-disbursal.component.html index 4e0e86d524..75e1b7f9cc 100644 --- a/src/app/tasks/checker-inbox-and-tasks-tabs/loan-disbursal/loan-disbursal.component.html +++ b/src/app/tasks/checker-inbox-and-tasks-tabs/loan-disbursal/loan-disbursal.component.html @@ -1,92 +1,90 @@ - 0"> - - - - - +@if (loans && loans.length > 0) { + + + + + + + + + + {{ 'labels.menus.Disburse' | translate }} + + - - - {{ 'labels.menus.Disburse' | translate }} - - - - - - - - + + + + + + + + + + + + {{ 'labels.inputs.Client Name' | translate }} + - - - - + + + {{ 'labels.inputs.Loan Account' | translate }}# + - - - - - - {{ 'labels.inputs.Client Name' | translate }} - - {{ loan.clientName }} - - - - - {{ 'labels.inputs.Loan Account' | translate }}# - - {{ loan.accountNo }} - - - - - {{ 'labels.inputs.Loan Product' | translate }} - - {{ loan.loanProductName }} - - - - - {{ 'labels.inputs.Principal' | translate }} - {{ loan.principal | formatNumber }} - - - - - - + {{ loan.accountNo }} + + + + {{ 'labels.inputs.Loan Product' | translate }} + + {{ loan.loanProductName }} + + + + {{ 'labels.inputs.Principal' | translate }} + {{ loan.principal | formatNumber }} + + + + + +} - - - - {{ 'labels.text.No pending loan available for disbursal' | translate }} +@if (loans.length === 0) { + + + + {{ 'labels.text.No pending loan available for disbursal' | translate }} + - +} diff --git a/src/app/tasks/checker-inbox-and-tasks-tabs/loan-disbursal/loan-disbursal.component.ts b/src/app/tasks/checker-inbox-and-tasks-tabs/loan-disbursal/loan-disbursal.component.ts index ff3b5742a4..28c84e5862 100644 --- a/src/app/tasks/checker-inbox-and-tasks-tabs/loan-disbursal/loan-disbursal.component.ts +++ b/src/app/tasks/checker-inbox-and-tasks-tabs/loan-disbursal/loan-disbursal.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { SelectionModel } from '@angular/cdk/collections'; import { @@ -52,6 +52,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LoanDisbursalComponent { + private route = inject(ActivatedRoute); + private dialog = inject(MatDialog); + private dateUtils = inject(Dates); + private settingsService = inject(SettingsService); + private translateService = inject(TranslateService); + private tasksService = inject(TasksService); + /** Loans Data */ loans: any; /** Batch Requests */ @@ -69,6 +76,9 @@ export class LoanDisbursalComponent { 'principal' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the loans data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -78,14 +88,7 @@ export class LoanDisbursalComponent { * @param {SettingsService} settingsService Settings Service. * @param {TasksService} tasksService Tasks Service. */ - constructor( - private route: ActivatedRoute, - private dialog: MatDialog, - private dateUtils: Dates, - private settingsService: SettingsService, - private translateService: TranslateService, - private tasksService: TasksService - ) { + constructor() { this.route.data.subscribe((data: { loansData: any }) => { this.loans = data.loansData.pageItems; this.loans = this.loans.filter((account: any) => { diff --git a/src/app/tasks/checker-inbox-and-tasks-tabs/reschedule-loan/reschedule-loan.component.html b/src/app/tasks/checker-inbox-and-tasks-tabs/reschedule-loan/reschedule-loan.component.html index 112d71d1f3..6d76df9927 100644 --- a/src/app/tasks/checker-inbox-and-tasks-tabs/reschedule-loan/reschedule-loan.component.html +++ b/src/app/tasks/checker-inbox-and-tasks-tabs/reschedule-loan/reschedule-loan.component.html @@ -1,103 +1,100 @@ - 0"> - - - - - - - - - {{ 'labels.buttons.Approve' | translate }} - - - {{ 'labels.buttons.Reject' | translate }} - +@if (loans && loans.length > 0) { + + + + + + + + + + {{ 'labels.buttons.Approve' | translate }} + + + {{ 'labels.buttons.Reject' | translate }} + + - - - - - - + + + + + + + + + + + + {{ 'labels.inputs.Client' | translate }} + - - - - + + + {{ 'labels.inputs.Reschedule Request' | translate }}# + {{ loan.id }} + + + {{ 'labels.inputs.Loan Account' | translate }}# + - - - - - - {{ 'labels.inputs.Client' | translate }} - - {{ loan.clientName }} - - - - - {{ 'labels.inputs.Reschedule Request' | translate }}# - {{ loan.id }} - - - - {{ 'labels.inputs.Loan Account' | translate }}# - - {{ loan.loanAccountNumber }} - - - - - {{ 'labels.inputs.Reschedule Form' | translate }} - {{ loan.rescheduleFromDate | dateFormat }} - - - - {{ 'labels.inputs.Reschedule Reason' | translate }} - {{ loan.rescheduleReasonCodeValue.name }} - - - - - - + {{ loan.loanAccountNumber }} + + + + {{ 'labels.inputs.Reschedule Form' | translate }} + {{ loan.rescheduleFromDate | dateFormat }} + + + {{ 'labels.inputs.Reschedule Reason' | translate }} + {{ loan.rescheduleReasonCodeValue.name }} + + + + + +} - - - - {{ 'labels.text.No pending rescheduled loan available for this account' | translate }} +@if (loans.length === 0) { + + + + {{ 'labels.text.No pending rescheduled loan available for this account' | translate }} + - +} diff --git a/src/app/tasks/checker-inbox-and-tasks-tabs/reschedule-loan/reschedule-loan.component.ts b/src/app/tasks/checker-inbox-and-tasks-tabs/reschedule-loan/reschedule-loan.component.ts index e9d10f298e..6f4214f49d 100644 --- a/src/app/tasks/checker-inbox-and-tasks-tabs/reschedule-loan/reschedule-loan.component.ts +++ b/src/app/tasks/checker-inbox-and-tasks-tabs/reschedule-loan/reschedule-loan.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { SelectionModel } from '@angular/cdk/collections'; import * as _ from 'lodash'; @@ -60,6 +60,14 @@ interface RescheduleFormData { ] }) export class RescheduleLoanComponent { + private route = inject(ActivatedRoute); + private dialog = inject(MatDialog); + private dateUtils = inject(Dates); + private router = inject(Router); + private settingsService = inject(SettingsService); + private translateService = inject(TranslateService); + private tasksService = inject(TasksService); + /** Loans Data */ loans: any; /** Datasource */ @@ -78,6 +86,9 @@ export class RescheduleLoanComponent { 'rescheduleReason' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the reschedule loan data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -87,15 +98,7 @@ export class RescheduleLoanComponent { * @param {SettingsService} settingsService Settings Service. * @param {TasksService} tasksService Tasks Service. */ - constructor( - private route: ActivatedRoute, - private dialog: MatDialog, - private dateUtils: Dates, - private router: Router, - private settingsService: SettingsService, - private translateService: TranslateService, - private tasksService: TasksService - ) { + constructor() { this.route.data.subscribe((data: { recheduleLoansData: any }) => { this.loans = data.recheduleLoansData; this.dataSource = new MatTableDataSource(this.loans); diff --git a/src/app/tasks/common-resolvers/getCheckerInboxDetail.resolver.ts b/src/app/tasks/common-resolvers/getCheckerInboxDetail.resolver.ts index 5156984112..52cf2a8d56 100644 --- a/src/app/tasks/common-resolvers/getCheckerInboxDetail.resolver.ts +++ b/src/app/tasks/common-resolvers/getCheckerInboxDetail.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { TasksService } from '../tasks.service'; */ @Injectable() export class GetCheckerInboxDetailResolver { + private tasksService = inject(TasksService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {TasksService} tasksService Tasks service. */ - constructor(private tasksService: TasksService) {} + constructor() {} /** * Returns the detail data of the checker inbox. diff --git a/src/app/tasks/common-resolvers/getGroupedClientsData.resolver.ts b/src/app/tasks/common-resolvers/getGroupedClientsData.resolver.ts index 92c086b435..88cf021767 100644 --- a/src/app/tasks/common-resolvers/getGroupedClientsData.resolver.ts +++ b/src/app/tasks/common-resolvers/getGroupedClientsData.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { TasksService } from '../tasks.service'; */ @Injectable() export class GetGroupedClientsData { + private tasksService = inject(TasksService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {TasksService} tasksService Tasks service. */ - constructor(private tasksService: TasksService) {} + constructor() {} /** * Returns the grouped client data. diff --git a/src/app/tasks/common-resolvers/getLoansToBeApproved.resolver.ts b/src/app/tasks/common-resolvers/getLoansToBeApproved.resolver.ts index a941e0eb63..6d8e219d9b 100644 --- a/src/app/tasks/common-resolvers/getLoansToBeApproved.resolver.ts +++ b/src/app/tasks/common-resolvers/getLoansToBeApproved.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { TasksService } from '../tasks.service'; */ @Injectable() export class GetLoansToBeApproved { + private tasksService = inject(TasksService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {TasksService} tasksService Tasks service. */ - constructor(private tasksService: TasksService) {} + constructor() {} /** * Returns all the loans data. diff --git a/src/app/tasks/common-resolvers/getLoansToBeDisbursed.resolver.ts b/src/app/tasks/common-resolvers/getLoansToBeDisbursed.resolver.ts index 0f8fad2ae7..c3d1022c40 100644 --- a/src/app/tasks/common-resolvers/getLoansToBeDisbursed.resolver.ts +++ b/src/app/tasks/common-resolvers/getLoansToBeDisbursed.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { TasksService } from '../tasks.service'; */ @Injectable() export class GetLoansToBeDisbursed { + private tasksService = inject(TasksService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {TasksService} tasksService Tasks service. */ - constructor(private tasksService: TasksService) {} + constructor() {} /** * Returns all the loans data. diff --git a/src/app/tasks/common-resolvers/getOffices.resolver.ts b/src/app/tasks/common-resolvers/getOffices.resolver.ts index b3a10b823f..a280a38ced 100644 --- a/src/app/tasks/common-resolvers/getOffices.resolver.ts +++ b/src/app/tasks/common-resolvers/getOffices.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { TasksService } from '../tasks.service'; */ @Injectable() export class GetOffices { + private tasksService = inject(TasksService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {TasksService} tasksService Tasks service. */ - constructor(private tasksService: TasksService) {} + constructor() {} /** * Returns the offices data. diff --git a/src/app/tasks/common-resolvers/getRescheduleLoans.resolver.ts b/src/app/tasks/common-resolvers/getRescheduleLoans.resolver.ts index 5cb420fb78..e98b0b3c21 100644 --- a/src/app/tasks/common-resolvers/getRescheduleLoans.resolver.ts +++ b/src/app/tasks/common-resolvers/getRescheduleLoans.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { TasksService } from '../tasks.service'; */ @Injectable() export class GetRescheduleLoans { + private tasksService = inject(TasksService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {TasksService} tasksService Tasks service. */ - constructor(private tasksService: TasksService) {} + constructor() {} /** * Returns the pending reschedule data. diff --git a/src/app/tasks/common-resolvers/getmakercheckers.resolver.ts b/src/app/tasks/common-resolvers/getmakercheckers.resolver.ts index 65a3abd3ff..7f88365d53 100644 --- a/src/app/tasks/common-resolvers/getmakercheckers.resolver.ts +++ b/src/app/tasks/common-resolvers/getmakercheckers.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { TasksService } from '../tasks.service'; */ @Injectable() export class GetMakerCheckers { + private tasksService = inject(TasksService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {TasksService} tasksService Tasks service. */ - constructor(private tasksService: TasksService) {} + constructor() {} /** * Returns the maker checker data. diff --git a/src/app/tasks/common-resolvers/makerCheckerTemplate.resolver.ts b/src/app/tasks/common-resolvers/makerCheckerTemplate.resolver.ts index 7fd6e3d270..937f7f1e3c 100644 --- a/src/app/tasks/common-resolvers/makerCheckerTemplate.resolver.ts +++ b/src/app/tasks/common-resolvers/makerCheckerTemplate.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { TasksService } from '../tasks.service'; */ @Injectable() export class MakerCheckerTemplate { + private tasksService = inject(TasksService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {TasksService} tasksService Tasks service. */ - constructor(private tasksService: TasksService) {} + constructor() {} /** * Returns the maker checker template data. diff --git a/src/app/tasks/tasks.service.ts b/src/app/tasks/tasks.service.ts index 9c8a13bda7..cd2f66067c 100644 --- a/src/app/tasks/tasks.service.ts +++ b/src/app/tasks/tasks.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -12,10 +12,15 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class TasksService { + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. */ - constructor(private http: HttpClient) {} + constructor() {} /** * Get Maker Checker Data diff --git a/src/app/tasks/view-checker-inbox/view-checker-inbox.component.html b/src/app/tasks/view-checker-inbox/view-checker-inbox.component.html index e2eb5c2701..c2dc4a2dc7 100644 --- a/src/app/tasks/view-checker-inbox/view-checker-inbox.component.html +++ b/src/app/tasks/view-checker-inbox/view-checker-inbox.component.html @@ -47,43 +47,49 @@ {{ 'labels.heading.Details' | translate }} {{ checkerInboxDetail.entityName }} - - {{ 'labels.inputs.Resource ID' | translate }}: - {{ checkerInboxDetail.resourceId }} - + @if (checkerInboxDetail.resourceId) { + + {{ 'labels.inputs.Resource ID' | translate }}: + {{ checkerInboxDetail.resourceId }} + + } {{ 'labels.inputs.Date' | translate }}: {{ checkerInboxDetail.madeOnDate | dateFormat }} - - {{ 'labels.inputs.Office' | translate }}: - {{ checkerInboxDetail.officeName }} - - - - {{ 'labels.inputs.Savings Account Number' | translate }}: - {{ checkerInboxDetail.savingsAccountNo }} - - - - {{ checkerInboxDetail.groupLevelName }} - {{ checkerInboxDetail.groupName }} - - - + @if (checkerInboxDetail.officeName) { + + {{ 'labels.inputs.Office' | translate }}: + {{ checkerInboxDetail.officeName }} + + } + + @if (checkerInboxDetail.savingsAccountNo) { + + {{ 'labels.inputs.Savings Account Number' | translate }}: + {{ checkerInboxDetail.savingsAccountNo }} + + } + + @if (checkerInboxDetail.groupLevelName) { + + {{ checkerInboxDetail.groupLevelName }} + {{ checkerInboxDetail.groupName }} + + } + + @if (displayJSONData) { {{ 'labels.heading.Command' | translate }} - - - + @for (json of jsondata | keyvalue; track json) { {{ json.key }}: {{ json.value }} - - + } + } diff --git a/src/app/tasks/view-checker-inbox/view-checker-inbox.component.ts b/src/app/tasks/view-checker-inbox/view-checker-inbox.component.ts index 627789eb4d..a43511e27f 100644 --- a/src/app/tasks/view-checker-inbox/view-checker-inbox.component.ts +++ b/src/app/tasks/view-checker-inbox/view-checker-inbox.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import * as _ from 'lodash'; import { MatDialog } from '@angular/material/dialog'; @@ -12,7 +12,7 @@ import { ConfirmationDialogComponent } from 'app/shared/confirmation-dialog/conf import { TranslateService } from '@ngx-translate/core'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatDivider } from '@angular/material/divider'; -import { NgIf, NgFor, KeyValuePipe } from '@angular/common'; +import { KeyValuePipe } from '@angular/common'; import { DateFormatPipe } from '../../pipes/date-format.pipe'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -29,6 +29,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewCheckerInboxComponent { + private route = inject(ActivatedRoute); + private dialog = inject(MatDialog); + private router = inject(Router); + private translateService = inject(TranslateService); + private tasksService = inject(TasksService); + /** Checker Inbox Details Data */ checkerInboxDetail: any; /** JsonData */ @@ -36,6 +42,9 @@ export class ViewCheckerInboxComponent { /** Checks if there is any object or not in jsondata */ displayJSONData = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the maker checker id data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -43,13 +52,7 @@ export class ViewCheckerInboxComponent { * @param {router} router Router. * @param {TasksService} tasksService Tasks Service. */ - constructor( - private route: ActivatedRoute, - private dialog: MatDialog, - private router: Router, - private translateService: TranslateService, - private tasksService: TasksService - ) { + constructor() { this.route.data.subscribe((data: { checkerInboxDetail: any }) => { this.checkerInboxDetail = data.checkerInboxDetail; this.jsondata = JSON.parse(this.checkerInboxDetail.commandAsJson); diff --git a/src/app/templates/common-resolvers/create-template.resolver.ts b/src/app/templates/common-resolvers/create-template.resolver.ts index 25fdb7c2a5..fb2d662eb0 100644 --- a/src/app/templates/common-resolvers/create-template.resolver.ts +++ b/src/app/templates/common-resolvers/create-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { TemplatesService } from '../templates.service'; */ @Injectable() export class CreateTemplateResolver { + private templatesService = inject(TemplatesService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {TemplatesService} templatesService Templates service. */ - constructor(private templatesService: TemplatesService) {} + constructor() {} /** * Returns the template data. diff --git a/src/app/templates/common-resolvers/edit-template.resolver.ts b/src/app/templates/common-resolvers/edit-template.resolver.ts index 3ba3711822..b952e86bc4 100644 --- a/src/app/templates/common-resolvers/edit-template.resolver.ts +++ b/src/app/templates/common-resolvers/edit-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { TemplatesService } from '../templates.service'; */ @Injectable() export class EditTemplateResolver { + private templatesService = inject(TemplatesService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {TemplatesService} templatesService Templates service. */ - constructor(private templatesService: TemplatesService) {} + constructor() {} /** * Returns the template data. diff --git a/src/app/templates/common-resolvers/template.resolver.ts b/src/app/templates/common-resolvers/template.resolver.ts index 1de41d1ae7..b7df827235 100644 --- a/src/app/templates/common-resolvers/template.resolver.ts +++ b/src/app/templates/common-resolvers/template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { TemplatesService } from '../templates.service'; */ @Injectable() export class TemplateResolver { + private templatesService = inject(TemplatesService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {TemplatesService} templatesService Templates service. */ - constructor(private templatesService: TemplatesService) {} + constructor() {} /** * Returns the Template data. diff --git a/src/app/templates/common-resolvers/templates.resolver.ts b/src/app/templates/common-resolvers/templates.resolver.ts index 7dfb2095a0..d47f7fd2d9 100644 --- a/src/app/templates/common-resolvers/templates.resolver.ts +++ b/src/app/templates/common-resolvers/templates.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { TemplatesService } from '../templates.service'; */ @Injectable() export class TemplatesResolver { + private templatesService = inject(TemplatesService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {TemplatesService} templatesService Templates service. */ - constructor(private templatesService: TemplatesService) {} + constructor() {} /** * Returns the templates data. diff --git a/src/app/templates/create-edit-template/create-edit-template.component.html b/src/app/templates/create-edit-template/create-edit-template.component.html index a13e811ee8..d211ce22a8 100644 --- a/src/app/templates/create-edit-template/create-edit-template.component.html +++ b/src/app/templates/create-edit-template/create-edit-template.component.html @@ -6,36 +6,46 @@ {{ 'labels.inputs.Entity' | translate }} - - {{ entity.name }} - + @for (entity of templateData.entities; track trackByEntityId($index, entity)) { + + {{ entity.name }} + + } - - {{ 'labels.inputs.Entity' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (templateForm.controls.entity.hasError('required')) { + + {{ 'labels.inputs.Entity' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Type' | translate }} - - {{ type.name }} - + @for (type of templateData.types; track trackByTypeId($index, type)) { + + {{ type.name }} + + } - - {{ 'labels.inputs.Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (templateForm.controls.type.hasError('required')) { + + {{ 'labels.inputs.Type' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.name' | translate }} - - {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (templateForm.controls.name.hasError('required')) { + + {{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -48,35 +58,32 @@ - - - - {{ 'labels.inputs.Mapper Key' | translate }} - - - - - {{ 'labels.inputs.Mapper Value' | translate }} - - - - - {{ 'labels.buttons.Add' | translate }} - - - {{ 'labels.buttons.Remove' | translate }} - - - + @if (showAdvanceOptions) { + + @for (mapper of mappers; track trackByMapperIndex(i, mapper); let i = $index) { + + + {{ 'labels.inputs.Mapper Key' | translate }} + + + + {{ 'labels.inputs.Mapper Value' | translate }} + + + @if (i === 0) { + + {{ 'labels.buttons.Add' | translate }} + + } + @if (!(i === 0)) { + + {{ 'labels.buttons.Remove' | translate }} + + } + + } + + } @@ -96,65 +103,56 @@ - - - - {{ 'labels.inputs.Client Parameters' | translate }} - - + @if (templateForm.controls.entity.value === 0) { + + + + {{ 'labels.inputs.Client Parameters' | translate }} + + + + @for (label of clientParameterLabels; track trackByLabel($index, label)) { + + {{ label }} + + } + + + } - - - {{ label }} - - - - - - - - {{ 'labels.inputs.Loan Parameters' | translate }} - - - - - - {{ label }} - - - - - - - - {{ 'labels.inputs.Repayment Schedule Parameters' | translate }} - - + @if (templateForm.controls.entity.value === 1) { + + + + {{ 'labels.inputs.Loan Parameters' | translate }} + + + + @for (label of loanParameterLabels; track trackByLabel($index, label)) { + + {{ label }} + + } + + + } - - - {{ label }} - - - + @if (templateForm.controls.entity.value === 1) { + + + + {{ 'labels.inputs.Repayment Schedule Parameters' | translate }} + + + + @for (label of repaymentParameterLabels; track trackByLabel($index, label)) { + + {{ label }} + + } + + + } diff --git a/src/app/templates/create-edit-template/create-edit-template.component.ts b/src/app/templates/create-edit-template/create-edit-template.component.ts index bfc1b0e806..d71a665d33 100644 --- a/src/app/templates/create-edit-template/create-edit-template.component.ts +++ b/src/app/templates/create-edit-template/create-edit-template.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -45,6 +45,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateEditComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private route = inject(ActivatedRoute); + private router = inject(Router); + private templateService = inject(TemplatesService); + /** CKEditor5 */ public Editor = ClassicEditor; /** CKEditor5 Template Reference */ @@ -68,6 +73,9 @@ export class CreateEditComponent implements OnInit { /** Repayment Parameter Labels */ repaymentParameterLabels: string[] = repaymentParameterLabels; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the template data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -75,12 +83,7 @@ export class CreateEditComponent implements OnInit { * @param {Router} router Router for navigation. * @param {TemplateService} templateService Templates Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private route: ActivatedRoute, - private router: Router, - private templateService: TemplatesService - ) { + constructor() { this.route.data.subscribe((data: { templateData: any; mode: 'create' | 'edit' }) => { this.templateData = data.templateData; this.mode = data.mode; diff --git a/src/app/templates/templates.component.ts b/src/app/templates/templates.component.ts index b41fb8a6e7..e6997936e2 100644 --- a/src/app/templates/templates.component.ts +++ b/src/app/templates/templates.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -45,6 +45,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class TemplatesComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Templates data. */ templatesData: any; /** Columns to be displayed in templates table. */ @@ -61,11 +63,14 @@ export class TemplatesComponent implements OnInit { /** Sorter for templates table. */ @ViewChild(MatSort, { static: true }) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the templates data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.data.subscribe((data: { templates: any }) => { this.templatesData = data.templates; }); diff --git a/src/app/templates/templates.service.ts b/src/app/templates/templates.service.ts index e7bc5008ef..46869ecf63 100644 --- a/src/app/templates/templates.service.ts +++ b/src/app/templates/templates.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -12,10 +12,15 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class TemplatesService { + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. */ - constructor(private http: HttpClient) {} + constructor() {} /** * @returns {Observable} Templates data diff --git a/src/app/templates/view-template/view-template.component.ts b/src/app/templates/view-template/view-template.component.ts index 398bc8ed79..06d32e301c 100644 --- a/src/app/templates/view-template/view-template.component.ts +++ b/src/app/templates/view-template/view-template.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -24,9 +24,17 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewTemplateComponent { + private route = inject(ActivatedRoute); + private templatesService = inject(TemplatesService); + private router = inject(Router); + private dialog = inject(MatDialog); + /** Template Data */ templateData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the template data from `resolve`. * @param {TemplateService} templateService Accounting Service. @@ -34,12 +42,7 @@ export class ViewTemplateComponent { * @param {Router} router Router for navigation. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private route: ActivatedRoute, - private templatesService: TemplatesService, - private router: Router, - private dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { template: any }) => { this.templateData = data.template; }); diff --git a/src/app/users/create-user/create-user.component.html b/src/app/users/create-user/create-user.component.html index bc0ae7de4e..305cc67d43 100644 --- a/src/app/users/create-user/create-user.component.html +++ b/src/app/users/create-user/create-user.component.html @@ -6,49 +6,63 @@ {{ 'labels.inputs.Username' | translate }} - - {{ 'labels.inputs.Username' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (userForm.controls.username.hasError('required')) { + + {{ 'labels.inputs.Username' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Email' | translate }} - - {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.invalid' | translate }} - - - {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (userForm.controls.email.hasError('email')) { + + {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.invalid' | translate }} + + } + @if (userForm.controls.email.hasError('required')) { + + {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.First Name' | translate }} - - {{ 'labels.inputs.First Name' | translate }} - {{ 'labels.commons.cannot begin with a special character or number' | translate }} - - - {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (userForm.controls.firstname.hasError('pattern')) { + + {{ 'labels.inputs.First Name' | translate }} + {{ 'labels.commons.cannot begin with a special character or number' | translate }} + + } + @if (userForm.controls.firstname.hasError('required')) { + + {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Last Name' | translate }} - - {{ 'labels.inputs.Last Name' | translate }} - {{ 'labels.commons.cannot begin with a special character or number' | translate }} - - - {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (userForm.controls.lastname.hasError('pattern')) { + + {{ 'labels.inputs.Last Name' | translate }} + {{ 'labels.commons.cannot begin with a special character or number' | translate }} + + } + @if (userForm.controls.lastname.hasError('required')) { + + {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -63,88 +77,110 @@ - - {{ 'labels.inputs.Password' | translate }} - - - {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.commons.Password should be at least' | translate }} - {{ 'labels.commons.12 characters long' | translate }} - - - {{ 'labels.commons.Password should not be more than' | translate }} - {{ 'labels.commons.50 characters long' | translate }} - - + {{ 'labels.inputs.Password' | translate }} + + @if (userForm.controls.password.hasError('required')) { + + {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (userForm.controls.password.hasError('minlength')) { + + {{ 'labels.commons.Password should be at least' | translate }} + {{ 'labels.commons.12 characters long' | translate }} + + } + @if (userForm.controls.password.hasError('maxlength')) { + + {{ 'labels.commons.Password should not be more than' | translate }} + {{ 'labels.commons.50 characters long' | translate }} + + } + @if ( userForm.controls.password.hasError('pattern') && !(userForm.controls.password.hasError('minlength') || userForm.controls.password.hasError('maxlength')) - " - > - {{ 'labels.commons.Password should include a' | translate }} - {{ 'labels.commons.numeral' | translate }} {{ 'labels.commons.and at' | translate }} - {{ 'labels.commons.least one uppercase' | translate }} ,{{ - 'labels.commons.lowercase and special character' | translate - }} - - + ) { + + {{ 'labels.commons.Password should include a' | translate }} + {{ 'labels.commons.numeral' | translate }} {{ 'labels.commons.and at' | translate }} + {{ 'labels.commons.least one uppercase' | translate }} ,{{ + 'labels.commons.lowercase and special character' | translate + }} + + } + + } - - {{ 'labels.inputs.Repeat Password' | translate }} - - - {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + @if (!userForm.controls.sendPasswordToEmail.value) { + + {{ 'labels.inputs.Repeat Password' | translate }} + + @if (userForm.controls.repeatPassword.hasError('required')) { + + {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - - {{ 'labels.inputs.Passwords' | translate }} {{ 'labels.commons.do not match' | translate }} - + @if ( + userForm.errors?.passwordsDoNotMatch && + !userForm.controls.password.hasError('required') && + !userForm.controls.repeatPassword.hasError('required') + ) { + + {{ 'labels.inputs.Passwords' | translate }} + {{ 'labels.commons.do not match' | translate }} + + } {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officesData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (userForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Staff' | translate }} - - {{ staff.displayName }} - + @for (staff of staffData; track staff) { + + {{ staff.displayName }} + + } {{ 'labels.inputs.Roles' | translate }} - - {{ role.name }} - + @for (role of rolesData; track role) { + + {{ role.name }} + + } - - {{ 'labels.commons.At least one role' | translate }} - {{ 'labels.commons.must be selected' | translate }} - + @if (userForm.controls.roles.hasError('required')) { + + {{ 'labels.commons.At least one role' | translate }} + {{ 'labels.commons.must be selected' | translate }} + + } diff --git a/src/app/users/create-user/create-user.component.ts b/src/app/users/create-user/create-user.component.ts index 97a5a48f3b..13fb3581c5 100644 --- a/src/app/users/create-user/create-user.component.ts +++ b/src/app/users/create-user/create-user.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -35,6 +35,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateUserComponent implements OnInit, AfterViewInit { + private formBuilder = inject(UntypedFormBuilder); + private usersService = inject(UsersService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private popoverService = inject(PopoverService); + private configurationWizardService = inject(ConfigurationWizardService); + private dialog = inject(MatDialog); + private passwordsUtility = inject(PasswordsUtility); + /** User form. */ userForm: UntypedFormGroup; /** Offices data. */ @@ -49,6 +58,9 @@ export class CreateUserComponent implements OnInit, AfterViewInit { /* Template for popover on create user form */ @ViewChild('templateUserFormRef') templateUserFormRef: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices and roles data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -58,16 +70,7 @@ export class CreateUserComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private formBuilder: UntypedFormBuilder, - private usersService: UsersService, - private route: ActivatedRoute, - private router: Router, - private popoverService: PopoverService, - private configurationWizardService: ConfigurationWizardService, - private dialog: MatDialog, - private passwordsUtility: PasswordsUtility - ) { + constructor() { this.route.data.subscribe((data: { usersTemplate: any }) => { this.officesData = data.usersTemplate.allowedOffices; this.rolesData = data.usersTemplate.availableRoles; diff --git a/src/app/users/edit-user/edit-user.component.html b/src/app/users/edit-user/edit-user.component.html index 3fb9fe6a53..785834c065 100644 --- a/src/app/users/edit-user/edit-user.component.html +++ b/src/app/users/edit-user/edit-user.component.html @@ -6,49 +6,63 @@ {{ 'labels.inputs.Username' | translate }} - - {{ 'labels.inputs.Username' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editUserForm.controls.username.hasError('required')) { + + {{ 'labels.inputs.Username' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Email' | translate }} - - {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.invalid' | translate }} - - - {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editUserForm.controls.email.hasError('email')) { + + {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.invalid' | translate }} + + } + @if (editUserForm.controls.email.hasError('required')) { + + {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.First Name' | translate }} - - {{ 'labels.inputs.First Name' | translate }} - {{ 'labels.commons.cannot begin with a special character or number' | translate }} - - - {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editUserForm.controls.firstname.hasError('pattern')) { + + {{ 'labels.inputs.First Name' | translate }} + {{ 'labels.commons.cannot begin with a special character or number' | translate }} + + } + @if (editUserForm.controls.firstname.hasError('required')) { + + {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Last Name' | translate }} - - {{ 'labels.inputs.Last Name' | translate }} - {{ 'labels.commons.cannot begin with a special character or number' | translate }} - - - {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editUserForm.controls.lastname.hasError('pattern')) { + + {{ 'labels.inputs.Last Name' | translate }} + {{ 'labels.commons.cannot begin with a special character or number' | translate }} + + } + @if (editUserForm.controls.lastname.hasError('required')) { + + {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -60,36 +74,46 @@ {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officesData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (editUserForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Staff' | translate }} - - {{ staff.displayName }} - + @for (staff of staffData; track staff) { + + {{ staff.displayName }} + + } {{ 'labels.inputs.Roles' | translate }} - - {{ role.name }} - + @for (role of rolesData; track role) { + + {{ role.name }} + + } - - {{ 'labels.commons.At least one role' | translate }} - {{ 'labels.commons.must be selected' | translate }} - + @if (editUserForm.controls.roles.hasError('required')) { + + {{ 'labels.commons.At least one role' | translate }} + {{ 'labels.commons.must be selected' | translate }} + + } diff --git a/src/app/users/edit-user/edit-user.component.ts b/src/app/users/edit-user/edit-user.component.ts index a128f689a2..fc1ff7f519 100644 --- a/src/app/users/edit-user/edit-user.component.ts +++ b/src/app/users/edit-user/edit-user.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; @@ -21,6 +21,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditUserComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private usersService = inject(UsersService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** User Data */ userData: any; /** Offices Data */ @@ -32,6 +37,9 @@ export class EditUserComponent implements OnInit { /** Edit User form. */ editUserForm: UntypedFormGroup; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -39,12 +47,7 @@ export class EditUserComponent implements OnInit { * @param {ActivatedRoute} route Activated Route. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private usersService: UsersService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { user: any; usersTemplate: any }) => { this.userData = data.user; this.officesData = data.usersTemplate.allowedOffices; diff --git a/src/app/users/user.resolver.ts b/src/app/users/user.resolver.ts index 7fe6fc8a31..b0fc060e4e 100644 --- a/src/app/users/user.resolver.ts +++ b/src/app/users/user.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { UsersService } from './users.service'; */ @Injectable() export class UserResolver { + private usersService = inject(UsersService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {UsersService} usersService Users service. */ - constructor(private usersService: UsersService) {} + constructor() {} /** * Returns the user data. diff --git a/src/app/users/users-template.resolver.ts b/src/app/users/users-template.resolver.ts index 5bac2eebee..c52ba8cdaa 100644 --- a/src/app/users/users-template.resolver.ts +++ b/src/app/users/users-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { UsersService } from './users.service'; */ @Injectable() export class UsersTemplateResolver { + private usersService = inject(UsersService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {UsersService} usersService Users service. */ - constructor(private usersService: UsersService) {} + constructor() {} /** * Returns the users template data. diff --git a/src/app/users/users.component.ts b/src/app/users/users.component.ts index cda8e5a436..59a3871be5 100644 --- a/src/app/users/users.component.ts +++ b/src/app/users/users.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -52,6 +52,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UsersComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + private configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** Users data. */ usersData: any; /** Columns to be displayed in users table. */ @@ -78,6 +83,9 @@ export class UsersComponent implements OnInit, AfterViewInit { /* Template for popover on users table */ @ViewChild('templateUsersTable') templateUsersTable: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the users data from `resolve`. * @param {ActivatedRoute} route Activated Route. @@ -85,12 +93,7 @@ export class UsersComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private route: ActivatedRoute, - private router: Router, - private configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) { + constructor() { this.route.data.subscribe((data: { users: any }) => { this.usersData = data.users; }); diff --git a/src/app/users/users.resolver.ts b/src/app/users/users.resolver.ts index 330fee756b..7910bc611f 100644 --- a/src/app/users/users.resolver.ts +++ b/src/app/users/users.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -12,10 +12,15 @@ import { UsersService } from './users.service'; */ @Injectable() export class UsersResolver { + private usersService = inject(UsersService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {UsersService} usersService Users service. */ - constructor(private usersService: UsersService) {} + constructor() {} /** * Returns the users data. diff --git a/src/app/users/users.service.ts b/src/app/users/users.service.ts index 20e62300a6..1d0ae9f963 100644 --- a/src/app/users/users.service.ts +++ b/src/app/users/users.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -12,10 +12,15 @@ import { Observable } from 'rxjs'; providedIn: 'root' }) export class UsersService { + private http = inject(HttpClient); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. */ - constructor(private http: HttpClient) {} + constructor() {} /** * @returns {Observable} Users data diff --git a/src/app/users/view-user/view-user.component.html b/src/app/users/view-user/view-user.component.html index 9b4204e72b..739ba0a2e8 100644 --- a/src/app/users/view-user/view-user.component.html +++ b/src/app/users/view-user/view-user.component.html @@ -32,10 +32,12 @@ {{ userData.lastname }} - - {{ 'labels.inputs.Email' | translate }} - {{ userData.email }} - + @if (userData.email) { + + {{ 'labels.inputs.Email' | translate }} + {{ userData.email }} + + } {{ 'labels.inputs.Office' | translate }} @@ -45,9 +47,11 @@ {{ 'labels.inputs.Roles' | translate }} - - {{ role.name }} - + @for (role of userData.selectedRoles; track role) { + + {{ role.name }} + + } diff --git a/src/app/users/view-user/view-user.component.ts b/src/app/users/view-user/view-user.component.ts index 6816057c81..655aadd063 100644 --- a/src/app/users/view-user/view-user.component.ts +++ b/src/app/users/view-user/view-user.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -26,9 +26,17 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ViewUserComponent { + private usersService = inject(UsersService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + /** User Data. */ userData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the user data from `resolve`. * @param {UsersService} usersService Users Service. @@ -36,12 +44,7 @@ export class ViewUserComponent { * @param {Router} router Router for navigation. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private usersService: UsersService, - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog - ) { + constructor() { this.route.data.subscribe((data: { user: any }) => { this.userData = data.user; }); diff --git a/src/app/web-app.component.ts b/src/app/web-app.component.ts index d11079f9df..f64a2adb5c 100644 --- a/src/app/web-app.component.ts +++ b/src/app/web-app.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, HostListener, HostBinding, OnDestroy } from '@angular/core'; +import { Component, OnInit, HostListener, HostBinding, OnDestroy, inject } from '@angular/core'; import { Router, NavigationEnd, ActivatedRoute } from '@angular/router'; import { Title } from '@angular/platform-browser'; import { MatSnackBar } from '@angular/material/snack-bar'; @@ -88,12 +88,30 @@ registerLocaleData(localeSW); standalone: false }) export class WebAppComponent implements OnInit, OnDestroy { - buttonConfig: KeyboardShortcutsConfiguration; - - i18nService: I18nService; + private router = inject(Router); + private activatedRoute = inject(ActivatedRoute); + private titleService = inject(Title); + private translateService = inject(TranslateService); + private themeStorageService = inject(ThemeStorageService); + snackBar = inject(MatSnackBar); + private alertService = inject(AlertService); + private settingsService = inject(SettingsService); + private authenticationService = inject(AuthenticationService); + private themingService = inject(ThemingService); + private dateUtils = inject(Dates); + private idle = inject(IdleTimeoutService); + private dialog = inject(MatDialog); + private authService = inject(AuthService); + + buttonConfig: KeyboardShortcutsConfiguration = new KeyboardShortcutsConfiguration(); + + i18nService = inject(I18nService); private authSubscription: Subscription; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {Router} router Router for navigation. * @param {ActivatedRoute} activatedRoute Activated Route. @@ -108,22 +126,7 @@ export class WebAppComponent implements OnInit, OnDestroy { * @param {IdleTimeoutService} idle Idle timeout service. * @param {MatDialog} dialog Dialog component. */ - constructor( - private router: Router, - private activatedRoute: ActivatedRoute, - private titleService: Title, - private translateService: TranslateService, - private themeStorageService: ThemeStorageService, - public snackBar: MatSnackBar, - private alertService: AlertService, - private settingsService: SettingsService, - private authenticationService: AuthenticationService, - private themingService: ThemingService, - private dateUtils: Dates, - private idle: IdleTimeoutService, - private dialog: MatDialog, - private authService: AuthService - ) {} + constructor() {} @HostBinding('class') public cssClass: string; @@ -164,8 +167,6 @@ export class WebAppComponent implements OnInit, OnDestroy { this.translateService.use(environment.defaultLanguage); } - this.i18nService = new I18nService(this.translateService); - // Change page title on navigation or language change, based on route data const onNavigationEnd = this.router.events.pipe(filter((event) => event instanceof NavigationEnd)); merge(this.translateService.onLangChange, onNavigationEnd) @@ -273,6 +274,12 @@ export class WebAppComponent implements OnInit, OnDestroy { // Monitor all keyboard events and excute keyboard shortcuts @HostListener('window:keydown', ['$event']) onKeydownHandler(event: KeyboardEvent) { + // Guard for safety + const cfg = this.buttonConfig; + if (!cfg || !cfg.buttonCombinations) { + return; + } + const routeD = this.buttonConfig.buttonCombinations.find( (x) => x.ctrlKey === event.ctrlKey && x.shiftKey === event.shiftKey && x.altKey === event.altKey && x.key === event.key diff --git a/src/app/zitadel/auth.service.ts b/src/app/zitadel/auth.service.ts index c94f9fc231..cc7d8dc3ba 100644 --- a/src/app/zitadel/auth.service.ts +++ b/src/app/zitadel/auth.service.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams, HttpHeaders } from '@angular/common/http'; import { ActivatedRoute, Router } from '@angular/router'; @@ -13,6 +13,13 @@ import { environment } from '../../environments/environment'; @Injectable({ providedIn: 'root' }) export class AuthService { + private authenticationService = inject(AuthenticationService); + private http = inject(HttpClient); + private route = inject(ActivatedRoute); + private router = inject(Router); + private alertService = inject(AlertService); + private translateService = inject(TranslateService); + private baseUrl = environment.OIDC.oidcBaseUrl; private authUrl = `${this.baseUrl}oauth/v2/authorize`; private tokenUrl = `${this.baseUrl}oauth/v2/token`; @@ -21,14 +28,10 @@ export class AuthService { private frontUrl = environment.OIDC.oidcFrontUrl; private redirectUri = `${this.frontUrl}#/callback`; private refreshTimeoutId: any = null; - constructor( - private authenticationService: AuthenticationService, - private http: HttpClient, - private route: ActivatedRoute, - private router: Router, - private alertService: AlertService, - private translateService: TranslateService - ) {} + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + constructor() {} async login() { const codeVerifier = this.generateRandomString(); diff --git a/src/app/zitadel/callback/callback.component.ts b/src/app/zitadel/callback/callback.component.ts index 97697e11a8..ab0eefc81e 100644 --- a/src/app/zitadel/callback/callback.component.ts +++ b/src/app/zitadel/callback/callback.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { AuthService } from '../auth.service'; @@ -7,10 +7,13 @@ import { AuthService } from '../auth.service'; templateUrl: './callback.component.html' }) export class CallbackComponent implements OnInit { - constructor( - private route: ActivatedRoute, - private authService: AuthService - ) {} + private route = inject(ActivatedRoute); + private authService = inject(AuthService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { let code = localStorage.getItem('auth_code'); diff --git a/src/app/zitadel/shared/change-password-dialog/change-password-dialog.component.html b/src/app/zitadel/shared/change-password-dialog/change-password-dialog.component.html index b699ca6adb..1c88574948 100644 --- a/src/app/zitadel/shared/change-password-dialog/change-password-dialog.component.html +++ b/src/app/zitadel/shared/change-password-dialog/change-password-dialog.component.html @@ -5,23 +5,29 @@ {{ 'labels.heading.Change Password' | translate }} {{ 'labels.inputs.Password Current' | translate }} - - {{ 'labels.inputs.Password Current Required' | translate }} - + @if (changePasswordForm.get('currentPassword')?.hasError('required')) { + + {{ 'labels.inputs.Password Current Required' | translate }} + + } {{ 'labels.inputs.Password New' | translate }} - - {{ 'labels.commons.Password validation' | translate: { minchar: minPasswordLength } }} - + @if (changePasswordForm.get('password')?.errors) { + + {{ 'labels.commons.Password validation' | translate: { minchar: minPasswordLength } }} + + } {{ 'labels.inputs.Repeat Password' | translate }} - - {{ 'inputs.passwordsDoNotMatch' | translate }} - + @if (changePasswordForm.get('repeatPassword')?.hasError('notequal')) { + + {{ 'inputs.passwordsDoNotMatch' | translate }} + + } diff --git a/src/app/zitadel/shared/change-password-dialog/change-password-dialog.component.ts b/src/app/zitadel/shared/change-password-dialog/change-password-dialog.component.ts index 91313816e3..31835a6f7f 100644 --- a/src/app/zitadel/shared/change-password-dialog/change-password-dialog.component.ts +++ b/src/app/zitadel/shared/change-password-dialog/change-password-dialog.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, MatDialogActions } from '@angular/material/dialog'; import { UntypedFormBuilder, Validators, AbstractControl, ValidationErrors, FormGroup } from '@angular/forms'; import { confirmPasswordValidator } from 'app/login/reset-password/confirm-password.validator'; @@ -23,16 +23,19 @@ import { TranslateService } from '@ngx-translate/core'; ] }) export class ChangePasswordDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + private formBuilder = inject(UntypedFormBuilder); + private http = inject(HttpClient); + private translateService = inject(TranslateService); + minPasswordLength: number = environment.minPasswordLength || 12; changePasswordForm: FormGroup; - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any, - private formBuilder: UntypedFormBuilder, - private http: HttpClient, - private translateService: TranslateService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} private api = environment.OIDC.oidcApiUrl; diff --git a/src/app/zitadel/token.interceptor.ts b/src/app/zitadel/token.interceptor.ts index a4bf3b121a..304222f75a 100644 --- a/src/app/zitadel/token.interceptor.ts +++ b/src/app/zitadel/token.interceptor.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpErrorResponse } from '@angular/common/http'; import { Observable, throwError, from } from 'rxjs'; import { catchError } from 'rxjs/operators'; @@ -7,10 +7,15 @@ import { environment } from '../../environments/environment'; @Injectable() export class TokenInterceptor implements HttpInterceptor { + private authService = inject(AuthService); + public environment = environment; FINERACT_PLATFORM_TENANT_IDENTIFIER = environment.fineractPlatformTenantId; - constructor(private authService: AuthService) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} intercept(req: HttpRequest, next: HttpHandler): Observable> { const token = this.authService.getAccessToken(); diff --git a/src/app/zitadel/users/create-user/create-user.component.html b/src/app/zitadel/users/create-user/create-user.component.html index f9376ae41a..9ed9bfc7d5 100644 --- a/src/app/zitadel/users/create-user/create-user.component.html +++ b/src/app/zitadel/users/create-user/create-user.component.html @@ -7,24 +7,30 @@ {{ 'labels.inputs.Username' | translate }} - - {{ 'labels.inputs.Username' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (userForm.controls.username.hasError('required')) { + + {{ 'labels.inputs.Username' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Email' | translate }} - - {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.invalid' | translate }} - - - {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (userForm.controls.email.hasError('email')) { + + {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.invalid' | translate }} + + } + @if (userForm.controls.email.hasError('required')) { + + {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } @@ -43,9 +49,11 @@ {{ 'labels.inputs.Language' | translate }} - - {{ 'languages.' + lang.key | translate }} - + @for (lang of languageCodes; track lang) { + + {{ 'languages.' + lang.key | translate }} + + } @@ -63,9 +71,11 @@ {{ 'labels.inputs.Code' | translate }} - - {{ 'countries.' + country.key | translate }} ({{ country.code }}) - + @for (country of countryCodes; track country) { + + {{ 'countries.' + country.key | translate }} ({{ country.code }}) + + } @@ -78,22 +88,28 @@ {{ 'labels.inputs.Office' | translate }} - - {{ office.name }} - + @for (office of officesData; track office) { + + {{ office.name }} + + } - - {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (userForm.controls.officeId.hasError('required')) { + + {{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Staff' | translate }} - - {{ staff.displayName }} - + @for (staff of staffData; track staff) { + + {{ staff.displayName }} + + } @@ -101,69 +117,80 @@ {{ 'labels.inputs.Password' | translate }} - - {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - {{ 'labels.commons.Password should be at least' | translate }} - {{ 'labels.commons.12 characters long' | translate }} - - - {{ 'labels.commons.Password should not be more than' | translate }} - {{ 'labels.commons.50 characters long' | translate }} - - - {{ 'labels.commons.Password should include a' | translate }} - {{ 'labels.commons.numeral' | translate }} - {{ 'labels.commons.and at' | translate }} - {{ 'labels.commons.least one uppercase' | translate }}, - {{ 'labels.commons.lowercase and special character' | translate }} - + @if (userForm.get('password')?.hasError('required')) { + + {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (userForm.get('password')?.hasError('minlength')) { + + {{ 'labels.commons.Password should be at least' | translate }} + {{ 'labels.commons.12 characters long' | translate }} + + } + @if (userForm.get('password')?.hasError('maxlength')) { + + {{ 'labels.commons.Password should not be more than' | translate }} + {{ 'labels.commons.50 characters long' | translate }} + + } + @if ( + userForm.get('password')?.hasError('pattern') && + !userForm.get('password')?.hasError('minlength') && + !userForm.get('password')?.hasError('maxlength') + ) { + + {{ 'labels.commons.Password should include a' | translate }} + {{ 'labels.commons.numeral' | translate }} + {{ 'labels.commons.and at' | translate }} + {{ 'labels.commons.least one uppercase' | translate }}, + {{ 'labels.commons.lowercase and special character' | translate }} + + } {{ 'labels.inputs.Repeat Password' | translate }} - - {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (userForm.get('repeatPassword')?.hasError('required')) { + + {{ 'labels.inputs.Password' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - {{ 'labels.inputs.Passwords' | translate }} - {{ 'labels.commons.do not match' | translate }} - + @if ( + userForm.errors?.passwordsDoNotMatch && + !userForm.get('password')?.hasError('required') && + !userForm.get('repeatPassword')?.hasError('required') + ) { + + {{ 'labels.inputs.Passwords' | translate }} + {{ 'labels.commons.do not match' | translate }} + + } {{ 'labels.inputs.Roles' | translate }} - - {{ role.name }} - + @for (role of rolesData; track role) { + + {{ role.name }} + + } - - {{ 'labels.commons.At least one role' | translate }} - {{ 'labels.commons.must be selected' | translate }} - + @if (userForm.controls.roles.hasError('required')) { + + {{ 'labels.commons.At least one role' | translate }} + {{ 'labels.commons.must be selected' | translate }} + + } diff --git a/src/app/zitadel/users/create-user/create-user.component.ts b/src/app/zitadel/users/create-user/create-user.component.ts index d6cad47bf7..58a384dbdd 100644 --- a/src/app/zitadel/users/create-user/create-user.component.ts +++ b/src/app/zitadel/users/create-user/create-user.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, @@ -38,6 +38,16 @@ import { ZITADEL_LANGUAGES } from 'app/zitadel/constants/languages'; ] }) export class CreateUserComponent implements OnInit, AfterViewInit { + private formBuilder = inject(UntypedFormBuilder); + private usersService = inject(UsersServiceZitadel); + private usersService2 = inject(UsersService); + private route = inject(ActivatedRoute); + private router = inject(Router); + private popoverService = inject(PopoverService); + private configurationWizardService = inject(ConfigurationWizardService); + private dialog = inject(MatDialog); + private passwordsUtility = inject(PasswordsUtility); + /** User form. */ userForm: UntypedFormGroup; /** Offices data. */ @@ -56,6 +66,9 @@ export class CreateUserComponent implements OnInit, AfterViewInit { /* Template for popover on create user form */ @ViewChild('templateUserFormRef') templateUserFormRef: TemplateRef; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices and roles data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -65,17 +78,7 @@ export class CreateUserComponent implements OnInit, AfterViewInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {PopoverService} popoverService PopoverService. */ - constructor( - private formBuilder: UntypedFormBuilder, - private usersService: UsersServiceZitadel, - private usersService2: UsersService, - private route: ActivatedRoute, - private router: Router, - private popoverService: PopoverService, - private configurationWizardService: ConfigurationWizardService, - private dialog: MatDialog, - private passwordsUtility: PasswordsUtility - ) { + constructor() { this.route.data.subscribe((data: { usersTemplate: any }) => { this.officesData = data.usersTemplate.allowedOffices; this.rolesData = data.usersTemplate.availableRoles; diff --git a/src/app/zitadel/users/edit-user/edit-user.component.html b/src/app/zitadel/users/edit-user/edit-user.component.html index 5002c242a6..7b1fae8af4 100644 --- a/src/app/zitadel/users/edit-user/edit-user.component.html +++ b/src/app/zitadel/users/edit-user/edit-user.component.html @@ -1,125 +1,140 @@ - - - - - {{ 'labels.inputs.Username' | translate }} - - - {{ 'labels.inputs.Username' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Email' | translate }} - - - {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.invalid' | translate }} - - - {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.First Name' | translate }} - - - {{ 'labels.inputs.First Name' | translate }} - {{ 'labels.commons.cannot begin with a special character or number' | translate }} - - - {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Last Name' | translate }} - - - {{ 'labels.inputs.Last Name' | translate }} - {{ 'labels.commons.cannot begin with a special character or number' | translate }} - - - {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Code' | translate }} - - - {{ 'countries.' + country.key | translate }} ({{ country.code }}) - - - - - - {{ 'labels.inputs.Phone Number' | translate }} - - - - - {{ 'labels.inputs.Gender' | translate }} - - {{ 'labels.catalogs.male' | translate }} - {{ 'labels.catalogs.female' | translate }} - {{ 'labels.catalogs.other' | translate }} - - - - - {{ 'labels.inputs.Language' | translate }} - - - {{ 'languages.' + lang.key | translate }} - - - - - - {{ 'labels.inputs.Office' | translate }} - - - {{ office.name }} - - - - - - {{ 'labels.inputs.Staff' | translate }} - - - {{ staff.displayName }} - - - - - - {{ 'labels.inputs.Roles' | translate }} - - - {{ rol.name }} - - - - - - - {{ 'labels.buttons.Cancel' | translate }} - - - {{ 'labels.buttons.Submit' | translate }} - - - - - + @if (editUserForm) { + + + + + {{ 'labels.inputs.Username' | translate }} + + @if (editUserForm.controls.username.hasError('required')) { + + {{ 'labels.inputs.Username' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Email' | translate }} + + @if (editUserForm.controls.email.hasError('email')) { + + {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.invalid' | translate }} + + } + @if (editUserForm.controls.email.hasError('required')) { + + {{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.First Name' | translate }} + + @if (editUserForm.controls.firstname.hasError('pattern')) { + + {{ 'labels.inputs.First Name' | translate }} + {{ 'labels.commons.cannot begin with a special character or number' | translate }} + + } + @if (editUserForm.controls.firstname.hasError('required')) { + + {{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Last Name' | translate }} + + @if (editUserForm.controls.lastname.hasError('pattern')) { + + {{ 'labels.inputs.Last Name' | translate }} + {{ 'labels.commons.cannot begin with a special character or number' | translate }} + + } + @if (editUserForm.controls.lastname.hasError('required')) { + + {{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + {{ 'labels.inputs.Code' | translate }} + + @for (country of countryCodes; track country) { + + {{ 'countries.' + country.key | translate }} ({{ country.code }}) + + } + + + + {{ 'labels.inputs.Phone Number' | translate }} + + + + {{ 'labels.inputs.Gender' | translate }} + + {{ 'labels.catalogs.male' | translate }} + {{ 'labels.catalogs.female' | translate }} + {{ 'labels.catalogs.other' | translate }} + + + + {{ 'labels.inputs.Language' | translate }} + + @for (lang of languageCodes; track lang) { + + {{ 'languages.' + lang.key | translate }} + + } + + + + {{ 'labels.inputs.Office' | translate }} + + @for (office of officesData; track office) { + + {{ office.name }} + + } + + + + {{ 'labels.inputs.Staff' | translate }} + + @for (staff of staffData; track staff) { + + {{ staff.displayName }} + + } + + + + {{ 'labels.inputs.Roles' | translate }} + + @for (rol of rolesData; track rol) { + + {{ rol.name }} + + } + + + + + {{ 'labels.buttons.Cancel' | translate }} + + + {{ 'labels.buttons.Submit' | translate }} + + + + + + } diff --git a/src/app/zitadel/users/edit-user/edit-user.component.ts b/src/app/zitadel/users/edit-user/edit-user.component.ts index d6b3bc2ef7..73a6dd14d7 100644 --- a/src/app/zitadel/users/edit-user/edit-user.component.ts +++ b/src/app/zitadel/users/edit-user/edit-user.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms'; /** Custom Services */ @@ -20,6 +20,12 @@ import { ZITADEL_LANGUAGES } from 'app/zitadel/constants/languages'; ] }) export class EditUserComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private UsersServiceZitadel = inject(UsersServiceZitadel); + private UsersService = inject(UsersService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** User Data */ userData: any; /** Offices Data */ @@ -35,6 +41,9 @@ export class EditUserComponent implements OnInit { /** Language Codes */ languageCodes = ZITADEL_LANGUAGES; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the offices data from `resolve`. * @param {FormBuilder} formBuilder Form Builder. @@ -44,13 +53,7 @@ export class EditUserComponent implements OnInit { * @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service. * @param {Router} router Router for navigation. */ - constructor( - private formBuilder: UntypedFormBuilder, - private UsersServiceZitadel: UsersServiceZitadel, - private UsersService: UsersService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.route.data.subscribe((data: { user: any; usersTemplate: any }) => { const fullUserData = data.user; this.userData = fullUserData.object?.result?.[0] || {}; diff --git a/src/app/zitadel/users/userZitadel.resolver.ts b/src/app/zitadel/users/userZitadel.resolver.ts index 3e0303c622..7a55958cd4 100644 --- a/src/app/zitadel/users/userZitadel.resolver.ts +++ b/src/app/zitadel/users/userZitadel.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { UsersServiceZitadel } from './usersZitadel.service'; */ @Injectable() export class UserZitadelResolver { + private usersServiceZitadel = inject(UsersServiceZitadel); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {UsersServiceZitadel} usersServiceZitadel Users service. */ - constructor(private usersServiceZitadel: UsersServiceZitadel) {} + constructor() {} /** * Returns the user data. diff --git a/src/app/zitadel/users/users.component.ts b/src/app/zitadel/users/users.component.ts index 3c400b9c3f..24886efb3e 100644 --- a/src/app/zitadel/users/users.component.ts +++ b/src/app/zitadel/users/users.component.ts @@ -1,6 +1,6 @@ import { MatPaginatorModule } from '@angular/material/paginator'; /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortModule } from '@angular/material/sort'; @@ -28,6 +28,11 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; ] }) export class UsersComponent implements OnInit, AfterViewInit { + private route = inject(ActivatedRoute); + private router = inject(Router); + configurationWizardService = inject(ConfigurationWizardService); + private popoverService = inject(PopoverService); + /** User data */ usersData: any[] = []; usersZitadelData: any[] = []; @@ -57,12 +62,10 @@ export class UsersComponent implements OnInit, AfterViewInit { @ViewChild('usersTable') usersTable!: ElementRef; @ViewChild('templateUsersTable') templateUsersTable!: TemplateRef; - constructor( - private route: ActivatedRoute, - private router: Router, - public configurationWizardService: ConfigurationWizardService, - private popoverService: PopoverService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { // Get data from resolver diff --git a/src/app/zitadel/users/usersZitadel-template.resolver.ts b/src/app/zitadel/users/usersZitadel-template.resolver.ts index 74e4f84464..8bae47f97d 100644 --- a/src/app/zitadel/users/usersZitadel-template.resolver.ts +++ b/src/app/zitadel/users/usersZitadel-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -11,10 +11,15 @@ import { UsersServiceZitadel } from './usersZitadel.service'; */ @Injectable() export class UsersZitadelTemplateResolver { + private usersServiceZitadel = inject(UsersServiceZitadel); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param { UsersServiceZitadel } usersServiceZitadel Users service. */ - constructor(private usersServiceZitadel: UsersServiceZitadel) {} + constructor() {} /** * Returns the users template data. diff --git a/src/app/zitadel/users/usersZitadel.resolver.ts b/src/app/zitadel/users/usersZitadel.resolver.ts index f19e9b11ea..7476a09209 100644 --- a/src/app/zitadel/users/usersZitadel.resolver.ts +++ b/src/app/zitadel/users/usersZitadel.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; /** rxjs Imports */ import { Observable } from 'rxjs'; @@ -13,10 +13,15 @@ import { UsersServiceZitadel } from './usersZitadel.service'; @Injectable() export class UsersZitadelResolver { + private usersServiceZitadel = inject(UsersServiceZitadel); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {UsersServiceZitadel} usersServiceZitadel Users service. */ - constructor(private usersServiceZitadel: UsersServiceZitadel) {} + constructor() {} /** * Returns the users data. diff --git a/src/app/zitadel/users/usersZitadel.service.ts b/src/app/zitadel/users/usersZitadel.service.ts index 92df2d2501..8db81e4f47 100644 --- a/src/app/zitadel/users/usersZitadel.service.ts +++ b/src/app/zitadel/users/usersZitadel.service.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -15,15 +15,18 @@ import { environment } from '../../../environments/environment'; providedIn: 'root' }) export class UsersServiceZitadel { + private http = inject(HttpClient); + private autservice = inject(AuthService); + private api = environment.OIDC.oidcApiUrl; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {HttpClient} http Http Client to send requests. */ - constructor( - private http: HttpClient, - private autservice: AuthService - ) {} + constructor() {} /** * @param {any} user User to be created. diff --git a/src/app/zitadel/users/view-user/view-user.component.html b/src/app/zitadel/users/view-user/view-user.component.html index 379e2c941b..8261593fb6 100644 --- a/src/app/zitadel/users/view-user/view-user.component.html +++ b/src/app/zitadel/users/view-user/view-user.component.html @@ -7,27 +7,35 @@ {{ 'labels.buttons.Delete' | translate }} - - - - {{ 'labels.buttons.Change Password' | translate }} - - - - - - {{ 'labels.buttons.Disable' | translate }} - - - - {{ 'labels.buttons.Reactivate' | translate }} - - - - {{ 'labels.buttons.Validate' | translate }} - + @if (userData.isSelfServiceUser === 'USER_STATE_ACTIVE' || userData.isSelfServiceUser === 'USER_STATE_INACTIVE') { + + + + {{ 'labels.buttons.Change Password' | translate }} + + + } + + @switch (userData.isSelfServiceUser) { + @case ('USER_STATE_ACTIVE') { + + + {{ 'labels.buttons.Disable' | translate }} + + } + @case ('USER_STATE_INACTIVE') { + + + {{ 'labels.buttons.Reactivate' | translate }} + + } + @default { + + + {{ 'labels.buttons.Validate' | translate }} + + } + } @@ -59,13 +67,17 @@ {{ userData.lastname }} - - {{ 'labels.inputs.Email' | translate }} - + @if (userData.email) { + + {{ 'labels.inputs.Email' | translate }} + + } - - {{ userData.email }} - + @if (userData.email) { + + {{ userData.email }} + + } {{ 'labels.inputs.Office' | translate }} @@ -80,9 +92,11 @@ - - {{ role.name }} - + @for (role of userData.selectedRoles; track role) { + + {{ role.name }} + + } diff --git a/src/app/zitadel/users/view-user/view-user.component.ts b/src/app/zitadel/users/view-user/view-user.component.ts index 35bacb2eec..7ecd47e795 100644 --- a/src/app/zitadel/users/view-user/view-user.component.ts +++ b/src/app/zitadel/users/view-user/view-user.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; @@ -13,7 +13,6 @@ import { AuthService } from 'app/zitadel/auth.service'; /** Custom Components */ import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component'; import { ChangePasswordDialogComponent } from 'app/zitadel/shared/change-password-dialog/change-password-dialog.component'; -import { strings } from '@angular-devkit/schematics'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; @@ -30,9 +29,18 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; ] }) export class ViewUserComponent { + private usersService = inject(UsersServiceZitadel); + private route = inject(ActivatedRoute); + private router = inject(Router); + private dialog = inject(MatDialog); + private authService = inject(AuthService); + /** User Data. */ userData: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves the user data from `resolve`. * @param {UsersServiceZitadel} usersServiceZitadel Users Service. @@ -40,13 +48,7 @@ export class ViewUserComponent { * @param {Router} router Router for navigation. * @param {MatDialog} dialog Dialog reference. */ - constructor( - private usersService: UsersServiceZitadel, - private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private authService: AuthService - ) { + constructor() { this.route.data.subscribe((data: { user: any }) => { const u = data.user.object?.result?.[0]; diff --git a/src/environments/.env.ts b/src/environments/.env.ts index 54c2477340..33c80f5685 100644 --- a/src/environments/.env.ts +++ b/src/environments/.env.ts @@ -2,8 +2,9 @@ /* tslint:disable */ export default { 'mifos_x': { - 'version': '250828', - 'hash': 'b92f79e2' - } + 'version': '251030', + 'hash': '25a79252' + }, + 'allow_switching_backend_instance': true }; /* tslint:enable */ diff --git a/src/tsconfig.app.json b/src/tsconfig.app.json index 207fb3cab9..77e58d6549 100644 --- a/src/tsconfig.app.json +++ b/src/tsconfig.app.json @@ -12,7 +12,7 @@ "angularCompilerOptions": { "enableIvy": true, "fullTemplateTypeCheck": false, - "preserveWhitespaces": true + "preserveWhitespaces": false }, "files": [ "main.ts", diff --git a/tsconfig.json b/tsconfig.json index cbd94024c9..f505ac6648 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,8 +3,12 @@ "compilerOptions": { "baseUrl": "./", "paths": { - "@pipes/*": ["src/app/pipes/*"], - "app/*": ["src/app/*"] + "@pipes/*": [ + "src/app/pipes/*" + ], + "app/*": [ + "src/app/*" + ] }, "importHelpers": true, "module": "es2022", @@ -12,7 +16,7 @@ "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, - "moduleResolution": "node", + "moduleResolution": "bundler", "emitDecoratorMetadata": true, "experimentalDecorators": true, "noImplicitAny": true,
- {{ 'labels.text.These are predefined postings' | translate }} -
+ {{ 'labels.text.These are predefined postings' | translate }} +
- {{ 'labels.text.Manual journal entry transactions recorded in a journal' | translate }} -
+ {{ 'labels.text.Manual journal entry transactions recorded in a journal' | translate }} +
- {{ 'labels.text.Advanced search option for journal entries' | translate }} -
+ {{ 'labels.text.Advanced search option for journal entries' | translate }} +
- {{ 'labels.text.List of Financial Activities and GL Account Mappings' | translate }} -
+ {{ 'labels.text.List of Financial Activities and GL Account Mappings' | translate }} +
- {{ 'labels.text.Set or update office-level opening balances for GL accounts' | translate }} -
+ {{ 'labels.text.Set or update office-level opening balances for GL accounts' | translate }} +
- {{ 'labels.text.List of accounts used by the organization' | translate }} -
+ {{ 'labels.text.List of accounts used by the organization' | translate }} +
- {{ 'labels.text.Journal entries made at the end of accounting period' | translate }} -
+ {{ 'labels.text.Journal entries made at the end of accounting period' | translate }} +
- {{ 'labels.text.List of all accounting rules' | translate }} -
+ {{ 'labels.text.List of all accounting rules' | translate }} +
- {{ 'labels.text.Accrues income, expenses and liabilities' | translate }} -
+ {{ 'labels.text.Accrues income, expenses and liabilities' | translate }} +
- {{ 'labels.text.Create provisioning entries' | translate }} -
+ {{ 'labels.text.Create provisioning entries' | translate }} +
{{ 'labels.text.Revert this transaction?' | translate }}
{{ 'labels.inputs.Account' | translate }} #:{{ centerViewData.accountNo }} {{ 'labels.inputs.Office' | translate }}: {{ centerViewData.officeName }} - - {{ 'labels.inputs.External Id' | translate }}: - - - - {{ 'labels.inputs.Staff' | translate }}: {{ centerViewData.staffName }} - + @if (centerViewData.externalId) { + + {{ 'labels.inputs.External Id' | translate }}: + + + } + @if (centerViewData.staffName) { + {{ 'labels.inputs.Staff' | translate }}: {{ centerViewData.staffName }} + } {{ 'labels.inputs.Activation Date' | translate }} : {{ centerViewData.activationDate ? (centerViewData.activationDate | dateFormat) : 'Not Activated' }}
- {{ 'labels.inputs.Next Meeting on' | translate }}: - {{ centerViewData.collectionMeetingCalendar?.nextTenRecurringDates[0] | dateFormat }} - - - - {{ 'labels.inputs.Meeting Frequency' | translate }}: - {{ centerViewData.collectionMeetingCalendar?.frequency.value | lowercase }} -
+ {{ 'labels.inputs.Next Meeting on' | translate }}: + {{ centerViewData.collectionMeetingCalendar?.nextTenRecurringDates[0] | dateFormat }} + @if (editMeeting) { + + + + } + {{ 'labels.inputs.Meeting Frequency' | translate }}: + {{ centerViewData.collectionMeetingCalendar?.frequency.value | lowercase }} +
{{ 'labels.inputs.Next Meeting on' | translate }}: {{ 'labels.text.Unassigned' | translate }} @@ -65,21 +78,23 @@
@@ -18,9 +20,8 @@
- {{ 'labels.inputs.Created By' | translate }}: {{ centerNote.createdByUsername }} - {{ 'labels.inputs.Date' | translate }}: {{ centerNote.createdOn | dateFormat }} -
+ {{ 'labels.inputs.Created By' | translate }}: {{ centerNote.createdByUsername }} + {{ 'labels.inputs.Date' | translate }}: {{ centerNote.createdOn | dateFormat }} +
- {{ 'labels.inputs.Street' | translate }} : {{ address.street }} - {{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }} - {{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }} - {{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }} - {{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }} - {{ 'labels.inputs.City' | translate }} : {{ address.city }} - {{ 'labels.inputs.State / Province' | translate }} : - {{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }} - {{ 'labels.inputs.Country' | translate }} : {{ getSelectedValue('countryIdOptions', address.countryId)?.name - }} - {{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }} - {{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }} -
+ @if (isFieldEnabled('street')) { + {{ 'labels.inputs.Street' | translate }} : {{ address.street }} + } + @if (isFieldEnabled('addressLine1')) { + {{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }} + } + @if (isFieldEnabled('addressLine2')) { + {{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }} + } + @if (isFieldEnabled('addressLine3')) { + {{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }} + } + @if (isFieldEnabled('townVillage')) { + {{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }} + } + @if (isFieldEnabled('city')) { + {{ 'labels.inputs.City' | translate }} : {{ address.city }} + } + @if (isFieldEnabled('stateProvinceId')) { + {{ 'labels.inputs.State / Province' | translate }} : + {{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }} + } + @if (isFieldEnabled('countryId')) { + {{ 'labels.inputs.Country' | translate }} : + {{ getSelectedValue('countryIdOptions', address.countryId)?.name }} + } + @if (isFieldEnabled('postalCode')) { + {{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }} + } + @if (isFieldEnabled('isActive')) { + {{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }} + } +
- {{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }} - {{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }} - {{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }} - {{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }} - {{ 'labels.inputs.Relationship' | translate }} : - {{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name' - }} - {{ 'labels.inputs.Age' | translate }} : {{ member.age }} - {{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent ? 'Yes' : 'No' }} - {{ 'labels.inputs.Marital Status' | translate }} : - {{ member.maritalStatusId | find: clientTemplate.familyMemberOptions.maritalStatusIdOptions : 'id' : 'name' - }} - {{ 'labels.inputs.Gender' | translate }} : - {{ member.genderId | find: clientTemplate.familyMemberOptions.genderIdOptions : 'id' : 'name' }} - {{ 'labels.inputs.Profession' | translate }} : - {{ member.professionId | find: clientTemplate.familyMemberOptions.professionIdOptions : 'id' : 'name' }} - {{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }} -
+ {{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }} + {{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }} + {{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }} + {{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }} + {{ 'labels.inputs.Relationship' | translate }} : + {{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name' + }} + {{ 'labels.inputs.Age' | translate }} : {{ member.age }} + {{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent ? 'Yes' : 'No' }} + {{ 'labels.inputs.Marital Status' | translate }} : + {{ member.maritalStatusId | find: clientTemplate.familyMemberOptions.maritalStatusIdOptions : 'id' : 'name' + }} + {{ 'labels.inputs.Gender' | translate }} : + {{ member.genderId | find: clientTemplate.familyMemberOptions.genderIdOptions : 'id' : 'name' }} + {{ 'labels.inputs.Profession' | translate }} : + {{ member.professionId | find: clientTemplate.familyMemberOptions.professionIdOptions : 'id' : 'name' }} + {{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }} +
- {{ 'labels.inputs.Street' | translate }} : {{ address.street }} - {{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }} - {{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }} - {{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }} - {{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }} - {{ 'labels.inputs.City' | translate }} : {{ address.city }} - {{ 'labels.inputs.State / Province' | translate }} : - {{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }} - {{ 'labels.inputs.Country' | translate }} : - {{ getSelectedValue('countryIdOptions', address.countryId)?.name }} - {{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }} - {{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }} -
+ {{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }} + {{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }} + {{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }} + {{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }} + {{ 'labels.inputs.Relationship' | translate }} : + {{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name' + }} + {{ 'labels.inputs.Age' | translate }} : {{ member.age }} + {{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent ? 'Yes' : 'No' }} + {{ 'labels.inputs.Marital Status' | translate }} : + {{ + member.maritalStatusId + | find: clientTemplate.familyMemberOptions.maritalStatusIdOptions : 'id' : 'name' + }} + {{ 'labels.inputs.Gender' | translate }} : + {{ member.genderId | find: clientTemplate.familyMemberOptions.genderIdOptions : 'id' : 'name' }} + {{ 'labels.inputs.Profession' | translate }} : + {{ member.professionId | find: clientTemplate.familyMemberOptions.professionIdOptions : 'id' : 'name' + }} + {{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }} +
{{ 'labels.text.Delete clients signature' | translate }} ?
{{ 'labels.text.Client Signature is not provided.' | translate }}
- {{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }} - {{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }} - {{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }} - {{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }} - {{ 'labels.inputs.Mobile Number' | translate }} : {{ member.mobileNumber }} - {{ 'labels.inputs.Age' | translate }} : {{ member.age }} - {{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent | yesNo }} - {{ 'labels.inputs.Marital Status' | translate }} : {{ member.maritalStatus }} - {{ 'labels.inputs.Gender' | translate }} : {{ member.gender }} - {{ 'labels.inputs.Profession' | translate }} : {{ member.profession }} - {{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }} -
+ @if (member.firstName) { + {{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }} + } + @if (member.middleName) { + {{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }} + } + @if (member.lastName) { + {{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }} + } + @if (member.qualification) { + {{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }} + } + @if (member.mobileNumber) { + {{ 'labels.inputs.Mobile Number' | translate }} : {{ member.mobileNumber }} + } + @if (member.age) { + {{ 'labels.inputs.Age' | translate }} : {{ member.age }} + } + @if (member.isDependent) { + {{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent | yesNo }} + } + @if (member.maritalStatus) { + {{ 'labels.inputs.Marital Status' | translate }} : {{ member.maritalStatus }} + } + @if (member.gender) { + {{ 'labels.inputs.Gender' | translate }} : {{ member.gender }} + } + @if (member.profession) { + {{ 'labels.inputs.Profession' | translate }} : {{ member.profession }} + } + @if (member.dateOfBirth) { + {{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }} + } +
- {{ 'labels.inputs.Next Meeting on' | translate }}: - {{ groupViewData.collectionMeetingCalendar?.nextTenRecurringDates[0] | dateFormat }} - - {{ 'labels.inputs.Meeting Frequency' | translate }}: - {{ groupViewData.collectionMeetingCalendar?.frequency.value | lowercase }} -
+ {{ 'labels.inputs.Next Meeting on' | translate }}: + {{ groupViewData.collectionMeetingCalendar?.nextTenRecurringDates[0] | dateFormat }} + @if (editMeeting) { + + } + + {{ 'labels.inputs.Meeting Frequency' | translate }}: + {{ groupViewData.collectionMeetingCalendar?.frequency.value | lowercase }} +
{{ 'labels.inputs.Next Meeting on' | translate }}: {{ 'labels.inputs.Unassigned' | translate }} @@ -58,20 +64,22 @@
{{ 'labels.text.No Data' | translate }}
{{ 'labels.inputs.Create standing instructions at disbursement' | translate }}
{{ 'labels.inputs.Is Equal Amortization' | translate }}
{{ 'labels.inputs.Is Floating Rate' | translate }}?
{{ 'labels.inputs.Loan Schedule Type' | translate }}
{{ loanScheduleType.value | translateKey: 'catalogs' }}
{{ 'labels.inputs.Calculate interest for exact days in partial period' | translate }}
{{ 'labels.inputs.Is interest recognition on disbursement date?' | translate }}
- {{ 'labels.inputs.Delinquency Bucket' | translate }} - {{ loanProduct?.delinquencyBucket.name }} -
{{ 'labels.inputs.Enable installment level Delinquency' | translate }}
+ {{ 'labels.inputs.Delinquency Bucket' | translate }} + {{ loanProduct?.delinquencyBucket.name }} +
{{ 'labels.inputs.Is Topup Loan' | translate }}?
Welcome! You are logged in.
{{ protectedData | json }}
- {{ 'labels.text.Passwords' | translate }} {{ 'labels.text.do not match' | translate }} -
+ {{ 'labels.text.Passwords' | translate }} {{ 'labels.text.do not match' | translate }} +
{{ 'labels.text.Please select a delivery method' | translate }}:
{{ 'labels.text.Please enter the OTP' | translate }}:
- {{ 'labels.inputs.External Id' | translate }}: - -
+ {{ 'labels.inputs.External Id' | translate }}: + +
- {{ 'labels.inputs.External Id' | translate }}: -
+ {{ 'labels.inputs.External Id' | translate }}: +
- {{ 'labels.text.Download, Upload Offices Template' | translate }} -
+ {{ 'labels.text.Download, Upload Offices Template' | translate }} +
- {{ 'labels.text.Download offices template and Upload office excel files' | translate }} -
+ {{ 'labels.text.Download offices template and Upload office excel files' | translate }} +
- {{ 'labels.text.Download groups template and Upload group excel files' | translate }} -
+ {{ 'labels.text.Download groups template and Upload group excel files' | translate }} +
- {{ 'labels.text.Download loan accounts template and upload loan account excel files' | translate }} -
+ {{ 'labels.text.Download loan accounts template and upload loan account excel files' | translate }} +
- {{ 'labels.text.Download savings accounts template and upload savings account excel files' | translate }} -
+ {{ + 'labels.text.Download savings accounts template and upload savings account excel files' | translate + }} +
- {{ - 'labels.text.Download fixed deposit accounts template and upload fixed deposit account excel files' - | translate - }} -
+ {{ + 'labels.text.Download fixed deposit accounts template and upload fixed deposit account excel files' + | translate + }} +
- {{ - 'labels.text.Download chart of accounts template and upload chart of account excel files' | translate - }} -
+ {{ + 'labels.text.Download chart of accounts template and upload chart of account excel files' | translate + }} +
- {{ 'labels.text.Download share accounts template and upload share account excel files' | translate }} -
+ {{ 'labels.text.Download share accounts template and upload share account excel files' | translate }} +
- {{ 'labels.text.Download clients template and upload clients excel files' | translate }} -
+ {{ 'labels.text.Download clients template and upload clients excel files' | translate }} +
- {{ 'labels.text.Download centers template and upload centers excel files' | translate }} -
+ {{ 'labels.text.Download centers template and upload centers excel files' | translate }} +
- {{ 'labels.text.Download loan repayments template and upload loan repayment excel files' | translate }} -
+ {{ 'labels.text.Download loan repayments template and upload loan repayment excel files' | translate }} +
- {{ - 'labels.text.Download savings transactions template and upload savings transaction excel files' - | translate - }} -
+ {{ + 'labels.text.Download savings transactions template and upload savings transaction excel files' + | translate + }} +
- {{ - 'labels.text.Download fixed deposit transactions template and upload fixed deposit transaction excel files' - | translate - }} -
+ {{ + 'labels.text.Download fixed deposit transactions template and upload fixed deposit transaction excel files' + | translate + }} +
- {{ - 'labels.text.Download recurring deposit transactions template and upload recurring deposit transaction excel files' - | translate - }} -
+ {{ + 'labels.text.Download recurring deposit transactions template and upload recurring deposit transaction excel files' + | translate + }} +
- {{ 'labels.text.Download journal entries template and upload journal entries excel files' | translate }} -
+ {{ 'labels.text.Download journal entries template and upload journal entries excel files' | translate }} +
- {{ 'labels.text.Download guarantors template and upload guarantor excel files' | translate }} -
+ {{ 'labels.text.Download guarantors template and upload guarantor excel files' | translate }} +
- {{ 'labels.text.Add new office or modify or deactivate office' | translate }} -
+ {{ 'labels.text.Add new office or modify or deactivate office' | translate }} +
- {{ 'labels.text.Define holidays for office' | translate }} -
+ {{ 'labels.text.Define holidays for office' | translate }} +
- {{ 'labels.text.Employee represents loan officers' | translate }} -
+ {{ 'labels.text.Employee represents loan officers' | translate }} +
- {{ 'labels.text.View logged history' | translate }} -
+ {{ 'labels.text.View logged history' | translate }} +
- {{ 'labels.text.View the loan account details associated with the investors' | translate }} -
+ {{ 'labels.text.View the loan account details associated with the investors' | translate }} +
- {{ 'labels.text.Bulk entry screen for mapping' | translate }} -
+ {{ 'labels.text.Bulk entry screen for mapping' | translate }} +
- {{ 'labels.text.The usage of stronger passwords' | translate }} -
+ {{ 'labels.text.The usage of stronger passwords' | translate }} +
- {{ 'labels.text.Loan Provisioning Criteria Organization' | translate }} -
+ {{ 'labels.text.Loan Provisioning Criteria Organization' | translate }} +
- {{ 'labels.text.Entity Data Table Checks Organization' | translate }} -
+ {{ 'labels.text.Entity Data Table Checks Organization' | translate }} +
- {{ 'labels.text.Currencies available across organization' | translate }} -
+ {{ 'labels.text.Currencies available across organization' | translate }} +
- {{ 'labels.text.Funds are associated with loans' | translate }} -
+ {{ 'labels.text.Funds are associated with loans' | translate }} +
- {{ 'labels.text.Easy way to reassign all the loan' | translate }} -
+ {{ 'labels.text.Easy way to reassign all the loan' | translate }} +
- {{ 'labels.text.Manage Tellers / Cashiers' | translate }} -
+ {{ 'labels.text.Manage Tellers / Cashiers' | translate }} +
- {{ 'labels.text.Working days and configure behaviour of payments' | translate }} -
+ {{ 'labels.text.Working days and configure behaviour of payments' | translate }} +
- {{ 'labels.text.Manage payment types' | translate }} -
+ {{ 'labels.text.Manage payment types' | translate }} +
- {{ 'labels.text.Define SMS Campaigns for Organization' | translate }} -
+ {{ 'labels.text.Define SMS Campaigns for Organization' | translate }} +
- {{ 'labels.text.Define AdHocQuery for Organization' | translate }} -
+ {{ 'labels.text.Define AdHocQuery for Organization' | translate }} +
- {{ 'labels.text.Bulk data import using excel spreadsheet templates' | translate }} -
+ {{ 'labels.text.Bulk data import using excel spreadsheet templates' | translate }} +
- {{ 'labels.text.Define delinquency day ranges' | translate }} -
+ {{ 'labels.text.Define delinquency day ranges' | translate }} +
- {{ 'labels.text.Define delinquency bucket as set of ranges' | translate }} -
+ {{ 'labels.text.Define delinquency bucket as set of ranges' | translate }} +
- {{ 'labels.heading.Define Tax Components' | translate }} -
+ {{ 'labels.heading.Define Tax Components' | translate }} +
- {{ 'labels.heading.Define Tax Groups' | translate }} -
+ {{ 'labels.heading.Define Tax Groups' | translate }} +
- {{ 'labels.text.Add new loan product or modify or inactivate loan product' | translate }} -
+ {{ 'labels.text.Add new loan product or modify or inactivate loan product' | translate }} +
- {{ 'labels.text.Add new savings product or modify or inactivate savings product' | translate }} -
+ {{ 'labels.text.Add new savings product or modify or inactivate savings product' | translate }} +
- {{ 'labels.text.Add new share product or modify or inactivate share product' | translate }} -
+ {{ 'labels.text.Add new share product or modify or inactivate share product' | translate }} +
- {{ - 'labels.text.Define charges/penalties for loan products, savings and deposit products' - | translate - }} -
+ {{ + 'labels.text.Define charges/penalties for loan products, savings and deposit products' + | translate + }} +
- {{ 'labels.text.Define collaterals for Collateral Management' | translate }} -
+ {{ 'labels.text.Define collaterals for Collateral Management' | translate }} +
- {{ 'labels.text.Define delinquency day ranges and bucket set for loan products' | translate }} -
+ {{ 'labels.text.Define delinquency day ranges and bucket set for loan products' | translate }} +
- {{ 'labels.text.Defines rules for taking multiple rules' | translate }} -
+ {{ 'labels.text.Defines rules for taking multiple rules' | translate }} +
- {{ 'labels.text.Add, modify or inactivate a Fixed deposit product' | translate }} -
+ {{ 'labels.text.Add, modify or inactivate a Fixed deposit product' | translate }} +
- {{ 'labels.text.Add, modify or inactivate a Recurring Deposit product' | translate }} -
+ {{ 'labels.text.Add, modify or inactivate a Recurring Deposit product' | translate }} +
- {{ 'labels.text.Define Tax components and Tax groups' | translate }} -
+ {{ 'labels.text.Define Tax components and Tax groups' | translate }} +
- {{ 'labels.text.Define floating rates for loan products' | translate }} -
+ {{ 'labels.text.Define floating rates for loan products' | translate }} +
- {{ 'labels.text.Are you sure you want to leave this page and lose all inputted data' | translate }}? -
- {{ 'labels.text.Are you sure you want to cancel' | translate }} {{ data.cancelContext }} ? -
{{ 'labels.text.Are you sure you want to leave this page and lose all inputted data' | translate }}?
{{ 'labels.text.Are you sure you want to cancel' | translate }} {{ data.cancelContext }} ?
- {{ 'labels.commons.Password validation' | translate: { minchar: minPasswordLength } }} -
+ {{ 'labels.commons.Password validation' | translate: { minchar: minPasswordLength } }} +
- {{ 'Passwords do not match' | translateKey: 'inputs' }} -
+ {{ 'Passwords do not match' | translateKey: 'inputs' }} +
{{ data }}
'); } } diff --git a/src/app/shared/external-identifier/external-identifier.component.html b/src/app/shared/external-identifier/external-identifier.component.html index 55899e3211..2738d1a9f6 100644 --- a/src/app/shared/external-identifier/external-identifier.component.html +++ b/src/app/shared/external-identifier/external-identifier.component.html @@ -1,16 +1,24 @@ - - - - {{ externalId | externalIdentifier }} - {{ externalId }} - - - +@if (!emptyValue) { + + @if (displayL && iconVisible) { + + } + @if (displayL && !completed && iconVisible && isLongValue()) { + + } + @if (!completed) { + {{ externalId | externalIdentifier }} + } + @if (completed) { + {{ externalId }} + } + @if (displayR && !completed && iconVisible && isLongValue()) { + + } + @if (displayR && iconVisible) { + + } + +} diff --git a/src/app/shared/external-identifier/external-identifier.component.ts b/src/app/shared/external-identifier/external-identifier.component.ts index 2f5f6b7580..0f5bd8dc34 100644 --- a/src/app/shared/external-identifier/external-identifier.component.ts +++ b/src/app/shared/external-identifier/external-identifier.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { Clipboard } from '@angular/cdk/clipboard'; import { AlertService } from 'app/core/alert/alert.service'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @@ -16,6 +16,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ExternalIdentifierComponent implements OnInit { + private clipboard = inject(Clipboard); + private alertService = inject(AlertService); + @Input() externalId: string; @Input() completed = false; @Input() display = 'right'; @@ -25,10 +28,10 @@ export class ExternalIdentifierComponent implements OnInit { displayR = true; emptyValue = false; - constructor( - private clipboard: Clipboard, - private alertService: AlertService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.emptyValue = !this.externalId || this.externalId === ''; diff --git a/src/app/shared/footer/footer.component.html b/src/app/shared/footer/footer.component.html index 7c3eefa0b7..66c48c161a 100644 --- a/src/app/shared/footer/footer.component.html +++ b/src/app/shared/footer/footer.component.html @@ -1,35 +1,41 @@ - - - +} {{ 'APP_NAME' | translate }} {{ 'labels.text.by' | translate }} Mifos diff --git a/src/app/shared/footer/footer.component.ts b/src/app/shared/footer/footer.component.ts index 36d21b3aeb..c048e6d6b6 100644 --- a/src/app/shared/footer/footer.component.ts +++ b/src/app/shared/footer/footer.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Input, OnDestroy, OnInit } from '@angular/core'; +import { Component, Input, OnDestroy, OnInit, inject } from '@angular/core'; import { Alert } from 'app/core/alert/alert.model'; import { AlertService } from 'app/core/alert/alert.service'; import { AuthenticationService } from 'app/core/authentication/authentication.service'; @@ -11,7 +11,7 @@ import { VersionService } from 'app/system/version.service'; /** Environment Configuration */ import { environment } from '../../../environments/environment'; import { Subscription } from 'rxjs'; -import { NgIf, NgClass, DatePipe } from '@angular/common'; +import { NgClass, DatePipe } from '@angular/common'; import { MatDivider } from '@angular/material/divider'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -30,6 +30,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class FooterComponent implements OnInit, OnDestroy { + private systemService = inject(SystemService); + private settingsService = inject(SettingsService); + private authenticationService = inject(AuthenticationService); + private alertService = inject(AlertService); + private dateUtils = inject(Dates); + private versionService = inject(VersionService); + @Input() styleClass: string = ''; /** Mifos X version. */ @@ -54,14 +61,10 @@ export class FooterComponent implements OnInit, OnDestroy { displayBackEndInfo = true; - constructor( - private systemService: SystemService, - private settingsService: SettingsService, - private authenticationService: AuthenticationService, - private alertService: AlertService, - private dateUtils: Dates, - private versionService: VersionService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.displayBackEndInfo = environment.displayBackEndInfo === 'true'; } diff --git a/src/app/shared/form-dialog/form-dialog.component.html b/src/app/shared/form-dialog/form-dialog.component.html index 4fc3ba965f..21400e4d92 100644 --- a/src/app/shared/form-dialog/form-dialog.component.html +++ b/src/app/shared/form-dialog/form-dialog.component.html @@ -8,9 +8,11 @@ {{ data.title }} 'responsive-column' ]" > - - - + @for (formfield of formfields; track formfield) { + + + + } diff --git a/src/app/shared/form-dialog/form-dialog.component.ts b/src/app/shared/form-dialog/form-dialog.component.ts index 88177e9bf8..139b33a429 100644 --- a/src/app/shared/form-dialog/form-dialog.component.ts +++ b/src/app/shared/form-dialog/form-dialog.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -13,7 +13,7 @@ import { FormfieldBase } from './formfield/model/formfield-base'; import { FormGroupService } from './form-group.service'; import { CdkScrollable } from '@angular/cdk/scrolling'; -import { NgClass, NgFor } from '@angular/common'; +import { NgClass } from '@angular/common'; import { FormfieldComponent } from './formfield/formfield.component'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -35,6 +35,10 @@ const layoutGap = 2; ] }) export class FormDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + private formGroupService = inject(FormGroupService); + layout: { columns: number; columnWidth?: number; @@ -54,11 +58,12 @@ export class FormDialogComponent implements OnInit { formfields: FormfieldBase[]; pristine: boolean; - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any, - private formGroupService: FormGroupService - ) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { + const data = this.data; + this.dialogRef.disableClose = data.disableClose !== undefined ? data.disableClose : true; this.formfields = data.formfields.sort( (formfieldA: FormfieldBase, formfieldB: FormfieldBase) => formfieldA.order - formfieldB.order diff --git a/src/app/shared/form-dialog/formfield/formfield.component.html b/src/app/shared/form-dialog/formfield/formfield.component.html index 360bea335e..7cf6a9298f 100644 --- a/src/app/shared/form-dialog/formfield/formfield.component.html +++ b/src/app/shared/form-dialog/formfield/formfield.component.html @@ -1,80 +1,95 @@ - - - {{ formfield.label }} + @if (formfield.controlType === 'input' || formfield.controlType === 'select') { + + + {{ formfield.label }} + @if (formfield.controlType === 'input') { + + } + @if (form.controls[formfield.controlName].hasError('max')) { + + {{ 'labels.commons.Maximum Value must be' | translate }} {{ formfield.max }} + + } + @if (form.controls[formfield.controlName].hasError('min')) { + + {{ 'labels.commons.Minimum Value must be' | translate }} {{ formfield.min }} + + } + @if (formfield.controlType === 'select') { + + @for (option of formfield.options.data; track option) { + + {{ option[formfield.options.label] }} + + } + + } + @if (form.controls[formfield.controlName].hasError('required')) { + + {{ formfield.label }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + + } + @if (formfield.controlType === 'datepicker') { + + {{ formfield.label }} - - {{ 'labels.commons.Maximum Value must be' | translate }} {{ formfield.max }} - - - {{ 'labels.commons.Minimum Value must be' | translate }} {{ formfield.min }} - + + + @if (form.controls[formfield.controlName].hasError('required')) { + + {{ formfield.label }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + + } - + {{ formfield.label }} + - - {{ option[formfield.options.label] }} - - - - - {{ formfield.label }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + /> + @if (form.controls[formfield.controlName].hasError('required')) { + + {{ formfield.label }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } - - - - {{ formfield.label }} - - - - - {{ formfield.label }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - + } - - {{ formfield.label }} - - - {{ formfield.label }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ formfield.label }} - + > + {{ formfield.label }} + + } diff --git a/src/app/shared/icons.module.ts b/src/app/shared/icons.module.ts index 3b07074325..39920a40cd 100644 --- a/src/app/shared/icons.module.ts +++ b/src/app/shared/icons.module.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { NgModule } from '@angular/core'; +import { NgModule, inject } from '@angular/core'; /** Angular Font Awesome Imports */ import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome'; @@ -124,7 +124,12 @@ import { exports: [FontAwesomeModule] }) export class IconsModule { - constructor(library: FaIconLibrary) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { + const library = inject(FaIconLibrary); + library.addIcons( faAnchor, faArchive, diff --git a/src/app/shared/input-amount/input-amount.component.html b/src/app/shared/input-amount/input-amount.component.html index 7e79760022..bf4475e25d 100644 --- a/src/app/shared/input-amount/input-amount.component.html +++ b/src/app/shared/input-amount/input-amount.component.html @@ -1,40 +1,50 @@ - - {{ 'labels.inputs.' + inputLabel | translate }} - - {{ currency.code }} +@if (isRequired) { + + {{ 'labels.inputs.' + inputLabel | translate }} + + {{ currency.code }} + + + @if (inputFormControl.hasError('required')) { + + {{ 'labels.inputs.' + inputLabel | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } + @if (displayHint) { + {{ + inputFormControl.value | currency: currency.code : currency.displaySymbol : '1.2-2' + }} + } + +} +@if (!isRequired) { + + {{ 'labels.inputs.' + inputLabel | translate }} + {{ currency.code }} + - - - {{ 'labels.inputs.' + inputLabel | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - {{ - inputFormControl.value | currency: currency.code : currency.displaySymbol : '1.2-2' - }} - - - {{ 'labels.inputs.' + inputLabel | translate }} - {{ currency.code }} - - - {{ - inputFormControl.value | currency: currency.code : currency.displaySymbol : '1.2-2' - }} - + @if (displayHint) { + {{ + inputFormControl.value | currency: currency.code : currency.displaySymbol : '1.2-2' + }} + } + +} diff --git a/src/app/shared/input-amount/input-amount.component.ts b/src/app/shared/input-amount/input-amount.component.ts index 3a4eb68817..a28cf16f9f 100644 --- a/src/app/shared/input-amount/input-amount.component.ts +++ b/src/app/shared/input-amount/input-amount.component.ts @@ -1,7 +1,7 @@ import { Component, Input } from '@angular/core'; import { Currency } from '../models/general.model'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; -import { NgIf, CurrencyPipe } from '@angular/common'; +import { CurrencyPipe } from '@angular/common'; import { MatFormField, MatLabel, MatError, MatHint, MatSuffix } from '@angular/material/form-field'; import { FormatAmountDirective } from '../../directives/format-amount.directive'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; diff --git a/src/app/shared/input-password/input-password.component.html b/src/app/shared/input-password/input-password.component.html index 9a5061c273..ed65556733 100644 --- a/src/app/shared/input-password/input-password.component.html +++ b/src/app/shared/input-password/input-password.component.html @@ -11,6 +11,10 @@ [value]="value" /> {{ icon }} - {{ label }} is a required field. - {{ customErrorMessage }} + @if (ngControl.hasError('required')) { + {{ label }} is a required field. + } + @if (ngControl.hasError(customErrorName)) { + {{ customErrorMessage }} + } diff --git a/src/app/shared/input-password/input-password.component.ts b/src/app/shared/input-password/input-password.component.ts index fefa12f2e4..79cb18fe84 100644 --- a/src/app/shared/input-password/input-password.component.ts +++ b/src/app/shared/input-password/input-password.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, Optional, Self, ViewChild } from '@angular/core'; +import { Component, Input, ViewChild, inject } from '@angular/core'; import { AbstractControl, ControlValueAccessor, @@ -22,6 +22,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class InputPasswordComponent implements ControlValueAccessor, ErrorStateMatcher { + ngControl = inject(NgControl, { optional: true, self: true }); + disabled = false; icon = 'visibility_off'; @@ -61,7 +63,12 @@ export class InputPasswordComponent implements ControlValueAccessor, ErrorStateM private _visible = false; - constructor(@Optional() @Self() public ngControl: NgControl) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { + const ngControl = this.ngControl; + if (ngControl !== null) { ngControl.valueAccessor = this; } diff --git a/src/app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component.html b/src/app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component.html index af94c4c659..c84c542e2c 100644 --- a/src/app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component.html +++ b/src/app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component.html @@ -2,25 +2,33 @@ {{ 'labels.heading.Keyboard Shortcuts' | translate }} - + @for (item of buttonConfig.buttonCombinations; track item) { - - {{ 'labels.inputs.Ctrl' | translate }} + - - - {{ 'labels.inputs.Shift' | translate }} + - - - {{ 'labels.inputs.Alt' | translate }} + - - - {{ item.key }} + @if (item.ctrlKey) { + + {{ 'labels.inputs.Ctrl' | translate }} + + + } + @if (item.shiftKey) { + + {{ 'labels.inputs.Shift' | translate }} + + + } + @if (item.altKey) { + + {{ 'labels.inputs.Alt' | translate }} + + + } + @if (item.key) { + + {{ item.key }} + } {{ item.title }} - + } diff --git a/src/app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component.ts b/src/app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component.ts index acba005c77..3e3ccd61f1 100644 --- a/src/app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component.ts +++ b/src/app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; import { KeyboardShortcutsConfiguration } from '../../keyboards-shortcut-config'; import { CdkScrollable } from '@angular/cdk/scrolling'; @@ -21,13 +21,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class KeyboardShortcutsDialogComponent implements OnInit { + dialogRef = inject>(MatDialogRef); + buttonConfig: KeyboardShortcutsConfiguration; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Provides a deleteContext. */ - constructor(public dialogRef: MatDialogRef) {} + constructor() {} ngOnInit() { this.dialogRef.updateSize(`800px`); diff --git a/src/app/shared/language-selector/language-selector.component.html b/src/app/shared/language-selector/language-selector.component.html index 903a76ca38..c8eacfd024 100644 --- a/src/app/shared/language-selector/language-selector.component.html +++ b/src/app/shared/language-selector/language-selector.component.html @@ -1,8 +1,10 @@ {{ 'labels.inputs.Language' | translate }} - - {{ 'languages.' + language | translate }} - + @for (language of languages; track language) { + + {{ 'languages.' + language | translate }} + + } diff --git a/src/app/shared/language-selector/language-selector.component.ts b/src/app/shared/language-selector/language-selector.component.ts index 6a56a5a2a6..dd7d0dae97 100644 --- a/src/app/shared/language-selector/language-selector.component.ts +++ b/src/app/shared/language-selector/language-selector.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; /** Custom Services */ @@ -22,17 +22,20 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class LanguageSelectorComponent { + private translateService = inject(TranslateService); + private settingsService = inject(SettingsService); + /** Language selector form control. */ languageSelector = new UntypedFormControl(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Sets the language of the application in the selector on initial setup. * @param {TranslateService} translateService Translate Service. */ - constructor( - private translateService: TranslateService, - private settingsService: SettingsService - ) { + constructor() { this.languageSelector.setValue(this.currentLanguage); } diff --git a/src/app/shared/long-text/long-text.component.html b/src/app/shared/long-text/long-text.component.html index 47ff2f21b4..a99cf9a3cd 100644 --- a/src/app/shared/long-text/long-text.component.html +++ b/src/app/shared/long-text/long-text.component.html @@ -1,7 +1,13 @@ - - - {{ textValue | truncateText: printChars }}... - {{ textValue }} - +@if (!emptyValue) { + + @if (isLongValue()) { + + } + @if (isLongValue()) { + {{ textValue | truncateText: printChars }}... + } + @if (!isLongValue()) { + {{ textValue }} + } + +} diff --git a/src/app/shared/notifications-tray/notifications-tray.component.html b/src/app/shared/notifications-tray/notifications-tray.component.html index c08fc4c905..cc6e7a1966 100644 --- a/src/app/shared/notifications-tray/notifications-tray.component.html +++ b/src/app/shared/notifications-tray/notifications-tray.component.html @@ -13,29 +13,26 @@ - - - {{ 'labels.menus.Notifications' | translate }} - - {{ 'labels.text.No notifications' | translate }} - + @if (unreadNotifications.length === 0) { + + + {{ 'labels.menus.Notifications' | translate }} + + {{ 'labels.text.No notifications' | translate }} + + } - - {{ notification.content }}* - [{{ notification.createdAt }}] - + @for (notification of unreadNotifications; track notification) { + + {{ notification.content }}* + [{{ notification.createdAt }}] + + } - - {{ notification.content }} - [{{ notification.createdAt }}] - + @for (notification of displayedReadNotifications; track notification) { + + {{ notification.content }} + [{{ notification.createdAt }}] + + } diff --git a/src/app/shared/notifications-tray/notifications-tray.component.ts b/src/app/shared/notifications-tray/notifications-tray.component.ts index 53a175dc90..6324f95f90 100644 --- a/src/app/shared/notifications-tray/notifications-tray.component.ts +++ b/src/app/shared/notifications-tray/notifications-tray.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, OnDestroy, ViewEncapsulation } from '@angular/core'; +import { Component, OnInit, OnDestroy, ViewEncapsulation, inject } from '@angular/core'; /** RxJS Imports */ import { forkJoin } from 'rxjs'; @@ -36,6 +36,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class NotificationsTrayComponent implements OnInit, OnDestroy { + notificationsService = inject(NotificationsService); + /** Wait time between API status calls 60 seg */ waitTime = environment.waitTimeForNotifications || 60; /** Read Notifications */ @@ -64,10 +66,13 @@ export class NotificationsTrayComponent implements OnInit, OnDestroy { loanProduct: '/products/loan-products/' }; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {NotificationsService} notificationsService Notifications Service */ - constructor(public notificationsService: NotificationsService) { + constructor() { forkJoin([ this.notificationsService.getNotifications(true, 9), this.notificationsService.getNotifications(false, 9)]).subscribe((response: any[]) => { diff --git a/src/app/shared/search-tool/search-tool.component.html b/src/app/shared/search-tool/search-tool.component.html index 16083fcfaa..c0e950e7b3 100644 --- a/src/app/shared/search-tool/search-tool.component.html +++ b/src/app/shared/search-tool/search-tool.component.html @@ -1,19 +1,22 @@ - - - {{ 'labels.text.Search' | translate }} - - - - - {{ 'labels.inputs.Resource' | translate }} - - - {{ 'labels.text.' + option.name | translate }} - - - - + @if (searchVisible) { + + + {{ 'labels.text.Search' | translate }} + + + + {{ 'labels.inputs.Resource' | translate }} + + @for (option of resourceOptions; track option) { + + {{ 'labels.text.' + option.name | translate }} + + } + + + + } diff --git a/src/app/shared/search-tool/search-tool.component.ts b/src/app/shared/search-tool/search-tool.component.ts index 452da202e1..f8f1876d3a 100644 --- a/src/app/shared/search-tool/search-tool.component.ts +++ b/src/app/shared/search-tool/search-tool.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { style, animate, transition, trigger } from '@angular/animations'; import { Router } from '@angular/router'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; @@ -34,6 +34,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SearchToolComponent { + private router = inject(Router); + /** Query Form Control */ query = new UntypedFormControl(''); /** Resource Form Control */ @@ -69,10 +71,13 @@ export class SearchToolComponent { } ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {Router} router Router */ - constructor(private router: Router) { + constructor() { this.resource.patchValue('clients,clientIdentifiers,groups,savings,shares,loans'); } diff --git a/src/app/shared/server-selector/server-selector.component.html b/src/app/shared/server-selector/server-selector.component.html index a9ff7558a1..72496177dd 100644 --- a/src/app/shared/server-selector/server-selector.component.html +++ b/src/app/shared/server-selector/server-selector.component.html @@ -1,31 +1,36 @@ - - {{ 'labels.inputs.Server' | translate }} - - - - - - language - {{ 'labels.placeholders.Add new server' | translate }} - - - {{ 'labels.inputs.Url' | translate }} {{ 'labels.commons.is required' | translate }} - - - - - {{ 'labels.buttons.Add' | translate }} - - - - - - {{ server }} - - - +@if (existMoreThanOneServer) { + + {{ 'labels.inputs.Server' | translate }} + + + + + + language + {{ 'labels.placeholders.Add new server' | translate }} + + @if (form.controls.url.hasError('required')) { + + {{ 'labels.inputs.Url' | translate }} {{ 'labels.commons.is required' | translate }} + + } + + + {{ 'labels.buttons.Add' | translate }} + + + + + @for (server of servers; track server) { + + {{ server }} + + } + + +} diff --git a/src/app/shared/server-selector/server-selector.component.ts b/src/app/shared/server-selector/server-selector.component.ts index cf7dcb1193..ff57da0730 100644 --- a/src/app/shared/server-selector/server-selector.component.ts +++ b/src/app/shared/server-selector/server-selector.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { UntypedFormBuilder, Validators } from '@angular/forms'; @@ -23,6 +23,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ServerSelectorComponent implements OnInit { + private settingsService = inject(SettingsService); + dialog = inject(MatDialog); + private formBuilder = inject(UntypedFormBuilder); + /** Input server. */ form: any; @@ -35,14 +39,13 @@ export class ServerSelectorComponent implements OnInit { /** Server list to show */ existMoreThanOneServer = false; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SettingsService} settingsService Settings Service */ - constructor( - private settingsService: SettingsService, - public dialog: MatDialog, - private formBuilder: UntypedFormBuilder - ) {} + constructor() {} ngOnInit(): void { this.servers = this.settingsService.servers; diff --git a/src/app/shared/tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component.html b/src/app/shared/tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component.html index 0fbc194850..a35fec7b57 100644 --- a/src/app/shared/tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component.html +++ b/src/app/shared/tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component.html @@ -10,47 +10,52 @@ {{ datatableName }} - - - - {{ 'labels.buttons.Delete Selected' | translate }} - - + @if (isSelected) { + + + + {{ 'labels.buttons.Delete Selected' | translate }} + + + } - 0"> - - - {{ 'labels.buttons.Delete All' | translate }} - - + @if (datatableData.length > 0) { + + + + {{ 'labels.buttons.Delete All' | translate }} + + + } - - - - - - - + @for (datatableColumn of datatableColumns; track datatableColumn; let i = $index) { + + @if (i === 0) { + + + + + + } + @if (i > 0) { + {{ getInputName(datatableColumn) }} + + {{ formatValue(data, datatableColumn) }} + + } - - 0"> - {{ getInputName(datatableColumn) }} - - {{ formatValue(data, datatableColumn) }} - - - + } diff --git a/src/app/shared/tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component.ts b/src/app/shared/tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component.ts index 3d77caca30..7a660bd70c 100644 --- a/src/app/shared/tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component.ts +++ b/src/app/shared/tabs/entity-datatable-tab/datatable-multi-row/datatable-multi-row.component.ts @@ -1,6 +1,6 @@ import { SelectionModel } from '@angular/cdk/collections'; -import { DecimalPipe, NgIf, NgFor, NgClass } from '@angular/common'; -import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from '@angular/core'; +import { DecimalPipe, NgClass } from '@angular/common'; +import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild, inject } from '@angular/core'; import { MatCheckboxChange as MatCheckboxChange, MatCheckbox } from '@angular/material/checkbox'; import { MatDialog } from '@angular/material/dialog'; import { @@ -51,6 +51,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DatatableMultiRowComponent implements OnInit, OnDestroy, OnChanges { + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private systemService = inject(SystemService); + private settingsService = inject(SettingsService); + private dialog = inject(MatDialog); + private datatables = inject(Datatables); + private dateFormat = inject(DateFormatPipe); + private dateTimeFormat = inject(DatetimeFormatPipe); + private numberFormat = inject(DecimalPipe); + SELECT_NAME_FIELD = 'select'; /** Data Object */ @Input() dataObject: any; @@ -74,6 +84,9 @@ export class DatatableMultiRowComponent implements OnInit, OnDestroy, OnChanges /** Data Table Reference */ @ViewChild('dataTable') dataTableRef: MatTable; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches center Id from parent route params. * @param {ActivatedRoute} route Activated Route. @@ -83,17 +96,7 @@ export class DatatableMultiRowComponent implements OnInit, OnDestroy, OnChanges * @param {MatDialog} dialog Mat Dialog. * @param {Datatables} datatables Datatable utils */ - constructor( - private route: ActivatedRoute, - private dateUtils: Dates, - private systemService: SystemService, - private settingsService: SettingsService, - private dialog: MatDialog, - private datatables: Datatables, - private dateFormat: DateFormatPipe, - private dateTimeFormat: DatetimeFormatPipe, - private numberFormat: DecimalPipe - ) {} + constructor() {} /** * Fetches data table name from route params. diff --git a/src/app/shared/tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component.html b/src/app/shared/tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component.html index d42b7bdd0d..79dcb86c24 100644 --- a/src/app/shared/tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component.html +++ b/src/app/shared/tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component.html @@ -1,70 +1,92 @@ {{ datatableName }} - - {{ 'labels.buttons.Add' | translate }} - - - {{ 'labels.buttons.Edit' | translate }} - - - {{ 'labels.buttons.Delete' | translate }} - + @if (!dataObject.data[0]) { + + {{ 'labels.buttons.Add' | translate }} + + } + @if (dataObject.data[0]) { + + {{ 'labels.buttons.Edit' | translate }} + + } + @if (dataObject.data[0]) { + + {{ 'labels.buttons.Delete' | translate }} + + } - 0"> - - - {{ columnHeader.columnDisplayName }} - {{ getInputName(columnHeader.columnName) }} - - - - - {{ dataObject.data[0].row[i] | dateFormat }} - - - {{ dataObject.data[0].row[i] | datetimeFormat }} - - - {{ dataObject.data[0].row[i] }} - - - {{ dataObject.data[0].row[i] | formatNumber }} - - - {{ dataObject.data[0].row[i] }} - - - - - - - - - - {{ dataObject.data[0].row[i] }} - - + @if (dataObject.data.length > 0) { + + @for (columnHeader of dataObject.columnHeaders; track columnHeader; let i = $index) { + + + {{ columnHeader.columnDisplayName }} + {{ getInputName(columnHeader.columnName) }} + + + @switch (getColumnType(columnHeader.columnDisplayType, columnHeader.columnType)) { + @case ('DATE') { + + {{ dataObject.data[0].row[i] | dateFormat }} + + } + @case ('DATETIME') { + + {{ dataObject.data[0].row[i] | datetimeFormat }} + + } + @case ('INTEGER') { + + {{ dataObject.data[0].row[i] }} + + } + @case ('DECIMAL') { + + {{ dataObject.data[0].row[i] | formatNumber }} + + } + @case ('TEXT') { + + {{ dataObject.data[0].row[i] }} + + } + @case ('JSON') { + + + } + @default { + + @if (isValidUrl(dataObject.data[0].row[i])) { + + + + + + } + {{ dataObject.data[0].row[i] }} + + } + } + + + } - + } diff --git a/src/app/shared/tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component.ts b/src/app/shared/tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component.ts index c76f9c2703..3a1a98af28 100644 --- a/src/app/shared/tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component.ts +++ b/src/app/shared/tabs/entity-datatable-tab/datatable-single-row/datatable-single-row.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute } from '@angular/router'; import { Datatables } from 'app/core/utils/datatables'; @@ -8,7 +8,7 @@ import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.co import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component'; import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base'; import { SystemService } from 'app/system/system.service'; -import { NgIf, NgFor, NgClass, NgSwitch, NgSwitchCase, NgSwitchDefault } from '@angular/common'; +import { NgClass } from '@angular/common'; import { MatButton, MatIconButton } from '@angular/material/button'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { MatDivider } from '@angular/material/divider'; @@ -29,10 +29,7 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; FaIconComponent, MatDivider, NgClass, - NgSwitch, - NgSwitchCase, CdkTextareaAutosize, - NgSwitchDefault, MatIconButton, MatTooltip, DateFormatPipe, @@ -42,11 +39,21 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DatatableSingleRowComponent implements OnInit { + private route = inject(ActivatedRoute); + private dateUtils = inject(Dates); + private dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + private datatables = inject(Datatables); + private systemService = inject(SystemService); + @Input() dataObject: any; @Input() entityId: string; @Input() entityType: string; datatableName: string; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route. * @param {Dates} dateUtils Date Utils. @@ -54,14 +61,7 @@ export class DatatableSingleRowComponent implements OnInit { * @param {SettingsService} settingsService Settings Service * @param {Datatables} datatables Datatable utils */ - constructor( - private route: ActivatedRoute, - private dateUtils: Dates, - private dialog: MatDialog, - private settingsService: SettingsService, - private datatables: Datatables, - private systemService: SystemService - ) {} + constructor() {} ngOnInit() { this.route.params.subscribe((routeParams: any) => { diff --git a/src/app/shared/tabs/entity-datatable-tab/entity-datatable-tab.component.html b/src/app/shared/tabs/entity-datatable-tab/entity-datatable-tab.component.html index ced0a15137..0d51165c10 100644 --- a/src/app/shared/tabs/entity-datatable-tab/entity-datatable-tab.component.html +++ b/src/app/shared/tabs/entity-datatable-tab/entity-datatable-tab.component.html @@ -1,14 +1,16 @@ - - + @if (multiRowDatatableFlag) { + + } + @if (!multiRowDatatableFlag) { + + } diff --git a/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.html b/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.html index a42a3764bb..4958523d3c 100644 --- a/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.html +++ b/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.html @@ -51,9 +51,7 @@ {{ 'labels.heading.Documents' | translate }} - 10" - [pageSizeOptions]="[10, 25, 50]" - showFirstLastButtons - > + @if (entityDocuments && entityDocuments.length > 10) { + + } diff --git a/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.ts b/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.ts index ecff9021ec..6d81002128 100644 --- a/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.ts +++ b/src/app/shared/tabs/entity-documents-tab/entity-documents-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit, ViewChild } from '@angular/core'; +import { Component, Input, OnInit, ViewChild, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; @@ -47,6 +47,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EntityDocumentsTabComponent implements OnInit { + dialog = inject(MatDialog); + private savingsService = inject(SavingsService); + private loansService = inject(LoansService); + private clientsService = inject(ClientsService); + @ViewChild('documentsTable', { static: true }) documentsTable: MatTable; @Input() entityId: string; @@ -77,6 +82,9 @@ export class EntityDocumentsTabComponent implements OnInit { /** Sorter for codes table. */ @ViewChild(MatSort) sort: MatSort; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * * @param {MatDialog} dialog Dialog for Inputs. @@ -84,12 +92,7 @@ export class EntityDocumentsTabComponent implements OnInit { * @param {LoansService} loansService Loan Account services. * @param {ClientsService} clientsService Client services. */ - constructor( - public dialog: MatDialog, - private savingsService: SavingsService, - private loansService: LoansService, - private clientsService: ClientsService - ) {} + constructor() {} ngOnInit() { this.dataSource = new MatTableDataSource(this.entityDocuments); diff --git a/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.html b/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.html index 1ca4d303ba..62a279afe3 100644 --- a/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.html +++ b/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.html @@ -25,32 +25,32 @@ {{ 'labels.heading.Notes' | translate }} - 0; else emptyState"> - - - {{ entityNote.note }} - - - diff --git a/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.ts b/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.ts index 604862f8fe..664f180018 100644 --- a/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.ts +++ b/src/app/shared/tabs/entity-notes-tab/entity-notes-tab.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit, ViewChild } from '@angular/core'; +import { Component, Input, OnInit, ViewChild, inject } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { ClientsService } from 'app/clients/clients.service'; @@ -24,6 +24,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EntityNotesTabComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private savingsService = inject(SavingsService); + private loansService = inject(LoansService); + private clientsService = inject(ClientsService); + private groupsService = inject(GroupsService); + private dialog = inject(MatDialog); + @ViewChild('formRef', { static: true }) formRef: any; @Input() entityId: string; @@ -35,14 +42,10 @@ export class EntityNotesTabComponent implements OnInit { noteForm: UntypedFormGroup; - constructor( - private formBuilder: UntypedFormBuilder, - private savingsService: SavingsService, - private loansService: LoansService, - private clientsService: ClientsService, - private groupsService: GroupsService, - private dialog: MatDialog - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit() { this.createNoteForm(); diff --git a/src/app/shared/tenant-selector/tenant-selector.component.html b/src/app/shared/tenant-selector/tenant-selector.component.html index fd5e1ba228..5993470b81 100644 --- a/src/app/shared/tenant-selector/tenant-selector.component.html +++ b/src/app/shared/tenant-selector/tenant-selector.component.html @@ -4,8 +4,10 @@ {{ 'labels.inputs.Tenant' | translate }} - - {{ tenant }} - + @for (tenant of tenants; track tenant) { + + {{ tenant }} + + } diff --git a/src/app/shared/tenant-selector/tenant-selector.component.ts b/src/app/shared/tenant-selector/tenant-selector.component.ts index e139303cc3..1835078d6e 100644 --- a/src/app/shared/tenant-selector/tenant-selector.component.ts +++ b/src/app/shared/tenant-selector/tenant-selector.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; import { SettingsService } from 'app/settings/settings.service'; import { MatFormField, MatPrefix, MatLabel } from '@angular/material/form-field'; @@ -16,14 +16,19 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class TenantSelectorComponent implements OnInit { + private settingsService = inject(SettingsService); + /** Tenant selector form control. */ tenantSelector = new UntypedFormControl(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Sets the Tenant Identifier of the application in the selector on initial setup. * @param {SettingsService} settingsService Settings Service. */ - constructor(private settingsService: SettingsService) {} + constructor() {} ngOnInit(): void { this.tenantSelector.setValue(this.settingsService.tenantIdentifier); diff --git a/src/app/shared/theme-picker/theme-picker.component.html b/src/app/shared/theme-picker/theme-picker.component.html index 560d696229..6b8aeb910c 100644 --- a/src/app/shared/theme-picker/theme-picker.component.html +++ b/src/app/shared/theme-picker/theme-picker.component.html @@ -4,19 +4,18 @@ - - - - - - + @for (theme of themes; track theme) { + + + + @if (currentTheme.href === theme.href) { + + } + + + - - + + } diff --git a/src/app/shared/theme-picker/theme-picker.component.ts b/src/app/shared/theme-picker/theme-picker.component.ts index a585cb3632..c74e058fe3 100644 --- a/src/app/shared/theme-picker/theme-picker.component.ts +++ b/src/app/shared/theme-picker/theme-picker.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, OnInit, ViewEncapsulation, inject } from '@angular/core'; /** Custom Model */ import { Theme } from './theme.model'; @@ -36,6 +36,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ThemePickerComponent implements OnInit { + themeStorageService = inject(ThemeStorageService); + /** Default theme for the application. */ currentTheme: Theme = { href: 'denim-yellowgreen.css', @@ -79,10 +81,13 @@ export class ThemePickerComponent implements OnInit { } ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ThemeStorageService} themeStorageService Theme Storage Service. */ - constructor(public themeStorageService: ThemeStorageService) {} + constructor() {} /** * Initializes the theme for the application. diff --git a/src/app/shared/theme-picker/theme-storage.service.ts b/src/app/shared/theme-picker/theme-storage.service.ts index 8fc4d9adf5..54a3da3428 100644 --- a/src/app/shared/theme-picker/theme-storage.service.ts +++ b/src/app/shared/theme-picker/theme-storage.service.ts @@ -1,4 +1,4 @@ -import { Injectable, EventEmitter } from '@angular/core'; +import { Injectable, EventEmitter, inject } from '@angular/core'; import { Theme } from './theme.model'; import { ThemeManagerService } from './theme-manager.service'; @@ -6,10 +6,15 @@ import { ThemeManagerService } from './theme-manager.service'; providedIn: 'root' }) export class ThemeStorageService { + themeManagerService = inject(ThemeManagerService); + private themeStorageKey = 'mifosXTheme'; onThemeUpdate: EventEmitter; - constructor(public themeManagerService: ThemeManagerService) { + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() { this.onThemeUpdate = new EventEmitter(); } diff --git a/src/app/shared/theme-toggle/theme-toggle.component.ts b/src/app/shared/theme-toggle/theme-toggle.component.ts index 5ab9502028..87858f14e2 100644 --- a/src/app/shared/theme-toggle/theme-toggle.component.ts +++ b/src/app/shared/theme-toggle/theme-toggle.component.ts @@ -1,4 +1,4 @@ -import { Component, OnChanges, OnInit, SimpleChanges } from '@angular/core'; +import { Component, OnChanges, OnInit, SimpleChanges, inject } from '@angular/core'; import { ThemingService } from './theming.service'; import { SettingsService } from 'app/settings/settings.service'; import { MatIconButton } from '@angular/material/button'; @@ -16,12 +16,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ThemeToggleComponent implements OnInit, OnChanges { + private themingService = inject(ThemingService); + private settingsService = inject(SettingsService); + darkModeOn: boolean; - constructor( - private themingService: ThemingService, - private settingsService: SettingsService - ) {} + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + + constructor() {} ngOnInit(): void { this.darkModeOn = !!this.settingsService.themeDarkEnabled; diff --git a/src/app/shared/theme-toggle/theming.service.ts b/src/app/shared/theme-toggle/theming.service.ts index a8c0334cc1..dc2508e6bf 100644 --- a/src/app/shared/theme-toggle/theming.service.ts +++ b/src/app/shared/theme-toggle/theming.service.ts @@ -1,19 +1,24 @@ -import { ApplicationRef, Injectable } from '@angular/core'; +import { ApplicationRef, Injectable, inject } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class ThemingService { + private ref = inject(ApplicationRef); + private darkModeOn = false; themes = [ 'dark-theme', 'light-theme' ]; // <- list all themes in this array - theme = new BehaviorSubject('light-theme'); // <- initial theme + theme = new BehaviorSubject('light-theme'); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); // <- initial theme - constructor(private ref: ApplicationRef) { + constructor() { // Initially check if dark mode is enabled on system this.darkModeOn = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; diff --git a/src/app/shared/transaction-payment-detail/transaction-payment-detail.component.html b/src/app/shared/transaction-payment-detail/transaction-payment-detail.component.html index c34c18246e..3cbae27c74 100644 --- a/src/app/shared/transaction-payment-detail/transaction-payment-detail.component.html +++ b/src/app/shared/transaction-payment-detail/transaction-payment-detail.component.html @@ -7,30 +7,42 @@ {{ paymentDetailData.paymentType.name }} - - - - {{ 'labels.inputs.Payment Details' | translate }} - - - {{ 'labels.inputs.Account No' | translate }} - {{ paymentDetailData.accountNumber }} - - - {{ 'labels.inputs.Cheque Number' | translate }} - {{ paymentDetailData.checkNumber }} - - - {{ 'labels.inputs.Routing Code' | translate }} - {{ paymentDetailData.routingCode }} - - - {{ 'labels.inputs.Receipt No' | translate }} - {{ paymentDetailData.receiptNumber }} - - - {{ 'labels.inputs.Bank No' | translate }} - {{ paymentDetailData.bankNumber }} - - - +@if (hasSomeValue()) { + + + + {{ 'labels.inputs.Payment Details' | translate }} + + @if (isNotNullOrEmpty(paymentDetailData.accountNumber)) { + + {{ 'labels.inputs.Account No' | translate }} + {{ paymentDetailData.accountNumber }} + + } + @if (isNotNullOrEmpty(paymentDetailData.checkNumber)) { + + {{ 'labels.inputs.Cheque Number' | translate }} + {{ paymentDetailData.checkNumber }} + + } + @if (isNotNullOrEmpty(paymentDetailData.routingCode)) { + + {{ 'labels.inputs.Routing Code' | translate }} + {{ paymentDetailData.routingCode }} + + } + @if (isNotNullOrEmpty(paymentDetailData.receiptNumber)) { + + {{ 'labels.inputs.Receipt No' | translate }} + {{ paymentDetailData.receiptNumber }} + + } + @if (isNotNullOrEmpty(paymentDetailData.bankNumber)) { + + {{ 'labels.inputs.Bank No' | translate }} + {{ paymentDetailData.bankNumber }} + + } + + +} diff --git a/src/app/shares/common-resolvers/share-account-actions.resolver.ts b/src/app/shares/common-resolvers/share-account-actions.resolver.ts index e0e6610cf7..431d73cb2e 100644 --- a/src/app/shares/common-resolvers/share-account-actions.resolver.ts +++ b/src/app/shares/common-resolvers/share-account-actions.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SharesService } from '../shares.service'; */ @Injectable() export class ShareAccountActionsResolver { + private sharesService = inject(SharesService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {sharesService} SharesService Shares service. */ - constructor(private sharesService: SharesService) {} + constructor() {} /** * Returns the Shares account actions data. diff --git a/src/app/shares/common-resolvers/share-account-and-template.resolver.ts b/src/app/shares/common-resolvers/share-account-and-template.resolver.ts index d9bd450558..0fa1bd9146 100644 --- a/src/app/shares/common-resolvers/share-account-and-template.resolver.ts +++ b/src/app/shares/common-resolvers/share-account-and-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SharesService } from '../shares.service'; */ @Injectable() export class SharesAccountAndTemplateResolver { + private sharesService = inject(SharesService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SharesService} SharesService Shares service. */ - constructor(private sharesService: SharesService) {} + constructor() {} /** * Returns the Shares Account data and template. diff --git a/src/app/shares/common-resolvers/share-account-view.resolver.ts b/src/app/shares/common-resolvers/share-account-view.resolver.ts index 841a1241b6..2c848878d5 100644 --- a/src/app/shares/common-resolvers/share-account-view.resolver.ts +++ b/src/app/shares/common-resolvers/share-account-view.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SharesService } from '../shares.service'; */ @Injectable() export class SharesAccountViewResolver { + private sharesService = inject(SharesService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SharesService} SharesService Shares service. */ - constructor(private sharesService: SharesService) {} + constructor() {} /** * Returns the Shares Account data. diff --git a/src/app/shares/common-resolvers/shares-account-template.resolver.ts b/src/app/shares/common-resolvers/shares-account-template.resolver.ts index cf61532e0b..e6442f97d6 100644 --- a/src/app/shares/common-resolvers/shares-account-template.resolver.ts +++ b/src/app/shares/common-resolvers/shares-account-template.resolver.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ @@ -13,10 +13,15 @@ import { SharesService } from '../shares.service'; */ @Injectable() export class SharesAccountTemplateResolver { + private sharesService = inject(SharesService); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SharesService} SharesService Shares service. */ - constructor(private sharesService: SharesService) {} + constructor() {} /** * Returns the Shares Account Template. diff --git a/src/app/shares/create-shares-account/create-shares-account.component.html b/src/app/shares/create-shares-account/create-shares-account.component.html index 01c452c90a..0505c000db 100644 --- a/src/app/shares/create-shares-account/create-shares-account.component.html +++ b/src/app/shares/create-shares-account/create-shares-account.component.html @@ -55,17 +55,18 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (sharesAccountFormValid) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/shares/create-shares-account/create-shares-account.component.ts b/src/app/shares/create-shares-account/create-shares-account.component.ts index eb599490ba..8677290bee 100644 --- a/src/app/shares/create-shares-account/create-shares-account.component.ts +++ b/src/app/shares/create-shares-account/create-shares-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; /** Custom Components */ @@ -37,6 +37,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CreateSharesAccountComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private sharesService = inject(SharesService); + private settingsService = inject(SettingsService); + /** Shares Account Template */ sharesAccountTemplate: any; /** Shares Account Product Template */ @@ -51,6 +57,9 @@ export class CreateSharesAccountComponent { @ViewChild(SharesAccountChargesStepComponent, { static: true }) sharesAccountChargesStep: SharesAccountChargesStepComponent; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches shares account template from `resolve` * @param {ActivatedRoute} route Activated Route @@ -59,13 +68,7 @@ export class CreateSharesAccountComponent { * @param {SharesService} sharesService Shares Service * @param {SettingsService} settingsService Settings Service */ - constructor( - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private sharesService: SharesService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { sharesAccountTemplate: any }) => { this.sharesAccountTemplate = data.sharesAccountTemplate; }); diff --git a/src/app/shares/edit-shares-account/edit-shares-account.component.html b/src/app/shares/edit-shares-account/edit-shares-account.component.html index 61131f7d71..13794f5780 100644 --- a/src/app/shares/edit-shares-account/edit-shares-account.component.html +++ b/src/app/shares/edit-shares-account/edit-shares-account.component.html @@ -57,17 +57,18 @@ - - {{ 'labels.inputs.PREVIEW' | translate }} - - - - + @if (sharesAccountFormValidAndNotPristine) { + + {{ 'labels.inputs.PREVIEW' | translate }} + + + + } diff --git a/src/app/shares/edit-shares-account/edit-shares-account.component.ts b/src/app/shares/edit-shares-account/edit-shares-account.component.ts index 8c45a7268c..657a871e23 100644 --- a/src/app/shares/edit-shares-account/edit-shares-account.component.ts +++ b/src/app/shares/edit-shares-account/edit-shares-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, ViewChild } from '@angular/core'; +import { Component, ViewChild, inject } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; /** Custom Components */ @@ -37,6 +37,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class EditSharesAccountComponent { + private route = inject(ActivatedRoute); + private router = inject(Router); + private dateUtils = inject(Dates); + private sharesService = inject(SharesService); + private settingsService = inject(SettingsService); + /** Shares Account and Template */ sharesAccountAndTemplate: any; /** Shares Account Product Template */ @@ -51,6 +57,9 @@ export class EditSharesAccountComponent { @ViewChild(SharesAccountChargesStepComponent, { static: true }) sharesAccountChargesStep: SharesAccountChargesStepComponent; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Fetches shares account template from `resolve` * @param {ActivatedRoute} route Activated Route @@ -59,13 +68,7 @@ export class EditSharesAccountComponent { * @param {SharesService} sharesService Shares Service * @param {SettingsService} settingsService Settings Service */ - constructor( - private route: ActivatedRoute, - private router: Router, - private dateUtils: Dates, - private sharesService: SharesService, - private settingsService: SettingsService - ) { + constructor() { this.route.data.subscribe((data: { sharesAccountAndTemplate: any }) => { this.sharesAccountAndTemplate = data.sharesAccountAndTemplate; }); diff --git a/src/app/shares/shares-account-actions/activate-shares-account/activate-shares-account.component.html b/src/app/shares/shares-account-actions/activate-shares-account/activate-shares-account.component.html index b3e3cf48c0..74162f2904 100644 --- a/src/app/shares/shares-account-actions/activate-shares-account/activate-shares-account.component.html +++ b/src/app/shares/shares-account-actions/activate-shares-account/activate-shares-account.component.html @@ -14,10 +14,12 @@ /> - - {{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (activateSharesAccountForm.controls.activatedDate.hasError('required')) { + + {{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/shares/shares-account-actions/activate-shares-account/activate-shares-account.component.ts b/src/app/shares/shares-account-actions/activate-shares-account/activate-shares-account.component.ts index 5de245df72..251c22c65b 100644 --- a/src/app/shares/shares-account-actions/activate-shares-account/activate-shares-account.component.ts +++ b/src/app/shares/shares-account-actions/activate-shares-account/activate-shares-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ActivateSharesAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private sharesService = inject(SharesService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -30,6 +37,9 @@ export class ActivateSharesAccountComponent implements OnInit { /** Shares Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SharesService} sharesService Shares Service @@ -38,14 +48,7 @@ export class ActivateSharesAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private sharesService: SharesService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; } diff --git a/src/app/shares/shares-account-actions/apply-shares/apply-shares.component.html b/src/app/shares/shares-account-actions/apply-shares/apply-shares.component.html index 12e60ba12f..de3358ee76 100644 --- a/src/app/shares/shares-account-actions/apply-shares/apply-shares.component.html +++ b/src/app/shares/shares-account-actions/apply-shares/apply-shares.component.html @@ -15,19 +15,23 @@ /> - - {{ 'labels.inputs.Request Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (applySharesForm.controls.requestedDate.hasError('required')) { + + {{ 'labels.inputs.Request Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Total No. of Shares' | translate }} - - {{ 'labels.inputs.Requested Shares' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (applySharesForm.controls.requestedShares.hasError('required')) { + + {{ 'labels.inputs.Requested Shares' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/shares/shares-account-actions/apply-shares/apply-shares.component.ts b/src/app/shares/shares-account-actions/apply-shares/apply-shares.component.ts index 304ae1d50b..6cb3744392 100644 --- a/src/app/shares/shares-account-actions/apply-shares/apply-shares.component.ts +++ b/src/app/shares/shares-account-actions/apply-shares/apply-shares.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ApplySharesComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private sharesService = inject(SharesService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Shares account data. */ sharesAccountData: any; @@ -33,6 +40,9 @@ export class ApplySharesComponent implements OnInit { /** Shares Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SharesService} sharesService Shares Service @@ -41,14 +51,7 @@ export class ApplySharesComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private sharesService: SharesService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; this.route.data.subscribe((data: { shareAccountActionData: any }) => { this.sharesAccountData = data.shareAccountActionData; diff --git a/src/app/shares/shares-account-actions/approve-shares-account/approve-shares-account.component.html b/src/app/shares/shares-account-actions/approve-shares-account/approve-shares-account.component.html index 79647529f1..73a37d9297 100644 --- a/src/app/shares/shares-account-actions/approve-shares-account/approve-shares-account.component.html +++ b/src/app/shares/shares-account-actions/approve-shares-account/approve-shares-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Approved On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (approveSharesAccountForm.controls.approvedDate.hasError('required')) { + + {{ 'labels.inputs.Approved On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/shares/shares-account-actions/approve-shares-account/approve-shares-account.component.ts b/src/app/shares/shares-account-actions/approve-shares-account/approve-shares-account.component.ts index a7be399614..1096141acc 100644 --- a/src/app/shares/shares-account-actions/approve-shares-account/approve-shares-account.component.ts +++ b/src/app/shares/shares-account-actions/approve-shares-account/approve-shares-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ApproveSharesAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private sharesService = inject(SharesService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class ApproveSharesAccountComponent implements OnInit { /** Shares Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SharesService} sharesService Shares Service @@ -40,14 +50,7 @@ export class ApproveSharesAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private sharesService: SharesService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; } diff --git a/src/app/shares/shares-account-actions/approve-shares/approve-share-dialog/approve-share-dialog.component.ts b/src/app/shares/shares-account-actions/approve-shares/approve-share-dialog/approve-share-dialog.component.ts index 67886ceea3..e4b6516e68 100644 --- a/src/app/shares/shares-account-actions/approve-shares/approve-share-dialog/approve-share-dialog.component.ts +++ b/src/app/shares/shares-account-actions/approve-shares/approve-share-dialog/approve-share-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,12 +28,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ApproveShareDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Provides a deleteContext. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/shares/shares-account-actions/approve-shares/approve-shares.component.ts b/src/app/shares/shares-account-actions/approve-shares/approve-shares.component.ts index cf0c2eeb8a..028aafc6f4 100644 --- a/src/app/shares/shares-account-actions/approve-shares/approve-shares.component.ts +++ b/src/app/shares/shares-account-actions/approve-shares/approve-shares.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild, Input } from '@angular/core'; +import { Component, OnInit, ViewChild, Input, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -59,6 +59,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ApproveSharesComponent implements OnInit { + private sharesService = inject(SharesService); + private route = inject(ActivatedRoute); + dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + /** Shares account data. */ sharesAccountData: any; @@ -84,18 +89,16 @@ export class ApproveSharesComponent implements OnInit { /** Shares table reference */ @ViewChild('sharesTable', { static: true }) sharesTableRef: MatTable; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SharesService} sharesService Shares Service * @param {ActivatedRoute} route Activated Route * @param {MatDialog} dialog Dialog reference. * @param {SettingsService} settingsService Settings Service */ - constructor( - private sharesService: SharesService, - private route: ActivatedRoute, - public dialog: MatDialog, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; this.route.data.subscribe((data: { shareAccountActionData: any }) => { this.sharesAccountData = data.shareAccountActionData; diff --git a/src/app/shares/shares-account-actions/close-shares-account/close-shares-account.component.html b/src/app/shares/shares-account-actions/close-shares-account/close-shares-account.component.html index 4d221ba2ee..71d6b11908 100644 --- a/src/app/shares/shares-account-actions/close-shares-account/close-shares-account.component.html +++ b/src/app/shares/shares-account-actions/close-shares-account/close-shares-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (closeSharesAccountForm.controls.closedDate.hasError('required')) { + + {{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/shares/shares-account-actions/close-shares-account/close-shares-account.component.ts b/src/app/shares/shares-account-actions/close-shares-account/close-shares-account.component.ts index 81eabd3665..73de4dcde8 100644 --- a/src/app/shares/shares-account-actions/close-shares-account/close-shares-account.component.ts +++ b/src/app/shares/shares-account-actions/close-shares-account/close-shares-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class CloseSharesAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private sharesService = inject(SharesService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class CloseSharesAccountComponent implements OnInit { /** Shares Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SharesService} sharesService Shares Service @@ -40,14 +50,7 @@ export class CloseSharesAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private sharesService: SharesService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; } diff --git a/src/app/shares/shares-account-actions/redeem-shares/redeem-shares.component.html b/src/app/shares/shares-account-actions/redeem-shares/redeem-shares.component.html index 0a1da554e4..80d86767cd 100644 --- a/src/app/shares/shares-account-actions/redeem-shares/redeem-shares.component.html +++ b/src/app/shares/shares-account-actions/redeem-shares/redeem-shares.component.html @@ -15,19 +15,23 @@ /> - - {{ 'labels.inputs.Request Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (redeemSharesForm.controls.requestedDate.hasError('required')) { + + {{ 'labels.inputs.Request Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } {{ 'labels.inputs.Total No. of Shares' | translate }} - - {{ 'labels.inputs.Requested Shares' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (redeemSharesForm.controls.requestedShares.hasError('required')) { + + {{ 'labels.inputs.Requested Shares' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/shares/shares-account-actions/redeem-shares/redeem-shares.component.ts b/src/app/shares/shares-account-actions/redeem-shares/redeem-shares.component.ts index c3c8606472..62064c5ef0 100644 --- a/src/app/shares/shares-account-actions/redeem-shares/redeem-shares.component.ts +++ b/src/app/shares/shares-account-actions/redeem-shares/redeem-shares.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RedeemSharesComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private sharesService = inject(SharesService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Shares account data. */ sharesAccountData: any; @@ -33,6 +40,9 @@ export class RedeemSharesComponent implements OnInit { /** Shares Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SharesService} sharesService Shares Service @@ -41,14 +51,7 @@ export class RedeemSharesComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service. */ - constructor( - private formBuilder: UntypedFormBuilder, - private sharesService: SharesService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; this.route.data.subscribe((data: { shareAccountActionData: any }) => { this.sharesAccountData = data.shareAccountActionData; diff --git a/src/app/shares/shares-account-actions/reject-shares-account/reject-shares-account.component.html b/src/app/shares/shares-account-actions/reject-shares-account/reject-shares-account.component.html index 1b4f7629fb..c135a7b070 100644 --- a/src/app/shares/shares-account-actions/reject-shares-account/reject-shares-account.component.html +++ b/src/app/shares/shares-account-actions/reject-shares-account/reject-shares-account.component.html @@ -15,10 +15,12 @@ /> - - {{ 'labels.inputs.Rejected On Date' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - + @if (rejectSharesAccountForm.controls.rejectedDate.hasError('required')) { + + {{ 'labels.inputs.Rejected On Date' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + } diff --git a/src/app/shares/shares-account-actions/reject-shares-account/reject-shares-account.component.ts b/src/app/shares/shares-account-actions/reject-shares-account/reject-shares-account.component.ts index 7a68cacb68..0d1670b6de 100644 --- a/src/app/shares/shares-account-actions/reject-shares-account/reject-shares-account.component.ts +++ b/src/app/shares/shares-account-actions/reject-shares-account/reject-shares-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; @@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RejectSharesAccountComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private sharesService = inject(SharesService); + private dateUtils = inject(Dates); + private route = inject(ActivatedRoute); + private router = inject(Router); + private settingsService = inject(SettingsService); + /** Minimum date allowed. */ minDate = new Date(2000, 0, 1); /** Maximum date allowed. */ @@ -32,6 +39,9 @@ export class RejectSharesAccountComponent implements OnInit { /** Shares Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SharesService} sharesService Shares Service @@ -40,14 +50,7 @@ export class RejectSharesAccountComponent implements OnInit { * @param {Router} router Router * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private sharesService: SharesService, - private dateUtils: Dates, - private route: ActivatedRoute, - private router: Router, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; } diff --git a/src/app/shares/shares-account-actions/reject-shares/reject-share-dialog/reject-share-dialog.component.ts b/src/app/shares/shares-account-actions/reject-shares/reject-share-dialog/reject-share-dialog.component.ts index 959607f53f..584dce17ed 100644 --- a/src/app/shares/shares-account-actions/reject-shares/reject-share-dialog/reject-share-dialog.component.ts +++ b/src/app/shares/shares-account-actions/reject-shares/reject-share-dialog/reject-share-dialog.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, Inject } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, @@ -28,12 +28,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RejectShareDialogComponent { + dialogRef = inject>(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialogRef} dialogRef Component reference to dialog. * @param {any} data Provides a deleteContext. */ - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} + constructor() {} } diff --git a/src/app/shares/shares-account-actions/reject-shares/reject-shares.component.ts b/src/app/shares/shares-account-actions/reject-shares/reject-shares.component.ts index 8ba2310205..402feeb135 100644 --- a/src/app/shares/shares-account-actions/reject-shares/reject-shares.component.ts +++ b/src/app/shares/shares-account-actions/reject-shares/reject-shares.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, ViewChild, Input } from '@angular/core'; +import { Component, OnInit, ViewChild, Input, inject } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, MatSortHeader } from '@angular/material/sort'; import { @@ -59,6 +59,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class RejectSharesComponent implements OnInit { + private sharesService = inject(SharesService); + private route = inject(ActivatedRoute); + dialog = inject(MatDialog); + private settingsService = inject(SettingsService); + /** Shares account data. */ sharesAccountData: any; @@ -84,18 +89,16 @@ export class RejectSharesComponent implements OnInit { /** Shares table reference */ @ViewChild('sharesTable', { static: true }) sharesTableRef: MatTable; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SharesService} sharesService Shares Service * @param {ActivatedRoute} route Activated Route * @param {MatDialog} dialog Mat Dialog * @param {SettingsService} settingsService Settings Service. */ - constructor( - private sharesService: SharesService, - private route: ActivatedRoute, - public dialog: MatDialog, - private settingsService: SettingsService - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; this.route.data.subscribe((data: { shareAccountActionData: any }) => { this.sharesAccountData = data.shareAccountActionData; diff --git a/src/app/shares/shares-account-actions/shares-account-actions.component.html b/src/app/shares/shares-account-actions/shares-account-actions.component.html index be861323e4..59fbf529e9 100644 --- a/src/app/shares/shares-account-actions/shares-account-actions.component.html +++ b/src/app/shares/shares-account-actions/shares-account-actions.component.html @@ -1,9 +1,27 @@ - - - - - - - - - +@if (actions['Approve']) { + +} +@if (actions['Reject']) { + +} +@if (actions['Close']) { + +} +@if (actions['Activate']) { + +} +@if (actions['Undo Approval']) { + +} +@if (actions['Apply Additional Shares']) { + +} +@if (actions['Redeem Shares']) { + +} +@if (actions['Approve Additional Shares']) { + +} +@if (actions['Reject Additional Shares']) { + +} diff --git a/src/app/shares/shares-account-actions/shares-account-actions.component.ts b/src/app/shares/shares-account-actions/shares-account-actions.component.ts index 0f5bc984fe..1ed31a581e 100644 --- a/src/app/shares/shares-account-actions/shares-account-actions.component.ts +++ b/src/app/shares/shares-account-actions/shares-account-actions.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; /** Custom Services */ @@ -36,6 +36,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SharesAccountActionsComponent { + private route = inject(ActivatedRoute); + /** Shares Account Data */ sharesAccountData: any; /** Flag object to store possible actions and render appropriate UI to the user */ @@ -61,10 +63,13 @@ export class SharesAccountActionsComponent { 'Reject Additional Shares': false }; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {ActivatedRoute} route Activated Route */ - constructor(private route: ActivatedRoute) { + constructor() { const name = this.route.snapshot.params['name']; if (name && name in this.actions) { this.actions[name as keyof typeof this.actions] = true; diff --git a/src/app/shares/shares-account-actions/undo-approval-shares-account/undo-approval-shares-account.component.ts b/src/app/shares/shares-account-actions/undo-approval-shares-account/undo-approval-shares-account.component.ts index d32cd9f30e..0e08560786 100644 --- a/src/app/shares/shares-account-actions/undo-approval-shares-account/undo-approval-shares-account.component.ts +++ b/src/app/shares/shares-account-actions/undo-approval-shares-account/undo-approval-shares-account.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; /** Custom Services */ @@ -20,19 +20,22 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class UndoApprovalSharesAccountComponent { + private sharesService = inject(SharesService); + private route = inject(ActivatedRoute); + private router = inject(Router); + /** Shares Account Id */ accountId: any; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {SharesService} sharesService Shares Service * @param {ActivatedRoute} route Activated Route * @param {Router} router Router */ - constructor( - private sharesService: SharesService, - private route: ActivatedRoute, - private router: Router - ) { + constructor() { this.accountId = this.route.parent.snapshot.params['shareAccountId']; } diff --git a/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.html b/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.html index 1a276957ee..a5ae93d554 100644 --- a/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.html +++ b/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.html @@ -2,12 +2,11 @@ {{ 'labels.inputs.Charge' | translate }} - - {{ charge.name }} - + @for (charge of chargeData | chargesFilter: chargesDataSource : currencyCode.value; track charge) { + + {{ charge.name }} + + } diff --git a/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.ts b/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.ts index 1bbd294942..c3e4098a0a 100644 --- a/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.ts +++ b/src/app/shares/shares-account-stepper/shares-account-charges-step/shares-account-charges-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, OnChanges, Input } from '@angular/core'; +import { Component, OnInit, OnChanges, Input, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { UntypedFormControl } from '@angular/forms'; @@ -56,6 +56,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SharesAccountChargesStepComponent implements OnInit, OnChanges { + private dialog = inject(MatDialog); + private translateService = inject(TranslateService); + /** Shares Account Product Template */ @Input() sharesAccountProductTemplate: any; /** Shares Account Template */ @@ -80,13 +83,13 @@ export class SharesAccountChargesStepComponent implements OnInit, OnChanges { 'action' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {MatDialog} dialog Mat Dialog */ - constructor( - private dialog: MatDialog, - private translateService: TranslateService - ) {} + constructor() {} ngOnInit() { this.currencyCode.valueChanges.subscribe(() => { diff --git a/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.html b/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.html index 561388678f..55d09aed42 100644 --- a/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.html +++ b/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.html @@ -3,9 +3,11 @@ {{ 'labels.inputs.Product Name' | translate }} - - {{ product.name }} - + @for (product of productData; track product) { + + {{ product.name }} + + } {{ 'labels.inputs.Product Name' | translate }} {{ 'labels.commons.is' | translate }} diff --git a/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.ts b/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.ts index b904b9a7c1..190c697a5a 100644 --- a/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.ts +++ b/src/app/shares/shares-account-stepper/shares-account-details-step/shares-account-details-step.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; +import { Component, OnInit, Input, Output, EventEmitter, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { SettingsService } from 'app/settings/settings.service'; @@ -24,6 +24,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SharesAccountDetailsStepComponent implements OnInit { + private formBuilder = inject(UntypedFormBuilder); + private sharesService = inject(SharesService); + private settingsService = inject(SettingsService); + /** Shares Account Template */ @Input() sharesAccountTemplate: any; @@ -39,17 +43,16 @@ export class SharesAccountDetailsStepComponent implements OnInit { /** Shares Account Template with product data */ @Output() sharesAccountProductTemplate = new EventEmitter(); + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Sets share account details form. * @param {FormBuilder} formBuilder Form Builder. * @param {SharesService} sharesService Shares Service. * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private sharesService: SharesService, - private settingsService: SettingsService - ) { + constructor() { this.createSharesAccountDetailsForm(); } diff --git a/src/app/shares/shares-account-stepper/shares-account-preview-step/shares-account-preview-step.component.html b/src/app/shares/shares-account-stepper/shares-account-preview-step/shares-account-preview-step.component.html index cb6ff52560..d176c03545 100644 --- a/src/app/shares/shares-account-stepper/shares-account-preview-step/shares-account-preview-step.component.html +++ b/src/app/shares/shares-account-stepper/shares-account-preview-step/shares-account-preview-step.component.html @@ -16,12 +16,16 @@ {{ 'labels.heading.Details' | translate }} {{ 'labels.inputs.External Id' | translate }} - - - - - {{ 'labels.inputs.Unassigned' | translate }} - + @if (sharesAccount.externalId) { + + + + } + @if (!sharesAccount.externalId) { + + {{ 'labels.inputs.Unassigned' | translate }} + + } {{ 'labels.heading.Terms' | translate }} @@ -59,27 +63,31 @@ {{ 'labels.heading.Terms' | translate }} }} - - {{ 'labels.inputs.Minimum Active Period' | translate }} - {{ sharesAccount.minimumActivePeriod }} {{ - sharesAccount.minimumActivePeriodFrequencyType - | find: sharesAccountProductTemplate.minimumActivePeriodFrequencyTypeOptions : 'id' : 'value' - | translateKey: 'catalogs' - }} - - - - {{ 'labels.inputs.Lock-in Period' | translate }} - {{ sharesAccount.lockinPeriodFrequency }} {{ - sharesAccount.lockinPeriodFrequencyType - | find: sharesAccountProductTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value' - | translateKey: 'catalogs' - }} - + @if (sharesAccount.minimumActivePeriod) { + + {{ 'labels.inputs.Minimum Active Period' | translate }} + {{ sharesAccount.minimumActivePeriod }} {{ + sharesAccount.minimumActivePeriodFrequencyType + | find: sharesAccountProductTemplate.minimumActivePeriodFrequencyTypeOptions : 'id' : 'value' + | translateKey: 'catalogs' + }} + + } + + @if (sharesAccount.lockinPeriodFrequency) { + + {{ 'labels.inputs.Lock-in Period' | translate }} + {{ sharesAccount.lockinPeriodFrequency }} {{ + sharesAccount.lockinPeriodFrequencyType + | find: sharesAccountProductTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value' + | translateKey: 'catalogs' + }} + + } {{ 'labels.inputs.Application Date' | translate }} @@ -91,43 +99,40 @@ {{ 'labels.heading.Terms' | translate }} {{ sharesAccount.allowDividendCalculationForInactiveClients | yesNo }} - - {{ 'labels.heading.Charges' | translate }} - - - - - {{ 'labels.inputs.name' | translate }} - - {{ charge.name + ', ' + charge.currency.displaySymbol }} - - - - - {{ 'labels.inputs.Type' | translate }} - - {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} - - - - - {{ 'labels.inputs.Amount' | translate }} - - {{ charge.amount || charge.amountOrPercentage }} - - - - - {{ 'labels.inputs.Collected On' | translate }} - - {{ charge.chargeTimeType.value | translateKey: 'catalogs' }} - - - - - - - + @if (sharesAccount.charges.length) { + + {{ 'labels.heading.Charges' | translate }} + + + + {{ 'labels.inputs.name' | translate }} + + {{ charge.name + ', ' + charge.currency.displaySymbol }} + + + + {{ 'labels.inputs.Type' | translate }} + + {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} + + + + {{ 'labels.inputs.Amount' | translate }} + + {{ charge.amount || charge.amountOrPercentage }} + + + + {{ 'labels.inputs.Collected On' | translate }} + + {{ charge.chargeTimeType.value | translateKey: 'catalogs' }} + + + + + + + } diff --git a/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.html b/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.html index 580b0acf9d..f3f6d15a2e 100644 --- a/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.html +++ b/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.html @@ -18,16 +18,16 @@ {{ 'labels.commons.required' | translate }} - {{ - calculateCurrenValue() | currency: currency.code : 'symbol-narrow' : '1.2-2' - }} + @if (currency) { + {{ calculateCurrenValue() | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + } {{ 'labels.inputs.Default Savings Account' | translate }} - - {{ account.accountNo }} - {{ account.savingsProductName }} - + @for (account of savingsAccountsData; track account) { + {{ account.accountNo }} - {{ account.savingsProductName }} + } {{ 'labels.inputs.Default Savings Account' | translate }} {{ 'labels.commons.is' | translate }} @@ -67,12 +67,14 @@ {{ 'labels.heading.Minimum Active Period' | translate {{ 'labels.inputs.Type' | translate }} - - {{ minimumActivePeriodFrequencyType.value | translateKey: 'catalogs' }} - + @for ( + minimumActivePeriodFrequencyType of minimumActivePeriodFrequencyTypeData; + track minimumActivePeriodFrequencyType + ) { + + {{ minimumActivePeriodFrequencyType.value | translateKey: 'catalogs' }} + + } @@ -86,12 +88,11 @@ {{ 'labels.heading.Lock-in Period' | translate }} {{ 'labels.inputs.Type' | translate }} - - {{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }} - + @for (lockinPeriodFrequencyType of lockinPeriodFrequencyTypeData; track lockinPeriodFrequencyType) { + + {{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }} + + } diff --git a/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.ts b/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.ts index bc07c5e37e..220d7e3890 100644 --- a/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.ts +++ b/src/app/shares/shares-account-stepper/shares-account-terms-step/shares-account-terms-step.component.ts @@ -1,9 +1,9 @@ /** Angular Imports */ -import { Component, OnChanges, OnInit, Input } from '@angular/core'; +import { Component, OnChanges, OnInit, Input, inject } from '@angular/core'; import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; import { SettingsService } from 'app/settings/settings.service'; import { Currency } from 'app/shared/models/general.model'; -import { NgIf, NgFor, CurrencyPipe } from '@angular/common'; +import { CurrencyPipe } from '@angular/common'; import { MatCheckbox } from '@angular/material/checkbox'; import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @@ -26,6 +26,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class SharesAccountTermsStepComponent implements OnChanges, OnInit { + private formBuilder = inject(UntypedFormBuilder); + private settingsService = inject(SettingsService); + /** Shares Account and Product Template */ @Input() sharesAccountProductTemplate: any; /** [Optional] Shares Account Template */ @@ -48,14 +51,14 @@ export class SharesAccountTermsStepComponent implements OnChanges, OnInit { currency: Currency | null = null; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * @param {FormBuilder} formBuilder Form Builder * @param {SettingsService} settingsService Settings Service */ - constructor( - private formBuilder: UntypedFormBuilder, - private settingsService: SettingsService - ) { + constructor() { this.createSharesAccountTermsForm(); } diff --git a/src/app/shares/shares-account-view/charges-tab/charges-tab.component.html b/src/app/shares/shares-account-view/charges-tab/charges-tab.component.html index 072b2a4c47..d607936311 100644 --- a/src/app/shares/shares-account-view/charges-tab/charges-tab.component.html +++ b/src/app/shares/shares-account-view/charges-tab/charges-tab.component.html @@ -56,50 +56,54 @@ {{ 'labels.heading.All Charges' | translate }} {{ 'labels.inputs.Actions' | translate }} - - - - - - - - - - - - - - - - + @if (sharesAccountData.status.value === 'Submitted and pending approval') { + + + + + + + + + } + @if (sharesAccountData.status.value === 'Active') { + + + + + + + + + } diff --git a/src/app/shares/shares-account-view/charges-tab/charges-tab.component.ts b/src/app/shares/shares-account-view/charges-tab/charges-tab.component.ts index ac2b53505d..e0ee918639 100644 --- a/src/app/shares/shares-account-view/charges-tab/charges-tab.component.ts +++ b/src/app/shares/shares-account-view/charges-tab/charges-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatTableDataSource, MatTable, @@ -14,7 +14,7 @@ import { MatRow } from '@angular/material/table'; import { ActivatedRoute } from '@angular/router'; -import { NgIf, CurrencyPipe } from '@angular/common'; +import { CurrencyPipe } from '@angular/common'; import { MatTooltip } from '@angular/material/tooltip'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @@ -42,6 +42,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class ChargesTabComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Shares Account Data */ sharesAccountData: any; /** Charges Data */ @@ -61,11 +63,14 @@ export class ChargesTabComponent implements OnInit { 'actions' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves shares account aata from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.parent.data.subscribe((data: { sharesAccountData: any }) => { this.sharesAccountData = data.sharesAccountData; this.chargesData = this.sharesAccountData.charges; diff --git a/src/app/shares/shares-account-view/dividends-tab/dividends-tab.component.ts b/src/app/shares/shares-account-view/dividends-tab/dividends-tab.component.ts index 02496e9ca1..050226b4ab 100644 --- a/src/app/shares/shares-account-view/dividends-tab/dividends-tab.component.ts +++ b/src/app/shares/shares-account-view/dividends-tab/dividends-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { MatTableDataSource, MatTable, @@ -42,6 +42,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ] }) export class DividendsTabComponent implements OnInit { + private route = inject(ActivatedRoute); + /** Shares Account Data */ shareAccountData: any; /** Dividends Data */ @@ -56,11 +58,14 @@ export class DividendsTabComponent implements OnInit { 'status' ]; + /** Inserted by Angular inject() migration for backwards compatibility */ + constructor(...args: unknown[]); + /** * Retrieves shares account data from `resolve`. * @param {ActivatedRoute} route Activated Route. */ - constructor(private route: ActivatedRoute) { + constructor() { this.route.parent.data.subscribe((data: { sharesAccountData: any }) => { this.shareAccountData = data.sharesAccountData; this.dividendsData = this.shareAccountData.dividends; diff --git a/src/app/shares/shares-account-view/general-tab/general-tab.component.html b/src/app/shares/shares-account-view/general-tab/general-tab.component.html index ef06402970..f2389d83c4 100644 --- a/src/app/shares/shares-account-view/general-tab/general-tab.component.html +++ b/src/app/shares/shares-account-view/general-tab/general-tab.component.html @@ -6,12 +6,16 @@ {{ 'labels.heading.Shares Details' | translate }} {{ 'labels.inputs.Activated On' | translate }} - - {{ sharesAccountData.timeline.activatedDate | dateFormat }} - - - {{ 'labels.text.Not Activated' | translate }} - + @if (sharesAccountData.timeline.activatedDate) { + + {{ sharesAccountData.timeline.activatedDate | dateFormat }} + + } + @if (!sharesAccountData.timeline.activatedDate) { + + {{ 'labels.text.Not Activated' | translate }} + + } {{ 'labels.inputs.Currency' | translate }} @@ -19,26 +23,36 @@ {{ 'labels.heading.Shares Details' | translate }} {{ 'labels.inputs.External Id' | translate }} - - - - - {{ 'labels.inputs.Unassigned' | translate }} - + @if (sharesAccountData.externalId) { + + + + } + @if (!sharesAccountData.externalId) { + + {{ 'labels.inputs.Unassigned' | translate }} + + } {{ 'labels.inputs.Linked Savings Account(Dividend Posting)' | translate }} - - - - - {{ 'labels.inputs.Unassigned' | translate }} - + @if (sharesAccountData.savingsAccountNumber) { + + + + } + @if (!sharesAccountData.savingsAccountNumber) { + + {{ 'labels.inputs.Unassigned' | translate }} + + }
{{ 'APP_NAME' | translate }} {{ 'labels.text.by' | translate }} Mifos
{{ 'labels.text.No notifications' | translate }}
- {{ 'labels.text.Business Date functionality is not enabled' | translate }}: {{ configurationName }} -
{{ configurationName }}
+ {{ 'labels.text.Business Date functionality is not enabled' | translate }}: + {{ configurationName }} +
- {{ 'labels.text.S3 Amazon Service Configuration' | translate }} -
+ {{ 'labels.text.S3 Amazon Service Configuration' | translate }} +
- {{ 'labels.text.SMS Service Configuration' | translate }} -
+ {{ 'labels.text.SMS Service Configuration' | translate }} +
- {{ 'labels.text.Email Service Configuration' | translate }} -
+ {{ 'labels.text.Email Service Configuration' | translate }} +
- {{ 'labels.text.Notification Service Configuration' | translate }} -
+ {{ 'labels.text.Notification Service Configuration' | translate }} +
At least one event is required. Cannot delete the last event.
{{ 'labels.inputs.Report Parameters' | translate }}
- {{ 'labels.text.Add new extra fields to any entity' | translate }} -
+ {{ 'labels.text.Add new extra fields to any entity' | translate }} +
- {{ 'labels.text.Codes are used to define drop down values' | translate }} -
+ {{ 'labels.text.Codes are used to define drop down values' | translate }} +
- {{ 'labels.text.Define or modify roles and associated permissions' | translate }} -
+ {{ 'labels.text.Define or modify roles and associated permissions' | translate }} +
- {{ 'labels.text.Define or modify Maker Checker tasks' | translate }} -
+ {{ 'labels.text.Define or modify Maker Checker tasks' | translate }} +
- {{ 'labels.text.Define Hooks' | translate }} -
+ {{ 'labels.text.Define Hooks' | translate }} +
- {{ 'labels.text.Define or modify entity to entity mappings' | translate }} -
+ {{ 'labels.text.Define or modify entity to entity mappings' | translate }} +
- {{ 'labels.text.Manage Surveys' | translate }} -
+ {{ 'labels.text.Manage Surveys' | translate }} +
- {{ 'labels.text.External Events configuration, to enable or disable' | translate }} -
+ {{ 'labels.text.External Events configuration, to enable or disable' | translate }} +
- {{ 'labels.text.Audit logs of all the activities' | translate }} -
+ {{ 'labels.text.Audit logs of all the activities' | translate }} +
- {{ 'labels.text.Add new report and classify reports' | translate }} -
+ {{ 'labels.text.Add new report and classify reports' | translate }} +
- {{ 'labels.text.Manage Schedule and Workflow jobs, modify jobs' | translate }} -
+ {{ 'labels.text.Manage Schedule and Workflow jobs, modify jobs' | translate }} +
- {{ 'labels.text.Global configurations, Cache and Business Date' | translate }} -
+ {{ 'labels.text.Global configurations, Cache and Business Date' | translate }} +
- {{ 'labels.text.Preferences for generating account numbers for client' | translate }} -
+ {{ 'labels.text.Preferences for generating account numbers for client' | translate }} +
- {{ 'labels.text.External Services Configuration' | translate }} -
+ {{ 'labels.text.External Services Configuration' | translate }} +
- {{ 'labels.text.Two-factor authentication configuration' | translate }} -
+ {{ 'labels.text.Two-factor authentication configuration' | translate }} +
- {{ 'labels.inputs.Passwords' | translate }} {{ 'labels.commons.do not match' | translate }} -
+ {{ 'labels.inputs.Passwords' | translate }} + {{ 'labels.commons.do not match' | translate }} +
- {{ 'labels.inputs.Passwords' | translate }} - {{ 'labels.commons.do not match' | translate }} -