Skip to content

Commit 2e684ca

Browse files
authored
Merge pull request #59 from assemblycom/OUT-3975
OUT-3975 | Profile Manager App - Company custom fields are showing but tags are not
2 parents ce9b74c + ed6b5e5 commit 2e684ca

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/types/common.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ export const CustomFieldSchema = z.object({
114114
}),
115115
)
116116
.optional(),
117+
entityType: z.string(),
117118
});
118119
export type CustomField = z.infer<typeof CustomFieldSchema>;
119120
export const CustomFieldResponseSchema = z.object({

src/utils/copilotApiUtils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export class CopilotAPI {
7070
}
7171

7272
async getCustomFields(): Promise<CustomFieldResponse> {
73-
return CustomFieldResponseSchema.parse(await this.copilot.listCustomFields());
73+
const response = CustomFieldResponseSchema.parse(await this.copilot.listCustomFields());
74+
return { ...response, data: response.data?.filter((field) => field.entityType === 'client') ?? [] };
7475
}
7576
}

0 commit comments

Comments
 (0)