Adding two fields to the mesh form

This commit is contained in:
2026-09-23 14:41:16 +03:30
parent 230d7b3bf6
commit 99df327ded
7 changed files with 59 additions and 0 deletions
+20
View File
@@ -165,6 +165,16 @@ export class CreatePersonDto {
@MaxLength(120)
position?: string;
@IsOptional()
@IsString()
@MaxLength(300)
website?: string;
@IsOptional()
@IsString()
@MaxLength(120)
referrer?: string;
@IsOptional()
@IsString()
@MaxLength(2000)
@@ -220,6 +230,16 @@ export class UpdatePersonDto {
@MaxLength(120)
position?: string;
@IsOptional()
@IsString()
@MaxLength(300)
website?: string;
@IsOptional()
@IsString()
@MaxLength(120)
referrer?: string;
@IsOptional()
@IsString()
@MaxLength(2000)
+8
View File
@@ -44,6 +44,8 @@ type PersonRow = {
phone: string | null;
mobile: string | null;
position: string | null;
website: string | null;
referrer: string | null;
notes: string | null;
mood: PersonMood;
customFields: unknown;
@@ -140,6 +142,8 @@ export class PeopleService {
phone: normalizePhone(dto.phone),
mobile: normalizePhone(dto.mobile),
position: emptyToNull(dto.position),
website: emptyToNull(dto.website),
referrer: emptyToNull(dto.referrer),
notes: emptyToNull(dto.notes),
mood: dto.mood ?? 'newcomer',
companyId,
@@ -185,6 +189,8 @@ export class PeopleService {
if ('phone' in dto) data.phone = normalizePhone(dto.phone);
if ('mobile' in dto) data.mobile = normalizePhone(dto.mobile);
if ('position' in dto) data.position = emptyToNull(dto.position);
if ('website' in dto) data.website = emptyToNull(dto.website);
if ('referrer' in dto) data.referrer = emptyToNull(dto.referrer);
if ('notes' in dto) data.notes = emptyToNull(dto.notes);
if (dto.mood !== undefined) data.mood = dto.mood;
if ('customFields' in dto) {
@@ -268,6 +274,8 @@ export class PeopleService {
phone: row.phone,
mobile: row.mobile,
position: row.position,
website: row.website,
referrer: row.referrer,
notes: row.notes,
mood: row.mood,
customFields: asCustomFields(row.customFields),