dsql-admin/dsql-app/.local_dist/server/chunks/7488.js
Benjamin Toby 7a06e83a46 Updates
2024-12-08 20:56:57 +01:00

1 line
6.1 KiB
JavaScript

"use strict";exports.id=7488,exports.ids=[7488],exports.modules={84851:(e,a,s)=>{let t;s.d(a,{A:()=>u});var l=s(8732),r=s(82015),i=s.n(r),n=s(63715),m=s(64535),d=s(32415),o=s(13737),c=s(77826);function u({targetDb:e,database:a,user:s,userImage:r,setUserImage:u}){let[p,x]=i().useState(null),[h,v]=i().useState(!1);return(0,l.jsxs)(i().Fragment,{children:[h&&(0,l.jsx)(d.A,{}),p&&(0,l.jsx)(m.A,{message:p}),(0,l.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600 mt-4",children:"User information"}),(0,l.jsx)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:(0,l.jsx)(o.A,{title:"First Name",inputType:"text",name:"first_name",autoComplete:"given-name",onInputHandler:e=>{let a=e.target;a.value.match(/./)?(a.classList.remove("warning"),x(null)):a.classList.add("warning")},required:!0})}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,l.jsx)("label",{htmlFor:"last_name",children:"Last Name"}),(0,l.jsx)("input",{type:"text",name:"last_name",id:"last_name",placeholder:"Last Name",autoComplete:"family-name",onInput:e=>{let a=e.target;a.value.match(/./)?(a.classList.remove("warning"),x(null)):a.classList.add("warning")},required:!0})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,l.jsx)("label",{htmlFor:"username",children:"Username"}),(0,l.jsx)("input",{type:"text",name:"username",id:"username",placeholder:"Username",autoComplete:"username",onInput:a=>{let s=a.target;s.value.match(/./)?(s.classList.remove("warning"),x(null)):s.classList.add("warning"),window.clearTimeout(t),t=setTimeout(()=>{(0,n.A)(`/api/checkDuplicateData?type=username&value=${s.value}&tableName=users&dbFullName=${e}`).then(e=>{e?.result?(x("Username Already Exists"),s.classList.add("warning")):(x(null),s.classList.remove("warning"))})},300)}})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,l.jsx)("label",{htmlFor:"email_address",children:"Email Address"}),(0,l.jsx)("input",{type:"email",name:"email_address",id:"email_address",placeholder:"Email Address",autoComplete:"email",onInput:a=>{window.clearTimeout(t);let s=a.target;t=setTimeout(()=>{(0,n.A)(`/api/checkDuplicateData?type=email&value=${s.value}&tableName=users&dbFullName=${e}`).then(e=>{e?.result?(x("Email Already Exists"),s.classList.add("warning")):(x(null),s.classList.remove("warning"))})},300)},required:!0})]}),(0,l.jsx)(o.A,{title:"Phone Number",inputType:"text",name:"phone",autoComplete:"tel"}),(0,l.jsx)(o.A,{title:"Address",name:"address",autoComplete:"address"}),(0,l.jsxs)("div",{className:"flex-wrap xl:flex-nowrap",children:[(0,l.jsx)(o.A,{title:"City",name:"city",autoComplete:"city"}),(0,l.jsx)(o.A,{title:"State",name:"state",autoComplete:"state"}),(0,l.jsx)(o.A,{title:"Country",name:"country",autoComplete:"country"}),(0,l.jsx)(o.A,{title:"Zip Code",name:"zip_code",autoComplete:"zip_code"})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,l.jsx)("label",{htmlFor:"password",children:"Password"}),(0,l.jsx)("input",{type:"password",name:"password",id:"password",placeholder:"Password",required:!0})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[(0,l.jsx)("label",{htmlFor:"confirm_password",children:"Confirm Password"}),(0,l.jsx)("input",{type:"password",name:"confirm_password",id:"confirm_password",placeholder:"Confirm Password",onInput:e=>{let a=e.target;a.closest("form")?.password.value===a.value?a.classList.remove("warning"):a.classList.add("warning")},required:!0})]}),(0,l.jsxs)("div",{className:"paper",children:[(0,l.jsx)("h3",{className:"m-0 text-lg font-semibold mb-1 text-slate-600",children:"User Image"}),(0,l.jsx)(c.A,{userImage:r,setUserImage:u,className:"w-full"})]})]})}},64535:(e,a,s)=>{s.d(a,{A:()=>l});var t=s(8732);function l({message:e}){return(0,t.jsxs)("div",{className:"p-2 bg-orange-50 w-full justify-center rounded text-sm text-orange-700 border border-orange-400 border-solid",children:[(0,t.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,t.jsx)("span",{children:e})]})}s(82015)},48987:(e,a,s)=>{var t=s(24994);a.A=void 0;var l=t(s(30887)),r=s(8732);a.A=(0,l.default)([(0,r.jsx)("path",{d:"M7 3h10v1H7zm0 17h10v1H7z",opacity:".3"},"0"),(0,r.jsx)("path",{d:"m22 12-4-4v3h-5v2h5v3zm-5 6H7V6h10v1h2V3c0-1.1-.9-2-2-2L7 1.01C5.9 1.01 5 1.9 5 3v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2v-4h-2zM7 3h10v1H7zm10 18H7v-1h10z"},"1")],"SendToMobileTwoTone")},42125:(e,a,s)=>{var t=s(24994);a.A=void 0;var l=t(s(30887)),r=s(8732);a.A=(0,l.default)([(0,r.jsx)("path",{d:"M14 5H5v14h14v-9h-5zM8 17c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m0-4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m0-4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1",opacity:".3"},"0"),(0,r.jsx)("circle",{cx:"8",cy:"8",r:"1"},"1"),(0,r.jsx)("path",{d:"M15 3H5c-1.1 0-1.99.9-1.99 2L3 19c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V9zm4 16H5V5h9v5h5z"},"2"),(0,r.jsx)("circle",{cx:"8",cy:"12",r:"1"},"3"),(0,r.jsx)("circle",{cx:"8",cy:"16",r:"1"},"4")],"SummarizeTwoTone")},50993:(e,a,s)=>{var t=s(24994);a.A=void 0;var l=t(s(30887)),r=s(8732);a.A=(0,l.default)([(0,r.jsx)("path",{d:"M14.5 9.5C14.5 6.47 12.03 4 9 4S3.5 6.47 3.5 9.5c0 2.47 1.49 3.89 2.35 4.5h6.3c.86-.61 2.35-2.03 2.35-4.5",opacity:".3"},"0"),(0,r.jsx)("path",{d:"M7 20h4c0 1.1-.9 2-2 2s-2-.9-2-2m-2-1h8v-2H5zm11.5-9.5c0 3.82-2.66 5.86-3.77 6.5H5.27c-1.11-.64-3.77-2.68-3.77-6.5C1.5 5.36 4.86 2 9 2s7.5 3.36 7.5 7.5m-2 0C14.5 6.47 12.03 4 9 4S3.5 6.47 3.5 9.5c0 2.47 1.49 3.89 2.35 4.5h6.3c.86-.61 2.35-2.03 2.35-4.5m6.87-2.13L20 8l1.37.63L22 10l.63-1.37L24 8l-1.37-.63L22 6zM19 6l.94-2.06L22 3l-2.06-.94L19 0l-.94 2.06L16 3l2.06.94z"},"1")],"TipsAndUpdatesTwoTone")},96089:(e,a,s)=>{s.d(a,{A:()=>t});let t=(0,s(82544).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},98136:(e,a,s)=>{s.d(a,{A:()=>t});let t=(0,s(82544).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])}};