Skip to content
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/calendar #86

Merged
merged 11 commits into from
Nov 14, 2024
Merged

Feature/calendar #86

merged 11 commits into from
Nov 14, 2024

Conversation

capetillo
Copy link
Collaborator

FEATURE/FIX: Using same calendar when booking RTI and requesting observations

Background:
More than one style of calendar was being used and that was because I couldn't find a date picker and a date range picker but now I've found an older version of a package and it works well.

Implementation:

  • Initialized the component on main.js
  • Changed the component in TimePicker (that one was pretty simple, not much changed)
  • Tweaked a little bit of logic in BeginnerScheduling and AdvancedScheduling because the component VDatePicker contains the object keys of start and end from the package.
  • Added calendarUtils but have to discuss with Edward how these should be used. Basically, this gets the start and end dates of the current semester and its purpose is meant to set limits
  • And added and updated tests

VISUALS

Calendar when booking for RTI
Screenshot 2024-11-12 at 1 40 22 PM

Calendar when requesting a scheduled observation (end of current semester is Jan 31)

Screen.Recording.2024-11-12.at.1.41.08.PM.mov

Copy link

@jnation3406 jnation3406 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good being the same calendar. Just a little confused on the downgrading library version part...

@@ -28,7 +29,7 @@
"pinia-plugin-persistedstate": "^3.2.1",
"sass": "^1.75.0",
"sass-loader": "^14.2.1",
"v-calendar": "^3.1.2",
"v-calendar": "^3.0.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did they remove the date range functionality in newer versions or something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah there's a bug in 3.1.2

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm looking through my history to try to find the github issue but basically the bug didn't take max-date into consideration

@@ -196,15 +199,6 @@ async function getAvailableTimes () {
})
}

// Used to block out dates that are not in the availableTimes object from the date picker
const isDateAllowed = (date) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this logic of blocking out dates reimplemented somewhere else now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I figured out that the availableTimes were today --> one week from now and that's in the min-date and max-date props. But maybe it's safer to keep this logic

@capetillo capetillo merged commit 856414b into main Nov 14, 2024
1 check passed
@capetillo capetillo deleted the feature/calendar branch November 14, 2024 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants