createCrudStore captures the places store's pattern and now backs places, job applications and job references. JobApplications.vue no longer calls gql() itself and is split into the applications table, the references table and the add form, with the status vocabulary in jobStatus.js. api.js is a thin REST client that turns failures into an ApiError carrying the backend's message; the admin views and Listening.vue use it in place of raw axios and fetch. The router guard waited on the home query's loaded flag, which is never set when that query fails, so /admin and /cv/jobs could hang. It now awaits a standalone me query owned by the auth store, and homeData gains a settled flag for widgets that only need to know the fetch finished. The Vite proxy targets are configurable through VITE_PROXY_*, and build:js runs the Vite build without wasm-pack. Co-Authored-By: Claude Opus 5.5 <[email protected]>
32 lines
1.4 KiB
JavaScript
32 lines
1.4 KiB
JavaScript
/**
|
|
* The job-application status vocabulary, as the tracker at /cv/jobs shows it.
|
|
*
|
|
* This is a COPY. The source of truth is server-side: `enum JobStatus` in
|
|
* backend/graph/schema/job_application.graphql, ranked by `statusOrder` in
|
|
* backend/services/email_sync.go (the email pipeline only ever moves a row
|
|
* forward through that order). The server rejects any value outside the enum,
|
|
* so a status added here alone cannot be saved — add it there first.
|
|
*
|
|
* There is a third copy in vue/public/job-capture.user.js (STATUS_LABELS). A
|
|
* userscript is a single file installed into the browser and cannot import
|
|
* modules, so it has to be kept in step by hand.
|
|
*
|
|
* Values are the lowercase keys that go over the wire; labels are display-only.
|
|
*/
|
|
|
|
export const STATUS_OPTIONS = [
|
|
// Captured from the browser but not applied to yet. No email produces it.
|
|
{ value: "saved", label: "Saved" },
|
|
{ value: "applied", label: "Applied" },
|
|
{ value: "screening", label: "Screening" },
|
|
{ value: "assessment", label: "Assessment" },
|
|
{ value: "interviewing", label: "Interviewing" },
|
|
{ value: "offer", label: "Offer" },
|
|
{ value: "rejected", label: "Rejected" },
|
|
{ value: "withdrawn", label: "Withdrawn" },
|
|
];
|
|
|
|
// Statuses still in play — used to decide whether a row is worth chasing.
|
|
// "saved" is absent on purpose: nobody owes a reply on a job not applied to.
|
|
export const OPEN_STATUSES = ["applied", "screening", "assessment", "interviewing"];
|