comments reactive
This commit is contained in:
parent
2c99811caf
commit
82f4aaf904
4 changed files with 19 additions and 66 deletions
|
|
@ -52,6 +52,7 @@ import dayjs from "dayjs";
|
|||
import "dayjs/locale/fr";
|
||||
import { useUserStore } from "../../stores/user";
|
||||
import { useApiStore } from "../../stores/api";
|
||||
import { useDialogStore } from "../../stores/dialog";
|
||||
|
||||
dayjs.locale("fr");
|
||||
|
||||
|
|
@ -64,6 +65,7 @@ const emits = defineEmits(["update:file", "close:comment"]);
|
|||
|
||||
const { user } = useUserStore();
|
||||
const api = useApiStore();
|
||||
const dialog = useDialogStore();
|
||||
|
||||
// Functions
|
||||
function setStatus(comment) {
|
||||
|
|
@ -111,7 +113,7 @@ async function readNotification(notificationId) {
|
|||
async function deleteComment(event, comment) {
|
||||
event.stopPropagation();
|
||||
const newFile = await api.deleteComment(comment);
|
||||
emits("update:file", newFile);
|
||||
dialog.updateFile(newFile);
|
||||
if (comment.parentId) {
|
||||
emits("close:comment");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue