Sprava eventu a organizaci
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<script setup>
|
||||
import {useRouter} from "vue-router";
|
||||
import {useQuasar} from "quasar";
|
||||
import {successObject} from "src/composables/dialog";
|
||||
import {useOrganizationsStore} from "stores/Organizations";
|
||||
import {useAppStore} from "stores/App";
|
||||
import {isRequestPending} from "src/composables/objects/organization";
|
||||
import OrganizationForm from "components/organizations/OrganizationForm.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const handleSave = (formData) => {
|
||||
useOrganizationsStore().create(formData).then(() => {
|
||||
$q.notify(successObject("Organizace úspěšně vytvořena"));
|
||||
router.push({name: "organizations"});
|
||||
});
|
||||
};
|
||||
|
||||
useAppStore().setPageTitle("Nová organizace");
|
||||
useAppStore().setBreadcrumbs([
|
||||
{to: {name: "organizations"}, label: "Organizace"},
|
||||
{label: "Nová"}
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<OrganizationForm @save="handleSave" :is-request-pending="isRequestPending"/>
|
||||
</template>
|
||||
Reference in New Issue
Block a user