From 2c5847bd4a37023f43d73d42ccd130f2504f3749 Mon Sep 17 00:00:00 2001 From: eirikhaugstulen Date: Sat, 15 Nov 2025 22:54:27 +0300 Subject: [PATCH 1/2] docs: update developer docs with new create command --- docs/developer/develop-a-capture-plugin.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/developer/develop-a-capture-plugin.md b/docs/developer/develop-a-capture-plugin.md index 422c0e93bc..b0950e4723 100644 --- a/docs/developer/develop-a-capture-plugin.md +++ b/docs/developer/develop-a-capture-plugin.md @@ -11,14 +11,14 @@ Developing a capture plugin is almost the same as developing a regular DHIS2 cus ## Step 1: Create a new DHIS2 custom app -To create a new DHIS2 custom app, you can use the D2 CLI. +To create a new DHIS2 custom app, you can use the `npm create @dhis2/app` command. -The D2 CLI helps you with many things, such as setting up a new project, building your app, and deploying it to your DHIS2 instance. +This will prompt you with a series of questions to help you set up your new app, and once completed, it will create all the necessary files and packages for you. -Please read our documentation on the [D2 CLI](/docs/quickstart/quickstart-web) to learn more about how to use it. +Please read our documentation for details on how to use the command [here](/docs/cli/create-app). ```sh -d2 app scripts init my-form-field-plugin +npm create @dhis2/app ``` ## Step 2: Add a plugin entrypoint From ab2118209927c5465104711bbecc5a0cd3f95095 Mon Sep 17 00:00:00 2001 From: eirikhaugstulen Date: Sun, 16 Nov 2025 00:16:03 +0300 Subject: [PATCH 2/2] chore: add orgUnitId to types --- docs/developer/form-field-plugins/developer-details.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/developer/form-field-plugins/developer-details.md b/docs/developer/form-field-plugins/developer-details.md index 9a42b8db2b..7d4492ba7a 100644 --- a/docs/developer/form-field-plugins/developer-details.md +++ b/docs/developer/form-field-plugins/developer-details.md @@ -130,13 +130,14 @@ type SetContextFieldValueProps = { } export type IFormFieldPluginProps = { + orgUnitId: string; values: Record; errors: Record; warnings: Record; fieldsMetadata: Record; - setFieldValue: (values: SetFieldValueProps) => void; - setContextFieldValue: (values: SetContextFieldValueProps) => void; viewMode: boolean; formSubmitted: boolean; + setFieldValue: (values: SetFieldValueProps) => void; + setContextFieldValue: (values: SetContextFieldValueProps) => void; } ```