diff --git a/client/package.json b/client/package.json index a0b40b717..38b23dc02 100644 --- a/client/package.json +++ b/client/package.json @@ -6,6 +6,7 @@ "@babel/core": "7.8.4", "@blueprintjs/core": "^3.38.1", "@blueprintjs/datetime": "^3.15.2", + "@blueprintjs/popover2": "^0.11.1", "@blueprintjs/select": "^3.11.2", "@blueprintjs/table": "^3.8.3", "@blueprintjs/timezone": "^3.6.2", @@ -135,6 +136,7 @@ "@types/node": "^14.14.9", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", + "@types/react-router-dom": "^5.1.8", "@welldone-software/why-did-you-render": "^6.0.0-rc.1", "compression-webpack-plugin": "^6.1.0", "http-proxy-middleware": "^1.0.0", diff --git a/client/src/components/App.js b/client/src/components/App.js index aa79941ae..f851f4234 100644 --- a/client/src/components/App.js +++ b/client/src/components/App.js @@ -28,7 +28,7 @@ const queryConfig = { function GlobalFetchQuery({ children }) { - window.localStorage.setItem('lang', 'ar-ly'); + window.localStorage.setItem('lang', 'en'); return children } diff --git a/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/DecrementAdjustmentFields.js b/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/DecrementAdjustmentFields.js index 0ecb6546d..25a30030e 100644 --- a/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/DecrementAdjustmentFields.js +++ b/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/DecrementAdjustmentFields.js @@ -25,7 +25,12 @@ function DecrementAdjustmentFields() { intent={inputIntent({ error, touched })} helperText={} > - + )} @@ -66,6 +71,7 @@ function DecrementAdjustmentFields() { ), ); }} + intent={inputIntent({ error, touched })} /> )} @@ -104,6 +110,7 @@ function DecrementAdjustmentFields() { ), ); }} + intent={inputIntent({ error, touched })} /> )} diff --git a/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/IncrementAdjustmentFields.js b/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/IncrementAdjustmentFields.js index 691ab87f2..12551a40e 100644 --- a/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/IncrementAdjustmentFields.js +++ b/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/IncrementAdjustmentFields.js @@ -21,7 +21,12 @@ export default function IncrementAdjustmentFields() { intent={inputIntent({ error, touched })} helperText={} > - + )} @@ -63,6 +68,7 @@ export default function IncrementAdjustmentFields() { ), ); }} + intent={inputIntent({ error, touched })} /> )} @@ -87,6 +93,7 @@ export default function IncrementAdjustmentFields() { onChange={(value) => { setFieldValue('cost', value); }} + intent={inputIntent({ error, touched })} /> )} @@ -127,6 +134,7 @@ export default function IncrementAdjustmentFields() { ), ); }} + intent={inputIntent({ error, touched })} /> )} diff --git a/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/InventoryAdjustmentForm.schema.js b/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/InventoryAdjustmentForm.schema.js index c1881a75e..0926f5645 100644 --- a/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/InventoryAdjustmentForm.schema.js +++ b/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/InventoryAdjustmentForm.schema.js @@ -3,20 +3,18 @@ import intl from 'react-intl-universal'; import { DATATYPES_LENGTH } from 'common/dataTypes'; const Schema = Yup.object().shape({ - date: Yup.date() - .required() - .label(intl.get('date')), + date: Yup.date().required().label(intl.get('date')), type: Yup.string().required(), - adjustment_account_id: Yup.string().required(), + adjustment_account_id: Yup.string() + .required() + .label(intl.get('adjustment_account')), item_id: Yup.number().required(), reason: Yup.string() .required() .min(3) .max(DATATYPES_LENGTH.TEXT) .label(intl.get('reason')), - quantity_on_hand: Yup.number() - .required() - .label(intl.get('qty')), + quantity_on_hand: Yup.number().required().label(intl.get('qty')), quantity: Yup.number().integer().min(1).required(), cost: Yup.number().when(['type'], { is: (type) => type === 'increment', diff --git a/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/InventoryAdjustmentFormDialogFields.js b/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/InventoryAdjustmentFormDialogFields.js index 1ef3e0493..9f6f2ca80 100644 --- a/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/InventoryAdjustmentFormDialogFields.js +++ b/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/InventoryAdjustmentFormDialogFields.js @@ -38,7 +38,6 @@ export default function InventoryAdjustmentFormDialogFields() { const { accounts } = useInventoryAdjContext(); // Intl context. - return (
@@ -65,6 +64,7 @@ export default function InventoryAdjustmentFormDialogFields() { position: Position.BOTTOM, minimal: true, }} + intent={inputIntent({ error, touched })} inputRef={(ref) => (dateFieldRef.current = ref)} /> @@ -103,6 +103,7 @@ export default function InventoryAdjustmentFormDialogFields() { selectedItemProp={'value'} textProp={'name'} popoverProps={{ minimal: true }} + intent={inputIntent({ error, touched })} /> )} @@ -129,6 +130,7 @@ export default function InventoryAdjustmentFormDialogFields() { } inputProps={{ placeholder: intl.get('select_adjustment_account'), + intent: inputIntent({ error, touched }), }} /> @@ -144,7 +146,7 @@ export default function InventoryAdjustmentFormDialogFields() { helperText={} className={'form-group--reference-no'} > - + )} @@ -159,7 +161,12 @@ export default function InventoryAdjustmentFormDialogFields() { intent={inputIntent({ error, touched })} helperText={} > -