Skip to content

Commit

Permalink
Expose feedbackScore separately
Browse files Browse the repository at this point in the history
  • Loading branch information
jamdelion committed Nov 14, 2024
1 parent 6896569 commit 55ef0bd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const ALLOW_LIST = [
"application.type",
"drawBoundary.action",
"_feedback",
"_feedback.feedbackScore",
"findProperty.action",
"_overrides",
"planningConstraints.action",
Expand Down Expand Up @@ -63,7 +64,7 @@ export const trackAllowListAnswers: Operation = async () => {

const id = await updateLowcalSessionAllowListAnswers(
sessionId,
allowListAnswers,
allowListAnswers
);
if (id) updatedSessionIds.push(id);
}
Expand Down Expand Up @@ -103,7 +104,7 @@ export const getSubmittedUnAnalyzedSessionIds = async (): Promise<string[]> => {
*/
export const updateLowcalSessionAllowListAnswers = async (
sessionId: string,
allowListAnswers: Passport["data"],
allowListAnswers: Passport["data"]
): Promise<string> => {
try {
const mutation = gql`
Expand All @@ -126,7 +127,7 @@ export const updateLowcalSessionAllowListAnswers = async (
return id;
} catch (error) {
throw new Error(
`Error updating allow_list_answers for lowcal_session ${sessionId}`,
`Error updating allow_list_answers for lowcal_session ${sessionId}`
);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export const ALLOW_LIST = [
"application.type",
"drawBoundary.action",
PASSPORT_FEEDBACK_KEY,
"_feedback.feedbackScore",
"findProperty.action",
"_overrides",
"planningConstraints.action",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ CREATE OR REPLACE VIEW "public"."analytics_summary" AS
((al.allow_list_answers -> 'application.information.harmful'::text))::text AS pre_app_harmful_info,
((al.allow_list_answers -> 'application.information.sensitive'::text))::text AS pre_app_sensitive_info,
(((al.allow_list_answers -> 'application.type'::text) -> 0))::text AS application_type,
((al.allow_list_answers -> '_feedback'::text))::text AS feedback
((al.allow_list_answers -> '_feedback'::text))::text AS feedback,
((al.allow_list_answers -> '_feedback' ->> 'feedbackScore')::text) AS feedback_score
FROM (((analytics a
LEFT JOIN analytics_logs al ON ((a.id = al.analytics_id)))
LEFT JOIN flows f ON ((a.flow_id = f.id)))
Expand Down Expand Up @@ -143,7 +144,8 @@ CREATE OR REPLACE VIEW "public"."submission_services_summary" AS
((ls.allow_list_answers -> 'application.information.harmful'::text))::text AS pre_app_harmful_info,
((ls.allow_list_answers -> 'application.information.sensitive'::text))::text AS pre_app_sensitive_info,
(((ls.allow_list_answers -> 'application.type'::text) -> 0))::text AS application_type,
((ls.allow_list_answers -> '_feedback'::text))::text AS feedback
((ls.allow_list_answers -> '_feedback'::text))::text AS feedback,
((ls.allow_list_answers -> '_feedback' ->> 'feedbackScore')::text) AS feedback_score
FROM (((((((((lowcal_sessions ls
LEFT JOIN flows f ON ((f.id = ls.flow_id)))
LEFT JOIN teams t ON ((t.id = f.team_id)))
Expand Down

0 comments on commit 55ef0bd

Please sign in to comment.