diff --git a/INDEXES.md b/INDEXES.md index 77f282603a..2c8597d6c1 100644 --- a/INDEXES.md +++ b/INDEXES.md @@ -6,6 +6,22 @@ The goal of this document is to date-mark the indexes you add to support the cha If you are releasing, you can use this readme to check all the indexes prior to the release you are deploying and have a good idea of what indexes you might need to deploy to Mongo along with your release of a new Coral Docker image to kubernetes. +## 2023-11-24 + +``` +db.dsaReports.createIndex({ tenantID: 1, id: 1 }, { unique: true }); +``` + +- This index creates the uniqueness constraint for the `tenantID` and `id` fields on the `dsaReports` + +``` +db.dsaReports.createIndex({ status: 1, createdAt: 1, tenantID: 1 }); +db.dsaReports.createIndex({ referenceID: 1, tenantID: 1 }); +db.dsaReports.createIndex({ submissionID: 1, tenantID: 1 }); +``` + +- These indices are used to optimize pagination of `dsaReports` and allow them to be retrieved by their `referenceID`, `submissionID` efficiently. + ## 2023-10-18 ``` diff --git a/client/src/core/client/admin/routes/Reports/ReportedComment.css b/client/src/core/client/admin/routes/Reports/ReportedComment.css index f15a0a420b..905e4c9edf 100644 --- a/client/src/core/client/admin/routes/Reports/ReportedComment.css +++ b/client/src/core/client/admin/routes/Reports/ReportedComment.css @@ -47,3 +47,34 @@ font-weight: var(--font-weight-primary-regular); white-space: pre-wrap; } + +.commentReported { + padding-top: calc(var(--spacing-1) / 2); + padding-bottom: calc(var(--spacing-1) / 2); + padding-right: calc(var(--spacing-1)); + padding-left: calc(var(--spacing-1)); + + background-color: var(--palette-error-500); + + border-color: var(--palette-error-500); + border-style: solid; + border-radius: 3px; + + color: var(--palette-text-000); + + text-transform: uppercase; + + font-size: var(--font-size-1); + font-weight: var(--font-weight-primary-regular); + font-family: var(--font-family-primary); + + margin-right: var(--spacing-1); +} + +.commentNotAvailableInStream { + font-size: var(--font-size-1); + font-weight: var(--font-weight-primary-regular); + font-family: var(--font-family-primary); + + color: var(--palette-grey-400); +} diff --git a/client/src/core/client/admin/routes/Reports/ReportedComment.tsx b/client/src/core/client/admin/routes/Reports/ReportedComment.tsx index 921e67aec8..b64d63582f 100644 --- a/client/src/core/client/admin/routes/Reports/ReportedComment.tsx +++ b/client/src/core/client/admin/routes/Reports/ReportedComment.tsx @@ -15,6 +15,7 @@ import { getURLWithCommentID, } from "coral-framework/helpers"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { GQLCOMMENT_STATUS } from "coral-framework/schema"; import { Button, Flex, @@ -130,28 +131,45 @@ const ReportedComment: FunctionComponent = ({ - - - - - + {comment.status === GQLCOMMENT_STATUS.REJECTED ? ( + + + +
+ Rejected +
+
+ +
+ Unavailable in stream +
+
+
+
+ ) : ( + + + + + + )}