feat(privacy): complete the publication, hiding and preview settings screen

This commit is contained in:
shira committed 2026-10-09 12:47:26 +03:00
1 parent c2a8d17195
commit 5edff21d2d
28 files changed
+2230 -428

No files matched your search

+12 -1
View File
@@ -81,7 +81,18 @@ On the attempt screen only the phrase "Result received" is a live message; the r
## Privacy settings
`/candidate/privacy` currently shows consent management and a link to request manual assessment. Publication, search status, hidden organizations, preview, and history are available through the backend API, but a dedicated UI for these settings is not implemented. The employer candidate directory is also a placeholder; the server-side anonymous-card read API does not imply that this screen exists.
`pages/privacy` (`/candidate/privacy`) shows separate visibility settings. No action enables another: consent, publication, search status, and hiding an organization are saved by their own requests, each with its own version and its own saving state.
- Consents (`features/consent-management`): C1-C5 are granted and revoked separately, with the text and version shown before a grant. The block of each purpose has an anchor that the "Go to the C2 consent" button moves focus to.
- Publication (`features/profile-visibility`): step 1 shows whether C2 is active from the complete active consent history; an unknown or partly loaded state is not treated as consent, and saving stays unavailable. The step button only moves focus to the C2 block and grants nothing. The card state and fields are chosen next, and the publication is saved by a separate action (`SetMyPublication`, `expected_version` in the body). A 412 conflict keeps the draft on screen and offers an explicit reload of the current settings; a failed save does not reset the draft. Revoking C2 closes the card, and a new C2 does not reopen it.
- Closure explanation: from `closed_reason` the screen says that future reads are closed at once, that a new C2 does not reopen the card by itself, and that a former company needs a new invitation and a new C4 to read contacts. The same words appear after revoking C2, hiding an organization, unhiding it, and republishing: an earlier contact access is not restored. Hiding does not change the C4 record in the consent ledger, so next to the C4 of a hidden company a note says that the record does not bring contact access back.
- Search status (`SetMySearchStatus`) is its own request and its own text. It does not change the publication and grants no consent.
- Employer preview (`EmployerCardPreview` from `entities/candidate-view`) is built only from the `GET /me/privacy/preview` response. The preview alias is separate from organization aliases. Confirmed categories and self-assessment are shown apart; each specialization has its own "Grade confirmed" or "Grade not confirmed" status (the Russian labels are "Грейд подтвержден" and "Грейд не подтвержден"), told apart by the shape of the mark and by text, not by color. A candidate without a confirmed grade sees the declared level (or "Level not specified") and the not-confirmed status for each specialization separately; a confirmed Backend is not carried over to a network specialization. The evidence block shows the skill, grade, confirmation level, year, basis, and calibration as the server returned them (`synthetic_demo` and `uncalibrated` are shown as a synthetic demonstration, not a validated measurement, and as thresholds that are not calibrated). A closed card is shown as an empty state. The preview creates no access record and ignores organization filters.
- Hiding organizations: the hide button is offered only for organizations in the candidate's own access history (the server answers 404 for the rest), and only after the list of hidden organizations is fully loaded. Unhiding does not restore contact access.
- Histories: the settings history and the card access history are paginated; a partial page is never presented as complete. An access record shows the kind of access, the time, and the organization when the server names it (otherwise "Organization is not disclosed"); it carries no employees, queries, filters, or search position. An empty history and a load error are separate states.
- A link to request a manual assessment stays below.
An employer reading the card and the employer candidate directory remain placeholders: the server-side anonymous-card read API does not imply that such a screen exists, so the effect of hiding on a particular employer cannot be checked in a browser.
## Company profile