diff --git a/src/app/modals/create-process/create-process.page.html b/src/app/modals/create-process/create-process.page.html
index cb5746761..351ffd8c4 100644
--- a/src/app/modals/create-process/create-process.page.html
+++ b/src/app/modals/create-process/create-process.page.html
@@ -43,7 +43,7 @@
-
+
{{type.Description}}
diff --git a/src/app/modals/create-process/create-process.page.ts b/src/app/modals/create-process/create-process.page.ts
index 8c2de3cb8..ebc08af42 100644
--- a/src/app/modals/create-process/create-process.page.ts
+++ b/src/app/modals/create-process/create-process.page.ts
@@ -39,6 +39,7 @@ export class CreateProcessPage implements OnInit {
user: string;
loadedAttachments:any;
subjectTypes:any;
+ selectedTypes: string[]=[];
postData: Despacho;
dispatchFolder: Folder;
@@ -77,11 +78,11 @@ export class CreateProcessPage implements OnInit {
Nad: 30,
Subject: '',
Message: '',
- SourceSecFsId: '361',
- SouceType: 'FOLDER',
- SourceId: this.task.workflowInstanceDataFields.FolderID,
+ SourceSecFsId: this.task.workflowInstanceDataFields.FsId, //361
+ SouceType: 'DOC', //FOLDER
+ SourceId: this.task.workflowInstanceDataFields.DocId, //FolderId
DeadlineType: '',
- SubjectTypes: [99999844],
+ SubjectTypes: ['99999844'],
};
@@ -89,8 +90,6 @@ export class CreateProcessPage implements OnInit {
this.postData.UsersSelected = this.participants;
/* By Default TypeDeadline should be 'Normal' */
this.postData.Priority = '99999861';
- /* By Default TypeDeadline should be 'Economia' */
- this.postData.SubjectTypeId = '99999844';
/* Initialize 'Subject' with the title of the expedient */
this.postData.DispatchFolder.Subject = this.task.workflowInstanceDataFields.Subject;
this.profile = this.navParams.get('profile');
@@ -152,7 +151,7 @@ export class CreateProcessPage implements OnInit {
UserEmail: val.EmailAddress,
UserType: val.IsRequired?"I": "CC"
};
- })
+ });
const DocumentToSave = this.documents.map((e) => {
return {
@@ -161,6 +160,8 @@ export class CreateProcessPage implements OnInit {
}
});
+ this.dispatchFolder.SubjectTypes = this.selectedTypes;
+
if(this.taskParticipants.length > 0) {
switch (this.taskType) {
case '0':
@@ -169,7 +170,6 @@ export class CreateProcessPage implements OnInit {
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
- SubjectTypeId: this.postData.SubjectTypeId,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
@@ -182,7 +182,6 @@ export class CreateProcessPage implements OnInit {
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
- SubjectTypeId: this.postData.SubjectTypeId,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
@@ -195,7 +194,6 @@ export class CreateProcessPage implements OnInit {
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
- SubjectTypeId: this.postData.SubjectTypeId,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
diff --git a/src/app/models/despacho.model.ts b/src/app/models/despacho.model.ts
index 606722c5f..b21e2e1c8 100644
--- a/src/app/models/despacho.model.ts
+++ b/src/app/models/despacho.model.ts
@@ -5,7 +5,6 @@ export class Despacho{
DistributionType: string;
CountryCode: string;
Priority: string;
- SubjectTypeId: string;
UserEmail: string;
UsersSelected: Participant[];
DispatchFolder: Folder;
diff --git a/src/app/models/folder.model.ts b/src/app/models/folder.model.ts
index dda9b48a4..c7a662c08 100644
--- a/src/app/models/folder.model.ts
+++ b/src/app/models/folder.model.ts
@@ -6,5 +6,5 @@ export class Folder{
SouceType:string;
SourceId:string;
DeadlineType: string;
- SubjectTypes: number[];
+ SubjectTypes: string[];
}
\ No newline at end of file
diff --git a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts
index c2ffd9aff..0c7f65310 100644
--- a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts
+++ b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts
@@ -95,7 +95,7 @@ export class ExpedientTaskModalPage implements OnInit {
SouceType: 'DOC', //FOLDER
SourceId: this.task.workflowInstanceDataFields.DocId, //FolderId
DeadlineType: '',
- SubjectTypes: [99999844],
+ SubjectTypes: ['99999844'],
};
@@ -103,8 +103,6 @@ export class ExpedientTaskModalPage implements OnInit {
this.postData.UsersSelected = this.participants;
/* By Default TypeDeadline should be 'Normal' */
this.postData.Priority = '99999861';
- /* By Default TypeDeadline should be 'Economia' */
- this.postData.SubjectTypeId = '99999844';
/* Initialize 'Subject' with the title of the expedient */
this.postData.DispatchFolder.Subject = this.task.workflowInstanceDataFields.Subject;
this.profile = this.navParams.get('profile');
@@ -182,7 +180,9 @@ export class ExpedientTaskModalPage implements OnInit {
}
});
- docs.Attachments = DocumentToSave
+ this.dispatchFolder.SubjectTypes = this.selectedTypes;
+
+ docs.Attachments = DocumentToSave;
if(this.taskParticipants.length > 0) {
switch (this.taskType) {
@@ -192,7 +192,6 @@ export class ExpedientTaskModalPage implements OnInit {
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
- SubjectTypeId: this.postData.SubjectTypeId,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs,
@@ -220,7 +219,6 @@ export class ExpedientTaskModalPage implements OnInit {
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
- SubjectTypeId: this.postData.SubjectTypeId,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs
@@ -245,7 +243,6 @@ export class ExpedientTaskModalPage implements OnInit {
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
- SubjectTypeId: this.postData.SubjectTypeId, //this.selectedTypes
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs