mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
to many changes
This commit is contained in:
@@ -19,6 +19,7 @@ import { EventService } from 'src/app/services/rules/event.service';
|
||||
import { EventPipe } from 'src/app/pipes/event.pipe';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
@@ -106,6 +107,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
private eventService: EventService,
|
||||
public ThemeService: ThemeService,
|
||||
public _eventService: EventsService,
|
||||
private httpErroHandle: HttpErrorHandle
|
||||
) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
this.document = this.navParams.get('document')
|
||||
@@ -291,17 +293,11 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
|
||||
this.eventService.create({ body: postEvent, calendar: this.postData.CalendarName }).subscribe(async (respose) => {
|
||||
laoder.remove()
|
||||
this.toastService._successMessage('Reunião criada')
|
||||
this.httpErroHandle.httpsSucessMessagge('new event');
|
||||
this.modalController.dismiss()
|
||||
}, (error) => {
|
||||
laoder.remove()
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else if(error.error.includes('attachments')) {
|
||||
throw(error.error + JSON.stringify(postEvent.Attachments))
|
||||
} else {
|
||||
this.toastService._badRequest('Não foi possível marcar a reunião');
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}, ()=>{
|
||||
laoder.remove()
|
||||
});
|
||||
|
||||
@@ -18,6 +18,7 @@ import { EditEventPage } from 'src/app/pages/agenda/edit-event/edit-event.page';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -70,7 +71,8 @@ export class ViewEventPage implements OnInit {
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService,
|
||||
private storage: StorageService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
this.eventId = this.navParams.get('eventId');
|
||||
this.CalendarId = this.navParams.get('CalendarId');
|
||||
@@ -191,8 +193,10 @@ export class ViewEventPage implements OnInit {
|
||||
alert.dismiss();
|
||||
}, 1500);
|
||||
this.goBack();
|
||||
this.toastService._successMessage('Evento apagado');
|
||||
}, () => { },
|
||||
this.httpErrorHandle.httpsSucessMessagge('Evento eliminado')
|
||||
}, (error) => {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
},
|
||||
() => {
|
||||
loader.remove();
|
||||
});
|
||||
|
||||
@@ -124,7 +124,6 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
this.toastService.badRequest();
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -141,7 +140,7 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
}
|
||||
|
||||
async rejeitar() {
|
||||
let body = { "serialNumber": this.serialNumber, "action": "Rejeitar" }
|
||||
let body = { "serialNumber": this.serialNumber, "action": "Descartar" }
|
||||
|
||||
const loader = this.toastService.loading();
|
||||
try {
|
||||
|
||||
@@ -395,20 +395,20 @@ export class NewEventPage implements OnInit {
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
|
||||
eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise();
|
||||
this.toastService._successMessage('Evento criado');
|
||||
this.hhtpErrorHandle.httpsSucessMessagge('new event')
|
||||
|
||||
}
|
||||
else if(this.loggeduser.Profile == 'PR') {
|
||||
|
||||
const CalendarId = this.selectedCalendarId()
|
||||
eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise();
|
||||
this.toastService._successMessage('Evento criado');
|
||||
this.hhtpErrorHandle.httpsSucessMessagge('new event')
|
||||
|
||||
} else {
|
||||
|
||||
const CalendarId = this.selectedCalendarId()
|
||||
eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise();
|
||||
this.toastService._successMessage('Evento criado');
|
||||
this.hhtpErrorHandle.httpsSucessMessagge('new event')
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -298,8 +298,10 @@ export class ViewEventPage implements OnInit {
|
||||
alert.dismiss();
|
||||
}, 1500);
|
||||
this.goBack();
|
||||
this.toastService._successMessage('Evento apagado');
|
||||
}, () => { },
|
||||
this.httpErrorHandle.httpsSucessMessagge('delete event')
|
||||
}, (error) => {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
},
|
||||
() => {
|
||||
loader.remove();
|
||||
});
|
||||
|
||||
+8
@@ -81,6 +81,14 @@
|
||||
<button (click)="Assinar()" class="btn-cancel" shape="round" >Assinado</button>
|
||||
<div class="solid"></div>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button (click)="openAddNoteModal('Arquivo')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<div class="solid"></div>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<div class="solid"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="!task">
|
||||
|
||||
+134
-1
@@ -10,6 +10,11 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import {HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { DespachoService } from 'src/app/Rules/despacho.service'
|
||||
import { AttachmentList } from 'src/app/models/Excludetask';
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-diploma-assinar',
|
||||
@@ -38,7 +43,8 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService,
|
||||
private httpErroHandle: HttpErrorHandle
|
||||
private httpErroHandle: HttpErrorHandle,
|
||||
private despachoService: DespachoService,
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if(params["params"].SerialNumber) {
|
||||
@@ -182,6 +188,133 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName: string) {
|
||||
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'add-note-modal-no-height'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps: {
|
||||
showAttachmentBtn: true,
|
||||
actionName: actionName
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
if (res.data) {
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
if (actionName == 'Executado') {
|
||||
|
||||
/* await this.executado(res.data.note, docs);
|
||||
this.goBack(); */
|
||||
}
|
||||
else if (actionName == 'Arquivo') {
|
||||
await this.arquivar(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
else if (actionName == 'Reexecução') {
|
||||
/* await this.reexecute(res.data.note, docs);
|
||||
this.goBack(); */
|
||||
} else if(actionName == 'Gerar Diploma') {
|
||||
/* await this.generateDiploma(res.data.note, docs);
|
||||
this.goBack(); */
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async arquivar(note: string, documents: AttachmentList) {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.despachoService.arquivar(note, documents, this.serialnumber).toPromise()
|
||||
this.httpErroHandle.httpsSucessMessagge('Arquivar')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: CreateProcessPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
profile: this.profile,
|
||||
fulltask: this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
|
||||
|
||||
if (res['data'] == 'openDiscart') {
|
||||
await this.distartExpedientModal();
|
||||
}
|
||||
|
||||
this.goBack();
|
||||
});
|
||||
}
|
||||
|
||||
async distartExpedientModal() {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: this.fulltask.serialNumber,
|
||||
folderId: this.fulltask.workflowInstanceDataFields.FolderID,
|
||||
action: 'complete',
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res => {
|
||||
if (res['data'] == 'close') {
|
||||
this.close();
|
||||
/*
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
toDateString(e) {
|
||||
return new Date(e).toDateString()
|
||||
}
|
||||
|
||||
@@ -185,12 +185,12 @@ export class DiplomasGerarPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
this.despachoService.sendExpedienteToPending(this.serialnumber).subscribe(res => {
|
||||
this.goBack();
|
||||
this.toastService.successMessage()
|
||||
this.httpErroHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
loader.remove()
|
||||
},
|
||||
error => {
|
||||
loader.remove()
|
||||
this.toastService.badRequest("Processo não enviado para despacho")
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
});
|
||||
|
||||
}
|
||||
@@ -309,16 +309,11 @@ export class DiplomasGerarPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
|
||||
this.toastService._successMessage(false, ()=>{
|
||||
this.httpErroHandle.httpsSucessMessagge('Assinado',() => {
|
||||
this.goBack();
|
||||
})
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
|
||||
@@ -79,8 +79,8 @@
|
||||
|
||||
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Revisar Diploma'">
|
||||
<button (click)="tempMethod('Arquivo')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="tempMethod('Despacho')" class="btn-cancel" shape="round" >Efectuar Despacho</button>
|
||||
<button (click)="openAddNoteModal('Arquivo')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efectuar Despacho</button>
|
||||
<button (click)="openAddNoteModal('Solicitar assinatura')" class="btn-cancel" shape="round" >Solicitar assinatura do Presidente</button>
|
||||
<button (click)="openAddNoteModal('Solicitar alteração')" class="btn-cancel" shape="round" >Solicitar alteração</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
|
||||
@@ -16,6 +16,10 @@ import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { AttachmentList } from 'src/app/models/Excludetask';
|
||||
import { DespachoService } from 'src/app/Rules/despacho.service'
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -52,7 +56,8 @@ export class DiplomaPage implements OnInit {
|
||||
private backgroundservice: BackgroundService,
|
||||
private platform: Platform,
|
||||
public ThemeService: ThemeService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
private despachoService: DespachoService
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
//
|
||||
@@ -395,6 +400,9 @@ export class DiplomaPage implements OnInit {
|
||||
else if (actionName == 'Concluir diploma') {
|
||||
await this.finish(res.data.note, docs);
|
||||
this.goBack();
|
||||
} else if (actionName == 'Arquivo') {
|
||||
await this.arquivar(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -419,6 +427,24 @@ export class DiplomaPage implements OnInit {
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async arquivar(note: string, documents: AttachmentList) {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.despachoService.arquivar(note, documents, this.serialNumber).toPromise()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Arquivar')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
@@ -427,5 +453,61 @@ export class DiplomaPage implements OnInit {
|
||||
console.log(actionname)
|
||||
}
|
||||
|
||||
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: CreateProcessPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
profile: this.profile,
|
||||
fulltask: this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
|
||||
|
||||
if (res['data'] == 'openDiscart') {
|
||||
await this.distartExpedientModal();
|
||||
}
|
||||
|
||||
this.goBack();
|
||||
});
|
||||
}
|
||||
|
||||
async distartExpedientModal() {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: this.fulltask.serialNumber,
|
||||
folderId: this.fulltask.workflowInstanceDataFields.FolderID,
|
||||
action: 'complete',
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res => {
|
||||
if (res['data'] == 'close') {
|
||||
this.close();
|
||||
/*
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+6
-9
@@ -11,6 +11,7 @@ import { EventActionsPopoverPage } from '../../../agenda/event-actions-popover/e
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-approve-event-modal',
|
||||
@@ -40,7 +41,8 @@ export class ApproveEventModalPage implements OnInit {
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private iab: InAppBrowser,
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
|
||||
|
||||
@@ -101,18 +103,13 @@ export class ApproveEventModalPage implements OnInit {
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
|
||||
this.toastService._successMessage('Evento aprovado', ()=>{
|
||||
this.httpErrorHandle.httpsSucessMessagge('Aprovar', ()=>{
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.modalController.dismiss(null);
|
||||
})
|
||||
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não aprovado')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -128,7 +125,7 @@ export class ApproveEventModalPage implements OnInit {
|
||||
|
||||
async rejectTask(serialNumber:string) {
|
||||
|
||||
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
||||
let body = { "serialNumber": serialNumber, "action": "Descartar" }
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
|
||||
@@ -299,7 +299,7 @@ export class ApproveEventPage implements OnInit {
|
||||
}
|
||||
|
||||
async rejeitar(serialNumber: string) {
|
||||
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
||||
let body = { "serialNumber": serialNumber, "action": "Descartar" }
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
@@ -384,16 +384,10 @@ export class ApproveEventPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.toastService._successMessage();
|
||||
this.goBack();
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rever')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
+2
-7
@@ -333,18 +333,13 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.serialNumber).subscribe(res => {
|
||||
|
||||
this.toastService._successMessage('Processo enviado para pendentes')
|
||||
this.httpErroHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
this.goBack();
|
||||
loader.remove()
|
||||
},
|
||||
(error) => {
|
||||
loader.remove()
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não enviado para pendentes')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
</ion-buttons>
|
||||
<ion-buttons slot="end">
|
||||
<button class="btn-ok" fill="clear" color="#fff" (click)="save()">
|
||||
<ion-label>Enviar</ion-label>
|
||||
<ion-label>Gravar</ion-label>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<div class="overflow-y-auto">
|
||||
<div *ngIf="publicationType!='1'" class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="pub.Title" name="title" ngDefaultControl placeholder="Título" ></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="pub.Title" name="title" ngDefaultControl placeholder="Título*" ></ion-input>
|
||||
</div>
|
||||
|
||||
<div *ngIf="publicationType!='1'" class="container-div">
|
||||
@@ -20,7 +20,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-textarea-class" [class.input-error]="Form?.get('Message')?.invalid && validateFrom ">
|
||||
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="pub.Message" name="description" ngDefaultControl rows="12" cols="20" placeholder="Corpo de texto..."></ion-textarea>
|
||||
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="pub.Message" name="description" ngDefaultControl rows="12" cols="20" placeholder="Corpo de texto*"></ion-textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -101,8 +101,11 @@
|
||||
</button>
|
||||
</ion-buttons>
|
||||
<ion-buttons slot="end">
|
||||
<button class="btn-ok" fill="clear" color="#fff" (click)="save()">
|
||||
<ion-label>Enviar</ion-label>
|
||||
<button *ngIf="publicationType == '2'" class="btn-ok" fill="clear" color="#fff" (click)="save()">
|
||||
<ion-label>Criar</ion-label>
|
||||
</button>
|
||||
<button *ngIf="publicationType == '3'" class="btn-ok" fill="clear" color="#fff" (click)="save()">
|
||||
<ion-label>Gravar</ion-label>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -299,7 +299,7 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Criar publicação')
|
||||
this.httpErrorHandle.httpsSucessMessagge('Publicação Editada')
|
||||
|
||||
this.close();
|
||||
} catch (error) {
|
||||
|
||||
@@ -10,6 +10,7 @@ import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-publication-detail',
|
||||
@@ -29,7 +30,8 @@ export class PublicationDetailPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService,
|
||||
public p:PermissionService ) {
|
||||
public p:PermissionService,
|
||||
private httpErrorHandle: HttpErrorHandle ) {
|
||||
|
||||
this.publicationId = this.navParams.get('publicationId');
|
||||
/* this.folderId = this.navParams.get('folderIdId'); */
|
||||
@@ -95,13 +97,13 @@ export class PublicationDetailPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
|
||||
this.toastService.successMessage('Publicação eliminado')
|
||||
this.httpErrorHandle.httpsSucessMessagge('Eliminar publicação')
|
||||
if(window['app-view-publications-page-doRefresh']) {
|
||||
window['app-view-publications-page-doRefresh']()
|
||||
}
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Publicação não eliminado')
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -136,6 +136,12 @@ export class HttpErrorHandle {
|
||||
case 'Eliminar Acção':
|
||||
this.toastService._successMessage('Acção eliminada!')
|
||||
break;
|
||||
case 'Solicitar Reapreciação':
|
||||
this.toastService._successMessage('Solicitação enviada!')
|
||||
break;
|
||||
case 'Aprovar exp':
|
||||
this.toastService._successMessage('Expediente enviado!');
|
||||
break;
|
||||
|
||||
default:
|
||||
this.toastService._successMessage('Processo efetuado!')
|
||||
|
||||
@@ -104,7 +104,7 @@ export class ApproveEventPage implements OnInit {
|
||||
|
||||
async rejectTask(serialNumber:string) {
|
||||
|
||||
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
||||
let body = { "serialNumber": serialNumber, "action": "Descartar" }
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
@@ -14,6 +14,7 @@ import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-opts-expediente-pr',
|
||||
@@ -50,6 +51,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService,
|
||||
public p: PermissionService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
|
||||
) {
|
||||
|
||||
@@ -141,14 +143,9 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService._successMessage()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Aprovar exp')
|
||||
} catch(error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -183,15 +180,10 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(otherbody).toPromise()
|
||||
this.toastService._successMessage('Processo descartado');
|
||||
this.httpErrorHandle.httpsSucessMessagge('Arquivar')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -207,15 +199,10 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
// this.toastService.successMessage('Processo descartado');
|
||||
this.httpErrorHandle.httpsSucessMessagge('Arquivar')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não descartado');
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -227,15 +214,10 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();
|
||||
this.toastService._successMessage();
|
||||
this.httpErrorHandle.httpsSucessMessagge('Arquivar')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest();
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -261,14 +243,9 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.close();
|
||||
this.toastService._successMessage()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rever')
|
||||
} catch(error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErrorHandle.httpsSucessMessagge(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -280,14 +257,10 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
loader.remove()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
this.close();
|
||||
}, (error) => {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
loader.remove()
|
||||
});
|
||||
}
|
||||
@@ -325,11 +298,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
// this.toastService.successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
this.toastService._badRequest('Processo não descartado');
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-opts-expediente',
|
||||
@@ -48,7 +49,8 @@ export class OptsExpedientePage implements OnInit {
|
||||
private attachmentsService: AttachmentsService,
|
||||
private RouteService: RouteService,
|
||||
private expedienteService: ExpedienteService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private httpErrorHanlde: HttpErrorHandle
|
||||
) {
|
||||
|
||||
}
|
||||
@@ -171,12 +173,7 @@ export class OptsExpedientePage implements OnInit {
|
||||
this.attachmentsService.AddAttachment(body).subscribe((res)=> {
|
||||
this.toastService._successMessage()
|
||||
}, (error) => {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErrorHanlde.httpStatusHandle(error)
|
||||
},()=> {
|
||||
loader.remove()
|
||||
});
|
||||
|
||||
@@ -12,6 +12,7 @@ import { PedidoService } from 'src/app/Rules/pedido.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
|
||||
import { ForwardPage } from 'src/app/modals/forward/forward.page';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -37,6 +38,7 @@ export class RequestOptionsPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
public p: PermissionService,
|
||||
private pedidoService: PedidoService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
this.task = this.navParams.get('task');
|
||||
this.fulltask = this.navParams.get('fulltask');
|
||||
@@ -88,13 +90,13 @@ export class RequestOptionsPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
|
||||
this.toastService._successMessage()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
this.close();
|
||||
loader.remove()
|
||||
}, ()=> {
|
||||
}, (error)=> {
|
||||
loader.remove()
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
});
|
||||
|
||||
}
|
||||
@@ -195,14 +197,9 @@ export class RequestOptionsPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService._successMessage()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Solicitar Reapreciação')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error);
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -270,14 +267,9 @@ export class RequestOptionsPage implements OnInit {
|
||||
note
|
||||
}).toPromise()
|
||||
|
||||
this.toastService._successMessage('Processo arquivado')
|
||||
this.httpErrorHandle.httpsSucessMessagge('Arquivar')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não arquivado')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
</ion-buttons>
|
||||
<ion-buttons slot="end">
|
||||
<button class="btn-ok" fill="clear" color="#fff" (click)="save()">
|
||||
<ion-label>Enviar</ion-label>
|
||||
<ion-label>Gravar</ion-label>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="content-container">
|
||||
|
||||
<div class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="folder.Description" placeholder="Assunto" ></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="folder.Description" placeholder="Assunto*" ></ion-input>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
</ion-buttons>
|
||||
<ion-buttons slot="end">
|
||||
<button class="btn-ok" fill="clear" color="#fff" (click)="save()">
|
||||
<ion-label>Enviar</ion-label>
|
||||
<ion-label>Criar</ion-label>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
|
||||
+4
-6
@@ -7,6 +7,7 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-publication-detail-shared',
|
||||
@@ -30,6 +31,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService,
|
||||
public p:PermissionService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
|
||||
/* this.folderId = this.navParams.get('folderIdId'); */
|
||||
@@ -89,14 +91,10 @@ export class PublicationDetailPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
|
||||
this.toastService._successMessage("Publicação eliminado")
|
||||
this.httpErrorHandle.httpsSucessMessagge('Eliminar publicação')
|
||||
this.goBackToViewPublications.emit();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
this.toastService._badRequest("Publicação não eliminado")
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
laoder.remove()
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { EditActionPage } from 'src/app/pages/publications/edit-action/edit-action.page';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-publications',
|
||||
@@ -44,6 +45,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private storage: Storage,
|
||||
public p:PermissionService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
this.item = new PublicationFolder();
|
||||
}
|
||||
@@ -220,14 +222,9 @@ export class ViewPublicationsPage implements OnInit {
|
||||
const loader = this.toastService.loading();
|
||||
try {
|
||||
await this.publications.DeletePresidentialAction(folderId).toPromise();
|
||||
this.toastService._successMessage()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Eliminar Acção')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
|
||||
@@ -3,4 +3,4 @@ import { oaprProd } from './suport/oapr'
|
||||
import { doneITProd } from './suport/doneIt'
|
||||
|
||||
|
||||
export const environment: Environment = doneITProd;
|
||||
export const environment: Environment = oaprProd;
|
||||
@@ -3,4 +3,4 @@ import { oaprDev } from './suport/oapr'
|
||||
import { doneITDev } from './suport/doneIt'
|
||||
|
||||
|
||||
export const environment: Environment = doneITDev;
|
||||
export const environment: Environment = oaprDev;
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user