mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-07-09 05:25:10 +00:00
Some missed stuff from build failure
This commit is contained in:
+12
-12
@@ -33,7 +33,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (loading && !documents.length) {
|
||||
@if (loading && !documents().length) {
|
||||
@for (row of placeholderRows; track row) {
|
||||
<tr>
|
||||
@for (field of displayFields; track field; let j = $index) {
|
||||
@@ -52,7 +52,7 @@
|
||||
<td class="py-2 py-md-3 position-relative" [ngClass]="{ 'd-none d-md-table-cell': j > 1 }">
|
||||
@if (loading && !documents().length) {
|
||||
<div class="placeholder-glow text-start">
|
||||
<span class="placeholder bg-secondary w-50" [ngStyle]="{ opacity: 1 - (i * 1/documents().length) }\"></span>
|
||||
<span class="placeholder bg-secondary w-50" [ngStyle]="{ opacity: 1 - (i * 1/documents().length) }"></span>
|
||||
</div>
|
||||
} @else {
|
||||
@switch (field) {
|
||||
@@ -131,23 +131,23 @@
|
||||
</table>
|
||||
} @else if (displayMode() === DisplayMode.SMALL_CARDS) {
|
||||
<div class="row row-cols-paperless-cards my-n2">
|
||||
@if (loading && !documents.length) {
|
||||
@if (loading && !documents().length) {
|
||||
@for (row of placeholderRows; track row) {
|
||||
<pngx-document-card-small
|
||||
class="p-0"
|
||||
[ngStyle]="{ opacity: 1 - (row * 1/placeholderRows.length) }"
|
||||
[document]="null"
|
||||
[displayFields]="displayFields">
|
||||
[displayFields]="displayFields()">
|
||||
</pngx-document-card-small>
|
||||
}
|
||||
}
|
||||
@for (d of documents; track d.id; let i = $index) {
|
||||
@for (d of documents(); track d.id; let i = $index) {
|
||||
<pngx-document-card-small
|
||||
class="p-0"
|
||||
[ngStyle]="{ opacity: show ? 1 : 1 - (i * 1/documents.length) }"
|
||||
[ngStyle]="{ opacity: show() ? 1 : 1 - (i * 1/documents().length) }"
|
||||
(dblClickDocument)="openDocumentDetail(d)"
|
||||
[document]="d"
|
||||
[displayFields]="displayFields"
|
||||
[displayFields]="displayFields()"
|
||||
(clickTag)="clickTag($event)"
|
||||
(clickCorrespondent)="clickCorrespondent($event)"
|
||||
(clickStoragePath)="clickStoragePath($event)"
|
||||
@@ -155,9 +155,9 @@
|
||||
</pngx-document-card-small>
|
||||
}
|
||||
</div>
|
||||
} @else if (displayMode === DisplayMode.LARGE_CARDS) {
|
||||
} @else if (displayMode() === DisplayMode.LARGE_CARDS) {
|
||||
<div class="row my-n2">
|
||||
@if (loading && !documents.length) {
|
||||
@if (loading && !documents().length) {
|
||||
@for (row of placeholderRows; track row) {
|
||||
<pngx-document-card-large
|
||||
[document]="null"
|
||||
@@ -166,12 +166,12 @@
|
||||
</pngx-document-card-large>
|
||||
}
|
||||
}
|
||||
@for (d of documents; track d.id; let i = $index) {
|
||||
@for (d of documents(); track d.id; let i = $index) {
|
||||
<pngx-document-card-large
|
||||
(dblClickDocument)="openDocumentDetail(d)"
|
||||
[document]="d"
|
||||
[ngStyle]="{ opacity: show ? 1 : 1 - (i * 1/documents.length) }"
|
||||
[displayFields]="displayFields"
|
||||
[ngStyle]="{ opacity: show() ? 1 : 1 - (i * 1/documents().length) }"
|
||||
[displayFields]="displayFields()"
|
||||
(clickTag)="clickTag($event)"
|
||||
(clickCorrespondent)="clickCorrespondent($event)"
|
||||
(clickStoragePath)="clickStoragePath($event)"
|
||||
|
||||
+12
-9
@@ -154,14 +154,17 @@ export class SavedViewWidgetComponent
|
||||
this.savedView.display_fields &&
|
||||
this.savedView.display_fields.length > 0
|
||||
) {
|
||||
this.displayFields = this.savedView.display_fields
|
||||
this.displayFields.set(this.savedView.display_fields)
|
||||
}
|
||||
|
||||
// filter by perms etc
|
||||
this.displayFields = this.displayFields.filter(
|
||||
(field) =>
|
||||
this.settingsService.allDisplayFields().find((f) => f.id === field) !==
|
||||
undefined
|
||||
this.displayFields.set(
|
||||
this.displayFields().filter(
|
||||
(field) =>
|
||||
this.settingsService
|
||||
.allDisplayFields()
|
||||
.find((f) => f.id === field) !== undefined
|
||||
)
|
||||
)
|
||||
|
||||
this.reload()
|
||||
@@ -179,8 +182,8 @@ export class SavedViewWidgetComponent
|
||||
}
|
||||
|
||||
reload() {
|
||||
this.loading = this.documents.length == 0
|
||||
this.show = true
|
||||
this.loading.set(this.documents.length == 0)
|
||||
this.show.set(true)
|
||||
this.documentService
|
||||
.listFiltered(
|
||||
1,
|
||||
@@ -195,8 +198,8 @@ export class SavedViewWidgetComponent
|
||||
this.documents.set(result.results)
|
||||
this.count.set(result.count)
|
||||
this.savedViewService.setDocumentCount(this.savedView, result.count)
|
||||
this.loading = false
|
||||
this.show = true
|
||||
this.loading.set(false)
|
||||
this.show.set(true)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1033,14 +1033,14 @@ export class BulkEditorComponent
|
||||
dialog.confirmClicked
|
||||
.pipe(takeUntil(this.unsubscribeNotifier))
|
||||
.subscribe(() => {
|
||||
dialog.loading = true
|
||||
dialog.loading.set(true)
|
||||
dialog.buttonsEnabled = false
|
||||
this.shareLinkBundleService
|
||||
.createBundle(dialog.payload)
|
||||
.pipe(first())
|
||||
.subscribe({
|
||||
next: (result) => {
|
||||
dialog.loading = false
|
||||
dialog.loading.set(false)
|
||||
dialog.buttonsEnabled = false
|
||||
dialog.createdBundle = result
|
||||
dialog.copied = false
|
||||
@@ -1054,7 +1054,7 @@ export class BulkEditorComponent
|
||||
)
|
||||
},
|
||||
error: (error) => {
|
||||
dialog.loading = false
|
||||
dialog.loading.set(false)
|
||||
dialog.buttonsEnabled = true
|
||||
this.toastService.showError(
|
||||
$localize`Share link bundle creation is not available yet.`,
|
||||
|
||||
+1
-1
@@ -131,7 +131,7 @@ export class DocumentCardLargeComponent
|
||||
popoverHidden = true
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
this.show = true
|
||||
this.show.set(true)
|
||||
}
|
||||
|
||||
get searchScoreClass() {
|
||||
|
||||
+1
-1
@@ -128,7 +128,7 @@ export class DocumentCardSmallComponent
|
||||
@ViewChild('popupPreview') popupPreview: PreviewPopupComponent
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
this.show = true
|
||||
this.show.set(true)
|
||||
}
|
||||
|
||||
getIsThumbInverted() {
|
||||
|
||||
@@ -1166,13 +1166,13 @@ export class FilterEditorComponent
|
||||
private maybeCompleteLoading() {
|
||||
this.loadingCount++
|
||||
if (this.loadingCount == this.loadingCountTotal) {
|
||||
this.loading = false
|
||||
this.show = true
|
||||
this.loading.set(false)
|
||||
this.show.set(true)
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.loading = true
|
||||
this.loading.set(true)
|
||||
if (
|
||||
this.permissionsService.currentUserCan(
|
||||
PermissionAction.View,
|
||||
|
||||
@@ -39,7 +39,7 @@ export class FileDropComponent {
|
||||
return
|
||||
event.preventDefault()
|
||||
event.stopImmediatePropagation()
|
||||
this.settings.globalDropzoneActive = true
|
||||
this.settings.globalDropzoneActive.set(true)
|
||||
// allows transition
|
||||
setTimeout(() => {
|
||||
this.fileIsOver.set(true)
|
||||
@@ -56,7 +56,7 @@ export class FileDropComponent {
|
||||
if (!this.dragDropEnabled) return
|
||||
event?.preventDefault()
|
||||
event?.stopImmediatePropagation()
|
||||
this.settings.globalDropzoneActive = false
|
||||
this.settings.globalDropzoneActive.set(false)
|
||||
|
||||
const ms = immediate ? 0 : 500
|
||||
|
||||
|
||||
+3
-3
@@ -58,7 +58,7 @@ export class CustomFieldsComponent
|
||||
}
|
||||
|
||||
reload() {
|
||||
this.loading = true
|
||||
this.loading.set(true)
|
||||
this.customFieldsService
|
||||
.listAll()
|
||||
.pipe(
|
||||
@@ -68,8 +68,8 @@ export class CustomFieldsComponent
|
||||
})
|
||||
)
|
||||
.subscribe(() => {
|
||||
this.show = true
|
||||
this.loading = false
|
||||
this.show.set(true)
|
||||
this.loading.set(false)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -189,8 +189,8 @@ export class DocumentAttributesComponent implements OnInit, OnDestroy {
|
||||
|
||||
get activeHeaderLoading(): boolean {
|
||||
return (
|
||||
this.activeManagementList?.loading ??
|
||||
this.activeCustomFields?.loading ??
|
||||
this.activeManagementList?.loading() ??
|
||||
this.activeCustomFields?.loading() ??
|
||||
false
|
||||
)
|
||||
}
|
||||
|
||||
+3
-3
@@ -245,7 +245,7 @@ export abstract class ManagementListComponent<T extends MatchingModel>
|
||||
}
|
||||
|
||||
reloadData(extraParams: { [key: string]: any } = null) {
|
||||
this.loading = true
|
||||
this.loading.set(true)
|
||||
this.currentExtraParams = extraParams
|
||||
this.clearSelection()
|
||||
this.service
|
||||
@@ -275,8 +275,8 @@ export abstract class ManagementListComponent<T extends MatchingModel>
|
||||
}
|
||||
},
|
||||
next: () => {
|
||||
this.show = true
|
||||
this.loading = false
|
||||
this.show.set(true)
|
||||
this.loading.set(false)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ export class SavedViewsComponent
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
this.settings.organizingSidebarSavedViews = true
|
||||
this.settings.organizingSidebarSavedViews.set(true)
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
@@ -87,7 +87,7 @@ export class SavedViewsComponent
|
||||
}
|
||||
|
||||
private reloadViews(): void {
|
||||
this.loading = true
|
||||
this.loading.set(true)
|
||||
this.savedViewService
|
||||
.list(null, null, null, false, { full_perms: true })
|
||||
.subscribe((r) => {
|
||||
@@ -97,12 +97,12 @@ export class SavedViewsComponent
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.settings.organizingSidebarSavedViews = false
|
||||
this.settings.organizingSidebarSavedViews.set(false)
|
||||
super.ngOnDestroy()
|
||||
}
|
||||
|
||||
private initialize() {
|
||||
this.loading = false
|
||||
this.loading.set(false)
|
||||
this.emptyGroup(this.savedViewsGroup)
|
||||
|
||||
let storeData = {
|
||||
|
||||
@@ -46,7 +46,7 @@ export class WorkflowsComponent
|
||||
}
|
||||
|
||||
reload() {
|
||||
this.loading = true
|
||||
this.loading.set(true)
|
||||
this.workflowService
|
||||
.listAll()
|
||||
.pipe(
|
||||
@@ -54,8 +54,8 @@ export class WorkflowsComponent
|
||||
tap((r) => this.workflows.set(r.results))
|
||||
)
|
||||
.subscribe(() => {
|
||||
this.show = true
|
||||
this.loading = false
|
||||
this.show.set(true)
|
||||
this.loading.set(false)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ export class DocumentListViewService {
|
||||
this.activeListViewState.displayFields =
|
||||
this.activeListViewState.displayFields.filter(
|
||||
(field) =>
|
||||
this.settings.allDisplayFields.find((f) => f.id === field) !==
|
||||
this.settings.allDisplayFields().find((f) => f.id === field) !==
|
||||
undefined
|
||||
)
|
||||
this.saveDocumentListView()
|
||||
@@ -371,9 +371,9 @@ export class DocumentListViewService {
|
||||
this.reload()
|
||||
} else if (
|
||||
activeListViewState.sortField.indexOf('custom_field') === 0 &&
|
||||
this.settings.allDisplayFields.find(
|
||||
(f) => f.id === activeListViewState.sortField
|
||||
) === undefined
|
||||
this.settings
|
||||
.allDisplayFields()
|
||||
.find((f) => f.id === activeListViewState.sortField) === undefined
|
||||
) {
|
||||
// e.g. field was deleted
|
||||
this.sortField = 'created'
|
||||
@@ -551,7 +551,7 @@ export class DocumentListViewService {
|
||||
this.activeListViewState.displayFields = this.displayFieldsInitialized
|
||||
? fields?.filter(
|
||||
(field) =>
|
||||
this.settings.allDisplayFields.find((f) => f.id === field) !==
|
||||
this.settings.allDisplayFields().find((f) => f.id === field) !==
|
||||
undefined
|
||||
)
|
||||
: fields
|
||||
|
||||
@@ -369,7 +369,7 @@ export class SettingsService {
|
||||
this.currentUser.set(uisettings.user)
|
||||
this.permissionsService.initialize(
|
||||
uisettings.permissions,
|
||||
this.currentUser
|
||||
this.currentUser()
|
||||
)
|
||||
|
||||
this.initializeDisplayFields()
|
||||
@@ -419,7 +419,7 @@ export class SettingsService {
|
||||
)
|
||||
) {
|
||||
this.customFieldsService.listAll().subscribe((r) => {
|
||||
this.allDisplayFieldsSignal.set(
|
||||
this.allDisplayFields.set(
|
||||
displayFields.concat(
|
||||
r.results.map((field) => {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user