diff --git a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html index e0f3b138f..fa0c5a096 100644 --- a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html +++ b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html @@ -61,8 +61,8 @@ -
- +
+
@@ -82,8 +82,8 @@ -
- +
+
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 5e759b6a8..a7709d154 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 @@ -13,6 +13,7 @@ import { environment } from 'src/environments/environment'; import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page'; import { AttachmentsService } from 'src/app/services/attachments.service'; import { ExpedienteDetailPage } from '../expediente-detail/expediente-detail.page'; +import { AlertService } from 'src/app/services/alert.service'; @Component({ selector: 'app-expedient-task-modal', @@ -58,6 +59,7 @@ export class ExpedientTaskModalPage implements OnInit { private processes:ProcessesService, private attachmentsService: AttachmentsService, private navParams: NavParams, + private alertController: AlertService, private authService: AuthService) { this.user = environment.defaultuser +'@'+ environment.domain; this.task = this.navParams.get('task'); @@ -111,50 +113,62 @@ export class ExpedientTaskModalPage implements OnInit { } saveTask(){ - - switch (this.taskType) - { - case '0': - this.postData = { - DistributionType: "Paralelo", - CountryCode: 'AO', - Priority: this.postData.Priority, - UserEmail: this.user, - SubjectTypeId: this.postData.SubjectTypeId, - UsersSelected: this.participants, - DispatchFolder: this.dispatchFolder, - } - console.log(this.postData); - this.processes.postDespatcho(this.postData); - break; - case '1': - this.postData = { - DistributionType: "Paralelo", - CountryCode: 'AO', - Priority: this.postData.Priority, - UserEmail: this.user, - SubjectTypeId: this.postData.SubjectTypeId, - UsersSelected: this.participants, - DispatchFolder: this.dispatchFolder, - } - this.processes.postParecer(this.postData); - break; - case '2': - this.postData = { - DistributionType: "Paralelo", - CountryCode: 'AO', - Priority: this.postData.Priority, - UserEmail: this.user, - SubjectTypeId: this.postData.SubjectTypeId, - UsersSelected: this.participants, - DispatchFolder: this.dispatchFolder, - } - this.processes.postDeferimento(this.postData); - break; - } + let attendees = this.taskParticipants.concat(this.taskParticipantsCc); + attendees = attendees.map(function(val) { + return { + UserEmail: val.EmailAddress, + UserType: val.IsRequired?"I": "CC" + }; + }) + if(this.taskParticipants.length > 0){ + switch (this.taskType){ + case '0': + this.postData = { + DistributionType: "Paralelo", + CountryCode: 'AO', + Priority: this.postData.Priority, + UserEmail: this.user, + SubjectTypeId: this.postData.SubjectTypeId, + UsersSelected: attendees, + DispatchFolder: this.dispatchFolder, + } + console.log(this.postData); + this.processes.postDespatcho(this.postData); + break; + case '1': + this.postData = { + DistributionType: "Paralelo", + CountryCode: 'AO', + Priority: this.postData.Priority, + UserEmail: this.user, + SubjectTypeId: this.postData.SubjectTypeId, + UsersSelected: attendees, + DispatchFolder: this.dispatchFolder, + } + console.log(this.postData); + this.processes.postParecer(this.postData); + break; + case '2': + this.postData = { + DistributionType: "Paralelo", + CountryCode: 'AO', + Priority: this.postData.Priority, + UserEmail: this.user, + SubjectTypeId: this.postData.SubjectTypeId, + UsersSelected: attendees, + DispatchFolder: this.dispatchFolder, + } + console.log(this.postData); + this.processes.postDeferimento(this.postData); + break; + } this.modalController.dismiss('openDiscart'); /* this.distartExpedientModal(); this.close(); */ + } + else{ + this.alertController.presentAlert("Lista de intervenientes vazia. Por favor, adicione 1 ou mais intervenientes."); + } } getAttachments(){ @@ -165,6 +179,8 @@ export class ExpedientTaskModalPage implements OnInit { } async addParticipants(){ + console.log('HERES'); + this.adding = "intervenient"; this.contacts = this.taskParticipants; diff --git a/src/app/pages/publications/publication-detail/publication-detail.page.ts b/src/app/pages/publications/publication-detail/publication-detail.page.ts index 52aace972..6e564f5d5 100644 --- a/src/app/pages/publications/publication-detail/publication-detail.page.ts +++ b/src/app/pages/publications/publication-detail/publication-detail.page.ts @@ -85,6 +85,8 @@ export class PublicationDetailPage implements OnInit { } async editPost(publicationType:any) { + console.log('HERE'); + console.log(this.publication); const modal = await this.modalController.create({ component: NewPublicationPage, diff --git a/src/app/pages/publications/publications.page.html b/src/app/pages/publications/publications.page.html index 0399a0937..06f318e5c 100644 --- a/src/app/pages/publications/publications.page.html +++ b/src/app/pages/publications/publications.page.html @@ -22,7 +22,7 @@
- +
@@ -87,7 +87,8 @@ class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1" [folderId]="folderId" [publicationType]="publicationType" - + [publicationId]="publicationId" + (closeDesktopComponent)="closeDesktopComponent($event)" (goBacktoPublicationDetails)="goBacktoPublicationDetails($event)" (goBackToViewPublications)="goBackToViewPublications($event)" diff --git a/src/app/pages/publications/publications.page.ts b/src/app/pages/publications/publications.page.ts index c565c6809..bba22464f 100644 --- a/src/app/pages/publications/publications.page.ts +++ b/src/app/pages/publications/publications.page.ts @@ -10,6 +10,7 @@ import { ViewPublicationsPage } from './view-publications/view-publications.page import { Animation, AnimationController } from '@ionic/angular'; import { LoadingController } from '@ionic/angular'; import { LoadingService } from 'src/app/services/loading.service'; +import { Publication } from 'src/app/models/publication'; @Component({ @@ -20,6 +21,7 @@ import { LoadingService } from 'src/app/services/loading.service'; export class PublicationsPage implements OnInit { showLoader: boolean; publicationFolder: PublicationFolder; + publication: Publication; publicationFolderList: PublicationFolder[]; publicationsEventFolderList: PublicationFolder[]; @@ -45,7 +47,7 @@ export class PublicationsPage implements OnInit { publicationId: string; // from publication details - publication: object; + //publication: object; constructor( private router: Router, diff --git a/src/app/shared/agenda/approve-event/approve-event.component.html b/src/app/shared/agenda/approve-event/approve-event.component.html index bcc6ea3d2..9633ccee6 100644 --- a/src/app/shared/agenda/approve-event/approve-event.component.html +++ b/src/app/shared/agenda/approve-event/approve-event.component.html @@ -67,13 +67,11 @@
-
+
Intervenientes
- - -

