@ehfuse/taskbox 0.5.163 → 0.5.164
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.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ var cs="waiting",DB="replied";import{createContext as Fu,useContext as Hu,useMem
|
|
|
4
4
|
`),t=document.createElement("div");return t.innerHTML=o,(t.textContent??"").replace(/\n{3,}/g,`
|
|
5
5
|
|
|
6
6
|
`).trim()}function $i({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180,height:i=0,onChangeHeight:a}){let l=On(null),d=On(null),c=i>0?i:0,m=On(c),g=On(a);g.current=a;let p=On(null),s=On(Date.now()+800),[u,_]=gT(!1),I=Me();Bl(()=>{if(n)return;let x=vl(o);p.current===x||p.current===o||(p.current=x,s.current=Date.now()+800,l.current?.setHtml(x))},[e,o,n]);let T=On(-1);return Bl(()=>{if(n||I||i<=0||T.current===i||(T.current=i,Math.abs(i-m.current)<1))return;let x=d.current?.querySelector(".ehfuse-editor-container");x&&(Math.abs(x.getBoundingClientRect().height-i)<1||(x.style.height=`${i}px`,m.current=i))},[n,I,i]),Bl(()=>{if(n||I)return;let x=d.current?.querySelector(".ehfuse-editor-container");if(!x||typeof ResizeObserver>"u")return;let M,y=new ResizeObserver(P=>{let S=Math.round(P[0]?.contentRect.height??0);S<=0||(window.clearTimeout(M),M=window.setTimeout(()=>{Math.abs(S-m.current)<1||(m.current=S,g.current?.(S))},300))});return y.observe(x),()=>{window.clearTimeout(M),y.disconnect()}},[n,I]),n?CT(Cl,{sx:{position:"relative",mt:1},children:[Rn(Cl,{sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:"40px",minHeight:r,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:vl(o)}}),Rn(hT,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Rn(bT,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(BT(o)).then(()=>{_(!0),window.setTimeout(()=>_(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:u?Rn(TT,{sx:{fontSize:17,color:"#2f9e5b"}}):Rn(kT,{sx:{fontSize:17}})})})]}):Rn(Cl,{ref:d,onDragOver:x=>x.stopPropagation(),onDrop:x=>x.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:Rn(yT,{ref:l,defaultValue:vl(o),autoHeight:I,resizable:!I,showToolbar:!I,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:ST,locale:"ko",minHeight:c||r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:x=>{let M=Date.now()<s.current,y=x===p.current;p.current=x,!(M||y)&&t(x)}})})}import{useState as Vr}from"react";import{Box as Do,Button as gm,Dialog as qT,IconButton as cr,TextField as AT,Tooltip as bm}from"@mui/material";import hm from"@mui/icons-material/Close";import LT from"@mui/icons-material/AddCircle";import km from"@mui/icons-material/AddTask";import NT from"@mui/icons-material/Checklist";import FT from"@mui/icons-material/CheckCircle";import HT from"@mui/icons-material/Launch";import WT from"@mui/icons-material/LinkOutlined";import $T from"@mui/icons-material/RadioButtonUnchecked";import{useEffect as vT,useMemo as IT,useState as Il}from"react";import{Box as Gt,Button as _T,Tab as wT,Tabs as DT}from"@mui/material";import{FormDialog as MT}from"@ehfuse/mui-form-dialog";import{ClearTextField as ET}from"@ehfuse/mui-form-controls";import{ErrorAlert as OT}from"@ehfuse/alerts";import RT from"@mui/icons-material/CheckCircle";import PT from"@mui/icons-material/RadioButtonUnchecked";import{OverlayScrollbar as zT}from"@ehfuse/overlay-scrollbar";import{jsx as yo,jsxs as _l}from"react/jsx-runtime";var xm=[{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 Vi({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:i,hideRelationType:a=!1,title:l="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:d="\uC5F0\uACB0",multiSelect:c=!1}){let m=Me(),[g,p]=Il("related"),[s,u]=Il(""),[_,I]=Il([]);vT(()=>{e&&(p("related"),u(""),I([]))},[e]);let T=IT(()=>{let S=new Set([o.seq,...n]),D=s.trim().toLowerCase();return t.filter(R=>S.has(R.seq)||R.is_event||R.is_notice||R.linked_only?!1:D?R.title.toLowerCase().includes(D)||(R.ticket_no??"").toLowerCase().includes(D):!0).sort((R,O)=>!!R.completed!=!!O.completed?R.completed?1:-1:O.seq-R.seq)},[t,o.seq,n,s]),x=()=>{if(_.length===0){OT("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let S of _)i(S,g);r()},M=S=>{I(D=>D.includes(S)?D.filter(R=>R!==S):c?[...D,S]:[S])},y=xm.find(S=>S.type===g)?.hint??"",P=_l(Gt,{sx:{...m?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...m?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[a?null:yo(DT,{value:g,onChange:(S,D)=>p(D),sx:{minHeight:38,mb:.75,flexShrink:0,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:xm.map(S=>yo(wT,{value:S.type,label:S.label},S.type))}),a?null:yo(Gt,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:y}),yo(Gt,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:yo(ET,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:s,onChange:S=>u(S.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),yo(Gt,{sx:{flex:1,minHeight:0},children:yo(zT,{style:{height:"100%"},contentStyle:{paddingTop:0},children:yo(Gt,{sx:{display:"flex",flexDirection:"column"},children:T.length===0?yo(Gt,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):T.map(S=>{let D=He(S.icon||De),R=_.includes(S.seq);return _l(Gt,{onClick:()=>M(S.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:R?"#e3eefb":"transparent","&:hover":{bgcolor:R?"#e3eefb":"#f7f7f5"}},children:[R?yo(RT,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):yo(PT,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),D?yo(D,{sx:{fontSize:17,flexShrink:0,color:S.icon_color||"#1e3a8a"}}):null,_l(Gt,{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:[S.ticket_no?`${S.ticket_no} `:"",S.title]}),yo(Gt,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:yo(Re,{option:ho(S)})})]},S.seq)})})})})]});return yo(MT,{open:e,onClose:r,maxWidth:"sm",fullScreen:m,mobilePresentation:m?"slide":"dialog",...m?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop:0}:{},sx:m?{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:l,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:P}],scrollPastLastSection:!1,sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:yo(_T,{variant:"contained",disabled:_.length===0,onClick:x,children:d})}})}import{Fragment as VT,jsx as ke,jsxs as gn}from"react/jsx-runtime";function Ui({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:i,removeLocked:a=!1,onConvertToTask:l,onOpenLinkedTask:d,linkCandidates:c,linkBaseTask:m,onLinkExistingTask:g,resolveLinkedTask:p}){let[s,u]=Vr(""),[_,I]=Vr(!1),[T,x]=Vr(null),M=Me(),[y,P]=Vr(null),[S,D]=Vr(null),R=L=>{let f=L.task_seq?p?.(L.task_seq):void 0;return f?f.completed:L.checked},O=o.filter(R).length,v=()=>{s.trim()&&(t(e,s),u(""))};return gn(tt,{icon:ke(NT,{sx:{fontSize:19,display:"block"}}),title:gn(VT,{children:["\uD560\uC77C",o.length>0?gn(Do,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[O," / ",o.length]}):null]}),titleExtra:o.length>0?ke(Do,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:ke(Do,{sx:{height:"100%",borderRadius:3,width:`${Math.round(O/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[ke(Do,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o.map((L,f)=>{let b=L.task_seq?p?.(L.task_seq):void 0,B=R(L),k=!!L.task_seq;return gn(Do,{sx:{display:"flex",alignItems:"center",gap:1,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1}},children:[ke(Do,{component:"span",onClick:()=>n(e,f,!B),sx:{display:"inline-flex",flexShrink:0,cursor:"pointer"},children:B?ke(FT,{sx:{fontSize:18,color:"#2f80ed"}}):ke($T,{sx:{fontSize:18,color:"#9a9a97"}})}),T?.index===f?ke(Do,{component:"input",autoFocus:!0,spellCheck:!1,value:T.label,enterKeyHint:"done",onChange:h=>x({index:f,label:h.target.value}),onBlur:()=>{T.label.trim()&&T.label.trim()!==L.label&&i?.(e,f,T.label),x(null)},onKeyDown:h=>{h.key==="Enter"&&h.target.blur(),h.key==="Escape"&&x(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):ke(Do,{component:"span",onClick:k?L.task_seq&&d?()=>d(L.task_seq):void 0:a||!i?void 0:M?()=>P({index:f,label:L.label}):()=>x({index:f,label:L.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:B?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...k?d?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:a||!i?{}:{cursor:"text"}},children:L.label}),k?gn(Do,{component:"span",onClick:L.task_seq&&d?()=>d(L.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",...d?{cursor:"pointer"}:{}},children:[ke(HT,{sx:{fontSize:12}}),b?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!a&&!k&&l?ke(bm,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:ke(cr,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:h=>D({anchorEl:h.currentTarget,index:f,label:L.label}),sx:{display:M?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ke(km,{sx:{fontSize:16}})})}):null,a?null:ke(cr,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,f),sx:{display:M?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ke(hm,{sx:{fontSize:15}})})]},`${L.label}-${f}`)})}),gn(Do,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[ke(Do,{component:"input",spellCheck:!1,value:s,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:L=>u(L.target.value),onKeyDown:L=>{L.key==="Enter"&&v()},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"}}}),c&&m&&g?ke(bm,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:ke(cr,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:L=>L.preventDefault(),onClick:()=>I(!0),sx:{flexShrink:0,color:"#9a9a97"},children:ke(WT,{sx:{fontSize:20}})})}):null,ke(cr,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!s.trim(),onMouseDown:L=>L.preventDefault(),onClick:v,sx:{flexShrink:0,color:s.trim()?"#2f80ed":"#c9c8c5"},children:ke(LT,{sx:{fontSize:20}})})]}),c&&m&&g?ke(Vi,{open:_,task:m,tasks:c,excludeSeqs:o.map(L=>Number(L.task_seq??0)).filter(L=>L>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>I(!1),onSubmit:L=>{let f=c.find(b=>b.seq===L);g(e,L,String(f?.title??"").trim())}}):null,ke(qe,{open:!!S,anchorEl:S?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>D(null),onConfirm:()=>{S&&l?.(e,S.index,S.label),D(null)}}),ke(qT,{open:!!y,onClose:()=>P(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:gn(Do,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[ke(Do,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),ke(AT,{autoFocus:!0,fullWidth:!0,size:"medium",value:y?.label??"",onChange:L=>P(f=>f&&{...f,label:L.target.value}),onKeyDown:L=>{if(L.key!=="Enter")return;let f=y;f&&f.label.trim()&&i?.(e,f.index,f.label.trim()),P(null)}}),gn(Do,{sx:{display:"flex",alignItems:"center",gap:1},children:[!a&&l&&y&&!o[y.index]?.task_seq?ke(cr,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{l(e,y.index,o[y.index]?.label??""),P(null)},sx:{color:"#57564f"},children:ke(km,{sx:{fontSize:20}})}):null,!a&&y?ke(cr,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{r(e,y.index),P(null)},sx:{color:"#e5484d"},children:ke(hm,{sx:{fontSize:19}})}):null,ke(Do,{sx:{flex:1}}),ke(gm,{color:"inherit",onClick:()=>P(null),children:"\uCDE8\uC18C"}),ke(gm,{variant:"contained",disabled:!y?.label.trim(),onClick:()=>{y&&y.label.trim()&&i?.(e,y.index,y.label.trim()),P(null)},children:"\uD655\uC778"})]})]})})]})}import{useRef as XT,useState as QT}from"react";import{Box as vt,IconButton as ZT}from"@mui/material";import JT from"@mui/icons-material/Close";import Sm from"@mui/icons-material/AttachFileOutlined";var UT=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"]),Ki=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return UT.has(o)};import{LinearProgress as KT}from"@mui/material";import{Fragment as GT,jsx as YT,jsxs as jT}from"react/jsx-runtime";function Tm(e){let o=Mt(),t=o.useValue("attachmentUpload.taskSeq"),n=o.useValue("attachmentUpload.index"),r=o.useValue("attachmentUpload.total"),i=o.useValue("attachmentUpload.queue"),a=n??0;return!a||e>0&&(t??0)!==e?null:{index:a,total:r??0,queue:i??[]}}function wl(){let o=Mt().useValue("attachmentUpload.progress");return jT(GT,{children:[o??0,"%"]})}function ym(){let o=Mt().useValue("attachmentUpload.progress");return YT(KT,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as ey,jsx as Ao,jsxs as Ur}from"react/jsx-runtime";function Gi(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var ji={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function Yi({taskSeq:e,attachments:o,onAdd:t,onRemove:n,removeLocked:r=!1,onPreview:i,onDownload:a}){let[l,d]=QT(!1),c=XT(null),m=Me(),g=Ir(),p=vr(),s=Tm(e),u=e===0,_=y=>{if(i){i(y);return}window.open(p(y.uuid??""),"_blank","noopener,noreferrer")},I=y=>{if(a){a(y);return}window.open(p(y.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},T=y=>s?y+1<s.index?"done":y+1===s.index?"uploading":"waiting":"waiting",x=(y,P,S,D={})=>Ur(vt,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:D.uploading?"#d5e6fb":"#e6e6e3",bgcolor:D.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[Ur(vt,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Ao(Sm,{sx:{fontSize:16,color:"#9a9a97"}}),P,Ao(vt,{component:"span",sx:{fontSize:12,color:D.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:S}),D.removeIndex!==void 0?Ao(ZT,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,D.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Ao(JT,{sx:{fontSize:15}})}):null]}),D.uploading?Ao(ym,{}):null]},y),M=y=>{let P=Ki(y.name);return Ao(vt,{component:"button",type:"button",onClick:()=>P?_(y):I(y),title:`${y.name} ${P?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...ji,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:y.name})};return Ur(tt,{icon:Ao(Sm,{sx:{fontSize:18,display:"block"}}),title:Ur(ey,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[Ur(vt,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((y,P)=>{let S=`${y.uuid||y.name}-${P}`;if(u){let D=T(P),R=D==="uploading";return x(S,Ao(vt,{component:"span",sx:{...ji,color:D==="done"?"#37352f":"#9a9a97"},children:y.name}),R?Ao(wl,{}):Gi(y.size),{uploading:R,removeIndex:!r&&!s?P:void 0})}return y.uuid?x(S,M(y),Gi(y.size),{removeIndex:r?void 0:P}):x(S,Ao(vt,{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:{...ji,color:"#9a9a97"},children:y.name}),Gi(y.size),{removeIndex:r?void 0:P})}),!u&&s?s.queue.slice(s.index-1).map((y,P)=>{let S=P===0;return x(`uploading-${s.index+P}-${y.name}`,Ao(vt,{component:"span",sx:{...ji,color:"#9a9a97"},children:y.name}),S?Ao(wl,{}):Gi(y.size),{uploading:S})}):null]}),Ao(vt,{onClick:()=>c.current?.click(),onDragOver:y=>{y.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:y=>{y.preventDefault(),d(!1);let P=Array.from(y.dataTransfer.files);P.length>0&&t(e,P)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:l?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:l?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:m?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${g}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${g}MB)`}),Ao(vt,{component:"input",ref:c,type:"file",multiple:!0,onChange:y=>{let P=Array.from(y.target.files??[]);P.length>0&&t(e,P),y.target.value=""},sx:{display:"none"}})]})}import{useState as ly}from"react";import{Checkbox as sy,Divider as cy,ListItemIcon as my,Menu as uy,MenuItem as Im}from"@mui/material";import dy from"@mui/icons-material/Add";import{useEffect as oy,useState as Bm}from"react";import{Box as Dl,Button as ty}from"@mui/material";import{FormDialog as ny}from"@ehfuse/mui-form-dialog";import{ClearTextField as ry}from"@ehfuse/mui-form-controls";import{ColorPicker as iy}from"@ehfuse/mui-color-picker";import{ErrorAlert as ay}from"@ehfuse/alerts";import{jsx as Kr,jsxs as Ml}from"react/jsx-runtime";var Cm="#2f80ed";function vm({open:e,onClose:o,onSubmit:t}){let[n,r]=Bm(""),[i,a]=Bm(Cm);oy(()=>{e&&(r(""),a(Cm))},[e]);let l=()=>{let m=n.trim();if(!m){ay("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(m,i),o()},d=ws(i),c=Ml(Dl,{children:[Ml(Dl,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[Kr(ry,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:m=>r(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),l())},fullWidth:!0,autoFocus:!0}),Kr(iy,{value:i,onChange:m=>a(m),shape:"circle",colorSize:28})]}),Ml(Dl,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",Kr(Re,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...d}})]})]});return Kr(ny,{open:e,onClose:o,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:c}],actions:{showCancelButton:!0,right:Kr(ty,{variant:"contained",onClick:l,children:"\uCD94\uAC00"})}})}import{Fragment as py,jsx as mr,jsxs as Xi}from"react/jsx-runtime";function Qi({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:i}){let[a,l]=ly(!1),d=bt();return Xi(py,{children:[Xi(uy,{anchorEl:e,open:!!e,onClose:i,transitionDuration:0,...d,children:[t.map(c=>{let m=o.includes(c.key);return Xi(Im,{onClick:()=>n(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[mr(sy,{size:"small",checked:m,sx:{p:0}}),mr(Re,{option:c})]},c.key)}),mr(cy,{}),Xi(Im,{onClick:()=>l(!0),sx:{fontSize:14,color:"#787774"},children:[mr(my,{children:mr(dy,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),mr(vm,{open:a,onClose:()=>l(!1),onSubmit:r})]})}function _m(e,o){let t=Number(e.author_account_seq??0);return o.filter(n=>{let r=Number(n.account_seq??0);return r>0&&r!==t})}function wm(e,o){let t=(e.target_account_seqs??[]).filter(g=>g>0);if(t.length===0)return null;let n=new Set(t),r=_m(e,o),i=new Map;for(let g of r){let p=String(g.department??"").trim();if(!p)continue;let s=i.get(p)??[];s.push(g),i.set(p,s)}let a=[],l=new Set;for(let[g,p]of i)if(p.every(u=>n.has(Number(u.account_seq??0)))){a.push(g);for(let u of p)l.add(Number(u.account_seq??0))}let d=new Map(r.map(g=>[Number(g.account_seq??0),g.name])),c=e.target_names??[],m=[];return t.forEach((g,p)=>{l.has(g)||m.push(d.get(g)??c[p]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:a,individualNames:m}}function Zi(e,o){let t=wm(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function qP(e,o){let t=wm(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function Dm(e,o,t){let n=(e.target_account_seqs??[]).filter(m=>m>0),r=_m(e,o),i=n.length>0?n.length:r.length,a=e.acks??[],l=t>0&&a.some(m=>m.account_seq===t),d=t>0&&Number(e.author_account_seq??0)===t,c=n.length===0||n.includes(t);return{count:a.length,total:i,acked:l,canAck:t>0&&!d&&c&&!l&&!e.completed}}function Mm(e,o){let t=Number(o)||50,n=t*1024*1024,r=e.filter(l=>l.size>n),i=e.filter(l=>l.size<=n),a=r.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${t}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
|
|
7
|
-
\uC81C\uC678\uB41C \uD30C\uC77C: ${r.map(l=>l.name).join(", ")}`:null;return{accepted:i,rejected:r,message:a}}import{DatePicker as Cy}from"@ehfuse/mui-datetime-picker";import{Fragment as Ji,jsx as ee,jsxs as ur}from"react/jsx-runtime";var zm="#0f9d58";function Rl({form:e,statusOptions:o,customTabs:t,sprints:n=[],avatarSrcByName:r,isNotice:i=!1,hideProject:a=!1,hideBug:l=!1,leadingRow:d,hideLabel:c=!1,employees:m=[],myAccountSeq:g=0,departments:p=[],myGroupSeq:s=0,onMemberEdit:u,onAddProject:_,onAddLabelOption:I,contentSyncKey:T="create"}){let x=Mt(),M=Ir(),y=e.useFormValue("manager_name"),P=e.useFormValue("receiver_names"),S=e.useFormValue("start_date"),D=!!e.useFormValue("is_event"),R=!!e.useFormValue("is_bug"),O=e.useFormValue("bug_repro")??"",v=e.useFormValue("bug_device")??"",L=e.useFormValue("bug_where")??"",f=e.useFormValue("bug_version")??"",b=e.useFormValue("event_time")??"",B=e.useFormValue("event_place")??"",k=e.useFormValue("event_address")??"",h=e.useFormValue("due_date"),E=e.useFormValue("estimated_time")??"",G=e.useFormValue("reminder"),te=e.useFormValue("priority"),Se=e.useFormValue("content"),ge=e.useFormValue("checklist")??[],pe=e.useFormValue("tab_key"),le=e.useFormValue("sprint_seq")??0,Te=e.useFormValue("story_points")??0,ze=t.find(z=>z.key===pe&&z.useSprints),Ne=ze?n.filter(z=>`custom-${z.group_seq}`===pe):[],[$,H]=Gr(null),oe=e.useFormValue("label_keys"),[C,F]=Gr(null),Q=e.useFormValue("visibility")||"involved",U=Number(e.useFormValue("visibility_group_seq")??0),[Oe,$e]=Gr(null),Ve=e.useFormValue("repeat_rule")||"",Fe=e.useFormValue("repeat_until")||"",[Ie,Xe]=Gr(null),[X,Be]=Gr(null),xt=e.useFormValue("target_names"),j=e.useFormValue("target_account_seqs"),Uo=x.useValue("createAttachmentFiles")??[],Ko=i?Zi({author_account_seq:g,target_names:xt,target_account_seqs:j},m):"";return ur(Ji,{children:[d,i?null:ee(Pn,{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"},...l?[]:[{value:"bug",label:"\uC624\uB958"}]].map(z=>{let xe=R?"bug":D?"event":"task",we=xe===z.value;return ee(fy,{onClick:()=>{if(xe===z.value)return;e.setFormValue("is_event",z.value==="event"),e.setFormValue("is_bug",z.value==="bug"),e.setFormValue("visibility",z.value==="bug"?"all":"involved"),e.setFormValue("visibility_group_seq",0),z.value==="bug"&&(e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until",""));let Qe=e.getFormValue("icon"),fo=e.getFormValue("icon_color"),Go=[De,"event",_r].includes(Qe),Fo=!fo||fo===zm||fo===wr;Go&&e.setFormValue("icon",z.value==="event"?"event":z.value==="bug"?_r:De),Fo&&e.setFormValue("icon_color",z.value==="event"?zm:z.value==="bug"?wr:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:we?600:400,color:we?"#ffffff":"#787774",bgcolor:we?"#2563eb":"#f4f4f2"},children:z.label},z.label)})}),ee(jr,{sx:{borderColor:"#e6e6e3"}}),ur(Pn,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[ee(Hi,{hideProject:a,showEstimatedTime:!D,values:{tabKey:pe,managerName:y,receiverNames:P,startDate:S,dueDate:h,reminder:G,priority:te,estimatedTime:E,eventTime:b,eventPlace:B,eventAddress:k},onChangeEstimatedTime:z=>e.setFormValue("estimated_time",z),customTabs:t,avatarSrcByName:r,notice:i,event:D,onChangeEventTime:z=>e.setFormValue("event_time",z),onChangeEventPlace:z=>e.setFormValue("event_place",z),onChangeEventAddress:z=>e.setFormValue("event_address",z),targetSummary:Ko,onChangeProject:z=>e.setFormValue("tab_key",z),onAddProject:_,onChangeStartDate:z=>e.setFormValue("start_date",z),onChangeDueDate:z=>e.setFormValue("due_date",z),onChangeReminder:z=>e.setFormValue("reminder",z),onChangePriority:z=>e.setFormValue("priority",z),onMemberEdit:u,trailing:ur(Ji,{children:[i?null:ee(ae,{icon:Q==="all"?ee(Om,{sx:{fontSize:17,color:"#2f80ed"}}):Q==="group"?ee(Rm,{sx:{fontSize:17,color:"#d9730d"}}):ee(Em,{sx:{fontSize:17}}),label:"\uACF5\uAC1C",onClick:z=>$e(z),children:Q==="all"?"\uC804\uCCB4\uACF5\uAC1C":Q==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${p.find(z=>z.seq===U)?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C"}),!i&&!R?ee(ae,{icon:ee(Ty,{sx:{fontSize:17,...Ve?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:z=>Xe(z),children:Ve?qi(Ve):ee(Pn,{component:"span",sx:{color:"#9a9a97"},children:"\uC5C6\uC74C"})}):null,!i&&!R&&Ve?ee(ae,{icon:ee(yy,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:z=>Be(z),children:Fe?Zo(Fe):ee(Pn,{component:"span",sx:{color:"#9a9a97"},children:"\uC790\uB3D9"})}):null,ze&&!D&&!i?ur(Ji,{children:[ee(ae,{icon:ee(ky,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:z=>H(z),children:le>0?Ne.find(z=>z.seq===le)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":ee(Pn,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),ee(ae,{icon:ee(Sy,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:ee(Kt,{value:Te>0?String(Te):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:z=>e.setFormValue("story_points",Number(z.replace(/[^0-9.]/g,""))||0)})})]}):null,R?ee(Wi,{values:{repro:O,device:v,where:L,version:f},onChangeRepro:z=>e.setFormValue("bug_repro",z),onChangeDevice:z=>e.setFormValue("bug_device",z),onChangeWhere:z=>e.setFormValue("bug_where",z),onChangeVersion:z=>e.setFormValue("bug_version",z)}):null]}),leading:D||c?null:ee(Pn,{sx:{gridColumn:"1 / -1"},children:ee(ae,{icon:ee(hy,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:z=>F(z),children:(oe??[]).length>0?ee(on,{labelKeys:oe??[],labelOptions:o}):ee(Pn,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),ee(jr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ee(tt,{icon:ee(gy,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:ee($i,{syncKey:T,value:Se,onChange:z=>e.setFormValue("content",z)})}),D?null:ee(jr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),D?null:ee(Ui,{taskSeq:0,checklist:ge,onAdd:(z,xe)=>e.setFormValue("checklist",[...ge,{label:xe,checked:!1}]),onToggle:(z,xe,we)=>e.setFormValue("checklist",ge.map((Qe,fo)=>fo===xe?{...Qe,checked:we}:Qe)),onRemove:(z,xe)=>e.setFormValue("checklist",ge.filter((we,Qe)=>Qe!==xe)),onUpdate:(z,xe,we)=>e.setFormValue("checklist",ge.map((Qe,fo)=>fo===xe?{...Qe,label:we}:Qe))}),ee(jr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ee(Yi,{taskSeq:0,attachments:Uo.map(z=>({name:z.name,size:z.size})),onAdd:(z,xe)=>{let we=Mm(xe,M);we.message&&Pm(we.message),we.accepted.length!==0&&x.setValue("createAttachmentFiles",[...x.getValue("createAttachmentFiles")??[],...we.accepted])},onRemove:(z,xe)=>x.setValue("createAttachmentFiles",Uo.filter((we,Qe)=>Qe!==xe))}),R?null:ur(Ji,{children:[ee(jr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ee(tt,{icon:ee(by,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:ee(By,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),ee(El,{transitionDuration:0,anchorEl:$,open:!!$,onClose:()=>H(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Ne.map(z=>({seq:z.seq,label:et(z)}))].map(z=>ee(Ol,{onClick:()=>{e.setFormValue("sprint_seq",z.seq),H(null)},sx:{fontSize:14,minWidth:170},children:z.label},z.seq))}),ee(El,{transitionDuration:0,anchorEl:Ie,open:!!Ie,onClose:()=>Xe(null),children:[{value:"",label:"\uC5C6\uC74C"},...Wr].map(z=>ee(Ol,{selected:Ve===z.value,onClick:()=>{if(Xe(null),z.value===""){e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until","");return}let xe=String(e.getFormValue("due_date")??"").slice(0,10);if(!xe){Pm(D?"\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.":"\uBC18\uBCF5\uD558\uB824\uBA74 \uB9C8\uAC10\uAE30\uD55C\uC744 \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}e.setFormValue("repeat_rule",z.value),e.setFormValue("repeat_until",Ai(xe,z.value))},sx:{fontSize:14,minWidth:140},children:z.label},z.value||"none"))}),ee(Cy,{anchorEl:X,open:!!X,onClose:()=>Be(null),selectedDate:Fe?new Date(`${Fe}T00:00:00`):new Date,onDateChange:z=>{let xe=we=>String(we).padStart(2,"0");e.setFormValue("repeat_until",`${z.getFullYear()}-${xe(z.getMonth()+1)}-${xe(z.getDate())}`),Be(null)}}),ee(El,{transitionDuration:0,anchorEl:Oe,open:!!Oe,onClose:()=>$e(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:ee(Em,{sx:{fontSize:17,color:"#57564f"}}),selected:Q==="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:ee(Om,{sx:{fontSize:17,color:"#2f80ed"}}),selected:Q==="all",onPick:()=>{e.setFormValue("visibility","all"),e.setFormValue("visibility_group_seq",0)}},...[...p].sort((z,xe)=>z.seq===s?-1:xe.seq===s?1:0).map(z=>({key:`group-${z.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${z.name}`,tip:`${z.name} \uC18C\uC18D \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4`,icon:ee(Rm,{sx:{fontSize:17,color:"#d9730d"}}),selected:Q==="group"&&U===z.seq,onPick:()=>{e.setFormValue("visibility","group"),e.setFormValue("visibility_group_seq",z.seq)}}))].map(z=>ee(xy,{title:z.tip,arrow:!0,disableInteractive:!0,placement:"right",children:ur(Ol,{selected:z.selected,onClick:()=>{z.onPick(),$e(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[z.icon,z.label]})},z.key))}),ee(Qi,{anchorEl:C,selectedKeys:oe??[],labelOptions:o,onToggle:z=>e.setFormValue("label_keys",li(oe??[],z)),onAddLabel:(z,xe)=>I?.(z,xe),onClose:()=>F(null)})]})}import{Fragment as Lm,jsx as Je,jsxs as dr}from"react/jsx-runtime";function O2({open:e,onClose:o,...t}){let{form:n,presetTitle:r="",presetContent:i="",presetVisibility:a,presetVisibilityGroupSeq:l=0,presetDueDate:d="",presetTabKey:c="",presetManager:m=null,isNotice:g=!1,defaultBug:p=!1}=t,s=Mt(),u=Iy(!1),[_,I]=qm(0),[T,x]=qm(null),M=n.useFormValue("title"),y=n.useFormValue("icon"),P=n.useFormValue("icon_color"),S=!!n.useFormValue("is_event"),D=!!n.useFormValue("is_bug"),R=Me(),v=s.useValue("createSubmitting")??!1,L=Kn(y||De),f=g?"\uACF5\uC9C0 \uB4F1\uB85D":S?"\uC77C\uC815 \uB4F1\uB85D":D?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",b=g?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":S?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":D?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";vy(()=>{let h=u.current;u.current=e,!(!e||h)&&(n.setFormValues({...n.getFormValues(),title:r,icon:g?Po:p?_r:De,icon_color:g?"#e5484d":p?wr:"",manager_name:m?.name??"",manager_account_seq:m?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:g,is_event:!1,is_bug:p,visibility:a??(p?"all":"involved"),visibility_group_seq:a==="group"?l:0,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:Ke(new Date),due_date:d,reminder:"none",priority:"medium",note:"",content:i,checklist:[],tab_key:c}),s.setValue("createAttachmentFiles",[]),I(E=>E+1))},[e]);let B=dr(bn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[Je(zl,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:h=>x(h.currentTarget),sx:{p:0,color:P||"#1e3a8a"},children:Je(L,{sx:{fontSize:20}})}),Je(bn,{component:"input",autoFocus:!0,spellCheck:!1,value:M,placeholder:b,onChange:h=>n.setFormValue("title",h.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}}})]}),k=Je(sr,{anchorEl:T,value:y,color:P||"#1e3a8a",onSelect:h=>n.setFormValue("icon",h),onSelectColor:h=>n.setFormValue("icon_color",h),onClose:()=>x(null)});return R?dr(Lm,{children:[Je(Ey,{open:e,onClose:o,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:f,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:Je(Pl,{variant:"contained",size:"small",disableElevation:!0,disabled:v,onClick:v?void 0:n.submit,sx:{ml:2,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"}},children:"\uC800\uC7A5"}),tooltip:v?"\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:Je(bn,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:Je(Rl,{...t,contentSyncKey:`create-${_}`,leadingRow:B})})}]}),k]}):dr(Lm,{children:[Je(_y,{anchor:"right",open:e,onClose:o,sx:{zIndex:h=>h.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:dr(bn,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[dr(bn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[Je(wy,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:Je(zl,{size:"small",onClick:h=>x(h.currentTarget),sx:{color:P||"#1e3a8a"},children:Je(L,{sx:{fontSize:20}})})}),Je(bn,{component:"input",autoFocus:!0,spellCheck:!1,value:M,placeholder:b,onChange:h=>n.setFormValue("title",h.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}}}),Je(zl,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:Je(Dy,{})})]}),Je(Am,{sx:{borderColor:"#e6e6e3"}}),Je(bn,{sx:{flex:1,minHeight:0},children:Je(My,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Je(Rl,{...t,contentSyncKey:`create-${_}`})})}),Je(Am,{sx:{borderColor:"#e6e6e3"}}),dr(bn,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Je(Pl,{onClick:o,color:"inherit",disabled:v,children:"\uCDE8\uC18C"}),Je(Pl,{onClick:n.submit,variant:"contained",disabled:v,children:v?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),k]})}import{useEffect as cu,useRef as mu,useState as uu}from"react";import{Box as aa,Button as z0,Divider as du,Drawer as q0}from"@mui/material";import A0 from"@mui/icons-material/ShareOutlined";import L0 from"@mui/icons-material/HistoryOutlined";import N0 from"@ehfuse/overlay-scrollbar";import{FormDialog as F0}from"@ehfuse/mui-form-dialog";import{SuccessAlert as pu}from"@ehfuse/alerts";import{useRef as Al,useState as pr}from"react";import{Box as ie,Button as Nm,Chip as ea,IconButton as ut,Tooltip as $m}from"@mui/material";import Fm from"@mui/icons-material/Send";import{TextField as Oy}from"@ehfuse/mui-form-controls";import oa from"@mui/icons-material/Close";import Ry from"@mui/icons-material/EditOutlined";import Py from"@mui/icons-material/Favorite";import zy from"@mui/icons-material/FavoriteBorderOutlined";import qy from"@mui/icons-material/CheckCircle";import Ay from"@mui/icons-material/CheckCircleOutlineOutlined";import fr from"@mui/icons-material/AttachFileOutlined";import Ly from"@mui/icons-material/AddCircleOutline";import Ny from"@mui/icons-material/ImageOutlined";var ql=e=>{if(e===0)return"0 Bytes";let o=1024,t=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(o));return parseFloat((e/Math.pow(o,n)).toFixed(2))+" "+t[n]};import{Fragment as Wm,jsx as K,jsxs as eo}from"react/jsx-runtime";var Fy=5;function Hm({kind:e,reactions:o,myAccountSeq:t,onToggle:n}){let r=o??[],i=t>0&&r.some(c=>c.account_seq===t),a=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",l=r.length===0?a:K(ie,{sx:{whiteSpace:"pre-line",fontSize:12},children:r.map(c=>`${c.name} \xB7 ${c.time}`).join(`
|
|
7
|
+
\uC81C\uC678\uB41C \uD30C\uC77C: ${r.map(l=>l.name).join(", ")}`:null;return{accepted:i,rejected:r,message:a}}import{DatePicker as Cy}from"@ehfuse/mui-datetime-picker";import{Fragment as Ji,jsx as ee,jsxs as ur}from"react/jsx-runtime";var zm="#0f9d58";function Rl({form:e,statusOptions:o,customTabs:t,sprints:n=[],avatarSrcByName:r,isNotice:i=!1,hideProject:a=!1,hideBug:l=!1,leadingRow:d,hideLabel:c=!1,employees:m=[],myAccountSeq:g=0,departments:p=[],myGroupSeq:s=0,onMemberEdit:u,onAddProject:_,onAddLabelOption:I,contentSyncKey:T="create"}){let x=Mt(),M=Ir(),y=e.useFormValue("manager_name"),P=e.useFormValue("receiver_names"),S=e.useFormValue("start_date"),D=!!e.useFormValue("is_event"),R=!!e.useFormValue("is_bug"),O=e.useFormValue("bug_repro")??"",v=e.useFormValue("bug_device")??"",L=e.useFormValue("bug_where")??"",f=e.useFormValue("bug_version")??"",b=e.useFormValue("event_time")??"",B=e.useFormValue("event_place")??"",k=e.useFormValue("event_address")??"",h=e.useFormValue("due_date"),E=e.useFormValue("estimated_time")??"",G=e.useFormValue("reminder"),te=e.useFormValue("priority"),Se=e.useFormValue("content"),ge=e.useFormValue("checklist")??[],pe=e.useFormValue("tab_key"),le=e.useFormValue("sprint_seq")??0,Te=e.useFormValue("story_points")??0,ze=t.find(z=>z.key===pe&&z.useSprints),Ne=ze?n.filter(z=>`custom-${z.group_seq}`===pe):[],[$,H]=Gr(null),oe=e.useFormValue("label_keys"),[C,F]=Gr(null),Q=e.useFormValue("visibility")||"involved",U=Number(e.useFormValue("visibility_group_seq")??0),[Oe,$e]=Gr(null),Ve=e.useFormValue("repeat_rule")||"",Fe=e.useFormValue("repeat_until")||"",[Ie,Xe]=Gr(null),[X,Be]=Gr(null),xt=e.useFormValue("target_names"),j=e.useFormValue("target_account_seqs"),Uo=x.useValue("createAttachmentFiles")??[],Ko=i?Zi({author_account_seq:g,target_names:xt,target_account_seqs:j},m):"";return ur(Ji,{children:[d,i?null:ee(Pn,{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"},...l?[]:[{value:"bug",label:"\uC624\uB958"}]].map(z=>{let xe=R?"bug":D?"event":"task",we=xe===z.value;return ee(fy,{onClick:()=>{if(xe===z.value)return;e.setFormValue("is_event",z.value==="event"),e.setFormValue("is_bug",z.value==="bug"),e.setFormValue("visibility",z.value==="bug"?"all":"involved"),e.setFormValue("visibility_group_seq",0),z.value==="bug"&&(e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until",""));let Qe=e.getFormValue("icon"),fo=e.getFormValue("icon_color"),Go=[De,"event",_r].includes(Qe),Fo=!fo||fo===zm||fo===wr;Go&&e.setFormValue("icon",z.value==="event"?"event":z.value==="bug"?_r:De),Fo&&e.setFormValue("icon_color",z.value==="event"?zm:z.value==="bug"?wr:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:we?600:400,color:we?"#ffffff":"#787774",bgcolor:we?"#2563eb":"#f4f4f2"},children:z.label},z.label)})}),ee(jr,{sx:{borderColor:"#e6e6e3"}}),ur(Pn,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[ee(Hi,{hideProject:a,showEstimatedTime:!D,values:{tabKey:pe,managerName:y,receiverNames:P,startDate:S,dueDate:h,reminder:G,priority:te,estimatedTime:E,eventTime:b,eventPlace:B,eventAddress:k},onChangeEstimatedTime:z=>e.setFormValue("estimated_time",z),customTabs:t,avatarSrcByName:r,notice:i,event:D,onChangeEventTime:z=>e.setFormValue("event_time",z),onChangeEventPlace:z=>e.setFormValue("event_place",z),onChangeEventAddress:z=>e.setFormValue("event_address",z),targetSummary:Ko,onChangeProject:z=>e.setFormValue("tab_key",z),onAddProject:_,onChangeStartDate:z=>e.setFormValue("start_date",z),onChangeDueDate:z=>e.setFormValue("due_date",z),onChangeReminder:z=>e.setFormValue("reminder",z),onChangePriority:z=>e.setFormValue("priority",z),onMemberEdit:u,trailing:ur(Ji,{children:[i?null:ee(ae,{icon:Q==="all"?ee(Om,{sx:{fontSize:17,color:"#2f80ed"}}):Q==="group"?ee(Rm,{sx:{fontSize:17,color:"#d9730d"}}):ee(Em,{sx:{fontSize:17}}),label:"\uACF5\uAC1C",onClick:z=>$e(z),children:Q==="all"?"\uC804\uCCB4\uACF5\uAC1C":Q==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${p.find(z=>z.seq===U)?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C"}),!i&&!R?ee(ae,{icon:ee(Ty,{sx:{fontSize:17,...Ve?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:z=>Xe(z),children:Ve?qi(Ve):ee(Pn,{component:"span",sx:{color:"#9a9a97"},children:"\uC5C6\uC74C"})}):null,!i&&!R&&Ve?ee(ae,{icon:ee(yy,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:z=>Be(z),children:Fe?Zo(Fe):ee(Pn,{component:"span",sx:{color:"#9a9a97"},children:"\uC790\uB3D9"})}):null,ze&&!D&&!i?ur(Ji,{children:[ee(ae,{icon:ee(ky,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:z=>H(z),children:le>0?Ne.find(z=>z.seq===le)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":ee(Pn,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),ee(ae,{icon:ee(Sy,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:ee(Kt,{value:Te>0?String(Te):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:z=>e.setFormValue("story_points",Number(z.replace(/[^0-9.]/g,""))||0)})})]}):null,R?ee(Wi,{values:{repro:O,device:v,where:L,version:f},onChangeRepro:z=>e.setFormValue("bug_repro",z),onChangeDevice:z=>e.setFormValue("bug_device",z),onChangeWhere:z=>e.setFormValue("bug_where",z),onChangeVersion:z=>e.setFormValue("bug_version",z)}):null]}),leading:D||c?null:ee(Pn,{sx:{gridColumn:"1 / -1"},children:ee(ae,{icon:ee(hy,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:z=>F(z),children:(oe??[]).length>0?ee(on,{labelKeys:oe??[],labelOptions:o}):ee(Pn,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),ee(jr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ee(tt,{icon:ee(gy,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:ee($i,{syncKey:T,value:Se,onChange:z=>e.setFormValue("content",z)})}),D?null:ee(jr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),D?null:ee(Ui,{taskSeq:0,checklist:ge,onAdd:(z,xe)=>e.setFormValue("checklist",[...ge,{label:xe,checked:!1}]),onToggle:(z,xe,we)=>e.setFormValue("checklist",ge.map((Qe,fo)=>fo===xe?{...Qe,checked:we}:Qe)),onRemove:(z,xe)=>e.setFormValue("checklist",ge.filter((we,Qe)=>Qe!==xe)),onUpdate:(z,xe,we)=>e.setFormValue("checklist",ge.map((Qe,fo)=>fo===xe?{...Qe,label:we}:Qe))}),ee(jr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ee(Yi,{taskSeq:0,attachments:Uo.map(z=>({name:z.name,size:z.size})),onAdd:(z,xe)=>{let we=Mm(xe,M);we.message&&Pm(we.message),we.accepted.length!==0&&x.setValue("createAttachmentFiles",[...x.getValue("createAttachmentFiles")??[],...we.accepted])},onRemove:(z,xe)=>x.setValue("createAttachmentFiles",Uo.filter((we,Qe)=>Qe!==xe))}),R?null:ur(Ji,{children:[ee(jr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ee(tt,{icon:ee(by,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:ee(By,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),ee(El,{transitionDuration:0,anchorEl:$,open:!!$,onClose:()=>H(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Ne.map(z=>({seq:z.seq,label:et(z)}))].map(z=>ee(Ol,{onClick:()=>{e.setFormValue("sprint_seq",z.seq),H(null)},sx:{fontSize:14,minWidth:170},children:z.label},z.seq))}),ee(El,{transitionDuration:0,anchorEl:Ie,open:!!Ie,onClose:()=>Xe(null),children:[{value:"",label:"\uC5C6\uC74C"},...Wr].map(z=>ee(Ol,{selected:Ve===z.value,onClick:()=>{if(Xe(null),z.value===""){e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until","");return}let xe=String(e.getFormValue("due_date")??"").slice(0,10);if(!xe){Pm(D?"\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.":"\uBC18\uBCF5\uD558\uB824\uBA74 \uB9C8\uAC10\uAE30\uD55C\uC744 \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}e.setFormValue("repeat_rule",z.value),e.setFormValue("repeat_until",Ai(xe,z.value))},sx:{fontSize:14,minWidth:140},children:z.label},z.value||"none"))}),ee(Cy,{anchorEl:X,open:!!X,onClose:()=>Be(null),selectedDate:Fe?new Date(`${Fe}T00:00:00`):new Date,onDateChange:z=>{let xe=we=>String(we).padStart(2,"0");e.setFormValue("repeat_until",`${z.getFullYear()}-${xe(z.getMonth()+1)}-${xe(z.getDate())}`),Be(null)}}),ee(El,{transitionDuration:0,anchorEl:Oe,open:!!Oe,onClose:()=>$e(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:ee(Em,{sx:{fontSize:17,color:"#57564f"}}),selected:Q==="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:ee(Om,{sx:{fontSize:17,color:"#2f80ed"}}),selected:Q==="all",onPick:()=>{e.setFormValue("visibility","all"),e.setFormValue("visibility_group_seq",0)}},...[...p].sort((z,xe)=>z.seq===s?-1:xe.seq===s?1:0).map(z=>({key:`group-${z.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${z.name}`,tip:`${z.name} \uC18C\uC18D \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4`,icon:ee(Rm,{sx:{fontSize:17,color:"#d9730d"}}),selected:Q==="group"&&U===z.seq,onPick:()=>{e.setFormValue("visibility","group"),e.setFormValue("visibility_group_seq",z.seq)}}))].map(z=>ee(xy,{title:z.tip,arrow:!0,disableInteractive:!0,placement:"right",children:ur(Ol,{selected:z.selected,onClick:()=>{z.onPick(),$e(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[z.icon,z.label]})},z.key))}),ee(Qi,{anchorEl:C,selectedKeys:oe??[],labelOptions:o,onToggle:z=>e.setFormValue("label_keys",li(oe??[],z)),onAddLabel:(z,xe)=>I?.(z,xe),onClose:()=>F(null)})]})}import{Fragment as Lm,jsx as Je,jsxs as dr}from"react/jsx-runtime";function O2({open:e,onClose:o,...t}){let{form:n,presetTitle:r="",presetContent:i="",presetVisibility:a,presetVisibilityGroupSeq:l=0,presetDueDate:d="",presetTabKey:c="",presetManager:m=null,isNotice:g=!1,defaultBug:p=!1}=t,s=Mt(),u=Iy(!1),[_,I]=qm(0),[T,x]=qm(null),M=n.useFormValue("title"),y=n.useFormValue("icon"),P=n.useFormValue("icon_color"),S=!!n.useFormValue("is_event"),D=!!n.useFormValue("is_bug"),R=Me(),v=s.useValue("createSubmitting")??!1,L=Kn(y||De),f=g?"\uACF5\uC9C0 \uB4F1\uB85D":S?"\uC77C\uC815 \uB4F1\uB85D":D?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",b=g?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":S?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":D?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";vy(()=>{let h=u.current;u.current=e,!(!e||h)&&(n.setFormValues({...n.getFormValues(),title:r,icon:g?Po:p?_r:De,icon_color:g?"#e5484d":p?wr:"",manager_name:m?.name??"",manager_account_seq:m?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:g,is_event:!1,is_bug:p,visibility:a??(p?"all":"involved"),visibility_group_seq:a==="group"?l:0,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:Ke(new Date),due_date:d,reminder:"none",priority:"medium",note:"",content:i,checklist:[],tab_key:c}),s.setValue("createAttachmentFiles",[]),I(E=>E+1))},[e]);let B=dr(bn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[Je(zl,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:h=>x(h.currentTarget),sx:{p:0,color:P||"#1e3a8a"},children:Je(L,{sx:{fontSize:20}})}),Je(bn,{component:"input",autoFocus:!0,spellCheck:!1,value:M,placeholder:b,onChange:h=>n.setFormValue("title",h.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}}})]}),k=Je(sr,{anchorEl:T,value:y,color:P||"#1e3a8a",onSelect:h=>n.setFormValue("icon",h),onSelectColor:h=>n.setFormValue("icon_color",h),onClose:()=>x(null)});return R?dr(Lm,{children:[Je(Ey,{open:e,onClose:o,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:f,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:Je(Pl,{variant:"contained",size:"small",disableElevation:!0,disabled:v,onClick:v?void 0:n.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:v?"\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:Je(bn,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:Je(Rl,{...t,contentSyncKey:`create-${_}`,leadingRow:B})})}]}),k]}):dr(Lm,{children:[Je(_y,{anchor:"right",open:e,onClose:o,sx:{zIndex:h=>h.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:dr(bn,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[dr(bn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[Je(wy,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:Je(zl,{size:"small",onClick:h=>x(h.currentTarget),sx:{color:P||"#1e3a8a"},children:Je(L,{sx:{fontSize:20}})})}),Je(bn,{component:"input",autoFocus:!0,spellCheck:!1,value:M,placeholder:b,onChange:h=>n.setFormValue("title",h.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}}}),Je(zl,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:Je(Dy,{})})]}),Je(Am,{sx:{borderColor:"#e6e6e3"}}),Je(bn,{sx:{flex:1,minHeight:0},children:Je(My,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Je(Rl,{...t,contentSyncKey:`create-${_}`})})}),Je(Am,{sx:{borderColor:"#e6e6e3"}}),dr(bn,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Je(Pl,{onClick:o,color:"inherit",disabled:v,children:"\uCDE8\uC18C"}),Je(Pl,{onClick:n.submit,variant:"contained",disabled:v,children:v?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),k]})}import{useEffect as cu,useRef as mu,useState as uu}from"react";import{Box as aa,Button as z0,Divider as du,Drawer as q0}from"@mui/material";import A0 from"@mui/icons-material/ShareOutlined";import L0 from"@mui/icons-material/HistoryOutlined";import N0 from"@ehfuse/overlay-scrollbar";import{FormDialog as F0}from"@ehfuse/mui-form-dialog";import{SuccessAlert as pu}from"@ehfuse/alerts";import{useRef as Al,useState as pr}from"react";import{Box as ie,Button as Nm,Chip as ea,IconButton as ut,Tooltip as $m}from"@mui/material";import Fm from"@mui/icons-material/Send";import{TextField as Oy}from"@ehfuse/mui-form-controls";import oa from"@mui/icons-material/Close";import Ry from"@mui/icons-material/EditOutlined";import Py from"@mui/icons-material/Favorite";import zy from"@mui/icons-material/FavoriteBorderOutlined";import qy from"@mui/icons-material/CheckCircle";import Ay from"@mui/icons-material/CheckCircleOutlineOutlined";import fr from"@mui/icons-material/AttachFileOutlined";import Ly from"@mui/icons-material/AddCircleOutline";import Ny from"@mui/icons-material/ImageOutlined";var ql=e=>{if(e===0)return"0 Bytes";let o=1024,t=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(o));return parseFloat((e/Math.pow(o,n)).toFixed(2))+" "+t[n]};import{Fragment as Wm,jsx as K,jsxs as eo}from"react/jsx-runtime";var Fy=5;function Hm({kind:e,reactions:o,myAccountSeq:t,onToggle:n}){let r=o??[],i=t>0&&r.some(c=>c.account_seq===t),a=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",l=r.length===0?a:K(ie,{sx:{whiteSpace:"pre-line",fontSize:12},children:r.map(c=>`${c.name} \xB7 ${c.time}`).join(`
|
|
8
8
|
`)}),d=e==="like"?"#e5484d":"#2f80ed";return K($m,{title:l,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:eo(ie,{sx:{display:"inline-flex",alignItems:"center"},children:[K(ut,{size:"small","aria-label":`\uB313\uAE00 ${a}`,onClick:n,sx:{color:i?d:"#c9c8c5",p:.5},children:e==="like"?i?K(Py,{sx:{fontSize:16}}):K(zy,{sx:{fontSize:16}}):i?K(qy,{sx:{fontSize:16}}):K(Ay,{sx:{fontSize:16}})}),r.length>0?K(ie,{component:"span",sx:{fontSize:12,color:i?d:"#9a9a97",ml:-.25},children:r.length}):null]})})}function Vm({taskSeq:e,comments:o,currentUserName:t="",myAccountSeq:n=0,avatarSrcByName:r,onUpdate:i,onRemove:a,onToggleReaction:l,onPreview:d,onDownload:c}){let[m,g]=pr(null),p=Al(null),[s,u]=pr(null),[_,I]=pr(!1),T=Math.max(0,o.length-Fy),x=T>0&&!_,M=m?Math.min(m.index,T):T,y=o.map((O,v)=>({comment:O,index:v})).slice(x?M:0),P=vr(),S=O=>{if(d){d(O);return}window.open(P(O.uuid??""),"_blank","noopener,noreferrer")},D=O=>{if(c){c(O);return}window.open(P(O.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},R=Wo().slots?.avatar;return eo(ie,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[eo(ie,{sx:{display:"flex",alignItems:"center",gap:1},children:[K(rn,{sx:{fontSize:18,display:"block",color:"#37352f"}}),eo(ie,{sx:{fontSize:Sl,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",o.length>0?` (${o.length})`:""]}),T>0&&(!x||M>0)?K(ie,{role:"button",tabIndex:0,onClick:()=>I(O=>!O),onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),I(v=>!v))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:x?`\uC774\uC804 \uB313\uAE00 ${M}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),o.length===0?K(ie,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,K(ie,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:y.map(({comment:O,index:v})=>{let L=!!t&&O.author===t;return eo(ie,{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 f=r?.get(O.author)??"";return R?K(ie,{sx:{display:"inline-flex",flexShrink:0},children:K(R,{name:O.author,src:f||void 0,size:44})}):K(ie,{sx:{display:"inline-flex",flexShrink:0},children:K(Qo,{src:f,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...Qn[0]},iconFontSize:24})})})(),eo(ie,{sx:{flex:1,minWidth:0},children:[eo(ie,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[K(ie,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:O.author}),K(ie,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:O.time}),L?K(ie,{sx:{ml:"auto"}}):eo(ie,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[K(Hm,{kind:"like",reactions:O.likes,myAccountSeq:n,onToggle:()=>l?.(e,v,"like")}),K(Hm,{kind:"ack",reactions:O.acks,myAccountSeq:n,onToggle:()=>l?.(e,v,"ack")})]}),L?eo(ie,{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:[K(ut,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>g({index:v,text:O.text,attachments:[...O.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:K(Ry,{sx:{fontSize:15}})}),K(ut,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:f=>u({anchorEl:f.currentTarget,index:v}),sx:{color:"#9a9a97"},children:K(oa,{sx:{fontSize:15}})})]}):null]}),m?.index===v?eo(ie,{sx:{mt:.5},children:[K(ie,{component:"textarea",autoFocus:!0,spellCheck:!1,value:m.text,onChange:f=>g({...m,text:f.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),eo(ie,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[m.attachments.map((f,b)=>{let B=()=>g({...m,attachments:m.attachments.filter((k,h)=>h!==b)});return ta(f.name)&&f.uuid?eo(ie,{sx:{position:"relative"},children:[K(ie,{component:"img",src:P(f.uuid,{thumb:"md"}),alt:f.name,title:f.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),K(ut,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:B,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:K(oa,{sx:{fontSize:14}})})]},`kept-${f.uuid}-${b}`):K(ea,{size:"small",icon:K(fr,{sx:{fontSize:14}}),label:f.name,onDelete:B,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${f.uuid??f.name}-${b}`)}),m.files.map((f,b)=>{let B=()=>g({...m,files:m.files.filter((k,h)=>h!==b)});return ta(f.name)?eo(ie,{sx:{position:"relative"},children:[K(ie,{component:"img",src:URL.createObjectURL(f),alt:f.name,title:`${f.name} (\uC0C8 \uD30C\uC77C)`,onLoad:k=>URL.revokeObjectURL(k.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"2px solid #2f80ed",display:"block"}}),K(ut,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:B,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:K(oa,{sx:{fontSize:14}})})]},`new-${f.name}-${b}`):K(ea,{size:"small",icon:K(fr,{sx:{fontSize:14}}),label:`${f.name} (\uC0C8 \uD30C\uC77C)`,onDelete:B,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${f.name}-${b}`)}),K($m,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:K(ut,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>p.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:K(Ly,{sx:{fontSize:20}})})})]}),eo(ie,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[K(Nm,{size:"small",color:"inherit",onClick:()=>g(null),children:"\uCDE8\uC18C"}),K(Nm,{size:"small",variant:"contained",disabled:!m.text.trim()&&m.attachments.length===0&&m.files.length===0,onClick:()=>{i(e,v,m.text,{attachments:m.attachments,files:m.files}),g(null)},children:"\uC800\uC7A5"})]}),K(ie,{component:"input",type:"file",multiple:!0,ref:p,sx:{display:"none"},onChange:f=>{let b=Array.from(f.target.files??[]);b.length>0&&g({...m,files:[...m.files,...b].slice(0,10)}),f.target.value=""}})]}):eo(ie,{children:[O.text?K(ie,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:O.text}):null,(O.attachments??[]).length>0?K(ie,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(O.attachments??[]).map((f,b)=>{let B=!!f.uuid;if(ta(f.name)&&B)return K(ie,{component:"img",src:P(f.uuid??"",{thumb:"md"}),alt:f.name,title:`${f.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>S(f),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${f.name}-${b}`);let h=Ki(f.name);return K(ea,{size:"small",icon:K(fr,{sx:{fontSize:14}}),label:`${f.name} (${ql(f.size)})`,clickable:B,onClick:B?()=>h?S(f):D(f):void 0,title:B?`${f.name} ${h?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:f.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${f.name}-${b}`)})}):null]})]})]},`${O.time}-${v}`)})}),K(qe,{open:!!s,anchorEl:s?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>u(null),onConfirm:()=>{s&&(a(e,s.index),g(null)),u(null)}})]})}function ta(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function Um({onSubmit:e}){let[o,t]=pr(""),[n,r]=pr([]),[i,a]=pr(!1),l=Al(null),d=Al(null),c=Me(),m=s=>{let u=Array.from(s??[]);u.length!==0&&r(_=>[..._,...u].slice(0,10))},g=()=>{let s=o.trim();!s&&n.length===0||(e(s,n.length>0?n:void 0),t(""),r([]))},p=eo(Wm,{children:[K(ut,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>l.current?.click(),sx:{color:"#9a9a97"},children:K(fr,{sx:{fontSize:20}})}),K(ut,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>d.current?.click(),sx:{color:"#9a9a97"},children:K(Ny,{sx:{fontSize:20}})})]});return eo(ie,{children:[n.length>0?K(ie,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,px:2,pt:1},children:n.map((s,u)=>ta(s.name)?eo(ie,{sx:{position:"relative"},children:[K(ie,{component:"img",src:URL.createObjectURL(s),alt:s.name,title:s.name,onLoad:_=>URL.revokeObjectURL(_.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),K(ut,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>r(_=>_.filter((I,T)=>T!==u)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:K(oa,{sx:{fontSize:14}})})]},`${s.name}-${u}`):K(ea,{size:"small",icon:K(fr,{sx:{fontSize:14}}),label:`${s.name} (${ql(s.size)})`,onDelete:()=>r(_=>_.filter((I,T)=>T!==u)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${s.name}-${u}`))}):null,eo(ie,{sx:{position:"relative",display:"flex"},onDragOver:s=>{Array.from(s.dataTransfer?.types??[]).includes("Files")&&(s.preventDefault(),a(!0))},onDragLeave:s=>{s.currentTarget.contains(s.relatedTarget)||a(!1)},onDrop:s=>{Array.from(s.dataTransfer?.types??[]).includes("Files")&&(s.preventDefault(),a(!1),m(s.dataTransfer?.files??null))},children:[i?eo(ie,{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:[K(fr,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,K(Oy,{value:o,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:s=>t(s.target.value),fullWidth:!0,multiline:!0,minRows:c?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:c?15:6.5,pb:c?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),c?eo(ie,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[p,K(ut,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:g,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:K(Fm,{sx:{fontSize:22}})})]}):eo(Wm,{children:[K(ie,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:p}),K(ut,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:g,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:K(Fm,{sx:{fontSize:22}})})]})]}),K(ie,{component:"input",ref:l,type:"file",multiple:!0,onChange:s=>{m(s.target.files),s.target.value=""},sx:{display:"none"}}),K(ie,{component:"input",ref:d,type:"file",accept:"image/*",multiple:!0,onChange:s=>{m(s.target.files),s.target.value=""},sx:{display:"none"}})]})}import{useState as Ll}from"react";import{Box as ia,Checkbox as Qy,IconButton as gr,Tooltip as Yr}from"@mui/material";import Zy from"@mui/icons-material/Close";import Jy from"@mui/icons-material/ArrowBack";import e0 from"@mui/icons-material/ShareOutlined";import o0 from"@mui/icons-material/ContentCopyOutlined";import t0 from"@mui/icons-material/CheckCircle";import n0 from"@mui/icons-material/CheckCircleOutlineOutlined";import r0 from"@mui/icons-material/HistoryOutlined";import i0 from"@mui/icons-material/Print";import{useEffect as Hy}from"react";import{Box as jt,Button as Wy,CircularProgress as $y}from"@mui/material";import{FormDialog as Vy}from"@ehfuse/mui-form-dialog";import{OverlayScrollbar as Uy}from"@ehfuse/overlay-scrollbar";import{jsx as Yt,jsxs as na}from"react/jsx-runtime";var Ky={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 Km(e){return String(e??"").trim()||"\uC5C6\uC74C"}function Gy(e){if(e.kind!=="field")return Ky[String(e.kind)]??"\uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4";let o=String(e.field_label??e.field??"").trim()||"\uD56D\uBAA9",t=String(e.old_value??"").trim(),n=String(e.new_value??"").trim();return!t&&n?`${o}\uC744(\uB97C) "${n}"(\uC73C)\uB85C \uC785\uB825\uD588\uC2B5\uB2C8\uB2E4`:t&&!n?`${o}\uC744(\uB97C) \uBE44\uC6E0\uC2B5\uB2C8\uB2E4`:`${o}\uC744(\uB97C) "${Km(t)}" \u2192 "${Km(n)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function ra({open:e,taskSeq:o,items:t,loading:n,onLoad:r,onClose:i}){let a=Me();Hy(()=>{e&&o>0&&!t&&r?.(o)},[e,o,t,r]);let l=Yt(jt,{sx:{height:a?"100%":420,minHeight:0},children:Yt(Uy,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:na(jt,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[n&&!t?na(jt,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[Yt($y,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,t&&t.length===0?Yt(jt,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(t??[]).map(d=>na(jt,{sx:{display:"flex",flexDirection:a?"column":"row",gap:a?.25:1,alignItems:a?"stretch":"baseline",minWidth:0,flexShrink:0,...a?{pb:1,borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none",pb:0}}:{}},children:[Yt(jt,{sx:{flexShrink:0,...a?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:at(d.acted_time)}),na(jt,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[Yt(jt,{component:"span",sx:{fontWeight:500},children:String(d.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),Yt(jt,{component:"span",sx:{ml:.5},children:Gy(d)})]})]},d.seq))]})})});return Yt(Vy,{open:e,onClose:i,maxWidth:"sm",fullScreen:a,mobilePresentation:a?"slide":"dialog",contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sx:a?{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${t&&t.length>0?` (${t.length})`:""}`,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-activity",sections:[{id:"task-activity",showTitle:!1,children:l}],scrollPastLastSection:!1,actions:{showCancelButton:!1,right:Yt(Wy,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{InfoAlert as jy,SuccessAlert as Yy}from"@ehfuse/alerts";var Gm=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
|
|
9
9
|
`).replace(/<\/(p|div|li|h[1-6]|tr)>/gi,`
|
|
10
10
|
`).replace(/<[^>]+>/g,"").replace(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&/gi,"&").replace(/\n{3,}/g,`
|