diff --git a/ui/src/app/home/consortium/add-consortium-member.component.ts b/ui/src/app/home/consortium/add-consortium-member.component.ts index 2ee430641..c50ddb44b 100644 --- a/ui/src/app/home/consortium/add-consortium-member.component.ts +++ b/ui/src/app/home/consortium/add-consortium-member.component.ts @@ -26,7 +26,7 @@ export class AddConsortiumMemberComponent implements OnInit { routeData: any currentMonth: number | undefined currentYear: number | undefined - monthList: [number, string][] | undefined + monthList: [string, string][] | undefined yearList: number[] | undefined editForm: FormGroup = this.fb.group({ orgName: [null, [Validators.required, Validators.maxLength(41)]], diff --git a/ui/src/app/home/consortium/remove-consortium-member.component.ts b/ui/src/app/home/consortium/remove-consortium-member.component.ts index ac276ef56..01a45b723 100644 --- a/ui/src/app/home/consortium/remove-consortium-member.component.ts +++ b/ui/src/app/home/consortium/remove-consortium-member.component.ts @@ -28,7 +28,7 @@ export class RemoveConsortiumMemberComponent implements OnInit, OnDestroy { consortiumMemberId: string | undefined currentMonth: number | undefined currentYear: number | undefined - monthList: [number, string][] | undefined + monthList: [string, string][] | undefined yearList: number[] | undefined editForm: FormGroup = this.fb.group({ terminationMonth: [null, [Validators.required]], @@ -55,6 +55,7 @@ export class RemoveConsortiumMemberComponent implements OnInit, OnDestroy { this.currentMonth = this.dateUtilService.getCurrentMonthNumber() this.currentYear = this.dateUtilService.getCurrentYear() this.monthList = this.dateUtilService.getMonthsList() + this.yearList = this.dateUtilService.getFutureYearsIncludingCurrent(1) this.accountService.getAccountData().subscribe((account) => { diff --git a/ui/src/app/shared/service/date-util.service.ts b/ui/src/app/shared/service/date-util.service.ts index 630027b39..12338110e 100644 --- a/ui/src/app/shared/service/date-util.service.ts +++ b/ui/src/app/shared/service/date-util.service.ts @@ -37,22 +37,22 @@ export class DateUtilService { return years } - getMonthsList(): [number, string][] { + getMonthsList(): [string, string][] { const months = moment.months() const monthsArray = [] for (let _i = 1; _i <= months.length; _i++) { - const res: [number, string] = [parseInt(('0' + _i.toString()).slice(-2)), months[_i - 1]] + const res: [string, string] = [('0' + _i.toString()).slice(-2), months[_i - 1]] monthsArray.push(res) } return monthsArray } - getFutureMonthsList(): [number, string][] { + getFutureMonthsList(): [string, string][] { const months = moment.months() const monthsArray = [] for (let _i = 1; _i <= months.length; _i++) { if (_i > this.getCurrentMonthNumber()) { - const res: [number, string] = [parseInt(('0' + _i.toString()).slice(-2)), months[_i - 1]] + const res: [string, string] = [('0' + _i.toString()).slice(-2), months[_i - 1]] monthsArray.push(res) } }