Skip to content

Commit

Permalink
update project column reference
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeh committed Nov 28, 2024
1 parent 8ab6722 commit 3a1146b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions admin/resources/projects/projects.resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -25,7 +28,7 @@ export const ProjectsResource: ResourceWithOptions = {
"totalCostNPV",
"costPerTCO2eNPV",
"initialPriceAssumption",
"activitySubtype",
"restorationActivity",
"projectSizeFilter",
"priceType",
],
Expand All @@ -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);
Expand All @@ -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")
Expand All @@ -65,7 +68,7 @@ export const ProjectsResource: ResourceWithOptions = {
.addSelect("project.priceType", "priceType")
.addSelect(
"project.initialPriceAssumption",
"initialPriceAssumption"
"initialPriceAssumption",
);

if (records?.length) {
Expand Down

0 comments on commit 3a1146b

Please sign in to comment.