-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Proposed Advertisements to List component and schema #3261
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Schema } from "@planx/components/List/model"; | ||
|
||
export const ProposedAdvertisements: Schema = { | ||
type: "Proposed advertisements", | ||
fields: [ | ||
{ | ||
type: "number", | ||
data: { | ||
title: "How many fascia signs are you applying for?", | ||
fn: "fascia", | ||
allowNegatives: false, | ||
}, | ||
}, | ||
{ | ||
type: "number", | ||
data: { | ||
title: "How many projecting or hanging signs are you applying for?", | ||
fn: "projecting", | ||
allowNegatives: false, | ||
}, | ||
}, | ||
{ | ||
type: "number", | ||
data: { | ||
title: "How many hoardings are you applying for?", | ||
fn: "hoarding", | ||
allowNegatives: false, | ||
}, | ||
}, | ||
{ | ||
type: "number", | ||
data: { | ||
title: "How many other advertisements are you applying for?", | ||
fn: "other", | ||
allowNegatives: false, | ||
}, | ||
}, | ||
], | ||
min: 0, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: when if we want it to be possible to "continue" without submitting any items, maybe there's a better way we can control that in the Editor modal using a simple toggle rather than in the schema via There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} as const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this piece of text will be read into the title of each item & the "+ Add another ..." button - so it's actually best if it's singular rather than plural !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I actually want only one fixed input without the ability to add additional list items, so I will try min: 1, max: 1.