mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge with developer branch
This commit is contained in:
@@ -69,6 +69,7 @@
|
||||
<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>
|
||||
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -88,8 +88,9 @@ export class EventListPage implements OnInit {
|
||||
if(allEvents.length > 0){
|
||||
this.eventsPRList = this.sortService.sortArrayByDate(allEvents).reverse();
|
||||
}
|
||||
this.showLoader = false;
|
||||
}
|
||||
this.showLoader = false;
|
||||
|
||||
}
|
||||
|
||||
async openApproveModal(eventSerialNumber, data) {
|
||||
|
||||
@@ -93,8 +93,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-item-class-2 d-flex" >
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -102,7 +103,7 @@
|
||||
<!--
|
||||
[className]="Form?.get('Subject')?.invalid ? 'input-error ion-input-class flex-grow-1' : 'ion-input-class ion-input-class flex-grow-1' "
|
||||
-->
|
||||
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs materia-top">
|
||||
<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">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
@@ -133,7 +134,7 @@
|
||||
<!--
|
||||
[className]="Form?.get('Subject')?.invalid ? 'input-error ion-input-class flex-grow-1' : 'ion-input-class ion-input-class flex-grow-1' "
|
||||
-->
|
||||
<div (click)="openFim()" class="ion-input-class flex-grow-1 justify-center align-center materia-top" [class.input-error]="Form?.get('dateEnd')?.invalid && validateFrom ">
|
||||
<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">
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
|
||||
@@ -201,13 +201,11 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.taskParticipants = removeDuplicate(this.taskParticipants);
|
||||
this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
|
||||
|
||||
this.setIntervenient.emit(this.taskParticipants);
|
||||
this.setIntervenientCC.emit(this.taskParticipantsCc);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +216,10 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true
|
||||
this.validateFrom = true;
|
||||
if(new Date(this.postEvent.StartDate).getTime() > new Date(this.postEvent.EndDate).getTime()){
|
||||
this.toastService._badRequest("A data de fim não pode ser inferior a data de início do evento")
|
||||
}
|
||||
}
|
||||
|
||||
injectValidation() {
|
||||
@@ -227,7 +228,7 @@ export class NewEventPage implements OnInit {
|
||||
const str: any = this.postEvent.EventRecurrence.Type.toString()
|
||||
this.postEvent.EventRecurrence.Type = str
|
||||
}
|
||||
|
||||
|
||||
this.Form = new FormGroup({
|
||||
Subject: new FormControl(this.postEvent.Subject, [
|
||||
Validators.required,
|
||||
@@ -255,8 +256,8 @@ export class NewEventPage implements OnInit {
|
||||
Date: new FormControl( new Date(this.postEvent.StartDate).getTime() < new Date(this.postEvent.EndDate).getTime() ? 'ok': null,[
|
||||
Validators.required
|
||||
]),
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -304,7 +305,6 @@ export class NewEventPage implements OnInit {
|
||||
close(){
|
||||
|
||||
this.deleteTemporaryData();
|
||||
|
||||
this.cloneAllmobileComponent.emit();
|
||||
this.clearContact.emit();
|
||||
this.setIntervenient.emit([]);
|
||||
@@ -331,7 +331,6 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
|
||||
|
||||
|
||||
async save() {
|
||||
|
||||
this.injectValidation()
|
||||
@@ -349,11 +348,6 @@ export class NewEventPage implements OnInit {
|
||||
this.postEvent.HasAttachments = true;
|
||||
}
|
||||
|
||||
if(this.selectedRecurringType != '-1') {
|
||||
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
|
||||
}
|
||||
|
||||
//
|
||||
if(this.postEvent.EventRecurrence.Type == undefined) {
|
||||
this.postEvent.EventRecurrence.Type = '-1'
|
||||
}
|
||||
@@ -428,10 +422,8 @@ export class NewEventPage implements OnInit {
|
||||
(id) => {
|
||||
console.log(id);
|
||||
|
||||
|
||||
const eventId: any = id;
|
||||
|
||||
|
||||
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
||||
return {
|
||||
SourceTitle: e.Assunto,
|
||||
|
||||
@@ -54,7 +54,14 @@
|
||||
<p *ngIf="toDateString(loadedEvent.StartDate) == toDateString(loadedEvent.EndDate)">das {{loadedEvent.StartDate | date: 'HH:mm'}} às {{loadedEvent.EndDate | date: 'HH:mm'}}</p>
|
||||
<p *ngIf="toDateString(loadedEvent.StartDate) != toDateString(loadedEvent.EndDate)">{{loadedEvent.StartDate | date: 'd/M/yy' }} - {{ loadedEvent.StartDate | date: 'dd/M/yy'}} </p>
|
||||
<p *ngIf="!loadedEvent.IsRecurring">(Não se repete)</p>
|
||||
<p *ngIf="loadedEvent.IsRecurring">Repete</p>
|
||||
<p *ngIf="loadedEvent.IsRecurring">
|
||||
<span *ngIf="loadedEvent.EventRecurrence.Type == 0">Diário</span>
|
||||
<span *ngIf="loadedEvent.EventRecurrence.Type == 1">Semanal</span>
|
||||
<span *ngIf="loadedEvent.EventRecurrence.Type == 2">Mensal</span>
|
||||
<span *ngIf="loadedEvent.EventRecurrence.Type == 3">Anual</span>
|
||||
<span *ngIf="loadedEvent.EventRecurrence.Type == -1">Nunca</span>
|
||||
</p>
|
||||
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<ion-label>A conversa original mantêm-se como chat individual</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of messages; let last = last" (click)="openPreview(msg)">
|
||||
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of messages; let last = last">
|
||||
<div class="message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45" *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru'" >
|
||||
<div class="message-item-options d-flex justify-content-end">
|
||||
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer"></fa-icon>
|
||||
@@ -60,7 +60,9 @@
|
||||
<ion-label>{{msg.msg}}</ion-label>
|
||||
<div *ngIf="msg.attachments" class="message-attachments">
|
||||
<div *ngFor="let file of msg.attachments">
|
||||
<img *ngIf="file.image_url" src="{{file.image_url}}" alt="image">
|
||||
<div (click)="openPreview(msg)">
|
||||
<img *ngIf="file.image_url" src="{{file.image_url}}" alt="image">
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<div class="file">
|
||||
@@ -144,30 +146,31 @@
|
||||
<ion-fab-button (click)="bookMeeting()" color="light">
|
||||
<ion-icon name="calendar"></ion-icon>
|
||||
</ion-fab-button>
|
||||
<ion-fab-button (click)="addFile()" color="light">
|
||||
<!-- <ion-fab-button (click)="addFile()" color="light">
|
||||
<ion-icon name="document"></ion-icon>
|
||||
</ion-fab-button>
|
||||
<ion-fab-button (click)="addImage()" color="light">
|
||||
</ion-fab-button> -->
|
||||
<!-- <ion-fab-button (click)="addImage()" color="light">
|
||||
<ion-icon name="image"></ion-icon>
|
||||
</ion-fab-button>
|
||||
<ion-fab-button class="hide-desktop" (click)="takePicture()" color="light">
|
||||
</ion-fab-button> -->
|
||||
<!-- <ion-fab-button class="hide-desktop" (click)="takePicture()" color="light">
|
||||
<ion-icon name="camera"></ion-icon>
|
||||
</ion-fab-button>
|
||||
</ion-fab-button> -->
|
||||
<ion-fab-button (click)="addFileWebtrix()" color="light">
|
||||
<ion-icon src="assets/icon/webtrix.svg"></ion-icon>
|
||||
</ion-fab-button>
|
||||
</ion-fab-list>
|
||||
</ion-fab>
|
||||
</div>
|
||||
<div class="width-80">
|
||||
|
||||
<div class="width-100">
|
||||
<ion-item class="ion-no-padding type-message" lines="none">
|
||||
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||||
<ion-textarea (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||||
<button hidden class="btn-no-color">
|
||||
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
|
||||
</button>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div>
|
||||
<div class="btn-send">
|
||||
<button *ngIf="message" class="btn-no-color" (click)="sendMessage()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
@import '~src/function.scss';
|
||||
div{
|
||||
overflow: auto;
|
||||
}
|
||||
.header-toolbar{
|
||||
--background:transparent;
|
||||
--opacity: 1;
|
||||
@@ -200,44 +197,49 @@
|
||||
}
|
||||
}
|
||||
|
||||
ion-footer{
|
||||
padding-top: 7.5px;
|
||||
padding-bottom: 7.5px;
|
||||
.container{
|
||||
justify-content: center;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
ion-footer{
|
||||
padding-top: 7.5px;
|
||||
padding-bottom: 7.5px;
|
||||
|
||||
}
|
||||
.container{
|
||||
justify-content: center;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.chat-icon-options{
|
||||
display:block !important;
|
||||
font-size: 35px;
|
||||
float: right !important;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.chat-icon-options{
|
||||
display:block !important;
|
||||
font-size: 35px;
|
||||
float: right !important;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.chat-icon-send{
|
||||
font-size: 45px;
|
||||
margin: 0 auto;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.chat-icon-send{
|
||||
font-size: 45px;
|
||||
margin: 0 auto;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.type-message{
|
||||
display: flex;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 25px;
|
||||
padding-left: 15px;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
.type-message{
|
||||
display: flex;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 25px;
|
||||
padding-left: 15px;
|
||||
margin: 0 15px 0 75px;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
|
||||
ion-textarea{
|
||||
margin: 0 !important;
|
||||
align-self: center;
|
||||
}
|
||||
}
|
||||
|
||||
ion-textarea{
|
||||
min-height: 50px;
|
||||
margin: 0 !important;
|
||||
align-self: center;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
.btn-send{
|
||||
padding-right: 20px !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import { FileService } from 'src/app/services/functions/file.service';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { PreviewCameraPage } from 'src/app/modals/preview-camera/preview-camera.page';
|
||||
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
|
||||
|
||||
/*
|
||||
import * as pdfjsLib from 'pdfjs-dist';
|
||||
@@ -769,7 +770,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
sliderOpts = {
|
||||
zoom: false,
|
||||
slidesPerView: 1.5,
|
||||
@@ -778,7 +779,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
};
|
||||
zoomActive = false;
|
||||
zoomScale = 1;
|
||||
|
||||
|
||||
sliderZoomOpts = {
|
||||
allowSlidePrev: false,
|
||||
allowSlideNext: false,
|
||||
@@ -786,44 +787,44 @@ sliderZoomOpts = {
|
||||
maxRatio: 5
|
||||
},
|
||||
on: {
|
||||
zoomChange: (scale, imageEl, slideEl) => {
|
||||
zoomChange: (scale, imageEl, slideEl) => {
|
||||
this.zoomActive = true;
|
||||
this.zoomScale = scale/5;
|
||||
this.changeDetectorRef.detectChanges();
|
||||
this.changeDetectorRef.detectChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async touchEnd(zoomslides: IonSlides, card) {
|
||||
// Zoom back to normal
|
||||
const slider = await zoomslides.getSwiper();
|
||||
const zoom = slider.zoom;
|
||||
zoom.out();
|
||||
|
||||
|
||||
// Card back to normal
|
||||
card.el.style['z-index'] = 9;
|
||||
|
||||
|
||||
this.zoomActive = false;
|
||||
this.changeDetectorRef.detectChanges();
|
||||
}
|
||||
|
||||
|
||||
touchStart(card) {
|
||||
// Make card appear above backdrop
|
||||
card.el.style['z-index'] = 11;
|
||||
}
|
||||
|
||||
async openPreview(img) {
|
||||
const modal = await this.modalController.create({
|
||||
component: PreviewCameraPage,
|
||||
cssClass: 'transparent-modal',
|
||||
componentProps: {
|
||||
image: img.attachments[0].image_url,
|
||||
username: img.u.username,
|
||||
_updatedAt: img._updatedAt
|
||||
}
|
||||
});
|
||||
modal.present();
|
||||
}
|
||||
async openPreview(msg) {
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewMediaPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
componentProps: {
|
||||
image: msg.attachments[0].image_url,
|
||||
username: msg.u.name,
|
||||
_updatedAt: msg._updatedAt,
|
||||
}
|
||||
});
|
||||
modal.present();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ export class ContactsPage implements OnInit {
|
||||
}
|
||||
|
||||
openMessagesPage(username:string){
|
||||
if( window.innerWidth <= 1024){
|
||||
if( window.innerWidth < 701){
|
||||
this.createRoom(username);
|
||||
}
|
||||
else{
|
||||
@@ -117,29 +117,19 @@ export class ContactsPage implements OnInit {
|
||||
this.chatService.createRoom(body).subscribe(res => {
|
||||
console.log(res);
|
||||
this.room = res['room'];
|
||||
this.getDirectMessage(this.room._id);
|
||||
this.openMessagesModal(this.room._id);
|
||||
});
|
||||
}
|
||||
getDirectMessage(roomId:any){
|
||||
console.log(roomId);
|
||||
|
||||
this.chatService.getAllDirectMessages().subscribe(res=>{
|
||||
let result = res['ims'].filter(data => data._id == roomId);
|
||||
this.dm = result[0];
|
||||
console.log(this.dm);
|
||||
this.openModal(this.dm);
|
||||
});
|
||||
}
|
||||
async openModal(dm:any){
|
||||
this.close();
|
||||
console.log(dm);
|
||||
async openMessagesModal(roomId: any) {
|
||||
|
||||
console.log(roomId);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: MessagesPage,
|
||||
cssClass: 'group-messages',
|
||||
backdropDismiss: false,
|
||||
cssClass: 'modal modal-desktop isMessagesChatOpened',
|
||||
componentProps: {
|
||||
dm: dm,
|
||||
roomId: roomId,
|
||||
},
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
@@ -121,25 +121,25 @@
|
||||
<ion-fab-button (click)="bookMeeting()" color="light">
|
||||
<ion-icon name="calendar"></ion-icon>
|
||||
</ion-fab-button>
|
||||
<ion-fab-button hidden (click)="addFile()" color="light">
|
||||
<!-- <ion-fab-button hidden (click)="addFile()" color="light">
|
||||
<ion-icon name="document"></ion-icon>
|
||||
</ion-fab-button>
|
||||
<ion-fab-button (click)="addImage()" color="light">
|
||||
</ion-fab-button> -->
|
||||
<!-- <ion-fab-button (click)="addImage()" color="light">
|
||||
<ion-icon name="image"></ion-icon>
|
||||
</ion-fab-button>
|
||||
<ion-fab-button (click)="takePicture()" color="light">
|
||||
</ion-fab-button> -->
|
||||
<!-- <ion-fab-button (click)="takePicture()" color="light">
|
||||
<ion-icon name="camera"></ion-icon>
|
||||
</ion-fab-button>
|
||||
</ion-fab-button> -->
|
||||
<ion-fab-button (click)="addFileWebtrix()" color="light">
|
||||
<ion-icon src="assets/icon/webtrix.svg"></ion-icon>
|
||||
</ion-fab-button>
|
||||
</ion-fab-list>
|
||||
</ion-fab>
|
||||
|
||||
</div>
|
||||
<div class="width-80">
|
||||
|
||||
<div class="width-100">
|
||||
<ion-item class="ion-no-padding type-message" lines="none">
|
||||
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||||
<ion-textarea (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||||
<button hidden class="btn-no-color" (click)="notImplemented()">
|
||||
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
@@ -179,10 +179,11 @@
|
||||
ion-footer{
|
||||
padding-top: 7.5px;
|
||||
padding-bottom: 7.5px;
|
||||
|
||||
.container{
|
||||
justify-content: center;
|
||||
justify-content: space-evenly;
|
||||
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.chat-icon-options{
|
||||
@@ -203,14 +204,15 @@
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 25px;
|
||||
padding-left: 15px;
|
||||
margin: 0 15px 0 60px;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
|
||||
ion-textarea{
|
||||
margin: 0 !important;
|
||||
align-self: center;
|
||||
ion-textarea{
|
||||
margin: 0 !important;
|
||||
align-self: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -735,7 +735,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
cssClass: 'modal modal-desktop',
|
||||
componentProps: {
|
||||
image: msg.attachments[0].image_url,
|
||||
username: msg.u.username,
|
||||
username: msg.u.name,
|
||||
_updatedAt: msg._updatedAt
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { analyzeAndValidateNgModules } from '@angular/compiler';
|
||||
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { ModalController, NavParams, PickerController, PopoverController } from '@ionic/angular';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
import { DataService } from 'src/app/services/data.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { GroupDurationPage } from 'src/app/shared/popover/group-duration/group-duration.page';
|
||||
import { GroupContactsPage } from '../group-messages/group-contacts/group-contacts.page';
|
||||
|
||||
@@ -22,6 +24,7 @@ export class NewGroupPage implements OnInit{
|
||||
countDownTime:any;
|
||||
//groupName:string;
|
||||
task:any;
|
||||
documents: any;
|
||||
|
||||
@Input() groupName:string;
|
||||
@Output() addGroupMessage:EventEmitter<any> = new EventEmitter<any>();
|
||||
@@ -32,31 +35,42 @@ export class NewGroupPage implements OnInit{
|
||||
private modalController: ModalController,
|
||||
private chatService: ChatService,
|
||||
private dataService:DataService,
|
||||
private processesService: ProcessesService,
|
||||
private router: Router,
|
||||
)
|
||||
{
|
||||
this.isGroupCreated = false;
|
||||
//this.groupName = this.navParams.get('name');
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
if(this.dataService.get("newGroup")){
|
||||
this.task = this.dataService.get("task");
|
||||
this.groupName = this.task.Folio;
|
||||
}
|
||||
console.log(this.task);
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart && event.url.startsWith('/home/chat')) {
|
||||
if (this.dataService.get("newGroup")) {
|
||||
this.task = this.dataService.get("task");
|
||||
this.groupName = this.task.Folio;
|
||||
this.documents = this.dataService.get("documents");
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.dataService.set("newGroup", false);
|
||||
}
|
||||
});
|
||||
|
||||
console.log(this.task);
|
||||
}
|
||||
|
||||
/* ngOnDestroy(){
|
||||
alert('Destroy')
|
||||
this.dataService.set("newGroup", false);
|
||||
this.dataService.set("task", null);
|
||||
this.dataService.set("newGroupName", '');
|
||||
} */
|
||||
|
||||
_ionChange(event){
|
||||
console.log(event);
|
||||
console.log(event.detail.checked);
|
||||
this.showDuration = event.detail.checked;
|
||||
this.showDuration = event.detail.checked;
|
||||
|
||||
if(event.detail.checked){
|
||||
this.thedate = new Date();
|
||||
@@ -74,6 +88,8 @@ export class NewGroupPage implements OnInit{
|
||||
|
||||
createGroup(){
|
||||
let name = this.groupName.split(' ').join('-');
|
||||
//Take out all special characters in string
|
||||
name = name.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
||||
let body = { "name":name, }
|
||||
this.chatService.addGroup(body).subscribe(res=>{
|
||||
console.log('group created');
|
||||
@@ -90,6 +106,43 @@ export class NewGroupPage implements OnInit{
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
|
||||
if(this.documents.length > 0){
|
||||
//If there is documents add
|
||||
this.documents.forEach(async document => {
|
||||
|
||||
let url = await this.processesService.GetDocumentUrl(document.DocId, document.ApplicationId).toPromise();
|
||||
let url_no_options: string = url.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
|
||||
let body = {
|
||||
"message":
|
||||
{
|
||||
"rid": res['group']._id,
|
||||
"msg": "",
|
||||
"attachments": [{
|
||||
"title": document.Assunto,
|
||||
"description": document.DocTypeDesc,
|
||||
"title_link": url_no_options,
|
||||
"title_link_download": true,
|
||||
//"thumb_url": "assets/images/webtrix-logo.png",
|
||||
"message_link": url_no_options,
|
||||
"type": "webtrix"
|
||||
}],
|
||||
"file":{
|
||||
"name": document.Assunto,
|
||||
"type": "application/webtrix",
|
||||
"ApplicationId": document.ApplicationType,
|
||||
"DocId": document.Id,
|
||||
"Assunto": document.Assunto,
|
||||
}
|
||||
}
|
||||
}
|
||||
this.chatService.sendMessage(body).toPromise();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
this.parecerList.push(task);
|
||||
|
||||
});
|
||||
|
||||
this.pedidosstore.resetparecer(this.sortService.sortDate(this.parecerList, 'CreateDate'));
|
||||
@@ -114,7 +115,7 @@ export class PedidosPage implements OnInit {
|
||||
this.deferimentoList.push(task);
|
||||
});
|
||||
|
||||
|
||||
|
||||
this.pedidosstore.resetdeferimento(this.sortService.sortDate(this.deferimentoList, 'CreateDate'));
|
||||
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.div-top-header{
|
||||
margin: 0 em(20px);
|
||||
// background-color: #0782c9;
|
||||
padding-top: em(15px);
|
||||
//padding-top: em(15px);
|
||||
border: 0!important;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button (click)="takePicture()" full class="btn-ok" shape="round" >Tirar Fotografia</button>
|
||||
<button hidden (click)="takePicture()" full class="btn-ok" shape="round" >Tirar Fotografia</button>
|
||||
<button hidden (click)="addFile()" class="btn-ok" shape="round" >Anexar Documento</button>
|
||||
<button (click)="anexarFoto()" full class="btn-ok" shape="round" >Anexar Fotografia</button>
|
||||
<button hidden (click)="anexarFoto()" full class="btn-ok" shape="round" >Anexar Fotografia</button>
|
||||
<button (click)="addDocGestaoDocumental()" class="btn-ok" shape="round" >Gestão Documental</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="bookMeeting()" class="btn-ok" shape="round" >Novo Evento</button>
|
||||
|
||||
@@ -17,6 +17,7 @@ import { TaskService } from 'src/app/Rules/task.service'
|
||||
import { ExpedienteService } from 'src/app/Rules/expediente.service';
|
||||
import { PermissionService } from 'src/app/services/worker/permission.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -66,8 +67,20 @@ export class OptsExpedientePage implements OnInit {
|
||||
};
|
||||
}
|
||||
|
||||
openNewGroupPage(){
|
||||
async openNewGroupPage(){
|
||||
console.log(this.fulltask);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: NewGroupPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
componentProps: {
|
||||
name: this.task.Folio,
|
||||
task: this.task,
|
||||
documents: this.fulltask.Documents,
|
||||
},
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
close() {
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" *ngIf="task.WorkflowName == 'Pedido de Parecer do Presidente'">Iniciar Conversa</button>
|
||||
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Parecer'">
|
||||
@@ -54,8 +55,8 @@
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
|
||||
</div>
|
||||
<!-- <div *ngIf="task.WorkflowName == 'Pedido de Parecer do Presidente'" class="buttons">
|
||||
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -112,18 +112,20 @@ export class RequestOptionsPage implements OnInit {
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
openNewGroupPage(){
|
||||
this.router.navigate(['/home/chat']);
|
||||
this.dataService.set("newGroup", true);
|
||||
|
||||
if( window.innerWidth < 801){
|
||||
this.newGroup();
|
||||
}
|
||||
else{
|
||||
this.dataService.set("newGroup", true);
|
||||
/* this.closeAllDesktopComponents();
|
||||
this.showNewGroup=true; */
|
||||
}
|
||||
async openNewGroupPage(){
|
||||
const modal = await this.modalController.create({
|
||||
component: NewGroupPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
componentProps: {
|
||||
name: this.task.Folio,
|
||||
task: this.task,
|
||||
documents: this.fulltask.Documents,
|
||||
},
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then( () => {
|
||||
this.popoverController.dismiss('close');
|
||||
});
|
||||
}
|
||||
|
||||
async newGroup(){
|
||||
|
||||
@@ -28,27 +28,27 @@ export class NewActionPage implements OnInit {
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
|
||||
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
|
||||
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
|
||||
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
||||
|
||||
|
||||
|
||||
@Output() closeDesktopComponent= new EventEmitter<any>();
|
||||
@Output() getActions= new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private publication: PublicationsService,
|
||||
private toastService: ToastService
|
||||
) {
|
||||
) {
|
||||
this.folder = new PublicationFolder();
|
||||
|
||||
|
||||
this.folder = Object.assign(this.folder, {
|
||||
DateBegin: moment(new Date()),
|
||||
DateEnd: moment(new Date(new Date().getTime() + 15 * 60000)),
|
||||
DateBegin: new Date().toISOString(),
|
||||
DateEnd: (new Date(new Date().getTime() + 15 * 60000)).toISOString(),
|
||||
})
|
||||
|
||||
}
|
||||
@@ -76,9 +76,15 @@ export class NewActionPage implements OnInit {
|
||||
return ['ok']
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true
|
||||
this.validateFrom = true;
|
||||
if((new Date(this.folder.DateBegin).getTime()) > (new Date(this.folder.DateEnd).getTime())){
|
||||
this.toastService._badRequest("A data de início não pode ser superior a data de fim");
|
||||
}
|
||||
else if(new Date(this.folder.DateBegin).getTime() > new Date().getTime()){
|
||||
this.toastService._badRequest("A data de início não pode ser superior a data actual");
|
||||
}
|
||||
}
|
||||
|
||||
injectValidation() {
|
||||
@@ -119,21 +125,21 @@ export class NewActionPage implements OnInit {
|
||||
ActionType: this.segment,
|
||||
}
|
||||
console.log(this.folder);
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.publication.CreatePublicationFolder(this.folder).toPromise()
|
||||
this.close();
|
||||
this.toastService.successMessage('Acção presidencial criada')
|
||||
this.toastService._successMessage('Acção presidencial criada')
|
||||
|
||||
this.getActions.emit()
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Não foi possivel criar a acção presidencial')
|
||||
this.toastService._badRequest('Não foi possivel criar a acção presidencial')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
close(){
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="ion-item-container-no-border hide-desktop">
|
||||
<div class="ion-item-container-no-border">
|
||||
<ion-label (click)="laodPicture()" class="cursor-pointer">
|
||||
<div class="attach-icon">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-add-photos.svg"></ion-icon>
|
||||
|
||||
@@ -309,7 +309,7 @@ export class NewPublicationPage implements OnInit {
|
||||
clear(){
|
||||
this.capturedImage = '';
|
||||
}
|
||||
|
||||
|
||||
setTitle(){
|
||||
if(this.publicationType == '1') {
|
||||
this.publicationTitle = 'Nova Publicação Rápida';
|
||||
|
||||
@@ -1,24 +1,33 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<div class="main-header">
|
||||
<div class="title-content d-flex flex-end">
|
||||
<div class="title-content">
|
||||
<!-- <div class="back-icon" (click)="goBack()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</div> -->
|
||||
<div *ngIf="item" class="div-title flex-grow-1">
|
||||
<ion-label class="title">{{item.Description}}</ion-label>
|
||||
<div *ngIf="item" class="div-title width-100 flex-grow-1">
|
||||
<div class="title">
|
||||
<ion-label>{{item.Description}}</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="actions-icon">
|
||||
<!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> -->
|
||||
<button class="btn-no-color" (click)="openEditPublication(item.ProcessId)">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
|
||||
</button>
|
||||
<button class="btn-no-color" (click)="deletePublication(item.ProcessId)">
|
||||
<ion-icon class="delete" src='assets/images/theme/gov/icons-delete.svg'></ion-icon>
|
||||
</button>
|
||||
<button class="btn-no-color cursor-pointer" (click)="doRefresh($event)">
|
||||
<ion-icon class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
</button >
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-body width-100">
|
||||
<p class="item-content-detail">{{item.Detail}}</p>
|
||||
<p class="item-content-date">{{ item.DateBegin | date: 'dd-MM-yy | HH:mm'}}</p>
|
||||
</div>
|
||||
<div class="actions-icon ">
|
||||
<!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> -->
|
||||
<button class="btn-no-color cursor-pointer" (click)="AddPublication('2',item.ProcessId)">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/icons-add.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/icons-add.svg'></ion-icon>
|
||||
</button>
|
||||
<button class="btn-no-color cursor-pointer" (click)="doRefresh($event)">
|
||||
<ion-icon class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
</button >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
@@ -52,10 +61,17 @@
|
||||
<p>{{publication.Message}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="center height-100" *ngIf="!publicationList">
|
||||
<p>{{error}}</p>
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
<!-- fab placed to the bottom end -->
|
||||
<ion-fab vertical="bottom" horizontal="end">
|
||||
<ion-fab-button (click)="AddPublication('2',item.ProcessId)">
|
||||
<ion-icon name="add"></ion-icon>
|
||||
</ion-fab-button>
|
||||
</ion-fab>
|
||||
</ion-content>
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
overflow:hidden;
|
||||
padding: 25px 20px 0px 20px;
|
||||
color:#000;
|
||||
|
||||
}
|
||||
.main-container{
|
||||
width: 100%;
|
||||
@@ -86,22 +85,30 @@
|
||||
.back-icon{
|
||||
float: left;
|
||||
font-size: 35px;
|
||||
|
||||
|
||||
}
|
||||
.div-title{
|
||||
/* padding: 0!important; */
|
||||
float: left;
|
||||
margin: 2.5px 0 0 5px;
|
||||
margin: 2.5px 0 0 0;
|
||||
overflow: auto;
|
||||
}
|
||||
.div-body{
|
||||
overflow: auto;
|
||||
}
|
||||
.title{
|
||||
width: fit-content;
|
||||
font-size: 25px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
.actions-icon{
|
||||
display: flex;
|
||||
width: fit-content;
|
||||
align-items: top;
|
||||
justify-content: flex-end;
|
||||
padding: 0 !important;
|
||||
float: right;
|
||||
}
|
||||
.actions-icon ion-icon{
|
||||
margin-left: 5px;
|
||||
@@ -157,10 +164,27 @@
|
||||
color: #797979;
|
||||
text-align: right;
|
||||
}
|
||||
.post-description{
|
||||
font-size: 13px;
|
||||
color: #000;
|
||||
}
|
||||
.post-description{
|
||||
font-size: 13px;
|
||||
color: #000;
|
||||
}
|
||||
ion-fab{
|
||||
overflow: auto !important;
|
||||
padding-right: 25px;
|
||||
padding-bottom: 15px;
|
||||
background: transparent !important;
|
||||
}
|
||||
ion-fab-button{
|
||||
--background: #FFB81C;
|
||||
--box-shadow: none;
|
||||
opacity: 0.7;
|
||||
}
|
||||
ion-fab-button:hover{
|
||||
--background: #FFB81C;
|
||||
opacity: 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ import { PublicationEventFolderStorage } from 'src/app/store/publication-event-f
|
||||
import { PublicationTravelFolderStore } from 'src/app/store/publication-travel-folder.service';
|
||||
import { PublicationPipe } from 'src/app/pipes/publication.pipe';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { EditActionPage } from 'src/app/pages/publications/edit-action/edit-action.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-publications',
|
||||
@@ -28,6 +30,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
@Input() folderId: string;
|
||||
@Output() addNewPublication = new EventEmitter<any>();
|
||||
@Output() editPublication = new EventEmitter<any>();
|
||||
@Output() openPublicationDetails= new EventEmitter<any>();
|
||||
@Output() goBackToViewPublications = new EventEmitter();
|
||||
@Output() closeDesktopComponent = new EventEmitter<any>();
|
||||
@@ -45,7 +48,8 @@ export class ViewPublicationsPage implements OnInit {
|
||||
private loadingController: LoadingService,
|
||||
private modalController: ModalController,
|
||||
private publications: PublicationsService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
this.item = new PublicationFolder();
|
||||
}
|
||||
@@ -89,12 +93,10 @@ export class ViewPublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
getPublicationDetail() {
|
||||
|
||||
setTimeout(() => {
|
||||
let allActions = this.publicationEventFolderStorage.list.concat(this.publicationTravelFolderService.list)
|
||||
this.item = allActions.find((e)=> e.ProcessId == this.folderId);
|
||||
},100);
|
||||
|
||||
this.publications.GetPresidentialAction(this.folderId).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.item = res;
|
||||
});
|
||||
}
|
||||
|
||||
getPublications() {
|
||||
@@ -151,6 +153,39 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async openEditPublication(folderId?:any){
|
||||
if( window.innerWidth < 701) {
|
||||
const modal = await this.modalController.create({
|
||||
component: EditActionPage,
|
||||
componentProps: {
|
||||
folderId: folderId,
|
||||
},
|
||||
cssClass: 'new-action modal modal-desktop',
|
||||
backdropDismiss: true
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(() => {
|
||||
//Do nothing
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.editPublication.emit(folderId);
|
||||
}
|
||||
}
|
||||
|
||||
async deletePublication(folderId?:any){
|
||||
const loader = this.toastService.loading();
|
||||
try {
|
||||
await this.publications.DeletePresidentialAction(folderId).toPromise();
|
||||
this.toastService._successMessage()
|
||||
} catch (e) {
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
|
||||
async viewPublicationDetail(publicationId:string) {
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user