umwd-components 0.1.547 → 0.1.548

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.
@@ -3,4 +3,4 @@
3
3
  * @copyright Jelle Paulus
4
4
  * @license MIT
5
5
  */
6
- import{__exports as r}from"../../_virtual/index8.js";var t;function e(){if(t)return r;t=1,r.byteLength=function(r){var t=i(r),e=t[0],n=t[1];return 3*(e+n)/4-n},r.toByteArray=function(r){var t,e,a=i(r),u=a[0],h=a[1],c=new o(function(r,t,e){return 3*(t+e)/4-e}(0,u,h)),f=0,d=h>0?u-4:u;for(e=0;e<d;e+=4)t=n[r.charCodeAt(e)]<<18|n[r.charCodeAt(e+1)]<<12|n[r.charCodeAt(e+2)]<<6|n[r.charCodeAt(e+3)],c[f++]=t>>16&255,c[f++]=t>>8&255,c[f++]=255&t;2===h&&(t=n[r.charCodeAt(e)]<<2|n[r.charCodeAt(e+1)]>>4,c[f++]=255&t);1===h&&(t=n[r.charCodeAt(e)]<<10|n[r.charCodeAt(e+1)]<<4|n[r.charCodeAt(e+2)]>>2,c[f++]=t>>8&255,c[f++]=255&t);return c},r.fromByteArray=function(r){for(var t,n=r.length,o=n%3,a=[],u=16383,i=0,c=n-o;i<c;i+=u)a.push(h(r,i,i+u>c?c:i+u));1===o?(t=r[n-1],a.push(e[t>>2]+e[t<<4&63]+"==")):2===o&&(t=(r[n-2]<<8)+r[n-1],a.push(e[t>>10]+e[t>>4&63]+e[t<<2&63]+"="));return a.join("")};for(var e=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0;u<64;++u)e[u]=a[u],n[a.charCodeAt(u)]=u;function i(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function h(r,t,n){for(var o,a,u=[],i=t;i<n;i+=3)o=(r[i]<<16&16711680)+(r[i+1]<<8&65280)+(255&r[i+2]),u.push(e[(a=o)>>18&63]+e[a>>12&63]+e[a>>6&63]+e[63&a]);return u.join("")}return n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63,r}export{e as __require};
6
+ import{__exports as r}from"../../_virtual/index7.js";var t;function e(){if(t)return r;t=1,r.byteLength=function(r){var t=i(r),e=t[0],n=t[1];return 3*(e+n)/4-n},r.toByteArray=function(r){var t,e,a=i(r),u=a[0],h=a[1],c=new o(function(r,t,e){return 3*(t+e)/4-e}(0,u,h)),f=0,d=h>0?u-4:u;for(e=0;e<d;e+=4)t=n[r.charCodeAt(e)]<<18|n[r.charCodeAt(e+1)]<<12|n[r.charCodeAt(e+2)]<<6|n[r.charCodeAt(e+3)],c[f++]=t>>16&255,c[f++]=t>>8&255,c[f++]=255&t;2===h&&(t=n[r.charCodeAt(e)]<<2|n[r.charCodeAt(e+1)]>>4,c[f++]=255&t);1===h&&(t=n[r.charCodeAt(e)]<<10|n[r.charCodeAt(e+1)]<<4|n[r.charCodeAt(e+2)]>>2,c[f++]=t>>8&255,c[f++]=255&t);return c},r.fromByteArray=function(r){for(var t,n=r.length,o=n%3,a=[],u=16383,i=0,c=n-o;i<c;i+=u)a.push(h(r,i,i+u>c?c:i+u));1===o?(t=r[n-1],a.push(e[t>>2]+e[t<<4&63]+"==")):2===o&&(t=(r[n-2]<<8)+r[n-1],a.push(e[t>>10]+e[t>>4&63]+e[t<<2&63]+"="));return a.join("")};for(var e=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0;u<64;++u)e[u]=a[u],n[a.charCodeAt(u)]=u;function i(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function h(r,t,n){for(var o,a,u=[],i=t;i<n;i+=3)o=(r[i]<<16&16711680)+(r[i+1]<<8&65280)+(255&r[i+2]),u.push(e[(a=o)>>18&63]+e[a>>12&63]+e[a>>6&63]+e[63&a]);return u.join("")}return n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63,r}export{e as __require};
@@ -3,5 +3,5 @@
3
3
  * @copyright Jelle Paulus
4
4
  * @license MIT
5
5
  */
6
- import{__exports as a}from"../../_virtual/index7.js";
6
+ import{__exports as a}from"../../_virtual/index8.js";
7
7
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var t;function o(){return t||(t=1,a.read=function(a,t,o,r,h){var M,e,i=8*h-r-1,p=(1<<i)-1,f=p>>1,n=-7,w=o?h-1:0,s=o?-1:1,u=a[t+w];for(w+=s,M=u&(1<<-n)-1,u>>=-n,n+=i;n>0;M=256*M+a[t+w],w+=s,n-=8);for(e=M&(1<<-n)-1,M>>=-n,n+=r;n>0;e=256*e+a[t+w],w+=s,n-=8);if(0===M)M=1-f;else{if(M===p)return e?NaN:1/0*(u?-1:1);e+=Math.pow(2,r),M-=f}return(u?-1:1)*e*Math.pow(2,M-r)},a.write=function(a,t,o,r,h,M){var e,i,p,f=8*M-h-1,n=(1<<f)-1,w=n>>1,s=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,u=r?0:M-1,N=r?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,e=n):(e=Math.floor(Math.log(t)/Math.LN2),t*(p=Math.pow(2,-e))<1&&(e--,p*=2),(t+=e+w>=1?s/p:s*Math.pow(2,1-w))*p>=2&&(e++,p/=2),e+w>=n?(i=0,e=n):e+w>=1?(i=(t*p-1)*Math.pow(2,h),e+=w):(i=t*Math.pow(2,w-1)*Math.pow(2,h),e=0));h>=8;a[o+u]=255&i,u+=N,i/=256,h-=8);for(e=e<<h|i,f+=h;f>0;a[o+u]=255&e,u+=N,e/=256,f-=8);a[o+u-N]|=128*_}),a}export{o as __require};
@@ -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,{useState as n}from"react";import l from"@mui/material/Paper";import a from"@mui/material/Box";import c from"@mui/material/Stack";import u from"@mui/material/Alert";import i from"@mui/material/Typography";import{SubmitButton as m}from"../../SubmitButton.js";import{useFormState as o}from"react-dom";import{StrapiErrors as d}from"../../StrapiErrors.js";import{updateProductAction as E}from"../../../data/actions/e-commerce/product/updateProductAction.js";import s from"@mui/material/Grid";import p from"../../logistics/reportV2/ReportsDisplay.js";import y from"../../logistics/reportV2/ReportMakingComponent.js";import{TableContainer as f,Table as _,TableHead as g,TableRow as v,TableCell as q,TableBody as k,TableFooter as x,Tooltip as b}from"@mui/material";import{AmountIndicator as h}from"../../common/AmountIndicator.js";var T={zodErrors:null,strapiErrors:null,data:null,message:null};function V(V){var S,Q,j=V.data,A=V.sx,O=j.id,I=j.title;j.product_number,j.stock;var N=j.ipos,z=j.opos,D=(null===(S=null==j?void 0:j.stock_reports)||void 0===S?void 0:S.data)||[],P=e(n(null!=(null===(Q=null==j?void 0:j.stock_reports)||void 0===Q?void 0:Q.data)?j.stock_reports.data:[]),2),R=P[0];P[1];var w=e(o(E,T),2),B=w[0],C=w[1];return r.createElement(a,{sx:t([{p:2}],e(Array.isArray(A)?A:[A]),!1),component:l},r.createElement(s,{container:!0,spacing:2},r.createElement(s,{item:!0,xs:12},r.createElement(i,{variant:"h6"},I)),r.createElement(s,{item:!0,xs:12},r.createElement(f,{component:l},r.createElement(i,{variant:"h6"},"Incoming orders"),r.createElement(_,{size:"small"},r.createElement(g,null,r.createElement(v,null,r.createElement(q,null,"Number"),r.createElement(q,null,"Order Date"),r.createElement(q,null,"Line Item Number"),r.createElement(q,null,"Ordered Quantity"),r.createElement(q,null,"Arrived Quantity"),r.createElement(q,null,"Registered Quantity"),r.createElement(q,null,"Recieved Quantity"))),r.createElement(k,null,N.map((function(e){return r.createElement(r.Fragment,null,e.items.map((function(t){return r.createElement(v,{key:e.id},r.createElement(q,null,e.ipo_number),r.createElement(q,null,e.order_date),r.createElement(q,null,t.line_item_number),r.createElement(q,null,r.createElement(h,{value:t.ordered_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(q,null,r.createElement(h,{value:t.arrived_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(q,null,r.createElement(h,{value:t.registered_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(q,null,r.createElement(h,{value:t.recieved_quantity,maxValue:t.ordered_quantity,color:"primary"})))})))}))),r.createElement(x,null,r.createElement(v,null,r.createElement(q,{colSpan:6,align:"right"},"Total added to stock:"),r.createElement(q,null,N.reduce((function(e,t){return e+t.items.reduce((function(e,t){return e+t.recieved_quantity}),0)}),0))))),r.createElement(i,{variant:"h6"},"Outgoing orders"),r.createElement(_,{size:"small"},r.createElement(g,null,r.createElement(v,null,r.createElement(q,null,"Number"),r.createElement(q,null,"Order Date"),r.createElement(q,null,"Line Item Number"),r.createElement(q,null,"Ordered Quantity"),r.createElement(q,null,"Picked Quantity"),r.createElement(q,null,"Packed Quantity"),r.createElement(q,null,"Shipped Quantity"))),r.createElement(k,null,z.map((function(e){return r.createElement(r.Fragment,null,e.opo_items.map((function(t){return r.createElement(v,{key:e.id},r.createElement(q,null,e.opo_number),r.createElement(q,null,e.order_date),r.createElement(q,null,t.line_item_number),r.createElement(q,null,r.createElement(h,{value:t.ordered_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(q,null,r.createElement(h,{value:t.picked_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(q,null,r.createElement(h,{value:t.packed_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(q,null,r.createElement(h,{value:t.shipped_quantity,maxValue:t.ordered_quantity,color:"primary"})))})))}))),r.createElement(x,null,r.createElement(v,null,r.createElement(q,{colSpan:3,align:"right"},"Total reduced from stock:"),r.createElement(q,null,z.reduce((function(e,t){return e+t.opo_items.reduce((function(e,t){return e+t.ordered_quantity}),0)}),0))))),r.createElement(_,{size:"small"},r.createElement(v,null,r.createElement(q,{align:"right"},"Total added to stock:"),r.createElement(q,null,N.reduce((function(e,t){return e+t.items.reduce((function(e,t){return e+t.recieved_quantity}),0)}),0))),r.createElement(v,null,r.createElement(q,{align:"right"},"Total reduced from stock:"),r.createElement(q,null,z.reduce((function(e,t){return e+t.opo_items.reduce((function(e,t){return e+t.ordered_quantity}),0)}),0))),r.createElement(v,null,r.createElement(q,{align:"right"},"Corrections:"),r.createElement(q,null,r.createElement(b,{title:"Total stock corrections"},r.createElement(i,null,D.reduce((function(e,t){return e+t.quantity}),0)))),r.createElement(q,null,r.createElement(b,{title:"Total stock corrections after updating"},r.createElement("b",null,R.reduce((function(e,t){return e+t.quantity}),0))))),r.createElement(v,null,r.createElement(q,{align:"right"},"Stock:"),r.createElement(q,null,r.createElement(b,{title:"Total stock"},r.createElement(i,null,N.reduce((function(e,t){return e+t.items.reduce((function(e,t){return e+t.recieved_quantity}),0)}),0)-z.reduce((function(e,t){return e+t.opo_items.reduce((function(e,t){return e+t.ordered_quantity}),0)}),0)+D.reduce((function(e,t){return e+t.quantity}),0)))),r.createElement(q,null,r.createElement(b,{title:"Total stock after updating"},r.createElement("b",null,N.reduce((function(e,t){return e+t.items.reduce((function(e,t){return e+t.recieved_quantity}),0)}),0)-z.reduce((function(e,t){return e+t.opo_items.reduce((function(e,t){return e+t.ordered_quantity}),0)}),0)+R.reduce((function(e,t){return e+t.quantity}),0))))))))),r.createElement("form",{action:C},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(R)}),r.createElement(s,{container:!0,spacing:2},r.createElement(s,{item:!0,xs:12,sx:{mt:2}},r.createElement(c,{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(p,{reports:R}),r.createElement(y,{content:"content",quantity:0,type:"registered",related:[{id:O,__type:"api::e-commerce.product"}]}))),r.createElement(s,{item:!0,xs:12},r.createElement(c,{direction:"row-reverse",spacing:2,alignItems:"center",sx:{py:1}},r.createElement(m,{text:"update stock",loadingText:"loading"}),(null==B?void 0:B.strapiErrors)&&r.createElement(d,{error:null==B?void 0:B.strapiErrors}),(null==B?void 0:B.message)&&r.createElement(u,{severity:"error"},null==B?void 0:B.message))))))}export{V as EditStockForm};
7
+ import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useState as n}from"react";import l from"@mui/material/Paper";import a from"@mui/material/Box";import c from"@mui/material/Stack";import u from"@mui/material/Alert";import i from"@mui/material/Typography";import{SubmitButton as m}from"../../SubmitButton.js";import{useFormState as o}from"react-dom";import{StrapiErrors as d}from"../../StrapiErrors.js";import{updateProductAction as E}from"../../../data/actions/e-commerce/product/updateProductAction.js";import s from"@mui/material/Grid";import p from"../../logistics/reportV2/ReportsDisplay.js";import y from"../../logistics/reportV2/ReportMakingComponent.js";import{TableContainer as f,Table as _,TableHead as g,TableRow as v,TableCell as q,TableBody as k,TableFooter as x,Tooltip as b}from"@mui/material";import{AmountIndicator as h}from"../../common/AmountIndicator.js";var T={zodErrors:null,strapiErrors:null,data:null,message:null};function V(V){var S,Q,j=V.data,A=V.sx,O=j.id,I=j.title;j.product_number,j.stock;var N=j.ipos,z=j.opos,D=(null===(S=null==j?void 0:j.stock_reports)||void 0===S?void 0:S.data)||[],P=e(n(null!=(null===(Q=null==j?void 0:j.stock_reports)||void 0===Q?void 0:Q.data)?j.stock_reports.data:[]),2),R=P[0];P[1];var w=e(o(E,T),2),B=w[0],C=w[1];return r.createElement(a,{sx:t([{p:2}],e(Array.isArray(A)?A:[A]),!1),component:l},r.createElement(s,{container:!0,spacing:2},r.createElement(s,{item:!0,xs:12},r.createElement(i,{variant:"h6"},I)),r.createElement(s,{item:!0,xs:12},r.createElement(f,{component:l},r.createElement(i,{variant:"h6"},"Incoming orders"),r.createElement(_,{size:"small"},r.createElement(g,null,r.createElement(v,null,r.createElement(q,null,"Number"),r.createElement(q,null,"Order Date"),r.createElement(q,null,"Line Item Number"),r.createElement(q,null,"Ordered Quantity"),r.createElement(q,null,"Arrived Quantity"),r.createElement(q,null,"Registered Quantity"),r.createElement(q,null,"Recieved Quantity"))),r.createElement(k,null,N.map((function(e){return r.createElement(r.Fragment,null,e.items.map((function(t){return r.createElement(v,{key:e.id},r.createElement(q,null,e.ipo_number),r.createElement(q,null,e.order_date),r.createElement(q,null,t.line_item_number),r.createElement(q,null,r.createElement(h,{value:t.ordered_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(q,null,r.createElement(h,{value:t.arrived_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(q,null,r.createElement(h,{value:t.registered_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(q,null,r.createElement(h,{value:t.received_quantity,maxValue:t.ordered_quantity,color:"primary"})))})))}))),r.createElement(x,null,r.createElement(v,null,r.createElement(q,{colSpan:6,align:"right"},"Total added to stock:"),r.createElement(q,null,N.reduce((function(e,t){return e+t.items.reduce((function(e,t){return e+t.received_quantity}),0)}),0))))),r.createElement(i,{variant:"h6"},"Outgoing orders"),r.createElement(_,{size:"small"},r.createElement(g,null,r.createElement(v,null,r.createElement(q,null,"Number"),r.createElement(q,null,"Order Date"),r.createElement(q,null,"Line Item Number"),r.createElement(q,null,"Ordered Quantity"),r.createElement(q,null,"Picked Quantity"),r.createElement(q,null,"Packed Quantity"),r.createElement(q,null,"Shipped Quantity"))),r.createElement(k,null,z.map((function(e){return r.createElement(r.Fragment,null,e.opo_items.map((function(t){return r.createElement(v,{key:e.id},r.createElement(q,null,e.opo_number),r.createElement(q,null,e.order_date),r.createElement(q,null,t.line_item_number),r.createElement(q,null,r.createElement(h,{value:t.ordered_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(q,null,r.createElement(h,{value:t.picked_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(q,null,r.createElement(h,{value:t.packed_quantity,maxValue:t.ordered_quantity,color:"primary"})),r.createElement(q,null,r.createElement(h,{value:t.shipped_quantity,maxValue:t.ordered_quantity,color:"primary"})))})))}))),r.createElement(x,null,r.createElement(v,null,r.createElement(q,{colSpan:3,align:"right"},"Total reduced from stock:"),r.createElement(q,null,z.reduce((function(e,t){return e+t.opo_items.reduce((function(e,t){return e+t.ordered_quantity}),0)}),0))))),r.createElement(_,{size:"small"},r.createElement(v,null,r.createElement(q,{align:"right"},"Total added to stock:"),r.createElement(q,null,N.reduce((function(e,t){return e+t.items.reduce((function(e,t){return e+t.received_quantity}),0)}),0))),r.createElement(v,null,r.createElement(q,{align:"right"},"Total reduced from stock:"),r.createElement(q,null,z.reduce((function(e,t){return e+t.opo_items.reduce((function(e,t){return e+t.ordered_quantity}),0)}),0))),r.createElement(v,null,r.createElement(q,{align:"right"},"Corrections:"),r.createElement(q,null,r.createElement(b,{title:"Total stock corrections"},r.createElement(i,null,D.reduce((function(e,t){return e+t.quantity}),0)))),r.createElement(q,null,r.createElement(b,{title:"Total stock corrections after updating"},r.createElement("b",null,R.reduce((function(e,t){return e+t.quantity}),0))))),r.createElement(v,null,r.createElement(q,{align:"right"},"Stock:"),r.createElement(q,null,r.createElement(b,{title:"Total stock"},r.createElement(i,null,N.reduce((function(e,t){return e+t.items.reduce((function(e,t){return e+t.received_quantity}),0)}),0)-z.reduce((function(e,t){return e+t.opo_items.reduce((function(e,t){return e+t.ordered_quantity}),0)}),0)+D.reduce((function(e,t){return e+t.quantity}),0)))),r.createElement(q,null,r.createElement(b,{title:"Total stock after updating"},r.createElement("b",null,N.reduce((function(e,t){return e+t.items.reduce((function(e,t){return e+t.received_quantity}),0)}),0)-z.reduce((function(e,t){return e+t.opo_items.reduce((function(e,t){return e+t.ordered_quantity}),0)}),0)+R.reduce((function(e,t){return e+t.quantity}),0))))))))),r.createElement("form",{action:C},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(R)}),r.createElement(s,{container:!0,spacing:2},r.createElement(s,{item:!0,xs:12,sx:{mt:2}},r.createElement(c,{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(p,{reports:R}),r.createElement(y,{content:"content",quantity:0,type:"registered",related:[{id:O,__type:"api::e-commerce.product"}]}))),r.createElement(s,{item:!0,xs:12},r.createElement(c,{direction:"row-reverse",spacing:2,alignItems:"center",sx:{py:1}},r.createElement(m,{text:"update stock",loadingText:"loading"}),(null==B?void 0:B.strapiErrors)&&r.createElement(d,{error:null==B?void 0:B.strapiErrors}),(null==B?void 0:B.message)&&r.createElement(u,{severity:"error"},null==B?void 0:B.message))))))}export{V 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}from"react";import a from"@mui/material/Stack";import n from"@mui/material/Typography";import i from"@mui/material/IconButton";import o from"@mui/material/Divider";import l from"@mui/material/Collapse";import{AmountUpdater as m}from"../../common/AmountUpdater.js";import c from"@mui/icons-material/ArrowDropDown";import u from"../../common/ImagePreviewTooltip.js";import d from"../reportV2/ReportMakingComponent.js";import p from"../reportV2/ReportsDisplay.js";function s(s){var f=s.item,y=s.index,g=s.handleUpdateQuantity,E=s.image,v=s.revalidateCallback,b=f.line_item_number,V=f.product,w=f.arrived_quantity,_=f.registered_quantity,h=f.recieved_quantity,q=f.ordered_quantity,C=f.reports,N=void 0!==(null==C?void 0:C.data)&&C.data.length>0?C.data.filter((function(e){return"arrived"===e.type})).reduce((function(e,t){return e+t.quantity}),0):0,k=void 0!==(null==C?void 0:C.data)&&C.data.length>0?C.data.filter((function(e){return"registered"===e.type})).reduce((function(e,t){return e+t.quantity}),0):0,j=e(r(!1),2),x=j[0],D=j[1];return t.createElement(a,{spacing:1,key:y},f&&t.createElement(t.Fragment,null,t.createElement(a,{direction:"row",justifyContent:"space-between"},t.createElement(a,{spacing:1},t.createElement(n,{variant:"body1"},"Line Item Number: ",b),t.createElement(n,{variant:"body1"},"Part Number: ",V.product_number)),E&&t.createElement(t.Fragment,null,t.createElement(u,{image:E,label:f.product.title}))),t.createElement(n,{variant:"body2"},"Arrived"),t.createElement(m,{currentValue:w,totalValue:q+N,minNewValue:0+_+k,maxNewValue:q+N,color:"info",handleChange:function(e){g(e,f.id,"arrived_quantity")}}),t.createElement(n,{variant:"body2"},"Registered"),t.createElement(m,{currentValue:_,totalValue:q+N,minNewValue:0+h,maxNewValue:w+k,color:"info",handleChange:function(e){g(e,f.id,"registered_quantity")},offsetEnd:k}),t.createElement(o,{sx:{p:0}},t.createElement(a,{direction:"row",spacing:1,alignItems:"center"},t.createElement(n,{variant:"body2"},"Irregularities / Corrections"),t.createElement(i,{onClick:function(){return D(!x)}},t.createElement(c,null)))),t.createElement(l,{in:x},t.createElement(a,{spacing:2},t.createElement(n,{variant:"body2"},"Here you can report and correct for damages wrong items etc. Do not forget to click the button!"),t.createElement(p,{reports:C.data}),t.createElement(d,{content:"content",quantity:0,type:"registered",related:[{id:f.id,__type:"api::logistics.ipo-item"}],revalidateCallback:v}))),t.createElement(n,{variant:"body2"},"Recieved"),t.createElement(m,{currentValue:h,totalValue:q+N+k,minNewValue:0,maxNewValue:_,color:"info",handleChange:function(e){g(e,f.id,"recieved_quantity")}})))}export{s as default};
6
+ import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import t,{useState as r}from"react";import a from"@mui/material/Stack";import n from"@mui/material/Typography";import i from"@mui/material/IconButton";import o from"@mui/material/Divider";import l from"@mui/material/Collapse";import{AmountUpdater as m}from"../../common/AmountUpdater.js";import c from"@mui/icons-material/ArrowDropDown";import u from"../../common/ImagePreviewTooltip.js";import d from"../reportV2/ReportMakingComponent.js";import p from"../reportV2/ReportsDisplay.js";function s(s){var f=s.item,y=s.index,g=s.handleUpdateQuantity,E=s.image,v=s.revalidateCallback,b=f.line_item_number,V=f.product,w=f.arrived_quantity,_=f.registered_quantity,h=f.received_quantity,q=f.ordered_quantity,C=f.reports,N=void 0!==(null==C?void 0:C.data)&&C.data.length>0?C.data.filter((function(e){return"arrived"===e.type})).reduce((function(e,t){return e+t.quantity}),0):0,k=void 0!==(null==C?void 0:C.data)&&C.data.length>0?C.data.filter((function(e){return"registered"===e.type})).reduce((function(e,t){return e+t.quantity}),0):0,j=e(r(!1),2),x=j[0],D=j[1];return t.createElement(a,{spacing:1,key:y},f&&t.createElement(t.Fragment,null,t.createElement(a,{direction:"row",justifyContent:"space-between"},t.createElement(a,{spacing:1},t.createElement(n,{variant:"body1"},"Line Item Number: ",b),t.createElement(n,{variant:"body1"},"Part Number: ",V.product_number)),E&&t.createElement(t.Fragment,null,t.createElement(u,{image:E,label:f.product.title}))),t.createElement(n,{variant:"body2"},"Arrived"),t.createElement(m,{currentValue:w,totalValue:q+N,minNewValue:0+_+k,maxNewValue:q+N,color:"info",handleChange:function(e){g(e,f.id,"arrived_quantity")}}),t.createElement(n,{variant:"body2"},"Registered"),t.createElement(m,{currentValue:_,totalValue:q+N,minNewValue:0+h,maxNewValue:w+k,color:"info",handleChange:function(e){g(e,f.id,"registered_quantity")},offsetEnd:k}),t.createElement(o,{sx:{p:0}},t.createElement(a,{direction:"row",spacing:1,alignItems:"center"},t.createElement(n,{variant:"body2"},"Irregularities / Corrections"),t.createElement(i,{onClick:function(){return D(!x)}},t.createElement(c,null)))),t.createElement(l,{in:x},t.createElement(a,{spacing:2},t.createElement(n,{variant:"body2"},"Here you can report and correct for damages wrong items etc. Do not forget to click the button!"),t.createElement(p,{reports:C.data}),t.createElement(d,{content:"content",quantity:0,type:"registered",related:[{id:f.id,__type:"api::logistics.ipo-item"}],revalidateCallback:v}))),t.createElement(n,{variant:"body2"},"Recieved"),t.createElement(m,{currentValue:h,totalValue:q+N+k,minNewValue:0,maxNewValue:_,color:"info",handleChange:function(e){g(e,f.id,"received_quantity")}})))}export{s as default};
@@ -3,4 +3,4 @@
3
3
  * @copyright Jelle Paulus
4
4
  * @license MIT
5
5
  */
6
- import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import a,{useState as r}from"react";import{useFormState as n}from"react-dom";import{updateIpoAction as i}from"../../../data/actions/logistics/ipo/updateIpoAction.js";import{UploadBase64MediaForm as o}from"../../common/media/UploadBase64MediaForm.js";import l from"../../../data/loaders/common/media/downloadBase64File.js";import m from"./ItemUpdater.js";import c from"./ItemDisplay.js";import d from"../note/NotesDisplay.js";import s from"../note/NoteTakingComponent.js";import{StrapiErrors as p}from"../../StrapiErrors.js";import{SubmitButton as u}from"../../SubmitButton.js";import v from"@mui/material/Alert";import E from"@mui/material/Dialog";import f from"@mui/material/DialogActions";import g from"@mui/material/DialogContent";import y from"@mui/material/DialogTitle";import h from"@mui/material/Typography";import b from"@mui/material/Button";import C from"@mui/material/Grid";import x from"@mui/material/Box";import _ from"@mui/material/Paper";import w from"@mui/material/Stack";import D from"@mui/material/Divider";import k from"@mui/material/Card";import j from"@mui/material/CardContent";import{confirmationService as I}from"../../../data/services/logistics/ipo/confirmation-service.js";var F={zodErrors:null,strapiErrors:null,data:null,message:null};function N(e){var t=e.open,r=e.handleClose,n=e.orderID,i=e.currentStatus,o=e.revalidateCallback;return a.createElement(E,{open:t},a.createElement(y,null,"Confirm Order"),a.createElement(g,null,a.createElement(w,{spacing:2},a.createElement(h,null,"Are you sure you want to confirm this order?"),a.createElement(h,null,"Current status: ",i))),a.createElement(f,null,a.createElement(b,{variant:"contained",onClick:function(e){I("ipos",[n]),o&&o()}},"Confirm"),a.createElement(b,{variant:"contained",onClick:r},"Cancel")))}function A(E){var f,g,y,I,A,O,S,q=E.data,B=E.sx,R=E.revalidateCallback;E.handleClose;var U=E.role,P=e(n(i,F),2),T=P[0],M=P[1],H=e(r(q.items.data?q.items.data:[]),2),z=H[0],G=H[1],J=e(r(!1),2),L=J[0],Q=J[1],K=function(a,r,n){var i=t([],e(z),!1),o=i.findIndex((function(e){return e.id===r}));i[o][n]=a,G(i)},V=function(e,t){console.log(z),console.log(e,t),console.log("handleRemoveReportAtIndex")};return a.createElement(x,{sx:t([],e(Array.isArray(B)?B:[B]),!1)},a.createElement(C,{container:!0,spacing:2},a.createElement(C,{item:!0,xs:12},a.createElement(w,{spacing:2},a.createElement(w,{direction:"row",spacing:2,justifyContent:"space-between"},a.createElement(w,{spacing:2},a.createElement(h,{variant:"h3",component:"h1"},"Management Inbound Purchase Order"),a.createElement(h,{variant:"body1"},"Manage arrival, registration and recieval of purchase order")),a.createElement(s,{content:"",related:[{id:q.id,__type:"api::logistics.ipo"}],revalidateCallback:R})),a.createElement(D,null))),a.createElement(C,{item:!0,xs:12},a.createElement(h,{variant:"h4"},"Purchase Order Number ",q.ipo_number)),a.createElement(C,{item:!0,xs:6},a.createElement(w,{spacing:1},a.createElement(h,{variant:"h5"},"Details"),a.createElement(w,{direction:"row",spacing:2},a.createElement(h,{variant:"body1",width:"150px"},"Custom reference"),a.createElement(h,{variant:"body2"},q.custom_reference)),a.createElement(w,{direction:"row",spacing:2},a.createElement(h,{variant:"body1",width:"150px"},"Order Date"),a.createElement(h,{variant:"body2"},q.order_date)),a.createElement(w,{direction:"row",spacing:2},a.createElement(h,{variant:"body1",width:"150px"},"Supplier"),a.createElement(h,{variant:"body2"},null===(g=null===(f=q.vendor_profile)||void 0===f?void 0:f.business_credentials)||void 0===g?void 0:g.company_name)),a.createElement(w,{direction:"row",spacing:2},a.createElement(h,{variant:"body1",width:"150px"},"Order Status"),a.createElement(h,{variant:"body2",width:"150px"},q.status)),("placed"===q.status||"received_on_stock"===q.status)&&"enduser"===U&&a.createElement(a.Fragment,null,a.createElement(b,{variant:"contained",color:"primary",onClick:function(){return Q(!0)}},"Confirm order"),a.createElement(v,{severity:"warning"},"Please confirm the order as soon as possible, only upon confirmation this order will be available to the dispatcher"),a.createElement(N,{open:L,handleClose:function(){return Q(!1)},orderID:q.id,currentStatus:q.status,revalidateCallback:R})))),a.createElement(C,{item:!0,xs:12},a.createElement(w,{spacing:2},a.createElement(h,{variant:"h5"},"Documents"),a.createElement(k,{variant:"outlined"},a.createElement(j,null,a.createElement(w,{spacing:1},"enduser"===U&&a.createElement(a.Fragment,null,q.order_confirmation?a.createElement(a.Fragment,null,a.createElement(h,{variant:"h6"},"Order Confirmation"),a.createElement(h,null,null===(y=q.order_confirmation)||void 0===y?void 0:y.name),a.createElement(b,{variant:"contained",onClick:function(){l("api/ipos/".concat(q.id),"order_confirmation")}},"Download")):a.createElement(a.Fragment,null,a.createElement(h,{variant:"h5"},"Order Confirmation"),a.createElement(h,{variant:"body1"},"Here you can upload the the order confirmation for this order"),a.createElement(h,{variant:"body1"},"FileUpload"),a.createElement(D,null),a.createElement(o,{reference:"api::logistics.ipo",refID:q.id,field:"order_confirmation",multiple:!1,accept:"text/*,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",path:"api/ipos",componentName:"order_confirmation",componentReference:"common.base64-encoded-media",revalidateCallback:R}))),q.delivery_note?a.createElement(a.Fragment,null,a.createElement(h,{variant:"h6"},"Delivery Note"),a.createElement(h,null,null===(I=q.delivery_note)||void 0===I?void 0:I.name),a.createElement(b,{variant:"contained",onClick:function(){l("api/ipos/".concat(q.id),"delivery_note")}},"Download")):a.createElement(a.Fragment,null,a.createElement(h,{variant:"h5"},"Delivery Note"),a.createElement(h,{variant:"body1"},"Here you can upload the the delivery note for this order"),a.createElement(D,null),a.createElement(o,{reference:"api::logistics.ipo",refID:q.id,field:"delivery_note",multiple:!1,accept:"text/*,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",path:"api/ipos",componentName:"delivery_note",componentReference:"common.base64-encoded-media",revalidateCallback:R}))))))),(null===(O=null===(A=null==q?void 0:q.notes)||void 0===A?void 0:A.data)||void 0===O?void 0:O.length)>0&&a.createElement(C,{item:!0,xs:12},a.createElement(w,{spacing:2},a.createElement(h,{variant:"h5"},"Notes"),a.createElement(d,{notes:q.notes.data}),a.createElement(D,null))),a.createElement(C,{item:!0,xs:12},a.createElement(w,{spacing:1},a.createElement(h,{variant:"h5"},"Items"),"placed"===q.status&&a.createElement(v,{severity:"warning"},"Before confirmation you cannot update the items"),a.createElement(D,null),a.createElement("form",{action:M},a.createElement("input",{name:"id",type:"hidden",value:q.id}),(null===(S=null==q?void 0:q.items)||void 0===S?void 0:S.data)&&q.items.data.map((function(e,t){var r,n;return console.log("item",e),a.createElement(_,{sx:{p:2,mb:2},key:t},"placed"===q.status?a.createElement(c,{item:e,index:t,image:null===(r=null==e?void 0:e.product)||void 0===r?void 0:r.image}):a.createElement(m,{item:e,index:t,handleUpdateQuantity:K,image:null===(n=null==e?void 0:e.product)||void 0===n?void 0:n.image,handleRemoveReportAtIndex:V,revalidateCallback:R}))})),a.createElement(_,{sx:{p:2}},a.createElement(w,{direction:"row",spacing:2,justifyContent:"end"},a.createElement(u,{text:"Update items",loadingText:"Loading..."}),a.createElement(p,{error:null==T?void 0:T.strapiErrors}),(null==T?void 0:T.message)&&a.createElement(v,{severity:"error"},null==T?void 0:T.message))),a.createElement("input",{type:"hidden",name:"items",value:JSON.stringify(function(e){return e.map((function(e){return{id:e.id,arrived_quantity:e.arrived_quantity,registered_quantity:e.registered_quantity,recieved_quantity:e.recieved_quantity}}))}(z))}))))))}export{A as default};
6
+ import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import a,{useState as r}from"react";import{useFormState as n}from"react-dom";import{updateIpoAction as i}from"../../../data/actions/logistics/ipo/updateIpoAction.js";import{UploadBase64MediaForm as o}from"../../common/media/UploadBase64MediaForm.js";import l from"../../../data/loaders/common/media/downloadBase64File.js";import m from"./ItemUpdater.js";import c from"./ItemDisplay.js";import d from"../note/NotesDisplay.js";import s from"../note/NoteTakingComponent.js";import{StrapiErrors as p}from"../../StrapiErrors.js";import{SubmitButton as u}from"../../SubmitButton.js";import v from"@mui/material/Alert";import E from"@mui/material/Dialog";import f from"@mui/material/DialogActions";import g from"@mui/material/DialogContent";import y from"@mui/material/DialogTitle";import h from"@mui/material/Typography";import b from"@mui/material/Button";import C from"@mui/material/Grid";import x from"@mui/material/Box";import _ from"@mui/material/Paper";import w from"@mui/material/Stack";import D from"@mui/material/Divider";import k from"@mui/material/Card";import j from"@mui/material/CardContent";import{confirmationService as I}from"../../../data/services/logistics/ipo/confirmation-service.js";var F={zodErrors:null,strapiErrors:null,data:null,message:null};function N(e){var t=e.open,r=e.handleClose,n=e.orderID,i=e.currentStatus,o=e.revalidateCallback;return a.createElement(E,{open:t},a.createElement(y,null,"Confirm Order"),a.createElement(g,null,a.createElement(w,{spacing:2},a.createElement(h,null,"Are you sure you want to confirm this order?"),a.createElement(h,null,"Current status: ",i))),a.createElement(f,null,a.createElement(b,{variant:"contained",onClick:function(e){I("ipos",[n]),o&&o()}},"Confirm"),a.createElement(b,{variant:"contained",onClick:r},"Cancel")))}function A(E){var f,g,y,I,A,O,S,q=E.data,B=E.sx,R=E.revalidateCallback;E.handleClose;var U=E.role,P=e(n(i,F),2),T=P[0],M=P[1],H=e(r(q.items.data?q.items.data:[]),2),z=H[0],G=H[1],J=e(r(!1),2),L=J[0],Q=J[1],K=function(a,r,n){var i=t([],e(z),!1),o=i.findIndex((function(e){return e.id===r}));i[o][n]=a,G(i)},V=function(e,t){console.log(z),console.log(e,t),console.log("handleRemoveReportAtIndex")};return a.createElement(x,{sx:t([],e(Array.isArray(B)?B:[B]),!1)},a.createElement(C,{container:!0,spacing:2},a.createElement(C,{item:!0,xs:12},a.createElement(w,{spacing:2},a.createElement(w,{direction:"row",spacing:2,justifyContent:"space-between"},a.createElement(w,{spacing:2},a.createElement(h,{variant:"h3",component:"h1"},"Management Inbound Purchase Order"),a.createElement(h,{variant:"body1"},"Manage arrival, registration and recieval of purchase order")),a.createElement(s,{content:"",related:[{id:q.id,__type:"api::logistics.ipo"}],revalidateCallback:R})),a.createElement(D,null))),a.createElement(C,{item:!0,xs:12},a.createElement(h,{variant:"h4"},"Purchase Order Number ",q.ipo_number)),a.createElement(C,{item:!0,xs:6},a.createElement(w,{spacing:1},a.createElement(h,{variant:"h5"},"Details"),a.createElement(w,{direction:"row",spacing:2},a.createElement(h,{variant:"body1",width:"150px"},"Custom reference"),a.createElement(h,{variant:"body2"},q.custom_reference)),a.createElement(w,{direction:"row",spacing:2},a.createElement(h,{variant:"body1",width:"150px"},"Order Date"),a.createElement(h,{variant:"body2"},q.order_date)),a.createElement(w,{direction:"row",spacing:2},a.createElement(h,{variant:"body1",width:"150px"},"Supplier"),a.createElement(h,{variant:"body2"},null===(g=null===(f=q.vendor_profile)||void 0===f?void 0:f.business_credentials)||void 0===g?void 0:g.company_name)),a.createElement(w,{direction:"row",spacing:2},a.createElement(h,{variant:"body1",width:"150px"},"Order Status"),a.createElement(h,{variant:"body2",width:"150px"},q.status)),("placed"===q.status||"received_on_stock"===q.status)&&"enduser"===U&&a.createElement(a.Fragment,null,a.createElement(b,{variant:"contained",color:"primary",onClick:function(){return Q(!0)}},"Confirm order"),a.createElement(v,{severity:"warning"},"Please confirm the order as soon as possible, only upon confirmation this order will be available to the dispatcher"),a.createElement(N,{open:L,handleClose:function(){return Q(!1)},orderID:q.id,currentStatus:q.status,revalidateCallback:R})))),a.createElement(C,{item:!0,xs:12},a.createElement(w,{spacing:2},a.createElement(h,{variant:"h5"},"Documents"),a.createElement(k,{variant:"outlined"},a.createElement(j,null,a.createElement(w,{spacing:1},"enduser"===U&&a.createElement(a.Fragment,null,q.order_confirmation?a.createElement(a.Fragment,null,a.createElement(h,{variant:"h6"},"Order Confirmation"),a.createElement(h,null,null===(y=q.order_confirmation)||void 0===y?void 0:y.name),a.createElement(b,{variant:"contained",onClick:function(){l("api/ipos/".concat(q.id),"order_confirmation")}},"Download")):a.createElement(a.Fragment,null,a.createElement(h,{variant:"h5"},"Order Confirmation"),a.createElement(h,{variant:"body1"},"Here you can upload the the order confirmation for this order"),a.createElement(h,{variant:"body1"},"FileUpload"),a.createElement(D,null),a.createElement(o,{reference:"api::logistics.ipo",refID:q.id,field:"order_confirmation",multiple:!1,accept:"text/*,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",path:"api/ipos",componentName:"order_confirmation",componentReference:"common.base64-encoded-media",revalidateCallback:R}))),q.delivery_note?a.createElement(a.Fragment,null,a.createElement(h,{variant:"h6"},"Delivery Note"),a.createElement(h,null,null===(I=q.delivery_note)||void 0===I?void 0:I.name),a.createElement(b,{variant:"contained",onClick:function(){l("api/ipos/".concat(q.id),"delivery_note")}},"Download")):a.createElement(a.Fragment,null,a.createElement(h,{variant:"h5"},"Delivery Note"),a.createElement(h,{variant:"body1"},"Here you can upload the the delivery note for this order"),a.createElement(D,null),a.createElement(o,{reference:"api::logistics.ipo",refID:q.id,field:"delivery_note",multiple:!1,accept:"text/*,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",path:"api/ipos",componentName:"delivery_note",componentReference:"common.base64-encoded-media",revalidateCallback:R}))))))),(null===(O=null===(A=null==q?void 0:q.notes)||void 0===A?void 0:A.data)||void 0===O?void 0:O.length)>0&&a.createElement(C,{item:!0,xs:12},a.createElement(w,{spacing:2},a.createElement(h,{variant:"h5"},"Notes"),a.createElement(d,{notes:q.notes.data}),a.createElement(D,null))),a.createElement(C,{item:!0,xs:12},a.createElement(w,{spacing:1},a.createElement(h,{variant:"h5"},"Items"),"placed"===q.status&&a.createElement(v,{severity:"warning"},"Before confirmation you cannot update the items"),a.createElement(D,null),a.createElement("form",{action:M},a.createElement("input",{name:"id",type:"hidden",value:q.id}),(null===(S=null==q?void 0:q.items)||void 0===S?void 0:S.data)&&q.items.data.map((function(e,t){var r,n;return console.log("item",e),a.createElement(_,{sx:{p:2,mb:2},key:t},"placed"===q.status?a.createElement(c,{item:e,index:t,image:null===(r=null==e?void 0:e.product)||void 0===r?void 0:r.image}):a.createElement(m,{item:e,index:t,handleUpdateQuantity:K,image:null===(n=null==e?void 0:e.product)||void 0===n?void 0:n.image,handleRemoveReportAtIndex:V,revalidateCallback:R}))})),a.createElement(_,{sx:{p:2}},a.createElement(w,{direction:"row",spacing:2,justifyContent:"end"},a.createElement(u,{text:"Update items",loadingText:"Loading..."}),a.createElement(p,{error:null==T?void 0:T.strapiErrors}),(null==T?void 0:T.message)&&a.createElement(v,{severity:"error"},null==T?void 0:T.message))),a.createElement("input",{type:"hidden",name:"items",value:JSON.stringify(function(e){return e.map((function(e){return{id:e.id,arrived_quantity:e.arrived_quantity,registered_quantity:e.registered_quantity,received_quantity:e.received_quantity}}))}(z))}))))))}export{A 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 m from"@mui/material/Chip";import a from"@mui/material/Grid";import n from"../../common/markdown/MarkdownDisplay.js";import{IconButton as i,Divider as l}from"@mui/material";import o from"@mui/icons-material/Delete";var c=function(c){var u=c.reports;return e.createElement(r,{spacing:2},u&&u.length>0&&u.map((function(r,c){var u;return e.createElement(a,{container:!0,key:c},e.createElement(a,{item:!0,xs:2},e.createElement(m,{label:"".concat(r.quantity>0?"+":""," ").concat(r.quantity),color:r.quantity>0?"success":"error"})),e.createElement(a,{item:!0,xs:7},e.createElement(n,null,r.content)),e.createElement(a,{item:!0,xs:1},e.createElement(t,null," ",r.date)),e.createElement(a,{item:!0,xs:1},e.createElement(t,{align:"right"},null===(u=r.author)||void 0===u?void 0:u.username)),e.createElement(a,{item:!0,xs:1},e.createElement(i,{onClick:function(){console.log("delete report")}},e.createElement(o,null))),e.createElement(a,{item:!0,xs:12},e.createElement(l,null)))})))};export{c 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:2},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:2},e.createElement(a,{label:"".concat(r.quantity>0?"+":""," ").concat(r.quantity),color:r.quantity>0?"success":"error"})),e.createElement(m,{item:!0,xs:7},e.createElement(n,null,r.content)),e.createElement(m,{item:!0,xs:1},e.createElement(t,null," ",r.date)),e.createElement(m,{item:!0,xs:2},e.createElement(t,{align:"right"},null===(l=r.author)||void 0===l?void 0:l.username)),e.createElement(m,{item:!0,xs:12},e.createElement(i,null)))})))};export{o as default};
@@ -4,4 +4,4 @@
4
4
  * @copyright Jelle Paulus
5
5
  * @license MIT
6
6
  */
7
- import{__awaiter as e,__generator as r}from"../../../../node_modules/tslib/tslib.es6.js";import o from"../../../../node_modules/qs/lib/index.js";import{fetchData as t}from"../loaders.js";import{getStrapiURL as i}from"../../../lib/utils.js";import{unstable_noStore as s}from"next/cache";var p=i();function a(i){return e(this,void 0,void 0,(function(){var e;return r(this,(function(r){switch(r.label){case 0:return s(),(e=new URL("/api/ipos/".concat(i),p)).search=o.stringify({populate:{vendor_profile:{populate:{business_credentials:!0}},items:{populate:{product:{populate:{image:!0}},ordered_bad_reports:!0,arrived_bad_reports:!0,registered_bad_reports:!0,recieved_bad_reports:!0,reports:{populate:{author:!0}}}},order_confirmation:!0,delivery_note:!0,notes:{populate:{author:{populate:!0}}}}}),console.log(e.href),[4,t(e.href)];case 1:return[2,r.sent()]}}))}))}export{a as getSingleIpo};
7
+ import{__awaiter as e,__generator as r}from"../../../../node_modules/tslib/tslib.es6.js";import o from"../../../../node_modules/qs/lib/index.js";import{fetchData as t}from"../loaders.js";import{getStrapiURL as i}from"../../../lib/utils.js";import{unstable_noStore as s}from"next/cache";var p=i();function a(i){return e(this,void 0,void 0,(function(){var e;return r(this,(function(r){switch(r.label){case 0:return s(),(e=new URL("/api/ipos/".concat(i),p)).search=o.stringify({populate:{vendor_profile:{populate:{business_credentials:!0}},items:{populate:{product:{populate:{image:!0}},ordered_bad_reports:!0,arrived_bad_reports:!0,registered_bad_reports:!0,received_bad_reports:!0,reports:{populate:{author:!0}}}},order_confirmation:!0,delivery_note:!0,notes:{populate:{author:{populate:!0}}}}}),console.log(e.href),[4,t(e.href)];case 1:return[2,r.sent()]}}))}))}export{a as getSingleIpo};