chore(autonomous-session): consolidate uncommitted work from prior session
Bundles the prior autonomous-session output that was sitting unstaged: - Em-dash sweep across src/ + tests/ (en-dash/em-dash to hyphen, ~2280 instances) - country-flag-icons rollout (CountryFlag component, replaces emoji glyphs that never rendered on Windows; lazy-loads the 3x2 SVG index as a single chunk after the per-subpath dynamic-import approach silently failed in webpack) - Admin IA Phase 1+2: 7-domain regroup, 41 to 38 pages, /admin/berths index, redirects (ocr to ai, reports to dashboard, invitations to users), docs/admin-ia-proposal.md - Per-template email tester (registry + endpoint + UI on Email admin page) - Cancel-document mode picker (delete-from-Documenso vs keep-for-audit) - Dashboard PDF report: 25 widgets, SVG charts, date-range picker, 11 resolvers - Customize-widgets per-region sortables at xl+ (charts/rails/feed); single flat sortable below xl when the layout stacks; per-viewport saved orders - Audit doc updates capturing each shipped item - Lint fixes: react-compiler immutability in DonutChart (reduce instead of let-reassign), set-state-in-effect disables in CountryFlag and UploadForSigning preview-bytes effect, unused 'confirm' destructures in interest contract + reservation tabs, unescaped apostrophe in test-template card copy
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { describe, it, expect, beforeAll } from 'vitest';
|
||||
|
||||
describe('portal.service — getPortalUserYachts', () => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
describe('portal.service - getPortalUserYachts', () => {
|
||||
let getPortalUserYachts: (clientId: string, portId: string) => Promise<Array<any>>;
|
||||
|
||||
let makeClient: typeof import('../../helpers/factories').makeClient;
|
||||
@@ -87,7 +86,7 @@ describe('portal.service — getPortalUserYachts', () => {
|
||||
// defensive by forcing the yacht's current owner to company after the
|
||||
// direct query path has already cached it. We simulate the case by
|
||||
// creating a client-owned yacht, then manually flipping owner to a
|
||||
// company the client is a member of — if both queries ran they'd both
|
||||
// company the client is a member of - if both queries ran they'd both
|
||||
// match, but dedup by id ensures only one entry.
|
||||
const port = await makePort();
|
||||
const client = await makeClient({ portId: port.id });
|
||||
@@ -104,7 +103,7 @@ describe('portal.service — getPortalUserYachts', () => {
|
||||
ownerId: client.id,
|
||||
name: 'Ambiguous',
|
||||
});
|
||||
// Flip the denormalized owner to the company (without updating history) —
|
||||
// Flip the denormalized owner to the company (without updating history) -
|
||||
// this is artificial but exercises the dedup branch.
|
||||
await db
|
||||
.update(yachts)
|
||||
@@ -142,7 +141,7 @@ describe('portal.service — getPortalUserYachts', () => {
|
||||
const portA = await makePort();
|
||||
const portB = await makePort();
|
||||
const clientInA = await makeClient({ portId: portA.id });
|
||||
// Directly-owned yacht in portB with the SAME client id — must not leak
|
||||
// Directly-owned yacht in portB with the SAME client id - must not leak
|
||||
// because getPortalUserYachts filters on portId.
|
||||
// We insert a yacht row in portB with ownerId=clientInA.id. The FK on
|
||||
// yachts.currentOwnerId isn't to clients, so this is valid.
|
||||
@@ -172,8 +171,7 @@ describe('portal.service — getPortalUserYachts', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('portal.service — getPortalUserMemberships', () => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
describe('portal.service - getPortalUserMemberships', () => {
|
||||
let getPortalUserMemberships: (clientId: string, portId: string) => Promise<Array<any>>;
|
||||
|
||||
let makeClient: typeof import('../../helpers/factories').makeClient;
|
||||
@@ -223,7 +221,7 @@ describe('portal.service — getPortalUserMemberships', () => {
|
||||
const portA = await makePort();
|
||||
const portB = await makePort();
|
||||
const client = await makeClient({ portId: portA.id });
|
||||
// Company in portB — but membership references clientId on portA.
|
||||
// Company in portB - but membership references clientId on portA.
|
||||
const companyInB = await makeCompany({ portId: portB.id });
|
||||
await makeMembership({
|
||||
companyId: companyInB.id,
|
||||
@@ -240,8 +238,7 @@ describe('portal.service — getPortalUserMemberships', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('portal.service — getPortalUserReservations', () => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
describe('portal.service - getPortalUserReservations', () => {
|
||||
let getPortalUserReservations: (clientId: string, portId: string) => Promise<Array<any>>;
|
||||
|
||||
let makeClient: typeof import('../../helpers/factories').makeClient;
|
||||
|
||||
Reference in New Issue
Block a user