merge branch

This commit is contained in:
Peter Maquiran
2023-08-28 17:06:16 +01:00
parent 1b897e9c2b
commit a426fba4b3
19 changed files with 176 additions and 136 deletions
+2
View File
@@ -588,6 +588,8 @@ export class AgendaPage implements OnInit {
this.showLoader = true;
const selectedCalendarIds = this.getSelectedAgendaCalendars();
this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
// this.calendar.currentDate.setDate(1);
this.updateEventListBox()
try {
@@ -26,11 +26,7 @@ export class EmendMessageModalPage implements OnInit {
}
save() {
if(this.emendMessage != '') {
this.modalController.dismiss({option:'save', note: this.emendMessage});
} else {
this.toastService._badRequest('É necessário adicionar uma nota');
}
this.modalController.dismiss({option:'save', note: this.emendMessage});
}
@@ -108,7 +108,6 @@ export class EventActionsPopoverPage implements OnInit {
if(res.data.option == 'save') {
if(res.data.note !== '') {
let body = { "serialNumber": this.serialNumber,
"action": "Emendar",
"dataFields": {
@@ -130,10 +129,6 @@ export class EventActionsPopoverPage implements OnInit {
finally {
loader.remove()
}
}
else {
this.toastService._badRequest('É necessário adicionar uma nota');
}
} else {
}
@@ -129,8 +129,7 @@ export class EditEventPage implements OnInit {
role: 'cancel',
cssClass: 'secondary',
handler: () => { }
},
{
}, {
text: 'Sim',
handler: () => {
this.Delete();
@@ -195,39 +195,35 @@ export class ApproveEventModalPage implements OnInit {
modal.onDidDismiss().then( async (res) => {
if(res.data.option == 'save') {
if(res.data.note !== '') {
let body = {
"serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewUserComment": res.data,
}
let body = {
"serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewUserComment": res.data,
}
}
//
const loader = this.toastService.loading()
//
const loader = this.toastService.loading()
try {
await this.processes.PostTaskAction(body).toPromise()
this.router.navigate(['/home/gabinete-digital/event-list']);
this.toastService._successMessage('Evento enviado para revisão');
} catch (error) {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
try {
await this.processes.PostTaskAction(body).toPromise()
this.router.navigate(['/home/gabinete-digital/event-list']);
this.toastService._successMessage('Evento enviado para revisão');
} 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.router.navigate(['/home/gabinete-digital/event-list']);
}
finally {
loader.remove()
this.toastService._badRequest('Evento não enviado para revisão');
}
this.router.navigate(['/home/gabinete-digital/event-list']);
}
finally {
loader.remove()
}
}
else {
this.toastService._badRequest('É necessário adicionar uma nota');
}
}
}, (error) => {
console.log(error)
@@ -190,37 +190,34 @@ export class ApproveEventPage implements OnInit {
.then(async (res) => {
if(res.data.option == 'save') {
if (res.data !== '') {
let body = {
"serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewUserComment": res.data,
}
let body = {
"serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewUserComment": res.data,
}
const loader = this.toastService.loading()
try {
await this.processes.PostTaskAction(body).toPromise()
.catch(() => {
this.offlineManager.storeRequestData('event-listRever', body);
});
this.httpErrorHandle.httpsSucessMessagge('Rever')
this.TaskService.loadEventosParaAprovacao();
this.goBack();
} catch (error) {
this.httpErrorHandle.httpStatusHandle(error)
} finally {
loader.remove()
}
}
else {
this.toastService._badRequest('É necessário adicionar uma nota');
const loader = this.toastService.loading()
try {
await this.processes.PostTaskAction(body).toPromise()
.catch(() => {
this.offlineManager.storeRequestData('event-listRever', body);
});
this.httpErrorHandle.httpsSucessMessagge('Rever')
this.TaskService.loadEventosParaAprovacao();
this.goBack();
} catch (error) {
this.httpErrorHandle.httpStatusHandle(error)
} finally {
loader.remove()
}
}
}, (error) => {
console.log(error)
@@ -307,33 +304,30 @@ export class ApproveEventPage implements OnInit {
modal.onDidDismiss().then(async (res) => {
if(res.data.option == 'save') {
if (res.data.note !== '') {
let body = {
"serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewUserComment": res.data,
}
let body = {
"serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewUserComment": res.data,
}
const loader = this.toastService.loading()
try {
await this.processes.PostTaskAction(body).toPromise();
this.goBack();
this.httpErrorHandle.httpsSucessMessagge('Rever')
this.TaskService.loadEventosParaAprovacao();
} catch (error) {
this.httpErrorHandle.httpStatusHandle(error)
} finally {
loader.remove()
}
}
else {
this.toastService._badRequest('É necessário adicionar uma nota');
const loader = this.toastService.loading()
try {
await this.processes.PostTaskAction(body).toPromise();
this.goBack();
this.httpErrorHandle.httpsSucessMessagge('Rever')
this.TaskService.loadEventosParaAprovacao();
} catch (error) {
this.httpErrorHandle.httpStatusHandle(error)
} finally {
loader.remove()
}
} else {
}
@@ -194,8 +194,8 @@
*ngIf="desktopComponent.showAddNewPublication"
class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1"
[publicationType]="publicationType"
[publication]="publication"
[folderId]="folderId"
[documentId]="documentId"
(closeDesktopComponent)="closeDesktopComponent($event)"
(goBacktoPublicationDetails)="goBacktoPublicationDetails()"
@@ -48,6 +48,7 @@ export class PublicationsPage implements OnInit {
}
folderId: string;
documentId: any
// data set from child component
publicationType: any;
publicationId: string;
@@ -386,6 +387,7 @@ export class PublicationsPage implements OnInit {
}
this.publication = publication;
this.documentId = publication?.DocumentId
this.desktopComponent.showAddNewPublication = true;
}
@@ -39,7 +39,7 @@
<div class="post-img">
<img [lazyLoad]="publication.FileBase64">
</div>
<div class="post-content px-20">
<div class="post-content">
<div class="post-title-time">
<div class="post-title font-15-em">
<ion-label>{{publication.Title}}</ion-label>