Add Didar gap features: lost-reason reports, audit logs, tags, card assignees, and saved-views API.
Ignore Graphify local artifacts and expose new modules in superadmin.
This commit is contained in:
@@ -23,6 +23,7 @@ import {
|
||||
ownerWhere,
|
||||
resolveOwnerId,
|
||||
} from '../common/record-scope';
|
||||
import { normalizeTags } from '../common/tags';
|
||||
|
||||
const companyInclude = {
|
||||
_count: { select: { people: true } },
|
||||
@@ -38,6 +39,7 @@ type CompanyRow = {
|
||||
website: string | null;
|
||||
address: string | null;
|
||||
notes: string | null;
|
||||
tags: string[];
|
||||
customFields: unknown;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
@@ -108,6 +110,7 @@ export class CompaniesService {
|
||||
website: emptyToNull(dto.website),
|
||||
address: emptyToNull(dto.address),
|
||||
notes: emptyToNull(dto.notes),
|
||||
tags: normalizeTags(dto.tags),
|
||||
ownerId: resolveOwnerId(actor, dto.ownerId),
|
||||
customFields: toJsonCustomFields(dto.customFields),
|
||||
};
|
||||
@@ -134,6 +137,7 @@ export class CompaniesService {
|
||||
if ('website' in dto) data.website = emptyToNull(dto.website);
|
||||
if ('address' in dto) data.address = emptyToNull(dto.address);
|
||||
if ('notes' in dto) data.notes = emptyToNull(dto.notes);
|
||||
if ('tags' in dto) data.tags = normalizeTags(dto.tags);
|
||||
if ('customFields' in dto) {
|
||||
data.customFields = toJsonCustomFields(dto.customFields);
|
||||
}
|
||||
@@ -228,6 +232,7 @@ export class CompaniesService {
|
||||
website: row.website,
|
||||
address: row.address,
|
||||
notes: row.notes,
|
||||
tags: row.tags ?? [],
|
||||
customFields: asCustomFields(row.customFields),
|
||||
peopleCount: row._count.people,
|
||||
owner: row.owner,
|
||||
|
||||
Reference in New Issue
Block a user