@ehfuse/taskbox 0.5.217 → 0.5.218
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/index.esm.js +1 -1
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ use chrome, FireFox or Internet Explorer 11`)}var r=e("safe-buffer"),t=e("random
|
|
|
31
31
|
`).replace(/<\/(p|div|li|h[1-6]|blockquote)>/gi,`
|
|
32
32
|
`),b=document.createElement("div");return b.innerHTML=p,(b.textContent??"").replace(/\n{3,}/g,`
|
|
33
33
|
|
|
34
|
-
`).trim()}function zs({syncKey:e,value:p,onChange:b,readOnly:c=!1,minHeight:i=180,height:a=0,onChangeHeight:r}){let t=(0,dn.useRef)(null),n=(0,dn.useRef)(null),l=a>0?a:0,o=(0,dn.useRef)(l),s=(0,dn.useRef)(r);s.current=r;let f=(0,dn.useRef)(null),h=(0,dn.useRef)(Date.now()+800),[u,g]=(0,dn.useState)(!1),m=Yt();(0,dn.useEffect)(()=>{if(c)return;let k=Vc(p);f.current===k||f.current===p||(f.current=k,h.current=Date.now()+800,t.current?.setHtml(k))},[e,p,c]);let v=(0,dn.useRef)(-1);return(0,dn.useEffect)(()=>{if(c||m||a<=0||v.current===a||(v.current=a,Math.abs(a-o.current)<1))return;let k=n.current?.querySelector(".ehfuse-editor-container");k&&(Math.abs(k.getBoundingClientRect().height-a)<1||(k.style.height=`${a}px`,o.current=a))},[c,m,a]),(0,dn.useEffect)(()=>{if(c||m)return;let k=n.current?.querySelector(".ehfuse-editor-container");if(!k||typeof ResizeObserver>"u")return;let B,O=new ResizeObserver(L=>{let A=Math.round(L[0]?.contentRect.height??0);A<=0||(window.clearTimeout(B),B=window.setTimeout(()=>{Math.abs(A-o.current)<1||(o.current=A,s.current?.(A))},300))});return O.observe(k),()=>{window.clearTimeout(B),O.disconnect()}},[c,m]),c?(0,no.jsxs)(qo.Box,{sx:{position:"relative",mt:1},children:[(0,no.jsx)(qo.Box,{sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:"40px",minHeight:i,fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word",userSelect:"none","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0}},dangerouslySetInnerHTML:{__html:Vc(p)}}),(0,no.jsx)(qo.Tooltip,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,no.jsx)(qo.IconButton,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(v0(p)).then(()=>{g(!0),window.setTimeout(()=>g(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:u?(0,no.jsx)(x0.default,{sx:{fontSize:17,color:"#2f9e5b"}}):(0,no.jsx)(y0.default,{sx:{fontSize:17}})})})]}):(0,no.jsx)(qo.Box,{ref:n,onDragOver:k=>k.stopPropagation(),onDrop:k=>k.stopPropagation(),sx:{mt:1,"& .ehfuse-editor-content > p:first-of-type":{mt:0},"& .ehfuse-editor-content > p:last-of-type":{mb:0},"& .ehfuse-editor-content.ehfuse-editor-empty::before":{top:"12px",left:"12px"}},children:(0,no.jsx)(ll.EhfuseEditor,{ref:t,defaultValue:Vc(p),autoHeight:m,resizable:!m,showToolbar:!m,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:ll.minimalToolbarOptions,locale:"ko",minHeight:l||i,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:k=>{let B=Date.now()<h.current,O=k===f.current;f.current=k,!(B||O)&&b(k)}})})}var hi=require("react"),bt=require("@mui/material"),oo=require("@dnd-kit/core"),cl=require("@dnd-kit/modifiers"),Ho=require("@dnd-kit/sortable"),M0=require("@dnd-kit/utilities"),Kc=Z(require("@mui/icons-material/Close"),1),E0=Z(require("@mui/icons-material/AddCircle"),1),Gc=Z(require("@mui/icons-material/AddTask"),1),R0=Z(require("@mui/icons-material/Checklist"),1),A0=Z(require("@mui/icons-material/CheckCircle"),1),O0=Z(require("@mui/icons-material/DragIndicator"),1),D0=Z(require("@mui/icons-material/Launch"),1),P0=Z(require("@mui/icons-material/LinkOutlined"),1),N0=Z(require("@mui/icons-material/RadioButtonUnchecked"),1);var $o=require("react"),Xr=require("@mui/material"),_0=require("@ehfuse/mui-form-dialog"),k0=require("@ehfuse/mui-form-controls"),S0=require("@ehfuse/alerts"),T0=Z(require("@mui/icons-material/CheckCircle"),1),C0=Z(require("@mui/icons-material/RadioButtonUnchecked"),1),B0=require("@ehfuse/overlay-scrollbar");var kr=require("react/jsx-runtime"),w0=[{type:"related",label:"\uAD00\uB828",hint:"\uB2E8\uC21C\uD788 \uAD00\uB828 \uC788\uB294 \uC5C5\uBB34\uB85C \uC5F0\uACB0\uD569\uB2C8\uB2E4"},{type:"follow_up",label:"\uC774\uC804 \uC5C5\uBB34",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C4 \uD6C4\uC18D\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4(\uC774\uB825 \uD0C0\uC784\uB77C\uC778)"},{type:"duplicate_of",label:"\uC911\uBCF5(\uC6D0\uBCF8)",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC6D0\uBCF8 \uC5C5\uBB34\uC758 \uC911\uBCF5\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4"}];function qs({open:e,task:p,tasks:b,excludeSeqs:c=[],onClose:i,onSubmit:a,hideRelationType:r=!1,title:t="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:n="\uC5F0\uACB0",multiSelect:l=!1}){let o=Yt(),[s,f]=(0,$o.useState)("related"),[h,u]=(0,$o.useState)(""),[g,m]=(0,$o.useState)([]);(0,$o.useEffect)(()=>{e&&(f("related"),u(""),m([]))},[e]);let v=(0,$o.useMemo)(()=>{let A=new Set([p.seq,...c]),P=h.trim().toLowerCase();return b.filter(j=>A.has(j.seq)||j.is_event||j.is_notice||j.linked_only?!1:P?j.title.toLowerCase().includes(P)||(j.ticket_no??"").toLowerCase().includes(P):!0).sort((j,z)=>!!j.completed!=!!z.completed?j.completed?1:-1:z.seq-j.seq)},[b,p.seq,c,h]),k=()=>{if(g.length===0){(0,S0.ErrorAlert)("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let A of g)a(A,s);i()},B=A=>{m(P=>P.includes(A)?P.filter(j=>j!==A):l?[...P,A]:[A])},O=w0.find(A=>A.type===s)?.hint??"",L=(0,kr.jsxs)(Xr.Box,{sx:{...o?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...o?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[r?null:(0,kr.jsx)(Xr.Tabs,{value:s,onChange:(A,P)=>f(P),sx:{minHeight:38,mb:.75,flexShrink:0,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:w0.map(A=>(0,kr.jsx)(Xr.Tab,{value:A.type,label:A.label},A.type))}),r?null:(0,kr.jsx)(Xr.Box,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:O}),(0,kr.jsx)(Xr.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,kr.jsx)(k0.ClearTextField,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:h,onChange:A=>u(A.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),(0,kr.jsx)(Xr.Box,{sx:{flex:1,minHeight:0},children:(0,kr.jsx)(B0.OverlayScrollbar,{style:{height:"100%"},contentStyle:{paddingTop:0},children:(0,kr.jsx)(Xr.Box,{sx:{display:"flex",flexDirection:"column"},children:v.length===0?(0,kr.jsx)(Xr.Box,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):v.map(A=>{let P=A.is_notice||A.is_event?It(A.icon||(A.is_notice?hr:Cr)):null,j=g.includes(A.seq);return(0,kr.jsxs)(Xr.Box,{onClick:()=>B(A.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.5,py:1.25,flexShrink:0,cursor:"pointer",borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none"},bgcolor:j?"#e3eefb":"transparent","&:hover":{bgcolor:j?"#e3eefb":"#f7f7f5"}},children:[j?(0,kr.jsx)(T0.default,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):(0,kr.jsx)(C0.default,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),P?(0,kr.jsx)(P,{sx:{fontSize:17,flexShrink:0,color:A.icon_color||"#1e3a8a"}}):null,(0,kr.jsxs)(Xr.Box,{component:"span",sx:{flex:1,minWidth:0,fontSize:15,color:"#37352f",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",lineHeight:1.5,wordBreak:"break-word"},children:[A.ticket_no?`${A.ticket_no} `:"",A.title]}),(0,kr.jsx)(Xr.Box,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:(0,kr.jsx)(Gt,{option:Br(A)})})]},A.seq)})})})})]});return(0,kr.jsx)(_0.FormDialog,{open:e,onClose:i,maxWidth:"sm",fullScreen:o,mobilePresentation:o?"slide":"dialog",...o?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop:0}:{},sx:o?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:t,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:L}],scrollPastLastSection:!1,sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:(0,kr.jsx)(Xr.Button,{variant:"contained",disabled:g.length===0,onClick:k,children:n})}})}var Ze=require("react/jsx-runtime"),I0="taskbox.checklist.hideCompleted";function lx({id:e,children:p}){let{attributes:b,listeners:c,setNodeRef:i,transform:a,transition:r,isDragging:t}=(0,Ho.useSortable)({id:e});return(0,Ze.jsx)(bt.Box,{ref:i,sx:{transform:M0.CSS.Transform.toString(a),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:p({handleProps:{...b,...c},dragging:t})})}function cx({sortable:e,sensors:p,rowIds:b,onDragEnd:c,children:i}){let a=(0,Ze.jsx)(bt.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:i});return e?(0,Ze.jsx)(oo.DndContext,{sensors:p,collisionDetection:oo.closestCenter,modifiers:[cl.restrictToVerticalAxis,cl.restrictToParentElement],onDragEnd:c,children:(0,Ze.jsx)(Ho.SortableContext,{items:b,strategy:Ho.verticalListSortingStrategy,children:a})}):a}function $s({taskSeq:e,checklist:p,onAdd:b,onToggle:c,onRemove:i,onUpdate:a,onReorder:r,removeLocked:t=!1,onConvertToTask:n,onOpenLinkedTask:l,linkCandidates:o,linkBaseTask:s,onLinkExistingTask:f,resolveLinkedTask:h,myAccountSeq:u=0}){let[g,m]=(0,hi.useState)(""),[v,k]=(0,hi.useState)(!1),[B,O]=(0,hi.useState)(null),L=Yt(),[A,P]=(0,hi.useState)(null),[j,z]=(0,hi.useState)(null),N=W=>{let R=W.task_seq?h?.(W.task_seq):void 0;return R?R.completed:W.checked},S=W=>{if(!W.task_seq||u<=0)return!1;let R=h?.(W.task_seq);return R?!ic(R,u):!1},C=p.filter(N).length,[E,d]=(0,hi.useState)(()=>{try{return localStorage.getItem(I0)==="1"}catch{return!1}}),y=W=>{d(W);try{localStorage.setItem(I0,W?"1":"0")}catch{}},w=!!r&&!L&&!t,x=(0,oo.useSensors)((0,oo.useSensor)(oo.PointerSensor,{activationConstraint:{distance:5}})),_=(W,R)=>W.task_seq?`linked-${W.task_seq}`:`row-${R}`,T=p.map(_),D=E?T.filter((W,R)=>!N(p[R])):T,q=W=>{let{active:R,over:H}=W;if(!H||R.id===H.id)return;let M=T.indexOf(String(R.id)),I=T.indexOf(String(H.id));M<0||I<0||r?.(e,(0,Ho.arrayMove)(p,M,I))},$=()=>{g.trim()&&(b(e,g),m(""))};return(0,Ze.jsxs)(_n,{icon:(0,Ze.jsx)(R0.default,{sx:{fontSize:19,display:"block"}}),title:(0,Ze.jsxs)(Ze.Fragment,{children:["\uD560\uC77C",p.length>0?(0,Ze.jsxs)(bt.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[C," / ",p.length]}):null]}),titleExtra:p.length>0?(0,Ze.jsxs)(bt.Box,{sx:{flex:1,minWidth:0,ml:1,display:"flex",alignItems:"center",gap:1},children:[(0,Ze.jsx)(bt.Box,{sx:{flex:1,minWidth:0,height:6,borderRadius:3,bgcolor:"#ececea"},children:(0,Ze.jsx)(bt.Box,{sx:{height:"100%",borderRadius:3,width:`${Math.round(C/p.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}),C>0?(0,Ze.jsxs)(bt.Box,{component:"label",sx:{display:"inline-flex",alignItems:"center",gap:.25,flexShrink:0,cursor:"pointer",fontSize:13.5,fontWeight:400,color:"#57564f",userSelect:"none"},children:[(0,Ze.jsx)(bt.Switch,{size:"small",checked:E,onChange:(W,R)=>y(R)}),"\uC644\uB8CC\uC228\uAE40"]}):null]}):null,children:[(0,Ze.jsx)(cx,{sortable:w,sensors:x,rowIds:D,onDragEnd:q,children:p.map((W,R)=>{let H=W.task_seq?h?.(W.task_seq):void 0,M=N(W);if(E&&M)return null;let I=!!W.task_seq,F=S(W),U=X=>(0,Ze.jsxs)(bt.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.25,...w?{ml:-3,pl:.5}:{},py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1},"&:hover .taskbox-checklist-handle":{opacity:1}},children:[X?(0,Ze.jsx)(bt.Box,{className:"taskbox-checklist-handle",...X,sx:{display:"inline-flex",flexShrink:0,alignItems:"center",color:"#c9c8c5",opacity:0,transition:"opacity 0.15s",cursor:"grab","&:active":{cursor:"grabbing"},touchAction:"none",userSelect:"none"},children:(0,Ze.jsx)(O0.default,{sx:{fontSize:16}})}):null,(0,Ze.jsx)(bt.Tooltip,{title:F?"\uC5F0\uACB0 \uC5C5\uBB34\uC758 \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC \uC644\uB8CC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4":"",arrow:!0,disableInteractive:!0,children:(0,Ze.jsx)(bt.Box,{component:"span",onClick:F?void 0:()=>c(e,R,!M),sx:{display:"inline-flex",flexShrink:0,cursor:F?"default":"pointer"},children:M?(0,Ze.jsx)(A0.default,{sx:{fontSize:18,color:F?"#a9c6ec":"#2f80ed"}}):(0,Ze.jsx)(N0.default,{sx:{fontSize:18,color:F?"#d6d5d1":"#9a9a97"}})})}),B?.index===R?(0,Ze.jsx)(bt.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:B.label,enterKeyHint:"done",onChange:V=>O({index:R,label:V.target.value}),onBlur:()=>{B.label.trim()&&B.label.trim()!==W.label&&a?.(e,R,B.label),O(null)},onKeyDown:V=>{V.key==="Enter"&&V.target.blur(),V.key==="Escape"&&O(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):(0,Ze.jsx)(bt.Box,{component:"span",onClick:I?W.task_seq&&l?()=>l(W.task_seq):void 0:t||!a?void 0:L?()=>P({index:R,label:W.label}):()=>O({index:R,label:W.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:M?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...I?l?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:t||!a?{}:{cursor:"text"}},children:W.label}),I?(0,Ze.jsxs)(bt.Box,{component:"span",onClick:W.task_seq&&l?()=>l(W.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...l?{cursor:"pointer"}:{}},children:[(0,Ze.jsx)(D0.default,{sx:{fontSize:12}}),H?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!t&&!I&&n?(0,Ze.jsx)(bt.Tooltip,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:(0,Ze.jsx)(bt.IconButton,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:V=>z({anchorEl:V.currentTarget,index:R,label:W.label}),sx:{display:L?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,Ze.jsx)(Gc.default,{sx:{fontSize:16}})})}):null,t?null:(0,Ze.jsx)(bt.IconButton,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>i(e,R),sx:{display:L?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,Ze.jsx)(Kc.default,{sx:{fontSize:15}})})]});return w?(0,Ze.jsx)(lx,{id:T[R],children:({handleProps:X})=>U(X)},T[R]):(0,Ze.jsx)(bt.Box,{children:U(null)},T[R])})}),(0,Ze.jsxs)(bt.Box,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[(0,Ze.jsx)(bt.Box,{component:"input",spellCheck:!1,value:g,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:W=>m(W.target.value),onKeyDown:W=>{W.key==="Enter"&&$()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),o&&s&&f?(0,Ze.jsx)(bt.Tooltip,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:(0,Ze.jsx)(bt.IconButton,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:W=>W.preventDefault(),onClick:()=>k(!0),sx:{flexShrink:0,color:"#9a9a97"},children:(0,Ze.jsx)(P0.default,{sx:{fontSize:20}})})}):null,(0,Ze.jsx)(bt.IconButton,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!g.trim(),onMouseDown:W=>W.preventDefault(),onClick:$,sx:{flexShrink:0,color:g.trim()?"#2f80ed":"#c9c8c5"},children:(0,Ze.jsx)(E0.default,{sx:{fontSize:20}})})]}),o&&s&&f?(0,Ze.jsx)(qs,{open:v,task:s,tasks:o,excludeSeqs:p.map(W=>Number(W.task_seq??0)).filter(W=>W>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>k(!1),onSubmit:W=>{let R=o.find(H=>H.seq===W);f(e,W,String(R?.title??"").trim())}}):null,(0,Ze.jsx)(Xt,{open:!!j,anchorEl:j?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>z(null),onConfirm:()=>{j&&n?.(e,j.index,j.label),z(null)}}),(0,Ze.jsx)(bt.Dialog,{open:!!A,onClose:()=>P(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:(0,Ze.jsxs)(bt.Box,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[(0,Ze.jsx)(bt.Box,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),(0,Ze.jsx)(bt.TextField,{autoFocus:!0,fullWidth:!0,size:"medium",value:A?.label??"",onChange:W=>P(R=>R&&{...R,label:W.target.value}),onKeyDown:W=>{if(W.key!=="Enter")return;let R=A;R&&R.label.trim()&&a?.(e,R.index,R.label.trim()),P(null)}}),(0,Ze.jsxs)(bt.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[!t&&n&&A&&!p[A.index]?.task_seq?(0,Ze.jsx)(bt.IconButton,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{n(e,A.index,p[A.index]?.label??""),P(null)},sx:{color:"#57564f"},children:(0,Ze.jsx)(Gc.default,{sx:{fontSize:20}})}):null,!t&&A?(0,Ze.jsx)(bt.IconButton,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{i(e,A.index),P(null)},sx:{color:"#e5484d"},children:(0,Ze.jsx)(Kc.default,{sx:{fontSize:19}})}):null,(0,Ze.jsx)(bt.Box,{sx:{flex:1}}),(0,Ze.jsx)(bt.Button,{color:"inherit",onClick:()=>P(null),children:"\uCDE8\uC18C"}),(0,Ze.jsx)(bt.Button,{variant:"contained",disabled:!A?.label.trim(),onClick:()=>{A&&A.label.trim()&&a?.(e,A.index,A.label.trim()),P(null)},children:"\uD655\uC778"})]})]})})]})}var pl=require("react"),kn=require("@mui/material"),L0=Z(require("@mui/icons-material/Close"),1),Zc=Z(require("@mui/icons-material/AttachFileOutlined"),1);var ux=new Set(["jpg","jpeg","png","gif","bmp","webp","svg","pdf","txt","json","xml","log","md","markdown","csv","xls","xlsx","html","htm","js","jsx","ts","tsx","css","scss","sass","less","php","py","java","c","cpp","h","hpp","cs","go","rs","rb","swift","kt","scala","sql","sh","bash","bat","ps1","yml","yaml","toml","ini","conf","mp4","avi","mov","wmv","flv","webm","mp3","wav","ogg","m4a","aac"]),ul=e=>{let p=e?.split(".").pop()?.toLowerCase()??"";return ux.has(p)};var j0=require("@mui/material");var Zi=require("react/jsx-runtime");function Yc(e){let p=Yn(),b=p.useValue("attachmentUpload.taskSeq"),c=p.useValue("attachmentUpload.index"),i=p.useValue("attachmentUpload.total"),a=p.useValue("attachmentUpload.queue"),r=c??0;return!r||e>0&&(b??0)!==e?null:{index:r,total:i??0,queue:a??[]}}function fl(){let p=Yn().useValue("attachmentUpload.progress");return(0,Zi.jsxs)(Zi.Fragment,{children:[p??0,"%"]})}function Xc(){let p=Yn().useValue("attachmentUpload.progress");return(0,Zi.jsx)(j0.LinearProgress,{variant:"determinate",value:p??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}var ur=require("react/jsx-runtime");function dl(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var hl={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function Hs({taskSeq:e,attachments:p,onAdd:b,onRemove:c,removeLocked:i=!1,onPreview:a,onDownload:r}){let[t,n]=(0,pl.useState)(!1),l=(0,pl.useRef)(null),o=Yt(),s=Bi(),f=Ci(),h=Yc(e),u=e===0,g=O=>{if(a){a(O);return}window.open(f(O.uuid??""),"_blank","noopener,noreferrer")},m=O=>{if(r){r(O);return}window.open(f(O.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},v=O=>h?O+1<h.index?"done":O+1===h.index?"uploading":"waiting":"waiting",k=(O,L,A,P={})=>(0,ur.jsxs)(kn.Box,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:P.uploading?"#d5e6fb":"#e6e6e3",bgcolor:P.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[(0,ur.jsxs)(kn.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,ur.jsx)(Zc.default,{sx:{fontSize:16,color:"#9a9a97"}}),L,(0,ur.jsx)(kn.Box,{component:"span",sx:{fontSize:12,color:P.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:A}),P.removeIndex!==void 0?(0,ur.jsx)(kn.IconButton,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>c(e,P.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,ur.jsx)(L0.default,{sx:{fontSize:15}})}):null]}),P.uploading?(0,ur.jsx)(Xc,{}):null]},O),B=O=>{let L=ul(O.name);return(0,ur.jsx)(kn.Box,{component:"button",type:"button",onClick:()=>L?g(O):m(O),title:`${O.name} ${L?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...hl,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:O.name})};return(0,ur.jsxs)(_n,{icon:(0,ur.jsx)(Zc.default,{sx:{fontSize:18,display:"block"}}),title:(0,ur.jsxs)(ur.Fragment,{children:["\uD30C\uC77C ",p.length>0?p.length:""]}),children:[(0,ur.jsxs)(kn.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[p.map((O,L)=>{let A=`${O.uuid||O.name}-${L}`;if(u){let P=v(L),j=P==="uploading";return k(A,(0,ur.jsx)(kn.Box,{component:"span",sx:{...hl,color:P==="done"?"#37352f":"#9a9a97"},children:O.name}),j?(0,ur.jsx)(fl,{}):dl(O.size),{uploading:j,removeIndex:!i&&!h?L:void 0})}return O.uuid?k(A,B(O),dl(O.size),{removeIndex:i?void 0:L}):k(A,(0,ur.jsx)(kn.Box,{component:"span",title:"\uC2E4\uD30C\uC77C\uC774 \uC5C6\uB294 \uC774\uC804 \uBC29\uC2DD \uCCA8\uBD80\uC785\uB2C8\uB2E4(\uB2E4\uC6B4\uB85C\uB4DC \uBD88\uAC00) \u2014 \uB2E4\uC2DC \uCCA8\uBD80\uD574 \uC8FC\uC138\uC694.",sx:{...hl,color:"#9a9a97"},children:O.name}),dl(O.size),{removeIndex:i?void 0:L})}),!u&&h?h.queue.slice(h.index-1).map((O,L)=>{let A=L===0;return k(`uploading-${h.index+L}-${O.name}`,(0,ur.jsx)(kn.Box,{component:"span",sx:{...hl,color:"#9a9a97"},children:O.name}),A?(0,ur.jsx)(fl,{}):dl(O.size),{uploading:A})}):null]}),(0,ur.jsx)(kn.Box,{onClick:()=>l.current?.click(),onDragOver:O=>{O.preventDefault(),n(!0)},onDragLeave:()=>n(!1),onDrop:O=>{O.preventDefault(),n(!1);let L=Array.from(O.dataTransfer.files);L.length>0&&b(e,L)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:t?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:t?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:o?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${s}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${s}MB)`}),(0,ur.jsx)(kn.Box,{component:"input",ref:l,type:"file",multiple:!0,onChange:O=>{let L=Array.from(O.target.files??[]);L.length>0&&b(e,L),O.target.value=""},sx:{display:"none"}})]})}var W0=require("react"),$n=require("@mui/material"),U0=Z(require("@mui/icons-material/Add"),1);var Ws=require("react"),Ji=require("@mui/material"),z0=require("@ehfuse/mui-form-dialog"),q0=require("@ehfuse/mui-form-controls"),$0=require("@ehfuse/mui-color-picker"),H0=require("@ehfuse/alerts");var io=require("react/jsx-runtime"),F0="#2f80ed";function Jc({open:e,onClose:p,onSubmit:b}){let[c,i]=(0,Ws.useState)(""),[a,r]=(0,Ws.useState)(F0);(0,Ws.useEffect)(()=>{e&&(i(""),r(F0))},[e]);let t=()=>{let o=c.trim();if(!o){(0,H0.ErrorAlert)("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}b(o,a),p()},n=Jl(a),l=(0,io.jsxs)(Ji.Box,{children:[(0,io.jsxs)(Ji.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[(0,io.jsx)(q0.ClearTextField,{label:"\uB77C\uBCA8 \uC774\uB984",value:c,onChange:o=>i(o.target.value),onKeyDown:o=>{o.key==="Enter"&&(o.preventDefault(),t())},fullWidth:!0,autoFocus:!0}),(0,io.jsx)($0.ColorPicker,{value:a,onChange:o=>r(o),shape:"circle",colorSize:28})]}),(0,io.jsxs)(Ji.Box,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",(0,io.jsx)(Gt,{option:{key:"__preview__",name:c.trim()||"\uB77C\uBCA8",...n}})]})]});return(0,io.jsx)(z0.FormDialog,{open:e,onClose:p,maxWidth:"xs",title:"\uC0C8 \uB77C\uBCA8 \uCD94\uAC00",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-label",sections:[{id:"add-label",showTitle:!1,children:l}],actions:{showCancelButton:!0,right:(0,io.jsx)(Ji.Button,{variant:"contained",onClick:t,children:"\uCD94\uAC00"})}})}var hn=require("react/jsx-runtime");function Us({anchorEl:e,selectedKeys:p,labelOptions:b,onToggle:c,onAddLabel:i,onClose:a}){let[r,t]=(0,W0.useState)(!1),n=Xn();return(0,hn.jsxs)(hn.Fragment,{children:[(0,hn.jsxs)($n.Menu,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,...n,children:[b.map(l=>{let o=p.includes(l.key);return(0,hn.jsxs)($n.MenuItem,{onClick:()=>c(l.key),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,hn.jsx)($n.Checkbox,{size:"small",checked:o,sx:{p:0}}),(0,hn.jsx)(Gt,{option:l})]},l.key)}),(0,hn.jsx)($n.Divider,{}),(0,hn.jsxs)($n.MenuItem,{onClick:()=>t(!0),sx:{fontSize:14,color:"#787774"},children:[(0,hn.jsx)($n.ListItemIcon,{children:(0,hn.jsx)(U0.default,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),(0,hn.jsx)(Jc,{open:r,onClose:()=>t(!1),onSubmit:i})]})}function V0(e,p){let b=Number(e.author_account_seq??0);return p.filter(c=>{let i=Number(c.account_seq??0);return i>0&&i!==b})}function K0(e,p){let b=(e.target_account_seqs??[]).filter(s=>s>0);if(b.length===0)return null;let c=new Set(b),i=V0(e,p),a=new Map;for(let s of i){let f=String(s.department??"").trim();if(!f)continue;let h=a.get(f)??[];h.push(s),a.set(f,h)}let r=[],t=new Set;for(let[s,f]of a)if(f.every(u=>c.has(Number(u.account_seq??0)))){r.push(s);for(let u of f)t.add(Number(u.account_seq??0))}let n=new Map(i.map(s=>[Number(s.account_seq??0),s.name])),l=e.target_names??[],o=[];return b.forEach((s,f)=>{t.has(s)||o.push(n.get(s)??l[f]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:r,individualNames:o}}function Vs(e,p){let b=K0(e,p);return b?[...b.teamNames,...b.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function fx(e,p){let b=K0(e,p);return b?{kind:"members",teamNames:b.teamNames,individualNames:b.individualNames}:{kind:"everyone"}}function Qc(e,p,b){let c=(e.target_account_seqs??[]).filter(h=>h>0),i=V0(e,p),a=c.length>0?c.length:i.length,r=e.acks??[],t=b>0&&r.some(h=>h.account_seq===b),n=b>0&&Number(e.author_account_seq??0)===b,l=c.length===0||c.includes(b),o=new Set(r.map(h=>h.account_seq)),f=(c.length>0?i.filter(h=>c.includes(Number(h.account_seq??0))):i).filter(h=>!o.has(Number(h.account_seq??0))).map(h=>String(h.name??"").trim()).filter(h=>h.length>0);return{count:r.length,total:a,acked:t,pendingNames:f,canAck:b>0&&!n&&l&&!t&&!e.completed}}function eu(e,p){let b=Number(p)||50,c=b*1024*1024,i=e.filter(t=>t.size>c),a=e.filter(t=>t.size<=c),r=i.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${b}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
|
|
34
|
+
`).trim()}function zs({syncKey:e,value:p,onChange:b,readOnly:c=!1,minHeight:i=180,height:a=0,onChangeHeight:r}){let t=(0,dn.useRef)(null),n=(0,dn.useRef)(null),l=a>0?a:0,o=(0,dn.useRef)(l),s=(0,dn.useRef)(r);s.current=r;let f=(0,dn.useRef)(null),h=(0,dn.useRef)(Date.now()+800),[u,g]=(0,dn.useState)(!1),m=Yt();(0,dn.useEffect)(()=>{if(c)return;let k=Vc(p);f.current===k||f.current===p||(f.current=k,h.current=Date.now()+800,t.current?.setHtml(k))},[e,p,c]);let v=(0,dn.useRef)(-1);return(0,dn.useEffect)(()=>{if(c||m||a<=0||v.current===a||(v.current=a,Math.abs(a-o.current)<1))return;let k=n.current?.querySelector(".ehfuse-editor-container");k&&(Math.abs(k.getBoundingClientRect().height-a)<1||(k.style.height=`${a}px`,o.current=a))},[c,m,a]),(0,dn.useEffect)(()=>{if(c||m)return;let k=n.current?.querySelector(".ehfuse-editor-container");if(!k||typeof ResizeObserver>"u")return;let B,O=new ResizeObserver(L=>{let A=Math.round(L[0]?.contentRect.height??0);A<=0||(window.clearTimeout(B),B=window.setTimeout(()=>{Math.abs(A-o.current)<1||(o.current=A,s.current?.(A))},300))});return O.observe(k),()=>{window.clearTimeout(B),O.disconnect()}},[c,m]),c?(0,no.jsxs)(qo.Box,{sx:{position:"relative",mt:1},children:[(0,no.jsx)(qo.Box,{sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:"40px",minHeight:i,fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word",userSelect:"none","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0}},dangerouslySetInnerHTML:{__html:Vc(p)}}),(0,no.jsx)(qo.Tooltip,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,no.jsx)(qo.IconButton,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(v0(p)).then(()=>{g(!0),window.setTimeout(()=>g(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:u?(0,no.jsx)(x0.default,{sx:{fontSize:17,color:"#2f9e5b"}}):(0,no.jsx)(y0.default,{sx:{fontSize:17}})})})]}):(0,no.jsx)(qo.Box,{ref:n,onDragOver:k=>k.stopPropagation(),onDrop:k=>k.stopPropagation(),sx:{mt:1,"& .ehfuse-editor-content > p:first-of-type":{mt:0},"& .ehfuse-editor-content > p:last-of-type":{mb:0},"& .ehfuse-editor-content.ehfuse-editor-empty::before":{top:"12px",left:"12px"}},children:(0,no.jsx)(ll.EhfuseEditor,{ref:t,defaultValue:Vc(p),autoHeight:m,resizable:!m,showToolbar:!m,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:ll.minimalToolbarOptions,locale:"ko",minHeight:l||i,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:k=>{let B=Date.now()<h.current,O=k===f.current;f.current=k,!(B||O)&&b(k)}})})}var hi=require("react"),bt=require("@mui/material"),oo=require("@dnd-kit/core"),cl=require("@dnd-kit/modifiers"),Ho=require("@dnd-kit/sortable"),M0=require("@dnd-kit/utilities"),Kc=Z(require("@mui/icons-material/Close"),1),E0=Z(require("@mui/icons-material/AddCircle"),1),Gc=Z(require("@mui/icons-material/AddTask"),1),R0=Z(require("@mui/icons-material/Checklist"),1),A0=Z(require("@mui/icons-material/CheckCircle"),1),O0=Z(require("@mui/icons-material/DragIndicator"),1),D0=Z(require("@mui/icons-material/Launch"),1),P0=Z(require("@mui/icons-material/LinkOutlined"),1),N0=Z(require("@mui/icons-material/RadioButtonUnchecked"),1);var $o=require("react"),Xr=require("@mui/material"),_0=require("@ehfuse/mui-form-dialog"),k0=require("@ehfuse/mui-form-controls"),S0=require("@ehfuse/alerts"),T0=Z(require("@mui/icons-material/CheckCircle"),1),C0=Z(require("@mui/icons-material/RadioButtonUnchecked"),1),B0=require("@ehfuse/overlay-scrollbar");var kr=require("react/jsx-runtime"),w0=[{type:"related",label:"\uAD00\uB828",hint:"\uB2E8\uC21C\uD788 \uAD00\uB828 \uC788\uB294 \uC5C5\uBB34\uB85C \uC5F0\uACB0\uD569\uB2C8\uB2E4"},{type:"follow_up",label:"\uC774\uC804 \uC5C5\uBB34",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C4 \uD6C4\uC18D\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4(\uC774\uB825 \uD0C0\uC784\uB77C\uC778)"},{type:"duplicate_of",label:"\uC911\uBCF5(\uC6D0\uBCF8)",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC6D0\uBCF8 \uC5C5\uBB34\uC758 \uC911\uBCF5\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4"}];function qs({open:e,task:p,tasks:b,excludeSeqs:c=[],onClose:i,onSubmit:a,hideRelationType:r=!1,title:t="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:n="\uC5F0\uACB0",multiSelect:l=!1}){let o=Yt(),[s,f]=(0,$o.useState)("related"),[h,u]=(0,$o.useState)(""),[g,m]=(0,$o.useState)([]);(0,$o.useEffect)(()=>{e&&(f("related"),u(""),m([]))},[e]);let v=(0,$o.useMemo)(()=>{let A=new Set([p.seq,...c]),P=h.trim().toLowerCase();return b.filter(j=>A.has(j.seq)||j.is_event||j.is_notice||j.linked_only?!1:P?j.title.toLowerCase().includes(P)||(j.ticket_no??"").toLowerCase().includes(P):!0).sort((j,z)=>!!j.completed!=!!z.completed?j.completed?1:-1:z.seq-j.seq)},[b,p.seq,c,h]),k=()=>{if(g.length===0){(0,S0.ErrorAlert)("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let A of g)a(A,s);i()},B=A=>{m(P=>P.includes(A)?P.filter(j=>j!==A):l?[...P,A]:[A])},O=w0.find(A=>A.type===s)?.hint??"",L=(0,kr.jsxs)(Xr.Box,{sx:{...o?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...o?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[r?null:(0,kr.jsx)(Xr.Tabs,{value:s,onChange:(A,P)=>f(P),sx:{minHeight:38,mb:.75,flexShrink:0,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:w0.map(A=>(0,kr.jsx)(Xr.Tab,{value:A.type,label:A.label},A.type))}),r?null:(0,kr.jsx)(Xr.Box,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:O}),(0,kr.jsx)(Xr.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,kr.jsx)(k0.ClearTextField,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:h,onChange:A=>u(A.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),(0,kr.jsx)(Xr.Box,{sx:{flex:1,minHeight:0},children:(0,kr.jsx)(B0.OverlayScrollbar,{style:{height:"100%"},contentStyle:{paddingTop:0},children:(0,kr.jsx)(Xr.Box,{sx:{display:"flex",flexDirection:"column"},children:v.length===0?(0,kr.jsx)(Xr.Box,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):v.map(A=>{let P=A.is_notice||A.is_event?It(A.icon||(A.is_notice?hr:Cr)):null,j=g.includes(A.seq);return(0,kr.jsxs)(Xr.Box,{onClick:()=>B(A.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.5,py:1.25,flexShrink:0,cursor:"pointer",borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none"},bgcolor:j?"#e3eefb":"transparent","&:hover":{bgcolor:j?"#e3eefb":"#f7f7f5"}},children:[j?(0,kr.jsx)(T0.default,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):(0,kr.jsx)(C0.default,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),P?(0,kr.jsx)(P,{sx:{fontSize:17,flexShrink:0,color:A.icon_color||"#1e3a8a"}}):null,(0,kr.jsxs)(Xr.Box,{component:"span",sx:{flex:1,minWidth:0,fontSize:15,color:"#37352f",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",lineHeight:1.5,wordBreak:"break-word"},children:[A.ticket_no?`${A.ticket_no} `:"",A.title]}),(0,kr.jsx)(Xr.Box,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:(0,kr.jsx)(Gt,{option:Br(A)})})]},A.seq)})})})})]});return(0,kr.jsx)(_0.FormDialog,{open:e,onClose:i,maxWidth:"sm",fullScreen:o,mobilePresentation:o?"slide":"dialog",...o?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop:0}:{},sx:o?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:t,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:L}],scrollPastLastSection:!1,sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:(0,kr.jsx)(Xr.Button,{variant:"contained",disabled:g.length===0,onClick:k,children:n})}})}var Ze=require("react/jsx-runtime"),I0="taskbox.checklist.hideCompleted";function lx({id:e,children:p}){let{attributes:b,listeners:c,setNodeRef:i,transform:a,transition:r,isDragging:t}=(0,Ho.useSortable)({id:e});return(0,Ze.jsx)(bt.Box,{ref:i,sx:{transform:M0.CSS.Transform.toString(a),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:p({handleProps:{...b,...c},dragging:t})})}function cx({sortable:e,sensors:p,rowIds:b,onDragEnd:c,children:i}){let a=(0,Ze.jsx)(bt.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:i});return e?(0,Ze.jsx)(oo.DndContext,{sensors:p,collisionDetection:oo.closestCenter,modifiers:[cl.restrictToVerticalAxis,cl.restrictToParentElement],onDragEnd:c,children:(0,Ze.jsx)(Ho.SortableContext,{items:b,strategy:Ho.verticalListSortingStrategy,children:a})}):a}function $s({taskSeq:e,checklist:p,onAdd:b,onToggle:c,onRemove:i,onUpdate:a,onReorder:r,removeLocked:t=!1,onConvertToTask:n,onOpenLinkedTask:l,linkCandidates:o,linkBaseTask:s,onLinkExistingTask:f,resolveLinkedTask:h,myAccountSeq:u=0}){let[g,m]=(0,hi.useState)(""),[v,k]=(0,hi.useState)(!1),[B,O]=(0,hi.useState)(null),L=Yt(),[A,P]=(0,hi.useState)(null),[j,z]=(0,hi.useState)(null),N=W=>{let R=W.task_seq?h?.(W.task_seq):void 0;return R?R.completed:W.checked},S=W=>{if(!W.task_seq||u<=0)return!1;let R=h?.(W.task_seq);return R?!ic(R,u):!1},C=p.filter(N).length,[E,d]=(0,hi.useState)(()=>{try{return localStorage.getItem(I0)==="1"}catch{return!1}}),y=W=>{d(W);try{localStorage.setItem(I0,W?"1":"0")}catch{}},w=!!r&&!L&&!t,x=(0,oo.useSensors)((0,oo.useSensor)(oo.PointerSensor,{activationConstraint:{distance:5}})),_=(W,R)=>W.task_seq?`linked-${W.task_seq}`:`row-${R}`,T=p.map(_),D=E?T.filter((W,R)=>!N(p[R])):T,q=W=>{let{active:R,over:H}=W;if(!H||R.id===H.id)return;let M=T.indexOf(String(R.id)),I=T.indexOf(String(H.id));M<0||I<0||r?.(e,(0,Ho.arrayMove)(p,M,I))},$=()=>{g.trim()&&(b(e,g),m(""))};return(0,Ze.jsxs)(_n,{icon:(0,Ze.jsx)(R0.default,{sx:{fontSize:19,display:"block"}}),title:(0,Ze.jsxs)(Ze.Fragment,{children:["\uD560\uC77C",p.length>0?(0,Ze.jsxs)(bt.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[C," / ",p.length]}):null]}),titleExtra:p.length>0?(0,Ze.jsxs)(bt.Box,{sx:{flex:1,minWidth:0,ml:1,display:"flex",alignItems:"center",gap:1},children:[(0,Ze.jsx)(bt.Box,{sx:{flex:1,minWidth:0,height:6,borderRadius:3,bgcolor:"#ececea"},children:(0,Ze.jsx)(bt.Box,{sx:{height:"100%",borderRadius:3,width:`${Math.round(C/p.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}),C>0?(0,Ze.jsxs)(bt.Box,{component:"label",sx:{display:"inline-flex",alignItems:"center",gap:.25,flexShrink:0,cursor:"pointer",fontSize:13.5,fontWeight:400,color:"#57564f",userSelect:"none"},children:[(0,Ze.jsx)(bt.Switch,{size:"small",checked:E,onChange:(W,R)=>y(R)}),"\uC644\uB8CC\uC228\uAE40"]}):null]}):null,children:[(0,Ze.jsx)(cx,{sortable:w,sensors:x,rowIds:D,onDragEnd:q,children:p.map((W,R)=>{let H=W.task_seq?h?.(W.task_seq):void 0,M=N(W);if(E&&M)return null;let I=!!W.task_seq,F=S(W),U=X=>(0,Ze.jsxs)(bt.Box,{sx:{display:"flex",alignItems:L?"flex-start":"center",gap:1,px:1.25,...w?{ml:-3,pl:.5}:{},py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1},"&:hover .taskbox-checklist-handle":{opacity:1}},children:[X?(0,Ze.jsx)(bt.Box,{className:"taskbox-checklist-handle",...X,sx:{display:"inline-flex",flexShrink:0,alignItems:"center",color:"#c9c8c5",opacity:0,transition:"opacity 0.15s",cursor:"grab","&:active":{cursor:"grabbing"},touchAction:"none",userSelect:"none"},children:(0,Ze.jsx)(O0.default,{sx:{fontSize:16}})}):null,(0,Ze.jsx)(bt.Tooltip,{title:F?"\uC5F0\uACB0 \uC5C5\uBB34\uC758 \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC \uC644\uB8CC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4":"",arrow:!0,disableInteractive:!0,children:(0,Ze.jsx)(bt.Box,{component:"span",onClick:F?void 0:()=>c(e,R,!M),sx:{display:"inline-flex",flexShrink:0,cursor:F?"default":"pointer",...L?{mt:"1px"}:{}},children:M?(0,Ze.jsx)(A0.default,{sx:{fontSize:18,color:F?"#a9c6ec":"#2f80ed"}}):(0,Ze.jsx)(N0.default,{sx:{fontSize:18,color:F?"#d6d5d1":"#9a9a97"}})})}),B?.index===R?(0,Ze.jsx)(bt.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:B.label,enterKeyHint:"done",onChange:V=>O({index:R,label:V.target.value}),onBlur:()=>{B.label.trim()&&B.label.trim()!==W.label&&a?.(e,R,B.label),O(null)},onKeyDown:V=>{V.key==="Enter"&&V.target.blur(),V.key==="Escape"&&O(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):(0,Ze.jsx)(bt.Box,{component:"span",onClick:I?W.task_seq&&l?()=>l(W.task_seq):void 0:t||!a?void 0:L?()=>P({index:R,label:W.label}):()=>O({index:R,label:W.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:M?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",...L?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,lineHeight:1.4,wordBreak:"break-word"}:{whiteSpace:"nowrap"},...I?l?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:t||!a?{}:{cursor:"text"}},children:W.label}),I?(0,Ze.jsxs)(bt.Box,{component:"span",onClick:W.task_seq&&l?()=>l(W.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,...L?{mt:"1px"}:{},px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...l?{cursor:"pointer"}:{}},children:[(0,Ze.jsx)(D0.default,{sx:{fontSize:12}}),H?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!t&&!I&&n?(0,Ze.jsx)(bt.Tooltip,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:(0,Ze.jsx)(bt.IconButton,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:V=>z({anchorEl:V.currentTarget,index:R,label:W.label}),sx:{display:L?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,Ze.jsx)(Gc.default,{sx:{fontSize:16}})})}):null,t?null:(0,Ze.jsx)(bt.IconButton,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>i(e,R),sx:{display:L?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,Ze.jsx)(Kc.default,{sx:{fontSize:15}})})]});return w?(0,Ze.jsx)(lx,{id:T[R],children:({handleProps:X})=>U(X)},T[R]):(0,Ze.jsx)(bt.Box,{children:U(null)},T[R])})}),(0,Ze.jsxs)(bt.Box,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[(0,Ze.jsx)(bt.Box,{component:"input",spellCheck:!1,value:g,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:W=>m(W.target.value),onKeyDown:W=>{W.key==="Enter"&&$()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),o&&s&&f?(0,Ze.jsx)(bt.Tooltip,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:(0,Ze.jsx)(bt.IconButton,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:W=>W.preventDefault(),onClick:()=>k(!0),sx:{flexShrink:0,color:"#9a9a97"},children:(0,Ze.jsx)(P0.default,{sx:{fontSize:20}})})}):null,(0,Ze.jsx)(bt.IconButton,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!g.trim(),onMouseDown:W=>W.preventDefault(),onClick:$,sx:{flexShrink:0,color:g.trim()?"#2f80ed":"#c9c8c5"},children:(0,Ze.jsx)(E0.default,{sx:{fontSize:20}})})]}),o&&s&&f?(0,Ze.jsx)(qs,{open:v,task:s,tasks:o,excludeSeqs:p.map(W=>Number(W.task_seq??0)).filter(W=>W>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>k(!1),onSubmit:W=>{let R=o.find(H=>H.seq===W);f(e,W,String(R?.title??"").trim())}}):null,(0,Ze.jsx)(Xt,{open:!!j,anchorEl:j?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>z(null),onConfirm:()=>{j&&n?.(e,j.index,j.label),z(null)}}),(0,Ze.jsx)(bt.Dialog,{open:!!A,onClose:()=>P(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:(0,Ze.jsxs)(bt.Box,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[(0,Ze.jsx)(bt.Box,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),(0,Ze.jsx)(bt.TextField,{autoFocus:!0,fullWidth:!0,size:"medium",value:A?.label??"",onChange:W=>P(R=>R&&{...R,label:W.target.value}),onKeyDown:W=>{if(W.key!=="Enter")return;let R=A;R&&R.label.trim()&&a?.(e,R.index,R.label.trim()),P(null)}}),(0,Ze.jsxs)(bt.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[!t&&n&&A&&!p[A.index]?.task_seq?(0,Ze.jsx)(bt.IconButton,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{n(e,A.index,p[A.index]?.label??""),P(null)},sx:{color:"#57564f"},children:(0,Ze.jsx)(Gc.default,{sx:{fontSize:20}})}):null,!t&&A?(0,Ze.jsx)(bt.IconButton,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{i(e,A.index),P(null)},sx:{color:"#e5484d"},children:(0,Ze.jsx)(Kc.default,{sx:{fontSize:19}})}):null,(0,Ze.jsx)(bt.Box,{sx:{flex:1}}),(0,Ze.jsx)(bt.Button,{color:"inherit",onClick:()=>P(null),children:"\uCDE8\uC18C"}),(0,Ze.jsx)(bt.Button,{variant:"contained",disabled:!A?.label.trim(),onClick:()=>{A&&A.label.trim()&&a?.(e,A.index,A.label.trim()),P(null)},children:"\uD655\uC778"})]})]})})]})}var pl=require("react"),kn=require("@mui/material"),L0=Z(require("@mui/icons-material/Close"),1),Zc=Z(require("@mui/icons-material/AttachFileOutlined"),1);var ux=new Set(["jpg","jpeg","png","gif","bmp","webp","svg","pdf","txt","json","xml","log","md","markdown","csv","xls","xlsx","html","htm","js","jsx","ts","tsx","css","scss","sass","less","php","py","java","c","cpp","h","hpp","cs","go","rs","rb","swift","kt","scala","sql","sh","bash","bat","ps1","yml","yaml","toml","ini","conf","mp4","avi","mov","wmv","flv","webm","mp3","wav","ogg","m4a","aac"]),ul=e=>{let p=e?.split(".").pop()?.toLowerCase()??"";return ux.has(p)};var j0=require("@mui/material");var Zi=require("react/jsx-runtime");function Yc(e){let p=Yn(),b=p.useValue("attachmentUpload.taskSeq"),c=p.useValue("attachmentUpload.index"),i=p.useValue("attachmentUpload.total"),a=p.useValue("attachmentUpload.queue"),r=c??0;return!r||e>0&&(b??0)!==e?null:{index:r,total:i??0,queue:a??[]}}function fl(){let p=Yn().useValue("attachmentUpload.progress");return(0,Zi.jsxs)(Zi.Fragment,{children:[p??0,"%"]})}function Xc(){let p=Yn().useValue("attachmentUpload.progress");return(0,Zi.jsx)(j0.LinearProgress,{variant:"determinate",value:p??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}var ur=require("react/jsx-runtime");function dl(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var hl={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function Hs({taskSeq:e,attachments:p,onAdd:b,onRemove:c,removeLocked:i=!1,onPreview:a,onDownload:r}){let[t,n]=(0,pl.useState)(!1),l=(0,pl.useRef)(null),o=Yt(),s=Bi(),f=Ci(),h=Yc(e),u=e===0,g=O=>{if(a){a(O);return}window.open(f(O.uuid??""),"_blank","noopener,noreferrer")},m=O=>{if(r){r(O);return}window.open(f(O.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},v=O=>h?O+1<h.index?"done":O+1===h.index?"uploading":"waiting":"waiting",k=(O,L,A,P={})=>(0,ur.jsxs)(kn.Box,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:P.uploading?"#d5e6fb":"#e6e6e3",bgcolor:P.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[(0,ur.jsxs)(kn.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,ur.jsx)(Zc.default,{sx:{fontSize:16,color:"#9a9a97"}}),L,(0,ur.jsx)(kn.Box,{component:"span",sx:{fontSize:12,color:P.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:A}),P.removeIndex!==void 0?(0,ur.jsx)(kn.IconButton,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>c(e,P.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,ur.jsx)(L0.default,{sx:{fontSize:15}})}):null]}),P.uploading?(0,ur.jsx)(Xc,{}):null]},O),B=O=>{let L=ul(O.name);return(0,ur.jsx)(kn.Box,{component:"button",type:"button",onClick:()=>L?g(O):m(O),title:`${O.name} ${L?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...hl,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:O.name})};return(0,ur.jsxs)(_n,{icon:(0,ur.jsx)(Zc.default,{sx:{fontSize:18,display:"block"}}),title:(0,ur.jsxs)(ur.Fragment,{children:["\uD30C\uC77C ",p.length>0?p.length:""]}),children:[(0,ur.jsxs)(kn.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[p.map((O,L)=>{let A=`${O.uuid||O.name}-${L}`;if(u){let P=v(L),j=P==="uploading";return k(A,(0,ur.jsx)(kn.Box,{component:"span",sx:{...hl,color:P==="done"?"#37352f":"#9a9a97"},children:O.name}),j?(0,ur.jsx)(fl,{}):dl(O.size),{uploading:j,removeIndex:!i&&!h?L:void 0})}return O.uuid?k(A,B(O),dl(O.size),{removeIndex:i?void 0:L}):k(A,(0,ur.jsx)(kn.Box,{component:"span",title:"\uC2E4\uD30C\uC77C\uC774 \uC5C6\uB294 \uC774\uC804 \uBC29\uC2DD \uCCA8\uBD80\uC785\uB2C8\uB2E4(\uB2E4\uC6B4\uB85C\uB4DC \uBD88\uAC00) \u2014 \uB2E4\uC2DC \uCCA8\uBD80\uD574 \uC8FC\uC138\uC694.",sx:{...hl,color:"#9a9a97"},children:O.name}),dl(O.size),{removeIndex:i?void 0:L})}),!u&&h?h.queue.slice(h.index-1).map((O,L)=>{let A=L===0;return k(`uploading-${h.index+L}-${O.name}`,(0,ur.jsx)(kn.Box,{component:"span",sx:{...hl,color:"#9a9a97"},children:O.name}),A?(0,ur.jsx)(fl,{}):dl(O.size),{uploading:A})}):null]}),(0,ur.jsx)(kn.Box,{onClick:()=>l.current?.click(),onDragOver:O=>{O.preventDefault(),n(!0)},onDragLeave:()=>n(!1),onDrop:O=>{O.preventDefault(),n(!1);let L=Array.from(O.dataTransfer.files);L.length>0&&b(e,L)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:t?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:t?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:o?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${s}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${s}MB)`}),(0,ur.jsx)(kn.Box,{component:"input",ref:l,type:"file",multiple:!0,onChange:O=>{let L=Array.from(O.target.files??[]);L.length>0&&b(e,L),O.target.value=""},sx:{display:"none"}})]})}var W0=require("react"),$n=require("@mui/material"),U0=Z(require("@mui/icons-material/Add"),1);var Ws=require("react"),Ji=require("@mui/material"),z0=require("@ehfuse/mui-form-dialog"),q0=require("@ehfuse/mui-form-controls"),$0=require("@ehfuse/mui-color-picker"),H0=require("@ehfuse/alerts");var io=require("react/jsx-runtime"),F0="#2f80ed";function Jc({open:e,onClose:p,onSubmit:b}){let[c,i]=(0,Ws.useState)(""),[a,r]=(0,Ws.useState)(F0);(0,Ws.useEffect)(()=>{e&&(i(""),r(F0))},[e]);let t=()=>{let o=c.trim();if(!o){(0,H0.ErrorAlert)("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}b(o,a),p()},n=Jl(a),l=(0,io.jsxs)(Ji.Box,{children:[(0,io.jsxs)(Ji.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[(0,io.jsx)(q0.ClearTextField,{label:"\uB77C\uBCA8 \uC774\uB984",value:c,onChange:o=>i(o.target.value),onKeyDown:o=>{o.key==="Enter"&&(o.preventDefault(),t())},fullWidth:!0,autoFocus:!0}),(0,io.jsx)($0.ColorPicker,{value:a,onChange:o=>r(o),shape:"circle",colorSize:28})]}),(0,io.jsxs)(Ji.Box,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",(0,io.jsx)(Gt,{option:{key:"__preview__",name:c.trim()||"\uB77C\uBCA8",...n}})]})]});return(0,io.jsx)(z0.FormDialog,{open:e,onClose:p,maxWidth:"xs",title:"\uC0C8 \uB77C\uBCA8 \uCD94\uAC00",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-label",sections:[{id:"add-label",showTitle:!1,children:l}],actions:{showCancelButton:!0,right:(0,io.jsx)(Ji.Button,{variant:"contained",onClick:t,children:"\uCD94\uAC00"})}})}var hn=require("react/jsx-runtime");function Us({anchorEl:e,selectedKeys:p,labelOptions:b,onToggle:c,onAddLabel:i,onClose:a}){let[r,t]=(0,W0.useState)(!1),n=Xn();return(0,hn.jsxs)(hn.Fragment,{children:[(0,hn.jsxs)($n.Menu,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,...n,children:[b.map(l=>{let o=p.includes(l.key);return(0,hn.jsxs)($n.MenuItem,{onClick:()=>c(l.key),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,hn.jsx)($n.Checkbox,{size:"small",checked:o,sx:{p:0}}),(0,hn.jsx)(Gt,{option:l})]},l.key)}),(0,hn.jsx)($n.Divider,{}),(0,hn.jsxs)($n.MenuItem,{onClick:()=>t(!0),sx:{fontSize:14,color:"#787774"},children:[(0,hn.jsx)($n.ListItemIcon,{children:(0,hn.jsx)(U0.default,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),(0,hn.jsx)(Jc,{open:r,onClose:()=>t(!1),onSubmit:i})]})}function V0(e,p){let b=Number(e.author_account_seq??0);return p.filter(c=>{let i=Number(c.account_seq??0);return i>0&&i!==b})}function K0(e,p){let b=(e.target_account_seqs??[]).filter(s=>s>0);if(b.length===0)return null;let c=new Set(b),i=V0(e,p),a=new Map;for(let s of i){let f=String(s.department??"").trim();if(!f)continue;let h=a.get(f)??[];h.push(s),a.set(f,h)}let r=[],t=new Set;for(let[s,f]of a)if(f.every(u=>c.has(Number(u.account_seq??0)))){r.push(s);for(let u of f)t.add(Number(u.account_seq??0))}let n=new Map(i.map(s=>[Number(s.account_seq??0),s.name])),l=e.target_names??[],o=[];return b.forEach((s,f)=>{t.has(s)||o.push(n.get(s)??l[f]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:r,individualNames:o}}function Vs(e,p){let b=K0(e,p);return b?[...b.teamNames,...b.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function fx(e,p){let b=K0(e,p);return b?{kind:"members",teamNames:b.teamNames,individualNames:b.individualNames}:{kind:"everyone"}}function Qc(e,p,b){let c=(e.target_account_seqs??[]).filter(h=>h>0),i=V0(e,p),a=c.length>0?c.length:i.length,r=e.acks??[],t=b>0&&r.some(h=>h.account_seq===b),n=b>0&&Number(e.author_account_seq??0)===b,l=c.length===0||c.includes(b),o=new Set(r.map(h=>h.account_seq)),f=(c.length>0?i.filter(h=>c.includes(Number(h.account_seq??0))):i).filter(h=>!o.has(Number(h.account_seq??0))).map(h=>String(h.name??"").trim()).filter(h=>h.length>0);return{count:r.length,total:a,acked:t,pendingNames:f,canAck:b>0&&!n&&l&&!t&&!e.completed}}function eu(e,p){let b=Number(p)||50,c=b*1024*1024,i=e.filter(t=>t.size>c),a=e.filter(t=>t.size<=c),r=i.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${b}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
|
|
35
35
|
\uC81C\uC678\uB41C \uD30C\uC77C: ${i.map(t=>t.name).join(", ")}`:null;return{accepted:a,rejected:i,message:r}}var rg=require("@ehfuse/mui-datetime-picker"),Ge=require("react/jsx-runtime"),iu="#0f9d58";function ml({form:e,statusOptions:p,customTabs:b,sprints:c=[],avatarSrcByName:i,isNotice:a=!1,hideProject:r=!1,hideBug:t=!1,leadingRow:n,hideLabel:l=!1,employees:o=[],myAccountSeq:s=0,departments:f=[],myGroupSeq:h=0,onMemberEdit:u,onAddProject:g,onAddLabelOption:m,contentSyncKey:v="create"}){let k=Yn(),B=Bi(),O=e.useFormValue("manager_name"),L=e.useFormValue("receiver_names"),A=e.useFormValue("start_date"),P=!!e.useFormValue("is_event"),j=!!e.useFormValue("is_bug"),z=e.useFormValue("bug_repro")??"",N=e.useFormValue("bug_device")??"",S=e.useFormValue("bug_where")??"",C=e.useFormValue("bug_version")??"",E=e.useFormValue("event_time")??"",d=e.useFormValue("event_place")??"",y=e.useFormValue("event_address")??"",w=e.useFormValue("due_date"),x=e.useFormValue("reminder"),_=e.useFormValue("priority"),T=e.useFormValue("content"),q=e.useFormValue("checklist")??[],$=e.useFormValue("tab_key"),W=e.useFormValue("sprint_seq")??0,R=e.useFormValue("story_points")??0,H=b.find(le=>le.key===$&&le.useSprints),M=H?c.filter(le=>`custom-${le.group_seq}`===$):[],[I,F]=(0,Qi.useState)(null),U=e.useFormValue("label_keys"),[X,V]=(0,Qi.useState)(null),G=e.useFormValue("visibility")||"involved",te=Number(e.useFormValue("visibility_group_seq")??0),[J,K]=(0,Qi.useState)(null),ee=e.useFormValue("repeat_rule")||"",Q=e.useFormValue("repeat_until")||"",[oe,se]=(0,Qi.useState)(null),[ce,ne]=(0,Qi.useState)(null),ae=e.useFormValue("target_names"),xe=e.useFormValue("target_account_seqs"),$e=k.useValue("createAttachmentFiles")??[],Ie=a?Vs({author_account_seq:s,target_names:ae,target_account_seqs:xe},o):"";return(0,Ge.jsxs)(Ge.Fragment,{children:[n,a?null:(0,Ge.jsx)(tr.Box,{sx:{display:"flex",gap:1.25,px:2,pt:1.5,pb:1.5,flexShrink:0},children:[{value:"task",label:"\uC5C5\uBB34"},{value:"event",label:"\uC77C\uC815"},...t?[]:[{value:"bug",label:"\uC624\uB958"}]].map(le=>{let Ne=j?"bug":P?"event":"task",Me=Ne===le.value;return(0,Ge.jsx)(tr.ButtonBase,{onClick:()=>{if(Ne===le.value)return;e.setFormValue("is_event",le.value==="event"),e.setFormValue("is_bug",le.value==="bug"),e.setFormValue("visibility",le.value==="bug"?"all":"involved"),e.setFormValue("visibility_group_seq",0),le.value==="bug"&&(e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until",""));let Se=e.getFormValue("icon"),Oe=e.getFormValue("icon_color"),_e=[Gn,"event",Ii].includes(Se),we=!Oe||Oe===iu||Oe===Mi;_e&&e.setFormValue("icon",le.value==="event"?"event":le.value==="bug"?Ii:Gn),we&&e.setFormValue("icon_color",le.value==="event"?iu:le.value==="bug"?Mi:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:Me?600:400,color:Me?"#ffffff":"#787774",bgcolor:Me?"#2563eb":"#f4f4f2"},children:le.label},le.label)})}),(0,Ge.jsx)(tr.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Ge.jsxs)(tr.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[(0,Ge.jsx)(Ls,{hideProject:r,hideDueDate:!P&&!!ee,hideReminder:!!ee,values:{tabKey:$,managerName:O,receiverNames:L,startDate:A,dueDate:w,reminder:x,priority:_,eventTime:E,eventPlace:d,eventAddress:y},customTabs:b,avatarSrcByName:i,notice:a,event:P,onChangeEventTime:le=>e.setFormValue("event_time",le),onChangeEventPlace:le=>e.setFormValue("event_place",le),onChangeEventAddress:le=>e.setFormValue("event_address",le),targetSummary:Ie,onChangeProject:le=>e.setFormValue("tab_key",le),onAddProject:g,onChangeStartDate:le=>e.setFormValue("start_date",le),onChangeDueDate:le=>e.setFormValue("due_date",le),onChangeReminder:le=>e.setFormValue("reminder",le),onChangePriority:le=>e.setFormValue("priority",le),onMemberEdit:u,pinColumns:!0,beforeStart:(0,Ge.jsxs)(Ge.Fragment,{children:[!a&&!j?(0,Ge.jsx)(gt,{icon:(0,Ge.jsx)(J0.default,{sx:{fontSize:17,...ee?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:le=>se(le),sx:P?void 0:mr(2),children:ee?Ds(ee):(0,Ge.jsx)(tr.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uC5C6\uC74C"})}):null,!a&&!j&&ee?(0,Ge.jsx)(gt,{icon:(0,Ge.jsx)(Q0.default,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:le=>ne(le),sx:P?void 0:mr(2),children:Q?xn(Q):(0,Ge.jsx)(tr.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uC790\uB3D9"})}):null]}),trailing:(0,Ge.jsxs)(Ge.Fragment,{children:[a?null:(0,Ge.jsx)(gt,{icon:G==="all"?(0,Ge.jsx)(ru.default,{sx:{fontSize:17,color:"#2f80ed"}}):G==="group"?(0,Ge.jsx)(nu.default,{sx:{fontSize:17,color:"#d9730d"}}):(0,Ge.jsx)(tu.default,{sx:{fontSize:17}}),label:"\uACF5\uAC1C",onClick:le=>K(le),sx:P?void 0:mr(1),children:G==="all"?"\uC804\uCCB4\uACF5\uAC1C":G==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${f.find(le=>le.seq===te)?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C"}),H&&!P&&!a?(0,Ge.jsxs)(Ge.Fragment,{children:[(0,Ge.jsx)(gt,{icon:(0,Ge.jsx)(Z0.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:le=>F(le),sx:mr(1),children:W>0?M.find(le=>le.seq===W)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":(0,Ge.jsx)(tr.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),(0,Ge.jsx)(gt,{icon:(0,Ge.jsx)(eg.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:mr(1),children:(0,Ge.jsx)(ro,{value:R>0?String(R):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:le=>e.setFormValue("story_points",Number(le.replace(/[^0-9.]/g,""))||0)})})]}):null,j?(0,Ge.jsx)(Fs,{values:{repro:z,device:N,where:S,version:C},onChangeRepro:le=>e.setFormValue("bug_repro",le),onChangeDevice:le=>e.setFormValue("bug_device",le),onChangeWhere:le=>e.setFormValue("bug_where",le),onChangeVersion:le=>e.setFormValue("bug_version",le)}):null]}),leading:P||l?null:(0,Ge.jsx)(tr.Box,{sx:{gridColumn:"1 / -1"},children:(0,Ge.jsx)(gt,{icon:(0,Ge.jsx)(X0.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:le=>V(le),children:(U??[]).length>0?(0,Ge.jsx)(yo,{labelKeys:U??[],labelOptions:p}):(0,Ge.jsx)(tr.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),(0,Ge.jsx)(tr.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,Ge.jsx)(_n,{icon:(0,Ge.jsx)(G0.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,Ge.jsx)(zs,{syncKey:v,value:T,onChange:le=>e.setFormValue("content",le)})}),P?null:(0,Ge.jsx)(tr.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),P?null:(0,Ge.jsx)($s,{taskSeq:0,checklist:q,onAdd:(le,Ne)=>e.setFormValue("checklist",[...q,{label:Ne,checked:!1}]),onToggle:(le,Ne,Me)=>e.setFormValue("checklist",q.map((Se,Oe)=>Oe===Ne?{...Se,checked:Me}:Se)),onRemove:(le,Ne)=>e.setFormValue("checklist",q.filter((Me,Se)=>Se!==Ne)),onUpdate:(le,Ne,Me)=>e.setFormValue("checklist",q.map((Se,Oe)=>Oe===Ne?{...Se,label:Me}:Se))}),(0,Ge.jsx)(tr.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,Ge.jsx)(Hs,{taskSeq:0,attachments:$e.map(le=>({name:le.name,size:le.size})),onAdd:(le,Ne)=>{let Me=eu(Ne,B);Me.message&&(0,ou.InfoAlert)(Me.message),Me.accepted.length!==0&&k.setValue("createAttachmentFiles",[...k.getValue("createAttachmentFiles")??[],...Me.accepted])},onRemove:(le,Ne)=>k.setValue("createAttachmentFiles",$e.filter((Me,Se)=>Se!==Ne))}),j?null:(0,Ge.jsxs)(Ge.Fragment,{children:[(0,Ge.jsx)(tr.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,Ge.jsx)(_n,{icon:(0,Ge.jsx)(Y0.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,Ge.jsx)(tg.TextField,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),(0,Ge.jsx)(tr.Menu,{transitionDuration:0,anchorEl:I,open:!!I,onClose:()=>F(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...M.map(le=>({seq:le.seq,label:wn(le)}))].map(le=>(0,Ge.jsx)(tr.MenuItem,{onClick:()=>{e.setFormValue("sprint_seq",le.seq),F(null)},sx:{fontSize:14,minWidth:170},children:le.label},le.seq))}),(0,Ge.jsx)(tr.Menu,{transitionDuration:0,anchorEl:oe,open:!!oe,onClose:()=>se(null),children:[{value:"",label:"\uC5C6\uC74C"},...Gi].map(le=>(0,Ge.jsx)(tr.MenuItem,{selected:ee===le.value,onClick:()=>{if(se(null),le.value===""){e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until","");return}let Ne;if(P){if(Ne=String(e.getFormValue("due_date")??"").slice(0,10),!Ne){(0,ou.InfoAlert)("\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}}else{if(Ne=String(e.getFormValue("start_date")??"").slice(0,10),!Ne){let Me=new Date,Se=Oe=>String(Oe).padStart(2,"0");Ne=`${Me.getFullYear()}-${Se(Me.getMonth()+1)}-${Se(Me.getDate())}`}e.setFormValue("due_date",""),e.setFormValue("reminder","none")}e.setFormValue("repeat_rule",le.value),e.setFormValue("repeat_until",Ps(Ne,le.value))},sx:{fontSize:14,minWidth:140},children:le.label},le.value||"none"))}),(0,Ge.jsx)(rg.DatePicker,{anchorEl:ce,open:!!ce,onClose:()=>ne(null),selectedDate:Q?new Date(`${Q}T00:00:00`):new Date,onDateChange:le=>{let Ne=Me=>String(Me).padStart(2,"0");e.setFormValue("repeat_until",`${le.getFullYear()}-${Ne(le.getMonth()+1)}-${Ne(le.getDate())}`),ne(null)}}),(0,Ge.jsx)(tr.Menu,{transitionDuration:0,anchorEl:J,open:!!J,onClose:()=>K(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",tip:"\uC791\uC131\uC790\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\uB9CC \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4",icon:(0,Ge.jsx)(tu.default,{sx:{fontSize:17,color:"#57564f"}}),selected:G==="involved",onPick:()=>{e.setFormValue("visibility","involved"),e.setFormValue("visibility_group_seq",0)}},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",tip:"\uBAA8\uB4E0 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4",icon:(0,Ge.jsx)(ru.default,{sx:{fontSize:17,color:"#2f80ed"}}),selected:G==="all",onPick:()=>{e.setFormValue("visibility","all"),e.setFormValue("visibility_group_seq",0)}},...[...f].sort((le,Ne)=>le.seq===h?-1:Ne.seq===h?1:0).map(le=>({key:`group-${le.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${le.name}`,tip:`${le.name} \uC18C\uC18D \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4`,icon:(0,Ge.jsx)(nu.default,{sx:{fontSize:17,color:"#d9730d"}}),selected:G==="group"&&te===le.seq,onPick:()=>{e.setFormValue("visibility","group"),e.setFormValue("visibility_group_seq",le.seq)}}))].map(le=>(0,Ge.jsx)(tr.Tooltip,{title:le.tip,arrow:!0,disableInteractive:!0,placement:"right",children:(0,Ge.jsxs)(tr.MenuItem,{selected:le.selected,onClick:()=>{le.onPick(),K(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[le.icon,le.label]})},le.key))}),(0,Ge.jsx)(Us,{anchorEl:X,selectedKeys:U??[],labelOptions:p,onToggle:le=>e.setFormValue("label_keys",gs(U??[],le)),onAddLabel:(le,Ne)=>m?.(le,Ne),onClose:()=>V(null)})]})}var Ft=require("react/jsx-runtime");function dx({open:e,onClose:p,...b}){let{form:c,presetTitle:i="",presetContent:a="",presetVisibility:r,presetVisibilityGroupSeq:t=0,presetDueDate:n="",presetTabKey:l="",presetManager:o=null,isNotice:s=!1,defaultBug:f=!1}=b,h=Yn(),u=(0,es.useRef)(!1),[g,m]=(0,es.useState)(0),v=c.useFormValue("title"),k=c.useFormValue("icon"),B=c.useFormValue("icon_color"),O=!!c.useFormValue("is_event"),L=!!c.useFormValue("is_bug"),A=Yt(),j=h.useValue("createSubmitting")??!1,z=s||O?It(k||(s?hr:Cr)):null,N=s?"\uACF5\uC9C0 \uB4F1\uB85D":O?"\uC77C\uC815 \uB4F1\uB85D":L?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",S=s?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":O?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":L?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";(0,es.useEffect)(()=>{let E=u.current;u.current=e,!(!e||E)&&(c.setFormValues({...c.getFormValues(),title:i,icon:s?hr:f?Ii:Gn,icon_color:s?"#e5484d":f?Mi:"",manager_name:o?.name??"",manager_account_seq:o?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:s,is_event:!1,is_bug:f,visibility:r??(f?"all":"involved"),visibility_group_seq:r==="group"?t:0,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:"",due_date:n,reminder:"none",priority:"medium",note:"",content:a,checklist:[],tab_key:l}),h.setValue("createAttachmentFiles",[]),m(d=>d+1))},[e]);let C=(0,Ft.jsxs)(gr.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[z?(0,Ft.jsx)(gr.Box,{sx:{display:"flex",p:0,color:B||"#1e3a8a"},children:(0,Ft.jsx)(z,{sx:{fontSize:20}})}):null,(0,Ft.jsx)(gr.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:v,placeholder:S,onChange:E=>c.setFormValue("title",E.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}})]});return A?(0,Ft.jsx)(Ft.Fragment,{children:(0,Ft.jsx)(ig.FormDialog,{open:e,onClose:p,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:N,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:(0,Ft.jsx)(gr.Button,{variant:"contained",size:"small",disableElevation:!0,disabled:j,onClick:j?void 0:c.submit,sx:{ml:2,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"},"&.Mui-disabled":{bgcolor:"#e6e6e3",color:"#9a9a97"}},children:"\uC800\uC7A5"}),tooltip:j?"\uC800\uC7A5 \uC911\u2026":""}]},fullScreen:!0,mobilePresentation:"slide",tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},actions:{visible:!1},sections:[{id:"task-create",title:"",showTitle:!1,children:(0,Ft.jsx)(gr.Box,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:(0,Ft.jsx)(ml,{...b,contentSyncKey:`create-${g}`,leadingRow:C})})}]})}):(0,Ft.jsx)(Ft.Fragment,{children:(0,Ft.jsx)(gr.Drawer,{anchor:"right",open:e,onClose:p,sx:{zIndex:E=>E.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,Ft.jsxs)(gr.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,Ft.jsxs)(gr.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[z?(0,Ft.jsx)(gr.Box,{sx:{display:"flex",px:.5,color:B||"#1e3a8a"},children:(0,Ft.jsx)(z,{sx:{fontSize:20}})}):null,(0,Ft.jsx)(gr.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:v,placeholder:S,onChange:E=>c.setFormValue("title",E.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}}),(0,Ft.jsx)(gr.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:p,sx:{color:"#6b7280"},children:(0,Ft.jsx)(ng.default,{})})]}),(0,Ft.jsx)(gr.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Ft.jsx)(gr.Box,{sx:{flex:1,minHeight:0},children:(0,Ft.jsx)(og.default,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,Ft.jsx)(ml,{...b,contentSyncKey:`create-${g}`})})}),(0,Ft.jsx)(gr.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Ft.jsxs)(gr.Box,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[(0,Ft.jsx)(gr.Button,{onClick:p,color:"inherit",disabled:j,children:"\uCDE8\uC18C"}),(0,Ft.jsx)(gr.Button,{onClick:c.submit,variant:"contained",disabled:j,children:j?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})})})}var So=require("react"),Dn=require("@mui/material"),Zg=Z(require("@mui/icons-material/ShareOutlined"),1),Jg=Z(require("@mui/icons-material/HistoryOutlined"),1),Qg=Z(require("@ehfuse/overlay-scrollbar"),1),eb=require("@ehfuse/mui-form-dialog"),wu=require("@ehfuse/alerts");var Hn=require("react"),Ke=require("@mui/material"),au=Z(require("@mui/icons-material/Send"),1),ag=require("@ehfuse/mui-form-controls"),Ks=Z(require("@mui/icons-material/Close"),1),lg=Z(require("@mui/icons-material/EditOutlined"),1),cg=Z(require("@mui/icons-material/Favorite"),1),ug=Z(require("@mui/icons-material/FavoriteBorderOutlined"),1),fg=Z(require("@mui/icons-material/CheckCircle"),1),dg=Z(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),pi=Z(require("@mui/icons-material/AttachFileOutlined"),1),hg=Z(require("@mui/icons-material/AddCircleOutline"),1),pg=Z(require("@mui/icons-material/ImageOutlined"),1);var su=e=>{if(e===0)return"0 Bytes";let p=1024,b=["Bytes","KB","MB","GB","TB"],c=Math.floor(Math.log(e)/Math.log(p));return parseFloat((e/Math.pow(p,c)).toFixed(2))+" "+b[c]};var Be=require("react/jsx-runtime"),hx=5;function sg({kind:e,reactions:p,myAccountSeq:b,onToggle:c}){let i=p??[],a=b>0&&i.some(l=>l.account_seq===b),r=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",t=i.length===0?r:(0,Be.jsx)(Ke.Box,{sx:{whiteSpace:"pre-line",fontSize:12},children:i.map(l=>`${l.name} \xB7 ${l.time}`).join(`
|
|
36
36
|
`)}),n=e==="like"?"#e5484d":"#2f80ed";return(0,Be.jsx)(Ke.Tooltip,{title:t,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,Be.jsxs)(Ke.Box,{sx:{display:"inline-flex",alignItems:"center"},children:[(0,Be.jsx)(Ke.IconButton,{size:"small","aria-label":`\uB313\uAE00 ${r}`,onClick:c,sx:{color:a?n:"#c9c8c5",p:.5},children:e==="like"?a?(0,Be.jsx)(cg.default,{sx:{fontSize:16}}):(0,Be.jsx)(ug.default,{sx:{fontSize:16}}):a?(0,Be.jsx)(fg.default,{sx:{fontSize:16}}):(0,Be.jsx)(dg.default,{sx:{fontSize:16}})}),i.length>0?(0,Be.jsx)(Ke.Box,{component:"span",sx:{fontSize:12,color:a?n:"#9a9a97",ml:-.25},children:i.length}):null]})})}function lu({taskSeq:e,comments:p,currentUserName:b="",myAccountSeq:c=0,avatarSrcByName:i,onUpdate:a,onRemove:r,onToggleReaction:t,onPreview:n,onDownload:l}){let[o,s]=(0,Hn.useState)(null),f=(0,Hn.useRef)(null),[h,u]=(0,Hn.useState)(null),[g,m]=(0,Hn.useState)(!1),v=Math.max(0,p.length-hx),k=v>0&&!g,B=o?Math.min(o.index,v):v,O=p.map((z,N)=>({comment:z,index:N})).slice(k?B:0),L=Ci(),A=z=>{if(n){n(z);return}window.open(L(z.uuid??""),"_blank","noopener,noreferrer")},P=z=>{if(l){l(z);return}window.open(L(z.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},j=rn().slots?.avatar;return(0,Be.jsxs)(Ke.Box,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[(0,Be.jsxs)(Ke.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,Be.jsx)(xo,{sx:{fontSize:18,display:"block",color:"#37352f"}}),(0,Be.jsxs)(Ke.Box,{sx:{fontSize:al,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",p.length>0?` (${p.length})`:""]}),v>0&&(!k||B>0)?(0,Be.jsx)(Ke.Box,{role:"button",tabIndex:0,onClick:()=>m(z=>!z),onKeyDown:z=>{(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),m(N=>!N))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:k?`\uC774\uC804 \uB313\uAE00 ${B}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),p.length===0?(0,Be.jsx)(Ke.Box,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(0,Be.jsx)(Ke.Box,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:O.map(({comment:z,index:N})=>{let S=!!b&&z.author===b;return(0,Be.jsxs)(Ke.Box,{sx:{display:"flex",gap:1.5,alignItems:"flex-start","&:hover .taskbox-comment-actions":{opacity:1,pointerEvents:"auto"},"&:not(:last-child)":{borderBottom:"1px dashed #e0dfdc",pb:1}},children:[(()=>{let C=i?.get(z.author)??"";return j?(0,Be.jsx)(Ke.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,Be.jsx)(j,{name:z.author,src:C||void 0,size:44})}):(0,Be.jsx)(Ke.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,Be.jsx)(In,{src:C,name:z.author,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...si[0]},iconFontSize:24})})})(),(0,Be.jsxs)(Ke.Box,{sx:{flex:1,minWidth:0},children:[(0,Be.jsxs)(Ke.Box,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[(0,Be.jsx)(Ke.Box,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:z.author}),(0,Be.jsx)(Ke.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:z.time}),S?(0,Be.jsx)(Ke.Box,{sx:{ml:"auto"}}):(0,Be.jsxs)(Ke.Box,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[(0,Be.jsx)(sg,{kind:"like",reactions:z.likes,myAccountSeq:c,onToggle:()=>t?.(e,N,"like")}),(0,Be.jsx)(sg,{kind:"ack",reactions:z.acks,myAccountSeq:c,onToggle:()=>t?.(e,N,"ack")})]}),S?(0,Be.jsxs)(Ke.Box,{className:"taskbox-comment-actions",sx:{display:"flex",alignItems:"center",gap:.25,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",backgroundColor:"#fff",opacity:0,transition:"opacity 0.15s"},children:[(0,Be.jsx)(Ke.IconButton,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>s({index:N,text:z.text,attachments:[...z.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:(0,Be.jsx)(lg.default,{sx:{fontSize:15}})}),(0,Be.jsx)(Ke.IconButton,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:C=>u({anchorEl:C.currentTarget,index:N}),sx:{color:"#9a9a97"},children:(0,Be.jsx)(Ks.default,{sx:{fontSize:15}})})]}):null]}),o?.index===N?(0,Be.jsxs)(Ke.Box,{sx:{mt:.5},children:[(0,Be.jsx)(Ke.Box,{component:"textarea",autoFocus:!0,spellCheck:!1,value:o.text,onChange:C=>s({...o,text:C.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),(0,Be.jsxs)(Ke.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[o.attachments.map((C,E)=>{let d=()=>s({...o,attachments:o.attachments.filter((y,w)=>w!==E)});return gl(C.name)&&C.uuid?(0,Be.jsxs)(Ke.Box,{sx:{position:"relative"},children:[(0,Be.jsx)(Ke.Box,{component:"img",src:L(C.uuid,{thumb:"md"}),alt:C.name,title:C.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),(0,Be.jsx)(Ke.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:d,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:(0,Be.jsx)(Ks.default,{sx:{fontSize:14}})})]},`kept-${C.uuid}-${E}`):(0,Be.jsx)(Ke.Chip,{size:"small",icon:(0,Be.jsx)(pi.default,{sx:{fontSize:14}}),label:C.name,onDelete:d,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${C.uuid??C.name}-${E}`)}),o.files.map((C,E)=>{let d=()=>s({...o,files:o.files.filter((y,w)=>w!==E)});return gl(C.name)?(0,Be.jsxs)(Ke.Box,{sx:{position:"relative"},children:[(0,Be.jsx)(Ke.Box,{component:"img",src:URL.createObjectURL(C),alt:C.name,title:`${C.name} (\uC0C8 \uD30C\uC77C)`,onLoad:y=>URL.revokeObjectURL(y.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"2px solid #2f80ed",display:"block"}}),(0,Be.jsx)(Ke.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:d,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:(0,Be.jsx)(Ks.default,{sx:{fontSize:14}})})]},`new-${C.name}-${E}`):(0,Be.jsx)(Ke.Chip,{size:"small",icon:(0,Be.jsx)(pi.default,{sx:{fontSize:14}}),label:`${C.name} (\uC0C8 \uD30C\uC77C)`,onDelete:d,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${C.name}-${E}`)}),(0,Be.jsx)(Ke.Tooltip,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:(0,Be.jsx)(Ke.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>f.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:(0,Be.jsx)(hg.default,{sx:{fontSize:20}})})})]}),(0,Be.jsxs)(Ke.Box,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[(0,Be.jsx)(Ke.Button,{size:"small",color:"inherit",onClick:()=>s(null),children:"\uCDE8\uC18C"}),(0,Be.jsx)(Ke.Button,{size:"small",variant:"contained",disabled:!o.text.trim()&&o.attachments.length===0&&o.files.length===0,onClick:()=>{a(e,N,o.text,{attachments:o.attachments,files:o.files}),s(null)},children:"\uC800\uC7A5"})]}),(0,Be.jsx)(Ke.Box,{component:"input",type:"file",multiple:!0,ref:f,sx:{display:"none"},onChange:C=>{let E=Array.from(C.target.files??[]);E.length>0&&s({...o,files:[...o.files,...E].slice(0,10)}),C.target.value=""}})]}):(0,Be.jsxs)(Ke.Box,{children:[z.text?(0,Be.jsx)(Ke.Box,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:z.text}):null,(z.attachments??[]).length>0?(0,Be.jsx)(Ke.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(z.attachments??[]).map((C,E)=>{let d=!!C.uuid;if(gl(C.name)&&d)return(0,Be.jsx)(Ke.Box,{component:"img",src:L(C.uuid??"",{thumb:"md"}),alt:C.name,title:`${C.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>A(C),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${C.name}-${E}`);let w=ul(C.name);return(0,Be.jsx)(Ke.Chip,{size:"small",icon:(0,Be.jsx)(pi.default,{sx:{fontSize:14}}),label:`${C.name} (${su(C.size)})`,clickable:d,onClick:d?()=>w?A(C):P(C):void 0,title:d?`${C.name} ${w?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:C.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${C.name}-${E}`)})}):null]})]})]},`${z.time}-${N}`)})}),(0,Be.jsx)(Xt,{open:!!h,anchorEl:h?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>u(null),onConfirm:()=>{h&&(r(e,h.index),s(null)),u(null)}})]})}function gl(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function cu({onSubmit:e}){let[p,b]=(0,Hn.useState)(""),[c,i]=(0,Hn.useState)([]),[a,r]=(0,Hn.useState)(!1),t=(0,Hn.useRef)(null),n=(0,Hn.useRef)(null),l=Yt(),o=h=>{let u=Array.from(h??[]);u.length!==0&&i(g=>[...g,...u].slice(0,10))},s=()=>{let h=p.trim();!h&&c.length===0||(e(h,c.length>0?c:void 0),b(""),i([]))},f=(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(Ke.IconButton,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>t.current?.click(),sx:{color:"#9a9a97"},children:(0,Be.jsx)(pi.default,{sx:{fontSize:20}})}),(0,Be.jsx)(Ke.IconButton,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>n.current?.click(),sx:{color:"#9a9a97"},children:(0,Be.jsx)(pg.default,{sx:{fontSize:20}})})]});return(0,Be.jsxs)(Ke.Box,{children:[c.length>0?(0,Be.jsx)(Ke.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,px:2,pt:1},children:c.map((h,u)=>gl(h.name)?(0,Be.jsxs)(Ke.Box,{sx:{position:"relative"},children:[(0,Be.jsx)(Ke.Box,{component:"img",src:URL.createObjectURL(h),alt:h.name,title:h.name,onLoad:g=>URL.revokeObjectURL(g.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),(0,Be.jsx)(Ke.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>i(g=>g.filter((m,v)=>v!==u)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:(0,Be.jsx)(Ks.default,{sx:{fontSize:14}})})]},`${h.name}-${u}`):(0,Be.jsx)(Ke.Chip,{size:"small",icon:(0,Be.jsx)(pi.default,{sx:{fontSize:14}}),label:`${h.name} (${su(h.size)})`,onDelete:()=>i(g=>g.filter((m,v)=>v!==u)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${h.name}-${u}`))}):null,(0,Be.jsxs)(Ke.Box,{sx:{position:"relative",display:"flex"},onDragOver:h=>{Array.from(h.dataTransfer?.types??[]).includes("Files")&&(h.preventDefault(),r(!0))},onDragLeave:h=>{h.currentTarget.contains(h.relatedTarget)||r(!1)},onDrop:h=>{Array.from(h.dataTransfer?.types??[]).includes("Files")&&(h.preventDefault(),r(!1),o(h.dataTransfer?.files??null))},children:[a?(0,Be.jsxs)(Ke.Box,{sx:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",gap:.75,borderRadius:1,border:"2px dashed #2f80ed",bgcolor:"rgba(47,128,237,0.08)",color:"#2f80ed",fontSize:14,fontWeight:600,pointerEvents:"none"},children:[(0,Be.jsx)(pi.default,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,(0,Be.jsx)(ag.TextField,{value:p,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:h=>b(h.target.value),fullWidth:!0,multiline:!0,minRows:l?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:l?15:6.5,pb:l?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),l?(0,Be.jsxs)(Ke.Box,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[f,(0,Be.jsx)(Ke.IconButton,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!p.trim()&&c.length===0,onClick:s,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:(0,Be.jsx)(au.default,{sx:{fontSize:22}})})]}):(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(Ke.Box,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:f}),(0,Be.jsx)(Ke.IconButton,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!p.trim()&&c.length===0,onClick:s,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:(0,Be.jsx)(au.default,{sx:{fontSize:22}})})]})]}),(0,Be.jsx)(Ke.Box,{component:"input",ref:t,type:"file",multiple:!0,onChange:h=>{o(h.target.files),h.target.value=""},sx:{display:"none"}}),(0,Be.jsx)(Ke.Box,{component:"input",ref:n,type:"file",accept:"image/*",multiple:!0,onChange:h=>{o(h.target.files),h.target.value=""},sx:{display:"none"}})]})}var yl=require("react"),Ar=require("@mui/material"),_g=Z(require("@mui/icons-material/Close"),1),kg=Z(require("@mui/icons-material/ArrowBack"),1),Sg=Z(require("@mui/icons-material/ShareOutlined"),1),Tg=Z(require("@mui/icons-material/ContentCopyOutlined"),1),Cg=Z(require("@mui/icons-material/HistoryOutlined"),1),Bg=Z(require("@mui/icons-material/Print"),1);var gg=require("react"),pn=require("@mui/material"),bg=require("@ehfuse/mui-form-dialog"),yg=require("@ehfuse/overlay-scrollbar");var en=require("react/jsx-runtime"),px={created:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD588\uC2B5\uB2C8\uB2E4",completed:"\uC644\uB8CC \uCC98\uB9AC\uD588\uC2B5\uB2C8\uB2E4",uncompleted:"\uC644\uB8CC\uB97C \uD574\uC81C\uD588\uC2B5\uB2C8\uB2E4",confirm_requested:"\uD655\uC778\uC744 \uC694\uCCAD\uD588\uC2B5\uB2C8\uB2E4",acked:"\uD655\uC778\uD588\uC2B5\uB2C8\uB2E4",claimed:"\uC5C5\uBB34\uB97C \uAC00\uC838\uAC14\uC2B5\uB2C8\uB2E4",bug_verified:"\uC218\uC815\uC744 \uD655\uC778\uD588\uC2B5\uB2C8\uB2E4(\uC885\uB8CC)",bug_reopened:"\uC7AC\uC624\uD508\uD588\uC2B5\uB2C8\uB2E4"};function mg(e){return String(e??"").trim()||"\uC5C6\uC74C"}function mx(e){if(e.kind!=="field")return px[String(e.kind)]??"\uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4";let p=String(e.field_label??e.field??"").trim()||"\uD56D\uBAA9",b=String(e.old_value??"").trim(),c=String(e.new_value??"").trim();return!b&&c?`${p}\uC744(\uB97C) "${c}"(\uC73C)\uB85C \uC785\uB825\uD588\uC2B5\uB2C8\uB2E4`:b&&!c?`${p}\uC744(\uB97C) \uBE44\uC6E0\uC2B5\uB2C8\uB2E4`:`${p}\uC744(\uB97C) "${mg(b)}" \u2192 "${mg(c)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function Gs({open:e,taskSeq:p,items:b,loading:c,onLoad:i,onClose:a}){let r=Yt();(0,gg.useEffect)(()=>{e&&p>0&&!b&&i?.(p)},[e,p,b,i]);let t=(0,en.jsx)(pn.Box,{sx:{height:r?"100%":420,minHeight:0},children:(0,en.jsx)(yg.OverlayScrollbar,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,en.jsxs)(pn.Box,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[c&&!b?(0,en.jsxs)(pn.Box,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[(0,en.jsx)(pn.CircularProgress,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,b&&b.length===0?(0,en.jsx)(pn.Box,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(b??[]).map(n=>(0,en.jsxs)(pn.Box,{sx:{display:"flex",flexDirection:r?"column":"row",gap:r?.25:1,alignItems:r?"stretch":"baseline",minWidth:0,flexShrink:0,...r?{pb:1,borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none",pb:0}}:{}},children:[(0,en.jsx)(pn.Box,{sx:{flexShrink:0,...r?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:sn(n.acted_time)}),(0,en.jsxs)(pn.Box,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[(0,en.jsx)(pn.Box,{component:"span",sx:{fontWeight:500},children:String(n.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),(0,en.jsx)(pn.Box,{component:"span",sx:{ml:.5},children:mx(n)})]})]},n.seq))]})})});return(0,en.jsx)(bg.FormDialog,{open:e,onClose:a,maxWidth:"sm",fullScreen:r,mobilePresentation:r?"slide":"dialog",contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sx:r?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:`\uD65C\uB3D9${b&&b.length>0?` (${b.length})`:""}`,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-activity",sections:[{id:"task-activity",showTitle:!1,children:t}],scrollPastLastSection:!1,actions:{showCancelButton:!1,right:(0,en.jsx)(pn.Button,{variant:"contained",onClick:a,children:"\uB2EB\uAE30"})}})}var bl=require("@ehfuse/alerts");var xg=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
|
|
37
37
|
`).replace(/<\/(p|div|li|h[1-6]|tr)>/gi,`
|