From 7e186a6141a0b45c917fe53a3a1e694e5ffd638f Mon Sep 17 00:00:00 2001 From: jagadeeshakn Date: Mon, 5 Jul 2021 18:18:32 +0530 Subject: [PATCH 1/8] readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a3a5cd2ba..bd0877f62 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,8 @@ Run `ng generate component component-name` to generate a new component. You can Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. +Run `npm run build:prod` to build a production artifacts Instead. + ### Further help To get more help on the Angular CLI use `ng help` or go check out the From 27ecb036ef3d4fc942d5229afb01c21b65666ab7 Mon Sep 17 00:00:00 2001 From: gustavao Date: Mon, 2 Aug 2021 17:43:48 -0500 Subject: [PATCH 2/8] activate holidays --- .../view-holidays.component.html | 76 +++++++++---------- .../view-holidays/view-holidays.component.ts | 18 +++++ src/app/organization/organization.service.ts | 11 +++ 3 files changed, 67 insertions(+), 38 deletions(-) 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 3a2c872ae..7b64a41af 100644 --- a/src/app/organization/holidays/view-holidays/view-holidays.component.html +++ b/src/app/organization/holidays/view-holidays/view-holidays.component.html @@ -1,15 +1,15 @@
- - - - @@ -17,52 +17,52 @@
- + - + -
+
-
- Name -
+
+ Name +
-
- {{ holidayData.name }} -
+
+ {{ holidayData.name }} +
-
- From Date -
+
+ From Date +
-
- {{ holidayData.fromDate | date }} -
+
+ {{ holidayData.fromDate | date }} +
-
- To Date -
+
+ To Date +
-
- {{ holidayData.toDate | date }} -
+
+ {{ holidayData.toDate | date }} +
-
- Repayments Scheduled To -
+
+ Repayments Scheduled To +
-
- {{ holidayData.repaymentsRescheduledTo | date }} -
+
+ {{ holidayData.repaymentsRescheduledTo | date }} +
-
- Next Repayment Date -
+
+ Next Repayment Date +
-
+
-
+
-
+
-
+
\ No newline at end of file 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 34522bec7..deada1c43 100644 --- a/src/app/organization/holidays/view-holidays/view-holidays.component.ts +++ b/src/app/organization/holidays/view-holidays/view-holidays.component.ts @@ -7,6 +7,7 @@ import { MatDialog } from '@angular/material/dialog'; import { OrganizationService } from 'app/organization/organization.service'; /** Custom Components. */ +import { ConfirmationDialogComponent } from '../../../shared/confirmation-dialog/confirmation-dialog.component'; import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dialog.component'; /** @@ -52,4 +53,21 @@ export class ViewHolidaysComponent { }); } + /** + * Activate holiday. + */ + activateHoliday() { + const unAssignStaffDialogRef = this.dialog.open(ConfirmationDialogComponent, { + data: { heading: 'Holiday', dialogContext: `Are you sure you want to activate ${this.holidayData.name} holiday` } + }); + unAssignStaffDialogRef.afterClosed().subscribe((response: { confirm: any }) => { + if (response.confirm) { + this.organizationService.activateHoliday(this.holidayData.id) + .subscribe((response: any) => { + this.router.navigate(['/organization/holidays']); + }); + } + }); + } + } diff --git a/src/app/organization/organization.service.ts b/src/app/organization/organization.service.ts index 3762ba537..fed484649 100644 --- a/src/app/organization/organization.service.ts +++ b/src/app/organization/organization.service.ts @@ -639,6 +639,17 @@ export class OrganizationService { return this.http.delete(`/holidays/${holidayId}`); } + /** + * Activate Holiday. + * @param holidayId Holiday Id to be deleted. + * @returns {Observable} Resource Id. + */ + activateHoliday(holidayId: string): Observable { + const httpParams = new HttpParams() + .set('command','activate'); + return this.http.post(`/holidays/${holidayId}`, null, { params: httpParams }); + } + /** * @param {any} employeeId Employee ID of Employee to be edited. * @returns {Observable} From db4284d5f58fee526f79160dc5c44c79dc1c880f Mon Sep 17 00:00:00 2001 From: gustavao Date: Tue, 3 Aug 2021 10:30:42 -0500 Subject: [PATCH 3/8] tslint bugs are fixed --- .../view-holidays/view-holidays.component.ts | 10 +++---- src/app/organization/organization.service.ts | 30 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) 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 deada1c43..d794f14ee 100644 --- a/src/app/organization/holidays/view-holidays/view-holidays.component.ts +++ b/src/app/organization/holidays/view-holidays/view-holidays.component.ts @@ -28,10 +28,10 @@ export class ViewHolidaysComponent { * @param {ActivatedRoute} route Activated Route. */ constructor(private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private organizationService: OrganizationService ) { - this.route.data.subscribe((data: { holidays: any}) => { + private router: Router, + private dialog: MatDialog, + private organizationService: OrganizationService) { + this.route.data.subscribe((data: { holidays: any }) => { this.holidayData = data.holidays; }); } @@ -63,7 +63,7 @@ export class ViewHolidaysComponent { unAssignStaffDialogRef.afterClosed().subscribe((response: { confirm: any }) => { if (response.confirm) { this.organizationService.activateHoliday(this.holidayData.id) - .subscribe((response: any) => { + .subscribe(() => { this.router.navigate(['/organization/holidays']); }); } diff --git a/src/app/organization/organization.service.ts b/src/app/organization/organization.service.ts index fed484649..820b17792 100644 --- a/src/app/organization/organization.service.ts +++ b/src/app/organization/organization.service.ts @@ -93,8 +93,8 @@ export class OrganizationService { */ getOfficerTemplate(officerId: string, officeId: string): Observable { const httpParams = new HttpParams() - .set('fromLoanOfficerId', officerId.toString()) - .set('officeId', officerId.toString()); + .set('fromLoanOfficerId', officerId.toString()) + .set('officeId', officerId.toString()); return this.http.get('/loans/loanreassignment/template', { params: httpParams }); } @@ -134,9 +134,9 @@ export class OrganizationService { return this.http.put(`/offices/${officeId}`, office); } - /** - * @returns {Observable} - */ + /** + * @returns {Observable} + */ getOfficeDatatables(): Observable { const httpParams = new HttpParams().set('apptable', 'm_office'); return this.http.get(`/datatables`, { params: httpParams }); @@ -222,7 +222,7 @@ export class OrganizationService { * @returns {Observable} Currencies data */ updateCurrencies(currencies: any[]): Observable { - return this.http.put('/currencies', {currencies}); + return this.http.put('/currencies', { currencies }); } /** @@ -431,7 +431,7 @@ export class OrganizationService { */ settleCash(tellerId: string, cashierId: string, cashData: any): Observable { const httpParams = new HttpParams().set('command', 'settle'); - return this.http.post(`/tellers/${tellerId}/cashiers/${cashierId}/settle`, cashData, {params: httpParams}); + return this.http.post(`/tellers/${tellerId}/cashiers/${cashierId}/settle`, cashData, { params: httpParams }); } /** @@ -442,7 +442,7 @@ export class OrganizationService { */ allocateCash(tellerId: string, cashierId: string, cashData: any): Observable { const httpParams = new HttpParams().set('command', 'allocate'); - return this.http.post(`/tellers/${tellerId}/cashiers/${cashierId}/allocate`, cashData, {params: httpParams}); + return this.http.post(`/tellers/${tellerId}/cashiers/${cashierId}/allocate`, cashData, { params: httpParams }); } /** Get Cashier Template. @@ -639,14 +639,14 @@ export class OrganizationService { return this.http.delete(`/holidays/${holidayId}`); } - /** + /** * Activate Holiday. * @param holidayId Holiday Id to be deleted. * @returns {Observable} Resource Id. */ activateHoliday(holidayId: string): Observable { const httpParams = new HttpParams() - .set('command','activate'); + .set('command', 'activate'); return this.http.post(`/holidays/${holidayId}`, null, { params: httpParams }); } @@ -706,7 +706,7 @@ export class OrganizationService { */ getImports(entity: string): Observable { const httpParams = new HttpParams().set('entityType', entity); - return this.http.get('/imports', { params: httpParams } ); + return this.http.get('/imports', { params: httpParams }); } /** @@ -765,7 +765,7 @@ export class OrganizationService { if (legalFormType.length) { httpParams = httpParams.set('legalFormType', legalFormType); } - return this.http.get(`${urlSuffix}/downloadtemplate`, { params: httpParams, responseType: 'arraybuffer', observe: 'response'} ); + return this.http.get(`${urlSuffix}/downloadtemplate`, { params: httpParams, responseType: 'arraybuffer', observe: 'response' }); } /** @@ -775,8 +775,8 @@ export class OrganizationService { getImportDocument(id: any): Observable { const httpParams = new HttpParams() .set('importDocumentId', id) - .set('tenantIdentifier', 'default' ); - return this.http.get('/imports/downloadOutputTemplate', { params: httpParams, responseType: 'arraybuffer', observe: 'response'}); + .set('tenantIdentifier', 'default'); + return this.http.get('/imports/downloadOutputTemplate', { params: httpParams, responseType: 'arraybuffer', observe: 'response' }); } /** @@ -794,7 +794,7 @@ export class OrganizationService { formData.append('file', file); formData.append('locale', this.settingsService.language.code); formData.append('dateFormat', this.settingsService.dateFormat); - return this.http.post(`${urlSuffix}/uploadtemplate`, formData , { params: httpParams } ); + return this.http.post(`${urlSuffix}/uploadtemplate`, formData, { params: httpParams }); } } From 7b084caa617972ba46c0e3fe6638727273917bad Mon Sep 17 00:00:00 2001 From: jagadeeshakn Date: Mon, 5 Jul 2021 18:18:32 +0530 Subject: [PATCH 4/8] readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a3a5cd2ba..bd0877f62 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,8 @@ Run `ng generate component component-name` to generate a new component. You can Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. +Run `npm run build:prod` to build a production artifacts Instead. + ### Further help To get more help on the Angular CLI use `ng help` or go check out the From 84b2d8c5dfa33932e6d34a1f10371cfac35e71f9 Mon Sep 17 00:00:00 2001 From: gustavao Date: Mon, 2 Aug 2021 17:43:48 -0500 Subject: [PATCH 5/8] activate holidays --- .../view-holidays.component.html | 76 +++++++++---------- .../view-holidays/view-holidays.component.ts | 18 +++++ src/app/organization/organization.service.ts | 11 +++ 3 files changed, 67 insertions(+), 38 deletions(-) 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 3a2c872ae..7b64a41af 100644 --- a/src/app/organization/holidays/view-holidays/view-holidays.component.html +++ b/src/app/organization/holidays/view-holidays/view-holidays.component.html @@ -1,15 +1,15 @@
- - - - @@ -17,52 +17,52 @@
- + - + -
+
-
- Name -
+
+ Name +
-
- {{ holidayData.name }} -
+
+ {{ holidayData.name }} +
-
- From Date -
+
+ From Date +
-
- {{ holidayData.fromDate | date }} -
+
+ {{ holidayData.fromDate | date }} +
-
- To Date -
+
+ To Date +
-
- {{ holidayData.toDate | date }} -
+
+ {{ holidayData.toDate | date }} +
-
- Repayments Scheduled To -
+
+ Repayments Scheduled To +
-
- {{ holidayData.repaymentsRescheduledTo | date }} -
+
+ {{ holidayData.repaymentsRescheduledTo | date }} +
-
- Next Repayment Date -
+
+ Next Repayment Date +
-
+
-
+
-
+
-
+
\ No newline at end of file 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 34522bec7..deada1c43 100644 --- a/src/app/organization/holidays/view-holidays/view-holidays.component.ts +++ b/src/app/organization/holidays/view-holidays/view-holidays.component.ts @@ -7,6 +7,7 @@ import { MatDialog } from '@angular/material/dialog'; import { OrganizationService } from 'app/organization/organization.service'; /** Custom Components. */ +import { ConfirmationDialogComponent } from '../../../shared/confirmation-dialog/confirmation-dialog.component'; import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dialog.component'; /** @@ -52,4 +53,21 @@ export class ViewHolidaysComponent { }); } + /** + * Activate holiday. + */ + activateHoliday() { + const unAssignStaffDialogRef = this.dialog.open(ConfirmationDialogComponent, { + data: { heading: 'Holiday', dialogContext: `Are you sure you want to activate ${this.holidayData.name} holiday` } + }); + unAssignStaffDialogRef.afterClosed().subscribe((response: { confirm: any }) => { + if (response.confirm) { + this.organizationService.activateHoliday(this.holidayData.id) + .subscribe((response: any) => { + this.router.navigate(['/organization/holidays']); + }); + } + }); + } + } diff --git a/src/app/organization/organization.service.ts b/src/app/organization/organization.service.ts index 3762ba537..fed484649 100644 --- a/src/app/organization/organization.service.ts +++ b/src/app/organization/organization.service.ts @@ -639,6 +639,17 @@ export class OrganizationService { return this.http.delete(`/holidays/${holidayId}`); } + /** + * Activate Holiday. + * @param holidayId Holiday Id to be deleted. + * @returns {Observable} Resource Id. + */ + activateHoliday(holidayId: string): Observable { + const httpParams = new HttpParams() + .set('command','activate'); + return this.http.post(`/holidays/${holidayId}`, null, { params: httpParams }); + } + /** * @param {any} employeeId Employee ID of Employee to be edited. * @returns {Observable} From 3cdc0b3de2ed7a9234639986ddc7641454325f97 Mon Sep 17 00:00:00 2001 From: gustavao Date: Mon, 2 Aug 2021 18:00:43 -0500 Subject: [PATCH 6/8] issue1317 add correct route --- .../employees/employees.component.html | 82 +++++++++---------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/src/app/organization/employees/employees.component.html b/src/app/organization/employees/employees.component.html index 959b76470..b0a5f5cb0 100644 --- a/src/app/organization/employees/employees.component.html +++ b/src/app/organization/employees/employees.component.html @@ -1,11 +1,11 @@
- - @@ -14,53 +14,53 @@
-
- - Filter - - -
+
+ + Filter + + +
-
+
- +
- - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + -
Name {{ employee.displayName }} Name {{ employee.displayName }} Loan Officer -
- - -
-
Loan Officer +
+ + +
+
Office {{ employees.officeName }} Office {{ employees.officeName }} Status -
- -
-
Status +
+ +
+
+ - + -
+
-
+
\ No newline at end of file From 16728bcbbf026610e9d897068c515772d6d1b249 Mon Sep 17 00:00:00 2001 From: gustavao Date: Tue, 3 Aug 2021 12:13:10 -0500 Subject: [PATCH 7/8] tslint bugs are fixed --- .../view-holidays/view-holidays.component.ts | 2 +- src/app/organization/organization.service.ts | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) 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 deada1c43..9ef74db51 100644 --- a/src/app/organization/holidays/view-holidays/view-holidays.component.ts +++ b/src/app/organization/holidays/view-holidays/view-holidays.component.ts @@ -63,7 +63,7 @@ export class ViewHolidaysComponent { unAssignStaffDialogRef.afterClosed().subscribe((response: { confirm: any }) => { if (response.confirm) { this.organizationService.activateHoliday(this.holidayData.id) - .subscribe((response: any) => { + .subscribe(() => { this.router.navigate(['/organization/holidays']); }); } diff --git a/src/app/organization/organization.service.ts b/src/app/organization/organization.service.ts index fed484649..820b17792 100644 --- a/src/app/organization/organization.service.ts +++ b/src/app/organization/organization.service.ts @@ -93,8 +93,8 @@ export class OrganizationService { */ getOfficerTemplate(officerId: string, officeId: string): Observable { const httpParams = new HttpParams() - .set('fromLoanOfficerId', officerId.toString()) - .set('officeId', officerId.toString()); + .set('fromLoanOfficerId', officerId.toString()) + .set('officeId', officerId.toString()); return this.http.get('/loans/loanreassignment/template', { params: httpParams }); } @@ -134,9 +134,9 @@ export class OrganizationService { return this.http.put(`/offices/${officeId}`, office); } - /** - * @returns {Observable} - */ + /** + * @returns {Observable} + */ getOfficeDatatables(): Observable { const httpParams = new HttpParams().set('apptable', 'm_office'); return this.http.get(`/datatables`, { params: httpParams }); @@ -222,7 +222,7 @@ export class OrganizationService { * @returns {Observable} Currencies data */ updateCurrencies(currencies: any[]): Observable { - return this.http.put('/currencies', {currencies}); + return this.http.put('/currencies', { currencies }); } /** @@ -431,7 +431,7 @@ export class OrganizationService { */ settleCash(tellerId: string, cashierId: string, cashData: any): Observable { const httpParams = new HttpParams().set('command', 'settle'); - return this.http.post(`/tellers/${tellerId}/cashiers/${cashierId}/settle`, cashData, {params: httpParams}); + return this.http.post(`/tellers/${tellerId}/cashiers/${cashierId}/settle`, cashData, { params: httpParams }); } /** @@ -442,7 +442,7 @@ export class OrganizationService { */ allocateCash(tellerId: string, cashierId: string, cashData: any): Observable { const httpParams = new HttpParams().set('command', 'allocate'); - return this.http.post(`/tellers/${tellerId}/cashiers/${cashierId}/allocate`, cashData, {params: httpParams}); + return this.http.post(`/tellers/${tellerId}/cashiers/${cashierId}/allocate`, cashData, { params: httpParams }); } /** Get Cashier Template. @@ -639,14 +639,14 @@ export class OrganizationService { return this.http.delete(`/holidays/${holidayId}`); } - /** + /** * Activate Holiday. * @param holidayId Holiday Id to be deleted. * @returns {Observable} Resource Id. */ activateHoliday(holidayId: string): Observable { const httpParams = new HttpParams() - .set('command','activate'); + .set('command', 'activate'); return this.http.post(`/holidays/${holidayId}`, null, { params: httpParams }); } @@ -706,7 +706,7 @@ export class OrganizationService { */ getImports(entity: string): Observable { const httpParams = new HttpParams().set('entityType', entity); - return this.http.get('/imports', { params: httpParams } ); + return this.http.get('/imports', { params: httpParams }); } /** @@ -765,7 +765,7 @@ export class OrganizationService { if (legalFormType.length) { httpParams = httpParams.set('legalFormType', legalFormType); } - return this.http.get(`${urlSuffix}/downloadtemplate`, { params: httpParams, responseType: 'arraybuffer', observe: 'response'} ); + return this.http.get(`${urlSuffix}/downloadtemplate`, { params: httpParams, responseType: 'arraybuffer', observe: 'response' }); } /** @@ -775,8 +775,8 @@ export class OrganizationService { getImportDocument(id: any): Observable { const httpParams = new HttpParams() .set('importDocumentId', id) - .set('tenantIdentifier', 'default' ); - return this.http.get('/imports/downloadOutputTemplate', { params: httpParams, responseType: 'arraybuffer', observe: 'response'}); + .set('tenantIdentifier', 'default'); + return this.http.get('/imports/downloadOutputTemplate', { params: httpParams, responseType: 'arraybuffer', observe: 'response' }); } /** @@ -794,7 +794,7 @@ export class OrganizationService { formData.append('file', file); formData.append('locale', this.settingsService.language.code); formData.append('dateFormat', this.settingsService.dateFormat); - return this.http.post(`${urlSuffix}/uploadtemplate`, formData , { params: httpParams } ); + return this.http.post(`${urlSuffix}/uploadtemplate`, formData, { params: httpParams }); } } From 7044b6e34d233a6fbebc1e658f51d335a9e93c3f Mon Sep 17 00:00:00 2001 From: gustavao Date: Tue, 3 Aug 2021 10:30:42 -0500 Subject: [PATCH 8/8] tslint bugs are fixed --- .../holidays/view-holidays/view-holidays.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 9ef74db51..d794f14ee 100644 --- a/src/app/organization/holidays/view-holidays/view-holidays.component.ts +++ b/src/app/organization/holidays/view-holidays/view-holidays.component.ts @@ -28,10 +28,10 @@ export class ViewHolidaysComponent { * @param {ActivatedRoute} route Activated Route. */ constructor(private route: ActivatedRoute, - private router: Router, - private dialog: MatDialog, - private organizationService: OrganizationService ) { - this.route.data.subscribe((data: { holidays: any}) => { + private router: Router, + private dialog: MatDialog, + private organizationService: OrganizationService) { + this.route.data.subscribe((data: { holidays: any }) => { this.holidayData = data.holidays; }); }