Skip to content

Commit

Permalink
Addressed PR review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
onehanddev authored and alexeh committed Nov 28, 2024
1 parent ef20bd0 commit 8ab6722
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions admin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { ModelAssumptionResource } from "./resources/model-assumptions/model-ass
import { UserUploadCostInputs } from "@shared/entities/users/user-upload-cost-inputs.entity.js";
import { UserUploadConservationInputs } from "@shared/entities/users/user-upload-conservation-inputs.entity.js";
import { UserUploadRestorationInputs } from "@shared/entities/users/user-upload-restoration-inputs.entity.js";
import { GLOBAL_COMMON_PROPERTIES } from "./resources/common/common.resources.js";

AdminJS.registerAdapter({
Database: AdminJSTypeorm.Database,
Expand Down Expand Up @@ -70,6 +71,9 @@ const start = async () => {
name: "User Data",
icon: "File",
},
properties: {
...GLOBAL_COMMON_PROPERTIES,
}
},
},
{
Expand All @@ -80,6 +84,9 @@ const start = async () => {
name: "User Data",
icon: "File",
},
properties: {
...GLOBAL_COMMON_PROPERTIES,
}
},
},
{
Expand All @@ -90,6 +97,9 @@ const start = async () => {
name: "User Data",
icon: "File",
},
properties: {
...GLOBAL_COMMON_PROPERTIES,
}
},
},
ProjectSizeResource,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ResourceWithOptions } from "adminjs";
import { ConservationPlanningAndAdmin } from "@shared/entities/cost-inputs/conservation-and-planning-admin.entity.js";
import { GLOBAL_COMMON_PROPERTIES, COMMON_RESOURCE_LIST_PROPERTIES } from "../common/common.resources.js";
import { GLOBAL_COMMON_PROPERTIES } from "../common/common.resources.js";

export const ConservationAndPlanningAdminResource: ResourceWithOptions = {
resource: ConservationPlanningAndAdmin,
options: {
properties: {...COMMON_RESOURCE_LIST_PROPERTIES, ...GLOBAL_COMMON_PROPERTIES},
properties: {...GLOBAL_COMMON_PROPERTIES},
sort: {
sortBy: "planningCost",
direction: "desc",
Expand Down

0 comments on commit 8ab6722

Please sign in to comment.