mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
improve
This commit is contained in:
@@ -458,6 +458,7 @@
|
||||
<app-view-event *ngIf="mobileComponent.showEventDetails"
|
||||
[profile]="profile"
|
||||
[eventId]="selectedEventId"
|
||||
[CalendarId]="selectedEventCalendarId"
|
||||
(viewEventDetailDismiss)="viewEventDetailDismiss($event)"
|
||||
[eventAttendees]="contacts"
|
||||
></app-view-event>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { CalendarComponent } from 'ionic2-calendar';
|
||||
import { AlertController, ModalController, Platform } from '@ionic/angular';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { Event } from '../../models/event.model';
|
||||
import { Router, NavigationEnd } from '@angular/router';
|
||||
import { Router, NavigationEnd, NavigationExtras } from '@angular/router';
|
||||
import { momentG } from 'src/plugin/momentG';
|
||||
import { DomSanitizer } from "@angular/platform-browser";
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
@@ -106,6 +106,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
selectedEvent: Event;
|
||||
selectedEventId: string | number;
|
||||
selectedEventCalendarId : string | number;
|
||||
postEvent: any;
|
||||
|
||||
// temporary data
|
||||
@@ -311,6 +312,7 @@ export class AgendaPage implements OnInit {
|
||||
this.viewingEventObject = event;
|
||||
|
||||
this.selectedEventId = event.id;
|
||||
this.selectedEventCalendarId = event?.['event']?.CalendarId;
|
||||
|
||||
this.cloneAllmobileComponent();
|
||||
|
||||
@@ -1251,24 +1253,12 @@ export class AgendaPage implements OnInit {
|
||||
// open component
|
||||
async viewEventDetail(eventId: any) {
|
||||
|
||||
this.router.navigate(['/home/agenda', eventId, 'agenda']);
|
||||
/*
|
||||
const CalendarId = this.selectedEventCalendarId
|
||||
|
||||
const modal = await this.modalCtrl.create({
|
||||
component: ViewEventPage,
|
||||
componentProps:{
|
||||
eventId: eventId,
|
||||
adding: this.adding
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
if(res){
|
||||
// this.viewEventDetailDismiss(res);
|
||||
}
|
||||
}); */
|
||||
let navigationExtras: NavigationExtras = { queryParams: { CalendarId } }
|
||||
|
||||
this.router.navigate(['/home/agenda/',eventId,'agenda'], navigationExtras);
|
||||
|
||||
}
|
||||
|
||||
// open component
|
||||
|
||||
@@ -40,6 +40,7 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
profile: string;
|
||||
eventId: string;
|
||||
CalendarId: string;
|
||||
caller: string;
|
||||
customDate: any;
|
||||
today: any;
|
||||
@@ -53,6 +54,7 @@ export class ViewEventPage implements OnInit {
|
||||
task: ExpedientTaskModalPageNavParamsTask;
|
||||
LoadedDocument: any = null;
|
||||
sesseionStora = SessionStore
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
/* private navParams: NavParams, */
|
||||
@@ -71,12 +73,20 @@ export class ViewEventPage implements OnInit {
|
||||
private ionicStorage: Storage,
|
||||
private CalendarService: CalendarService
|
||||
) {
|
||||
|
||||
this.isEventEdited = false;
|
||||
this.loadedEvent = new Event();
|
||||
this.eventBody = { BodyType: "1", Text: "" };
|
||||
this.loadedEvent.Body = this.eventBody;
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
this.eventId = params['params'].eventId;
|
||||
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.CalendarId = urlParams.get('CalendarId');
|
||||
|
||||
this.eventId = this.eventId.replace(' ', '')
|
||||
|
||||
if (params["params"].caller) {
|
||||
this.caller = (params["params"].caller);
|
||||
}
|
||||
@@ -176,13 +186,10 @@ export class ViewEventPage implements OnInit {
|
||||
this.loadedEvent = res;
|
||||
this.addEventToDb(res);
|
||||
|
||||
/* this.today = new Date(res.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
|
||||
loader.remove()
|
||||
}, (error) => {
|
||||
|
||||
|
||||
|
||||
if (error.status === 0) {
|
||||
this.getFromDb();
|
||||
} else {
|
||||
@@ -195,22 +202,15 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
} else {
|
||||
|
||||
const event = this.CalendarService.eventSource.find((ele) => ele.id == this.eventId)
|
||||
|
||||
//
|
||||
|
||||
if(event?.CalendarId) {
|
||||
this.eventsService.genericGetEvent(this.eventId, event.CalendarId).subscribe(res => {
|
||||
if(this.CalendarId) {
|
||||
this.eventsService.genericGetEvent(this.eventId, this.CalendarId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
this.addEventToDb(res);
|
||||
|
||||
/* this.today = new Date(res.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
|
||||
loader.remove()
|
||||
}, (error) => {
|
||||
|
||||
|
||||
|
||||
if (error.status === 0) {
|
||||
this.getFromDb();
|
||||
} else {
|
||||
@@ -225,8 +225,6 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
deleteEvent() {
|
||||
|
||||
@@ -45,11 +45,6 @@
|
||||
|
||||
|
||||
<ion-content>
|
||||
<!-- <ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher> -->
|
||||
|
||||
<div (click)="handleClick()" class="messages overflow-y-auto" #scrollMe>
|
||||
<div class="welcome-text">
|
||||
@@ -78,29 +73,6 @@
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class='message-item incoming-{{msg.u.username!=sessionStore.user.UserName}} max-width-45' *ngIf="msg.msg ==''">
|
||||
<div *ngIf="msg.file.type == 'application/img'">
|
||||
<div class="message-item-options d-flex justify-content-end">
|
||||
</div>
|
||||
<div class="title">
|
||||
<ion-label>{{msg.u.name ?? ""}}</ion-label>
|
||||
<span class="time">{{msg.duration}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<ion-label>{{msg.msg}}</ion-label>
|
||||
<div *ngIf="msg.file" class="message-attachments">
|
||||
<div>
|
||||
<div (click)="openPreview(msg)">
|
||||
File
|
||||
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div *ngIf="msg.file && msg.delate == false">
|
||||
<div class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru' && msg.file.type != 'application/meeting'" (press)="handlePress(msg._id)">
|
||||
<div class="title">
|
||||
|
||||
@@ -159,14 +159,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.wsChatMethodsService.getUserOfRoom(this.roomId).then((value) => {
|
||||
|
||||
})
|
||||
//this.loadFiles();
|
||||
VoiceRecorder.requestAudioRecordingPermission();
|
||||
this.getChatMembers();
|
||||
/* Filesystem.mkdir({
|
||||
path: IMAGE_DIR,
|
||||
directory: Directory.Data,
|
||||
recursive: true
|
||||
}); */
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
@@ -185,9 +179,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
onEnd: ev => {
|
||||
Haptics.impact({ style: ImpactStyle.Light })
|
||||
this.stopRecording();
|
||||
/* setTimeout(() => {
|
||||
this.loadFiles();
|
||||
}, 500); */
|
||||
}
|
||||
}, true);
|
||||
longpress.enable();
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams, PickerController, PopoverController } from '@ionic/angular';
|
||||
import { GroupDurationPage } from 'src/app/shared/popover/group-duration/group-duration.page';
|
||||
import { GroupContactsPage } from '../group-messages/group-contacts/group-contacts.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service';
|
||||
@@ -35,8 +35,7 @@ export class NewGroupPage implements OnInit {
|
||||
private processesService: ProcessesService,
|
||||
public wsChatMethodsService: WsChatMethodsService,
|
||||
private authService: AuthService,
|
||||
)
|
||||
{
|
||||
) {
|
||||
this.loggedUserChat = authService.ValidatedUserChat['data'];
|
||||
this.isGroupCreated = false;
|
||||
this.groupName = this.navParams.get('name');
|
||||
@@ -71,9 +70,9 @@ export class NewGroupPage implements OnInit {
|
||||
let customFields = {}
|
||||
let res:any;
|
||||
|
||||
if(this.thedate){
|
||||
if(this.thedate) {
|
||||
let customFields = {
|
||||
"countDownDate":this.thedate
|
||||
"countDownDate": this.thedate
|
||||
}
|
||||
res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
|
||||
|
||||
@@ -85,13 +84,14 @@ export class NewGroupPage implements OnInit {
|
||||
|
||||
this.isGroupCreated = true;
|
||||
this.addContacts(res.result);
|
||||
|
||||
this.wsChatMethodsService.subscribeToRoomUpdate(res.result.rid, res.result);
|
||||
console.log(res.result.rid)
|
||||
|
||||
setTimeout(() => {
|
||||
this.wsChatMethodsService.subscribeToRoomUpdate(res.result.rid, res.result);
|
||||
}, 10)
|
||||
|
||||
}
|
||||
|
||||
async addContacts(room){
|
||||
async addContacts(room) {
|
||||
this.close();
|
||||
|
||||
let name = this.groupName.split(' ').join('-');
|
||||
@@ -130,7 +130,7 @@ export class NewGroupPage implements OnInit {
|
||||
{
|
||||
text: 'Ok',
|
||||
cssClass: 'btn-cancel',
|
||||
handler:(value:any)=>{
|
||||
handler:(value:any) => {
|
||||
|
||||
let now = new Date();
|
||||
this.thedate = new Date(now.getFullYear(), now.getMonth(), now.getDate() + value.days.value, now.getHours() + value.hours.value, now.getMinutes() + value.minutes.value, now.getSeconds(), now.getMilliseconds());
|
||||
@@ -142,9 +142,9 @@ export class NewGroupPage implements OnInit {
|
||||
]
|
||||
|
||||
if(value.days.value != null && value.hours.value != null && value.minutes.value != null){
|
||||
if(value.days.value > 0){
|
||||
if(value.days.value == 1){
|
||||
if(value.hours.value == 1){
|
||||
if(value.days.value > 0) {
|
||||
if(value.days.value == 1) {
|
||||
if(value.hours.value == 1) {
|
||||
this.displayDuration = value.days.value + " day " +
|
||||
value.hours.value + " hora " +
|
||||
value.minutes.value + " minutos";
|
||||
|
||||
@@ -101,16 +101,13 @@ export class EventListPage implements OnInit {
|
||||
this.sqliteservice.getListOfEventAprove('Agenda Oficial MDGPR', 'Agenda Pessoal MDGPR').then((event: any[] = []) => {
|
||||
|
||||
this.eventsMDGPRList = this.sortService.sortDate(this.transformaDataDB(event), 'taskStartDate')
|
||||
//this.eventsMDGPRList = this.eventsMDGPRList.filter(element => element.interveners != null)
|
||||
|
||||
|
||||
})
|
||||
|
||||
this.sqliteservice.getListOfEventAprove('Agenda Oficial PR', 'Agenda Pessoal PR').then((event: any[]) => {
|
||||
this.eventsPRList = this.sortService.sortDate(this.transformaDataDB(event), 'taskStartDate')
|
||||
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export class ExpedientePage implements OnInit {
|
||||
expedienteTaskPipe = new ExpedienteTaskPipe()
|
||||
onlinecheck: boolean;
|
||||
|
||||
listToPresent;
|
||||
listToPresent= []
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
private router: Router,
|
||||
|
||||
@@ -216,20 +216,6 @@
|
||||
<p class="text-center exp-card-content">{{pedidosstore.countdeferimento}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div *ngIf="p.userRole(['MDGPR'])" (click)="openExpedientesPrPage(); selectedElement='ExpedientesPr'" [class.active]="selectedElement == 'ExpedientesPr'" class="exp-card-long justify-center width-100 white-background">
|
||||
<div class="center-div">F
|
||||
<div class="exp-card-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="exp-card-text">
|
||||
<p class="exp-card-title " *ngIf="loggeduser.Profile == mdgpr">Expediente Presidente</p>
|
||||
<p class="exp-card-title " *ngIf="loggeduser.Profile == pr">Expediente</p>
|
||||
<p class="exp-card-content"><span class="number">{{expedienteprstore.count}} </span> <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDespachosPrPage(); selectedElement='showDespachosPr'" [class.active]="selectedElement == 'showDespachosPr'" class="box-hover exp-card-long width-100 d-flex flex-column justify-center">
|
||||
<div class="center-div">
|
||||
<div class="exp-card-icon">
|
||||
|
||||
@@ -3,16 +3,6 @@
|
||||
<div class="div-title">
|
||||
<ion-label class="title">Editar acção presidencial</ion-label>
|
||||
</div>
|
||||
<!-- <div class="actionType">
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
<ion-segment-button value="Viagem">
|
||||
<ion-label>Viagem</ion-label>
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="Evento">
|
||||
<ion-label>Evento</ion-label>
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
</ion-header>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<div class="div-title flex-grow-1">
|
||||
<ion-label class="title ">Acções Presidenciais</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="div-icon">
|
||||
<button *ngIf="p.userPermission([p.permissionList.Actions.create])" title="Adicionar nova ação presidencial" class="btn-no-color" (click)="AddPublicationFolder()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src='assets/images/icons-add.svg'></ion-icon>
|
||||
@@ -34,6 +35,9 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
<!-- Content -->
|
||||
|
||||
@@ -230,7 +230,7 @@ export class PublicationsPage implements OnInit {
|
||||
this.showLoader = false;
|
||||
});
|
||||
});
|
||||
this.storage.get('actionsViagens').then((viagens) => {
|
||||
this.storage.get('actionsViagens').then((viagens = []) => {
|
||||
|
||||
viagens.forEach(data => {
|
||||
let folder: PublicationFolder = {
|
||||
|
||||
Reference in New Issue
Block a user