mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { DespachoMdService } from './despacho-md.service';
|
||||||
|
|
||||||
|
describe('DespachoMdService', () => {
|
||||||
|
let service: DespachoMdService;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({});
|
||||||
|
service = TestBed.inject(DespachoMdService);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { ProcessesService } from '../services/processes.service';
|
||||||
|
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class DespachoMdService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description para terminar o
|
||||||
|
* 95 - signfica
|
||||||
|
* 98 - significa
|
||||||
|
*/
|
||||||
|
ActionTypeId: 95 | 98
|
||||||
|
|
||||||
|
action: "Arquivo" | "Reencaminhar"
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
private processes: ProcessesService,
|
||||||
|
) { }
|
||||||
|
|
||||||
|
arquivar(note:string, documents:any, serialnumber) {
|
||||||
|
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialnumber,
|
||||||
|
"action": "Arquivo",
|
||||||
|
"ActionTypeId": 95,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.processes.CompleteTask(body)
|
||||||
|
}
|
||||||
|
|
||||||
|
reencaminhar(note:string, documents:any, serialnumber) {
|
||||||
|
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialnumber,
|
||||||
|
"action": "Reencaminhar",
|
||||||
|
"ActionTypeId": 98,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.processes.CompleteTask(body)
|
||||||
|
}
|
||||||
|
|
||||||
|
executado(note:string, documents:any , serialnumber) {
|
||||||
|
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialnumber,
|
||||||
|
"action": "Conhecimento",
|
||||||
|
"ActionTypeId": 104,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.processes.CompleteTask(body)
|
||||||
|
}
|
||||||
|
|
||||||
|
sendExpedienteToPending(serialnumber) {
|
||||||
|
|
||||||
|
return this.processes.SetTaskToPending(serialnumber)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
export class CallMeeting {
|
||||||
|
"EventProcess": {
|
||||||
|
"SerialNumber": "sample string 1",
|
||||||
|
"Body": "sample string 2",
|
||||||
|
"Location": "sample string 3",
|
||||||
|
"Subject": "sample string 4",
|
||||||
|
"StartDate": "2021-07-28T13:22:55.031857+01:00",
|
||||||
|
"EndDate": "2021-07-28T13:22:55.031857+01:00",
|
||||||
|
"ReviewUserComment": "sample string 7",
|
||||||
|
"MDName": "sample string 8",
|
||||||
|
"MDEmail": "sample string 9",
|
||||||
|
"IsAllDayEvent": true,
|
||||||
|
"Status": "sample string 11",
|
||||||
|
"EventType": "sample string 12",
|
||||||
|
"IsRecurring": true,
|
||||||
|
"ParticipantsList": [
|
||||||
|
{
|
||||||
|
"Id": 1,
|
||||||
|
"EmailAddress": "sample string 2",
|
||||||
|
"Name": "sample string 3",
|
||||||
|
"IsRequired": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": 1,
|
||||||
|
"EmailAddress": "sample string 2",
|
||||||
|
"Name": "sample string 3",
|
||||||
|
"IsRequired": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Message": "sample string 14",
|
||||||
|
"EventRecurrence": {
|
||||||
|
"Type": 0,
|
||||||
|
"Day": 1,
|
||||||
|
"DayOfWeek": 0,
|
||||||
|
"Month": 1,
|
||||||
|
"LastOccurrence": "2021-07-28T13:22:55.031857+01:00"
|
||||||
|
},
|
||||||
|
"Participants": "sample string 15",
|
||||||
|
"CC": "sample string 16"
|
||||||
|
}
|
||||||
|
|
||||||
|
"Attachment": {
|
||||||
|
"Id": 1,
|
||||||
|
"ParentId": "sample string 2",
|
||||||
|
"Source": 0,
|
||||||
|
"SourceId": "sample string 3",
|
||||||
|
"SourceName": "sample string 4",
|
||||||
|
"ApplicationId": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
export class Excludetask{
|
||||||
|
serialNumber: any;
|
||||||
|
action: string;
|
||||||
|
ActionTypeId: any;
|
||||||
|
dataFields: {
|
||||||
|
ReviewUserComment?: string,
|
||||||
|
Note?: any
|
||||||
|
}
|
||||||
|
AttachmentList?: any
|
||||||
|
}
|
||||||
@@ -409,6 +409,9 @@
|
|||||||
(closeComponent)="approveEventDismissGoBack()"
|
(closeComponent)="approveEventDismissGoBack()"
|
||||||
(setIntervenient)="setIntervenient($event)"
|
(setIntervenient)="setIntervenient($event)"
|
||||||
(setIntervenientCC)="setIntervenientCC($event)"
|
(setIntervenientCC)="setIntervenientCC($event)"
|
||||||
|
|
||||||
|
|
||||||
|
(closeEventToApprove)="closeEventToApproveGoBack()"
|
||||||
></app-edit-event-to-approve>
|
></app-edit-event-to-approve>
|
||||||
|
|
||||||
<app-attendee-modal
|
<app-attendee-modal
|
||||||
|
|||||||
@@ -339,14 +339,6 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
events.forEach(element => {
|
events.forEach(element => {
|
||||||
|
|
||||||
const startTimeSamp = new Date(element.startTime).toLocaleDateString()
|
|
||||||
const endTimeSamp = new Date(element.endTime).toLocaleDateString()
|
|
||||||
|
|
||||||
const endMinutes = new Date(element.endTime).getMinutes()
|
|
||||||
const endHours = new Date(element.endTime).getHours()
|
|
||||||
const endDay: number = new Date(element.endTime).getDate()
|
|
||||||
const startDay = new Date(element.startTime).getDate()
|
|
||||||
|
|
||||||
const profile_ = element.profile == 'md'? 'mdgpr': 'pr';
|
const profile_ = element.profile == 'md'? 'mdgpr': 'pr';
|
||||||
const eventtype = element.event.CalendarName;
|
const eventtype = element.event.CalendarName;
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-
|
|||||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { EliminateEventPage } from 'src/app/modals/eliminate-event/eliminate-event.page';
|
import { EliminateEventPage } from 'src/app/modals/eliminate-event/eliminate-event.page';
|
||||||
|
import { Location } from '@angular/common'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-view-event',
|
selector: 'app-view-event',
|
||||||
@@ -58,6 +59,7 @@ export class ViewEventPage implements OnInit {
|
|||||||
private activatedRoute: ActivatedRoute,
|
private activatedRoute: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
|
private location: Location
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.isEventEdited = false;
|
this.isEventEdited = false;
|
||||||
@@ -109,14 +111,16 @@ export class ViewEventPage implements OnInit {
|
|||||||
if(this.isModal) {
|
if(this.isModal) {
|
||||||
this.close()
|
this.close()
|
||||||
} else {
|
} else {
|
||||||
this.activatedRoute.paramMap.subscribe(params => {
|
// this.activatedRoute.paramMap.subscribe(params => {
|
||||||
if(params["params"].caller == 'expediente'){
|
// if(params["params"].caller == 'expediente'){
|
||||||
window.history.back();
|
// window.history.back();
|
||||||
}
|
// }
|
||||||
else{
|
// else{
|
||||||
this.router.navigate(['/home',params["params"].caller]);
|
// this.router.navigate(['/home',params["params"].caller]);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
this.location.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -128,13 +132,17 @@ export class ViewEventPage implements OnInit {
|
|||||||
/* this.today = new Date(res.StartDate);
|
/* this.today = new Date(res.StartDate);
|
||||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
|
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}, ()=>{
|
}, (error)=>{
|
||||||
|
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService.badRequest('não é possível vizualizar este event no modo offline')
|
||||||
|
} else {
|
||||||
|
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||||
|
}
|
||||||
|
|
||||||
loader.remove()
|
loader.remove()
|
||||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
|
||||||
this.modalController.dismiss('Eevent not Foud');
|
this.modalController.dismiss('Eevent not Foud');
|
||||||
this.router.navigate(['/home/agenda']);
|
this.location.back();
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
|||||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||||
import { DespachosOptionsPage } from 'src/app/shared/popover/despachos-options/despachos-options.page';
|
import { DespachosOptionsPage } from 'src/app/shared/popover/despachos-options/despachos-options.page';
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
|
import { DespachoMdService } from 'src/app/Rules/despacho-md.service'
|
||||||
|
import { NavigationService } from 'src/app/services/navigation.service';
|
||||||
|
import { Location } from '@angular/common'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-despacho',
|
selector: 'app-despacho',
|
||||||
@@ -50,6 +53,10 @@ export class DespachoPage implements OnInit {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
private animationController: AnimationController,
|
private animationController: AnimationController,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
|
private despachoMdService: DespachoMdService,
|
||||||
|
private navigationService: NavigationService,
|
||||||
|
private location: Location
|
||||||
|
|
||||||
) {
|
) {
|
||||||
this.activatedRoute.paramMap.subscribe(params => {
|
this.activatedRoute.paramMap.subscribe(params => {
|
||||||
if(params["params"].SerialNumber) {
|
if(params["params"].SerialNumber) {
|
||||||
@@ -80,31 +87,35 @@ export class DespachoPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
goBack() {
|
goBack() {
|
||||||
if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
|
|
||||||
if (window.innerWidth < 801) {
|
//this.navigationService.back()
|
||||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
this.location.back();
|
||||||
}
|
|
||||||
else {
|
// if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
|
||||||
let navigationExtras: NavigationExtras = {
|
// if (window.innerWidth < 801) {
|
||||||
queryParams: {
|
// this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||||
"pendentes": true,
|
// }
|
||||||
}
|
// else {
|
||||||
}
|
// let navigationExtras: NavigationExtras = {
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
// queryParams: {
|
||||||
}
|
// "pendentes": true,
|
||||||
}
|
// }
|
||||||
else{
|
// }
|
||||||
if (window.innerWidth < 801) {
|
// this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
this.router.navigate(['/home/gabinete-digital/despachos']);
|
// }
|
||||||
} else {
|
// }
|
||||||
let navigationExtras: NavigationExtras = {
|
// else{
|
||||||
queryParams: {
|
// if (window.innerWidth < 801) {
|
||||||
'despachos': true
|
// this.router.navigate(['/home/gabinete-digital/despachos']);
|
||||||
}
|
// } else {
|
||||||
}
|
// let navigationExtras: NavigationExtras = {
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
// queryParams: {
|
||||||
}
|
// 'despachos': true
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
// this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
async LoadTaskDetail(serial: string) {
|
async LoadTaskDetail(serial: string) {
|
||||||
@@ -189,20 +200,11 @@ export class DespachoPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async executado(note:string, documents:any) {
|
async executado(note:string, documents:any) {
|
||||||
let body = {
|
|
||||||
"serialNumber": this.serialnumber,
|
|
||||||
"action": "Conhecimento",
|
|
||||||
"ActionTypeId": 104,
|
|
||||||
"dataFields": {
|
|
||||||
"ReviewUserComment": note,
|
|
||||||
},
|
|
||||||
"AttachmentList" :documents,
|
|
||||||
}
|
|
||||||
|
|
||||||
const loader = this.toastService.loading()
|
const loader = this.toastService.loading()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.processes.CompleteTask(body).toPromise()
|
await this.despachoMdService.executado(note, documents, this.serialnumber)
|
||||||
this.toastService.successMessage('Processo criado')
|
this.toastService.successMessage('Processo criado')
|
||||||
this.close();
|
this.close();
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
@@ -236,6 +238,7 @@ export class DespachoPage implements OnInit {
|
|||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async reencaminhar(note:string, documents:any) {
|
async reencaminhar(note:string, documents:any) {
|
||||||
@@ -296,13 +299,15 @@ export class DespachoPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async sendExpedienteToPending() {
|
async sendExpedienteToPending() {
|
||||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
|
||||||
|
this.despachoMdService.sendExpedienteToPending(this.serialnumber).subscribe(res=>{
|
||||||
this.goBack();
|
this.goBack();
|
||||||
this.toastService.successMessage('Processo enviado para despacho')
|
this.toastService.successMessage('Processo enviado para despacho')
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
this.toastService.badRequest("Processo não enviado para despacho")
|
this.toastService.badRequest("Processo não enviado para despacho")
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async openAddNoteModal(actionName:string) {
|
async openAddNoteModal(actionName:string) {
|
||||||
|
|||||||
+1
-1
@@ -270,7 +270,7 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
const loader = this.toastService.loading()
|
const loader = this.toastService.loading()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.processes.CompleteTask(otherbody).toPromise()
|
await this.processes.CompleteTask(otherbody)
|
||||||
this.toastService.successMessage('Processo descartado');
|
this.toastService.successMessage('Processo descartado');
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { NavigationService } from './navigation.service';
|
||||||
|
|
||||||
|
describe('NavigationService', () => {
|
||||||
|
let service: NavigationService;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({});
|
||||||
|
service = TestBed.inject(NavigationService);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
import { Injectable } from '@angular/core'
|
||||||
|
import { Location } from '@angular/common'
|
||||||
|
import { Router, NavigationEnd } from '@angular/router'
|
||||||
|
|
||||||
|
@Injectable({ providedIn: 'root' })
|
||||||
|
export class NavigationService {
|
||||||
|
private history: string[] = []
|
||||||
|
|
||||||
|
constructor(private router: Router, private location: Location) {
|
||||||
|
this.router.events.subscribe((event) => {
|
||||||
|
if (event instanceof NavigationEnd) {
|
||||||
|
this.history.push(event.urlAfterRedirects)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
back(): void {
|
||||||
|
this.history.pop()
|
||||||
|
if (this.history.length > 0) {
|
||||||
|
this.location.back()
|
||||||
|
} else {
|
||||||
|
this.router.navigateByUrl('/')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -5,6 +5,8 @@ import { AuthService } from '../services/auth.service';
|
|||||||
import { User } from '../models/user.model';
|
import { User } from '../models/user.model';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
import { CallMeeting } from '../models/CallMeeting';
|
||||||
|
import { Excludetask } from '../models/Excludetask';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@@ -49,6 +51,7 @@ export class ProcessesService {
|
|||||||
};
|
};
|
||||||
return this.http.get<any>(`${geturl}`, options);
|
return this.http.get<any>(`${geturl}`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetTaskToPending(serialNumber:string): Observable<any>{
|
SetTaskToPending(serialNumber:string): Observable<any>{
|
||||||
const geturl = environment.apiURL + 'Tasks/SetTaskPending';
|
const geturl = environment.apiURL + 'Tasks/SetTaskPending';
|
||||||
let params = new HttpParams();
|
let params = new HttpParams();
|
||||||
@@ -154,7 +157,7 @@ export class ProcessesService {
|
|||||||
return this.http.post<any>(`${geturl}`, body, options)
|
return this.http.post<any>(`${geturl}`, body, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
CompleteTask(body:any){
|
CompleteTask(body:Excludetask) {
|
||||||
const geturl = environment.apiURL + 'Tasks/CompleteTask';
|
const geturl = environment.apiURL + 'Tasks/CompleteTask';
|
||||||
|
|
||||||
let options = {
|
let options = {
|
||||||
@@ -239,7 +242,6 @@ export class ProcessesService {
|
|||||||
return this.http.post<any>(`${geturl}`, body, options)
|
return this.http.post<any>(`${geturl}`, body, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GetActionsList(){
|
GetActionsList(){
|
||||||
const geturl = environment.apiURL + 'presidentialActions';
|
const geturl = environment.apiURL + 'presidentialActions';
|
||||||
let options = {
|
let options = {
|
||||||
@@ -249,6 +251,7 @@ export class ProcessesService {
|
|||||||
|
|
||||||
return this.http.get<any>(`${geturl}`, options);
|
return this.http.get<any>(`${geturl}`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
GetSubjectType() {
|
GetSubjectType() {
|
||||||
const geturl = environment.apiURL + 'ecm/SubjectType';
|
const geturl = environment.apiURL + 'ecm/SubjectType';
|
||||||
let options = {
|
let options = {
|
||||||
@@ -272,4 +275,14 @@ export class ProcessesService {
|
|||||||
return this.http.get<any>(`${geturl}`, options);
|
return this.http.get<any>(`${geturl}`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CallMeeting(body: CallMeeting) {
|
||||||
|
const geturl = environment.apiURL + 'Processes/CallMeeting';
|
||||||
|
|
||||||
|
let options: any = {
|
||||||
|
headers: this.headers,
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.http.post<any>(`${geturl}`,body, options);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,11 +22,19 @@
|
|||||||
<div class="header-title flex-grow-1 cursor-pointer">
|
<div class="header-title flex-grow-1 cursor-pointer">
|
||||||
<label>{{loadedEvent.workflowInstanceDataFields.Subject}} </label>
|
<label>{{loadedEvent.workflowInstanceDataFields.Subject}} </label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div (click)="editar(loadedEvent.serialNumber)" class="header-icon-right display-none-{{showAside}}">
|
<div (click)="editar(loadedEvent.serialNumber)" class="header-icon-right display-none-{{showAside}}">
|
||||||
<button class="btn-no-color">
|
<button class="btn-no-color">
|
||||||
<ion-icon src="assets/images/icons-edit.svg"></ion-icon>
|
<ion-icon src="assets/images/icons-edit.svg"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div (click)="rejectTask(loadedEvent.serialNumber)" class="header-icon-right display-none-{{showAside}}">
|
||||||
|
<button class="btn-no-color" >
|
||||||
|
<ion-icon class="delete" name="trash-sharp"></ion-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="upper-content d-flex flex-column">
|
<div class="upper-content d-flex flex-column">
|
||||||
<div class="content-location">
|
<div class="content-location">
|
||||||
@@ -117,6 +125,5 @@
|
|||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<button class="btn-cancel" shape="round" (click)="emendTask(loadedEvent.serialNumber)">Adicionar Nota</button>
|
<button class="btn-cancel" shape="round" (click)="emendTask(loadedEvent.serialNumber)">Adicionar Nota</button>
|
||||||
<button class="btn-ok" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</button>
|
<button class="btn-ok" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</button>
|
||||||
<button class="btn-delete" shape="round" (click)="rejectTask(loadedEvent.serialNumber)">Rejeitar</button>
|
|
||||||
</div>
|
</div>
|
||||||
</ion-footer>
|
</ion-footer>
|
||||||
|
|||||||
@@ -208,3 +208,12 @@ ion-menu{
|
|||||||
}
|
}
|
||||||
} */
|
} */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.delete{
|
||||||
|
padding: 7px;
|
||||||
|
font-size: 21px;
|
||||||
|
color:#fff;
|
||||||
|
background: #d30606;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
@@ -69,12 +69,12 @@ export class ApproveEventPage implements OnInit {
|
|||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.getTask();
|
this.getTask();
|
||||||
this.getAttachments();
|
this.getAttachments();
|
||||||
}, 4000)
|
}, 6000)
|
||||||
|
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.getTask();
|
this.getTask();
|
||||||
this.getAttachments();
|
this.getAttachments();
|
||||||
}, 6000)
|
}, 10000)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,7 +135,6 @@ export class ApproveEventPage implements OnInit {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await this.processes.PostTaskAction(body).toPromise()
|
await this.processes.PostTaskAction(body).toPromise()
|
||||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
|
||||||
this.toastService.successMessage('Evento rejeitado')
|
this.toastService.successMessage('Evento rejeitado')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.toastService.badRequest('Processo não efectuado')
|
this.toastService.badRequest('Processo não efectuado')
|
||||||
@@ -218,6 +217,9 @@ export class ApproveEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
goToEventsToApprove() {
|
goToEventsToApprove() {
|
||||||
|
if(window.location.pathname.startsWith('/home/agenda')) {
|
||||||
|
this.close()
|
||||||
|
} else {
|
||||||
let navigationExtras: NavigationExtras = {
|
let navigationExtras: NavigationExtras = {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"eventos": true,
|
"eventos": true,
|
||||||
@@ -226,6 +228,8 @@ export class ApproveEventPage implements OnInit {
|
|||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @description edit event to aprove */
|
/** @description edit event to aprove */
|
||||||
async editar(serialNumber: string) {
|
async editar(serialNumber: string) {
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
@Output() setIntervenient = new EventEmitter<any>();
|
@Output() setIntervenient = new EventEmitter<any>();
|
||||||
@Output() setIntervenientCC = new EventEmitter<any>();
|
@Output() setIntervenientCC = new EventEmitter<any>();
|
||||||
@Output() closeComponent = new EventEmitter<any>();
|
@Output() closeComponent = new EventEmitter<any>();
|
||||||
|
@Output() closeEventToApprove = new EventEmitter<any>();
|
||||||
|
|
||||||
@Input() saveData: any;
|
@Input() saveData: any;
|
||||||
@Input() serialNumber: string
|
@Input() serialNumber: string
|
||||||
@@ -210,7 +211,10 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
|
|
||||||
window['temp.path:/shared/agenda/edit-event-to-approve.ts'] = {}
|
window['temp.path:/shared/agenda/edit-event-to-approve.ts'] = {}
|
||||||
|
|
||||||
this.closeComponent.emit();
|
// this.closeComponent.emit();
|
||||||
|
|
||||||
|
this.closeEventToApprove.emit();
|
||||||
|
|
||||||
/* this.setIntervenient.emit([]);
|
/* this.setIntervenient.emit([]);
|
||||||
this.setIntervenientCC.emit([]);
|
this.setIntervenientCC.emit([]);
|
||||||
this.clearContact.emit(); */
|
this.clearContact.emit(); */
|
||||||
@@ -255,8 +259,6 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
|
|
||||||
async save() {
|
async save() {
|
||||||
|
|
||||||
this.close()
|
|
||||||
|
|
||||||
this.injectValidation()
|
this.injectValidation()
|
||||||
this.runValidation()
|
this.runValidation()
|
||||||
|
|
||||||
@@ -303,8 +305,9 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
try {
|
try {
|
||||||
await this.eventsService.postEventToApproveEdit(event).toPromise()
|
await this.eventsService.postEventToApproveEdit(event).toPromise()
|
||||||
|
|
||||||
this.toastService.successMessage('Evento editado');
|
this.close()
|
||||||
|
|
||||||
|
this.toastService.successMessage('Evento editado');
|
||||||
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
this.toastService.badRequest('Evento não editado');
|
this.toastService.badRequest('Evento não editado');
|
||||||
|
|||||||
@@ -168,99 +168,40 @@ export class ViewEventPage implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
|
||||||
let classs;
|
|
||||||
if( window.innerWidth <= 800){
|
|
||||||
classs = 'modal modal-desktop'
|
|
||||||
} else {
|
|
||||||
classs = 'modal modal-desktop showAsideOptions'
|
|
||||||
}
|
|
||||||
|
|
||||||
const doc = this.loadedAttachments[ this.dicIndex];
|
|
||||||
|
|
||||||
task = {
|
|
||||||
serialNumber: doc.SourceId,
|
|
||||||
taskStartDate: doc.CreateDate,
|
|
||||||
isEvent: true,
|
|
||||||
workflowInstanceDataFields: {
|
|
||||||
FsId: doc.ApplicationId,
|
|
||||||
FolderID: null,
|
|
||||||
DocId: doc.SourceId,
|
|
||||||
Subject: doc.SourceName
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
|
||||||
component: ExpedientTaskModalPage,
|
|
||||||
componentProps: {
|
|
||||||
taskAction: taskAction,
|
|
||||||
task: task,
|
|
||||||
profile: this.profile,
|
|
||||||
},
|
|
||||||
cssClass: classs,
|
|
||||||
});
|
|
||||||
await modal.present();
|
|
||||||
modal.onDidDismiss().then(res=>{
|
|
||||||
console.log(res['data']);
|
|
||||||
if(res['data']=='openDiscart'){
|
|
||||||
console.log('open discart');
|
|
||||||
|
|
||||||
// this.distartExpedientModal();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async openBookMeetingModal(task: any) {
|
|
||||||
|
|
||||||
const doc = this.loadedAttachments[ this.dicIndex];
|
|
||||||
|
|
||||||
const Customtask = {
|
|
||||||
serialNumber: doc.SourceId,
|
|
||||||
taskStartDate: doc.CreateDate,
|
|
||||||
isEvent: true,
|
|
||||||
workflowInstanceDataFields: {
|
|
||||||
FsId: doc.ApplicationId,
|
|
||||||
FolderID: null,
|
|
||||||
DocId: doc.SourceId,
|
|
||||||
Subject: doc.SourceName
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
let classs;
|
|
||||||
if( window.innerWidth <= 800){
|
|
||||||
classs = 'book-meeting-modal modal modal-desktop'
|
|
||||||
} else {
|
|
||||||
classs = 'modal modal-desktop showAsideOptions'
|
|
||||||
}
|
|
||||||
const modal = await this.modalController.create({
|
|
||||||
component: BookMeetingModalPage,
|
|
||||||
componentProps: {
|
|
||||||
task: task,
|
|
||||||
},
|
|
||||||
cssClass: classs,
|
|
||||||
backdropDismiss: false
|
|
||||||
});
|
|
||||||
await modal.present();
|
|
||||||
modal.onDidDismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
async openTaskOptions() {
|
async openTaskOptions() {
|
||||||
|
|
||||||
const doc = this.loadedAttachments[ this.dicIndex];
|
const doc = this.loadedAttachments[ this.dicIndex];
|
||||||
|
|
||||||
let customTask = {
|
let customTask;
|
||||||
serialNumber: doc.SourceId,
|
|
||||||
taskStartDate: doc.CreateDate,
|
if(doc.ApplicationID == 361 || doc.ApplicationId == 361) {
|
||||||
|
customTask = {
|
||||||
|
serialNumber: doc.DispatchNumber,
|
||||||
|
taskStartDate: doc.DateDispatch,
|
||||||
isEvent: true,
|
isEvent: true,
|
||||||
workflowInstanceDataFields: {
|
workflowInstanceDataFields: {
|
||||||
FsId: doc.ApplicationId,
|
FsId: doc.ApplicationID,
|
||||||
FolderID: null,
|
FolderID: null,
|
||||||
DocId: doc.SourceId,
|
DocId: doc.DispatchNumber,
|
||||||
Subject: doc.SourceName
|
Subject: doc.Assunto
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
} else if (doc.ApplicationID == 8 || doc.ApplicationId == 8) {
|
||||||
|
customTask = {
|
||||||
|
serialNumber: doc.DocId,
|
||||||
|
taskStartDate: doc.DocDate,
|
||||||
|
isEvent: true,
|
||||||
|
workflowInstanceDataFields: {
|
||||||
|
FsId: doc.ApplicationID || doc.ApplicationId,
|
||||||
|
FolderID: null,
|
||||||
|
DocId: doc.DocId,
|
||||||
|
Subject: doc.Assunto
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(doc)
|
||||||
|
customTask.Status = ''
|
||||||
|
|
||||||
const popover = await this.modalController.create({
|
const popover = await this.modalController.create({
|
||||||
component: OptsExpedientePage,
|
component: OptsExpedientePage,
|
||||||
|
|||||||
@@ -104,7 +104,6 @@ export class OptsExpedientePage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sendExpedienteToPending() {
|
sendExpedienteToPending() {
|
||||||
this.close();
|
this.close();
|
||||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||||
@@ -136,6 +135,10 @@ export class OptsExpedientePage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||||
|
|
||||||
|
alert('save')
|
||||||
|
console.log(taskAction, task)
|
||||||
|
|
||||||
this.close();
|
this.close();
|
||||||
let classs;
|
let classs;
|
||||||
if( window.innerWidth <= 800){
|
if( window.innerWidth <= 800){
|
||||||
|
|||||||
Reference in New Issue
Block a user