fixed status

This commit is contained in:
Timo Bejan 2020-11-17 14:18:38 +02:00
parent a47d41016c
commit f455b3e72e
6 changed files with 6 additions and 6 deletions

View File

@ -12,7 +12,6 @@ import { FileType } from '../model/file-type';
import { FileDataModel } from '../model/file-data.model';
import { AppStateService } from '../../../state/app-state.service';
import { PermissionsService } from '../../../common/service/permissions.service';
import { FileData } from '@nrwl/workspace/src/core/file-utils';
@Injectable({
providedIn: 'root'
@ -83,7 +82,7 @@ export class FileDownloadService {
default:
fileObs$ = fetch()
? of(fetch())
: this._fileUploadControllerService.downloadOriginalFile(fileStatus.fileId, true, fileStatus.added, 'body').pipe(
: this._fileUploadControllerService.downloadOriginalFile(fileStatus.fileId, true, fileStatus.lastUploaded, 'body').pipe(
tap((data) => {
saveTo(data);
})

View File

@ -108,7 +108,6 @@ export class BulkActionsComponent {
}
public setToUnderApproval() {
const promises = this.selectedFiles.map((file) => this._fileActionService.setFileUnderApproval(file).toPromise());
console.log(promises.length);
Promise.all(promises).then(() => {
this.reload.emit();

View File

@ -213,7 +213,7 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy {
label: humanize(status)
});
});
console.log(statusFilters);
statusFilters.sort((a, b) => StatusSorter[a.key] - StatusSorter[b.key]);
this.statusFilters = processFilters(this.statusFilters, statusFilters);

View File

@ -245,7 +245,6 @@ export class CacheApiService {
const expires = response.headers.get('_expires');
try {
if (parseInt(expires, 10) < now) {
console.log('remove cache', key);
cache.delete(key);
}
} catch (e) {}

View File

@ -33,7 +33,6 @@ export async function wipeCaches(logoutDependant: boolean = false) {
export async function wipeCacheEntry(cacheName: string, entry: string) {
caches.open(cacheName).then((cache) => {
console.log('delete:', entry);
cache.delete(entry, { ignoreSearch: false });
});
}

View File

@ -62,6 +62,10 @@ export interface FileStatus {
* Date and time when the file was last updated.
*/
lastUpdated?: string;
/**
* Date and time when the file was last uploaded.
*/
lastUploaded: string;
/**
* The number of times the file has been analyzed.
*/