Skip to content

Commit cf4db00

Browse files
RRanathccbc-service-account
authored andcommitted
fix: show deleted data in changelog
1 parent 4e3007a commit cf4db00

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

app/components/AnalystDashboard/ProjectChangeLog.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,7 @@ const ProjectChangeLog: React.FC<Props> = () => {
980980
let prevJson = {};
981981

982982
// Handle different data sources based on table type
983+
const isDeleted = record?.history_operation === 'deleted';
983984
if (
984985
tableName === 'form_data' ||
985986
tableName === 'rfi_data' ||
@@ -992,8 +993,13 @@ const ProjectChangeLog: React.FC<Props> = () => {
992993
tableName === 'application_milestone_data' ||
993994
tableName === 'application_dependencies'
994995
) {
995-
json = record?.json_data || {};
996-
prevJson = oldRecord?.json_data || {};
996+
if (isDeleted) {
997+
json = {};
998+
prevJson = oldRecord?.json_data || record?.json_data || {};
999+
} else {
1000+
json = record?.json_data || {};
1001+
prevJson = oldRecord?.json_data || {};
1002+
}
9971003

9981004
// For SOW uploads, oldRecord can be missing; use form_data as fallback
9991005
// so old project title/organization name do not show as N/A.

0 commit comments

Comments
 (0)