umwd-components 0.1.625 → 0.1.627
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.
- package/dist/node_modules/base64-js/index.js +1 -1
- package/dist/node_modules/ieee754/index.js +1 -1
- package/dist/src/components/e-commerce/iro/ManageIROForm.js +1 -1
- package/dist/src/components/e-commerce/iro/TextualManageIROForm.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/types/e-commerce/iro/types.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/e-commerce/iro/ManageIROForm.tsx +1 -1
- package/src/components/e-commerce/iro/TextualManageIROForm.tsx +1 -1
- package/src/types/e-commerce/iro/types.ts +1 -1
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__exports as r}from"../../_virtual/
|
|
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/
|
|
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};
|
|
@@ -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 r,{useState as a}from"react";import{useFormState as i}from"react-dom";import{updateIpoAction as n}from"../../../data/actions/logistics/ipo/updateIpoAction.js";import m from"../../logistics/note/NotesDisplay.js";import o from"../../logistics/note/NoteTakingComponent.js";import{StrapiErrors as l}from"../../StrapiErrors.js";import{SubmitButton as c}from"../../SubmitButton.js";import s from"@mui/material/Alert";import"@mui/material/Dialog";import"@mui/material/DialogActions";import"@mui/material/DialogContent";import"@mui/material/DialogTitle";import d from"@mui/material/Typography";import"@mui/material/Button";import p from"@mui/material/Grid";import u from"@mui/material/Box";import E from"@mui/material/Paper";import g from"@mui/material/Stack";import v from"@mui/material/Divider";import"next/headers";var y={zodErrors:null,strapiErrors:null,data:null,message:null};function f(f){var h,x,b,w=f.data,_=f.sx,D=f.revalidateCallback;f.handleClose;var j=f.role,C=e(i(n,y),2),q=C[0],S=C[1],k=e(a(w.items.data?w.items.data:[]),2),A=k[0];k[1];var N=e(a(!1),2);N[0],N[1];return r.createElement(u,{sx:t([],e(Array.isArray(_)?_:[_]),!1)},r.createElement(p,{container:!0,spacing:2},r.createElement(p,{item:!0,xs:12},r.createElement(g,{spacing:2},r.createElement(g,{direction:"row",spacing:2,justifyContent:"space-between"},r.createElement(g,{spacing:2},r.createElement(d,{variant:"h3",component:"h1"},"Management Inbound Purchase Order"),r.createElement(d,{variant:"body1"},"Manage arrival, registration and recieval of purchase order")),r.createElement(o,{content:"",related:[{id:w.id,__type:"api::logistics.ipo"}],revalidateCallback:D})),r.createElement(v,null))),r.createElement(p,{item:!0,xs:6},r.createElement(g,{spacing:1},r.createElement(d,{variant:"h5"},"Details"),r.createElement(g,{direction:"row",spacing:2},r.createElement(d,{variant:"body1",width:"250px"},"Purchase Order Number"),r.createElement(d,{variant:"body2"},w.
|
|
6
|
+
import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useState as a}from"react";import{useFormState as i}from"react-dom";import{updateIpoAction as n}from"../../../data/actions/logistics/ipo/updateIpoAction.js";import m from"../../logistics/note/NotesDisplay.js";import o from"../../logistics/note/NoteTakingComponent.js";import{StrapiErrors as l}from"../../StrapiErrors.js";import{SubmitButton as c}from"../../SubmitButton.js";import s from"@mui/material/Alert";import"@mui/material/Dialog";import"@mui/material/DialogActions";import"@mui/material/DialogContent";import"@mui/material/DialogTitle";import d from"@mui/material/Typography";import"@mui/material/Button";import p from"@mui/material/Grid";import u from"@mui/material/Box";import E from"@mui/material/Paper";import g from"@mui/material/Stack";import v from"@mui/material/Divider";import"next/headers";var y={zodErrors:null,strapiErrors:null,data:null,message:null};function f(f){var h,x,b,w=f.data,_=f.sx,D=f.revalidateCallback;f.handleClose;var j=f.role,C=e(i(n,y),2),q=C[0],S=C[1],k=e(a(w.items.data?w.items.data:[]),2),A=k[0];k[1];var N=e(a(!1),2);N[0],N[1];return r.createElement(u,{sx:t([],e(Array.isArray(_)?_:[_]),!1)},r.createElement(p,{container:!0,spacing:2},r.createElement(p,{item:!0,xs:12},r.createElement(g,{spacing:2},r.createElement(g,{direction:"row",spacing:2,justifyContent:"space-between"},r.createElement(g,{spacing:2},r.createElement(d,{variant:"h3",component:"h1"},"Management Inbound Purchase Order"),r.createElement(d,{variant:"body1"},"Manage arrival, registration and recieval of purchase order")),r.createElement(o,{content:"",related:[{id:w.id,__type:"api::logistics.ipo"}],revalidateCallback:D})),r.createElement(v,null))),r.createElement(p,{item:!0,xs:6},r.createElement(g,{spacing:1},r.createElement(d,{variant:"h5"},"Details"),r.createElement(g,{direction:"row",spacing:2},r.createElement(d,{variant:"body1",width:"250px"},"Purchase Order Number"),r.createElement(d,{variant:"body2"},w.return_number)),r.createElement(g,{direction:"row",spacing:2},r.createElement(d,{variant:"body1",width:"250px"},"Custom reference")),r.createElement(g,{direction:"row",spacing:2},r.createElement(d,{variant:"body1",width:"250px"},"Order Date"),r.createElement(d,{variant:"body2"},w.return_date)),r.createElement(g,{direction:"row",spacing:2},r.createElement(d,{variant:"body1",width:"250px"},"Supplier")),r.createElement(g,{direction:"row",spacing:2},r.createElement(d,{variant:"body1",width:"250px"},"Order Status"),r.createElement(d,{variant:"body2",width:"250px"},w.status)))),r.createElement(p,{item:!0,xs:12},r.createElement(g,{spacing:2},r.createElement(d,{variant:"h5"},"Documents"),r.createElement(E,{sx:{p:2}},r.createElement(g,{spacing:1},"enduser"===j&&r.createElement(r.Fragment,null))))),(null===(x=null===(h=null==w?void 0:w.notes)||void 0===h?void 0:h.data)||void 0===x?void 0:x.length)>0&&r.createElement(p,{item:!0,xs:12},r.createElement(g,{spacing:2},r.createElement(d,{variant:"h5"},"Notes"),r.createElement(m,{notes:w.notes.data}),r.createElement(v,null))),r.createElement(p,{item:!0,xs:12},r.createElement(g,{spacing:1},r.createElement(d,{variant:"h5"},"Items"),r.createElement(v,null),r.createElement("form",{action:S},r.createElement("input",{name:"id",type:"hidden",value:w.id}),(null===(b=null==w?void 0:w.items)||void 0===b?void 0:b.data)&&w.items.data.map((function(e,t){return console.log("item",e),r.createElement(E,{sx:{p:2,mb:2},key:t})})),r.createElement(E,{sx:{p:2}},r.createElement(g,{direction:"row",spacing:2,justifyContent:"end"},r.createElement(c,{text:"Update items",loadingText:"Loading..."}),r.createElement(l,{error:null==q?void 0:q.strapiErrors}),(null==q?void 0:q.message)&&r.createElement(s,{severity:"error"},null==q?void 0:q.message))),r.createElement("input",{type:"hidden",name:"items",value:JSON.stringify(function(e){return e.map((function(e){return{id:e.id,received_quantity:e.received_quantity,registered_quantity:e.registered_quantity,released_quantity:e.released_quantity}}))}(A))}))))))}export{f 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,__assign as r}from"../../../../node_modules/tslib/tslib.es6.js";import a,{useState as
|
|
6
|
+
import{__read as e,__spreadArray as t,__assign as r}from"../../../../node_modules/tslib/tslib.es6.js";import a,{useState as n,useEffect as i}from"react";import{useFormState as o}from"react-dom";import{updateIroAction as m}from"../../../data/actions/e-commerce/iro/updateIroAction.js";import l from"./TextualIROItemUpdater.js";import d from"./IroItemDisplay.js";import c from"../../logistics/note/NotesDisplay.js";import s from"../../logistics/note/NoteTakingComponent.js";import{StrapiErrors as u}from"../../StrapiErrors.js";import{SubmitButton as p}from"../../SubmitButton.js";import v from"@mui/material/Alert";import"@mui/material/Dialog";import"@mui/material/DialogActions";import"@mui/material/DialogContent";import"@mui/material/DialogTitle";import E from"@mui/material/Typography";import"@mui/material/Button";import f from"@mui/material/Grid";import g from"@mui/material/Box";import y from"@mui/material/Paper";import h from"@mui/material/Stack";import x from"@mui/material/Divider";import"next/headers";import{FormControlLabel as b,Checkbox as w}from"@mui/material";var I={zodErrors:null,strapiErrors:null,data:null,message:null};function C(C){var j,D,k=C.data,A=C.sx,S=C.revalidateCallback;C.handleClose,C.role;var _=e(o(m,I),2),q=_[0],O=_[1],N=e(n(k.items.data?k.items.data:[]),2),T=N[0],U=N[1],B=e(n(!1),2);B[0],B[1];var R=e(n(["received","registered","released","reports"]),2),P=R[0],M=R[1],z=function(r,a,n){var i=t([],e(T),!1),o=i.findIndex((function(e){return e.id===a}));i[o][n]=r,U(i)},G=function(a,n){var i,o,m,l=t([],e(T),!1),d=l.findIndex((function(e){return e.id===n})),c=(null===(o=null===(i=l[d])||void 0===i?void 0:i.reports)||void 0===o?void 0:o.data)||[],s=t(t([],e(c),!1),[a],!1);null==(null===(m=l[d])||void 0===m?void 0:m.reports)&&(l[d]=r(r({},l[d]),{reports:{data:[]}})),l[d].reports.data=s,U(l)},J=function(r,a){var n,i,o=t([],e(T),!1),m=o.findIndex((function(e){return e.id===r})),l=(null===(i=null===(n=o[m])||void 0===n?void 0:n.reports)||void 0===i?void 0:i.data)||[],d=l.filter((function(e){return"id"in e})),c=l.filter((function(e){return!("id"in e)}));c.splice(a,1);var s=t(t([],e(d),!1),e(c),!1);o[m].reports.data=s,U(o)};return i((function(){"Iro Updated"===(null==q?void 0:q.message)&&S&&S()}),[q]),i((function(){var e;(null===(e=k.items)||void 0===e?void 0:e.data)&&U(k.items.data?k.items.data:[])}),[k]),a.createElement(g,{sx:t([],e(Array.isArray(A)?A:[A]),!1)},a.createElement(f,{container:!0,spacing:2},a.createElement(f,{item:!0,xs:12},a.createElement(h,{spacing:2},a.createElement(h,{direction:"row",spacing:2,justifyContent:"space-between"},a.createElement(h,{spacing:2},a.createElement(E,{variant:"h3",component:"h1"},"Management Inbound Purchase Order"),a.createElement(E,{variant:"body1"},"Manage arrival, registration and recieval of purchase order")),a.createElement(s,{content:"",related:[{id:k.id,__type:"api::e-commerce.iro"}],revalidateCallback:S})),a.createElement(x,null))),a.createElement(f,{item:!0,xs:6},a.createElement(h,{spacing:1},a.createElement(E,{variant:"h5"},"Details"),a.createElement(h,{direction:"row",spacing:2},a.createElement(E,{variant:"body1",width:"250px"},"Purchase Order Number"),a.createElement(E,{variant:"body2"},k.return_number)),a.createElement(h,{direction:"row",spacing:2},a.createElement(E,{variant:"body1",width:"250px"},"Custom reference")),a.createElement(h,{direction:"row",spacing:2},a.createElement(E,{variant:"body1",width:"250px"},"Order Date"),a.createElement(E,{variant:"body2"},k.return_date)),a.createElement(h,{direction:"row",spacing:2},a.createElement(E,{variant:"body1",width:"250px"},"Supplier")),a.createElement(h,{direction:"row",spacing:2},a.createElement(E,{variant:"body1",width:"250px"},"Order Status"),a.createElement(E,{variant:"body2",width:"250px"},k.status)))),a.createElement(f,{item:!0,xs:12},a.createElement(h,{spacing:2},a.createElement(E,{variant:"h5"},"Documents"),a.createElement(y,{sx:{p:2}},a.createElement(h,{spacing:1})))),(null===(D=null===(j=null==k?void 0:k.notes)||void 0===j?void 0:j.data)||void 0===D?void 0:D.length)>0&&a.createElement(f,{item:!0,xs:12},a.createElement(h,{spacing:2},a.createElement(E,{variant:"h5"},"Notes"),a.createElement(c,{notes:k.notes.data}),a.createElement(x,null))),a.createElement(f,{item:!0,xs:12},a.createElement(h,{spacing:1},a.createElement(E,{variant:"h5"},"Items"),a.createElement(h,{direction:"row",alignItems:"center",justifyContent:"flex-end",spacing:2,component:y,p:1},a.createElement(E,{variant:"body1"},"Show:"),["received","registered","released","reports"].map((function(r){return a.createElement(b,{key:r,control:a.createElement(w,{checked:P.includes(r),onChange:function(a){a.target.checked?M(t(t([],e(P),!1),[r],!1)):M(P.filter((function(e){return e!==r})))}}),label:r.charAt(0).toUpperCase()+r.slice(1)})}))),"requested"===k.status&&a.createElement(v,{severity:"warning"},"Before confirmation you cannot update the items"),a.createElement(x,null),a.createElement("form",{action:O},a.createElement("input",{name:"id",type:"hidden",value:k.id}),T&&T.map((function(e,t){var r,n;return a.createElement(y,{sx:{p:2,mb:2},key:t},"requested"===k.status?a.createElement(d,{item:e,index:t,image:null===(r=null==e?void 0:e.product)||void 0===r?void 0:r.image}):a.createElement(l,{item:e,index:t,handleUpdateQuantity:z,handleAddReport:G,image:null===(n=null==e?void 0:e.product)||void 0===n?void 0:n.image,handleRemoveReportAtIndex:J,revalidateCallback:S,showing:P}))})),a.createElement(y,{sx:{p:2}},a.createElement(h,{direction:"row",spacing:2,justifyContent:"end"},a.createElement(p,{text:"Update items",loadingText:"Loading..."}),a.createElement(u,{error:null==q?void 0:q.strapiErrors}),(null==q?void 0:q.message)&&a.createElement(v,{severity:"error"},null==q?void 0:q.message))),a.createElement("input",{type:"hidden",name:"items",value:JSON.stringify(function(e){return e.map((function(e){var t,r;return{id:e.id,returned_quantity:e.returned_quantity,reports:(null===(r=null===(t=e.reports)||void 0===t?void 0:t.data)||void 0===r?void 0:r.map((function(e){return{id:"id"in e?e.id:void 0,quantity:e.quantity,content:e.content,type:e.type}})))||[]}}))}(T))}))))))}export{C as default};
|