feat: Have editMeetingTimes use same funcs as createMeetingTimes#1592
feat: Have editMeetingTimes use same funcs as createMeetingTimes#1592trillium merged 1 commit intohackforla:developmentfrom
Conversation
|
Want to review this pull request? Take a look at this documentation for a step by step guide! From your project repository, check out a new branch and test the changes. |
| } | ||
|
|
||
| //if there is a description or a blank description | ||
| if (values.description || !values.description) { |
There was a problem hiding this comment.
This portion of the code always evaluates to true, removed if block
There was a problem hiding this comment.
I feel like this should be
if (values.description) {
|
|
||
| // If the day has been changed, find the next occurence of the changed day | ||
| if (values.day) { | ||
| const date = findNextOccuranceOfDay(values.day); |
There was a problem hiding this comment.
This portion of the code is what creates a false time stamp. values always has a .day property in the front end, so the code assumes we are needing tom update the day.
This is the most relevant changes to this PR
| we use the previous time or duration for the calculation. | ||
| */ | ||
| // Find next occurance of Day in the future | ||
| // Assign new start time and end time |
There was a problem hiding this comment.
In createMeetingTimes.js the timing selections for a meeting are used to create a correct meeting time. We have access to the same information and it has been consistently correct, this is the most correct information we have about the meeting times.
| const startTimeDate = timeConvertFromForm(date, values.startTime); | ||
| const endTime = addDurationToTime(startTimeDate, values.duration); | ||
|
|
||
| let startTimeToUse = startTimeOriginal; |
There was a problem hiding this comment.
Getting rid of the old timing code
jbubar
left a comment
There was a problem hiding this comment.
I tested it out on my end. this looks good. I am hoping it works for fixing the bug
Fixes #1591
What changes did you make and why did you make them ?
datetimestamp and assigns it todateon edit, messing up timingScreenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)
Visuals before changes are applied
Before dev.vrms.io update -- See
raw.dateis a clean time stamp with 00:00After dev.vrms.io update -- See
raw.dateis not a clean time stamp with 00:00Visuals after changes are applied
After a re-update from new branch See
raw.dateis again a clean time stamp with 00:00