umwd-components 0.1.685 → 0.1.686

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.
@@ -4,4 +4,4 @@
4
4
  * @copyright Jelle Paulus
5
5
  * @license MIT
6
6
  */
7
- import t from"react";import a from"@mui/material/Box";import e from"@mui/material/Typography";import{useTheme as r}from"@mui/material/styles";function o(o){var n=o.value,c=o.maxValue,i=o.color,m=void 0===i?"primary":i,l=100/c*n,p=r();return t.createElement(a,{sx:{display:"flex",alignItems:"center",background:"linear-gradient(90deg, ".concat(p.palette[m].main,"FF ").concat(l,"%, ").concat(p.palette[m].main,"66 ").concat(l,"%)"),width:"100%",borderRadius:"16px",padding:"2px",justifyContent:"center"}},n!==c?t.createElement(e,{variant:"body2",color:p.palette[m].contrastText},"".concat(n," / ").concat(c)):t.createElement(e,{variant:"body2"},"".concat(n)))}export{o as AmountIndicator,o as default};
7
+ import t from"react";import a from"@mui/material/Box";import e from"@mui/material/Typography";import{useTheme as r}from"@mui/material/styles";function o(o){var n=o.value,c=o.maxValue,i=o.color,m=void 0===i?"primary":i,l=100/c*n,p=r();return t.createElement(a,{sx:{display:"flex",alignItems:"center",background:"linear-gradient(90deg, ".concat(p.palette[m].main,"FF ").concat(l,"%, ").concat(p.palette[m].main,"66 ").concat(l,"%)"),width:"100%",borderRadius:"16px",padding:"2px",justifyContent:"center"}},n!==c?t.createElement(e,{variant:"body2",color:p.palette[m].contrastText},"".concat(n," / ").concat(c)):t.createElement(e,{variant:"body2",color:p.palette[m].contrastText},"".concat(n)))}export{o as AmountIndicator,o as default};
@@ -4,4 +4,4 @@
4
4
  * @copyright Jelle Paulus
5
5
  * @license MIT
6
6
  */
