Updated and removed todos.
This commit is contained in:
@@ -37,6 +37,7 @@ const CalenderNav = (): JSX.Element => {
|
||||
* TODO: Add logic to remove the nav buttons.
|
||||
* Do not show next button for current month.
|
||||
* Do not show prev when there is nothing left to see in the past.
|
||||
* (Creation date of a chart)
|
||||
*/
|
||||
|
||||
return (
|
||||
|
||||
@@ -55,6 +55,7 @@ const Day = ({
|
||||
* TODO: Add logic to remove the onClick within overflow dates.
|
||||
* Do not give dates for the next month an onClick.
|
||||
* Do not give dates in the past an onClick there is nothing before that month.
|
||||
* (Creation date of a chart)
|
||||
*/
|
||||
|
||||
return (
|
||||
|
||||
@@ -4,7 +4,6 @@ import CalenderNav from "./CalenderNav";
|
||||
import { CalenderContext } from "../../contexts/CalenderContext";
|
||||
import { format } from "date-fns";
|
||||
import Day from "./Day";
|
||||
// TODO: import types
|
||||
|
||||
const Calender = (newDate?: UpdateCalendarProps): JSX.Element => {
|
||||
const { selectedDate, layout, updateDate } = useContext(CalenderContext);
|
||||
|
||||
@@ -219,20 +219,20 @@ const CalenderContextProvider = ({
|
||||
setSelectedMonthInfo(output);
|
||||
};
|
||||
|
||||
// TODO: Make a function that will give the valid date range for the front end. Either starting at the account creation or the oldest month with stickers.
|
||||
// TODO: Make a function that will give the valid date range for the front end. Either starting at the chart creation date or the oldest month with stickers (when enabled in filters).
|
||||
|
||||
// TODO: Add a function that validated if a date has at least one sticker in it. Use that within the nav function.
|
||||
// TODO: Add a function that validated if a date has at least one sticker in it. Use that within the nav function (when filter is enabled).
|
||||
|
||||
// TODO: Add a function that will give the closest date, if available, when the nav func detects an empty month.
|
||||
// Use the account creation date to aid with this.
|
||||
// Use the chart creation date to aid with this. (When filter is enabled)
|
||||
|
||||
/**
|
||||
* TODO: Add logic that prevents navigation to the future and too far in the past.
|
||||
* TODO: Add logic that prevents navigation to the future and too far in the past. (Use chart creation date)
|
||||
* Update to use a promise and return appropriate errors. Display those errors on the front end.
|
||||
* Update the use of this function on the front to handle the fails of the promise.
|
||||
*/
|
||||
|
||||
// TODO: Update the calender update function that will take in a direction so that the the navigation buttons will take the user to the next month with stickers. Assuming there was a gap with empty months.
|
||||
// TODO: (When filter is enabled) Update the calender update function that will take in a direction so that the the navigation buttons will take the user to the next month with stickers. Assuming there was a gap with empty months.
|
||||
|
||||
/**
|
||||
* Updated the selectedDate state when given the appropriate object.
|
||||
|
||||
@@ -65,7 +65,8 @@ const DateRoute: React.FC<unknown> = () => {
|
||||
/**
|
||||
* TODO: Update to disallow navigation in the future and too far in the past.
|
||||
* Update so that a date given in the future take the user to /now to today's date.
|
||||
* Update so that a date given beyond the last valid date will bring the user to the last month that has stickers within it.
|
||||
* Update so that a date given beyond the last valid date will bring the user to the
|
||||
* last month that has stickers within it (When filter is enabled) or to the creation date of the chart..
|
||||
*/
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user