Revision 60752
Added by Antonis Lempesis about 3 years ago
modules/uoa-repository-manager-service/trunk/app/app.component.ts | ||
---|---|---|
1 |
import { AuthService } from './shared/services/auth.service'; |
|
2 |
import { Component, OnInit } from '@angular/core'; |
|
3 |
import { PrimeNGConfig } from 'primeng/api'; |
|
4 |
|
|
5 |
@Component({ |
|
6 |
selector: 'app-root', |
|
7 |
templateUrl: './app.component.html', |
|
8 |
styleUrls: ['./app.component.scss'] |
|
9 |
}) |
|
10 |
export class AppComponent implements OnInit { |
|
11 |
|
|
12 |
constructor(private primengConfig: PrimeNGConfig, private authService: AuthService) { } |
|
13 |
|
|
14 |
|
|
15 |
ngOnInit(): void { |
|
16 |
this.primengConfig.ripple = true; |
|
17 |
this.authService.initializeOAuth2Login(); |
|
18 |
} |
|
19 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/shared.module.ts | ||
---|---|---|
1 |
import { TranslateModule } from '@ngx-translate/core'; |
|
2 |
import { NgModule } from '@angular/core'; |
|
3 |
import { CommonModule } from '@angular/common'; |
|
4 |
import { HttpClientModule } from '@angular/common/http'; |
|
5 |
import { ValidationMessageComponent } from './utils/components/validation-message/validation-message.component'; |
|
6 |
import { HourMinutesSecsPipe } from './pipes/hour-minutes-secs.pipe'; |
|
7 |
|
|
8 |
@NgModule({ |
|
9 |
declarations: [ValidationMessageComponent, HourMinutesSecsPipe], |
|
10 |
imports: [ |
|
11 |
CommonModule, |
|
12 |
HttpClientModule |
|
13 |
], |
|
14 |
exports: [ |
|
15 |
TranslateModule, |
|
16 |
ValidationMessageComponent, |
|
17 |
HourMinutesSecsPipe |
|
18 |
] |
|
19 |
}) |
|
20 |
|
|
21 |
export class SharedModule { |
|
22 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/pipes/hour-minutes-secs.pipe.ts | ||
---|---|---|
1 |
import { Pipe, PipeTransform } from '@angular/core'; |
|
2 |
|
|
3 |
@Pipe({ |
|
4 |
name: 'hourMinutesSecs' |
|
5 |
}) |
|
6 |
export class HourMinutesSecsPipe implements PipeTransform { |
|
7 |
|
|
8 |
transform(totalSeconds: number, ...args: unknown[]): unknown { |
|
9 |
const hours = Math.floor(totalSeconds / 3600); |
|
10 |
const minutes = Math.floor((totalSeconds % 3600) / 60); |
|
11 |
const seconds = totalSeconds % 60; |
|
12 |
let result = `${minutes |
|
13 |
.toString() |
|
14 |
.padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`; |
|
15 |
if (!!hours) { |
|
16 |
result = `${hours.toString().padStart(2, '0')}:${minutes |
|
17 |
.toString() |
|
18 |
.padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`; |
|
19 |
} |
|
20 |
return result; |
|
21 |
} |
|
22 |
|
|
23 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/pipes/hour-minutes-secs.pipe.spec.ts | ||
---|---|---|
1 |
import { HourMinutesSecsPipe } from './hour-minutes-secs.pipe'; |
|
2 |
|
|
3 |
describe('HourMinutesSecsPipe', () => { |
|
4 |
it('create an instance', () => { |
|
5 |
const pipe = new HourMinutesSecsPipe(); |
|
6 |
expect(pipe).toBeTruthy(); |
|
7 |
}); |
|
8 |
}); |
modules/uoa-repository-manager-service/trunk/app/shared/utils/utils.service.ts | ||
---|---|---|
1 |
import { FILE_TYPE } from './../enums/FILE_TYPE.enum'; |
|
2 |
import { Injectable } from '@angular/core'; |
|
3 |
|
|
4 |
@Injectable({ |
|
5 |
providedIn: 'root' |
|
6 |
}) |
|
7 |
export class UtilsService { |
|
8 |
|
|
9 |
constructor() { } |
|
10 |
|
|
11 |
public base64ToFile(base64Data: string, contentType: FILE_TYPE): Blob { |
|
12 |
const byteString = window.atob(base64Data); |
|
13 |
const arrayBuffer = new ArrayBuffer(byteString.length); |
|
14 |
const int8Array = new Uint8Array(arrayBuffer); |
|
15 |
for (let i = 0; i < byteString.length; i++) { |
|
16 |
int8Array[i] = byteString.charCodeAt(i); |
|
17 |
} |
|
18 |
const blob = new Blob([int8Array], { type: this.convertContentType(contentType) }); |
|
19 |
return blob; |
|
20 |
} |
|
21 |
|
|
22 |
public convertContentType(type: FILE_TYPE): string { |
|
23 |
switch (type) { |
|
24 |
case FILE_TYPE.DOC: |
|
25 |
return 'application/msword'; |
|
26 |
case FILE_TYPE.DOCX: |
|
27 |
return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; |
|
28 |
case FILE_TYPE.PDF: |
|
29 |
return 'application/pdf'; |
|
30 |
case FILE_TYPE.PNG: |
|
31 |
return 'image/png'; |
|
32 |
case FILE_TYPE.XLS: |
|
33 |
return 'application/vnd.ms-excel'; |
|
34 |
case FILE_TYPE.XLSX: |
|
35 |
return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; |
|
36 |
} |
|
37 |
} |
|
38 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/utils/components/validation-message/validation-message.component.spec.ts | ||
---|---|---|
1 |
import { ComponentFixture, TestBed } from '@angular/core/testing'; |
|
2 |
|
|
3 |
import { ValidationMessageComponent } from './validation-message.component'; |
|
4 |
|
|
5 |
describe('ValidationMessageComponent', () => { |
|
6 |
let component: ValidationMessageComponent; |
|
7 |
let fixture: ComponentFixture<ValidationMessageComponent>; |
|
8 |
|
|
9 |
beforeEach(async () => { |
|
10 |
await TestBed.configureTestingModule({ |
|
11 |
declarations: [ ValidationMessageComponent ] |
|
12 |
}) |
|
13 |
.compileComponents(); |
|
14 |
}); |
|
15 |
|
|
16 |
beforeEach(() => { |
|
17 |
fixture = TestBed.createComponent(ValidationMessageComponent); |
|
18 |
component = fixture.componentInstance; |
|
19 |
fixture.detectChanges(); |
|
20 |
}); |
|
21 |
|
|
22 |
it('should create', () => { |
|
23 |
expect(component).toBeTruthy(); |
|
24 |
}); |
|
25 |
}); |
modules/uoa-repository-manager-service/trunk/app/shared/utils/components/validation-message/validation-message.component.html | ||
---|---|---|
1 |
<div *ngIf="displayMessage"> |
|
2 |
<p class="validation-message">{{validationMessage}}</p> |
|
3 |
</div> |
modules/uoa-repository-manager-service/trunk/app/shared/utils/components/validation-message/validation-message.component.ts | ||
---|---|---|
1 |
import { Component, Input, OnInit } from '@angular/core'; |
|
2 |
import { FormControl } from '@angular/forms'; |
|
3 |
|
|
4 |
@Component({ |
|
5 |
selector: 'app-validation-message', |
|
6 |
templateUrl: './validation-message.component.html', |
|
7 |
styleUrls: ['./validation-message.component.scss'] |
|
8 |
}) |
|
9 |
export class ValidationMessageComponent implements OnInit { |
|
10 |
|
|
11 |
@Input() control: FormControl; |
|
12 |
@Input() validationMessage: String; |
|
13 |
|
|
14 |
@Input() set displayEvenIfPristine(val: boolean) { |
|
15 |
this._displayEvenIfPristine = val; |
|
16 |
this.shouldMessageBeShown(); |
|
17 |
} |
|
18 |
|
|
19 |
_displayEvenIfPristine: boolean |
|
20 |
|
|
21 |
displayMessage: boolean; |
|
22 |
|
|
23 |
constructor() { } |
|
24 |
|
|
25 |
ngOnInit(): void { |
|
26 |
this.shouldMessageBeShown(); |
|
27 |
this.control.statusChanges.subscribe(() => this.shouldMessageBeShown()); |
|
28 |
} |
|
29 |
|
|
30 |
shouldMessageBeShown() { |
|
31 |
let temp = this.control.invalid && (this.control.dirty || this.control.touched || this._displayEvenIfPristine); |
|
32 |
|
|
33 |
this.displayMessage = temp; |
|
34 |
} |
|
35 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/utils/components/validation-message/validation-message.component.scss | ||
---|---|---|
1 |
@import 'src/styles'; |
|
2 |
|
|
3 |
.validation-message{ |
|
4 |
color: red; |
|
5 |
font-size: 90%; |
|
6 |
margin: 0px; |
|
7 |
padding: 0px; |
|
8 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/utils/utils.service.spec.ts | ||
---|---|---|
1 |
import { TestBed } from '@angular/core/testing'; |
|
2 |
|
|
3 |
import { UtilsService } from './utils.service'; |
|
4 |
|
|
5 |
describe('UtilsService', () => { |
|
6 |
let service: UtilsService; |
|
7 |
|
|
8 |
beforeEach(() => { |
|
9 |
TestBed.configureTestingModule({}); |
|
10 |
service = TestBed.inject(UtilsService); |
|
11 |
}); |
|
12 |
|
|
13 |
it('should be created', () => { |
|
14 |
expect(service).toBeTruthy(); |
|
15 |
}); |
|
16 |
}); |
modules/uoa-repository-manager-service/trunk/app/shared/models/chart.interface.ts | ||
---|---|---|
1 |
export interface PieModel { |
|
2 |
labels: string[]; |
|
3 |
datasets: dataset[]; |
|
4 |
} |
|
5 |
|
|
6 |
export interface dataset { |
|
7 |
data: number[]; |
|
8 |
backgroundColor: string[]; |
|
9 |
hoverBackgroundColor: string[]; |
|
10 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/search-response.interface.ts | ||
---|---|---|
1 |
export interface SearchResponse<T> { |
|
2 |
totalPages: number; |
|
3 |
totalElements: number; |
|
4 |
data: T[]; |
|
5 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/pwc-user-interface.ts | ||
---|---|---|
1 |
export interface PwcUser { |
|
2 |
email?: string; |
|
3 |
cloudEmail?: string; |
|
4 |
preferredMail?: string; |
|
5 |
guid: string; |
|
6 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/request/search-user.interface.ts | ||
---|---|---|
1 |
export interface SearchUser { |
|
2 |
userCode: string; |
|
3 |
name: string; |
|
4 |
surname: string; |
|
5 |
email: string; |
|
6 |
status: string; |
|
7 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/request/assign-update-role.interface.ts | ||
---|---|---|
1 |
import { RtaUser } from './../rta-user.interface'; |
|
2 |
import { Role } from '../role.interface'; |
|
3 |
import { IPowerClient } from 'src/app/shared/models/ipower-client.interface'; |
|
4 |
import { UserAccess } from '../user-access.interface'; |
|
5 |
|
|
6 |
export interface AssignUpdateRole { |
|
7 |
id: number; |
|
8 |
ipowerClient: IPowerClient; |
|
9 |
role: Role; |
|
10 |
users: RtaUser; |
|
11 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/request/search-system-exceptions.interface.ts | ||
---|---|---|
1 |
import { IPowerClient } from "../ipower-client.interface"; |
|
2 |
|
|
3 |
export interface SearchSystemException { |
|
4 |
processId: number; |
|
5 |
jobName: string; |
|
6 |
dmsFileCode: string; |
|
7 |
dateFrom: Date; |
|
8 |
dateTo: Date; |
|
9 |
clientId: IPowerClient; |
|
10 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/card-item.interface.ts | ||
---|---|---|
1 |
export interface CardItem { |
|
2 |
title: string; |
|
3 |
subtitle: string; |
|
4 |
headerImage: string; |
|
5 |
footerImage: string; |
|
6 |
path: string; |
|
7 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/document-classification.interface.ts | ||
---|---|---|
1 |
export interface DocumentClassification { |
|
2 |
classificationId: number; |
|
3 |
classificationName: string; |
|
4 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/invoice-process.interface.ts | ||
---|---|---|
1 |
import {FilesPerProcess} from './files-per-process.interface'; |
|
2 |
import {LookupData} from './lookup-data.interface'; |
|
3 |
|
|
4 |
export interface InvoiceProcess { |
|
5 |
id: number; |
|
6 |
processCreationDatetime: Date; |
|
7 |
documentClassificationId: number; |
|
8 |
processStatus: LookupData; |
|
9 |
userId: string; |
|
10 |
filesPerProcess: FilesPerProcess[]; |
|
11 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/full-invoice-process.interface.ts | ||
---|---|---|
1 |
import {LookupData} from './lookup-data.interface'; |
|
2 |
import {JournalEntry} from './journal-entry.interface'; |
|
3 |
import {AlteryxException} from './alteryx-exception.interface'; |
|
4 |
import {AlteryxUnhandledData} from './alteryx-unhandled-data.interface'; |
|
5 |
import {FilesPerProcess} from './files-per-process.interface'; |
|
6 |
import {ProcessFailedRecord} from './process-failed-record.interface'; |
|
7 |
|
|
8 |
export interface FullInvoiceProcess { |
|
9 |
id: number; |
|
10 |
processCreationDatetime: Date; |
|
11 |
documentClassificationId: number; |
|
12 |
processStatus: LookupData; |
|
13 |
userId: string; |
|
14 |
filesPerProcess: FilesPerProcess[]; |
|
15 |
recordsPerProcess: any; |
|
16 |
journalEntries: JournalEntry[]; |
|
17 |
alteryxExceptions: AlteryxException[]; |
|
18 |
alteryxUnhandled: AlteryxUnhandledData[]; |
|
19 |
failedRecords: ProcessFailedRecord[]; |
|
20 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/downloading-procedure-metadata.interface.ts | ||
---|---|---|
1 |
import {LookupData} from './lookup-data.interface'; |
|
2 |
import {ReceivedFile} from './inbox-document.interface'; |
|
3 |
|
|
4 |
export interface DownloadingProcedureMetadata { |
|
5 |
id: number; |
|
6 |
downloadingProcedureStart: Date; |
|
7 |
downloadingProcedureFinish: Date; |
|
8 |
downloadingProcedureStatusId: LookupData; |
|
9 |
estimatedTime: Date; |
|
10 |
receivedFiles: ReceivedFile[]; |
|
11 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/invoice-process-search-criteria.interface.ts | ||
---|---|---|
1 |
import { FILE_TYPE } from './../enums/FILE_TYPE.enum'; |
|
2 |
export interface InvoiceProcessCriteriaInterface { |
|
3 |
userId: string; |
|
4 |
fromDate: Date; |
|
5 |
toDate: Date; |
|
6 |
docClassification: string; |
|
7 |
fileCode: string; |
|
8 |
fileType: FILE_TYPE; |
|
9 |
processId: number; |
|
10 |
processStatus: string; |
|
11 |
ipowerClientName: string; |
|
12 |
ipowerClientCode: string; |
|
13 |
personalData: boolean; |
|
14 |
username: string; |
|
15 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/rights-category.interface.ts | ||
---|---|---|
1 |
import { Right } from 'src/app/shared/models'; |
|
2 |
export interface RightsCategory { |
|
3 |
id: number; |
|
4 |
name: string; |
|
5 |
rights: Right[]; |
|
6 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/vertical-menu.interface.ts | ||
---|---|---|
1 |
import { MenuItem } from 'primeng/api'; |
|
2 |
|
|
3 |
export interface VerticalMenu { |
|
4 |
title: string; |
|
5 |
items: MenuItem[]; |
|
6 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/capturing-verification.interface.ts | ||
---|---|---|
1 |
export interface CapturingVerification { |
|
2 |
id: number; |
|
3 |
capturingVerificationsName: string; |
|
4 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/category.interface.ts | ||
---|---|---|
1 |
import { DocumentClassification } from "./document-classification.interface"; |
|
2 |
|
|
3 |
export interface Category { |
|
4 |
id: number; |
|
5 |
documentClassification?: DocumentClassification; |
|
6 |
categoryName: string; |
|
7 |
categoryCode: string; |
|
8 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/user-access.interface.ts | ||
---|---|---|
1 |
import { RtaUser } from './rta-user.interface'; |
|
2 |
import { Role } from './role.interface'; |
|
3 |
import { IPowerClient } from 'src/app/shared/models/ipower-client.interface'; |
|
4 |
import { USER_ACCESS_STATUS } from '../enums/USER_ACCESS_STATUS.enum'; |
|
5 |
|
|
6 |
export interface UserAccess { |
|
7 |
id: number; |
|
8 |
ipowerClient: IPowerClient; |
|
9 |
role: Role; |
|
10 |
users: RtaUser; |
|
11 |
status: USER_ACCESS_STATUS; |
|
12 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/configurator-parameter.interface.ts | ||
---|---|---|
1 |
|
|
2 |
export interface ConfiguratorParameter { |
|
3 |
configurationId: number; |
|
4 |
configurationVariable: string; |
|
5 |
variableType: string; |
|
6 |
integerValue: number; |
|
7 |
stringValue: string; |
|
8 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/ipower-client.interface.ts | ||
---|---|---|
1 |
export interface IPowerClient { |
|
2 |
id: string; |
|
3 |
name: string; |
|
4 |
status: string; |
|
5 |
clientCode: string; |
|
6 |
bcServer: string; |
|
7 |
bcPort: string; |
|
8 |
bcDbInstance: string; |
|
9 |
hotFolderId: string; |
|
10 |
confidenceMinLvl: number; |
|
11 |
confidenceMaxLvl: number; |
|
12 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/download-process-temp.interafce.ts | ||
---|---|---|
1 |
export interface DownloadProcessTemp { |
|
2 |
id: number; |
|
3 |
iPowerClientName: string; |
|
4 |
iPowerClientCode: string; |
|
5 |
dmsClientWorkspace: string; |
|
6 |
dmsActualWorkspace: string; |
|
7 |
status: string; |
|
8 |
results: number; |
|
9 |
downloadDate: Date; |
|
10 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/administration-section.interface.ts | ||
---|---|---|
1 |
import { CardItem } from "./card-item.interface"; |
|
2 |
|
|
3 |
export interface AdministrationSection { |
|
4 |
title: string; |
|
5 |
subSections: CardItem[]; |
|
6 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/dashboard-section.interface.ts | ||
---|---|---|
1 |
import { PieModel } from './chart.interface'; |
|
2 |
|
|
3 |
export interface DashboardSection { |
|
4 |
type: string; |
|
5 |
totalClients: number; |
|
6 |
totalProcesses: number; |
|
7 |
totalExceptions: number; |
|
8 |
totalUnhandled: number; |
|
9 |
totalPages: number; |
|
10 |
totalElements: number; |
|
11 |
pie?: PieModel; |
|
12 |
selectedElements: number; |
|
13 |
selectedPage: number; |
|
14 |
resultsLoading: boolean; |
|
15 |
aggregatedResults: ProcessesPerClient[]; |
|
16 |
} |
|
17 |
|
|
18 |
export interface ProcessesPerClient { |
|
19 |
clientName?: string; |
|
20 |
clientId: string; |
|
21 |
processesNumber: number; |
|
22 |
unhandledNumber: number; |
|
23 |
exceptionsNumber: number; |
|
24 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/journal-verification.interface.ts | ||
---|---|---|
1 |
export interface JournalVerification { |
|
2 |
id: number; |
|
3 |
journalVerificationsName: string; |
|
4 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/inbox-batch.interface.ts | ||
---|---|---|
1 |
import {ReceivedFile} from './inbox-document.interface'; |
|
2 |
import {LookupData} from './lookup-data.interface'; |
|
3 |
import { ReceivedFiles } from './receivedFiles.interface'; |
|
4 |
|
|
5 |
|
|
6 |
export interface InboxBatch { |
|
7 |
batchId: number; |
|
8 |
documentCurrentStatusId: LookupData; |
|
9 |
documentStatusLastUpdate: Date; |
|
10 |
statusPerDocRecId: number; |
|
11 |
receivedFile: ReceivedFiles; |
|
12 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/alteryx-unhandled-data.interface.ts | ||
---|---|---|
1 |
import {Record} from './record.interface'; |
|
2 |
import {LookupData} from './lookup-data.interface'; |
|
3 |
|
|
4 |
export interface AlteryxUnhandledData { |
|
5 |
id:string; |
|
6 |
record: Record; |
|
7 |
alteryxUnhandledStatus: LookupData; |
|
8 |
} |
|
9 |
|
modules/uoa-repository-manager-service/trunk/app/shared/models/role.interface.ts | ||
---|---|---|
1 |
import { UserAccess } from './user-access.interface'; |
|
2 |
import { Right } from './index'; |
|
3 |
|
|
4 |
export interface Role { |
|
5 |
id: number; |
|
6 |
name: string; |
|
7 |
description: string; |
|
8 |
readOnly: boolean; |
|
9 |
status: boolean; |
|
10 |
canBeDeleted: boolean; |
|
11 |
isGlobal: boolean; |
|
12 |
rightsList: Right[]; |
|
13 |
userAccessRoles: UserAccess[]; |
|
14 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/files-per-process.interface.ts | ||
---|---|---|
1 |
import {ReceivedFile} from './inbox-document.interface'; |
|
2 |
|
|
3 |
export interface FilesPerProcess { |
|
4 |
id: number; |
|
5 |
receivedFile: ReceivedFile; |
|
6 |
} |
|
7 |
|
modules/uoa-repository-manager-service/trunk/app/shared/models/rta-user.interface.ts | ||
---|---|---|
1 |
import { UserAccess } from './user-access.interface'; |
|
2 |
export interface RtaUser { |
|
3 |
id: number; |
|
4 |
name: string; |
|
5 |
surname: string; |
|
6 |
email: string; |
|
7 |
status: string; |
|
8 |
userCode: string; |
|
9 |
userAccessUsers: UserAccess[]; |
|
10 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/index.ts | ||
---|---|---|
1 |
export * from './role.interface'; |
|
2 |
export * from './right.interface'; |
|
3 |
export * from './i-power-assignment.interface'; |
modules/uoa-repository-manager-service/trunk/app/shared/models/journal-entry.interface.ts | ||
---|---|---|
1 |
import { LookupData } from './lookup-data.interface'; |
|
2 |
|
|
3 |
export interface JournalEntry { |
|
4 |
id: number; |
|
5 |
recordId: number; |
|
6 |
journalEntriesStatus: LookupData; |
|
7 |
postingDate: Date; |
|
8 |
documentType: string; |
|
9 |
documentNo: string; |
|
10 |
accountType: string; |
|
11 |
accountNo: string; |
|
12 |
description: string; |
|
13 |
eu3PartyTrade: string; |
|
14 |
genPostingType: string; |
|
15 |
genBusPostingGroup: string; |
|
16 |
genProdPostingGroup: string; |
|
17 |
vatBusPostingGroup: string; |
|
18 |
vatProdPostingGroup: string; |
|
19 |
deferralCode: number; |
|
20 |
currencyCode: string; |
|
21 |
vatBaseAmount: number; |
|
22 |
vatAmount: number; |
|
23 |
amount: number; |
|
24 |
amountLCY: number; |
|
25 |
balAccountType: string; |
|
26 |
balAccountNo: string; |
|
27 |
balGenPostingType: string; |
|
28 |
externalDocumentNo: string; |
|
29 |
dmsCodeNo: string; |
|
30 |
correction: string; |
|
31 |
comment: string; |
|
32 |
shortcutDimension1Code: string; |
|
33 |
shortcutDimension2Code: string; |
|
34 |
shortcutDimension3Code: string; |
|
35 |
shortcutDimension4Code: string; |
|
36 |
shortcutDimension5Code: string; |
|
37 |
shortcutDimension6Code: string; |
|
38 |
shortcutDimension7Code: string; |
|
39 |
shortcutDimension8Code: string; |
|
40 |
shortcutDimension9Code: string; |
|
41 |
shortcutDimension10Code: string; |
|
42 |
applied: string; |
|
43 |
appliedAutomatically: string; |
|
44 |
appliesToDocNo: string; |
|
45 |
appliesToDocType: string; |
|
46 |
appliesToExtDocNo: string; |
|
47 |
appliesToId: string; |
|
48 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/receivedFiles.interface.ts | ||
---|---|---|
1 |
import { FILE_TYPE } from '../enums/FILE_TYPE.enum'; |
|
2 |
import { DownloadingProcedureMetadata } from './downloading-procedure-metadata.interface'; |
|
3 |
|
|
4 |
export interface ReceivedFiles { |
|
5 |
id: number; |
|
6 |
downloadingProcedureMetadata: DownloadingProcedureMetadata; |
|
7 |
dmsFileCode: string; |
|
8 |
dmsFileName: string; |
|
9 |
dmsFileType: FILE_TYPE; |
|
10 |
dmsPersonalData: boolean; |
|
11 |
dmsClientCode: string; |
|
12 |
rtaReceivedDate: Date; |
|
13 |
dmsInsertedDate: Date; |
|
14 |
rtaFolderPath: string; |
|
15 |
dmsDocumentNumber : string; |
|
16 |
rtaFileName: string; |
|
17 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/response/user-autocomplete.interface.ts | ||
---|---|---|
1 |
export interface UserAutoComplete { |
|
2 |
id: string; |
|
3 |
name: string; |
|
4 |
surname: string; |
|
5 |
email: string; |
|
6 |
status: string; |
|
7 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/template.interface.ts | ||
---|---|---|
1 |
import { IPowerClient } from './ipower-client.interface'; |
|
2 |
import { Category } from './category.interface'; |
|
3 |
import { DocumentClassification } from './document-classification.interface'; |
|
4 |
export interface Template { |
|
5 |
id: number; |
|
6 |
|
|
7 |
// The 'category' field in Template objects comes from a different backend DTO than the pure Category model, |
|
8 |
// and thus does NOT have a DocumentClassification field. Use the documentClassification field below. |
|
9 |
category: Category; |
|
10 |
|
|
11 |
subCategoryCode: string; |
|
12 |
abbyyTemplate: string; |
|
13 |
client: IPowerClient; |
|
14 |
documentClassification: DocumentClassification; |
|
15 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/process-failed-record.interface.ts | ||
---|---|---|
1 |
export interface ProcessFailedRecord { |
|
2 |
id: number; |
|
3 |
processId: number; |
|
4 |
recordIdentifier: string; |
|
5 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/process-history.interface.ts | ||
---|---|---|
1 |
import {LookupData} from './lookup-data.interface'; |
|
2 |
import {ProcessStatus} from "./process-status.interface"; |
|
3 |
|
|
4 |
export interface ProcessHistory { |
|
5 |
id: number; |
|
6 |
processStatus: ProcessStatus; |
|
7 |
processStatusUpdate: LookupData; |
|
8 |
processHistoryDescription: string; |
|
9 |
userId: string; |
|
10 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/right.interface.ts | ||
---|---|---|
1 |
import { RightsCategory } from './rights-category.interface'; |
|
2 |
import { Role } from './role.interface'; |
|
3 |
import { IPowerAssignment } from './index'; |
|
4 |
|
|
5 |
export interface Right { |
|
6 |
id: number; |
|
7 |
name: string; |
|
8 |
code: string; |
|
9 |
isGlobal: boolean; |
|
10 |
rightsCategory: RightsCategory; |
|
11 |
rolesList: Role[]; |
|
12 |
ipowerAssignment: IPowerAssignment; |
|
13 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/record.interface.ts | ||
---|---|---|
1 |
import {InvoiceMasterData} from './invoice-master-data.interface'; |
|
2 |
|
|
3 |
export interface Record { |
|
4 |
id: number; |
|
5 |
documentClassificationId: number; |
|
6 |
documentSubclassificationId: number; |
|
7 |
ipowerClientId: number; |
|
8 |
dmsFileCode: string; |
|
9 |
abbyyConfidenceLvl: number; |
|
10 |
abbyyTemplate: string; |
|
11 |
invoiceMasterData: InvoiceMasterData; |
|
12 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/scheduler-criteria.interface.ts | ||
---|---|---|
1 |
import {LookupData} from './lookup-data.interface'; |
|
2 |
|
|
3 |
export interface SchedulerCriteriaInterface { |
|
4 |
iPowerClientCode: string; |
|
5 |
status: string; |
|
6 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/system-exception.interface.ts | ||
---|---|---|
1 |
export interface SystemException { |
|
2 |
id: number; |
|
3 |
processId: number; |
|
4 |
clientId: string; |
|
5 |
jobName: string; |
|
6 |
dmsFileCode: string; |
|
7 |
message: string; |
|
8 |
cause: string; |
|
9 |
creationDatetime : Date; |
|
10 |
trace: string; |
|
11 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/real-time-execution.interface.ts | ||
---|---|---|
1 |
export interface RealTimeExecution { |
|
2 |
status: string; |
|
3 |
receivedFiles: number; |
|
4 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/lookup-data.interface.ts | ||
---|---|---|
1 |
export interface LookupData { |
|
2 |
id: number; |
|
3 |
name: string; |
|
4 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/document-subclassification.interface.ts | ||
---|---|---|
1 |
import { DocumentClassification } from "./document-classification.interface"; |
|
2 |
|
|
3 |
export interface DocumentSubclassification { |
|
4 |
subclassificationId: number; |
|
5 |
subclassificationName: string; |
|
6 |
documentClassification: DocumentClassification; |
|
7 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/paging/pageable.interface.ts | ||
---|---|---|
1 |
import {Sort} from './sort.interface'; |
|
2 |
|
|
3 |
export interface Pageable { |
|
4 |
sort: Sort; |
|
5 |
offset: number; |
|
6 |
pageNumber: number; |
|
7 |
pageSize: number; |
|
8 |
unpaged: boolean; |
|
9 |
paged: boolean; |
|
10 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/paging/sort.interface.ts | ||
---|---|---|
1 |
export interface Sort { |
|
2 |
unsorted: boolean; |
|
3 |
sorted: boolean; |
|
4 |
empty: boolean; |
|
5 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/paging/page.interface.ts | ||
---|---|---|
1 |
import {Pageable} from './pageable.interface'; |
|
2 |
import {Sort} from './sort.interface'; |
|
3 |
|
|
4 |
|
|
5 |
export interface Page<T> { |
|
6 |
data: T[]; |
|
7 |
totalPages: number; |
|
8 |
totalElements: number; |
|
9 |
|
|
10 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/inbox-search-criteria.interface.ts | ||
---|---|---|
1 |
import {FILE_TYPE} from '../enums/FILE_TYPE.enum'; |
|
2 |
|
|
3 |
export interface InboxSearchCriteriaInterface { |
|
4 |
receivedFrom: Date; |
|
5 |
receivedTo: Date; |
|
6 |
fileCode: string; |
|
7 |
fileType: FILE_TYPE; |
|
8 |
//TODO change me in the future front and back |
|
9 |
ignore_status: boolean; |
|
10 |
ipowerClientName: string; |
|
11 |
ipowerClientCode: string; |
|
12 |
personalData: boolean; |
|
13 |
userId: string; |
|
14 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/status-per-document.interface.ts | ||
---|---|---|
1 |
import { LookupData } from './lookup-data.interface'; |
|
2 |
import { ReceivedFiles } from './receivedFiles.interface'; |
|
3 |
|
|
4 |
export interface StatusPerDocument { |
|
5 |
statusPerDocRecId: number; |
|
6 |
batchId: number; |
|
7 |
documentStatusLastUpdate: Date; |
|
8 |
documentCurrentStatusId: LookupData; |
|
9 |
receivedFile: ReceivedFiles; |
|
10 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/language.interface.ts | ||
---|---|---|
1 |
export interface Language { |
|
2 |
code: string; |
|
3 |
name: string; |
|
4 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/rights-by-client.interface.ts | ||
---|---|---|
1 |
import { Right } from './right.interface'; |
|
2 |
import { IPowerClient } from './ipower-client.interface'; |
|
3 |
|
|
4 |
export interface RightsByClient { |
|
5 |
client: IPowerClient; |
|
6 |
rights: Right[]; |
|
7 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/alteryx-exception.interface.ts | ||
---|---|---|
1 |
import {Record} from './record.interface'; |
|
2 |
import {LookupData} from './lookup-data.interface'; |
|
3 |
|
|
4 |
export interface AlteryxException { |
|
5 |
|
|
6 |
id: number; |
|
7 |
record: Record[]; |
|
8 |
alteryxExceptionStatus: LookupData; |
|
9 |
alteryxRoutineId: number; |
|
10 |
alteryxExceptionDescription: string; |
|
11 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/verification-rule.interface.ts | ||
---|---|---|
1 |
import { Template } from './template.interface'; |
|
2 |
import { DocumentClassification } from './document-classification.interface'; |
|
3 |
import { IPowerClient } from './ipower-client.interface'; |
|
4 |
import { CapturingVerification } from './capturing-verification.interface'; |
|
5 |
import { JournalVerification } from './journal-verification.interface'; |
|
6 |
|
|
7 |
export interface VerificationRule { |
|
8 |
id: number; |
|
9 |
confidenceLevelMinThreshold: number; |
|
10 |
alteryxRoutineId: string; |
|
11 |
verificationRuleStatus: string; |
|
12 |
client: IPowerClient; |
|
13 |
docClassificationCategory: DocumentClassification |
|
14 |
template: Template; |
|
15 |
capturingVerification: CapturingVerification; |
|
16 |
journalVerification: JournalVerification; |
|
17 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/i-power-assignment.interface.ts | ||
---|---|---|
1 |
export interface IPowerAssignment { |
|
2 |
id: number; |
|
3 |
name: string; |
|
4 |
description: string; |
|
5 |
status: string; |
|
6 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/inbox-document.interface.ts | ||
---|---|---|
1 |
import { FILE_TYPE } from '../enums/FILE_TYPE.enum'; |
|
2 |
import { DocumentClassification } from './document-classification.interface'; |
|
3 |
import { DocumentSubclassification } from './document-subclassification.interface'; |
|
4 |
import { ReceivedFiles } from './receivedFiles.interface'; |
|
5 |
import { StatusPerDocument } from './status-per-document.interface'; |
|
6 |
|
|
7 |
export interface ReceivedFile extends ReceivedFiles { |
|
8 |
|
|
9 |
//This data comes from IMANAGER (Valasides) |
|
10 |
downloadingProcedureId: number; |
|
11 |
dmsWorkspacePath: string; |
|
12 |
iPowerClientCode: number; |
|
13 |
iPowerClientName: string; |
|
14 |
statusPerDocument: StatusPerDocument; |
|
15 |
|
|
16 |
//This data comes from Adones |
|
17 |
abbyClassification: DocumentClassification; |
|
18 |
abbySubClassification: DocumentSubclassification; |
|
19 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/invoice-master-data.interface.ts | ||
---|---|---|
1 |
export interface InvoiceMasterData { |
|
2 |
id: number; |
|
3 |
supplierName: string; |
|
4 |
supplierTaxCode: string; |
|
5 |
customerName: string; |
|
6 |
customerTaxCode: string; |
|
7 |
invoiceNumber: string; |
|
8 |
invoiceType: string; |
|
9 |
invoiceIssueDate: Date; |
|
10 |
deliveryAddress: string; |
|
11 |
totalPriceBeforeDiscount: number; |
|
12 |
discountPercentage: number; |
|
13 |
discountAmount: number; |
|
14 |
totalPriceBeforeVat: number; |
|
15 |
vatRate: number; |
|
16 |
vatCode: number; |
|
17 |
vatAmount: number; |
|
18 |
totalAmount: number; |
|
19 |
totalAmountInBaseCurrency: number; |
|
20 |
numberOfDetailLines: number; |
|
21 |
} |
|
22 |
|
modules/uoa-repository-manager-service/trunk/app/shared/models/process-status.interface.ts | ||
---|---|---|
1 |
|
|
2 |
export interface ProcessStatus { |
|
3 |
id: number; |
|
4 |
name: string; |
|
5 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/invoice-processes-router-params.interface.ts | ||
---|---|---|
1 |
export interface InvoiceProcessesRouterParams { |
|
2 |
clientCode: string; |
|
3 |
docClassification: number; |
|
4 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/models/sentString.interface.ts | ||
---|---|---|
1 |
export interface SentStringInterface { |
|
2 |
value: string; |
|
3 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/services/received-files.service.ts | ||
---|---|---|
1 |
import {environment} from 'src/environments/environment'; |
|
2 |
import {Injectable} from '@angular/core'; |
|
3 |
import {GenericRestService} from './generic-rest.service'; |
|
4 |
import {HttpClient} from '@angular/common/http'; |
|
5 |
import {Observable} from 'rxjs'; |
|
6 |
import { ReceivedFile } from '../models/inbox-document.interface'; |
|
7 |
|
|
8 |
|
|
9 |
@Injectable({ |
|
10 |
providedIn: 'root' |
|
11 |
}) |
|
12 |
export class ReceivedFilesService extends GenericRestService<ReceivedFile> { |
|
13 |
|
|
14 |
constructor(private http: HttpClient) { |
|
15 |
super(`${environment.baseApiUrl}${environment.apiUrl.documentsProcessesWs}/receivedFiles`, http); |
|
16 |
} |
|
17 |
|
|
18 |
public getLatestFilesByIpowerClientId(iPowerClientCode:string): Observable<ReceivedFile[]> { |
|
19 |
return this.http.get<ReceivedFile[]>(this.baseUrl + '/latestFilesPerClient/'+ iPowerClientCode); |
|
20 |
} |
|
21 |
|
|
22 |
} |
|
23 |
|
|
24 |
|
modules/uoa-repository-manager-service/trunk/app/shared/services/generic-rest.service.ts | ||
---|---|---|
1 |
import {Injectable} from '@angular/core'; |
|
2 |
import {HttpClient} from '@angular/common/http'; |
|
3 |
import {Observable} from 'rxjs'; |
|
4 |
import {Page} from '../models/paging/page.interface'; |
|
5 |
import {environment} from '../../../environments/environment'; |
|
6 |
|
|
7 |
|
|
8 |
@Injectable({ |
|
9 |
providedIn: 'root' |
|
10 |
}) |
|
11 |
export class GenericRestService<T> { |
|
12 |
|
|
13 |
|
|
14 |
// tslint:disable-next-line:variable-name |
|
15 |
private _baseUrl: string; |
|
16 |
|
|
17 |
public get baseUrl(): string { |
|
18 |
return this._baseUrl; |
|
19 |
} |
|
20 |
|
|
21 |
constructor(url: string, private httpService: HttpClient) { |
|
22 |
// TODO when we unify the backend will be like that but for now |
|
23 |
// if (url.endsWith('/')) { |
|
24 |
// throw Error('Malformed url: ' + url + '\nEnds with slash'); |
|
25 |
// } |
|
26 |
// if (url.startsWith('/')) { |
|
27 |
// throw Error('Malformed url: ' + url + '\nStarts with slash'); |
|
28 |
// } |
|
29 |
// this._baseUrl = environment.ApiUrl + '/' + url; |
|
30 |
// will be like this |
|
31 |
if (url.endsWith('/')) { |
|
32 |
throw Error('Malformed url: ' + url + '\nEnds with slash'); |
|
33 |
} |
|
34 |
if (url.startsWith('/')) { |
|
35 |
throw Error('Malformed url: ' + url + '\nStarts with slash'); |
|
36 |
} |
|
37 |
this._baseUrl = url; |
|
38 |
// this remains unchanged |
|
39 |
this._baseUrl = url; |
|
40 |
} |
|
41 |
|
|
42 |
|
|
43 |
public getAll(): Observable<T[]> { |
|
44 |
return this.httpService.get<T[]>(this.baseUrl + '/all'); |
|
45 |
} |
|
46 |
|
|
47 |
public getAllPaged(page: number, offset: number): Observable<Page<T>> { |
|
48 |
if (!environment.production && offset !== 10) { |
|
49 |
|
|
50 |
console.log('DEV MESSAGE: The deal is 10 results per page. Your offset became 10.I only show up in non-prod environment :)'); |
|
51 |
} |
|
52 |
return this.httpService.get<Page<T>>(this.baseUrl + '/all', { |
|
53 |
params: { |
|
54 |
page: page.toString(), |
|
55 |
offset: '10' |
|
56 |
} |
|
57 |
}); |
|
58 |
} |
|
59 |
|
|
60 |
public getById(id: string | number): Observable<T> { |
|
61 |
return this.httpService.get<T>(this.baseUrl + '/' + id.toString()); |
|
62 |
} |
|
63 |
|
|
64 |
public update(data: T): Observable<T> { |
|
65 |
return this.httpService.put<T>(this.baseUrl, data); |
|
66 |
} |
|
67 |
|
|
68 |
public create(data: T): Observable<T> { |
|
69 |
return this.httpService.post<T>(this.baseUrl, data); |
|
70 |
} |
|
71 |
|
|
72 |
public delete(id: string | number): Observable<T> { |
|
73 |
return this.httpService.delete<T>(this.baseUrl + '/' + id.toString()); |
|
74 |
} |
|
75 |
|
|
76 |
public deleteById(data: T): Observable<T> { |
|
77 |
return this.httpService.delete<T>(this.baseUrl, data); |
|
78 |
} |
|
79 |
|
|
80 |
|
|
81 |
public searchByCriteriaPaged(page: number, offset: number, criteria: any, urlExtension: string): Observable<Page<T>> { |
|
82 |
// TODO make this better |
|
83 |
if (!environment.production && offset !== 10) { |
|
84 |
|
|
85 |
console.log('DEV MESSAGE: The deal is 10 results per page. Your offset became 10.I only show up in non-prod environment :)'); |
|
86 |
} |
|
87 |
if (urlExtension) { |
|
88 |
if (urlExtension.endsWith('/')) { |
|
89 |
throw Error('Malformed url: ' + urlExtension + '\nEnds with slash'); |
|
90 |
|
|
91 |
} |
|
92 |
if (urlExtension.startsWith('/')) { |
|
93 |
throw Error('Malformed url: ' + urlExtension + '\nStarts with slash'); |
|
94 |
} |
|
95 |
urlExtension = '/' + urlExtension; |
|
96 |
} else { |
|
97 |
urlExtension = ''; |
|
98 |
} |
|
99 |
|
|
100 |
return this.httpService.post<Page<T>>(this.baseUrl + urlExtension, criteria, { |
|
101 |
params: { |
|
102 |
page: page.toString(), |
|
103 |
offset: '10' |
|
104 |
} |
|
105 |
}); |
|
106 |
} |
|
107 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/services/error-handling/error-handling.service.spec.ts | ||
---|---|---|
1 |
import { TestBed } from '@angular/core/testing'; |
|
2 |
|
|
3 |
import { ErrorHandlingService } from './error-handling.service'; |
|
4 |
|
|
5 |
describe('ErrorHandlingService', () => { |
|
6 |
let service: ErrorHandlingService; |
|
7 |
|
|
8 |
beforeEach(() => { |
|
9 |
TestBed.configureTestingModule({}); |
|
10 |
service = TestBed.inject(ErrorHandlingService); |
|
11 |
}); |
|
12 |
|
|
13 |
it('should be created', () => { |
|
14 |
expect(service).toBeTruthy(); |
|
15 |
}); |
|
16 |
}); |
modules/uoa-repository-manager-service/trunk/app/shared/services/error-handling/error-handling.service.ts | ||
---|---|---|
1 |
import { TranslateService } from '@ngx-translate/core'; |
|
2 |
import { RTAErrorMessage } from './../../enums/rta-error-message'; |
|
3 |
import { Injectable } from '@angular/core'; |
|
4 |
import { MessageService } from 'primeng/api'; |
|
5 |
import { HttpErrorResponse } from '@angular/common/http'; |
|
6 |
|
|
7 |
@Injectable({ |
|
8 |
providedIn: 'root', |
|
9 |
}) |
|
10 |
export class ErrorHandlingService { |
|
11 |
|
|
12 |
constructor(private messageService: MessageService, private translate: TranslateService) { } |
|
13 |
|
|
14 |
showHttpResponseError(error: HttpErrorResponse): void { |
|
15 |
this.messageService.add({ |
|
16 |
severity: 'error', |
|
17 |
summary: this.translate.instant('RTA_ERRORS.TITLE_ERROR'), |
|
18 |
detail: this.httpErrorResponseToMessage(error) |
|
19 |
}); |
|
20 |
} |
|
21 |
|
|
22 |
showErrorMessage(message: string): void { |
|
23 |
this.messageService.add({ |
|
24 |
severity: 'error', |
|
25 |
summary: this.translate.instant('RTA_ERRORS.TITLE_ERROR'), |
|
26 |
detail: message |
|
27 |
}); |
|
28 |
} |
|
29 |
|
|
30 |
clearErrors(): void { |
|
31 |
this.messageService.clear(); |
|
32 |
} |
|
33 |
|
|
34 |
private httpErrorResponseToMessage(error: HttpErrorResponse): string { |
|
35 |
if (error && error.status === 0) { |
|
36 |
return this.translate.instant(`RTA_ERRORS.${RTAErrorMessage.TIMEOUT.toString()}`); |
|
37 |
} |
|
38 |
const errMsg = this.translate.instant(`RTA_ERRORS.${error.message}`); |
|
39 |
return errMsg ?? this.translate.instant('RTA_ERRORS.UNKNOWN_ERROR'); |
|
40 |
} |
|
41 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/services/inbox-management.service.ts | ||
---|---|---|
1 |
import { environment } from 'src/environments/environment'; |
|
2 |
import {Injectable} from '@angular/core'; |
|
3 |
import {GenericRestService} from './generic-rest.service'; |
|
4 |
import {HttpClient, HttpResponse} from '@angular/common/http'; |
|
5 |
import {InboxBatch} from '../models/inbox-batch.interface'; |
|
6 |
|
|
7 |
@Injectable({ |
|
8 |
providedIn: 'root' |
|
9 |
}) |
|
10 |
export class InboxManagementService extends GenericRestService<InboxBatch> { |
|
11 |
|
|
12 |
constructor(private http: HttpClient) { |
|
13 |
super(`${environment.baseApiUrl}${environment.apiUrl.documentsProcessesWs}/status`, http); |
|
14 |
} |
|
15 |
|
|
16 |
downloadFile(url: string): any { |
|
17 |
return this.http.get(url, {responseType: 'blob'}); |
|
18 |
} |
|
19 |
|
|
20 |
|
|
21 |
ignoreFile(id: string): any { |
|
22 |
return this.http.post(`${this.baseUrl}/ignore/${id}`, ''); |
|
23 |
} |
|
24 |
|
|
25 |
forward(id: string): any { |
|
26 |
return this.http.post(`${this.baseUrl}/forward/${id}`, ''); |
|
27 |
} |
|
28 |
|
|
29 |
reclassify(doc: InboxBatch): any { |
|
30 |
return this.http.put(`${this.baseUrl}/reclassify`, doc); |
|
31 |
} |
|
32 |
|
|
33 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/services/invoice-processes.service.spec.ts | ||
---|---|---|
1 |
import { TestBed } from '@angular/core/testing'; |
|
2 |
|
|
3 |
import { InvoiceProcessesService } from './invoice-processes.service'; |
|
4 |
|
|
5 |
describe('InvoiceProcessesService', () => { |
|
6 |
let service: InvoiceProcessesService; |
|
7 |
|
|
8 |
beforeEach(() => { |
|
9 |
TestBed.configureTestingModule({}); |
|
10 |
service = TestBed.inject(InvoiceProcessesService); |
|
11 |
}); |
|
12 |
|
|
13 |
it('should be created', () => { |
|
14 |
expect(service).toBeTruthy(); |
|
15 |
}); |
|
16 |
}); |
modules/uoa-repository-manager-service/trunk/app/shared/services/auth.service.spec.ts | ||
---|---|---|
1 |
import { TestBed } from '@angular/core/testing'; |
|
2 |
|
|
3 |
import { AuthService } from './auth.service'; |
|
4 |
|
|
5 |
describe('AuthService', () => { |
|
6 |
let service: AuthService; |
|
7 |
|
|
8 |
beforeEach(() => { |
|
9 |
TestBed.configureTestingModule({}); |
|
10 |
service = TestBed.inject(AuthService); |
|
11 |
}); |
|
12 |
|
|
13 |
it('should be created', () => { |
|
14 |
expect(service).toBeTruthy(); |
|
15 |
}); |
|
16 |
}); |
modules/uoa-repository-manager-service/trunk/app/shared/services/journal-dialog-edit.service.ts | ||
---|---|---|
1 |
import { Injectable } from '@angular/core'; |
|
2 |
import {HttpClient} from '@angular/common/http'; |
|
3 |
import {environment} from '../../../environments/environment'; |
|
4 |
import {Observable} from "rxjs"; |
|
5 |
|
|
6 |
@Injectable({ |
|
7 |
providedIn: 'root' |
|
8 |
}) |
|
9 |
export class JournalDialogEditService { |
|
10 |
|
|
11 |
constructor(private http: HttpClient) { |
|
12 |
} |
|
13 |
|
|
14 |
getIframe(journalEntryId: string): Observable<string> { |
|
15 |
return this.http.get<string>( |
|
16 |
`${environment.baseApiUrl}${environment.apiUrl.documentsProcessesWs}/journalEntries/edit/` + journalEntryId.toString()); |
|
17 |
} |
|
18 |
|
|
19 |
|
|
20 |
} |
modules/uoa-repository-manager-service/trunk/app/shared/services/invoice-processes.service.ts | ||
---|---|---|
1 |
import { environment } from 'src/environments/environment'; |
|
2 |
import { Injectable } from '@angular/core'; |
|
3 |
import { GenericRestService } from './generic-rest.service'; |
|
4 |
import { LookupData } from '../models/lookup-data.interface'; |
|
5 |
import { HttpClient } from '@angular/common/http'; |
|
6 |
import { Observable, of, } from 'rxjs'; |
|
7 |
import { FullInvoiceProcess } from '../models/full-invoice-process.interface'; |
|
8 |
import { InvoiceProcess } from '../models/invoice-process.interface'; |
|
9 |
import { AlteryxUnhandledData } from '../models/alteryx-unhandled-data.interface'; |
|
10 |
import { InvoiceMasterData } from '../models/invoice-master-data.interface'; |
|
11 |
import { SentStringInterface } from '../models/sentString.interface'; |
|
12 |
import {JournalEntry} from "../models/journal-entry.interface"; |
|
13 |
import {AlteryxException} from "../models/alteryx-exception.interface"; |
|
14 |
import {ProcessFailedRecord} from "../models/process-failed-record.interface"; |
|
15 |
import {ProcessHistory} from "../models/process-history.interface"; |
|
16 |
|
|
17 |
@Injectable({ |
|
18 |
providedIn: 'root' |
|
19 |
}) |
|
20 |
export class InvoiceProcessesService extends GenericRestService<InvoiceProcess> { |
|
21 |
|
|
22 |
constructor(private http: HttpClient) { |
|
23 |
super(`${environment.baseApiUrl}${environment.apiUrl.documentsProcessesWs}/processes`, http); |
|
24 |
} |
|
25 |
|
|
26 |
getAllStatuses(): Observable<LookupData> { |
|
27 |
return this.http.get<LookupData>(this.baseUrl + '/process-status/all'); |
|
28 |
} |
|
29 |
|
|
30 |
getAllFileTypes(): Observable<string[]> { |
|
31 |
return of(['XL', 'PDF', 'DOCX']); |
|
32 |
} |
|
33 |
|
|
34 |
getFullInvoiceProcessById(invoiceProcessId: number): Observable<FullInvoiceProcess> { |
|
35 |
return this.http.get<FullInvoiceProcess>(this.baseUrl + '/full/' + invoiceProcessId.toString()); |
|
36 |
} |
|
37 |
|
|
38 |
getIframe(invoiceProcessId: string): Observable<string> { |
|
39 |
return this.http.get<string>( |
|
40 |
`${environment.baseApiUrl}${environment.apiUrl.documentsProcessesWs}/abbyy` + '/verify/' + invoiceProcessId.toString()); |
|
41 |
} |
|
42 |
|
|
43 |
getAssignToUsersDistinct(username: string): Observable<string[]> { |
|
44 |
return this.http.get<string[]>( |
|
45 |
`${environment.baseApiUrl}${environment.apiUrl.documentsProcessesWs}/processes/search-username/` + username.toString()); |
|
46 |
} |
|
47 |
|
|
48 |
reclassifyRecords(id: string, selectedClassification: any, selectedSubClassification: any): Observable<InvoiceMasterData> { |
|
49 |
return this.http.post<any>( |
|
50 |
`${environment.baseApiUrl}${environment.apiUrl.documentsProcessesWs}` + |
|
51 |
'/alteryx/reclassify/' + id, '', { |
|
52 |
params: { |
|
53 |
docClassificationId: selectedClassification, |
|
54 |
docSubClassificationId: selectedSubClassification |
|
55 |
} |
|
56 |
}); |
|
57 |
} |
|
58 |
|
|
59 |
recalculateException(id: number): Observable<any> { |
|
60 |
return this.http.post<any>( |
|
61 |
`${environment.baseApiUrl}${environment.apiUrl.documentsProcessesWs}` + |
|
62 |
'/alteryx/recalculate-exception/' + id, '' |
|
63 |
); |
|
64 |
} |
|
65 |
|
|
66 |
updateVerificationCompletedForProcess(id: number): Observable<any> { |
|
67 |
return this.http.get( |
Also available in: Unified diff
deleting angular app...