From 18785ae8dca82d761ae0a1b589ade4ed3df8b2c3 Mon Sep 17 00:00:00 2001 From: u7861723 Date: Sat, 26 Oct 2024 01:06:38 +1100 Subject: [PATCH] add judgment this.newFeedbackSessionName.length > this.FEEDBACK_SESSION_NAME_MAX_LENGTH --- .../copy-session-modal/copy-session-modal.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/web/app/components/copy-session-modal/copy-session-modal.component.ts b/src/web/app/components/copy-session-modal/copy-session-modal.component.ts index 4db64d3fd2b..a35a6b8484f 100644 --- a/src/web/app/components/copy-session-modal/copy-session-modal.component.ts +++ b/src/web/app/components/copy-session-modal/copy-session-modal.component.ts @@ -36,6 +36,10 @@ export class CopySessionModalComponent { this.statusMessageService.showErrorToast('The field "Name for copied session" should not be whitespace.'); return; } + else if(this.newFeedbackSessionName.length > this.FEEDBACK_SESSION_NAME_MAX_LENGTH){ + this.statusMessageService.showErrorToast('The field "Name for copied session" should less than ${this.FEEDBACK_SESSION_NAME_MAX_LENGTH}.'); + return; + } this.activeModal.close({ newFeedbackSessionName: this.newFeedbackSessionName,