Fixes/ll inventory (#70)

* inventory data changes
* update Inventory changes
* Fixed: removed unnecessary imports
* Disabled: cycle count
* Added: Inventory types sagas
* Fix: null check
* Updated: policies
* Fixed: formik values
* update: allow single image
* Update: Policies control
* Updated: new inventory add form
* Update: new inventory conditional render
* Update: populate formik fields
* Added: Validation
* Added: edit functionality, disabled fields
* Update: housekeeping
* Fix: iconslug and key
* Update: route handling
* Added: endpoints
* Added: widget nested page
* Added: sagas
* Added: redux handling
* Update: new product page functionality
* Added: inventory page functionality
* Fixed: form validation
* Fix: route handling
* Added: Add items button
* Added: Item list page
* Added: saga
* Added: Route handler
* Added: item redux
* Udpate: breadcrumbs
* Fixed: edit widget
* Fix: delete widget
* Added: item list table
* Update: Routing
* Update: dynamic headers
* Update: disabled edit
* Added: toastify and toast
* removed: nested table page
* Fixewd: switch and inventory form
* Update: data table
* Fixed: image upload
* Update: redux and widget
* Update: warehouse edit with selector

Co-authored-by: evdigitech <evdigitech@gmail.com>
Co-authored-by: Llewellyn Dsouza <lledsouza2209@gmail.com>
This commit is contained in:
bluestreamlds
2022-03-01 23:47:12 +05:30
committed by GitHub
parent af28c0b99c
commit 315113630e
22 changed files with 782 additions and 479 deletions

View File

@@ -46,7 +46,7 @@ function MaterialForm({ formType, setFormOpen, selected, inventoryId }) {
: dispatch(
WidgetActions.editWidgetRequest({
loader: 'location-request',
slug: `${API.EDIT_WIDGET_FAMILY}${inventoryId}`,
slug: `${API.EDIT_WIDGET_FAMILY}${formType._id}`,
method: 'patch',
data: values,
type: 'edit'
@@ -113,6 +113,7 @@ function WidgetNestedDataTable({
inventoryId
}) {
const [open, setOpen] = React.useState(false);
const dispatch = useDispatch();
const widgetChildren = useSelector(WidgetSelectors.getWidgetsByParentId(data._id));
return (
@@ -167,46 +168,44 @@ function WidgetNestedDataTable({
</MDButton>
</Grid>
<Grid
container
item
xs={10}
xs={8}
onClick={() => {
setSelected(data);
}}
>
<Grid item xs={9}>
{data.name}
</Grid>
<Grid item xs={1}>
<MDButton
disabled
size="small"
variant="contained"
color="error"
sx={{
textTransform: 'capitalize',
minWidth: '45px',
minHeight: '28px',
marginLeft: '5px',
marginRight: '20px',
boxShadow: 'none',
fontWeight: '500',
padding: '0 6'
}}
onClick={() => {
// dispatch(
// WarehouseLocationsActions.deleteLocationRequest({
// loader: 'location-request',
// slug: API.LOCATION_DELETE,
// method: 'post',
// data: { type: data.location, id: data.id }
// })
// );
}}
>
DELETE
</MDButton>
</Grid>
{data.name}
</Grid>
<Grid item xs={2}>
<MDButton
size="small"
variant="contained"
color="error"
sx={{
textTransform: 'capitalize',
minWidth: '45px',
minHeight: '28px',
marginLeft: '5px',
marginRight: '20px',
boxShadow: 'none',
fontWeight: '500',
padding: '0 6'
}}
onClick={() => {
setSelected(null);
dispatch(
WidgetActions.editWidgetRequest({
loader: 'location-request',
slug: `${API.EDIT_WIDGET_FAMILY}${data._id}`,
deletedId: data._id,
method: 'delete',
type: 'delete'
})
);
}}
>
DELETE
</MDButton>
</Grid>
</Grid>
{open && widgetChildren ? (