mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
save
This commit is contained in:
@@ -227,12 +227,11 @@
|
|||||||
<div class="list-people">
|
<div class="list-people">
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-label class="list-people-title">Com conhecimento</ion-label>
|
<ion-label *ngIf="taskParticipantsCc?.length < 1" class="list-people-title">Com conhecimento</ion-label>
|
||||||
<div class="list-people">
|
<div class="list-people">
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-label *ngIf="!taskParticipants" class="list-people-title">Adicionar intervenientes</ion-label>
|
<ion-label *ngFor="let participant of taskParticipantsCc">{{participant.Name}}</ion-label>
|
||||||
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
|
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ export class NewEventPage implements OnInit {
|
|||||||
documents:SearchDocument[] = [];
|
documents:SearchDocument[] = [];
|
||||||
|
|
||||||
loggeduser: User;
|
loggeduser: User;
|
||||||
|
members:any;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
@@ -78,7 +79,9 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
this.selectedSegment = this.navParams.get('segment');
|
this.selectedSegment = this.navParams.get('segment');
|
||||||
this.selectedDate = this.navParams.get('eventSelectedDate');
|
this.selectedDate = this.navParams.get('eventSelectedDate');
|
||||||
|
this.taskParticipants = this.navParams.get('attendees');
|
||||||
|
|
||||||
|
console.log(this.taskParticipants);
|
||||||
|
|
||||||
this.postEvent.StartDate = new Date()
|
this.postEvent.StartDate = new Date()
|
||||||
this.postEvent.EndDate = (new Date(new Date().getTime() + 15 * 60000))
|
this.postEvent.EndDate = (new Date(new Date().getTime() + 15 * 60000))
|
||||||
@@ -232,13 +235,15 @@ export class NewEventPage implements OnInit {
|
|||||||
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
|
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||||
|
|
||||||
let eventId: any;
|
let eventId: any;
|
||||||
|
|
||||||
const loader = this.toastService.loading()
|
const loader = this.toastService.loading()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(this.loggeduser.Profile == 'MDGPR') {
|
if(this.loggeduser.Profile == 'MDGPR') {
|
||||||
console.log(this.loggeduser.Profile);
|
console.log(this.loggeduser.Profile);
|
||||||
|
|||||||
@@ -12,11 +12,14 @@ import { GroupMessagesPage } from './group-messages.page';
|
|||||||
import { ChatPopoverPageModule } from 'src/app/shared/popover/chat-popover/chat-popover.module';
|
import { ChatPopoverPageModule } from 'src/app/shared/popover/chat-popover/chat-popover.module';
|
||||||
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
|
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
|
||||||
|
|
||||||
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
|
FontAwesomeModule,
|
||||||
IonicModule,
|
IonicModule,
|
||||||
|
|
||||||
GroupMessagesPageRoutingModule,
|
GroupMessagesPageRoutingModule,
|
||||||
|
|||||||
@@ -86,11 +86,11 @@
|
|||||||
<ion-footer>
|
<ion-footer>
|
||||||
<div class="container width-100 d-flex">
|
<div class="container width-100 d-flex">
|
||||||
<div>
|
<div>
|
||||||
<button class="btn-no-color" > <!-- (click)="openChatOptions()" -->
|
<button class="btn-no-color" (click)="openChatOptions()">
|
||||||
<ion-icon class="chat-icon-options" src="assets/icon/icons-chat-options.svg"></ion-icon>
|
<ion-icon class="chat-icon-options" src="assets/images/icons-add-new-event.svg"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="width-80">
|
<div class="message-box width-80">
|
||||||
<ion-item class="ion-no-padding type-message" lines="none">
|
<ion-item class="ion-no-padding type-message" lines="none">
|
||||||
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||||||
<button hidden class="btn-no-color">
|
<button hidden class="btn-no-color">
|
||||||
|
|||||||
@@ -187,14 +187,19 @@
|
|||||||
.container{
|
.container{
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.message-box{
|
||||||
|
margin: 0 5px 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-icon-options{
|
.chat-icon-options{
|
||||||
display:block !important;
|
display:block !important;
|
||||||
font-size: 25px;
|
font-size: 35px;
|
||||||
float: right !important;
|
float: right !important;
|
||||||
margin-top: 10px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-icon-send{
|
.chat-icon-send{
|
||||||
@@ -209,6 +214,7 @@
|
|||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
||||||
ion-textarea{
|
ion-textarea{
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ export class GroupMessagesPage implements OnInit, AfterViewChecked {
|
|||||||
|
|
||||||
roomId: string;
|
roomId: string;
|
||||||
loggedUserChat:any;
|
loggedUserChat:any;
|
||||||
|
eventSelectedDate: Date = new Date();
|
||||||
|
|
||||||
@ViewChild('scrollMe') private myScrollContainer: ElementRef;
|
@ViewChild('scrollMe') private myScrollContainer: ElementRef;
|
||||||
|
|
||||||
@@ -146,7 +147,6 @@ export class GroupMessagesPage implements OnInit, AfterViewChecked {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async openOptions() {
|
async openOptions() {
|
||||||
console.log('OK');
|
|
||||||
const modal = await this.popoverController.create({
|
const modal = await this.popoverController.create({
|
||||||
component: ChatPopoverPage,
|
component: ChatPopoverPage,
|
||||||
cssClass: 'chat-popover',
|
cssClass: 'chat-popover',
|
||||||
@@ -165,17 +165,20 @@ export class GroupMessagesPage implements OnInit, AfterViewChecked {
|
|||||||
else if(res.data == 'edit'){
|
else if(res.data == 'edit'){
|
||||||
this.editGroup(this.roomId);
|
this.editGroup(this.roomId);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async openChatOptions(ev?: any) {
|
async openChatOptions(ev?: any) {
|
||||||
|
console.log(this.members);
|
||||||
|
|
||||||
const popover = await this.popoverController.create({
|
const popover = await this.popoverController.create({
|
||||||
component: ChatOptionsPopoverPage,
|
component: ChatOptionsPopoverPage,
|
||||||
cssClass: 'chat-options-popover',
|
cssClass: 'chat-options-popover',
|
||||||
event: ev,
|
event: ev,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
room: this.room,
|
room: this.room,
|
||||||
|
members: this.members,
|
||||||
|
eventSelectedDate: new Date(),
|
||||||
},
|
},
|
||||||
translucent: true
|
translucent: true
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
<ion-footer>
|
<ion-footer>
|
||||||
<div class="container width-100 d-flex">
|
<div class="container width-100 d-flex">
|
||||||
<div>
|
<div>
|
||||||
<button class="btn-no-color" > <!-- (click)="openSendGroupMessageOptions()" -->
|
<button class="btn-no-color" (click)="openSendGroupMessageOptions()">
|
||||||
<ion-icon class="chat-icon-options" src="assets/icon/icons-chat-options.svg"></ion-icon>
|
<ion-icon class="chat-icon-options" src="assets/icon/icons-chat-options.svg"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
|||||||
}
|
}
|
||||||
|
|
||||||
openSendGroupMessageOptions(ev?: any){
|
openSendGroupMessageOptions(ev?: any){
|
||||||
if(window.innerWidth <= 1024){
|
if(window.innerWidth <= 701){
|
||||||
console.log('mobile');
|
console.log('mobile');
|
||||||
this.openChatOptions(ev);
|
this.openChatOptions(ev);
|
||||||
}
|
}
|
||||||
@@ -334,7 +334,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
async _openChatOptions() {
|
async _openChatOptions() {
|
||||||
|
|
||||||
const enterAnimation = (baseEl: any) => {
|
const enterAnimation = (baseEl: any) => {
|
||||||
const backdropAnimation = this.animationController.create()
|
const backdropAnimation = this.animationController.create()
|
||||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||||
@@ -362,7 +361,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
|||||||
enterAnimation,
|
enterAnimation,
|
||||||
leaveAnimation,
|
leaveAnimation,
|
||||||
component: ChatOptionsPopoverPage,
|
component: ChatOptionsPopoverPage,
|
||||||
cssClass: 'model profile-modal search-submodal',
|
cssClass: 'model',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
roomId: this.roomId,
|
roomId: this.roomId,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
<button (click)="notImplemented()" full class="btn-ok" shape="round" >Anexar Fotografia</button>
|
<button (click)="notImplemented()" full class="btn-ok" shape="round" >Anexar Fotografia</button>
|
||||||
<button (click)="getDoc()" class="btn-ok" shape="round" >Anexar Documento</button>
|
<button (click)="getDoc()" class="btn-ok" shape="round" >Anexar Documento</button>
|
||||||
<div class="solid"></div>
|
<div class="solid"></div>
|
||||||
|
<button (click)="bookMeeting()" class="btn-ok" shape="round" >Marcar reunião</button>
|
||||||
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
|
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { ModalController, PopoverController } from '@ionic/angular';
|
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||||
|
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchDocument } from 'src/app/models/search-document';
|
||||||
|
import { NewEventPage } from 'src/app/pages/agenda/new-event/new-event.page';
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
import { AlertService } from 'src/app/services/alert.service';
|
import { AlertService } from 'src/app/services/alert.service';
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-chat-options-popover',
|
selector: 'app-chat-options-popover',
|
||||||
@@ -12,14 +15,30 @@ import { AlertService } from 'src/app/services/alert.service';
|
|||||||
export class ChatOptionsPopoverPage implements OnInit {
|
export class ChatOptionsPopoverPage implements OnInit {
|
||||||
|
|
||||||
documents:SearchDocument[] = [];
|
documents:SearchDocument[] = [];
|
||||||
|
members: any;
|
||||||
|
attendees: EventPerson[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private popoverController: PopoverController,
|
private popoverController: PopoverController,
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private alertService: AlertService,
|
private alertService: AlertService,
|
||||||
) { }
|
private navParams: NavParams,
|
||||||
|
) {
|
||||||
|
|
||||||
|
this.members = this.navParams.get('members');
|
||||||
|
console.log(this.members);
|
||||||
|
this.attendees = this.navParams.get('members').map((val)=>{
|
||||||
|
return {
|
||||||
|
Name: val.name,
|
||||||
|
EmailAddress: val.username+"@"+environment.domain,
|
||||||
|
IsRequired: "true",
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
console.log(this.attendees);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
notImplemented(){
|
notImplemented(){
|
||||||
@@ -37,9 +56,29 @@ export class ChatOptionsPopoverPage implements OnInit {
|
|||||||
|
|
||||||
attachDocument(){
|
attachDocument(){
|
||||||
console.log('Anexar Documento');
|
console.log('Anexar Documento');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* getGroupContacts(room:any){
|
||||||
|
this.showLoader = true;
|
||||||
|
//If group is private call getGroupMembers
|
||||||
|
if(this.room.t === 'p'){
|
||||||
|
this.chatService.getGroupMembers(this.roomId).subscribe(res=>{
|
||||||
|
console.log(res);
|
||||||
|
this.members = res['members'];
|
||||||
|
this.showLoader = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//Otherwise call getChannelMembers for públic groups
|
||||||
|
else{
|
||||||
|
this.chatService.getChannelMembers(this.roomId).subscribe(res=>{
|
||||||
|
console.log(res);
|
||||||
|
this.members = res['members'];
|
||||||
|
this.showLoader = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} */
|
||||||
|
|
||||||
async getDoc(){
|
async getDoc(){
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: SearchPage,
|
component: SearchPage,
|
||||||
@@ -56,9 +95,30 @@ export class ChatOptionsPopoverPage implements OnInit {
|
|||||||
const data = res.data;
|
const data = res.data;
|
||||||
this.documents.push(data.selected);
|
this.documents.push(data.selected);
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async bookMeeting() {
|
||||||
|
console.log(this.attendees);
|
||||||
|
this.popoverController.dismiss();
|
||||||
|
if( window.innerWidth <= 1024){
|
||||||
|
const modal = await this.modalController.create({
|
||||||
|
component: NewEventPage,
|
||||||
|
componentProps:{
|
||||||
|
attendees: this.attendees,
|
||||||
|
},
|
||||||
|
cssClass: 'modal modal-desktop',
|
||||||
|
backdropDismiss: false
|
||||||
|
});
|
||||||
|
await modal.present();
|
||||||
|
modal.onDidDismiss().then((data) => {
|
||||||
|
if(data){
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
<button (click)="leaveGroup()" class="btn-cancel" shape="round" >Sair do Grupo</button>
|
<button (click)="leaveGroup()" class="btn-cancel" shape="round" >Sair do Grupo</button>
|
||||||
<button (click)="openChangeGroupName()" class="btn-ok" shape="round" >Alterar nome do grupo</button>
|
<button (click)="openChangeGroupName()" class="btn-ok" shape="round" >Alterar nome do grupo</button>
|
||||||
<div class="solid"></div>
|
<div class="solid"></div>
|
||||||
|
<button (click)="bookMeeting()" class="btn-cancel" shape="round">Marcar Reunião</button>
|
||||||
<button (click)="close()" full class="btn-cancel mobile-only" shape="round" >Cancelar</button>
|
<button (click)="close()" full class="btn-cancel mobile-only" shape="round" >Cancelar</button>
|
||||||
<button (click)="deleteGroup()" class="btn-delete" shape="round">Apagar grupo</button>
|
<button (click)="deleteGroup()" class="btn-delete" shape="round">Apagar grupo</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -86,4 +86,8 @@ export class ChatPopoverPage implements OnInit {
|
|||||||
this.modalController.dismiss('edit');
|
this.modalController.dismiss('edit');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bookMeeting(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user