This commit is contained in:
tiago.kayaya
2021-05-07 15:27:31 +01:00
parent 642937605c
commit cd50681ae4
5 changed files with 11 additions and 17 deletions
@@ -44,7 +44,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;
@@ -81,7 +82,7 @@ export class CreateProcessPage implements OnInit {
SouceType: 'FOLDER',
SourceId: this.task.workflowInstanceDataFields.FolderID,
DeadlineType: '',
SubjectTypes: [],
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.SubjectTypes = [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,
SubjectTypes: this.postData.SubjectTypes ,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
@@ -182,7 +182,6 @@ export class CreateProcessPage implements OnInit {
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
SubjectTypes: this.postData.SubjectTypes ,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
@@ -195,7 +194,6 @@ export class CreateProcessPage implements OnInit {
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
SubjectTypes: this.postData.SubjectTypes ,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}