chore: Review fix
This commit is contained in:
@@ -3,7 +3,7 @@ import { ref } from 'vue';
|
||||
import Dialog from 'dashboard/components-next/dialog/Dialog.vue';
|
||||
import DatePicker from 'dashboard/components-next/DatePicker/DatePicker.vue';
|
||||
|
||||
const emit = defineEmits(['chooseTime']);
|
||||
const emit = defineEmits(['chooseTime', 'close']);
|
||||
|
||||
const dialogRef = ref(null);
|
||||
const datePickerRef = ref(null);
|
||||
@@ -20,6 +20,7 @@ const onClear = () => {
|
||||
|
||||
const onDialogClose = () => {
|
||||
datePickerRef.value?.resetState();
|
||||
emit('close');
|
||||
};
|
||||
|
||||
const open = () => {
|
||||
|
||||
@@ -42,7 +42,6 @@ const onCmdSnoozeConversation = snoozeType => {
|
||||
};
|
||||
|
||||
const chooseSnoozeTime = customSnoozeTime => {
|
||||
store.dispatch('setContextMenuChatId', null);
|
||||
if (customSnoozeTime) {
|
||||
toggleStatus(
|
||||
wootConstants.STATUS_TYPE.SNOOZED,
|
||||
@@ -51,9 +50,17 @@ const chooseSnoozeTime = customSnoozeTime => {
|
||||
}
|
||||
};
|
||||
|
||||
const clearContextMenu = () => {
|
||||
store.dispatch('setContextMenuChatId', null);
|
||||
};
|
||||
|
||||
useEmitter(CMD_SNOOZE_CONVERSATION, onCmdSnoozeConversation);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<CustomSnoozeModal ref="snoozeModalRef" @choose-time="chooseSnoozeTime" />
|
||||
<CustomSnoozeModal
|
||||
ref="snoozeModalRef"
|
||||
@choose-time="chooseSnoozeTime"
|
||||
@close="clearContextMenu"
|
||||
/>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user