From 1659464b6ef4d58cfc6db806f58ffe18cb3f406a Mon Sep 17 00:00:00 2001 From: Luka van der Plas Date: Thu, 26 Sep 2024 16:27:21 +0200 Subject: [PATCH] update text fields on blur --- frontend/generated/graphql.ts | 5 ----- frontend/generated/schema.graphql | 5 ----- .../agent-description-form.component.ts | 4 ++-- .../agent-identification-form.component.ts | 1 + .../episode-contents-form/episode-contents-form.component.ts | 1 + .../episode-identification-form.component.ts | 1 + .../gift-identification-form.component.ts | 1 + .../letter-identification-form.component.ts | 1 + .../shared/episode-link-form/episode-link-form.component.ts | 2 +- 9 files changed, 8 insertions(+), 13 deletions(-) diff --git a/frontend/generated/graphql.ts b/frontend/generated/graphql.ts index eb439a0d..7c3a0df3 100644 --- a/frontend/generated/graphql.ts +++ b/frontend/generated/graphql.ts @@ -196,7 +196,6 @@ export type EpisodeAgentType = EpisodeEntityLink & { agent: AgentDescriptionType; certainty: Certainty; entity: EntityDescription; - entityType: Entity; episode: EpisodeType; id: Scalars['ID']['output']; note?: Maybe; @@ -212,7 +211,6 @@ export type EpisodeCategoryType = { export type EpisodeEntityLink = { entity: EntityDescription; - entityType: Entity; episode: EpisodeType; id: Scalars['ID']['output']; note?: Maybe; @@ -223,7 +221,6 @@ export type EpisodeGiftType = EpisodeEntityLink & { __typename?: 'EpisodeGiftType'; certainty: Certainty; entity: EntityDescription; - entityType: Entity; episode: EpisodeType; gift: GiftDescriptionType; id: Scalars['ID']['output']; @@ -235,7 +232,6 @@ export type EpisodeLetterType = EpisodeEntityLink & { __typename?: 'EpisodeLetterType'; certainty: Certainty; entity: EntityDescription; - entityType: Entity; episode: EpisodeType; id: Scalars['ID']['output']; letter: LetterDescriptionType; @@ -247,7 +243,6 @@ export type EpisodeSpaceType = EpisodeEntityLink & { __typename?: 'EpisodeSpaceType'; certainty: Certainty; entity: EntityDescription; - entityType: Entity; episode: EpisodeType; id: Scalars['ID']['output']; note?: Maybe; diff --git a/frontend/generated/schema.graphql b/frontend/generated/schema.graphql index bfd06295..163a7ea9 100644 --- a/frontend/generated/schema.graphql +++ b/frontend/generated/schema.graphql @@ -172,7 +172,6 @@ type EpisodeAgentType implements EpisodeEntityLink { agent: AgentDescriptionType! certainty: Certainty! entity: EntityDescription! - entityType: Entity! episode: EpisodeType! id: ID! note: String @@ -187,7 +186,6 @@ type EpisodeCategoryType { interface EpisodeEntityLink { entity: EntityDescription! - entityType: Entity! episode: EpisodeType! id: ID! note: String @@ -197,7 +195,6 @@ interface EpisodeEntityLink { type EpisodeGiftType implements EpisodeEntityLink { certainty: Certainty! entity: EntityDescription! - entityType: Entity! episode: EpisodeType! gift: GiftDescriptionType! id: ID! @@ -208,7 +205,6 @@ type EpisodeGiftType implements EpisodeEntityLink { type EpisodeLetterType implements EpisodeEntityLink { certainty: Certainty! entity: EntityDescription! - entityType: Entity! episode: EpisodeType! id: ID! letter: LetterDescriptionType! @@ -219,7 +215,6 @@ type EpisodeLetterType implements EpisodeEntityLink { type EpisodeSpaceType implements EpisodeEntityLink { certainty: Certainty! entity: EntityDescription! - entityType: Entity! episode: EpisodeType! id: ID! note: String diff --git a/frontend/src/app/data-entry/agent-form/agent-description-form/agent-description-form.component.ts b/frontend/src/app/data-entry/agent-form/agent-description-form/agent-description-form.component.ts index 08c5a7c5..1b4d3591 100644 --- a/frontend/src/app/data-entry/agent-form/agent-description-form/agent-description-form.component.ts +++ b/frontend/src/app/data-entry/agent-form/agent-description-form/agent-description-form.component.ts @@ -42,13 +42,13 @@ export class AgentDescriptionFormComponent implements OnDestroy { gender: new FormGroup({ gender: new FormControl(Gender.Unknown), sourceMention: new FormControl(SourceMention.Direct), - note: new FormControl(''), + note: new FormControl('', { updateOn: 'blur' }), }), location: new FormGroup({ hasLocation: new FormControl(false, { nonNullable: true }), location: new FormControl(null), sourceMention: new FormControl(SourceMention.Direct), - note: new FormControl(''), + note: new FormControl('', { updateOn: 'blur' }), }) }); diff --git a/frontend/src/app/data-entry/agent-form/agent-identification-form/agent-identification-form.component.ts b/frontend/src/app/data-entry/agent-form/agent-identification-form/agent-identification-form.component.ts index de8efdba..c0af537b 100644 --- a/frontend/src/app/data-entry/agent-form/agent-identification-form/agent-identification-form.component.ts +++ b/frontend/src/app/data-entry/agent-form/agent-identification-form/agent-identification-form.component.ts @@ -33,6 +33,7 @@ export class AgentIdentificationFormComponent implements OnDestroy { form = new FormGroup({ name: new FormControl('', { nonNullable: true, + updateOn: 'blur', validators: [Validators.required] }), description: new FormControl('', { nonNullable: true }), diff --git a/frontend/src/app/data-entry/episode-form/episode-contents-form/episode-contents-form.component.ts b/frontend/src/app/data-entry/episode-form/episode-contents-form/episode-contents-form.component.ts index a0341b13..14a3426d 100644 --- a/frontend/src/app/data-entry/episode-form/episode-contents-form/episode-contents-form.component.ts +++ b/frontend/src/app/data-entry/episode-form/episode-contents-form/episode-contents-form.component.ts @@ -40,6 +40,7 @@ export class EpisodeContentsFormComponent implements OnInit, OnDestroy { public form = new FormGroup({ summary: new FormControl("", { nonNullable: true, + updateOn: 'blur', }), categories: new FormControl([], { nonNullable: true, diff --git a/frontend/src/app/data-entry/episode-form/episode-identification-form/episode-identification-form.component.ts b/frontend/src/app/data-entry/episode-form/episode-identification-form/episode-identification-form.component.ts index 0317cb55..26f1b300 100644 --- a/frontend/src/app/data-entry/episode-form/episode-identification-form/episode-identification-form.component.ts +++ b/frontend/src/app/data-entry/episode-form/episode-identification-form/episode-identification-form.component.ts @@ -48,6 +48,7 @@ export class EpisodeIdentificationFormComponent implements OnDestroy { public form = new FormGroup({ name: new FormControl("", { nonNullable: true, + updateOn: 'blur', validators: [Validators.required], }), }); diff --git a/frontend/src/app/data-entry/gift-form/gift-identification-form/gift-identification-form.component.ts b/frontend/src/app/data-entry/gift-form/gift-identification-form/gift-identification-form.component.ts index dab3d11f..8735c2d9 100644 --- a/frontend/src/app/data-entry/gift-form/gift-identification-form/gift-identification-form.component.ts +++ b/frontend/src/app/data-entry/gift-form/gift-identification-form/gift-identification-form.component.ts @@ -48,6 +48,7 @@ export class GiftIdentificationFormComponent implements OnInit { name: new FormControl("", { validators: [Validators.required], nonNullable: true, + updateOn: 'blur', }), description: new FormControl("", { nonNullable: true, diff --git a/frontend/src/app/data-entry/letter-form/letter-identification-form/letter-identification-form.component.ts b/frontend/src/app/data-entry/letter-form/letter-identification-form/letter-identification-form.component.ts index a2ccdbce..37d63d6e 100644 --- a/frontend/src/app/data-entry/letter-form/letter-identification-form/letter-identification-form.component.ts +++ b/frontend/src/app/data-entry/letter-form/letter-identification-form/letter-identification-form.component.ts @@ -35,6 +35,7 @@ export class LetterIdentificationFormComponent implements OnInit { name: new FormControl("", { validators: [Validators.required], nonNullable: true, + updateOn: 'blur', }), description: new FormControl("", { nonNullable: true, diff --git a/frontend/src/app/data-entry/shared/episode-link-form/episode-link-form.component.ts b/frontend/src/app/data-entry/shared/episode-link-form/episode-link-form.component.ts index 27b451a5..62be1658 100644 --- a/frontend/src/app/data-entry/shared/episode-link-form/episode-link-form.component.ts +++ b/frontend/src/app/data-entry/shared/episode-link-form/episode-link-form.component.ts @@ -47,7 +47,7 @@ export class EpisodeLinkFormComponent implements OnChanges, OnDestroy { data$: Observable; form = new FormGroup({ sourceMention: new FormControl(SourceMention.Direct), - note: new FormControl('', { nonNullable: true }), + note: new FormControl('', { nonNullable: true, updateOn: 'blur' }), }); sourceMentionOptions: SelectOptions = sourceMentionSelectOptions();