PageSourceSearch

https://vizops360.ai/assets/useFinanceApprovers-CPJ_P1-k.js

js vizops360.ai collected 2026-10-05 13:50:36 UTC 2,757 bytes, 1 lines download raw bytes

1import{dJ as h,di as R,r as T}from"./index-CpeGhXo5.js";function v(){const{data:o}=h(),{data:n}=R({limit:1e3,status:"Active"});return T.useMemo(()=>{const A=[],C=new Set,d=(e,i,c,s,a)=>{const r=(s||i||e).toLowerCase().trim();!r||C.has(r)||(C.add(r),A.push({value:e,label:i,sub:c,id:s,role:a}))};d("Pawandeep Kaur Grewal (CFO)","Pawandeep Kaur Grewal","Chief Financial Officer (CFO) • Head of Finance & Statutory Controller","pawandeep-cfo","FINANCE_HEAD"),d("Sarbjit Singh Grewal (CEO)","Sarbjit Singh Grewal","Chief Executive Officer (CEO) • Board Member & Corporate Sign-off","sarbjit-ceo","EXECUTIVE_BOARD"),d("Gurcharan Singh Kang (COO)","Gurcharan Singh Kang","Chief Operating Officer (COO) • Board Member & Operations Governance","gurcharan-coo","EXECUTIVE_BOARD");let E={};try{const e=localStorage.getItem("finance_team_assigned_roles");e&&(E=JSON.parse(e))}catch{}const N=Array.isArray(o)?o:o?.data||o?.items||[],f={FINANCE_HEAD:"CFO · Head of Finance",EXECUTIVE_BOARD:"Executive Board Member",ACCOUNTANT:"Senior Accountant · Approver",FINANCE_MANAGER:"Finance Manager · Approver",ACCOUNTS:"Accounts Lead · Approver",TREASURY:"Treasury Head · Approver",AUDIT:"Audit Lead · Sign-off",CASHIER:"Cashier Desk"};return(n?.items&&Array.isArray(n.items)?n.items:Array.isArray(n)?n:[]).forEach(e=>{const i=String(e.status||"").toLowerCase().trim();if(i&&i!=="active")return;const c=String(e.id||e._id||e.empCode||""),s=`${e.firstName||""} ${e.lastName||""}`.trim()||e.name||"";if(!s)return;const a=String(e.designation||e.jobTitle||e.role||""),r=String(e.departmentName||e.department?.name||"").toLowerCase(),p=E[c],g=N.find(l=>String(l?.userId||l?.id)===c),t=(p||g?.role||"").toUpperCase();if(/it\s*&|production|engineer|tech|mern|qa|quality|developer|support|marketing|sales/i.test(r)&&!t)return;const O=r.includes("finance")||r.includes("accounts"),u=String(e.teamName||Array.isArray(e.teams)&&e.teams[0]?.teamName||"").toLowerCase(),S=u.includes("finance")||u.includes("fin ops")||u.includes("account"),m=a.toLowerCase().includes("finance")||a.toLowerCase().includes("account")||a.toLowerCase().includes("cfo")||a.toLowerCase().includes("controller")||a.toLowerCase().includes("treasury")||a.toLowerCase().includes("audit"),w=t==="FINANCE_HEAD"||t==="EXECUTIVE_BOARD"||t==="ACCOUNTANT"||t==="FINANCE_MANAGER"||t==="ACCOUNTS"||t==="TREASURY"||t==="AUDIT";if(!(t==="FINANCE_ASSISTANT"||t==="CASHIER"||t==="NONE")&&(w||(O||S||m)&&(a.toLowerCase().includes("manager")||a.toLowerCase().includes("head")||a.toLowerCase().includes("lead")||a.toLowerCase().includes("director")))){const l=`${s} (${a||"Finance Lead"})`,F=t&&f[t]?f[t]:a||"Finance Approver";d(l,s,`${a||"Finance Authority"} • ${F}`,c,t||"FINANCE_TEAM")}}),A},[n,o])}export{v as u};

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.