Merge branch 'developer-c' of bitbucket.org:equilibriumito/gabinete-digital into feature/calendar

This commit is contained in:
Peter Maquiran
2021-04-08 15:58:56 +01:00
8 changed files with 108 additions and 56 deletions
@@ -61,8 +61,8 @@
</ion-list>
</ion-item>
</div>
<div class="add-people">
<ion-icon (click)="addParticipants(); showAttendees='true'" slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<div class="add-people" (click)="addParticipants(); showAttendees='true'">
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
</div>
</div>
</div>
@@ -82,8 +82,8 @@
</ion-list>
</ion-item>
</div>
<div class="add-people">
<ion-icon (click)="addParticipantsCc(); showAttendees='true'" slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<div class="add-people" (click)="addParticipantsCc(); showAttendees='true'">
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
</div>
</div>
</div>
@@ -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;
@@ -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,
@@ -22,7 +22,7 @@
</div>
<div class="div-icon">
<ion-icon (click)="AddPublicationFolder()" slot="end" src='assets/images/icons-add.svg'></ion-icon>
<ion-icon (click)="doRefresh($event)" class="title-icon" name="reload-circle"></ion-icon>
<ion-icon (click)="doRefresh($event)" slot="icon-only" class="title-icon" name="reload-circle" title="Actualizar"></ion-icon>
</div>
</div>
</div>
@@ -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)"
@@ -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,