You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 045616a
Browse filesBrowse the repository at this point in the historyBrowse files
description: "Set this user's manager. The reporting chain drives approval routing and the own_and_reports record scope.",
775
775
params: [
776
776
{
777
-
// INLINE, not field-backed. A field-backed `{ field: 'manager_id' }`
778
-
// param inherits the referenced field's metadata, and that field is
779
-
// `readonly: true` (ADR-0092 D4 — it must stay non-editable in the
780
-
// standard edit form), so inheriting it here is a picker that may
781
-
// render read-only. `name` is the request-body key, and it is the
782
-
// camelCase spelling the endpoint reads first (`readId(body,
783
-
// 'managerId', 'manager_id')`).
777
+
// FIELD-BACKED on `manager_id` and seeded from the row
778
+
// (`defaultFromRow`), so the dialog opens on the CURRENT manager and
779
+
// an admin sees what a re-point would replace. Both doors that draw
780
+
// this dialog pass the row: the record header stamps its record and a
781
+
// list row is projected with every field a `defaultFromRow` param
782
+
// seeds from. The field's `readonly: true` (ADR-0092 D4) is not
783
+
// inherited: the console's param resolver carries the field's type,
784
+
// target and label onto the param and never its `readonly`, so the
785
+
// picker stays editable while the edit form keeps the column locked.
786
+
// `name` is the request-body key, the camelCase spelling the endpoint
787
+
// reads first (`readId(body, 'managerId', 'manager_id')`).
784
788
name: 'managerId',
789
+
field: 'manager_id',
790
+
defaultFromRow: true,
785
791
label: 'Manager',
786
-
type: 'lookup',
787
-
reference: 'sys_user',
788
792
// Required, because the endpoint refuses an ABSENT or empty key by
789
793
// design — "managerId is required — send null to clear the link,
790
794
// never omit the key" — so a dialog that could submit nothing would
791
795
// turn a normal click into a 400 about a key the user never saw.
792
-
// Required means a value is collected before anything is POSTed.
793
-
// ⚠️ Clearing the link (`managerId: null`) is a real endpoint
794
-
// capability that this action therefore does not reach; it is
795
-
// recorded in the PR's acceptance notes rather than half-declared
796
-
// here.
796
+
// Required means a value is collected before anything is POSTed;
797
+
// clearing is `remove_user_manager` below.
797
798
required: true,
798
799
helpText: 'The user this person reports to. The server refuses a manager outside their organization, a self-assignment, and a link that would close or over-deepen the reporting chain.',
confirmText: "Remove this user's manager? They will report to no one until a manager is set again; approval routing and the own_and_reports record scope follow the change.",
844
+
successMessage: 'Manager removed',
845
+
refreshAfter: true,
846
+
},
810
847
{
811
848
// ADR-0095 D3 — who holds platform-admin standing. Standing is derived
812
849
// per user, never stored on this object, so the Users list carries no
0 commit comments