mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Update frontend consumer status phases
This commit is contained in:
@@ -84,7 +84,7 @@ describe('UploadFileWidgetComponent', () => {
|
||||
|
||||
it('should change color by status phase', () => {
|
||||
const processingStatus = new FileStatus()
|
||||
processingStatus.phase = FileStatusPhase.PROCESSING
|
||||
processingStatus.phase = FileStatusPhase.WORKING
|
||||
expect(component.getStatusColor(processingStatus)).toEqual('primary')
|
||||
const failedStatus = new FileStatus()
|
||||
failedStatus.phase = FileStatusPhase.FAILED
|
||||
@@ -134,7 +134,7 @@ function mockConsumerStatuses(consumerStatusService) {
|
||||
switch (phase) {
|
||||
case FileStatusPhase.FAILED:
|
||||
return [new FileStatus()]
|
||||
case FileStatusPhase.PROCESSING:
|
||||
case FileStatusPhase.WORKING:
|
||||
return [new FileStatus(), new FileStatus()]
|
||||
case FileStatusPhase.STARTED:
|
||||
return [new FileStatus(), new FileStatus(), new FileStatus()]
|
||||
|
@@ -90,8 +90,9 @@ export class UploadFileWidgetComponent extends ComponentWithPermissions {
|
||||
|
||||
getStatusColor(status: FileStatus) {
|
||||
switch (status.phase) {
|
||||
case FileStatusPhase.PROCESSING:
|
||||
case FileStatusPhase.UPLOADING:
|
||||
case FileStatusPhase.STARTED:
|
||||
case FileStatusPhase.WORKING:
|
||||
return 'primary'
|
||||
case FileStatusPhase.FAILED:
|
||||
return 'danger'
|
||||
|
Reference in New Issue
Block a user