forked from verdnatura/salix-front
24 lines
629 B
JavaScript
24 lines
629 B
JavaScript
|
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 };
|
||
|
}
|