Skip to content
Snippets Groups Projects
Commit 77e9f149 authored by jojohoch's avatar jojohoch
Browse files

[player] Send every value ElementCode value change to the backend

parent 11dcd294
No related branches found
No related tags found
No related merge requests found
Pipeline #38477 passed
...@@ -105,9 +105,10 @@ export class UnitStateService { ...@@ -105,9 +105,10 @@ export class UnitStateService {
private setElementCodeStatus(id: string, status: ElementCodeStatus): void { private setElementCodeStatus(id: string, status: ElementCodeStatus): void {
const unitStateElementCode = this.getElementCodeById(id); const unitStateElementCode = this.getElementCodeById(id);
if (unitStateElementCode) { if (unitStateElementCode) {
if (ElementCodeStatusValue[status] > ElementCodeStatusValue[unitStateElementCode.status]) { const actualStatus = unitStateElementCode.status;
unitStateElementCode.status = status; unitStateElementCode.status = status;
this._elementCodeChanged.next(unitStateElementCode); this._elementCodeChanged.next(unitStateElementCode);
if (ElementCodeStatusValue[status] > ElementCodeStatusValue[actualStatus]) {
this.checkPresentedPageStatus(this.elementIdPageIndexMap[id]); this.checkPresentedPageStatus(this.elementIdPageIndexMap[id]);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment