mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-18 04:26:35 +01:00
Refactor frontend data models
This commit is contained in:
parent
5723bd8dd8
commit
66b2d90c50
120 changed files with 640 additions and 706 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { Component, forwardRef, Input, OnInit } from '@angular/core'
|
||||
import { FormControl, FormGroup, NG_VALUE_ACCESSOR } from '@angular/forms'
|
||||
import { PaperlessUser } from 'src/app/data/paperless-user'
|
||||
import { User } from 'src/app/data/user'
|
||||
import { AbstractInputComponent } from '../../abstract-input'
|
||||
|
||||
export interface PermissionsFormObject {
|
||||
|
|
@ -34,7 +34,7 @@ export class PermissionsFormComponent
|
|||
implements OnInit
|
||||
{
|
||||
@Input()
|
||||
users: PaperlessUser[]
|
||||
users: User[]
|
||||
|
||||
@Input()
|
||||
accordion: boolean = false
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Component, forwardRef, Input, OnInit } from '@angular/core'
|
||||
import { NG_VALUE_ACCESSOR } from '@angular/forms'
|
||||
import { first } from 'rxjs/operators'
|
||||
import { PaperlessGroup } from 'src/app/data/paperless-group'
|
||||
import { Group } from 'src/app/data/group'
|
||||
import { GroupService } from 'src/app/services/rest/group.service'
|
||||
import { AbstractInputComponent } from '../../abstract-input'
|
||||
|
||||
|
|
@ -17,8 +17,8 @@ import { AbstractInputComponent } from '../../abstract-input'
|
|||
templateUrl: './permissions-group.component.html',
|
||||
styleUrls: ['./permissions-group.component.scss'],
|
||||
})
|
||||
export class PermissionsGroupComponent extends AbstractInputComponent<PaperlessGroup> {
|
||||
groups: PaperlessGroup[]
|
||||
export class PermissionsGroupComponent extends AbstractInputComponent<Group> {
|
||||
groups: Group[]
|
||||
|
||||
constructor(groupService: GroupService) {
|
||||
super()
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Component, forwardRef, Input, OnInit } from '@angular/core'
|
||||
import { NG_VALUE_ACCESSOR } from '@angular/forms'
|
||||
import { first } from 'rxjs/operators'
|
||||
import { PaperlessUser } from 'src/app/data/paperless-user'
|
||||
import { User } from 'src/app/data/user'
|
||||
import { UserService } from 'src/app/services/rest/user.service'
|
||||
import { SettingsService } from 'src/app/services/settings.service'
|
||||
import { AbstractInputComponent } from '../../abstract-input'
|
||||
|
|
@ -18,10 +18,8 @@ import { AbstractInputComponent } from '../../abstract-input'
|
|||
templateUrl: './permissions-user.component.html',
|
||||
styleUrls: ['./permissions-user.component.scss'],
|
||||
})
|
||||
export class PermissionsUserComponent extends AbstractInputComponent<
|
||||
PaperlessUser[]
|
||||
> {
|
||||
users: PaperlessUser[]
|
||||
export class PermissionsUserComponent extends AbstractInputComponent<User[]> {
|
||||
users: User[]
|
||||
|
||||
constructor(userService: UserService, settings: SettingsService) {
|
||||
super()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue