@smartkomm/plexus-cli 0.1.124 → 0.1.126

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- f6aafb013c32aeb0c313088112b391a760c5ee7b2af78ac486631f98247a3e52
1
+ d96a32682671e6a8f70a38029a4d9aa6ef08447ef43eb61f348c6c4acd594126
@@ -200,6 +200,7 @@ whole is the operator's (ask them; do not try).
200
200
  | [offer/assignment-rule.md](references/offer/assignment-rule.md) | Mandant + Plattform | Change, test and publish who is responsible per slot; replace a person who leaves (`tenant-users groups revoke`). |
201
201
  | [offer/attach-form-to-workflow.md](references/offer/attach-form-to-workflow.md) | Mandant | Bind an existing or new SmartForm to a form node. |
202
202
  | [offer/author-form-scenarios.md](references/offer/author-form-scenarios.md) | Mandant | Add a form's test scenarios and $env variables. |
203
+ | [offer/form-views.md](references/offer/form-views.md) | Mandant | Give a form a document view and bind a task to it. |
203
204
  | [offer/author-manifest-meta.md](references/offer/author-manifest-meta.md) | Mandant | Set the selection config and display order of an offer. |
204
205
  | [offer/author-smartform.md](references/offer/author-smartform.md) | Mandant | Build a SmartForm from scratch with the CLI and publish it. |
205
206
  | [offer/bind-node-input.md](references/offer/bind-node-input.md) | Mandant | Bind a node's input slot to an address, a literal or the default. |
@@ -1,7 +1,7 @@
1
1
  # plexus-cli command reference
2
2
 
3
3
  Generated from the commands the CLI registers — do not edit; `plexus-cli <command> --help` prints the same.
4
- 296 commands. Every network command also takes `--env <local|staging|prod>`, `--tenant <slug>`,
4
+ 298 commands. Every network command also takes `--env <local|staging|prod>`, `--tenant <slug>`,
5
5
  `--json` (raw JSON instead of a table) and `--allow-prod` (required for a writing run against production).
6
6
 
