mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Merge branch 'dev' into feature-bulk-edit
This commit is contained in:
		| @@ -97,7 +97,7 @@ | |||||||
| </div> | </div> | ||||||
|  |  | ||||||
| <div *ngIf="displayMode == 'largeCards'"> | <div *ngIf="displayMode == 'largeCards'"> | ||||||
|   <app-document-card-large [selected]="list.isSelected(d)" (selectedChange)="list.setSelected(d, $event)"   *ngFor="let d of list.documents" [document]="d" [details]="d.content" (clickTag)="clickTag($event)" (clickCorrespondent)="clickCorrespondent($event)"> |   <app-document-card-large [selected]="list.isSelected(d)" (selectedChange)="list.setSelected(d, $event)"   *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> | ||||||
|  |  | ||||||
| @@ -112,7 +112,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" [ngClass]="list.isSelected(d) ? 'table-row-selected' : ''"> |     <tr *ngFor="let d of list.documents; trackBy: trackByDocumentId" [ngClass]="list.isSelected(d) ? 'table-row-selected' : ''"> | ||||||
|       <td> |       <td> | ||||||
|         <div class="custom-control custom-checkbox"> |         <div class="custom-control custom-checkbox"> | ||||||
|           <input type="checkbox" class="custom-control-input" id="docCheck{{d.id}}" [checked]="list.isSelected(d)" (change)="list.setSelected(d, $event.target.checked)"> |           <input type="checkbox" class="custom-control-input" id="docCheck{{d.id}}" [checked]="list.isSelected(d)" (change)="list.setSelected(d, $event.target.checked)"> | ||||||
| @@ -148,5 +148,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 [selected]="list.isSelected(d)" (selectedChange)="list.setSelected(d, $event)"  [document]="d" *ngFor="let d of list.documents" (clickTag)="clickTag($event)" (clickCorrespondent)="clickCorrespondent($event)"></app-document-card-small> |   <app-document-card-small [selected]="list.isSelected(d)" (selectedChange)="list.setSelected(d, $event)"  [document]="d" *ngFor="let d of list.documents; trackBy: trackByDocumentId" (clickTag)="clickTag($event)" (clickCorrespondent)="clickCorrespondent($event)"></app-document-card-small> | ||||||
| </div> | </div> | ||||||
|   | |||||||
| @@ -4,6 +4,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; | |||||||
| import { Observable } from 'rxjs'; | import { Observable } from 'rxjs'; | ||||||
| import { map } from 'rxjs/operators'; | import { map } from 'rxjs/operators'; | ||||||
| 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 { CorrespondentService } from 'src/app/services/rest/correspondent.service'; | import { CorrespondentService } from 'src/app/services/rest/correspondent.service'; | ||||||
| @@ -124,6 +125,10 @@ export class DocumentListComponent implements OnInit { | |||||||
|     this.filterEditor.toggleDocumentType(documentTypeID) |     this.filterEditor.toggleDocumentType(documentTypeID) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   trackByDocumentId(index, item: PaperlessDocument) { | ||||||
|  |     return item.id | ||||||
|  |   } | ||||||
|  |  | ||||||
|   private executeBulkOperation(method: string, args): Observable<any> { |   private executeBulkOperation(method: string, args): Observable<any> { | ||||||
|     return this.documentService.bulkEdit(Array.from(this.list.selected), method, args).pipe( |     return this.documentService.bulkEdit(Array.from(this.list.selected), method, args).pipe( | ||||||
|       map(r => { |       map(r => { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 jonaswinkler
					jonaswinkler