mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix
This commit is contained in:
@@ -196,7 +196,7 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
|
||||
cancelTask() {
|
||||
this.modalController.dismiss(null);
|
||||
this.modalController.dismiss({action:'cancel'});
|
||||
}
|
||||
|
||||
runValidation() {
|
||||
|
||||
@@ -35,6 +35,7 @@ export interface ChatMessageInterface {
|
||||
msg: string;
|
||||
file?: any;
|
||||
ts: number;
|
||||
t?: string;
|
||||
u: {
|
||||
_id: string;
|
||||
username: string;
|
||||
|
||||
@@ -333,7 +333,7 @@ export class NewEventPage implements OnInit {
|
||||
CalendarName: new FormControl(this.postEvent.CalendarName, [
|
||||
Validators.required
|
||||
]),
|
||||
Date: new FormControl(new Date(this.postEvent.StartDate).getTime() <= new Date(this.postEvent.EndDate).getTime()? 'ok': null,[
|
||||
Date: new FormControl(new Date(this.postEvent.StartDate).getTime() < new Date(this.postEvent.EndDate).getTime()? 'ok': null,[
|
||||
Validators.required
|
||||
]),
|
||||
Categories: new FormControl(this.postEvent.Category, [
|
||||
|
||||
@@ -290,7 +290,7 @@ export class ChatPage implements OnInit {
|
||||
this.selectContact();
|
||||
}
|
||||
else {
|
||||
|
||||
this.showEmptyComponent = false;
|
||||
this.showContacts = true;
|
||||
}
|
||||
}
|
||||
@@ -301,6 +301,7 @@ export class ChatPage implements OnInit {
|
||||
}
|
||||
else {
|
||||
this.closeAllDesktopComponents();
|
||||
this.showEmptyComponent = false;
|
||||
this.showNewGroup = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,6 @@ ion-content{
|
||||
transform: translate3d(0, 1px, 0);
|
||||
|
||||
.title-content{
|
||||
width: 360px;
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
padding: 0 !important;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</div>
|
||||
<div class="middle-container" *ngIf="!showMessageOptions">
|
||||
<div class="middle add-ellipsis">
|
||||
<ion-label class="title">{{groupNameFormart}}</ion-label>
|
||||
<ion-label class="title">{{ ChatSystemService.getGroupRoom(roomId).name }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle-container-options" *ngIf="showMessageOptions">
|
||||
@@ -29,8 +29,8 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/icon/icons-user.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/icon/theme/gov/icons-user.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="header-bottom-contacts">
|
||||
<ion-label class="contacts-list" *ngFor="let member of members" >
|
||||
<div class="header-bottom-contacts" *ngIf="ChatSystemService.getGroupRoom(roomId)">
|
||||
<ion-label class="contacts-list" *ngFor="let member of ChatSystemService.getGroupRoom(roomId).membersExcludeMe" >
|
||||
{{member.name}},
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
@@ -523,7 +523,8 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res => {
|
||||
if (res.data == 'leave') {
|
||||
|
||||
this.close()
|
||||
this.ChatSystemService.deleteRoom(this.roomId)
|
||||
//this.ChatSystemService.subscribeToRoomUpdate(this.roomId, this.room);
|
||||
}
|
||||
else if (res.data == 'cancel') {
|
||||
@@ -534,7 +535,10 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
} else if (res.data == 'addUser') {
|
||||
|
||||
this.addContacts();
|
||||
}
|
||||
} else if (res.data == 'delete') {
|
||||
this.close()
|
||||
this.ChatSystemService.deleteRoom(this.roomId)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor="let event of listToPresent"
|
||||
(click)="goToEvent(event)"
|
||||
>
|
||||
<div class="d-flex event-box-content content-{{sessoStore.user.Profile}}-{{event.CalendarName}}">
|
||||
<div class="d-flex event-box-content content-{{agendaColor}}-{{event.CalendarName}}">
|
||||
|
||||
<div class="schedule-time">
|
||||
<div *ngIf="!event.IsAllDayEvent" class="time-start">{{event.StartDate | date: 'HH:mm'}}</div>
|
||||
@@ -229,12 +229,12 @@
|
||||
</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 event of listToPresent"
|
||||
(click)="goToEvent(event)"
|
||||
>
|
||||
<div class="d-flex content-{{sessoStore.user.Profile}}-{{event.CalendarName}}">
|
||||
|
||||
<div class="d-flex content-{{agendaColor}}-{{event.CalendarName}}">
|
||||
|
||||
<div class="schedule-time">
|
||||
<div *ngIf="!event.IsAllDayEvent" class="time-start">{{event.StartDate | date: 'HH:mm'}}</div>
|
||||
|
||||
@@ -66,6 +66,8 @@ export class EventsPage implements OnInit {
|
||||
showCorrespondenciasLoader = false
|
||||
loadingAllTask = false
|
||||
|
||||
agendaColor = ''
|
||||
|
||||
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Não lidos'
|
||||
showSearch = true;
|
||||
@@ -104,6 +106,11 @@ export class EventsPage implements OnInit {
|
||||
this.listToPresentexpediente = []
|
||||
})
|
||||
|
||||
|
||||
if(this.agendaColor != "PR") {
|
||||
this.agendaColor = "MDGPR"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
|
||||
@@ -482,7 +482,11 @@ export class DespachoPage implements OnInit {
|
||||
await this.distartExpedientModal();
|
||||
}
|
||||
|
||||
this.goBack();
|
||||
|
||||
if(res.data?.action != 'cancel') {
|
||||
this.goBack();
|
||||
}
|
||||
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
@@ -209,7 +209,7 @@ export class DiplomasGerarPage implements OnInit {
|
||||
this.httpErroHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
this.TaskService.loadDiplomas()
|
||||
loader.remove()
|
||||
},
|
||||
},
|
||||
error => {
|
||||
loader.remove()
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
|
||||
@@ -713,7 +713,7 @@
|
||||
Pendentes<br>
|
||||
<span class="new-task-count" *ngIf="TaskService.pendentesstore.newList.length >=2">{{
|
||||
TaskService.pendentesstore.newList.length}} correspondências novas</span>
|
||||
<span class="new-task-count" *ngIf="TaskService.pendentesstore.newList.length >=1">{{
|
||||
<span class="new-task-count" *ngIf="TaskService.pendentesstore.newList.length ==1">{{
|
||||
TaskService.pendentesstore.newList.length}} correspondência nova</span>
|
||||
</p>
|
||||
<p *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="text-center exp-card-title ">Meus
|
||||
|
||||
@@ -18,7 +18,6 @@ import { ChatService } from 'src/app/services/chat.service';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { FirstEnterService } from '../../services/first-enter.service';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { CPSession } from 'src/app/store/documentManagement';
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="folder.Description" placeholder="Assunto*" ></ion-input>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="container-div overflow-hidden">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
@@ -34,7 +34,7 @@
|
||||
<mat-form-field appearance="none" class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Data inicio*"
|
||||
[formControl]="dateControlStart"
|
||||
[(ngModel)]="dateControlStart"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" ></mat-datepicker-toggle>
|
||||
@@ -53,7 +53,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container-div">
|
||||
<div class="container-div overflow-hiddens">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
@@ -63,9 +63,9 @@
|
||||
<mat-form-field appearance="none" class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
placeholder="Data de fim*"
|
||||
[formControl]="dateControlEnd"
|
||||
[(ngModel)]="dateControlEnd"
|
||||
[disabled]="disabled"
|
||||
[min]="dateControlStart.value"
|
||||
[min]="dateControlStart"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim" ></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #fim
|
||||
|
||||
@@ -74,7 +74,6 @@ font-size: rem(25);
|
||||
}
|
||||
.container-div{
|
||||
margin-bottom: rem(15);
|
||||
overflow: auto;
|
||||
}
|
||||
.ion-item-container{
|
||||
margin: rem(15) auto;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import * as moment from 'moment';
|
||||
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
||||
import { PublicationsService } from 'src/app/services/publications.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
@@ -56,11 +55,11 @@ export class NewActionPage implements OnInit {
|
||||
showLoader = false
|
||||
|
||||
get dateStart () {
|
||||
return this.dateControlStart.value
|
||||
return this.dateControlStart
|
||||
}
|
||||
|
||||
get dateEnd () {
|
||||
return this.dateControlEnd.value
|
||||
return this.dateControlEnd
|
||||
}
|
||||
|
||||
constructor(
|
||||
@@ -74,8 +73,8 @@ export class NewActionPage implements OnInit {
|
||||
|
||||
this.folder = new PublicationFolder();
|
||||
|
||||
this.dateControlStart = new FormControl(this.roundTimeQuarterHour());
|
||||
this.dateControlEnd = new FormControl(this.roundTimeQuarterHourPlus15(this.dateControlStart.value));
|
||||
this.dateControlStart = this.roundTimeQuarterHour()
|
||||
this.dateControlEnd = this.roundTimeQuarterHourPlus15(this.dateControlStart)
|
||||
|
||||
|
||||
}
|
||||
@@ -96,7 +95,7 @@ export class NewActionPage implements OnInit {
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true;
|
||||
if(new Date(this.dateControlStart.value).getTime() > new Date(this.dateControlEnd.value).getTime()){
|
||||
if(new Date(this.dateControlStart).getTime() > new Date(this.dateControlEnd).getTime()){
|
||||
this.toastService._badRequest("A data de início não pode ser superior a data de fim");
|
||||
}
|
||||
}
|
||||
@@ -108,7 +107,7 @@ export class NewActionPage implements OnInit {
|
||||
Validators.required,
|
||||
// Validators.minLength(4)
|
||||
]),
|
||||
Date: new FormControl(this.dateValid, [
|
||||
Date: new FormControl( this.dateValid,[
|
||||
Validators.required
|
||||
]),
|
||||
Detail: new FormControl(this.folder.Detail, [
|
||||
@@ -129,8 +128,8 @@ export class NewActionPage implements OnInit {
|
||||
ProcessId: null,
|
||||
Description: this.folder.Description,
|
||||
Detail: this.folder.Detail,
|
||||
DateBegin: this.dateControlStart.value,
|
||||
DateEnd: this.dateControlEnd.value,
|
||||
DateBegin: this.dateControlStart,
|
||||
DateEnd: this.dateControlEnd,
|
||||
ActionType: this.segment,
|
||||
}
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ ion-toolbar{
|
||||
}
|
||||
|
||||
.item:hover{
|
||||
background-color: var(--box-hover-background-color) !important;
|
||||
background-color: var(--box-hover-background-color);
|
||||
}
|
||||
|
||||
ion-item-options{
|
||||
|
||||
@@ -502,6 +502,7 @@ export class MessageService {
|
||||
ts: this.ts,
|
||||
u: this.u,
|
||||
_id: this._id,
|
||||
t: this.t,
|
||||
id: this.id,
|
||||
hasFile: this.hasFile,
|
||||
origin: this.origin,
|
||||
|
||||
@@ -360,6 +360,12 @@ export class RoomService {
|
||||
|
||||
}
|
||||
|
||||
if(ChatMessage?.t == "au") {
|
||||
this.updateContacts()
|
||||
} else if (ChatMessage?.t == "r") {
|
||||
this.name = ChatMessage.msg
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
done()
|
||||
}, 5)
|
||||
@@ -949,14 +955,73 @@ export class RoomService {
|
||||
this.messageUnread = false
|
||||
}
|
||||
|
||||
addContacts(userId:any) {
|
||||
async addContacts(userId:any) {
|
||||
|
||||
let body = {
|
||||
"roomId": this.id,
|
||||
"userId": userId,
|
||||
}
|
||||
|
||||
return this.chatService.addUserToGroup(body).toPromise();
|
||||
await this.chatService.addUserToGroup(body).toPromise();
|
||||
this.ChatSystemService.getGroupRoom(this.id).updateContacts()
|
||||
}
|
||||
|
||||
|
||||
async updateContacts() {
|
||||
|
||||
let res
|
||||
let error = false
|
||||
|
||||
if(this.t == 'd') {
|
||||
|
||||
try {
|
||||
res = await this.chatService.getMembers(this.id).toPromise();
|
||||
} catch (e) {
|
||||
await this.chatService.refreshtoken();
|
||||
error = true
|
||||
}
|
||||
|
||||
if(error) {
|
||||
res = await this.chatService.getMembers(this.id).toPromise();
|
||||
}
|
||||
|
||||
} else {
|
||||
if (this.t === 'p') {
|
||||
|
||||
try {
|
||||
res = await this.chatService.getGroupMembers(this.id).toPromise()
|
||||
} catch (e) {
|
||||
await this.chatService.refreshtoken();
|
||||
error = true
|
||||
}
|
||||
|
||||
if(error) {
|
||||
res = await this.chatService.getGroupMembers(this.id).toPromise()
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
try {
|
||||
res = await this.chatService.getChannelMembers(this.id).toPromise()
|
||||
|
||||
} catch (e) {
|
||||
await this.chatService.refreshtoken();
|
||||
error = true
|
||||
}
|
||||
|
||||
if(error) {
|
||||
res = await this.chatService.getChannelMembers(this.id).toPromise()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const members = res['members'];
|
||||
const users = members.filter(data => data.username != this.sessionStore.user.UserName);
|
||||
this.members = members
|
||||
this.membersExcludeMe = users
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ export class EditEventPage implements OnInit {
|
||||
participantes: new FormControl(this.taskParticipants, [
|
||||
// Validators.required
|
||||
]),
|
||||
Date: new FormControl( new Date(this._postEvent.StartDate).toLocaleString('pt') <= new Date(this._postEvent.EndDate).toLocaleString('pt')? 'ok': null,[
|
||||
Date: new FormControl( new Date(this._postEvent.StartDate).toLocaleString('pt') < new Date(this._postEvent.EndDate).toLocaleString('pt')? 'ok': null,[
|
||||
Validators.required
|
||||
]),
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@ export class GroupContactsPage implements OnInit {
|
||||
"userId":user._id,
|
||||
}
|
||||
this.chatService.addUserToGroup(body).subscribe(res=>{
|
||||
|
||||
this.ChatSystemService.getGroupRoom(roomId).updateContacts()
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="main-header">
|
||||
<div class="header-top">
|
||||
<div class="middle">
|
||||
<ion-label class="title">{{groupNameFormart }}</ion-label>
|
||||
<ion-label class="title">{{ ChatSystemService.getGroupRoom(roomId).name }}</ion-label>
|
||||
</div>
|
||||
<div class="right">
|
||||
<button title="Menu" class="btn-no-color" (click)="openGroupMessagesOptions()">
|
||||
@@ -17,8 +17,8 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/icon/icons-user.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/icon/theme/gov/icons-user.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="header-bottom-contacts">
|
||||
<ion-label class="contacts-list" *ngFor="let member of members" >
|
||||
<div class="header-bottom-contacts" *ngIf="ChatSystemService.getGroupRoom(roomId)">
|
||||
<ion-label class="contacts-list" *ngFor="let member of ChatSystemService.getGroupRoom(roomId).membersExcludeMe" >
|
||||
{{member.name}},
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
@@ -109,19 +109,19 @@ export class ChatPopoverPage implements OnInit {
|
||||
}
|
||||
|
||||
//Delete
|
||||
deleteGroup(){
|
||||
let body = { "roomId":this.roomId, }
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
|
||||
deleteGroup() {
|
||||
let body = { "roomId":this.roomId }
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(room => {
|
||||
this.room = room['room'];
|
||||
|
||||
if(this.room.t === 'p') {
|
||||
this.chatService.deleteGroup(body).subscribe(res=>{
|
||||
this.ChatSystemService.deleteRoom(this.roomId)
|
||||
// this.ChatSystemService.deleteRoom(this.roomId)
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.chatService.deleteChannel(body).subscribe(res=>{
|
||||
this.ChatSystemService.deleteRoom(this.roomId)
|
||||
// this.ChatSystemService.deleteRoom(this.roomId)
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
placeholder="Data de fim*"
|
||||
[(ngModel)]="folder.DateEnd"
|
||||
[disabled]="disabled"
|
||||
[min]="folder.DateBegin"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-fim" matSuffix [for]="picker2" ></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #picker2
|
||||
|
||||
+22
-4
@@ -1476,12 +1476,30 @@ $font-size: rem(15);
|
||||
.mat-form-field {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
ngx-mat-datetime-content button.mat-stroked-button {
|
||||
top: -56px;
|
||||
margin-bottom: -35px;
|
||||
// date picker
|
||||
ngx-mat-datetime-content .actions {
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
top: -66px;
|
||||
margin-bottom: -44px;
|
||||
|
||||
button {
|
||||
z-index: 11111111;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ngx-mat-datetime-content .ngx-mat-timepicker {
|
||||
z-index: 111;
|
||||
}
|
||||
.mat-form-field-underline {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
ngx-mat-datetime-content .mat-input-element {
|
||||
padding: 0px !important;
|
||||
}
|
||||
pre {
|
||||
font-family: 'Roboto' !important;
|
||||
font-size: rem(16) !important;
|
||||
|
||||
Reference in New Issue
Block a user