mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
add history in chat to record meeting created!
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
</ion-refresher>
|
||||
<div class="messages" #scrollMe>
|
||||
<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 incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45' *ngIf="msg.msg !=''">
|
||||
<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">
|
||||
@@ -57,15 +57,15 @@
|
||||
<!-- <img *ngIf="file.image_url" src="{{file.image_url}}" alt="image" (click)="imageSize(file.image_url)"> -->
|
||||
<img *ngIf="file.image_url" src="{{file.image_url}}" alt="image">
|
||||
</div>
|
||||
<div>
|
||||
<div class="file">
|
||||
<!-- <canvas id="pdf_canvas"></canvas> -->
|
||||
<!-- <div *ngIf="msg.file.type">
|
||||
<div class="file">
|
||||
<div (click)="viewDocument(msg, file.title_link)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
|
||||
<span *ngIf="msg.file.type">
|
||||
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
|
||||
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"></fa-icon>
|
||||
<fa-icon *ngIf="msg.file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'" icon="file-word" class="excel-icon"></fa-icon>
|
||||
<ion-icon *ngIf="msg.file.type == 'application/webtrix'" src="assets/icon/webtrix.svg"></ion-icon>
|
||||
<ion-icon *ngIf="msg.file.type == 'application/meeting'" src="assets/icon/webtrix.svg"></ion-icon>
|
||||
</span>
|
||||
<ion-label class="file-title">{{file.title}}</ion-label>
|
||||
</div>
|
||||
@@ -76,13 +76,22 @@
|
||||
<span *ngIf="file.description && msg.file.type != 'application/webtrix'"> • </span>
|
||||
<span *ngIf="msg.file.type != 'application/webtrix'">{{msg.file.type.replace('application/','').toUpperCase()}}</span>
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="msg.file" class="info-meeting">
|
||||
<div *ngIf="msg.file.type == 'application/meeting'">
|
||||
<ion-label class="info-meeting-small">{{msg.u.name}} criou esta reunião</ion-label><br />
|
||||
<button (click)="goToEvent(msg.file.id)" class="btn-no-color info-meeting-normal"><ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label></button><br />
|
||||
<ion-label class="info-meeting-medium"><ion-icon name="calendar-outline"></ion-icon> De {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}</ion-label><br />
|
||||
<ion-label class="info-meeting-medium"><ion-icon></ion-icon><ion-icon name="location-outline"></ion-icon> {{msg.file.venue}}</ion-label><br />
|
||||
</div>
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ion-fab horizontal="end" vertical="bottom" slot="fixed">
|
||||
|
||||
@@ -100,6 +100,34 @@
|
||||
border-radius: 8px;
|
||||
border: 1px solid red;
|
||||
}
|
||||
.info-meeting{
|
||||
/* width: 322px; */
|
||||
width: em(422px);
|
||||
background: var(--chat-alert-msg-color);
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
color: #262420;
|
||||
padding: 10px;
|
||||
margin: 10px auto;
|
||||
line-height: 1.2rem;
|
||||
/* margin: 15px 0px 15px 0px; */
|
||||
border-radius: 8px;
|
||||
|
||||
.info-meeting-small{
|
||||
font-size: 10px;
|
||||
font-style: italic;
|
||||
}
|
||||
.info-meeting-medium{
|
||||
font-size: 12px;
|
||||
}
|
||||
.info-meeting-normal{
|
||||
font-weight: 700;
|
||||
}
|
||||
.info-meeting-normal:hover{
|
||||
text-decoration: underline;
|
||||
color: #0782c9;
|
||||
}
|
||||
}
|
||||
|
||||
.messages{
|
||||
font-size: 13px;
|
||||
|
||||
@@ -18,6 +18,7 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { PreviewCameraPage } from 'src/app/modals/preview-camera/preview-camera.page';
|
||||
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
|
||||
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-messages',
|
||||
@@ -74,7 +75,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
private gestureController: GestureController,
|
||||
private http:HttpClient,
|
||||
public ThemeService: ThemeService,
|
||||
private changeDetectorRef: ChangeDetectorRef
|
||||
private changeDetectorRef: ChangeDetectorRef,
|
||||
private router: Router,
|
||||
) {
|
||||
this.loggedUser = authService.ValidatedUserChat['data'];
|
||||
|
||||
@@ -200,17 +202,33 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
return this.timeService.showDateDuration(start);
|
||||
}
|
||||
|
||||
async goToEvent(eventId: any) {
|
||||
let classs;
|
||||
if (window.innerWidth < 701) {
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewEventPage,
|
||||
componentProps: {
|
||||
eventId: eventId,
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
|
||||
sendMessage() {
|
||||
|
||||
//this.synchro.$send({})
|
||||
|
||||
let body = {
|
||||
"message":
|
||||
{
|
||||
"rid": this.roomId, "msg": this.message
|
||||
"rid": this.roomId, "msg": this.message,
|
||||
}
|
||||
}
|
||||
|
||||
this.chatService.sendMessage(body).subscribe(res=> {
|
||||
this.scrollingOnce = true;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user