%PDF- %PDF-
Direktori : /home/opti/public_html/ezone-accounting.optisoft.com.ng/static/js/ |
Current File : /home/opti/public_html/ezone-accounting.optisoft.com.ng/static/js/114.66d45393.chunk.js |
(this["webpackJsonpfuse-react-app"]=this["webpackJsonpfuse-react-app"]||[]).push([[114],{1191:function(e,t,a){"use strict";a.d(t,"e",(function(){return h})),a.d(t,"l",(function(){return O})),a.d(t,"k",(function(){return p})),a.d(t,"f",(function(){return f})),a.d(t,"g",(function(){return v})),a.d(t,"j",(function(){return g})),a.d(t,"h",(function(){return N})),a.d(t,"a",(function(){return w})),a.d(t,"d",(function(){return C})),a.d(t,"b",(function(){return y})),a.d(t,"i",(function(){return k})),a.d(t,"m",(function(){return A}));var c=a(19),s=a(50),n=a.n(s),r=a(52),i=a(125),l=a(10),d=a(45);var o=function(e){return e=e||{},l.a.defaults(e,{id:r.a.generateGUID(),name:"",description:"",idAttachmentCover:"",idMembers:[],idLabels:[],attachments:[],subscribed:!0,checklists:[],checkItems:0,checkItemsChecked:0,comments:[],activities:[],due:""})};var b=function(e){return e=e||{},l.a.defaults(e,{id:r.a.generateGUID(),name:"",idCards:[]})};const j=(e,t,a)=>{const c=Array.from(e),[s]=c.splice(t,1);return c.splice(a,0,s),c};var m=j;var u=a(1252),x=a(1203);const h=Object(c.b)("scrumboardApp/board/getBoard",(async(e,t)=>{let{dispatch:a}=t;try{const t=await n.a.get("/api/scrumboard-app/board",{params:e});return await t.data}catch(c){return a(Object(d.c)({message:c.response.data,autoHideDuration:2e3,anchorOrigin:{vertical:"top",horizontal:"right"}})),i.a.push({pathname:"/apps/scrumboard/boards"}),null}})),O=Object(c.b)("scrumboardApp/board/reorderList",(async(e,t)=>{let{dispatch:a,getState:c}=t;const{board:s}=c().scrumboardApp,{lists:r}=s,i=m(l.a.merge([],r),e.source.index,e.destination.index),o=await n.a.post("/api/scrumboard-app/list/order",{boardId:s.id,lists:i}),b=await o.data;return a(Object(d.c)({message:"List Order Saved",autoHideDuration:2e3,anchorOrigin:{vertical:"top",horizontal:"right"}})),b})),p=Object(c.b)("scrumboardApp/board/reorderCard",(async(e,t)=>{let{source:a,destination:c}=e,{dispatch:s,getState:r}=t;const{board:i}=r().scrumboardApp,{lists:o}=i,b=((e,t,a)=>{const c=l.a.find(e,{id:t.droppableId}),s=l.a.find(e,{id:a.droppableId}),n=c.idCards[t.index];if(t.droppableId===a.droppableId){const s=j(c.idCards,t.index,a.index);return e.map((e=>(e.id===t.droppableId&&(e.idCards=s),e)))}return c.idCards.splice(t.index,1),s.idCards.splice(a.index,0,n),e.map((e=>e.id===t.droppableId?c:e.id===a.droppableId?s:e))})(l.a.merge([],o),a,c),m=await n.a.post("/api/scrumboard-app/card/order",{boardId:i.id,lists:b}),u=await m.data;return s(Object(d.c)({message:"Card Order Saved",autoHideDuration:2e3,anchorOrigin:{vertical:"top",horizontal:"right"}})),u})),f=Object(c.b)("scrumboardApp/board/newCard",(async(e,t)=>{let{boardId:a,listId:c,cardTitle:s}=e,{dispatch:r,getState:i}=t;const l=await n.a.post("/api/scrumboard-app/card/new",{boardId:a,listId:c,data:o({name:s})});return await l.data})),v=Object(c.b)("scrumboardApp/board/newList",(async(e,t)=>{let{boardId:a,listTitle:c}=e,{dispatch:s,getState:r}=t;const i=await n.a.post("/api/scrumboard-app/list/new",{boardId:a,data:b({name:c})});return await i.data})),g=Object(c.b)("scrumboardApp/board/renameList",(async(e,t)=>{let{boardId:a,listId:c,listTitle:s}=e,{dispatch:r,getState:i}=t;const l=await n.a.post("/api/scrumboard-app/list/rename",{boardId:a,listId:c,listTitle:s});return await l.data})),N=Object(c.b)("scrumboardApp/board/removeList",(async(e,t)=>{let{boardId:a,listId:c}=e,{dispatch:s,getState:r}=t;const i=await n.a.post("/api/scrumboard-app/list/remove",{boardId:a,listId:c});return await i.data})),w=Object(c.b)("scrumboardApp/board/changeBoardSettings",(async(e,t)=>{let{dispatch:a,getState:c}=t;const{board:s}=c().scrumboardApp,r=l.a.merge({},s.settings,e),i=await n.a.post("/api/scrumboard-app/board/settings/update",{boardId:s.id,settings:r});return await i.data})),C=Object(c.b)("scrumboardApp/board/deleteBoard",(async(e,t)=>{let{dispatch:a,getState:c}=t;const s=await n.a.post("/api/scrumboard-app/board/delete",{boardId:e});i.a.push({pathname:"/apps/scrumboard/boards"});return await s.data})),y=Object(c.b)("scrumboardApp/board/copyBoard",(async(e,t)=>{let{dispatch:a,getState:c}=t;const s=l.a.merge({},e,{id:r.a.generateGUID(),name:"".concat(e.name," (Copied)"),uri:"".concat(e.uri,"-copied")});return a(Object(u.c)(s)),s})),k=Object(c.b)("scrumboardApp/board/renameBoard",(async(e,t)=>{let{boardId:a,boardTitle:c}=e,{dispatch:s,getState:r}=t;const i=await n.a.post("/api/scrumboard-app/board/rename",{boardId:a,boardTitle:c});return await i.data})),I=Object(c.d)({name:"scrumboardApp/boards",initialState:null,reducers:{resetBoard:(e,t)=>null,addLabel:(e,t)=>{e.labels=[...e.labels,t.payload]}},extraReducers:{[h.fulfilled]:(e,t)=>t.payload,[O.fulfilled]:(e,t)=>{e.lists=t.payload},[p.fulfilled]:(e,t)=>{e.lists=t.payload},[v.fulfilled]:(e,t)=>{e.lists=t.payload},[f.fulfilled]:(e,t)=>t.payload,[g.fulfilled]:(e,t)=>{const{listId:a,listTitle:c}=t.payload;e.lists=e.lists.map((e=>(e.id===a&&(e.name=c),e)))},[N.fulfilled]:(e,t)=>{e.lists=l.a.reject(e.lists,{id:t.payload})},[w.fulfilled]:(e,t)=>{e.settings=t.payload},[C.fulfilled]:(e,t)=>{({})},[k.fulfilled]:(e,t)=>{e.name=t.payload},[x.e.fulfilled.type]:(e,t)=>{e.cards=e.cards.map((e=>e.id===t.payload.id?t.payload:e))},[x.d.fulfilled]:(e,t)=>{const a=t.payload;e.cards=l.a.reject(e.cards,{id:a}),e.lists=e.lists.map((e=>(l.a.set(e,"idCards",l.a.reject(e.idCards,(e=>e===a))),e)))}}}),{resetBoard:A,addLabel:S}=I.actions;t.c=I.reducer},1203:function(e,t,a){"use strict";a.d(t,"e",(function(){return i})),a.d(t,"d",(function(){return l})),a.d(t,"c",(function(){return o})),a.d(t,"a",(function(){return b}));var c=a(19),s=a(50),n=a.n(s),r=a(45);const i=Object(c.b)("scrumboardApp/card/updateCard",(async(e,t)=>{let{boardId:a,card:c}=e,{dispatch:s}=t;const i=await n.a.post("/api/scrumboard-app/card/update",{boardId:a,card:c}),l=await i.data;return s(Object(r.c)({message:"Card Saved",autoHideDuration:2e3,anchorOrigin:{vertical:"top",horizontal:"right"}})),l})),l=Object(c.b)("scrumboardApp/card/removeCard",(async(e,t)=>{let{boardId:a,cardId:c}=e,{dispatch:s}=t;const r=await n.a.post("/api/scrumboard-app/card/remove",{boardId:a,cardId:c}),i=await r.data;return s(b()),i})),d=Object(c.d)({name:"scrumboardApp/card",initialState:{dialogOpen:!1,data:null},reducers:{openCardDialog:(e,t)=>{e.dialogOpen=!0,e.data=t.payload},closeCardDialog:(e,t)=>{e.dialogOpen=!1,e.data=null}},extraReducers:{[i.fulfilled]:(e,t)=>{e.data=t.payload}}}),{openCardDialog:o,closeCardDialog:b}=d.actions;t.b=d.reducer},1252:function(e,t,a){"use strict";a.d(t,"b",(function(){return j})),a.d(t,"c",(function(){return m})),a.d(t,"e",(function(){return x})),a.d(t,"d",(function(){return p}));var c=a(19),s=a(50),n=a.n(s),r=a(125),i=a(52),l=a(10);const d=[{id:"26022e4129ad3a5sc28b36cd",name:"High Priority",class:"bg-red text-white"},{id:"56027e4119ad3a5dc28b36cd",name:"Design",class:"bg-orange text-white"},{id:"5640635e19ad3a5dc21416b2",name:"App",class:"bg-blue text-white"},{id:"6540635g19ad3s5dc31412b2",name:"Feature",class:"bg-green text-white"}],o=[{id:"56027c1930450d8bf7b10758",name:"Alice Freeman",avatar:"assets/images/avatars/alice.jpg"},{id:"26027s1930450d8bf7b10828",name:"Danielle Obrien",avatar:"assets/images/avatars/danielle.jpg"},{id:"76027g1930450d8bf7b10958",name:"James Lewis",avatar:"assets/images/avatars/james.jpg"},{id:"36027j1930450d8bf7b10158",name:"John Doe",avatar:"assets/images/avatars/Velazquez.jpg"}];var b=function(e){return e=e||{},l.a.defaults(e,{name:"Untitled Board",uri:"untitled-board",id:i.a.generateGUID(),settings:{color:"",subscribed:!0,cardCoverImages:!0},lists:[],cards:[],members:o,labels:d})};const j=Object(c.b)("scrumboardApp/boards/getBoards",(async()=>{const e=await n.a.get("/api/scrumboard-app/boards");return await e.data})),m=Object(c.b)("scrumboardApp/boards/newBoard",(async(e,t)=>{let{dispatch:a}=t;const c=await n.a.post("/api/scrumboard-app/board/new",{board:e||b()}),s=await c.data;return r.a.push({pathname:"/apps/scrumboard/boards/".concat(s.id,"/").concat(s.handle)}),s})),u=Object(c.c)({}),{selectAll:x,selectById:h}=u.getSelectors((e=>e.scrumboardApp.boards)),O=Object(c.d)({name:"scrumboardApp/boards",initialState:u.getInitialState({}),reducers:{resetBoards:(e,t)=>{}},extraReducers:{[j.fulfilled]:u.setAll}}),{resetBoards:p}=O.actions;t.a=O.reducer},1325:function(e,t,a){"use strict";var c=a(112),s=a(1191),n=a(1252),r=a(1203);const i=Object(c.c)({boards:n.a,board:s.c,card:r.b});t.a=i},2696:function(e,t,a){"use strict";a.r(t);var c=a(1100),s=a(1098),n=a(1121),r=a(1090),i=a(1028),l=a(1072),d=a(1125),o=a(1101),b=a(133),j=a(5),m=a(0),u=a(1367),x=a(6),h=a(49),O=a(28),p=a(89),f=a(1325),v=a(1191),g=a(32),N=a(131),w=a(1109),C=a(1026),y=a(1115),k=a(65),I=a(1096),A=a(57),S=a(10),L=a(1);const D=Object(l.a)((e=>({card:{backgroundColor:Object(k.darken)(e.palette.background.paper,"light"===e.palette.type?.02:.25)}}))),T={title:""},V=A.d().shape({title:A.f().required("You must enter a title")});var R=function(e){const t=Object(x.b)(),a=Object(x.c)((e=>{let{scrumboardApp:t}=e;return t.board})),c=D(e),[n,l]=Object(m.useState)(!1),{control:d,formState:o,handleSubmit:b,reset:u}=Object(g.f)({mode:"onChange",defaultValues:T,resolver:Object(N.a)(V)}),{isValid:h,dirtyFields:O,errors:p}=o;function f(){l(!1)}return Object(m.useEffect)((()=>{n||u(T)}),[n,u]),Object(L.jsx)("div",{children:Object(L.jsx)(w.a,{className:Object(j.a)(c.card,"w-320 mx-8 sm:mx-12 rounded-20 shadow"),square:!0,children:n?Object(L.jsx)(C.a,{onClickAway:f,children:Object(L.jsxs)("form",{className:"p-16",onSubmit:b((function(e){t(Object(v.g)({boardId:a.id,listTitle:e.title})),f()})),children:[Object(L.jsx)(g.a,{name:"title",control:d,render:e=>{let{field:t}=e;return Object(L.jsx)(I.a,{...t,className:"mb-16",required:!0,fullWidth:!0,variant:"filled",label:"List title",autoFocus:!0,InputProps:{endAdornment:Object(L.jsx)(y.a,{position:"end",children:Object(L.jsx)(i.a,{onClick:f,children:Object(L.jsx)(r.a,{className:"text-18",children:"close"})})})}})}}),Object(L.jsx)("div",{className:"flex justify-between items-center",children:Object(L.jsx)(s.a,{variant:"contained",color:"secondary",type:"submit",disabled:S.a.isEmpty(O)||!h,children:"Add"})})]})}):Object(L.jsxs)(s.a,{onClick:function(e){e.stopPropagation(),l(!0)},classes:{root:"font-medium w-full rounded-none h-64 px-16",label:"justify-start"},children:[Object(L.jsx)(r.a,{className:"text-32 text-red",children:"add_circle"}),Object(L.jsx)("span",{className:"mx-8",children:"Add a list"})]})})})},P=a(1311),E=a(1116),M=a(2526);const B={title:""},_=A.d().shape({title:A.f().required("You must enter a title")});var F=function(e){const t=Object(x.b)(),a=Object(x.c)((e=>{let{scrumboardApp:t}=e;return t.board})),[c,n]=Object(m.useState)(!1),{control:l,formState:d,handleSubmit:o,reset:b}=Object(g.f)({mode:"onChange",defaultValues:B,resolver:Object(N.a)(_)}),{isValid:j,dirtyFields:u,errors:h}=d;function O(){n(!1)}return Object(m.useEffect)((()=>{c||b(B)}),[c,b]),Object(L.jsx)("div",{className:"w-full border-t-1",children:c?Object(L.jsx)(C.a,{onClickAway:O,children:Object(L.jsxs)("form",{className:"p-16",onSubmit:o((function(c){t(Object(v.f)({boardId:a.id,listId:e.listId,cardTitle:c.title})).then((()=>{e.onCardAdded()})),O()})),children:[Object(L.jsx)(g.a,{name:"title",control:l,render:e=>{let{field:t}=e;return Object(L.jsx)(I.a,{className:"mb-16",required:!0,fullWidth:!0,variant:"filled",label:"Card title",autoFocus:!0,InputProps:{...t,endAdornment:Object(L.jsx)(y.a,{position:"end",children:Object(L.jsx)(i.a,{onClick:O,children:Object(L.jsx)(r.a,{className:"text-18",children:"close"})})})}})}}),Object(L.jsx)("div",{className:"flex justify-between items-center",children:Object(L.jsx)(s.a,{variant:"contained",color:"secondary",type:"submit",disabled:S.a.isEmpty(u)||!j,children:"Add"})})]})}):Object(L.jsxs)(s.a,{onClick:function(e){e.stopPropagation(),n(!0)},classes:{root:"font-medium w-full px-16 rounded-none h-48",label:"justify-start"},children:[Object(L.jsx)(r.a,{className:"text-20",children:"add"}),Object(L.jsx)("span",{className:"mx-8",children:"Add a card"})]})})},q=a(1124),z=a(1097),H=a(194),U=a(165),Y=a(1264),G=a(56),W=a(1203);const J=Object(l.a)((e=>({card:{transitionProperty:"box-shadow",transitionDuration:e.transitions.duration.short,transitionTimingFunction:e.transitions.easing.easeInOut}})));var K=function(e){const t=Object(x.b)(),a=Object(x.c)((e=>{let{scrumboardApp:t}=e;return t.board})),c=J(e),{cardId:s,index:n}=e,i=S.a.find(a.cards,{id:s}),l=(d=i,S.a.sum(d.checklists.map((e=>S.a.sum(e.checkItems.map((e=>e.checked?1:0)))))));var d;const o=function(e){return S.a.sum(e.checklists.map((e=>e.checkItems.length)))}(i),b=function(e){return S.a.sum(e.activities.map((e=>"comment"===e.type?1:0)))}(i);return Object(L.jsx)(u.b,{draggableId:s,index:n,type:"card",children:(e,s)=>Object(L.jsx)("div",{ref:e.innerRef,...e.draggableProps,...e.dragHandleProps,children:Object(L.jsxs)(w.a,{className:Object(j.a)(c.card,s.isDragging?"shadow-lg":"shadow-0","w-full mb-16 rounded-16 cursor-pointer border-1"),onClick:e=>function(e,a){e.preventDefault(),t(Object(W.c)(a))}(e,i),children:[a.settings.cardCoverImages&&""!==i.idAttachmentCover&&Object(L.jsx)("img",{className:"block",src:S.a.find(i.attachments,{id:i.idAttachmentCover}).src,alt:"card cover"}),Object(L.jsxs)("div",{className:"p-16 pb-0",children:[i.idLabels.length>0&&Object(L.jsx)("div",{className:"flex flex-wrap mb-8 -mx-4",children:i.idLabels.map((e=>{const t=S.a.find(a.labels,{id:e});return Object(L.jsx)(z.a,{title:t.name,children:Object(L.jsx)("div",{className:Object(j.a)(t.class,"w-32 h-6 rounded-6 mx-4 mb-6")})},e)}))}),Object(L.jsx)(H.a,{className:"font-medium mb-12",children:i.name}),(i.due||o>0)&&Object(L.jsxs)("div",{className:"flex items-center mb-12 -mx-4",children:[i.due&&Object(L.jsxs)("div",{className:Object(j.a)("flex items-center px-8 py-4 mx-4 rounded-16",Object(G.a)(new Date)>i.due?"bg-red text-white":"bg-green text-white"),children:[Object(L.jsx)(r.a,{className:"text-16",children:"access_time"}),Object(L.jsx)("span",{className:"mx-4",children:Object(U.a)(Object(Y.a)(i.due),"MMM do yy")})]}),o>0&&Object(L.jsxs)("div",{className:Object(j.a)("flex items-center px-8 py-4 mx-4 rounded-16",l===o?"bg-green text-white":"bg-grey-700 text-white"),children:[Object(L.jsx)(r.a,{className:"text-16",children:"check_circle"}),Object(L.jsx)("span",{className:"mx-4",children:"".concat(l,"/").concat(o)})]})]}),i.idMembers.length>0&&Object(L.jsxs)("div",{className:"flex flex-wrap mb-12 -mx-4",children:[i.idMembers.map((e=>{const t=S.a.find(a.members,{id:e});return Object(L.jsx)(z.a,{title:t.name,children:Object(L.jsx)(q.a,{className:"mx-4 w-32 h-32",src:t.avatar})},e)})),Object(L.jsx)("div",{})]})]}),Object(L.jsxs)("div",{className:"flex justify-between h-48 px-16 border-t-1",children:[Object(L.jsxs)("div",{className:"flex items-center -mx-6",children:[i.subscribed&&Object(L.jsx)(r.a,{className:"text-18 mx-6",color:"action",children:"remove_red_eye"}),""!==i.description&&Object(L.jsx)(r.a,{className:"text-18 mx-6",color:"action",children:"description"})]}),Object(L.jsxs)("div",{className:"flex items-center justify-end -mx-6",children:[i.attachments&&Object(L.jsxs)("span",{className:"flex items-center mx-6",children:[Object(L.jsx)(r.a,{className:"text-18",color:"action",children:"attachment"}),Object(L.jsx)(H.a,{className:"mx-8",color:"textSecondary",children:i.attachments.length})]}),b>0&&Object(L.jsxs)("span",{className:"flex items-center mx-6",children:[Object(L.jsx)(r.a,{className:"text-18",color:"action",children:"comment"}),Object(L.jsx)(H.a,{className:"mx-8",color:"textSecondary",children:b})]})]})]})]})})})},Q=a(1112),X=a(1103),Z=a(536),$=a(1092);const ee=A.d().shape({title:A.f().required("You must enter a title")});var te=function(e){const t=Object(x.b)(),a=Object(x.c)((e=>{let{scrumboardApp:t}=e;return t.board})),[c,s]=Object(m.useState)(null),[n,l]=Object(m.useState)(!1),{control:d,formState:o,handleSubmit:b,reset:j}=Object(g.f)({mode:"onChange",defaultValues:{title:e.list.name},resolver:Object(N.a)(ee)}),{isValid:u,dirtyFields:h,errors:O}=o;function p(e){e.stopPropagation(),l(!0)}function f(){l(!1)}return Object(m.useEffect)((()=>{n||j({title:e.list.name})}),[n,j,e.list.name]),Object(m.useEffect)((()=>{n&&c&&s(null)}),[c,n]),Object(L.jsx)("div",{...e.handleProps,children:Object(L.jsxs)("div",{className:"flex items-center justify-between h-48 sm:h-64 px-8",children:[Object(L.jsx)("div",{className:"flex items-center min-w-0 px-12",children:n?Object(L.jsx)(C.a,{onClickAway:f,children:Object(L.jsx)("form",{className:"flex w-full",onSubmit:b((function(c){t(Object(v.j)({boardId:a.id,listId:e.list.id,listTitle:c.title})),f()})),children:Object(L.jsx)(g.a,{name:"title",control:d,render:e=>{let{field:t}=e;return Object(L.jsx)(I.a,{...t,variant:"outlined",margin:"none",autoFocus:!0,InputProps:{endAdornment:Object(L.jsx)(y.a,{position:"end",children:Object(L.jsx)(i.a,{type:"submit",disabled:S.a.isEmpty(h)||!u,children:Object(L.jsx)(r.a,{children:"check"})})})}})}})})}):Object(L.jsx)(H.a,{className:"text-16 font-medium cursor-pointer",onClick:p,children:e.list.name})}),Object(L.jsxs)("div",{className:"",children:[Object(L.jsx)(i.a,{"aria-owns":c?"actions-menu":null,"aria-haspopup":"true",onClick:function(e){s(e.currentTarget)},variant:"outlined",size:"small",children:Object(L.jsx)(r.a,{className:"text-20",children:"more_vert"})}),Object(L.jsxs)(Z.a,{id:"actions-menu",anchorEl:c,open:Boolean(c),onClose:function(){s(null)},children:[Object(L.jsxs)($.a,{onClick:()=>{t(Object(v.h)({boardId:a.id,listId:e.list.id}))},children:[Object(L.jsx)(Q.a,{className:"min-w-40",children:Object(L.jsx)(r.a,{children:"delete"})}),Object(L.jsx)(X.a,{primary:"Remove List"})]}),Object(L.jsxs)($.a,{onClick:p,children:[Object(L.jsx)(Q.a,{className:"min-w-40",children:Object(L.jsx)(r.a,{children:"edit"})}),Object(L.jsx)(X.a,{primary:"Rename List"})]})]})]})]})})};const ae=Object(l.a)((e=>({list:{backgroundColor:Object(k.darken)(e.palette.background.paper,"light"===e.palette.type?.02:.25),transitionProperty:"box-shadow",transitionDuration:e.transitions.duration.short,transitionTimingFunction:e.transitions.easing.easeInOut}})));var ce=function(e){const t=ae(e),a=Object(m.useRef)(null);function c(){a.current.scrollTop=a.current.scrollHeight}return Object(L.jsx)(u.b,{draggableId:e.list.id,index:e.index,type:"list",children:(s,n)=>Object(L.jsx)("div",{ref:s.innerRef,...s.draggableProps,children:Object(L.jsxs)(w.a,{className:Object(j.a)(t.list,n.isDragging?"shadow-lg":"shadow","w-256 sm:w-320 mx-8 sm:mx-12 max-h-full flex flex-col rounded-20"),square:!0,children:[Object(L.jsx)(te,{list:e.list,className:"border-b-1",handleProps:s.dragHandleProps}),Object(L.jsx)(M.a,{rootRef:a,children:Object(L.jsx)(E.a,{className:"flex flex-col flex-1 flex-auto h-full min-h-0 w-full p-0 overflow-auto",children:Object(L.jsx)(u.c,{droppableId:e.list.id,type:"card",direction:"vertical",children:t=>Object(L.jsxs)("div",{ref:t.innerRef,className:"flex flex-col w-full h-full p-16",children:[e.list.idCards.map(((t,a)=>Object(L.jsx)(K,{cardId:t,index:a,list:e.list},t))),t.placeholder]})})})}),Object(L.jsx)(P.a,{className:"p-0 flex-shrink-0",children:Object(L.jsx)(F,{listId:e.list.id,onCardAdded:c})})]})})})},se=a(193);const ne=A.d().shape({title:A.f().required("You must enter a title")});var re=function(e){const t=Object(x.b)(),a=Object(x.c)((e=>{let{scrumboardApp:t}=e;return t.board})),[c,s]=Object(m.useState)(!1),{control:n,formState:l,handleSubmit:d,reset:o}=Object(g.f)({mode:"onChange",defaultValues:{title:a.name},resolver:Object(N.a)(ne)}),{isValid:b,dirtyFields:j,errors:u}=l;function h(){s(!1)}return Object(m.useEffect)((()=>{c||o({title:a.name})}),[c,o,a.name]),Object(L.jsx)("div",{className:"flex items-center min-w-0",children:c?Object(L.jsx)(C.a,{onClickAway:h,children:Object(L.jsx)(se.a,{children:Object(L.jsx)("form",{className:"flex w-full",onSubmit:d((function(e){t(Object(v.i)({boardId:a.id,boardTitle:e.title})),h()})),children:Object(L.jsx)(g.a,{name:"title",control:n,render:e=>{let{field:t}=e;return Object(L.jsx)(I.a,{...t,variant:"filled",margin:"none",autoFocus:!0,hiddenLabel:!0,InputProps:{endAdornment:Object(L.jsx)(y.a,{position:"end",children:Object(L.jsx)(i.a,{type:"submit",disabled:S.a.isEmpty(j)||!b,children:Object(L.jsx)(r.a,{children:"check"})})})}})}})})})}):Object(L.jsxs)("div",{className:"flex items-center justify-center",children:[a.settings.subscribed&&Object(L.jsx)(r.a,{className:"text-16",children:"remove_red_eye"}),Object(L.jsx)(H.a,{className:"text-14 sm:text-18 font-medium cursor-pointer mx-8",onClick:function(e){e.stopPropagation(),s(!0)},color:"inherit",children:a.name})]})})},ie=a(1085),le=a(1312),de=a(1192),oe=a(1194),be=a(1247),je=a(1033),me=a(2716),ue=a(1034),xe=a(404);const he=Object(l.a)((e=>({commentBubble:{borderRadius:"5px 20px 20px 5px",border:"1px solid ".concat(e.palette.divider)}})));var Oe=function(e){const t=he(e),a=S.a.find(e.members,{id:e.item.idMember});switch(e.item.type){case"comment":return Object(L.jsxs)(ue.a,{dense:!0,className:"px-0",children:[Object(L.jsx)(q.a,{alt:a.name,src:a.avatar,className:"w-32 h-32"}),Object(L.jsxs)("div",{className:Object(j.a)(t.commentBubble,"flex flex-col mx-16 p-12"),children:[Object(L.jsxs)("div",{className:"flex items-center",children:[Object(L.jsx)(H.a,{children:a.name}),Object(L.jsx)(H.a,{className:"mx-8 text-12",color:"textSecondary",children:Object(xe.a)(Object(Y.a)(e.item.time),{addSuffix:!0})})]}),Object(L.jsx)(H.a,{children:e.item.message})]})]});case"attachment":return Object(L.jsxs)(ue.a,{dense:!0,className:"px-0",children:[Object(L.jsx)(q.a,{alt:a.name,src:a.avatar,className:"w-32 h-32"}),Object(L.jsxs)("div",{className:"flex items-center mx-16",children:[Object(L.jsxs)(H.a,{children:[a.name,","]}),Object(L.jsx)(H.a,{className:"mx-8",children:e.item.message}),Object(L.jsx)(H.a,{className:"text-12",color:"textSecondary",children:Object(xe.a)(Object(Y.a)(e.item.time),{addSuffix:!0})})]})]});default:return null}};var pe=function(e){const[t,a]=Object(m.useState)(null);function c(e){a(e.currentTarget)}function n(){a(null)}switch(e.item.type){case"image":return Object(L.jsxs)("div",{className:"flex w-full sm:w-1/2 mb-16 px-16",children:[Object(L.jsx)("div",{className:"flex items-center justify-center min-w-128 w-128 h-128",children:Object(L.jsx)(se.a,{className:"overflow-hidden shadow",children:Object(L.jsx)("img",{className:"block max-h-full max-h-full",src:e.item.src,alt:"attachment"})})}),Object(L.jsxs)("div",{className:"flex flex-auto flex-col justify-center items-start min-w-0 px-16",children:[Object(L.jsxs)("div",{className:"flex items-center w-full",children:[Object(L.jsx)(H.a,{className:"text-16 font-semibold truncate flex-shrink",children:e.item.name}),e.card.idAttachmentCover===e.item.id&&Object(L.jsx)(r.a,{className:"text-orange-300 text-20 mx-4",children:"star"})]}),Object(L.jsx)(H.a,{className:"truncate w-full mb-12",color:"textSecondary",children:Object(U.a)(Object(Y.a)(e.item.time),"Pp")}),Object(L.jsxs)(s.a,{"aria-owns":t?"actions-menu":null,"aria-haspopup":"true",onClick:c,variant:"outlined",size:"small",children:["Actions",Object(L.jsx)(r.a,{className:"text-20",children:"arrow_drop_down"})]}),Object(L.jsxs)(Z.a,{id:"actions-menu",anchorEl:t,open:Boolean(t),onClose:n,children:[e.card.idAttachmentCover!==e.item.id?Object(L.jsx)($.a,{onClick:()=>{n(),e.makeCover(e.item.id)},children:"Make Cover"}):Object(L.jsx)($.a,{onClick:()=>{n(),e.removeCover()},children:"Remove Cover"}),Object(L.jsx)($.a,{onClick:()=>{n(),e.removeAttachment(e.item.id)},children:"Remove Attachment"})]})]})]},e.item.id);case"link":return Object(L.jsxs)("div",{className:"flex w-full sm:w-1/2 mb-16 px-16",children:[Object(L.jsx)(se.a,{className:"min-w-128 w-128 h-128 flex items-center justify-center rounded-4 overflow-hidden shadow",children:Object(L.jsx)(H.a,{className:"font-semibold",children:"LINK"})}),Object(L.jsxs)("div",{className:"flex flex-auto flex-col justify-center items-start min-w-0 px-16",children:[Object(L.jsx)(H.a,{className:"text-16 font-semibold truncate w-full",children:e.item.url}),Object(L.jsx)(H.a,{className:"truncate w-full mb-12",color:"textSecondary",children:e.item.time}),Object(L.jsxs)(s.a,{"aria-owns":t?"actions-menu":null,"aria-haspopup":"true",onClick:c,variant:"outlined",size:"small",children:["Actions",Object(L.jsx)(r.a,{className:"text-20",children:"arrow_drop_down"})]}),Object(L.jsx)(Z.a,{id:"simple-menu",anchorEl:t,open:Boolean(t),onClose:n,children:Object(L.jsx)($.a,{onClick:()=>{n(),e.removeAttachment(e.item.id)},children:"Remove Attachment"})})]})]},e.item.id);default:return null}},fe=a(1091),ve=a(1102),ge=a(52);var Ne=function(e){return e=e||{},S.a.defaults(e,{id:ge.a.generateGUID(),name:"",checked:!1})};const we=A.d().shape({name:A.f().required("You must enter a title")});var Ce=function(e){const{control:t,formState:a,handleSubmit:c,reset:s}=Object(g.f)({mode:"onChange",defaultValues:{name:e.name},resolver:Object(N.a)(we)}),{isValid:n,dirtyFields:i,errors:l}=a;return Object(L.jsx)("form",{onSubmit:c((function(t){e.onListItemAdd(Ne(t)),s({name:e.name})})),children:Object(L.jsxs)(ue.a,{className:"px-0",dense:!0,children:[Object(L.jsx)("span",{className:"w-40"}),Object(L.jsx)(g.a,{name:"name",control:t,render:e=>{let{field:t}=e;return Object(L.jsx)(I.a,{...t,className:"flex flex-1 mx-8",name:"name",variant:"outlined",placeholder:"Add an item"})}}),Object(L.jsx)(ve.a,{className:"mx-4","aria-label":"Add",size:"small",color:"secondary",type:"submit",disabled:S.a.isEmpty(i)||!n,children:Object(L.jsx)(r.a,{children:"add"})})]})})},ye=a(1165);var ke=function(e){const{item:t,onListItemChange:a,index:c}=e,{control:s,watch:n}=Object(g.f)({mode:"onChange",defaultValues:t}),l=n();return Object(m.useEffect)((()=>{S.a.isEqual(t,l)||a(l,c)}),[l,c,a,t]),Object(L.jsxs)(ue.a,{className:"px-0",dense:!0,children:[Object(L.jsx)(g.a,{name:"checked",control:s,defaultValue:!1,render:e=>{let{field:{onChange:t,value:a}}=e;return Object(L.jsx)(ye.a,{tabIndex:-1,checked:a,onChange:e=>t(e.target.checked),disableRipple:!0})}}),Object(L.jsx)(g.a,{name:"name",control:s,render:e=>{let{field:t}=e;return Object(L.jsx)(I.a,{...t,className:"flex flex-1 mx-8",variant:"outlined"})}}),Object(L.jsx)(i.a,{"aria-label":"Delete",onClick:e.onListItemRemove,children:Object(L.jsx)(r.a,{children:"delete"})})]},t.id)};const Ie=A.d().shape({name:A.f().required("You must enter a title")});var Ae=Object(m.forwardRef)((function(e,t){const[a,c]=Object(m.useState)(!1),{control:s,formState:n,handleSubmit:l,reset:d}=Object(g.f)({mode:"onChange",defaultValues:{name:e.name},resolver:Object(N.a)(Ie)}),{isValid:o,dirtyFields:b,errors:j}=n;function u(e){e.stopPropagation(),c(!0)}function x(){c(!1)}return Object(m.useEffect)((()=>{a||d({name:e.name})}),[a,d,e.name]),Object(m.useImperativeHandle)(t,(()=>({openForm:u}))),a?Object(L.jsx)(C.a,{onClickAway:x,children:Object(L.jsx)("form",{onSubmit:l((function(t){e.onNameChange(t.name),x()})),children:Object(L.jsx)(g.a,{name:"name",control:s,render:e=>{let{field:t}=e;return Object(L.jsx)(I.a,{...t,variant:"outlined",margin:"dense",autoFocus:!0,InputProps:{endAdornment:Object(L.jsx)(y.a,{position:"end",children:Object(L.jsx)(i.a,{type:"submit",disabled:S.a.isEmpty(b)||!o,children:Object(L.jsx)(r.a,{children:"check"})})})}})}})})}):Object(L.jsx)(H.a,{className:"text-16 font-semibold cursor-pointer mx-8",onClick:u,children:e.name})}));var Se=function(e){const{onCheckListChange:t,checklist:a,index:c}=e,[s,n]=Object(m.useState)(null),l=Object(m.useRef)(),{watch:d,control:o}=Object(g.f)({mode:"onChange",defaultValues:a}),b=d();function j(){n(null)}function u(){return S.a.sum(b.checkItems.map((e=>e.checked?1:0)))}return Object(m.useEffect)((()=>{S.a.isEqual(b,a)||t(b,c)}),[b,c,t,a]),b?Object(L.jsxs)("div",{className:"mb-24",children:[Object(L.jsxs)("div",{className:"flex items-center justify-between mt-16 mb-12",children:[Object(L.jsxs)("div",{className:"flex items-center",children:[Object(L.jsx)(r.a,{className:"text-20",children:"check_box"}),Object(L.jsx)(g.a,{name:"name",control:o,defaultValue:"",render:e=>{let{field:{onChange:t,value:a}}=e;return Object(L.jsx)(Ae,{name:a,onNameChange:e=>t(e),ref:l})}})]}),Object(L.jsxs)("div",{className:"",children:[Object(L.jsx)(i.a,{"aria-owns":s?"actions-menu":null,"aria-haspopup":"true",onClick:function(e){n(e.currentTarget)},variant:"outlined",size:"small",children:Object(L.jsx)(r.a,{className:"text-20",children:"more_vert"})}),Object(L.jsxs)(Z.a,{id:"actions-menu",anchorEl:s,open:Boolean(s),onClose:j,children:[Object(L.jsxs)($.a,{onClick:e.onRemoveCheckList,children:[Object(L.jsx)(Q.a,{className:"min-w-40",children:Object(L.jsx)(r.a,{children:"delete"})}),Object(L.jsx)(X.a,{primary:"Remove Checklist"})]}),Object(L.jsxs)($.a,{onClick:function(e){j(),l.current.openForm(e)},children:[Object(L.jsx)(Q.a,{className:"min-w-40",children:Object(L.jsx)(r.a,{children:"edit"})}),Object(L.jsx)(X.a,{primary:"Rename Checklist"})]})]})]})]}),Object(L.jsxs)("div",{className:"",children:[Object(L.jsxs)("div",{className:"flex items-center -mx-6",children:[Object(L.jsx)(H.a,{className:"flex font-semibold mx-6",children:"".concat(u()," / ").concat(b.checkItems.length)}),Object(L.jsx)(fe.a,{className:"flex flex-1 mx-6",variant:"determinate",color:"secondary",value:100*u()/b.checkItems.length})]}),Object(L.jsx)(g.a,{name:"checkItems",control:o,defaultValue:[],render:e=>{let{field:{onChange:t,value:a}}=e;return Object(L.jsxs)(je.a,{className:"",children:[a.map(((e,c)=>Object(L.jsx)(ke,{item:e,index:c,onListItemChange:(e,c)=>{t(S.a.setIn(a,"[".concat(c,"]"),e))},onListItemRemove:()=>{t(S.a.reject(a,{id:e.id}))}},e.id))),Object(L.jsx)(Ce,{onListItemAdd:e=>t([...a,e])})]})}})]})]}):null};var Le=function(e){return e=e||{},S.a.defaults(e,{id:ge.a.generateGUID(),type:"comment",idMember:null,message:"",time:Object(G.a)(new Date)})};const De=A.d().shape({message:A.f().required("You must enter a comment")});var Te=function(e){const t={idMember:"36027j1930450d8bf7b10158",message:""},{control:a,formState:c,handleSubmit:n,reset:r}=Object(g.f)({mode:"onChange",defaultValues:t,resolver:Object(N.a)(De)}),{isValid:i,dirtyFields:l,errors:d}=c,o=S.a.find(e.members,{id:t.idMember});return Object(L.jsxs)("form",{onSubmit:n((function(a){e.onCommentAdd(Le({...t,...a})),r(t)})),className:"flex -mx-8",children:[Object(L.jsx)(q.a,{className:"w-32 h-32 mx-8",alt:o.name,src:o.avatar}),Object(L.jsxs)("div",{className:"flex flex-col items-start flex-1 mx-8",children:[Object(L.jsx)(g.a,{name:"message",control:a,render:e=>{var t;let{field:a}=e;return Object(L.jsx)(I.a,{...a,className:"flex flex-1",fullWidth:!0,error:!!d.message,helperText:null===d||void 0===d||null===(t=d.message)||void 0===t?void 0:t.message,row:3,variant:"outlined",label:"Add comment",placeholder:"Write a comment..."})}}),Object(L.jsx)(s.a,{className:"mt-16","aria-label":"save",variant:"contained",color:"secondary",type:"submit",size:"small",disabled:S.a.isEmpty(l)||!i,children:"Save"})]})]})};var Ve=function(e){return e=e||{},S.a.defaults(e,{id:ge.a.generateGUID(),name:"",checkItems:[]})},Re=a(1031);var Pe=function(e){return Object(L.jsx)(Re.a,{open:Boolean(e.state),anchorEl:e.state,onClose:e.onClose,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:Object(L.jsx)(L.Fragment,{children:e.children})})};const Ee=A.d().shape({name:A.f().required("You must enter a title")});var Me=function(e){const[t,a]=Object(m.useState)(null),{control:c,formState:n,handleSubmit:l,reset:d}=Object(g.f)({mode:"onChange",defaultValues:{name:e.name},resolver:Object(N.a)(Ee)}),{isValid:o,dirtyFields:b,errors:j}=n;function u(){a(null)}return Object(m.useEffect)((()=>{t||d({name:e.name})}),[t,d,e.name]),Object(L.jsxs)("div",{children:[Object(L.jsx)(i.a,{color:"inherit",onClick:function(e){a(e.currentTarget)},children:Object(L.jsx)(r.a,{children:"check_box"})}),Object(L.jsx)(Pe,{state:t,onClose:u,children:Object(L.jsxs)("form",{onSubmit:l((function(t){e.onAddCheckList(Ve(t)),u()})),className:"p-16 flex flex-col items-end",children:[Object(L.jsx)(g.a,{name:"name",control:c,render:e=>{var t;let{field:a}=e;return Object(L.jsx)(I.a,{...a,label:"Checklist title",error:!!j.name,helperText:null===j||void 0===j||null===(t=j.name)||void 0===t?void 0:t.message,fullWidth:!0,className:"mb-12",variant:"outlined",required:!0,autoFocus:!0})}}),Object(L.jsx)(s.a,{color:"secondary",type:"submit",disabled:S.a.isEmpty(b)||!o,variant:"contained",children:"Add"})]})})]})};var Be=function(e){const[t,a]=Object(m.useState)(null),c=e.due?Object(U.a)(Object(Y.a)(e.due),"Pp"):Object(U.a)(new Date,"Pp");function s(){a(null)}return Object(L.jsxs)("div",{children:[Object(L.jsx)(i.a,{color:"inherit",onClick:function(e){a(e.currentTarget)},children:Object(L.jsx)(r.a,{children:"today"})}),Object(L.jsx)(Pe,{state:t,onClose:s,children:Object(L.jsx)("div",{className:"p-16 max-w-192",children:e.due?Object(L.jsx)($.a,{onClick:t=>{e.onRemoveDue(),s()},children:"Remove Due Date"}):Object(L.jsx)(le.a,{label:"Due date",inputVariant:"outlined",value:c,format:"Pp",onChange:(t,a)=>{e.onDueChange(Object(G.a)(t)),s()},placeholder:"Choose a due date",className:"w-full"})})})]})};var _e=function(e){const[t,a]=Object(m.useState)(null);return Object(L.jsxs)("div",{children:[Object(L.jsx)(i.a,{color:"inherit",onClick:function(e){a(e.currentTarget)},children:Object(L.jsx)(r.a,{children:"label"})}),Object(L.jsx)(Pe,{state:t,onClose:function(){a(null)},children:Object(L.jsx)("div",{className:"",children:e.labels.map((t=>Object(L.jsxs)($.a,{className:"px-8",onClick:a=>{e.onToggleLabel(t.id)},children:[Object(L.jsx)(ye.a,{checked:e.idLabels.includes(t.id)}),Object(L.jsx)(X.a,{className:"mx-8",children:t.name}),Object(L.jsx)(Q.a,{className:"min-w-24",children:Object(L.jsx)(r.a,{children:"label"})})]},t.id)))})})]})};var Fe=function(e){const[t,a]=Object(m.useState)(null);return Object(L.jsxs)("div",{children:[Object(L.jsx)(i.a,{color:"inherit",onClick:function(e){a(e.currentTarget)},children:Object(L.jsx)(r.a,{children:"account_circle"})}),Object(L.jsx)(Pe,{state:t,onClose:function(){a(null)},children:Object(L.jsx)("div",{className:"",children:e.members.map((t=>Object(L.jsxs)($.a,{className:"px-8",onClick:a=>{e.onToggleMember(t.id)},children:[Object(L.jsx)(ye.a,{checked:e.idMembers.includes(t.id)}),Object(L.jsx)(q.a,{className:"w-32 h-32",src:t.avatar}),Object(L.jsx)(X.a,{className:"mx-8",children:t.name})]},t.id)))})})]})};var qe=function(e){const[t,a]=Object(m.useState)(null);return Object(L.jsxs)("div",{children:[Object(L.jsx)(i.a,{color:"inherit",onClick:function(e){a(e.currentTarget)},children:Object(L.jsx)(r.a,{children:"more_horiz"})}),Object(L.jsx)(Pe,{state:t,onClose:function(){a(null)},children:Object(L.jsx)($.a,{onClick:e.onRemoveCard,children:"Remove Card"})})]})};var ze=function(e){const t=Object(x.b)(),a=Object(x.c)((e=>{let{scrumboardApp:t}=e;return t.card.data})),s=Object(x.c)((e=>{let{scrumboardApp:t}=e;return t.board})),{register:n,watch:l,control:d,setValue:b}=Object(g.f)({mode:"onChange",defaultValues:a}),u=l(),h=Object(p.a)(((e,a)=>{t(Object(W.e)({boardId:e,card:{...a}}))}),600),O=a?S.a.find(s.lists,(e=>e.idCards.includes(a.id))):null;return Object(m.useEffect)((()=>{a&&(S.a.isEqual(a,u)||h(s.id,u))}),[s.id,a,u,h]),Object(m.useEffect)((()=>{n("idAttachmentCover")}),[n]),a?Object(L.jsxs)(L.Fragment,{children:[Object(L.jsx)(be.a,{component:"div",className:"p-0",children:Object(L.jsx)(c.a,{position:"static",elevation:0,children:Object(L.jsxs)(o.a,{className:"flex w-full overflow-x-auto px-8 sm:px-16",children:[Object(L.jsxs)("div",{className:"flex flex-1",children:[Object(L.jsx)(g.a,{name:"due",control:d,defaultValue:null,render:e=>{let{field:{onChange:t,value:a}}=e;return Object(L.jsx)(Be,{onDueChange:t,onRemoveDue:()=>t(null),due:a})}}),Object(L.jsx)(g.a,{name:"idLabels",control:d,defaultValue:[],render:e=>{let{field:{onChange:t,value:a}}=e;return Object(L.jsx)(_e,{onToggleLabel:e=>t(S.a.xor(a,[e])),labels:s.labels,idLabels:a})}}),Object(L.jsx)(g.a,{name:"idMembers",control:d,defaultValue:[],render:e=>{let{field:{onChange:t,value:a}}=e;return Object(L.jsx)(Fe,{onToggleMember:e=>t(S.a.xor(a,[e])),members:s.members,idMembers:a})}}),Object(L.jsx)(g.a,{name:"attachments",control:d,defaultValue:[],render:e=>{let{field:{onChange:t,value:a}}=e;return Object(L.jsx)(i.a,{color:"inherit",children:Object(L.jsx)(r.a,{children:"attachment"})})}}),Object(L.jsx)(g.a,{name:"checklists",control:d,defaultValue:[],render:e=>{let{field:{onChange:t,value:a}}=e;return Object(L.jsx)(Me,{onAddCheckList:e=>t([...u.checklists,e])})}}),Object(L.jsx)(qe,{onRemoveCard:()=>t(Object(W.d)({boardId:s.id,cardId:u.id}))})]}),Object(L.jsx)(i.a,{color:"inherit",onClick:e=>t(Object(W.a)()),children:Object(L.jsx)(r.a,{children:"close"})})]})})}),Object(L.jsxs)(oe.a,{className:"p-16 sm:p-24",children:[Object(L.jsxs)("div",{className:"flex flex-col sm:flex-row sm:justify-between justify-center items-center mb-24",children:[Object(L.jsxs)("div",{className:"mb-16 sm:mb-0 flex items-center",children:[Object(L.jsx)(H.a,{children:s.name}),Object(L.jsx)(r.a,{className:"text-20",color:"inherit",children:"chevron_right"}),Object(L.jsx)(H.a,{children:O&&O.name})]}),u.due&&Object(L.jsx)(le.a,{label:"Due date",inputVariant:"outlined",value:Object(U.a)(Object(Y.a)(u.due),"Pp"),format:"Pp",onChange:e=>b("due",Object(G.a)(e)),placeholder:"Choose a due date",className:"w-full sm:w-auto"})]}),Object(L.jsx)("div",{className:"flex items-center mb-24",children:Object(L.jsx)(g.a,{name:"name",control:d,render:e=>{let{field:t}=e;return Object(L.jsx)(I.a,{...t,label:"Title",type:"text",variant:"outlined",fullWidth:!0,required:!0,InputProps:{endAdornment:Object(L.jsx)(y.a,{position:"end",children:a.subscribed&&Object(L.jsx)(r.a,{className:"text-20",color:"action",children:"remove_red_eye"})})}})}})}),Object(L.jsx)("div",{className:"w-full mb-24",children:Object(L.jsx)(g.a,{name:"description",control:d,render:e=>{let{field:t}=e;return Object(L.jsx)(I.a,{...t,label:"Description",multiline:!0,rows:"4",variant:"outlined",fullWidth:!0})}})}),Object(L.jsxs)("div",{className:"flex flex-col sm:flex-row -mx-8",children:[u.idLabels&&u.idLabels.length>0&&Object(L.jsxs)("div",{className:"flex-1 mb-24 mx-8",children:[Object(L.jsxs)("div",{className:"flex items-center mt-16 mb-12",children:[Object(L.jsx)(r.a,{className:"text-20",color:"inherit",children:"label"}),Object(L.jsx)(H.a,{className:"font-semibold text-16 mx-8",children:"Labels"})]}),Object(L.jsx)(me.a,{className:"mt-8 mb-16",multiple:!0,freeSolo:!0,options:s.labels,getOptionLabel:e=>e.name,value:u.idLabels.map((e=>S.a.find(s.labels,{id:e}))),onChange:(e,t)=>{b("idLabels",t.map((e=>e.id)))},renderTags:(e,t)=>e.map(((e,a)=>Object(L.jsx)(de.a,{label:e.name,...t({index:a}),className:Object(j.a)("m-3",e.class)}))),renderInput:e=>Object(L.jsx)(I.a,{...e,placeholder:"Select multiple Labels",label:"Labels",variant:"outlined",InputLabelProps:{shrink:!0}})})]}),u.idMembers&&u.idMembers.length>0&&Object(L.jsxs)("div",{className:"flex-1 mb-24 mx-8",children:[Object(L.jsxs)("div",{className:"flex items-center mt-16 mb-12",children:[Object(L.jsx)(r.a,{className:"text-20",color:"inherit",children:"supervisor_account"}),Object(L.jsx)(H.a,{className:"font-semibold text-16 mx-8",children:"Members"})]}),Object(L.jsx)(me.a,{className:"mt-8 mb-16",multiple:!0,freeSolo:!0,options:s.members,getOptionLabel:e=>e.name,value:u.idMembers.map((e=>S.a.find(s.members,{id:e}))),onChange:(e,t)=>{b("idMembers",t.map((e=>e.id)))},renderTags:(e,t)=>e.map(((e,a)=>Object(L.jsx)(de.a,{label:e.name,...t({index:a}),className:Object(j.a)("m-3",e.class),avatar:Object(L.jsx)(z.a,{title:e.name,children:Object(L.jsx)(q.a,{src:e.avatar})})}))),renderInput:e=>Object(L.jsx)(I.a,{...e,placeholder:"Select multiple Members",label:"Members",variant:"outlined",InputLabelProps:{shrink:!0}})})]})]}),u.attachments&&u.attachments.length>0&&Object(L.jsxs)("div",{className:"mb-24",children:[Object(L.jsxs)("div",{className:"flex items-center mt-16 mb-12",children:[Object(L.jsx)(r.a,{className:"text-20",color:"inherit",children:"attachment"}),Object(L.jsx)(H.a,{className:"font-semibold text-16 mx-8",children:"Attachments"})]}),Object(L.jsx)("div",{className:"flex flex-col sm:flex-row flex-wrap -mx-16",children:u.attachments.map((e=>Object(L.jsx)(pe,{item:e,card:u},e.id)))})]}),u.checklists&&u.checklists.map(((e,t)=>Object(L.jsx)(Se,{checklist:e,index:t,onCheckListChange:(e,t)=>{b("checklists",S.a.setIn(u.checklists,"[".concat(t,"]"),e))},onRemoveCheckList:()=>{b("checklists",S.a.reject(u.checklists,{id:e.id}))}},e.id))),Object(L.jsxs)("div",{className:"mb-24",children:[Object(L.jsxs)("div",{className:"flex items-center mt-16 mb-12",children:[Object(L.jsx)(r.a,{className:"text-20",color:"inherit",children:"comment"}),Object(L.jsx)(H.a,{className:"font-semibold text-16 mx-8",children:"Comment"})]}),Object(L.jsx)("div",{children:Object(L.jsx)(Te,{members:s.members,onCommentAdd:e=>b("activities",[e,...u.activities])})})]}),Object(L.jsx)(g.a,{name:"activities",control:d,defaultValue:[],render:e=>{let{field:{onChange:t,value:a}}=e;return Object(L.jsx)("div",{children:a.length>0&&Object(L.jsxs)("div",{className:"mb-24",children:[Object(L.jsxs)("div",{className:"flex items-center mt-16",children:[Object(L.jsx)(r.a,{className:"text-20",color:"inherit",children:"list"}),Object(L.jsx)(H.a,{className:"font-semibold text-16 mx-8",children:"Activity"})]}),Object(L.jsx)(je.a,{className:"",children:a.map((e=>Object(L.jsx)(Oe,{item:e,members:s.members},e.id)))})]})})}})]})]}):null};const He=Object(l.a)((e=>({paper:{color:e.palette.text.primary}})));var Ue=function(e){const t=Object(x.b)(),a=Object(x.c)((e=>{let{scrumboardApp:t}=e;return t.card.dialogOpen})),c=He(e);return Object(L.jsx)(ie.a,{classes:{paper:Object(j.a)(c.paper,"max-w-lg w-full m-24")},onClose:e=>t(Object(W.a)()),open:a,children:Object(L.jsx)(ze,{})})},Ye=a(1113),Ge=a(1095);var We=function(e){const t=Object(x.b)(),a=Object(x.c)((e=>{let{scrumboardApp:t}=e;return t.board}));return Object(L.jsxs)("div",{children:[Object(L.jsx)(c.a,{position:"static",children:Object(L.jsx)(o.a,{className:"flex w-full justify-center",children:"Settings"})}),Object(L.jsxs)(je.a,{className:"py-16",dense:!0,children:[Object(L.jsxs)(ue.a,{button:!0,onClick:()=>t(Object(v.a)({cardCoverImages:!a.settings.cardCoverImages})),children:[Object(L.jsx)(Q.a,{className:"min-w-40",children:Object(L.jsx)(r.a,{children:"photo"})}),Object(L.jsx)(X.a,{primary:"Card Cover Images"}),Object(L.jsx)(Ye.a,{children:Object(L.jsx)(Ge.a,{onChange:()=>t(Object(v.a)({cardCoverImages:!a.settings.cardCoverImages})),checked:a.settings.cardCoverImages})})]}),Object(L.jsxs)(ue.a,{button:!0,onClick:()=>t(Object(v.a)({subscribed:!a.settings.subscribed})),children:[Object(L.jsx)(Q.a,{className:"min-w-40",children:Object(L.jsx)(r.a,{children:"remove_red_eye"})}),Object(L.jsx)(X.a,{primary:"Subscribe"}),Object(L.jsx)(Ye.a,{children:Object(L.jsx)(Ge.a,{onChange:()=>t(Object(v.a)({subscribed:!a.settings.subscribed})),checked:a.settings.subscribed})})]}),Object(L.jsxs)(ue.a,{button:!0,onClick:()=>t(Object(v.b)(a)),children:[Object(L.jsx)(Q.a,{className:"min-w-40",children:Object(L.jsx)(r.a,{children:"file_copy"})}),Object(L.jsx)(X.a,{primary:"Copy Board"})]}),Object(L.jsxs)(ue.a,{button:!0,onClick:()=>t(Object(v.d)(a.id)),children:[Object(L.jsx)(Q.a,{className:"min-w-40",children:Object(L.jsx)(r.a,{children:"delete"})}),Object(L.jsx)(X.a,{primary:"Delete Board"})]})]})]})};const Je=Object(l.a)((e=>({"@global":{"#fuse-main":{height:"100vh"}}})));t.default=Object(b.a)("scrumboardApp",f.a)(Object(h.k)((function(e){Je(e);const t=Object(x.b)(),a=Object(x.c)((e=>{let{scrumboardApp:t}=e;return t.board})),l=Object(h.j)(),b=Object(m.useRef)(null),[f,g]=Object(m.useState)(!1);function N(e){g(void 0===e?!f:e)}return Object(p.b)((()=>(t(Object(v.e)(l)),()=>{t(Object(v.m)())})),[t,l]),a?Object(L.jsxs)("div",{className:"flex flex-1 flex-auto flex-col w-full h-full relative",ref:b,children:[Object(L.jsx)(c.a,{position:"static",color:"primary",elevation:0,children:Object(L.jsxs)(o.a,{className:"flex items-center justify-between px-4 sm:px-24 h-48 sm:h-64 sm:h-96 container",children:[Object(L.jsx)(n.a,{xsDown:!0,children:Object(L.jsxs)(s.a,{to:"/apps/scrumboard/boards/",component:O.a,variant:"contained",color:"secondary",children:[Object(L.jsx)(r.a,{children:"assessment"}),Object(L.jsx)("span",{className:"px-8",children:"Boards"})]})}),Object(L.jsx)(n.a,{smUp:!0,children:Object(L.jsx)(i.a,{color:"inherit",to:"/apps/scrumboard/boards/",component:O.a,children:Object(L.jsx)(r.a,{children:"assessment"})})}),Object(L.jsx)("div",{className:"flex flex-1 justify-center items-center",children:Object(L.jsx)(re,{})}),Object(L.jsx)(i.a,{color:"inherit",onClick:()=>N(!0),children:Object(L.jsx)(r.a,{children:"settings"})})]})}),Object(L.jsx)("div",{className:Object(j.a)("flex flex-1 overflow-x-auto overflow-y-hidden"),children:Object(L.jsx)(u.a,{onDragEnd:function(e){const{source:a,destination:c}=e;c&&(a.droppableId===c.droppableId&&a.index===c.index||("list"===e.type&&t(Object(v.l)(e)),"card"===e.type&&t(Object(v.k)(e))))},children:Object(L.jsx)(u.c,{droppableId:"list",type:"list",direction:"horizontal",children:e=>Object(L.jsxs)("div",{ref:e.innerRef,className:"flex container py-16 md:py-24 px-8 md:px-12",children:[a.lists.map(((e,t)=>Object(L.jsx)(ce,{list:e,index:t},e.id))),e.placeholder,Object(L.jsx)(R,{})]})})})}),Object(L.jsx)(d.a,{anchor:"right",className:"absolute overflow-hidden",classes:{paper:"absolute w-320"},BackdropProps:{classes:{root:"absolute"}},container:b.current,ModalProps:{keepMounted:!0,style:{position:"absolute"}},open:f,onOpen:e=>{},onClose:()=>N(!1),disableSwipeToOpen:!0,children:Object(L.jsx)(We,{})}),Object(L.jsx)(Ue,{})]}):null})))}}]);