|
|
@ -2,19 +2,17 @@ |
|
|
|
<Toolbar |
|
|
|
<Toolbar |
|
|
|
:handle-submit="onSendForm" |
|
|
|
:handle-submit="onSendForm" |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
<ToolIntroForm |
|
|
|
<ToolIntroForm |
|
|
|
ref="updateForm" |
|
|
|
ref="updateForm" |
|
|
|
v-if="item" |
|
|
|
v-if="item" |
|
|
|
:values="item" |
|
|
|
:values="item" |
|
|
|
:errors="violations" |
|
|
|
:errors="violations" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<Loading :visible="isLoading || deleteLoading"/> |
|
|
|
<Loading :visible="isLoading || deleteLoading" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { mapActions, mapGetters } from 'vuex'; |
|
|
|
import {mapActions, mapGetters, useStore} from 'vuex'; |
|
|
|
import { mapFields } from 'vuex-map-fields'; |
|
|
|
import { mapFields } from 'vuex-map-fields'; |
|
|
|
import ToolIntroForm from '../../components/ctoolintro/Form.vue'; |
|
|
|
import ToolIntroForm from '../../components/ctoolintro/Form.vue'; |
|
|
|
import Loading from '../../components/Loading.vue'; |
|
|
|
import Loading from '../../components/Loading.vue'; |
|
|
@ -22,8 +20,9 @@ import Toolbar from '../../components/Toolbar.vue'; |
|
|
|
import UpdateMixin from '../../mixins/UpdateMixin'; |
|
|
|
import UpdateMixin from '../../mixins/UpdateMixin'; |
|
|
|
import useNotification from "../../components/Notification"; |
|
|
|
import useNotification from "../../components/Notification"; |
|
|
|
import {useI18n} from "vue-i18n"; |
|
|
|
import {useI18n} from "vue-i18n"; |
|
|
|
import {useRouter} from "vue-router"; |
|
|
|
import {useRoute, useRouter} from "vue-router"; |
|
|
|
import {watch} from "vue"; |
|
|
|
import {watch} from "vue"; |
|
|
|
|
|
|
|
import toInteger from "lodash/toInteger"; |
|
|
|
|
|
|
|
|
|
|
|
const servicePrefix = 'ctoolintro'; |
|
|
|
const servicePrefix = 'ctoolintro'; |
|
|
|
|
|
|
|
|
|
|
@ -40,6 +39,13 @@ export default { |
|
|
|
const {showNotification} = useNotification(); |
|
|
|
const {showNotification} = useNotification(); |
|
|
|
const { t } = useI18n(); |
|
|
|
const { t } = useI18n(); |
|
|
|
const router = useRouter(); |
|
|
|
const router = useRouter(); |
|
|
|
|
|
|
|
const route = useRoute(); |
|
|
|
|
|
|
|
const store = useStore(); |
|
|
|
|
|
|
|
const cid = toInteger(route.query.cid); |
|
|
|
|
|
|
|
if (cid) { |
|
|
|
|
|
|
|
let courseIri = '/api/courses/' + cid; |
|
|
|
|
|
|
|
store.dispatch('course/findCourse', { id: courseIri }); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*function updated(val) { |
|
|
|
/*function updated(val) { |
|
|
|
showNotification(t('Updated')); |
|
|
|
showNotification(t('Updated')); |
|
|
|