mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	use the observables everywhere in the application.
This commit is contained in:
		@@ -13,7 +13,7 @@
 | 
			
		||||
    <tbody>
 | 
			
		||||
      <tr *ngFor="let doc of documents" routerLink="/documents/{{doc.id}}">
 | 
			
		||||
        <td>{{doc.created | date}}</td>
 | 
			
		||||
        <td>{{doc.title}}<app-tag [tag]="t" *ngFor="let t of doc.tags_objects" class="ml-1"></app-tag>
 | 
			
		||||
        <td>{{doc.title}}<app-tag [tag]="t" *ngFor="let t of doc.tags$ | async" class="ml-1"></app-tag>
 | 
			
		||||
      </tr>
 | 
			
		||||
    </tbody>
 | 
			
		||||
  </table>
 | 
			
		||||
 
 | 
			
		||||
@@ -8,12 +8,12 @@
 | 
			
		||||
 | 
			
		||||
        <div class="d-flex justify-content-between align-items-center">
 | 
			
		||||
          <h5 class="card-title">    
 | 
			
		||||
            <ng-container *ngIf="document.correspondent_object">
 | 
			
		||||
              <a *ngIf="clickCorrespondent.observers.length ; else nolink" [routerLink]="" title="Filter by correspondent" (click)="clickCorrespondent.emit(document.correspondent)" class="font-weight-bold">{{document.correspondent_object.name}}</a>
 | 
			
		||||
              <ng-template #nolink>{{document.correspondent_object.name}}</ng-template>:
 | 
			
		||||
            <ng-container *ngIf="document.correspondent">
 | 
			
		||||
              <a *ngIf="clickCorrespondent.observers.length ; else nolink" [routerLink]="" title="Filter by correspondent" (click)="clickCorrespondent.emit(document.correspondent)" class="font-weight-bold">{{(document.correspondent$ | async)?.name}}</a>
 | 
			
		||||
              <ng-template #nolink>{{(document.correspondent$ | async)?.name}}</ng-template>:
 | 
			
		||||
            </ng-container>
 | 
			
		||||
            {{document.title}}
 | 
			
		||||
            <app-tag [tag]="t" linkTitle="Filter by tag" *ngFor="let t of document.tags_objects" class="ml-1" (click)="clickTag.emit(t.id)" [clickable]="clickTag.observers.length"></app-tag>
 | 
			
		||||
            <app-tag [tag]="t" linkTitle="Filter by tag" *ngFor="let t of document.tags$ | async" class="ml-1" (click)="clickTag.emit(t.id)" [clickable]="clickTag.observers.length"></app-tag>
 | 
			
		||||
          </h5>
 | 
			
		||||
          <h5 class="card-title" *ngIf="document.archive_serial_number">#{{document.archive_serial_number}}</h5>
 | 
			
		||||
        </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,15 +1,15 @@
 | 
			
		||||
<div class="col p-2 h-100" style="width: 16rem;">
 | 
			
		||||
  <div class="card h-100 shadow-sm">
 | 
			
		||||
    <div class=" border-bottom doc-img pr-1" [ngStyle]="{'background-image': 'url(' + getThumbUrl() + ')'}">
 | 
			
		||||
      <div class="row" *ngFor="let t of document.tags_objects">
 | 
			
		||||
      <div class="row" *ngFor="let t of document.tags$ | async">
 | 
			
		||||
        <app-tag style="font-size: large;" [tag]="t" class="col text-right" (click)="clickTag.emit(t.id)" [clickable]="true" linkTitle="Filter by tag"></app-tag>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    
 | 
			
		||||
    <div class="card-body p-2">
 | 
			
		||||
      <p class="card-text">
 | 
			
		||||
        <ng-container *ngIf="document.correspondent_object">
 | 
			
		||||
          <a [routerLink]="" title="Filter by correspondent" (click)="clickCorrespondent.emit(document.correspondent)" class="font-weight-bold">{{document.correspondent_object.name}}</a>:
 | 
			
		||||
        <ng-container *ngIf="document.correspondent">
 | 
			
		||||
          <a [routerLink]="" title="Filter by correspondent" (click)="clickCorrespondent.emit(document.correspondent)" class="font-weight-bold">{{(document.correspondent$ | async)?.name}}</a>:
 | 
			
		||||
        </ng-container>
 | 
			
		||||
        {{document.title}}
 | 
			
		||||
      </p>
 | 
			
		||||
 
 | 
			
		||||
@@ -100,17 +100,17 @@
 | 
			
		||||
        {{d.archive_serial_number}}
 | 
			
		||||
      </td>
 | 
			
		||||
      <td class="d-none d-md-table-cell">
 | 
			
		||||
        <ng-container *ngIf="d.correspondent_object">
 | 
			
		||||
          <a [routerLink]="" (click)="filterByCorrespondent(d.correspondent)" title="Filter by correspondent">{{d.correspondent_object.name}}</a>
 | 
			
		||||
        <ng-container *ngIf="d.correspondent">
 | 
			
		||||
          <a [routerLink]="" (click)="filterByCorrespondent(d.correspondent)" title="Filter by correspondent">{{(d.correspondent$ | async)?.name}}</a>
 | 
			
		||||
        </ng-container>
 | 
			
		||||
      </td>
 | 
			
		||||
      <td>
 | 
			
		||||
        <a routerLink="/documents/{{d.id}}" title="Edit document">{{d.title}}</a>
 | 
			
		||||
        <app-tag [tag]="t" *ngFor="let t of d.tags_objects" class="ml-1" clickable="true" linkTitle="Filter by tag" (click)="filterByTag(t.id)"></app-tag>
 | 
			
		||||
        <app-tag [tag]="t" *ngFor="let t of d.tags$ | async" class="ml-1" clickable="true" linkTitle="Filter by tag" (click)="filterByTag(t.id)"></app-tag>
 | 
			
		||||
      </td>
 | 
			
		||||
      <td class="d-none d-xl-table-cell">
 | 
			
		||||
        <ng-container *ngIf="d.document_type_object">
 | 
			
		||||
          <a [routerLink]="" (click)="filterByDocumentType(d.document_type)" title="Filter by document type">{{d.document_type_object.name}}</a>
 | 
			
		||||
        <ng-container *ngIf="d.document_type">
 | 
			
		||||
          <a [routerLink]="" (click)="filterByDocumentType(d.document_type)" title="Filter by document type">{{(d.document_type$ | async)?.name}}</a>
 | 
			
		||||
        </ng-container>
 | 
			
		||||
      </td>
 | 
			
		||||
      <td>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user