mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge branch 'develop' into bugfix/chat-create-event
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -27,13 +27,11 @@ 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 +47,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 = '';
|
||||
@@ -126,7 +122,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
private platform: Platform,
|
||||
private fileOpener: FileOpener,
|
||||
) {
|
||||
this.loggedUser = authService.ValidatedUserChat['data'];
|
||||
|
||||
this.checkAudioPermission()
|
||||
}
|
||||
@@ -448,15 +443,15 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
}
|
||||
else {
|
||||
|
||||
var str = msg.attachments[0].image_url;
|
||||
str = str.substring(1, ((str.length) - 1));
|
||||
// var str = msg.attachments[0].image_url;
|
||||
// str = str.substring(1, ((str.length) - 1));
|
||||
|
||||
const encodedData = btoa(str);
|
||||
// const encodedData = btoa(str);
|
||||
|
||||
let file = this.base64toBlob(encodedData, 'application/pdf')
|
||||
let fileURL = URL.createObjectURL(file)
|
||||
// let file = this.base64toBlob(encodedData, 'application/pdf')
|
||||
// let fileURL = URL.createObjectURL(file)
|
||||
|
||||
window.open(fileURL);
|
||||
// window.open(fileURL);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1028,7 +1023,6 @@ 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)
|
||||
//this.testDownlod(msg)
|
||||
|
||||
} else {
|
||||
var str = msg.attachments[0].image_url;
|
||||
@@ -1075,12 +1069,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
|
||||
}
|
||||
|
||||
|
||||
testEditMessage(msg: MessageService) {
|
||||
// msg.receptorReceive()
|
||||
// alert('cool!')
|
||||
}
|
||||
|
||||
start(track) {
|
||||
if(this.audioPlay){
|
||||
this.audioPlay.stop();
|
||||
|
||||
@@ -59,7 +59,6 @@ export class NewGroupPage implements OnInit{
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -76,9 +75,8 @@ export class NewGroupPage implements OnInit{
|
||||
}
|
||||
}
|
||||
|
||||
close(){
|
||||
//this.modalController.dismiss();
|
||||
|
||||
close() {
|
||||
|
||||
this.addGroupMessage.emit();
|
||||
}
|
||||
|
||||
@@ -91,6 +89,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 +103,8 @@ export class NewGroupPage implements OnInit{
|
||||
}
|
||||
|
||||
|
||||
loader.remove();
|
||||
|
||||
// FsId
|
||||
// DocId
|
||||
|
||||
@@ -109,36 +112,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 +132,48 @@ 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",
|
||||
}],
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
async addContacts(){
|
||||
this.close();
|
||||
|
||||
|
||||
@@ -278,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,
|
||||
@@ -304,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');
|
||||
})
|
||||
|
||||
|
||||
@@ -314,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()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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(),
|
||||
})
|
||||
}) */
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user