feat: Ability to choose the custom time for snooze conversation (#7257)

This commit is contained in:
Muhsin Keloth
2023-06-19 18:23:35 +05:30
committed by GitHub
parent c410fe333a
commit 9bb455ec2d
6 changed files with 149 additions and 30 deletions

View File

@@ -1,22 +0,0 @@
import {
getUnixTime,
addHours,
addWeeks,
startOfTomorrow,
startOfWeek,
} from 'date-fns';
export default {
computed: {
snoozeTimes() {
return {
// tomorrow = 9AM next day
tomorrow: getUnixTime(addHours(startOfTomorrow(), 9)),
// next week = 9AM Monday, next week
nextWeek: getUnixTime(
addHours(startOfWeek(addWeeks(new Date(), 1), { weekStartsOn: 1 }), 9)
),
};
},
},
};