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',
|
||||
children: [
|
||||
@@ -103,6 +112,10 @@ const routes: Routes = [
|
||||
{
|
||||
path:'events/:eventId/:caller',
|
||||
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
|
||||
class="d-flex flex-column height-100"
|
||||
*ngIf="mobileComponent.showAttendees"
|
||||
[eventAttendees]="contacts"
|
||||
(closeComponent)="GoBackEditOrAdd()"
|
||||
(setContact)="setContact($event)"
|
||||
[adding]="adding"
|
||||
|
||||
+6
-2
@@ -8,6 +8,7 @@ import { ExpedientTaskModalPageRoutingModule } from './expedient-task-modal-rout
|
||||
|
||||
import { ExpedientTaskModalPage } from './expedient-task-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({
|
||||
imports: [
|
||||
@@ -18,7 +19,10 @@ import { AttendeeModalPage } from 'src/app/shared/event/attendee-modal/attendee-
|
||||
],
|
||||
declarations: [
|
||||
ExpedientTaskModalPage,
|
||||
AttendeeModalPage
|
||||
]
|
||||
AttendeeModalPage,
|
||||
EmptyContainerPage,
|
||||
],
|
||||
entryComponents: [
|
||||
EmptyContainerPage,]
|
||||
})
|
||||
export class ExpedientTaskModalPageModule {}
|
||||
|
||||
+21
-12
@@ -62,7 +62,7 @@
|
||||
</ion-item>
|
||||
</div>
|
||||
<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>
|
||||
@@ -83,7 +83,7 @@
|
||||
</ion-item>
|
||||
</div>
|
||||
<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>
|
||||
@@ -115,16 +115,25 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<app-attendee-modal
|
||||
class="aside-right 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 class="aside-right flex-column height-100">
|
||||
<app-empty-container
|
||||
[texto]="emptyTextDescription"
|
||||
*ngIf="!showAttendees"
|
||||
class="d-flex height-100 flex-column">
|
||||
</app-empty-container>
|
||||
<app-attendee-modal
|
||||
*ngIf="showAttendees"
|
||||
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>
|
||||
</ion-content>
|
||||
|
||||
+5
@@ -120,4 +120,9 @@
|
||||
justify-content: space-between;
|
||||
padding: 20px;
|
||||
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";
|
||||
profile: string;
|
||||
|
||||
emptyTextDescription = "Sem intervenientes selecionados";
|
||||
showEmptyContainer = true;
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private router:Router,
|
||||
@@ -122,10 +125,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log(this.postData);
|
||||
/* this.processes.postDespatcho(this.postData); */
|
||||
//this.distartExpedientModal();
|
||||
this.modalController.dismiss('openDiscart');
|
||||
|
||||
this.processes.postDespatcho(this.postData);
|
||||
break;
|
||||
case '1':
|
||||
this.postData = {
|
||||
@@ -137,9 +137,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
UsersSelected: this.participants,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
/* this.processes.postParecer(this.postData); */
|
||||
//this.distartExpedientModal();
|
||||
this.modalController.dismiss();
|
||||
this.processes.postParecer(this.postData);
|
||||
break;
|
||||
case '2':
|
||||
this.postData = {
|
||||
@@ -152,9 +150,11 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
this.processes.postDeferimento(this.postData);
|
||||
this.close();
|
||||
break;
|
||||
}
|
||||
this.modalController.dismiss('openDiscart');
|
||||
/* this.distartExpedientModal();
|
||||
this.close(); */
|
||||
|
||||
}
|
||||
getAttachments(){
|
||||
|
||||
@@ -72,29 +72,36 @@ export class AttendeeModalPage implements OnInit {
|
||||
|
||||
filterSearchList(itm: EventPerson): boolean {
|
||||
|
||||
if(this.adding == "intervenient"){
|
||||
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)=>{
|
||||
|
||||
const result1 = this.taskParticipants.find((contact, index)=>{
|
||||
|
||||
if(contact.Name == itm.Name && contact.EmailAddress == itm.EmailAddress){
|
||||
index = index;
|
||||
return contact;
|
||||
}
|
||||
});
|
||||
index = index;
|
||||
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){
|
||||
|
||||
@@ -50,41 +50,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="!publicationList">
|
||||
<div class="center height-100" *ngIf="!publicationList">
|
||||
<p>{{error}}</p>
|
||||
</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>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -100,8 +100,9 @@ export class ViewPublicationsPage implements OnInit {
|
||||
},
|
||||
(error)=>{
|
||||
if(error.status == '404'){
|
||||
console.log('NOT FOUND');
|
||||
this.error = 'Sem publicações disponíveis!';
|
||||
this.publicationList=null;
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user