Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tst fix #253

Merged
merged 4 commits into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20
FROM node:18

ARG NEXT_PUBLIC_SUPABASE_URL
ARG NEXT_PUBLIC_SUPABASE_ANON_KEY
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.8'
services:
frontend:
image: 'ghcr.io/generation-d/application-platform-prd:latest'
Expand Down
3,498 changes: 2,095 additions & 1,403 deletions frontend/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@reduxjs/toolkit": "^2.0.0",
"@supabase/ssr": "^0.0.10",
"@supabase/supabase-js": "^2.38.4",
"@types/node": "20.10.3",
"@types/node": "^18",
"@types/nodemailer": "^6.4.14",
"@types/react": "18.2.41",
"@types/react-dom": "18.2.17",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/actions/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export interface ApplicantsStatus {
}

export async function fetchAllApplicantsStatus(): Promise<ApplicantsStatus[]> {
const supabase = await initSupabaseActions()
const supabase = await initSupabaseActions();
const { data: applicantsStatusData, error: applicantsStatusError } =
await supabase.from("phase_outcome_table").select("*");
if (applicantsStatusError) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/actions/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ export async function signInWithSlack() {
const supabase = await initSupabaseActions();

const { data, error } = await supabase.auth.signInWithOAuth({
provider: "slack",
provider: "slack_oidc",
options: {
redirectTo: `${getURL()}auth/admin/callback/`,
},
Expand Down
39 changes: 18 additions & 21 deletions frontend/src/actions/phase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,15 @@ export async function fetch_question_type_table(questions: DefaultQuestion[]) {
}
const supabase = await initSupabaseActions();

const { data: questionTypeData, error: questionTypeError } =
await supabase
.from(tableName)
.select("*")
.in(
"questionid",
questions
.filter((q) => q.questiontype === questionType)
.map((q) => q.questionid),
);
const { data: questionTypeData, error: questionTypeError } = await supabase
.from(tableName)
.select("*")
.in(
"questionid",
questions
.filter((q) => q.questiontype === questionType)
.map((q) => q.questionid),
);

if (questionTypeError) {
log.error(JSON.stringify(questionTypeError));
Expand Down Expand Up @@ -101,7 +100,7 @@ export async function fetchAdditionalParams(
);
return {};
}
const supabase = await initSupabaseActions()
const supabase = await initSupabaseActions();
const { data: paramsData, error } = await supabase
.from(table_name)
.select("*");
Expand Down Expand Up @@ -177,11 +176,10 @@ export async function fetch_question_table(
phaseId: string,
): Promise<Question[]> {
const supabase = await initSupabaseActions();
const { data: questionData, error: questionError } =
await supabase
.from("question_table")
.select("*")
.eq("phaseid", phaseId);
const { data: questionData, error: questionError } = await supabase
.from("question_table")
.select("*")
.eq("phaseid", phaseId);

if (questionError) {
log.error(JSON.stringify(questionError));
Expand Down Expand Up @@ -235,11 +233,10 @@ export async function fetch_question_table(
}

export async function fetch_conditional_questionid_mapping() {
const supabase = await initSupabaseActions()
const { data: conditionalData, error: conditionalError } =
await supabase
.from("conditional_question_choice_table")
.select("*");
const supabase = await initSupabaseActions();
const { data: conditionalData, error: conditionalError } = await supabase
.from("conditional_question_choice_table")
.select("*");
if (conditionalError) {
log.error(JSON.stringify(conditionalError));
return {} as Record<string, string[]>;
Expand Down
22 changes: 22 additions & 0 deletions frontend/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,28 @@ export default async function Home() {
<>
<div className="flex flex-col items-start justify-between space-y-4">
<Apl_Header />
<style>
{`
.markdown-body ul {
list-style-type: disc;
}
.markdown-body ol {
list-style-type: decimal;
}
.markdown-body ul ul {
list-style-type: circle;
}
.markdown-body ol ul {
list-style-type: disc;
}
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ol ol {
list-style-type: lower-alpha;
}
`}
</style>
<div
className="markdown-body"
dangerouslySetInnerHTML={{ __html: contentHtml }}
Expand Down
Loading