Saidas testastas

This commit is contained in:
Eudes Inácio
2023-02-27 22:16:15 +01:00
parent 75e6a62695
commit c037078ca7
6 changed files with 116 additions and 16 deletions
@@ -103,7 +103,8 @@ export class CreateProcessPage implements OnInit {
) {
this.loggeduser = SessionStore.user;
this.task = this.navParams.get('task');
this.fulltask = this.navParams.get('fulltask');
console.log(this.task)
if (this.task.SerialNumber) {
this.task.serialNumber = this.task.SerialNumber
}
@@ -127,9 +128,10 @@ export class CreateProcessPage implements OnInit {
let SourceId;
let SourceType;
let SourceSecFsId;
const taskId = this.task.workflowInstanceDataFields?.FolderID || this.task?.FolderId || this.task?.FolderID
if(this.task.workflowInstanceDataFields.FolderID || this.task.FolderId || this.task.FolderID) {
SourceId = this.task.workflowInstanceDataFields.FolderID
if(taskId) {
SourceId = taskId
SourceType = 'FOLDER'
SourceSecFsId = 361
} else {
@@ -147,7 +149,7 @@ export class CreateProcessPage implements OnInit {
SourceId: SourceId,
DeadlineType: '',
SubjectTypes: this.selectedTypes,
NumberPDPP: this.task.workflowInstanceDataFields.DispatchNumber || NumberPDPP
NumberPDPP: this.task?.workflowInstanceDataFields?.DispatchNumber || NumberPDPP || this.fulltask?.workflowInstanceDataFields?.DispatchNumber
};
this.postData.DispatchFolder = this.dispatchFolder;
@@ -155,7 +157,8 @@ export class CreateProcessPage implements OnInit {
/* By Default TypeDeadline should be 'Normal' */
this.postData.Priority = '99999861';
/* Initialize 'Subject' with the title of the expedient */
this.postData.DispatchFolder.Subject = this.task.workflowInstanceDataFields.Subject;
console.log('Subject',this.fulltask)
this.postData.DispatchFolder.Subject = this.task?.workflowInstanceDataFields?.Subject || this.fulltask?.workflowInstanceDataFields?.Subject;
this.profile = this.navParams.get('profile');
}