PageSourceSearch

https://myelite.app/assets/useCoachMemberNotes-B6OEBceX.js

js myelite.app collected 2026-10-09 22:02:49 UTC 1,308 bytes, 1 lines download raw bytes

1import{a as u,b as m,u as h}from"./vendor-query-MRsttINt.js";import{aF as a,at as i}from"./index-CQjtNSF2.js";const n="coach_member_notes";function _(r){return h({queryKey:["coach-member-notes",r],enabled:!!r,queryFn:async()=>{const{data:e,error:t}=await i.from(n).select("*").eq("client_id",r).order("is_archived",{ascending:!0}).order("created_at",{ascending:!1});if(t)throw t;return e??[]}})}function b(){const r=u();return m({mutationFn:async e=>{const{data:t}=await i.auth.getUser(),s=t?.user;if(!s)throw new Error("Not authenticated");const o={client_id:e.client_id,coach_id:s.id,body:e.body.trim(),title:e.title?.trim()||null,tag:e.tag??"general"};e.expires_at&&(o.expires_at=e.expires_at);const{data:d,error:c}=await i.from(n).insert(o).select().single();if(c)throw c;return d},onSuccess:e=>{r.invalidateQueries({queryKey:["coach-member-notes",e.client_id]}),a.success("Dispatch saved · the AI editor will consider it")},onError:e=>a.error(e.message)})}function w(){const r=u();return m({mutationFn:async e=>{const{data:t,error:s}=await i.from(n).update({is_archived:!0}).eq("id",e).select().single();if(s)throw s;return t},onSuccess:e=>{r.invalidateQueries({queryKey:["coach-member-notes",e.client_id]}),a.success("Dispatch archived")},onError:e=>a.error(e.message)})}export{_ as a,w as b,b 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.