From e0070c6e9c60286cdd5ea22eb25648373b726568 Mon Sep 17 00:00:00 2001 From: psiddharthdesign <107192927+psiddharthdesign@users.noreply.github.com> Date: Tue, 30 Jul 2024 18:56:50 +0530 Subject: [PATCH] fix / runs table updated at --- .../[projectSlug]/(specific-project-pages)/AllRunsTable.tsx | 4 ++-- src/data/user/runs.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/(dynamic-pages)/(authenticated-pages)/(application-pages)/project/[projectSlug]/(specific-project-pages)/AllRunsTable.tsx b/src/app/(dynamic-pages)/(authenticated-pages)/(application-pages)/project/[projectSlug]/(specific-project-pages)/AllRunsTable.tsx index 1ec72e2e..6d6c4dc3 100644 --- a/src/app/(dynamic-pages)/(authenticated-pages)/(application-pages)/project/[projectSlug]/(specific-project-pages)/AllRunsTable.tsx +++ b/src/app/(dynamic-pages)/(authenticated-pages)/(application-pages)/project/[projectSlug]/(specific-project-pages)/AllRunsTable.tsx @@ -37,7 +37,7 @@ export const AllRunsTable = ({ runs, projectSlug }: { runs: Tables<'digger_runs' Run ID Commit ID Status - Date + Last updated User @@ -65,7 +65,7 @@ export const AllRunsTable = ({ runs, projectSlug }: { runs: Tables<'digger_runs' {run.status.toUpperCase()} - {moment(run.created_at).fromNow()} + {moment(run.updated_at).fromNow()} {run.approval_author} )) diff --git a/src/data/user/runs.ts b/src/data/user/runs.ts index cc8f22bb..7f774773 100644 --- a/src/data/user/runs.ts +++ b/src/data/user/runs.ts @@ -152,6 +152,7 @@ export async function approveRun( status: 'Approved', approver_user_id: userId, is_approved: true, + updated_at: new Date().toISOString(), }) .eq('id', runId) .select('id') @@ -174,6 +175,7 @@ export async function rejectRun( status: 'Discarded', approver_user_id: userId, is_approved: false, + updated_at: new Date().toISOString(), }) .eq('id', runId) .select('id')