From 1773cbd22d62aed173134dd330dd93ce63eabce8 Mon Sep 17 00:00:00 2001 From: Omar-Nabil Date: Thu, 8 Aug 2024 11:46:10 +0300 Subject: [PATCH] add style to the remaining components in our website --- src/app/accounting/accounting.component.html | 14 +- .../bulk-import/bulk-import.component.html | 169 ++++++++++------ .../bulk-import/bulk-import.component.ts | 11 ++ .../organization/organization.component.html | 182 +++++++++++------- .../organization/organization.component.ts | 14 +- src/app/products/products.component.html | 112 ++++++----- src/app/products/products.component.ts | 12 +- src/app/system/system.component.html | 146 ++++++++------ src/app/system/system.component.ts | 12 +- 9 files changed, 419 insertions(+), 253 deletions(-) diff --git a/src/app/accounting/accounting.component.html b/src/app/accounting/accounting.component.html index 7dae7a9c26..e52d0f2353 100644 --- a/src/app/accounting/accounting.component.html +++ b/src/app/accounting/accounting.component.html @@ -2,7 +2,7 @@ -
+
@@ -13,10 +13,8 @@

{{"labels.heading.Frequent Postings" | translate}}

- -

{{"labels.text.These are predefined postings" | translate}}

@@ -26,10 +24,8 @@

