A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
import { NgStyle } from '@angular/common'
import { Component, inject, signal } from '@angular/core'
import { BootstrapIconComponent } from 'src/app/components/common/bootstrap-icon/bootstrap-icon.component'
import { DocumentService } from 'src/app/services/rest/document.service'
import { ConfirmDialogComponent } from '../confirm-dialog.component'
@Component({
selector: 'pngx-rotate-confirm-dialog',
templateUrl: './rotate-confirm-dialog.component.html',
styleUrl: './rotate-confirm-dialog.component.scss',
imports: [NgStyle, BootstrapIconComponent],
})
export class RotateConfirmDialogComponent extends ConfirmDialogComponent {
documentService = inject(DocumentService)
readonly documentID = signal<number>(undefined)
readonly showPDFNote = signal(true)
readonly rotation = signal(0)
public get degrees(): number {
let degrees = this.rotation() % 360
if (degrees < 0) degrees += 360
return degrees
}
constructor() {
super()
}
rotate(clockwise: boolean = true) {
this.rotation.update((rotation) => rotation + (clockwise ? 90 : -90))
}
}