Fix tab ids & date parsing

This commit is contained in:
Michael Shamoon 2022-09-27 17:56:04 -07:00
parent 14b6216b49
commit c289439cab
4 changed files with 8 additions and 8 deletions

View File

@ -54,7 +54,7 @@
</div>
</th>
<td class="overflow-auto">{{ task.name }}</td>
<td class="d-none d-lg-table-cell">{{ task.created | customDate:'short' }}</td>
<td class="d-none d-lg-table-cell">{{ task.date_created | customDate:'short' }}</td>
<td class="d-none d-lg-table-cell" *ngIf="activeTab != 'started' && activeTab != 'queued'">
<div *ngIf="task.result.length > 50" class="result" (click)="expandTask(task); $event.stopPropagation();"
[ngbPopover]="resultPopover" popoverClass="shadow small mobile" triggers="mouseenter:mouseleave" container="body">

View File

@ -1,6 +1,6 @@
import { Component, OnInit, OnDestroy } from '@angular/core'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { takeUntil, Subject, first } from 'rxjs'
import { Subject, first } from 'rxjs'
import { PaperlessTask } from 'src/app/data/paperless-task'
import { TasksService } from 'src/app/services/tasks.service'
import { ConfirmDialogComponent } from '../../common/confirm-dialog/confirm-dialog.component'
@ -77,16 +77,16 @@ export class TasksComponent implements OnInit, OnDestroy {
get currentTasks(): PaperlessTask[] {
let tasks: PaperlessTask[]
switch (this.activeTab) {
case 'PENDING':
case 'queued':
tasks = this.tasksService.queuedFileTasks
break
case 'STARTED':
case 'started':
tasks = this.tasksService.startedFileTasks
break
case 'SUCCESS':
case 'completed':
tasks = this.tasksService.completedFileTasks
break
case 'FAILURE':
case 'failed':
tasks = this.tasksService.failedFileTasks
break
default:

View File

@ -23,7 +23,7 @@ export interface PaperlessTask extends ObjectWithId {
name: string
created: Date
date_created: Date
done?: Date

View File

@ -1,6 +1,6 @@
import { HttpClient } from '@angular/common/http'
import { Injectable } from '@angular/core'
import { first, map } from 'rxjs/operators'
import { first } from 'rxjs/operators'
import {
PaperlessTask,
PaperlessTaskStatus,