mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -276,7 +276,6 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService._successMessage()
|
||||
} catch (error) {
|
||||
this.toastService._badRequest()
|
||||
@@ -303,7 +302,6 @@ export class DespachoPrPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage('Processo arquivado')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest('Processo não arquivado')
|
||||
}
|
||||
@@ -326,7 +324,6 @@ export class DespachoPrPage implements OnInit {
|
||||
}).toPromise()
|
||||
|
||||
this.toastService._successMessage('Processo criado')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest('Processo não criado')
|
||||
}
|
||||
@@ -352,7 +349,6 @@ export class DespachoPrPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage('')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
@@ -379,7 +375,6 @@ export class DespachoPrPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage()
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
@@ -394,12 +389,14 @@ export class DespachoPrPage implements OnInit {
|
||||
}
|
||||
|
||||
sendExpedienteToPending() {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.serialNumber).subscribe(res => {
|
||||
this.popoverController.dismiss('close')
|
||||
this.toastService._successMessage('Processo enviado para pendentes')
|
||||
this.goBack()
|
||||
loader.remove()
|
||||
}, () => {
|
||||
|
||||
loader.remove()
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
});
|
||||
}
|
||||
|
||||
@@ -387,15 +387,17 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
|
||||
async sendExpedienteToPending() {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
this.despachoService.sendExpedienteToPending(this.serialnumber).subscribe(res => {
|
||||
this.goBack();
|
||||
loader.remove()
|
||||
this.toastService.successMessage()
|
||||
},
|
||||
error => {
|
||||
loader.remove()
|
||||
this.toastService.badRequest("Processo não enviado para despacho")
|
||||
});
|
||||
|
||||
// loader.remove()
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName: string) {
|
||||
|
||||
+2
-2
@@ -193,9 +193,9 @@ export class ApproveEventModalPage implements OnInit {
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
finally {
|
||||
|
||||
@@ -2,12 +2,9 @@ import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { Event } from 'src/app/models/event.model';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { EmendMessageModalPage } from 'src/app/pages/agenda/emend-message-modal/emend-message-modal.page';
|
||||
import { EventActionsPopoverPage } from 'src/app/pages/agenda/event-actions-popover/event-actions-popover.page';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { EditEventToApproveComponent } from 'src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
|
||||
@@ -426,10 +426,12 @@ export class PedidoPage implements OnInit {
|
||||
}
|
||||
|
||||
sendExpedienteToPending() {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res => {
|
||||
this.goBack();
|
||||
loader.remove()
|
||||
}, () => {
|
||||
|
||||
loader.remove()
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
});
|
||||
}
|
||||
|
||||
@@ -22,13 +22,14 @@ export class EditActionPage implements OnInit {
|
||||
public showSeconds = false;
|
||||
public touchUi = false;
|
||||
public enableMeridian = false;
|
||||
public minDate = new Date().toISOString().slice(0,10)
|
||||
public minDate = new Date().toISOString()
|
||||
public maxDate: any;
|
||||
public stepHour = 1;
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
|
||||
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
||||
currentDate = new Date();
|
||||
|
||||
folder: PublicationFolder;
|
||||
folderId: string;
|
||||
@@ -64,8 +65,15 @@ export class EditActionPage implements OnInit {
|
||||
}
|
||||
|
||||
get dateValid() {
|
||||
var validado: boolean;
|
||||
|
||||
if (window.innerWidth <= 800) {
|
||||
return this.folder.DateBegin < this.folder.DateEnd? ['ok']: []
|
||||
if ((this.folder.DateBegin < this.folder.DateEnd) && (new Date(this.folder.DateBegin).getTime() > this.currentDate.getTime())) {
|
||||
validado = true;
|
||||
}else{
|
||||
validado = false;
|
||||
}
|
||||
return validado == true ? ['ok']: [];
|
||||
} else {
|
||||
return ['ok']
|
||||
}
|
||||
@@ -89,6 +97,11 @@ export class EditActionPage implements OnInit {
|
||||
}
|
||||
|
||||
async save() {
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
|
||||
if(this.Form.invalid) return false
|
||||
|
||||
let body = {
|
||||
ProcessId: this.folderId,
|
||||
Description: this.folder.Description,
|
||||
|
||||
@@ -43,13 +43,14 @@ export class NewActionPage implements OnInit {
|
||||
public showSeconds = false;
|
||||
public touchUi = false;
|
||||
public enableMeridian = false;
|
||||
public minDate = new Date().toISOString().slice(0,10)
|
||||
public minDate = new Date().toISOString()
|
||||
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
|
||||
public stepHour = 1;
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
|
||||
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
||||
currentDate = new Date();
|
||||
|
||||
showLoader = false
|
||||
|
||||
@@ -94,8 +95,15 @@ export class NewActionPage implements OnInit {
|
||||
}
|
||||
|
||||
get dateValid() {
|
||||
var validado: boolean;
|
||||
|
||||
if (window.innerWidth <= 800) {
|
||||
return this.folder.DateBegin < this.folder.DateEnd? ['ok']: []
|
||||
if ((this.folder.DateBegin < this.folder.DateEnd) && (new Date(this.folder.DateBegin).getTime() > this.currentDate.getTime())) {
|
||||
validado = true;
|
||||
}else{
|
||||
validado = false;
|
||||
}
|
||||
return validado == true ? ['ok']: [];
|
||||
} else {
|
||||
return ['ok']
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src='assets/images/icons-add.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src='assets/images/theme/gov/icons-add.svg'></ion-icon>
|
||||
</button>
|
||||
<button title="Atualizar" *ngIf="hideRefreshBtn" class="btn-no-color" (click)="refreshing()">
|
||||
<button title="Atualizar" class="btn-no-color" (click)="refreshing()">
|
||||
<ion-icon slot="icon-only" class="title-icon font-awesome" name="reload-circle" title="Actualizar"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -401,6 +401,7 @@ export class PublicationsPage implements OnInit {
|
||||
goBackToViewPublications() {
|
||||
|
||||
this.closeDesktopComponent();
|
||||
this.idSelected = this.folderId;
|
||||
this.desktopComponent.showViewPublication = true;
|
||||
}
|
||||
|
||||
@@ -408,6 +409,7 @@ export class PublicationsPage implements OnInit {
|
||||
// Emitters
|
||||
goBackToPubications() {
|
||||
this.closeDesktopComponent();
|
||||
this.idSelected = this.folderId;
|
||||
this.desktopComponent.showViewPublication = true;
|
||||
}
|
||||
|
||||
@@ -429,6 +431,7 @@ export class PublicationsPage implements OnInit {
|
||||
// edit publication will send null
|
||||
if (folderId != undefined) {
|
||||
this.folderId = folderId;
|
||||
this.idSelected = this.folderId;
|
||||
}
|
||||
|
||||
this.publication = publication;
|
||||
@@ -437,6 +440,7 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
async editPublication(foolderId: string) {
|
||||
this.closeDesktopComponent();
|
||||
this.idSelected = this.folderId;
|
||||
this.desktopComponent.showEditActions = true;
|
||||
}
|
||||
|
||||
@@ -445,6 +449,7 @@ export class PublicationsPage implements OnInit {
|
||||
this.publicationId = publicationId;
|
||||
|
||||
this.closeDesktopComponent();
|
||||
this.idSelected = this.folderId;
|
||||
this.desktopComponent.showPublicationDetail = true;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user