Skip to content

Commit 7b4fe39

Browse files
authored
chore: Update values for feedback_status_enum (#4505)
1 parent fe24f31 commit 7b4fe39

File tree

7 files changed

+23
-9
lines changed

7 files changed

+23
-9
lines changed

editor.planx.uk/src/pages/FlowEditor/components/FeedbackLog/components/StatusChip.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { feedbackStatusText } from "../utils";
88
const FEEDBACK_COLOURS: Record<FeedbackStatus, ChipProps["color"]> = {
99
unread: "info",
1010
urgent: "error",
11-
to_follow_up: "warning",
12-
read: "success",
11+
in_progress: "warning",
12+
actioned: "success",
1313
};
1414

1515
export const StatusChip = (

editor.planx.uk/src/pages/FlowEditor/components/FeedbackLog/feedbackFilterOptions.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export type StatusOption = {
2929
};
3030

3131
export const statusOptions: StatusOption[] = (
32-
["unread", "read", "to_follow_up", "urgent"] as const
32+
["unread", "actioned", "in_progress", "urgent"] as const
3333
).map((type) => ({
3434
value: type,
3535
label: feedbackStatusText[type],

editor.planx.uk/src/pages/FlowEditor/components/FeedbackLog/mocks/mockFeedback.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const mockFeedback: Feedback[] = [
6161
nodeId: "5SuQhstVL5",
6262
nodeText: null,
6363
projectType: null,
64-
status: "read",
64+
status: "actioned",
6565
editorNotes: "No action needed",
6666
},
6767
{
@@ -117,7 +117,7 @@ export const mockFeedback: Feedback[] = [
117117
nodeId: "5SuQhstVL5",
118118
nodeText: null,
119119
projectType: null,
120-
status: "to_follow_up",
120+
status: "in_progress",
121121
editorNotes: "No action needed",
122122
},
123123
{
@@ -173,7 +173,7 @@ export const mockFeedback: Feedback[] = [
173173
nodeId: "5SuQhstVL5",
174174
nodeText: null,
175175
projectType: null,
176-
status: "read",
176+
status: "actioned",
177177
editorNotes: "Let's take some action here - BB",
178178
},
179179
{

editor.planx.uk/src/pages/FlowEditor/components/FeedbackLog/utils.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export const feedbackTypeText = (type: FeedbackType) => {
3232
export const feedbackStatusText: Record<FeedbackStatus, string> = {
3333
unread: "Unread",
3434
urgent: "Urgent",
35-
to_follow_up: "To follow up",
36-
read: "Read",
35+
actioned: "Actioned",
36+
in_progress: "In progress",
3737
};
3838

3939
export const getCombinedHelpText = (feedback: Feedback) => {

editor.planx.uk/src/routes/feedback.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { makeTitle } from "./utils";
1515
type FeedbackType = Sentiment | FeedbackCategory;
1616

1717
/** Matches feedback_status_enum table */
18-
export type FeedbackStatus = "unread" | "read" | "to_follow_up" | "urgent";
18+
export type FeedbackStatus = "unread" | "in_progress" | "urgent" | "actioned";
1919

2020
export interface Feedback {
2121
id: number;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
DELETE FROM "public"."feedback_status_enum" WHERE value = 'in_progress';
2+
DELETE FROM "public"."feedback_status_enum" WHERE value = 'actioned';
3+
4+
INSERT INTO "public"."feedback_status_enum"("value", "comment")
5+
VALUES
6+
(E'read', E'Feedback has been actioned'),
7+
(E'to_follow_up', E'Further action required');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
DELETE FROM "public"."feedback_status_enum" WHERE value = 'to_follow_up';
2+
DELETE FROM "public"."feedback_status_enum" WHERE value = 'read';
3+
4+
INSERT INTO "public"."feedback_status_enum"("value", "comment")
5+
VALUES
6+
(E'in_progress', E'Feedback is currently being investigated'),
7+
(E'actioned', E'Feedback has been actioned');

0 commit comments

Comments
 (0)