1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[824],{73807:function(e,t,n){"use strict";var i=n(67294),r=n(67814),a=n(51436),c=n(98533),o=n.n(c),s=n(67421),l=n(85893);t.Z=function(e){var t=e.onFocus,n=e.onChange,c=(0,s.$G)().t,u=(0,i.useState)(""),d=u[0],_=u[1];return(0,l.jsxs)("div",{className:o().bordersearch,children:[(0,l.jsx)(r.G,{icon:a.wn1,className:o().iconsearch}),(0,l.jsx)("input",{type:"text",id:"inputValidation",className:o().inputsearch,placeholder:"".concat(c("search"),"..."),value:d,onChange:function(e){_(e.target.value),n(e.target.value)},onFocus:t})]})}},59575:function(e,t,n){"use strict";var i=n(77191),r=(n(67294),n(47045)),a=n.n(r),c=n(85893);t.Z=function(e){return(0,i.Z)(e),(0,c.jsx)("div",{className:a().container,children:(0,c.jsxs)("div",{className:a()["lds-ring"],children:[(0,c.jsx)("div",{}),(0,c.jsx)("div",{}),(0,c.jsx)("div",{}),(0,c.jsx)("div",{})]})})}},56670:function(e,t,n){"use strict";n.d(t,{$d:function(){return c},FI:function(){return l},GA:function(){return i},b1:function(){return d},c2:function(){return u},fk:function(){return o},ho:function(){return r},iA:function(){return s},wd:function(){return a}});var i=function(e){return e.split("-").reverse().join("/")},r=function(e){var t=e.toTimeString();return t.split(":")[0]+":"+t.split(":")[1]},a=function(e){var t=new Date(e),n=t.getDate()+"/";t.getDate()<10&&(n="0"+n);var i=t.getMonth()+1;return i<10&&(n+="0"),n+=i.toString(),"".concat(n,"/").concat(t.getFullYear())},c=function(e){var t=new Date(e),n=t.getDate()+"/";t.getDate()<10&&(n="0"+n);var i=t.getMonth()+1;return i<10&&(n+="0"),n+=i.toString(),"".concat(n,"/").concat(t.getFullYear()," ").concat(t.getHours(),":").concat(t.getMinutes())},o=function(e){return e.setHours(0,0,0,0),e.setDate(e.getDate()+1),e.getDay()},s=function(e){return _[e]},l=function(e){return e.toISOString().split("T")[0]},u=function(e){var t=new Date(e);return"\n ".concat(t.getDate().toString().padStart(2,"0"),"/").concat((t.getMonth()+1).toString().padStart(2,"0"),"/").concat(t.getFullYear().toString().padStart(4,"0")," \n ").concat(t.getHours().toString().padStart(2,"0"),":").concat(t.getMinutes().toString().padStart(2,"0"),":").concat(t.getSeconds().toString().padStart(2,"0"))},d=function(e,t){return new Date(t,e+1,0).getDate()},_=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]},93372:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return D}});var i,r,a=n(27812),c=n(67294),o=n(6812),s=n(90044),l=n(11163),u=n(67421),d=n(67814),_=n(51436),p=n(38672),k=n(73807),g=n(59575),h=n(71383),f=n(75063),m=(0,f.Ps)(i||(i=(0,h.Z)(["\n query MyTickets ($filter: GespaTicketFilterInput) {\n myTickets(filter: $filter) {\n ticketID\n title\n creationDate\n statusID\n priorityID\n typeID\n categoryID\n subcategoryID\n exitDate\n merged\n mergedInto\n status { id key label }\n priority { id key label }\n type { id key label }\n category { id key name }\n subcategory { id key name categoryID }\n }\n }"]))),v=(0,f.Ps)(r||(r=(0,h.Z)(["\n query TicketParams {\n ticketStatuses { id key label orderIndex }\n ticketPriorities { id key label orderIndex }\n ticketTypes { id key label orderIndex }\n ticketCategories { id key name orderIndex }\n ticketSubcategories { id key name orderIndex categoryID }\n }"]))),y=n(56670),b=n(74575),x=n.n(b),T=n(85893),S=function(){var e=(0,u.$G)().t,t=(0,l.useRouter)(),n=(0,c.useState)(""),i=n[0],r=n[1],h=(0,c.useState)([]),f=h[0],b=h[1],S=(0,c.useState)([]),D=S[0],I=S[1],w=(0,c.useState)([]),j=w[0],N=w[1],B=(0,c.useState)([]),C=B[0],P=B[1],M=(0,c.useState)([]),Z=M[0],R=M[1],H=(0,c.useState)(""),E=H[0],A=H[1],F=(0,c.useState)(""),O=F[0],L=F[1],G=(0,o.aM)(v,{fetchPolicy:"cache-and-network"}),W=G.data,$=G.loading,V=(0,c.useMemo)((function(){return{filter:{statusIds:f.length?f:void 0,priorityIds:D.length?D:void 0,typeIds:j.length?j:void 0,categoryIds:C.length?C:void 0,subcategoryIds:Z.length?Z:void 0,fromDate:E?new Date(E).getTime():void 0,toDate:O?new Date(O+"T23:59:59").getTime():void 0,search:i.trim()||void 0}}}),[f,D,j,C,Z,E,O,i]),Y=(0,o.aM)(m,{variables:V,fetchPolicy:"cache-and-network"}),K=Y.data,q=Y.loading,J=Y.refetch;(0,c.useEffect)((function(){J(V)}),[V,J]);var X=(null===K||void 0===K?void 0:K.myTickets)||[],z=((0,c.useMemo)((function(){return null!==W&&void 0!==W&&W.ticketSubcategories?0===C.length?W.ticketSubcategories:W.ticketSubcategories.filter((function(e){return e.categoryID&&C.includes(e.categoryID)})):[]}),[W,C]),[{name:e("ticket_id"),selector:function(e){return e.ticketID},sortable:!0,width:"90px"},{name:e("ticket_title"),cell:function(t){return(0,T.jsxs)("div",{className:x().titleCell,children:[(0,T.jsx)("span",{className:x().ellipsis,title:t.title,children:t.title}),t.merged&&t.mergedInto&&(0,T.jsxs)("span",{className:x().mergedBadge,children:[(0,T.jsx)(d.G,{icon:_.mh3})," ",e("ticket_merged_into",{id:t.mergedInto})]})]})},sortable:!0,grow:2},{name:e("ticket_status"),cell:function(e){var t;return(null===(t=e.status)||void 0===t?void 0:t.label)||"-"},sortable:!0},{name:e("ticket_priority"),cell:function(e){var t;return(null===(t=e.priority)||void 0===t?void 0:t.label)||"-"},sortable:!0,width:"120px"},{name:e("ticket_type"),cell:function(e){var t;return(null===(t=e.type)||void 0===t?void 0:t.label)||"-"},sortable:!0},{name:e("ticket_category"),cell:function(e){var t;return(null===(t=e.category)||void 0===t?void 0:t.name)||"-"},sortable:!0},{name:e("ticket_subcategory"),cell:function(e){var t;return(null===(t=e.subcategory)||void 0===t?void 0:t.name)||"-"},sortable:!0},{name:e("ticket_creation_date"),cell:function(e){return e.creationDate?(0,y.$d)(e.creationDate):"-"},sortable:!0,width:"160px"},{name:e("ticket_exit_date"),cell:function(e){return e.exitDate?(0,y.$d)(e.exitDate):"-"},sortable:!0,width:"160px"}]),Q=function(e,t,n,i,r){return(0,T.jsxs)("div",{className:x().filterRow,children:[(0,T.jsx)("span",{className:x().filterTitle,children:e}),(0,T.jsx)("div",{className:x().chipsRow,children:t.map((function(e){var t=n.includes(e.id);return(0,T.jsx)("button",{type:"button",className:"".concat(x().chip," ").concat(t?x().chipActive:""),onClick:function(){return function(e,t,n){t(e.includes(n)?e.filter((function(e){return e!==n})):[].concat((0,a.Z)(e),[n]))}(n,i,e.id)},children:e[r]},e.id)}))})]})},U=f.length+D.length+j.length+C.length+Z.length+(E?1:0)+(O?1:0)+(i.trim()?1:0);return(0,T.jsx)(p.Z,{title:"Empatiza - ".concat(e("tickets")),children:(0,T.jsxs)("div",{className:x().container,children:[(0,T.jsx)("h1",{className:x().titulo,children:e("tickets")}),(0,T.jsxs)("div",{className:x().filtersBox,children:[(0,T.jsxs)("div",{className:x().topBar,children:[(0,T.jsx)("div",{className:x().searchWra
1p,children:(0,T.jsx)(k.Z,{onChange:r})}),(0,T.jsxs)("div",{className:x().dateWrap,children:[(0,T.jsx)("input",{type:"date",className:x().dateInput,placeholder:e("ticket_from_date"),title:e("ticket_from_date"),value:E,onChange:function(e){return A(e.target.value)}}),(0,T.jsx)("span",{className:x().dateSep,children:"\u2014"}),(0,T.jsx)("input",{type:"date",className:x().dateInput,placeholder:e("ticket_to_date"),title:e("ticket_to_date"),value:O,onChange:function(e){return L(e.target.value)}})]}),(0,T.jsxs)("button",{type:"button",className:x().clearBtn,onClick:function(){r(""),b([]),I([]),N([]),P([]),R([]),A(""),L("")},disabled:0===U,children:[e("clear_filters"),U>0?" (".concat(U,")"):""]})]}),(null===W||void 0===W?void 0:W.ticketStatuses)&&Q(e("ticket_status"),W.ticketStatuses,f,b,"label"),(null===W||void 0===W?void 0:W.ticketPriorities)&&Q(e("ticket_priority"),W.ticketPriorities,D,I,"label"),(null===W||void 0===W?void 0:W.ticketTypes)&&Q(e("ticket_type"),W.ticketTypes,j,N,"label")]}),(q||$)&&(0,T.jsx)("div",{className:x().loadingWrap,children:(0,T.jsx)(g.Z,{})}),(0,T.jsx)(s.ZP,{columns:z,data:X,conditionalRowStyles:[{when:function(e){return e.merged},style:{backgroundColor:"#fff4dc",color:"#7a5a00"}}],pagination:!0,paginationPerPage:20,paginationRowsPerPageOptions:[10,20,50,100],noDataComponent:(0,T.jsx)("div",{className:x().noData,children:e("no_tickets")}
1),onRowClicked:function(e,n){n.stopPropagation(),n.ctrlKey?window.open("/tickets/".concat(e.ticketID),"_blank"):t.push("/tickets/".concat(e.ticketID))},highlightOnHover:!0,pointerOnHover:!0})]})})};S.requireAuth=!0;var D=S},21445:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/tickets",function(){return n(93372)}])},98533:function(e){e.exports={inputtext:"InputSearch_inputtext__lmHku",bordersearch:"InputSearch_bordersearch__72CPt",iconsearch:"InputSearch_iconsearch__SnPyM",inputsearch:"InputSearch_inputsearch__lvf29"}},47045:function(e){e.exports={container:"LoadingSpinner_container__htbli","lds-ring":"LoadingSpinner_lds-ring__0BEvr"}},74575:function(e){e.exports={container:"Tickets_container___oDjF",titulo:"Tickets_titulo__y88ss",subtitle:"Tickets_subtitle__ueHtv",filtersBox:"Tickets_filtersBox__Van4x",topBar:"Tickets_topBar__6fKM7",searchWrap:"Tickets_searchWrap__8YlOw",dateWrap:"Tickets_dateWrap__OMoQB",dateSep:"Tickets_dateSep__eCpD4",filterRow:"Tickets_filterRow__sXDqp",filterTitle:"Tickets_filterTitle__Jcvo5",chipsRow:"Tickets_chipsRow__akEvK",chip:"Tickets_chip__yej4C",chipActive:"Tickets_chipActive__hIBxK",dateInput:"Tickets_dateInput__ZLRPw",clearBtn:"Tickets_clearBtn__Hb_wL",ellipsis:"Tickets_ellipsis__r5QIV",noData:"Tickets_noData___I7Zw",loadingWrap:"Tickets_loadingWrap__lhEMB",error:"Tickets_error__ujRRj",backLink:"Tickets_backLink__KVa3h",detailHeader:"Tickets_detailHeader__76Ekt",metaGrid:"Tickets_metaGrid__3cbea",metaItem:"Tickets_metaItem__BbkoZ",metaLabel:"Tickets_metaLabel__YYc9_",metaValue:"Tickets_metaValue__apGxB",descriptionBlock:"Tickets_descriptionBlock__hwMmu",conversationBlock:"Tickets_conversationBlock__MwhDH",descriptionHtml:"Tickets_descriptionHtml__0th2t",responseCard:"Tickets_responseCard___tbm5",responseHeader:"Tickets_responseHeader__T1rXL",responseIcon:"Tickets_responseIcon__00z14",responseDate:"Tickets_responseDate__J8797",responseRecipients:"Tickets_responseRecipients__tdMOZ",responseBody:"Tickets_responseBody__DwIFF",titleCell:"Tickets_titleCell__s6Uj6",mergedBadge:"Tickets_mergedBadge__L6POe",mergedBanner:"Tickets_mergedBanner__R7Zhu"}},27812:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var i=n(52587);var r=n(2937);function a(e){return function(e){if(Array.isArray(e))return(0,i.Z)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,r.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}}},function(e){e.O(0,[44,774,888,179],(function(){return t=21445,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.