-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/custom calender front end integration #573
Feature/custom calender front end integration #573
Conversation
nolantellis
commented
Nov 30, 2020
- Custom Calender Phase 1 commit.
- Not Enabled for Productiion. But will be for Phase 2 development
…-calender-front-end-integration
…-calender-front-end-integration
Calendar needs to be used throughout. There are a couple of Calender instances. |
import java.time.temporal.ChronoUnit; | ||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.Comparator; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.function.Function; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some comments on the key model classes regarding what they represent and how they should be used (e.g. what is the entry point, their relationships, etc.), or point to design document (if any). These classes need header comments: CalendarModel, WorkDayModel, HolidayModel, CalendarService). These brief comments would be helpful for users of this service to understand and use them properly (of course you have explained them in meetings, but we need to read these comments at times).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will Do
import org.apromore.portal.common.calendar.CalendarItem; | ||
|
||
@NotifyCommand(value="doItemListChange", onChange="_vm_.itemList") | ||
@ToServerCommand({"applyChanges", "dummy", "updateDate", "updateItem", "removeItem", "updateEndTime", "updateStartTime", "updateStartTimeExt"}) | ||
public class CalendarViewModel { | ||
|
||
static final ZoneOffset DEFAULT_ZONE_OFFSET = OffsetDateTime.now().getOffset(); | ||
|
||
static final OffsetTime DEFAULT_START_TIME = OffsetTime.of(LocalTime.of(9, 0), DEFAULT_ZONE_OFFSET); | ||
static final OffsetTime DEFAULT_END_TIME = OffsetTime.of(LocalTime.of(17, 0), DEFAULT_ZONE_OFFSET); | ||
|
||
static final String WEEKDAY_FORMAT = "EEEE"; | ||
static final String HOLIDAY_FORMAT = "E, yyyy MMM dd"; | ||
static final SimpleDateFormat TIME_PARSER = new SimpleDateFormat("HH:mm"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make the calendar management UI and all of its code a separate module (a portal plugin module) instead of adding all new calendar-related packages/code to the portal module? This is to avoid making the Portal module monolithic. 'Calendar Management' doesn't sound like the main responsibility of the portal (the portal only provides access to feature plugins and calendar management is one of them).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just saw a separate module called "Calendar-Portal" below. So we've actually got a separate portal plugin for calendar management, but then I'm confused with some calendar-related code located in the Portal module, and some calendar-related code located in the "Calendar-Portal" module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am checking this. I think this will be deleted. Will confirm and clean it up.
public CalendarModel createBusinessCalendar(String description, boolean weekendsOff, String zoneId) | ||
throws CalendarAlreadyExistsException; | ||
|
||
public CalendarModel getCalender(Long id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it Calendar
|
||
public List<CalendarModel> getCalendars(); | ||
|
||
public void deleteCalender(Long calendarId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calendar
import java.time.temporal.ChronoUnit; | ||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.Comparator; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.function.Function; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will Do