From b679e410d4da576127c67734d69960fcfd2399bd Mon Sep 17 00:00:00 2001 From: nebojsajsimic <6024893+nebojsajsimic@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:36:07 +0100 Subject: [PATCH 1/2] Fix test id names on review --- pdf-ui/src/components/CreationGoveranceAction/Step2.jsx | 8 +++++--- pdf-ui/src/components/CreationGoveranceAction/Step3.jsx | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pdf-ui/src/components/CreationGoveranceAction/Step2.jsx b/pdf-ui/src/components/CreationGoveranceAction/Step2.jsx index be24076..99c7d7b 100644 --- a/pdf-ui/src/components/CreationGoveranceAction/Step2.jsx +++ b/pdf-ui/src/components/CreationGoveranceAction/Step2.jsx @@ -62,12 +62,10 @@ const Step2 = ({ setLoading(true); try { const governanceActionTypeList = await getGovernanceActionTypes(); - const mappedData = governanceActionTypeList?.data?.map((item) => ({ value: item?.id, label: item?.attributes?.gov_action_type_name, })); - setGovernanceActionTypes(mappedData); } catch (error) { console.error(error); @@ -118,6 +116,11 @@ const Step2 = ({ fetchGovernanceActionTypes(); }, []); + useEffect(()=>{ + setSelectedGovActionName(governanceActionTypes.find( + (option) => option?.value === +proposalData?.gov_action_type_id + )?.label || '') + },[governanceActionTypes]) return ( - {selectedGovActionName === 'Treasury' ? ( <> {withdrawal.prop_receiving_address} @@ -213,7 +213,7 @@ const Step3 = ({ {withdrawal.prop_amount} From baeeac93dec322e0dbbbfa976f06ed592472e027 Mon Sep 17 00:00:00 2001 From: nebojsajsimic <6024893+nebojsajsimic@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:46:58 +0100 Subject: [PATCH 2/2] Version change and description --- pdf-ui/CHANGELOG.md | 9 +++++++++ pdf-ui/package-lock.json | 2 +- pdf-ui/package.json | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pdf-ui/CHANGELOG.md b/pdf-ui/CHANGELOG.md index 3ef226f..c2fc4c0 100644 --- a/pdf-ui/CHANGELOG.md +++ b/pdf-ui/CHANGELOG.md @@ -8,6 +8,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 As a minor extension, we also keep a semantic version for the `UNRELEASED` changes. +## [v0.5.5](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.5.5) 2024-12-06 + +### Added - +### Fixed - +- Fix display Stake Address and Amount in Draft [Issue #2438](https://github.com/IntersectMBO/govtool/issues/2438) +- Fix Test Id names in review form [Issue #2437](https://github.com/IntersectMBO/govtool/issues/2437) +### Changed - +### Removed - + ## [v0.5.4](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.5.4) 2024-12-05 ### Added - diff --git a/pdf-ui/package-lock.json b/pdf-ui/package-lock.json index 5accc2e..32b2cd4 100644 --- a/pdf-ui/package-lock.json +++ b/pdf-ui/package-lock.json @@ -1,6 +1,6 @@ { "name": "@intersect.mbo/pdf-ui", - "version": "0.5.4", + "version": "0.5.5", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/pdf-ui/package.json b/pdf-ui/package.json index d6608c4..ba2a921 100644 --- a/pdf-ui/package.json +++ b/pdf-ui/package.json @@ -1,6 +1,6 @@ { "name": "@intersect.mbo/pdf-ui", - "version": "0.5.4", + "version": "0.5.5", "description": "Proposal discussion ui", "main": "./src/index.js", "exports": {