Skip to content

Commit

Permalink
fix: remove confirm state when policy changed or submitted
Browse files Browse the repository at this point in the history
  • Loading branch information
gcusnieux committed Nov 6, 2023
1 parent 4e190cb commit 807e7fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/policy-studio/gv-design/gv-design.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ export class GvDesign extends KeyboardElement(LitElement) {
});
this._initialDefinition = { ...definition, flows, resources, plans };
this._definition = deepClone(this._initialDefinition);
this._currentAskConfirmation = null;
this.isDirty = false;
this._selectFirstFlow();
}
Expand Down Expand Up @@ -563,6 +564,7 @@ export class GvDesign extends KeyboardElement(LitElement) {
}

_onChangeFlowStepState({ detail }) {
this._currentAskConfirmation = null;
const targetFlow = this._findFlowById(detail.flowId);
const step = targetFlow[detail.flowKey][detail.position];
step.enabled = detail.enabled;
Expand Down Expand Up @@ -778,6 +780,7 @@ export class GvDesign extends KeyboardElement(LitElement) {
}

async _onSubmitFlowStep({ detail }) {
this._currentAskConfirmation = null;
this._writeFlowStep(detail.values);
await this.requestUpdate('_definition');
this.getChildren().forEach((c) => c.requestUpdate());
Expand Down

0 comments on commit 807e7fb

Please sign in to comment.