mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
can run on device
This commit is contained in:
Generated
+668
-32252
File diff suppressed because it is too large
Load Diff
@@ -1093,7 +1093,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
async openPreview(msg: MessageService) {
|
||||
|
||||
if(msg.file.type === "application/webtrix") {
|
||||
if(msg?.file?.type === "application/webtrix") {
|
||||
this.viewDocument(msg.file, msg.attachments.image_url)
|
||||
} else {
|
||||
if (!msg.attachments[0].image_url || msg.attachments[0].image_url === null || msg.attachments[0].image_url === '') {
|
||||
@@ -1106,7 +1106,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
|
||||
if (msg.file.type == "application/img") {
|
||||
if (msg?.file?.type == "application/img") {
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewMediaPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, LOCALE_ID, EventEmitter, Output, Renderer2, ElementRef } from '@angular/core';
|
||||
import { Component, OnInit, EventEmitter, Output } from '@angular/core';
|
||||
|
||||
import { Event } from '../../models/event.model';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
@@ -31,7 +31,6 @@ import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
|
||||
styleUrls: ['./events.page.scss'],
|
||||
})
|
||||
export class EventsPage implements OnInit {
|
||||
/* Get current system date */
|
||||
today = new Date();
|
||||
|
||||
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
||||
@@ -39,12 +38,11 @@ export class EventsPage implements OnInit {
|
||||
|
||||
customDate = this.days[this.today.getDay()] + ", " + this.today.getDate() + " de " + (this.months[this.today.getMonth()]);
|
||||
|
||||
/* Setting appropriate greeting according to the time */
|
||||
grettings = ["Bom dia", "Boa tarde", "Boa noite"];
|
||||
greetting = '';
|
||||
|
||||
timeDate = this.today.getHours() + ":" + this.today.getMinutes();
|
||||
/* Set segment variable */
|
||||
|
||||
segment: string;
|
||||
public profile: string;
|
||||
currentEvent: any;
|
||||
@@ -82,8 +80,6 @@ export class EventsPage implements OnInit {
|
||||
|
||||
loggeduser: LoginUserRespose;
|
||||
|
||||
/* existingScreenOrientation: string; */
|
||||
|
||||
permissionList = new PermissionList();
|
||||
|
||||
constructor(
|
||||
@@ -94,7 +90,6 @@ export class EventsPage implements OnInit {
|
||||
private alertController: AlertService,
|
||||
private authService: AuthService,
|
||||
private processes: ProcessesService,
|
||||
/* private gabineteService: GabineteDigitalPage, */
|
||||
private modalController: ModalController,
|
||||
private screenOrientation: ScreenOrientation,
|
||||
public platform: Platform,
|
||||
@@ -105,7 +100,6 @@ export class EventsPage implements OnInit {
|
||||
private storage: Storage,
|
||||
public p: PermissionService,
|
||||
) {
|
||||
/* this.existingScreenOrientation = this.screenOrientation.type; */
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
@@ -150,10 +144,6 @@ export class EventsPage implements OnInit {
|
||||
this.hideSearch();
|
||||
});
|
||||
|
||||
//this.getEventsFromLocalDb();
|
||||
|
||||
//this.checkScreenOrientation();
|
||||
|
||||
}
|
||||
|
||||
hideSearch() {
|
||||
@@ -172,32 +162,6 @@ export class EventsPage implements OnInit {
|
||||
this.RefreshEvents();
|
||||
}
|
||||
|
||||
// Lock to portrait
|
||||
/* lockToPortrait() {
|
||||
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT);
|
||||
|
||||
} */
|
||||
|
||||
// Lock to landscape
|
||||
/* lockToLandscape() {
|
||||
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.LANDSCAPE);
|
||||
} */
|
||||
|
||||
// Unlock screen orientation
|
||||
/* unlockScreenOrientation() {
|
||||
this.screenOrientation.unlock();
|
||||
} */
|
||||
|
||||
/* checkScreenOrientation() {
|
||||
if (window.innerWidth < 701) {
|
||||
this.lockToPortrait();
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
this.unlockScreenOrientation();
|
||||
}
|
||||
} */
|
||||
|
||||
async RefreshEvents() {
|
||||
this.currentEvent = "";
|
||||
|
||||
@@ -443,7 +443,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
|
||||
deleteMessage(msgId: string, msg: MessageService) {
|
||||
this.wsChatMethodsService.getDmRoom(this.roomId).sendDeleteRequest(msgId)
|
||||
if (msg.file.type == "application/webtrix") {
|
||||
if (msg?.file?.type == "application/webtrix") {
|
||||
// this.openViewDocumentModal(msg.file);
|
||||
}
|
||||
else {
|
||||
@@ -669,7 +669,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
const roomId = this.roomId
|
||||
|
||||
const image = await this.CameraService.takePicture();
|
||||
await this.fileService.saveImage(image)
|
||||
await this.fileService.saveImage(image);
|
||||
const lastphoto: any = await this.fileService.loadFiles();
|
||||
const { capturedImage, capturedImageTitle } = await this.fileService.loadFileData(lastphoto);
|
||||
const base64 = await fetch(capturedImage);
|
||||
|
||||
Reference in New Issue
Block a user