umwd-components 0.1.524 → 0.1.525

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.
@@ -1,6 +1,7 @@
1
+ "use client";
1
2
  /*
2
3
  * UMWD-Components
3
4
  * @copyright Jelle Paulus
4
5
  * @license MIT
5
6
  */
6
- import{__read as e,__assign as t}from"../../../../node_modules/tslib/tslib.es6.js";import r from"react";import a from"@mui/material/Paper";import n from"@mui/material/Stack";import i from"@mui/material/Box";import l from"@mui/material/Typography";import m from"@mui/material/Button";import o from"@mui/material/Divider";import s from"@mui/material/Grid";import c from"@mui/icons-material/Person";import d from"@mui/icons-material/Email";import u from"@mui/icons-material/Phone";import p from"../../common/Address.js";import f from"./BusinessCredentials.js";import{StyledLink as E}from"../../StyledLink.js";import{Alert as v}from"@mui/material";import{isCustomerProfileCompleteV2 as y}from"../../../lib/isCustomerProfileCompleteV2.js";function b(b){var _=b.data,g=_.first_name,h=_.last_name,j=_.email,x=_.phone,A=_.company_address,C=_.billing_address,V=_.delivery_address,w=_.business_credentials,B=_.editProfileUrl,O=void 0===B?"/user/profile/edit":B,P=Object.entries(y({first_name:g,last_name:h,email:j,phone:x,company_address:A,billing_address:C,delivery_address:V,business_credentials:w}));console.log("Customerobject",P);var D=P.filter((function(t){var r=e(t,1)[0];return"VATValid"!==r&&"EORIValid"!==r}));console.log("filteredCustomerObject",D);var N=D.every((function(t){var r=e(t,2);return r[0],!0===r[1]}));return console.log("completeEnough",N),r.createElement(a,{sx:{p:2}},r.createElement(n,{spacing:2},!0===Object.entries(y({first_name:g,last_name:h,email:j,phone:x,company_address:A,billing_address:C,delivery_address:V,business_credentials:w})).filter((function(t){var r=e(t,1)[0];return"VATValid"!==r&&"EORIValid"!==r})).every((function(t){var r=e(t,2);return r[0],!0===r[1]}))?r.createElement(v,{severity:"warning",action:r.createElement(E,{href:O,target:"_self"},r.createElement(m,{variant:"contained"},"complete profile"))},"After completion of your profile you can enjoy all the benefits of your services."):r.createElement(n,{direction:"row",justifyContent:"flex-end"},r.createElement(E,{href:O,target:"_self"},r.createElement(m,{variant:"contained"},"edit profile"))),w?r.createElement(f,{data:w}):r.createElement(l,null,"Business credentials not available"),r.createElement(o,null),r.createElement(n,{spacing:2,direction:"row"},r.createElement(c,null),r.createElement(i,null,r.createElement(l,{variant:"body1",component:"p"},g," ",h," ",!g&&!h&&"N/A"))),r.createElement(n,{spacing:2,direction:"row"},r.createElement(d,null),r.createElement(i,null,r.createElement(l,{variant:"body1",component:"p"},j," ",!j&&"N/A"))),r.createElement(n,{spacing:2,direction:"row"},r.createElement(u,null),r.createElement(i,null,r.createElement(l,{variant:"body1",component:"p"},x," ",!x&&"N/A"))),r.createElement(o,null),r.createElement(s,{container:!0,sx:{width:"100%"}},A?r.createElement(s,{item:!0,xs:12,md:4},r.createElement(l,{variant:"h6"},"Company Address"),r.createElement(p,{data:t({},A)})):r.createElement(s,{item:!0,xs:12,md:4},r.createElement(l,null,"Company address not available")),V?r.createElement(s,{item:!0,xs:12,md:4},r.createElement(l,{variant:"h6"},"Delivery Address"),r.createElement(p,{data:t({},V)})):r.createElement(s,{item:!0,xs:12,md:4},r.createElement(l,null,"Delivery address not available")),C?r.createElement(s,{item:!0,xs:12,md:4},r.createElement(l,{variant:"h6"},"Billing Address"),r.createElement(p,{data:t({},C)})):r.createElement(s,{item:!0,xs:12,md:4},r.createElement(l,null,"Billing address not available")))))}export{b as default};
7
+ import{__assign as e}from"../../../../node_modules/tslib/tslib.es6.js";import t from"react";import r from"@mui/material/Paper";import a from"@mui/material/Stack";import n from"@mui/material/Box";import m from"@mui/material/Typography";import l from"@mui/material/Button";import i from"@mui/material/Divider";import o from"@mui/material/Grid";import c from"@mui/icons-material/Person";import s from"@mui/icons-material/Email";import d from"@mui/icons-material/Phone";import p from"../../common/Address.js";import E from"./BusinessCredentials.js";import{StyledLink as u}from"../../StyledLink.js";import{Alert as f}from"@mui/material";function v(v){var y=v.data,b=y.first_name,g=y.last_name,h=y.email,x=y.phone,_=y.company_address,A=y.billing_address,B=y.delivery_address,j=y.business_credentials,w=y.editProfileUrl,C=void 0===w?"/user/profile/edit":w,P=y.completeEnough,D=void 0!==P&&P;return t.createElement(r,{sx:{p:2}},t.createElement(a,{spacing:2},Boolean(D)?t.createElement(a,{direction:"row",justifyContent:"flex-end"},t.createElement(u,{href:C,target:"_self"},t.createElement(l,{variant:"contained"},"edit profile"))):t.createElement(f,{severity:"warning",action:t.createElement(u,{href:C,target:"_self"},t.createElement(l,{variant:"contained"},"complete profile"))},"After completion of your profile you can enjoy all the benefits of your services."),j?t.createElement(E,{data:j}):t.createElement(m,null,"Business credentials not available"),t.createElement(i,null),t.createElement(a,{spacing:2,direction:"row"},t.createElement(c,null),t.createElement(n,null,t.createElement(m,{variant:"body1",component:"p"},b," ",g," ",!b&&!g&&"N/A"))),t.createElement(a,{spacing:2,direction:"row"},t.createElement(s,null),t.createElement(n,null,t.createElement(m,{variant:"body1",component:"p"},h," ",!h&&"N/A"))),t.createElement(a,{spacing:2,direction:"row"},t.createElement(d,null),t.createElement(n,null,t.createElement(m,{variant:"body1",component:"p"},x," ",!x&&"N/A"))),t.createElement(i,null),t.createElement(o,{container:!0,sx:{width:"100%"}},_?t.createElement(o,{item:!0,xs:12,md:4},t.createElement(m,{variant:"h6"},"Company Address"),t.createElement(p,{data:e({},_)})):t.createElement(o,{item:!0,xs:12,md:4},t.createElement(m,null,"Company address not available")),B?t.createElement(o,{item:!0,xs:12,md:4},t.createElement(m,{variant:"h6"},"Delivery Address"),t.createElement(p,{data:e({},B)})):t.createElement(o,{item:!0,xs:12,md:4},t.createElement(m,null,"Delivery address not available")),A?t.createElement(o,{item:!0,xs:12,md:4},t.createElement(m,{variant:"h6"},"Billing Address"),t.createElement(p,{data:e({},A)})):t.createElement(o,{item:!0,xs:12,md:4},t.createElement(m,null,"Billing address not available")))))}export{v as default};