umwd-components 0.1.793 → 0.1.795

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,37 +66,37 @@ function EditStockForm({ data, revalidateCallback, handleClose, sx, }) {
66
66
  : 0 })] }) })] }), jsx(Typography, { variant: "h6", sx: { pl: 2 }, children: "Outgoing orders" }), jsxs(Table, { size: "small", children: [jsx(TableHead, { children: jsxs(TableRow, { children: [jsx(TableCell, { children: "Number" }), jsx(TableCell, { children: "Order Date" }), jsx(TableCell, { children: "Line Item Number" }), jsx(TableCell, { children: "Ordered Quantity" }), jsx(TableCell, { children: "Picked Quantity" }), jsx(TableCell, { children: "Packed Quantity" }), jsx(TableCell, { children: "Shipped Quantity" })] }) }), jsx(TableBody, { children: Array.isArray(opos) ? (opos.map((opo) => opo.opo_items.map((item) => (jsxs(TableRow, { children: [jsx(TableCell, { children: opo.opo_number }), jsx(TableCell, { children: opo.order_date }), jsx(TableCell, { children: item.line_item_number }), jsx(TableCell, { children: jsx(AmountIndicator, { value: item.ordered_quantity, maxValue: item.ordered_quantity, color: "primary" }) }), jsx(TableCell, { children: jsx(AmountIndicator, { value: item.picked_quantity, maxValue: item.ordered_quantity, color: "primary" }) }), jsx(TableCell, { children: jsx(AmountIndicator, { value: item.packed_quantity, maxValue: item.ordered_quantity, color: "primary" }) }), jsx(TableCell, { children: jsx(AmountIndicator, { value: item.shipped_quantity, maxValue: item.ordered_quantity, color: "primary" }) })] }, opo.documentId))))) : (jsx(TableRow, { children: jsx(TableCell, { colSpan: 7, align: "center", children: "No outgoing orders found" }) })) }), jsx(TableFooter, { children: jsxs(TableRow, { children: [jsx(TableCell, { colSpan: 3, align: "right", children: "Total reduced from stock:" }), jsx(TableCell, { children: Array.isArray(opos)
67
67
  ? opos.reduce((total, opo) => total +
68
68
  opo.opo_items.reduce((itemTotal, item) => itemTotal + item.ordered_quantity, 0), 0)
69
- : 0 })] }) })] }), jsxs(Table, { size: "small", children: [jsxs(TableRow, { children: [jsx(TableCell, { align: "right", children: "Total added to stock:" }), jsx(TableCell, { children: Array.isArray(ipos) && ipos.length > 0
70
- ? ipos.reduce((total, ipo) => total +
71
- ipo.items.reduce((itemTotal, item) => itemTotal + item.released_quantity, 0), 0)
72
- : 0 })] }), jsxs(TableRow, { children: [jsx(TableCell, { align: "right", children: "Total reduced from stock:" }), jsx(TableCell, { children: Array.isArray(opos) && opos.length > 0
73
- ? opos.reduce((total, opo) => total +
74
- opo.opo_items.reduce((itemTotal, item) => itemTotal + item.ordered_quantity, 0), 0)
75
- : 0 })] }), jsxs(TableRow, { children: [jsx(TableCell, { align: "right", children: "Corrections:" }), jsx(TableCell, { children: jsx(Tooltip, { title: "Total stock corrections", children: jsx(Typography, { children: reports
76
- ? reports.reduce((total, report) => total + report.quantity, 0)
77
- : 0 }) }) }), jsx(TableCell, { children: jsx(Tooltip, { title: "Total stock corrections after updating", children: jsx("b", { children: reports
78
- ? reports.reduce((total, report) => total + report.quantity, 0)
79
- : 0 }) }) })] }), jsxs(TableRow, { children: [jsx(TableCell, { align: "right", children: "Stock:" }), jsx(TableCell, { children: jsx(Tooltip, { title: "Total stock", children: jsx(Typography, { children: (Array.isArray(ipos) && ipos.length > 0
80
- ? ipos.reduce((total, ipo) => total +
81
- ipo.items.reduce((itemTotal, item) => itemTotal + item.released_quantity, 0), 0)
82
- : 0) -
83
- (Array.isArray(opos) && opos.length > 0
84
- ? opos.reduce((total, opo) => total +
85
- opo.opo_items.reduce((itemTotal, item) => itemTotal + item.ordered_quantity, 0), 0)
86
- : 0) +
87
- (reports
69
+ : 0 })] }) })] }), jsx(Table, { size: "small", children: jsxs(TableBody, { children: [jsxs(TableRow, { children: [jsx(TableCell, { align: "right", children: "Total added to stock:" }), jsx(TableCell, { children: Array.isArray(ipos) && ipos.length > 0
70
+ ? ipos.reduce((total, ipo) => total +
71
+ ipo.items.reduce((itemTotal, item) => itemTotal + item.released_quantity, 0), 0)
72
+ : 0 })] }), jsxs(TableRow, { children: [jsx(TableCell, { align: "right", children: "Total reduced from stock:" }), jsx(TableCell, { children: Array.isArray(opos) && opos.length > 0
73
+ ? opos.reduce((total, opo) => total +
74
+ opo.opo_items.reduce((itemTotal, item) => itemTotal + item.ordered_quantity, 0), 0)
75
+ : 0 })] }), jsxs(TableRow, { children: [jsx(TableCell, { align: "right", children: "Corrections:" }), jsx(TableCell, { children: jsx(Tooltip, { title: "Total stock corrections", children: jsx(Typography, { children: reports
88
76
  ? reports.reduce((total, report) => total + report.quantity, 0)
89
- : 0) }) }) }), jsx(TableCell, { children: jsx(Tooltip, { title: "Total stock after updating", children: jsx("b", { children: (Array.isArray(ipos) && ipos.length > 0
90
- ? ipos.reduce((total, ipo) => total +
91
- ipo.items.reduce((itemTotal, item) => itemTotal + item.released_quantity, 0), 0)
92
- : 0) -
93
- (Array.isArray(opos) && opos.length > 0
94
- ? opos.reduce((total, opo) => total +
95
- opo.opo_items.reduce((itemTotal, item) => itemTotal + item.ordered_quantity, 0), 0)
96
- : 0) +
97
- (reports
77
+ : 0 }) }) }), jsx(TableCell, { children: jsx(Tooltip, { title: "Total stock corrections after updating", children: jsx("b", { children: reports
98
78
  ? reports.reduce((total, report) => total + report.quantity, 0)
99
- : 0) }) }) })] })] })] }) })] }), jsxs("form", { action: formAction, children: [jsx("input", { id: "stock_reports", type: "hidden", name: "stock_reports", value: JSON.stringify(reports) }), jsxs(Grid, { container: true, spacing: 2, children: [jsx(Grid, { size: 12, sx: { mt: 2 }, children: jsxs(Stack, { spacing: 2, children: [jsx(Typography, { variant: "h5", children: "Stock corrections" }), jsx(Typography, { variant: "body2", children: "Here you can report and correct for damages wrong items etc. Do not forget to click the button!" }), jsx(ReportsDisplay, { reports: reports }), jsx(Stack, { direction: "row", justifyContent: "flex-end", children: jsx(ReportMakingComponent, { content: "content", quantity: 0, type: "stock", related: [
79
+ : 0 }) }) })] }), jsxs(TableRow, { children: [jsx(TableCell, { align: "right", children: "Stock:" }), jsx(TableCell, { children: jsx(Tooltip, { title: "Total stock", children: jsx(Typography, { children: (Array.isArray(ipos) && ipos.length > 0
80
+ ? ipos.reduce((total, ipo) => total +
81
+ ipo.items.reduce((itemTotal, item) => itemTotal + item.released_quantity, 0), 0)
82
+ : 0) -
83
+ (Array.isArray(opos) && opos.length > 0
84
+ ? opos.reduce((total, opo) => total +
85
+ opo.opo_items.reduce((itemTotal, item) => itemTotal + item.ordered_quantity, 0), 0)
86
+ : 0) +
87
+ (reports
88
+ ? reports.reduce((total, report) => total + report.quantity, 0)
89
+ : 0) }) }) }), jsx(TableCell, { children: jsx(Tooltip, { title: "Total stock after updating", children: jsx("b", { children: (Array.isArray(ipos) && ipos.length > 0
90
+ ? ipos.reduce((total, ipo) => total +
91
+ ipo.items.reduce((itemTotal, item) => itemTotal + item.released_quantity, 0), 0)
92
+ : 0) -
93
+ (Array.isArray(opos) && opos.length > 0
94
+ ? opos.reduce((total, opo) => total +
95
+ opo.opo_items.reduce((itemTotal, item) => itemTotal + item.ordered_quantity, 0), 0)
96
+ : 0) +
97
+ (reports
98
+ ? reports.reduce((total, report) => total + report.quantity, 0)
99
+ : 0) }) }) })] })] }) })] }) })] }), jsxs("form", { action: formAction, children: [jsx("input", { id: "stock_reports", type: "hidden", name: "stock_reports", value: JSON.stringify(reports) }), jsxs(Grid, { container: true, spacing: 2, children: [jsx(Grid, { size: 12, sx: { mt: 2 }, children: jsxs(Stack, { spacing: 2, children: [jsx(Typography, { variant: "h5", children: "Stock corrections" }), jsx(Typography, { variant: "body2", children: "Here you can report and correct for damages wrong items etc. Do not forget to click the button!" }), jsx(ReportsDisplay, { reports: reports }), jsx(Stack, { direction: "row", justifyContent: "flex-end", children: jsx(ReportMakingComponent, { content: "content", quantity: 0, type: "stock", related: [
100
100
  {
101
101
  documentId: documentId,
102
102
  __type: "api::e-commerce.product",