mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
pull made
This commit is contained in:
@@ -153,6 +153,7 @@ export class EditEventToApprovePage implements OnInit {
|
||||
// description
|
||||
let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
|
||||
this.eventProcess.workflowInstanceDataFields.Body = body
|
||||
this.eventProcess.workflowInstanceDataFields.Category = this.eventProcess.workflowInstanceDataFields.EventType
|
||||
|
||||
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
||||
this.getAttachments()
|
||||
@@ -171,7 +172,6 @@ export class EditEventToApprovePage implements OnInit {
|
||||
}
|
||||
|
||||
onSelectedRecurringChanged(ev:any){
|
||||
console.log(ev);
|
||||
if(ev.length > 1){
|
||||
console.log(ev.filter(data => data != '-1'));
|
||||
this.eventProcess.workflowInstanceDataFields.OccurrenceType = ev.filter(data => data != '-1');
|
||||
@@ -215,9 +215,9 @@ export class EditEventToApprovePage implements OnInit {
|
||||
|
||||
this.closeEventToApprove.emit();
|
||||
|
||||
/* this.setIntervenient.emit([]);
|
||||
this.setIntervenient.emit([]);
|
||||
this.setIntervenientCC.emit([]);
|
||||
this.clearContact.emit(); */
|
||||
this.clearContact.emit();
|
||||
|
||||
//this.deleteTemporaryData();
|
||||
}
|
||||
@@ -346,7 +346,7 @@ export class EditEventToApprovePage implements OnInit {
|
||||
async addParticipants() {
|
||||
|
||||
//this.saveTemporaryData();
|
||||
|
||||
|
||||
this.openAttendeesComponent.emit({
|
||||
type: "intervenient"
|
||||
});
|
||||
|
||||
@@ -89,9 +89,7 @@ export class EditEventPage implements OnInit {
|
||||
public alertController: AlertController,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
|
||||
}
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import { ChatPopoverPageModule } from '../../popover/chat-popover/chat-popover.m
|
||||
import { NewEventPageModule } from '../../agenda/new-event/new-event.module';
|
||||
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
||||
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||
import {MatMenuModule} from '@angular/material/menu';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -23,6 +24,7 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||
PdfViewerModule,
|
||||
ChatPopoverPageModule,
|
||||
GroupMessagesPageRoutingModule,
|
||||
MatMenuModule
|
||||
//
|
||||
],
|
||||
exports: [GroupMessagesPage],
|
||||
|
||||
@@ -32,14 +32,20 @@
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<div class="messages overflow-y-auto" #scrollMe>
|
||||
<div class="messages" #scrollMe>
|
||||
<div class="welcome-text">
|
||||
<ion-label> Esta conversa passou a grupo</ion-label><br />
|
||||
<ion-label>A conversa original mantêm-se como chat individual</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="container-width-100" *ngFor="let msg of messages; let last = last" #scrollMe>
|
||||
<div *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru'" class='incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45'>
|
||||
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of messages; let last = last">
|
||||
<div class="message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45" *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru'" >
|
||||
<div class="message-item-options d-flex justify-content-end">
|
||||
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer"></fa-icon>
|
||||
<mat-menu #beforeMenu="matMenu" xPosition="before">
|
||||
<button (click)="deleteMessage(msg._id)" class="menuButton">Apagar mensagem</button>
|
||||
</mat-menu>
|
||||
</div>
|
||||
<div class="title">
|
||||
<ion-label>{{msg.u.name}}</ion-label>
|
||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
||||
|
||||
@@ -131,8 +131,18 @@
|
||||
.messages{
|
||||
font-size: 13px;
|
||||
font-family: Roboto;
|
||||
overflow: auto;
|
||||
|
||||
//set scroll do bottom
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
word-wrap: break-word;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
.incoming-true, .incoming-false{
|
||||
padding: 15px 20px;
|
||||
|
||||
@@ -319,6 +319,16 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
});
|
||||
this.message = "";
|
||||
}
|
||||
|
||||
deleteMessage(msgId:string){
|
||||
let body = {
|
||||
"roomId": this.roomId,
|
||||
"msgId": msgId,
|
||||
"asUser": false,
|
||||
}
|
||||
this.alertService.confirmDeleteMessage(body);
|
||||
}
|
||||
|
||||
async openGroupMessagesOptions() {
|
||||
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
|
||||
@@ -9,6 +9,8 @@ import { MessagesPageRoutingModule } from './messages-routing.module';
|
||||
import { MessagesPage } from './messages.page';
|
||||
import { SharedModule } from 'src/app/shared/shared.module';
|
||||
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import {MatMenuModule} from '@angular/material/menu';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -16,7 +18,10 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
FontAwesomeModule,
|
||||
MessagesPageRoutingModule
|
||||
MessagesPageRoutingModule,
|
||||
MatButtonModule,
|
||||
MatMenuModule
|
||||
|
||||
],
|
||||
exports: [MessagesPage],
|
||||
declarations: [MessagesPage]
|
||||
|
||||
@@ -34,14 +34,10 @@
|
||||
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of chatMessageStore.message[roomId]; let last = last">
|
||||
<div class='message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45'>
|
||||
<div class="message-item-options d-flex justify-content-end">
|
||||
<fa-icon (click)="mesageItemDropdownOptions=true" icon="chevron-down" class="message-options-icon"></fa-icon>
|
||||
<!-- <div class="mesage-item-dropdown-options" *ngIf="mesageItemDropdownOptions">
|
||||
<ion-label>Apagar mensagem</ion-label>
|
||||
</div> -->
|
||||
<ion-select hidden class="message-options-icon" interface="popover">
|
||||
<ion-select-option value="nes">Apagar mensagem</ion-select-option>
|
||||
</ion-select>
|
||||
|
||||
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer"></fa-icon>
|
||||
<mat-menu #beforeMenu="matMenu" xPosition="before">
|
||||
<button (click)="deleteMessage(msg._id)" class="menuButton">Apagar mensagem</button>
|
||||
</mat-menu>
|
||||
</div>
|
||||
<div class="title">
|
||||
<ion-label>{{msg.u.name}}</ion-label>
|
||||
|
||||
@@ -141,10 +141,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
let scroll = e.srcElement.scrollTop;
|
||||
let windowHeight = e.srcElement.scrollHeight;
|
||||
let containerHeight = windowHeight - e.srcElement.clientHeight;
|
||||
console.log(containerHeight);
|
||||
console.log(e.srcElement.clientHeight);
|
||||
|
||||
|
||||
|
||||
if (scroll > this.currentPosition) {
|
||||
//alert('BOTTOM');
|
||||
@@ -196,6 +192,18 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
this.message = "";
|
||||
}
|
||||
|
||||
deleteMessage(msgId:string){
|
||||
let body = {
|
||||
"roomId": this.roomId,
|
||||
"msgId": msgId,
|
||||
"asUser": false,
|
||||
}
|
||||
this.alertService.confirmDeleteMessage(body);
|
||||
/* this.chatService.deleteMessage(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
}); */
|
||||
}
|
||||
|
||||
loadMessages(){
|
||||
//this.showLoader = true;
|
||||
const roomId = this.roomId
|
||||
@@ -404,17 +412,17 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
const roomId = this.roomId;
|
||||
|
||||
this.chatService.getRoomMessages(this.roomId).subscribe(async res => {
|
||||
console.log(res['success']);
|
||||
//console.log(res['success']);
|
||||
|
||||
|
||||
if (res['success'] == true) {
|
||||
// Show Error
|
||||
//showMessage(response.statusText);
|
||||
//this.loadMessages()
|
||||
this.loadMessages()
|
||||
this.messages = res['messages'].reverse();
|
||||
this.chatMessageStore.add(roomId, this.messages)
|
||||
|
||||
console.log(this.messages);
|
||||
//console.log(this.messages);
|
||||
// Reconnect in one second
|
||||
if(this.route.url != "/home/chat"){
|
||||
console.log("Timer message stop")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<ion-header class="ion-no-border px-20">
|
||||
<ion-toolbar class="px-10">
|
||||
<ion-title class="pa-0">Adicionar intervenientes</ion-title>
|
||||
<ion-title class="pa-0">Adicionar intervenientes aganda</ion-title>
|
||||
</ion-toolbar>
|
||||
<ion-searchbar class="attendee-search-bar" (ionChange)="onChange($event)" placeholder="Insira email para adicionar destinatário"></ion-searchbar><!-- [(ngModel)]="searchCountryString" -->
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
|
||||
@@ -3,7 +3,6 @@ import { ModalController } from '@ionic/angular';
|
||||
import { ContactsService } from 'src/app/services/contacts.service';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { slugify } from 'src/plugin/javascript-remove-accents.js';
|
||||
|
||||
@Component({
|
||||
selector: 'app-attendee-modal',
|
||||
@@ -64,10 +63,10 @@ export class AttendeePage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
save(){
|
||||
save() {
|
||||
|
||||
this.setIntervenient.emit(this.LtaskParticipants);
|
||||
this.setIntervenientCC.emit(this.LtaskParticipantsCc);
|
||||
this.setIntervenient.emit(removeDuplicate(this.LtaskParticipants));
|
||||
this.setIntervenientCC.emit(removeDuplicate(this.LtaskParticipantsCc));
|
||||
|
||||
this.closeComponent.emit();
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<ion-header>
|
||||
<div class="title-content">
|
||||
<div class="middle">
|
||||
<ion-label class="title">Editar evento por aprovar</ion-label>
|
||||
<ion-label class="title">Editar evento por aprovar::.</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
|
||||
@@ -330,28 +330,26 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
setIntervenient(data){
|
||||
setIntervenient(data = []) {
|
||||
this.taskParticipants = data;
|
||||
this.postEvent.Attendees = data;
|
||||
}
|
||||
|
||||
setIntervenientCC(data) {
|
||||
setIntervenientCC(data = []) {
|
||||
this.taskParticipantsCc = data;
|
||||
}
|
||||
|
||||
addParticipants(){
|
||||
addParticipants() {
|
||||
this.adding = 'intervenient'
|
||||
this.openAttendees();
|
||||
|
||||
}
|
||||
|
||||
addParticipantsCC(){
|
||||
addParticipantsCC() {
|
||||
|
||||
this.adding = 'CC'
|
||||
this.openAttendees();
|
||||
}
|
||||
|
||||
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}){
|
||||
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}) {
|
||||
this.taskParticipants = taskParticipants;
|
||||
this.taskParticipantsCc = taskParticipantsCc;
|
||||
}
|
||||
@@ -367,7 +365,7 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
|
||||
this.loadedAttachments = result
|
||||
|
||||
console.log('this.loadedAttachments', this.loadedAttachments, result)
|
||||
// console.log('this.loadedAttachments', this.loadedAttachments, result)
|
||||
}
|
||||
|
||||
deleteAttachment(attachment: Attachment, index) {
|
||||
|
||||
+4
@@ -88,12 +88,16 @@ export class PublicationDetailPage implements OnInit {
|
||||
|
||||
async deletePost(){
|
||||
|
||||
const laoder = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
|
||||
this.toastService.successMessage("Publicação eliminado")
|
||||
this.goBackToViewPublications.emit();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest("Publicação não eliminado")
|
||||
} finally {
|
||||
laoder.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user