{{loadedEvent.workflowInstanceDataFields.Participants}}

-
-
+
+ {{att.Name}} +
Detalhes
diff --git a/src/app/shared/publication/new-publication/new-publication.page.ts b/src/app/shared/publication/new-publication/new-publication.page.ts index 4ff61af78..6aebde7d5 100644 --- a/src/app/shared/publication/new-publication/new-publication.page.ts +++ b/src/app/shared/publication/new-publication/new-publication.page.ts @@ -39,6 +39,7 @@ export class NewPublicationPage implements OnInit { @Input() publicationType: string; @Input() folderId: string; + @Input() publicationId:string; @Output() closeDesktopComponent = new EventEmitter(); @Output() openPublicationDetails = new EventEmitter(); @Output() goBackToViewPublications = new EventEmitter(); @@ -59,10 +60,38 @@ export class NewPublicationPage implements OnInit { } ngOnInit() { + if(this.publicationType == '3'){ + this.getPublicationDetail(); + } this.setTitle(); this.clear(); this.takePicture(); } + + getPublicationDetail(){ + this.showLoader = true; + console.log(this.publicationId); + /* console.log(this.folderId); */ + this.publications.GetPublicationById(this.publicationId).subscribe(res=>{ + console.log(res); + /* this.publication = res; */ + this.publication = { + DateIndex: res.DateIndex, + DocumentId: res.DocumentId, + ProcessId:res.ProcessId, + Title:res.Title, + Message: res.Message, + DatePublication: res.DatePublication, + FileBase64: "data:image/jpg;base64," + res.FileBase64, + OriginalFileName: res.OriginalFileName, + FileExtension: 'jpeg', + } + this.pub = this.publication; + this.showLoader = false; + }); + } + + takePicture(){ const options: CameraOptions = { quality: 90, @@ -189,7 +218,8 @@ export class NewPublicationPage implements OnInit { if(this.publicationType == '2'){ this.goBackToViewPublications.emit(); } else { - this.goBacktoPublicationDetails.emit(); + this.goBackToViewPublications.emit(); + //this.goBacktoPublicationDetails.emit(); } } diff --git a/src/global.scss b/src/global.scss index cbbd385c4..981f4f95c 100644 --- a/src/global.scss +++ b/src/global.scss @@ -571,6 +571,9 @@ border-top: 1px solid #d8d8d8; } .title-icon{ font-size: 40px !important; - color: #0782c9; + color: #42b9fe; overflow: auto; + } + ion-icon { + pointer-events: none; } \ No newline at end of file