mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -514,7 +514,7 @@ export class AgendaPage implements OnInit {
|
||||
return ((new Date(this.timelineDate)).getDate()).toString().padStart(2,'0')
|
||||
}
|
||||
|
||||
loadRangeEvents(startTime: Date, endTime: Date){
|
||||
async loadRangeEvents(startTime: Date, endTime: Date){
|
||||
|
||||
this.eventSelectedDate = new Date(startTime);
|
||||
|
||||
@@ -530,13 +530,14 @@ export class AgendaPage implements OnInit {
|
||||
//this.eventSource=[];
|
||||
|
||||
if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR' ) {
|
||||
this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).subscribe(
|
||||
response => {
|
||||
|
||||
let mdOficialEvents = await this.eventService.getAllPrOficialEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise();
|
||||
let mdPessoalEvents = await this.eventService.getAllPrPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise();
|
||||
|
||||
// calendar
|
||||
this.eventSource=[];
|
||||
|
||||
this.eventsList = response;
|
||||
this.eventsList = mdOficialEvents.concat(mdPessoalEvents);
|
||||
// loop
|
||||
this.eventsList.forEach((element, eventIndex) => {
|
||||
|
||||
@@ -571,17 +572,17 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.timelineBoxCorrectHeight(500);
|
||||
this.centralizeTimeline(500);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(
|
||||
response => {
|
||||
let prOficialEvents= await this.eventService.getAllPrOficialEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise();
|
||||
let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise();
|
||||
|
||||
// calendar
|
||||
this.eventSource=[];
|
||||
|
||||
this.eventsList = response;
|
||||
this.eventsList = prOficialEvents.concat(prPessoalEvents);
|
||||
|
||||
// calendar
|
||||
this.eventsList.forEach((element, eventIndex) => {
|
||||
@@ -615,8 +616,6 @@ export class AgendaPage implements OnInit {
|
||||
this.timelineBoxCorrectHeight(500);
|
||||
this.centralizeTimeline(500);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -624,7 +623,7 @@ export class AgendaPage implements OnInit {
|
||||
//Inicializa o array eventSource
|
||||
|
||||
if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') {
|
||||
this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(response => {
|
||||
this.eventService.getAllMdPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(response => {
|
||||
|
||||
this.eventSource=[];
|
||||
this.eventsListPessoal= [];
|
||||
@@ -665,10 +664,11 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
}
|
||||
else{
|
||||
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(response => {
|
||||
let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise();
|
||||
|
||||
this.eventSource=[];
|
||||
|
||||
this.eventsListPessoal = response.filter(data => data.CalendarName == "Pessoal");
|
||||
this.eventsListPessoal = prPessoalEvents.filter(data => data.CalendarName == "Pessoal");
|
||||
this.eventsListPessoal.forEach(element => {
|
||||
this.eventSource.push({
|
||||
title: element.Subject,
|
||||
@@ -698,7 +698,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.timelineBoxCorrectHeight(500);
|
||||
this.centralizeTimeline(500);
|
||||
});
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -708,7 +708,7 @@ export class AgendaPage implements OnInit {
|
||||
this.eventsListOficial = [];
|
||||
|
||||
if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') {
|
||||
this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(res => {
|
||||
this.eventService.getAllMdOficialEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(res => {
|
||||
this.eventSource=[];
|
||||
this.eventsListOficial = res.filter(data => data.CalendarName == "Oficial");
|
||||
|
||||
@@ -742,9 +742,9 @@ export class AgendaPage implements OnInit {
|
||||
this.centralizeTimeline(500);
|
||||
});
|
||||
} else {
|
||||
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(res => {
|
||||
let prOficialEvents= await this.eventService.getAllPrOficialEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise();
|
||||
this.eventSource=[];
|
||||
this.eventsListOficial = res.filter(data => data.CalendarName == "Oficial");
|
||||
this.eventsListOficial = prOficialEvents.filter(data => data.CalendarName == "Oficial");
|
||||
this.eventsListOficial.forEach(element => {
|
||||
this.eventSource.push({
|
||||
title: element.Subject,
|
||||
@@ -774,7 +774,6 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.timelineBoxCorrectHeight(500);
|
||||
this.centralizeTimeline(500);
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -788,15 +787,16 @@ export class AgendaPage implements OnInit {
|
||||
let counter = 0;
|
||||
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).subscribe(
|
||||
response => {
|
||||
|
||||
let mdOficialEvents = await this.eventService.getAllPrOficialEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).toPromise();
|
||||
let mdPessoalEvents = await this.eventService.getAllPrPessoalEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).toPromise();
|
||||
|
||||
if(this.segment == 'Oficial') {
|
||||
this.eventsList = response.filter(data => data.CalendarName == "Oficial");
|
||||
this.eventsList = mdOficialEvents;
|
||||
} else if (this.segment == 'Pessoal') {
|
||||
this.eventsList = response.filter(data => data.CalendarName == "Pessoal");
|
||||
this.eventsList = mdPessoalEvents;
|
||||
} else {
|
||||
this.eventsList = response;
|
||||
this.eventsList = mdOficialEvents.concat(mdPessoalEvents);
|
||||
}
|
||||
|
||||
this.eventSource= this.eventSource.filter(e => e.profile != 'md');
|
||||
@@ -839,18 +839,18 @@ export class AgendaPage implements OnInit {
|
||||
this.centralizeTimeline(500);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(
|
||||
response => {
|
||||
let prOficialEvents= await this.eventService.getAllPrOficialEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise();
|
||||
let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise();
|
||||
|
||||
if(this.segment == 'Oficial') {
|
||||
this.eventsList = response.filter(data => data.CalendarName == "Oficial");
|
||||
this.eventsList = prOficialEvents;
|
||||
} else if (this.segment == 'Pessoal') {
|
||||
this.eventsList = response.filter(data => data.CalendarName == "Pessoal");
|
||||
this.eventsList = prPessoalEvents;
|
||||
} else {
|
||||
this.eventsList = response;
|
||||
this.eventsList = prOficialEvents.concat(prPessoalEvents);
|
||||
}
|
||||
|
||||
this.eventSource = this.eventSource.filter(e => e.profile != 'pr');
|
||||
@@ -889,8 +889,6 @@ export class AgendaPage implements OnInit {
|
||||
this.timelineBoxCorrectHeight(500);
|
||||
this.centralizeTimeline(500);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ export class EventsPage implements OnInit {
|
||||
this.RefreshEvents();
|
||||
}
|
||||
|
||||
RefreshEvents(){
|
||||
async RefreshEvents(){
|
||||
this.currentEvent = "";
|
||||
this.showLoader = true;
|
||||
|
||||
@@ -127,43 +127,49 @@ export class EventsPage implements OnInit {
|
||||
{
|
||||
case "Combinada":
|
||||
if(this.loggeduser.Profile == 'MDGPR'){
|
||||
this.eventService.getAllMdEvents(start, end).subscribe(res => {
|
||||
this.eventsList = res;
|
||||
|
||||
let mdOficialEvents = await this.eventService.getAllPrOficialEvents(start, end).toPromise();
|
||||
let mdPessoalEvents = await this.eventService.getAllPrPessoalEvents(start, end).toPromise();
|
||||
|
||||
this.eventsList = mdOficialEvents.concat(mdPessoalEvents);
|
||||
|
||||
if(res.length > 0){
|
||||
this.currentEvent = res[0].Subject;
|
||||
this.currentHoursMinutes = res[0].StartDate;
|
||||
if(this.eventsList.length > 0){
|
||||
this.currentEvent = this.eventsList[0].Subject;
|
||||
this.currentHoursMinutes = this.eventsList[0].StartDate;
|
||||
}
|
||||
|
||||
this.totalEvent = this.eventsList.length;
|
||||
this.showLoader = false;
|
||||
});
|
||||
}else{
|
||||
this.eventService.getAllPrEvents(start, end).subscribe(res => {
|
||||
this.eventsList = res;
|
||||
console.log(this.eventsList);
|
||||
console.log(res);
|
||||
console.log(res[0]);
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
if(res.length > 0){
|
||||
this.currentEvent = res[0].Subject;
|
||||
this.currentHoursMinutes = res[0].StartDate;
|
||||
}
|
||||
let prOficialEvents= await this.eventService.getAllPrOficialEvents(start, end).toPromise();
|
||||
let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(start, end).toPromise();
|
||||
this.eventsList = prOficialEvents.concat(prPessoalEvents);
|
||||
console.log(this.eventsList);
|
||||
console.log(this.eventsList);
|
||||
|
||||
this.totalEvent = this.eventsList.length;
|
||||
this.showLoader = false;
|
||||
});
|
||||
if(this.eventsList.length > 0){
|
||||
this.currentEvent = this.eventsList[0].Subject;
|
||||
this.currentHoursMinutes = this.eventsList[0].StartDate;
|
||||
}
|
||||
|
||||
this.totalEvent = this.eventsList.length;
|
||||
this.showLoader = false;
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
case "Pessoal":
|
||||
if(this.loggeduser.Profile == 'MDGPR'){
|
||||
this.eventService.getAllMdEvents(start, end).subscribe(res => {
|
||||
this.eventService.getAllMdPessoalEvents(start, end).subscribe(res => {
|
||||
this.personaleventsList = res.filter(data => data.CalendarName == "Pessoal");
|
||||
this.showLoader = false;
|
||||
});
|
||||
}else{
|
||||
this.eventService.getAllPrEvents(start, end).subscribe(res => {
|
||||
}
|
||||
else{
|
||||
this.eventService.getAllPrPessoalEvents(start, end).subscribe(res => {
|
||||
this.personaleventsList = res.filter(data => data.CalendarName == "Pessoal");
|
||||
this.showLoader = false;
|
||||
});
|
||||
@@ -172,12 +178,13 @@ export class EventsPage implements OnInit {
|
||||
break;
|
||||
case "Oficial":
|
||||
if(this.loggeduser.Profile == 'MDGPR'){
|
||||
this.eventService.getAllMdEvents(start, end).subscribe(res => {
|
||||
this.eventService.getAllMdOficialEvents(start, end).subscribe(res => {
|
||||
this.officialeventsList = res.filter(data => data.CalendarName == "Oficial");;
|
||||
this.showLoader = false;
|
||||
});
|
||||
}else{
|
||||
this.eventService.getAllPrEvents(start, end).subscribe(res => {
|
||||
}
|
||||
else{
|
||||
this.eventService.getAllPrOficialEvents(start, end).subscribe(res => {
|
||||
this.officialeventsList = res.filter(data => data.CalendarName == "Oficial");;
|
||||
this.showLoader = false;
|
||||
});
|
||||
|
||||
+12
-78
@@ -218,14 +218,8 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
console.log(this.postData);
|
||||
|
||||
this.taskResult = await this.processes.postDespatcho(this.postData).toPromise();
|
||||
await this.toastService.successMessage('Processo efetuado', () =>{
|
||||
console.log('Hoje Teste T');
|
||||
this.modalController.dismiss(action_despacho);
|
||||
});
|
||||
/* setInterval(()=>{
|
||||
console.log('Hoje Teste T');
|
||||
this.modalController.dismiss(action_despacho);
|
||||
}, 7000); */
|
||||
await this.toastService.successMessage('Processo efetuado');
|
||||
this.modalController.dismiss();
|
||||
|
||||
} catch (error) {
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
@@ -253,11 +247,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
"Note": "",
|
||||
}
|
||||
}
|
||||
//this.taskResult = await this.processes.postParecer(this.postData).toPromise();
|
||||
this.taskResult = await this.processes.postParecer(this.postData).toPromise();
|
||||
await this.toastService.successMessage('Processo efetuado');
|
||||
setInterval(()=>{
|
||||
this.modalController.dismiss(action_parecer);
|
||||
}, 7000);
|
||||
this.modalController.dismiss(action_parecer);
|
||||
|
||||
} catch (error) {
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
@@ -284,9 +276,8 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
this.taskResult = await this.processes.postDeferimento(this.postData).toPromise();
|
||||
await this.toastService.successMessage('Processo efetuado', () =>{
|
||||
this.modalController.dismiss(action_deferimento);
|
||||
});
|
||||
await this.toastService.successMessage('Processo efetuado');
|
||||
this.modalController.dismiss(action_deferimento);
|
||||
} catch (error) {
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
}
|
||||
@@ -309,7 +300,6 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
AttachmentList: docs,
|
||||
//SubjectTypes: [],
|
||||
}
|
||||
console.log(this.postData);
|
||||
try {
|
||||
@@ -323,9 +313,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
this.taskResult = await this.processes.postDespatchoPr(this.postData).toPromise();
|
||||
|
||||
await this.toastService.successMessage('Processo efetuado', () =>{
|
||||
this.modalController.dismiss(action_despacho_pr);
|
||||
});
|
||||
await this.toastService.successMessage('Processo efetuado');
|
||||
this.modalController.dismiss(action_despacho_pr);
|
||||
|
||||
} catch (error) {
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
}
|
||||
@@ -354,9 +344,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
this.taskResult = await this.processes.postParecerPr(this.postData).toPromise();
|
||||
|
||||
await this.toastService.badRequest('Processo efetuado', () =>{
|
||||
this.modalController.dismiss(action_parecer_pr);
|
||||
})
|
||||
await this.toastService.badRequest('Processo efetuado');
|
||||
this.modalController.dismiss(action_parecer_pr);
|
||||
|
||||
} catch (error) {
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
}
|
||||
@@ -406,17 +396,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.showAttendees = true
|
||||
}
|
||||
}
|
||||
|
||||
/* setIntervenient(data){
|
||||
this.taskParticipants = data;
|
||||
//this.postData.UsersSelected = data;
|
||||
}
|
||||
|
||||
setIntervenientCC(data){
|
||||
this.taskParticipantsCc = data;
|
||||
} */
|
||||
|
||||
|
||||
async setIntervenient(data) {
|
||||
this.taskParticipants = data;
|
||||
}
|
||||
@@ -530,50 +510,4 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
async successMessage(message?: any, callback?) {
|
||||
|
||||
var notification = document.createElement('div')
|
||||
notification.id = 'notification'
|
||||
notification.innerHTML = `
|
||||
|
||||
<div class="main-content width-100 pa-20">
|
||||
<p class="message d-flex align-center">
|
||||
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/nofitication-success.svg"></ion-icon>
|
||||
<p class="text">{{ message }}</p>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
`
|
||||
|
||||
document.body.append(notification)
|
||||
notification.querySelector('.text').innerHTML = message || 'Processo efetuado'
|
||||
setTimeout(()=>{
|
||||
notification.remove()
|
||||
},7000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest(message?: string, callback?) {
|
||||
|
||||
var notification = document.createElement('div')
|
||||
notification.id = 'notification'
|
||||
notification.innerHTML = `
|
||||
<div class="main-content width-100 pa-20">
|
||||
<p class="message d-flex align-center">
|
||||
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/notification-error.svg"></ion-icon>
|
||||
<p class="text">{{ message }}</p>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
`
|
||||
|
||||
document.body.append(notification)
|
||||
notification.querySelector('.text').innerHTML = message || 'Processo não efetuado'
|
||||
setTimeout(()=>{
|
||||
notification.remove()
|
||||
},7000)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -147,7 +147,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
"Note": res.workflowInstanceDataFields.Note,
|
||||
"FolderId": res.workflowInstanceDataFields.FolderID,
|
||||
"FsId": res.workflowInstanceDataFields.FsId,
|
||||
"DocId": res.workflowInstanceDataFields.DocId,
|
||||
"DocId": res.workflowInstanceDataFields.DocID,
|
||||
"WorkflowName": res.workflowDisplayName,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user