mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix chat and gabinete
This commit is contained in:
@@ -30,6 +30,7 @@ export const MessageEntityAttachmentSchema = z.object({
|
|||||||
mimeType: z.string().nullable().optional(),
|
mimeType: z.string().nullable().optional(),
|
||||||
safeFile: z.any().optional(),
|
safeFile: z.any().optional(),
|
||||||
description: z.string().nullable().optional(),
|
description: z.string().nullable().optional(),
|
||||||
|
filePath: z.string().nullable().optional()
|
||||||
})
|
})
|
||||||
|
|
||||||
export const MessageEntitySchema = z.object({
|
export const MessageEntitySchema = z.object({
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ export class MessageCreateUseCaseService {
|
|||||||
const validation = zodSafeValidation<IMessage>(MessageEntitySchema, message)
|
const validation = zodSafeValidation<IMessage>(MessageEntitySchema, message)
|
||||||
|
|
||||||
if(validation.isOk()) {
|
if(validation.isOk()) {
|
||||||
|
console.log("send data", message);
|
||||||
message.sendAttemp++;
|
message.sendAttemp++;
|
||||||
|
|
||||||
const createMessageLocally = await this.messageLocalDataSourceService.insert(message)
|
const createMessageLocally = await this.messageLocalDataSourceService.insert(message)
|
||||||
@@ -220,6 +221,8 @@ export class MessageCreateUseCaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
console.log('cant send error', validation.error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,9 +17,10 @@ export const AttachmentTableSchema = z.object({
|
|||||||
docId: z.number().optional(),
|
docId: z.number().optional(),
|
||||||
mimeType: z.string().nullable().optional(),
|
mimeType: z.string().nullable().optional(),
|
||||||
id: z.string().uuid().nullable().optional(),
|
id: z.string().uuid().nullable().optional(),
|
||||||
description: z.string().optional()
|
description: z.string().optional(),
|
||||||
})
|
filePath: z.string().optional().nullable()
|
||||||
|
});
|
||||||
|
|
||||||
export type AttachmentTable = z.infer<typeof AttachmentTableSchema>
|
export type AttachmentTable = z.infer<typeof AttachmentTableSchema>
|
||||||
export type DexieAttachmentsTableSchema = EntityTable<AttachmentTable, '$id'>;
|
export type DexieAttachmentsTableSchema = EntityTable<AttachmentTable, '$id'>;
|
||||||
export const AttachmentTableColumn = '++$id, id, $messageId, messageId, file'
|
export const AttachmentTableColumn = '++$id, id, $messageId, messageId, file, filePath'
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export class ViewDocumentPage implements OnInit {
|
|||||||
docId: any
|
docId: any
|
||||||
task: ExpedientTaskModalPageNavParamsTask;
|
task: ExpedientTaskModalPageNavParamsTask;
|
||||||
Document: any
|
Document: any
|
||||||
|
link: any;
|
||||||
loader = true
|
loader = true
|
||||||
attachment: SearchList[] = [];
|
attachment: SearchList[] = [];
|
||||||
|
|
||||||
@@ -38,6 +39,7 @@ export class ViewDocumentPage implements OnInit {
|
|||||||
this.Document = this.navParams.get('Document')
|
this.Document = this.navParams.get('Document')
|
||||||
this.task = this.navParams.get('task')
|
this.task = this.navParams.get('task')
|
||||||
this.attachment = this.navParams.get('attachment')
|
this.attachment = this.navParams.get('attachment')
|
||||||
|
this.link = this.navParams.get('link')
|
||||||
|
|
||||||
|
|
||||||
if(!this.file.title) {
|
if(!this.file.title) {
|
||||||
@@ -57,38 +59,35 @@ export class ViewDocumentPage implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.processes.GetViewer(this.docId, this.applicationId).subscribe(async(res)=> {
|
if(this.link == undefined) {
|
||||||
|
this.processes.GetViewer(this.docId, this.applicationId).subscribe(async(res)=> {
|
||||||
|
|
||||||
const link: string = res.replace('//pdfjs/web/', '/pdfjs/web/')
|
const link: string = res.replace('//pdfjs/web/', '/pdfjs/web/')
|
||||||
this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(link);
|
this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(link);
|
||||||
|
|
||||||
// const iframe = document.getElementById("iframe")
|
if(res == "") {
|
||||||
// const handleLoad = () => {
|
const alert = await this.alertController.create({
|
||||||
// this.loader = false
|
cssClass: 'my-custom-class',
|
||||||
// };
|
//header: 'Apagar evento!',
|
||||||
|
message: 'Sem imagem',
|
||||||
// iframe.addEventListener('load', handleLoad, true)
|
buttons: [
|
||||||
|
{
|
||||||
if(res == "") {
|
text: 'Sim',
|
||||||
const alert = await this.alertController.create({
|
handler: () => {
|
||||||
cssClass: 'my-custom-class',
|
this.close();
|
||||||
//header: 'Apagar evento!',
|
}
|
||||||
message: 'Sem imagem',
|
|
||||||
buttons: [
|
|
||||||
{
|
|
||||||
text: 'Sim',
|
|
||||||
handler: () => {
|
|
||||||
this.close();
|
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
]
|
});
|
||||||
});
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}, ()=>{
|
|
||||||
this.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
}, ()=>{
|
||||||
|
this.close();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
//console.log(this.link);
|
||||||
|
this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(this.link);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -383,7 +383,7 @@ export class DespachoPrPage implements OnInit {
|
|||||||
async reexecutar(note: string, documents: any) {
|
async reexecutar(note: string, documents: any) {
|
||||||
let body = {
|
let body = {
|
||||||
"serialNumber": this.serialNumber,
|
"serialNumber": this.serialNumber,
|
||||||
"action": "Reexecutar",
|
"action": "Reexecução",
|
||||||
"ActionTypeId": 100000010,
|
"ActionTypeId": 100000010,
|
||||||
"dataFields": {
|
"dataFields": {
|
||||||
"ReviewUserComment": note,
|
"ReviewUserComment": note,
|
||||||
|
|||||||
+2
-1
@@ -665,7 +665,8 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
cssClass: 'modal modal-desktop',
|
cssClass: 'modal modal-desktop',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
name: this.task.Folio,
|
name: this.task.Folio,
|
||||||
task: this.task
|
task: this.task,
|
||||||
|
documents: this.fulltask.Documents
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -452,12 +452,13 @@ export class PedidoPage implements OnInit {
|
|||||||
cssClass: 'modal modal-desktop',
|
cssClass: 'modal modal-desktop',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
name: this.task.Folio,
|
name: this.task.Folio,
|
||||||
task: this.task
|
task: this.task,
|
||||||
|
documents: this.fulltask.Documents
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
modal.onDidDismiss().then(
|
modal.onDidDismiss().then(
|
||||||
()=>{},
|
() => {},
|
||||||
(error) => {
|
(error) => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<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].Detail}}</p>
|
||||||
<p class="item-content-date font-13-em">{{publicationFolderService.FolderDetails[folderId].DateBegin | date:
|
<p class="item-content-date font-13-em">{{publicationFolderService.FolderDetails[folderId].DateBegin | date:
|
||||||
'dd-MM-yyyy HH:mm'}}</p>
|
'dd-MM-yyyy HH:mm'}}</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<div class="main-container background-white height-100 overflow-y-auto viewport-font-size">
|
<div class="main-container background-white height-100 overflow-y-auto viewport-font-size">
|
||||||
<ion-content *ngIf="publicationFolderService.FolderDetails[folderId]" #VideoManager >
|
<ion-content *ngIf="publicationFolderService.FolderDetails[folderId]" #VideoManager >
|
||||||
|
|
||||||
<p class="px-20 item-content-detail font-14-em">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
|
<p class="px-20 item-content-detail font-14-em">{{publicationFolderService.FolderDetails[folderId].Description}}</p>
|
||||||
|
|
||||||
<ion-card *ngFor="let publication of publicationFolderService.publicationList[folderId] let i = index">
|
<ion-card *ngFor="let publication of publicationFolderService.publicationList[folderId] let i = index">
|
||||||
<ion-card-content >
|
<ion-card-content >
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="title-content">
|
<div class="title-content">
|
||||||
<div *ngIf="publicationFolderService.FolderDetails[folderId]" class="div-title d-flex width-100 flex-grow-1 justify-content-between">
|
<div *ngIf="publicationFolderService.FolderDetails[folderId]" class="div-title d-flex width-100 flex-grow-1 justify-content-between">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-label>{{publicationFolderService.FolderDetails[folderId].Description}}</ion-label>
|
<ion-label>{{publicationFolderService.FolderDetails[folderId].Detail}}</ion-label>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions-icon align-baseline">
|
<div class="actions-icon align-baseline">
|
||||||
<button *ngIf="p.userPermission([p.permissionList.Actions.editPost])" class="btn-no-color" (click)="openEditPublication(publicationFolderService.FolderDetails[folderId].ProcessId)">
|
<button *ngIf="p.userPermission([p.permissionList.Actions.editPost])" class="btn-no-color" (click)="openEditPublication(publicationFolderService.FolderDetails[folderId].ProcessId)">
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
</ion-refresher>
|
</ion-refresher>
|
||||||
|
|
||||||
<div class="main-container px-20" *ngIf="publicationFolderService.FolderDetails[folderId]" >
|
<div class="main-container px-20" *ngIf="publicationFolderService.FolderDetails[folderId]" >
|
||||||
<p class="item-content-detail">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
|
<p class="item-content-detail">{{publicationFolderService.FolderDetails[folderId].Description}}</p>
|
||||||
|
|
||||||
<ion-card *ngFor="let publication of publicationFolderService.publications[folderId] let i = index">
|
<ion-card *ngFor="let publication of publicationFolderService.publications[folderId] let i = index">
|
||||||
<ion-card-content>
|
<ion-card-content>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="message-container rotate-div" *ngIf="message.showMessage && !message.meSendOneShot">
|
<div class="message-container rotate-div" *ngIf="message.showMessage && !message.meSendOneShot || message.showOneShot">
|
||||||
<div *ngIf="message.sender.wxUserId != SessionStore.user.UserId && roomType == RoomTypeEnum.Group">
|
<div *ngIf="message.sender.wxUserId != SessionStore.user.UserId && roomType == RoomTypeEnum.Group">
|
||||||
<b>
|
<b>
|
||||||
{{ message.sender.wxFullName }}
|
{{ message.sender.wxFullName }}
|
||||||
@@ -149,15 +149,20 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="message-container rotate-div" *ngIf="message.meSendOneShot">
|
|
||||||
Mandou uma mensagen com visualização única
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="message-container rotate-div" *ngIf="message._isDeleted == true && message.id != '' && message.oneShot == false">
|
<div class="message-container rotate-div" *ngIf="message._isDeleted == true && message.id != '' && message.oneShot == false">
|
||||||
Mensagem foi eliminada
|
Mensagem foi eliminada
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="message-container rotate-div" *ngIf="message._isDeleted == true && message.id != '' && message.oneShot == true">
|
<div class="message-container rotate-div" *ngIf="message.meSendOneShot && !message.ballon && message._isDeleted == false">
|
||||||
|
Mandou uma mensagen com visualização única
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div (click)="forceShowOneShot(message)" class="message-container rotate-div cursor-pointer" *ngIf="message._isDeleted == false && message.oneShot == true && !message.ballon && message.meSendOneShot == false">
|
||||||
|
Abrir visualização única
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="message-container rotate-div" *ngIf="message._isDeleted == true && message.id != '' && message.oneShot == true && message.showOneShot == false">
|
||||||
Mensagem visualizada
|
Mensagem visualizada
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -217,6 +222,13 @@
|
|||||||
<!-- <ion-fab-button *ngIf="p.userPermission([p.permissionList.Agenda.access])" title="Nova Reunião" (click)="bookMeeting()" color="light">
|
<!-- <ion-fab-button *ngIf="p.userPermission([p.permissionList.Agenda.access])" title="Nova Reunião" (click)="bookMeeting()" color="light">
|
||||||
<ion-icon name="calendar"></ion-icon>
|
<ion-icon name="calendar"></ion-icon>
|
||||||
</ion-fab-button> -->
|
</ion-fab-button> -->
|
||||||
|
<!-- <ion-fab-button
|
||||||
|
title="Mensagem única"
|
||||||
|
(click)="onShot = !onShot"
|
||||||
|
color="light">
|
||||||
|
|
||||||
|
<ion-icon [name]="onShot ? 'eye' : 'eye-off-outline'"></ion-icon>
|
||||||
|
</ion-fab-button> -->
|
||||||
<ion-fab-button title="Adicionar Documento" (click)="addFile()" color="light">
|
<ion-fab-button title="Adicionar Documento" (click)="addFile()" color="light">
|
||||||
<ion-icon name="document"></ion-icon>
|
<ion-icon name="document"></ion-icon>
|
||||||
</ion-fab-button>
|
</ion-fab-button>
|
||||||
|
|||||||
@@ -967,6 +967,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
url: '',
|
url: '',
|
||||||
title_link: '',
|
title_link: '',
|
||||||
},
|
},
|
||||||
|
link: msg.attachments[0].filePath || null,
|
||||||
Document: doc,
|
Document: doc,
|
||||||
applicationId: msg.attachments[0].applicationId,
|
applicationId: msg.attachments[0].applicationId,
|
||||||
docId: msg.attachments[0].docId,
|
docId: msg.attachments[0].docId,
|
||||||
@@ -1081,6 +1082,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
if(compressedImage.isOk()) {
|
if(compressedImage.isOk()) {
|
||||||
|
|
||||||
const message = this.createMessage();
|
const message = this.createMessage();
|
||||||
|
message.oneShot = oneShot;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1207,7 +1209,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
|
|
||||||
async pickPicture() {
|
async pickPicture() {
|
||||||
|
|
||||||
const oneShot = await this.askIfOneShot()
|
|
||||||
const file = await this.FilePickerService.getPicture({
|
const file = await this.FilePickerService.getPicture({
|
||||||
cameraResultType: CameraResultType.Base64
|
cameraResultType: CameraResultType.Base64
|
||||||
})
|
})
|
||||||
@@ -1227,7 +1228,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
if(compressedImage.isOk()) {
|
if(compressedImage.isOk()) {
|
||||||
|
|
||||||
const message = this.createMessage();
|
const message = this.createMessage();
|
||||||
message.oneShot = oneShot
|
|
||||||
|
|
||||||
message.attachments = [{
|
message.attachments = [{
|
||||||
file: file.value.base64String,
|
file: file.value.base64String,
|
||||||
@@ -1250,6 +1250,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
this.scrollToBottomClicked()
|
this.scrollToBottomClicked()
|
||||||
}, 100)
|
}, 100)
|
||||||
let sendMessage = this.chatServiceService.sendMessage(message, this.roomType)
|
let sendMessage = this.chatServiceService.sendMessage(message, this.roomType)
|
||||||
|
this.onShot = false;
|
||||||
//this.onShot = false;
|
//this.onShot = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1484,7 +1485,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
|
|
||||||
|
|
||||||
forceShowOneShot(message: MessageViewModal) {
|
forceShowOneShot(message: MessageViewModal) {
|
||||||
message.forceShowOneShot()
|
message.forceShowOneShot();
|
||||||
|
|
||||||
this.chatServiceService.messageDelete({
|
this.chatServiceService.messageDelete({
|
||||||
messageId: message.id,
|
messageId: message.id,
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'
|
|||||||
import { ChatServiceService } from 'src/app/module/chat/domain/chat-service.service'
|
import { ChatServiceService } from 'src/app/module/chat/domain/chat-service.service'
|
||||||
import { UDate } from 'src/app/utils/date';
|
import { UDate } from 'src/app/utils/date';
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
|
import { MessageViewModal } from '../../store/model/message';
|
||||||
|
import { MessageAttachmentFileType, MessageAttachmentSource } from 'src/app/core/chat/entity/message';
|
||||||
|
import { RoomType } from 'src/app/core/chat/entity/group';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-new-group',
|
selector: 'app-new-group',
|
||||||
@@ -85,6 +88,8 @@ export class NewGroupPage implements OnInit{
|
|||||||
this.dataService.clear();
|
this.dataService.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("this.documents", this.documents);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onDateExpirationChange(event) {
|
onDateExpirationChange(event) {
|
||||||
@@ -132,12 +137,34 @@ export class NewGroupPage implements OnInit{
|
|||||||
if(result.isOk()) {
|
if(result.isOk()) {
|
||||||
await this.ChatServiceService.getRoomById(result.value.id)
|
await this.ChatServiceService.getRoomById(result.value.id)
|
||||||
this.addGroupMessage.emit(result.value.id);
|
this.addGroupMessage.emit(result.value.id);
|
||||||
|
|
||||||
|
for (const doc of this.documents) {
|
||||||
|
const message = new MessageViewModal();
|
||||||
|
message.roomId = result.value.id;
|
||||||
|
message.sentAt = new Date().toISOString();
|
||||||
|
message.sender = {
|
||||||
|
userPhoto: '',
|
||||||
|
wxeMail: SessionStore.user.Email,
|
||||||
|
wxFullName: SessionStore.user.FullName,
|
||||||
|
wxUserId: SessionStore.user.UserId
|
||||||
|
};
|
||||||
|
// each message has one attachment
|
||||||
|
message.attachments = [{
|
||||||
|
fileName: doc.Assunto,
|
||||||
|
source: MessageAttachmentSource.Webtrix,
|
||||||
|
description: doc.Assunto,
|
||||||
|
applicationId: doc.ApplicationId,
|
||||||
|
docId: doc.DocId,
|
||||||
|
fileType: MessageAttachmentFileType.Doc,
|
||||||
|
}];
|
||||||
|
// send each message separately
|
||||||
|
this.ChatServiceService.sendMessage(message, RoomType.Group);
|
||||||
|
}
|
||||||
} else if(result.error instanceof HttpErrorResponse) {
|
} else if(result.error instanceof HttpErrorResponse) {
|
||||||
this.httpErrorHandle.httpStatusHandle(result.error)
|
this.httpErrorHandle.httpStatusHandle(result.error)
|
||||||
} else {
|
} else {
|
||||||
this.toastService._badRequest('Por favor, contacta um administrador.');
|
this.toastService._badRequest('Por favor, contacta um administrador.');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
createGroupWithAttachmentsCath(res: any) {
|
createGroupWithAttachmentsCath(res: any) {
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ import { UDate } from 'src/app/utils/date';
|
|||||||
import { HttpErrorResponse } from '@angular/common/http';
|
import { HttpErrorResponse } from '@angular/common/http';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
import { GroupContactsPage, IGroupContactsPageOutPutSchema } from '../group-contacts/group-contacts.page';
|
import { GroupContactsPage, IGroupContactsPageOutPutSchema } from '../group-contacts/group-contacts.page';
|
||||||
|
import { MessageViewModal } from '../../store/model/message';
|
||||||
|
import { MessageAttachmentFileType, MessageAttachmentSource } from 'src/app/core/chat/entity/message';
|
||||||
|
import { RoomType } from 'src/app/core/chat/entity/group';
|
||||||
|
|
||||||
|
|
||||||
const NewGroupModalOutPutSchema = z.object({
|
const NewGroupModalOutPutSchema = z.object({
|
||||||
@@ -77,7 +80,28 @@ export class NewGroupPage implements OnInit {
|
|||||||
if(result.isOk()) {
|
if(result.isOk()) {
|
||||||
await this.chatSystemService.getRoomById(result.value.id)
|
await this.chatSystemService.getRoomById(result.value.id)
|
||||||
this.addContacts(result.value.id)
|
this.addContacts(result.value.id)
|
||||||
//this.addGroupMessage.emit(result.value.id);
|
for (const doc of this.documents) {
|
||||||
|
const message = new MessageViewModal();
|
||||||
|
message.roomId = result.value.id;
|
||||||
|
message.sentAt = new Date().toISOString();
|
||||||
|
message.sender = {
|
||||||
|
userPhoto: '',
|
||||||
|
wxeMail: SessionStore.user.Email,
|
||||||
|
wxFullName: SessionStore.user.FullName,
|
||||||
|
wxUserId: SessionStore.user.UserId
|
||||||
|
};
|
||||||
|
// each message has one attachment
|
||||||
|
message.attachments = [{
|
||||||
|
fileName: doc.Assunto,
|
||||||
|
source: MessageAttachmentSource.Webtrix,
|
||||||
|
description: doc.Assunto,
|
||||||
|
applicationId: doc.ApplicationId,
|
||||||
|
docId: doc.DocId,
|
||||||
|
fileType: MessageAttachmentFileType.Doc,
|
||||||
|
}];
|
||||||
|
// send each message separately
|
||||||
|
this.chatSystemService.sendMessage(message, RoomType.Group);
|
||||||
|
}
|
||||||
} else if(result.error instanceof HttpErrorResponse) {
|
} else if(result.error instanceof HttpErrorResponse) {
|
||||||
// this.httpErrorHandle.httpStatusHandle(result.error)
|
// this.httpErrorHandle.httpStatusHandle(result.error)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export class MessageViewModal {
|
|||||||
if(this._isDeleted == false && this.messageType != IMessageType.information) {
|
if(this._isDeleted == false && this.messageType != IMessageType.information) {
|
||||||
this.showReaction = true
|
this.showReaction = true
|
||||||
}
|
}
|
||||||
if(this._isDeleted == false && this.messageType == IMessageType.normal) {
|
if(this._isDeleted == false && this.oneShot == false && this.messageType == IMessageType.normal) {
|
||||||
this.showMessage = true
|
this.showMessage = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
export let versionData = {
|
export let versionData = {
|
||||||
"shortSHA": "4870a0cd6",
|
"shortSHA": "f79df96d4",
|
||||||
"SHA": "4870a0cd695183670f21f5e4d3e614ac2e170284",
|
"SHA": "f79df96d48944f1df331220836382e65bd257083",
|
||||||
"branch": "developer",
|
"branch": "developer",
|
||||||
"lastCommitAuthor": "'peter.maquiran'",
|
"lastCommitAuthor": "'peter.maquiran'",
|
||||||
"lastCommitTime": "'Wed Sep 24 16:21:52 2025 +0100'",
|
"lastCommitTime": "'Mon Sep 29 11:34:11 2025 +0100'",
|
||||||
"lastCommitMessage": "fix messsage",
|
"lastCommitMessage": "fix message",
|
||||||
"lastCommitNumber": "6150",
|
"lastCommitNumber": "6151",
|
||||||
"changeStatus": "On branch developer\nYour branch is ahead of 'origin/developer' by 7 commits.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/core/chat/usecase/member/member-admin-use-case.service.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html\n\tmodified: src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts\n\tmodified: src/app/ui/chat/chat.page.html\n\tmodified: src/app/ui/chat/component/messages/messages.page.html\n\tmodified: src/app/ui/chat/component/messages/messages.page.scss\n\tmodified: src/app/ui/chat/component/messages/messages.page.ts\n\tmodified: src/app/ui/chat/store/model/message.ts\n\tmodified: src/app/ui/chat/store/roomStore.ts\n\tmodified: src/environments/environment.ts\n\tmodified: version/git-version.ts",
|
"changeStatus": "On branch developer\nYour branch is ahead of 'origin/developer' by 8 commits.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/core/chat/entity/message.ts\n\tmodified: src/app/core/chat/usecase/message/message-create-use-case.service.ts\n\tmodified: src/app/infra/database/dexie/instance/chat/schema/attachment.ts\n\tmodified: src/app/modals/view-document/view-document.page.ts\n\tmodified: src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts\n\tmodified: src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts\n\tmodified: src/app/pages/publications/view-publications/view-publications.page.html\n\tmodified: src/app/shared/publication/view-publications/view-publications.page.html\n\tmodified: src/app/ui/chat/component/messages/messages.page.html\n\tmodified: src/app/ui/chat/component/messages/messages.page.ts\n\tmodified: src/app/ui/chat/component/new-group/new-group.page.ts\n\tmodified: src/app/ui/chat/modal/new-group/new-group.page.ts\n\tmodified: src/app/ui/chat/store/model/message.ts\n\tmodified: version/git-version.ts",
|
||||||
"changeAuthor": "peter.maquiran"
|
"changeAuthor": "peter.maquiran"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user