refactor(clients): strip yacht/company/proxy fields from validator
Remove deprecated companyName, isProxy, proxyType, actualOwnerName, yacht dimensions, and berthSizeDesired fields from createClientSchema and the isProxy filter from listClientsSchema. First step of PR 8; cascading TS errors in clients.service.ts and client-form.tsx are addressed in 8.2/8.3. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -62,12 +62,19 @@ describe('createClientSchema', () => {
|
||||
it('accepts optional fields', () => {
|
||||
const result = createClientSchema.safeParse({
|
||||
...validClient,
|
||||
companyName: 'ACME',
|
||||
nationality: 'AU',
|
||||
source: 'manual' as const,
|
||||
});
|
||||
expect(result.success).toBe(true);
|
||||
});
|
||||
|
||||
it('accepts minimal valid input (no deprecated yacht/company fields)', () => {
|
||||
const result = createClientSchema.safeParse({
|
||||
fullName: 'Alice',
|
||||
contacts: [{ channel: 'email', value: 'a@example.com' }],
|
||||
});
|
||||
expect(result.success).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('updateClientSchema (partial)', () => {
|
||||
|
||||
Reference in New Issue
Block a user