Skip to content

Commit

Permalink
[EdgeDB] Tweak StepProgress context (#3119)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarsonF committed Mar 20, 2024
1 parent 37c3b72 commit 328b7b2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
17 changes: 17 additions & 0 deletions dbschema/migrations/00069.edgeql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CREATE MIGRATION m1uqme6noxofu7imqwvszj4ljpybefs7jgamutiv35ttbes5nwd3oq
ONTO m1dtvcrlfunyjcbw3b7ojqencgpo3cs77jzgkwdjvgkg2gxa7frz4q
{
ALTER TYPE ProgressReport::ProductProgress::Step {
CREATE LINK projectContext: Project::Context {
SET REQUIRED USING (<Project::Context>{});
};
EXTENDING Project::ContextAware LAST;
};
ALTER TYPE ProgressReport::ProductProgress::Step {
ALTER LINK projectContext {
RESET OPTIONALITY;
DROP OWNED;
RESET TYPE;
};
};
};
2 changes: 1 addition & 1 deletion dbschema/product-progress.esdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module ProgressReport::ProductProgress {
type Step extending Mixin::Timestamped {
type Step extending Mixin::Timestamped, Project::ContextAware {
required report: default::ProgressReport;
required product: default::Product;
required variant: Variant;
Expand Down
4 changes: 3 additions & 1 deletion src/components/product-progress/dto/product-progress.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ export type UnsecuredProductProgress = Merge<
export class StepProgress {
static readonly Props = keysOf<StepProgress>();
static readonly SecuredProps = keysOf<SecuredProps<StepProgress>>();
static readonly Parent = 'dynamic'; // [Product, ProgressReport]
static readonly Parent = import('../../progress-report/dto').then(
(m) => m.ProgressReport, // technically ProgressReport & Product
);
static readonly Variants = ProgressReportVariantProgress.Variants;
static readonly ConfirmThisClassPassesSensitivityToPolicies = true;

Expand Down

0 comments on commit 328b7b2

Please sign in to comment.