fix wrong label when all months selected
This commit is contained in:
parent
46f7f51d3a
commit
1689e5eb9c
1 changed files with 6 additions and 2 deletions
|
@ -377,9 +377,13 @@ const ChoreCard = ({
|
|||
const notSelectedShortMonths = notSelectedMonth.map(m =>
|
||||
moment().month(m).format('MMM'),
|
||||
)
|
||||
return `${chore.frequency}${dayOfMonthSuffix(
|
||||
let result = `Monthly ${chore.frequency}${dayOfMonthSuffix(
|
||||
chore.frequency,
|
||||
)} except ${notSelectedShortMonths.join(', ')}`
|
||||
)}`
|
||||
if (notSelectedShortMonths.length > 0)
|
||||
result += `
|
||||
except ${notSelectedShortMonths.join(', ')}`
|
||||
return result
|
||||
} else {
|
||||
let freqData = JSON.parse(chore.frequencyMetadata)
|
||||
const months = freqData.months.map(m => moment().month(m).format('MMM'))
|
||||
|
|
Loading…
Add table
Reference in a new issue