From fb0df9231d5a88e3179108e9acdc73a57eb3470e Mon Sep 17 00:00:00 2001 From: Damian Borowiecki Date: Fri, 27 Sep 2024 16:11:26 +0200 Subject: [PATCH] OP-2072: Fixed Issue wihth invalid UUID format in bundle table --- src/actions.js | 2 +- src/components/ContributionPlanBundleContributionPlans.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/actions.js b/src/actions.js index c879534..0c0f066 100644 --- a/src/actions.js +++ b/src/actions.js @@ -113,7 +113,7 @@ export function fetchContributionPlanBundles(params) { export function fetchContributionPlanBundle(contributionPlanBundleId, filters=[]) { let filter = !!contributionPlanBundleId - ? `id: "${contributionPlanBundleId}"` + ? `id: "${decodeId(contributionPlanBundleId)}"` : ""; filters.push(filter) const payload = formatPageQuery( diff --git a/src/components/ContributionPlanBundleContributionPlans.js b/src/components/ContributionPlanBundleContributionPlans.js index b6bacf8..f775aa6 100644 --- a/src/components/ContributionPlanBundleContributionPlans.js +++ b/src/components/ContributionPlanBundleContributionPlans.js @@ -11,6 +11,9 @@ import DeleteIcon from '@material-ui/icons/Delete'; import { DEFAULT_PAGE_SIZE, ROWS_PER_PAGE_OPTIONS } from "../constants"; import CreateContributionPlanBundleDetailsDialog from "../dialogs/CreateContributionPlanBundleDetailsDialog"; import UpdateContributionPlanBundleDetailsDialog from "../dialogs/UpdateContributionPlanBundleDetailsDialog"; +import { + decodeId, +} from "@openimis/fe-core"; const styles = theme => ({ tableTitle: theme.table.title, @@ -48,7 +51,7 @@ class ContributionPlanBundleContributionPlans extends PagedDataHandler { let params = []; if (!!this.props.contributionPlanBundleId) { params.push("isDeleted: false"); - params.push(`contributionPlanBundle_Id: "${this.props.contributionPlanBundleId}"`); + params.push(`contributionPlanBundle_Id: "${decodeId(this.props.contributionPlanBundleId)}"`); return params; } return null;