1(this["webpackJsonp@betrybe/student-journey-web"]=this["webpackJsonp@betrybe/student-journey-web"]||[]).push([[22],{1192:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a(12),c=a(39),o=a(13),d=a(63);var l=async function(e){try{const t=await o.apiGatewayClient.get("/api/student_success/external/v1/crawler_jobs",{params:e});return{data:null===t||void 0===t?void 0:t.data,totalCount:null===t||void 0===t?void 0:t.headers["x-total-count"]}}catch(t){return d.c(t),t}},i=a(312),s=a(62),u=a(140);var b=Object(u.styled)("div",{marginTop:"$spacing2xl",display:"flex",justifyContent:"space-between",alignItems:"flex-end",width:"70%"});Object(u.styled)("div",{width:"50%"});var j=Object(u.styled)("div",{width:"50%",borderStyle:"none",borderBottomStyle:"solid",borderBottomWidth:"$borderWidthMedium",borderBottomColor:"$borderColorPrimary"});var O=Object(u.styled)(r.AdaButton,{color:"$textColorSecondary"}),y=a(1);var h=function(e){const{handleClearFilters:t,setCompanyFilter:a,setStatusFilter:n}=e;let c;return Object(y.jsxs)(b,{children:[Object(y.jsx)(j,{children:Object(y.jsx)(r.AdaTextInput,{type:"text",onChange:e=>{let{target:{value:t}}=e;!function(e){clearTimeout(c),c=setTimeout((()=>a(e)),1e3)}(t)},placeholder:"Empresas",variant:"unstyled"})}),Object(y.jsx)(r.AdaSelectSearch,{onChange:e=>n((null===e||void 0===e?void 0:e.value)||""),options:[{label:"Aprovada",value:"approved"},{label:"Rejeitada",value:"not_approved"},{label:"Pendente",value:"pending"}]}),Object(y.jsx)(O,{kind:"ghost",onClick:t,children:"Limpar filtros"})]})},f=a(1225),v=a(1300),p=a(14);var g=Object(p.b)("a",{all:"unset",cursor:"pointer",variants:{isDisabled:{true:{pointerEvents:"none",cursor:"not-allowed",color:"$textColorDisabled","&:hover, &:focus, &:active":{cursor:"not-allowed",color:"$textColorDisabled"}}}}});var m=Object(p.b)("div",{margin:"$spacingLg 0"});var x=function(e,t,a){return e.map((e=>{const n=Object(y.jsx)(g,{href:e.job_url,target:"_blank",children:Object(y.jsx)(r.AdaIcon,{name:"external_link"})}),c=Object(y.jsx)(g,{isDisabled:"approved"===e.status,href:`/backoffice/cadastro-vagas?jobCrawlerId=${e.id}`,children:Object(y.jsx)(r.AdaIcon,{name:"edit"})}),o=Object(y.jsx)(v.a,{icon:!0,jobCrawlerId:e.id});return{id:e.id,title:e.title,company:e.company,date:f.a.dayMonthYear(e.inserted_at),vacancy:n,...t&&{edit:c},...a&&{reject:o}}}))};var M=Object(p.b)("td",{padding:"$spacingMd 0","&:first-child":{paddingLeft:"$spacingMd"}});var C=Object(p.b)("th",{height:"$spacing2xl",backgroundColor:"$surfaceDisabled",textAlign:"left",font:"$bodyBold",color:"$textColorPrimary",padding:"$spacingMd 0","&:first-child":{paddingLeft:"$spacingMd"}});var w=Object(p.b)("tr",{"&:nth-child(odd)":{backgroundColor:"$backgroundPrimary"},"&:hover":{backgroundColor:"$surfaceDefaultHovered"},variants:{"table-hoverable":{true:{cursor:"pointer"}}}});var k=Object(p.b)("table",{width:"100%"});var A=function(e){const{data:t,labels:a,onRowClick:n,keyExtractor:c,isLoading:o}=e,d=!!n,l=Object.keys(a);return Array.isArray(t)&&(null===t||void 0===t?void 0:t.length)||o?o?Object(y.jsx)(r.AdaLoading,{block:!0}):Object(y.jsxs)(k,{children:[Object(y.jsx)("thead",{children:Object(y.jsx)("tr",{children:l.map((e=>Object(y.jsx)(C,{children:Object(y.jsx)("span",{children:a[e]})},`${e}`)))})}),Object(y.jsx)("tbody",{children:null===t||void 0===t?void 0:t.map(((e,t)=>{const r=Object.keys(a),o=c(e);return Object(y.jsx)(w,{"table-hoverable":d,onClick:()=>null===n||void 0===n?void 0:n(o),children:r.map((t=>{const a=e[t];return Object(y.jsx)(M,{children:a},t)}))},`${o}-${t}`)}))})]}):Object(y.jsx)(r.AdaEmptyState,{kind:"illustration",children:"N\xe3o h\xe1 informa\xe7\xf5es para visualizar"})};var T=function(e){const{crawlerJobs:t,isLoading:a,status:n}=e,c="approved"!==n,o="pending"===n,d={title:"T\xedtulo da vaga",company:"Empresa",date:"Data",vacancy:"Vaga",...c&&{edit:"Editar"},...o&&{reject:"Rejeitar"}},l=x(t,c,o),i=a&&!!t.length;return Object(y.jsx)(y.Fragment,{children:Object(y.jsxs)(m,{id:"teste",children:[Object(y.jsx)(A,{data:l,labels:d,keyExtractor:e=>e.id,isLoading:!t.length}),i&&Object(y.jsx)(r.AdaLoading,{block:!0})]})})};Object(p.b)("div",{width:"100%",marginTop:"$spacing10xl",display:"flex",justifyContent:"center",alignItems:"center"});var D=Object(p.b)("h1",{marginTop:"$spacing2xl",font:"$headingLgBold"});t.default=function(){const{BACKOFFICE_PATH:e,BACKOFFICE_JOB_LIST_PATH:t}=Object(c.useRoutePaths)(),[a,o]=Object(n.useState)([]),[d,u]=Object(n.useState)(!0),[b,j]=Object(s.b)(),[O,f]=Object(n.useState)(1),[v,p]=Object(n.useState)(0),{isEndOfScroll:g}=Object(s.i)(),m=Object(n.useCallback)((()=>{o([]),f(1)}),[o]),x=Object(n.useCallback)((()=>{m(),j({type:i.a.CLEAR_FILTERS})}),[j]),M=Object(n.useCallback)((e=>{m(),j({type:i.a.SET_COMPANY_FILTER,value:e})}),[j]),C=Object(n.useCallback)((e=>{m(),j({type:i.a.SET_STATUS_FILTER,value:e})}),[j]),w=Object(n.useCallback)((async e=>{const t=await l(e);return Array.isArray(null===t||void 0===t?void 0:t.data)&&o((e=>[...e,...null===t||void 0===t?void 0:t.data])),v!==(null===t||void 0===t?void 0:t.totalCount)&&p(null===t||void 0===t?void 0:t.totalCount),u(!1)}),[v]);return Object(n.useEffect)((()=>{const e=Math.ceil(v/30);!d&&e>O&&g&&f(O+1)}),[g]),Object(n.useEffect)((()=>{u(!0),setTimeout((()=>{w({...b,per_page:30,page:O})}),1500)}),[b,O]),Object(y.jsxs)(y.Fragment,{children:[Object(y.jsxs)(r.AdaBreadcrumb,{children:[Object(y.jsx)(r.AdaBreadcrumb.Item,{href:e,children:"In\xedcio"}),Object(y.jsx)(r.AdaBreadcrumb.Item,{href:t,children:"Vagas Cadastradas"}),Object(y.jsx)(r.AdaBreadcrumb.Item,{children:"Vagas Pendentes"})]}),Object(y.jsx)(D,{children:"Vagas pendentes"}),Object(y.jsx)(h,{handleClearFilters:x,setStatusFilter:C,setCompanyFilter:M}),Object(y.jsx)(T,{crawlerJobs:a,isLoading:d,status:b.status})]})}},1225:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"b",(function(){return s})),a.d(t,"d",(function(){return b})),a.d(t,"c",(function(){return h}));var n=a(245),r=a(244),c=a(318),o=a(499);var d={dayMonth:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?Object(n.default)(Object(c.default)(e),"dd/MM",{locale:o.a}):Object(n.default)(new Date(e),"dd/MM",{locale:o.a})},dayMonthYear:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?Object(n.default)(new Date(e),"dd/MM/yyyy",{locale:o.a}):Object(n.default)(Object(c.default)(e),"dd/MM/yyyy",{locale:o.a})},dayMonthYearDashed:function(e){return Object(n.default)(Object(c.default)(e),"dd-MM-yyyy",{locale:o.a})},dayMonYear:function(e){return Object(n.default)(Object(c.default)(e),"dd MMM yy",{locale:o.a})},hour:function(e){return Object(n.default)(new Date(e),"k:mm'h'",{locale:o.a})},hourMinute:function(e){return Object(n.default)(Object(r.default)(e,"k:mm:ss",new Date),"k:mm")},monthName:function(e){return Object(n.default)(new Date(e),"MMMM",{locale:o.a})},monthNameDayYear:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?Object(n.default)(Object(c.default)(e),"dd 'de' MMMM 'de' yyyy",{locale:o.a}):Object(n.default)(new Date(e),"dd 'de' MMMM 'de' yyyy",{locale:o.a})},monthNameYear:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?Object(n.default)(Object(c.default)(e),"MMMM 'de' yyyy",{locale:o.a}):Object(n.default)(new Date(e),"MMMM 'de' yyyy",{locale:o.a})},monthNumber:function(e){return new Date(e).getMonth()+1},monthYear:function(e){return Object(n.default)(Object(c.default)(e),"MMM'/'yyyy",{locale:o.a})},yearMonth:function(e){return Object(n.default)(new Date(e),"yyyy-MM",{locale:o.a})},yearMonthDay:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?Object(n.default)(Object(c.default)(e),"yyyy-MM-dd",{locale:o.a}):Object(n.default)(new Date(e),"yyyy-MM-dd",{locale:o.a})},yearNumber:function(e){return Object(n.default)(new Date(e),"yyyy",{locale:o.a})}};a(389);var l=a(388),i=a(246);var s={month:function(e){return Object(l.a)(new Date(e))+1},lastMonthName:function(){return d.monthName(Object(i.a)(new Date,1))},lastMonthYear:function(){return d.yearNumber(Object(i.a)(new Date,1))}},u=a(390);var b={isOlderThanToday:function(e){if(!e)return!1;const t=new Date,a=Object(c.default)(e);return Object(u.a)(a,t)}},j=a(151);a(191);a(124);a(59);var O=a(152),y=a(387);var h=Object(y.a)((()=>new Date),(e=>Object(O.default)(e,{months:1})),(e=>Object(j.a)(e)),(e=>Object(n.default)(e,"yyyy-MM-dd HH:mm:ss")))},1300:function(e,t,a){"use strict";var n=a(12),r=a(13),c=a(63);var o=async function(e,t){const a=`/api/student_success/external/v1/crawler_jobs/${e}/reprove_crawler_job`;try{const e=await r.apiGatewayClient.put(a,{justification:t});return null===e||void 0===e?void 0:e.data}catch(n){return c.c(n),n}},d=a(46),l=a(39),i=a(0),s=a(1);t.a=function(e){const{jobCrawlerId:t,icon:a=!1}=e,[r,{setTrue:u,setFalse:b}]=Object(n.useBoolean)(!1),[j,O]=Object(i.useState)(""),y=Object(d.k)(),{BACKOFFICE_JOB_CRAWLER_PATH:h}=Object(l.useRoutePaths)();return Object(s.jsxs)(s.Fragment,{children:[a?Object(s.jsx)(n.AdaButton,{icon:"delete",kind:"ghost",onClick:u}):Object(s.jsx)(n.AdaButton,{kind:"secondary",onClick:u,children:"Rejeitar vaga"}),Object(s.jsxs)(n.AdaModal,{isOpen:r,size:"lg",onClose:b,children:[Object(s.jsx)(n.AdaModal.Header,{title:"Rejeitar vaga"}),Object(s.jsx)(n.AdaModal.Content,{children:Object(s.jsx)(n.AdaTextareaInput,{label:"Qual motivo voc\xea deseja rejeitar essa vaga?",description:"Sua resposta n\xf3s ajudar\xe1 a trazer vagas mais qualificadas.",error:!j&&"Campo n\xe3o pode ficar vazio",required:!0,onChange:e=>O(e.target.value)})}),Object(s.jsxs)(n.AdaModal.Footer,{children:[Object(s.jsx)(n.AdaButton,{kind:"secondary",onClick:b,children:"Cancelar"}),Object(s.jsx)(n.AdaButton,{kind:"primary",onClick:async()=>{const e=Object(s.jsxs)(s.Fragment,{children:[Object(s.jsx)(n.ToastTitle,{children:"Vaga rejeitada"}
1),Object(s.jsx)(n.ToastDescription,{children:"Voc\xea poder\xe1 retornar a editar essa vaga filtrando por vagas rejeitadas"})]}),a=Object(s.jsxs)(s.Fragment,{children:[Object(s.jsx)(n.ToastTitle,{children:"Erro !"}),Object(s.jsx)(n.ToastDescription,{children:"Erro ocorreu ao rejeitar a vaga! Tente novamente."})]});try{await o(t,j),window.location.pathname===h&&window.location.reload(),y.push(h)}catch(r){n.toast.error(a),c.c(r)}finally{n.toast.success(e)}},disabled:!j,children:"Confirmar"})]})]})]})}}}]);
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.