dsql-admin/dsql-app/.local_dist/static/chunks/pages/su/users/[single]-d81189b8f14033f8.js

1 line
19 KiB
JavaScript
Raw Normal View History

2024-12-08 19:56:57 +00:00
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3632],{7538:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/users/[single]",function(){return s(73271)}])},41301:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(74848),l=s(62027);function r(e){let{selectOptions:t,name:s,onChangeHandler:r,required:i,setAlert:n,title:c,defaultValue:d,info:o,id:h}=e;try{function u(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),s=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!s.classList.contains("hidden")){s.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&s.classList.contains("hidden"))){if(!t){s.classList.add("hidden");return}if(s.classList.contains("hidden")){s.classList.remove("hidden");return}s.classList.add("hidden")}}return(0,a.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(o?" pr-8":""),children:[c&&(0,a.jsxs)("label",{htmlFor:s,children:[c,i?"":" (optional)"]}),(0,a.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,a.jsx)("select",{name:s,id:h||s,className:"w-full bg-white",required:i,onChange:e=>{n&&n(null),e.target.classList.remove("warning"),r&&r(e)},defaultValue:d||void 0,children:t.map((e,t)=>{let{payload:s,title:l}=e;return(0,a.jsx)("option",{value:s,selected:!!e.default,children:l},t+1)})}),(0,a.jsx)(l.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),o&&(0,a.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:u,onMouseLeave:u,onClick:u,children:[(0,a.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,a.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,a.jsx)("span",{children:o})}),(0,a.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,a.jsx)("div",{children:"Form Select Error"})}}s(96540)},99862:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(74848);s(96540);var l=s(86625);function r(){return(0,a.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,a.jsx)(l.A,{color:"inherit",className:"opacity-50 text-black",fontSize:"small"})})}},4709:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(74848),l=s(96540);function r(e){var t,s,r;let{confirmedDelegetedUser:i,linksArray:n,user:c}=e;null==i||i.delegated,null==i||null===(t=i.priviledges)||void 0===t||t.match(/Edit Tables/i),null==i||null===(s=i.priviledges)||void 0===s||s.match(/Delete Tables/i),null==i||null===(r=i.priviledges)||void 0===r||r.match(/Create Tables/i);let[d,o]=l.useState(n||null);return(l.useEffect(()=>{var e;if(n)return;let t=window.location.pathname,s=t.split("/"),a=[];a.push({title:"Home",path:t.match(/admin/)?"/admin":"/"}),null===(e=window.location.search)||void 0===e||e.match(/delegated=true/),s.forEach((e,t,s)=>{!(null==e?void 0:e.match(/./))||1==t||e.match(/^\d+$/)&&c&&!a.find(e=>!!e.title.match(/^entries$|^users$/))||a.push({title:e,path:(()=>{let e="";for(let a=0;a<s.length;a++){let l=s[a];!(a>t)&&l.match(/./)&&(e+="/".concat(l))}return e})()})}),o(a)},[]),d&&d[1])?(0,a.jsx)("div",{className:"text-sm mt-2 flex-wrap",children:d.map((e,t,s)=>t===d.length-1?(0,a.jsx)("a",{href:e.path,className:"text-slate-400 dark:text-slate-500 pointer-events-none",children:e.title},t):(0,a.jsxs)(l.Fragment,{children:[(0,a.jsx)("a",{href:e.path,className:"query-url",children:e.title}),(0,a.jsx)("span",{className:"opacity-20",children:"|"})]},t))}):(0,a.jsx)(l.Fragment,{})}},35681:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var a=s(74848),l=s(96540),r=s(51105),i=s(87220);function n(e){let{content:t,language:s,style:n,showCopy:c}=e,[d,o]=l.useState(!1),h=()=>{o(!0)},u=(e