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) {
|
async openPreview(msg: MessageService) {
|
||||||
|
|
||||||
if(msg.file.type === "application/webtrix") {
|
if(msg?.file?.type === "application/webtrix") {
|
||||||
this.viewDocument(msg.file, msg.attachments.image_url)
|
this.viewDocument(msg.file, msg.attachments.image_url)
|
||||||
} else {
|
} else {
|
||||||
if (!msg.attachments[0].image_url || msg.attachments[0].image_url === null || msg.attachments[0].image_url === '') {
|
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 (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({
|
const modal = await this.modalController.create({
|
||||||
component: ViewMediaPage,
|
component: ViewMediaPage,
|
||||||
cssClass: 'modal modal-desktop',
|
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 { Event } from '../../models/event.model';
|
||||||
import { EventsService } from 'src/app/services/events.service';
|
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'],
|
styleUrls: ['./events.page.scss'],
|
||||||
})
|
})
|
||||||
export class EventsPage implements OnInit {
|
export class EventsPage implements OnInit {
|
||||||
/* Get current system date */
|
|
||||||
today = new Date();
|
today = new Date();
|
||||||
|
|
||||||
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
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()]);
|
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"];
|
grettings = ["Bom dia", "Boa tarde", "Boa noite"];
|
||||||
greetting = '';
|
greetting = '';
|
||||||
|
|
||||||
timeDate = this.today.getHours() + ":" + this.today.getMinutes();
|
timeDate = this.today.getHours() + ":" + this.today.getMinutes();
|
||||||
/* Set segment variable */
|
|
||||||
segment: string;
|
segment: string;
|
||||||
public profile: string;
|
public profile: string;
|
||||||
currentEvent: any;
|
currentEvent: any;
|
||||||
@@ -82,8 +80,6 @@ export class EventsPage implements OnInit {
|
|||||||
|
|
||||||
loggeduser: LoginUserRespose;
|
loggeduser: LoginUserRespose;
|
||||||
|
|
||||||
/* existingScreenOrientation: string; */
|
|
||||||
|
|
||||||
permissionList = new PermissionList();
|
permissionList = new PermissionList();
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@@ -94,7 +90,6 @@ export class EventsPage implements OnInit {
|
|||||||
private alertController: AlertService,
|
private alertController: AlertService,
|
||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
private processes: ProcessesService,
|
private processes: ProcessesService,
|
||||||
/* private gabineteService: GabineteDigitalPage, */
|
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private screenOrientation: ScreenOrientation,
|
private screenOrientation: ScreenOrientation,
|
||||||
public platform: Platform,
|
public platform: Platform,
|
||||||
@@ -105,7 +100,6 @@ export class EventsPage implements OnInit {
|
|||||||
private storage: Storage,
|
private storage: Storage,
|
||||||
public p: PermissionService,
|
public p: PermissionService,
|
||||||
) {
|
) {
|
||||||
/* this.existingScreenOrientation = this.screenOrientation.type; */
|
|
||||||
|
|
||||||
this.loggeduser = authService.ValidatedUser;
|
this.loggeduser = authService.ValidatedUser;
|
||||||
|
|
||||||
@@ -150,10 +144,6 @@ export class EventsPage implements OnInit {
|
|||||||
this.hideSearch();
|
this.hideSearch();
|
||||||
});
|
});
|
||||||
|
|
||||||
//this.getEventsFromLocalDb();
|
|
||||||
|
|
||||||
//this.checkScreenOrientation();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hideSearch() {
|
hideSearch() {
|
||||||
@@ -172,32 +162,6 @@ export class EventsPage implements OnInit {
|
|||||||
this.RefreshEvents();
|
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() {
|
async RefreshEvents() {
|
||||||
this.currentEvent = "";
|
this.currentEvent = "";
|
||||||
|
|||||||
@@ -443,7 +443,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
|
|
||||||
deleteMessage(msgId: string, msg: MessageService) {
|
deleteMessage(msgId: string, msg: MessageService) {
|
||||||
this.wsChatMethodsService.getDmRoom(this.roomId).sendDeleteRequest(msgId)
|
this.wsChatMethodsService.getDmRoom(this.roomId).sendDeleteRequest(msgId)
|
||||||
if (msg.file.type == "application/webtrix") {
|
if (msg?.file?.type == "application/webtrix") {
|
||||||
// this.openViewDocumentModal(msg.file);
|
// this.openViewDocumentModal(msg.file);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -669,7 +669,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
const roomId = this.roomId
|
const roomId = this.roomId
|
||||||
|
|
||||||
const image = await this.CameraService.takePicture();
|
const image = await this.CameraService.takePicture();
|
||||||
await this.fileService.saveImage(image)
|
await this.fileService.saveImage(image);
|
||||||
const lastphoto: any = await this.fileService.loadFiles();
|
const lastphoto: any = await this.fileService.loadFiles();
|
||||||
const { capturedImage, capturedImageTitle } = await this.fileService.loadFileData(lastphoto);
|
const { capturedImage, capturedImageTitle } = await this.fileService.loadFileData(lastphoto);
|
||||||
const base64 = await fetch(capturedImage);
|
const base64 = await fetch(capturedImage);
|
||||||
|
|||||||
Reference in New Issue
Block a user