7
7
  - [Admission (offline)](#admission-offline) (1)
@@ -25,7 +25,7 @@ Generated from the commands the CLI registers — do not edit; `plexus-cli <comm
25
25
  - [Master data (school token)](#master-data-school-token) (1)
26
26
  - [Notifications (platform operator)](#notifications-platform-operator) (5)
27
27
  - [Notifications (school token)](#notifications-school-token) (6)
28
- - [Offer (offline)](#offer-offline) (66)
28
+ - [Offer (offline)](#offer-offline) (68)
29
29
  - [Offer (school token)](#offer-school-token) (26)
30
30
  - [Operations (offline)](#operations-offline) (1)
31
31
  - [Organisation (school token)](#organisation-school-token) (8)
@@ -1954,6 +1954,35 @@ Show one SmartForm's sections/fields/outcomes/effects
1954
1954
  | `--dir <value>` (required) | Bundle directory |
1955
1955
  | `--form <value>` | Form slug (default: the sole form) |
1956
1956
 
1957
+ ### `offer form view delete`
1958
+
1959
+ Remove a document view from a form
1960
+
1961
+ - **Right:** offline — no deployment
1962
+ - **Effect:** offline — edits local files only
1963
+
1964
+ | Option | Description |
1965
+ |---|---|
1966
+ | `--dir <value>` (required) | Bundle directory |
1967
+ | `--form <value>` | Form slug (default: the sole form) |
1968
+ | `--key <value>` (required) | View key |
1969
+
1970
+ ### `offer form view set`
1971
+
1972
+ Add a document view to a form, or replace the one with this key (groups of file fields for one reader; grants nothing)
1973
+
1974
+ - **Right:** offline — no deployment
1975
+ - **Effect:** offline — edits local files only
1976
+
1977
+ | Option | Description |
1978
+ |---|---|
1979
+ | `--dir <value>` (required) | Bundle directory |
1980
+ | `--form <value>` | Form slug (default: the sole form) |
1981
+ | `--key <value>` (required) | View key, stable (a task binds to it), e.g. principal |
1982
+ | `--label <value>` (required) | View name (German) |
1983
+ | `--label-en <value>` | English view name — required with --label |
1984
+ | `--groups-json <value>` (required) | Groups in order, as JSON: [{"key":"reports","label":{"de":"Zeugnisse","en":"Report cards"},"fields":["kind.report1"]}] |
1985
+
1957
1986
  ### `offer init`
1958
1987
 
1959
1988
  Scaffold a complete, publishable, minimal linear offer bundle on disk
@@ -2269,6 +2298,7 @@ Edit a workflow node (label/assign-decision/form/target/contract/payment/routing
2269
2298
  | `--node <value>` (required) | Node id to edit |
2270
2299
  | `--label <value>` | New node label (German). A node with a real English label needs --label-en too |
2271
2300
  | `--label-en <value>` | New node label (English); alone it re-translates the current German |
2301
+ | `--form-view <value>` | decision only: the form view the decision row is worked in: <formNode>:<viewKey>, empty removes it |
2272
2302
  | `--assign-decision <value>` | decision only: replace the decision-row group key (this is the whole wiring) |
2273
2303
  | `--assign-team <value>` | waitlist only: permission-group key whose members may promote beside the responsible person (actionTeams.promote); "" removes it |
2274
2304
  | `--comment-required <value>` | decision only: replace comment-required outcome ids — <id>[,<id>] |
@@ -2452,6 +2482,8 @@ Add one composed task to a workflow node (result, blocks, condition, description
2452
2482
  | `--clear-reads` | Remove the reads list |
2453
2483
  | `--documents <value>` | Documents the task points at, shown as links under it: artifact:<own slot>, field:'$node.<formNode>.admission.<docRef field>', document:'$node.<node>.document' (comma-separated; replaces the list) |
2454
2484
  | `--clear-documents` | Remove the documents list |
2485
+ | `--form-view <value>` | The form view the task is worked in: <formNode>:<viewKey> (an authored view, or documents / form) |
2486
+ | `--clear-form-view` | Remove the form view |
2455
2487
  | `--locks-evidence` | Once decided, lock the evidence (reads + the fields behind --when) against corrections until the team reopens the task |
2456
2488
  | `--clear-locks-evidence` | Remove locksEvidence |
2457
2489
  | `--description <value>` | Plain text under the title (German; without --description-en it stands in for English too) — never a checklist |
@@ -2520,6 +2552,8 @@ Change the given fields of one composed task; validate before write
2520
2552
  | `--clear-reads` | Remove the reads list |
2521
2553
  | `--documents <value>` | Documents the task points at, shown as links under it: artifact:<own slot>, field:'$node.<formNode>.admission.<docRef field>', document:'$node.<node>.document' (comma-separated; replaces the list) |
2522
2554
  | `--clear-documents` | Remove the documents list |
2555
+ | `--form-view <value>` | The form view the task is worked in: <formNode>:<viewKey> (an authored view, or documents / form) |
2556
+ | `--clear-form-view` | Remove the form view |
2523
2557
  | `--locks-evidence` | Once decided, lock the evidence (reads + the fields behind --when) against corrections until the team reopens the task |
2524
2558
  | `--clear-locks-evidence` | Remove locksEvidence |
2525
2559
  | `--description <value>` | Plain text under the title (German; without --description-en it stands in for English too) — never a checklist |
@@ -0,0 +1,53 @@
1
+ # Give a form a document view
2
+
3
+ **When to use:** one reader (a principal, a teacher) should see only some of an
4
+ application's documents, in that reader's own groups, without the form around them.
5
+ A view chooses and groups; it grants nothing. What a reader may not see stays with
6
+ `visibleTo` on the section (a file field cannot be protected on its own).
7
+
8
+ ## Prerequisites
9
+ - An offer bundle on disk (`offer export …`). Fully offline; every write runs the
10
+ publish gate and writes nothing when it fails.
11
+ - Every view key is stable: a task binds to it.
12
+
13
+ ## Steps
14
+ ```bash
15
+ GROUPS=$(cat <<'JSON'
16
+ [
17
+ { "key": "reportCards", "label": { "de": "Zeugnisse", "en": "Report cards" },
18
+ "fields": ["kind.report1", "kind.report2"] },
19
+ { "key": "references", "label": { "de": "Referenzen", "en": "References" },
20
+ "fields": ["kind.referenceForm"] }
21
+ ]
22
+ JSON
23
+ )
24
+ plexus-cli offer form view set --dir <bundle> --form <slug> --key principal \
25
+ --label "Principal Evaluation" --label-en "Principal Evaluation" --groups-json "$GROUPS"
26
+ plexus-cli offer form view delete --dir <bundle> --form <slug> --key principal
27
+ ```
28
+
29
+ `set` on an existing key replaces that view where it stands. A group may take fields
30
+ from several sections. The smallest unit is the field: the files of one multi-file
31
+ field always stay together.
32
+
33
+ ## What the gate refuses
34
+ `view.unknown-field`, `view.not-a-document`, `view.field-in-row` (a file field of a
35
+ repeated block), `view.field-twice` (a field in two groups of one view),
36
+ `view.empty`, `view.invalid-key`, `view.duplicate-key`, `view.reserved-key` (`form`
37
+ and `documents` are the standard views every form has), and
38
+ `[i18n/missingTranslation]` for a name without both languages.
39
+
40
+ ## Bind a task to the view
41
+ Opening the application for that task lands in the view; the reader may switch, and
42
+ the task's own `--documents` still say which fields stay marked in it. The decision
43
+ row is bound on its node, every other task on the task:
44
+ ```bash
45
+ plexus-cli offer workflow node set --dir <bundle> --node <decisionNode> --form-view form:principal
46
+ plexus-cli offer workflow node task set --dir <bundle> --node <node> --key <task> --form-view form:principal
47
+ ```
48
+ `[workItems/formViewUnknown]` refuses a view the form does not have. Which view opens
49
+ never decides anything: what holds the decision stays `reads`.
50
+
51
+ ## Then
52
+ `offer plan`, `offer apply --publish`. An application stays on the form revision it
53
+ was started on, so a new view reaches only applications on the new revision.
@@ -115,15 +115,13 @@ plexus-cli --env <env> --tenant <slug> tenant-users signature request <email>
115
115
 
116
116
  Only the person can store, replace or remove their own signature.
117
117
 
118
- Only where the school offers the **signature stamp** (`tenant.signatureStamp`,
119
- default on): switched off, the request is refused (`[signature/stampDisabled]`),
118
+ Only where the school has the **signature stamp** (`tenant.signatureStamp`): switched off, the request is refused (`[signature/stampDisabled]`),
120
119
  `tenant-users list` / `show` drop the `signature` column, and a countersignature
121
- takes only the upload of the signed document. The school switches it itself —
122
- in the app above the user list („Unterschrift-Stempel beim Gegenzeichnen"), or
123
- from the shell with the same right (`administration.users.manage`) as the
124
- config field `tenant.signatureStamp` (`config set … --target tenant --key <slug>
125
- --field signatureStamp --value false --confirm`, see the README's „Tenant
126
- config-as-code").
120
+ takes only the upload of the signed document. A school cannot switch it: a
121
+ platform admin does (`_platform.config.manage`), through the config field
122
+ `tenant.signatureStamp` (`config set … --target tenant --key <slug> --field
123
+ signatureStamp --value false --confirm`, see the README's „Tenant
124
+ config-as-code"); Plattform → Mandanten shows the value.
127
125
 
128
126
  Off keeps every stored signature image (nothing is deleted, none is used); on
129
127
  again, it stamps as before. Decided per school: a person working for two