mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add endpoints
This commit is contained in:
@@ -258,9 +258,9 @@
|
||||
</div>
|
||||
<div class="schedule-details">
|
||||
<div class="description">
|
||||
<p class="m-0" [innerHTML]="event.event.Subject"></p>
|
||||
<p class="m-0">{{event.event.Subject}}</p>
|
||||
</div>
|
||||
<div class="location" [innerHTML]="event.event.Location"></div>
|
||||
<div class="location">{{event.event.Subject}}</div>
|
||||
<div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
|
||||
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
|
||||
</div>
|
||||
|
||||
@@ -415,9 +415,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/* ); */
|
||||
|
||||
let eventId: any;
|
||||
|
||||
|
||||
@@ -63,13 +63,14 @@ export class HttpErrorHandle {
|
||||
|
||||
break;
|
||||
case 400:
|
||||
this.toastService._badRequest('Lamentamos, mas houve um problema com sua solicitação. Por favor, tente novamente')
|
||||
this.toastService._badRequest('Não foi possível fazer login. Por favor, verifique as suas credenciais.')
|
||||
/* this.toastService._badRequest('Lamentamos, mas houve um problema com sua solicitação. Por favor, tente novamente') */
|
||||
break;
|
||||
case 401:
|
||||
this.toastService._badRequest('Ocorreu um problema, por favor valide o username e password');
|
||||
this.toastService._badRequest('Não foi possível fazer login. Por favor, verifique as suas credenciais.');
|
||||
break;
|
||||
case 403:
|
||||
this.toastService._badRequest('Lamentamos, você não tem permissão para acessar este serviço.')
|
||||
this.toastService._badRequest('Por questões de segurança, a sua conta foi bloqueada. Por favor, contacte o suporte.')
|
||||
break;
|
||||
case 404:
|
||||
this.toastService._badRequest('Lamentamos, não encontramos o que procura.')
|
||||
@@ -94,7 +95,7 @@ export class HttpErrorHandle {
|
||||
this.toastService._badRequest('Este diploma não contem um rascunho para ser assinado!')
|
||||
break;
|
||||
case 'filetype':
|
||||
this.toastService._badRequest('Formato de ficheiro inválido!')
|
||||
this.toastService._badRequest('Para a segurança da informação, não é permitido carregar ficheiros deste tipo de formato.')
|
||||
break;
|
||||
case 'filessize':
|
||||
this.toastService._badRequest('Excedeu o limite de 20 MB!')
|
||||
|
||||
@@ -8,6 +8,8 @@ import { DetectCalendars, makeHeaderForCalendar } from '../../utils/utils';
|
||||
import { z } from "zod";
|
||||
import { ok, err } from 'neverthrow';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
/* import { ok, err } from 'neverthrow'; */
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -131,4 +133,5 @@ export class MiddlewareServiceService {
|
||||
|
||||
}
|
||||
|
||||
// ================================ Acções =================================================
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -48,11 +48,11 @@
|
||||
<ion-thumbnail *ngFor="let seleted of seletedContent.slice(0, displayLimit), let i = index" (click)="deleteFromSeletedContent(i)" lot="start">
|
||||
|
||||
<ion-img *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'image'"
|
||||
name="image" ngDefaultControl [src]="seleted.FileBase64"></ion-img>
|
||||
name="image" ngDefaultControl [src]="'data:image/jpg;base64,' + seleted.FileBase64"></ion-img>
|
||||
|
||||
<video *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video'" width="70" height="70"
|
||||
controls="controls" preload="metadata" autoplay="autoplay" webkit-playsinline="webkit-playsinline">
|
||||
<source type="video/mp4" [src]="seleted.FileBase64">
|
||||
<source type="video/mp4" [src]="'data:video/mp4;base64,' + seleted.FileBase64">
|
||||
</video>
|
||||
|
||||
</ion-thumbnail>
|
||||
|
||||
@@ -392,6 +392,8 @@ export class NewPublicationPage implements OnInit {
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -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>
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
<add name="X-Content-Type-Options" value="nosniff" />
|
||||
<!-- <add e="Expect-CT" value="enforce, max-age=86400" /> -->
|
||||
<!-- Permision -->
|
||||
<add name="Permissions-Policy" value="camera=(), microphone=()" />
|
||||
<add name="Permissions-Policy" value="camera=(), microphone=*" />
|
||||
<!-- same origin only -->
|
||||
<add name="Cross-Origin-Embedder-Policy" value="require-corp" />
|
||||
<!-- same origin only -->
|
||||
|
||||
Reference in New Issue
Block a user