Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/playground/d2.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import('@dhis2/cli-app-scripts').D2Config} */
const config = {
type: 'app',
title: 'Program Rule Playground',
title: 'Program Rules Playground',
entryPoints: {
app: './src/AppWrapper.tsx',
},
Expand Down
18 changes: 4 additions & 14 deletions apps/playground/i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2026-08-01T09:46:39.955Z\n"
"PO-Revision-Date: 2026-08-01T09:46:39.955Z\n"
"POT-Creation-Date: 2026-08-02T13:21:32.021Z\n"
"PO-Revision-Date: 2026-08-02T13:21:32.021Z\n"

msgid "Enrollment"
msgstr "Enrollment"
Expand Down Expand Up @@ -51,9 +51,6 @@ msgstr "Event"
msgid "Search by name, code, or ID"
msgstr "Search by name, code, or ID"

msgid "None"
msgstr "None"

msgid "Program"
msgstr "Program"

Expand All @@ -63,9 +60,6 @@ msgstr "Type"
msgid "Stages"
msgstr "Stages"

msgid "Rules"
msgstr "Rules"

msgid "Last updated"
msgstr "Last updated"

Expand Down Expand Up @@ -178,12 +172,8 @@ msgstr "{{sourceLabel}} · {{ruleName}}"
msgid "Program indicators"
msgstr "Program indicators"

msgid ""
"Pick a program to open its forms and watch its rules evaluate. Nothing is "
"saved unless you ask for it."
msgstr ""
"Pick a program to open its forms and watch its rules evaluate. Nothing is "
"saved unless you ask for it."
msgid "Pick a program to open its forms and watch its rules evaluate."
msgstr "Pick a program to open its forms and watch its rules evaluate."

msgid "Error loading programs"
msgstr "Error loading programs"
Expand Down
2 changes: 1 addition & 1 deletion apps/playground/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "playground",
"name": "program-rules-playground",
"version": "0.0.0",
"description": "",
"license": "BSD-3-Clause",
Expand Down
Binary file added apps/playground/public/dhis2-app-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 2 additions & 12 deletions apps/playground/src/components/rules/RuleFeedbackList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,8 @@ function FeedbackRow({
</span>
<div className="flex min-w-0 flex-col gap-0.5">
<span className="text-sm leading-snug text-dhis2-grey-900">
{item.type === 'text' ? (
<strong className="font-semibold">
{item.content}
</strong>
) : (
<>
<strong className="font-semibold">
{item.content}:{' '}
</strong>
{item.value}
</>
)}
<strong className="font-semibold">{item.content}</strong>
{item.value ? <>: {item.value}</> : null}
</span>
<span className="text-xs text-dhis2-grey-600">
{ruleName
Expand Down
4 changes: 2 additions & 2 deletions components/dhis2-ui/src/components/FormFeedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ function FeedbackPanel({ title, items }: { title: string; items: FeedbackItem[]
<h3 style={{ margin: '0 0 var(--spacers-dp8)' }}>{title}</h3>
{items.map((item) => (
<NoticeBox key={`${item.location}:${item.content}`} title={item.content}>
{item.type === 'keyValuePair' ? (
{item.value ? (
<>
<strong>{item.content}</strong>: {item.value}
</>
) : (
item.value
item.content
)}
</NoticeBox>
))}
Expand Down
22 changes: 12 additions & 10 deletions components/mantine/src/components/FormFeedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ function FeedbackPanel({ title, items }: { title: string; items: FeedbackItem[]
<Title order={5}>{title}</Title>
{items.map((item) => (
<Alert key={`${item.location}:${item.content}`} title={item.content} color="blue">
{item.type === 'keyValuePair' ? (
<Text>
<Text span fw={600}>
{item.content}
</Text>
: {item.value}
</Text>
) : (
<Text>{item.value}</Text>
)}
<Text>
{item.value ? (
<>
<Text span fw={600}>
{item.content}
</Text>
: {item.value}
</>
) : (
item.content
)}
</Text>
</Alert>
))}
</Stack>
Expand Down
4 changes: 2 additions & 2 deletions components/mui/src/components/FormFeedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ function FeedbackPanel({ title, items }: { title: string; items: FeedbackItem[]
<Stack spacing={1}>
{items.map((item) => (
<Alert key={`${item.location}:${item.content}`} severity="info">
{item.type === 'keyValuePair' ? (
{item.value ? (
<>
<strong>{item.content}</strong>: {item.value}
</>
) : (
item.value
item.content
)}
</Alert>
))}
Expand Down
Loading