mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
add file on chat its hide
This commit is contained in:
@@ -354,7 +354,7 @@ export class EditEventPage implements OnInit {
|
||||
this.runValidation()
|
||||
|
||||
if(this.Form.invalid) return false;
|
||||
if(this.selectedRecurringType != '-1'){
|
||||
if(this.selectedRecurringType != '-1') {
|
||||
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
|
||||
}
|
||||
|
||||
|
||||
@@ -831,22 +831,22 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
|
||||
if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") {
|
||||
console.log(file.type)
|
||||
console.log('TYPE',file.type)
|
||||
|
||||
const encodedData = btoa(JSON.stringify(await this.getBase64(file).catch ((error) => {
|
||||
const encodedData = 'data:application/pdf;base64,'+btoa(JSON.stringify(await this.getBase64(file).catch ((error) => {
|
||||
console.error(error);
|
||||
})));
|
||||
console.log(encodedData)
|
||||
const blob = this.fileService.base64toBlob(encodedData, file.type)
|
||||
console.log(blob
|
||||
)
|
||||
const fileBase64 = await this._getBase64(file)
|
||||
console.log(fileBase64)
|
||||
console.log('BLOB BLOB',blob)
|
||||
/* const fileBase64 = await this._getBase64(file)
|
||||
console.log('BASE&$',fileBase64) */
|
||||
|
||||
|
||||
const formData = new FormData();
|
||||
/* const formData = new FormData();
|
||||
console.log('add file', formData)
|
||||
formData.append('blobFile', blob);
|
||||
formData.append('blobFile', blob); */
|
||||
let ob = {'blobFile': blob}
|
||||
|
||||
this.ChatSystemService.getDmRoom(roomId).send({
|
||||
file: {
|
||||
@@ -859,9 +859,9 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
// "text": "description",
|
||||
"title_link_download": false,
|
||||
}],
|
||||
temporaryData: formData,
|
||||
temporaryData: ob,
|
||||
attachmentsModelData: {
|
||||
fileBase64: fileBase64,
|
||||
fileBase64: encodedData,
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -501,6 +501,7 @@ export class DespachoPrPage implements OnInit {
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
fulltask:this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
|
||||
@@ -5,8 +5,6 @@ import { customFullTask, customTask, DailyWorkTask } from '../../../models/daily
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
|
||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { DespachoPage } from 'src/app/pages/gabinete-digital/despachos/despacho/despacho.page';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { DespachosprStore } from 'src/app/store/despachospr-store.service';
|
||||
@@ -249,46 +247,6 @@ export class DespachosPrPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
async openBookMeetingModal(task: customFullTask) {
|
||||
|
||||
const doc = this.loadedAttachments[this.dicIndex];
|
||||
|
||||
task = {
|
||||
serialNumber: doc.SourceId,
|
||||
taskStartDate: doc.CreateDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: doc.SourceId,
|
||||
Subject: doc.SourceName
|
||||
},
|
||||
}
|
||||
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: task,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(
|
||||
(e)=>{},
|
||||
(error) => {
|
||||
console.log(error)
|
||||
}
|
||||
);
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
|
||||
docIndex(index: number) {
|
||||
this.dicIndex = index;
|
||||
|
||||
@@ -505,6 +505,7 @@ export class DespachoPage implements OnInit {
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
fulltask: this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
|
||||
@@ -187,6 +187,7 @@ export class DiplomasGerarPage implements OnInit {
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
fulltask:this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
|
||||
@@ -398,6 +398,7 @@ export class DiplomaPage implements OnInit {
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
fulltask: this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
|
||||
+2
-2
@@ -280,12 +280,12 @@
|
||||
<ion-label>
|
||||
<p class="d-flex ion-justify-content-between">
|
||||
<span class="attach-title-item">{{document.Assunto}}</span>
|
||||
<span class="app-name">{{document.appName}}</span>
|
||||
<span class="app-name" *ngIf="document.appName">{{document.appName}}</span>
|
||||
<span class="close-button text-black" (click)="removeAttachment(i)" >
|
||||
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
|
||||
</span>
|
||||
</p>
|
||||
<p><span class="span-left">{{document.EntidadeOrganicaNome}}</span><span class="span-right"> {{document.Data | date: 'dd-MM-yyyy HH:mm'}} </span></p>
|
||||
<p><span class="span-left">{{( document.EntidadeOrganicaNome || document.Sender)}}</span><span class="span-right"> {{(document.Data || document.DocDate) | date: 'dd-MM-yyyy HH:mm'}} </span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
+11
-3
@@ -91,6 +91,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
@ViewChild('picker1') picker1: any;
|
||||
|
||||
task: any;
|
||||
fulltask: any;
|
||||
|
||||
taskParticipants: EventPerson[];
|
||||
taskParticipantsCc: EventPerson[] = [];
|
||||
@@ -130,6 +131,13 @@ export class BookMeetingModalPage implements OnInit {
|
||||
this.taskParticipants = [];
|
||||
|
||||
this.task = this.navParams.get('task');
|
||||
this.fulltask = this.navParams.get('fulltask');
|
||||
|
||||
console.log('fulltask', this.fulltask)
|
||||
|
||||
if(this.fulltask?.Documents) {
|
||||
this.documents = this.fulltask.Documents
|
||||
}
|
||||
|
||||
this.postData = new Event();
|
||||
this.eventBody = { BodyType: "1", Text: "" };
|
||||
@@ -313,12 +321,12 @@ export class BookMeetingModalPage implements OnInit {
|
||||
Attachments: []
|
||||
}
|
||||
|
||||
const DocumentToSave = this.documents.map((e) => {
|
||||
const DocumentToSave = this.documents.map((e: any) => {
|
||||
console.log('ASSUNTO', e.Assunto)
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
ApplicationId: e.ApplicationType || e.ApplicationId,
|
||||
Source: 1,
|
||||
SourceId: e.Id,
|
||||
SourceId: e.Id || e.DocId || e.SourceId,
|
||||
SourceName:e.Assunto,
|
||||
Description: e.Assunto,
|
||||
Stakeholders: e.EntidadeOrganicaNome
|
||||
|
||||
@@ -651,6 +651,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
fulltask:this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
|
||||
@@ -525,6 +525,7 @@ export class ExpedientePrPage implements OnInit {
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
fulltask:this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
|
||||
@@ -405,6 +405,7 @@ export class PedidoPage implements OnInit {
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: task,
|
||||
fulltask:this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
|
||||
Reference in New Issue
Block a user