@imj_media/tareas 0.1.17 → 0.1.18
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/tareas.cjs +1 -1
- package/dist/tareas.css +5 -1
- package/dist/tareas.es.js +1 -1
- package/package.json +8 -6
package/dist/tareas.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("@imj_media/imj-ui/styles.css");const A=require("@tanstack/react-query"),d=require("react"),y=require("@imj_media/tasks-modules"),Q=require("react-dom"),ue=require("axios"),me=require("qs"),K=require("date-fns"),G=require("date-fns/locale"),C=require("@imj_media/imj-ui"),Pe=require("react-hook-form"),qe=require("primereact/paginator"),Ee=({label:t,active:s,onClick:n,disabled:a})=>a?e.jsx(y.Tooltip,{dispatch:e.jsxs("button",{className:"text-texts-placeholder text-xs font-semibold cursor-help",children:[" ",t," "]}),children:e.jsx("div",{className:"flex items-center justify-center px-3 py-2 bg-bg-card rounded-lg border border-border-card",children:e.jsx("p",{className:"text-texts-placeholder text-xs font-semibold",children:"Espéralo muy pronto..."})})}):e.jsx("button",{disabled:a,onClick:n,className:`${s?"text-texts-enfasis border-b-2 border-texts-enfasis":""} text-xs font-semibold ${a?"cursor-not-allowed text-texts-placeholder":"text-texts-subtext"} `,children:t}),De=({tabs:t,renderItem:s,initialTab:n})=>{const[a,r]=d.useState(n??t[0].toLowerCase());d.useEffect(()=>{n&&r(n)},[n]);const l=i=>{r(i),s(i)};return e.jsx("div",{className:"flex",children:t.map((i,x)=>e.jsx("div",{className:`${x===0?"border-l-2":""} border-r-2 border-gray-200 px-m`,children:e.jsx(Ee,{onClick:()=>l(i.toLowerCase()),label:i,active:i.toLowerCase()===a,disabled:["gantt"].includes(i.toLowerCase())},x)}))})},_={bg:{DEFAULT:"#EFEFEF",content:"#FAFAFA",card:"#FAFAFA"},texts:{DEFAULT:"#252525",enfasis:"#3658c1",subtext:"#4f4f4f",placeholder:"#929292"},primary:{light:"#E7E9F2",medium:"#dae2ec",dark:"#334990",regular:"#425CAC",pastel:"#5c7ddd"},success:{light:"#368156",medium:"#D2E9DC",dark:"#368156",regular:"#43B071",pastel:"#57BA81"},danger:{light:"#F1E5E4",medium:"#EBDBD9",dark:"#8C352C",regular:"#C34335",pastel:"#C4335"},warning:{light:"#F2ECE5",medium:"#EBE3D9",dark:"#B4782F",regular:"#D38A31",pastel:"#D38A31"},alert:{light:"#F1F1E4",medium:"#EAE9D9",dark:"#ADA63A",regular:"#D6CC48",pastel:"#D6CC48"},info:{light:"#E7F5FF",medium:"#D9E6EE",dark:"#1C5073",regular:"#1B6698",pastel:"#1B6698"},link:{light:"#ECF8FE",medium:"#D8F1FD",dark:"#0A7AAE",regular:"#0EA5E9",pastel:"#0EA5E9"}},Y=()=>{const[t,s]=d.useState(null);return{position:t,setElementPosition:l=>{var u;let i=(u=l.current)==null?void 0:u.getBoundingClientRect(),x=(i==null?void 0:i.x)+((i==null?void 0:i.width)??0),o=(i==null?void 0:i.y)+(i==null?void 0:i.height);s(t?null:{x:x??0,y:o??0})},getChildrenSize:l=>{var i;return(i=l.current)==null?void 0:i.getBoundingClientRect()},clearPosition:()=>{s(null)}}},Ie=({children:t,filterChildren:s})=>{const{position:n,setElementPosition:a}=Y(),r=d.useRef(null),l=({children:i})=>{const[x,o]=d.useState();return d.useEffect(()=>{var u,c;s.current&&o(((n==null?void 0:n.x)??0)-(((c=(u=s.current)==null?void 0:u.getBoundingClientRect())==null?void 0:c.width)??0))},[s==null?void 0:s.current,n==null?void 0:n.x]),n&&Q.createPortal(e.jsx("div",{className:`absolute w-fit h-fit ${x?"block":"hidden"}`,style:{top:`${n==null?void 0:n.y}px`,left:`${x}px`},children:i}),document.body)};return e.jsxs(e.Fragment,{children:[e.jsxs("label",{ref:r,htmlFor:"filter-button",className:"flex cursor-pointer items-center gap-m p-s text-texts-enfasis fill-texts-enfasis bg-bg rounded-lg px-l h-[30px] shadow-button-primary hover:shadow-button-primary-hover ",children:[e.jsx(y.Icons,{icon:"filter",size:"xs",strokeWidth:5,color:_.primary.regular}),"Filtrar"]}),e.jsx("button",{className:"hidden",id:"filter-button",onClick:()=>{a(r)}}),e.jsx(l,{children:t})]})},ce=t=>{let s={};return Object.entries(t).forEach(([n,a])=>{if(n.includes(".")){let[r,l]=n.split(".");s[r]=s[r]||{},s[r][l]=a}else s[n]=a}),s},pe=d.createContext({}),$e=({children:t})=>{const[s,n]=d.useState({}),[a,r]=d.useState({}),[l,i]=d.useState([]),x=({name:c,value:h})=>{function p(f){return!isNaN(f)&&f!==null&&f!==""?parseFloat(f):null}let j=p(h);r(f=>{let g={...f},w=l==null?void 0:l.find(b=>b.label.toLowerCase().replace(/ /g,"_")===c);return w?g[w.id]=j??h:g[c]=j??h,g})};d.useEffect(()=>{let c=l.map(h=>h.id==="owner.config"?[h.id,"yo_y_mis_equipos"]:h.id==="dependency"?[h.id,"ambas"]:[h.id,null]);r(Object.fromEntries(c))},[l]);const o=()=>{let c=l.map(h=>h.id==="owner.config"?[h.id,"yo_y_mis_equipos"]:h.id==="dependency"?[h.id,"ambas"]:[h.id,null]);r(Object.fromEntries(c)),n(ce(Object.fromEntries(c)))},u=()=>{let c=ce(a);n(c)};return e.jsx(pe.Provider,{value:{fields:l,filters:s,defineFields:i,updateFilters:x,cleanFilters:o,applyFilters:u,initialFilters:a},children:t})},I=()=>d.useContext(pe);function he(t,s=300,n={leading:!1,trailing:!0}){let a,r=null;return function(...l){const i=Date.now(),x=n.leading&&!r;clearTimeout(a),x&&t(...l),r=i,a=setTimeout(()=>{n.trailing&&(!n.leading||i-r>=s)&&(t(...l),r=null)},s)}}const Be=()=>{const{fields:t,updateFilters:s,cleanFilters:n,applyFilters:a,initialFilters:r}=I();return e.jsxs("div",{className:"flex flex-col gap-l min-w-[250px]",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("p",{className:"text-texts text-m",children:"Filtros"}),e.jsx("button",{className:"text-xs font-semibold flex cursor-pointer items-center gap-m p-s text-texts-enfasis fill-texts-enfasis bg-bg rounded-lg px-l h-fit shadow-button-primary hover:shadow-button-primary-hover ",onClick:n,children:"Limpiar"})]}),e.jsx("div",{className:"flex flex-col gap-m",children:t==null?void 0:t.map((l,i)=>{var x;return e.jsxs("div",{children:[e.jsx("p",{className:"text-sm",children:l.label}),(l==null?void 0:l.type)==="select"?e.jsx("select",{onChange:o=>{var u,c;s({name:(u=o==null?void 0:o.target)==null?void 0:u.name,value:(c=o==null?void 0:o.target)==null?void 0:c.value})},value:r==null?void 0:r[l==null?void 0:l.id],className:"w-full h-[30px] shadow-input rounded-lg p-s",name:l.id,id:l.id,children:(x=l==null?void 0:l.options)==null?void 0:x.map((o,u)=>e.jsx("option",{value:o.id,children:o.name},u))}):e.jsx("input",{className:"w-full h-[30px] shadow-input rounded-lg p-s",type:l.type,value:r==null?void 0:r[l==null?void 0:l.id],name:l.label.toLowerCase().replace(/ /g,"_"),onChange:he(o=>{var u,c;return s({name:(u=o==null?void 0:o.target)==null?void 0:u.name,value:(c=o==null?void 0:o.target)==null?void 0:c.value})},1e3)})]},i)})}),e.jsx("button",{className:"btn-primary rounded-md py-s",onClick:a,children:"Filtrar"})]})},$=t=>{const s=a=>Object.prototype.toString.call(a)==="[object Object]",n=a=>a.attributes?{id:a.id,...a.attributes}:a;if(Array.isArray(t))return t.map(a=>$(a));if(s(t)){Array.isArray(t.data)?t=[...t.data]:s(t.data)?t=n({...t.data}):t.data===null?t=null:t=n(t);for(const a in t)t[a]=$(t[a]);return t}return t};class Le{static toCampaignTasks(s){var a,r,l,i,x,o,u,c,h,p,j,f;let n=[];return s!=null&&s.responsable&&n.push({id:s.responsable.id,name:s.responsable.nombre,image:(x=(i=(l=(r=(a=s.responsable)==null?void 0:a.userOBP)==null?void 0:r.imagen)==null?void 0:l.formats)==null?void 0:i.thumbnail)==null?void 0:x.url}),console.log("task",s),(o=s==null?void 0:s.equipo)!=null&&o.miembros&&s.equipo.miembros.forEach(g=>{var w,b,v,F;n!=null&&n.find(N=>N.id===g.idUser.id)||g.idUser&&n.push({id:g.idUser.id,name:g.idUser.nombre,image:(F=(v=(b=(w=g==null?void 0:g.userOBP)==null?void 0:w.imagen)==null?void 0:b.formats)==null?void 0:v.thumbnail)==null?void 0:F.url})}),{isPrincipalTask:(s==null?void 0:s.tarea_principal)??!1,projectName:((u=s==null?void 0:s.proyecto)==null?void 0:u.nombre)??null,orden:(s==null?void 0:s.orden)??null,id:(s==null?void 0:s.id)??null,task:(s==null?void 0:s.texto_corto)??null,status:(s==null?void 0:s.estatus)??null,difficulty:(s==null?void 0:s.nivel_dificultad)??null,priority:(s==null?void 0:s.prioridad)??0,endDate:new Date((s==null?void 0:s.ffin)??null),startDate:new Date((s==null?void 0:s.finicio)??null),mediumName:(s==null?void 0:s.nombre_medio)??null,users:n,repeatsToDo:(s==null?void 0:s.repeticiones)??null,repeats:(s==null?void 0:s.repeticiones_realizadas)??null,comments:((c=s==null?void 0:s.comentarios)==null?void 0:c.length)??null,willBePaused:s==null?void 0:s.es_pausable,statusRequiredTask:((h=s==null?void 0:s.id_t_requerida)==null?void 0:h.estatus)??null,nameRequiredTask:((p=s==null?void 0:s.id_t_requerida)==null?void 0:p.texto_corto)??null,responsible:((j=s==null?void 0:s.responsable)==null?void 0:j.id)??null,tasks:((f=s==null?void 0:s.tareas)==null?void 0:f.map(g=>({id:g.id,name:g.texto_corto,status:g.estatus})))??null}}}const Me=async({filters:t,tasks_api:s,project:n})=>{try{const a=await s.get("/api/listado_tareas",{params:{...t,project:{id:n},includeAllTasks:!0}});return $(a.data.tareas).map(Le.toCampaignTasks)}catch(a){console.log(a)}},ge=d.createContext({}),ze=({children:t,user:s,url:n})=>{const a=ue.create({baseURL:n,headers:{Authorization:`Bearer ${s.accessToken}`},paramsSerializer:r=>me.stringify(r,{encodeValuesOnly:!0})});return e.jsx(ge.Provider,{value:{tasks_api:a},children:t})},q=()=>d.useContext(ge),fe=d.createContext({}),Re=({children:t,user:s,url:n})=>{const a=ue.create({baseURL:n,headers:{Authorization:`Bearer ${s.accessToken}`},paramsSerializer:r=>me.stringify(r,{encodeValuesOnly:!0})});return e.jsx(fe.Provider,{value:{user:s,tasks_api:a},children:t})},z=()=>d.useContext(fe),je=d.createContext({}),Oe=({children:t,project:s})=>{var w;const n=A.useQueryClient(),[a,r]=d.useState([]),[l,i]=d.useState([]),{tasks_api:x}=q(),{filters:o}=I(),{user:u}=z(),[c,h]=d.useState({owner:{user:u.id,config:((w=o==null?void 0:o.owner)==null?void 0:w.config)??"yo_y_mis_equipos"},project:{id:s}});d.useEffect(()=>{console.log(a)},[a]);const p=A.useQuery({queryKey:["tasksProject",s],queryFn:()=>Me({filters:{...c},project:s,tasks_api:x})});d.useEffect(()=>{var b;Object.keys(o).length>0&&h({...o,owner:{user:u.id,config:((b=o==null?void 0:o.owner)==null?void 0:b.config)??"yo_y_mis_equipos"},project:{id:s}})},[o]),d.useEffect(()=>{n.invalidateQueries({queryKey:["tasksProject",s]})},[c]);const j=b=>{r(v=>[...v,b])},f=b=>{i(v=>v.includes(b)?v.filter(F=>F!==b):[...v,b])},g=s??null;return e.jsx(je.Provider,{value:{tasksProject:p,selectedTasks:a,projectID:g,openTasks:l,selectTask:j,openTask:f},children:t})},H=()=>d.useContext(je),We=[{label:"Tipo de dependencia",type:"select",id:"dependency",options:[{id:"con",name:"Con dependencia"},{id:"sin",name:"Sin dependencia"},{id:"ambas",name:"Ambas"}]},{label:"Por responsable",type:"select",id:"owner.config",options:[{id:"yo",name:"Mis tareas"},{id:"yo_y_mis_equipos",name:"Tareas mías y de mis equipos"},{id:"mis_equipos",name:"Tareas de mis equipos"}]},{label:"Por dificultad",type:"select",id:"difficulty",options:[{id:0,name:"Muy facil"},{id:1,name:"Facil"},{id:2,name:"Media"},{id:3,name:"Dificil"},{id:4,name:"Muy dificil"}]}],Ue=({id:t})=>{const[s,n]=d.useState(!1);return{checked:s,checkTask:()=>{n(!s),console.log("completar tarea",t)}}},be=({id:t,nameRequiredTask:s,statusRequiredTask:n,status:a})=>{const{checked:r,checkTask:l}=Ue({id:t});let i=Math.random().toString();return console.log({statusRequiredTask:n}),e.jsxs(e.Fragment,{children:[a===1&&(n<2&&s!==""?e.jsx(y.Tooltip,{dispatch:e.jsx("label",{htmlFor:i,children:e.jsx(y.Icons,{icon:"info_circle",color:_.warning.regular,strokeWidth:4})}),children:e.jsxs("div",{className:"px-m py-s max-w-[200px] bg-warning-light rounded-lg border-l-[5px] border-warning-regular text-warning-dark text-xs",children:[e.jsx("p",{className:"font-bold",children:"Requiere completar su tarea requerida:"}),e.jsxs("p",{children:[" ",s," "]})]})}):e.jsx("label",{htmlFor:i,className:r?"bg-success-regular rounded-full w-[20px] h-[20px] flex items-center justify-center mx-[2px] transition-all":" transition-colors",children:e.jsx(y.Icons,{icon:r?"check_outline":"circle_checked",color:r?"white":_.texts.placeholder,strokeWidth:4,size:r?"xs":"s"})})),e.jsx("input",{id:i,checked:r,onChange:l,type:"checkbox",className:"hidden"})]})},L=({imageUrl:t="https://www.uv.unach.mx/assets/img/prueba/directorio/userM.png",alt:s="avatar"})=>e.jsx("img",{src:t===""?"https://www.uv.unach.mx/assets/img/prueba/directorio/userM.png":t,alt:s??"avatar",className:"w-[28px] h-[28px] min-w-[28px] min-h-[28px] rounded-full bg-containers border-2 border-white"}),de=({trigger:t,user:s,showUser:n=!0})=>e.jsx(y.Tooltip,{dispatch:t,children:n&&e.jsxs("div",{className:"flex items-center gap-2 bg-containers w-fit h-fit p-2 rounded-lg border-containers",children:[e.jsx(L,{imageUrl:s.image??"",alt:s.name}),e.jsx("p",{className:"text-xs font-bold content-text",children:s.name})]})}),Ke=({options:t,onselect:s})=>{const[n,a]=d.useState(null),r=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),l=[...t].filter(i=>i.name.toLowerCase().includes((n==null?void 0:n.toLowerCase())??""));return e.jsxs("div",{className:"h-fit w-full min-w-max",children:[e.jsxs("div",{className:"relative flex items-center",children:[e.jsx("input",{id:r,value:n??"",onChange:i=>a(i.target.value),type:"text",className:"w-full h-[32px] bg-bg-card border-cards rounded-lg p-2",placeholder:"Buscar"}),e.jsx("div",{className:"absolute right-[8px]",children:e.jsx(y.Icons,{icon:"search",size:"xs",strokeWidth:3})})]}),e.jsx("div",{className:"bg-bg-card border-cards rounded-lg p-2 flex flex-col gap-s overflow-y-auto max-h-[120px] min-w-max",children:l.map(i=>e.jsxs("button",{onClick:()=>{s(i)},className:"flex gap-s items-center max-w-[200px] min-w-full hover:bg-primary-light cursor-pointer",children:[e.jsx(L,{imageUrl:i.image,alt:i.name}),e.jsx("p",{className:"text-xs font-bold content-text",children:i.name})]}))})]})};class Qe{static toDomain(s){return{id:s.id,name:s.nombre,color:s.color}}}const He=()=>{const{tasks_api:t}=q();return{teams:A.useQuery({queryKey:["teams","all"],queryFn:async()=>{const n=await t.get("/api/equipos");return $(n.data).map(Qe.toDomain)}})}};class Ve{static toUsers(s){var n,a,r;return{id:s.id,name:s.nombre,image:(r=(a=(n=s.imagen)==null?void 0:n.formats)==null?void 0:a.thumbnail)==null?void 0:r.url}}}const Ge=async({tasks_api:t})=>{try{const s=await t.get("/api/allOBPUsers");return $(s.data).map(Ve.toUsers)}catch(s){throw console.log("Error al obtener los usuarios comerciales",s),`Error al obtener los usuarios comerciales: ${s}`}},Ye=()=>{const{tasks_api:t}=q();return{users:A.useQuery({queryKey:["users"],queryFn:()=>Ge({tasks_api:t}),staleTime:1e3*60*60*24})}},ye=t=>new Intl.DateTimeFormat("es-MX",{month:"long"}).format(t);function Xe(t){const s=["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],n=new Date(t).getDay();return s[n]}const xe=t=>{let s=t||new Date,n=s.getDate(),a=ye(s.getMonth()).slice(0,3),r=s.getFullYear().toString().slice(-2),l=Xe(s).slice(0,3);return`${l.charAt(0).toUpperCase()+l.slice(1)} ${n} ${a.charAt(0).toUpperCase()+a.slice(1)} ${r}`},X=t=>({...t,image:t.image?`https://devobp.imjmedia.com.mx${t.image}`:""}),we=({users:t,onClick:s,responsible:n})=>{let a=`button-assign-users-${Math.random().toString(36).substring(2,15)}`;const{setElementPosition:r,position:l,clearPosition:i}=Y(),x=d.useRef(null);console.log(t);const o=()=>n?null:t.length>3&&e.jsx(y.Tooltip,{dispatch:e.jsx("div",{className:"w-[28px] h-[28px] rounded-full btn-primary flex items-center justify-center border-2 border-white ml-[-8px]",children:e.jsx("p",{className:"text-xs font-bold text-white ",children:`+${t.length-3}`})}),children:e.jsx("div",{className:"bg-containers w-fit h-fit p-2 rounded-lg border-containers",children:t==null?void 0:t.slice(3).map((p,j)=>e.jsxs("div",{className:"flex items-center gap-2 ",children:[e.jsx(L,{imageUrl:p.image??"",alt:p.name},j),e.jsx("p",{className:"text-xs font-bold content-text",children:p.name})]},j))})}),u=()=>{if(n){let p=t.find(j=>j.id===n);return e.jsx("div",{children:e.jsx(de,{trigger:e.jsx(L,{imageUrl:p==null?void 0:p.image,alt:p==null?void 0:p.name},n),user:p,showUser:!(l!=null&&l.x)})})}return(t==null?void 0:t.length)>0&&t.slice(0,3).map((p,j)=>e.jsx("div",{className:`${j===0?"":"ml-[-8px]"}`,children:e.jsx(de,{trigger:e.jsx(L,{imageUrl:p.image,alt:p.name},j),user:p,showUser:!(l!=null&&l.x)})}))},c=({children:p})=>e.jsx("label",{ref:x,htmlFor:a,className:"cursor-pointer flex items-center",children:p});if(t.length===0)return e.jsx(c,{children:e.jsx(y.Icons,{icon:"user",size:"xs",strokeWidth:3})});const h=()=>{var F;const[p,j]=d.useState(),[f,g]=d.useState("team"),{teams:w}=He(),{users:b}=Ye();d.useEffect(()=>{var N,S;x.current&&j(((l==null?void 0:l.x)??0)-(((S=(N=x.current)==null?void 0:N.getBoundingClientRect())==null?void 0:S.width)??0))},[x==null?void 0:x.current,l==null?void 0:l.x]);const v=()=>{const N=[{id:"team",label:"Equipo"},{id:"responsible",label:"Responsable"}];return e.jsx("div",{className:"w-full flex justify-center gap-l text-texts-placeholder font-bold",children:N.map((S,m)=>e.jsx("button",{className:`w-full text-sm border-texts-placeholder text-center ${f===S.id?"text-primary-pastel":""} ${m===N.length-1?"border-r-0":" border-r-2"}`,onClick:()=>g(S.id),children:S.label}))})};return(l==null?void 0:l.x)&&Q.createPortal(e.jsx("div",{className:`absolute w-[300px] h-fit ${p?"block":"hidden"}`,style:{top:`${l==null?void 0:l.y}px`,left:`${p}px`},children:e.jsxs("div",{className:"flex flex-col gap-m bg-bg-card border-cards rounded-lg p-2 max-h-[200px] overflow-y-hidden",children:[e.jsx(v,{}),e.jsx(Ke,{options:f==="team"?w.data.map(N=>({id:N.id,name:N.name,image:""})):(F=b.data)==null?void 0:F.map(X),onselect:N=>{i(),s&&s(N)}})]})}),document.body)};return e.jsxs(e.Fragment,{children:[e.jsxs(c,{children:[u(),o()]}),e.jsx("button",{className:"hidden",id:a,onClick:()=>r(x)}),e.jsx(h,{})]})},Je=()=>{const{tasks_api:t}=q(),s=A.useQueryClient(),n=async({newData:l,id:i})=>(await t.put(`/api/tareas/${i}`,{data:l})).data,a=A.useMutation({mutationFn:({newData:l,id:i})=>n({newData:l,id:i}),onSuccess:()=>{s.invalidateQueries({queryKey:["toDoTasks"]}),s.invalidateQueries({queryKey:["inProgressTasks"]}),s.invalidateQueries({queryKey:["doneTasks"]}),console.log("Task updated successfully!")},onError:l=>{console.error("Failed to update the task.",l)}});return{updateTask:async({id:l,data:i,user:x})=>{let o={updated_at:new Date().toISOString(),updated_by:x,...i};try{await a.mutateAsync({newData:o,id:l})}catch(u){console.error("Error updating the element:",u)}}}},Ne=({priority:t,id:s})=>{const{updateTask:n}=Je(),a=Math.random().toString(36),[r,l]=d.useState(null),i=o=>({0:_.primary.regular,1:_.success.regular,2:_.warning.regular,3:_.danger.regular})[o],x=()=>{if(!r)return null;const o=({priority:u,text:c})=>e.jsxs("button",{onClick:()=>{n({id:s,data:{prioridad:u},user:272}),l(null)},className:"flex gap-m items-center px-l py-s hover:bg-primary-light",children:[e.jsx(y.Icons,{icon:"flag",size:"xs",strokeWidth:3,color:i(u)}),e.jsx("p",{className:"text-sm",style:{color:i(u)},children:c})]});return Q.createPortal(e.jsxs("div",{onBlur:()=>{l(null)},id:`${a}-options`,style:{top:`${r.y+5}px`,left:`${r.x+5}px`},className:`absolute h-fit p-m flex flex-col gap-2 bg-bg-card rounded-xl shadow-lg
|
|
2
|
-
w-max`,children:[e.jsx(o,{priority:0,text:"Baja"}),e.jsx(o,{priority:1,text:"Normal"}),e.jsx(o,{priority:2,text:"Media"}),e.jsx(o,{priority:3,text:"Alta"})]}),document.body)};return e.jsxs("div",{className:"relative h-[22px]",children:[e.jsx("label",{onBlur:()=>{l(null)},htmlFor:a,className:"flex items-center gap-2 cursor-pointer active:opacity-50",children:e.jsx(y.Icons,{icon:"flag",size:"xs",strokeWidth:3,color:i(t)})}),e.jsx("button",{id:a,onClick:o=>{l(r?null:{x:o.clientX,y:o.clientY})},className:"hidden"}),e.jsx(x,{})]})};function Ze({items:t}){var a;const[s,n]=d.useState(1);return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-row mb-2 border-b border-neutral-100 bg-white mt-4",children:t.map((r,l)=>e.jsx("div",{className:`border-r border-neutral-100 pr-3 py-1 ${l!==0?"px-3":""}`,children:e.jsx(C.Button,{variant:"ghost",onClick:()=>n(r.id),className:`text-sm font-normal rounded-none py-1 h-8 ${s===r.id?"text-primary border-b border-primary":"text-neutral-400 border-b-0"}`,children:r.label},r.id)},r.id))}),e.jsx("div",{className:"pt-4 flex-1 overflow-y-auto bg-white",children:(a=t.find(r=>r.id===s))==null?void 0:a.component})]})}const ve="https://devobp.imjmedia.com.mx";function J(t){return t?t.split(" ").map(a=>{var r;return(r=a[0])==null?void 0:r.toUpperCase()}).slice(0,2).join(""):""}const ke="https://devobp.imjmedia.com.mx";function es({comment:t}){var n,a,r,l,i,x;function s(o){const u=K.parseISO(o);return K.formatDistanceToNow(u,{locale:G.es,addSuffix:!0})}return e.jsx("div",{children:e.jsxs("div",{className:"flex flex-row gap-3 items-start",children:[e.jsxs(C.Avatar,{className:"w-[28px] h-[28px]",children:[e.jsx(C.AvatarImage,{src:`${ke}${(l=(r=(a=(n=t==null?void 0:t.autor)==null?void 0:n.imagen)==null?void 0:a.formats)==null?void 0:r.thumbnail)==null?void 0:l.url}`,alt:"@shadcn"}),e.jsx(C.AvatarFallback,{children:J((i=t==null?void 0:t.autor)==null?void 0:i.nombre)})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex flex-row gap-2",children:[e.jsx("p",{className:"text-sm text-neutral-900 font-medium",children:(x=t==null?void 0:t.autor)==null?void 0:x.nombre}),e.jsx("span",{className:"text-xs text-neutral-600 font-normal mt-[2px]",children:s(t==null?void 0:t.createdAt)})]}),e.jsx("p",{className:"text-sm text-neutral-600 font-normal",children:t==null?void 0:t.comentario})]})]})})}function ss({currentUser:t,data:s,taskId:n,onNewComment:a}){var h,p,j;const{tasks_api:r}=q(),{register:l,handleSubmit:i,reset:x}=Pe.useForm(),[o,u]=d.useState([]);d.useEffect(()=>{if(s!=null&&s.comentarios){const f=[...s.comentarios].sort((g,w)=>new Date(w.createdAt).getTime()-new Date(g.createdAt).getTime());u(f)}},[s]);const c=async f=>{try{const g={autor:{id:t==null?void 0:t.id,email:t==null?void 0:t.email,nombre:t==null?void 0:t.nombre,imagen:t==null?void 0:t.imagen},comentario:f==null?void 0:f.comment,createdAt:new Date().toISOString()};await r.post("/api/comentarios",{data:{autor:t==null?void 0:t.id,comentario:f.comment,tarea:n}}),a(!0),u(w=>[g,...w]),x()}catch(g){console.error("Error al agregar comentario:",g)}};return e.jsxs("div",{className:"flex flex-col h-full gap-4",children:[e.jsxs("form",{onSubmit:i(c),className:"flex flex-row items-center gap-3",children:[e.jsxs(C.Avatar,{className:"w-[28px] h-[28px]",children:[e.jsx(C.AvatarImage,{src:`${ve}${(j=(p=(h=t==null?void 0:t.imagen)==null?void 0:h.formats)==null?void 0:p.thumbnail)==null?void 0:j.url}`,alt:"@shadcn"}),e.jsx(C.AvatarFallback,{className:"border border-x-primary-pastel",children:J(t==null?void 0:t.nombre)})]}),e.jsx(C.Input,{...l("comment",{required:!0}),autoComplete:"off",placeholder:"Escribe un comentario",className:"w-full bg-white border border-neutral-200"})]}),o.map((f,g)=>e.jsx(es,{comment:f},g))]})}function ts({data:t}){const s={0:{color:"bg-gray-400",label:"Sin estado"},1:{color:"bg-primary-regular",label:"En curso"},2:{color:"bg-success-regular",label:"Finalizada"},3:{color:"bg-success-regular",label:"Finalizada"}},n=a=>a?K.format(new Date(a),"d MMM",{locale:G.es}):"";return e.jsxs("div",{children:[e.jsxs("div",{className:"flex flex-row items-center gap-4",children:[e.jsx(C.Label,{className:"text-lg font-medium text-neutral-900",children:"Tareas dependientes"}),e.jsx("span",{className:"text-sm font-normal text-neutral-600 bg-[#E1EBF9] w-6 h-6 rounded-full flex items-center justify-center text-primary",children:t==null?void 0:t.length})]}),e.jsx("div",{className:"flex flex-col gap-2 border border-neutral-200 rounded-lg mt-3",children:t==null?void 0:t.map(a=>{var r,l,i,x,o;return e.jsxs("div",{className:"flex flex-row w-full items-center justify-between gap-s border-b border-neutral-200 py-1 px-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(L,{imageUrl:(x=(i=(l=(r=a.responsable)==null?void 0:r.image)==null?void 0:l.formats)==null?void 0:i.thumbnail)==null?void 0:x.url}),e.jsx("p",{className:"text-sm font-normal w-[400px] text-nowrap text-ellipsis overflow-hidden",children:a==null?void 0:a.texto_corto})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-sm font-normal",children:n(a==null?void 0:a.createdAt)}),e.jsx("div",{className:`w-4 h-4 bg-gray-400 block rounded-full ${((o=s[a==null?void 0:a.estatus])==null?void 0:o.color)??"bg-gray-400"}`})]})]},a.id)})})]})}const as="https://devobp.imjmedia.com.mx";function ns({isOpen:t,setIsOpen:s,taskId:n}){var f,g,w,b,v,F,N,S,m,T,P;const[a,r]=d.useState(null),[l,i]=d.useState(!1),[x,o]=d.useState(null),{tasks_api:u}=q(),{user:c}=z();d.useEffect(()=>{if(t&&n||l){const D=async()=>{const E=await u.get(`/api/detalleTarea/${n}`);r(E==null?void 0:E.data)},W=async()=>{var R,O;const E=await u.get(`/api/users/${c.id}`),B=await u.post("/api/obtenerUsuarioOBP/",{emailList:[(R=E==null?void 0:E.data)==null?void 0:R.email]});o((O=B==null?void 0:B.data)==null?void 0:O.data[0])};D(),W()}},[t,n,l]);const h={0:{label:"Sin prioridad",color:"text-primary-regular",iconColor:"#425CAC"},1:{label:"Baja",color:"text-success-regular",iconColor:"#43B071"},2:{label:"Media",color:"text-warning-regular",iconColor:"#D38A31"},3:{label:"Alta",color:"text-danger-regular",iconColor:"#C34335"}},p=D=>D?K.format(D,"d MMM yyyy, h:mmaaa",{locale:G.es}):"Fecha no disponible",j=[{id:1,label:"Todo",component:e.jsx(ss,{taskId:n,currentUser:x,data:a,onNewComment:i})},{id:2,label:"Dependencias",component:e.jsx(ts,{data:a==null?void 0:a.ids_t_dependientes})}];return e.jsx(e.Fragment,{children:e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`fixed inset-0 bg-transparent bg-opacity-50 flex justify-center items-center z-20 ${t?"pointer-events-auto block":"pointer-events-none hidden"}`,onClick:()=>s(!1)}),e.jsx("section",{className:`fixed top-0 bottom-0 bg-white bg-opacity-50 flex justify-center items-center w-[40rem] h-screen z-50 overflow-hidden transition-all ease-in-out duration-500 shadow-2xl ${t?"right-0 pointer-events-auto block":"right-[-100%] pointer-events-none hidden"}`,children:e.jsxs("div",{className:"flex w-full h-full flex-col overflow-y-scroll bg-white border-none shadow-xl px-4 py-6",children:[e.jsxs("div",{className:"w-full flex flex-row justify-between pb-4 gap-10 border-none",children:[e.jsx("h3",{className:"text-lg font-semibold text-neutral-900",children:a==null?void 0:a.texto_corto}),e.jsx(C.Button,{variant:"shadow",size:"sm",onClick:()=>s(!1),className:"bg-neutral-100 w-10 h-10",children:e.jsx(y.Icons,{icon:"x_outline"})})]}),e.jsx("div",{className:"w-full flex flex-row justify-between",children:e.jsxs("span",{className:"text-neutral-600 text-sm",children:[a==null?void 0:a.campania," / ",a==null?void 0:a.nombre_medio]})}),e.jsxs("div",{className:"w-full flex flex-col gap-3 mt-4",children:[e.jsx("h6",{className:"text-neutral-900 font-semibold text-base",children:"Descripción"}),e.jsx("p",{className:"text-neutral-600 font-normal text-sm",children:(a==null?void 0:a.texto_largo)??"Sin descripción"})]}),e.jsx(C.Accordion,{type:"single",collapsible:!0,defaultValue:"item-1",className:"w-full flex flex-col border border-neutral-200 rounded-xl mt-4",children:e.jsxs(C.AccordionItem,{value:"item-1",className:"border-none",children:[e.jsx(C.AccordionTrigger,{className:"text-neutral-900 font-medium text-sm w-full flex flex-row border-b border-neutral-200 p-4 ",children:"Detalles"}),e.jsx(C.AccordionContent,{className:"border-none",children:e.jsxs("div",{className:"w-[100%] grid grid-cols-3 gap-4 p-4",children:[e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Responsable"}),(f=a==null?void 0:a.responsable)!=null&&f.nombre?e.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[e.jsxs(C.Avatar,{className:"w-[28px] h-[28px]",children:[e.jsx(C.AvatarImage,{src:`${as}${(v=(b=(w=(g=a==null?void 0:a.responsable)==null?void 0:g.imagen)==null?void 0:w.formats)==null?void 0:b.thumbnail)==null?void 0:v.url}`,alt:"@shadcn"}),e.jsx(C.AvatarFallback,{children:J((F=a==null?void 0:a.responsable)==null?void 0:F.nombre)})]}),e.jsx("span",{className:"text-xs text-neutral-600 font-normal",children:(N=a==null?void 0:a.responsable)==null?void 0:N.nombre})]}):e.jsx("span",{className:"text-xs text-neutral-600 font-normal",children:"Sin responsable"})]}),e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Equipo asignado"}),e.jsx("div",{className:"flex flex-row gap-2",children:e.jsx("span",{className:"text-xs text-neutral-600 font-normal",children:((S=a==null?void 0:a.equipo)==null?void 0:S.nombre)??"Sin equipo"})})]}),e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Prioridad"}),e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx(y.Icons,{icon:"flag",size:"xs",strokeWidth:5,color:(m=h[a==null?void 0:a.prioridad])==null?void 0:m.iconColor}),e.jsx("span",{className:`text-sm text-neutral-600 font-normal ${(T=h[a==null?void 0:a.prioridad])==null?void 0:T.color}`,children:((P=h[a==null?void 0:a.prioridad])==null?void 0:P.label)??"Sin prioridad"})]})]}),e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Lista"}),e.jsx("div",{className:"flex flex-row gap-2",children:e.jsx("span",{className:"text-xs text-neutral-600 font-normal",children:(a==null?void 0:a.lista)??"Sin lista"})})]}),e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Fecha estimada de inicio"}),e.jsx("p",{className:"text-xs text-neutral-600 font-normal",children:p(a==null?void 0:a.f_inicio_estimada)})]}),e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Fecha estimada de fin"}),e.jsx("p",{className:"text-xs text-neutral-600 font-normal",children:p(a==null?void 0:a.f_fin_estimada)})]}),e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Fecha de fin"}),e.jsx("p",{className:"text-xs text-neutral-600 font-normal",children:p(a==null?void 0:a.ffin)})]}),e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Creado"}),e.jsx("p",{className:"text-xs text-neutral-600 font-normal",children:p(a==null?void 0:a.createdAt)})]}),e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Última modificación"}),e.jsx("p",{className:"text-xs text-neutral-600 font-normal",children:p(a==null?void 0:a.updatedAt)})]})]})})]})}),e.jsx(Ze,{items:j})]})})]})})}const rs=({id:t,task:s,endDate:n,users:a,willBePaused:r,nameProject:l,idProject:i,comments:x,priority:o,responsible:u,nameRequiredTask:c,statusRequiredTask:h,status:p})=>{const j=d.useRef(null),[f,g]=d.useState(!1),{setElementPosition:w,position:b}=Y(),v=({children:N})=>{const[S,m]=d.useState();return d.useEffect(()=>{var T,P;j.current&&m(((b==null?void 0:b.x)??0)-(((P=(T=j.current)==null?void 0:T.getBoundingClientRect())==null?void 0:P.width)??0))},[j==null?void 0:j.current,b==null?void 0:b.x]),b&&Q.createPortal(e.jsx("div",{className:`absolute w-fit h-fit ${S?"block":"hidden"}`,style:{top:`${b==null?void 0:b.y}px`,left:`${S}px`},children:N}),document.body)},F=()=>e.jsxs("div",{className:"flex justify-between items-center w-full h-fit relative",children:[e.jsxs("div",{className:"flex items-center gap-[8px] w-[calc(100%-32px)] ",children:[e.jsx(be,{id:t,nameRequiredTask:c??"",statusRequiredTask:h??0,status:p}),e.jsx("p",{className:"title-text",onClick:()=>g(!0),children:s})]}),e.jsx("button",{ref:j,onClick:()=>{w(j)},className:"flex items-center justify-center text-sm font-extrabold bg-bg hover:filter-[drop-shadow(0_0_10px_#000000)] rounded-full w-[24px] h-[24px] m-block",children:e.jsx("span",{className:"rotate-90",children:e.jsx(y.Icons,{icon:"elipsis",size:"xs"})})}),e.jsx(v,{children:e.jsxs("button",{className:"w-max h-fit bg-bg-card rounded-lg p-l shadow-lg flex items-center gap-2 hover:bg-primary-light",onClick:()=>{},children:[e.jsx("p",{className:"text-sm font-normal text-texts-placeholder font-regular",children:"Mover a trabajando"}),e.jsx(y.Icons,{icon:"arrow_right",size:"xs",strokeWidth:4,color:_.primary.regular})]})})]});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-bg-card border-cards max-w-[350px] rounded-lg relative h-fit p-[12px_12px] hover:border-active hover:bg-active cursor-pointer ",children:[e.jsx(F,{}),e.jsxs("div",{className:"flex flex-col gap-[4px] py-2",children:[e.jsx("p",{className:"subtitle-text",children:l}),i&&e.jsx("p",{className:"content-text",children:i})]}),e.jsxs("div",{className:"flex justify-between items-center w-full h-fit relative pt-5 pb-1",children:[e.jsxs("div",{className:"flex items-center relative",children:[e.jsx(we,{responsible:u,users:a.filter(N=>u?N.id===u:!0).map(X),onClick:()=>{}}),r&&e.jsx(y.Tooltip,{dispatch:e.jsxs("button",{className:"text-sm font-regular text-gray-400 flex items-center gap-2",children:[e.jsx(y.Icons,{icon:"pause",size:"s",strokeWidth:2}),e.jsx("span",{children:"Pause"})]}),children:e.jsx("p",{className:"text-sm font-regular text-white p-5",children:"Al pulsar el botón se solicitará razón del pausado"})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y.Icons,{icon:"at",size:"xs"}),e.jsx(Ne,{priority:o,id:t}),e.jsx(y.Icons,{icon:"calendar",size:"xs",strokeWidth:3,color:_.texts.subtext}),e.jsx("p",{className:"text-sm font-regular text-texts-subtext",children:`${n.getDate()} ${ye(n.getMonth()).slice(0,3)}`})]})]}),x>0&&e.jsx("div",{className:"border-t border-gray-200 mt-4 pt-2",children:e.jsxs("button",{className:"flex items-center gap-2",children:[e.jsx(y.Icons,{icon:"comment",size:"xs",strokeWidth:4}),e.jsx("span",{className:"text-sm font-regular text-gray-400",children:x})]})})]}),e.jsx(ns,{taskId:t,isOpen:f,setIsOpen:g})]})},ls=()=>e.jsxs("div",{className:"bg-gray-200 h-[150px] w-full animate-pulse rounded-md flex flex-col gap-[50px] p-4",children:[e.jsxs("div",{className:"flex h-[30px] gap-3",children:[e.jsx("div",{className:"w-[30px] min-w-[30px] h-full bg-gray-300 rounded-full"}),e.jsx("div",{className:"w-full h-full bg-gray-300"}),e.jsx("div",{className:"w-[30px] min-w-[30px] h-full bg-gray-300 rounded-full"})]}),e.jsxs("div",{className:"flex justify-between w-full h-[30px] gap-[50px]",children:[e.jsx("div",{className:"w-full h-[30px] bg-gray-300"}),e.jsx("div",{className:"w-full h-[30px] bg-gray-300"})]})]}),V=({title:t,tasks:s,loadNextPage:n,isFetching:a,total:r})=>{const l=d.useRef(null),i=d.useRef(null),x=d.useRef(!1);d.useEffect(()=>{var c;l!=null&&l.current&&(i!=null&&i.current)&&(i.current.style.minHeight=`${((c=l==null?void 0:l.current)==null?void 0:c.clientHeight)-50}px`)},[l==null?void 0:l.current]);const o=c=>{if(x.current)return;const{scrollTop:h,clientHeight:p,scrollHeight:j}=c==null?void 0:c.target,f=h/(j-p)*100;f<=95||f>=95&&(x.current=!0,n&&n(),setTimeout(()=>{x.current=!1},200))},u={"Por hacer":"border-texts-placeholder",Trabajando:"border-primary-regular",Completadas:"border-success-regular"};return e.jsxs("div",{ref:l,className:` flex flex-col bg-containers w-fit max-w-[400px] min-w-[400px] h-full min-h-[100%] pb-[200px] relative p-[16px] rounded-lg overflow-hidden border-t-4 ${u[t]}`,children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("div",{className:"flex items-center gap-[8px]",children:e.jsx("p",{className:"text-base",children:t})}),e.jsx("div",{className:"flex items-center gap-[8px]",children:e.jsxs("div",{className:"flex items-center gap-[4px]",children:[e.jsx(y.Icons,{icon:"group_files",size:"xs",strokeWidth:5,color:_.texts.placeholder}),e.jsx("p",{className:"text-md text-texts-placeholder",children:r??0})]})})]}),e.jsxs("div",{ref:i,className:"flex flex-col gap-[12px] overflow-y-auto scrollbar-none py-4",onScroll:o,children:[s==null?void 0:s.map(c=>e.jsx(rs,{...c},c.id)),a?e.jsx(ls,{}):e.jsx("p",{className:"text-center text-gray-500",children:"No hay más tareas por mostrar..."})]})]})},is=()=>{var r;const{defineFields:t}=I(),{tasksProject:s}=H();d.useEffect(()=>{(async()=>{let i=[...We];t(i)})()},[]);let n=(r=s==null?void 0:s.data)==null?void 0:r.filter(l=>{var i;return((i=l==null?void 0:l.tasks)==null?void 0:i.length)===0}).reduce((l,i)=>(l[i.status]=l[i.status]||[],l[i.status].push(i),l),{});const a=["Por hacer","Trabajando","Completadas"];return e.jsx("div",{className:"flex gap-4 w-full h-full min-h-[100%] relative ",children:a.map((l,i)=>{var x;return e.jsx(V,{total:((x=n==null?void 0:n[i])==null?void 0:x.length)??0,title:l,tasks:(n==null?void 0:n[i])??[],isFetching:s==null?void 0:s.isFetching,isLoadingData:s==null?void 0:s.isLoading})})})};class os{static toKanbanTasks(s){var a,r,l,i,x,o,u,c,h,p,j;let n=[];return s!=null&&s.responsable&&n.push({id:s.responsable.id,name:s.responsable.nombre,image:(x=(i=(l=(r=(a=s.responsable)==null?void 0:a.userOBP)==null?void 0:r.imagen)==null?void 0:l.formats)==null?void 0:i.thumbnail)==null?void 0:x.url}),(o=s==null?void 0:s.equipo)!=null&&o.miembros&&s.equipo.miembros.forEach(f=>{var g,w,b,v;n!=null&&n.find(F=>F.id===f.idUser.id)||f.idUser&&n.push({id:f.idUser.id,name:f.idUser.nombre,image:(v=(b=(w=(g=f==null?void 0:f.userOBP)==null?void 0:g.imagen)==null?void 0:w.formats)==null?void 0:b.thumbnail)==null?void 0:v.url})}),{comments:0,nameProject:(u=s==null?void 0:s.proyecto)==null?void 0:u.nombre,idProject:(c=s==null?void 0:s.proyecto)==null?void 0:c.id,willBePaused:s.es_pausable,difficulty:s.nivel_dificultad,endDate:new Date(s.ffin),id:s.id,priority:s.prioridad??0,status:s.estatus,task:s.texto_corto,users:n,responsible:((h=s==null?void 0:s.responsable)==null?void 0:h.id)??null,statusRequiredTask:((p=s.id_t_requerida)==null?void 0:p.estatus)??null,nameRequiredTask:((j=s.id_t_requerida)==null?void 0:j.texto_corto)??null}}}const Z=async({filters:t,tasks_api:s})=>{try{return(await s.get("/api/listado_tareas",{params:t})).data.tareas.map($).map(os.toKanbanTasks)}catch(n){throw console.log({error:n}),`Error al obtener las tareas: ${n}`}},k=t=>{var s;if(t!=null&&t.hasNextPage){const n=(s=t==null?void 0:t.data)==null?void 0:s.pages[t.data.pages.length-1];(n==null?void 0:n.length)===30&&(t==null||t.fetchNextPage())}},M=t=>({pagination:{page:t,pageSize:30,withCount:!0}}),cs=()=>{var u;const t=A.useQueryClient(),{tasks_api:s}=q(),{user:n}=z(),{filters:a}=I(),[r,l]=d.useState(0),[i,x]=d.useState({owner:{user:n.id,config:((u=a==null?void 0:a.owner)==null?void 0:u.config)??"yo_y_mis_equipos"},status:"por_hacer"}),o=A.useInfiniteQuery({initialPageParam:1,queryKey:["to_do_tasks",i],queryFn:({pageParam:c})=>Z({filters:{...i,status:"por_hacer",...M(c)},tasks_api:s,page:c}),staleTime:1e3*60*60*24,getNextPageParam:(c,h)=>h.length+1});return d.useEffect(()=>{var c;Object.keys(a).length>0&&x({...a,owner:{user:n.id,config:((c=a==null?void 0:a.owner)==null?void 0:c.config)??"yo_y_mis_equipos"},status:"por_hacer"})},[a]),d.useEffect(()=>{t.invalidateQueries({queryKey:["to_do_tasks",i]})},[i]),d.useEffect(()=>{(async()=>{const h=await s.get("/api/listado_tareas",{params:{...i,status:"por_hacer",...M(1),tasks_api:s,justCount:!0}});l(h.data.total)})()},[i,o==null?void 0:o.data]),{toDoTasks:o,total:r}},ds=()=>{var a,r;const{toDoTasks:t,total:s}=cs(),n=[...((r=(a=t==null?void 0:t.data)==null?void 0:a.pages)==null?void 0:r.flat())??[]];return e.jsx(V,{total:s,title:"Por hacer",tasks:n,loadNextPage:()=>k(t),isFetching:t==null?void 0:t.isFetching,isLoadingData:t==null?void 0:t.isLoading})},xs=()=>{var u;const t=A.useQueryClient(),{tasks_api:s}=q(),{user:n}=z(),{filters:a}=I(),[r,l]=d.useState(0),[i,x]=d.useState({owner:{user:n.id,config:((u=a==null?void 0:a.owner)==null?void 0:u.config)??"yo_y_mis_equipos"},status:"trabajando"}),o=A.useInfiniteQuery({initialPageParam:1,queryKey:["working_tasks",i],queryFn:({pageParam:c})=>Z({filters:{...i,status:"trabajando",...M(c)},tasks_api:s,page:c}),staleTime:1e3*60*60*24,getNextPageParam:(c,h)=>h.length+1});return d.useEffect(()=>{var c;Object.keys(a).length>0&&x({...a,owner:{user:n.id,config:((c=a==null?void 0:a.owner)==null?void 0:c.config)??"yo_y_mis_equipos"},status:"trabajando"})},[a]),d.useEffect(()=>{t.invalidateQueries({queryKey:["working_tasks",i]})},[i]),d.useEffect(()=>{(async()=>{const h=await s.get("/api/listado_tareas",{params:{...i,status:"trabajando",...M(1),tasks_api:s,justCount:!0}});l(h.data.total)})()},[i,o==null?void 0:o.data]),{workingTasks:o,total:r}},us=()=>{var a,r;const{workingTasks:t,total:s}=xs(),n=[...((r=(a=t==null?void 0:t.data)==null?void 0:a.pages)==null?void 0:r.flat())??[]];return e.jsx(V,{total:s,title:"Trabajando",tasks:n,loadNextPage:()=>k(t),isFetching:t==null?void 0:t.isFetching})},ms=()=>{var u;const t=A.useQueryClient(),{user:s}=z(),{tasks_api:n}=q(),{filters:a}=I(),[r,l]=d.useState(0),[i,x]=d.useState({owner:{user:s.id,config:((u=a==null?void 0:a.owner)==null?void 0:u.config)??"yo_y_mis_equipos"},status:"completadas"}),o=A.useInfiniteQuery({initialPageParam:1,queryKey:["done_tasks",i],queryFn:({pageParam:c})=>Z({filters:{...i,status:"completadas",...M(c)},tasks_api:n,page:c}),staleTime:1e3*60*60*24,getNextPageParam:(c,h)=>h.length+1});return d.useEffect(()=>{var c;Object.keys(a).length>0&&x({...a,owner:{user:s.id,config:((c=a==null?void 0:a.owner)==null?void 0:c.config)??"yo_y_mis_equipos"},status:"completadas"})},[a]),d.useEffect(()=>{t.invalidateQueries({queryKey:["done_tasks",i]})},[i]),d.useEffect(()=>{(async()=>{const h=await n.get("/api/listado_tareas",{params:{...i,status:"completadas",...M(1),justCount:!0,tasks_api:n}});l(h.data.total)})()},[o==null?void 0:o.data,i]),{doneTasks:o,total:r}},ps=()=>{var a,r;const{doneTasks:t,total:s}=ms(),n=[...((r=(a=t==null?void 0:t.data)==null?void 0:a.pages)==null?void 0:r.flat())??[]];return e.jsx(V,{title:"Completadas",tasks:n,loadNextPage:()=>k(t),isFetching:t==null?void 0:t.isFetching,total:s})};class U{static toSalesmanUsers(s){return{id:s.id,name:s.nombre}}}const hs=()=>{const{tasks_api:t}=q(),{filters:s}=I(),{user:n}=z();return{getSalesmanAndProjects:async()=>{var o;const[i,x]=await Promise.all([t.get("/api/obtener-comerciales"),t.get("/api/listado_tareas",{params:{...s,owner:{user:n.id,config:((o=s==null?void 0:s.owner)==null?void 0:o.config)??"yo_y_mis_equipos"},justProjects:!0}})]);return{salesmanUsers:i.data.map(U.toSalesmanUsers),projects:x.data.map(U.toSalesmanUsers)}},getProjects:async()=>{var x;return(await t.get("/api/listado_tareas",{params:{...s,owner:{user:n.id,config:((x=s==null?void 0:s.owner)==null?void 0:x.config)??"yo_y_mis_equipos"},justProjects:!0}})).data.map(U.toSalesmanUsers)},getSalesmans:async()=>(await t.get("/api/obtener-comerciales")).data.map(U.toSalesmanUsers)}},gs=[{label:"Tipo de dependencia",type:"select",id:"dependency",options:[{id:"con",name:"Con dependencia"},{id:"sin",name:"Sin dependencia"},{id:"ambas",name:"Ambas"}]},{label:"Por proyecto",type:"select",id:"project.id",options:[]},{label:"Por responsable",type:"select",id:"owner.config",options:[{id:"yo",name:"Mis tareas"},{id:"yo_y_mis_equipos",name:"Tareas mías y de mis equipos"},{id:"mis_equipos",name:"Tareas de mis equipos"}]},{label:"Por ejecutivo",type:"select",id:"salesman.name",options:[]},{label:"Por dificultad",type:"select",id:"difficulty",options:[{id:0,name:"Muy facil"},{id:1,name:"Facil"},{id:2,name:"Media"},{id:3,name:"Dificil"},{id:4,name:"Muy dificil"}]}],fs=()=>{const{defineFields:t}=I(),{getSalesmanAndProjects:s}=hs();return d.useEffect(()=>{(async()=>{let a=[...gs],{salesmanUsers:r,projects:l}=await s();t(a.map(i=>(i.id==="project.id"&&(i.options=l),i.id==="salesman.name"&&(i.options=r),i)))})()},[]),e.jsxs("div",{className:"flex gap-4 w-full h-full min-h-[100%] relative ",children:[e.jsx(ds,{}),e.jsx(us,{}),e.jsx(ps,{})]})},Ce=d.createContext({}),js=({children:t})=>{const[s,n]=d.useState([]);d.useEffect(()=>{console.log({selectedTasks:s})},[s]);const a=r=>{n(l=>l.includes(r)?l.filter(i=>i!==r):[...l,r])};return e.jsx(Ce.Provider,{value:{selectedTasks:s,selectTask:a},children:t})},bs=()=>d.useContext(Ce),_e=()=>{const t=()=>e.jsxs("div",{className:"w-full flex gap-m",children:[e.jsx("div",{className:"w-[30px] h-[30px] min-w-[30px] min-h-[30px] bg-gray-200 rounded-full animate-pulse"}),e.jsx("div",{className:"w-[30%] h-[30px] bg-gray-200 rounded-md animate-pulse"}),e.jsx("div",{className:"w-[30px] h-[30px] min-w-[30px] min-h-[30px] bg-gray-200 rounded-lg animate-pulse"}),e.jsx("div",{className:"w-[30px] h-[30px] min-w-[30px] min-h-[30px] bg-gray-200 rounded-lg animate-pulse"}),e.jsx("div",{className:"w-[30px] h-[30px] min-w-[30px] min-h-[30px] bg-gray-200 rounded-lg animate-pulse"}),e.jsx("div",{className:"w-[10%] h-[30px] bg-gray-200 rounded-md animate-pulse"}),e.jsx("div",{className:"w-[30px] h-[30px] min-w-[30px] min-h-[30px] bg-gray-200 rounded-lg animate-pulse"}),e.jsx("div",{className:"w-[10%] h-[30px] bg-gray-200 rounded-md animate-pulse"}),e.jsx("div",{className:"w-[30px] h-[30px] min-w-[30px] min-h-[30px] bg-gray-200 rounded-lg animate-pulse"}),e.jsx("div",{className:"w-[30px] h-[30px] min-w-[30px] min-h-[30px] bg-gray-200 rounded-lg animate-pulse"})]});return e.jsxs("div",{className:"flex flex-col gap-m",children:[e.jsx(t,{}),e.jsxs("div",{className:"pl-5 flex flex-col gap-m",children:[e.jsx(t,{}),e.jsx("div",{className:"pl-5",children:e.jsx(t,{})})]}),e.jsx(t,{}),e.jsxs("div",{className:"pl-5 flex flex-col gap-m",children:[e.jsx(t,{}),e.jsx("div",{className:"pl-5",children:e.jsx(t,{})})]})]})},Fe=({startDate:t,endDate:s})=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"gap-s bg-gray-100 rounded-md h-[30px] w-fit flex justify-center items-center px-xxxl",children:[e.jsx(y.Icons,{icon:"calendar",size:"xs",strokeWidth:4,color:_.texts.subtext}),e.jsxs("p",{className:"text-sm",children:[" ",xe(t)]})]}),e.jsx(y.Icons,{icon:"arrow_right",size:"xs",strokeWidth:4,color:_.texts.DEFAULT}),e.jsxs("div",{className:"gap-s bg-gray-100 rounded-md h-[30px] w-fit flex justify-center items-center px-xxxl",children:[e.jsx(y.Icons,{icon:"calendar",size:"xs",strokeWidth:4,color:_.texts.subtext}),e.jsxs("p",{className:"text-sm",children:[" ",xe(s)]})]})]}),ys=({id:t})=>e.jsx(e.Fragment,{children:e.jsx("button",{onClick:()=>alert("pausar tarea "+t),children:e.jsx(y.Icons,{icon:"pause",size:"xs",strokeWidth:4,color:_.texts.subtext})})}),Se=({id:t,priority:s})=>e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"gap-s bg-gray-100 rounded-md h-[30px] w-[30px] flex justify-center items-center hover:bg-gray-200",children:e.jsx(y.Icons,{icon:"align_center",size:"xs",strokeWidth:4,color:_.texts.subtext})}),e.jsx("div",{className:"gap-s bg-success-medium border border-success-pastel rounded-md h-[30px] w-[30px] flex justify-center items-center",children:e.jsx(Ne,{id:t,priority:s})}),e.jsx("button",{className:"gap-s bg-danger-light border border-danger-regular rounded-md h-[30px] w-[30px] flex justify-center items-center",children:e.jsx(y.Icons,{icon:"difficulty",size:"xs",strokeWidth:4,color:_.danger.regular})})]}),ws=({id:t})=>{const{selectedTasks:s,selectTask:n}=bs();return e.jsxs(e.Fragment,{children:[e.jsx("label",{className:"cursor-pointer w-[20px] h-[20px] border-2 border-gray-200 rounded-md flex justify-center items-center",htmlFor:t.toString(),children:e.jsx("span",{className:`${s.includes(t)?"opacity-100":"opacity-0"} transition-opacity duration-500`,children:e.jsx(y.Icons,{icon:"check_outline",size:"xs",color:_.primary.regular,strokeWidth:6})})}),e.jsx("input",{className:"hidden",id:t.toString(),type:"checkbox",onChange:()=>n(t)})]})},Te=({task:t})=>e.jsx(y.Tooltip,{dispatch:e.jsx("p",{className:"text-sm text-texts-subtext max-w-[400px] truncate",children:t}),children:e.jsx("p",{className:"text-sm text-texts-subtext p-2 max-w-[400px]",children:t})}),Ns=({id:t})=>{var a,r;const{tasksProject:s}=H(),n=(a=s==null?void 0:s.data)==null?void 0:a.find(l=>l.id===t);return e.jsxs("div",{className:"ml-[30px] mb-3 mt-1 flex flex-wrap items-center gap-xl",children:[!(n!=null&&n.nameRequiredTask)||(n==null?void 0:n.nameRequiredTask)!==""&&(n==null?void 0:n.statusRequiredTask)===2&&e.jsx(ws,{id:t}),e.jsx(be,{id:t,nameRequiredTask:(n==null?void 0:n.nameRequiredTask)??"",status:n==null?void 0:n.status,statusRequiredTask:(n==null?void 0:n.statusRequiredTask)??0},t),(n==null?void 0:n.willBePaused)&&e.jsx(ys,{id:t}),e.jsx(we,{onClick:()=>{},responsible:n==null?void 0:n.responsible,users:((r=n==null?void 0:n.users)==null?void 0:r.map(X))??[]}),e.jsx(Te,{task:(n==null?void 0:n.task)??""}),e.jsx(Se,{id:t,priority:n==null?void 0:n.priority}),e.jsx(Fe,{startDate:n==null?void 0:n.startDate,endDate:n==null?void 0:n.endDate})]})},Ae=({id:t})=>{var l,i,x,o,u,c,h;const{tasksProject:s,openTasks:n,openTask:a}=H(),r=(l=s==null?void 0:s.data)==null?void 0:l.find(p=>p.id===t);return r?(console.log({task:r}),e.jsxs("div",{className:"flex flex-col gap-m mb-2 ",children:[e.jsxs("div",{className:"flex items-center gap-m flex-wrap hover:bg-gray-100",children:[e.jsx("button",{className:`${n.includes(t)?"":"-rotate-90"} transition-all duration-300`,onClick:()=>a(t),children:e.jsx(y.Icons,{icon:"angle_down_outline",color:_.texts.subtext})}),e.jsx("div",{className:"flex items-center justify-center min-w-[20px] min-h-[20px] w-fit h-[20px] mx-1 bg-primary-medium rounded-full",children:e.jsx("p",{className:"text-sm text-primary",children:((i=r==null?void 0:r.tasks)==null?void 0:i.length)===0?1:(x=r==null?void 0:r.tasks)==null?void 0:x.length})}),e.jsx(Te,{task:(r==null?void 0:r.task)??""}),e.jsx(Se,{id:t,priority:r==null?void 0:r.priority}),e.jsx(Fe,{startDate:r==null?void 0:r.startDate,endDate:r==null?void 0:r.endDate}),e.jsxs("button",{className:"gap-s bg-gray-100 rounded-md h-[30px] flex justify-center items-center w-fit px-m hover:bg-gray-200",children:[e.jsx(y.Icons,{icon:"subtasks",size:"xs",strokeWidth:5,color:_.texts.subtext}),e.jsx("p",{children:((o=r==null?void 0:r.tasks)==null?void 0:o.length)===0?1:(u=r==null?void 0:r.tasks)==null?void 0:u.length})]})]}),n.includes(t)&&e.jsx("div",{className:"ml-[30px]",children:((c=r==null?void 0:r.tasks)==null?void 0:c.length)>0?(h=r==null?void 0:r.tasks)==null?void 0:h.map(p=>e.jsx(Ae,{id:p==null?void 0:p.id})):e.jsx(Ns,{id:r==null?void 0:r.id})})]})):null},vs=()=>{var a;const{tasksProject:t,projectID:s}=H();if(t!=null&&t.isFetching||t!=null&&t.isLoading)return e.jsx(_e,{});let n=[...(a=t==null?void 0:t.data)==null?void 0:a.filter(r=>r.isPrincipalTask)];return e.jsx("div",{className:"flex flex-col gap-m",children:e.jsx(js,{project:s,children:n==null?void 0:n.sort((r,l)=>r.orden-l.orden).map(r=>e.jsx("div",{className:"flex flex-col gap-m border-b border-gray-200 pb-m",children:e.jsx(Ae,{id:r.id})}))})})},Cs=({setPath:t,setProject:s})=>{const[n,a]=d.useState([]),[r,l]=d.useState(!0),[i,x]=d.useState(0),[o,u]=d.useState(10),[c,h]=d.useState(0),[p,j]=d.useState("nombre"),{defineFields:f}=I(),{tasks_api:g}=q(),w=async(m,T)=>{try{l(!0);const P=await g.get("/api/listado_campanias",{params:{pagination:{page:m,pageSize:T},orderBy:p}}),D=$(P.data);a(D),h(P.data.meta.total)}catch(P){console.error("Error fetching data en Lista Campaña:",P)}finally{l(!1)}};d.useEffect(()=>{f([{label:"Búsqueda",type:"text",id:"search"},{label:"Responsable",type:"select",id:"responsable.responsableType",options:[{id:"yo_y_mis_equipos",name:"Yo y mis equipos"},{id:"mis_equipos",name:"Mis equipos"},{id:"yo",name:"Yo"}]},{label:"Ejecutivo",type:"text",id:"ejecutivo"}])},[]),d.useEffect(()=>{const m=Math.floor(i/o)+1;w(m,o)},[i,o,p]);const b=m=>{x(m.first),u(m.rows)},v=[{label:"5 filas",value:5},{label:"10 filas",value:10},{label:"15 filas",value:15},{label:"20 filas",value:20},{label:"25 filas",value:25},{label:"50 filas",value:50}],F=m=>{const T=parseInt(m.target.value,10);u(T),b({first:0,rows:T})},N=m=>{j(T=>T===m?`${m}:desc`:m)},S=m=>p===m?"↑↓":p===`${m}:desc`?"↓↑":"↑↓";return e.jsx("div",{className:"table-container",children:r?e.jsx("div",{style:{width:"100%"},children:e.jsx(_e,{})}):e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:"table",style:{borderCollapse:"collapse",width:"100%",borderSpacing:"0"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsxs("th",{onClick:()=>N("nombre"),children:[e.jsx("label",{style:{color:"#C4C4C4",fontSize:"10px"},children:S("nombre")}),"Campaña"]}),e.jsx("th",{onClick:()=>N("inicia"),style:{textAlign:"center",whiteSpace:"nowrap"},children:e.jsxs("div",{style:{display:"flex",alignItems:"center",width:"fit-content"},children:[e.jsx("label",{style:{color:"#C4C4C4",fontSize:"10px"},children:S("inicia")})," ",e.jsx(y.Icons,{icon:"calendar",size:"xs",strokeWidth:5,color:"#C4C4C4"}),e.jsx("span",{children:"Fecha Inicio"})]})}),e.jsx("th",{onClick:()=>N("termina"),style:{whiteSpace:"nowrap",textAlign:"center"},children:e.jsxs("div",{style:{display:"flex",alignItems:"center",width:"fit-content"},children:[e.jsx("label",{style:{color:"#C4C4C4",fontSize:"10px"},children:S("termina")}),e.jsx(y.Icons,{icon:"calendar",size:"xs",strokeWidth:5,color:"#C4C4C4"}),e.jsx("span",{children:"Fecha Fin"})]})}),e.jsx("th",{children:"Status"}),e.jsx("th",{children:"Responsable"})]})}),e.jsx("tbody",{children:n==null?void 0:n.map((m,T)=>{var P,D,W,E,B,R,O,ee,se,te,ae,ne,re,le,ie,oe;return e.jsxs("tr",{className:"table-row",children:[e.jsx("td",{children:(P=m==null?void 0:m.campania)==null?void 0:P.nombre}),e.jsxs("td",{children:[" ",(D=m==null?void 0:m.campania)==null?void 0:D.inicia]}),e.jsx("td",{children:(W=m==null?void 0:m.campania)==null?void 0:W.termina}),e.jsx("td",{children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"15px",padding:"none",fontSize:"10px",width:"auto",minWidth:"170px"},children:[e.jsxs("label",{style:{width:"50px",minWidth:"50px",textAlign:"right",color:"#000"},children:[m==null?void 0:m.progreso,"%"]}),e.jsx("div",{style:{position:"relative",height:"10px",flex:1,backgroundColor:"#C4C4C4",borderRadius:"10px",overflow:"hidden"},children:e.jsx("div",{style:{position:"absolute",top:0,left:0,height:"100%",width:`${m.progreso}%`,backgroundColor:m.progreso===100?"#039B59":m.progreso>50?"#3658C1":m.progreso>0?"#DC8921":"#C4C4C4",borderRadius:"10px",transition:"width 0.3s ease-in-out"}})})]})}),e.jsx("td",{children:e.jsxs("div",{className:"avatar-container",children:[e.jsxs(C.Avatar,{className:"avatar",children:[e.jsx(C.AvatarImage,{src:`${ve}${(ee=(O=(R=(B=(E=m==null?void 0:m.campania)==null?void 0:E.responsable)==null?void 0:B.imagen)==null?void 0:R.formats)==null?void 0:O.thumbnail)==null?void 0:ee.url}`,alt:(ae=(te=(se=m==null?void 0:m.campania)==null?void 0:se.responsable)==null?void 0:te.nombre)==null?void 0:ae.charAt(0)}),e.jsx(C.AvatarFallback,{style:{boxShadow:"10px 5px 10px rgba(0, 0, 0, 0.5)"},children:(le=(re=(ne=m==null?void 0:m.campania)==null?void 0:ne.responsable)==null?void 0:re.nombre)==null?void 0:le.charAt(0)})]}),e.jsx("span",{style:{marginLeft:"8px",fontSize:"10px"},children:(oe=(ie=m==null?void 0:m.campania)==null?void 0:ie.responsable)==null?void 0:oe.nombre})]})})]},T)})})]}),e.jsxs("div",{className:"pagination",style:{background:"#FAFAFA",display:"flex"},children:[e.jsxs("span",{style:{alignItems:"center",fontSize:"10px",textAlign:"left",width:"auto",height:"auto",padding:"12px",whiteSpace:"nowrap"},children:[n.length," elementos de ",c]}),e.jsx(qe.Paginator,{first:i,rows:o,totalRecords:c,rowsPerPageOptions:[5,10,20,50],onPageChange:b,className:"pagination",template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("span",{style:{fontSize:"10px",whiteSpace:"nowrap"},children:"Filas por página:"}),e.jsx("select",{className:"select",value:o,onChange:m=>F(m),children:v.map(m=>e.jsx("option",{className:"option-select",value:m.value,style:{background:"#F5F5F5"},children:m.label},m.value))})]})]})]})})},_s=({path:t,tab:s,setPath:n,project:a,setProject:r})=>{const l={"kanban-general":{kanban:e.jsx(fs,{})},"lista-campanias":{lista:e.jsx(Cs,{setPath:n,setProject:r}),gantt:e.jsx("div",{children:"gantt-campanias"})},"kanban-campania":{kanban:e.jsx(is,{}),lista:e.jsx(vs,{}),gantt:e.jsx("div",{children:"kanban-campania-gantt"})}};return t==="kanban-campania"?e.jsx(Oe,{project:a==null?void 0:a.id,children:l[t][s]}):l[t][s]},Fs=({path:t})=>{const s=()=>{const[n,a]=d.useState("kanban"),[r,l]=d.useState(t),[i,x]=d.useState({id:1839,project:"Kanban de Campania"}),[o,u]=d.useState(""),c=d.useRef(null);d.useEffect(()=>{a("kanban")},[t]);const h=g=>({"kanban-general":"Kanban General","lista-campanias":"Campanias","kanban-campania":`Kanban de ${i.project}`})[g],p=g=>{l(g)},j=["lista-campanias","kanban-campania"],f={"lista-campanias":["lista","gantt"],"kanban-campania":["kanban","lista","gantt"]};return e.jsxs("div",{className:"bg-bg-card p-m rounded-lg border border-gray-200 flex flex-col gap-m w-full h-full min-h-[100%] relative overflow-hidden",children:[e.jsxs("div",{className:"w-full justify-between flex items-end border-b border-gray-200 pb-m px-l flex-wrap gap-l",children:[e.jsxs("div",{className:"flex gap-xl",children:[e.jsx("h2",{className:"text-texts font-medium",children:h(r)}),j.includes(r)&&e.jsx(De,{tabs:f[r],renderItem:g=>{a(g)}})]}),e.jsxs("div",{className:"flex items-center gap-s",children:[e.jsx("input",{onChange:he(g=>{var w;return u((w=g==null?void 0:g.target)==null?void 0:w.value)},1e3),type:"text",placeholder:"Buscar",className:"w-[200px] h-[30px] border-none bg-bg-card shadow-input border border-gray-200 rounded-lg px-l "}),e.jsx(Ie,{filterChildren:c,children:e.jsx("div",{ref:c,className:"w-max max-w-[400px] h-fit bg-bg-card shadow-lg rounded-lg p-l",children:e.jsx(Be,{})})})]})]}),e.jsx("div",{className:"overflow-auto scrollbar-none",children:e.jsx(_s,{path:r,tab:n,setPath:p,project:i,setProject:x})})]})};return e.jsx($e,{children:e.jsx(s,{})})},Ss=()=>e.jsx("div",{className:"w-full h-full min-h-[100%] relative",children:e.jsx("div",{className:"flex justify-center items-center h-full",children:e.jsxs("div",{className:"text-2xl font-bold flex flex-col items-center",children:[e.jsx("div",{className:"w-10 h-10 bg-primary-regular rounded-full animate-pulse"}),e.jsx("p",{className:"text-l text-texts-enfasis",children:"un momento..."}),e.jsx("p",{className:"text-sm text-texts-placeholder",children:"estamos buscando tu usuario"})]})})}),Ts=()=>e.jsx("div",{className:"w-full h-full min-h-[100%] relative",children:e.jsx("div",{className:"flex justify-center items-center h-full",children:e.jsxs("div",{className:"text-2xl font-bold flex flex-col items-center",children:[e.jsx("div",{className:"w-10 h-10 bg-primary-regular rounded-full animate-pulse"}),e.jsx("p",{className:"text-l text-texts-enfasis",children:"No encontramos tu acceso"}),e.jsx("p",{className:"text-sm text-texts-placeholder",children:"por favor, contacta al administrador"})]})})}),As=({path:t,user:s,url:n})=>{const a=new A.QueryClient;if(!s)return e.jsx(Ss,{});if(!s.accessToken)return e.jsx(Ts,{});let r={user:s,url:n};return e.jsx(Re,{...r,children:e.jsx(ze,{...r,children:e.jsx("div",{className:"w-full h-full min-h-[100%] relative",children:e.jsx(A.QueryClientProvider,{client:a,children:e.jsx(Fs,{path:t})})})})})};exports.AppTasks=As;
|
|
2
|
+
w-max`,children:[e.jsx(o,{priority:0,text:"Baja"}),e.jsx(o,{priority:1,text:"Normal"}),e.jsx(o,{priority:2,text:"Media"}),e.jsx(o,{priority:3,text:"Alta"})]}),document.body)};return e.jsxs("div",{className:"relative h-[22px]",children:[e.jsx("label",{onBlur:()=>{l(null)},htmlFor:a,className:"flex items-center gap-2 cursor-pointer active:opacity-50",children:e.jsx(y.Icons,{icon:"flag",size:"xs",strokeWidth:3,color:i(t)})}),e.jsx("button",{id:a,onClick:o=>{l(r?null:{x:o.clientX,y:o.clientY})},className:"hidden"}),e.jsx(x,{})]})};function Ze({items:t}){var a;const[s,n]=d.useState(1);return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-row mb-2 border-b border-neutral-100 bg-white mt-4",children:t.map((r,l)=>e.jsx("div",{className:`border-r border-neutral-100 pr-3 py-1 ${l!==0?"px-3":""}`,children:e.jsx(C.Button,{variant:"ghost",onClick:()=>n(r.id),className:`text-sm font-normal rounded-none py-1 h-8 ${s===r.id?"text-primary border-b border-primary":"text-neutral-400 border-b-0"}`,children:r.label},r.id)},r.id))}),e.jsx("div",{className:"pt-4 flex-1 overflow-y-auto bg-white",children:(a=t.find(r=>r.id===s))==null?void 0:a.component})]})}const ve="https://devobp.imjmedia.com.mx";function J(t){return t?t.split(" ").map(a=>{var r;return(r=a[0])==null?void 0:r.toUpperCase()}).slice(0,2).join(""):""}const ke="https://devobp.imjmedia.com.mx";function es({comment:t}){var n,a,r,l,i,x;function s(o){const u=K.parseISO(o);return K.formatDistanceToNow(u,{locale:G.es,addSuffix:!0})}return e.jsx("div",{children:e.jsxs("div",{className:"flex flex-row gap-3 items-start",children:[e.jsxs(C.Avatar,{className:"w-[28px] h-[28px]",children:[e.jsx(C.AvatarImage,{src:`${ke}${(l=(r=(a=(n=t==null?void 0:t.autor)==null?void 0:n.imagen)==null?void 0:a.formats)==null?void 0:r.thumbnail)==null?void 0:l.url}`,alt:"@shadcn"}),e.jsx(C.AvatarFallback,{children:J((i=t==null?void 0:t.autor)==null?void 0:i.nombre)})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex flex-row gap-2",children:[e.jsx("p",{className:"text-sm text-neutral-900 font-medium",children:(x=t==null?void 0:t.autor)==null?void 0:x.nombre}),e.jsx("span",{className:"text-xs text-neutral-600 font-normal mt-[2px]",children:s(t==null?void 0:t.createdAt)})]}),e.jsx("p",{className:"text-sm text-neutral-600 font-normal",children:t==null?void 0:t.comentario})]})]})})}function ss({currentUser:t,data:s,taskId:n,onNewComment:a}){var h,p,j;const{tasks_api:r}=q(),{register:l,handleSubmit:i,reset:x}=Pe.useForm(),[o,u]=d.useState([]);d.useEffect(()=>{if(s!=null&&s.comentarios){const f=[...s.comentarios].sort((g,w)=>new Date(w.createdAt).getTime()-new Date(g.createdAt).getTime());u(f)}},[s]);const c=async f=>{try{const g={autor:{id:t==null?void 0:t.id,email:t==null?void 0:t.email,nombre:t==null?void 0:t.nombre,imagen:t==null?void 0:t.imagen},comentario:f==null?void 0:f.comment,createdAt:new Date().toISOString()};await r.post("/api/comentarios",{data:{autor:t==null?void 0:t.id,comentario:f.comment,tarea:n}}),a(!0),u(w=>[g,...w]),x()}catch(g){console.error("Error al agregar comentario:",g)}};return e.jsxs("div",{className:"flex flex-col h-full gap-4",children:[e.jsxs("form",{onSubmit:i(c),className:"flex flex-row items-center gap-3",children:[e.jsxs(C.Avatar,{className:"w-[28px] h-[28px]",children:[e.jsx(C.AvatarImage,{src:`${ve}${(j=(p=(h=t==null?void 0:t.imagen)==null?void 0:h.formats)==null?void 0:p.thumbnail)==null?void 0:j.url}`,alt:"@shadcn"}),e.jsx(C.AvatarFallback,{className:"border border-x-primary-pastel",children:J(t==null?void 0:t.nombre)})]}),e.jsx(C.Input,{...l("comment",{required:!0}),autoComplete:"off",placeholder:"Escribe un comentario",className:"w-full bg-white border border-neutral-200"})]}),o.map((f,g)=>e.jsx(es,{comment:f},g))]})}function ts({data:t}){const s={0:{color:"bg-gray-400",label:"Sin estado"},1:{color:"bg-primary-regular",label:"En curso"},2:{color:"bg-success-regular",label:"Finalizada"},3:{color:"bg-success-regular",label:"Finalizada"}},n=a=>a?K.format(new Date(a),"d MMM",{locale:G.es}):"";return e.jsxs("div",{children:[e.jsxs("div",{className:"flex flex-row items-center gap-4",children:[e.jsx(C.Label,{className:"text-lg font-medium text-neutral-900",children:"Tareas dependientes"}),e.jsx("span",{className:"text-sm font-normal text-neutral-600 bg-[#E1EBF9] w-6 h-6 rounded-full flex items-center justify-center text-primary",children:t==null?void 0:t.length})]}),e.jsx("div",{className:"flex flex-col gap-2 border border-neutral-200 rounded-lg mt-3",children:t==null?void 0:t.map(a=>{var r,l,i,x,o;return e.jsxs("div",{className:"flex flex-row w-full items-center justify-between gap-s border-b border-neutral-200 py-1 px-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(L,{imageUrl:(x=(i=(l=(r=a.responsable)==null?void 0:r.image)==null?void 0:l.formats)==null?void 0:i.thumbnail)==null?void 0:x.url}),e.jsx("p",{className:"text-sm font-normal w-[400px] text-nowrap text-ellipsis overflow-hidden",children:a==null?void 0:a.texto_corto})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-sm font-normal",children:n(a==null?void 0:a.createdAt)}),e.jsx("div",{className:`w-4 h-4 bg-gray-400 block rounded-full ${((o=s[a==null?void 0:a.estatus])==null?void 0:o.color)??"bg-gray-400"}`})]})]},a.id)})})]})}const as="https://devobp.imjmedia.com.mx";function ns({isOpen:t,setIsOpen:s,taskId:n}){var f,g,w,b,v,F,N,S,m,T,P;const[a,r]=d.useState(null),[l,i]=d.useState(!1),[x,o]=d.useState(null),{tasks_api:u}=q(),{user:c}=z();d.useEffect(()=>{if(t&&n||l){const D=async()=>{const E=await u.get(`/api/detalleTarea/${n}`);r(E==null?void 0:E.data)},W=async()=>{var R,O;const E=await u.get(`/api/users/${c.id}`),B=await u.post("/api/obtenerUsuarioOBP/",{emailList:[(R=E==null?void 0:E.data)==null?void 0:R.email]});o((O=B==null?void 0:B.data)==null?void 0:O.data[0])};D(),W()}},[t,n,l]);const h={0:{label:"Sin prioridad",color:"text-primary-regular",iconColor:"#425CAC"},1:{label:"Baja",color:"text-success-regular",iconColor:"#43B071"},2:{label:"Media",color:"text-warning-regular",iconColor:"#D38A31"},3:{label:"Alta",color:"text-danger-regular",iconColor:"#C34335"}},p=D=>D?K.format(D,"d MMM yyyy, h:mmaaa",{locale:G.es}):"Fecha no disponible",j=[{id:1,label:"Todo",component:e.jsx(ss,{taskId:n,currentUser:x,data:a,onNewComment:i})},{id:2,label:"Dependencias",component:e.jsx(ts,{data:a==null?void 0:a.ids_t_dependientes})}];return e.jsx(e.Fragment,{children:e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`fixed inset-0 bg-transparent bg-opacity-50 flex justify-center items-center z-20 ${t?"pointer-events-auto block":"pointer-events-none hidden"}`,onClick:()=>s(!1)}),e.jsx("section",{className:`fixed top-0 bottom-0 bg-white bg-opacity-50 flex justify-center items-center w-[40rem] h-screen z-50 overflow-hidden transition-all ease-in-out duration-500 shadow-2xl ${t?"right-0 pointer-events-auto block":"right-[-100%] pointer-events-none hidden"}`,children:e.jsxs("div",{className:"flex w-full h-full flex-col overflow-y-scroll bg-white border-none shadow-xl px-4 py-6",children:[e.jsxs("div",{className:"w-full flex flex-row justify-between pb-4 gap-10 border-none",children:[e.jsx("h3",{className:"text-lg font-semibold text-neutral-900",children:a==null?void 0:a.texto_corto}),e.jsx(C.Button,{variant:"shadow",size:"sm",onClick:()=>s(!1),className:"bg-neutral-100 w-10 h-10",children:e.jsx(y.Icons,{icon:"x_outline"})})]}),e.jsx("div",{className:"w-full flex flex-row justify-between",children:e.jsxs("span",{className:"text-neutral-600 text-sm",children:[a==null?void 0:a.campania," / ",a==null?void 0:a.nombre_medio]})}),e.jsxs("div",{className:"w-full flex flex-col gap-3 mt-4",children:[e.jsx("h6",{className:"text-neutral-900 font-semibold text-base",children:"Descripción"}),e.jsx("p",{className:"text-neutral-600 font-normal text-sm",children:(a==null?void 0:a.texto_largo)??"Sin descripción"})]}),e.jsx(C.Accordion,{type:"single",collapsible:!0,defaultValue:"item-1",className:"w-full flex flex-col border border-neutral-200 rounded-xl mt-4",children:e.jsxs(C.AccordionItem,{value:"item-1",className:"border-none",children:[e.jsx(C.AccordionTrigger,{className:"text-neutral-900 font-medium text-sm w-full flex flex-row border-b border-neutral-200 p-4 ",children:"Detalles"}),e.jsx(C.AccordionContent,{className:"border-none",children:e.jsxs("div",{className:"w-full grid grid-cols-3 gap-4 p-4",children:[e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Responsable"}),(f=a==null?void 0:a.responsable)!=null&&f.nombre?e.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[e.jsxs(C.Avatar,{className:"w-[28px] h-[28px]",children:[e.jsx(C.AvatarImage,{src:`${as}${(v=(b=(w=(g=a==null?void 0:a.responsable)==null?void 0:g.imagen)==null?void 0:w.formats)==null?void 0:b.thumbnail)==null?void 0:v.url}`,alt:"@shadcn"}),e.jsx(C.AvatarFallback,{children:J((F=a==null?void 0:a.responsable)==null?void 0:F.nombre)})]}),e.jsx("span",{className:"text-xs text-neutral-600 font-normal",children:(N=a==null?void 0:a.responsable)==null?void 0:N.nombre})]}):e.jsx("span",{className:"text-xs text-neutral-600 font-normal",children:"Sin responsable"})]}),e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Equipo asignado"}),e.jsx("div",{className:"flex flex-row gap-2",children:e.jsx("span",{className:"text-xs text-neutral-600 font-normal",children:((S=a==null?void 0:a.equipo)==null?void 0:S.nombre)??"Sin equipo"})})]}),e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Prioridad"}),e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx(y.Icons,{icon:"flag",size:"xs",strokeWidth:5,color:(m=h[a==null?void 0:a.prioridad])==null?void 0:m.iconColor}),e.jsx("span",{className:`text-sm text-neutral-600 font-normal ${(T=h[a==null?void 0:a.prioridad])==null?void 0:T.color}`,children:((P=h[a==null?void 0:a.prioridad])==null?void 0:P.label)??"Sin prioridad"})]})]}),e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Lista"}),e.jsx("div",{className:"flex flex-row gap-2",children:e.jsx("span",{className:"text-xs text-neutral-600 font-normal",children:(a==null?void 0:a.lista)??"Sin lista"})})]}),e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Fecha estimada de inicio"}),e.jsx("p",{className:"text-xs text-neutral-600 font-normal",children:p(a==null?void 0:a.f_inicio_estimada)})]}),e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Fecha estimada de fin"}),e.jsx("p",{className:"text-xs text-neutral-600 font-normal",children:p(a==null?void 0:a.f_fin_estimada)})]}),e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Fecha de fin"}),e.jsx("p",{className:"text-xs text-neutral-600 font-normal",children:p(a==null?void 0:a.ffin)})]}),e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Creado"}),e.jsx("p",{className:"text-xs text-neutral-600 font-normal",children:p(a==null?void 0:a.createdAt)})]}),e.jsxs("div",{className:"flex flex-col w-auto gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-900 font-medium",children:"Última modificación"}),e.jsx("p",{className:"text-xs text-neutral-600 font-normal",children:p(a==null?void 0:a.updatedAt)})]})]})})]})}),e.jsx(Ze,{items:j})]})})]})})}const rs=({id:t,task:s,endDate:n,users:a,willBePaused:r,nameProject:l,idProject:i,comments:x,priority:o,responsible:u,nameRequiredTask:c,statusRequiredTask:h,status:p})=>{const j=d.useRef(null),[f,g]=d.useState(!1),{setElementPosition:w,position:b}=Y(),v=({children:N})=>{const[S,m]=d.useState();return d.useEffect(()=>{var T,P;j.current&&m(((b==null?void 0:b.x)??0)-(((P=(T=j.current)==null?void 0:T.getBoundingClientRect())==null?void 0:P.width)??0))},[j==null?void 0:j.current,b==null?void 0:b.x]),b&&Q.createPortal(e.jsx("div",{className:`absolute w-fit h-fit ${S?"block":"hidden"}`,style:{top:`${b==null?void 0:b.y}px`,left:`${S}px`},children:N}),document.body)},F=()=>e.jsxs("div",{className:"flex justify-between items-center w-full h-fit relative",children:[e.jsxs("div",{className:"flex items-center gap-[8px] w-[calc(100%-32px)] ",children:[e.jsx(be,{id:t,nameRequiredTask:c??"",statusRequiredTask:h??0,status:p}),e.jsx("p",{className:"title-text",onClick:()=>g(!0),children:s})]}),e.jsx("button",{ref:j,onClick:()=>{w(j)},className:"flex items-center justify-center text-sm font-extrabold bg-bg hover:filter-[drop-shadow(0_0_10px_#000000)] rounded-full w-[24px] h-[24px] m-block",children:e.jsx("span",{className:"rotate-90",children:e.jsx(y.Icons,{icon:"elipsis",size:"xs"})})}),e.jsx(v,{children:e.jsxs("button",{className:"w-max h-fit bg-bg-card rounded-lg p-l shadow-lg flex items-center gap-2 hover:bg-primary-light",onClick:()=>{},children:[e.jsx("p",{className:"text-sm font-normal text-texts-placeholder font-regular",children:"Mover a trabajando"}),e.jsx(y.Icons,{icon:"arrow_right",size:"xs",strokeWidth:4,color:_.primary.regular})]})})]});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-bg-card border-cards max-w-[350px] rounded-lg relative h-fit p-[12px_12px] hover:border-active hover:bg-active cursor-pointer ",children:[e.jsx(F,{}),e.jsxs("div",{className:"flex flex-col gap-[4px] py-2",children:[e.jsx("p",{className:"subtitle-text",children:l}),i&&e.jsx("p",{className:"content-text",children:i})]}),e.jsxs("div",{className:"flex justify-between items-center w-full h-fit relative pt-5 pb-1",children:[e.jsxs("div",{className:"flex items-center relative",children:[e.jsx(we,{responsible:u,users:a.filter(N=>u?N.id===u:!0).map(X),onClick:()=>{}}),r&&e.jsx(y.Tooltip,{dispatch:e.jsxs("button",{className:"text-sm font-regular text-gray-400 flex items-center gap-2",children:[e.jsx(y.Icons,{icon:"pause",size:"s",strokeWidth:2}),e.jsx("span",{children:"Pause"})]}),children:e.jsx("p",{className:"text-sm font-regular text-white p-5",children:"Al pulsar el botón se solicitará razón del pausado"})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y.Icons,{icon:"at",size:"xs"}),e.jsx(Ne,{priority:o,id:t}),e.jsx(y.Icons,{icon:"calendar",size:"xs",strokeWidth:3,color:_.texts.subtext}),e.jsx("p",{className:"text-sm font-regular text-texts-subtext",children:`${n.getDate()} ${ye(n.getMonth()).slice(0,3)}`})]})]}),x>0&&e.jsx("div",{className:"border-t border-gray-200 mt-4 pt-2",children:e.jsxs("button",{className:"flex items-center gap-2",children:[e.jsx(y.Icons,{icon:"comment",size:"xs",strokeWidth:4}),e.jsx("span",{className:"text-sm font-regular text-gray-400",children:x})]})})]}),e.jsx(ns,{taskId:t,isOpen:f,setIsOpen:g})]})},ls=()=>e.jsxs("div",{className:"bg-gray-200 h-[150px] w-full animate-pulse rounded-md flex flex-col gap-[50px] p-4",children:[e.jsxs("div",{className:"flex h-[30px] gap-3",children:[e.jsx("div",{className:"w-[30px] min-w-[30px] h-full bg-gray-300 rounded-full"}),e.jsx("div",{className:"w-full h-full bg-gray-300"}),e.jsx("div",{className:"w-[30px] min-w-[30px] h-full bg-gray-300 rounded-full"})]}),e.jsxs("div",{className:"flex justify-between w-full h-[30px] gap-[50px]",children:[e.jsx("div",{className:"w-full h-[30px] bg-gray-300"}),e.jsx("div",{className:"w-full h-[30px] bg-gray-300"})]})]}),V=({title:t,tasks:s,loadNextPage:n,isFetching:a,total:r})=>{const l=d.useRef(null),i=d.useRef(null),x=d.useRef(!1);d.useEffect(()=>{var c;l!=null&&l.current&&(i!=null&&i.current)&&(i.current.style.minHeight=`${((c=l==null?void 0:l.current)==null?void 0:c.clientHeight)-50}px`)},[l==null?void 0:l.current]);const o=c=>{if(x.current)return;const{scrollTop:h,clientHeight:p,scrollHeight:j}=c==null?void 0:c.target,f=h/(j-p)*100;f<=95||f>=95&&(x.current=!0,n&&n(),setTimeout(()=>{x.current=!1},200))},u={"Por hacer":"border-texts-placeholder",Trabajando:"border-primary-regular",Completadas:"border-success-regular"};return e.jsxs("div",{ref:l,className:` flex flex-col bg-containers w-fit max-w-[400px] min-w-[400px] h-full min-h-[100%] pb-[200px] relative p-[16px] rounded-lg overflow-hidden border-t-4 ${u[t]}`,children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("div",{className:"flex items-center gap-[8px]",children:e.jsx("p",{className:"text-base",children:t})}),e.jsx("div",{className:"flex items-center gap-[8px]",children:e.jsxs("div",{className:"flex items-center gap-[4px]",children:[e.jsx(y.Icons,{icon:"group_files",size:"xs",strokeWidth:5,color:_.texts.placeholder}),e.jsx("p",{className:"text-md text-texts-placeholder",children:r??0})]})})]}),e.jsxs("div",{ref:i,className:"flex flex-col gap-[12px] overflow-y-auto scrollbar-none py-4",onScroll:o,children:[s==null?void 0:s.map(c=>e.jsx(rs,{...c},c.id)),a?e.jsx(ls,{}):e.jsx("p",{className:"text-center text-gray-500",children:"No hay más tareas por mostrar..."})]})]})},is=()=>{var r;const{defineFields:t}=I(),{tasksProject:s}=H();d.useEffect(()=>{(async()=>{let i=[...We];t(i)})()},[]);let n=(r=s==null?void 0:s.data)==null?void 0:r.filter(l=>{var i;return((i=l==null?void 0:l.tasks)==null?void 0:i.length)===0}).reduce((l,i)=>(l[i.status]=l[i.status]||[],l[i.status].push(i),l),{});const a=["Por hacer","Trabajando","Completadas"];return e.jsx("div",{className:"flex gap-4 w-full h-full min-h-[100%] relative ",children:a.map((l,i)=>{var x;return e.jsx(V,{total:((x=n==null?void 0:n[i])==null?void 0:x.length)??0,title:l,tasks:(n==null?void 0:n[i])??[],isFetching:s==null?void 0:s.isFetching,isLoadingData:s==null?void 0:s.isLoading})})})};class os{static toKanbanTasks(s){var a,r,l,i,x,o,u,c,h,p,j;let n=[];return s!=null&&s.responsable&&n.push({id:s.responsable.id,name:s.responsable.nombre,image:(x=(i=(l=(r=(a=s.responsable)==null?void 0:a.userOBP)==null?void 0:r.imagen)==null?void 0:l.formats)==null?void 0:i.thumbnail)==null?void 0:x.url}),(o=s==null?void 0:s.equipo)!=null&&o.miembros&&s.equipo.miembros.forEach(f=>{var g,w,b,v;n!=null&&n.find(F=>F.id===f.idUser.id)||f.idUser&&n.push({id:f.idUser.id,name:f.idUser.nombre,image:(v=(b=(w=(g=f==null?void 0:f.userOBP)==null?void 0:g.imagen)==null?void 0:w.formats)==null?void 0:b.thumbnail)==null?void 0:v.url})}),{comments:0,nameProject:(u=s==null?void 0:s.proyecto)==null?void 0:u.nombre,idProject:(c=s==null?void 0:s.proyecto)==null?void 0:c.id,willBePaused:s.es_pausable,difficulty:s.nivel_dificultad,endDate:new Date(s.ffin),id:s.id,priority:s.prioridad??0,status:s.estatus,task:s.texto_corto,users:n,responsible:((h=s==null?void 0:s.responsable)==null?void 0:h.id)??null,statusRequiredTask:((p=s.id_t_requerida)==null?void 0:p.estatus)??null,nameRequiredTask:((j=s.id_t_requerida)==null?void 0:j.texto_corto)??null}}}const Z=async({filters:t,tasks_api:s})=>{try{return(await s.get("/api/listado_tareas",{params:t})).data.tareas.map($).map(os.toKanbanTasks)}catch(n){throw console.log({error:n}),`Error al obtener las tareas: ${n}`}},k=t=>{var s;if(t!=null&&t.hasNextPage){const n=(s=t==null?void 0:t.data)==null?void 0:s.pages[t.data.pages.length-1];(n==null?void 0:n.length)===30&&(t==null||t.fetchNextPage())}},M=t=>({pagination:{page:t,pageSize:30,withCount:!0}}),cs=()=>{var u;const t=A.useQueryClient(),{tasks_api:s}=q(),{user:n}=z(),{filters:a}=I(),[r,l]=d.useState(0),[i,x]=d.useState({owner:{user:n.id,config:((u=a==null?void 0:a.owner)==null?void 0:u.config)??"yo_y_mis_equipos"},status:"por_hacer"}),o=A.useInfiniteQuery({initialPageParam:1,queryKey:["to_do_tasks",i],queryFn:({pageParam:c})=>Z({filters:{...i,status:"por_hacer",...M(c)},tasks_api:s,page:c}),staleTime:1e3*60*60*24,getNextPageParam:(c,h)=>h.length+1});return d.useEffect(()=>{var c;Object.keys(a).length>0&&x({...a,owner:{user:n.id,config:((c=a==null?void 0:a.owner)==null?void 0:c.config)??"yo_y_mis_equipos"},status:"por_hacer"})},[a]),d.useEffect(()=>{t.invalidateQueries({queryKey:["to_do_tasks",i]})},[i]),d.useEffect(()=>{(async()=>{const h=await s.get("/api/listado_tareas",{params:{...i,status:"por_hacer",...M(1),tasks_api:s,justCount:!0}});l(h.data.total)})()},[i,o==null?void 0:o.data]),{toDoTasks:o,total:r}},ds=()=>{var a,r;const{toDoTasks:t,total:s}=cs(),n=[...((r=(a=t==null?void 0:t.data)==null?void 0:a.pages)==null?void 0:r.flat())??[]];return e.jsx(V,{total:s,title:"Por hacer",tasks:n,loadNextPage:()=>k(t),isFetching:t==null?void 0:t.isFetching,isLoadingData:t==null?void 0:t.isLoading})},xs=()=>{var u;const t=A.useQueryClient(),{tasks_api:s}=q(),{user:n}=z(),{filters:a}=I(),[r,l]=d.useState(0),[i,x]=d.useState({owner:{user:n.id,config:((u=a==null?void 0:a.owner)==null?void 0:u.config)??"yo_y_mis_equipos"},status:"trabajando"}),o=A.useInfiniteQuery({initialPageParam:1,queryKey:["working_tasks",i],queryFn:({pageParam:c})=>Z({filters:{...i,status:"trabajando",...M(c)},tasks_api:s,page:c}),staleTime:1e3*60*60*24,getNextPageParam:(c,h)=>h.length+1});return d.useEffect(()=>{var c;Object.keys(a).length>0&&x({...a,owner:{user:n.id,config:((c=a==null?void 0:a.owner)==null?void 0:c.config)??"yo_y_mis_equipos"},status:"trabajando"})},[a]),d.useEffect(()=>{t.invalidateQueries({queryKey:["working_tasks",i]})},[i]),d.useEffect(()=>{(async()=>{const h=await s.get("/api/listado_tareas",{params:{...i,status:"trabajando",...M(1),tasks_api:s,justCount:!0}});l(h.data.total)})()},[i,o==null?void 0:o.data]),{workingTasks:o,total:r}},us=()=>{var a,r;const{workingTasks:t,total:s}=xs(),n=[...((r=(a=t==null?void 0:t.data)==null?void 0:a.pages)==null?void 0:r.flat())??[]];return e.jsx(V,{total:s,title:"Trabajando",tasks:n,loadNextPage:()=>k(t),isFetching:t==null?void 0:t.isFetching})},ms=()=>{var u;const t=A.useQueryClient(),{user:s}=z(),{tasks_api:n}=q(),{filters:a}=I(),[r,l]=d.useState(0),[i,x]=d.useState({owner:{user:s.id,config:((u=a==null?void 0:a.owner)==null?void 0:u.config)??"yo_y_mis_equipos"},status:"completadas"}),o=A.useInfiniteQuery({initialPageParam:1,queryKey:["done_tasks",i],queryFn:({pageParam:c})=>Z({filters:{...i,status:"completadas",...M(c)},tasks_api:n,page:c}),staleTime:1e3*60*60*24,getNextPageParam:(c,h)=>h.length+1});return d.useEffect(()=>{var c;Object.keys(a).length>0&&x({...a,owner:{user:s.id,config:((c=a==null?void 0:a.owner)==null?void 0:c.config)??"yo_y_mis_equipos"},status:"completadas"})},[a]),d.useEffect(()=>{t.invalidateQueries({queryKey:["done_tasks",i]})},[i]),d.useEffect(()=>{(async()=>{const h=await n.get("/api/listado_tareas",{params:{...i,status:"completadas",...M(1),justCount:!0,tasks_api:n}});l(h.data.total)})()},[o==null?void 0:o.data,i]),{doneTasks:o,total:r}},ps=()=>{var a,r;const{doneTasks:t,total:s}=ms(),n=[...((r=(a=t==null?void 0:t.data)==null?void 0:a.pages)==null?void 0:r.flat())??[]];return e.jsx(V,{title:"Completadas",tasks:n,loadNextPage:()=>k(t),isFetching:t==null?void 0:t.isFetching,total:s})};class U{static toSalesmanUsers(s){return{id:s.id,name:s.nombre}}}const hs=()=>{const{tasks_api:t}=q(),{filters:s}=I(),{user:n}=z();return{getSalesmanAndProjects:async()=>{var o;const[i,x]=await Promise.all([t.get("/api/obtener-comerciales"),t.get("/api/listado_tareas",{params:{...s,owner:{user:n.id,config:((o=s==null?void 0:s.owner)==null?void 0:o.config)??"yo_y_mis_equipos"},justProjects:!0}})]);return{salesmanUsers:i.data.map(U.toSalesmanUsers),projects:x.data.map(U.toSalesmanUsers)}},getProjects:async()=>{var x;return(await t.get("/api/listado_tareas",{params:{...s,owner:{user:n.id,config:((x=s==null?void 0:s.owner)==null?void 0:x.config)??"yo_y_mis_equipos"},justProjects:!0}})).data.map(U.toSalesmanUsers)},getSalesmans:async()=>(await t.get("/api/obtener-comerciales")).data.map(U.toSalesmanUsers)}},gs=[{label:"Tipo de dependencia",type:"select",id:"dependency",options:[{id:"con",name:"Con dependencia"},{id:"sin",name:"Sin dependencia"},{id:"ambas",name:"Ambas"}]},{label:"Por proyecto",type:"select",id:"project.id",options:[]},{label:"Por responsable",type:"select",id:"owner.config",options:[{id:"yo",name:"Mis tareas"},{id:"yo_y_mis_equipos",name:"Tareas mías y de mis equipos"},{id:"mis_equipos",name:"Tareas de mis equipos"}]},{label:"Por ejecutivo",type:"select",id:"salesman.name",options:[]},{label:"Por dificultad",type:"select",id:"difficulty",options:[{id:0,name:"Muy facil"},{id:1,name:"Facil"},{id:2,name:"Media"},{id:3,name:"Dificil"},{id:4,name:"Muy dificil"}]}],fs=()=>{const{defineFields:t}=I(),{getSalesmanAndProjects:s}=hs();return d.useEffect(()=>{(async()=>{let a=[...gs],{salesmanUsers:r,projects:l}=await s();t(a.map(i=>(i.id==="project.id"&&(i.options=l),i.id==="salesman.name"&&(i.options=r),i)))})()},[]),e.jsxs("div",{className:"flex gap-4 w-full h-full min-h-[100%] relative ",children:[e.jsx(ds,{}),e.jsx(us,{}),e.jsx(ps,{})]})},Ce=d.createContext({}),js=({children:t})=>{const[s,n]=d.useState([]);d.useEffect(()=>{console.log({selectedTasks:s})},[s]);const a=r=>{n(l=>l.includes(r)?l.filter(i=>i!==r):[...l,r])};return e.jsx(Ce.Provider,{value:{selectedTasks:s,selectTask:a},children:t})},bs=()=>d.useContext(Ce),_e=()=>{const t=()=>e.jsxs("div",{className:"w-full flex gap-m",children:[e.jsx("div",{className:"w-[30px] h-[30px] min-w-[30px] min-h-[30px] bg-gray-200 rounded-full animate-pulse"}),e.jsx("div",{className:"w-[30%] h-[30px] bg-gray-200 rounded-md animate-pulse"}),e.jsx("div",{className:"w-[30px] h-[30px] min-w-[30px] min-h-[30px] bg-gray-200 rounded-lg animate-pulse"}),e.jsx("div",{className:"w-[30px] h-[30px] min-w-[30px] min-h-[30px] bg-gray-200 rounded-lg animate-pulse"}),e.jsx("div",{className:"w-[30px] h-[30px] min-w-[30px] min-h-[30px] bg-gray-200 rounded-lg animate-pulse"}),e.jsx("div",{className:"w-[10%] h-[30px] bg-gray-200 rounded-md animate-pulse"}),e.jsx("div",{className:"w-[30px] h-[30px] min-w-[30px] min-h-[30px] bg-gray-200 rounded-lg animate-pulse"}),e.jsx("div",{className:"w-[10%] h-[30px] bg-gray-200 rounded-md animate-pulse"}),e.jsx("div",{className:"w-[30px] h-[30px] min-w-[30px] min-h-[30px] bg-gray-200 rounded-lg animate-pulse"}),e.jsx("div",{className:"w-[30px] h-[30px] min-w-[30px] min-h-[30px] bg-gray-200 rounded-lg animate-pulse"})]});return e.jsxs("div",{className:"flex flex-col gap-m",children:[e.jsx(t,{}),e.jsxs("div",{className:"pl-5 flex flex-col gap-m",children:[e.jsx(t,{}),e.jsx("div",{className:"pl-5",children:e.jsx(t,{})})]}),e.jsx(t,{}),e.jsxs("div",{className:"pl-5 flex flex-col gap-m",children:[e.jsx(t,{}),e.jsx("div",{className:"pl-5",children:e.jsx(t,{})})]})]})},Fe=({startDate:t,endDate:s})=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"gap-s bg-gray-100 rounded-md h-[30px] w-fit flex justify-center items-center px-xxxl",children:[e.jsx(y.Icons,{icon:"calendar",size:"xs",strokeWidth:4,color:_.texts.subtext}),e.jsxs("p",{className:"text-sm",children:[" ",xe(t)]})]}),e.jsx(y.Icons,{icon:"arrow_right",size:"xs",strokeWidth:4,color:_.texts.DEFAULT}),e.jsxs("div",{className:"gap-s bg-gray-100 rounded-md h-[30px] w-fit flex justify-center items-center px-xxxl",children:[e.jsx(y.Icons,{icon:"calendar",size:"xs",strokeWidth:4,color:_.texts.subtext}),e.jsxs("p",{className:"text-sm",children:[" ",xe(s)]})]})]}),ys=({id:t})=>e.jsx(e.Fragment,{children:e.jsx("button",{onClick:()=>alert("pausar tarea "+t),children:e.jsx(y.Icons,{icon:"pause",size:"xs",strokeWidth:4,color:_.texts.subtext})})}),Se=({id:t,priority:s})=>e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"gap-s bg-gray-100 rounded-md h-[30px] w-[30px] flex justify-center items-center hover:bg-gray-200",children:e.jsx(y.Icons,{icon:"align_center",size:"xs",strokeWidth:4,color:_.texts.subtext})}),e.jsx("div",{className:"gap-s bg-success-medium border border-success-pastel rounded-md h-[30px] w-[30px] flex justify-center items-center",children:e.jsx(Ne,{id:t,priority:s})}),e.jsx("button",{className:"gap-s bg-danger-light border border-danger-regular rounded-md h-[30px] w-[30px] flex justify-center items-center",children:e.jsx(y.Icons,{icon:"difficulty",size:"xs",strokeWidth:4,color:_.danger.regular})})]}),ws=({id:t})=>{const{selectedTasks:s,selectTask:n}=bs();return e.jsxs(e.Fragment,{children:[e.jsx("label",{className:"cursor-pointer w-[20px] h-[20px] border-2 border-gray-200 rounded-md flex justify-center items-center",htmlFor:t.toString(),children:e.jsx("span",{className:`${s.includes(t)?"opacity-100":"opacity-0"} transition-opacity duration-500`,children:e.jsx(y.Icons,{icon:"check_outline",size:"xs",color:_.primary.regular,strokeWidth:6})})}),e.jsx("input",{className:"hidden",id:t.toString(),type:"checkbox",onChange:()=>n(t)})]})},Te=({task:t})=>e.jsx(y.Tooltip,{dispatch:e.jsx("p",{className:"text-sm text-texts-subtext max-w-[400px] truncate",children:t}),children:e.jsx("p",{className:"text-sm text-texts-subtext p-2 max-w-[400px]",children:t})}),Ns=({id:t})=>{var a,r;const{tasksProject:s}=H(),n=(a=s==null?void 0:s.data)==null?void 0:a.find(l=>l.id===t);return e.jsxs("div",{className:"ml-[30px] mb-3 mt-1 flex flex-wrap items-center gap-xl",children:[!(n!=null&&n.nameRequiredTask)||(n==null?void 0:n.nameRequiredTask)!==""&&(n==null?void 0:n.statusRequiredTask)===2&&e.jsx(ws,{id:t}),e.jsx(be,{id:t,nameRequiredTask:(n==null?void 0:n.nameRequiredTask)??"",status:n==null?void 0:n.status,statusRequiredTask:(n==null?void 0:n.statusRequiredTask)??0},t),(n==null?void 0:n.willBePaused)&&e.jsx(ys,{id:t}),e.jsx(we,{onClick:()=>{},responsible:n==null?void 0:n.responsible,users:((r=n==null?void 0:n.users)==null?void 0:r.map(X))??[]}),e.jsx(Te,{task:(n==null?void 0:n.task)??""}),e.jsx(Se,{id:t,priority:n==null?void 0:n.priority}),e.jsx(Fe,{startDate:n==null?void 0:n.startDate,endDate:n==null?void 0:n.endDate})]})},Ae=({id:t})=>{var l,i,x,o,u,c,h;const{tasksProject:s,openTasks:n,openTask:a}=H(),r=(l=s==null?void 0:s.data)==null?void 0:l.find(p=>p.id===t);return r?(console.log({task:r}),e.jsxs("div",{className:"flex flex-col gap-m mb-2 ",children:[e.jsxs("div",{className:"flex items-center gap-m flex-wrap hover:bg-gray-100",children:[e.jsx("button",{className:`${n.includes(t)?"":"-rotate-90"} transition-all duration-300`,onClick:()=>a(t),children:e.jsx(y.Icons,{icon:"angle_down_outline",color:_.texts.subtext})}),e.jsx("div",{className:"flex items-center justify-center min-w-[20px] min-h-[20px] w-fit h-[20px] mx-1 bg-primary-medium rounded-full",children:e.jsx("p",{className:"text-sm text-primary",children:((i=r==null?void 0:r.tasks)==null?void 0:i.length)===0?1:(x=r==null?void 0:r.tasks)==null?void 0:x.length})}),e.jsx(Te,{task:(r==null?void 0:r.task)??""}),e.jsx(Se,{id:t,priority:r==null?void 0:r.priority}),e.jsx(Fe,{startDate:r==null?void 0:r.startDate,endDate:r==null?void 0:r.endDate}),e.jsxs("button",{className:"gap-s bg-gray-100 rounded-md h-[30px] flex justify-center items-center w-fit px-m hover:bg-gray-200",children:[e.jsx(y.Icons,{icon:"subtasks",size:"xs",strokeWidth:5,color:_.texts.subtext}),e.jsx("p",{children:((o=r==null?void 0:r.tasks)==null?void 0:o.length)===0?1:(u=r==null?void 0:r.tasks)==null?void 0:u.length})]})]}),n.includes(t)&&e.jsx("div",{className:"ml-[30px]",children:((c=r==null?void 0:r.tasks)==null?void 0:c.length)>0?(h=r==null?void 0:r.tasks)==null?void 0:h.map(p=>e.jsx(Ae,{id:p==null?void 0:p.id})):e.jsx(Ns,{id:r==null?void 0:r.id})})]})):null},vs=()=>{var a;const{tasksProject:t,projectID:s}=H();if(t!=null&&t.isFetching||t!=null&&t.isLoading)return e.jsx(_e,{});let n=[...(a=t==null?void 0:t.data)==null?void 0:a.filter(r=>r.isPrincipalTask)];return e.jsx("div",{className:"flex flex-col gap-m",children:e.jsx(js,{project:s,children:n==null?void 0:n.sort((r,l)=>r.orden-l.orden).map(r=>e.jsx("div",{className:"flex flex-col gap-m border-b border-gray-200 pb-m",children:e.jsx(Ae,{id:r.id})}))})})},Cs=({setPath:t,setProject:s})=>{const[n,a]=d.useState([]),[r,l]=d.useState(!0),[i,x]=d.useState(0),[o,u]=d.useState(10),[c,h]=d.useState(0),[p,j]=d.useState("nombre"),{defineFields:f}=I(),{tasks_api:g}=q(),w=async(m,T)=>{try{l(!0);const P=await g.get("/api/listado_campanias",{params:{pagination:{page:m,pageSize:T},orderBy:p}}),D=$(P.data);a(D),h(P.data.meta.total)}catch(P){console.error("Error fetching data en Lista Campaña:",P)}finally{l(!1)}};d.useEffect(()=>{f([{label:"Búsqueda",type:"text",id:"search"},{label:"Responsable",type:"select",id:"responsable.responsableType",options:[{id:"yo_y_mis_equipos",name:"Yo y mis equipos"},{id:"mis_equipos",name:"Mis equipos"},{id:"yo",name:"Yo"}]},{label:"Ejecutivo",type:"text",id:"ejecutivo"}])},[]),d.useEffect(()=>{const m=Math.floor(i/o)+1;w(m,o)},[i,o,p]);const b=m=>{x(m.first),u(m.rows)},v=[{label:"5 filas",value:5},{label:"10 filas",value:10},{label:"15 filas",value:15},{label:"20 filas",value:20},{label:"25 filas",value:25},{label:"50 filas",value:50}],F=m=>{const T=parseInt(m.target.value,10);u(T),b({first:0,rows:T})},N=m=>{j(T=>T===m?`${m}:desc`:m)},S=m=>p===m?"↑↓":p===`${m}:desc`?"↓↑":"↑↓";return e.jsx("div",{className:"table-container",children:r?e.jsx("div",{style:{width:"100%"},children:e.jsx(_e,{})}):e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:"table",style:{borderCollapse:"collapse",width:"100%",borderSpacing:"0"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsxs("th",{onClick:()=>N("nombre"),children:[e.jsx("label",{style:{color:"#C4C4C4",fontSize:"10px"},children:S("nombre")}),"Campaña"]}),e.jsx("th",{onClick:()=>N("inicia"),style:{textAlign:"center",whiteSpace:"nowrap"},children:e.jsxs("div",{style:{display:"flex",alignItems:"center",width:"fit-content"},children:[e.jsx("label",{style:{color:"#C4C4C4",fontSize:"10px"},children:S("inicia")})," ",e.jsx(y.Icons,{icon:"calendar",size:"xs",strokeWidth:5,color:"#C4C4C4"}),e.jsx("span",{children:"Fecha Inicio"})]})}),e.jsx("th",{onClick:()=>N("termina"),style:{whiteSpace:"nowrap",textAlign:"center"},children:e.jsxs("div",{style:{display:"flex",alignItems:"center",width:"fit-content"},children:[e.jsx("label",{style:{color:"#C4C4C4",fontSize:"10px"},children:S("termina")}),e.jsx(y.Icons,{icon:"calendar",size:"xs",strokeWidth:5,color:"#C4C4C4"}),e.jsx("span",{children:"Fecha Fin"})]})}),e.jsx("th",{children:"Status"}),e.jsx("th",{children:"Responsable"})]})}),e.jsx("tbody",{children:n==null?void 0:n.map((m,T)=>{var P,D,W,E,B,R,O,ee,se,te,ae,ne,re,le,ie,oe;return e.jsxs("tr",{className:"table-row",children:[e.jsx("td",{children:(P=m==null?void 0:m.campania)==null?void 0:P.nombre}),e.jsxs("td",{children:[" ",(D=m==null?void 0:m.campania)==null?void 0:D.inicia]}),e.jsx("td",{children:(W=m==null?void 0:m.campania)==null?void 0:W.termina}),e.jsx("td",{children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"15px",padding:"none",fontSize:"10px",width:"auto",minWidth:"170px"},children:[e.jsxs("label",{style:{width:"50px",minWidth:"50px",textAlign:"right",color:"#000"},children:[m==null?void 0:m.progreso,"%"]}),e.jsx("div",{style:{position:"relative",height:"10px",flex:1,backgroundColor:"#C4C4C4",borderRadius:"10px",overflow:"hidden"},children:e.jsx("div",{style:{position:"absolute",top:0,left:0,height:"100%",width:`${m.progreso}%`,backgroundColor:m.progreso===100?"#039B59":m.progreso>50?"#3658C1":m.progreso>0?"#DC8921":"#C4C4C4",borderRadius:"10px",transition:"width 0.3s ease-in-out"}})})]})}),e.jsx("td",{children:e.jsxs("div",{className:"avatar-container",children:[e.jsxs(C.Avatar,{className:"avatar",children:[e.jsx(C.AvatarImage,{src:`${ve}${(ee=(O=(R=(B=(E=m==null?void 0:m.campania)==null?void 0:E.responsable)==null?void 0:B.imagen)==null?void 0:R.formats)==null?void 0:O.thumbnail)==null?void 0:ee.url}`,alt:(ae=(te=(se=m==null?void 0:m.campania)==null?void 0:se.responsable)==null?void 0:te.nombre)==null?void 0:ae.charAt(0)}),e.jsx(C.AvatarFallback,{style:{boxShadow:"10px 5px 10px rgba(0, 0, 0, 0.5)"},children:(le=(re=(ne=m==null?void 0:m.campania)==null?void 0:ne.responsable)==null?void 0:re.nombre)==null?void 0:le.charAt(0)})]}),e.jsx("span",{style:{marginLeft:"8px",fontSize:"10px"},children:(oe=(ie=m==null?void 0:m.campania)==null?void 0:ie.responsable)==null?void 0:oe.nombre})]})})]},T)})})]}),e.jsxs("div",{className:"pagination",style:{background:"#FAFAFA",display:"flex"},children:[e.jsxs("span",{style:{alignItems:"center",fontSize:"10px",textAlign:"left",width:"auto",height:"auto",padding:"12px",whiteSpace:"nowrap"},children:[n.length," elementos de ",c]}),e.jsx(qe.Paginator,{first:i,rows:o,totalRecords:c,rowsPerPageOptions:[5,10,20,50],onPageChange:b,className:"pagination",template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("span",{style:{fontSize:"10px",whiteSpace:"nowrap"},children:"Filas por página:"}),e.jsx("select",{className:"select",value:o,onChange:m=>F(m),children:v.map(m=>e.jsx("option",{className:"option-select",value:m.value,style:{background:"#F5F5F5"},children:m.label},m.value))})]})]})]})})},_s=({path:t,tab:s,setPath:n,project:a,setProject:r})=>{const l={"kanban-general":{kanban:e.jsx(fs,{})},"lista-campanias":{lista:e.jsx(Cs,{setPath:n,setProject:r}),gantt:e.jsx("div",{children:"gantt-campanias"})},"kanban-campania":{kanban:e.jsx(is,{}),lista:e.jsx(vs,{}),gantt:e.jsx("div",{children:"kanban-campania-gantt"})}};return t==="kanban-campania"?e.jsx(Oe,{project:a==null?void 0:a.id,children:l[t][s]}):l[t][s]},Fs=({path:t})=>{const s=()=>{const[n,a]=d.useState("kanban"),[r,l]=d.useState(t),[i,x]=d.useState({id:1839,project:"Kanban de Campania"}),[o,u]=d.useState(""),c=d.useRef(null);d.useEffect(()=>{a("kanban")},[t]);const h=g=>({"kanban-general":"Kanban General","lista-campanias":"Campanias","kanban-campania":`Kanban de ${i.project}`})[g],p=g=>{l(g)},j=["lista-campanias","kanban-campania"],f={"lista-campanias":["lista","gantt"],"kanban-campania":["kanban","lista","gantt"]};return e.jsxs("div",{className:"bg-bg-card p-m rounded-lg border border-gray-200 flex flex-col gap-m w-full h-full min-h-[100%] relative overflow-hidden",children:[e.jsxs("div",{className:"w-full justify-between flex items-end border-b border-gray-200 pb-m px-l flex-wrap gap-l",children:[e.jsxs("div",{className:"flex gap-xl",children:[e.jsx("h2",{className:"text-texts font-medium",children:h(r)}),j.includes(r)&&e.jsx(De,{tabs:f[r],renderItem:g=>{a(g)}})]}),e.jsxs("div",{className:"flex items-center gap-s",children:[e.jsx("input",{onChange:he(g=>{var w;return u((w=g==null?void 0:g.target)==null?void 0:w.value)},1e3),type:"text",placeholder:"Buscar",className:"w-[200px] h-[30px] border-none bg-bg-card shadow-input border border-gray-200 rounded-lg px-l "}),e.jsx(Ie,{filterChildren:c,children:e.jsx("div",{ref:c,className:"w-max max-w-[400px] h-fit bg-bg-card shadow-lg rounded-lg p-l",children:e.jsx(Be,{})})})]})]}),e.jsx("div",{className:"overflow-auto scrollbar-none",children:e.jsx(_s,{path:r,tab:n,setPath:p,project:i,setProject:x})})]})};return e.jsx($e,{children:e.jsx(s,{})})},Ss=()=>e.jsx("div",{className:"w-full h-full min-h-[100%] relative",children:e.jsx("div",{className:"flex justify-center items-center h-full",children:e.jsxs("div",{className:"text-2xl font-bold flex flex-col items-center",children:[e.jsx("div",{className:"w-10 h-10 bg-primary-regular rounded-full animate-pulse"}),e.jsx("p",{className:"text-l text-texts-enfasis",children:"un momento..."}),e.jsx("p",{className:"text-sm text-texts-placeholder",children:"estamos buscando tu usuario"})]})})}),Ts=()=>e.jsx("div",{className:"w-full h-full min-h-[100%] relative",children:e.jsx("div",{className:"flex justify-center items-center h-full",children:e.jsxs("div",{className:"text-2xl font-bold flex flex-col items-center",children:[e.jsx("div",{className:"w-10 h-10 bg-primary-regular rounded-full animate-pulse"}),e.jsx("p",{className:"text-l text-texts-enfasis",children:"No encontramos tu acceso"}),e.jsx("p",{className:"text-sm text-texts-placeholder",children:"por favor, contacta al administrador"})]})})}),As=({path:t,user:s,url:n})=>{const a=new A.QueryClient;if(!s)return e.jsx(Ss,{});if(!s.accessToken)return e.jsx(Ts,{});let r={user:s,url:n};return e.jsx(Re,{...r,children:e.jsx(ze,{...r,children:e.jsx("div",{className:"w-full h-full min-h-[100%] relative",children:e.jsx(A.QueryClientProvider,{client:a,children:e.jsx(Fs,{path:t})})})})})};exports.AppTasks=As;
|
package/dist/tareas.css
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{scrollbar-color:initial;scrollbar-width:initial}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.title-text{text-overflow:ellipsis;font-size:1rem;line-height:1.5rem;font-weight:500;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1));overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.subtitle-text{text-overflow:ellipsis;font-size:.75rem;line-height:1rem;font-weight:500;--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1));overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.content-text{text-overflow:ellipsis;font-size:.75rem;line-height:1rem;font-weight:500;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1));overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.bg-containers{background:#f5f5f5!important}.border-cards{border:1px solid #e9e9e9!important}.border-containers{border-top:3px solid #929292!important}.btn-primary{background:#3658c1!important;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.btn-primary:hover{--tw-shadow: inset 0 0 0 2px #28408F;--tw-shadow-colored: inset 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.right-0{right:0}.right-\[-100\%\]{right:-100%}.right-\[8px\]{right:8px}.top-0{top:0}.z-20{z-index:20}.z-50{z-index:50}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-\[2px\]{margin-left:2px;margin-right:2px}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.ml-\[-8px\]{margin-left:-8px}.ml-\[30px\]{margin-left:30px}.mt-1{margin-top:.25rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-\[2px\]{margin-top:2px}.block{display:block}.flex{display:flex}.table{display:table}.table-row{display:table-row}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-\[150px\]{height:150px}.h-\[20px\]{height:20px}.h-\[22px\]{height:22px}.h-\[24px\]{height:24px}.h-\[28px\]{height:28px}.h-\[30px\]{height:30px}.h-\[32px\]{height:32px}.h-\[80vh\]{height:80vh}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.max-h-\[120px\]{max-height:120px}.max-h-\[200px\]{max-height:200px}.min-h-\[100\%\]{min-height:100%}.min-h-\[20px\]{min-height:20px}.min-h-\[28px\]{min-height:28px}.min-h-\[30px\]{min-height:30px}.w-10{width:2.5rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\[10\%\]{width:10%}.w-\[200px\]{width:200px}.w-\[20px\]{width:20px}.w-\[24px\]{width:24px}.w-\[28px\]{width:28px}.w-\[30\%\]{width:30%}.w-\[300px\]{width:300px}.w-\[30px\]{width:30px}.w-\[400px\]{width:400px}.w-\[40rem\]{width:40rem}.w-\[90vw\]{width:90vw}.w-\[calc\(100\%-32px\)\]{width:calc(100% - 32px)}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.min-w-\[20px\]{min-width:20px}.min-w-\[250px\]{min-width:250px}.min-w-\[28px\]{min-width:28px}.min-w-\[30px\]{min-width:30px}.min-w-\[400px\]{min-width:400px}.min-w-full{min-width:100%}.min-w-max{min-width:-moz-max-content;min-width:max-content}.max-w-\[200px\]{max-width:200px}.max-w-\[350px\]{max-width:350px}.max-w-\[400px\]{max-width:400px}.flex-1{flex:1 1 0%}.-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-\[12px\]{gap:12px}.gap-\[4px\]{gap:4px}.gap-\[50px\]{gap:50px}.gap-\[8px\]{gap:8px}.gap-l{gap:12px}.gap-m{gap:8px}.gap-s{gap:4px}.gap-xl{gap:16px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.text-nowrap{text-wrap:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-l-\[5px\]{border-left-width:5px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-t-4{border-top-width:4px}.border-none{border-style:none}.border-danger-regular{--tw-border-opacity: 1;border-color:rgb(195 67 53 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-neutral-100{--tw-border-opacity: 1;border-color:rgb(245 245 245 / var(--tw-border-opacity, 1))}.border-neutral-200{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}.border-primary-regular{--tw-border-opacity: 1;border-color:rgb(66 92 172 / var(--tw-border-opacity, 1))}.border-success-pastel{--tw-border-opacity: 1;border-color:rgb(87 186 129 / var(--tw-border-opacity, 1))}.border-success-regular{--tw-border-opacity: 1;border-color:rgb(67 176 113 / var(--tw-border-opacity, 1))}.border-texts-enfasis{--tw-border-opacity: 1;border-color:rgb(54 88 193 / var(--tw-border-opacity, 1))}.border-texts-placeholder{--tw-border-opacity: 1;border-color:rgb(146 146 146 / var(--tw-border-opacity, 1))}.border-warning-regular{--tw-border-opacity: 1;border-color:rgb(211 138 49 / var(--tw-border-opacity, 1))}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-x-primary-pastel{--tw-border-opacity: 1;border-left-color:rgb(92 125 221 / var(--tw-border-opacity, 1));border-right-color:rgb(92 125 221 / var(--tw-border-opacity, 1))}.bg-\[\#E1EBF9\]{--tw-bg-opacity: 1;background-color:rgb(225 235 249 / var(--tw-bg-opacity, 1))}.bg-bg{--tw-bg-opacity: 1;background-color:rgb(239 239 239 / var(--tw-bg-opacity, 1))}.bg-bg-card{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1))}.bg-danger-light{--tw-bg-opacity: 1;background-color:rgb(241 229 228 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-neutral-100{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}.bg-primary-medium{--tw-bg-opacity: 1;background-color:rgb(218 226 236 / var(--tw-bg-opacity, 1))}.bg-primary-regular{--tw-bg-opacity: 1;background-color:rgb(66 92 172 / var(--tw-bg-opacity, 1))}.bg-success-medium{--tw-bg-opacity: 1;background-color:rgb(210 233 220 / var(--tw-bg-opacity, 1))}.bg-success-regular{--tw-bg-opacity: 1;background-color:rgb(67 176 113 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-warning-light{--tw-bg-opacity: 1;background-color:rgb(242 236 229 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.fill-texts-enfasis{fill:#3658c1}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-\[12px_12px\]{padding:12px}.p-\[16px\]{padding:16px}.p-l{padding:12px}.p-m{padding:8px}.p-s{padding:4px}.px-0{padding-left:0;padding-right:0}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-l{padding-left:12px;padding-right:12px}.px-m{padding-left:8px;padding-right:8px}.px-xxxl{padding-left:24px;padding-right:24px}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-s{padding-top:4px;padding-bottom:4px}.pb-1{padding-bottom:.25rem}.pb-4{padding-bottom:1rem}.pb-\[200px\]{padding-bottom:200px}.pb-m{padding-bottom:8px}.pl-10{padding-left:2.5rem}.pl-5{padding-left:1.25rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.text-danger-regular{--tw-text-opacity: 1;color:rgb(195 67 53 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.text-neutral-600{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.text-neutral-900{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}.text-primary-pastel{--tw-text-opacity: 1;color:rgb(92 125 221 / var(--tw-text-opacity, 1))}.text-primary-regular{--tw-text-opacity: 1;color:rgb(66 92 172 / var(--tw-text-opacity, 1))}.text-success-regular{--tw-text-opacity: 1;color:rgb(67 176 113 / var(--tw-text-opacity, 1))}.text-texts{--tw-text-opacity: 1;color:rgb(37 37 37 / var(--tw-text-opacity, 1))}.text-texts-enfasis{--tw-text-opacity: 1;color:rgb(54 88 193 / var(--tw-text-opacity, 1))}.text-texts-placeholder{--tw-text-opacity: 1;color:rgb(146 146 146 / var(--tw-text-opacity, 1))}.text-texts-subtext{--tw-text-opacity: 1;color:rgb(79 79 79 / var(--tw-text-opacity, 1))}.text-warning-dark{--tw-text-opacity: 1;color:rgb(180 120 47 / var(--tw-text-opacity, 1))}.text-warning-regular{--tw-text-opacity: 1;color:rgb(211 138 49 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-button-primary,.shadow-input{--tw-shadow: inset 0 0 0 2px #dae2ec;--tw-shadow-colored: inset 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.scrollbar-none{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}.\[key\:string\]{key:string}:root{--imj-bg: #efefef;--imj-bg-content: #fafafa;--imj-bg-card: #fafafa}[theme=dark]{--imj-bg: #252525;--imj-bg-content: #313131;--imj-bg-card: #3d3d3d}.hover\:bg-active:hover{background:#e1ebf9!important}.hover\:border-active:hover{border:1px solid #28408f!important}.placeholder\:font-normal::-moz-placeholder{font-weight:400}.placeholder\:font-normal::placeholder{font-weight:400}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\:bg-primary-light:hover{--tw-bg-opacity: 1;background-color:rgb(231 233 242 / var(--tw-bg-opacity, 1))}.hover\:shadow-button-primary-hover:hover{--tw-shadow: inset 0 0 0 2px #425CAC, 0 0 5px #00000030;--tw-shadow-colored: inset 0 0 0 2px var(--tw-shadow-color), 0 0 5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-neutral-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(245 245 245 / var(--tw-ring-opacity, 1))}.active\:opacity-50:active{opacity:.5}.table-container{width:100%;margin:0 auto;padding:1rem;cursor:pointer;border-radius:2%;background-color:#fafafa;box-shadow:0 2px 4px #00000014}.table-container table{width:100%;border-spacing:0;border:none;background-color:#fafafa;border-radius:8px;overflow:hidden;cursor:pointer}.table-container thead{background-color:#fafafa;cursor:pointer}.table-container thead th{padding:10px;text-align:left;color:#c4c4c4;font-size:10px;text-transform:uppercase;letter-spacing:.5px;width:-moz-fit-content;width:fit-content;cursor:pointer;transition:background-color .2s ease}.table-container thead th:hover{background-color:#e9ecef}.table-container thead th .sort-icon{margin-left:8px;opacity:.5}.table-container thead th .sort-icon.active{opacity:1}.table-container tbody tr:nth-child(odd){background-color:#f5f5f5}.table-container tbody tr:nth-child(2n){background-color:#fafafa}.table-container tbody tr:hover{background-color:#e1ebf9!important;color:#fff}.table-container tbody td{padding:12px 16px;text-align:left;border-bottom:none;color:#212529;font-size:10px;vertical-align:middle;cursor:pointer;width:-moz-fit-content;width:fit-content}.table-container tbody td .progress-container{background-color:#e9ecef;border-radius:4px;height:8px;overflow:hidden}.table-container tbody td .progress-container .progress-bar{height:100%;transition:width .3s ease}.table-container tbody td .progress-container .progress-bar.green{background-color:#039b59}.table-container tbody td .progress-container .progress-bar.blue{background-color:#3658c1}.table-container tbody td .progress-container .progress-bar.orange{background-color:#dc8921}.table-container tbody td .avatar-container{display:flex;align-items:center;gap:12px}.table-container tbody td .avatar-container .avatar{width:28px;height:28px;border-radius:18px;display:flex;align-items:center;justify-content:center;background-color:#e7e9f2;color:dark;font-weight:600;font-size:10px!important}.table-container tbody td .dropdown-container{position:relative;display:inline-block;width:100%}.table-container tbody td .dropdown-container .dropdown-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;padding:6px 12px;font-size:10px;background-color:transparent;border:1px solid #D9D9D9;border-radius:4px;cursor:pointer}.table-container tbody td .dropdown-container .dropdown-toggle:hover{background-color:#f5f5f5}.table-container tbody td .dropdown-container .dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;width:100%;padding:4px 0;margin-top:4px;background-color:#fafafa;border:1px solid #D9D9D9;border-radius:4px;box-shadow:0 2px 4px #0000001a}.table-container tbody td .dropdown-container .dropdown-menu .dropdown-item{display:block;width:100%;padding:6px 12px;font-size:10px;color:#252525;text-align:left;background-color:transparent;border:none;cursor:pointer}.table-container tbody td .dropdown-container .dropdown-menu .dropdown-item:hover{background-color:#e7e9f2}.table-container .pagination{display:flex;justify-content:center;align-items:center;padding:1rem;width:100%;height:auto;background-color:#fafafa;font-size:small}.table-container .pagination button{padding:8px;border:none;background-color:#fafafa;color:#131313;border-radius:50%;cursor:pointer;transition:all .2s ease;width:auto;height:auto;align-items:center;align-content:center;text-align:center;font-size:7px}.table-container .pagination button:disabled{background-color:#f5f5f5;color:#c4c4c4;cursor:not-allowed}.table-container .pagination button:hover:not(:disabled){background-color:#e1ebf9;border-color:#e1ebf9;color:#3658c1}.table-container .pagination span{font-size:10px;color:#6c757d}.table-container .select{padding:.3rem .5rem;font-size:10px;border:1px solid #EFEFEF;border-radius:4px;outline:none;background:#f5f5f5!important;background-color:#f5f5f5!important}.table-container .select .option-select,.table-container .select .option-select option{background:#f5f5f5!important;background-color:#f5f5f5!important;color:#131313}.table-container .table-row{transition:background-color .2s ease}.table-container .table-row .table-row:nth-child(odd){background-color:#fafafa}.table-container .table-row .table-row:nth-child(2n){background-color:#f5f5f5}.table-container .table-row:hover{background-color:#e1ebf9!important;color:#fafafa;cursor:pointer}
|
|
1
|
+
*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
|
|
5
|
+
*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{scrollbar-color:auto;scrollbar-width:auto}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.title-text{text-overflow:ellipsis;font-size:1rem;line-height:1.5rem;font-weight:500;--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1));overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.subtitle-text{color:rgb(107 114 128/var(--tw-text-opacity,1))}.content-text,.subtitle-text{text-overflow:ellipsis;font-size:.75rem;line-height:1rem;font-weight:500;--tw-text-opacity:1;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.content-text{color:rgb(156 163 175/var(--tw-text-opacity,1))}.bg-containers{background:#f5f5f5!important}.border-cards{border:1px solid #e9e9e9!important}.border-containers{border-top:3px solid #929292!important}.btn-primary{background:#3658c1!important;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.btn-primary:hover{--tw-shadow:inset 0 0 0 2px #28408f;--tw-shadow-colored:inset 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.bottom-0{bottom:0}.right-0{right:0}.right-\[-100\%\]{right:-100%}.right-\[8px\]{right:8px}.top-0{top:0}.z-20{z-index:20}.z-50{z-index:50}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-\[2px\]{margin-left:2px;margin-right:2px}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.ml-\[-8px\]{margin-left:-8px}.ml-\[30px\]{margin-left:30px}.mt-1{margin-top:.25rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-\[2px\]{margin-top:2px}.block{display:block}.flex{display:flex}.table{display:table}.table-row{display:table-row}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-\[150px\]{height:150px}.h-\[20px\]{height:20px}.h-\[22px\]{height:22px}.h-\[24px\]{height:24px}.h-\[28px\]{height:28px}.h-\[30px\]{height:30px}.h-\[32px\]{height:32px}.h-\[80vh\]{height:80vh}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.max-h-\[120px\]{max-height:120px}.max-h-\[200px\]{max-height:200px}.min-h-\[100\%\]{min-height:100%}.min-h-\[20px\]{min-height:20px}.min-h-\[28px\]{min-height:28px}.min-h-\[30px\]{min-height:30px}.w-10{width:2.5rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\[10\%\]{width:10%}.w-\[200px\]{width:200px}.w-\[20px\]{width:20px}.w-\[24px\]{width:24px}.w-\[28px\]{width:28px}.w-\[30\%\]{width:30%}.w-\[300px\]{width:300px}.w-\[30px\]{width:30px}.w-\[400px\]{width:400px}.w-\[40rem\]{width:40rem}.w-\[90vw\]{width:90vw}.w-\[calc\(100\%-32px\)\]{width:calc(100% - 32px)}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.min-w-\[20px\]{min-width:20px}.min-w-\[250px\]{min-width:250px}.min-w-\[28px\]{min-width:28px}.min-w-\[30px\]{min-width:30px}.min-w-\[400px\]{min-width:400px}.min-w-full{min-width:100%}.min-w-max{min-width:-moz-max-content;min-width:max-content}.max-w-\[200px\]{max-width:200px}.max-w-\[350px\]{max-width:350px}.max-w-\[400px\]{max-width:400px}.flex-1{flex:1 1 0%}.-rotate-90{--tw-rotate:-90deg}.-rotate-90,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-\[12px\]{gap:12px}.gap-\[4px\]{gap:4px}.gap-\[50px\]{gap:50px}.gap-\[8px\]{gap:8px}.gap-l{gap:12px}.gap-m{gap:8px}.gap-s{gap:4px}.gap-xl{gap:16px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;white-space:nowrap}.text-ellipsis,.truncate{text-overflow:ellipsis}.text-nowrap{text-wrap:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-l-\[5px\]{border-left-width:5px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-t-4{border-top-width:4px}.border-none{border-style:none}.border-danger-regular{--tw-border-opacity:1;border-color:rgb(195 67 53/var(--tw-border-opacity,1))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-neutral-100{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity,1))}.border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.border-primary-regular{--tw-border-opacity:1;border-color:rgb(66 92 172/var(--tw-border-opacity,1))}.border-success-pastel{--tw-border-opacity:1;border-color:rgb(87 186 129/var(--tw-border-opacity,1))}.border-success-regular{--tw-border-opacity:1;border-color:rgb(67 176 113/var(--tw-border-opacity,1))}.border-texts-enfasis{--tw-border-opacity:1;border-color:rgb(54 88 193/var(--tw-border-opacity,1))}.border-texts-placeholder{--tw-border-opacity:1;border-color:rgb(146 146 146/var(--tw-border-opacity,1))}.border-warning-regular{--tw-border-opacity:1;border-color:rgb(211 138 49/var(--tw-border-opacity,1))}.border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.border-x-primary-pastel{--tw-border-opacity:1;border-left-color:rgb(92 125 221/var(--tw-border-opacity,1));border-right-color:rgb(92 125 221/var(--tw-border-opacity,1))}.bg-\[\#E1EBF9\]{--tw-bg-opacity:1;background-color:rgb(225 235 249/var(--tw-bg-opacity,1))}.bg-bg{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity,1))}.bg-bg-card{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.bg-danger-light{--tw-bg-opacity:1;background-color:rgb(241 229 228/var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.bg-primary-medium{--tw-bg-opacity:1;background-color:rgb(218 226 236/var(--tw-bg-opacity,1))}.bg-primary-regular{--tw-bg-opacity:1;background-color:rgb(66 92 172/var(--tw-bg-opacity,1))}.bg-success-medium{--tw-bg-opacity:1;background-color:rgb(210 233 220/var(--tw-bg-opacity,1))}.bg-success-regular{--tw-bg-opacity:1;background-color:rgb(67 176 113/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-warning-light{--tw-bg-opacity:1;background-color:rgb(242 236 229/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-opacity-50{--tw-bg-opacity:0.5}.fill-texts-enfasis{fill:#3658c1}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-\[12px_12px\]{padding:12px}.p-\[16px\]{padding:16px}.p-l{padding:12px}.p-m{padding:8px}.p-s{padding:4px}.px-0{padding-left:0;padding-right:0}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-l{padding-left:12px;padding-right:12px}.px-m{padding-left:8px;padding-right:8px}.px-xxxl{padding-left:24px;padding-right:24px}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-s{padding-top:4px;padding-bottom:4px}.pb-1{padding-bottom:.25rem}.pb-4{padding-bottom:1rem}.pb-\[200px\]{padding-bottom:200px}.pb-m{padding-bottom:8px}.pl-10{padding-left:2.5rem}.pl-5{padding-left:1.25rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.text-danger-regular{--tw-text-opacity:1;color:rgb(195 67 53/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-neutral-400{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}.text-neutral-600{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.text-primary-pastel{--tw-text-opacity:1;color:rgb(92 125 221/var(--tw-text-opacity,1))}.text-primary-regular{--tw-text-opacity:1;color:rgb(66 92 172/var(--tw-text-opacity,1))}.text-success-regular{--tw-text-opacity:1;color:rgb(67 176 113/var(--tw-text-opacity,1))}.text-texts{--tw-text-opacity:1;color:rgb(37 37 37/var(--tw-text-opacity,1))}.text-texts-enfasis{--tw-text-opacity:1;color:rgb(54 88 193/var(--tw-text-opacity,1))}.text-texts-placeholder{--tw-text-opacity:1;color:rgb(146 146 146/var(--tw-text-opacity,1))}.text-texts-subtext{--tw-text-opacity:1;color:rgb(79 79 79/var(--tw-text-opacity,1))}.text-warning-dark{--tw-text-opacity:1;color:rgb(180 120 47/var(--tw-text-opacity,1))}.text-warning-regular{--tw-text-opacity:1;color:rgb(211 138 49/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-button-primary,.shadow-input{--tw-shadow:inset 0 0 0 2px #dae2ec;--tw-shadow-colored:inset 0 0 0 2px var(--tw-shadow-color)}.shadow-button-primary,.shadow-input,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px rgba(0,0,0,.1)) drop-shadow(0 1px 1px rgba(0,0,0,.06))}.drop-shadow,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.scrollbar-none{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}.\[key\:string\]{key:string}:root{--imj-bg:#efefef;--imj-bg-content:#fafafa;--imj-bg-card:#fafafa}[theme=dark]{--imj-bg:#252525;--imj-bg-content:#313131;--imj-bg-card:#3d3d3d}.hover\:bg-active:hover{background:#e1ebf9!important}.hover\:border-active:hover{border:1px solid #28408f!important}.placeholder\:font-normal::-moz-placeholder{font-weight:400}.placeholder\:font-normal::placeholder{font-weight:400}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.hover\:bg-primary-light:hover{--tw-bg-opacity:1;background-color:rgb(231 233 242/var(--tw-bg-opacity,1))}.hover\:shadow-button-primary-hover:hover{--tw-shadow:inset 0 0 0 2px #425cac,0 0 5px #00000030;--tw-shadow-colored:inset 0 0 0 2px var(--tw-shadow-color),0 0 5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-neutral-100:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(245 245 245/var(--tw-ring-opacity,1))}.active\:opacity-50:active{opacity:.5}
|
package/dist/tareas.es.js
CHANGED
|
@@ -1052,7 +1052,7 @@ function Pt({ isOpen: a, setIsOpen: t, taskId: r }) {
|
|
|
1052
1052
|
className: "w-full flex flex-col border border-neutral-200 rounded-xl mt-4",
|
|
1053
1053
|
children: /* @__PURE__ */ o(Xe, { value: "item-1", className: "border-none", children: [
|
|
1054
1054
|
/* @__PURE__ */ e(Je, { className: "text-neutral-900 font-medium text-sm w-full flex flex-row border-b border-neutral-200 p-4 ", children: "Detalles" }),
|
|
1055
|
-
/* @__PURE__ */ e(Ze, { className: "border-none", children: /* @__PURE__ */ o("div", { className: "w-
|
|
1055
|
+
/* @__PURE__ */ e(Ze, { className: "border-none", children: /* @__PURE__ */ o("div", { className: "w-full grid grid-cols-3 gap-4 p-4", children: [
|
|
1056
1056
|
/* @__PURE__ */ o("div", { className: "flex flex-col w-auto gap-2", children: [
|
|
1057
1057
|
/* @__PURE__ */ e("span", { className: "text-sm text-neutral-900 font-medium", children: "Responsable" }),
|
|
1058
1058
|
(f = n == null ? void 0 : n.responsable) != null && f.nombre ? /* @__PURE__ */ o("div", { className: "flex flex-row gap-2 items-center", children: [
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imj_media/tareas",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.18",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"
|
|
7
|
-
"build": "
|
|
6
|
+
"build": "tsc && vite build && npm run build:css",
|
|
7
|
+
"build:css": "tailwindcss -m -i ./src/index.css -o ./dist/tareas.css",
|
|
8
8
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
9
9
|
"preview": "vite preview",
|
|
10
|
-
"storybook": "storybook dev -p 6006",
|
|
11
|
-
"
|
|
10
|
+
"storybook": "concurrently \"npm run storybook:css\" \"storybook dev -p 6006\"",
|
|
11
|
+
"storybook:css": "tailwindcss -i ./src/index.css -o ./src/index.css",
|
|
12
|
+
"build-storybook": "concurrently \"npm run build-storybook:css\" \"storybook build\"",
|
|
13
|
+
"build-storybook:css": "tailwindcss -m -i ./src/index.css -o ./src/index.css",
|
|
12
14
|
"prepublishOnly": "npm run build"
|
|
13
15
|
},
|
|
14
16
|
"main": "dist/cjs/index.js",
|
|
@@ -77,5 +79,5 @@
|
|
|
77
79
|
"access": "public",
|
|
78
80
|
"registry": "https://registry.npmjs.org/@imjmedia"
|
|
79
81
|
},
|
|
80
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "287dd28f891cb8030cc6684554816a1013a0bb96"
|
|
81
83
|
}
|