mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
save
This commit is contained in:
@@ -54,7 +54,6 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
taskDate: Date;
|
||||
taskDescription: string;
|
||||
user: string;
|
||||
loadedAttachments:any;
|
||||
subjectTypes:any;
|
||||
selectedTypes: string[]=[];
|
||||
@@ -91,7 +90,6 @@ export class CreateProcessPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
this.loggeduser = userAuth.ValidatedUser;
|
||||
this.user = environment.defaultuser +'@'+ environment.domain;
|
||||
this.task = this.navParams.get('task');
|
||||
|
||||
console.log('task', this.task)
|
||||
@@ -180,6 +178,8 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
|
||||
let attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
console.log(attendees);
|
||||
|
||||
attendees = attendees.map(function(val) {
|
||||
return {
|
||||
UserEmail: val.EmailAddress,
|
||||
@@ -187,6 +187,8 @@ export class CreateProcessPage implements OnInit {
|
||||
};
|
||||
});
|
||||
|
||||
console.log(attendees);
|
||||
|
||||
const DocumentToSave = this.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
@@ -204,14 +206,14 @@ export class CreateProcessPage implements OnInit {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log('this.postData', this.postData, this.taskType);
|
||||
|
||||
try {
|
||||
await this.processes.postDespatcho(this.postData).toPromise();
|
||||
//await this.processes.postDespatcho(this.postData).toPromise();
|
||||
this.FinalizarDespacho('Despacho criado');
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
@@ -223,14 +225,14 @@ export class CreateProcessPage implements OnInit {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log(this.postData);
|
||||
|
||||
try {
|
||||
await this.processes.postParecer(this.postData).toPromise();
|
||||
//await this.processes.postParecer(this.postData).toPromise();
|
||||
this.FinalizarParecer('Pedido de Parecer enviado');
|
||||
}
|
||||
catch (error) {
|
||||
@@ -243,7 +245,7 @@ export class CreateProcessPage implements OnInit {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
@@ -273,7 +275,7 @@ export class CreateProcessPage implements OnInit {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
@@ -292,7 +294,7 @@ export class CreateProcessPage implements OnInit {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
@@ -313,7 +315,7 @@ export class CreateProcessPage implements OnInit {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ constructor(
|
||||
private activatedRoute: ActivatedRoute,
|
||||
) {
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
console.log('Cria');
|
||||
|
||||
if(params['segment'] == 'validar') {
|
||||
this.segment = 'validar';
|
||||
@@ -42,12 +43,15 @@ constructor(
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.LoadList();
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
console.log('Atualiza');
|
||||
|
||||
this.LoadList();
|
||||
}
|
||||
});
|
||||
console.log('Init');
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
|
||||
+5
-7
@@ -60,7 +60,6 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
taskDate: Date;
|
||||
taskDescription: string;
|
||||
user: string;
|
||||
|
||||
loadedAttachments:any;
|
||||
documents:SearchDocument[] = [];
|
||||
@@ -105,7 +104,6 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
) {
|
||||
|
||||
this.loggeduser = userAuth.ValidatedUser;
|
||||
this.user = environment.defaultuser +'@'+ environment.domain;
|
||||
this.task = this.navParams.get('task');
|
||||
|
||||
console.log('task', this.task)
|
||||
@@ -230,7 +228,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
AttachmentList: docs,
|
||||
@@ -261,7 +259,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
AttachmentList: docs
|
||||
@@ -289,7 +287,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
AttachmentList: docs
|
||||
@@ -325,7 +323,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
AttachmentList: docs,
|
||||
@@ -356,7 +354,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
AttachmentList: docs
|
||||
|
||||
@@ -150,15 +150,14 @@
|
||||
<app-empty-container [texto]="emptyTextDescription" *ngIf="showEmptyContainer" class="d-flex height-100 flex-column"></app-empty-container>
|
||||
<app-events-to-approve [profile]="'MDGPR'" *ngIf="showEventsToApprove" class="d-flex height-100 flex-column"></app-events-to-approve>
|
||||
|
||||
<app-expedients (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showExpedients"></app-expedients>
|
||||
<app-expediente (openExpedientList)="openExpedientListPage()" [profile]="profile" [serialNumber]="serialNumber" class="d-flex height-100 flex-column" *ngIf="showExpedientDetail"></app-expediente>
|
||||
<app-pedidos (openPedido)="openExpedientPage($event)" [profile]="profile" [segment]="segment" [serialNumber]="serialNumber" class="d-flex height-100 flex-column" *ngIf="showPedidos"></app-pedidos>
|
||||
<app-despachos (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showDespachos"></app-despachos>
|
||||
<app-despachos-pr (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showDespachosPr"></app-despachos-pr>
|
||||
<app-pendentes (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showPendentes"></app-pendentes>
|
||||
<app-expedients [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showExpedients"></app-expedients>
|
||||
<app-pedidos [profile]="profile" [segment]="segment" [serialNumber]="serialNumber" class="d-flex height-100 flex-column" *ngIf="showPedidos"></app-pedidos>
|
||||
<app-despachos [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showDespachos"></app-despachos>
|
||||
<app-despachos-pr [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showDespachosPr"></app-despachos-pr>
|
||||
<app-pendentes [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showPendentes"></app-pendentes>
|
||||
<app-diplomas (openExpedientDetail)="openExpedientesPrPage($event)" [profile]="profile" [segment]="segment" class="d-flex height-100 flex-column" *ngIf="showDiplomas"></app-diplomas>
|
||||
<app-diplomas-assinar class="d-flex height-100 flex-column" *ngIf="showDiplomasAssinar"></app-diplomas-assinar>
|
||||
<app-expedientes-pr (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showExpedientesPr"></app-expedientes-pr>
|
||||
<app-expedientes-pr [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showExpedientesPr"></app-expedientes-pr>
|
||||
<app-signed-diploma [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showSignedDiploma"></app-signed-diploma>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -333,26 +333,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
//this.eventsToApprove.doRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
async openEventsToApproveList(profile:any) {
|
||||
|
||||
this.closeAllDesktopComponent();
|
||||
//if( window.innerWidth <= 1024){
|
||||
const modal = await this.modalController.create({
|
||||
component: EventListPage,
|
||||
componentProps:{
|
||||
profile: profile,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
//} else {
|
||||
//this.desktopComponent.showEventList = true;
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
openExpedientListPage() {
|
||||
this.closeAllDesktopComponents();
|
||||
@@ -385,23 +365,9 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
openExpedientPage(data){
|
||||
console.log(data);
|
||||
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800){
|
||||
//this.openExpedientList();
|
||||
}
|
||||
else{
|
||||
this.serialNumber = data;
|
||||
this.showExpedientDetail = true;
|
||||
}
|
||||
}
|
||||
|
||||
openPedidosPage(segment:string) {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800) {
|
||||
//this.openPedidoList();
|
||||
|
||||
let navigationExtras: NavigationExtras;
|
||||
|
||||
@@ -424,7 +390,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
openDespachosPage(segment?:string) {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800){
|
||||
//this.openDespachoList();
|
||||
this.router.navigate(['/home/gabinete-digital/despachos']);
|
||||
}
|
||||
else{
|
||||
@@ -437,7 +402,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
openDespachosPrPage(segment?:string) {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800){
|
||||
//this.openDespachoListPr();
|
||||
this.router.navigate(['/home/gabinete-digital/despachos-pr']);
|
||||
}
|
||||
else{
|
||||
@@ -450,7 +414,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
openPendentesPage(segment?:string){
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800){
|
||||
//this.openPendenteList();
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
}
|
||||
else{
|
||||
@@ -463,7 +426,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
openExpedientesPrPage(segment?:string){
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800) {
|
||||
//this.openExpedientList();
|
||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
||||
}
|
||||
else {
|
||||
@@ -479,7 +441,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.closeAllDesktopComponents();
|
||||
|
||||
if( window.innerWidth <= 800){
|
||||
//this.openDeploma();
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": segment}};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||
}
|
||||
@@ -496,7 +457,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
if (this.loggeduser.Profile == 'MDGPR') {
|
||||
if( window.innerWidth <= 800){
|
||||
//this.openDeploma();
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": 'assinados',}};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||
}
|
||||
@@ -507,7 +467,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
} else {
|
||||
if( window.innerWidth <= 800){
|
||||
//this.openDeploma();
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": 'assinados',}};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar'], navigationExtras);
|
||||
}
|
||||
@@ -517,109 +476,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.showDiplomasAssinar = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
openSignedDiploma(segment:string) {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800){
|
||||
this.openDeploma();
|
||||
}
|
||||
else{
|
||||
this.segment = segment;
|
||||
this.showSignedDiploma = true;
|
||||
}
|
||||
}
|
||||
|
||||
async openDeploma() {
|
||||
const modal = await this.modalController.create({
|
||||
component: DiplomasPage,
|
||||
componentProps:{
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
//backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async openExpedientList(){
|
||||
this.closeAllDesktopComponent();
|
||||
//if( window.innerWidth <= 1024){
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedientePage,
|
||||
componentProps: {
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
//} else {
|
||||
console.log('show desktop modal')
|
||||
//this.desktopComponent.showExpediente = true;
|
||||
//}
|
||||
}
|
||||
|
||||
/* async openPendenteList(){
|
||||
this.closeAllDesktopComponent();
|
||||
const modal = await this.modalController.create({
|
||||
component: PendentesPage,
|
||||
componentProps:{
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
console.log('show desktop modal')
|
||||
} */
|
||||
|
||||
async openDespachoList(){
|
||||
this.closeAllDesktopComponent();
|
||||
const modal = await this.modalController.create({
|
||||
component: DespachosPage,
|
||||
componentProps:{
|
||||
profile: this.profile,
|
||||
serialNumber: this.serialNumber
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
console.log('show desktop modal')
|
||||
}
|
||||
|
||||
async openDespachoListPr(){
|
||||
|
||||
this.closeAllDesktopComponent();
|
||||
const modal = await this.modalController.create({
|
||||
component: DespachosPrPage,
|
||||
componentProps:{
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
console.log('show desktop modal')
|
||||
}
|
||||
|
||||
async openPedidoList(){
|
||||
this.closeAllDesktopComponent();
|
||||
const modal = await this.modalController.create({
|
||||
component: PedidosPage,
|
||||
componentProps:{
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
console.log('show desktop modal')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<div class="width-100 overflow-y-auto height-100" *ngIf="taskslist.length >= 1">
|
||||
<div class="width-100 overflow-y-auto height-100" *ngIf="taskslist">
|
||||
<ion-list>
|
||||
<ion-item
|
||||
class="expediente ion-no-padding cursor-pointer"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</ion-refresher>
|
||||
|
||||
<div class="width-100" [ngSwitch]="segment">
|
||||
<div *ngIf="parecerList.length >= 1" class="overflow-y-auto height-100">
|
||||
<div *ngIf="parecerList" class="overflow-y-auto height-100">
|
||||
<ion-list *ngSwitchCase="'parecer'">
|
||||
<!-- *ngFor = "let task of parecerList; let i = index"
|
||||
(click)="viewExpedientDetail(task.SerialNumber)" -->
|
||||
@@ -64,7 +64,7 @@
|
||||
</ion-list>
|
||||
|
||||
</div>
|
||||
<div *ngIf="deferimentoList.length >= 1" class="overflow-y-auto height-100">
|
||||
<div *ngIf="deferimentoList" class="overflow-y-auto height-100">
|
||||
<ion-list *ngSwitchCase="'deferimento'">
|
||||
<ion-item
|
||||
class="expediente ion-no-padding cursor-pointer"
|
||||
|
||||
Reference in New Issue
Block a user