Skip to content

feat(jobs): list can filter by organization - #32

Merged
thinkclay merged 1 commit into
mainfrom
feat/jobs-list-by-organization
Sep 23, 2026
Merged

thinkclay merged 1 commit into
mainfrom
feat/jobs-list-by-organization

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Found while reskinning the employer profile a worker sees (Scaffald/SaaS#828), which needs that employer's open roles.

GET /v1/jobs has accepted organizationId since the public listing was built, and the handler applies it (packages/supabase/functions/api/routes/jobs.ts:295). The parameter was simply missing from JobListParams, so a caller wanting one employer's open roles had to fetch every published job and filter client-side.

list() already spreads params into the query string, so this is the type catching up with the endpoint — no request change.

778 tests pass, including a new one asserting the filter is accepted.

🤖 Generated with Claude Code

`GET /v1/jobs` has accepted `organizationId` since the public listing was
built, and the handler applies it (`routes/jobs.ts:295`). The parameter was
simply missing from `JobListParams`, so a caller wanting one employer's open
roles had to fetch every published job and filter client-side.

The request already spreads `params` into the query string, so this is the
type catching up with the endpoint. 778 tests pass.

Co-Authored-By: Claude Opus 5 <[email protected]>
@thinkclay
thinkclay merged commit 084e770 into main Sep 23, 2026
@thinkclay
thinkclay deleted the feat/jobs-list-by-organization branch September 23, 2026 17:41
thinkclay added a commit to Scaffald/SaaS that referenced this pull request Sep 23, 2026
#887)

The screen a worker opens to decide whether to apply to an employer led with
the organisation's name in a card, beside a Back button the breadcrumb
already provides. Under it: four labelled blocks — Industry, About,
Location, Website, each a heading and one line — and then "Created:
3/14/2024", which answers a question nobody asked. The sidebar said "Stay
Connected", explained both actions above the buttons and explained them
again below, and repeated the organisation's name in green next to a tick,
which reads as a verification badge it never was.

What the screen never showed is the only thing a worker comes here for: what
this employer is hiring.

## Change

Open roles are rows on hairlines — title, location and schedule, and a link
to the posting. When there are none the screen says so and points at
following, rather than leaving the block out and saying nothing.

The identity moves to the shared `ScreenHeader`: kicker = trade · location,
title = the organisation's name. About keeps its heading and drops the rest;
the sidebar keeps Follow and "I work here" with one line of explanation
instead of two paragraphs.

`usePublishedJobs` gained an `organizationId` passthrough. The endpoint has
always filtered on it (`routes/jobs.ts:295`) but the SDK type did not say
so, so a caller wanting one employer's roles had to fetch every published
job and filter client-side — fixed in Scaffald/sdk#32, pointer bumped here.

## Verification

scf-core 1175/1175, lint and both typechecks clean. The endpoint pair was
exercised directly: `GET /v1/employers/<id>` and `GET
/v1/jobs?status=published&organizationId=<id>` both return 200 with the
expected rows.

The rendered populated state could NOT be checked in the browser: every SDK
request in this environment currently goes out with the anon key and no
Authorization header, so the screen renders its signed-out path. That is
#883, it affects every SDK-backed screen, and it is not caused by this
change — the same code sent the token earlier in the same session. The
layout, headings and 1440/390 behaviour were checked on the paths that do
render.

Co-authored-by: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant