PageSourceSearch

https://www.ugclatam.io/assets/AdminJobsReview-nAWe5Fl7.js

js ugclatam.io collected 2026-10-09 22:15:13 UTC 8,641 bytes, 1 lines download raw bytes

1import{r as C,j as e}from"./vendor-react-6xTvdO_J.js";import{u as E}from"./useJobSheetParam-9xE-u-pq.js";import{E as k,c as R,k as P,J as _,A as B}from"./AdminJobDetailSheet-DUe7mVu8.js";import{J as M}from"./JobStatusChip-CW4fqhIc.js";import{J as T}from"./JobCompensation-BtbVYdeT.js";import{B as l}from"./main-D5ri0Ynh.js";import{C as L,a as q}from"./card-QpfdgFEv.js";import{S as z}from"./skeleton-aqQuKdkP.js";import{B as D}from"./badge-BvbKQH0I.js";import{J as F}from"./JobCodeChip-DmTi8rXL.js";import{C as O}from"./circle-check-DCRPnn4C.js";import"./sheet-Q_eS19k4.js";import"./index-DwXCl4Mr.js";import"./tabs-CY-caXbB.js";import"./index-KgjF_sTB.js";import"./index-D3dWuH_D.js";import"./avatar-BMK0-8uU.js";import"./dropdown-menu-bWqV2jiV.js";import"./chevron-right-_dm9tXb3.js";import"./check-xy3SVE55.js";import"./circle-DucQRToc.js";import"./JobPostingPreview-BP4mM1nx.js";import"./separator-9FgJAJrI.js";import"./dateOnly-Df6BQWdw.js";import"./index-QycLyoaW.js";import"./jobsClient-BUALjCQV.js";import"./jobs-BbSBPiXY.js";import"./languages-QcB2msiv.js";import"./pencil-dNJD4CQa.js";import"./loader-circle-I_mJOXBh.js";import"./table-D9irocaW.js";import"./JobApplicationStatusBadge-Bqw5Xspw.js";import"./formatDistanceToNow-DLxpB735.js";import"./constructNow-D1zA4S8J.js";import"./constructFrom-rJN6zrQ_.js";import"./en-US-D-QVsjrv.js";import"./differenceInCalendarMonths-DdVU3xYm.js";import"./endOfMonth-CoG5-XNs.js";import"./differenceInMilliseconds-BQZ3_WMI.js";import"./CandidateField-5unxebUh.js";import"./textarea-a9Tih0Vp.js";import"./AdminRouteTree-CVjGT_Wd.js";import"./vendor-query-BX-DJEXb.js";import"./TwoFactorVerificationModal-BLT4sk8F.js";import"./dialog-DAENfZzx.js";import"./input-otp-CO6c34F5.js";import"./dot-Cc3HNKmN.js";import"./shield-BH8woweV.js";import"./smartphone-BNTLonaE.js";import"./purify.es-D6gMnemd.js";import"./alert-Bf1fBSaj.js";import"./copy-Dc41Un1Q.js";import"./circle-check-big-FPcRrY9D.js";import"./ProtectedRoute-BYBom8iI.js";import"./lock-lsZEyO-a.js";import"./admin-avatar-DvsTTDuZ.js";import"./vendor-supabase-mMS0W209.js";import"./ugc-latam-logo-BAMukhVS.js";import"./ugc-latam-star-BGoC_SEm.js";import"./usePlatformFeatureFlags-CXsvnLLP.js";import"./chart-column-BSJIQlPs.js";import"./bell-BXo85hWq.js";import"./ticket-check-DCf3JA1V.js";import"./users-gxqDcWmL.js";import"./megaphone-gaKrajCY.js";import"./briefcase-D68B_JCp.js";import"./calendar-days-yydpZUwI.js";import"./handshake-BxS1v7ni.js";import"./target-BYys0GWE.js";import"./book-open-Cm0l9EDE.js";import"./newspaper-BAszH5qj.js";import"./user-plus-D0rNgNqP.js";import"./sparkles-DJ-Q7spp.js";import"./database-DkJE9Pi5.js";import"./graduation-cap-W_455fvU.js";import"./gamepad-2-2WBl2Msu.js";import"./message-circle-CD7lKMgw.js";import"./layout-dashboard-BLASvy3X.js";import"./inbox-DkQaOYwl.js";import"./mail-CjylRSpv.js";import"./file-text-whJ89t2n.js";import"./activity-5w0-affq.js";import"./trending-up-ZQoaJ5bv.js";import"./search-Dxna7MFe.js";import"./message-circle-question-CEKzaERR.js";import"./credit-card-DfwblxKO.js";import"./shield-check-CPLrjIXL.js";import"./circle-user-Dx34F1qa.js";import"./log-out-CHcHRjHd.js";import"./chevron-down-DXg3N9_Z.js";import"./triangle-alert-Bh_fSbsx.js";import"./shield-alert-Bnfj1Uk4.js";import"./RouteProgressBar-4rcQAx9a.js";import"./urls-C_4f7TLp.js";import"./candidate-BRe4YAZ6.js";import"./useApplicationDetail-DMo3DXge.js";import"./logJobsAdminAction-B9u3_kUo.js";import"./external-link-DNsIlIqW.js";import"./download-DsqnnP3I.js";import"./format-D1lenYxr.js";import"./startOfDay-BKq3QRE6.js";import"./arrow-right-DJB0VsLZ.js";import"./input-BcFLp59I.js";import"./label-BxK9krPh.js";import"./switch-21t29BBo.js";import"./index-XE6RSCPc.js";import"./alert-dialog-Vf9tqgJq.js";import"./zod-CbZ5aJ8h.js";import"./select-Ckuph5LO.js";import"./index-BdQq_4o_.js";import"./global-country-select-0haifSvM.js";import"./command-DRyK04Ft.js";import"./countries-DXz67BWL.js";import"./chevrons-up-down-D4ZLyNcU.js";import"./FormPrimitives-BXi5T-wM.js";import"./jobsConfig-kp8r8lx5.js";import"./jobFormSchema-KccAjBKs.js";import"./index-B2jq-SKE.js";import"./slugify-Du5lh9k4.js";import"./plus-tOmunXiu.js";
1import"./trash-2-CqG6D_LW.js";import"./shield-x-DLisH5p_.js";import"./user-round-SXQG-6Pg.js";import"./wallet-cards-xwr8sCsO.js";import"./circle-alert-CWB8tnPz.js";import"./useJobsSettingsData-CGFFAMDw.js";import"./ellipsis-Burz6NyC.js";import"./eye-off-DR61n5S9.js";const U={...k,status:"pending_review",sortKey:"submitted_at",sortAsc:!0},V=r=>r?Math.floor((Date.now()-new Date(r).getTime())/36e5):null,ci=()=>{const[r,h]=C.useState(0),{rows:p,total:a,isLoading:v}=R(U,r),{activeJobId:f,activeTab:J,activeAction:x,openJob:u,closeJob:I}=E(),i=P(p.map(t=>t.id)),S=C.useMemo(()=>{const t=i.byId;return[...p].sort((o,n)=>{var s,m;const d=(((s=t[o.id])==null?void 0:s.brand.jobs.approved)??0)===0?0:1,c=(((m=t[n.id])==null?void 0:m.brand.jobs.approved)??0)===0?0:1;return d-c})},[p,i.byId]),g=Math.max(1,Math.ceil(a/_));return e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:v?"Loading the review queue…":`${a} ${a===1?"job":"jobs"} waiting for review`}),v?e.jsx("div",{className:"space-y-3",children:[0,1,2].map(t=>e.jsx(z,{className:"h-36 w-full"},t))}):p.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-lg border py-16 text-center",children:[e.jsx(O,{className:"h-8 w-8 text-green-600"}),e.jsx("p",{className:"text-sm font-medium",children:"Queue is empty"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Every submitted job has been reviewed."})]}):e.jsx("div",{className:"space-y-3",children:S.map(t=>{var n,d,c,s,m,b,y,j,N,w;const o=V(t.submitted_at);return e.jsx(L,{className:"cursor-pointer transition-shadow hover:shadow-md",onClick:()=>u(t.id),children:e.jsxs(q,{className:"space-y-3 p-4",children:[e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"font-medium",children:t.title}),e.jsx(F,{code:t.job_code}),((n=i.byId[t.id])==null?void 0:n.job.resubmission)&&e.jsx(D,{variant:"secondary",children:"Resubmitted"})]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[t.brand_name_snapshot??((d=i.byId[t.id])==null?void 0:d.brand.name)??"Unknown brand"," · ",((c=t.job_departments)==null?void 0:c.name_en)??"No department"]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(M,{status:t.status}),o!==null&&e.jsxs("span",{className:o>=48?"text-destructive":void 0,children:["Submitted ",o,"h ago"]})]})]}),e.jsxs("div",{className:"text-right text-sm",children:[e.jsx(T,{min:t.comp_min,max:t.comp_max,currency:t.comp_currency,period:t.comp_period,visible:t.comp_visible}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t.country??"Remote / LATAM"})]})]}),e.jsxs("div",{className:"grid gap-2 text-xs text-muted-foreground sm:grid-cols-2 lg:grid-cols-4",children:[e.jsxs("span",{children:["Language: ",((s=i.byId[t.id])==null?void 0:s.job.language.toUpperCase())??"—"]}),e.jsxs("span",{children:["Plan: ",((m=i.byId[t.id])==null?void 0:m.brand.plan.name)??"—"]}),e.jsxs("span",{children:["Submitted by: ",((b=i.byId[t.id])==null?void 0:b.submittedBy.name)??((y=i.byId[t.id])==null?void 0:y.submittedBy.email)??"—"]}),e.jsxs("span",{children:["Domain: ",(N=(j=i.byId[t.id])==null?void 0:j.intake)!=null&&N.verifiedCompanyEmail?"Verified":((w=i.byId[t.id])==null?void 0:w.brand.verificationStatus)??"Unverified"]})]}),e.jsxs("div",{className:"flex flex-wrap justify-end gap-2",onClick:A=>A.stopPropagation(),children:[e.jsx(l,{size:"sm",onClick:()=>u(t.id,{action:"approve"}),children:"Approve"}),e.jsx(l,{size:"sm",variant:"outline",className:"border-destructive text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:()=>u(t.id,{action:"changes_requested"}),children:"Request revisions"})]})]})},t.id)})}),a>_&&e.jsxs("div",{className:"flex items-center justify-end gap-3",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",r+1," of ",g]}),e.jsx(l,{variant:"outline",size:"sm",disabled:r===0,onClick:()=>h(t=>Math.max(0,t-1)),children:"Previous"}),e.jsx(l,{variant:"outline",size:"sm",disabled:r+1>=g,onClick:()=>h(t=>t+1),children:"Next"})]}),e.jsx(B,{jobId:f,open:f!==null,initialTab:J,focusedAction:x==="approve"||x==="changes_requested"?x:null,onOpenChange:t=>!t&&I()})]})};export{ci as AdminJobsReview,ci as default};

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.