0
0
Fork 0
salix-front-mindshore-fork2/src/composables/useVnConfirm.js

24 lines
629 B
JavaScript
Raw Normal View History

2024-02-21 14:27:32 +00:00
import VnConfirm from 'components/ui/VnConfirm.vue';
import { useQuasar } from 'quasar';
export function useSummaryDialog() {
const quasar = useQuasar();
const openConfirmationModal = (title, message, promise, successFn) => {
quasar
.dialog({
component: VnConfirm,
componentProps: {
title: title,
message: message,
promise: promise,
},
})
.onOk(async () => {
if (successFn) successFn();
});
};
return { openConfirmationModal };
}