Skip to content

Commit

Permalink
feat(income-plan): Use different endpoint for income plan year (#17441)
Browse files Browse the repository at this point in the history
* Use different endpoint for ip year

* chore: nx format:write update dirty files

* Update libs/application/templates/social-insurance-administration/income-plan/src/forms/IncomePlanForm.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* chore: nx format:write update dirty files

---------

Co-authored-by: andes-it <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Jan 8, 2025
1 parent 28af6af commit b744840
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ export const IncomePlanForm: Form = buildForm({
id: 'incomePlanTable',
title: incomePlanFormMessage.info.section,
description: (application: Application) => {
const { latestIncomePlan } = getApplicationExternalData(
application.externalData,
)
const { incomePlanConditions, latestIncomePlan } =
getApplicationExternalData(application.externalData)
const hasLatestIncomePlan = !isEmpty(latestIncomePlan)
const baseMessage = hasLatestIncomePlan
? incomePlanFormMessage.incomePlan
Expand All @@ -84,7 +83,9 @@ export const IncomePlanForm: Form = buildForm({
return {
...baseMessage,
values: {
incomePlanYear: latestIncomePlan.year,
incomePlanYear:
incomePlanConditions?.incomePlanYear ??
new Date().getFullYear(),
},
}
},
Expand Down

0 comments on commit b744840

Please sign in to comment.