mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Update
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { DeadlineService } from './deadline.service';
|
||||
|
||||
describe('DeadlineService', () => {
|
||||
let service: DeadlineService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(DeadlineService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class DeadlineService {
|
||||
|
||||
constructor() { }
|
||||
|
||||
|
||||
priorityToDeadlineType(Priority): string {
|
||||
if(Priority=='99999861') {
|
||||
return 'Normal';
|
||||
}
|
||||
else if(Priority=='99999862') {
|
||||
return 'Urgente';
|
||||
}
|
||||
else if(Priority=='99999863') {
|
||||
return 'Muito Urgente';
|
||||
}
|
||||
else if(Priority=='99999864') {
|
||||
return 'Urgentíssimo';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { DeplomaService } from './deploma.service';
|
||||
|
||||
describe('DeplomaService', () => {
|
||||
let service: DeplomaService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(DeplomaService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,58 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ProcessesService } from '../services/processes.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class DeplomaService {
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
) { }
|
||||
|
||||
|
||||
async askSignature({note, documents, serialNumber}) {
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Aprovar",
|
||||
"ActionTypeId": 99999840,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
return this.processes.CompleteTask(body)
|
||||
}
|
||||
|
||||
async askToChange({note, documents, serialNumber}) {
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Retificar",
|
||||
"ActionTypeId": 99999841,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
return this.processes.CompleteTask(body)
|
||||
|
||||
}
|
||||
|
||||
async finish({note, documents, serialNumber}) {
|
||||
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Concluir",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
return this.processes.CompleteTask(body);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user