umwd-components 0.1.361 → 0.1.362
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/public-information/PublicInformationForm.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/e-commerce/categories/AddCategoryForm.d.ts +5 -0
- package/dist/types/data/actions/e-commerce/categories/createCategoryAction.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/e-commerce/categories/AddCategoryForm.tsx +113 -0
- package/src/components/public-information/PublicInformationForm.tsx +15 -30
- package/src/data/actions/e-commerce/categories/createCategoryAction.tsx +54 -0
|
@@ -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 r from"@mui/material/Divider";import t from"@mui/material/Paper";import a from"@mui/material/Box";import i from"@mui/material/Stack";import
|
|
7
|
+
import{__read as e}from"../../../node_modules/tslib/tslib.es6.js";import r from"@mui/material/Divider";import t from"@mui/material/Paper";import a from"@mui/material/Box";import i from"@mui/material/Stack";import m from"@mui/material/Alert";import n from"@mui/material/TextField";import o from"@mui/material/Typography";import{SubmitButton as l}from"../SubmitButton.js";import{useFormState as s}from"react-dom";import{StrapiErrors as c}from"../StrapiErrors.js";import{BusinessCredentialsFields as d}from"../e-commerce/customer/BusinessCredentials.js";import p from"react";import{AddressFields as u}from"../common/Address.js";import{updatePublicInformationAction as f}from"../../data/actions/public-information/updatePublicInformationAction.js";var E={zodErrors:null,strapiErrors:null,data:null,message:null};function b(b){var v=b.publicInformation;console.log(v);var g=v.id,h=v.title,_=v.description;v.disclaimer_link,v.privacypolicy_link,v.maxWidth;var x=v.email,y=v.phone_number,j=v.business_credentials,A=v.address;v.socials,v.header_logo,v.footer_logo;var B=e(s(f,E),2),T=B[0],V=B[1];return p.createElement(a,{component:t,sx:{p:2}},p.createElement("form",{action:V},p.createElement("input",{id:"id",type:"hidden",name:"id",value:g}),p.createElement(i,{spacing:2},p.createElement(n,{id:"title",name:"title",label:"Title",defaultValue:h}),p.createElement(n,{id:"description",name:"description",label:"Description",defaultValue:_}),p.createElement(n,{id:"email",name:"email",label:"email",defaultValue:x}),p.createElement(n,{id:"phone_number",name:"phone_number",label:"phone_number",defaultValue:y}),p.createElement(o,{variant:"h6"},"Company Address"),p.createElement(r,null),p.createElement(u,{componentName:"address",componentReference:"common.address",data:A}),p.createElement(r,null),p.createElement(o,{variant:"h6"},"Business Credentials"),p.createElement(d,{componentName:"business_credentials",componentReference:"business.credentials",data:j}),p.createElement(i,{direction:"row-reverse",spacing:2,alignItems:"center",sx:{py:1}},p.createElement(l,{text:"save changes",loadingText:"loading"}),p.createElement(c,{error:null==T?void 0:T.strapiErrors}),(null==T?void 0:T.message)&&p.createElement(m,{severity:"error"},null==T?void 0:T.message)))))}export{b as PublicInformationForm};
|