Skip to content

Commit

Permalink
Comments added for the calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
Timaqt authored and Timaqt committed Nov 28, 2024
1 parent cdb699a commit e75fa1f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
3 changes: 3 additions & 0 deletions api/Models/Calendar/CalendarDay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace Scv.Api.Models.Calendar
{
/// <summary>
/// List of days ( assignments ) for a given month and year - used for calendar view
/// </summary>
public class CalendarDay : JudicialCalendarDay
{
public string RotaInitials { get; set; }
Expand Down
3 changes: 3 additions & 0 deletions api/Models/Calendar/CalendarSchedule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace Scv.Api.Models.Calendar
{
/// <summary>
/// Signle class for Calendar and 2 left panels for filtering
/// </summary>
public class CalendarSchedule
{
public List<CalendarDay> Schedule { get; set; }
Expand Down
5 changes: 3 additions & 2 deletions web/src/components/calendar/Calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export default {
},
customizeDayCell(info) {
//top right corner of the cell - icon for link to 'My Schedule Day' - could be removed in future
const dayEl = info.el;
const linkDate = new Date(info.date.toString());
const link = `<a href="${linkDate.getDate()}/${linkDate.getFullYear()}/${linkDate.getMonth() + 1}" class="custom-day"></a>`
Expand All @@ -109,7 +110,7 @@ export default {
},
handleDateClick(info) {
// check if we need to reload all the info or just info from the cell
// check if we need to reload all the info frm BE or just info from the cell
// could apply only to my or judges schedule
console.log(info);
// this.popoverEvent = info.event;
Expand All @@ -131,7 +132,7 @@ export default {
}
},
handleEventClick(info) {
// this function could be removed as decision is to go with the dateclick, leaving it for now
// this function could be removed as decision is to go with the dateclick, leaving function for clarity
console.log(info);
// this.showSelectedEventModal = true;
Expand Down
7 changes: 6 additions & 1 deletion web/src/components/dashboard/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,9 @@ import { Component, Vue } from 'vue-property-decorator';
export default class Dashboard extends Vue {
public sizeChange = 0;
public locationsFilters = [];
//all events for the calendar
public ar: any[] = [];
//filtered events for the calendar - based on selected presiders and activities, goes to calendar component
public arEvents: any[] = [];
public showLeftMenu = false;
public showRightMenu = false;
Expand Down Expand Up @@ -529,6 +531,7 @@ export default class Dashboard extends Vue {
});
}
showAllLocations() {
// locations pupup
this.showLocationModal = true;
}
resetLocations() {
Expand All @@ -539,6 +542,7 @@ export default class Dashboard extends Vue {
this.getMonthlySchedule(this.currentCalendarDate);
}
loadPresiders(data) {
//load activities and loadPresiders could be merged if needed
if (this.selectedLocations.length == 0) {
this.presiders = [];
this.selectedPresiders = [];
Expand Down Expand Up @@ -605,7 +609,7 @@ export default class Dashboard extends Vue {
}
public getMonthlySchedule(currentMonth): void {
// could be updated to 'getSchedule'
this.ar = [];
this.currentCalendarDate = currentMonth;
let locations = "";
Expand Down Expand Up @@ -704,6 +708,7 @@ export default class Dashboard extends Vue {
}
public filterByActivitiesPresiders() {
// filters out calendar events by selected activities and presiders
if (!this.selectedPresiders.length || !this.selectedActivities.length) {
this.arEvents = [];
return;
Expand Down

0 comments on commit e75fa1f

Please sign in to comment.