git pull made and peter chnages recived

This commit is contained in:
Eudes Inácio
2023-03-09 16:58:34 +01:00
74 changed files with 296 additions and 274 deletions
@@ -528,7 +528,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
});
await modal.present();
modal.onDidDismiss().then(res => {
console.log(res)
if (res.data == 'leave') {
this.getRoomInfo();
this.closeAllDesktopComponents.emit();
@@ -546,6 +546,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
//this.closeAllDesktopComponents.emit();
this.openEditGroupPage.emit(this.roomId);
} else if (res.data == 'addUser') {
this.openGroupContactsPage();
}
else {
@@ -616,24 +619,26 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
}
async addContacts() {
if(this.isAdmin) {
const modal = await this.modalController.create({
component: GroupContactsPage,
componentProps: {
isCreated: this.isGroupCreated,
room: this.room,
members: this.members,
name: this.room.name,
},
cssClass: 'contacts',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then(() => {
//this.getRoomInfo();
});
}
const modal = await this.modalController.create({
component: GroupContactsPage,
componentProps: {
isCreated: this.isGroupCreated,
room: this.room,
members: this.members,
name: this.room.name,
},
cssClass: 'contacts',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then(() => {
//this.getRoomInfo();
});
}
@@ -172,11 +172,11 @@ export class AllProcessesPage implements OnInit {
else if (workflowName == "Pedido de Parecer do Presidente") {
this.router.navigate(['/home/gabinete-digital/pedidos', serialNumber, 'gabinete-digital']);
}
else if (workflowName == 'Agenda Pessoal PR' || workflowName == 'Agenda Oficial PR' || workflowName == 'Agenda Oficial MDGPR' || workflowName == 'Agenda Pessoal MDGPR') {
else if (workflowName == 'Agenda Pessoal PR' || workflowName == 'Agenda Oficial PR' || workflowName == 'Agenda Oficial MDGPR' || workflowName == 'Agenda Pessoal MDGPR' || activityName == "Aprovar Evento" || workflowName == "Agendar Evento") {
this.router.navigate(['/home/gabinete-digital/event-list/approve-event', serialNumber, 'gabinete-digital']);
}
else {
throw(`${workflowName} && ${activityName} no route`)
}
}
+4 -1
View File
@@ -52,6 +52,7 @@ export class HeaderPage implements OnInit {
) {
this.loggeduser = SessionStore.user;
router.events.subscribe((val) => {
this.hideSearch();
this.showSearch = false;
this.canOpenSearch = true;
this.showProfileModal = false
@@ -94,8 +95,10 @@ export class HeaderPage implements OnInit {
}
hideSearch() {
if (this.router.url == '/home/events' || this.router.url == '/home/chat') {
if (this.router.url.startsWith('/home/events') || this.router.url.startsWith('/home/chat')) {
this.hideSearchBtn = true;
} else {
this.hideSearchBtn = false;
}
}
@@ -6,7 +6,7 @@
</button>
</div>
<div class="buttons">
<button (click)="addContacts()" class="btn-cancel" shape="round" >Adicionar</button>
<button *ngIf="isAdmin" (click)="addUser()" class="btn-cancel" shape="round" >Adicionar</button>
<button (click)="leaveGroup()" class="btn-cancel" shape="round" >Sair do Grupo</button>
<button *ngIf="isAdmin" (click)="openChangeGroupName()" class="btn-cancel btn-cancel mt-10" shape="round" >Alterar nome do grupo</button>
<div class="solid"></div>
@@ -5,9 +5,12 @@ import { ToastService } from 'src/app/services/toast.service';
import { ThemeService } from 'src/app/services/theme.service'
import { SetRoomOwnerPage } from 'src/app/modals/set-room-owner/set-room-owner.page';
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
<<<<<<< HEAD
import { HttpErrorResponse } from '@angular/common/http';
import { SessionStore } from 'src/app/store/session.service';
import { GroupContactsPage } from '../../chat/group-messages/group-contacts/group-contacts.page';
=======
>>>>>>> b8a1734abbbe321eedb202ddde21592f161acf12
@Component({
@@ -43,11 +46,11 @@ export class ChatPopoverPage implements OnInit {
close(action:any){
if( window.innerWidth < 701){
this.popoverController.dismiss(action);
this.modalController.dismiss(action);
this.modalController.dismiss(action)
}
else{
this.popoverController.dismiss(action);
this.modalController.dismiss(action);
this.modalController.dismiss(action)
}
}
@@ -128,38 +131,24 @@ export class ChatPopoverPage implements OnInit {
}
});
this.popoverController.dismiss('delete');
this.modalController.dismiss('delete');
this.modalController.dismiss('delete')
}
async openChangeGroupName(){
if( window.innerWidth < 701){
this.popoverController.dismiss('edit');
this.modalController.dismiss('edit')
}
else{
this.modalController.dismiss('edit');
this.popoverController.dismiss('edit');
this.modalController.dismiss('edit')
}
}
async addContacts() {
const modal = await this.modalController.create({
component: GroupContactsPage,
componentProps: {
isCreated: this.isGroupCreated,
room: this.room,
members: this.members,
name: this.room.name,
},
cssClass: 'contacts',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then(() => {
/* this.getRoomInfo(); */
});
async addUser() {
this.popoverController.dismiss('addUser');
this.modalController.dismiss('addUser')
}
}
@@ -37,7 +37,7 @@ export class PublicationDetailPage implements OnInit {
/* this.folderId = this.navParams.get('folderIdId'); */
this.publication = {
DateIndex: null,
DocumentId: '',
DocumentId: null,
ProcessId:'',
Title:'',
Message: '',
@@ -20,9 +20,9 @@
</button >
</div>
</div>
<div class="div-body width-100">
<div class="div-body width-100" *ngIf="publicationItem[folderId].DateBegin">
<p class="item-content-detail">{{publicationItem[folderId].Detail}}</p>
<p class="item-content-date">{{ publicationItem[folderId].DateBegin | date: 'dd-MM-yy HH:mm'}}</p>
<p class="item-content-date" *ngIf="publicationItem[folderId].DateBegin != null">{{ publicationItem[folderId].DateBegin | date: 'dd-MM-yy HH:mm'}}</p>
</div>
</div>
@@ -12,6 +12,7 @@ import { EditActionPage } from 'src/app/pages/publications/edit-action/edit-acti
import { Storage } from '@ionic/storage';
import { PermissionService } from 'src/app/services/permission.service';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { PublicationModel } from 'src/app/models/beast-orm';
@Component({
selector: 'app-view-publications',
@@ -116,20 +117,24 @@ export class ViewPublicationsPage implements OnInit {
const folderId = this.folderId
try {
const res = await this.publications.GetPublicationsImages(folderId).toPromise();
let publicationList = []
for (let element of res) {
let ress = await this.publications.GetPublicationById(element).toPromise();
let item: Publication = this.publicationPipe.itemList(ress)
publicationList.push(item);
const publicationIds = await this.publications.GetPublicationsList(folderId).toPromise();
for (let publicationId of publicationIds) {
let Publication = await this.publications.GetPublicationById(publicationId).toPromise();
let publicationDetails: Publication = this.publicationPipe.itemList(Publication)
const found = this.publicationList[folderId].find( e => e.DocumentId == publicationId )
if(!found) {
PublicationModel.create(publicationDetails)
this.publicationList[folderId].push(publicationDetails)
}
}
this.showLoader = false;
this.publicationList[folderId] = publicationList
this.storage.set(folderId, publicationList);
this.getpublication = publicationList;
this.storage.set(folderId, this.publicationList[folderId]);
this.getpublication = this.publicationList[folderId];
} catch(error) {
this.showLoader = false;
}