This commit is contained in:
Peter Maquiran
2022-09-23 11:23:24 +01:00
113 changed files with 691545 additions and 784 deletions
@@ -254,6 +254,7 @@
placeholder="Choose a date"
[(ngModel)]="eventProcess.workflowInstanceDataFields.LastOccurrence"
[disabled]="disabled"
[min]="eventProcess.workflowInstanceDataFields.EndDate"
>
<mat-datepicker-toggle id="last-occurrence" matSuffix [for]="occurrrence"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #occurrrence
@@ -109,16 +109,17 @@ export class EditEventPage implements OnInit {
}
}
const result = this.participantsPipe.transform(this.postEvent.Attendees)
this.taskParticipants = result.taskParticipants
this.taskParticipantsCc = result.taskParticipantsCc
if (this.postEvent.Attendees != null) {
const result = this.participantsPipe.transform(this.postEvent.Attendees)
this.taskParticipants = result.taskParticipants
this.taskParticipantsCc = result.taskParticipantsCc
this.taskParticipants = removeDuplicate(this.taskParticipants);
this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
this.setIntervenient.emit(this.taskParticipants);
this.setIntervenientCC.emit(this.taskParticipantsCc);
this.taskParticipants = removeDuplicate(this.taskParticipants);
this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
this.setIntervenient.emit(this.taskParticipants);
this.setIntervenientCC.emit(this.taskParticipantsCc);
}
}
this.initCalendarName = this.postEvent.CalendarName;
@@ -127,14 +128,10 @@ export class EditEventPage implements OnInit {
this.getRecurrenceTypes();
this.postEvent.EventRecurrence.Type = this.postEvent.EventRecurrence.Type.toString();
// this.postEvent.EventRecurrence.LastOccurrence = this.currentDate;
setTimeout(() => {
this.postEvent.EventRecurrence.Type = this.postEvent.EventRecurrence.Type.toString();
}, 1000);
}, 500);
}
@@ -11,10 +11,10 @@
<ion-toolbar>
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
<ion-segment-button value="MDGPR">
Calendário do MDGPR
Meu Calendário
</ion-segment-button>
<ion-segment-button value="PR">
Presidente da República
Calendário Partilhado
</ion-segment-button>
</ion-segment>
</ion-toolbar>
@@ -123,9 +123,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"
@@ -155,9 +155,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"
@@ -133,22 +133,6 @@ export class NewEventPage implements OnInit {
this.loggeduser = userService.ValidatedUser;
this.postEvent = new Event();
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() {
@@ -347,10 +331,10 @@ export class NewEventPage implements OnInit {
});
}
close(){
close() {
this.deleteTemporaryData();
this.cloneAllmobileComponent.emit();
this.cloneAllmobileComponent.emit({roomId:this.roomId});
this.clearContact.emit();
this.setIntervenient.emit([]);
this.setIntervenientCC.emit([]);
@@ -475,8 +459,13 @@ export class NewEventPage implements OnInit {
"end": this.postEvent.EndDate,
"venue": this.postEvent.Location,
"id": id,
"calendarId": CalendarId
}
this.chatMethodService.sendMessage(this.roomId,data);
if(this.roomId) {
this.chatMethodService.sendMessage(this.roomId,data);
}
},
error => {
loader.remove()
@@ -488,10 +477,12 @@ export class NewEventPage implements OnInit {
else if(this.loggeduser.Profile == 'PR') {
const CalendarId = this.selectedCalendarId()
let loader = this.toastService.loading();
this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).subscribe(
(id) => {
loader.remove()
const eventId: any = id;
@@ -519,7 +510,24 @@ export class NewEventPage implements OnInit {
if(DocumentToSave.length == 0){
this.afterSave();
}
this.toastService._successMessage('Evento criado');
let data = {
"subject": this.postEvent.Subject,
"start": this.postEvent.StartDate,
"end": this.postEvent.EndDate,
"venue": this.postEvent.Location,
"id": id,
"calendarId": CalendarId
}
if(this.roomId) {
this.chatMethodService.sendMessage(this.roomId,data);
}
this.toastService._successMessage('Evento criado')
},()=>{
loader.remove()
this.showLoader = false
this.toastService._badRequest('Evento não criado')
});
} else {
@@ -527,10 +535,12 @@ export class NewEventPage implements OnInit {
const CalendarId = this.selectedCalendarId()
let loader = this.toastService.loading();
this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).subscribe(
(id) => {
loader.remove();
const eventId: any = id;
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
@@ -557,7 +567,24 @@ export class NewEventPage implements OnInit {
if(DocumentToSave.length == 0){
this.afterSave();
}
this.toastService._successMessage('Evento criado');
let data = {
"subject": this.postEvent.Subject,
"start": this.postEvent.StartDate,
"end": this.postEvent.EndDate,
"venue": this.postEvent.Location,
"id": id,
"calendarId": CalendarId
}
if(this.roomId) {
this.chatMethodService.sendMessage(this.roomId,data);
}
this.toastService._successMessage('Evento criado')
},()=>{
loader.remove()
this.showLoader = false
this.toastService._badRequest('Evento não criado')
});
}
@@ -580,7 +607,10 @@ export class NewEventPage implements OnInit {
afterSave() {
this.deleteTemporaryData();
this.onAddEvent.emit(this.postEvent);
this.onAddEvent.emit(Object.assign(this.postEvent, {
roomId: this.roomId
}));
this.GoBackEditOrAdd.emit();
this.setIntervenient.emit([]);
@@ -643,7 +673,7 @@ export class NewEventPage implements OnInit {
return true;
} else {
return false;
}
}
@@ -36,12 +36,13 @@
<span class="date">{{loadedEvent.Location}}</span>
<div *ngIf="loadedEvent.Organizer">
<div *ngIf="eventsService.isMyEvent(loadedEvent) == false">
<div *ngIf="eventsService.isMyEvent(loadedEvent) == false || sesseionStora.user.Profile =='PR'">
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #99e47b;">{{loadedEvent.CalendarName}}</span>
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #958bfc;">{{loadedEvent.CalendarName}}</span>
</div>
<div *ngIf="eventsService.isMyEvent(loadedEvent) == true">
<div *ngIf="eventsService.isMyEvent(loadedEvent) == true && sesseionStora.user.Profile !='PR'">
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #ffb703;">{{loadedEvent.CalendarName}}</span>
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #f05d5e;">{{loadedEvent.CalendarName}}</span>
</div>
@@ -89,8 +89,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>
</div>
@@ -112,10 +116,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">
@@ -134,8 +139,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">
@@ -164,7 +173,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>
@@ -202,7 +211,7 @@
<!-- <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 />
<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>
@@ -230,10 +239,8 @@
</ion-content>
<ion-footer>
<!-- <div class="typing" *ngIf="wsChatMethodsService.getGroupRoom(roomId).otherUserType == true" >A escrever...</div> -->
<div class="typing" *ngIf="wsChatMethodsService.getGroupRoom(roomId).otherUserType == true">
{{ wsChatMethodsService.getGroupRoom(roomId).otherUserType }}
<ngx-letters-avatar *ngIf="showAvatar"
[avatarName]= "wsChatMethodsService.getGroupRoom(roomId).name"
@@ -213,7 +213,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
} catch (err) { }
}
async goToEvent(eventId: any) {
async goToEvent(event: any) {
let classs;
if (window.innerWidth < 701) {
classs = 'modal modal-desktop'
@@ -224,7 +224,8 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
const modal = await this.modalController.create({
component: ViewEventPage,
componentProps: {
eventId: eventId,
eventId: event.id,
CalendarId: event.calendarId
},
cssClass: classs,
});
@@ -1103,19 +1104,21 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
async openPreview(msg) {
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 === '') {
this.downloadFileMsg(msg)
//this.testDownlod(msg)
} else {
var str = msg.attachments[0].image_url;
str = str.substring(1, ((str.length) - 1));
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log(msg)
if (msg.file.type == "application/img") {
const modal = await this.modalController.create({
@@ -1136,17 +1139,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
this.openFile(str, msg.attachments[0].name, msg.file.type);
}
/* const modal = await this.modalController.create({
component: ViewMediaPage,
cssClass: 'modal modal-desktop',
componentProps: {
image: str,
type: msg.file.type,
username: msg.u.name,
_updatedAt: msg._updatedAt
}
});
modal.present(); */
}
}
@@ -2,9 +2,9 @@
<ion-toolbar class="header-toolbar">
<div class="main-header">
<div class="title-content">
<div class="back-icon cursor-pointer">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " (click)="close()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " (click)="close()" slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
<div class="back-icon cursor-pointer" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<div class="div-title">
<ion-label class="title">Nova Conversa</ion-label>
@@ -22,10 +22,10 @@
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<ion-refresher-content>
</ion-refresher-content>
</ion-refresher>
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<ion-refresher-content>
</ion-refresher-content>
</ion-refresher>
<div class="main-content">
@@ -36,11 +36,10 @@
</div>
<div (click)="openMessagesPage(user.username)" *virtualItem="let user" class="item-user cursor-pointer">
<p>{{user.name}}</p>
<span class="icon">
<ion-icon class="{{user.status}}" slot="end" name="ellipse"></ion-icon>
</span>
<p>{{user.name}}</p>
<span class="icon">
<ion-icon class="{{user.status}}" slot="end" name="ellipse"></ion-icon>
</span>
</div>
</ion-virtual-scroll>
@@ -27,6 +27,7 @@ export class ContactsPage implements OnInit {
sessionStore = SessionStore
@Output() openMessage:EventEmitter<any> = new EventEmitter<any>();
@Output() emptyTextDescriptionOpen:EventEmitter<any> = new EventEmitter<any>();
constructor(
private modalController: ModalController,
@@ -41,10 +42,12 @@ export class ContactsPage implements OnInit {
this.room=null;
}
ngOnInit() {
async ngOnInit() {
this.loadUsers();
this.chatService.refreshtoken();
await this.chatService.refreshtoken();
this.loadUsers();
}
onChange(event){
@@ -67,11 +70,11 @@ export class ContactsPage implements OnInit {
}
}
loadUsers(){
loadUsers() {
this.options = {
headers: this.headers,
};
this.chatService.getAllUsers().subscribe((res:any)=>{
this.chatService.getAllUsers().subscribe((res:any)=> {
//this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName);
this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName);
@@ -96,20 +99,20 @@ export class ContactsPage implements OnInit {
let first_prev = records[recordIndex - 1].name[0];
let first_current = record.name[0];
if(first_prev != first_current){
if(first_prev != first_current) {
return first_current;
}
return null;
}
doRefresh(event){
doRefresh(event) {
}
close(){
this.modalController.dismiss();
close() {
this.emptyTextDescriptionOpen.emit();
}
clicked(){
clicked() {
}
+24 -12
View File
@@ -38,6 +38,7 @@
<div class="messages-list-item-wrapper container-width-100"
*ngFor="let msg of wsChatMethodsService.getDmRoom(roomId).messages; index as i; let last = last">
<div class='message-item incoming-{{msg.u.username!=sessionStore.user.UserName}} max-width-45' *ngIf="msg.msg !=''">
<div class="message-item-options d-flex justify-content-end">
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer">
@@ -89,8 +90,13 @@
<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,14 +114,18 @@
<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">
<span *ngIf="msg.file.type">
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon">
@@ -137,8 +147,13 @@
<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>s
<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">
@@ -164,13 +179,14 @@
{{last ? scrollToBottom() : ''}}
</div>
</div>
<div class="info-meeting" *ngIf="msg.file.type == 'application/meeting'">
<ion-label *ngIf="msg.delate == true" class="info-meeting-small">Apagou a mensagem</ion-label><br />
<ion-label *ngIf="msg.delate == false" class="info-meeting-small">{{msg.u.name}} criou esta reunião</ion-label><br />
<button *ngIf="msg.delate == false" (click)="goToEvent(msg.file.id)" class="btn-no-color info-meeting-normal">
<button *ngIf="msg.delate == false" (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 *ngIf="msg.delate == false" class="info-meeting-medium">
@@ -214,14 +230,10 @@
<div class="width-100 pl-20 pr-20">
<span *ngIf="!lastAudioRecorded">{{durationDisplay}}</span>
<div class=" audioDiv d-flex width-100 mt-10 mb-10" *ngIf="lastAudioRecorded">
<!-- <button class="audioButtonPlay" fill="clear" (click)="start(audioRecorded)" *ngIf="!isPlaying"> <ion-icon slot="icon-only" name="play"></ion-icon> </button>
<button class="audioButtonPlay" fill="clear" (click)="togglePlayer(true)" *ngIf="isPlaying"> <ion-icon slot="icon-only" name="pause"></ion-icon> </button> -->
<div (click)="start(audioRecorded)" *ngIf="!isPlaying" > <ion-icon slot="icon-only" name="play"></ion-icon> </div>
<div (click)="togglePlayer(isPlaying)" *ngIf="isPlaying"> <ion-icon slot="icon-only" name="pause"></ion-icon> </div>
<!-- <label>{{audioDuration}}</label> -->
<ion-range #range [(ngModel)]="audioProgress" max="100" (mouseup)="seek()"></ion-range>
</div>
<!-- <audio [src]="audioRecorded" class="d-flex width-100 mt-10 mb-10" *ngIf="lastAudioRecorded" controls controlsList="nodownload noplaybackrate"></audio> -->
</div>
<div class="container width-100 d-flex">
+34 -56
View File
@@ -27,11 +27,10 @@ import { DocumentViewer, DocumentViewerOptions } from '@ionic-native/document-vi
import { VoiceRecorder, RecordingData, GenericResponse } from 'capacitor-voice-recorder';
import { Filesystem, Directory } from '@capacitor/filesystem';
import { DomSanitizer } from '@angular/platform-browser';
import { AlertController, Platform } from '@ionic/angular';
import { Platform } from '@ionic/angular';
import { File } from '@awesome-cordova-plugins/file/ngx';
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
import { SessionStore } from 'src/app/store/session.service';
import { HttpErrorResponse } from '@angular/common/http';
import { Howl } from 'howler';
import { runInThisContext } from 'vm';
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
@@ -49,8 +48,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
@ViewChild('scrollMe') private myScrollContainer: ElementRef;
@ViewChild('message-item') messageContainer: ElementRef;
loggedUser: any;
messages: any;
dm: any;
userPresence = '';
@@ -100,6 +97,10 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
audioTimer: any;
@ViewChild('range', { static: false }) range: IonRange;
userName = "";
room: any = new Array();
roomName: any;
isAdmin = false;
roomCountDownDate: string;
constructor(
public popoverController: PopoverController,
@@ -123,12 +124,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
private platform: Platform,
private fileOpener: FileOpener,
) {
this.loggedUser = authService.ValidatedUserChat['data'];
this.checkAudioPermission()
}
ngOnChanges(changes: SimpleChanges): void {
this.wsChatMethodsService.getAllRooms();
this.wsChatMethodsService.getDmRoom(this.roomId).loadHistory({})
this.wsChatMethodsService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
@@ -165,11 +166,11 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
async ngOnInit() {
this.wsChatMethodsService.getAllRooms();
alert(this.wsChatMethodsService.getDmRoom(this.roomId).name)
this.chatService.refreshtoken();
this.scrollToBottom();
this.getChatMembers();
this.deleteRecording();
@@ -375,7 +376,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
return this.timeService.showDateDuration(start);
}
async goToEvent(eventId: any) {
async goToEvent(event: any) {
let classs;
if (window.innerWidth < 701) {
classs = 'modal modal-desktop'
@@ -385,7 +386,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
const modal = await this.modalController.create({
component: ViewEventPage,
componentProps: {
eventId: eventId,
eventId: event.id,
CalendarId: event.calendarId
},
cssClass: classs,
});
@@ -441,22 +443,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
deleteMessage(msgId: string, msg: MessageService) {
this.wsChatMethodsService.getDmRoom(this.roomId).sendDeleteRequest(msgId)
if (msg.file.type == "application/webtrix") {
// this.openViewDocumentModal(msg.file);
}
else {
var str = msg.attachments[0].image_url;
str = str.substring(1, ((str.length) - 1));
const encodedData = btoa(str);
let file = this.base64toBlob(encodedData, 'application/pdf')
let fileURL = URL.createObjectURL(file)
window.open(fileURL);
}
}
base64toBlob(base64Data, contentType) {
@@ -667,7 +653,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
const roomId = this.roomId
const image = await this.CameraService.takePicture();
await this.fileService.saveImage(image)
await this.fileService.saveImage(image);
const lastphoto: any = await this.fileService.loadFiles();
const { capturedImage, capturedImageTitle } = await this.fileService.loadFileData(lastphoto);
const base64 = await fetch(capturedImage);
@@ -1028,33 +1014,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
if (!msg.attachments[0].image_url || msg.attachments[0].image_url === null || msg.attachments[0].image_url === '') {
this.downloadFileMsg(msg)
/* } else if (msg.file.type === "application/pdf") {
const win = window.open("", "_blank");
let html = '';
html += '<html>';
html += '<body style="margin:0!important">';
html += '<iframe width="100%" height="100%" src="' + str + '" type="application/pdf" />';
html += '</body>';
html += '</html>';
setTimeout(() => {
win.document.write(html);
}, 0); */
//this.viewDocument(msg, msg.attachments.image_url)
} else {
var str = msg.attachments[0].image_url;
str = str.substring(1, ((str.length) - 1));
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log(msg)
if (msg.file.type == "application/img") {
const modal = await this.modalController.create({
@@ -1079,19 +1044,11 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
}
}
testEditMessage(msg: MessageService) {
// msg.receptorReceive()
// alert('cool!')
}
start(track) {
if (this.audioPlay) {
this.audioPlay.stop();
@@ -1138,6 +1095,27 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}, 1000)
}
async getRoomInfo() {
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({});
let room = await this.chatService.getRoomInfo(this.roomId).toPromise();
// console.log('ROOM',room)
this.room = room['room'];
if (this.room.name) {
this.roomName = this.room.name.split('-').join(' ');
}
if(SessionStore.user.ChatData.data.userId == this.room.u._id){
this.isAdmin = true
} else {
this.isAdmin = false
}
if (this.room.customFields.countDownDate) {
this.roomCountDownDate = this.room.customFields.countDownDate;
}
}
}
+66 -35
View File
@@ -29,6 +29,8 @@ export class NewGroupPage implements OnInit{
@Input() groupName:string;
@Output() addGroupMessage:EventEmitter<any> = new EventEmitter<any>();
@Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>();
constructor(
private pickerController: PickerController,
@@ -59,10 +61,8 @@ export class NewGroupPage implements OnInit{
}
});
}
_ionChange(event){
@@ -76,9 +76,8 @@ export class NewGroupPage implements OnInit{
}
}
close(){
//this.modalController.dismiss();
close() {
this.addGroupMessage.emit();
}
@@ -91,6 +90,9 @@ export class NewGroupPage implements OnInit{
let customFields = {}
let res:any;
const loader = this.toastService.loading();
if(this.thedate) {
let customFields = {
"countDownDate":this.thedate
@@ -102,6 +104,8 @@ export class NewGroupPage implements OnInit{
}
loader.remove();
// FsId
// DocId
@@ -109,36 +113,17 @@ export class NewGroupPage implements OnInit{
this.addGroupMessage.emit(res.result.rid);
await this.wsChatMethodsService.getAllRooms();
setTimeout(()=> {
this.documents.forEach(element => {
this.wsChatMethodsService.getGroupRoom(res.result.rid).send({
file: {
"name": element.Assunto,
"type": "application/webtrix",
"ApplicationId": element.ApplicationId,
"DocId": element.DocId,
"Assunto": element.Assunto,
},
temporaryData: {
data: {
selected: {
Id: element.DocId,
ApplicationType: element.ApplicationId
}
}
},
attachments: [{
"title": element.Assunto,
"description": element.Assunto,
"title_link_download": true,
"type": "webtrix",
"text": element.Assunto,
"thumb_url": "https://static.ichimura.ed.jp/uploads/2017/10/pdf-icon.png",
}],
})
});
}, 500)
if(!this.wsChatMethodsService.getGroupRoom(res.result.rid)) {
this.createGroupWithAttachmentsCath(res)
} else {
setTimeout(()=> {
this.createGroupWithAttachments(res)
}, 500)
}
} else {
@@ -148,6 +133,52 @@ export class NewGroupPage implements OnInit{
}
createGroupWithAttachmentsCath(res: any) {
if(!this.wsChatMethodsService.getGroupRoom(res.result.rid)) {
setTimeout(()=>{
this.createGroupWithAttachmentsCath(res)
}, 1500)
} else {
this.createGroupWithAttachments(res)
}
}
createGroupWithAttachments(res: any) {
this.wsChatMethodsService.getGroupRoom(res.result.rid).hasLoadHistory = true;
this.documents.forEach(element => {
this.wsChatMethodsService.getGroupRoom(res.result.rid).send({
file: {
"name": element.Assunto,
"type": "application/webtrix",
"ApplicationId": element.ApplicationId,
"DocId": element.DocId,
"Assunto": element.Assunto,
},
temporaryData: {
data: {
selected: {
Id: element.DocId,
ApplicationType: element.ApplicationId
}
}
},
attachments: [{
"title": element.Assunto,
"description": element.Assunto,
"title_link_download": true,
"type": "webtrix",
"text": element.Assunto,
"thumb_url": "https://static.ichimura.ed.jp/uploads/2017/10/pdf-icon.png",
}],
})
});
setTimeout(() => {
this.groupName = ""
}, 150);
}
async addContacts(){
this.close();
@@ -84,13 +84,13 @@
</div>
<div
*ngIf="!skeletonLoader && allProcessesList.length == 0"
*ngIf="!skeletonLoader && getAllProcessCount == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
<div *ngIf="skeletonLoader && allProcessesList.length == 0">
<div *ngIf="skeletonLoader && getAllProcessCount == 0">
<ion-list>
<ion-item>
@@ -80,6 +80,9 @@ export class AllProcessesPage implements OnInit {
get AllProcess() {
setTimeout(() => {
this.skeletonLoader = false;
}, 5000);
return this.expedientegbstore.list.concat(this.pedidosstore.listparecer).concat(this.pedidosstore.listdeferimento)
.concat(this.despachoprstore.list).concat(this.eventoaprovacaostore.listmd).concat(this.eventoaprovacaostore.listpr)
.concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.despachoStore.list)
@@ -111,6 +111,7 @@
placeholder="Choose a date"
[(ngModel)]="startDate"
[disabled]="disabled"
[min]="currentDate"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker1
@@ -138,6 +139,7 @@
placeholder="Choose a date"
[(ngModel)]="endDate"
[disabled]="disabled"
[min]="currentDate"
>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #fim
@@ -196,6 +198,7 @@
placeholder="Choose a date"
[(ngModel)]="eventProcess.workflowInstanceDataFields.LastOccurrence"
[disabled]="disabled"
[min]="endDate"
>
<mat-datepicker-toggle id="last-occurrence" matSuffix [for]="occurrrence"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #occurrrence
@@ -51,6 +51,7 @@ export class EditEventToApproveComponent implements OnInit {
public stepSecond = 5;
recurringTypes: any;
selectedRecurringType: any;
currentDate = new Date()
showLoader = false
@@ -181,14 +182,54 @@ export class EditEventToApproveComponent implements OnInit {
}
onSelectedRecurringChanged(ev:any){
/*
this.calculetedLastOccurrence(ev);
if(ev.length > 1){
this.selectedRecurringType = ev.filter(data => data != '-1');
this.postEvent.EventRecurrence.Type = ev.filter(data => data != '-1');
}
if(ev.length == 0){
this.selectedRecurringType = "-1";
} */
this.postEvent.EventRecurrence.Type = "-1";
}
}
calculetedLastOccurrence(type:number){
var valor;
var opcao: boolean;
if (type == 0) {
valor = 7;
opcao = true;
} else if(type == 1){
valor = 30;
opcao = true;
} else if(type == 2){
valor = 1;
opcao = false;
}else if(type == 3){
valor = 5;
opcao = false;
}
this.defineLastOccurrence(valor, opcao);
}
defineLastOccurrence(valor:number, opcao:boolean){
var time = new Date(this.endDate);
if (opcao == true) {
time.setDate(time.getDate() + valor);
this.eventProcess.workflowInstanceDataFields.LastOccurrence = time;
} else {
time = new Date(
time.getFullYear() + valor,
time.getMonth(),
time.getDate(),
time.getHours(),
time.getMinutes()
);
this.eventProcess.workflowInstanceDataFields.LastOccurrence = time;
}
}
openLastOccurrence() {
@@ -237,6 +278,12 @@ export class EditEventToApproveComponent implements OnInit {
}
})
this.startDate = new Date(this.startDate);
this.startDate.setHours(this.startDate.getHours() + 1);
this.endDate = new Date(this.endDate);
this.endDate.setHours(this.endDate.getHours() + 1);
const event: EventToApproveEdit = {
SerialNumber: this.eventProcess.serialNumber,
Body: this.eventProcess.workflowInstanceDataFields.Body,
@@ -263,9 +310,9 @@ export class EditEventToApproveComponent implements OnInit {
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
this.toastService.successMessage('Evento editado');
this.toastService._successMessage('Evento editado');
}, error =>{
this.toastService.badRequest('Evento não editado');
this.toastService._badRequest('Evento não editado');
})
@@ -273,16 +320,16 @@ export class EditEventToApproveComponent implements OnInit {
if(document['action'] == 'add') {
delete document.action
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{
this.toastService.successMessage();
this.toastService._successMessage();
}, error =>{
this.toastService.badRequest();
this.toastService._badRequest();
});
} else if(document['action'] == 'delete') {
delete document.action
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{
this.toastService.successMessage()
this.toastService._successMessage()
}, error =>{
this.toastService.badRequest()
this.toastService._badRequest()
})
}
@@ -10,10 +10,10 @@
<ion-toolbar>
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
<ion-segment-button value="MDGPR">
Calendário do MDGPR
Meu Calendário
</ion-segment-button>
<ion-segment-button value="PR">
Presidente da República
Calendário Partilhado
</ion-segment-button>
</ion-segment>
</ion-toolbar>
@@ -2,7 +2,7 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title">
<div class="thetitle"><ion-label >Expediente</ion-label></div>
<div class="theicon">
<div class="theicon" (click)="refreshing()">
<button title="Atualizar" class="btn-no-color" (click)="refreshing()">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
@@ -84,6 +84,7 @@ export class ExpedientesPrPage implements OnInit {
}
refreshing() {
setTimeout(() => {
this.LoadList();
}, 1000);
@@ -95,6 +95,7 @@ export class ExpedientsPage implements OnInit {
}
doRefresh() {
setTimeout(() => {
this.LoadList();
}, 1000)
+17 -6
View File
@@ -24,14 +24,14 @@
</div>
<div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content">
<!-- <p class="logo-description-text">Presidente da República</p> -->
<!-- <p class="logo-description-text">Calendário Partilhado</p> -->
<p class="logo-description-text tp-5">GABINETE DIGITAL</p>
<div class="add-line"></div>
</div>
</div>
<div *ngIf="ThemeService.currentTheme == 'default'" class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content">
<!-- <p class="logo-description-text color-white">Presidente da República</p> -->
<!-- <p class="logo-description-text color-white">Calendário Partilhado</p> -->
<p class="logo-description-text tp-5 color-white">GABINETE DIGITAL</p>
<div class="add-line-white"></div>
</div>
@@ -56,10 +56,21 @@
<img *ngIf="ThemeService.currentTheme == 'tribunal' " src='assets/images/theme/tribunal/tribunal-constitucional.png' alt='logo'>
</div>
<div class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content">
<!-- <p class="logo-description-text">Presidente da República</p> -->
<p class="logo-description-text">GABINETE DIGITAL</p>
<div class="add-line"></div>
<!-- <p class="logo-description-text">Calendário Partilhado</p> -->
<!-- <div *ngIf="ThemeService.currentTheme == 'default' " class="logo-description-content">
<p class="logo-description-text color-white">Calendário Partilhado</p>
<div class="add-line color-white" style="border-bottom-color: white;"></div>
<p class="logo-description-text color-white">GABINETE DIGITAL</p>
</div> -->
<div *ngIf="ThemeService.currentTheme == 'gov' " class="logo-description-content">
<p *ngIf="environment.presidencia" class="logo-description-text">Calendário Partilhado</p>
<p *ngIf="!environment.presidencia" class="logo-description-text">GABINETE DIGITAL</p>
<div class="add-line"></div>
</div>
</div>
</div>
</div>
@@ -171,6 +182,6 @@
</div>
</div>
<div class="header-bottom-line"></div>
<div [class.header-bottom-line] = "ThemeService.currentTheme == 'gov'" style="height: 5px;"></div>
<!-- {{ RouteService.history | json }} -->
</div>
+7 -7
View File
@@ -15,11 +15,11 @@
color: black;
overflow: auto;
.logo-icon{
.logo-icon {
width: 25.33%;
overflow: auto;
img{
img {
width: 100%;
margin: 0px auto;
}
@@ -72,12 +72,12 @@
}
}
.header-btns{
.header-btns {
justify-content: center;
align-items: center;
}
.div-profile{
.div-profile {
height: fit-content;
font-size: 45px;
justify-content: flex-end;
@@ -103,7 +103,7 @@
position: absolute; /* changed */
top: 5px; /* changed */
right: 27px; /* changed */
}
}
.profile-text{
font-size: 20px;
@@ -113,11 +113,11 @@
color: var(--profile-text-color);
}
}
.main-tab{
.main-tab {
//border: 1px solid red;
}
.desktop{
.desktop {
display: none;
}
+1
View File
@@ -32,6 +32,7 @@ export class HeaderPage implements OnInit {
permissionList = new PermissionList();
production = environment.production
environment = environment
constructor(
private router: Router,
@@ -72,14 +72,16 @@ export class DespachosOptionsPage implements OnInit {
});
}
sendExpedienteToPending(){
sendExpedienteToPending() {
const loader = this.toastService.loading()
this.popoverController.dismiss();
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
this.toastService._successMessage()
loader.remove()
this.close();
},()=>{
loader.remove()
this.toastService._badRequest('Processo não encontrado')
});
}
@@ -98,11 +98,14 @@ export class DespachosPrOptionsPage implements OnInit {
}
sendExpedienteToPending() {
const loader = this.toastService.loading()
this.processes.SetTaskToPending(this.serialNumber).subscribe(res=>{
this.toastService._successMessage()
this.popoverController.dismiss('close')
loader.remove()
},()=>{
loader.remove()
this.toastService._badRequest('Processo não encontrado')
});
@@ -107,12 +107,14 @@ export class DiplomasGerarOptionsPage 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")
});
@@ -252,12 +252,14 @@ export class OptsExpedientePrPage implements OnInit {
sendExpedienteToPending(){
this.popoverController.dismiss();
const loader = this.toastService.loading()
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
loader.remove()
this.close();
},()=>{
this.toastService._badRequest('Processo não encontrado')
loader.remove()
});
}
@@ -81,11 +81,14 @@ export class RequestOptionsPage implements OnInit {
}
sendExpedienteToPending() {
const loader = this.toastService.loading()
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
this.toastService._successMessage()
this.close();
loader.remove()
},()=>{
loader.remove()
this.toastService._badRequest('Processo não encontrado')
});
@@ -30,7 +30,7 @@
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
</div>
<div class="ion-input-class flex-grow-1">
<ion-datetime
<!-- <ion-datetime
class="d-block d-md-none"
[(ngModel)]="folder.DateBegin"
placeholder="Início"
@@ -38,12 +38,12 @@
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"
max="2025">
</ion-datetime>
</ion-datetime> -->
<mat-form-field appearance="none" class="width-100 date-hour-picker d-md-block">
<mat-form-field appearance="none" class="width-100 date-hour-picker d-md-block">
<input matInput [ngxMatDatetimePicker]="picker1"
placeholder="Choose a date*"
placeholder="Data inicio*"
[(ngModel)]="folder.DateBegin"
[disabled]="disabled"
[min]="currentDate"
@@ -68,7 +68,7 @@
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
</div>
<div class="ion-input-class d-flex flex-grow-1">
<ion-datetime
<!-- <ion-datetime
class="flex-grow-1 d-md-none"
[(ngModel)]="folder.DateEnd"
placeholder="Fim"
@@ -76,16 +76,16 @@
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"
max="2025">
</ion-datetime>
</ion-datetime> -->
<mat-form-field appearance="none" class="width-100 date-hour-picker d-md-block">
<input matInput [ngxMatDatetimePicker]="picker2"
placeholder="Choose a date*"
placeholder="Data de fim*"
[(ngModel)]="folder.DateEnd"
[disabled]="disabled"
[min]="currentDate"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker2"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="picker2"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker2
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -45,10 +45,10 @@ export class NewActionPage implements OnInit {
this.folder = new PublicationFolder();
this.folder = Object.assign(this.folder, {
/* this.folder = Object.assign(this.folder, {
DateBegin: new Date().toISOString(),
DateEnd: (new Date(new Date().getTime() + 15 * 60000)).toISOString(),
})
}) */
}