mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-08-28 21:47:34 +00:00
Ok first real chunk of zoneless pngx
document list dashboard / widget frame stats
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
DragDropModule,
|
||||
moveItemInArray,
|
||||
} from '@angular/cdk/drag-drop'
|
||||
import { Component, inject } from '@angular/core'
|
||||
import { Component, inject, signal } from '@angular/core'
|
||||
import { RouterModule } from '@angular/router'
|
||||
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
|
||||
import { TourNgBootstrap, TourService } from 'ngx-ui-tour-ng-bootstrap'
|
||||
@@ -47,7 +47,15 @@ export class DashboardComponent extends ComponentWithPermissions {
|
||||
private tourService = inject(TourService)
|
||||
private toastService = inject(ToastService)
|
||||
|
||||
public dashboardViews: SavedView[] = []
|
||||
private dashboardViewsSignal = signal<SavedView[]>([])
|
||||
|
||||
get dashboardViews(): SavedView[] {
|
||||
return this.dashboardViewsSignal()
|
||||
}
|
||||
|
||||
set dashboardViews(value: SavedView[]) {
|
||||
this.dashboardViewsSignal.set(value)
|
||||
}
|
||||
constructor() {
|
||||
super()
|
||||
|
||||
|
||||
+18
-3
@@ -1,6 +1,6 @@
|
||||
import { DecimalPipe } from '@angular/common'
|
||||
import { HttpClient } from '@angular/common/http'
|
||||
import { Component, inject, OnDestroy, OnInit } from '@angular/core'
|
||||
import { Component, inject, OnDestroy, OnInit, signal } from '@angular/core'
|
||||
import { RouterModule } from '@angular/router'
|
||||
import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'
|
||||
import * as mimeTypeNames from 'mime-names'
|
||||
@@ -55,9 +55,24 @@ export class StatisticsWidgetComponent
|
||||
private websocketConnectionService = inject(WebsocketStatusService)
|
||||
private documentListViewService = inject(DocumentListViewService)
|
||||
|
||||
loading: boolean = false
|
||||
private loadingSignal = signal(false)
|
||||
private statisticsSignal = signal<Statistics>({})
|
||||
|
||||
statistics: Statistics = {}
|
||||
get loading(): boolean {
|
||||
return this.loadingSignal()
|
||||
}
|
||||
|
||||
set loading(value: boolean) {
|
||||
this.loadingSignal.set(value)
|
||||
}
|
||||
|
||||
get statistics(): Statistics {
|
||||
return this.statisticsSignal()
|
||||
}
|
||||
|
||||
set statistics(value: Statistics) {
|
||||
this.statisticsSignal.set(value)
|
||||
}
|
||||
|
||||
subscription: Subscription
|
||||
private unsubscribeNotifer: Subject<any> = new Subject()
|
||||
|
||||
@@ -16,13 +16,20 @@ export class WidgetFrameComponent
|
||||
{
|
||||
constructor() {
|
||||
super()
|
||||
this.loading = false
|
||||
}
|
||||
|
||||
@Input()
|
||||
title: string
|
||||
|
||||
@Input()
|
||||
loading: boolean = false
|
||||
override set loading(value: boolean) {
|
||||
super.loading = value
|
||||
}
|
||||
|
||||
override get loading(): boolean {
|
||||
return super.loading
|
||||
}
|
||||
|
||||
@Input()
|
||||
draggable: any
|
||||
|
||||
Reference in New Issue
Block a user