7
- import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useEffect as n}from"react";import l from"@mui/material/Paper";import a from"@mui/material/Box";import m from"@mui/material/Stack";import i from"@mui/material/Typography";import{SubmitButton as o}from"../../SubmitButton.js";import{useFormState as u}from"react-dom";import{updateProductAction as c}from"../../../data/actions/e-commerce/product/updateProductAction.js";import d from"@mui/material/Grid";import s from"../../logistics/report/ReportsDisplay.js";import E from"../../logistics/report/ReportMakingComponent.js";import{useSnackbar as p}from"../../../context/common/SnackbarContext.js";import y from"@mui/material/Table";import f from"@mui/material/TableBody";import g from"@mui/material/TableCell";import _ from"@mui/material/TableContainer";import v from"@mui/material/TableFooter";import k from"@mui/material/TableHead";import q from"@mui/material/TableRow";import b from"@mui/material/Tooltip";import x from"@mui/material/Button";import{AmountIndicator as h}from"../../common/AmountIndicator.js";var T={zodErrors:null,strapiErrors:null,data:null,message:null,severity:null};function C(C){var S=C.data,j=C.revalidateCallback,Q=C.handleClose,V=C.sx,O=S.id,R=S.title;S.product_number,S.stock;var A=S.ipos,I=S.opos,N=S.reports,w=p().handleAddMessage,z=e(u(c,T),2),B=z[0],D=z[1];return n((function(){(null==B?void 0:B.message)&&(w({message:B.message,severity:B.severity||"error"}),"success"===B.severity&&(j&&j(),Q&&Q()))}),[null==B?void 0:B.message,w,j,Q]),n((function(){(null==B?void 0:B.strapiErrors)&&w({message:B.strapiErrors.message||"Error updating stock",severity:"error"})}),[null==B?void 0:B.strapiErrors,w]),r.createElement(a,{sx:t([],e(Array.isArray(V)?V:[V]),!1)},r.createElement(d,{container:!0,spacing:2},r.createElement(d,{item:!0,xs:12},r.createElement(i,{variant:"h6"},R)),r.createElement(d,{item:!0,xs:12},r.createElement(_,{component:l},r.createElement(y,{size:"small"},r.createElement(i,{variant:"h6"},"Incoming orders"),r.createElement(k,null,r.createElement(q,null,r.createElement(g,null,"Number"),r.createElement(g,null,"Order Date"),r.createElement(g,null,"Line Item Number"),r.createElement(g,null,"Ordered Quantity"),r.createElement(g,null,"Received Quantity"),r.createElement(g,null,"Registered Quantity"),r.createElement(g,null,"Released Quantity"))),r.createElement(f,null,A.map((function(e){return r.createElement(r.Fragment,null,e.items.map((function(t){return r.createElement(q,{key:e.id},r.createElement(g,null,e.ipo_number),r.createElement(g,null,e.order_date),r.createElement(g,null,t.line_item_number),r.createElement(g,null,r.createElement(h,{value:t.ordered_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(g,null,r.createElement(h,{value:t.received_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(g,null,r.createElement(h,{value:t.registered_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(g,null,r.createElement(h,{value:t.released_quantity,maxValue:t.ordered_quantity,color:"primary"})))})))}))),r.createElement(v,null,r.createElement(q,null,r.createElement(g,{colSpan:6,align:"right"},"Total added to stock:"),r.createElement(g,null,A.reduce((function(e,t){return e+t.items.reduce((function(e,t){return e+t.released_quantity}),0)}),0))))),r.createElement(y,{size:"small"},r.createElement(i,{variant:"h6"},"Outgoing orders"),r.createElement(k,null,r.createElement(q,null,r.createElement(g,null,"Number"),r.createElement(g,null,"Order Date"),r.createElement(g,null,"Line Item Number"),r.createElement(g,null,"Ordered Quantity"),r.createElement(g,null,"Picked Quantity"),r.createElement(g,null,"Packed Quantity"),r.createElement(g,null,"Shipped Quantity"))),r.createElement(f,null,I.map((function(e){return r.createElement(r.Fragment,null,e.opo_items.map((function(t){return r.createElement(q,{key:e.id},r.createElement(g,null,e.opo_number),r.createElement(g,null,e.order_date),r.createElement(g,null,t.line_item_number),r.createElement(g,null,r.createElement(h,{value:t.ordered_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(g,null,r.createElement(h,{value:t.picked_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(g,null,r.createElement(h,{value:t.packed_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(g,null,r.createElement(h,{value:t.shipped_quantity,maxValue:t.ordered_quantity,color:"primary"})))})))}))),r.createElement(v,null,r.createElement(q,null,r.createElement(g,{colSpan:3,align:"right"},"Total reduced from stock:"),r.createElement(g,null,I.reduce((function(e,t){return e+t.opo_items.reduce((function(e,t){return e+t.ordered_quantity}),0)}),0))))),r.createElement(y,{size:"small"},r.createElement(q,null,r.createElement(g,{align:"right"},"Total added to stock:"),r.createElement(g,null,A.reduce((function(e,t){return e+t.items.reduce((function(e,t){return e+t.released_quantity}),0)}),0))),r.createElement(q,null,r.createElement(g,{align:"right"},"Total reduced from stock:"),r.createElement(g,null,I.reduce((function(e,t){return e+t.opo_items.reduce((function(e,t){return e+t.ordered_quantity}),0)}),0))),r.createElement(q,null,r.createElement(g,{align:"right"},"Corrections:"),r.createElement(g,null,r.createElement(b,{title:"Total stock corrections"},r.createElement(i,null,N?N.reduce((function(e,t){return e+t.quantity}),0):0))),r.createElement(g,null,r.createElement(b,{title:"Total stock corrections after updating"},r.createElement("b",null,N?N.reduce((function(e,t){return e+t.quantity}),0):0)))),r.createElement(q,null,r.createElement(g,{align:"right"},"Stock:"),r.createElement(g,null,r.createElement(b,{title:"Total stock"},r.createElement(i,null,A.reduce((function(e,t){return e+t.items.reduce((function(e,t){return e+t.released_quantity}),0)}),0)-I.reduce((function(e,t){return e+t.opo_items.reduce((function(e,t){return e+t.ordered_quantity}),0)}),0)+(N?N.reduce((function(e,t){return e+t.quantity}),0):0)))),r.createElement(g,null,r.createElement(b,{title:"Total stock after updating"},r.createElement("b",null,A.reduce((function(e,t){return e+t.items.reduce((function(e,t){return e+t.released_quantity}),0)}),0)-I.reduce((function(e,t){return e+t.opo_items.reduce((function(e,t){return e+t.ordered_quantity}),0)}),0)+(N?N.reduce((function(e,t){return e+t.quantity}),0):0))))))))),r.createElement("form",{action:D},O&&r.createElement("input",{id:"id",type:"hidden",name:"id",value:O}),r.createElement("input",{id:"stock_reports",type:"hidden",name:"stock_reports",value:JSON.stringify(N)}),r.createElement(d,{container:!0,spacing:2},r.createElement(d,{item:!0,xs:12,sx:{mt:2}},r.createElement(m,{spacing:2},r.createElement(i,{variant:"h5"},"Stock corrections"),r.createElement(i,{variant:"body2"},"Here you can report and correct for damages wrong items etc. Do not forget to click the button!"),r.createElement(s,{reports:N}),r.createElement(E,{content:"content",quantity:0,type:"stock",related:[{id:O,__type:"api::e-commerce.product"}],revalidateCallback:j}))),r.createElement(d,{item:!0,xs:12},r.createElement(m,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{py:1}},Q&&r.createElement(x,{onClick:Q,variant:"outlined"},"Close"),r.createElement(o,{text:"Update Stock",loadingText:"Updating...",variant:"contained"}))))))}export{C as EditStockForm};
7
+ import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useEffect as n}from"react";import l from"@mui/material/Paper";import a from"@mui/material/Box";import m from"@mui/material/Stack";import i from"@mui/material/Typography";import{SubmitButton as o}from"../../SubmitButton.js";import{useFormState as u}from"react-dom";import{updateProductAction as c}from"../../../data/actions/e-commerce/product/updateProductAction.js";import d from"@mui/material/Grid";import s from"../../logistics/report/ReportsDisplay.js";import E from"../../logistics/report/ReportMakingComponent.js";import{useSnackbar as p}from"../../../context/common/SnackbarContext.js";import y from"@mui/material/Table";import f from"@mui/material/TableBody";import g from"@mui/material/TableCell";import _ from"@mui/material/TableContainer";import v from"@mui/material/TableFooter";import k from"@mui/material/TableHead";import q from"@mui/material/TableRow";import b from"@mui/material/Tooltip";import x from"@mui/material/Button";import{AmountIndicator as h}from"../../common/AmountIndicator.js";var T={zodErrors:null,strapiErrors:null,data:null,message:null,severity:null};function C(C){var S=C.data,j=C.revalidateCallback,Q=C.handleClose,V=C.sx,O=S.id,R=S.title;S.product_number,S.stock;var A=S.ipos,I=S.opos,N=S.reports,w=p().handleAddMessage,z=e(u(c,T),2),B=z[0],D=z[1];return n((function(){(null==B?void 0:B.message)&&(w({message:B.message,severity:B.severity||"error"}),"success"===B.severity&&(j&&j(),Q&&Q()))}),[null==B?void 0:B.message,w,j,Q]),n((function(){(null==B?void 0:B.strapiErrors)&&w({message:B.strapiErrors.message||"Error updating stock",severity:"error"})}),[null==B?void 0:B.strapiErrors,w]),r.createElement(a,{sx:t([],e(Array.isArray(V)?V:[V]),!1)},r.createElement(d,{container:!0,spacing:2},r.createElement(d,{item:!0,xs:12},r.createElement(i,{variant:"h6"},R)),r.createElement(d,{item:!0,xs:12},r.createElement(_,{component:l},r.createElement(i,{variant:"h6",sx:{pl:2}},"Incoming orders"),r.createElement(y,{size:"small"},r.createElement(k,null,r.createElement(q,null,r.createElement(g,null,"Number"),r.createElement(g,null,"Order Date"),r.createElement(g,null,"Line Item Number"),r.createElement(g,null,"Ordered Quantity"),r.createElement(g,null,"Received Quantity"),r.createElement(g,null,"Registered Quantity"),r.createElement(g,null,"Released Quantity"))),r.createElement(f,null,A.map((function(e){return r.createElement(r.Fragment,null,e.items.map((function(t){return r.createElement(q,{key:e.id},r.createElement(g,null,e.ipo_number),r.createElement(g,null,e.order_date),r.createElement(g,null,t.line_item_number),r.createElement(g,null,r.createElement(h,{value:t.ordered_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(g,null,r.createElement(h,{value:t.received_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(g,null,r.createElement(h,{value:t.registered_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(g,null,r.createElement(h,{value:t.released_quantity,maxValue:t.ordered_quantity,color:"primary"})))})))}))),r.createElement(v,null,r.createElement(q,null,r.createElement(g,{colSpan:6,align:"right"},"Total added to stock:"),r.createElement(g,null,A.reduce((function(e,t){return e+t.items.reduce((function(e,t){return e+t.released_quantity}),0)}),0))))),r.createElement(i,{variant:"h6",sx:{pl:2}},"Outgoing orders"),r.createElement(y,{size:"small"},r.createElement(k,null,r.createElement(q,null,r.createElement(g,null,"Number"),r.createElement(g,null,"Order Date"),r.createElement(g,null,"Line Item Number"),r.createElement(g,null,"Ordered Quantity"),r.createElement(g,null,"Picked Quantity"),r.createElement(g,null,"Packed Quantity"),r.createElement(g,null,"Shipped Quantity"))),r.createElement(f,null,I.map((function(e){return r.createElement(r.Fragment,null,e.opo_items.map((function(t){return r.createElement(q,{key:e.id},r.createElement(g,null,e.opo_number),r.createElement(g,null,e.order_date),r.createElement(g,null,t.line_item_number),r.createElement(g,null,r.createElement(h,{value:t.ordered_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(g,null,r.createElement(h,{value:t.picked_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(g,null,r.createElement(h,{value:t.packed_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(g,null,r.createElement(h,{value:t.shipped_quantity,maxValue:t.ordered_quantity,color:"primary"})))})))}))),r.createElement(v,null,r.createElement(q,null,r.createElement(g,{colSpan:3,align:"right"},"Total reduced from stock:"),r.createElement(g,null,I.reduce((function(e,t){return e+t.opo_items.reduce((function(e,t){return e+t.ordered_quantity}),0)}),0))))),r.createElement(y,{size:"small"},r.createElement(q,null,r.createElement(g,{align:"right"},"Total added to stock:"),r.createElement(g,null,A.reduce((function(e,t){return e+t.items.reduce((function(e,t){return e+t.released_quantity}),0)}),0))),r.createElement(q,null,r.createElement(g,{align:"right"},"Total reduced from stock:"),r.createElement(g,null,I.reduce((function(e,t){return e+t.opo_items.reduce((function(e,t){return e+t.ordered_quantity}),0)}),0))),r.createElement(q,null,r.createElement(g,{align:"right"},"Corrections:"),r.createElement(g,null,r.createElement(b,{title:"Total stock corrections"},r.createElement(i,null,N?N.reduce((function(e,t){return e+t.quantity}),0):0))),r.createElement(g,null,r.createElement(b,{title:"Total stock corrections after updating"},r.createElement("b",null,N?N.reduce((function(e,t){return e+t.quantity}),0):0)))),r.createElement(q,null,r.createElement(g,{align:"right"},"Stock:"),r.createElement(g,null,r.createElement(b,{title:"Total stock"},r.createElement(i,null,A.reduce((function(e,t){return e+t.items.reduce((function(e,t){return e+t.released_quantity}),0)}),0)-I.reduce((function(e,t){return e+t.opo_items.reduce((function(e,t){return e+t.ordered_quantity}),0)}),0)+(N?N.reduce((function(e,t){return e+t.quantity}),0):0)))),r.createElement(g,null,r.createElement(b,{title:"Total stock after updating"},r.createElement("b",null,A.reduce((function(e,t){return e+t.items.reduce((function(e,t){return e+t.released_quantity}),0)}),0)-I.reduce((function(e,t){return e+t.opo_items.reduce((function(e,t){return e+t.ordered_quantity}),0)}),0)+(N?N.reduce((function(e,t){return e+t.quantity}),0):0))))))))),r.createElement("form",{action:D},O&&r.createElement("input",{id:"id",type:"hidden",name:"id",value:O}),r.createElement("input",{id:"stock_reports",type:"hidden",name:"stock_reports",value:JSON.stringify(N)}),r.createElement(d,{container:!0,spacing:2},r.createElement(d,{item:!0,xs:12,sx:{mt:2}},r.createElement(m,{spacing:2},r.createElement(i,{variant:"h5"},"Stock corrections"),r.createElement(i,{variant:"body2"},"Here you can report and correct for damages wrong items etc. Do not forget to click the button!"),r.createElement(s,{reports:N}),r.createElement(E,{content:"content",quantity:0,type:"stock",related:[{id:O,__type:"api::e-commerce.product"}],revalidateCallback:j}))),r.createElement(d,{item:!0,xs:12},r.createElement(m,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{py:1}},Q&&r.createElement(x,{onClick:Q,variant:"outlined"},"Close"),r.createElement(o,{text:"Update Stock",loadingText:"Updating...",variant:"contained"}))))))}export{C as EditStockForm};
@@ -3,4 +3,4 @@
3
3
  * @copyright Jelle Paulus
4
4
  * @license MIT
5
5
  */
6
- import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import t,{useState as r,useEffect as a}from"react";import o from"@mui/material/Alert";import m from"@mui/material/IconButton";import n from"@mui/material/Dialog";import i from"@mui/material/DialogContent";import l from"@mui/material/DialogActions";import u from"@mui/material/Button";import c from"@mui/material/Typography";import p from"@mui/material/Stack";import d from"@mui/material/TextField";import s from"../../../../node_modules/dayjs/dayjs.min.js";import{SubmitButton as f}from"../../SubmitButton.js";import{StrapiErrors as E}from"../../StrapiErrors.js";import{useFormState as g}from"react-dom";import{createReportAction as v}from"../../../data/actions/logistics/report/createReportAction.js";import b from"../../common/markdown/MarkdownEditor.js";import y from"@mui/icons-material/Announcement";import{Tooltip as x}from"@mui/material";var j={zodErrors:null,strapiErrors:null,data:null,message:null};function h(h){var k=h.content,A=h.related,C=h.type,D=h.minValue,S=h.maxValue,T=h.revalidateCallback,w=e(r(!1),2),V=w[0],Y=w[1],z=v.bind(null,A),B=e(g(z,j),2),M=B[0],q=B[1];return a((function(){(null==M?void 0:M.data)&&T&&T()}),[M.data]),t.createElement(t.Fragment,null,t.createElement(x,{title:"Create a report"},t.createElement(m,{onClick:function(){return Y(!0)}},t.createElement(y,{fontSize:"large"}))),t.createElement(n,{open:V,fullWidth:!0,maxWidth:"lg"},t.createElement("form",{action:q},t.createElement(i,{sx:{p:1}},t.createElement(p,{spacing:2},t.createElement("input",{type:"hidden",name:"type",value:C}),t.createElement(c,{variant:"body1",textAlign:"right"},s(Date.now()).format("DD-MM-YYYY")),t.createElement(d,{id:"quantity",name:"quantity",type:"number",label:"Amount",size:"small",InputProps:{inputProps:{min:"".concat(void 0!==D&&void 0!==S&&D<S?D:S),max:"".concat(void 0!==D&&void 0!==S&&S>D?S:D),step:"1"}},defaultValue:0,helperText:D&&S&&"Enter a number between ".concat(D," and ").concat(S)}),t.createElement(b,{name:"content",label:"The report",defaultValue:k}))),t.createElement(l,null,t.createElement(u,{onClick:function(){return Y(!1)}},"Cancel"),t.createElement(f,{text:"Submit",loadingText:"Loading..."}),t.createElement(E,{error:null==M?void 0:M.strapiErrors}),(null==M?void 0:M.message)&&t.createElement(o,{severity:"error"},null==M?void 0:M.message)))))}export{h as default};
6
+ import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import t,{useState as r,useEffect as a}from"react";import o from"@mui/material/Alert";import m from"@mui/material/IconButton";import i from"@mui/material/Dialog";import n from"@mui/material/DialogContent";import l from"@mui/material/DialogActions";import u from"@mui/material/Button";import c from"@mui/material/Typography";import p from"@mui/material/Stack";import s from"@mui/material/TextField";import d from"../../../../node_modules/dayjs/dayjs.min.js";import{SubmitButton as f}from"../../SubmitButton.js";import{StrapiErrors as E}from"../../StrapiErrors.js";import{useFormState as g}from"react-dom";import{createReportAction as v}from"../../../data/actions/logistics/report/createReportAction.js";import b from"../../common/markdown/MarkdownEditor.js";import y from"@mui/icons-material/Announcement";import{Box as x,Tooltip as j}from"@mui/material";var h={zodErrors:null,strapiErrors:null,data:null,message:null};function k(k){var A=k.content,C=k.related,D=k.type,S=k.minValue,T=k.maxValue,w=k.revalidateCallback,V=e(r(!1),2),Y=V[0],z=V[1],B=v.bind(null,C),M=e(g(B,h),2),q=M[0],F=M[1];return a((function(){(null==q?void 0:q.data)&&w&&w()}),[q.data]),t.createElement(t.Fragment,null,t.createElement(x,{sx:{display:"block",position:"relative"}},t.createElement(j,{title:"Create a report"},t.createElement(m,{onClick:function(){return z(!0)}},t.createElement(y,{fontSize:"large"})))),t.createElement(i,{open:Y,fullWidth:!0,maxWidth:"lg"},t.createElement("form",{action:F},t.createElement(n,{sx:{p:1}},t.createElement(p,{spacing:2},t.createElement("input",{type:"hidden",name:"type",value:D}),t.createElement(c,{variant:"body1",textAlign:"right"},d(Date.now()).format("DD-MM-YYYY")),t.createElement(s,{id:"quantity",name:"quantity",type:"number",label:"Amount",size:"small",InputProps:{inputProps:{min:"".concat(void 0!==S&&void 0!==T&&S<T?S:T),max:"".concat(void 0!==S&&void 0!==T&&T>S?T:S),step:"1"}},defaultValue:0,helperText:S&&T&&"Enter a number between ".concat(S," and ").concat(T)}),t.createElement(b,{name:"content",label:"The report",defaultValue:A}))),t.createElement(l,null,t.createElement(u,{onClick:function(){return z(!1)}},"Cancel"),t.createElement(f,{text:"Submit",loadingText:"Loading..."}),t.createElement(E,{error:null==q?void 0:q.strapiErrors}),(null==q?void 0:q.message)&&t.createElement(o,{severity:"error"},null==q?void 0:q.message)))))}export{k as default};
@@ -3,4 +3,4 @@
3
3
  * @copyright Jelle Paulus
4
4
  * @license MIT
5
5
  */
6
- import e from"react";import t from"@mui/material/Typography";import r from"@mui/material/Stack";import a from"@mui/material/Chip";import m from"@mui/material/Grid";import i from"../../common/markdown/MarkdownDisplay.js";import{Divider as n}from"@mui/material";var o=function(o){var l=o.reports;return e.createElement(r,{spacing:1,sx:{mb:1}},l&&l.length>0&&l.map((function(r,o){var l;return e.createElement(m,{container:!0,key:o},e.createElement(m,{item:!0,xs:1},e.createElement(a,{label:"".concat(r.quantity>0?"+":""," ").concat(r.quantity),color:r.quantity>0?"success":"error",size:"small"})),e.createElement(m,{item:!0,xs:7},e.createElement(i,null,r.content)),e.createElement(m,{item:!0,xs:2},e.createElement(t,{variant:"body2"}," ",r.date)),e.createElement(m,{item:!0,xs:2},e.createElement(t,{variant:"body2",align:"right"},null===(l=r.author)||void 0===l?void 0:l.username)),e.createElement(m,{item:!0,xs:12},e.createElement(n,{sx:{mb:1}})))})))};export{o as default};
6
+ import e from"react";import t from"@mui/material/Typography";import r from"@mui/material/Stack";import a from"@mui/material/Chip";import m from"@mui/material/Grid";import n from"../../common/markdown/MarkdownDisplay.js";import{Divider as i}from"@mui/material";var o=function(o){var l=o.reports;return e.createElement(r,{spacing:1,sx:{mb:1}},l&&l.length>0&&l.map((function(r,o){var l;return e.createElement(m,{container:!0,key:o},e.createElement(m,{item:!0,xs:1},e.createElement(a,{label:"".concat(r.quantity>0?"+":""," ").concat(r.quantity),color:r.quantity>0?"success":"error",size:"small"})),e.createElement(m,{item:!0,xs:7},e.createElement(n,null,r.content)),e.createElement(m,{item:!0,xs:2},e.createElement(t,{variant:"body2"}," ",r.date)),e.createElement(m,{item:!0,xs:2},e.createElement(t,{variant:"body2",align:"right"},(null===(l=r.author)||void 0===l?void 0:l.username)?r.author.username:"Unknown")),e.createElement(m,{item:!0,xs:12},e.createElement(i,{sx:{my:1}})))})))};export{o as default};