Replace shouldSyncNameAndLabel with isLabelSyncedWithName (#8067)

For consistency. 
This was not deployed yet so allowing myself just to rename everything,
meaning developers will need to reset their db.
This commit is contained in:
Marie
2024-10-25 18:28:58 +02:00
committed by GitHub
parent e5175194ac
commit d51a797d91
22 changed files with 80 additions and 80 deletions

View File

@ -90,5 +90,5 @@ export class CreateObjectInput {
@IsBoolean()
@IsOptional()
@Field({ nullable: true })
shouldSyncLabelAndName?: boolean;
isLabelSyncedWithName?: boolean;
}

View File

@ -84,5 +84,5 @@ export class ObjectMetadataDTO {
imageIdentifierFieldMetadataId?: string | null;
@Field()
shouldSyncLabelAndName: boolean;
isLabelSyncedWithName: boolean;
}

View File

@ -70,7 +70,7 @@ export class UpdateObjectPayload {
@IsBoolean()
@IsOptional()
@Field({ nullable: true })
shouldSyncLabelAndName?: boolean;
isLabelSyncedWithName?: boolean;
}
@InputType()

View File

@ -79,7 +79,7 @@ export class ObjectMetadataEntity implements ObjectMetadataInterface {
imageIdentifierFieldMetadataId?: string | null;
@Column({ default: true })
shouldSyncLabelAndName: boolean;
isLabelSyncedWithName: boolean;
@Column({ nullable: false, type: 'uuid' })
workspaceId: string;

View File

@ -204,7 +204,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
);
}
if (objectMetadataInput.shouldSyncLabelAndName === true) {
if (objectMetadataInput.isLabelSyncedWithName === true) {
validateNameAndLabelAreSyncOrThrow(
objectMetadataInput.labelSingular,
objectMetadataInput.nameSingular,
@ -436,7 +436,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
existingObjectMetadataId: fullObjectMetadataAfterUpdate.id,
});
if (fullObjectMetadataAfterUpdate.shouldSyncLabelAndName) {
if (fullObjectMetadataAfterUpdate.isLabelSyncedWithName) {
validateNameAndLabelAreSyncOrThrow(
fullObjectMetadataAfterUpdate.labelSingular,
fullObjectMetadataAfterUpdate.nameSingular,