Remove contact identity fields from Stage 0 and widen Current stage
Drop the readonly First name, Last name, and Email fields from the Check-in (organizing) section display. Add an optional fullWidth flag to FieldConfig and set it on current_stage so it spans the full section grid.
This commit is contained in:
@@ -259,6 +259,7 @@ export function StageSection({
|
|||||||
{visibleFields.map((f) => {
|
{visibleFields.map((f) => {
|
||||||
const resolvedOptions = f.optionGroupId ? options[f.optionGroupId] : undefined;
|
const resolvedOptions = f.optionGroupId ? options[f.optionGroupId] : undefined;
|
||||||
const wide =
|
const wide =
|
||||||
|
f.fullWidth ||
|
||||||
f.type === "textarea" ||
|
f.type === "textarea" ||
|
||||||
f.type === "boolean" ||
|
f.type === "boolean" ||
|
||||||
f.type === "multiselect";
|
f.type === "multiselect";
|
||||||
@@ -426,7 +427,10 @@ function FieldGroupCard({
|
|||||||
{fields.map((f) => {
|
{fields.map((f) => {
|
||||||
const resolvedOptions = f.optionGroupId ? options[f.optionGroupId] : undefined;
|
const resolvedOptions = f.optionGroupId ? options[f.optionGroupId] : undefined;
|
||||||
const wide =
|
const wide =
|
||||||
f.type === "textarea" || f.type === "boolean" || f.type === "multiselect";
|
f.fullWidth ||
|
||||||
|
f.type === "textarea" ||
|
||||||
|
f.type === "boolean" ||
|
||||||
|
f.type === "multiselect";
|
||||||
return (
|
return (
|
||||||
<div key={f.name} className={wide ? "md:col-span-2" : ""}>
|
<div key={f.name} className={wide ? "md:col-span-2" : ""}>
|
||||||
<FieldRenderer
|
<FieldRenderer
|
||||||
|
|||||||
+1
-18
@@ -103,24 +103,7 @@ const stage0: StageSectionConfig = {
|
|||||||
label: "Current stage",
|
label: "Current stage",
|
||||||
type: "readonly",
|
type: "readonly",
|
||||||
optionGroupId: STAGE_OPTION_GROUP_ID,
|
optionGroupId: STAGE_OPTION_GROUP_ID,
|
||||||
},
|
fullWidth: true,
|
||||||
// Contact identity, sourced from the cid in /api/data. Display-only —
|
|
||||||
// never written back to Civi. These confirm to the form-filler which
|
|
||||||
// contact record their submission will be attributed to.
|
|
||||||
{
|
|
||||||
name: "contact_first_name",
|
|
||||||
label: "First name",
|
|
||||||
type: "readonly",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "contact_last_name",
|
|
||||||
label: "Last name",
|
|
||||||
type: "readonly",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "contact_email",
|
|
||||||
label: "Email",
|
|
||||||
type: "readonly",
|
|
||||||
},
|
},
|
||||||
// Org-contact fields (Food_Co_op_Organizing custom group). These live
|
// Org-contact fields (Food_Co_op_Organizing custom group). These live
|
||||||
// on the Organization Contact record, not on the Check-in activity, so
|
// on the Organization Contact record, not on the Check-in activity, so
|
||||||
|
|||||||
@@ -101,6 +101,12 @@ export interface FieldConfig {
|
|||||||
* FormDataPayload.options so the renderer can use real CRM-defined choices.
|
* FormDataPayload.options so the renderer can use real CRM-defined choices.
|
||||||
*/
|
*/
|
||||||
optionGroupId?: number;
|
optionGroupId?: number;
|
||||||
|
/**
|
||||||
|
* Force this field to span the full width of the section grid (both
|
||||||
|
* columns), regardless of its type. Wide types (textarea, boolean,
|
||||||
|
* multiselect) already span by default.
|
||||||
|
*/
|
||||||
|
fullWidth?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user