From 18c3bd3b343f549be355a5a9c147f00641957792 Mon Sep 17 00:00:00 2001 From: nadavosa Date: Wed, 27 May 2026 10:38:15 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20fix(#558):=20align=20opportu?= =?UTF-8?q?nity=20card=20status/matchStatus=20i18n=20keys=20with=20API=20v?= =?UTF-8?q?alues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add missing 'opp-inactive' to dashboard.opportunities.status in DE and EN - Rename matchStatus translation keys from 'vol-*' to 'opp-vol-*' to match OpportunityMatchStatusType values returned by the API - Update matchStatusColorMap and matchStatusIconMap keys accordingly Co-Authored-By: Claude Sonnet 4.6 --- public/locales/de/translations.json | 13 +++++----- public/locales/en/translations.json | 13 +++++----- .../Opportunities/OpportunityCard.helpers.tsx | 25 +++++++++---------- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/public/locales/de/translations.json b/public/locales/de/translations.json index b0d54b76..1c313381 100644 --- a/public/locales/de/translations.json +++ b/public/locales/de/translations.json @@ -753,15 +753,16 @@ "opp-new": "Neu", "opp-searching": "Suche läuft", "opp-active": "Aktiv", + "opp-inactive": "Inaktiv", "opp-past": "Vergangen" }, "matchStatus": { - "vol-no-matches": "Keine Zuweisungen", - "vol-pending-match": "Zuordnung ausstehend", - "vol-matched": "Zugeordnet", - "vol-needs-rematch": "Erneute Zuordnung erforderlich", - "vol-unmatched": "Nicht zugeordnet", - "vol-past": "Vergangen" + "opp-vol-no-matches": "Keine Zuweisungen", + "opp-vol-pending-match": "Zuordnung ausstehend", + "opp-vol-matched": "Zugeordnet", + "opp-vol-needs-rematch": "Erneute Zuordnung erforderlich", + "opp-vol-unmatched": "Nicht zugeordnet", + "opp-vol-past": "Vergangen" }, "type": { "accompanying": "Begleitung", diff --git a/public/locales/en/translations.json b/public/locales/en/translations.json index 631abc7f..81f9fbde 100644 --- a/public/locales/en/translations.json +++ b/public/locales/en/translations.json @@ -796,15 +796,16 @@ "opp-new": "New", "opp-searching": "Searching", "opp-active": "Active", + "opp-inactive": "Inactive", "opp-past": "Past" }, "matchStatus": { - "vol-no-matches": "No matches", - "vol-pending-match": "Pending match", - "vol-matched": "Matched", - "vol-needs-rematch": "Needs rematch", - "vol-unmatched": "Unmatched", - "vol-past": "Past" + "opp-vol-no-matches": "No matches", + "opp-vol-pending-match": "Pending match", + "opp-vol-matched": "Matched", + "opp-vol-needs-rematch": "Needs rematch", + "opp-vol-unmatched": "Unmatched", + "opp-vol-past": "Past" }, "type": { "accompanying": "Accompanying", diff --git a/src/components/Dashboard/Opportunities/OpportunityCard.helpers.tsx b/src/components/Dashboard/Opportunities/OpportunityCard.helpers.tsx index a2aeb10a..bb46589d 100644 --- a/src/components/Dashboard/Opportunities/OpportunityCard.helpers.tsx +++ b/src/components/Dashboard/Opportunities/OpportunityCard.helpers.tsx @@ -54,23 +54,22 @@ export const statusIconMap: Record = { [OpportunityStatusType.PAST]: , }; -// TODO: replace string with OpportunityMatchStatusType once SDK PR #89 is merged export const matchStatusColorMap: Record = { - "vol-no-matches": "var(--color-grey-700)", - "vol-pending-match": "var(--color-orange-500)", - "vol-matched": "var(--color-green-700)", - "vol-needs-rematch": "var(--color-red-50)", - "vol-unmatched": "var(--color-grey-700)", - "vol-past": "var(--color-grey-700)", + "opp-vol-no-matches": "var(--color-grey-700)", + "opp-vol-pending-match": "var(--color-orange-500)", + "opp-vol-matched": "var(--color-green-700)", + "opp-vol-needs-rematch": "var(--color-red-50)", + "opp-vol-unmatched": "var(--color-grey-700)", + "opp-vol-past": "var(--color-grey-700)", }; export const matchStatusIconMap: Record = { - "vol-no-matches": , - "vol-pending-match": , - "vol-matched": , - "vol-needs-rematch": , - "vol-unmatched": , - "vol-past": , + "opp-vol-no-matches": , + "opp-vol-pending-match": , + "opp-vol-matched": , + "opp-vol-needs-rematch": , + "opp-vol-unmatched": , + "opp-vol-past": , }; export const volunteerTypeIconMap: Record = { From 76a4f631cb94b4ff8622ca470254624b77c3f636 Mon Sep 17 00:00:00 2001 From: nadavosa Date: Wed, 27 May 2026 11:07:26 +0200 Subject: [PATCH 2/2] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20type=20mat?= =?UTF-8?q?chStatus=20maps=20as=20Record?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- .../Dashboard/Opportunities/OpportunityCard.helpers.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Dashboard/Opportunities/OpportunityCard.helpers.tsx b/src/components/Dashboard/Opportunities/OpportunityCard.helpers.tsx index bb46589d..06590d7b 100644 --- a/src/components/Dashboard/Opportunities/OpportunityCard.helpers.tsx +++ b/src/components/Dashboard/Opportunities/OpportunityCard.helpers.tsx @@ -10,7 +10,7 @@ import { TranslateIcon, } from "@phosphor-icons/react"; import { format } from "date-fns"; -import { ApiVolunteerOpportunityGetList, OpportunityStatusType, ProfileVolunteeringType } from "need4deed-sdk"; +import { ApiVolunteerOpportunityGetList, OpportunityMatchStatusType, OpportunityStatusType, ProfileVolunteeringType } from "need4deed-sdk"; import { utcHhmmToLocal } from "@/utils"; import { JSX } from "react"; @@ -54,7 +54,7 @@ export const statusIconMap: Record = { [OpportunityStatusType.PAST]: , }; -export const matchStatusColorMap: Record = { +export const matchStatusColorMap: Record = { "opp-vol-no-matches": "var(--color-grey-700)", "opp-vol-pending-match": "var(--color-orange-500)", "opp-vol-matched": "var(--color-green-700)", @@ -63,7 +63,7 @@ export const matchStatusColorMap: Record = { "opp-vol-past": "var(--color-grey-700)", }; -export const matchStatusIconMap: Record = { +export const matchStatusIconMap: Record = { "opp-vol-no-matches": , "opp-vol-pending-match": , "opp-vol-matched": ,