show file status only for some files

This commit is contained in:
Timo Bejan 2020-11-03 12:59:36 +02:00
parent 029fd53079
commit a7bbfb3b9c
2 changed files with 8 additions and 4 deletions

View File

@ -66,7 +66,6 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy {
});
this.appStateService.fileStatusChanged.subscribe(() => {
console.log('fs changed, rebuild');
this._calculateData();
});
}
@ -349,7 +348,10 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy {
}
fileNotUpToDateWithDictionary(fileStatus: FileStatus) {
return fileStatus.dictionaryVersion !== this.appStateService.dictionaryVersion;
return (
(fileStatus.status === 'UNASSIGNED' || fileStatus.status === 'UNDER_REVIEW') &&
fileStatus.dictionaryVersion !== this.appStateService.dictionaryVersion
);
}
requestApprovalOrApproveFile($event: MouseEvent, fileStatus: FileStatus) {

View File

@ -466,7 +466,9 @@ export class AppStateService {
}
async updateDictionaryVersion() {
// this._appState.dictionaryVersion = await this._dictionaryControllerService.getVersion().toPromise();
this._appState.dictionaryVersion = 42;
this._appState.dictionaryVersion = await this._dictionaryControllerService
.getVersion()
.toPromise();
// this._appState.dictionaryVersion = 42;
}
}