This commit is contained in:
Peter Maquiran
2023-08-14 11:00:35 +01:00
26 changed files with 274 additions and 139 deletions
+14
View File
@@ -141,6 +141,20 @@ export class HomePage implements OnInit {
ngOnInit() { ngOnInit() {
navigator.serviceWorker.onmessage = (event) => {
console.log('Mensagem recebida do Service Worker:', event.data.data);
let object = {
notification: event.data
}
// Implemente a lógica para lidar com a mensagem recebida do Service Worker
if (event.data.notificationClicked) {
console.log('Notificação push do Firebase clicada em segundo plano!');
// Implemente ações adicionais conforme necessário
}
};
this.logDeviceInfo(); this.logDeviceInfo();
this.notificationsService.onReciveForeground(); this.notificationsService.onReciveForeground();
@@ -1,8 +1,10 @@
import { Component, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { EventPerson } from 'src/app/models/eventperson.model'; import { EventPerson } from 'src/app/models/eventperson.model';
import { ModalController, NavParams } from '@ionic/angular'; import { ModalController, NavParams } from '@ionic/angular';
import { ContactsService } from 'src/app/services/contacts.service'; import { ContactsService } from 'src/app/services/contacts.service';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { LoginUserRespose } from 'src/app/models/user.model';
import { SessionStore } from 'src/app/store/session.service';
@Component({ @Component({
selector: 'app-attendees', selector: 'app-attendees',
@@ -21,6 +23,9 @@ export class AttendeesPageModal implements OnInit {
taskParticipants:EventPerson[] = []; taskParticipants:EventPerson[] = [];
taskParticipantsCc:EventPerson[] = []; taskParticipantsCc:EventPerson[] = [];
loggeduser: LoginUserRespose;
@Input() loggedAttendSon: boolean;
constructor( constructor(
private modalCtrl: ModalController, private modalCtrl: ModalController,
@@ -32,6 +37,7 @@ export class AttendeesPageModal implements OnInit {
this.adding = this.navParams.get('adding'); this.adding = this.navParams.get('adding');
this.taskParticipants = this.navParams.get('taskParticipants'); this.taskParticipants = this.navParams.get('taskParticipants');
this.taskParticipantsCc = this.navParams.get('taskParticipantsCc'); this.taskParticipantsCc = this.navParams.get('taskParticipantsCc');
this.loggeduser = SessionStore.user;
} }
@@ -132,11 +138,24 @@ export class AttendeesPageModal implements OnInit {
}); });
result.splice(index, 1); result.splice(index, 1);
}); });
} }
this.contacts = this.sort(result as any); if(this.loggedAttendSon) {
this.contacts = result;
this.showLoader = false; this.showLoader = false;
} else {
this.contacts = result;
console.log('Attendes Email',this.loggeduser.Email)
let filterLoggedUserEmail = this.contacts.filter(item => item.EmailAddress.toLocaleLowerCase() != this.loggeduser.Email.toLocaleLowerCase())
console.log('Attendes Email', filterLoggedUserEmail)
let filterEmptyEmail = filterLoggedUserEmail.filter(item => item.EmailAddress.toLocaleLowerCase() != "")
this.contacts = filterEmptyEmail;
console.log('Attendes Email', this.contacts)
this.showLoader = false;
}
} }
); );
} }
+2 -2
View File
@@ -173,7 +173,7 @@
(click)="TaskService.goToProcess(task.SerialNumber || task.serialNumber, task.WorkflowName || task.workflowName || task.workflowDisplayName || task.workflowName, task.activityInstanceName)"> (click)="TaskService.goToProcess(task.SerialNumber || task.serialNumber, task.WorkflowName || task.workflowName || task.workflowDisplayName || task.workflowName, task.activityInstanceName)">
<div class="item-exp d-flex"> <div class="item-exp d-flex">
<div class="schedule-date"> <div class="schedule-date">
<div class="time-end">{{task.TaskStartDate | date: 'dd-MM-yy'}}</div> <div class="time-end">{{task.TaskStartDate | date: 'dd-MM-yyyy'}}</div>
<div class="time-start">{{task.TaskStartDate | date: 'HH:mm'}}</div> <div class="time-start">{{task.TaskStartDate | date: 'HH:mm'}}</div>
</div> </div>
<div class="schedule-details pointer"> <div class="schedule-details pointer">
@@ -295,7 +295,7 @@
(click)="TaskService.goToProcess(task.SerialNumber || task.serialNumber, task.WorkflowName || task.workflowName || task.workflowDisplayName || task.workflowName, task.activityInstanceName)"> (click)="TaskService.goToProcess(task.SerialNumber || task.serialNumber, task.WorkflowName || task.workflowName || task.workflowDisplayName || task.workflowName, task.activityInstanceName)">
<div class="item-exp d-flex"> <div class="item-exp d-flex">
<div class="schedule-date"> <div class="schedule-date">
<div class="time-end">{{task.TaskStartDate | date: 'dd-MM-yy'}}</div> <div class="time-end">{{task.TaskStartDate | date: 'dd-MM-yyyy'}}</div>
<div class="time-start">{{task.TaskStartDate | date: 'HH:mm'}}</div> <div class="time-start">{{task.TaskStartDate | date: 'HH:mm'}}</div>
</div> </div>
<div class="schedule-details pointer"> <div class="schedule-details pointer">
@@ -274,7 +274,7 @@ export class BookMeetingModalPage implements OnInit {
BodyType: '1', BodyType: '1',
Text: this.postData.Body.Text, Text: this.postData.Body.Text,
} }
this.postData = { let postData = {
EventId: '', EventId: '',
Subject: this.postData.Subject, Subject: this.postData.Subject,
Body: this.eventBody, Body: this.eventBody,
@@ -296,8 +296,22 @@ export class BookMeetingModalPage implements OnInit {
Type: this.EventRecurrenceType, Type: this.EventRecurrenceType,
LastOccurrence: this.Occurrence LastOccurrence: this.Occurrence
}, },
Attachments: []
} }
const DocumentToSave = this.documents.map((e) => {
console.log('ASSUNTO', e.Assunto)
return {
ApplicationId: e.ApplicationType,
Source: 1,
SourceId: e.Id,
SourceName:e.Assunto,
Description: e.Assunto,
Stakeholders: e.EntidadeOrganicaNome
}
});
postData.Attachments = DocumentToSave;
@@ -306,7 +320,7 @@ export class BookMeetingModalPage implements OnInit {
try { try {
const CalendarId = this.selectedCalendarId() const CalendarId = this.selectedCalendarId()
await this.calendarService.genericPostExpedientEvent(this.task.DocId, this.postData, "",this.task.SerialNumber, this.task.FsId, CalendarId).toPromise(); await this.calendarService.genericPostExpedientEvent(this.task.DocId, postData, "", this.task.SerialNumber, this.task.FsId, CalendarId).toPromise();
this.modalController.dismiss(); this.modalController.dismiss();
this.httpErroHandle.httpsSucessMessagge('Marcar Reunião') this.httpErroHandle.httpsSucessMessagge('Marcar Reunião')
@@ -327,7 +341,7 @@ export class BookMeetingModalPage implements OnInit {
const CalendarId = this.selectedCalendarId() const CalendarId = this.selectedCalendarId()
console.log({ CalendarId }) console.log({ CalendarId })
await this.calendarService.genericCreateTaskEvent(this.task.FolderID | this.task.FolderId, this.postData, "",this.task.SerialNumber, this.task.FsId, CalendarId).toPromise(); await this.calendarService.genericCreateTaskEvent(this.task.FolderID | this.task.FolderId, postData, "", this.task.SerialNumber, this.task.FsId, CalendarId).toPromise();
this.close(); this.close();
this.httpErroHandle.httpsSucessMessagge('Marcar Reunião') this.httpErroHandle.httpsSucessMessagge('Marcar Reunião')
@@ -479,6 +493,7 @@ export class BookMeetingModalPage implements OnInit {
if (res) { if (res) {
const data = res.data; const data = res.data;
this.documents.push(data.selected); this.documents.push(data.selected);
console.log(this.documents)
} }
}, (error) => { }, (error) => {
console.log(error) console.log(error)
@@ -50,7 +50,7 @@
</div> </div>
<div class="picture d-flex pb-5 hide-desktop" *ngIf="publication && capturedImage ==''"> <div class="picture d-flex pb-5 hide-desktop" *ngIf="publication.FileBase64 && capturedImage ==''">
<div class="post-img" *ngIf="publication.FileBase64"> <div class="post-img" *ngIf="publication.FileBase64">
<img src="{{publication.FileBase64}}" alt="image" > <img src="{{publication.FileBase64}}" alt="image" >
</div> </div>
@@ -71,6 +71,7 @@ export class NewPublicationPage implements OnInit {
capturedImage: any = ''; capturedImage: any = '';
capturedImageTitle: any; capturedImageTitle: any;
public photos: any[] = []; public photos: any[] = [];
pictureExiste = false
imgResultBeforeCompress: string; imgResultBeforeCompress: string;
imgResultAfterCompress: string; imgResultAfterCompress: string;
@@ -18,7 +18,7 @@
</div> </div>
<div class="div-title"> <div class="div-title">
<p class="title font-25-em"> {{publication.Title}} </p> <p class="title font-25-em"> {{publication.Title}} </p>
<p class="post-data font-16-em">{{publication.DatePublication | date: 'dd-MM-yy | h:mm'}}</p> <p class="post-data font-16-em">{{publication.DatePublication | date: 'dd-MM-yyyy | h:mm'}}</p>
</div> </div>
</div> </div>
@@ -92,6 +92,7 @@ export class PublicationDetailPage implements OnInit {
OriginalFileName: res.OriginalFileName, OriginalFileName: res.OriginalFileName,
FileExtension: 'jpeg', FileExtension: 'jpeg',
} }
console.log('PUBLICATIO ImG',this.publication.FileBase64)
this.showLoader = false; this.showLoader = false;
}, (error) => { }, (error) => {
@@ -10,7 +10,7 @@
<div *ngIf="publicationFolderService.FolderDetails[folderId]?.DateBegin != null" class="div-title flex-grow-1"> <div *ngIf="publicationFolderService.FolderDetails[folderId]?.DateBegin != null" class="div-title flex-grow-1">
<p class="title font-25-em mb-10-em">{{publicationFolderService.FolderDetails[folderId].Description}}</p> <p class="title font-25-em mb-10-em">{{publicationFolderService.FolderDetails[folderId].Description}}</p>
<p class="item-content-detail font-14-em">{{publicationFolderService.FolderDetails[folderId].Detail}}</p> <p class="item-content-detail font-14-em">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
<p class="item-content-date font-13-em" >{{publicationFolderService.FolderDetails[folderId].DateBegin | date: 'dd-MM-yy HH:mm'}}</p> <p class="item-content-date font-13-em" >{{publicationFolderService.FolderDetails[folderId].DateBegin | date: 'dd-MM-yyyy HH:mm'}}</p>
</div> </div>
<div *ngIf="p.userPermission([p.permissionList.Actions.createPost]) && publicationFolderService.FolderDetails[folderId]" class="cursor-pointer font-35-em" (click)="AddPublication('2',publicationFolderService.FolderDetails[folderId].ProcessId)"> <div *ngIf="p.userPermission([p.permissionList.Actions.createPost]) && publicationFolderService.FolderDetails[folderId]" class="cursor-pointer font-35-em" (click)="AddPublication('2',publicationFolderService.FolderDetails[folderId].ProcessId)">
<!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> --> <!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> -->
@@ -42,7 +42,7 @@
<div class="post-title font-15-em"> <div class="post-title font-15-em">
<ion-label>{{publication.Title}}</ion-label> <ion-label>{{publication.Title}}</ion-label>
</div> </div>
<div class="post-data font-13-em">{{publication.DatePublication | date: 'dd-MM-yy HH:mm'}}</div> <div class="post-data font-13-em">{{publication.DatePublication | date: 'dd-MM-yyyy HH:mm'}}</div>
</div> </div>
<div class="post-description "> <div class="post-description ">
<pre class="text font-14-em">{{publication.Message}}</pre> <pre class="text font-14-em">{{publication.Message}}</pre>
@@ -71,7 +71,7 @@
<div class="post-title"> <div class="post-title">
<ion-label>{{publication.Title}}</ion-label> <ion-label>{{publication.Title}}</ion-label>
</div> </div>
<div class="post-data">{{publication.DatePublication | date: 'dd-MM-yy HH:mm'}}</div> <div class="post-data">{{publication.DatePublication | date: 'dd-MM-yyyy HH:mm'}}</div>
</div> </div>
<div class="post-description"> <div class="post-description">
<p>{{publication.Message}}</p> <p>{{publication.Message}}</p>
@@ -26,7 +26,7 @@
<ion-input [(ngModel)]='findEntity' class="search-input" type="search" placeholder="Pesquisar" (ngModelChange)="filterContact()" ></ion-input> <ion-input [(ngModel)]='findEntity' class="search-input" type="search" placeholder="Pesquisar" (ngModelChange)="filterContact()" ></ion-input>
</div> </div>
<ul> <ul>
<li *ngFor="let organicEntity of showOrganicEntities" (click)="selectOrganicEntidy(organicEntity.Description)"> <li *ngFor="let organicEntity of showOrganicEntities" (click)="selectOrganicEntidy(organicEntity)">
{{ organicEntity.Description }} {{ organicEntity.Description }}
</li> </li>
</ul> </ul>
@@ -52,7 +52,7 @@ export class OrganicEntityPage implements OnInit {
this.showOrganicEntities = entities; this.showOrganicEntities = entities;
} }
selectOrganicEntidy(selectedOraganicEntit: string){ selectOrganicEntidy(selectedOraganicEntit){
this.modalController.dismiss(selectedOraganicEntit); this.modalController.dismiss(selectedOraganicEntit);
} }
+2 -2
View File
@@ -102,7 +102,7 @@
<ion-icon name="restaurant-outline" src="assets/images/icons-advance-search-sender.svg"></ion-icon> <ion-icon name="restaurant-outline" src="assets/images/icons-advance-search-sender.svg"></ion-icon>
</div> </div>
<div class="input-container d-flex ion-align-items-center"> <div class="input-container d-flex ion-align-items-center">
<ion-input [(ngModel)]='searchSender' class="search-input cursor-pointer" (click)="openAdvanceSearchSelection()" type="search" placeholder="Remetentes"></ion-input> <ion-input [(ngModel)]='searchSenderdescription' class="search-input cursor-pointer" (click)="openAdvanceSearchSelection()" type="search" placeholder="Remetentes"></ion-input>
<div class="icon cursor-pointer" (click)="clearInputRemetente()" > <div class="icon cursor-pointer" (click)="clearInputRemetente()" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' "name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
@@ -115,7 +115,7 @@
<ion-icon name="restaurant-outline" src="assets/images/icons-arrow-arrow-down-25-copy.svg"></ion-icon> <ion-icon name="restaurant-outline" src="assets/images/icons-arrow-arrow-down-25-copy.svg"></ion-icon>
</div> </div>
<div class="input-container d-flex ion-align-items-center"> <div class="input-container d-flex ion-align-items-center">
<ion-input [(ngModel)]='searchOrganicEntiry' class="search-input custom-checkbox" type="search" placeholder="Entidade Orgânica" (click)="openOrganicEntitySelection()"></ion-input> <ion-input [(ngModel)]='searchOrganicEntiryDescription' class="search-input custom-checkbox" type="search" placeholder="Entidade Orgânica" (click)="openOrganicEntitySelection()"></ion-input>
<div class="icon cursor-pointer" (click)="clearInputOrganicEntity()" > <div class="icon cursor-pointer" (click)="clearInputOrganicEntity()" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
+29 -22
View File
@@ -52,8 +52,10 @@ export class SearchPage implements OnInit {
// https params // https params
searchSubject: string; searchSubject: string;
searchDocumentDate: string; searchDocumentDate: string;
searchSender: string; searchSenderdescription: string;
searchOrganicEntiry: string; searchSenderId: number;
searchOrganicEntiryDescription: string;
searchOrganicEntiryCode: number;
searchDocTypeId: string; searchDocTypeId: string;
ordinance: string; ordinance: string;
@@ -336,8 +338,8 @@ export class SearchPage implements OnInit {
this.showLoader = true; this.showLoader = true;
this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSender this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSenderId
,this.searchOrganicEntiry, this.searchDocTypeId, '0').subscribe(res=>{ ,this.searchOrganicEntiryCode, this.searchDocTypeId, '0').subscribe(res=>{
res.Categories.forEach( e => { res.Categories.forEach( e => {
e['Active'] = false; e['Active'] = false;
@@ -379,8 +381,8 @@ export class SearchPage implements OnInit {
let counter = 0; let counter = 0;
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSender this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res => { ,this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
res.Categories.forEach( e => { res.Categories.forEach( e => {
e['Active'] = false; e['Active'] = false;
@@ -418,8 +420,8 @@ export class SearchPage implements OnInit {
} }
}); });
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSender this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res=>{ ,this.searchOrganicEntiryCode, this.searchDocTypeId, '361').subscribe(res=>{
res.Categories.forEach( e => { res.Categories.forEach( e => {
e['Active'] = false; e['Active'] = false;
@@ -461,8 +463,8 @@ export class SearchPage implements OnInit {
} else { } else {
let counter = 0; let counter = 0;
this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSender this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSenderId
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res => { ,this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
res.Categories.forEach( e => { res.Categories.forEach( e => {
e['Active'] = false; e['Active'] = false;
this.searchCategories.push(e) this.searchCategories.push(e)
@@ -501,8 +503,8 @@ export class SearchPage implements OnInit {
} }
}); });
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSender this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res => { ,this.searchOrganicEntiryCode, this.searchDocTypeId, '361').subscribe(res => {
res.Categories.forEach( e => { res.Categories.forEach( e => {
e['Active'] = false; e['Active'] = false;
@@ -556,8 +558,8 @@ export class SearchPage implements OnInit {
let counter = 0; let counter = 0;
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSender this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{ ,this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res=>{
res.Categories.forEach( e => { res.Categories.forEach( e => {
e['Active'] = false; e['Active'] = false;
@@ -594,8 +596,8 @@ export class SearchPage implements OnInit {
} else { } else {
let counter = 0; let counter = 0;
this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSender this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSenderId
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{ ,this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res=>{
res.Categories.forEach( e => { res.Categories.forEach( e => {
e['Active'] = false; e['Active'] = false;
@@ -692,8 +694,8 @@ export class SearchPage implements OnInit {
this.search.basicSearchPublication(this.searchSubject, searchDocumentDate, this.searchSender this.search.basicSearchPublication(this.searchSubject, searchDocumentDate, this.searchSenderId
,this.searchOrganicEntiry, this.searchDocTypeId, '386').subscribe(res => { ,this.searchOrganicEntiryCode, this.searchDocTypeId, '386').subscribe(res => {
res.Categories.forEach( e => { res.Categories.forEach( e => {
@@ -780,13 +782,15 @@ export class SearchPage implements OnInit {
} }
clearInputRemetente() { clearInputRemetente() {
this.searchSender = ""; this.searchSenderdescription = "";
this.searchSenderId = null;
} }
clearInputOrganicEntity(){ clearInputOrganicEntity(){
this.searchOrganicEntiry = ""; this.searchOrganicEntiryDescription = "";
this.searchOrganicEntiryCode = null;
} }
/** /**
@@ -815,7 +819,8 @@ export class SearchPage implements OnInit {
modal.onDidDismiss().then((data) => { modal.onDidDismiss().then((data) => {
this.searchSender = data.data; this.searchSenderdescription = data.data.Name;
this.searchSenderId = data.data.Id
}); });
await modal.present(); await modal.present();
@@ -840,7 +845,9 @@ export class SearchPage implements OnInit {
modal.onDidDismiss().then((data) => { modal.onDidDismiss().then((data) => {
this.searchOrganicEntiry = data.data; console.log('SerachEntity',data.data )
this.searchOrganicEntiryDescription = data.data.Description;
this.searchOrganicEntiryCode = data.data.Code;
}); });
await modal.present(); await modal.present();
+1 -1
View File
@@ -19,7 +19,7 @@
<ion-input [(ngModel)]='sender' class="search-input" type="search" placeholder="Pesquisar" (ngModelChange)="filterContact($event)" ></ion-input> <ion-input [(ngModel)]='sender' class="search-input" type="search" placeholder="Pesquisar" (ngModelChange)="filterContact($event)" ></ion-input>
</div> </div>
<ul> <ul>
<li *ngFor="let contact of showContacts" (click)="selectUser(contact.Name)"> <li *ngFor="let contact of showContacts" (click)="selectUser(contact)">
{{ contact.Name }} {{ contact.Name }}
</li> </li>
</ul> </ul>
+1 -1
View File
@@ -48,7 +48,7 @@ export class SenderPage implements OnInit {
this.showContacts = persons; this.showContacts = persons;
} }
selectUser(username:string){ selectUser(username){
this.selectedUser = username; this.selectedUser = username;
this.close(this.selectedUser); this.close(this.selectedUser);
} }
@@ -3,6 +3,8 @@ import { EventPerson } from 'src/app/models/eventperson.model';
import { ModalController, NavParams } from '@ionic/angular'; import { ModalController, NavParams } from '@ionic/angular';
import { ContactsService } from 'src/app/services/contacts.service'; import { ContactsService } from 'src/app/services/contacts.service';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { LoginUserRespose } from 'src/app/models/user.model';
import { SessionStore } from 'src/app/store/session.service';
@Component({ @Component({
selector: 'app-attendees', selector: 'app-attendees',
@@ -21,6 +23,8 @@ export class AttendeesPageModal implements OnInit {
taskParticipants:EventPerson[] = []; taskParticipants:EventPerson[] = [];
taskParticipantsCc:EventPerson[] = []; taskParticipantsCc:EventPerson[] = [];
loggeduser: LoginUserRespose;
@Input() loggedAttendSon: boolean;
constructor( constructor(
private modalCtrl: ModalController, private modalCtrl: ModalController,
@@ -32,6 +36,7 @@ export class AttendeesPageModal implements OnInit {
this.adding = this.navParams.get('adding'); this.adding = this.navParams.get('adding');
this.taskParticipants = this.navParams.get('taskParticipants'); this.taskParticipants = this.navParams.get('taskParticipants');
this.taskParticipantsCc = this.navParams.get('taskParticipantsCc'); this.taskParticipantsCc = this.navParams.get('taskParticipantsCc');
this.loggeduser = SessionStore.user;
} }
@@ -135,8 +140,20 @@ export class AttendeesPageModal implements OnInit {
}); });
} }
if(this.loggedAttendSon) {
this.contacts = result; this.contacts = result;
this.showLoader = false; this.showLoader = false;
} else {
this.contacts = result;
console.log('Attendes Email',this.loggeduser.Email)
let filterLoggedUserEmail = this.contacts.filter(item => item.EmailAddress.toLocaleLowerCase() != this.loggeduser.Email.toLocaleLowerCase())
console.log('Attendes Email', filterLoggedUserEmail)
let filterEmptyEmail = filterLoggedUserEmail.filter(item => item.EmailAddress.toLocaleLowerCase() != "")
this.contacts = filterEmptyEmail;
console.log('Attendes Email', this.contacts)
this.showLoader = false;
}
} }
); );
} }
+16
View File
@@ -223,6 +223,22 @@ export class NotificationsService {
} }
sendNotificationWithSend(userID, title, bodymsg, roomId) {
const geturl = environment.apiURL + `notifications/send`;
const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
const message = {
"Service": "chat",
"IdObject": roomId
}
let id = 437
this.http.post<Tokenn>(geturl + `?userId=${userID}&title=${title}&body=${bodymsg}`, message, { headers }).subscribe(data => {
this.active = true
}, (error) => {
})
}
ChatSendMessageNotification(userID, title, bodymsg, roomId) { ChatSendMessageNotification(userID, title, bodymsg, roomId) {
const geturl = environment.apiURL + `notifications/sendbyUsername`; const geturl = environment.apiURL + `notifications/sendbyUsername`;
+3 -3
View File
@@ -42,7 +42,7 @@ export class SearchService {
} }
basicSearch(subject:string, date:string = null, sender:string = null, organicEntity:string = null, docTypeId:string = null, applicationType:string): Observable<EventSearch>{ basicSearch(subject:string, date:string = null, sender:number = null, organicEntity:number = null, docTypeId:string = null, applicationType:string): Observable<EventSearch>{
// Endpoint // Endpoint
const geturl = environment.apiURL + 'search'; const geturl = environment.apiURL + 'search';
// store params // store params
@@ -67,7 +67,7 @@ export class SearchService {
} }
basicSearchPublication(subject:string, date:string = null, sender:string = null, organicEntity:string = null, docTypeId:string = null, applicationType:string): Observable<EventSearch>{ basicSearchPublication(subject:string, date:string = null, sender:number = null, organicEntity:number = null, docTypeId:string = null, applicationType:string): Observable<EventSearch>{
// Endpoint // Endpoint
const geturl = environment.apiURL + 'search'; const geturl = environment.apiURL + 'search';
// store params // store params
@@ -113,7 +113,7 @@ export class SearchService {
return this.http.get<any>(`${geturl}`, options); return this.http.get<any>(`${geturl}`, options);
} }
searchForDoc(subject:string, date:string, sender:string, organicEntity:string, docTypeId:string, applicationType:string): Observable<EventSearch> { searchForDoc(subject:string, date:string, sender:number, organicEntity:number, docTypeId:string, applicationType:string): Observable<EventSearch> {
// Endpoint // Endpoint
const geturl = environment.apiURL + 'search/attachment?'; const geturl = environment.apiURL + 'search/attachment?';
// store params // store params
@@ -30,6 +30,7 @@ import {
MAT_MOMENT_DATE_ADAPTER_OPTIONS MAT_MOMENT_DATE_ADAPTER_OPTIONS
} from '@angular/material-moment-adapter'; } from '@angular/material-moment-adapter';
import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core'; import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
@NgModule({ @NgModule({
@@ -55,7 +56,8 @@ import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/
//MatRadioModule, //MatRadioModule,
//MatCheckboxModule, //MatCheckboxModule,
MatButtonModule, MatButtonModule,
ReactiveFormsModule ReactiveFormsModule,
AttendeeModalPageModule
], ],
declarations: [NewEventPage], declarations: [NewEventPage],
providers: [ providers: [
@@ -327,9 +327,18 @@
</ion-label> </ion-label>
</ion-item> </ion-item>
</ion-list> </ion-list>
</div>
</div> </div>
</div>
<div *ngIf="mostrarModal">
<app-attendee-modal [loggedAttendSon]="loggedAttendDad"></app-attendee-modal>
</div>
</ion-content> </ion-content>
<ion-footer class="ion-no-border"> <ion-footer class="ion-no-border">
<ion-toolbar class="footer-toolbar"> <ion-toolbar class="footer-toolbar">
@@ -344,5 +353,10 @@
<ion-label>Gravar</ion-label> <ion-label>Gravar</ion-label>
</button> </button>
</ion-buttons> </ion-buttons>
<!-- <app-new-event
[loggedAttend]="loggedAttend"
></app-new-event> -->
</ion-toolbar> </ion-toolbar>
</ion-footer> </ion-footer>
@@ -70,6 +70,8 @@ export class NewEventPage implements OnInit {
public color: ThemePalette = 'primary'; public color: ThemePalette = 'primary';
recurringTypes = [] recurringTypes = []
selectedRecurringType: any; selectedRecurringType: any;
loggedAttendDad: boolean = true;
mostrarModal = false;
@Input() attendees: [] @Input() attendees: []
@Input() profile:string; @Input() profile:string;
@@ -702,6 +704,7 @@ export class NewEventPage implements OnInit {
async addParticipants() { async addParticipants() {
this.saveTemporaryData(); this.saveTemporaryData();
this.openAttendeesComponent.emit({ this.openAttendeesComponent.emit({
@@ -709,6 +712,7 @@ export class NewEventPage implements OnInit {
}); });
this.clearContact.emit(); this.clearContact.emit();
this.mostrarModal = true;
} }
async addParticipantsCc() { async addParticipantsCc() {
@@ -6,6 +6,8 @@ import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { ViewChild } from '@angular/core'; import { ViewChild } from '@angular/core';
import { Searchbar } from 'ionic-angular'; import { Searchbar } from 'ionic-angular';
import { LoginUserRespose } from 'src/app/models/user.model';
import { SessionStore } from 'src/app/store/session.service';
@Component({ @Component({
selector: 'app-attendee-modal', selector: 'app-attendee-modal',
@@ -16,6 +18,7 @@ export class AttendeePage implements OnInit {
// Defined by the API // Defined by the API
contacts: EventPerson[]; contacts: EventPerson[];
filterEmptyEmail: EventPerson[];
showLoader: boolean = false; showLoader: boolean = false;
eventPersons: EventPerson[]; eventPersons: EventPerson[];
inputFilter = '' inputFilter = ''
@@ -30,6 +33,7 @@ export class AttendeePage implements OnInit {
@Input() taskParticipants:EventPerson[] = []; @Input() taskParticipants:EventPerson[] = [];
@Input() taskParticipantsCc:EventPerson[] = []; @Input() taskParticipantsCc:EventPerson[] = [];
@Input() loggedAttendSon: boolean;
@Input() footer: boolean; @Input() footer: boolean;
@@ -39,25 +43,33 @@ export class AttendeePage implements OnInit {
LtaskParticipants: EventPerson[] = []; LtaskParticipants: EventPerson[] = [];
LtaskParticipantsCc: EventPerson[] = []; LtaskParticipantsCc: EventPerson[] = [];
loggeduser: LoginUserRespose;
constructor( constructor(
private modalCtrl: ModalController, private modalCtrl: ModalController,
private contactsService: ContactsService, private contactsService: ContactsService,
public ThemeService: ThemeService ) { public ThemeService: ThemeService ) {
this.LtaskParticipants = removeDuplicate(this.taskParticipants); this.LtaskParticipants = removeDuplicate(this.taskParticipants);
this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc); this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
this.loggeduser = SessionStore.user;
} }
ngOnChanges() { ngOnChanges() {
this.LtaskParticipants = removeDuplicate(this.taskParticipants); this.LtaskParticipants = removeDuplicate(this.taskParticipants);
this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc); this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
console.log('PARTE PARTE',this.loggedAttendSon)
} }
currentPath = window.location.pathname; currentPath = window.location.pathname;
@Input() adding: "intervenient" | "CC"; @Input() adding: "intervenient" | "CC";
ngOnInit() { ngOnInit() {
setTimeout(() => {
console.log('PARTE PARTE',this.loggedAttendSon)
});
this.fetchContacts(""); this.fetchContacts("");
@@ -213,8 +225,20 @@ export class AttendeePage implements OnInit {
}); });
} }
if(this.loggedAttendSon) {
this.contacts = this.sort(result as any); this.contacts = this.sort(result as any);
this.showLoader = false; this.showLoader = false;
} else {
this.contacts = this.sort(result as any);
console.log('Attendes Email',this.loggeduser.Email)
let filterLoggedUserEmail = this.contacts.filter(item => item.EmailAddress.toLocaleLowerCase() != this.loggeduser.Email.toLocaleLowerCase())
console.log('Attendes Email', filterLoggedUserEmail)
let filterEmptyEmail = filterLoggedUserEmail.filter(item => item.EmailAddress.toLocaleLowerCase() != "")
this.contacts = filterEmptyEmail;
console.log('Attendes Email', this.contacts)
this.showLoader = false;
}
} }
); );
} }
@@ -7,7 +7,7 @@
</div> </div>
<div class="div-title"> <div class="div-title">
<ion-label class="title"> {{publication.Title}}</ion-label> <ion-label class="title"> {{publication.Title}}</ion-label>
<p class="post-data">{{publication.DatePublication | date: 'dd-MM-yy | h:mm'}}</p> <p class="post-data">{{publication.DatePublication | date: 'dd-MM-yyyy | h:mm'}}</p>
</div> </div>
</div> </div>
<div *ngIf="publication.Title == ''" class="title-contentd-flex pl-20 pt-25"> <div *ngIf="publication.Title == ''" class="title-contentd-flex pl-20 pt-25">
@@ -22,7 +22,7 @@
</div> </div>
<div class="div-body width-100" *ngIf="publicationFolderService.FolderDetails[folderId]?.DateBegin != null"> <div class="div-body width-100" *ngIf="publicationFolderService.FolderDetails[folderId]?.DateBegin != null">
<p class="item-content-detail">{{publicationFolderService.FolderDetails[folderId].Detail}}</p> <p class="item-content-detail">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
<p class="item-content-date">{{ publicationFolderService.FolderDetails[folderId].DateBegin | date: 'dd-MM-yy HH:mm'}}</p> <p class="item-content-date">{{ publicationFolderService.FolderDetails[folderId].DateBegin | date: 'dd-MM-yyyy HH:mm'}}</p>
</div> </div>
</div> </div>
@@ -47,7 +47,7 @@
<div class="post-title"> <div class="post-title">
<ion-label>{{publication.Title}}</ion-label> <ion-label>{{publication.Title}}</ion-label>
</div> </div>
<div class="post-data">{{publication.DatePublication | date: 'dd-MM-yy HH:mm'}}</div> <div class="post-data">{{publication.DatePublication | date: 'dd-MM-yyyy HH:mm'}}</div>
</div> </div>
<div class="post-description"> <div class="post-description">
<pre class="text">{{publication.Message}}</pre> <pre class="text">{{publication.Message}}</pre>
@@ -70,7 +70,7 @@
<div class="post-title"> <div class="post-title">
<ion-label>{{publication.Title}}</ion-label> <ion-label>{{publication.Title}}</ion-label>
</div> </div>
<div class="post-data">{{publication.DatePublication | date: 'dd-MM-yy HH:mm'}}</div> <div class="post-data">{{publication.DatePublication | date: 'dd-MM-yyyy HH:mm'}}</div>
</div> </div>
<div class="post-description"> <div class="post-description">
<p>{{publication.Message}}</p> <p>{{publication.Message}}</p>
+3 -2
View File
@@ -26,8 +26,8 @@ messaging.onBackgroundMessage(function(payload) {
body: payload.notification.body, body: payload.notification.body,
}; };
self.registration.showNotification(notificationTitle, /* self.registration.showNotification(notificationTitle,
notificationOptions); notificationOptions); */
}); });
@@ -63,6 +63,7 @@ self.addEventListener('notificationclick', function(event) {
console.log("Push Clicked ", event); console.log("Push Clicked ", event);
// Enviar uma mensagem para o cliente (componente) // Enviar uma mensagem para o cliente (componente)
self.clients.matchAll().then((clients) => { self.clients.matchAll().then((clients) => {
console.log("Push Clicked 2", clients);
if (clients && clients.length) { if (clients && clients.length) {
clients.forEach((client) => { clients.forEach((client) => {
client.postMessage({ notificationClicked: true }); client.postMessage({ notificationClicked: true });
+6 -6
View File
@@ -1,12 +1,12 @@
export let versionData = { export let versionData = {
"shortSHA": "2645d1e08", "shortSHA": "cd4fda997",
"SHA": "2645d1e081fd138bdda2b12af913ab0c497683f9", "SHA": "cd4fda997ccace9519e23ba34643390ebb83fb85",
"branch": "developer-bug", "branch": "developer",
"lastCommitAuthor": "'Peter Maquiran'", "lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Fri Aug 11 17:02:51 2023 +0100'", "lastCommitTime": "'Mon Aug 14 10:17:05 2023 +0100'",
"lastCommitMessage": "fix", "lastCommitMessage": "fix",
"lastCommitNumber": "5148", "lastCommitNumber": "5149",
"change": "", "change": "",
"changeStatus": "On branch developer-bug\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/agenda/agenda.page.ts\n\tmodified: src/app/pages/chat/group-messages/group-messages.page.html\n\tmodified: src/app/services/chat/room.service.ts\n\tmodified: src/app/shared/chat/group-messages/group-messages.page.html", "changeStatus": "On branch developer\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: src/app/home/home.page.ts\n\tmodified: src/app/pages/events/attendees/attendees.page.ts\n\tmodified: src/app/pages/events/events.page.html\n\tmodified: src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts\n\tmodified: src/app/pages/publications/new-publication/new-publication.page.html\n\tmodified: src/app/pages/publications/new-publication/new-publication.page.ts\n\tmodified: src/app/pages/publications/view-publications/publication-detail/publication-detail.page.html\n\tmodified: src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts\n\tmodified: src/app/pages/publications/view-publications/view-publications.page.html\n\tmodified: src/app/pages/search/organic-entity/organic-entity.page.html\n\tmodified: src/app/pages/search/organic-entity/organic-entity.page.ts\n\tmodified: src/app/pages/search/search.page.html\n\tmodified: src/app/pages/search/search.page.ts\n\tmodified: src/app/pages/search/sender/sender.page.html\n\tmodified: src/app/pages/search/sender/sender.page.ts\n\tmodified: src/app/services/events/attendees/attendees.page.ts\n\tmodified: src/app/services/notifications.service.ts\n\tmodified: src/app/services/search.service.ts\n\tmodified: src/app/shared/agenda/new-event/new-event.module.ts\n\tmodified: src/app/shared/agenda/new-event/new-event.page.html\n\tmodified: src/app/shared/agenda/new-event/new-event.page.ts\n\tmodified: src/app/shared/event/attendee-modal/attendee-modal.page.ts\n\tmodified: src/app/shared/publication/view-publications/publication-detail/publication-detail.page.html\n\tmodified: src/app/shared/publication/view-publications/view-publications.page.html\n\tmodified: src/firebase-messaging-sw.js\n\tmodified: version/git-version.ts",
"changeAuthor": "peter.maquiran" "changeAuthor": "peter.maquiran"
} }