mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Improve task
This commit is contained in:
@@ -14,6 +14,8 @@ import { AddParticipantsModalPage } from 'src/app/pages/gabinete-digital/expedie
|
||||
import { AddParticipantsCcModalPage } from 'src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page';
|
||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-create-process',
|
||||
@@ -52,6 +54,8 @@ export class CreateProcessPage implements OnInit {
|
||||
emptyTextDescription = "Sem intervenientes selecionados";
|
||||
showEmptyContainer = true;
|
||||
|
||||
documents:SearchDocument[] = [];
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private router:Router,
|
||||
@@ -85,7 +89,7 @@ export class CreateProcessPage implements OnInit {
|
||||
/* By Default TypeDeadline should be 'Normal' */
|
||||
this.postData.Priority = '99999861';
|
||||
/* By Default TypeDeadline should be 'Economia' */
|
||||
this.postData.SubjectTypeId = '99999844';
|
||||
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');
|
||||
@@ -149,6 +153,13 @@ export class CreateProcessPage implements OnInit {
|
||||
};
|
||||
})
|
||||
|
||||
const DocumentToSave = this.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id
|
||||
}
|
||||
});
|
||||
|
||||
if(this.taskParticipants.length > 0) {
|
||||
switch (this.taskType) {
|
||||
case '0':
|
||||
@@ -157,7 +168,7 @@ export class CreateProcessPage implements OnInit {
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
SubjectTypeId: this.postData.SubjectTypeId,
|
||||
SubjectTypes: this.postData.SubjectTypes ,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
@@ -170,7 +181,7 @@ export class CreateProcessPage implements OnInit {
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
SubjectTypeId: this.postData.SubjectTypeId,
|
||||
SubjectTypes: this.postData.SubjectTypes ,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
@@ -183,7 +194,7 @@ export class CreateProcessPage implements OnInit {
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
SubjectTypeId: this.postData.SubjectTypeId,
|
||||
SubjectTypes: this.postData.SubjectTypes ,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
@@ -373,6 +384,31 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
removeAttachment(index: number){
|
||||
|
||||
this.documents = this.documents.filter( (e, i) => index != i);
|
||||
|
||||
}
|
||||
|
||||
|
||||
async getDoc(){
|
||||
const modal = await this.modalController.create({
|
||||
component: SearchPage,
|
||||
cssClass: 'modal-width-100-width-background modal',
|
||||
componentProps: {
|
||||
type: 'AccoesPresidenciais & ArquivoDespachoElect',
|
||||
showSearchInput: true,
|
||||
select: true
|
||||
}
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
if(res){
|
||||
const data = res.data;
|
||||
this.documents.push(data.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user