mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Apply suggestions from code review
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
		@@ -34,22 +34,22 @@
 | 
			
		||||
        </svg> <span class="d-none d-lg-inline" i18n>More like this</span>
 | 
			
		||||
    </button>
 | 
			
		||||
 | 
			
		||||
    <button type="button" class="btn btn-sm btn-outline-primary me-2" (click)="close()">
 | 
			
		||||
    <button type="button" class="btn btn-sm btn-outline-primary me-2" i18n-title title="Close" (click)="close()">
 | 
			
		||||
        <svg class="buttonicon" fill="currentColor">
 | 
			
		||||
            <use xlink:href="assets/bootstrap-icons.svg#x" />
 | 
			
		||||
        </svg> <span class="d-none d-lg-inline" i18n>Close</span>
 | 
			
		||||
    </button>
 | 
			
		||||
 | 
			
		||||
    <div class="button-group">
 | 
			
		||||
        <button type="button" class="btn btn-sm btn-outline-primary me-2" (click)="previousDoc()" [disabled]="!hasPrevious()">
 | 
			
		||||
        <button type="button" class="btn btn-sm btn-outline-primary me-2" i18n-title title="Previous" (click)="previousDoc()" [disabled]="!hasPrevious()">
 | 
			
		||||
            <svg class="buttonicon" fill="currentColor">
 | 
			
		||||
                <use xlink:href="assets/bootstrap-icons.svg#arrow-left" />
 | 
			
		||||
            </svg> 
 | 
			
		||||
            </svg>
 | 
			
		||||
        </button>
 | 
			
		||||
        <button type="button" class="btn btn-sm btn-outline-primary" (click)="nextDoc()"  [disabled]="!hasNext()">
 | 
			
		||||
        <button type="button" class="btn btn-sm btn-outline-primary"  i18n-title title="Next" (click)="nextDoc()" [disabled]="!hasNext()">
 | 
			
		||||
            <svg class="buttonicon" fill="currentColor">
 | 
			
		||||
                <use xlink:href="assets/bootstrap-icons.svg#arrow-right" />
 | 
			
		||||
            </svg> 
 | 
			
		||||
            </svg>
 | 
			
		||||
        </button>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -265,7 +265,7 @@ export class DocumentListViewService {
 | 
			
		||||
  hasPrevious(doc: number) {
 | 
			
		||||
    if (this.documents) {
 | 
			
		||||
      let index = this.documents.findIndex(d => d.id == doc)
 | 
			
		||||
      return !(index == 0 && this.currentPage == 1)
 | 
			
		||||
      return index != -1 && !(index == 0 && this.currentPage == 1)
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user