diff --git a/package-lock.json b/package-lock.json index bd27e532f..9c561d6d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,6 +39,7 @@ "install": "^0.13.0", "lodash": "4.17.21", "moment": "^2.29.4", + "ngx-mat-select-search": "5.0.0", "rxjs": "6.6.2", "tslib": "^2.0.0", "vkbeautify": "^0.99.2", @@ -14222,6 +14223,17 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "node_modules/ngx-mat-select-search": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ngx-mat-select-search/-/ngx-mat-select-search-5.0.0.tgz", + "integrity": "sha512-w9NLIhN/b6aDpvwdrvxttNm6eYbcnalyCIOPaFPTpK8Ub8graHmL6qQdWzIw54Qxyzlr7A0DvpMgywcs4eGSYA==", + "dependencies": { + "tslib": "^2.4.0" + }, + "peerDependencies": { + "@angular/material": "^12.0.0 || ^13.0.0 || ^14.0.0" + } + }, "node_modules/nice-napi": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", diff --git a/package.json b/package.json index 2de3b49bf..1ddbfaf27 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "install": "^0.13.0", "lodash": "4.17.21", "moment": "^2.29.4", + "ngx-mat-select-search": "5.0.0", "rxjs": "6.6.2", "tslib": "^2.0.0", "vkbeautify": "^0.99.2", diff --git a/src/app/accounting/accounting-routing.module.ts b/src/app/accounting/accounting-routing.module.ts index 845f7e57e..dc556b3a8 100644 --- a/src/app/accounting/accounting-routing.module.ts +++ b/src/app/accounting/accounting-routing.module.ts @@ -169,7 +169,7 @@ const routes: Routes = [ { path: 'migrate-opening-balances', component: MigrateOpeningBalancesComponent, - data: { title: 'Migrate Opening Balances', breadcrumb: 'Migrate Opening Balances' }, + data: { title: 'Migrate Opening Balances', breadcrumb: 'Migrate Opening Balances' }, resolve: { offices: OfficesResolver, currencies: CurrenciesResolver 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 68e824915..f811901c9 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 @@ -52,14 +52,13 @@ - - {{"labels.inputs.Parent" | translate}} - - - ({{ parent.glCode }}) {{ parent.name }} - - - + + {{"labels.inputs.Tag" | translate}} @@ -114,4 +113,4 @@ - \ No newline at end of file + 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 09a5e0207..586486d06 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 @@ -11,6 +11,7 @@ import { ConfigurationWizardService } from '../../../configuration-wizard/config /** Custom Dialog Component */ import { ContinueSetupDialogComponent } from '../../../configuration-wizard/continue-setup-dialog/continue-setup-dialog.component'; +import { GLAccount } from 'app/shared/models/general.model'; /** * Create gl account component. @@ -31,7 +32,7 @@ export class CreateGlAccountComponent implements OnInit, AfterViewInit { /** Account usage data. */ accountUsageData: any; /** Parent data. */ - parentData: any; + parentData: GLAccount[] = []; /** Tag data. */ tagData: any; /** Account type id. (for creation of sub-ledger account) */ 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 5f1f68800..532963f21 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 @@ -48,14 +48,13 @@ - - {{"labels.inputs.Parent" | translate}} - - - ({{ parent.glCode }}) {{ parent.name }} - - - + + {{"labels.inputs.Tag" | translate}} 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 646498779..29a4b5ba9 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 @@ -59,7 +59,7 @@
- ({{ glAccount.parent.glCode }}) {{ glAccount.parent.name }} +
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 01899c15b..83a4361af 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 @@ -37,17 +37,13 @@
- - {{"labels.inputs.Affected GL Entry (Debit)" | translate}} - - - {{ affectedGLEntryDebit.name + ' (' + affectedGLEntryDebit.glCode + ')' }} - - - - {{"labels.inputs.Affected GL Entry (Debit)" | translate}} {{"labels.commons.is" | translate}} {{"labels.commons.required" | translate}} - - + + {{"labels.inputs.Debit Amount" | translate}} @@ -75,17 +71,13 @@
- - {{"labels.inputs.Affected GL Entry (Credit)" | translate}} - - - {{ affectedGLEntryCredit.name + ' (' + affectedGLEntryCredit.glCode + ')' }} - - - - {{"labels.inputs.Affected GL Entry (Credit)" | translate}} {{"labels.commons.is" | translate}} {{"labels.commons.required" | translate}} - - + + {{"labels.inputs.Credit Amount"|translate}} 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 6b5dd8c60..e262c3563 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 @@ -20,17 +20,13 @@ - - {{"labels.inputs.Account"|translate}} - - - {{ glAccount.name + ' (' + glAccount.glCode + ')' }} - - - - {{"labels.inputs.Account"|translate}} {{"labels.commons.is" | translate}} {{"labels.commons.required" | translate}} - - + +
diff --git a/src/app/accounting/financial-activity-mappings/create-financial-activity-mapping/create-financial-activity-mapping.component.ts b/src/app/accounting/financial-activity-mappings/create-financial-activity-mapping/create-financial-activity-mapping.component.ts index 895a32d50..6ef7d0666 100644 --- a/src/app/accounting/financial-activity-mappings/create-financial-activity-mapping/create-financial-activity-mapping.component.ts +++ b/src/app/accounting/financial-activity-mappings/create-financial-activity-mapping/create-financial-activity-mapping.component.ts @@ -5,6 +5,7 @@ import { Router, ActivatedRoute } from '@angular/router'; /** Custom Services */ import { AccountingService } from '../../accounting.service'; +import { GLAccount } from 'app/shared/models/general.model'; /** * Create financial activity mapping component. @@ -21,7 +22,7 @@ export class CreateFinancialActivityMappingComponent implements OnInit { /** GL Account options. */ glAccountOptions: any; /** GL Account data. */ - glAccountData: any; + glAccountData: GLAccount[] = []; /** Financial activity data. */ financialActivityData: any; 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 953b94054..41397e9c2 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 @@ -17,15 +17,13 @@
- - {{"labels.inputs.Account"|translate}} - - - {{ glAccount.name + ' (' + glAccount.glCode + ')' }} - - - - + +
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 b4d8d198f..90a13e0fc 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 @@ -5,6 +5,7 @@ import { Router, ActivatedRoute } from '@angular/router'; /** Custom Services */ import { AccountingService } from '../../accounting.service'; +import { GLAccount } from 'app/shared/models/general.model'; /** * Edit financial activity mapping component. @@ -21,7 +22,7 @@ export class EditFinancialActivityMappingComponent implements OnInit { /** GL Account options. */ glAccountOptions: any; /** GL Account data. */ - glAccountData: any; + glAccountData: GLAccount[] = []; /** Financial activity data. */ financialActivityData: any; /** Financial activity account ID. */ diff --git a/src/app/accounting/financial-activity-mappings/view-financial-activity-mapping/view-financial-activity-mapping.component.html b/src/app/accounting/financial-activity-mappings/view-financial-activity-mapping/view-financial-activity-mapping.component.html index a45965fba..abc9287c9 100644 --- a/src/app/accounting/financial-activity-mappings/view-financial-activity-mapping/view-financial-activity-mapping.component.html +++ b/src/app/accounting/financial-activity-mappings/view-financial-activity-mapping/view-financial-activity-mapping.component.html @@ -25,13 +25,11 @@ {{ financialActivityAccount?.financialActivityData.name }} -
- {{"labels.inputs.Account Name" | translate}} -
- -
- {{ financialActivityAccount?.glAccountData.name }} -
+ + 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 02dff2729..4ad0ca83f 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 @@ -5,10 +5,13 @@
- - {{"labels.inputs.GL Account Name or Code" | translate}} - - + + {{'labels.inputs.Filter' | translate}} @@ -62,13 +65,6 @@ - - - {{ glAccount.name + ' (' + glAccount.glCode + ')' }} - - - -
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 7d4f79976..af77ef34f 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 @@ -170,7 +170,7 @@ export class SearchJournalEntryComponent implements OnInit, AfterViewInit { this.glAccount.valueChanges .pipe( - map(value => value.id ? value.id : ''), + map(value => value ? value : ''), debounceTime(500), distinctUntilChanged(), tap((filterValue) => { @@ -269,15 +269,6 @@ export class SearchJournalEntryComponent implements OnInit, AfterViewInit { return office ? office.name : undefined; } - /** - * Displays gl account name in form control input. - * @param {any} glAccount Gl Account data. - * @returns {string} Gl Account name if valid otherwise undefined. - */ - displayGLAccount(glAccount?: any): string | undefined { - return glAccount ? glAccount.name + ' (' + glAccount.glCode + ')' : undefined; - } - /** * Sets filtered offices for autocomplete. */ 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 306a41bac..0953c3ec4 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 @@ -70,9 +70,7 @@ export class RejectClientTransferComponent implements OnInit { rejectClientTransferFormData.transferDate = this.dateUtils.formatDate(prevTransferDate, dateFormat); } const data = { - ...rejectClientTransferFormData, - dateFormat, - locale + ...rejectClientTransferFormData }; this.clientsService.executeClientCommand(this.clientId, 'rejectTransfer', data).subscribe(() => { this.router.navigate(['../../'], { relativeTo: this.route }); 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 e8d2fa9fe..066c3d370 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 @@ -73,9 +73,7 @@ export class UndoClientTransferComponent implements OnInit { undoClientTransferFormData.transferDate = this.dateUtils.formatDate(prevTransferDate, dateFormat); } const data = { - ...undoClientTransferFormData, - dateFormat, - locale + ...undoClientTransferFormData }; this.clientsService.executeClientCommand(this.clientId, 'withdrawTransfer', data).subscribe(() => { this.router.navigate(['../../'], { relativeTo: this.route }); diff --git a/src/app/clients/clients-view/clients-view.component.html b/src/app/clients/clients-view/clients-view.component.html index df60525ed..8bef8431f 100644 --- a/src/app/clients/clients-view/clients-view.component.html +++ b/src/app/clients/clients-view/clients-view.component.html @@ -32,7 +32,7 @@

+ matTooltip="{{'labels.status.' + clientViewData.status.value | translate}}"> {{"labels.inputs.Client Name" | translate}} :

diff --git a/src/app/loans/loans-view/loans-view.component.html b/src/app/loans/loans-view/loans-view.component.html index 729f3f161..d4950319b 100644 --- a/src/app/loans/loans-view/loans-view.component.html +++ b/src/app/loans/loans-view/loans-view.component.html @@ -82,7 +82,7 @@