Skip to content

Commit

Permalink
feat(CostSurface): Adapts Scenario piece importer/exporter to account…
Browse files Browse the repository at this point in the history
… for cost surface
  • Loading branch information
KevSanchez committed Sep 26, 2023
1 parent 397f321 commit b8dfdb9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type SelectScenarioResult = {
solutions_are_locked: boolean;
status: ScenarioMetadataContent['status'] | null;
type: string;
cost_surface_id: string;
};

type SelectScenarioBlmResult = {
Expand Down Expand Up @@ -103,6 +104,7 @@ export class ScenarioMetadataPieceExporter implements ExportPieceProcessor {
solutionsAreLocked: scenario.solutions_are_locked,
type: scenario.type,
status: scenario.status ?? undefined,
cost_surface_id: scenario.cost_surface_id,
};

const relativePath = ClonePieceRelativePathResolver.resolveFor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export class ScenarioMetadataPieceImporter implements ImportPieceProcessor {
status: values.status,
created_by: ownerId,
solutions_are_locked: values.solutionsAreLocked,
cost_surface_id: values.cost_surface_id,
})
.execute();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type ScenarioMetadataContent = {
ranAtLeastOnce: boolean;
solutionsAreLocked: boolean;
type: string;
cost_surface_id: string;
};

export const scenarioMetadataRelativePath = `scenario-metadata.json`;

0 comments on commit b8dfdb9

Please sign in to comment.