Fix form error

This commit is contained in:
dominik-zeglen 2020-04-29 16:53:52 +02:00
parent fdf76fa967
commit 6fb5c3d4e5
2 changed files with 452 additions and 93 deletions

View file

@ -72,6 +72,7 @@ const CompanyAddressForm: React.FC<CompanyAddressFormProps> = props => {
"city", "city",
"postalCode", "postalCode",
"country", "country",
"countryArea",
"companyArea", "companyArea",
"phone" "phone"
]; ];

View file

@ -2660,22 +2660,22 @@ exports[`Storyshots Generics / Link with choices default 1`] = `
class="MuiTypography-root-id Link-root-id Link-primary-id MuiTypography-body1-id" class="MuiTypography-root-id Link-root-id Link-primary-id MuiTypography-body1-id"
> >
Åland Islands Åland Islands
</a> <svg
<svg aria-hidden="true"
aria-hidden="true" class="MuiSvgIcon-root-id LinkChoice-arrow-id MuiSvgIcon-colorPrimary-id"
class="MuiSvgIcon-root-id LinkChoice-arrow-id MuiSvgIcon-colorPrimary-id" focusable="false"
focusable="false" role="presentation"
role="presentation" viewBox="0 0 24 24"
viewBox="0 0 24 24"
>
<g
style="fill-rule:evenodd"
> >
<path <g
d="M7 10l5 5 5-5z" style="fill-rule:evenodd"
/> >
</g> <path
</svg> d="M7 10l5 5 5-5z"
/>
</g>
</svg>
</a>
</span> </span>
</form> </form>
</div> </div>
@ -34752,7 +34752,7 @@ exports[`Storyshots Views / Configuration default 1`] = `
<div <div
class="MuiTypography-root-id MuiTypography-body1-id" class="MuiTypography-root-id MuiTypography-body1-id"
> >
Product Settings Shipping Settings
</div> </div>
</div> </div>
<div <div
@ -35268,7 +35268,7 @@ exports[`Storyshots Views / Configuration partial access 1`] = `
<div <div
class="MuiTypography-root-id MuiTypography-body1-id" class="MuiTypography-root-id MuiTypography-body1-id"
> >
Product Settings Shipping Settings
</div> </div>
</div> </div>
<div <div
@ -64366,7 +64366,7 @@ exports[`Storyshots Views / Orders / Fulfill order default 1`] = `
class="MuiTableRow-root-id MuiTableRow-head-id" class="MuiTableRow-root-id MuiTableRow-head-id"
> >
<th <th
class="MuiTableCell-root-id MuiTableCell-head-id OrderFulfillPage-colName-id" class="MuiTableCell-root-id MuiTableCell-head-id OrderFulfillPage-colName-id OrderFulfillPage-colName-id"
scope="col" scope="col"
> >
Product name Product name
@ -64416,7 +64416,7 @@ exports[`Storyshots Views / Orders / Fulfill order default 1`] = `
class="MuiTableRow-root-id" class="MuiTableRow-root-id"
> >
<td <td
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id" class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id OrderFulfillPage-colName-id"
> >
<div <div
class="TableCellAvatar-content-id" class="TableCellAvatar-content-id"
@ -64637,7 +64637,7 @@ exports[`Storyshots Views / Orders / Fulfill order default 1`] = `
class="MuiTableRow-root-id" class="MuiTableRow-root-id"
> >
<td <td
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id" class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id OrderFulfillPage-colName-id"
> >
<div <div
class="TableCellAvatar-content-id" class="TableCellAvatar-content-id"
@ -64819,7 +64819,7 @@ exports[`Storyshots Views / Orders / Fulfill order default 1`] = `
class="MuiTableRow-root-id" class="MuiTableRow-root-id"
> >
<td <td
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id" class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id OrderFulfillPage-colName-id"
> >
<div <div
class="TableCellAvatar-content-id" class="TableCellAvatar-content-id"
@ -65050,7 +65050,7 @@ exports[`Storyshots Views / Orders / Fulfill order error 1`] = `
class="MuiTableRow-root-id MuiTableRow-head-id" class="MuiTableRow-root-id MuiTableRow-head-id"
> >
<th <th
class="MuiTableCell-root-id MuiTableCell-head-id OrderFulfillPage-colName-id" class="MuiTableCell-root-id MuiTableCell-head-id OrderFulfillPage-colName-id OrderFulfillPage-colName-id"
scope="col" scope="col"
> >
Product name Product name
@ -65100,7 +65100,7 @@ exports[`Storyshots Views / Orders / Fulfill order error 1`] = `
class="MuiTableRow-root-id" class="MuiTableRow-root-id"
> >
<td <td
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id" class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id OrderFulfillPage-colName-id"
> >
<div <div
class="TableCellAvatar-content-id" class="TableCellAvatar-content-id"
@ -65321,7 +65321,7 @@ exports[`Storyshots Views / Orders / Fulfill order error 1`] = `
class="MuiTableRow-root-id" class="MuiTableRow-root-id"
> >
<td <td
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id" class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id OrderFulfillPage-colName-id"
> >
<div <div
class="TableCellAvatar-content-id" class="TableCellAvatar-content-id"
@ -65503,7 +65503,7 @@ exports[`Storyshots Views / Orders / Fulfill order error 1`] = `
class="MuiTableRow-root-id" class="MuiTableRow-root-id"
> >
<td <td
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id" class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id OrderFulfillPage-colName-id"
> >
<div <div
class="TableCellAvatar-content-id" class="TableCellAvatar-content-id"
@ -65734,7 +65734,7 @@ exports[`Storyshots Views / Orders / Fulfill order loading 1`] = `
class="MuiTableRow-root-id MuiTableRow-head-id" class="MuiTableRow-root-id MuiTableRow-head-id"
> >
<th <th
class="MuiTableCell-root-id MuiTableCell-head-id OrderFulfillPage-colName-id" class="MuiTableCell-root-id MuiTableCell-head-id OrderFulfillPage-colName-id OrderFulfillPage-colName-id"
scope="col" scope="col"
> >
Product name Product name
@ -65760,7 +65760,7 @@ exports[`Storyshots Views / Orders / Fulfill order loading 1`] = `
class="MuiTableRow-root-id" class="MuiTableRow-root-id"
> >
<td <td
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id" class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id OrderFulfillPage-colName-id"
> >
<div <div
class="TableCellAvatar-content-id" class="TableCellAvatar-content-id"
@ -65845,6 +65845,354 @@ exports[`Storyshots Views / Orders / Fulfill order loading 1`] = `
</div> </div>
`; `;
exports[`Storyshots Views / Orders / Fulfill order one warehouse 1`] = `
<div
style="padding:24px"
>
<div
class="Container-root-id"
>
<div
class="ExtendedPageHeader-root-id ExtendedPageHeader-block-id"
>
<div
class="MuiTypography-root-id PageHeader-title-id MuiTypography-h5-id"
>
Order no. 9123 - Add Fulfillment
</div>
<div
class="ExtendedPageHeader-action-id"
>
<div
class="PageHeader-root-id"
/>
</div>
</div>
<form>
<div
class="MuiPaper-root-id MuiPaper-elevation0-id MuiCard-root-id MuiPaper-rounded-id"
>
<div
class="CardTitle-root-id"
>
<span
class="MuiTypography-root-id CardTitle-title-id MuiTypography-h5-id"
>
Items ready to ship
</span>
<div
class="CardTitle-toolbar-id"
/>
</div>
<div
class="CardTitle-children-id"
/>
<hr
class="CardTitle-hr-id"
/>
<div
class="ResponsiveTable-root-id"
>
<table
class="MuiTable-root-id OrderFulfillPage-table-id"
>
<thead
class="MuiTableHead-root-id"
>
<tr
class="MuiTableRow-root-id MuiTableRow-head-id"
>
<th
class="MuiTableCell-root-id MuiTableCell-head-id OrderFulfillPage-colName-id OrderFulfillPage-colName-id"
scope="col"
>
Product name
</th>
<th
class="MuiTableCell-root-id MuiTableCell-head-id OrderFulfillPage-colSku-id"
scope="col"
>
SKU
</th>
<th
class="MuiTableCell-root-id MuiTableCell-head-id OrderFulfillPage-colQuantity-id OrderFulfillPage-colQuantityHeader-id"
scope="col"
>
C our wares
</th>
<th
class="MuiTableCell-root-id MuiTableCell-head-id OrderFulfillPage-colQuantityTotal-id"
scope="col"
>
Quantity to fulfill
</th>
</tr>
</thead>
<tbody
class="MuiTableBody-root-id"
>
<tr
class="MuiTableRow-root-id"
>
<td
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id OrderFulfillPage-colName-id"
>
<div
class="TableCellAvatar-content-id"
>
<div
class="MuiAvatar-root-id MuiAvatar-circle-id TableCellAvatar-avatar-id"
>
<img
class="MuiAvatar-img-id"
src="[object Object]"
/>
</div>
<div
class="TableCellAvatar-children-id"
>
T-Shirt
<div
class="MuiTypography-root-id MuiTypography-caption-id MuiTypography-colorTextSecondary-id"
>
S
</div>
</div>
</div>
</td>
<td
class="MuiTableCell-root-id MuiTableCell-body-id OrderFulfillPage-colSku-id"
>
62783187
</td>
<td
class="MuiTableCell-root-id MuiTableCell-body-id OrderFulfillPage-colQuantity-id"
>
<div
class="OrderFulfillPage-colQuantityContent-id"
>
<div
class="MuiFormControl-root-id MuiTextField-root-id OrderFulfillPage-quantityInput-id"
>
<div
class="MuiInputBase-root-id MuiOutlinedInput-root-id MuiInputBase-formControl-id"
>
<input
aria-invalid="false"
class="MuiInputBase-input-id MuiOutlinedInput-input-id OrderFulfillPage-quantityInnerInput-id"
max="1217"
min="0"
style="text-align:right"
type="number"
value="0"
/>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-id MuiOutlinedInput-notchedOutline-id"
style="padding-left:8px"
>
<legend
class="PrivateNotchedOutline-legend-id"
style="width:0"
>
<span>
</span>
</legend>
</fieldset>
</div>
</div>
<div
class="OrderFulfillPage-remainingQuantity-id"
>
/ 1207
</div>
</div>
</td>
<td
class="MuiTableCell-root-id MuiTableCell-body-id OrderFulfillPage-colQuantityTotal-id"
>
<span
class=""
>
0
</span>
/ 2
</td>
</tr>
<tr
class="MuiTableRow-root-id"
>
<td
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id OrderFulfillPage-colName-id"
>
<div
class="TableCellAvatar-content-id"
>
<div
class="MuiAvatar-root-id MuiAvatar-circle-id TableCellAvatar-avatar-id"
>
<img
class="MuiAvatar-img-id"
src="[object Object]"
/>
</div>
<div
class="TableCellAvatar-children-id"
>
Lemon Juice
<div
class="MuiTypography-root-id MuiTypography-caption-id MuiTypography-colorTextSecondary-id"
>
2.5l
</div>
</div>
</div>
</td>
<td
class="MuiTableCell-root-id MuiTableCell-body-id OrderFulfillPage-colSku-id"
>
998323583
</td>
<td
class="MuiTableCell-root-id MuiTableCell-body-id OrderFulfillPage-colQuantity-id OrderFulfillPage-error-id"
>
No Stock
</td>
<td
class="MuiTableCell-root-id MuiTableCell-body-id OrderFulfillPage-colQuantityTotal-id"
>
<span
class=""
>
0
</span>
/ 4
</td>
</tr>
<tr
class="MuiTableRow-root-id"
>
<td
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderFulfillPage-colName-id OrderFulfillPage-colName-id"
>
<div
class="TableCellAvatar-content-id"
>
<div
class="MuiAvatar-root-id MuiAvatar-circle-id TableCellAvatar-avatar-id"
>
<img
class="MuiAvatar-img-id"
src="[object Object]"
/>
</div>
<div
class="TableCellAvatar-children-id"
>
Orange Juice
<div
class="MuiTypography-root-id MuiTypography-caption-id MuiTypography-colorTextSecondary-id"
>
5l
</div>
</div>
</div>
</td>
<td
class="MuiTableCell-root-id MuiTableCell-body-id OrderFulfillPage-colSku-id"
>
998323584
</td>
<td
class="MuiTableCell-root-id MuiTableCell-body-id OrderFulfillPage-colQuantity-id"
>
<div
class="OrderFulfillPage-colQuantityContent-id"
>
<div
class="MuiFormControl-root-id MuiTextField-root-id OrderFulfillPage-quantityInput-id"
>
<div
class="MuiInputBase-root-id MuiOutlinedInput-root-id MuiInputBase-formControl-id"
>
<input
aria-invalid="false"
class="MuiInputBase-input-id MuiOutlinedInput-input-id OrderFulfillPage-quantityInnerInput-id"
max="587"
min="0"
style="text-align:right"
type="number"
value="0"
/>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-id MuiOutlinedInput-notchedOutline-id"
style="padding-left:8px"
>
<legend
class="PrivateNotchedOutline-legend-id"
style="width:0"
>
<span>
</span>
</legend>
</fieldset>
</div>
</div>
<div
class="OrderFulfillPage-remainingQuantity-id"
>
/ 587
</div>
</div>
</td>
<td
class="MuiTableCell-root-id MuiTableCell-body-id OrderFulfillPage-colQuantityTotal-id"
>
<span
class=""
>
0
</span>
/ 1
</td>
</tr>
</tbody>
</table>
</div>
<div
class="MuiCardActions-root-id OrderFulfillPage-actionBar-id MuiCardActions-spacing-id"
>
<label
class="MuiFormControlLabel-root-id"
>
<button
class="MuiButtonBase-root-id Checkbox-root-id"
tabindex="0"
type="button"
>
<input
class="Checkbox-box-id Checkbox-checked-id"
name="sendInfo"
type="checkbox"
value="true"
/>
</button>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Send shipment details to customer
</span>
</label>
</div>
</div>
</form>
</div>
</div>
`;
exports[`Storyshots Views / Orders / Order details cancelled 1`] = ` exports[`Storyshots Views / Orders / Order details cancelled 1`] = `
<div <div
style="padding:24px" style="padding:24px"
@ -111031,22 +111379,22 @@ Ctrl + K"
class="MuiTypography-root-id Link-root-id Link-primary-id MuiTypography-body1-id" class="MuiTypography-root-id Link-root-id Link-primary-id MuiTypography-body1-id"
> >
All Warehouses All Warehouses
</a> <svg
<svg aria-hidden="true"
aria-hidden="true" class="MuiSvgIcon-root-id LinkChoice-arrow-id MuiSvgIcon-colorPrimary-id"
class="MuiSvgIcon-root-id LinkChoice-arrow-id MuiSvgIcon-colorPrimary-id" focusable="false"
focusable="false" role="presentation"
role="presentation" viewBox="0 0 24 24"
viewBox="0 0 24 24"
>
<g
style="fill-rule:evenodd"
> >
<path <g
d="M7 10l5 5 5-5z" style="fill-rule:evenodd"
/> >
</g> <path
</svg> d="M7 10l5 5 5-5z"
/>
</g>
</svg>
</a>
</span> </span>
</div> </div>
<div <div
@ -112592,22 +112940,22 @@ Ctrl + K"
class="MuiTypography-root-id Link-root-id Link-primary-id MuiTypography-body1-id" class="MuiTypography-root-id Link-root-id Link-primary-id MuiTypography-body1-id"
> >
All Warehouses All Warehouses
</a> <svg
<svg aria-hidden="true"
aria-hidden="true" class="MuiSvgIcon-root-id LinkChoice-arrow-id MuiSvgIcon-colorPrimary-id"
class="MuiSvgIcon-root-id LinkChoice-arrow-id MuiSvgIcon-colorPrimary-id" focusable="false"
focusable="false" role="presentation"
role="presentation" viewBox="0 0 24 24"
viewBox="0 0 24 24"
>
<g
style="fill-rule:evenodd"
> >
<path <g
d="M7 10l5 5 5-5z" style="fill-rule:evenodd"
/> >
</g> <path
</svg> d="M7 10l5 5 5-5z"
/>
</g>
</svg>
</a>
</span> </span>
</div> </div>
<div <div
@ -118029,22 +118377,22 @@ Ctrl + K"
class="MuiTypography-root-id Link-root-id Link-primary-id MuiTypography-body1-id" class="MuiTypography-root-id Link-root-id Link-primary-id MuiTypography-body1-id"
> >
All Warehouses All Warehouses
</a> <svg
<svg aria-hidden="true"
aria-hidden="true" class="MuiSvgIcon-root-id LinkChoice-arrow-id MuiSvgIcon-colorPrimary-id"
class="MuiSvgIcon-root-id LinkChoice-arrow-id MuiSvgIcon-colorPrimary-id" focusable="false"
focusable="false" role="presentation"
role="presentation" viewBox="0 0 24 24"
viewBox="0 0 24 24"
>
<g
style="fill-rule:evenodd"
> >
<path <g
d="M7 10l5 5 5-5z" style="fill-rule:evenodd"
/> >
</g> <path
</svg> d="M7 10l5 5 5-5z"
/>
</g>
</svg>
</a>
</span> </span>
</div> </div>
<div <div
@ -120909,22 +121257,22 @@ Ctrl + K"
class="MuiTypography-root-id Link-root-id Link-primary-id MuiTypography-body1-id" class="MuiTypography-root-id Link-root-id Link-primary-id MuiTypography-body1-id"
> >
All Warehouses All Warehouses
</a> <svg
<svg aria-hidden="true"
aria-hidden="true" class="MuiSvgIcon-root-id LinkChoice-arrow-id MuiSvgIcon-colorPrimary-id"
class="MuiSvgIcon-root-id LinkChoice-arrow-id MuiSvgIcon-colorPrimary-id" focusable="false"
focusable="false" role="presentation"
role="presentation" viewBox="0 0 24 24"
viewBox="0 0 24 24"
>
<g
style="fill-rule:evenodd"
> >
<path <g
d="M7 10l5 5 5-5z" style="fill-rule:evenodd"
/> >
</g> <path
</svg> d="M7 10l5 5 5-5z"
/>
</g>
</svg>
</a>
</span> </span>
</div> </div>
<div <div
@ -150279,16 +150627,16 @@ exports[`Storyshots Views / Warehouses / Create warehouse form errors 1`] = `
class="MuiFormControl-root-id MuiTextField-root-id MuiFormControl-fullWidth-id" class="MuiFormControl-root-id MuiTextField-root-id MuiFormControl-fullWidth-id"
> >
<label <label
class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-outlined-id" class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-outlined-id MuiFormLabel-error-id MuiInputLabel-error-id"
data-shrink="false" data-shrink="false"
> >
Country area Country area
</label> </label>
<div <div
class="MuiInputBase-root-id MuiOutlinedInput-root-id MuiInputBase-fullWidth-id MuiInputBase-formControl-id" class="MuiInputBase-root-id MuiOutlinedInput-root-id MuiInputBase-error-id MuiOutlinedInput-error-id MuiInputBase-fullWidth-id MuiInputBase-formControl-id"
> >
<input <input
aria-invalid="false" aria-invalid="true"
class="MuiInputBase-input-id MuiOutlinedInput-input-id" class="MuiInputBase-input-id MuiOutlinedInput-input-id"
name="countryArea" name="countryArea"
type="text" type="text"
@ -150309,6 +150657,11 @@ exports[`Storyshots Views / Warehouses / Create warehouse form errors 1`] = `
</legend> </legend>
</fieldset> </fieldset>
</div> </div>
<p
class="MuiFormHelperText-root-id MuiFormHelperText-contained-id MuiFormHelperText-error-id"
>
Invalid value
</p>
</div> </div>
</div> </div>
<div <div
@ -151769,16 +152122,16 @@ exports[`Storyshots Views / Warehouses / Warehouse details form errors 1`] = `
class="MuiFormControl-root-id MuiTextField-root-id MuiFormControl-fullWidth-id" class="MuiFormControl-root-id MuiTextField-root-id MuiFormControl-fullWidth-id"
> >
<label <label
class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-outlined-id" class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-outlined-id MuiFormLabel-error-id MuiInputLabel-error-id"
data-shrink="false" data-shrink="false"
> >
Country area Country area
</label> </label>
<div <div
class="MuiInputBase-root-id MuiOutlinedInput-root-id MuiInputBase-fullWidth-id MuiInputBase-formControl-id" class="MuiInputBase-root-id MuiOutlinedInput-root-id MuiInputBase-error-id MuiOutlinedInput-error-id MuiInputBase-fullWidth-id MuiInputBase-formControl-id"
> >
<input <input
aria-invalid="false" aria-invalid="true"
class="MuiInputBase-input-id MuiOutlinedInput-input-id" class="MuiInputBase-input-id MuiOutlinedInput-input-id"
name="countryArea" name="countryArea"
type="text" type="text"
@ -151799,6 +152152,11 @@ exports[`Storyshots Views / Warehouses / Warehouse details form errors 1`] = `
</legend> </legend>
</fieldset> </fieldset>
</div> </div>
<p
class="MuiFormHelperText-root-id MuiFormHelperText-contained-id MuiFormHelperText-error-id"
>
Invalid value
</p>
</div> </div>
</div> </div>
<div <div