From 3a1146bd3fc6afdb0bc6770bca1ac3cea8eca0d3 Mon Sep 17 00:00:00 2001 From: alexeh Date: Thu, 28 Nov 2024 08:27:24 +0100 Subject: [PATCH] update project column reference --- admin/resources/projects/projects.resource.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/admin/resources/projects/projects.resource.ts b/admin/resources/projects/projects.resource.ts index 4214b774..0503371e 100644 --- a/admin/resources/projects/projects.resource.ts +++ b/admin/resources/projects/projects.resource.ts @@ -8,7 +8,10 @@ import { import { dataSource } from "../../datasource.js"; import { Project } from "@shared/entities/projects.entity.js"; import { Country } from "@shared/entities/country.entity.js"; -import { COMMON_RESOURCE_LIST_PROPERTIES, GLOBAL_COMMON_PROPERTIES } from "../common/common.resources.js"; +import { + COMMON_RESOURCE_LIST_PROPERTIES, + GLOBAL_COMMON_PROPERTIES, +} from "../common/common.resources.js"; export const ProjectsResource: ResourceWithOptions = { resource: Project, @@ -25,7 +28,7 @@ export const ProjectsResource: ResourceWithOptions = { "totalCostNPV", "costPerTCO2eNPV", "initialPriceAssumption", - "activitySubtype", + "restorationActivity", "projectSizeFilter", "priceType", ], @@ -42,7 +45,7 @@ export const ProjectsResource: ResourceWithOptions = { after: async ( request: ActionRequest, response: ActionResponse, - context: ActionContext + context: ActionContext, ) => { const { records } = context; const projectDataRepo = dataSource.getRepository(Project); @@ -53,7 +56,7 @@ export const ProjectsResource: ResourceWithOptions = { .addSelect("project.projectName", "projectName") .addSelect("project.ecosystem", "ecosystem") .addSelect("project.activity", "activity") - .addSelect("project.activitySubtype", "activitySubtype") + .addSelect("project.restorationActivity", "restorationActivity") .addSelect("country.name", "countryName") .addSelect("project.projectSize", "projectSize") .addSelect("project.projectSizeFilter", "projectSizeFilter") @@ -65,7 +68,7 @@ export const ProjectsResource: ResourceWithOptions = { .addSelect("project.priceType", "priceType") .addSelect( "project.initialPriceAssumption", - "initialPriceAssumption" + "initialPriceAssumption", ); if (records?.length) {