diff --git a/src/app/election/components/election-config/election-config.component.html b/src/app/election/components/election-config/election-config.component.html index b1f74368a..8de0e4557 100644 --- a/src/app/election/components/election-config/election-config.component.html +++ b/src/app/election/components/election-config/election-config.component.html @@ -34,15 +34,6 @@ Title is required - - Election Type * - - @for (type of electionTypes; track type) { - {{ type }} - } - - - Description Define Election Posts - add Add Post @@ -182,10 +172,6 @@ Title {{ basicForm.value.title || '—' }} - - Type - {{ basicForm.value.electionType }} - Nomination Period diff --git a/src/app/election/components/election-config/election-config.component.ts b/src/app/election/components/election-config/election-config.component.ts index 842542bb8..53a6c1c2d 100644 --- a/src/app/election/components/election-config/election-config.component.ts +++ b/src/app/election/components/election-config/election-config.component.ts @@ -63,20 +63,7 @@ export class ElectionConfigComponent implements OnInit { basicForm!: FormGroup; postsForm!: FormGroup; - electionTypes = [ - 'DIRECTOR', - 'GENERAL', - 'BY_ELECTION' - ]; - postNames = [ - 'Director', - 'Chairman', - 'Vice Chairman', - 'Secretary', - 'Treasurer', - 'President', - 'Managing Director' - ]; + postNames = ['Director']; today = new Date(); @@ -95,10 +82,6 @@ export class ElectionConfigComponent implements OnInit { Validators.required ], description: [''], - electionType: [ - 'DIRECTOR', - Validators.required - ], nominationStartDate: [ null, Validators.required @@ -124,7 +107,7 @@ export class ElectionConfigComponent implements OnInit { createPostGroup(): FormGroup { return this.fb.group({ postName: [ - '', + 'Director', Validators.required ], totalSeats: [ @@ -234,6 +217,7 @@ export class ElectionConfigComponent implements OnInit { const bv = this.basicForm.value; const payload = { ...bv, + electionType: 'DIRECTOR', nominationStartDate: this.toDateString(bv.nominationStartDate), nominationEndDate: this.toDateString(bv.nominationEndDate), electionDate: this.toDateString(bv.electionDate), diff --git a/src/app/election/components/nomination-apply/nomination-apply.component.html b/src/app/election/components/nomination-apply/nomination-apply.component.html index 509aba2d7..60c79c500 100644 --- a/src/app/election/components/nomination-apply/nomination-apply.component.html +++ b/src/app/election/components/nomination-apply/nomination-apply.component.html @@ -1429,7 +1429,14 @@ Please select a post - @if (selectedPost()) { + @if ( + selectedPost() && + (selectedPost().minAge || + selectedPost().maxAge || + selectedPost().casteCategory || + (selectedPost().genderType && selectedPost().genderType !== 'ANY') || + selectedPost().minShareHolding > 0) + ) { Eligibility for this post