diff --git a/src/views/ChoreEdit/ChoreEdit.jsx b/src/views/ChoreEdit/ChoreEdit.jsx index 5441c78..64d7d64 100644 --- a/src/views/ChoreEdit/ChoreEdit.jsx +++ b/src/views/ChoreEdit/ChoreEdit.jsx @@ -174,7 +174,7 @@ const ChoreEdit = () => { // Validate advanced scheduling patterns if ( frequencyType === 'days_of_the_week' && - frequencyMetadata?.weekPattern === 'nth_day_of_month' && + frequencyMetadata?.weekPattern === 'week_of_month' && (!frequencyMetadata?.occurrences || frequencyMetadata.occurrences.length === 0) ) { diff --git a/src/views/ChoreEdit/RepeatSection.jsx b/src/views/ChoreEdit/RepeatSection.jsx index b84e905..5ef70d2 100644 --- a/src/views/ChoreEdit/RepeatSection.jsx +++ b/src/views/ChoreEdit/RepeatSection.jsx @@ -65,7 +65,7 @@ const DAYS = [ const WEEK_PATTERNS = { every_week: 'Every week', - nth_day_of_month: 'Specific occurrences in the month', + week_of_month: 'Specific occurrences in the month', } const DAY_OCCURRENCE_OPTIONS = [ @@ -92,7 +92,7 @@ const generateSchedulePreview = metadata => { } if ( - metadata.weekPattern === 'nth_day_of_month' && + metadata.weekPattern === 'week_of_month' && metadata.occurrences?.length ) { const occurrenceStr = metadata.occurrences @@ -299,7 +299,7 @@ const RepeatOnSections = ({ Task repeats every week on selected days )} - {value === 'nth_day_of_month' && ( + {value === 'week_of_month' && ( Task repeats on specific day occurrences each month (e.g., 1st Monday, 3rd Friday) @@ -309,7 +309,7 @@ const RepeatOnSections = ({ ))} - {frequencyMetadata?.weekPattern === 'nth_day_of_month' && ( + {frequencyMetadata?.weekPattern === 'week_of_month' && ( Select which occurrences of the selected days: diff --git a/src/views/components/CustomParsers.js b/src/views/components/CustomParsers.js index 314c6e9..2983ba5 100644 --- a/src/views/components/CustomParsers.js +++ b/src/views/components/CustomParsers.js @@ -431,7 +431,7 @@ export const parseRepeatV2 = inputSentence => { result.frequencyType = 'days_of_the_week' result.frequencyMetadata.days = [VALID_DAYS[dayName].toLowerCase()] - result.frequencyMetadata.weekPattern = 'nth_day_of_month' + result.frequencyMetadata.weekPattern = 'week_of_month' result.frequencyMetadata.occurrences = [occurrence] const startIndex = inputSentence @@ -490,7 +490,7 @@ export const parseRepeatV2 = inputSentence => { result.frequencyType = 'days_of_the_week' result.frequencyMetadata.days = [VALID_DAYS[dayName2].toLowerCase()] - result.frequencyMetadata.weekPattern = 'nth_day_of_month' + result.frequencyMetadata.weekPattern = 'week_of_month' result.frequencyMetadata.occurrences = occurrences const startIndex2 = inputSentence