diff --git a/migrations/sql/V2025.01.07.12.01__alter_incident_and_report_comment_character_limit.sql b/migrations/sql/V2025.01.07.12.01__alter_incident_and_report_comment_character_limit.sql new file mode 100644 index 0000000000..19bcf96669 --- /dev/null +++ b/migrations/sql/V2025.01.07.12.01__alter_incident_and_report_comment_character_limit.sql @@ -0,0 +1,3 @@ +ALTER TABLE mine_incident_note ALTER COLUMN content TYPE character varying(500); + +ALTER TABLE mine_report_comment ALTER COLUMN report_comment TYPE character varying(500); \ No newline at end of file diff --git a/services/common/src/components/comments/CommentEditor.tsx b/services/common/src/components/comments/CommentEditor.tsx index fd50ae5660..ebfbe52641 100644 --- a/services/common/src/components/comments/CommentEditor.tsx +++ b/services/common/src/components/comments/CommentEditor.tsx @@ -12,7 +12,7 @@ interface CommentEditorProps { export const CommentEditor: FC = ({ onSubmit, addCommentPermission, - maxLength = 300, + maxLength = 500, }) => { const [submitting, setSubmitting] = React.useState(false); const [comment, setComment] = React.useState(""); diff --git a/services/common/src/components/projectSummary/ProjectManagement.tsx b/services/common/src/components/projectSummary/ProjectManagement.tsx index 2e4f3229c3..b8a2d0b0e6 100644 --- a/services/common/src/components/projectSummary/ProjectManagement.tsx +++ b/services/common/src/components/projectSummary/ProjectManagement.tsx @@ -150,7 +150,6 @@ export const ProjectManagement: FC = () => { renderEditor={true} onSubmit={submitComment} loading={false} - maxLength={500} comments={ministryComments?.map((comment: IProjectSummaryMinistryComment) => ({ key: comment.project_summary_ministry_comment_guid, author: comment.update_user, diff --git a/services/core-web/src/tests/components/common/comments/__snapshots__/CommentEditor.spec.tsx.snap b/services/core-web/src/tests/components/common/comments/__snapshots__/CommentEditor.spec.tsx.snap index 739747df80..d8c9090699 100644 --- a/services/core-web/src/tests/components/common/comments/__snapshots__/CommentEditor.spec.tsx.snap +++ b/services/core-web/src/tests/components/common/comments/__snapshots__/CommentEditor.spec.tsx.snap @@ -20,7 +20,7 @@ exports[`Comment renders properly 1`] = ` >