PageSourceSearch

https://aidealer360.com/assets/acquireUserScope-DsE4qcxi.js

js aidealer360.com collected 2026-10-01 15:57:41 UTC 1,961 bytes, 1 lines download raw bytes

1import{s as a}from"./index-BZo64Z7H.js";import"./ui-vendor-B12AOeKi.js";import"./react-vendor-DZt7wVAJ.js";import"./charts-vendor-B6q1L48j.js";import"./supabase-vendor-dOy44Gxq.js";import"./animation-vendor-BAVy02gd.js";async function k(s,t){const{data:c}=await a.from("user_dealership_access").select("user_id").eq("dealership_id",s),_=new Set((c||[]).map(r=>r.user_id).filter(Boolean));let i=a.from("registration_users").select("id, default_dealership_id, organization_id, is_active").eq("is_active",!0);t&&(i=i.eq("organization_id",t));const{data:l,error:o}=await i;if(o)throw o;return(l||[]).filter(r=>r.default_dealership_id===s||_.has(r.id)).map(r=>r.id)}async function v(s,t){const{data:c,error:_}=await a.from("registration_user_app_access").select("user_id, app_name").ilike("app_name","acquire%");if(_)throw _;const i=new Set((c||[]).map(e=>e.user_id).filter(Boolean)),{data:l,error:o}=await a.from("job_role_default_apps").select("job_role_id, app_name").ilike("app_name","acquire%");if(o)throw o;const r=Array.from(new Set((l||[]).map(e=>e.job_role_id).filter(Boolean)));if(r.length>0){const{data:e,error:p}=await a.from("user_job_roles").select("user_id, job_role_id").in("job_role_id",r);if(p)throw p;(e||[]).forEach(d=>{d.user_id&&i.add(d.user_id)});const{data:q,error:u}=await a.from("registration_users").select("id, job_role_id").in("job_role_id",r);if(u)throw u;(q||[]).forEach(d=>{d.id&&i.add(d.id)})}if(i.size===0)return[];const{data:m}=await a.from("user_dealership_access").select("user_id").eq("dealership_id",s),h=new Set((m||[]).map(e=>e.user_id).filter(Boolean));let n=a.from("registration_users").select("id, default_dealership_id, organization_id, is_active").in("id",Array.from(i)).eq("is_active",!0);t&&(n=n.eq("organization_id",t));const{data:w,error:f}=await n;if(f)throw f;return(w||[]).filter(e=>e.default_dealership_id===s||h.has(e.id)).map(e=>e.id)}export{v as fetchAcquireUserIdsForDealership,k as fetchDealershipUserIds};

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.