bug on agenda, publications and refactore send file on chat

This commit is contained in:
Eudes Inácio
2023-12-27 10:28:48 +01:00
parent 2aef1d6030
commit afa1c41021
8 changed files with 19 additions and 16 deletions
@@ -16,7 +16,7 @@
<div class="main-content">
<div class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*"
[innerHTML]="_postEvent.Subject"></ion-input>
[(ngModel)]="_postEvent.Subject"></ion-input>
</div>
<div *ngIf="Form && validateFrom">
<div *ngIf="Form.get('Subject').invalid " class="input-errror-message">
@@ -515,9 +515,9 @@ export class NewEventPage implements OnInit {
}
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
this.postEvent.Subject = this.domSanitazerService.sanitizeInput(this.postEvent.Subject);
this.postEvent.Location = this.domSanitazerService.sanitizeInput(this.postEvent.Location);
this.postEvent.Body.Text = this.domSanitazerService.sanitizeInput(this.postEvent.Body.Text);
this.postEvent.Subject = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Subject/* ); */
this.postEvent.Location = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Location/* ); */
this.postEvent.Body.Text = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Body.Text/* ); */
@@ -13,7 +13,7 @@
</button>
</div>
<div class="middle" (click)="openOptions()">
<p class="title" [innerHTML]="loadedEvent.Subject"></p>
<p class="title">{{loadedEvent.Subject}}</p>
</div>
<div class="div-icon d-flex align-base">
@@ -54,7 +54,7 @@
<div class="upper-content">
<div class="content-location">
<span class="date" [innerHTML]="loadedEvent.Location"></span>
<span class="date">{{loadedEvent.Location}}</span>
<div *ngIf="loadedEvent.Organizer">
@@ -699,6 +699,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
source: CameraSource.Camera
});
console.log('FILE CHAT',file)
const imageBase64 = 'data:image/jpeg;base64,' + file.base64String
const blob = this.dataURItoBlob(imageBase64)
@@ -867,7 +869,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
console.log('BLOB BLOB', blob)
formData = new FormData();
formData.append('blobFile', blob);
formData.append('blobFile', file);
/* console.log('add file', fileBase64) */
} else {
@@ -876,7 +878,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
fileBase64 = await this._getBase64(file)
formData = new FormData();
formData.append('blobFile', blob);
formData.append('blobFile', file);
}
@@ -34,11 +34,12 @@
<div class="post-item px-20">
<swiper-container navigation="true" [pagination]="{clickable: true, dynamicBullets: true }">
<swiper-slide *ngFor="let files of publication.Files let k = index">
<div (click)="openPreview(publication)">
<!-- <div (click)="openPreview(publication)"> -->
<div>
<img *ngIf="checkFileType.checkFileType(files.FileExtension ) == 'image'" alt="image" tappable
src="{{'data:image/jpg;base64,' + files.FileBase64}}">
<video *ngIf="checkFileType.checkFileType(files.FileExtension ) == 'video'" controls="controls" autoplay="autoplay" preload="metadata"
<video *ngIf="checkFileType.checkFileType(files.FileExtension ) == 'video'" controls="controls" preload="metadata"
webkit-playsinline="webkit-playsinline">
<source src="{{'data:video/mp4;base64,' + files.FileBase64}}" type="video/mp4">
</video>