mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
merge
This commit is contained in:
@@ -16,9 +16,6 @@ registerLocaleData(localeDe);
|
||||
|
||||
import { CalendarModule, DateAdapter } from 'angular-calendar';
|
||||
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
|
||||
import { EventsToApprovePage } from 'src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page';
|
||||
|
||||
|
||||
|
||||
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
|
||||
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
<ion-icon class="right-icons d-md-none" src="assets/images/icons-profile-calendar-pr.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
<button title="Visualizar a lista de Eventos para aprovação" class="btn-no-color cursor-pointer resize" (click)="viewEventsToApprove()" *ngIf="loggeduser.Profile != 'PR'">
|
||||
<button title="Visualizar a lista de Eventos para aprovação" class="btn-no-color cursor-pointer resize" (click)="viewEventsToApprove()" *ngIf="p.userPermission([p.permissionList.Gabinete.aprove_event])">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && !mobileComponent.showEventList" class="right-icons" src="assets/images/theme/gov/icons-received-event.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && mobileComponent.showEventList" class="right-icons" src="assets/images/theme/gov/icons-received-event-selected.svg"></ion-icon>
|
||||
@@ -154,7 +154,7 @@
|
||||
|
||||
<calendar
|
||||
class="calendar-component"
|
||||
[eventSource]="listToPresent"
|
||||
[eventSource]="CalendarStore.eventSource"
|
||||
[calendarMode]="calendar.mode"
|
||||
[currentDate]="calendar.currentDate"
|
||||
(onEventSelected)="onEventSelected($event)"
|
||||
@@ -229,11 +229,11 @@
|
||||
|
||||
<div class="calendar-title-container px-20 d-none d-md-flex" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<div class="calendar-title-description flex-grow-1 text-grey d-flex justify-center align-center">
|
||||
<div *ngIf="loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR'">Calendário do MDGPR</div>
|
||||
<div *ngIf="loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR'">Meu Calendário</div>
|
||||
</div>
|
||||
<div class="calendar-title-description text-black align-center">
|
||||
<div class="flex-grow-1 text-grey d-flex justify-center align-center">
|
||||
<div *ngIf="loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR'">Calendário do Presidente da República</div>
|
||||
<div *ngIf="loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR'">Calendário Partilhado</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -293,7 +293,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fs-timeline flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.OwnerCalendars.length">
|
||||
<div class="fs-timeline flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.OwnerCalendars.length && loggeduser.Profile != 'PR' ">
|
||||
<div *ngFor="let events of TimelineMDList | keyvalue;" >
|
||||
|
||||
<div class="EventListBox-container" >
|
||||
@@ -334,7 +334,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sd-timeline flex-grow-1 d-none d-md-block timeline-md text-black pl-20 pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.SharedCalendars.length != 0" >
|
||||
<div class="sd-timeline flex-grow-1 d-none d-md-block timeline-md text-black pl-20 pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.SharedCalendars.length != 0 || loggeduser.Profile == 'PR' " >
|
||||
<div *ngFor="let events of TimelinePRList | keyvalue;">
|
||||
|
||||
<div class="EventListBox-container" >
|
||||
|
||||
@@ -9,6 +9,7 @@ import { DomSanitizer } from "@angular/platform-browser";
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
// showTimeline
|
||||
import { setHours, setMinutes } from 'date-fns';
|
||||
@@ -33,6 +34,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -166,6 +168,7 @@ export class AgendaPage implements OnInit {
|
||||
array = []
|
||||
|
||||
sessionStore = SessionStore;
|
||||
environment
|
||||
|
||||
constructor(
|
||||
private alertCtrl: AlertController,
|
||||
@@ -183,7 +186,8 @@ export class AgendaPage implements OnInit {
|
||||
private platform: Platform,
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService,
|
||||
private storage:Storage
|
||||
private storage:Storage,
|
||||
public p: PermissionService
|
||||
) {
|
||||
|
||||
this.dateAdapter.setLocale('es');
|
||||
@@ -204,6 +208,8 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.CalendarStore.ResetList([])
|
||||
|
||||
this.listToPresent = []
|
||||
|
||||
})
|
||||
|
||||
if (this.loggeduser.Profile == 'MDGPR') {
|
||||
@@ -251,9 +257,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
//this.getFromDB();
|
||||
|
||||
setTimeout(() =>{
|
||||
setTimeout(() => {
|
||||
const pathname = window.location.pathname
|
||||
let realoadCounter = 0
|
||||
this.router.events.forEach((event) => {
|
||||
@@ -348,7 +352,7 @@ export class AgendaPage implements OnInit {
|
||||
// calendar change date
|
||||
this.eventSelectedDate = new Date(ev);
|
||||
|
||||
this.updateEventListBox()
|
||||
this.updateEventListBox();
|
||||
|
||||
};
|
||||
|
||||
@@ -1478,7 +1482,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
|
||||
// THIS LINE
|
||||
this.updateEventListBox()
|
||||
this.updateEventListBox();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -117,9 +117,9 @@
|
||||
|
||||
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs materia-top" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field class="date-hour-picker">
|
||||
<mat-form-field appearance="none" class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date"
|
||||
placeholder="Data Inicio*"
|
||||
[(ngModel)]="postEvent.StartDate"
|
||||
[disabled]="disabled"
|
||||
[min]="currentDate"
|
||||
@@ -149,9 +149,9 @@
|
||||
-->
|
||||
<div (click)="openFim()" class="ion-input-class flex-grow-1 justify-center align-center materia-top" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field class="date-hour-picker">
|
||||
<mat-form-field appearance="none" class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
placeholder="Choose a date"
|
||||
placeholder="Data de fim*"
|
||||
[(ngModel)]="postEvent.EndDate"
|
||||
[disabled]="disabled"
|
||||
[min]="currentDate"
|
||||
|
||||
@@ -104,21 +104,6 @@ export class NewEventPage implements OnInit {
|
||||
this.selectedDate = this.navParams.get('eventSelectedDate');
|
||||
this.taskParticipants = this.navParams.get('attendees');
|
||||
|
||||
let now = new Date();
|
||||
|
||||
if(now.getMinutes() <= 30){
|
||||
this.autoStartTime = new Date(now.setMinutes(30));
|
||||
this.postEvent.StartDate = this.autoStartTime;
|
||||
this.autoEndTime = new Date(this.autoStartTime.getTime() + 30 * 60000);
|
||||
this.postEvent.EndDate = this.autoEndTime;
|
||||
}
|
||||
else{
|
||||
this.autoStartTime = new Date(now.setHours(now.getHours()+1));
|
||||
this.autoStartTime = new Date(this.autoStartTime.setMinutes(0));
|
||||
this.postEvent.StartDate = this.autoStartTime;
|
||||
this.autoEndTime = new Date(this.autoStartTime.getTime() + 30 * 60000);
|
||||
this.postEvent.EndDate = this.autoEndTime;
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -7,16 +7,8 @@ import { IonicModule } from '@ionic/angular';
|
||||
import { ChatPageRoutingModule } from './chat-routing.module';
|
||||
|
||||
import { ChatPage } from './chat.page';
|
||||
import { SharedModule } from 'src/app/shared/shared.module';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { GroupMessagesPage } from 'src/app/shared/chat/group-messages/group-messages.page';
|
||||
import { MessagesPage } from 'src/app/shared/chat/messages/messages.page';
|
||||
import { EmptyChatPage } from 'src/app/shared/chat/empty-chat/empty-chat.page';
|
||||
import { ContactsPage } from 'src/app/shared/chat/messages/contacts/contacts.page';
|
||||
import { NewGroupPage } from 'src/app/shared/chat/new-group/new-group.page';
|
||||
import { GroupContactsPage } from 'src/app/shared/chat/group-messages/group-contacts/group-contacts.page';
|
||||
import { PipesModule } from 'src/app/pipes/pipes.module';
|
||||
import { EditGroupPage } from 'src/app/shared/chat/edit-group/edit-group.page';
|
||||
|
||||
import { ContactsPageModule } from 'src/app/shared/chat/messages/contacts/contacts.module';
|
||||
import { GroupMessagesPageModule } from 'src/app/shared/chat/group-messages/group-messages.module';
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<ion-toolbar>
|
||||
|
||||
<ion-toolbar [class.block-button]="showNewEvent || showNewGroup || showContacts">
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="onSegmentChange()">
|
||||
<ion-segment-button value="Contactos">
|
||||
Conversas
|
||||
@@ -37,6 +38,7 @@
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
|
||||
<div class=" aside overflow-y-auto d-flex flex-wrap flex-grow-1">
|
||||
<div class="width-100" [ngSwitch]="segment">
|
||||
<ion-list *ngSwitchCase="'Contactos'">
|
||||
@@ -57,7 +59,7 @@
|
||||
<ion-label >
|
||||
<span >
|
||||
<div >
|
||||
<div >
|
||||
<div [class.bold-message]="room.messageUnread == true">
|
||||
{{room.name}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -94,7 +96,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 +127,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>
|
||||
@@ -133,12 +135,13 @@
|
||||
<div *ngIf="group.lastMessage" class="item-description d-flex align-items-center" [class.item-description-active]="group.id ==idSelected">
|
||||
<div class="item-message" *ngIf="group.otherUserType == false">{{group.lastMessage.u.name}}: {{group.lastMessage.msg}} </div>
|
||||
<div *ngIf="group.otherUserType == true">{{group.userThatIsTyping}} está escrever ...</div>
|
||||
|
||||
<div class="item-files add-ellipsis" *ngIf="group.lastMessage.file">
|
||||
<fa-icon *ngIf="group.lastMessage.file.type != 'application/meeting' && group.lastMessage.file.type != 'application/audio'" icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="group.id == idSelected"></fa-icon>
|
||||
<fa-icon *ngIf="group.lastMessage.file.type == 'application/audio'" icon="file-audio" class="file-icon" [class.set-active-item-font-to-white]="group.id == idSelected"></fa-icon>
|
||||
<span *ngIf="group.lastMessage.file.type == 'application/audio'" class="item-files-title"> audio </span>
|
||||
<fa-icon *ngIf="group.lastMessage.file.type == 'application/meeting'" icon="calendar-alt" class="file-icon" [class.set-active-item-font-to-white]="group.id == idSelected"></fa-icon>
|
||||
<span *ngIf="group.lastMessage.file.type != 'application/audio'" class="item-files-title"> {{ group.lastMessage.attachments[0].title }}</span>
|
||||
<span *ngIf="group.lastMessage.file.type != 'application/audio' && group.lastMessage.attachments" class="item-files-title"> {{ group.lastMessage.attachments[0].title }}</span>
|
||||
</div>
|
||||
<div class="item-files" *ngIf="group.attachments">
|
||||
<div *ngIf="group.value.lastMessage.attachments[0].image_url">
|
||||
@@ -150,7 +153,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">
|
||||
@@ -196,6 +199,7 @@
|
||||
|
||||
<app-contacts
|
||||
(openMessage)="openMessagesPage($event)"
|
||||
(emptyTextDescriptionOpen)="emptyTextDescriptionOpen()"
|
||||
*ngIf="showContacts"
|
||||
[style.display]="showContacts ? 'flex' : 'none'"
|
||||
class=" height-100 flex-column">
|
||||
@@ -203,6 +207,7 @@
|
||||
|
||||
<app-new-group
|
||||
(addGroupMessage)="openGroupContactsPage($event)"
|
||||
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
||||
[style.display]="showNewGroup ? 'flex' : 'none'"
|
||||
class=" height-100 flex-column">
|
||||
</app-new-group>
|
||||
@@ -238,6 +243,7 @@
|
||||
</app-group-messages>
|
||||
|
||||
<app-new-event
|
||||
*ngIf="showNewEvent"
|
||||
[profile]=""
|
||||
[roomId]="groupRoomId"
|
||||
[selectedSegment]=segment
|
||||
@@ -245,13 +251,11 @@
|
||||
[taskParticipantsCc]="taskParticipantsCc"
|
||||
[selectedDate]="eventSelectedDate"
|
||||
[eventAttendees]="contacts"
|
||||
(onAddEvent)="closeNewEventComponent()"
|
||||
(openAttendeesComponent)="openAttendeesComponent($event)"
|
||||
(cloneAllmobileComponent)="closeNewEventComponent()"
|
||||
(onAddEvent)="closeNewEventComponentAndOpenChat($event)"
|
||||
(openAttendeesComponent)="closeNewEventComponentAndOpenChat($event)"
|
||||
[style.display]="showNewEvent ? 'flex' : 'none'"
|
||||
class=" height-100 flex-column">
|
||||
</app-new-event>
|
||||
|
||||
<app-attendee-modal
|
||||
[adding]="adding"
|
||||
[taskParticipants]="taskParticipants"
|
||||
|
||||
@@ -178,3 +178,13 @@ ion-content{
|
||||
color: #fff !important;
|
||||
background-color: #42b9fe !important;
|
||||
}
|
||||
|
||||
|
||||
.bold-message {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.block-button {
|
||||
pointer-events: none;
|
||||
opacity: 0.2;
|
||||
}
|
||||
@@ -125,6 +125,8 @@ export class ChatPage implements OnInit {
|
||||
|
||||
this.showLoader = true;
|
||||
|
||||
this.segment = 'Contactos'
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -227,6 +229,9 @@ export class ChatPage implements OnInit {
|
||||
}
|
||||
}
|
||||
openMessagesPage(rid) {
|
||||
|
||||
this.roomId = rid;
|
||||
|
||||
if (window.innerWidth < 701) {
|
||||
this.openMessagesModal(rid);
|
||||
}
|
||||
@@ -234,7 +239,6 @@ export class ChatPage implements OnInit {
|
||||
this.idSelected = rid;
|
||||
this.closeAllDesktopComponents();
|
||||
this.showEmptyComponent = false;
|
||||
this.roomId = rid;
|
||||
this.showMessages = true;
|
||||
}
|
||||
}
|
||||
@@ -273,6 +277,8 @@ export class ChatPage implements OnInit {
|
||||
}
|
||||
|
||||
openGroupMessagesPage(rid) {
|
||||
|
||||
this.roomId = rid;
|
||||
if (window.innerWidth < 701) {
|
||||
this.openGroupMessagesModal(rid);
|
||||
}
|
||||
@@ -280,7 +286,7 @@ export class ChatPage implements OnInit {
|
||||
this.idSelected = rid;
|
||||
this.closeAllDesktopComponents();
|
||||
this.showEmptyComponent = false;
|
||||
this.roomId = rid;
|
||||
|
||||
|
||||
this.showGroupMessages = true;
|
||||
}
|
||||
@@ -320,7 +326,6 @@ export class ChatPage implements OnInit {
|
||||
|
||||
async setIntervenient(data) {
|
||||
this.taskParticipants = removeDuplicate(data)
|
||||
|
||||
}
|
||||
|
||||
async setIntervenientCC(data) {
|
||||
@@ -338,13 +343,33 @@ export class ChatPage implements OnInit {
|
||||
this.idSelected = "";
|
||||
}
|
||||
|
||||
async closeNewEventComponentAndOpenChat({roomId}) {
|
||||
this.closeAllDesktopComponents();
|
||||
|
||||
console.log(roomId)
|
||||
|
||||
this.wsChatMethodsService._group.forEach((room)=>{
|
||||
if(room.id == roomId) {
|
||||
|
||||
|
||||
this.openGroupMessagesPage(roomId)
|
||||
}
|
||||
})
|
||||
|
||||
this.wsChatMethodsService._dm.forEach((room)=>{
|
||||
if(room.id == roomId) {
|
||||
this.openMessagesPage(roomId)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
onSegmentChange() {
|
||||
//this.load();
|
||||
this.wsChatMethodsService.getAllRooms();
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
setTimeout(() => {
|
||||
//this.load();
|
||||
event.target.complete();
|
||||
}, 1000);
|
||||
}
|
||||
@@ -357,7 +382,6 @@ export class ChatPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
getDirectMessagesDB() {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
this.storageservice.get("rooms").then((rooms) =>{
|
||||
@@ -560,6 +584,11 @@ export class ChatPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
roomDataFileType(roomData) {
|
||||
return roomData?.lastMessage?.file?.type || null
|
||||
}
|
||||
|
||||
async transformGroups(data) {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
let groupsArray = [];
|
||||
@@ -600,6 +629,12 @@ export class ChatPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
async emptyTextDescriptionOpen() {
|
||||
this.closeAllDesktopComponents()
|
||||
this.showEmptyComponent = true
|
||||
}
|
||||
|
||||
async getGroups(event?) {
|
||||
this.result = this.chatService.getAllPrivateGroups().subscribe(async (res: any) => {
|
||||
//
|
||||
@@ -644,7 +679,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() {
|
||||
@@ -689,8 +732,6 @@ export class ChatPage implements OnInit {
|
||||
|
||||
async openGroupMessagesModal(roomId: any) {
|
||||
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: GroupMessagesPage,
|
||||
cssClass: 'modal modal-desktop isGroupChatOpened',
|
||||
|
||||
@@ -13,8 +13,6 @@ import { ChatPopoverPageModule } from 'src/app/shared/popover/chat-popover/chat-
|
||||
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
|
||||
|
||||
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||
import { ImageCropperModule } from 'ngx-image-cropper';
|
||||
import { AngularCropperjsModule } from 'angular-cropperjs';
|
||||
import { LettersAvatarModule } from "ngx-letters-avatar";
|
||||
import { PipesModule } from 'src/app/pipes/pipes.module';
|
||||
|
||||
|
||||
@@ -90,8 +90,12 @@
|
||||
<ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button">
|
||||
<ion-icon name="image" class="file-icon"></ion-icon>
|
||||
<ion-label>{{"Imagem"}}</ion-label>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon-download" src="assets/icon/theme/default/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && msg.downloadLoader == false && msg.downloadAttachmentsTemp == 0 " class="icon-download" src="assets/icon/theme/default/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && msg.downloadLoader == false && msg.downloadAttachmentsTemp == 0" class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon>
|
||||
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && msg.downloadLoader == true " class="icon-download" src="assets/gif/theme/default/Blocks-loader.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && msg.downloadLoader == true" class="icon-download" src="assets/gif/theme/gov/Blocks-loader.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="msg.downloadAttachments == false && msg.downloadAttachmentsTemp >= 1 && msg.downloadLoader == false" src="assets/images/retry-svgrepo-com.svg" class="icon-download font-12"> </ion-icon>
|
||||
</ion-item>
|
||||
</div>
|
||||
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image" >
|
||||
@@ -108,10 +112,11 @@
|
||||
<div (click)="openPreview(msg)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
|
||||
<div *ngIf="!msg.attachments[0].image_url">
|
||||
<ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button">
|
||||
<ion-icon name="document" class="file-icon"></ion-icon>
|
||||
<ion-icon *ngIf="msg.attachments[0].type != 'webtrix'" name="document" class="file-icon"></ion-icon>
|
||||
<ion-icon *ngIf="msg.attachments[0].type == 'webtrix'" src="assets/icon/webtrix.svg" class="file-icon"></ion-icon>
|
||||
<ion-label>{{file.title}}</ion-label>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon-download" src="assets/icon/theme/default/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && msg.attachments[0].type != 'webtrix' " class="icon-download" src="assets/icon/theme/default/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && msg.attachments[0].type != 'webtrix' " class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div *ngIf="msg.attachments[0].image_url">
|
||||
@@ -130,8 +135,12 @@
|
||||
<ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button">
|
||||
<ion-icon name="mic-outline" class="file-icon"></ion-icon>
|
||||
<ion-label>{{"Mensagem de voz"}}</ion-label>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon-download" src="assets/icon/theme/default/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && msg.downloadLoader == false && msg.downloadAttachmentsTemp == 0 " class="icon-download" src="assets/icon/theme/default/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && msg.downloadLoader == false && msg.downloadAttachmentsTemp == 0" class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon>
|
||||
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && msg.downloadLoader == true " class="icon-download" src="assets/gif/theme/default/Blocks-loader.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && msg.downloadLoader == true" class="icon-download" src="assets/gif/theme/gov/Blocks-loader.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="msg.downloadAttachments == false && msg.downloadAttachmentsTemp >= 1 && msg.downloadLoader == false" src="assets/images/retry-svgrepo-com.svg" class="icon-download font-12"> </ion-icon>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="audio-contentainer" *ngIf="msg.file.type == 'application/audio' && file.title_link">
|
||||
@@ -159,7 +168,7 @@
|
||||
</div>
|
||||
<div *ngIf="msg.file.type == 'application/meeting'" class="info-meeting">
|
||||
<ion-label class="info-meeting-small">{{msg.u.name ?? ""}} criou esta reunião</ion-label><br />
|
||||
<button (click)="goToEvent(msg.file.id)" class="btn-no-color info-meeting-normal"><ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label></button><br />
|
||||
<button (click)="goToEvent(msg.file)" class="btn-no-color info-meeting-normal"><ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label></button><br />
|
||||
<ion-label class="info-meeting-medium"><ion-icon name="calendar-outline"></ion-icon> De {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}</ion-label><br />
|
||||
<ion-label class="info-meeting-medium"><ion-icon></ion-icon><ion-icon name="location-outline"></ion-icon> {{msg.file.venue}}</ion-label><br />
|
||||
</div>
|
||||
@@ -196,15 +205,6 @@
|
||||
</div>
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div>
|
||||
<!-- <div *ngIf="msg.file">
|
||||
<div *ngIf="msg.file.type == 'application/meeting'" class="info-meeting">
|
||||
<ion-label class="info-meeting-small">{{msg.u.name ?? ""}} criou esta reunião</ion-label><br />
|
||||
<button (click)="goToEvent(msg.file.id)" class="btn-no-color info-meeting-normal"><ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label></button><br />
|
||||
<ion-label class="info-meeting-medium"><ion-icon name="calendar-outline"></ion-icon> De {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}</ion-label><br />
|
||||
<ion-label class="info-meeting-medium"><ion-icon></ion-icon><ion-icon name="location-outline"></ion-icon> {{msg.file.venue}}</ion-label><br />
|
||||
</div>
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<ion-fab horizontal="end" vertical="bottom" slot="fixed">
|
||||
|
||||
@@ -150,7 +150,6 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
})
|
||||
|
||||
//this.loadFiles();
|
||||
}
|
||||
|
||||
setStatus(status: string) {
|
||||
@@ -171,7 +170,10 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
ngAfterViewInit() {
|
||||
this.scrollChangeCallback = () => this.onContentScrolled(event);
|
||||
window.addEventListener('scroll', this.scrollChangeCallback, true);
|
||||
this.roomCountDownDate = this.timeService.countDownDate(this.room.customFields.countDownDate, this.room._id);
|
||||
|
||||
if(this.room?.customFields?.countDownDate) {
|
||||
this.roomCountDownDate = this.timeService.countDownDate(this.room.customFields.countDownDate, this.room._id);
|
||||
}
|
||||
}
|
||||
|
||||
handlePress(id?: string) {
|
||||
@@ -326,7 +328,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.loadFiles();
|
||||
}
|
||||
|
||||
async goToEvent(eventId: any) {
|
||||
async goToEvent(event: any) {
|
||||
let classs;
|
||||
if (window.innerWidth < 701) {
|
||||
classs = 'modal modal-desktop'
|
||||
@@ -337,7 +339,8 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewEventPage,
|
||||
componentProps: {
|
||||
eventId: eventId,
|
||||
eventId: event.id,
|
||||
CalendarId: event.calendarId
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
@@ -1055,7 +1058,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
return blob;
|
||||
}
|
||||
|
||||
openFile(pdfString, filename) {
|
||||
openFile(pdfString, filename, type) {
|
||||
const blob = this.b64toBlob(pdfString, 'application/pdf')
|
||||
let pathFile = ''
|
||||
const fileName = filename
|
||||
@@ -1093,7 +1096,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,8 +1109,8 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
|
||||
console.log(msg)
|
||||
if (msg.file.type == "application/img") {
|
||||
if (msg?.file?.type == "application/img") {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewMediaPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
@@ -1121,10 +1124,25 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
modal.present();
|
||||
} else {
|
||||
this.downloadFileFromBrowser("file", str)
|
||||
this.downloadFileFromBrowser(msg.attachments[0].name, str)
|
||||
}
|
||||
|
||||
} else {
|
||||
this.openFile(str, msg.attachments[0].name);
|
||||
if (msg.file.type == "application/img") {
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewMediaPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
componentProps: {
|
||||
image: msg.attachments[0].image_url,
|
||||
type: msg.file.type,
|
||||
username: msg.u.name,
|
||||
_updatedAt: msg._updatedAt
|
||||
}
|
||||
});
|
||||
modal.present();
|
||||
} else {
|
||||
this.openFile(str, msg.attachments[0].name, msg.file.type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,28 +88,26 @@ export class ContactsPage implements OnInit {
|
||||
doRefresh(event){
|
||||
}
|
||||
|
||||
close(){
|
||||
this.modalController.dismiss();
|
||||
close() {
|
||||
this.modalController.dismiss({});
|
||||
}
|
||||
|
||||
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 +119,7 @@ export class ContactsPage implements OnInit {
|
||||
this.openModal(this.dm._id);
|
||||
});
|
||||
}
|
||||
|
||||
async openModal(roomId:any){
|
||||
this.close();
|
||||
|
||||
@@ -137,26 +136,10 @@ export class ContactsPage implements OnInit {
|
||||
}
|
||||
|
||||
async openMessages(username:string){
|
||||
/* this.close(); */
|
||||
|
||||
let dm:any;
|
||||
//Create new room
|
||||
this.createRoom(username);
|
||||
//Get direct messages (dm)
|
||||
/* this.getDirectMessage(this.room._id); */
|
||||
|
||||
this.createRoom(username);
|
||||
|
||||
|
||||
/* const modal = await this.modalController.create({
|
||||
component: MessagesPage,
|
||||
cssClass: 'group-messages',
|
||||
backdropDismiss: false,
|
||||
componentProps: {
|
||||
dm: dm,
|
||||
},
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss(); */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
<span class="time">{{msg.duration}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<!-- <div class="message-attachments"> -->
|
||||
<div class="file">
|
||||
<ion-label *ngIf="msg.delate == false">{{msg.msg}}</ion-label>
|
||||
<ion-label *ngIf="msg.delate == true">{{msg.msg}}</ion-label>
|
||||
@@ -67,7 +66,6 @@
|
||||
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
|
||||
</ion-label>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -87,8 +85,12 @@
|
||||
<ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button">
|
||||
<ion-icon name="image" class="file-icon"></ion-icon>
|
||||
<ion-label>{{"Imagem"}}</ion-label>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon-download" src="assets/icon/theme/default/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && msg.downloadLoader == false && msg.downloadAttachmentsTemp == 0 " class="icon-download" src="assets/icon/theme/default/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && msg.downloadLoader == false && msg.downloadAttachmentsTemp == 0" class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon>
|
||||
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && msg.downloadLoader == true " class="icon-download" src="assets/gif/theme/default/Blocks-loader.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && msg.downloadLoader == true" class="icon-download" src="assets/gif/theme/gov/Blocks-loader.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="msg.downloadAttachments == false && msg.downloadAttachmentsTemp >= 1 && msg.downloadLoader == false" src="assets/images/retry-svgrepo-com.svg" class="icon-download font-12"> </ion-icon>
|
||||
</ion-item>
|
||||
</div>
|
||||
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image">
|
||||
@@ -107,10 +109,11 @@
|
||||
|
||||
<div *ngIf="!msg.attachments[0].image_url">
|
||||
<ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button">
|
||||
<ion-icon name="document" class="file-icon"></ion-icon>
|
||||
<ion-icon *ngIf="msg.attachments[0].type != 'webtrix'" name="document" class="file-icon"></ion-icon>
|
||||
<ion-icon *ngIf="msg.attachments[0].type == 'webtrix'" src="assets/icon/webtrix.svg" class="file-icon"></ion-icon>
|
||||
<ion-label>{{file.title}}</ion-label>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon-download" src="assets/icon/theme/default/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && msg.attachments[0].type != 'webtrix' " class="icon-download" src="assets/icon/theme/default/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && msg.attachments[0].type != 'webtrix' " class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon>
|
||||
</ion-item>
|
||||
</div>
|
||||
|
||||
@@ -135,8 +138,12 @@
|
||||
<ion-item class="add-attachment-bg-color" shape="round" lines="none" type="button">
|
||||
<ion-icon name="mic-outline" class="file-icon"></ion-icon>
|
||||
<ion-label>{{"Mensagem de voz"}}</ion-label>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon-download" src="assets/icon/theme/default/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && msg.downloadLoader == false && msg.downloadAttachmentsTemp == 0 " class="icon-download" src="assets/icon/theme/default/icons-download.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && msg.downloadLoader == false && msg.downloadAttachmentsTemp == 0" class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon>
|
||||
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && msg.downloadLoader == true " class="icon-download" src="assets/gif/theme/default/Blocks-loader.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && msg.downloadLoader == true" class="icon-download" src="assets/gif/theme/gov/Blocks-loader.svg" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="msg.downloadAttachments == false && msg.downloadAttachmentsTemp >= 1 && msg.downloadLoader == false" src="assets/images/retry-svgrepo-com.svg" class="icon-download font-12"> </ion-icon>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="file audio-contentainer" *ngIf="msg.file.type == 'application/audio' && file.title_link">
|
||||
@@ -167,7 +174,7 @@
|
||||
</div>
|
||||
<div *ngIf="msg.file.type == 'application/meeting'" class="info-meeting">
|
||||
<ion-label class="info-meeting-small">{{msg.u.name}} criou esta reunião</ion-label><br />
|
||||
<button (click)="goToEvent(msg.file.id)" class="btn-no-color info-meeting-normal">
|
||||
<button (click)="goToEvent(msg.file)" class="btn-no-color info-meeting-normal">
|
||||
<ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label>
|
||||
</button><br />
|
||||
<ion-label class="info-meeting-medium">
|
||||
@@ -185,7 +192,7 @@
|
||||
<div *ngIf="msg.file && msg.delate == false">
|
||||
<div *ngIf="msg.file.type == 'application/meeting'" class="info-meeting">
|
||||
<ion-label class="info-meeting-small">{{msg.u.name}} criou esta reunião</ion-label><br />
|
||||
<button (click)="goToEvent(msg.file.id)" class="btn-no-color info-meeting-normal">
|
||||
<button (click)="goToEvent(msg.file)" class="btn-no-color info-meeting-normal">
|
||||
<ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label>
|
||||
</button><br />
|
||||
<ion-label class="info-meeting-medium">
|
||||
|
||||
@@ -19,7 +19,7 @@ import { ChatUserStorage } from 'src/app/store/chat/chat-user.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
import { VoiceRecorder, RecordingData, GenericResponse} from 'capacitor-voice-recorder';
|
||||
import { VoiceRecorder, RecordingData, GenericResponse } from 'capacitor-voice-recorder';
|
||||
import { Haptics, ImpactStyle } from '@capacitor/haptics';
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
|
||||
@@ -38,7 +38,9 @@ import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
|
||||
|
||||
import { File } from '@awesome-cordova-plugins/file/ngx';
|
||||
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
|
||||
import { Filesystem, Directory } from '@capacitor/filesystem';
|
||||
|
||||
const IMAGE_DIR = 'stored-images';
|
||||
|
||||
@@ -101,7 +103,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
downloadProgess: number;
|
||||
downloadLoader: boolean;
|
||||
|
||||
audioPermissionStatus: 'granted'| 'denied' | 'prompt' | null = null
|
||||
audioPermissionStatus: 'granted' | 'denied' | 'prompt' | null = null
|
||||
sessionStore = SessionStore
|
||||
|
||||
constructor(
|
||||
@@ -123,7 +125,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
private sqlservice: SqliteService,
|
||||
public wsChatMethodsService: WsChatMethodsService,
|
||||
private AttachmentsService: AttachmentsService,
|
||||
|
||||
private CameraService: CameraService,
|
||||
private processesService: ProcessesService,
|
||||
private storage: Storage,
|
||||
@@ -133,10 +134,12 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
private sanitiser: DomSanitizer,
|
||||
private alertController: AlertController,
|
||||
// private document: DocumentViewer
|
||||
private file: File,
|
||||
private fileOpener: FileOpener,
|
||||
) {
|
||||
this.loggedUser = authService.ValidatedUserChat['data'];
|
||||
this.roomId = this.navParams.get('roomId');
|
||||
|
||||
|
||||
|
||||
window.onresize = (event) => {
|
||||
if (window.innerWidth > 701) {
|
||||
@@ -144,7 +147,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.wsChatMethodsService.getDmRoom(this.roomId).loadHistory({})
|
||||
this.wsChatMethodsService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
|
||||
@@ -158,12 +160,13 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.createDirectoryImage()
|
||||
this.wsChatMethodsService.getAllRooms();
|
||||
this.chatService.refreshtoken();
|
||||
this.wsChatMethodsService.getUserOfRoom(this.roomId).then((value) => {
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
this.getChatMembers();
|
||||
}
|
||||
|
||||
@@ -213,11 +216,11 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
try {
|
||||
this.storage.get('recordData').then((recordData) => {
|
||||
|
||||
|
||||
if (recordData?.value?.recordDataBase64.includes('data:audio')) {
|
||||
this.audioRecorded = this.sanitiser.bypassSecurityTrustResourceUrl(recordData?.value?.recordDataBase64);
|
||||
}
|
||||
else if(recordData?.value?.mimeType && recordData?.value?.recordDataBase64) {
|
||||
else if (recordData?.value?.mimeType && recordData?.value?.recordDataBase64) {
|
||||
this.audioRecorded = this.sanitiser.bypassSecurityTrustResourceUrl(`data:${recordData.value.mimeType};base64,${recordData?.value?.recordDataBase64}`);
|
||||
}
|
||||
});
|
||||
@@ -228,22 +231,22 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
async startRecording() {
|
||||
VoiceRecorder.requestAudioRecordingPermission();
|
||||
if(await VoiceRecorder.canDeviceVoiceRecord().then((result: GenericResponse) =>{return result.value})){
|
||||
if(await VoiceRecorder.requestAudioRecordingPermission().then((result: GenericResponse) => {return result.value})){
|
||||
if (await VoiceRecorder.canDeviceVoiceRecord().then((result: GenericResponse) => { return result.value })) {
|
||||
if (await VoiceRecorder.requestAudioRecordingPermission().then((result: GenericResponse) => { return result.value })) {
|
||||
//if(await this.hasAudioRecordingPermission()){
|
||||
if (this.recording) {
|
||||
return;
|
||||
}
|
||||
this.recording = true;
|
||||
VoiceRecorder.startRecording();
|
||||
this.calculateDuration();
|
||||
if (this.recording) {
|
||||
return;
|
||||
}
|
||||
this.recording = true;
|
||||
VoiceRecorder.startRecording();
|
||||
this.calculateDuration();
|
||||
//}
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.toastService._badRequest('Para gravar uma mensagem de voz, permita o acesso do Gabinete Digital ao seu microfone.');
|
||||
}
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.toastService._badRequest('Este dispositivo não tem capacidade para gravação de áudio!');
|
||||
}
|
||||
}
|
||||
@@ -251,13 +254,13 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
stopRecording() {
|
||||
this.deleteRecording();
|
||||
this.allowTyping = false;
|
||||
|
||||
|
||||
if (!this.recording) {
|
||||
return;
|
||||
}
|
||||
this.recording = false;
|
||||
VoiceRecorder.stopRecording().then(async (result: RecordingData) => {
|
||||
|
||||
|
||||
this.recording = false;
|
||||
if (result.value && result.value.recordDataBase64) {
|
||||
const recordData = result.value.recordDataBase64;
|
||||
@@ -266,7 +269,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
//Save file
|
||||
this.storage.set('fileName', fileName);
|
||||
this.storage.set('recordData', result).then(() => {
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -335,7 +338,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
} catch (err) { }
|
||||
}
|
||||
|
||||
async goToEvent(eventId: any) {
|
||||
async goToEvent(event: any) {
|
||||
|
||||
let classs;
|
||||
if (window.innerWidth < 701) {
|
||||
classs = 'modal modal-desktop'
|
||||
@@ -345,13 +349,14 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewEventPage,
|
||||
componentProps: {
|
||||
eventId: eventId,
|
||||
eventId: event.id,
|
||||
CalendarId: event.calendarId
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -415,16 +420,16 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
if (recordData?.value?.recordDataBase64.includes('data:audio')) {
|
||||
this.audioRecorded = recordData?.value?.recordDataBase64;
|
||||
}
|
||||
else if(recordData?.value?.mimeType && recordData?.value?.recordDataBase64) {
|
||||
else if (recordData?.value?.mimeType && recordData?.value?.recordDataBase64) {
|
||||
this.audioRecorded = `data:${recordData.value.mimeType};base64,${recordData?.value?.recordDataBase64}`;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//Converting base64 to blob
|
||||
const encodedData = btoa(this.audioRecorded);
|
||||
const blob = this.base64toBlob(encodedData, recordData.value.mimeType)
|
||||
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append("blobFile", blob);
|
||||
|
||||
@@ -447,7 +452,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
viewDocument(file: any, url?: string) {
|
||||
|
||||
|
||||
if (file.type == "application/webtrix") {
|
||||
this.openViewDocumentModal(file);
|
||||
}
|
||||
@@ -598,7 +603,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
IsRequired: "true",
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.popoverController.dismiss();
|
||||
if (window.innerWidth <= 1024) {
|
||||
const modal = await this.modalController.create({
|
||||
@@ -632,7 +637,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
const blob = await base64.blob();
|
||||
const formData = new FormData();
|
||||
formData.append("blobFile", blob);
|
||||
|
||||
|
||||
|
||||
this.wsChatMethodsService.getDmRoom(roomId).send({
|
||||
file: {
|
||||
@@ -712,7 +717,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
resultType: CameraResultType.Base64,
|
||||
source: CameraSource.Photos
|
||||
});
|
||||
|
||||
|
||||
//const imageData = await this.fileToBase64Service.convert(file)
|
||||
//
|
||||
|
||||
@@ -749,17 +754,17 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
const file: any = await this.fileService.getFileFromDevice(types);
|
||||
|
||||
|
||||
|
||||
|
||||
if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") {
|
||||
|
||||
const encodedData = btoa(JSON.stringify(await this.getBase64(file)));
|
||||
const blob = this.base64toBlob(encodedData, file.type)
|
||||
|
||||
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('blobFile', blob);
|
||||
|
||||
|
||||
|
||||
this.wsChatMethodsService.getDmRoom(roomId).send({
|
||||
file: {
|
||||
@@ -775,7 +780,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
temporaryData: formData
|
||||
});
|
||||
} else {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -790,7 +795,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
resolve(reader.result)
|
||||
};
|
||||
reader.onerror = function (error) {
|
||||
|
||||
|
||||
};
|
||||
});
|
||||
|
||||
@@ -798,7 +803,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
async openChatOptions(ev?: any) {
|
||||
const roomId = this.roomId
|
||||
|
||||
|
||||
|
||||
const popover = await this.popoverController.create({
|
||||
component: ChatOptionsPopoverPage,
|
||||
@@ -813,7 +818,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
});
|
||||
await popover.present();
|
||||
popover.onDidDismiss().then(async (res) => {
|
||||
|
||||
|
||||
if (res['data'] == 'meeting') {
|
||||
this.bookMeeting();
|
||||
}
|
||||
@@ -840,11 +845,11 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
} else {
|
||||
this.sqlservice.getAllChatMSG(roomId).then((msg: any) => {
|
||||
|
||||
|
||||
let chatmsgArray = [];
|
||||
let array = []
|
||||
msg.forEach(element => {
|
||||
|
||||
|
||||
|
||||
let msgChat = {
|
||||
_id: element.Id,
|
||||
@@ -864,7 +869,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -946,27 +951,27 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
openFile(pdfString, filename, type) {
|
||||
// const blob = this.b64toBlob(pdfString, type)
|
||||
// let pathFile = ''
|
||||
// const fileName = filename
|
||||
// const contentFile = blob
|
||||
// if (this.platform.is('ios')) {
|
||||
// pathFile = this.file.documentsDirectory
|
||||
// } else {
|
||||
// pathFile = this.file.externalRootDirectory
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// this.file
|
||||
// .writeFile(pathFile, fileName, contentFile, { replace: true })
|
||||
// .then(success => {
|
||||
// this.fileOpener
|
||||
// .open(pathFile + fileName, type)
|
||||
// .then(() =>
|
||||
// .catch(e =>
|
||||
// })
|
||||
// .catch(e =>
|
||||
const blob = this.b64toBlob(pdfString, type)
|
||||
let pathFile = ''
|
||||
const fileName = filename
|
||||
const contentFile = blob
|
||||
if (this.platform.is('ios')) {
|
||||
pathFile = this.file.documentsDirectory
|
||||
} else {
|
||||
pathFile = this.file.externalRootDirectory
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.file
|
||||
.writeFile(pathFile, fileName, contentFile, { replace: true })
|
||||
.then(success => {
|
||||
this.fileOpener
|
||||
.open(pathFile + fileName, type)
|
||||
.then(() => console.log())
|
||||
.catch(e => console.error(e))
|
||||
})
|
||||
.catch(e => console.error(e))
|
||||
}
|
||||
|
||||
downloadFileFromBrowser(fileName: string, data: any): void {
|
||||
@@ -979,9 +984,9 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
|
||||
async openPreview(msg) {
|
||||
|
||||
|
||||
if(msg.file.type === "application/webtrix") {
|
||||
|
||||
if (msg.file.type === "application/webtrix") {
|
||||
this.viewDocument(msg.file, msg.attachments.image_url)
|
||||
} else {
|
||||
|
||||
@@ -996,6 +1001,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
|
||||
console.log(msg)
|
||||
|
||||
if (msg.file.type == "application/img") {
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewMediaPage,
|
||||
@@ -1009,11 +1015,28 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
});
|
||||
modal.present();
|
||||
} else {
|
||||
|
||||
this.downloadFileFromBrowser("file", str)
|
||||
this.downloadFileFromBrowser(msg.attachments[0].name, str)
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
this.openFile(str, msg.attachments[0].name, msg.file.type);
|
||||
if (msg.file.type == "application/img") {
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewMediaPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
componentProps: {
|
||||
image: msg.attachments[0].image_url,
|
||||
type: msg.file.type,
|
||||
username: msg.u.name,
|
||||
_updatedAt: msg._updatedAt
|
||||
}
|
||||
});
|
||||
modal.present();
|
||||
} else {
|
||||
this.openFile(str, msg.attachments[0].name, msg.file.type);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1022,7 +1045,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
async audioPreview(msg) {
|
||||
|
||||
|
||||
if (!msg.attachments[0].title_link || msg.attachments[0].title_link === null || msg.attachments[0].title_link === '') {
|
||||
this.downloadFileMsg(msg)
|
||||
} else { }
|
||||
@@ -1059,6 +1082,13 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
// });
|
||||
// }
|
||||
|
||||
async createDirectoryImage() {
|
||||
await Filesystem.mkdir({
|
||||
path: IMAGE_DIR,
|
||||
directory: Directory.Data,
|
||||
recursive: true
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-header class="ion-no-border init-event-header">
|
||||
<!-- <ion-header class="ion-no-border init-event-header"> -->
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-label>
|
||||
<p class="time ion-text-center">{{customDate}}</p>
|
||||
</ion-label>
|
||||
@@ -17,132 +18,125 @@
|
||||
|
||||
</ion-header>
|
||||
|
||||
<ion-content class="main " ng-controller="AppController">
|
||||
<!-- <ion-content class="main " ng-controller="AppController"> -->
|
||||
<ion-content ng-controller="AppController">
|
||||
<ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
|
||||
<div class="conteiner-box px-20 height-100" ng-swipe-up="swipe($event)">
|
||||
<div *ngIf="p.userPermission([permissionList.Agenda.access])" class="schedule height-100">
|
||||
<div class="schedule-header">
|
||||
<div class="title">
|
||||
<ion-icon class="icon" slot="end" src="assets/images/icons-default-agenda.svg" ></ion-icon>
|
||||
<div class="text">A sua Agenda</div>
|
||||
</div>
|
||||
<button title="Ir para a sua Agenda" class="btn-no-color" [routerLink]="['/home/agenda']">
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'default' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'gov' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/theme/gov/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'tribunal' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/theme/tribunal/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
|
||||
</button>
|
||||
<div class="conteiner-box px-20 height-100" ng-swipe-up="swipe($event)">
|
||||
<div *ngIf="p.userPermission([permissionList.Agenda.access])" class="schedule height-100">
|
||||
<div class="schedule-header">
|
||||
<div class="title">
|
||||
<ion-icon class="icon" slot="end" src="assets/images/icons-default-agenda.svg" ></ion-icon>
|
||||
<div class="text">A sua Agenda</div>
|
||||
</div>
|
||||
<div class="content overflow-y-auto flex-grow-1 height-100">
|
||||
<button title="Ir para a sua Agenda" class="btn-no-color" [routerLink]="['/home/agenda']">
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'default' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
|
||||
<ion-list>
|
||||
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor="let event of listToPresent"
|
||||
(click)="goToEvent(event.EventId)"
|
||||
>
|
||||
<div class="d-flex content-{{loggeduser.Profile}}-{{event.CalendarName}}">
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'gov' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/theme/gov/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
|
||||
<div class="schedule-time">
|
||||
<div *ngIf="!event.IsAllDayEvent" class="time-start">{{event.StartDate | date: 'HH:mm'}}</div>
|
||||
<div *ngIf="!event.IsAllDayEvent" class="time-end">{{event.EndDate | date: 'HH:mm'}}</div>
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'tribunal' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/theme/tribunal/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
|
||||
<div *ngIf="event.IsAllDayEvent" class="time-start"> Todo </div>
|
||||
<div *ngIf="event.IsAllDayEvent" class="time-end text-center"> o dia </div>
|
||||
<div></div>
|
||||
</div>
|
||||
<div class="schedule-details">
|
||||
<div class="location">{{event.Location}}</div>
|
||||
<div class="description">
|
||||
<p>{{event.Subject}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
|
||||
</ion-list>
|
||||
<!--
|
||||
<div class="resume">
|
||||
<div class="title">
|
||||
Resumo para Amnahã
|
||||
</div>
|
||||
<div class="event-num">4 eventos ageandados para amanhã</div>
|
||||
<div class="first-event-time">08:30 "Reunião Staff" no Palácio Presidencial</div>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<div class="content overflow-y-auto flex-grow-1 height-100">
|
||||
|
||||
<div *ngIf="p.userPermission([permissionList.Gabinete.access])" class="schedule height-100">
|
||||
<div class="schedule-header">
|
||||
<div class="title">
|
||||
<ion-icon class="icon" slot="end" src="assets/images/icons-correspondencias.svg"></ion-icon>
|
||||
<div class="text">Correspondência por ler</div>
|
||||
</div>
|
||||
<button title="Ir para o Gabinete Digital" (click)="viewExpedientListPage()" class="btn-no-color cursor-pointer">
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'default' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
<ion-list>
|
||||
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor="let event of listToPresent"
|
||||
(click)="goToEvent(event.EventId)"
|
||||
>
|
||||
<div class="d-flex content-{{loggeduser.Profile}}-{{event.CalendarName}}">
|
||||
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'gov' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/theme/gov/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
<div class="schedule-time">
|
||||
<div *ngIf="!event.IsAllDayEvent" class="time-start">{{event.StartDate | date: 'HH:mm'}}</div>
|
||||
<div *ngIf="!event.IsAllDayEvent" class="time-end">{{event.EndDate | date: 'HH:mm'}}</div>
|
||||
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'tribunal' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/theme/tribunal/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="content overflow-y-auto flex-grow-1 height-100">
|
||||
<ion-list>
|
||||
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor = "let task of listToPresentexpediente"
|
||||
(click)="goToExpediente(task.SerialNumber)">
|
||||
<div class="item-exp d-flex">
|
||||
<div class="schedule-date">
|
||||
<div class="time-end">{{task.taskStartDate | date: 'dd-MM-yyyy'}}</div>
|
||||
<div class="time-start">{{task.taskStartDate | date: 'HH:mm'}}</div>
|
||||
</div>
|
||||
<div class="schedule-details pointer">
|
||||
<div class="description">{{ task.Subject }}</div>
|
||||
<div class="location">{{ task.Senders }}</div>
|
||||
<div *ngIf="event.IsAllDayEvent" class="time-start"> Todo </div>
|
||||
<div *ngIf="event.IsAllDayEvent" class="time-end text-center"> o dia </div>
|
||||
<div></div>
|
||||
</div>
|
||||
<div class="schedule-details">
|
||||
<div class="location">{{event.Location}}</div>
|
||||
<div class="description">
|
||||
<p>{{event.Subject}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</div>
|
||||
</ion-item>
|
||||
|
||||
</ion-list>
|
||||
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <iframe id="home-iframe" style="width: 100%;" src="/assets/www/pdfjs/web/viewer.html?file=/assets/www/pdfjs/web/compressed.tracemonkey-pldi-09.pdf.pdf"></iframe> -->
|
||||
<div *ngIf="p.userPermission([permissionList.Gabinete.access])" class="schedule height-100">
|
||||
<div class="schedule-header">
|
||||
<div class="title">
|
||||
<ion-icon class="icon" slot="end" src="assets/images/icons-correspondencias.svg"></ion-icon>
|
||||
<div class="text">Correspondência por ler</div>
|
||||
</div>
|
||||
<button title="Ir para o Gabinete Digital" (click)="viewExpedientListPage()" class="btn-no-color cursor-pointer">
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'default' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'gov' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/theme/gov/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
|
||||
<ion-icon
|
||||
*ngIf="ThemeService.currentTheme == 'tribunal' "
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/theme/tribunal/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="content overflow-y-auto flex-grow-1 height-100">
|
||||
<ion-list>
|
||||
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor = "let task of listToPresentexpediente"
|
||||
(click)="goToExpediente(task.SerialNumber)">
|
||||
<div class="item-exp d-flex">
|
||||
<div class="schedule-date">
|
||||
<div class="time-end">{{task.taskStartDate | date: 'dd-MM-yyyy'}}</div>
|
||||
<div class="time-start">{{task.taskStartDate | date: 'HH:mm'}}</div>
|
||||
</div>
|
||||
<div class="schedule-details pointer">
|
||||
<div class="description">{{ task.Subject }}</div>
|
||||
<div class="location">{{ task.Senders }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <iframe id="home-iframe" style="width: 100%;" src="/assets/www/pdfjs/web/viewer.html?file=/assets/www/pdfjs/web/compressed.tracemonkey-pldi-09.pdf.pdf"></iframe> -->
|
||||
</ion-content>
|
||||
|
||||
@@ -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';
|
||||
@@ -25,13 +25,13 @@ import { Storage } from '@ionic/storage';
|
||||
import { PermissionList } from 'src/app/models/permission/permissionList';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
|
||||
import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
||||
@Component({
|
||||
selector: 'app-events',
|
||||
templateUrl: './events.page.html',
|
||||
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,25 +39,16 @@ 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;
|
||||
|
||||
eventsList: Event[];
|
||||
maxSubjectLength = 30;
|
||||
officialeventsList: Event[];
|
||||
personaleventsList: Event[];
|
||||
|
||||
prEventList: Event[];
|
||||
mdEventList: Event[];
|
||||
|
||||
combinedEvents: Event[];
|
||||
|
||||
customText = false;
|
||||
totalEvent = 0;
|
||||
@@ -65,7 +56,6 @@ export class EventsPage implements OnInit {
|
||||
|
||||
showLoader: boolean;
|
||||
|
||||
taskslist: DailyWorkTask[] = [];
|
||||
expedientList: any;
|
||||
hideSearchBtn: boolean = false;
|
||||
|
||||
@@ -82,8 +72,6 @@ export class EventsPage implements OnInit {
|
||||
|
||||
loggeduser: LoginUserRespose;
|
||||
|
||||
/* existingScreenOrientation: string; */
|
||||
|
||||
permissionList = new PermissionList();
|
||||
|
||||
constructor(
|
||||
@@ -94,7 +82,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,
|
||||
@@ -104,12 +91,11 @@ export class EventsPage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
private storage: Storage,
|
||||
public p: PermissionService,
|
||||
private changeProfileService: ChangeProfileService,
|
||||
) {
|
||||
/* this.existingScreenOrientation = this.screenOrientation.type; */
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
this.prEventList = null;
|
||||
|
||||
this.platform.resize.subscribe(async () => {
|
||||
//
|
||||
@@ -124,6 +110,13 @@ export class EventsPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.changeProfileService.registerCallback(() => {
|
||||
|
||||
this.listToPresent = [];
|
||||
this.listToPresentexpediente = []
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -150,10 +143,6 @@ export class EventsPage implements OnInit {
|
||||
this.hideSearch();
|
||||
});
|
||||
|
||||
//this.getEventsFromLocalDb();
|
||||
|
||||
//this.checkScreenOrientation();
|
||||
|
||||
}
|
||||
|
||||
hideSearch() {
|
||||
@@ -172,32 +161,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 = "";
|
||||
@@ -493,7 +456,7 @@ export class EventsPage implements OnInit {
|
||||
//
|
||||
this.addProcessToDb(result);
|
||||
|
||||
const ExpedienteTask = result.map(e => this.expedienteTaskPipe.transform(e))
|
||||
let ExpedienteTask = result.map(e => this.expedienteTaskPipe.transform(e))
|
||||
|
||||
this.listToPresentexpediente = ExpedienteTask;
|
||||
|
||||
|
||||
@@ -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;
|
||||
@@ -184,11 +184,14 @@ export class DiplomasGerarPage implements OnInit {
|
||||
|
||||
async sendExpedienteToPending() {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
this.despachoService.sendExpedienteToPending(this.serialnumber).subscribe(res => {
|
||||
this.goBack();
|
||||
this.toastService.successMessage()
|
||||
loader.remove()
|
||||
},
|
||||
error => {
|
||||
loader.remove()
|
||||
this.toastService.badRequest("Processo não enviado para despacho")
|
||||
});
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -59,9 +59,14 @@
|
||||
<ion-label>
|
||||
<p>{{customDate}}</p>
|
||||
<p *ngIf="toDateString(loadedEvent.workflowInstanceDataFields.StartDate) == toDateString(loadedEvent.workflowInstanceDataFields.EndDate)">das {{loadedEvent.workflowInstanceDataFields.StartDate | date: 'HH:mm'}} às {{loadedEvent.workflowInstanceDataFields.EndDate | date: 'HH:mm'}}</p>
|
||||
<p *ngIf="toDateString(loadedEvent.workflowInstanceDataFields.StartDate) != toDateString(loadedEvent.workflowInstanceDataFields.EndDate)">{{loadedEvent.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} - {{ loadedEvent.workflowInstanceDataFields.StartDate | date: 'dd/M/yy'}} </p>
|
||||
<p *ngIf="!loadedEvent.workflowInstanceDataFields.IsRecurring">(Não se repete)</p>
|
||||
<p *ngIf="loadedEvent.workflowInstanceDataFields.IsRecurring">Repete</p>
|
||||
<p *ngIf="toDateString(loadedEvent.workflowInstanceDataFields.StartDate) != toDateString(loadedEvent.workflowInstanceDataFields.EndDate)">{{loadedEvent.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} - {{ loadedEvent.workflowInstanceDataFields.EndDate | date: 'dd/M/yy'}} </p>
|
||||
<p>
|
||||
<span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == 0">Diário</span>
|
||||
<span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == 1">Semanal</span>
|
||||
<span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == 2">Mensal</span>
|
||||
<span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == 3">Anual</span>
|
||||
<span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == -1">(Não se repete)</span>
|
||||
</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
Calendário MDGPR
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="PR">
|
||||
Presidente da República
|
||||
Calendário Partilhado
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
|
||||
+4
-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;
|
||||
@@ -324,12 +324,15 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
}
|
||||
|
||||
sendExpedienteToPending() {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.serialNumber).subscribe(res => {
|
||||
|
||||
this.toastService._successMessage('Processo enviado para pendentes')
|
||||
this.goBack();
|
||||
loader.remove()
|
||||
},
|
||||
(error) => {
|
||||
loader.remove()
|
||||
this.toastService._badRequest('Processo não enviado para pendentes')
|
||||
});
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ export class ExpedientePrPage implements OnInit {
|
||||
serialnumber: string;
|
||||
caller:string;
|
||||
profile: string;
|
||||
intervenientes: any;
|
||||
intervenientes: any = [];
|
||||
cc: any = [];
|
||||
|
||||
loggeduser: LoginUserRespose;
|
||||
@@ -133,12 +133,15 @@ export class ExpedientePrPage implements OnInit {
|
||||
}
|
||||
|
||||
sendExpedienteToPending() {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||
|
||||
this.toastService._successMessage('Processo enviado para pendentes')
|
||||
this.goBack();
|
||||
loader.remove()
|
||||
},
|
||||
(error)=>{
|
||||
loader.remove()
|
||||
this.toastService._badRequest('Processo não enviado para pendentes')
|
||||
});
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
<p class="text-center exp-card-content">{{pedidosstore.countdeferimento}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks, p.permissionList.Gabinete.pr_tasks])" (click)="openDespachosPrPage(); selectedElement='showDespachosPr'" [class.active]="selectedElement == 'showDespachosPr'" class="box-hover exp-card-long width-100 d-flex flex-column justify-center">
|
||||
<!-- <div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks, p.permissionList.Gabinete.pr_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">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-despachos-presidente.svg"></ion-icon>
|
||||
@@ -226,14 +226,14 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'showDespachosPr'" src="assets/images/theme/gov/icons-despachos-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="exp-card-text">
|
||||
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do Presidente da República</p>
|
||||
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do Calendário Partilhado</p>
|
||||
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])">Despachos criados por mim</p>
|
||||
<p class="text-center exp-card-content">{{ despachoprstore.count }} <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorValidar'" [class.active]="selectedElement == 'DiplomasPorValidar'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<!-- <div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorValidar'" [class.active]="selectedElement == 'DiplomasPorValidar'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-diploma.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasPorValidar' " src="assets/images/theme/gov/icons-expediente-diploma.svg"></ion-icon>
|
||||
@@ -243,7 +243,7 @@
|
||||
<p class="text-center exp-card-title " *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])">Diplomas por Validar</p>
|
||||
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])">Diplomas por Assinar</p>
|
||||
<p class="text-center exp-card-content">{{ deplomasStore.deplomasReviewCount }} <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div *ngIf="SessionStore.user.Profile == 'Consultant'" (click)="openDiplomaPorElaborar('gerarDiplomas'); selectedElement='gerarDiplomas'" [class.active]="selectedElement == 'gerarDiplomas'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
@@ -257,7 +257,7 @@
|
||||
<p class="text-center exp-card-content">{{ deplomasStore.DiplomaGerarList.length }} <span class="title1">Documentos</span></p>
|
||||
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div (click)="openDiplomasPage('assinados'); selectedElement='DiplomasAssinados'" [class.active]="selectedElement == 'DiplomasAssinados'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-diplomas-assinados-presidente.svg"></ion-icon>
|
||||
@@ -269,7 +269,7 @@
|
||||
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" >Diplomas</p>
|
||||
<p class="text-center exp-card-content">{{ deplomasStore.countDiplomasAssinadoListCount }} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
-->
|
||||
<div *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openDiplomasAssinarPage(); selectedElement='DiplomasParaAssinar'" [class.active]="selectedElement == 'DiplomasParaAssinar'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-diploma.svg"></ion-icon>
|
||||
|
||||
@@ -46,7 +46,7 @@ export class PedidoPage implements OnInit {
|
||||
eventsList: Event[];
|
||||
serialnumber: string;
|
||||
caller: string;
|
||||
intervenientes: any;
|
||||
intervenientes: any = []
|
||||
cc: any = [];
|
||||
loggeduser: LoginUserRespose;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</div>
|
||||
</form>
|
||||
<div class="msg-bottom d-flex">
|
||||
<p class="msg-bottom-p">Uma iniciativa do Gabinete do Presidente da República</p>
|
||||
<p class="msg-bottom-p">Uma iniciativa do Gabinete do Calendário Partilhado</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -13,7 +13,11 @@ import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { StorageService } from 'src/app/services/storage.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { PermissionList } from 'src/app/models/permission/permissionList';
|
||||
import { MessageModel, DeleteMessageModel } from '../../models/beast-orm'
|
||||
import { MessageModel, DeleteMessageModel } from '../../models/beast-orm';
|
||||
import { WsChatService } from 'src/app/services/chat/ws-chat.service';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
templateUrl: './login.page.html',
|
||||
@@ -46,6 +50,10 @@ export class LoginPage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
private storageservice: StorageService,
|
||||
public p: PermissionService,
|
||||
private WsChatService: WsChatService,
|
||||
private storage: Storage,
|
||||
public WsChatMethodsService: WsChatMethodsService,
|
||||
private ChatService: ChatService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -124,6 +132,7 @@ export class LoginPage implements OnInit {
|
||||
await this.authService.loginChat(attempt.ChatData.data);
|
||||
|
||||
await this.authService.loginToChatWs();
|
||||
this.ChatService.setheader()
|
||||
|
||||
}
|
||||
|
||||
@@ -134,7 +143,9 @@ export class LoginPage implements OnInit {
|
||||
|
||||
} else {
|
||||
|
||||
this.WsChatService.logout();
|
||||
this.clearStoreService.clear();
|
||||
this.WsChatMethodsService.clearChat();
|
||||
SessionStore.delete();
|
||||
window.localStorage.clear();
|
||||
await MessageModel.deleteAll()
|
||||
@@ -148,6 +159,7 @@ export class LoginPage implements OnInit {
|
||||
if(attempt.ChatData) {
|
||||
await this.authService.loginChat(attempt.ChatData.data);
|
||||
await this.authService.loginToChatWs();
|
||||
this.ChatService.setheader()
|
||||
}
|
||||
|
||||
this.getToken();
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<ion-datetime
|
||||
[(ngModel)]="folder.DateBegin"
|
||||
class="d-block d-md-none"
|
||||
placeholder="Início"
|
||||
placeholder="Data início*"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,5,10,15,20,25,30,35,40,45,50,55"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<mat-form-field appearance="none" class="date-hour-picker d-none d-md-block">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date"
|
||||
placeholder="Data inicio*"
|
||||
[formControl]="dateControlStart"
|
||||
[min]="minDate"
|
||||
[disabled]="disabled"
|
||||
@@ -70,7 +70,7 @@
|
||||
<ion-datetime
|
||||
class="d-block d-md-none"
|
||||
[(ngModel)]="folder.DateEnd"
|
||||
placeholder="Fim"
|
||||
placeholder="Data de fim*"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,5,10,15,20,25,30,35,40,45,50,55"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
@@ -78,9 +78,9 @@
|
||||
max="2025">
|
||||
</ion-datetime>
|
||||
|
||||
<mat-form-field class="date-hour-picker d-none d-md-block">
|
||||
<mat-form-field appearance="none" class="date-hour-picker d-none d-md-block">
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
placeholder="Choose a date"
|
||||
placeholder="Data de fim*"
|
||||
[formControl]="dateControlEnd"
|
||||
[min]="endMinDate"
|
||||
[disabled]="disabled"
|
||||
|
||||
@@ -75,14 +75,14 @@ export class NewActionPage implements OnInit {
|
||||
this.dateControlStart = new FormControl(moment(new Date()));
|
||||
this.dateControlEnd = new FormControl(moment(new Date(new Date().getTime() + 15 * 60000)));
|
||||
|
||||
this.folder.DateBegin = new Date().toISOString()
|
||||
this.folder.DateEnd = (new Date(new Date().getTime() + 15 * 60000)).toISOString()
|
||||
// this.folder.DateBegin = new Date().toISOString()
|
||||
// this.folder.DateEnd = (new Date(new Date().getTime() + 15 * 60000)).toISOString()
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.segment = "Evento";
|
||||
this.setDefaultTime()
|
||||
// this.setDefaultTime()
|
||||
}
|
||||
|
||||
setDefaultTime() {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<ion-progress-bar type="indeterminate" class="loader" *ngIf="showLoader"></ion-progress-bar>
|
||||
|
||||
|
||||
<div class="top-box d-flex ion-justify-content-between">
|
||||
<div class="top-box d-flex ion-justify-content-between pb-10">
|
||||
<!-- search -->
|
||||
<div *ngIf="!showAdvanceSearch" class="icon-z icon-most-searched-word-open cursor-pointer" (click)="showHideAdvanceSearch(true)">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/theme/blue/icons-most-searched-words-open.svg" class="icon" slot="end"></ion-icon>
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Search drop down -->
|
||||
<div class="advance-search pa-0 pt-10 flex-md-grow-1" >
|
||||
<div class="advance-search pa-0 pt-10 pr-10 flex-md-grow-1" >
|
||||
|
||||
<ion-form [class.d-none]="!showSearchInput">
|
||||
<div class="d-flex search-input-container ion-justify-content-between" >
|
||||
|
||||
Reference in New Issue
Block a user