This commit is contained in:
Peter Maquiran
2021-05-07 16:17:01 +01:00
5 changed files with 14 additions and 20 deletions
@@ -43,7 +43,7 @@
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
</div>
<div class="ion-input-class">
<ion-select placeholder="Tipo" [(ngModel)]="postData.SubjectTypeId" interface="action-sheet" Cancel-text="Cancelar" required>
<ion-select placeholder="Tipo" [(ngModel)]="selectedTypes" multiple="true" interface="action-sheet" Cancel-text="Cancelar" required>
<ion-select-option *ngFor="let type of subjectTypes" value="{{type.Code}}">{{type.Description}}</ion-select-option>
</ion-select>
</div>
@@ -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,
}