From 377b062aceb5f4536324ccef0647d48a30bb0b9c Mon Sep 17 00:00:00 2001 From: Cyril Joseph Date: Fri, 18 Jul 2025 17:22:17 -0300 Subject: [PATCH] feedback updates --- .../carnet/shipping/shipping.component.html | 4 +-- .../carnet/shipping/shipping.component.scss | 5 +++ src/app/carnet/shipping/shipping.component.ts | 34 +++++++++++-------- src/app/holder/add/add-holder.component.html | 6 ---- src/app/holder/add/add-holder.component.scss | 3 -- src/app/holder/add/add-holder.component.ts | 21 +----------- .../basic-details.component.html | 10 +++--- .../basic-details.component.scss | 6 ++-- .../basic-details/basic-details.component.ts | 28 ++++++++++++--- .../holder/contacts/contacts.component.html | 5 +++ .../holder/contacts/contacts.component.scss | 1 + src/app/holder/contacts/contacts.component.ts | 19 +++++++++++ .../holder/edit/edit-holder.component.html | 13 ++----- .../holder/edit/edit-holder.component.scss | 14 +++----- src/app/holder/edit/edit-holder.component.ts | 28 +++------------ .../search/search-holder.component.html | 3 +- .../search/search-holder.component.scss | 5 +++ src/styles.scss | 2 +- 18 files changed, 106 insertions(+), 101 deletions(-) diff --git a/src/app/carnet/shipping/shipping.component.html b/src/app/carnet/shipping/shipping.component.html index 4d5d2ef..bfdae98 100644 --- a/src/app/carnet/shipping/shipping.component.html +++ b/src/app/carnet/shipping/shipping.component.html @@ -30,9 +30,9 @@

{{getContactLabel()}}

- -
\ No newline at end of file diff --git a/src/app/holder/add/add-holder.component.scss b/src/app/holder/add/add-holder.component.scss index 800e8ad..e69de29 100644 --- a/src/app/holder/add/add-holder.component.scss +++ b/src/app/holder/add/add-holder.component.scss @@ -1,3 +0,0 @@ -.additional-actions { - margin: 12px 0; -} \ No newline at end of file diff --git a/src/app/holder/add/add-holder.component.ts b/src/app/holder/add/add-holder.component.ts index 8df9e92..8cfc989 100644 --- a/src/app/holder/add/add-holder.component.ts +++ b/src/app/holder/add/add-holder.component.ts @@ -1,4 +1,4 @@ -import { Component, inject } from '@angular/core'; +import { Component } from '@angular/core'; import { AngularMaterialModule } from '../../shared/module/angular-material.module'; import { CommonModule } from '@angular/common'; import { ReactiveFormsModule } from '@angular/forms'; @@ -10,8 +10,6 @@ import { MatInputModule } from '@angular/material/input'; import { ContactsComponent } from '../contacts/contacts.component'; import { UserPreferences } from '../../core/models/user-preference'; import { UserPreferencesService } from '../../core/services/user-preference.service'; -import { NavigationService } from '../../core/services/common/navigation.service'; -import { StorageService } from '../../core/services/common/storage.service'; @Component({ selector: 'app-add-holder', @@ -34,21 +32,16 @@ export class AddHolderComponent { isEditMode = false; holderid: number = 0; userPreferences: UserPreferences; - currentApplicationDetails: { headerid: number, applicationName: string } | null = null; stepsCompleted = { holderDetails: false, holderContacts: false }; - private navigationService = inject(NavigationService); - private storageService = inject(StorageService); - constructor( userPrefenceService: UserPreferencesService ) { this.userPreferences = userPrefenceService.getPreferences(); - this.currentApplicationDetails = this.storageService.get<{ headerid: number, applicationName: string }>('currentapplication') } onStepChange(event: StepperSelectionEvent): void { @@ -59,16 +52,4 @@ export class AddHolderComponent { this.holderid = holderid; this.stepsCompleted.holderDetails = true; } - - goBackToCarnetApplication(): void { - this.storageService.removeItem('currentapplication') - this.navigationService.navigate(["edit-carnet", this.currentApplicationDetails?.headerid], - { - state: { isEditMode: true }, - queryParams: { - applicationname: this.currentApplicationDetails?.applicationName, - return: 'holder' - } - }) - } } diff --git a/src/app/holder/basic-details/basic-details.component.html b/src/app/holder/basic-details/basic-details.component.html index 865cb25..cd8efce 100644 --- a/src/app/holder/basic-details/basic-details.component.html +++ b/src/app/holder/basic-details/basic-details.component.html @@ -42,8 +42,7 @@ Maximum 20 characters allowed - -
+ Holder Type Corporation @@ -58,9 +57,6 @@ Yes No -
- -
Are you belong to Government Agency ? Yes @@ -147,6 +143,10 @@
+ + +
diff --git a/src/app/holder/contacts/contacts.component.scss b/src/app/holder/contacts/contacts.component.scss index 03674f5..97921b4 100644 --- a/src/app/holder/contacts/contacts.component.scss +++ b/src/app/holder/contacts/contacts.component.scss @@ -15,6 +15,7 @@ button { float: right; + margin-left: 16px; } } diff --git a/src/app/holder/contacts/contacts.component.ts b/src/app/holder/contacts/contacts.component.ts index f667a3e..0516477 100644 --- a/src/app/holder/contacts/contacts.component.ts +++ b/src/app/holder/contacts/contacts.component.ts @@ -14,6 +14,8 @@ import { Contact } from '../../core/models/holder/contact'; import { CustomPaginator } from '../../shared/custom-paginator'; import { MatDialog } from '@angular/material/dialog'; import { ConfirmDialogComponent } from '../../shared/components/confirm-dialog/confirm-dialog.component'; +import { NavigationService } from '../../core/services/common/navigation.service'; +import { StorageService } from '../../core/services/common/storage.service'; @Component({ selector: 'app-contacts', @@ -42,6 +44,7 @@ export class ContactsComponent { showForm = false; showInactiveContacts = false; contacts: Contact[] = []; + currentApplicationDetails: { headerid: number, applicationName: string } | null = null; contactReadOnlyFields: any = { lastChangedDate: null, @@ -55,6 +58,8 @@ export class ContactsComponent { private contactService = inject(ContactService); private notificationService = inject(NotificationService); private errorHandler = inject(ApiErrorHandlerService); + private navigationService = inject(NavigationService); + private storageService = inject(StorageService); constructor() { this.contactForm = this.fb.group({ @@ -67,6 +72,8 @@ export class ContactsComponent { fax: ['', [Validators.pattern(/^[0-9]{10,15}$/)]], email: ['', [Validators.required, Validators.email, Validators.maxLength(100)]], }); + + this.currentApplicationDetails = this.storageService.get<{ headerid: number, applicationName: string }>('currentapplication') } ngOnInit(): void { @@ -229,4 +236,16 @@ export class ContactsComponent { } }); } + + goBackToCarnetApplication(): void { + this.storageService.removeItem('currentapplication') + this.navigationService.navigate(["edit-carnet", this.currentApplicationDetails?.headerid], + { + state: { isEditMode: true }, + queryParams: { + applicationname: this.currentApplicationDetails?.applicationName, + return: 'holder' + } + }) + } } diff --git a/src/app/holder/edit/edit-holder.component.html b/src/app/holder/edit/edit-holder.component.html index ab2c3f8..16a606f 100644 --- a/src/app/holder/edit/edit-holder.component.html +++ b/src/app/holder/edit/edit-holder.component.html @@ -1,4 +1,4 @@ - +
@@ -9,8 +9,7 @@ Basic Details - + @@ -21,10 +20,4 @@ - - -
- -
\ No newline at end of file + \ No newline at end of file diff --git a/src/app/holder/edit/edit-holder.component.scss b/src/app/holder/edit/edit-holder.component.scss index adddce0..8dfbefe 100644 --- a/src/app/holder/edit/edit-holder.component.scss +++ b/src/app/holder/edit/edit-holder.component.scss @@ -1,17 +1,13 @@ -.page-header { - margin: 0.5rem 0px; - color: var(--mat-sys-primary); - font-weight: 500; -} +// .page-header { +// margin: 0.5rem 0px; +// color: var(--mat-sys-primary); +// font-weight: 500; +// } .holder-action-buttons { padding-bottom: 20px; } -.additional-actions { - margin: 12px 0; -} - .holder-headers-align .mat-expansion-panel-header-description { justify-content: space-between; align-items: center; diff --git a/src/app/holder/edit/edit-holder.component.ts b/src/app/holder/edit/edit-holder.component.ts index 0b5b927..fb80399 100644 --- a/src/app/holder/edit/edit-holder.component.ts +++ b/src/app/holder/edit/edit-holder.component.ts @@ -7,8 +7,6 @@ import { ActivatedRoute } from '@angular/router'; import { UserPreferencesService } from '../../core/services/user-preference.service'; import { BasicDetailComponent } from '../basic-details/basic-details.component'; import { ContactsComponent } from '../contacts/contacts.component'; -import { StorageService } from '../../core/services/common/storage.service'; -import { NavigationService } from '../../core/services/common/navigation.service'; @Component({ selector: 'app-edit-holder', @@ -20,19 +18,15 @@ export class EditHolderComponent { accordion = viewChild.required(MatAccordion); isEditMode = true; holderid = 0; - holderName: string | null = null; + //holderName: string | null = null; userPreferences: UserPreferences; - currentApplicationDetails: { headerid: number, applicationName: string } | null = null; private route = inject(ActivatedRoute); - private navigationService = inject(NavigationService); - private storageService = inject(StorageService); constructor(userPrefenceService: UserPreferencesService) { this.userPreferences = userPrefenceService.getPreferences(); - this.currentApplicationDetails = this.storageService.get<{ headerid: number, applicationName: string }>('currentapplication') - afterNextRender(() => { + // Open all panels this.accordion().openAll(); }); } @@ -42,19 +36,7 @@ export class EditHolderComponent { this.holderid = idParam ? parseInt(idParam, 10) : 0; } - onHolderNameUpdate(event: string): void { - this.holderName = event; - } - - goBackToCarnetApplication(): void { - this.storageService.removeItem('currentapplication') - this.navigationService.navigate(["edit-carnet", this.currentApplicationDetails?.headerid], - { - state: { isEditMode: true }, - queryParams: { - applicationname: this.currentApplicationDetails?.applicationName, - return: 'holder' - } - }) - } + // onHolderNameUpdate(event: string): void { + // this.holderName = event; + // } } diff --git a/src/app/holder/search/search-holder.component.html b/src/app/holder/search/search-holder.component.html index 86f2034..c26b983 100644 --- a/src/app/holder/search/search-holder.component.html +++ b/src/app/holder/search/search-holder.component.html @@ -99,7 +99,8 @@ - + diff --git a/src/app/holder/search/search-holder.component.scss b/src/app/holder/search/search-holder.component.scss index 1ef0aad..dabe4d5 100644 --- a/src/app/holder/search/search-holder.component.scss +++ b/src/app/holder/search/search-holder.component.scss @@ -63,6 +63,11 @@ justify-content: center; } + .selected-holder { + color: #28a745; + font-weight: 500; + } + .actions-icons { display: flex; } diff --git a/src/styles.scss b/src/styles.scss index 61ae96d..0c11033 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -2,7 +2,7 @@ @use '@angular/material' as mat; html { - @include mat.theme((density: -4)); + @include mat.theme((density: -5)); } html,