mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'develop' of https://bitbucket.org/equilibriumito/gabinete-digital-fo into develop
This commit is contained in:
Generated
+668
-32252
File diff suppressed because it is too large
Load Diff
@@ -253,9 +253,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
//this.getFromDB();
|
||||
|
||||
setTimeout(() =>{
|
||||
setTimeout(() => {
|
||||
const pathname = window.location.pathname
|
||||
let realoadCounter = 0
|
||||
this.router.events.forEach((event) => {
|
||||
@@ -350,7 +348,7 @@ export class AgendaPage implements OnInit {
|
||||
// calendar change date
|
||||
this.eventSelectedDate = new Date(ev);
|
||||
|
||||
this.updateEventListBox()
|
||||
this.updateEventListBox();
|
||||
|
||||
};
|
||||
|
||||
@@ -1480,7 +1478,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
|
||||
// THIS LINE
|
||||
this.updateEventListBox()
|
||||
this.updateEventListBox();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -40,12 +40,13 @@
|
||||
<div class="content-location">
|
||||
<span class="date">{{loadedEvent.Location}}</span>
|
||||
<div *ngIf="loadedEvent.Organizer">
|
||||
<div *ngIf="eventsService.isMyEvent(loadedEvent) == false">
|
||||
|
||||
<div *ngIf="eventsService.isMyEvent(loadedEvent) == false || sesseionStora.user.Profile =='PR'">
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #99e47b;">{{loadedEvent.CalendarName}}</span>
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #958bfc;">{{loadedEvent.CalendarName}}</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="eventsService.isMyEvent(loadedEvent) == true">
|
||||
<div *ngIf="eventsService.isMyEvent(loadedEvent) == true && sesseionStora.user.Profile !='PR'">
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #ffb703;">{{loadedEvent.CalendarName}}</span>
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #f05d5e;">{{loadedEvent.CalendarName}}</span>
|
||||
</div>
|
||||
|
||||
@@ -71,8 +71,9 @@ export class ViewEventPage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
private RouteService: RouteService,
|
||||
private ionicStorage: Storage,
|
||||
private CalendarService: CalendarService
|
||||
private CalendarService: CalendarService,
|
||||
) {
|
||||
|
||||
|
||||
this.isEventEdited = false;
|
||||
this.loadedEvent = new Event();
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<ion-label >
|
||||
<span >
|
||||
<div >
|
||||
<div >
|
||||
<div [class.bold-message]="room.messageUnread == true">
|
||||
{{room.name}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -94,7 +94,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</ion-item-sliding>
|
||||
<ion-item-sliding *ngIf="wsChatMethodsService.loadingWholeList == true">
|
||||
<ion-item-sliding *ngIf="wsChatMethodsService.loadingWholeList == true && wsChatMethodsService._dm.length == 0">
|
||||
<div *ngFor="let n of numSequence(8); let i = index;" class="item item-hover width-100 d-flex ion-no-padding ion-no-margin">
|
||||
<div class="item-icon"><ion-icon class="icon" slot="start" src="assets/icon/icons-chat-grey.svg"></ion-icon></div>
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
@@ -125,7 +125,7 @@
|
||||
<div (click)="openGroupMessagesPage(group.id)" class="item-content flex-grow-1 cursor-pointer">
|
||||
<div class="item-title-time">
|
||||
<div class="item-title" [class.item-title-active]="group.id ==idSelected">
|
||||
<ion-label>{{group.name.split('-').join(' ')}}</ion-label>
|
||||
<ion-label [class.bold-message]="group.messageUnread == true">{{group.name.split('-').join(' ')}}</ion-label>
|
||||
</div>
|
||||
<div class="item-date" [class.item-date-active]="group.id ==idSelected" *ngIf="group.lastMessage && !group.customFields.countDownDate">{{group.duration}}</div>
|
||||
<div class="item-date" [class.item-date-active]="group.id ==idSelected" *ngIf="group.customFields.countDownDate">{{group.countDownTime}}</div>
|
||||
@@ -150,7 +150,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</ion-item-sliding>
|
||||
<ion-item-sliding *ngIf="wsChatMethodsService.loadingWholeList == true">
|
||||
<ion-item-sliding *ngIf="wsChatMethodsService.loadingWholeList == true && wsChatMethodsService._group.length == 0">
|
||||
<div *ngFor="let n of numSequence(8); let i = index;" class="item item-hover width-100 d-flex ion-no-padding ion-no-margin">
|
||||
<div class="item-icon"><ion-icon class="icon" slot="start" src="assets/icon/icons-group-chat-grey.svg"></ion-icon></div>
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
|
||||
@@ -178,3 +178,8 @@ ion-content{
|
||||
color: #fff !important;
|
||||
background-color: #42b9fe !important;
|
||||
}
|
||||
|
||||
|
||||
.bold-message {
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -644,7 +644,15 @@ export class ChatPage implements OnInit {
|
||||
cssClass: 'modal modal-desktop',
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
modal.onDidDismiss().then((Data) => {
|
||||
// console.log(Data,'daatatatat');
|
||||
|
||||
// let data = Data.data
|
||||
// let roomId = data.roomId
|
||||
// this.openMessagesPage(roomId);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
async newGroup() {
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -88,28 +88,29 @@ export class ContactsPage implements OnInit {
|
||||
doRefresh(event){
|
||||
}
|
||||
|
||||
close(){
|
||||
this.modalController.dismiss();
|
||||
close() {
|
||||
this.modalController.dismiss({
|
||||
roomId: this.room._id
|
||||
});
|
||||
}
|
||||
|
||||
clicked(){
|
||||
|
||||
}
|
||||
clicked() {}
|
||||
|
||||
createRoom(username:string){
|
||||
let body = {
|
||||
username: username,
|
||||
}
|
||||
this.chatService.createRoom(body).subscribe(res => {
|
||||
this.chatService.createRoom(body).subscribe(async(res) => {
|
||||
|
||||
this.room = res['room'];
|
||||
|
||||
|
||||
await this.WsChatMethodsService.getAllRooms();
|
||||
this.getDirectMessage(this.room._id);
|
||||
this.WsChatMethodsService.getAllRooms()
|
||||
});
|
||||
}
|
||||
getDirectMessage(roomId:any){
|
||||
|
||||
getDirectMessage(roomId:any) {
|
||||
|
||||
|
||||
this.chatService.getAllDirectMessages().subscribe(res=>{
|
||||
@@ -121,6 +122,7 @@ export class ContactsPage implements OnInit {
|
||||
this.openModal(this.dm._id);
|
||||
});
|
||||
}
|
||||
|
||||
async openModal(roomId:any){
|
||||
this.close();
|
||||
|
||||
|
||||
@@ -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 = "";
|
||||
|
||||
@@ -43,7 +43,7 @@ export class DespachoPrPage implements OnInit {
|
||||
serialNumber: string;
|
||||
caller: string;
|
||||
profile: string;
|
||||
intervenientes: any;
|
||||
intervenientes: any =[]
|
||||
cc: any = [];
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -45,7 +45,7 @@ export class DespachoPage implements OnInit {
|
||||
serialnumber: string;
|
||||
caller: string;
|
||||
profile: string;
|
||||
intervenientes: any;
|
||||
intervenientes: any = []
|
||||
cc: any = [];
|
||||
|
||||
constructor(private activateRoute: ActivatedRoute,
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
profile: string;
|
||||
task: any
|
||||
fulltask: any
|
||||
intervenientes: any;
|
||||
intervenientes: any = []
|
||||
cc: any = [];
|
||||
attachments:any;
|
||||
customDate: any;
|
||||
|
||||
@@ -28,7 +28,7 @@ export class DiplomasGerarPage implements OnInit {
|
||||
profile: string;
|
||||
task: any
|
||||
fulltask: any
|
||||
intervenientes: any;
|
||||
intervenientes: any = []
|
||||
cc: any = [];
|
||||
attachments:any;
|
||||
customDate: any;
|
||||
|
||||
@@ -32,7 +32,7 @@ export class DiplomaPage implements OnInit {
|
||||
profile: string;
|
||||
task: any
|
||||
fulltask: any
|
||||
intervenientes: any;
|
||||
intervenientes: any = []
|
||||
cc: any = [];
|
||||
attachments: any;
|
||||
customDate: any
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
<ion-toolbar>
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
<ion-segment-button value="validar" *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">
|
||||
Por validar ...
|
||||
Por validar
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="assinados">
|
||||
Assinados PR ...
|
||||
Assinados PR
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
serialNumber: string;
|
||||
caller: string;
|
||||
profile: string;
|
||||
intervenientes: any;
|
||||
intervenientes: any = []
|
||||
cc: any = [];
|
||||
documents: SearchList[] = [];
|
||||
attachments: any;
|
||||
|
||||
@@ -39,7 +39,7 @@ export class ExpedientePrPage implements OnInit {
|
||||
serialnumber: string;
|
||||
caller:string;
|
||||
profile: string;
|
||||
intervenientes: any;
|
||||
intervenientes: any = [];
|
||||
cc: any = [];
|
||||
|
||||
loggeduser: LoginUserRespose;
|
||||
|
||||
@@ -46,7 +46,7 @@ export class PedidoPage implements OnInit {
|
||||
eventsList: Event[];
|
||||
serialnumber: string;
|
||||
caller: string;
|
||||
intervenientes: any;
|
||||
intervenientes: any = []
|
||||
cc: any = [];
|
||||
loggeduser: LoginUserRespose;
|
||||
|
||||
|
||||
@@ -53,6 +53,8 @@ export class RoomService {
|
||||
u
|
||||
sessionStore = SessionStore
|
||||
countDownTime = ''
|
||||
chatOpen = false
|
||||
messageUnread = false
|
||||
|
||||
scrollDown = () => { }
|
||||
|
||||
@@ -256,7 +258,12 @@ export class RoomService {
|
||||
}
|
||||
|
||||
message.addMessageDB()
|
||||
|
||||
|
||||
|
||||
if(this.chatOpen == false) {
|
||||
this.messageUnread = true
|
||||
}
|
||||
|
||||
setTimeout(()=>{
|
||||
this.scrollDown()
|
||||
}, 50)
|
||||
@@ -594,10 +601,13 @@ export class RoomService {
|
||||
|
||||
roomLeave() {
|
||||
this.setTypingOff()
|
||||
this.chatOpen = false
|
||||
}
|
||||
|
||||
open() {
|
||||
// this.typing(this.message)
|
||||
this.chatOpen = true
|
||||
this.messageUnread = false
|
||||
}
|
||||
|
||||
|
||||
@@ -872,6 +882,7 @@ export class RoomService {
|
||||
sendReadMessage() {
|
||||
this.WsChatService.readMessage(this.id)
|
||||
this.sendFalseTypingReadMessage('viewMessage', {})
|
||||
this.messageUnread = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -215,12 +215,12 @@ export class WsChatMethodsService {
|
||||
await this.storage.set('Rooms', rooms);
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
setTimeout(() => {
|
||||
this.sortRoomList()
|
||||
}, 1000)
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
setTimeout(() => {
|
||||
this.sortRoomList()
|
||||
}, 10000)
|
||||
|
||||
|
||||
@@ -36,12 +36,13 @@
|
||||
<span class="date">{{loadedEvent.Location}}</span>
|
||||
|
||||
<div *ngIf="loadedEvent.Organizer">
|
||||
<div *ngIf="eventsService.isMyEvent(loadedEvent) == false">
|
||||
|
||||
<div *ngIf="eventsService.isMyEvent(loadedEvent) == false || sesseionStora.user.Profile =='PR'">
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #99e47b;">{{loadedEvent.CalendarName}}</span>
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #958bfc;">{{loadedEvent.CalendarName}}</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="eventsService.isMyEvent(loadedEvent) == true">
|
||||
<div *ngIf="eventsService.isMyEvent(loadedEvent) == true && sesseionStora.user.Profile !='PR'">
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #ffb703;">{{loadedEvent.CalendarName}}</span>
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #f05d5e;">{{loadedEvent.CalendarName}}</span>
|
||||
</div>
|
||||
|
||||
@@ -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