Add back pickers on all pages, fix command menu (#2662)

* Add back pickers on all pages, fix command menu

* Fix lint
This commit is contained in:
Charles Bochet
2023-11-22 22:32:25 +01:00
committed by GitHub
parent 41c0cebf48
commit ec3cfe6fdb
42 changed files with 425 additions and 300 deletions

View File

@ -89,7 +89,7 @@ export const seedCompanyFieldMetadata = async (
description: undefined,
icon: 'IconCalendar',
isNullable: false,
isSystem: true,
isSystem: false,
defaultValue: { type: 'now' },
},
{

View File

@ -84,7 +84,7 @@ export const seedOpportunityFieldMetadata = async (
description: undefined,
icon: 'IconCalendar',
isNullable: false,
isSystem: true,
isSystem: false,
defaultValue: { type: 'now' },
},
{
@ -175,7 +175,7 @@ export const seedOpportunityFieldMetadata = async (
description: 'Opportunity pipeline step',
icon: 'IconKanban',
isNullable: true,
isSystem: false,
isSystem: true,
defaultValue: undefined,
},
{
@ -239,7 +239,7 @@ export const seedOpportunityFieldMetadata = async (
description: 'Opportunity person',
icon: 'IconUser',
isNullable: true,
isSystem: false,
isSystem: true,
defaultValue: undefined,
},
{

View File

@ -89,7 +89,7 @@ export const seedPersonFieldMetadata = async (
description: undefined,
icon: 'IconCalendar',
isNullable: false,
isSystem: true,
isSystem: false,
defaultValue: { type: 'now' },
},
{
@ -126,7 +126,7 @@ export const seedPersonFieldMetadata = async (
},
description: 'Contacts name',
icon: 'IconUser',
isNullable: false,
isNullable: true,
isSystem: false,
defaultValue: { firstName: '', lastName: '' },
},
@ -301,11 +301,11 @@ export const seedPersonFieldMetadata = async (
workspaceId: SeedWorkspaceId,
isActive: true,
type: FieldMetadataType.RELATION,
name: 'pointOfContactForOpporunities',
name: 'pointOfContactForOpportunities',
label: 'POC for Opportunities',
targetColumnMap: {},
description: 'Point of Contact for Opportuniites',
icon: 'IconArrowTarget',
icon: 'IconTargetArrow',
isNullable: true,
isSystem: false,
defaultValue: undefined,

View File

@ -1,16 +1,25 @@
import { MigrationInterface, QueryRunner } from "typeorm";
import { MigrationInterface, QueryRunner } from 'typeorm';
export class AddCascadeDeleteOnRefreshTokenUser1700661180856 implements MigrationInterface {
name = 'AddCascadeDeleteOnRefreshTokenUser1700661180856'
export class AddCascadeDeleteOnRefreshTokenUser1700661180856
implements MigrationInterface
{
name = 'AddCascadeDeleteOnRefreshTokenUser1700661180856';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "core"."refreshToken" DROP CONSTRAINT "FK_7008a2b0fb083127f60b5f4448e"`);
await queryRunner.query(`ALTER TABLE "core"."refreshToken" ADD CONSTRAINT "FK_7008a2b0fb083127f60b5f4448e" FOREIGN KEY ("userId") REFERENCES "core"."user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "core"."refreshToken" DROP CONSTRAINT "FK_7008a2b0fb083127f60b5f4448e"`);
await queryRunner.query(`ALTER TABLE "core"."refreshToken" ADD CONSTRAINT "FK_7008a2b0fb083127f60b5f4448e" FOREIGN KEY ("userId") REFERENCES "core"."user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
}
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "core"."refreshToken" DROP CONSTRAINT "FK_7008a2b0fb083127f60b5f4448e"`,
);
await queryRunner.query(
`ALTER TABLE "core"."refreshToken" ADD CONSTRAINT "FK_7008a2b0fb083127f60b5f4448e" FOREIGN KEY ("userId") REFERENCES "core"."user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "core"."refreshToken" DROP CONSTRAINT "FK_7008a2b0fb083127f60b5f4448e"`,
);
await queryRunner.query(
`ALTER TABLE "core"."refreshToken" ADD CONSTRAINT "FK_7008a2b0fb083127f60b5f4448e" FOREIGN KEY ("userId") REFERENCES "core"."user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`,
);
}
}

View File

@ -1,16 +1,25 @@
import { MigrationInterface, QueryRunner } from "typeorm";
import { MigrationInterface, QueryRunner } from 'typeorm';
export class AddWorkspaceDeleteCascadeSetNullInUser1700663611659 implements MigrationInterface {
name = 'AddWorkspaceDeleteCascadeSetNullInUser1700663611659'
export class AddWorkspaceDeleteCascadeSetNullInUser1700663611659
implements MigrationInterface
{
name = 'AddWorkspaceDeleteCascadeSetNullInUser1700663611659';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "core"."user" DROP CONSTRAINT "FK_2ec910029395fa7655621c88908"`);
await queryRunner.query(`ALTER TABLE "core"."user" ADD CONSTRAINT "FK_2ec910029395fa7655621c88908" FOREIGN KEY ("defaultWorkspaceId") REFERENCES "core"."workspace"("id") ON DELETE SET NULL ON UPDATE NO ACTION`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "core"."user" DROP CONSTRAINT "FK_2ec910029395fa7655621c88908"`);
await queryRunner.query(`ALTER TABLE "core"."user" ADD CONSTRAINT "FK_2ec910029395fa7655621c88908" FOREIGN KEY ("defaultWorkspaceId") REFERENCES "core"."workspace"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
}
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "core"."user" DROP CONSTRAINT "FK_2ec910029395fa7655621c88908"`,
);
await queryRunner.query(
`ALTER TABLE "core"."user" ADD CONSTRAINT "FK_2ec910029395fa7655621c88908" FOREIGN KEY ("defaultWorkspaceId") REFERENCES "core"."workspace"("id") ON DELETE SET NULL ON UPDATE NO ACTION`,
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "core"."user" DROP CONSTRAINT "FK_2ec910029395fa7655621c88908"`,
);
await queryRunner.query(
`ALTER TABLE "core"."user" ADD CONSTRAINT "FK_2ec910029395fa7655621c88908" FOREIGN KEY ("defaultWorkspaceId") REFERENCES "core"."workspace"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`,
);
}
}

View File

@ -1,14 +1,17 @@
import { MigrationInterface, QueryRunner } from "typeorm";
import { MigrationInterface, QueryRunner } from 'typeorm';
export class AddWorkspaceCacheVersion1700650554672 implements MigrationInterface {
name = 'AddWorkspaceCacheVersion1700650554672'
export class AddWorkspaceCacheVersion1700650554672
implements MigrationInterface
{
name = 'AddWorkspaceCacheVersion1700650554672';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`CREATE TABLE "metadata"."workspaceCacheVersion" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "workspaceId" character varying NOT NULL, "version" character varying NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "UQ_1a80ecf2638b477809403cc26ed" UNIQUE ("workspaceId"), CONSTRAINT "PK_5d502f8dbfb5b9a8bf2439320e9" PRIMARY KEY ("id"))`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`DROP TABLE "metadata"."workspaceCacheVersion"`);
}
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`CREATE TABLE "metadata"."workspaceCacheVersion" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "workspaceId" character varying NOT NULL, "version" character varying NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "UQ_1a80ecf2638b477809403cc26ed" UNIQUE ("workspaceId"), CONSTRAINT "PK_5d502f8dbfb5b9a8bf2439320e9" PRIMARY KEY ("id"))`,
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`DROP TABLE "metadata"."workspaceCacheVersion"`);
}
}

View File

@ -1,20 +1,37 @@
import { MigrationInterface, QueryRunner } from "typeorm";
import { MigrationInterface, QueryRunner } from 'typeorm';
export class AddCascadeDeleteOnRelationObject1700661538754 implements MigrationInterface {
name = 'AddCascadeDeleteOnRelationObject1700661538754'
export class AddCascadeDeleteOnRelationObject1700661538754
implements MigrationInterface
{
name = 'AddCascadeDeleteOnRelationObject1700661538754';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "metadata"."relationMetadata" DROP CONSTRAINT "FK_0f781f589e5a527b8f3d3a4b824"`);
await queryRunner.query(`ALTER TABLE "metadata"."relationMetadata" DROP CONSTRAINT "FK_f2a0acd3a548ee446a1a35df44d"`);
await queryRunner.query(`ALTER TABLE "metadata"."relationMetadata" ADD CONSTRAINT "FK_f2a0acd3a548ee446a1a35df44d" FOREIGN KEY ("fromObjectMetadataId") REFERENCES "metadata"."objectMetadata"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
await queryRunner.query(`ALTER TABLE "metadata"."relationMetadata" ADD CONSTRAINT "FK_0f781f589e5a527b8f3d3a4b824" FOREIGN KEY ("toObjectMetadataId") REFERENCES "metadata"."objectMetadata"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "metadata"."relationMetadata" DROP CONSTRAINT "FK_0f781f589e5a527b8f3d3a4b824"`);
await queryRunner.query(`ALTER TABLE "metadata"."relationMetadata" DROP CONSTRAINT "FK_f2a0acd3a548ee446a1a35df44d"`);
await queryRunner.query(`ALTER TABLE "metadata"."relationMetadata" ADD CONSTRAINT "FK_f2a0acd3a548ee446a1a35df44d" FOREIGN KEY ("fromObjectMetadataId") REFERENCES "metadata"."objectMetadata"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
await queryRunner.query(`ALTER TABLE "metadata"."relationMetadata" ADD CONSTRAINT "FK_0f781f589e5a527b8f3d3a4b824" FOREIGN KEY ("toObjectMetadataId") REFERENCES "metadata"."objectMetadata"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
}
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "metadata"."relationMetadata" DROP CONSTRAINT "FK_0f781f589e5a527b8f3d3a4b824"`,
);
await queryRunner.query(
`ALTER TABLE "metadata"."relationMetadata" DROP CONSTRAINT "FK_f2a0acd3a548ee446a1a35df44d"`,
);
await queryRunner.query(
`ALTER TABLE "metadata"."relationMetadata" ADD CONSTRAINT "FK_f2a0acd3a548ee446a1a35df44d" FOREIGN KEY ("fromObjectMetadataId") REFERENCES "metadata"."objectMetadata"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
);
await queryRunner.query(
`ALTER TABLE "metadata"."relationMetadata" ADD CONSTRAINT "FK_0f781f589e5a527b8f3d3a4b824" FOREIGN KEY ("toObjectMetadataId") REFERENCES "metadata"."objectMetadata"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "metadata"."relationMetadata" DROP CONSTRAINT "FK_0f781f589e5a527b8f3d3a4b824"`,
);
await queryRunner.query(
`ALTER TABLE "metadata"."relationMetadata" DROP CONSTRAINT "FK_f2a0acd3a548ee446a1a35df44d"`,
);
await queryRunner.query(
`ALTER TABLE "metadata"."relationMetadata" ADD CONSTRAINT "FK_f2a0acd3a548ee446a1a35df44d" FOREIGN KEY ("fromObjectMetadataId") REFERENCES "metadata"."objectMetadata"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`,
);
await queryRunner.query(
`ALTER TABLE "metadata"."relationMetadata" ADD CONSTRAINT "FK_0f781f589e5a527b8f3d3a4b824" FOREIGN KEY ("toObjectMetadataId") REFERENCES "metadata"."objectMetadata"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`,
);
}
}

View File

@ -63,6 +63,7 @@ const opportunityMetadata = {
},
description: 'Opportunity pipeline step',
icon: 'IconKanban',
isSystem: true,
isNullable: true,
},
{
@ -90,6 +91,7 @@ const opportunityMetadata = {
description: 'Opportunity person',
icon: 'IconUser',
isNullable: true,
isSystem: true,
},
{
isCustom: false,

View File

@ -23,7 +23,7 @@ const personMetadata = {
},
description: 'Contacts name',
icon: 'IconUser',
isNullable: false,
isNullable: true,
},
{
isCustom: false,
@ -116,7 +116,7 @@ const personMetadata = {
},
description: 'Contacts avatar',
icon: 'IconFileUpload',
isNullable: false,
isNullable: true,
},
// Relations
{
@ -151,8 +151,8 @@ const personMetadata = {
label: 'POC for Opportunities',
targetColumnMap: {},
description: 'Point of Contact for Opportunities',
icon: 'IconArrowTarget',
isNullable: false,
icon: 'IconTargetArrow',
isNullable: true,
},
{
isCustom: false,

View File

@ -47,7 +47,7 @@ export const basicFieldsMetadata: Partial<FieldMetadataEntity>[] = [
value: 'id',
},
isNullable: true,
// isSystem: true,
isSystem: true,
isCustom: false,
isActive: true,
defaultValue: { type: 'uuid' },
@ -75,6 +75,7 @@ export const basicFieldsMetadata: Partial<FieldMetadataEntity>[] = [
icon: 'IconCalendar',
isNullable: true,
isCustom: false,
isSystem: true,
isActive: true,
defaultValue: { type: 'now' },
},