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 { FileDataModel } from '../model/file-data.model';
import { AppStateService } from '../../../state/app-state.service'; import { AppStateService } from '../../../state/app-state.service';
import { PermissionsService } from '../../../common/service/permissions.service'; import { PermissionsService } from '../../../common/service/permissions.service';
import { FileData } from '@nrwl/workspace/src/core/file-utils';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
@ -83,7 +82,7 @@ export class FileDownloadService {
default: default:
fileObs$ = fetch() fileObs$ = fetch()
? of(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) => { tap((data) => {
saveTo(data); saveTo(data);
}) })

View File

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

View File

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

View File

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

View File

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

View File

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