Commit f7e2c9c9 authored by Florent POITTEVIN's avatar Florent POITTEVIN
Browse files

fix: [DLCM-1841] refresh deposit status on detail page properly when submit it

parent a59cb581
......@@ -233,6 +233,13 @@ export class DepositFormPresentational extends AbstractFormPresentational<Deposi
this.commonValueLicenseId = [this.defaultLicenseId];
}
protected override _modelUpdated(oldValue: Deposit | undefined, newValue: Deposit): void {
super._modelUpdated(oldValue, newValue);
if (isNotNullNorUndefined(newValue) && isNotNullNorUndefined(this.form) && isNotNullNorUndefined(this.form.get(this.formDefinition.status))) {
this.form.get(this.formDefinition.status).setValue(newValue.status);
}
}
private _listenerAccessLevel(): Observable<string> {
return this.form.get(this.formDefinition.access).valueChanges.pipe(
tap(() => {
......
......@@ -322,7 +322,7 @@ export class DepositDetailEditRoutable extends AbstractDetailEditRoutable<Deposi
resetIntervalWhenUserMouseEvent: true,
filter: () => this.statusShouldContinuePolling(),
actionToDo: () => {
this._store.dispatch(new DepositAction.GetById(this._resId));
this._store.dispatch(new DepositAction.GetById(this._resId, true));
},
}));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment