umwd-components 0.1.340 → 0.1.342
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/src/components/FluidBackground.js +1 -1
- package/dist/src/components/common/AmountUpdater.js +1 -1
- package/dist/src/components/common/Contacts.js +1 -1
- package/dist/src/components/common/ImagePreviewTooltip.js +1 -1
- package/dist/src/components/common/WeekPicker.js +1 -1
- package/dist/src/components/e-commerce/products/SingleProduct.js +1 -1
- package/dist/src/components/logistics/ipo/ItemUpdater.js +1 -1
- package/dist/src/components/logistics/note/NoteTakingComponent.js +1 -1
- package/dist/src/components/logistics/note/NotesDisplay.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/common/ImagePreviewTooltip.d.ts +0 -3
- package/package.json +1 -1
- package/src/components/FluidBackground.tsx +77 -62
- package/src/components/common/AmountUpdater.tsx +6 -3
- package/src/components/common/Contacts.tsx +2 -1
- package/src/components/common/ImagePreviewTooltip.tsx +3 -3
- package/src/components/common/WeekPicker.tsx +3 -2
- package/src/components/common/media/MediaGrid.tsx +0 -1
- package/src/components/e-commerce/invoice/InvoicePDF.tsx +0 -7
- package/src/components/e-commerce/products/SingleProduct.tsx +38 -34
- package/src/components/logistics/ipo/ItemUpdater.tsx +6 -8
- package/src/components/logistics/note/NoteTakingComponent.tsx +11 -13
- package/src/components/logistics/note/NotesDisplay.tsx +4 -1
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e}from"../../node_modules/tslib/tslib.es6.js";import t,{useState as n,useEffect as
|
|
7
|
+
import{__read as e}from"../../node_modules/tslib/tslib.es6.js";import t,{useState as n,useEffect as a,useRef as r}from"react";import{useTheme as E}from"@mui/material/styles";function i(i){var l=i.ObjectSize,o=void 0===l?300:l,s=e(n({x:0,y:0}),2),c=s[0],m=s[1],d=r(null),p=E(),A=function(e){var t=e.clientX,n=e.clientY;m({x:t,y:n})},I=function(){d.current&&(d.current.style.position="absolute",d.current.style.top="".concat(c.y,"px"),d.current.style.left="".concat(c.x,"px")),requestAnimationFrame(I)};return a((function(){return window.addEventListener("mousemove",A),requestAnimationFrame(I),function(){window.removeEventListener("mousemove",A)}}),[c]),t.createElement("svg",{id:"object",ref:d,width:"".concat(o,"px"),height:"".concat(o,"px"),style:{position:"absolute",transform:"translate(-50%, -50%)"}},t.createElement("defs",null,t.createElement("mask",{id:"radial-gradient-mask"},t.createElement("radialGradient",{id:"gradient",cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},t.createElement("stop",{offset:"0%",stopColor:"white"}),t.createElement("stop",{offset:"100%",stopColor:"black"})),t.createElement("rect",{width:"100%",height:"100%",fill:"url(#gradient)"}))),t.createElement("rect",{width:"100%",height:"100%",fill:p.palette.primary.main,mask:"url(#radial-gradient-mask)",style:{filter:"opacity(.5)"}}))}function l(){var r=e(n(300),2),l=r[0],o=r[1],s=E();return a((function(){o(Math.sqrt(Math.pow(window.innerWidth,2)+Math.pow(window.innerHeight,2))/1.3)}),[]),t.createElement("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:-1,pointerEvents:"none",isolation:"isolate"}},t.createElement("div",{id:"background",style:{position:"absolute",top:0,left:0,display:"Block",width:"100%",height:"100%",background:s.palette.background.paper,zIndex:-1}}),t.createElement(i,{ObjectSize:l}),t.createElement("svg",{id:"foreground",style:{position:"absolute"},preserveAspectRatio:"xMidYMid slice",width:"100%",height:"100%",viewBox:"0 0 7680 4320 "},t.createElement("defs",null,t.createElement("mask",{id:"mask"},t.createElement("rect",{width:"100%",height:"100%",fill:"white"}),t.createElement("text",{transform:"translate(-1000 200) rotate(-15)",style:{fill:"#000",fontFamily:"Merriweather-Bold, Merriweather",fontSize:"360px",fontWeight:700,letterSpacing:".055em"}},t.createElement("tspan",{x:"0",y:"0"},"JELLE PAULUS IS A TALENTED WEB DEVELOPER AND"," "),t.createElement("tspan",{x:"0",y:"432"},"DESIGNER WITH A PASSION FOR CREATING VISUALLY"," "),t.createElement("tspan",{x:"0",y:"864"},"STUNNING AND USER-FRIENDLY WEBSITES. WITH A"," "),t.createElement("tspan",{x:"0",y:"1296"},"KEEN EYE FOR DETAIL AND A FOCUS ON CREATING"," "),t.createElement("tspan",{x:"0",y:"1728"},"CLEAN, FUNCTIONAL DESIGNS, JELLE HAS A"," "),t.createElement("tspan",{x:"0",y:"2160"},"REPUTATION FOR DELIVERING HIGH-QUALITY WORK"," "),t.createElement("tspan",{x:"0",y:"2592"},"THAT EXCEEDS HIS CLIENTS' EXPECTATIONS. HE HAS A"," "),t.createElement("tspan",{x:"0",y:"3024"},"DEEP UNDERSTANDING OF THE LATEST WEB"," "),t.createElement("tspan",{x:"0",y:"3456"},"DEVELOPMENT TECHNOLOGIES, AND IS ABLE TO"," "),t.createElement("tspan",{x:"0",y:"3888"},"SEAMLESSLY INTEGRATE FUNCTIONALITY AND"," "),t.createElement("tspan",{x:"0",y:"4320"},"AESTHETICS TO CREATE WEBSITES THAT ARE BOTH"," "),t.createElement("tspan",{x:"0",y:"4752"},"FUNCTIONAL AND VISUALLY APPEALING. WHETHER"," "),t.createElement("tspan",{x:"0",y:"5184"},"YOU'RE LOOKING TO ESTABLISH AN ONLINE PRESENCE"," "),t.createElement("tspan",{x:"0",y:"5616"},"OR REVAMP AN EXISTING WEBSITE, JELLE HAS THE"," "),t.createElement("tspan",{x:"0",y:"6048"},"SKILLS AND EXPERTISE TO BRING YOUR VISION TO LIFE.")))),t.createElement("rect",{width:"100%",height:"100%",fill:s.palette.background.default,mask:"url(#mask)"})))}export{l as default};
|
|
@@ -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 n,useEffect as a}from"react";import
|
|
6
|
+
import{__read as e}from"../../../node_modules/tslib/tslib.es6.js";import t,{useState as n,useEffect as a}from"react";import l from"@mui/material/Box";import r from"@mui/material/IconButton";import i from"@mui/material/Typography";import c from"@mui/material/Stack";import o from"@mui/material/Badge";import m from"@mui/icons-material/RemoveCircle";import d from"@mui/icons-material/AddCircle";import{useTheme as u,styled as p}from"@mui/material/styles";function g(g){var s=g.currentValue,f=g.totalValue,E=g.minNewValue,b=g.maxNewValue,x=g.color,C=g.handleChange,h=g.offsetEnd,k=100/f*s,z=e(n(s),2),v=z[0],y=z[1],R=100/f*v,B=h?100/f*h*-1:0,w=u(),O=function(e){v+e<=b&&(y(v+e),C(v+e))},V=function(e){v-e>=E&&(y(v-e),C(v-e))};a((function(){y(s)}),[s]);var M=p(o)((function(e){return e.theme,{"& .MuiBadge-badge":{backgroundColor:"#fff",fontWeight:"bold",color:"black",mixBlendMode:"lighten",margin:"-1px 0px",padding:"0px 4px"}}})),j=p(r)((function(e){var t=e.theme;return{"&:hover":{color:t.palette.primary.main,"& .MuiBadge-badge":{backgroundColor:t.palette.primary.main}}}}));return console.log(s,f,E,b,v),t.createElement(l,{sx:[{display:"flex",alignItems:"center",background:"\n linear-gradient(90deg, ".concat(w.palette[x].main,"55 ").concat(k,"%, ").concat(w.palette[x].main,"33 ").concat(k,"%),\n linear-gradient(90deg, ").concat(w.palette[x].main,"55 ").concat(R,"%, ").concat(w.palette[x].main,"33 ").concat(R,"%)\n "),width:"100%",borderRadius:"16px",padding:"2px",justifyContent:"space-between"},v-f==1&&{paddingRight:"4px",background:"linear-gradient(-90deg, ".concat(w.palette[x].main,"33 4px, ").concat(w.palette[x].main,"66 4px)")},v-f==2&&{paddingRight:"8px",background:"linear-gradient(-90deg, ".concat(w.palette[x].main,"33 8px, ").concat(w.palette[x].main,"66 8px)")},v-f==3&&{paddingRight:"12px",background:"linear-gradient(-90deg, ".concat(w.palette[x].main,"33 12px, ").concat(w.palette[x].main,"66 12px)")},v-f==4&&{paddingRight:"16px",background:"linear-gradient(-90deg, ".concat(w.palette[x].main,"33 16px, ").concat(w.palette[x].main,"66 16px)")},v-f>=5&&{paddingRight:"20px",background:"linear-gradient(-90deg, ".concat(w.palette[x].main,"33 20px, ").concat(w.palette[x].main,"66 20px)")},null!=h&&h<0&&{background:"linear-gradient(-90deg, ".concat(w.palette.error.main," ").concat(B,"%, ").concat(w.palette[x].main,"66 ").concat(B,"%)")}]},t.createElement(l,null,v-100>=E&&t.createElement(j,{size:"small",onClick:function(e){return V(100)}},t.createElement(M,{badgeContent:100,max:100,anchorOrigin:{vertical:"bottom",horizontal:"left"}},t.createElement(m,null))),v-25>=E&&t.createElement(j,{size:"small",onClick:function(e){return V(25)}},t.createElement(M,{badgeContent:25,anchorOrigin:{vertical:"bottom",horizontal:"left"}},t.createElement(m,null))),v-10>=E&&t.createElement(j,{size:"small",onClick:function(e){return V(10)}},t.createElement(M,{badgeContent:10,anchorOrigin:{vertical:"bottom",horizontal:"left"}},t.createElement(m,null))),v-5>=E&&t.createElement(j,{size:"small",onClick:function(e){return V(5)}},t.createElement(M,{badgeContent:5,anchorOrigin:{vertical:"bottom",horizontal:"left"}},t.createElement(m,null))),t.createElement(j,{size:"small",onClick:function(){v-1>=E&&(y(v-1),C(v-1))},disabled:v-1<E},t.createElement(m,null))),t.createElement(c,{direction:"row",spacing:1},s!==f?t.createElement(i,{variant:"body2"},"".concat(s," / ").concat(f)):t.createElement(i,{variant:"body2"},"".concat(s)),v!==s&&t.createElement(i,{variant:"body2"},"+ (".concat(v-s,") = ").concat(v))),t.createElement(l,null,t.createElement(j,{size:"small",onClick:function(){v+1<=b&&(y(v+1),C(v+1))},disabled:v+1>b},t.createElement(d,null)),v+5<=b&&t.createElement(j,{size:"small",onClick:function(e){return O(5)}},t.createElement(M,{badgeContent:5},t.createElement(d,null))),v+10<=b&&t.createElement(j,{size:"small",onClick:function(e){return O(10)}},t.createElement(M,{badgeContent:10},t.createElement(d,null))),v+25<=b&&t.createElement(j,{size:"small",onClick:function(e){return O(25)}},t.createElement(M,{badgeContent:25},t.createElement(d,null))),v+100<=b&&t.createElement(j,{size:"small",onClick:function(e){return O(100)}},t.createElement(M,{badgeContent:100,max:100},t.createElement(d,null)))))}export{g as AmountUpdater,g as default};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{extends as e}from"../../../_virtual/_rollupPluginBabelHelpers.js";import t from"react";import a from"@mui/material/Stack";import n from"@mui/material/TextField";import l from"@mui/material/Typography";import m from"@mui/material/Button";import r from"@mui/icons-material/AccountCircle";import{ContactType as i}from"../../types/common/Contact.js";import
|
|
6
|
+
import{extends as e}from"../../../_virtual/_rollupPluginBabelHelpers.js";import t from"react";import a from"@mui/material/Stack";import n from"@mui/material/TextField";import l from"@mui/material/Typography";import m from"@mui/material/Button";import r from"@mui/icons-material/AccountCircle";import{ContactType as i}from"../../types/common/Contact.js";import o from"@mui/material/Autocomplete";import c from"@mui/material/IconButton";import{Delete as u}from"@mui/icons-material";function p(e){var n=e.data,i=n.id,o=n.first_name,c=n.last_name,u=n.email,p=n.phone_number,d=n.type,f=n.onClick;return t.createElement(a,null,t.createElement(a,{spacing:2,direction:"row"},t.createElement(r,null),t.createElement(a,null,t.createElement(l,null,o," ",c),t.createElement(l,null,u),t.createElement(l,null,p),t.createElement(l,null,d),f&&t.createElement(m,{onClick:function(e){i&&f(e,i)}},"Edit"))))}function d(l){var m=l.data,p=l.componentName,d=l.componentReference,f=l.deleteCallback,s=m||{},E=s.id,_=s.first_name,b=s.last_name,y=s.email,h=s.phone_number,v=s.type;return t.createElement(a,{spacing:2,direction:"row"},t.createElement(r,null),f&&t.createElement(c,{onClick:f},t.createElement(u,null)),t.createElement(a,{spacing:1,sx:{flex:1}},t.createElement("input",{id:"",type:"hidden",name:"".concat(p,".__component"),value:d}),E&&t.createElement("input",{id:"",type:"hidden",name:"".concat(p,".id"),value:E}),t.createElement(n,{id:"first_name",name:"".concat(p,".first_name"),label:"First Name",defaultValue:_||""}),t.createElement(n,{id:"last_name",name:"".concat(p,".last_name"),label:"Last Name",defaultValue:b||""}),t.createElement(n,{id:"email",name:"".concat(p,".email"),label:"E-mail",defaultValue:y||""}),t.createElement(n,{id:"phone_number",name:"".concat(p,".phone_number"),label:"Phone Number",defaultValue:h||""}),t.createElement(o,{id:"type",options:Object.values(i),defaultValue:v||Object.values(i)[0],renderInput:function(a){return t.createElement(n,e({},a,{name:"".concat(p,".type"),label:"Type"}))}})))}export{d as ContactsFields,p as default};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import t from"react";import
|
|
6
|
+
import t from"react";import e from"@mui/material/Tooltip";import a from"@mui/material/Box";import i from"@mui/material/Typography";import{StrapiImage as r}from"../StrapiImage.js";function m(m){var l=m.label,o=m.image;return t.createElement(e,{title:t.createElement(t.Fragment,null,t.createElement(r,{id:o.id,url:"".concat(o.formats.thumbnail.url),alternativeText:"",width:o.formats.thumbnail.width,height:o.formats.thumbnail.height,style:{maxWidth:"100%",height:"auto"}}),t.createElement(i,{variant:"body2"},l||o.alt))},t.createElement(a,{sx:{display:"block",position:"relative",width:36,height:36,borderRadius:"50%",overflow:"hidden"}},t.createElement(r,{id:o.id,url:"".concat(o.formats.thumbnail.url),alternativeText:"",width:o.formats.thumbnail.width,height:o.formats.thumbnail.height,style:{maxWidth:"100%",height:"auto"}})))}export{m as default};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{extends as e}from"../../../_virtual/_rollupPluginBabelHelpers.js";import t from"react";import
|
|
6
|
+
import{extends as e}from"../../../_virtual/_rollupPluginBabelHelpers.js";import t from"react";import r from"@mui/material/Autocomplete";import a from"@mui/material/TextField";import{getWeek as n}from"../../../node_modules/date-fns/getWeek.js";var l=Array.from({length:52},(function(e,t){return t+1}));function o(o){var i=o.value,u=o.onChangeCallback,m=o.label,f=o.disabled;function d(e,t){var r=new Date(t,0,4);return r.setDate(r.getDate()-(r.getDay()||7)+1+7*(e-1)),r}var p,s=n(new Date),c=(new Date).getFullYear(),g=(new Date).getFullYear()+1;return t.createElement(r,{options:l,value:(p=i,n(p)),onChange:function(e,t){null!==t&&u(d(t,t>=s?c:g))},getOptionLabel:function(e){return e.toString()},disabled:void 0!==f&&f,renderInput:function(r){return t.createElement(a,e({},r,{label:void 0!==m?m:"Week"}))}})}export{o as default};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import e from"react";import
|
|
6
|
+
import e,{Suspense as t}from"react";import l from"@mui/material/Box";import i from"@mui/material/Button";import r from"@mui/material/Typography";import a from"@mui/material/Stack";import n from"@mui/material/Grid";import m from"@mui/material/Paper";import{getStrapiMedia as c}from"../../../lib/utils.js";import o from"next/link";import{StrapiImage as u}from"../../StrapiImage.js";import d from"../cart/AddToCartButton.client.js";function s(s){var p,v,g,E,x=s.product;s.sx;var h=x.id,f=x.uuid,y=x.product_number,b=x.title,_=x.description,k=x.slug,T=x.price,j=x.image;x.gallery;var w=x.categories,B=x.stock,F=(null==j?void 0:j.url)?c(j.url):null,C=(null===(v=null===(p=null==j?void 0:j.formats)||void 0===p?void 0:p.thumbnail)||void 0===v?void 0:v.url)?c(j.formats.thumbnail.url):null;return e.createElement(e.Fragment,null,e.createElement(n,{container:!0,spacing:2,sx:{py:3,minHeight:"60vh"}},e.createElement(n,{item:!0,xs:12,sm:12,md:12,lg:12,xl:12},e.createElement(r,{variant:"h4",align:"left",component:"h1"},b)),e.createElement(n,{item:!0,xs:12,sm:8,md:9,lg:4,xl:4},e.createElement(r,{variant:"body1"},_)),e.createElement(n,{item:!0,xs:12,sm:4,md:3,lg:3,xl:3},(null==T?void 0:T.price)&&e.createElement(m,{sx:{p:1}},e.createElement(a,{spacing:1},e.createElement(r,{variant:"body2"},"Price excl. VAT € ",T.price.toFixed(2)),T.price_incl_vat&&e.createElement(r,{variant:"body2",sx:{fontWeight:600}},"Price incl. VAT € ",T.price_incl_vat.toFixed(2)),e.createElement(r,{variant:"body2",sx:{fontWeight:600,color:0===B?"red":"white"},align:"right"},B," items in stock"),e.createElement(d,{product:{id:h,uuid:f,slug:k,thumb:C,title:b,vat_rate:T.vat_rate,quantity:1,price_excl_vat:T.price,price_incl_vat:T.price_incl_vat,product_number:y}})))),e.createElement(n,{item:!0,xs:12,sm:12,md:6,lg:5,xl:5},null!==F&&e.createElement(l,{sx:{height:"400px",width:"100%",position:"relative"}},e.createElement(t,{fallback:e.createElement("div",null,"Loading...")},e.createElement(u,{id:j.id,url:F,alternativeText:j.alternativeText,fill:!0,style:{objectFit:"contain"}})))),e.createElement(n,{item:!0,xs:12,sm:12,md:6,lg:7,xl:7},e.createElement(n,{container:!0,spacing:2},e.createElement(n,{item:!0,xs:12},e.createElement(r,{variant:"h6"},"Image galleryy")),e.createElement(n,{item:!0,xs:12},e.createElement(t,{fallback:e.createElement("div",null,"Loading...")},e.createElement(a,{spacing:1,direction:"row"},(null===(g=null==x?void 0:x.gallery)||void 0===g?void 0:g.data)&&x.gallery.data.map((function(t){var i=(null==t?void 0:t.url)?c(t.url):null;return e.createElement(l,{key:t.id,sx:{width:" 150px",height:"150px",position:"relative"}},null!==i&&e.createElement(u,{id:t.id,url:i,alternativeText:t.alternativeText,fill:!0,style:{objectFit:"contain"}}))}))))),e.createElement(n,{item:!0,xs:12,md:6},(null==w?void 0:w.data)&&e.createElement(a,{justifyContent:"center",alignItems:"center",direction:1===w.data.length?"row":"column"},1===w.data.length?e.createElement(r,null,"Category:"):e.createElement(r,null,"Categories:"),null===(E=w.data)||void 0===E?void 0:E.map((function(t){return e.createElement(o,{href:"/shop/categories/".concat(t.slug),key:t.id,legacyBehavior:!0},e.createElement(i,{variant:"text"},t.slug))})))),e.createElement(n,{item:!0,xs:12,md:6},e.createElement(a,null,e.createElement(o,{href:"/shop",legacyBehavior:!0},e.createElement(i,{variant:"outlined"},"continue shopping"))))))))}export{s as default};
|
|
@@ -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
|
|
6
|
+
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import t,{useState as r}from"react";import{useTheme as n}from"@mui/material/styles";import a from"@mui/material/Stack";import i from"@mui/material/Typography";import o from"@mui/material/IconButton";import u 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 d from"../../common/ImagePreviewTooltip.js";function p(p){var f=p.item,s=p.index;p.handleAddReport,p.handleUpdateQuantity;var v=p.image;p.handleRemoveReportAtIndex;var y=f.line_item_number,E=f.product,g=f.arrived_quantity,b=f.registered_quantity,q=f.recieved_quantity,_=f.ordered_quantity,h=f.arrived_bad_reasons,w=f.registered_bad_reasons,V=e(r(!1),2),N=V[0],x=V[1];n();var C=e(r(g),2),I=C[0],A=C[1],R=e(r(b),2),j=R[0],k=R[1],D=e(r(q),2),F=D[0],P=D[1];return t.createElement(a,{spacing:1,key:s},f&&t.createElement(t.Fragment,null,t.createElement(a,{direction:"row",justifyContent:"space-between"},t.createElement(a,{spacing:1},t.createElement(i,{variant:"body1"},"Line Item Number: ",y),t.createElement(i,{variant:"body1"},"Part Number: ",E.product_number)),v&&t.createElement(t.Fragment,null,t.createElement(d,{image:v,label:f.product.title}))),t.createElement(i,{variant:"body2"},"Arrived"),t.createElement(m,{currentValue:I,totalValue:_+(null==h?void 0:h.reduce((function(e,t){return e+t.quantity}),0)),minNewValue:0+j+(null==w?void 0:w.reduce((function(e,t){return e+t.quantity}),0)),maxNewValue:_+(null==h?void 0:h.reduce((function(e,t){return e+t.quantity}),0)),color:"info",handleChange:function(e){A(e)}}),t.createElement("input",{name:"arrived_quantity",type:"hidden",value:I}),t.createElement(i,{variant:"body2"},"Registered"),t.createElement(m,{currentValue:j,totalValue:_+(null==h?void 0:h.reduce((function(e,t){return e+t.quantity}),0)),minNewValue:0+F,maxNewValue:I+(null==w?void 0:w.reduce((function(e,t){return e+t.quantity}),0)),color:"info",handleChange:function(e){k(e)},offsetEnd:null==w?void 0:w.reduce((function(e,t){return e+t.quantity}),0)}),t.createElement("input",{name:"registered_quantity",type:"hidden",value:j}),t.createElement(u,{sx:{p:0}},t.createElement(a,{direction:"row",spacing:1,alignItems:"center"},t.createElement(i,{variant:"body2"},"Irregularities / Corrections"),t.createElement(o,{onClick:function(){return x(!N)}},t.createElement(c,null)))),t.createElement(l,{in:N},t.createElement(a,{spacing:2},t.createElement(i,{variant:"body2"},"Here you can report and correct for damages wrong items etc. Do not forget to click the button!"))),t.createElement(i,{variant:"body2"},"Recieved"),t.createElement(m,{currentValue:F,totalValue:_+(null==h?void 0:h.reduce((function(e,t){return e+t.quantity}),0))+(null==w?void 0:w.reduce((function(e,t){return e+t.quantity}),0)),minNewValue:0,maxNewValue:j,color:"info",handleChange:function(e){P(e)}}),t.createElement("input",{name:"recieved_quantity",type:"hidden",value:F})))}export{p as default};
|
|
@@ -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
|
|
6
|
+
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import t,{useState as r}from"react";import o from"@mui/material/Alert";import a from"@mui/material/IconButton";import l from"@mui/material/Dialog";import m from"@mui/material/DialogContent";import i from"@mui/material/DialogActions";import n from"@mui/material/Button";import c from"@mui/material/Typography";import f from"@mui/material/Paper";import u from"@mui/material/TextField";import s from"@mui/material/Stack";import d from"@mui/icons-material/NoteAlt";import{SubmitButton as p}from"../../SubmitButton.js";import{StrapiErrors as g}from"../../StrapiErrors.js";import{useFormState as E}from"react-dom";import{createNoteAction as b}from"../../../data/actions/logistics/note/createNoteAction.js";import{formatDate as x}from"../../../../node_modules/date-fns/format.js";var k={zodErrors:null,strapiErrors:null,data:null,message:null};function v(v){var h=v.content,y=v.related,j=e(r(!1),2),A=j[0],D=j[1],S=b.bind(null,y),C=e(E(S,k),2),T=C[0],w=C[1];return t.createElement(t.Fragment,null,t.createElement(a,{onClick:function(){return D(!0)},sx:{width:50,height:50,color:"#ffff88"}},t.createElement(d,{fontSize:"large"})),t.createElement(l,{open:A,fullWidth:!0,maxWidth:"lg"},t.createElement("form",{action:w},t.createElement(m,{sx:{p:1}},t.createElement(f,{elevation:4,sx:{background:"linear-gradient(135deg, #ffff88 81%,#ffff88 82%,#ffff88 82%,#ffffc6 100%)",color:"black",p:1}},t.createElement(s,{spacing:2},t.createElement(c,{variant:"body1",textAlign:"right"},x(Date.now(),"dd-MM-yyyy")),t.createElement(u,{id:"content",name:"content",sx:{color:"black",label:{color:"black"},input:{color:"black"},div:{color:"black"}},label:"The note",multiline:!0,rows:12,defaultValue:h})))),t.createElement(i,null,t.createElement(n,{onClick:function(){return D(!1)}},"Cancel"),t.createElement(p,{text:"Submit",loadingText:"Loading..."}),t.createElement(g,{error:null==T?void 0:T.strapiErrors}),(null==T?void 0:T.message)&&t.createElement(o,{severity:"error"},null==T?void 0:T.message)))))}export{v as default};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import e from"react";import
|
|
6
|
+
import e from"react";import t from"@mui/material/Typography";import r from"@mui/material/Card";import a from"@mui/material/CardContent";import n from"@mui/material/Stack";var o=function(o){var l=o.notes;return e.createElement(n,{spacing:2},l.map((function(n,o){var l,i,m;return console.log("note",n),e.createElement(r,{variant:"outlined",key:o,sx:{background:"linear-gradient(135deg, #ffff88 81%,#ffff88 82%,#ffff88 82%,#ffffc6 100%)",color:"black",p:1}},e.createElement(a,null,e.createElement(t,null,n.date),e.createElement(t,null,n.content),e.createElement(t,{align:"right",sx:{fontStyle:"bold"}},"- ",null===(l=n.author)||void 0===l?void 0:l.first_name," ",null===(i=n.author)||void 0===i?void 0:i.last_name," ",null===(m=n.author)||void 0===m?void 0:m.username)))})))};export{o as default};
|