diff --git a/config.xml b/config.xml
index 97d2fb38d..7b18d7926 100644
--- a/config.xml
+++ b/config.xml
@@ -3,7 +3,7 @@
gabinete digital
An awesome Ionic/Cordova app.
Ionic Framework Team
-
+
diff --git a/src/app/modals/create-process/create-process.page.ts b/src/app/modals/create-process/create-process.page.ts
index e9e23a859..2b27f0440 100644
--- a/src/app/modals/create-process/create-process.page.ts
+++ b/src/app/modals/create-process/create-process.page.ts
@@ -546,7 +546,7 @@ export class CreateProcessPage implements OnInit {
taskParticipants: this.taskParticipants,
taskParticipantsCc: this.taskParticipantsCc
},
- cssClass: 'attendee',
+ cssClass: 'attendee modal-desktop',
backdropDismiss: false
});
diff --git a/src/app/modals/profile/profile.page.ts b/src/app/modals/profile/profile.page.ts
index 043316723..aaf8562af 100644
--- a/src/app/modals/profile/profile.page.ts
+++ b/src/app/modals/profile/profile.page.ts
@@ -72,9 +72,13 @@ export class ProfilePage implements OnInit {
this.storageservice.get("Notifications").then((value) => {
console.log("Init get store", value)
- var data = JSON.parse(value);
- console.log("Init store parse", data)
- data.forEach((element,i) => {
+ /* var data = JSON.parse(value); */
+ console.log("Init store parse", value)
+ if(typeof(value) == 'string') {
+ value = JSON.parse(value)
+ console.log("CSDfdvdf",value)
+ }
+ value.forEach((element,i) => {
console.log("ARaaAA", element)
let notificationObject;
if(element.payload){
@@ -124,17 +128,6 @@ export class ProfilePage implements OnInit {
console.log('Timer badge count')
}
- typeAgendaColor(service,typeagenda,role){
- if (service == "agenda" && typeagenda == "oficial" && role == "100000011"){
- document.body.style.setProperty(`--notificationtypeagenda`, "#ffb703");
- } else if( service == "agenda" && typeagenda == "pessoal" && role == "100000011"){
- document.body.style.setProperty(`--notificationtypeagenda`, "#ff0303");
- } else if (service == "agenda" && typeagenda == "oficial" && role == "100000014"){
- document.body.style.setProperty(`--notificationtypeagenda`, "#03d838");
- } else if (service == "agenda" && typeagenda == "oficial" && role == "100000014"){
- document.body.style.setProperty(`--notificationtypeagenda`, "#8b0ae0");
- }
- }
getFormatedTime(dateString){
var date = new Date(dateString);
@@ -213,7 +206,6 @@ export class ProfilePage implements OnInit {
logout() {
SessionStore.setInativity(false)
- window['inactivity/function']()
setTimeout(() => {
this.router.navigate(['/inactivity']);
diff --git a/src/app/models/event.model.ts b/src/app/models/event.model.ts
index 2ce647677..dfa36d7d0 100644
--- a/src/app/models/event.model.ts
+++ b/src/app/models/event.model.ts
@@ -127,6 +127,7 @@ export interface EventToApproveEdit {
MDEmail: string;
IsAllDayEvent: boolean;
Status: string;
+ Category: string
EventType: string;
IsRecurring: boolean;
ParticipantsList: ParticipantsList[];
@@ -140,4 +141,59 @@ export interface EventToApproveEdit {
InstanceId?: string;
}
-// ================================================================================
\ No newline at end of file
+// // ================================================================================
+// export interface EventToApproveDetails {
+// serialNumber: string;
+// originator: {
+// email: string;
+// manager: string;
+// displayName: string;
+// fqn: string;
+// username: string;
+// }[]
+// actions: string[];
+// activityInstanceName: string;
+// workflowInstanceFolio: string;
+// taskStartDate: string;
+// workflowID: number;
+// workflowInstanceID: number;
+// workflowName: string;
+// workflowDisplayName: string;
+// formURL: string;
+// workflowInstanceDataFields: {
+// Body: string;
+// Location: string;
+// Subject: string;
+// StartDate: string;
+// EndDate: string;
+// Participants: string;
+// CC: string;
+// Private: boolean;
+// ReviewUserComment: string;
+// MDName: string;
+// MDEmail: string;
+// OriginatorComments: string;
+// Agenda: string;
+// EventType: string;
+// TimeZone: string;
+// EventID: string;
+// HasAttachments: boolean;
+// ParticipantsList: {
+// $type?: any;
+// EmailAddress: string;
+// Name: string;
+// IsRequired: boolean;
+// }[]
+// EventOrganizer: string;
+// CreatEvent: string;
+// IsAllDayEvent: boolean;
+// MDwxUserID: number;
+// SerializedItem: string;
+// DeserializedItem: string;
+// Status: string;
+// Message: string;
+// InstanceId: string;
+// }
+// totalDocuments?: any;
+// Documents?: any;
+// }
diff --git a/src/app/pages/agenda/edit-event/edit-event.page.ts b/src/app/pages/agenda/edit-event/edit-event.page.ts
index 346b38167..b6609a129 100644
--- a/src/app/pages/agenda/edit-event/edit-event.page.ts
+++ b/src/app/pages/agenda/edit-event/edit-event.page.ts
@@ -265,7 +265,7 @@ export class EditEventPage implements OnInit {
taskParticipants: this.taskParticipants,
taskParticipantsCc: this.taskParticipantsCc
},
- cssClass: 'attendee',
+ cssClass: 'modal attendee modal-desktop',
backdropDismiss: false
});
@@ -279,8 +279,13 @@ export class EditEventPage implements OnInit {
const newAttendees: EventPerson[] = data['taskParticipants'];
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
- this.setIntervenient(newAttendees);
- this.setIntervenientCC(newAttendeesCC);
+ if(newAttendees.length) {
+ this.setIntervenient(newAttendees);
+ }
+ if(newAttendeesCC) {
+ this.setIntervenientCC(newAttendeesCC);
+ }
+
}
});
}
diff --git a/src/app/pages/agenda/new-event/new-event.page.ts b/src/app/pages/agenda/new-event/new-event.page.ts
index 77d96de29..fb5d5d4e4 100644
--- a/src/app/pages/agenda/new-event/new-event.page.ts
+++ b/src/app/pages/agenda/new-event/new-event.page.ts
@@ -296,9 +296,9 @@ export class NewEventPage implements OnInit {
const modal = await this.modalController.create({
component: AttendeesPageModal,
componentProps: {
- eventAttendees: this.postEvent.Attendees,
adding: this.adding,
- taskParticipants: this.taskParticipants
+ taskParticipants: this.taskParticipants,
+ taskParticipantsCc: this.taskParticipantsCc
},
cssClass: 'attendee modal modal-desktop',
backdropDismiss: false
@@ -308,19 +308,27 @@ export class NewEventPage implements OnInit {
modal.onDidDismiss().then((data) => {
- if(data){
+ if(data) {
data = data['data'];
+ if(data) {
- const newAttendees: EventPerson[] = data['taskParticipants'];
- const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
+ const newAttendees: EventPerson[] = data['taskParticipants'];
+ const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
+
+ if(newAttendees.length) {
+ this.setIntervenient(newAttendees);
+ }
+ if(newAttendeesCC) {
+ this.setIntervenientCC(newAttendeesCC);
+ }
+
+ }
- this.setIntervenient(newAttendees);
- this.setIntervenientCC(newAttendeesCC);
}
});
}
- setIntervenient(data){
+ setIntervenient(data) {
this.taskParticipants = data;
this.postEvent.Attendees = data;
}
@@ -329,7 +337,7 @@ export class NewEventPage implements OnInit {
this.taskParticipantsCc = data;
}
- addParticipants(){
+ addParticipants() {
this.adding = 'intervenient'
this.openAttendees();
}
diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts
index da7264405..6f7301aac 100644
--- a/src/app/services/notifications.service.ts
+++ b/src/app/services/notifications.service.ts
@@ -219,7 +219,7 @@ export class NotificationsService {
//this.jsonstore.createCollection('Notifications',message);
this.DataArray.push(message)
console.log("On ReceiveNotification", this.DataArray)
- this.storageService.store("Notifications",JSON.stringify(this.DataArray))
+ this.storageService.store("Notifications",this.DataArray)
console.log(message);
var data = JSON.parse(message.payload);
@@ -239,7 +239,7 @@ export class NotificationsService {
}
this.callbacks.forEach( e=> {
- if(e.type == data.Object || e.type == 'any') {
+ if(e.type == data.Object || e.type == "any") {
e.funx()
}
})
diff --git a/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html b/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html
index e78d25b29..22078a985 100644
--- a/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html
+++ b/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html
@@ -87,6 +87,48 @@
+
+
+
+
+
+
+
+
+ Reunião
+ Viagem
+ Conferência
+ Encontro
+
+
+
+
+
+
+
+ Reunião
+
+
+ Viagem
+
+
+ Conferência
+
+
+ Encontro
+
+
+
+
+
+
+
+
+
-
+ 123123
diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html
index 2c3d99fac..b20c12395 100644
--- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html
+++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html
@@ -68,6 +68,49 @@
+
+
+
+
+
+
+
+
+
+ Reunião
+ Viagem
+ Conferência
+ Encontro
+
+
+
+
+
+
+
+ Reunião
+
+
+ Viagem
+
+
+ Conferência
+
+
+ Encontro
+
+
+
+
+
+
+
+
+
diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts
index 2fe029dd4..49cc677c1 100644
--- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts
+++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts
@@ -68,6 +68,7 @@ export class EditEventToApproveComponent implements OnInit {
workflowInstanceDataFields:{
Body: "",
OccurrenceType: '',
+ Category: '',
LastOccurrence: '',
ParticipantsList: [],
Agenda: '',
@@ -132,41 +133,42 @@ export class EditEventToApproveComponent implements OnInit {
async getTask() {
const result = await this.processes.GetTask(this.serialNumber).toPromise();
- console.log(result);
+ console.log(result);
this.eventProcess = result
+ this.eventProcess.workflowInstanceDataFields.Category = result.workflowInstanceDataFields.EventType
- this.startDate = new Date(this.eventProcess.workflowInstanceDataFields.StartDate);
- this.endDate = new Date(this.eventProcess.workflowInstanceDataFields.EndDate);
+ this.startDate = new Date(this.eventProcess.workflowInstanceDataFields.StartDate);
+ this.endDate = new Date(this.eventProcess.workflowInstanceDataFields.EndDate);
- // description
- let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
- this.eventProcess.workflowInstanceDataFields.Body = body
- this.Location = this.eventProcess.workflowInstanceDataFields.Location
+ // description
+ let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
+ this.eventProcess.workflowInstanceDataFields.Body = body
+ this.Location = this.eventProcess.workflowInstanceDataFields.Location
- this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
- try {
- this.getAttachments()
+ this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
+ try {
+ this.getAttachments()
- } catch (error) {
+ } catch (error) {
+ }
+
+
+ if(this.eventProcess.workflowInstanceDataFields.IsRecurring == false) {
+ this.isRecurring = "Não se repete";
+ }
+ else {
+ this.isRecurring = "Repete";
+ }
+
+ this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => {
+ if(e.IsRequired) {
+ this.taskParticipants.push(e);
+ } else {
+ this.taskParticipantsCc.push(e);
}
-
-
- if(this.eventProcess.workflowInstanceDataFields.IsRecurring == false) {
- this.isRecurring = "Não se repete";
- }
- else {
- this.isRecurring = "Repete";
- }
-
- this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => {
- if(e.IsRequired) {
- this.taskParticipants.push(e);
- } else {
- this.taskParticipantsCc.push(e);
- }
- })
+ })
/* }) */
}
@@ -254,6 +256,7 @@ export class EditEventToApproveComponent implements OnInit {
LastOccurrence: this.eventProcess.workflowInstanceDataFields.LastOccurrence,
},
ParticipantsList: this.eventProcess.workflowInstanceDataFields.ParticipantsList,
+ Category: this.eventProcess.workflowInstanceDataFields.Category
}
console.log(event);
@@ -307,14 +310,19 @@ export class EditEventToApproveComponent implements OnInit {
modal.onDidDismiss().then((data) => {
- if(data){
+ if(data) {
data = data['data'];
const newAttendees: EventPerson[] = data['taskParticipants'];
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
- this.setIntervenient(newAttendees);
- this.setIntervenientCC(newAttendeesCC);
+ if(newAttendees.length) {
+ this.setIntervenient(newAttendees);
+ }
+ if(newAttendeesCC) {
+ this.setIntervenientCC(newAttendeesCC);
+ }
+
}
});
} else {
diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts
index fdd6ed39f..c7aad3f17 100644
--- a/src/app/shared/header/header.page.ts
+++ b/src/app/shared/header/header.page.ts
@@ -6,6 +6,7 @@ import { LoginUserRespose } from 'src/app/models/user.model';
import { ProfilePage } from 'src/app/modals/profile/profile.page';
import { StorageService } from '../../services/storage.service';
import { SessionStore } from 'src/app/store/session.service';
+import { NotificationsService } from '../../services/notifications.service';
import { environment } from 'src/environments/environment';
@Component({
@@ -32,6 +33,7 @@ export class HeaderPage implements OnInit {
private animationController: AnimationController,
private storageservice: StorageService,
private platform: Platform,
+ private notificationsService: NotificationsService,
) {
this.loggeduser = SessionStore.user;
router.events.subscribe((val) => {
@@ -45,21 +47,28 @@ export class HeaderPage implements OnInit {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log('Notifications not supported')
} else {
- this.notificationLengthData();
+ this.UpdateNotificationCount();
}
}
- async notificationLengthData() {
+ UpdateNotificationCount() {
+ this.notificationsService.registerCallback(
+ 'any',
+ () => {
+ this.notificationLengthData();
+ }
+ )
+ }
+
+ notificationLengthData() {
this.storageservice.get("Notifications").then((value) => {
console.log("Init get store", value)
- var data = JSON.parse(value);
- this.notificationLength = data.length;
+ /* var data = JSON.parse(value); */
+ this.notificationLength = value.length;
})
- await new Promise(resolve => setTimeout(resolve, 10000))
- await this.notificationLengthData()
console.log('Timer badge count')
}