Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2529,11 +2529,11 @@
"form_items": "Form Items",
"alert_info": "You can add or archive items from the list. To edit an item click on the item's Edit botton. You can also change only a rate by clicking on it.",
"code": "Code",
"name": "Name",
"early_bird_rate": "Early bird rate",
"standard_rate": "Standard rate",
"onsite_rate": "On site rate",
"default_quantity": "Default quantity",
"name": "Name *",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niko-exo i do thnk that i would be better to update the fields like
https://github.com/fntechgit/summit-admin/blob/cf8c1749e92a5c08b60bf5803010a63e9417e5d0/src/components/mui/formik-inputs/mui-formik-textfield.js to support the required attr instead of change labels

"early_bird_rate": "Early bird rate *",
"standard_rate": "Standard rate *",
"onsite_rate": "On site rate *",
"default_quantity": "Default quantity *",
"hide_archived": "Hide archived items",
"add_item": "Add Item",
"add_item_from_inventory": "Add Item from Inventory",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,19 @@ const ItemForm = ({ initialValues, onSubmit }) => {
description: yup
.string(T.translate("validation.string"))
.required(T.translate("validation.required")),
early_bird_rate: decimalValidation(),
standard_rate: decimalValidation(),
onsite_rate: decimalValidation(),
early_bird_rate: decimalValidation().required(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niko-exo please rebase against main and review
we already addd required to decimal validation

T.translate("validation.required")
),
standard_rate: decimalValidation().required(
T.translate("validation.required")
),
onsite_rate: decimalValidation().required(
T.translate("validation.required")
),
default_quantity: numberValidation()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niko-exo also please check this
default_quantity: positiveNumberValidation(),
quantity_limit_per_sponsor: positiveNumberValidation(),
quantity_limit_per_show: positiveNumberValidation(),
meta_fields: formMetafieldsValidation()

.integer(T.translate("validation.integer"))
.min(0, T.translate("validation.number_positive")),
.min(0, T.translate("validation.number_positive"))
.required(T.translate("validation.required")),
quantity_limit_per_sponsor: numberValidation()
.integer(T.translate("validation.integer"))
.min(0, T.translate("validation.number_positive")),
Expand Down Expand Up @@ -97,6 +104,7 @@ const ItemForm = ({ initialValues, onSubmit }) => {
name="name"
label={T.translate("sponsor_form_item_list.edit_item.name")}
fullWidth
required
/>
</Grid2>
<Grid2 size={12}>
Expand All @@ -115,6 +123,7 @@ const ItemForm = ({ initialValues, onSubmit }) => {
"sponsor_form_item_list.edit_item.early_bird_rate"
)}
fullWidth
required
/>
</Grid2>
<Grid2 size={4}>
Expand All @@ -124,6 +133,7 @@ const ItemForm = ({ initialValues, onSubmit }) => {
"sponsor_form_item_list.edit_item.standard_rate"
)}
fullWidth
required
/>
</Grid2>
<Grid2 size={4}>
Expand All @@ -133,6 +143,7 @@ const ItemForm = ({ initialValues, onSubmit }) => {
"sponsor_form_item_list.edit_item.onsite_rate"
)}
fullWidth
required
/>
</Grid2>
<Grid2 size={4}>
Expand Down Expand Up @@ -166,6 +177,7 @@ const ItemForm = ({ initialValues, onSubmit }) => {
fullWidth
type="number"
inputProps={{ min: 0 }}
required
/>
</Grid2>
</Grid2>
Expand Down