{{"labels.headi

{{"labels.heading.Create Journal Entries" | translate}}

- -

{{"labels.text.Manual journal entry transactions recorded in a journal" | translate}}

@@ -39,10 +35,8 @@

{{"labels.heading.Create J

{{"labels.heading.Search Journal Entries" | translate}}

- -

{{"labels.text.Advanced search option for journal entries" | translate}}

@@ -84,10 +78,8 @@

{{"labels.heading.Migrat

{{"labels.heading.Chart of Accounts" | translate}}

- - - - + +

{{"labels.text.List of accounts used by the organization" | translate}}

diff --git a/src/app/organization/bulk-import/bulk-import.component.html b/src/app/organization/bulk-import/bulk-import.component.html index 8d52140d13..fca41cc5ca 100644 --- a/src/app/organization/bulk-import/bulk-import.component.html +++ b/src/app/organization/bulk-import/bulk-import.component.html @@ -3,66 +3,90 @@ -
+
- - + + -

{{'labels.heading.Offices' | translate }}

+

{{'labels.heading.Offices' | translate }}

+ + +

Download, Upload Offices Template

- - + + -

{{'labels.heading.Users' | translate }}

+

{{'labels.heading.Users' | translate }}

+ + +

Download offices template and Upload office excel files

- - + + -

{{'labels.heading.Groups' | translate }}

+

{{'labels.heading.Groups' | translate }}

+ + +

Download groups template and Upload group excel files

- - + + -

{{'labels.heading.Loan Accounts' | translate }}

+

{{'labels.heading.Loan Accounts' | translate }}

+ + +

Download loan accounts template and upload loan account excel files

- - - + + + -

{{'labels.heading.Savings Accounts' | translate }}

+

{{'labels.heading.Savings Accounts' | translate }}

+ + +

Download savings accounts template and upload savings account excel files

- - - + + + -

{{'labels.heading.Fixed Deposit Accounts' | translate }}

+

{{'labels.heading.Fixed Deposit Accounts' | translate }}

+ + +

Download fixed deposit accounts template and upload fixed deposit account excel files

- - + + -

{{'labels.heading.Chart of Accounts' | translate }}

+

{{'labels.heading.Chart of Accounts' | translate }}

+ + +

Download chart of accounts template and upload chart of account excel files

- - - + + + -

{{'labels.heading.Share Accounts' | translate }}

+

{{'labels.heading.Share Accounts' | translate }}

+ + +

Download share accounts template and upload share account excel files

@@ -73,68 +97,95 @@

{{'labels.heading.Share Accounts' | translate }}

- - + + -

{{'labels.heading.Employees' | translate }}

+

{{'labels.heading.Employees' | translate }}

+ + +

Download employees template and upload employees excel files

- - + + -

{{'labels.heading.Clients' | translate }}

+

{{'labels.heading.Clients' | translate }}

+ + +

Download clients template and upload clients excel files

- - + + -

{{'labels.heading.Centers' | translate }}

+

{{'labels.heading.Centers' | translate }}

+ + +

Download centers template and upload centers excel files

- - - + + + -

{{'labels.heading.Loan Repayments' | translate }}

+

{{'labels.heading.Loan Repayments' | translate }}

+ + +

Download loan repayments template and upload loan repayment excel files

- - - + + + -

{{'labels.heading.Savings Transactions' | translate }}

+

{{'labels.heading.Savings Transactions' | translate }}

+ + +

Download savings transactions template and upload savings transaction excel files

- - - + + + -

{{'labels.heading.Fixed Deposit Transactions' | translate }}

+

{{'labels.heading.Fixed Deposit Transactions' | translate }}

+ + +

Download fixed deposit transactions template and upload fixed deposit transaction excel files

- - - + + + -

{{'labels.heading.Recurring Deposit Transactions' | translate }}

+

{{'labels.heading.Recurring Deposit Transactions' | translate }}

+ + +

Download recurring deposit transactions template and upload recurring deposit transaction excel files

- - + + -

{{'labels.heading.Journal Entries' | translate }}

+

{{'labels.heading.Journal Entries' | translate }}

+ + +

Download journal entries template and upload journal entries excel files

- - + + -

{{'labels.heading.Guarantors' | translate }}

+

{{'labels.heading.Guarantors' | translate }}

+ + +

Download guarantors template and upload guarantor excel files

diff --git a/src/app/organization/bulk-import/bulk-import.component.ts b/src/app/organization/bulk-import/bulk-import.component.ts index d101f8c5d3..563044f600 100644 --- a/src/app/organization/bulk-import/bulk-import.component.ts +++ b/src/app/organization/bulk-import/bulk-import.component.ts @@ -10,9 +10,20 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./bulk-import.component.scss'] }) export class BulkImportComponent implements OnInit { + // Initialize an array of 17 boolean values, all set to false + arrowBooleans: boolean[] = new Array(17).fill(false); constructor() {} ngOnInit() {} + /** + * Popover function + * @param arrowNumber - The index of the boolean value to toggle. + */ + + arrowBooleansToggle(arrowNumber:number) { + // Toggle the boolean value at the given index + this.arrowBooleans[arrowNumber] = !this.arrowBooleans[arrowNumber]; + } } diff --git a/src/app/organization/organization.component.html b/src/app/organization/organization.component.html index 6075981fa4..91ef5e1dec 100644 --- a/src/app/organization/organization.component.html +++ b/src/app/organization/organization.component.html @@ -2,102 +2,120 @@ -
+
- - + + -

{{ 'labels.heading.Manage Offices' | translate }}

-

{{ 'labels.text.Add new office or modify or deactivate office' | translate }}

+

{{ 'labels.heading.Manage Offices' | translate }}

+ + +

{{ 'labels.text.Add new office or modify or deactivate office' | translate }}

- - + + -

{{ 'labels.heading.Manage Holidays' | translate }}

-

{{ 'labels.text.Define holidays for office' | translate }}

+

{{ 'labels.heading.Manage Holidays' | translate }}

+ + +

{{ 'labels.text.Define holidays for office' | translate }}

- - + + -

{{ 'labels.heading.Manage Employees' | translate }}

-

{{ 'labels.text.Employee represents loan officers' | translate }}

+

{{ 'labels.heading.Manage Employees' | translate }}

+ + +

{{ 'labels.text.Employee represents loan officers' | translate }}

- - + -

{{ 'labels.heading.Standing Instructions History' | translate }}

-

{{ 'labels.text.View logged history' | translate }}

+

{{ 'labels.heading.Standing Instructions History' | translate }}

+ + +

{{ 'labels.text.View logged history' | translate }}

- - + + -

{{ 'labels.text.Investors' | translate }}

-

{{ 'labels.text.View the loan account details associated with the investors' | translate }}

+

{{ 'labels.text.Investors' | translate }}

+ + +

{{ 'labels.text.View the loan account details associated with the investors' | translate }}

- - + + -

{{ 'labels.heading.Fund Mapping' | translate }}

-

{{ 'labels.text.Bulk entry screen for mapping' | translate }}

+

{{ 'labels.heading.Fund Mapping' | translate }}

+ + +

{{ 'labels.text.Bulk entry screen for mapping' | translate }}

- - + -

{{ 'labels.heading.Password Preferences' | translate }}

-

{{ 'labels.text.The usage of stronger passwords' | translate }}

+

{{ 'labels.heading.Password Preferences' | translate }}

+ + +

{{ 'labels.text.The usage of stronger passwords' | translate }}

- - + + -

{{ 'labels.heading.Loan Provisioning Criteria' | translate }}

-

{{ 'labels.text.Loan Provisioning Criteria Organization' | translate }}

+

{{ 'labels.heading.Loan Provisioning Criteria' | translate }}

+ + +

{{ 'labels.text.Loan Provisioning Criteria Organization' | translate }}

- - + -

{{ 'labels.heading.Entity Data Table Checks' | translate }}

-

{{ 'labels.text.Entity Data Table Checks Organization' | translate }}

+

{{ 'labels.heading.Entity Data Table Checks' | translate }}

+ + +

{{ 'labels.text.Entity Data Table Checks Organization' | translate }}

@@ -110,92 +128,110 @@

{{ 'labels.heading.Entity Data Table Checks' | translate }}

- - + + -

{{ 'labels.heading.Currency Configuration' | translate }}

-

{{ 'labels.text.Currencies available across organization' | translate }}

+

{{ 'labels.heading.Currency Configuration' | translate }}

+ + +

{{ 'labels.text.Currencies available across organization' | translate }}

- - + + -

{{ 'labels.heading.Manage Funds' | translate }}

-

{{ 'labels.text.Funds are associated with loans' | translate }}

+

{{ 'labels.heading.Manage Funds' | translate }}

+ + +

{{ 'labels.text.Funds are associated with loans' | translate }}

- - + + -

{{ 'labels.heading.Bulk Loan Reassignment' | translate }}

-

{{ 'labels.text.Easy way to reassign all the loan' | translate }}

+

{{ 'labels.heading.Bulk Loan Reassignment' | translate }}

+ + +

{{ 'labels.text.Easy way to reassign all the loan' | translate }}

- - + + -

{{ 'labels.heading.Teller / Cashier Management' | translate }}

-

{{ 'labels.text.Manage Tellers / Cashiers' | translate }}

+

{{ 'labels.heading.Teller / Cashier Management' | translate }}

+ + +

{{ 'labels.text.Manage Tellers / Cashiers' | translate }}

- - + + -

{{ 'labels.heading.Working Days' | translate }}

-

{{ 'labels.text.Working days and configure behaviour of payments' | translate }}

+

{{ 'labels.heading.Working Days' | translate }}

+ + +

{{ 'labels.text.Working days and configure behaviour of payments' | translate }}

- - + + -

{{ 'labels.heading.Payment Type' | translate }}

-

{{ 'labels.text.Manage payment types' | translate }}

+

{{ 'labels.heading.Payment Type' | translate }}

+ + +

{{ 'labels.text.Manage payment types' | translate }}

- - + + -

{{ 'labels.heading.SMS Campaigns' | translate }}

-

{{ 'labels.text.Define SMS Campaigns for Organization' | translate }}

+

{{ 'labels.heading.SMS Campaigns' | translate }}

+ + +

{{ 'labels.text.Define SMS Campaigns for Organization' | translate }}

- - + + -

{{ 'labels.heading.AdHocQuery' | translate }}

-

{{ 'labels.text.Define AdHocQuery for Organization' | translate }}

+

{{ 'labels.heading.AdHocQuery' | translate }}

+ + +

{{ 'labels.text.Define AdHocQuery for Organization' | translate }}

- - + + -

{{ 'labels.heading.Bulk Import' | translate }}

-

{{ 'labels.text.Bulk data import using excel spreadsheet templates' | translate }}

+

{{ 'labels.heading.Bulk Import' | translate }}

+ + +

{{ 'labels.text.Bulk data import using excel spreadsheet templates' | translate }}

diff --git a/src/app/organization/organization.component.ts b/src/app/organization/organization.component.ts index 37e9cbe37e..be1f9e7ab5 100644 --- a/src/app/organization/organization.component.ts +++ b/src/app/organization/organization.component.ts @@ -1,10 +1,10 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; -import { ActivatedRoute, Router, NavigationEnd } from '@angular/router'; +import { AfterViewInit, Component, ElementRef, OnInit, TemplateRef, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; /** Custom Services */ -import { PopoverService } from '../configuration-wizard/popover/popover.service'; import { ConfigurationWizardService } from '../configuration-wizard/configuration-wizard.service'; +import { PopoverService } from '../configuration-wizard/popover/popover.service'; /** * Organization component. @@ -41,6 +41,8 @@ export class OrganizationComponent implements OnInit, AfterViewInit { @ViewChild('manageFunds') manageFunds: ElementRef; /* Template for popover on manage funds */ @ViewChild('templateManageFunds') templateManageFunds: TemplateRef; + // Initialize an array of 18 boolean values, all set to false + arrowBooleans: boolean[] = new Array(18).fill(false); /** * @param {ActivatedRoute} activatedRoute ActivatedRoute. @@ -62,6 +64,7 @@ export class OrganizationComponent implements OnInit, AfterViewInit { * @param target HTMLElement | ElementRef. * @param position String. * @param backdrop Boolean. + * @param arrowNumber - The index of the boolean value to toggle. */ showPopover(template: TemplateRef, target: HTMLElement | ElementRef, position: string, backdrop: boolean): void { setTimeout(() => this.popoverService.open(template, target, position, backdrop, {}), 200); @@ -206,4 +209,9 @@ export class OrganizationComponent implements OnInit, AfterViewInit { this.configurationWizardService.showRecurringDepositProductsList = true; this.router.navigate(['/products/recurring-deposit-products']); } + + arrowBooleansToggle(arrowNumber:number) { + // Toggle the boolean value at the given index + this.arrowBooleans[arrowNumber] = !this.arrowBooleans[arrowNumber]; + } } diff --git a/src/app/products/products.component.html b/src/app/products/products.component.html index 17e4dd737e..264d806dab 100644 --- a/src/app/products/products.component.html +++ b/src/app/products/products.component.html @@ -2,66 +2,78 @@ -
+
- - + + -

{{'labels.heading.Loan Products' | translate}}

-

{{'labels.text.Add new loan product or modify or inactivate loan product' | translate}}

+

{{'labels.heading.Loan Products' | translate}}

+ + +

{{'labels.text.Add new loan product or modify or inactivate loan product' | translate}}

- - + + -

{{'labels.heading.Savings Products' | translate}}

-

{{'labels.text.Add new savings product or modify or inactivate savings product' | translate}}

+

{{'labels.heading.Savings Products' | translate}}

+ + +

{{'labels.text.Add new savings product or modify or inactivate savings product' | translate}}

- - + + -

{{'labels.heading.Share Products' | translate}}

-

{{'labels.text.Add new share product or modify or inactivate share product' | translate}}

+

{{'labels.heading.Share Products' | translate}}

+ + +

{{'labels.text.Add new share product or modify or inactivate share product' | translate}}

- - + + -

{{'labels.heading.Charges' | translate}}

-

{{'labels.text.Define charges/penalties for loan products, savings and deposit products' | translate}}

+

{{'labels.heading.Charges' | translate}}

+ + +

{{'labels.text.Define charges/penalties for loan products, savings and deposit products' | translate}}

- - + + -

{{'labels.heading.Collateral Management' | translate}}

-

{{'labels.text.Define collaterals for Collateral Management' | translate}}

+

{{'labels.heading.Collateral Management' | translate}}

+ + +

{{'labels.text.Define collaterals for Collateral Management' | translate}}

- - + + -

{{'labels.heading.Delinquency Buckets' | translate}}

-

{{'labels.text.Define delinquency day ranges and bucket set for loan products' | translate}}

+

{{'labels.heading.Delinquency Buckets' | translate}}

+ + +

{{'labels.text.Define delinquency day ranges and bucket set for loan products' | translate}}

@@ -72,48 +84,58 @@

{{'labels.heading.Delinquency Buckets' | translate}}

- - + + -

{{'labels.heading.Products Mix' | translate}}

-

{{'labels.text.Defines rules for taking multiple rules' | translate}}

+

{{'labels.heading.Products Mix' | translate}}

+ + +

{{'labels.text.Defines rules for taking multiple rules' | translate}}

- - + + -

{{'labels.heading.Fixed Deposit Products' | translate}}

-

{{'labels.text.Add, modify or inactivate a Fixed deposit product' | translate}}

+

{{'labels.heading.Fixed Deposit Products' | translate}}

+ + +

{{'labels.text.Add, modify or inactivate a Fixed deposit product' | translate}}

- - + + -

{{'labels.heading.Recurring Deposit Products' | translate}}

-

{{'labels.text.Add, modify or inactivate a Recurring Deposit product' | translate}}

+

{{'labels.heading.Recurring Deposit Products' | translate}}

+ + +

{{'labels.text.Add, modify or inactivate a Recurring Deposit product' | translate}}

- - + + -

{{'labels.heading.Manage Tax Configurations' | translate}}

-

{{'labels.text.Define Tax components and Tax groups' | translate}}

+

{{'labels.heading.Manage Tax Configurations' | translate}}

+ + +

{{'labels.text.Define Tax components and Tax groups' | translate}}

- - + + -

{{'labels.heading.Floating Rates' | translate}}

-

{{'labels.text.Define floating rates for loan products' | translate}}

+

{{'labels.heading.Floating Rates' | translate}}

+ + +

{{'labels.text.Define floating rates for loan products' | translate}}

diff --git a/src/app/products/products.component.ts b/src/app/products/products.component.ts index b7b4c8d1f8..dde5c674d4 100644 --- a/src/app/products/products.component.ts +++ b/src/app/products/products.component.ts @@ -1,10 +1,10 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { AfterViewInit, Component, ElementRef, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; /** Custom Services */ -import { PopoverService } from '../configuration-wizard/popover/popover.service'; import { ConfigurationWizardService } from '../configuration-wizard/configuration-wizard.service'; +import { PopoverService } from '../configuration-wizard/popover/popover.service'; /** * Products component. @@ -40,6 +40,8 @@ export class ProductsComponent implements OnInit, AfterViewInit { @ViewChild('recurringDepositProducts') recurringDepositProducts: ElementRef; /* Template for popover on recurring deposit products */ @ViewChild('templateRecurringDepositProducts') templateRecurringDepositProducts: TemplateRef; + // Initialize an array of 11 boolean values, all set to false + arrowBooleans: boolean[] = new Array(11).fill(false); /** * @param {Router} router Router. @@ -95,6 +97,7 @@ export class ProductsComponent implements OnInit, AfterViewInit { * @param target HTMLElement | ElementRef. * @param position String. * @param backdrop Boolean. + * @param arrowNumber - The index of the boolean value to toggle. */ showPopover(template: TemplateRef, target: HTMLElement | ElementRef, position: string, backdrop: boolean): void { setTimeout(() => this.popoverService.open(template, target, position, backdrop, {}), 200); @@ -207,4 +210,9 @@ export class ProductsComponent implements OnInit, AfterViewInit { this.configurationWizardService.showFixedDepositProductsList = true; this.router.navigate(['/products/fixed-deposit-products']); } + + arrowBooleansToggle(arrowNumber:number) { + // Toggle the boolean value at the given index + this.arrowBooleans[arrowNumber] = !this.arrowBooleans[arrowNumber]; + } } diff --git a/src/app/system/system.component.html b/src/app/system/system.component.html index 81a114ccc9..66af2f1635 100644 --- a/src/app/system/system.component.html +++ b/src/app/system/system.component.html @@ -2,82 +2,98 @@ -
+
- - + + -

{{'labels.heading.Manage Data tables' | translate}}

-

{{'labels.text.Add new extra fields to any entity' | translate}}

+

{{'labels.heading.Manage Data tables' | translate}}

+ + +

{{'labels.text.Add new extra fields to any entity' | translate}}

- - + + -

{{'labels.heading.Manage Codes' | translate}}

-

{{'labels.text.Codes are used to define drop down values' | translate}}

+

{{'labels.heading.Manage Codes' | translate}}

+ + +

{{'labels.text.Codes are used to define drop down values' | translate}}

- - + + -

{{'labels.heading.Manage Roles and Permissions' | translate}}

-

{{'labels.text.Define or modify roles and associated permissions' | translate}}

+

{{'labels.heading.Manage Roles and Permissions' | translate}}

+ + +

{{'labels.text.Define or modify roles and associated permissions' | translate}}

- - + + -

{{'labels.heading.Configure Maker Checker Tasks' | translate}}

-

{{'labels.text.Define or modify Maker Checker tasks' | translate}}

+

{{'labels.heading.Configure Maker Checker Tasks' | translate}}

+ + +

{{'labels.text.Define or modify Maker Checker tasks' | translate}}

- - + + -

{{'labels.heading.Manage Hooks' | translate}}

-

{{'labels.text.Define Hooks' | translate}}

+

{{'labels.heading.Manage Hooks' | translate}}

+ + +

{{'labels.text.Define Hooks' | translate}}

- - + + -

{{'labels.heading.Entity to Entity Mapping' | translate}}

-

{{'labels.text.Define or modify entity to entity mappings' | translate}}

+

{{'labels.heading.Entity to Entity Mapping' | translate}}

+ + +

{{'labels.text.Define or modify entity to entity mappings' | translate}}

- - + + -

{{'labels.heading.Manage Surveys' | translate}}

-

{{'labels.text.Manage your Services' | translate}}

+

{{'labels.heading.Manage Surveys' | translate}}

+ + +

{{'labels.text.Manage your Services' | translate}}

- - + + -

{{'labels.heading.Manage External Events' | translate}}

-

{{'labels.text.External Events configuration, to enable or disable' | translate}}

+

{{'labels.heading.Manage External Events' | translate}}

+ + +

{{'labels.text.External Events configuration, to enable or disable' | translate}}

@@ -88,52 +104,64 @@

{{'labels.heading.Manage External Events' | translate}}

- - + + -

{{'labels.heading.Audit Trails' | translate}}

-

{{'labels.text.Audit logs of all the activities' | translate}}

+

{{'labels.heading.Audit Trails' | translate}}

+ + +

{{'labels.text.Audit logs of all the activities' | translate}}

- - + + -

{{'labels.heading.Manage Reports' | translate}}

-

{{'labels.text.Add new report and classify reports' | translate}}

+

{{'labels.heading.Manage Reports' | translate}}

+ + +

{{'labels.text.Add new report and classify reports' | translate}}

- - + + -

{{'labels.heading.Manage Jobs' | translate}}

-

{{'labels.text.Manage Schedule and Workflow jobs, modify jobs' | translate}}

+

{{'labels.heading.Manage Jobs' | translate}}

+ + +

{{'labels.text.Manage Schedule and Workflow jobs, modify jobs' | translate}}

- - + + -

{{'labels.heading.Configurations' | translate}}

-

{{'labels.text.Global configurations, Cache and Business Date' | translate}}

+

{{'labels.heading.Configurations' | translate}}

+ + +

{{'labels.text.Global configurations, Cache and Business Date' | translate}}

- - + + -

{{'labels.heading.Account Number Preferences' | translate}}

-

{{'labels.text.Preferences for generating account numbers for client' | translate}}

+

{{'labels.heading.Account Number Preferences' | translate}}

+ + +

{{'labels.text.Preferences for generating account numbers for client' | translate}}

- - + + -

{{'labels.heading.External Services' | translate}}

-

{{'labels.text.External Services Configuration' | translate}}

+

{{'labels.heading.External Services' | translate}}

+ + +

{{'labels.text.External Services Configuration' | translate}}

@@ -141,7 +169,9 @@

{{'labels.heading.External Services' | translate}}

{{'labels.heading.Two-Factor Configuration' | translate}}

-

{{'labels.text.Two-factor authentication configuration' | translate}}

+ + +

{{'labels.text.Two-factor authentication configuration' | translate}}

diff --git a/src/app/system/system.component.ts b/src/app/system/system.component.ts index 4d08701a4d..c903bd0cd7 100644 --- a/src/app/system/system.component.ts +++ b/src/app/system/system.component.ts @@ -1,10 +1,10 @@ /** Angular Imports */ -import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core'; +import { AfterViewInit, Component, ElementRef, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; /** Custom Services */ -import { PopoverService } from '../configuration-wizard/popover/popover.service'; import { ConfigurationWizardService } from '../configuration-wizard/configuration-wizard.service'; +import { PopoverService } from '../configuration-wizard/popover/popover.service'; @Component({ selector: 'mifosx-system', @@ -41,6 +41,8 @@ export class SystemComponent implements OnInit, AfterViewInit { @ViewChild('manageReports') manageReports: ElementRef; /* Template for popover on manage reports */ @ViewChild('templateManageReports') templateManageReports: TemplateRef; + // Initialize an array of 15 boolean values, all set to false + arrowBooleans: boolean[] = new Array(15).fill(false); /** * @param {Router} router Router. @@ -60,6 +62,7 @@ export class SystemComponent implements OnInit, AfterViewInit { * @param target HTMLElement | ElementRef. * @param position String. * @param backdrop Boolean. + * @param arrowNumber - The index of the boolean value to toggle. */ showPopover(template: TemplateRef, target: HTMLElement | ElementRef, position: string, backdrop: boolean): void { setTimeout(() => this.popoverService.open(template, target, position, backdrop, {}), 200); @@ -229,4 +232,9 @@ export class SystemComponent implements OnInit, AfterViewInit { this.configurationWizardService.showManageFunds = true; this.router.navigate(['/organization/manage-funds']); } + + arrowBooleansToggle(arrowNumber:number) { + // Toggle the boolean value at the given index + this.arrowBooleans[arrowNumber] = !this.arrowBooleans[arrowNumber]; + } }