mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	added tracking to the document list
This commit is contained in:
		@@ -73,7 +73,7 @@
 | 
				
			|||||||
</div>
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<div *ngIf="displayMode == 'largeCards'">
 | 
					<div *ngIf="displayMode == 'largeCards'">
 | 
				
			||||||
  <app-document-card-large *ngFor="let d of list.documents" [document]="d" [details]="d.content" (clickTag)="clickTag($event)" (clickCorrespondent)="clickCorrespondent($event)">
 | 
					  <app-document-card-large *ngFor="let d of list.documents; trackBy: trackByDocumentId" [document]="d" [details]="d.content" (clickTag)="clickTag($event)" (clickCorrespondent)="clickCorrespondent($event)">
 | 
				
			||||||
  </app-document-card-large>
 | 
					  </app-document-card-large>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -87,7 +87,7 @@
 | 
				
			|||||||
    <th class="d-none d-xl-table-cell">Added</th>
 | 
					    <th class="d-none d-xl-table-cell">Added</th>
 | 
				
			||||||
  </thead>
 | 
					  </thead>
 | 
				
			||||||
  <tbody>
 | 
					  <tbody>
 | 
				
			||||||
    <tr *ngFor="let d of list.documents">
 | 
					    <tr *ngFor="let d of list.documents; trackBy: trackByDocumentId">
 | 
				
			||||||
      <td class="d-none d-lg-table-cell">
 | 
					      <td class="d-none d-lg-table-cell">
 | 
				
			||||||
        {{d.archive_serial_number}}
 | 
					        {{d.archive_serial_number}}
 | 
				
			||||||
      </td>
 | 
					      </td>
 | 
				
			||||||
@@ -117,5 +117,5 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<div class="m-n2 row row-cols-paperless-cards" *ngIf="displayMode == 'smallCards'">
 | 
					<div class="m-n2 row row-cols-paperless-cards" *ngIf="displayMode == 'smallCards'">
 | 
				
			||||||
  <app-document-card-small [document]="d" *ngFor="let d of list.documents" (clickTag)="clickTag($event)" (clickCorrespondent)="clickCorrespondent($event)"></app-document-card-small>
 | 
					  <app-document-card-small [document]="d" *ngFor="let d of list.documents; trackBy: trackByDocumentId" (clickTag)="clickTag($event)" (clickCorrespondent)="clickCorrespondent($event)"></app-document-card-small>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,6 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
 | 
				
			|||||||
import { ActivatedRoute, Router } from '@angular/router';
 | 
					import { ActivatedRoute, Router } from '@angular/router';
 | 
				
			||||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
 | 
					import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
 | 
				
			||||||
import { FILTER_CORRESPONDENT } from 'src/app/data/filter-rule-type';
 | 
					import { FILTER_CORRESPONDENT } from 'src/app/data/filter-rule-type';
 | 
				
			||||||
 | 
					import { PaperlessDocument } from 'src/app/data/paperless-document';
 | 
				
			||||||
import { PaperlessSavedView } from 'src/app/data/paperless-saved-view';
 | 
					import { PaperlessSavedView } from 'src/app/data/paperless-saved-view';
 | 
				
			||||||
import { DocumentListViewService } from 'src/app/services/document-list-view.service';
 | 
					import { DocumentListViewService } from 'src/app/services/document-list-view.service';
 | 
				
			||||||
import { DOCUMENT_SORT_FIELDS } from 'src/app/services/rest/document.service';
 | 
					import { DOCUMENT_SORT_FIELDS } from 'src/app/services/rest/document.service';
 | 
				
			||||||
@@ -113,4 +114,7 @@ export class DocumentListComponent implements OnInit {
 | 
				
			|||||||
    this.filterEditor.toggleDocumentType(documentTypeID)
 | 
					    this.filterEditor.toggleDocumentType(documentTypeID)
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  trackByDocumentId(index, item: PaperlessDocument) {
 | 
				
			||||||
 | 
					    return item.id
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user