mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix agenda
This commit is contained in:
@@ -728,18 +728,18 @@ app-approve-event{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.filter-Pessoal {
|
// .filter-Pessoal {
|
||||||
.content-pr-Oficial, .content-mdgpr-Oficial, .content-md-Pessoal {
|
// .content-pr-Oficial, .content-mdgpr-Oficial, .content-md-Pessoal {
|
||||||
display: none !important;
|
// display: none !important;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
.filter-Oficial {
|
// .filter-Oficial {
|
||||||
.content-pr-Pessoal, .content-mdgpr-Pessoal, .content-md-Pessoal {
|
// .content-pr-Pessoal, .content-mdgpr-Pessoal, .content-md-Pessoal {
|
||||||
display: none !important;
|
// display: none !important;
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
.dropdown-scroll-weel {
|
.dropdown-scroll-weel {
|
||||||
|
|||||||
@@ -574,11 +574,11 @@ export class AgendaPage implements OnInit {
|
|||||||
let load = 0;
|
let load = 0;
|
||||||
|
|
||||||
for ( const selectedCalendar of selectedCalendarIds) {
|
for ( const selectedCalendar of selectedCalendarIds) {
|
||||||
this.eventService.getEventsByCalendarId(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59'), selectedCalendar.calendarId).then((response: any) => {
|
this.eventService.getEventsByCalendarId(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59'), selectedCalendar.CalendarId).then((response: any) => {
|
||||||
|
|
||||||
let label;
|
let label;
|
||||||
|
|
||||||
if(SessionStore.user.OwnerCalendars.find(e => e.CalendarId == selectedCalendar.calendarId)) {
|
if(SessionStore.user.OwnerCalendars.find(e => e.CalendarId == selectedCalendar.CalendarId)) {
|
||||||
label = 'md'
|
label = 'md'
|
||||||
} else {
|
} else {
|
||||||
label = "pr"
|
label = "pr"
|
||||||
@@ -588,7 +588,7 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
// this.addEventToDB(response, label);
|
// this.addEventToDB(response, label);
|
||||||
let eventsList = response;
|
let eventsList = response;
|
||||||
this.CalendarStore.removeRangeForCalendar(startTime, endTime, label, selectedCalendar.calendarId)
|
this.CalendarStore.removeRangeForCalendar(startTime, endTime, label, selectedCalendar.CalendarId)
|
||||||
this.CalendarStore.pushEvent(eventsList, label);
|
this.CalendarStore.pushEvent(eventsList, label);
|
||||||
|
|
||||||
this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
|
this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
|
||||||
@@ -617,6 +617,18 @@ export class AgendaPage implements OnInit {
|
|||||||
selectedAgenda = {}
|
selectedAgenda = {}
|
||||||
|
|
||||||
getSelectedAgendaCalendars () {
|
getSelectedAgendaCalendars () {
|
||||||
|
|
||||||
|
if(this.CalendarName == 'PR+MDGPR') {
|
||||||
|
|
||||||
|
let result = this.SessionStore.user.OwnerCalendars
|
||||||
|
|
||||||
|
const pr = this.SessionStore.user.SharedCalendars.filter(e => e.CalendarRoleId == this.RoleIdService.PRES.toString())
|
||||||
|
const md = this.SessionStore.user.SharedCalendars.filter(e => e.CalendarRoleId == this.RoleIdService.PV.toString())
|
||||||
|
const join = pr.concat(md)
|
||||||
|
|
||||||
|
return result.concat(join)
|
||||||
|
} else {
|
||||||
|
|
||||||
const calendar = this.eventService.calendarNamesType[this.CalendarName];
|
const calendar = this.eventService.calendarNamesType[this.CalendarName];
|
||||||
let Oficial = calendar?.['OficialId']
|
let Oficial = calendar?.['OficialId']
|
||||||
let Pessoal = calendar?.['PessoalId']
|
let Pessoal = calendar?.['PessoalId']
|
||||||
@@ -625,13 +637,13 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
calendarId : Oficial,
|
CalendarId : Oficial,
|
||||||
OwnerId: calendar.OwnerId,
|
OwnerId: calendar.OwnerId,
|
||||||
CalendarName: calendar.CalendarName
|
CalendarName: calendar.CalendarName
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
OwnerId: calendar.OwnerId,
|
OwnerId: calendar.OwnerId,
|
||||||
calendarId : Pessoal,
|
CalendarId : Pessoal,
|
||||||
CalendarName: calendar.CalendarName
|
CalendarName: calendar.CalendarName
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -639,18 +651,23 @@ export class AgendaPage implements OnInit {
|
|||||||
} else if (Oficial) {
|
} else if (Oficial) {
|
||||||
return [{
|
return [{
|
||||||
OwnerId: calendar.OwnerId,
|
OwnerId: calendar.OwnerId,
|
||||||
calendarId : Oficial,
|
CalendarId : Oficial,
|
||||||
CalendarName: calendar.CalendarName
|
CalendarName: calendar.CalendarName
|
||||||
}]
|
}]
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return [{
|
return [{
|
||||||
OwnerId: calendar.OwnerId,
|
OwnerId: calendar.OwnerId,
|
||||||
calendarId : Pessoal,
|
CalendarId : Pessoal,
|
||||||
CalendarName: calendar.CalendarName
|
CalendarName: calendar.CalendarName
|
||||||
}]
|
}]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// trasnformData(response, profile) {
|
// trasnformData(response, profile) {
|
||||||
@@ -1196,7 +1213,6 @@ export class AgendaPage implements OnInit {
|
|||||||
}
|
}
|
||||||
this.showTimelineFilterState = false;
|
this.showTimelineFilterState = false;
|
||||||
|
|
||||||
|
|
||||||
// THIS LINE
|
// THIS LINE
|
||||||
this.updateEventListBox();
|
this.updateEventListBox();
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ export class ListBoxService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
filterSegment(eventSource: EventListStore[], segment): EventListStore[] {
|
filterSegment(eventSource: EventListStore[], segment): EventListStore[] {
|
||||||
|
|
||||||
return eventSource.filter( data => data.calendarName == segment)
|
return eventSource.filter( data => data.calendarName == segment)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,9 +44,9 @@ export class ListBoxService {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
// if(segment!='Combinado') {
|
if(segment!='Combinado') {
|
||||||
// eventSource = this.filterSegment(eventSource, segment)
|
eventSource = this.filterSegment(eventSource, segment)
|
||||||
// }
|
}
|
||||||
|
|
||||||
// if(profile != 'all') {
|
// if(profile != 'all') {
|
||||||
// eventSource = this.filterProfile(eventSource, profile)
|
// eventSource = this.filterProfile(eventSource, profile)
|
||||||
|
|||||||
@@ -528,7 +528,7 @@ export class EventsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async getEventsByCalendarId( startdate: string, enddate: string, calendarId: string) {
|
async getEventsByCalendarId( startdate: string, enddate: string, calendarId: any) {
|
||||||
const calendars = SessionStore.user.OwnerCalendars.concat(SessionStore.user.SharedCalendars)
|
const calendars = SessionStore.user.OwnerCalendars.concat(SessionStore.user.SharedCalendars)
|
||||||
const agendasCalendars = calendars.filter( e => e.CalendarId == calendarId)
|
const agendasCalendars = calendars.filter( e => e.CalendarId == calendarId)
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ export class CalendarService {
|
|||||||
|
|
||||||
let result = [];
|
let result = [];
|
||||||
for (const calendar of ids) {
|
for (const calendar of ids) {
|
||||||
const events = this._eventSource.filter(e => e.CalendarId == calendar.calendarId)
|
const events = this._eventSource.filter(e => e.CalendarId == calendar.CalendarId)
|
||||||
result = result.concat(events)
|
result = result.concat(events)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
export let versionData = {
|
export let versionData = {
|
||||||
"shortSHA": "8deed4cf9",
|
"shortSHA": "b7d878851",
|
||||||
"SHA": "8deed4cf9433d2aeaf3419039896cd7dd1855e24",
|
"SHA": "b7d878851efda8eb9859d6a21b9c2efc57238903",
|
||||||
"branch": "feature/agenda-layout",
|
"branch": "feature/agenda-layout",
|
||||||
"lastCommitAuthor": "'Peter Maquiran'",
|
"lastCommitAuthor": "'Peter Maquiran'",
|
||||||
"lastCommitTime": "'Tue Mar 28 13:59:37 2023 +0100'",
|
"lastCommitTime": "'Thu Mar 30 14:31:58 2023 +0100'",
|
||||||
"lastCommitMessage": "fix agenda",
|
"lastCommitMessage": "change agenda",
|
||||||
"lastCommitNumber": "4885",
|
"lastCommitNumber": "4886",
|
||||||
"change": "",
|
"change": "",
|
||||||
"changeStatus": "On branch feature/agenda-layout\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/models/envarioment.ts\n\tmodified: src/app/pages/agenda/agenda.page.html\n\tmodified: src/app/pages/agenda/agenda.page.scss\n\tmodified: src/app/pages/agenda/agenda.page.ts\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.html\n\tmodified: src/app/pages/search/search.page.ts\n\tmodified: src/app/services/agenda/list-box.service.ts\n\tmodified: src/app/services/events.service.ts\n\tmodified: src/app/store/calendar.service.ts\n\tmodified: src/environments/suport/doneIt.ts\n\tmodified: src/environments/suport/oapr.ts\n\tmodified: src/theme/variables.scss",
|
"changeStatus": "On branch feature/agenda-layout\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/agenda/agenda.page.scss\n\tmodified: src/app/pages/agenda/agenda.page.ts\n\tmodified: src/app/services/agenda/list-box.service.ts\n\tmodified: src/app/services/events.service.ts\n\tmodified: src/app/store/calendar.service.ts",
|
||||||
"changeAuthor": "peter.maquiran"
|
"changeAuthor": "peter.maquiran"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user