mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Fixe duplicated attendess
This commit is contained in:
@@ -48,6 +48,15 @@ const routes: Routes = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'attendees-modal',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path:'',
|
||||||
|
loadChildren: ()=> import('../shared/event/attendee-modal/attendee-modal.module').then(m => m.AttendeeModalPageModule)
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'login',
|
path: 'login',
|
||||||
children: [
|
children: [
|
||||||
@@ -103,6 +112,10 @@ const routes: Routes = [
|
|||||||
{
|
{
|
||||||
path:'events/:eventId/:caller',
|
path:'events/:eventId/:caller',
|
||||||
loadChildren: ()=> import('../pages/events/event-detail/event-detail.module').then(m => m.EventDetailPageModule),
|
loadChildren: ()=> import('../pages/events/event-detail/event-detail.module').then(m => m.EventDetailPageModule),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path:'expediente-task-modal',
|
||||||
|
loadChildren: ()=> import('../pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.module').then(m => m.ExpedientTaskModalPageModule),
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -392,7 +392,6 @@
|
|||||||
<app-attendee-modal
|
<app-attendee-modal
|
||||||
class="d-flex flex-column height-100"
|
class="d-flex flex-column height-100"
|
||||||
*ngIf="mobileComponent.showAttendees"
|
*ngIf="mobileComponent.showAttendees"
|
||||||
[eventAttendees]="contacts"
|
|
||||||
(closeComponent)="GoBackEditOrAdd()"
|
(closeComponent)="GoBackEditOrAdd()"
|
||||||
(setContact)="setContact($event)"
|
(setContact)="setContact($event)"
|
||||||
[adding]="adding"
|
[adding]="adding"
|
||||||
|
|||||||
+6
-2
@@ -8,6 +8,7 @@ import { ExpedientTaskModalPageRoutingModule } from './expedient-task-modal-rout
|
|||||||
|
|
||||||
import { ExpedientTaskModalPage } from './expedient-task-modal.page';
|
import { ExpedientTaskModalPage } from './expedient-task-modal.page';
|
||||||
import { AttendeeModalPage } from 'src/app/shared/event/attendee-modal/attendee-modal.page';
|
import { AttendeeModalPage } from 'src/app/shared/event/attendee-modal/attendee-modal.page';
|
||||||
|
import { EmptyContainerPage } from 'src/app/shared/empty-container/empty-container.page';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -18,7 +19,10 @@ import { AttendeeModalPage } from 'src/app/shared/event/attendee-modal/attendee-
|
|||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
ExpedientTaskModalPage,
|
ExpedientTaskModalPage,
|
||||||
AttendeeModalPage
|
AttendeeModalPage,
|
||||||
]
|
EmptyContainerPage,
|
||||||
|
],
|
||||||
|
entryComponents: [
|
||||||
|
EmptyContainerPage,]
|
||||||
})
|
})
|
||||||
export class ExpedientTaskModalPageModule {}
|
export class ExpedientTaskModalPageModule {}
|
||||||
|
|||||||
+21
-12
@@ -62,7 +62,7 @@
|
|||||||
</ion-item>
|
</ion-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="add-people">
|
<div class="add-people">
|
||||||
<ion-icon (click)="addParticipants()" slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
<ion-icon (click)="addParticipants(); showAttendees='true'" slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
</ion-item>
|
</ion-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="add-people">
|
<div class="add-people">
|
||||||
<ion-icon (click)="addParticipantsCc()" slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
<ion-icon (click)="addParticipantsCc(); showAttendees='true'" slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -115,16 +115,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<app-attendee-modal
|
|
||||||
class="aside-right d-flex flex-column height-100"
|
<div class="aside-right flex-column height-100">
|
||||||
[adding]="adding"
|
<app-empty-container
|
||||||
[taskParticipants]="taskParticipants"
|
[texto]="emptyTextDescription"
|
||||||
[taskParticipantsCc]="taskParticipantsCc"
|
*ngIf="!showAttendees"
|
||||||
(closeComponent)="closeComponent()"
|
class="d-flex height-100 flex-column">
|
||||||
(setIntervenient)="setIntervenient($event)"
|
</app-empty-container>
|
||||||
(setIntervenientCC)="setIntervenientCC($event)"
|
<app-attendee-modal
|
||||||
(setContact)="setContact($event)"
|
*ngIf="showAttendees"
|
||||||
></app-attendee-modal>
|
class="d-flex flex-column height-100"
|
||||||
|
[adding]="adding"
|
||||||
|
[taskParticipants]="taskParticipants"
|
||||||
|
[taskParticipantsCc]="taskParticipantsCc"
|
||||||
|
(closeComponent)="closeComponent()"
|
||||||
|
(setIntervenient)="setIntervenient($event)"
|
||||||
|
(setIntervenientCC)="setIntervenientCC($event)"
|
||||||
|
(setContact)="setContact($event)"
|
||||||
|
></app-attendee-modal>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|||||||
+5
@@ -120,4 +120,9 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
}
|
||||||
|
@media only screen and (min-width: 1024px){
|
||||||
|
.aside-content{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+8
-8
@@ -49,6 +49,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
adding: "intervenient" | "CC" = "intervenient";
|
adding: "intervenient" | "CC" = "intervenient";
|
||||||
profile: string;
|
profile: string;
|
||||||
|
|
||||||
|
emptyTextDescription = "Sem intervenientes selecionados";
|
||||||
|
showEmptyContainer = true;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private router:Router,
|
private router:Router,
|
||||||
@@ -122,10 +125,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
DispatchFolder: this.dispatchFolder,
|
DispatchFolder: this.dispatchFolder,
|
||||||
}
|
}
|
||||||
console.log(this.postData);
|
console.log(this.postData);
|
||||||
/* this.processes.postDespatcho(this.postData); */
|
this.processes.postDespatcho(this.postData);
|
||||||
//this.distartExpedientModal();
|
|
||||||
this.modalController.dismiss('openDiscart');
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case '1':
|
case '1':
|
||||||
this.postData = {
|
this.postData = {
|
||||||
@@ -137,9 +137,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
UsersSelected: this.participants,
|
UsersSelected: this.participants,
|
||||||
DispatchFolder: this.dispatchFolder,
|
DispatchFolder: this.dispatchFolder,
|
||||||
}
|
}
|
||||||
/* this.processes.postParecer(this.postData); */
|
this.processes.postParecer(this.postData);
|
||||||
//this.distartExpedientModal();
|
|
||||||
this.modalController.dismiss();
|
|
||||||
break;
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
this.postData = {
|
this.postData = {
|
||||||
@@ -152,9 +150,11 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
DispatchFolder: this.dispatchFolder,
|
DispatchFolder: this.dispatchFolder,
|
||||||
}
|
}
|
||||||
this.processes.postDeferimento(this.postData);
|
this.processes.postDeferimento(this.postData);
|
||||||
this.close();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
this.modalController.dismiss('openDiscart');
|
||||||
|
/* this.distartExpedientModal();
|
||||||
|
this.close(); */
|
||||||
|
|
||||||
}
|
}
|
||||||
getAttachments(){
|
getAttachments(){
|
||||||
|
|||||||
@@ -72,29 +72,36 @@ export class AttendeeModalPage implements OnInit {
|
|||||||
|
|
||||||
filterSearchList(itm: EventPerson): boolean {
|
filterSearchList(itm: EventPerson): boolean {
|
||||||
|
|
||||||
if(this.adding == "intervenient"){
|
const result1 = this.taskParticipants.find((contact, index)=>{
|
||||||
const result = this.taskParticipants.find((contact, index)=>{
|
|
||||||
|
|
||||||
if(contact.Name == itm.Name && contact.EmailAddress == itm.EmailAddress){
|
|
||||||
index = index;
|
|
||||||
return contact;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return undefined == result;
|
|
||||||
|
|
||||||
} else if (this.adding == "CC") {
|
|
||||||
|
|
||||||
const result = this.taskParticipantsCc.find((contact, index)=>{
|
|
||||||
|
|
||||||
if(contact.Name == itm.Name && contact.EmailAddress == itm.EmailAddress){
|
if(contact.Name == itm.Name && contact.EmailAddress == itm.EmailAddress){
|
||||||
index = index;
|
index = index;
|
||||||
return contact;
|
return contact;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return undefined == result;
|
// if to show
|
||||||
|
if(undefined != result1){
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const result2 = this.taskParticipantsCc.find((contact, index)=>{
|
||||||
|
|
||||||
|
if(contact.Name == itm.Name && contact.EmailAddress == itm.EmailAddress){
|
||||||
|
index = index;
|
||||||
|
return contact;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// if to show
|
||||||
|
if(undefined != result2){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// don't show
|
||||||
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
remove(itm: EventPerson){
|
remove(itm: EventPerson){
|
||||||
|
|||||||
@@ -50,41 +50,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!publicationList">
|
<div class="center height-100" *ngIf="!publicationList">
|
||||||
<p>{{error}}</p>
|
<p>{{error}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div hidden *ngIf="!publicationList" class="post-item">
|
|
||||||
<div class="post-img">
|
|
||||||
<img src="/assets/icon/icon-no-image.svg" alt="image">
|
|
||||||
</div>
|
|
||||||
<div class="post-content">
|
|
||||||
<div class="post-title-time">
|
|
||||||
<div class="post-title">
|
|
||||||
<ion-label><ion-skeleton-text animated animated style="width: 60%;"></ion-skeleton-text></ion-label>
|
|
||||||
</div>
|
|
||||||
<div class="post-data"><ion-skeleton-text animated style="width: 25%; float: right;"></ion-skeleton-text></div>
|
|
||||||
</div>
|
|
||||||
<div class="post-description">
|
|
||||||
<p><ion-skeleton-text animated></ion-skeleton-text></p>
|
|
||||||
<p><ion-skeleton-text animated></ion-skeleton-text></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="post-img">
|
|
||||||
<img src="/assets/icon/icon-no-image.svg" alt="image">
|
|
||||||
</div>
|
|
||||||
<div class="post-content">
|
|
||||||
<div class="post-title-time">
|
|
||||||
<div class="post-title">
|
|
||||||
<ion-label><ion-skeleton-text animated animated style="width: 60%;"></ion-skeleton-text></ion-label>
|
|
||||||
</div>
|
|
||||||
<div class="post-data"><ion-skeleton-text animated style="width: 25%; float: right;"></ion-skeleton-text></div>
|
|
||||||
</div>
|
|
||||||
<div class="post-description">
|
|
||||||
<p><ion-skeleton-text animated></ion-skeleton-text></p>
|
|
||||||
<p><ion-skeleton-text animated></ion-skeleton-text></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|||||||
@@ -100,8 +100,9 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
},
|
},
|
||||||
(error)=>{
|
(error)=>{
|
||||||
if(error.status == '404'){
|
if(error.status == '404'){
|
||||||
console.log('NOT FOUND');
|
|
||||||
this.error = 'Sem publicações disponíveis!';
|
this.error = 'Sem publicações disponíveis!';
|
||||||
|
this.publicationList=null;
|
||||||
|
this.showLoader = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user