mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -154,6 +154,32 @@ const routes: Routes = [
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'despachos',
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/despachos/despachos.module').then(m => m.DespachosPageModule),
|
||||
},
|
||||
{
|
||||
path:':SerialNumber/:caller',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/despachos/despacho/despacho.module').then(m => m.DespachoPageModule),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'pedidos',
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/pedidos/pedidos.module').then(m => m.PedidosPageModule),
|
||||
},
|
||||
{
|
||||
path:':SerialNumber/:caller',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/pedidos/pedido/pedido.module').then(m => m.PedidoPageModule),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path:'event-list',
|
||||
children: [
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export class PublicationFolder {
|
||||
ProcessId: number;
|
||||
ProcessId: string;
|
||||
Description: string;
|
||||
Detail: string;
|
||||
DateBegin: string;
|
||||
|
||||
@@ -39,6 +39,7 @@ export class DespachoPage implements OnInit {
|
||||
fulltask: any;
|
||||
eventsList: Event[] = [];
|
||||
serialnumber: string;
|
||||
caller:string;
|
||||
profile: string;
|
||||
intervenientes: any;
|
||||
cc: any = [];
|
||||
@@ -58,11 +59,16 @@ export class DespachoPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialnumber = params["serialNumber"];
|
||||
console.log(params["serialNumber"]);
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
console.log(params["params"]);
|
||||
|
||||
if(params["params"].SerialNumber) {
|
||||
this.serialnumber = params["params"].SerialNumber;
|
||||
}
|
||||
if(params["params"].caller) {
|
||||
this.caller = params["params"].caller;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
@@ -88,15 +94,30 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
if (window.innerWidth <= 800) {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos']);
|
||||
} else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
'despachos': true
|
||||
if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
|
||||
if (window.innerWidth <= 800) {
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
}
|
||||
else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"pendentes": true,
|
||||
}
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (window.innerWidth <= 800) {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos']);
|
||||
} else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
'despachos': true
|
||||
}
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,6 +138,7 @@ export class DespachoPage implements OnInit {
|
||||
"WorkflowName": res.workflowDisplayName,
|
||||
"DeadlineType": res.workflowInstanceDataFields.DeadlineType,
|
||||
"activityInstanceName": res.activityInstanceName,
|
||||
"Status": res.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.fulltask = res;
|
||||
console.log(this.task);
|
||||
@@ -267,6 +289,8 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
|
||||
async sendExpedienteToPending() {
|
||||
console.log(this.serialnumber);
|
||||
|
||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.close();
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<ion-item
|
||||
class="expediente ion-no-padding cursor-pointer"
|
||||
*ngFor = "let task of despachoList; let i = index"
|
||||
(click)="viewExpedientDetail(task.SerialNumber)"
|
||||
(click)="GoToDespacho(task.SerialNumber)"
|
||||
>
|
||||
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
||||
<div class="item width-100">
|
||||
|
||||
@@ -146,16 +146,8 @@ export class DespachosPage implements OnInit {
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
async viewExpedientDetail(serialNumber:any) {
|
||||
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
|
||||
this.router.navigate(['/home/gabinete-digital/despachos/despacho'], navigationExtras);
|
||||
|
||||
async GoToDespacho(serialNumber:any) {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
docIndex(index: number) {
|
||||
|
||||
@@ -58,14 +58,18 @@ export class PedidoPage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,) {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialnumber = params["serialNumber"];
|
||||
}
|
||||
if(params["caller"]) {
|
||||
this.caller = params["caller"];
|
||||
}
|
||||
});
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
console.log(params["params"]);
|
||||
|
||||
if(params["params"].SerialNumber) {
|
||||
this.serialnumber = params["params"].SerialNumber;
|
||||
}
|
||||
if(params["params"].caller) {
|
||||
this.caller = params["params"].caller;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -81,12 +81,7 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
|
||||
goToPedido(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos/pedido'], navigationExtras);
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
|
||||
@@ -129,78 +129,17 @@ export class PendentesPage implements OnInit {
|
||||
|
||||
async viewTaskDetails(serialNumber:string, workflowName:string) {
|
||||
if(workflowName == 'Despacho'){
|
||||
this.goToDespacho(serialNumber);
|
||||
this.router.navigate(['/home/gabinete-digital/despachos',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
else if(workflowName == 'Pedido de Parecer' || workflowName == 'Pedido de Deferimento'){
|
||||
this.goToPedido(serialNumber);
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
else if(workflowName == 'Expediente'){
|
||||
this.goToExpediente(serialNumber);
|
||||
this.router.navigate(['/home/gabinete-digital/expediente',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
goToDespacho(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
"from": "pendentes"
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/despachos/despacho'], navigationExtras);
|
||||
}
|
||||
|
||||
goToPedido(serialNumber:any) {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
"from": "pendentes"
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos/pedido'], navigationExtras);
|
||||
}
|
||||
|
||||
goToExpediente(serialNumber:any){
|
||||
this.router.navigate(['/home/gabinete-digital/expediente',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
|
||||
async openDespacho(serialNumber:string){
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DespachoPage,
|
||||
componentProps:{
|
||||
enterAnimation: "",
|
||||
serialNumber: serialNumber,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
console.log('refresh list');
|
||||
this.LoadList();
|
||||
});
|
||||
}
|
||||
|
||||
async openPedido(serialNumber:string){
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: PedidoPage,
|
||||
componentProps:{
|
||||
enterAnimation: "",
|
||||
serialNumber: serialNumber,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
console.log('refresh list');
|
||||
this.LoadList();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -124,6 +124,7 @@
|
||||
|
||||
<app-edit-action
|
||||
*ngIf="desktopComponent.showEditActions"
|
||||
[folderId]="folderId"
|
||||
class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1"
|
||||
(closeDesktopComponent)="closeDesktopComponent($event)"
|
||||
>
|
||||
|
||||
@@ -280,6 +280,7 @@ export class PublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
async openOptions(id?: string) {
|
||||
this.folderId = id;
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
|
||||
@@ -66,7 +66,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
getPublicationDetail(){
|
||||
this.publications.PresidentialAction(this.folderId).subscribe(res=>{
|
||||
this.publications.GetPresidentialAction(this.folderId).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.item = res;
|
||||
});
|
||||
|
||||
@@ -29,7 +29,7 @@ export class PublicationsService {
|
||||
return this.http.get<any>(`${geturl}`, options);
|
||||
}
|
||||
|
||||
PresidentialAction(id:any){
|
||||
GetPresidentialAction(id:any){
|
||||
const geturl = environment.apiURL + 'presidentialActions/'+id;
|
||||
|
||||
let options = {
|
||||
@@ -38,6 +38,15 @@ export class PublicationsService {
|
||||
return this.http.get<any>(`${geturl}`, options);
|
||||
}
|
||||
|
||||
UpdatePresidentialAction(body:any){
|
||||
const geturl = environment.apiURL + 'presidentialActions';
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
};
|
||||
return this.http.put<any>(`${geturl}`, body, options);
|
||||
}
|
||||
|
||||
CreatePublicationFolder(body:any){
|
||||
const geturl = environment.apiURL + 'presidentialActions';
|
||||
let options = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { PublicationsService } from 'src/app/services/publications.service';
|
||||
|
||||
@Component({
|
||||
@@ -12,7 +12,6 @@ export class ActionsOptionsPage implements OnInit {
|
||||
id:string;
|
||||
|
||||
constructor(
|
||||
private popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private publicationsService: PublicationsService,
|
||||
@@ -21,8 +20,6 @@ export class ActionsOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.id);
|
||||
|
||||
}
|
||||
|
||||
close () {
|
||||
|
||||
@@ -1,20 +1,10 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { AnimationController, MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page';
|
||||
import { momentG } from 'src/plugin/momentG'
|
||||
import { AnimationController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
@@ -30,45 +20,26 @@ export class DespachosOptionsPage implements OnInit {
|
||||
task: any;
|
||||
fulltask: any;
|
||||
serialnumber: string;
|
||||
profile: string
|
||||
|
||||
constructor(private activateRoute: ActivatedRoute,
|
||||
private processes: ProcessesService,
|
||||
private iab: InAppBrowser,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private events: EventsService,
|
||||
private menu: MenuController,
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
public popoverController: PopoverController,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private animationController: AnimationController,
|
||||
private navParams: NavParams,
|
||||
private toastService: ToastService) {
|
||||
|
||||
this.task = this.navParams.get('task')
|
||||
this.fulltask = this.navParams.get('fulltask')
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.profile = "mdgpr";
|
||||
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialnumber = params["serialNumber"];
|
||||
console.log(params["serialNumber"]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
close () {
|
||||
this.goBack()
|
||||
}
|
||||
|
||||
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
this.popoverController.dismiss();
|
||||
let classs;
|
||||
@@ -82,7 +53,6 @@ export class DespachosOptionsPage implements OnInit {
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
@@ -91,16 +61,14 @@ export class DespachosOptionsPage implements OnInit {
|
||||
console.log(res['data']);
|
||||
if(res['data']=='openDiscart'){
|
||||
console.log('open discart');
|
||||
|
||||
this.distartExpedientModal();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
sendExpedienteToPending(){
|
||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||
this.popoverController.dismiss();
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.close();
|
||||
});
|
||||
@@ -124,11 +92,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
this.close();
|
||||
/* console.log('2Expedient Discard closed2');
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -310,7 +274,6 @@ export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
goBack() {
|
||||
|
||||
let navigationExtras: NavigationExtras = {
|
||||
|
||||
@@ -82,14 +82,14 @@
|
||||
<ion-footer class="ion-no-border">
|
||||
<ion-toolbar class="footer-toolbar width-100 justify-space-between d-flex px-20">
|
||||
<ion-buttons slot="start">
|
||||
<ion-button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
|
||||
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
|
||||
<ion-label>Cancelar</ion-label>
|
||||
</ion-button>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
<ion-buttons slot="end">
|
||||
<ion-button class="btn-ok" fill="clear" color="#fff" (click)="save()">
|
||||
<ion-label>Criar</ion-label>
|
||||
</ion-button>
|
||||
<button class="btn-ok" fill="clear" color="#fff" (click)="save()">
|
||||
<ion-label>Gravar</ion-label>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
</ion-footer>
|
||||
|
||||
@@ -62,14 +62,13 @@
|
||||
padding: 0 !important;
|
||||
}
|
||||
.div-title{
|
||||
width: 180px;
|
||||
/* padding: 0!important; */
|
||||
float: left;
|
||||
margin: 2.5px 0 0 5px;
|
||||
width: fit-content;
|
||||
float: left;
|
||||
margin: 2.5px 0 0 5px;
|
||||
}
|
||||
.title{
|
||||
font-size: 25px;
|
||||
}
|
||||
font-size: 25px;
|
||||
}
|
||||
.container-div{
|
||||
margin-bottom: 15px;
|
||||
overflow: auto;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
||||
import { PublicationsService } from 'src/app/services/publications.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-action',
|
||||
@@ -9,47 +10,49 @@ import { PublicationsService } from 'src/app/services/publications.service';
|
||||
})
|
||||
export class EditActionPage implements OnInit {
|
||||
|
||||
folderId:string;
|
||||
folder: PublicationFolder;
|
||||
@Input() folderId: string;
|
||||
@Output() closeDesktopComponent= new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private publicationsService: PublicationsService,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
this.folder = new PublicationFolder();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.getPublicationDetail();
|
||||
}
|
||||
|
||||
close(){
|
||||
this.closeDesktopComponent.emit();
|
||||
}
|
||||
|
||||
getPublicationDetail() {
|
||||
this.publicationsService.PresidentialAction(this.folderId).subscribe(res=>{
|
||||
console.log(res);
|
||||
getPublicationDetail(){
|
||||
this.publicationsService.GetPresidentialAction(this.folderId).subscribe(res=>{
|
||||
this.folder = res;
|
||||
});
|
||||
}
|
||||
|
||||
save(){
|
||||
/* this.folder = {
|
||||
ProcessId: null,
|
||||
async save(){
|
||||
let body = {
|
||||
ProcessId: this.folderId,
|
||||
Description: this.folder.Description,
|
||||
Detail: this.folder.Detail,
|
||||
DateBegin: this.folder.DateBegin,
|
||||
DateEnd: this.folder.DateEnd,
|
||||
ActionType: this.segment,
|
||||
ActionType: this.folder.ActionType,
|
||||
}
|
||||
console.log(this.folder);
|
||||
console.log(body);
|
||||
|
||||
try {
|
||||
await this.publication.CreatePublicationFolder(this.folder).toPromise()
|
||||
await this.publicationsService.UpdatePresidentialAction(body).toPromise()
|
||||
this.close();
|
||||
this.toastService.successMessage('Acção presidencial criada')
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Não foi possivel criar a acção presidencial')
|
||||
} */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
getPublicationDetail() {
|
||||
this.publications.PresidentialAction(this.folderId).subscribe(res=>{
|
||||
this.publications.GetPresidentialAction(this.folderId).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.item = res;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user