Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chamilo-lms/assets/vue/views/ctoolintro/Update.vue

62 lines
1.4 KiB

<template>
4 years ago
<Toolbar
:handle-submit="onSendForm"
/>
<ToolIntroForm
ref="updateForm"
v-if="item"
:values="item"
:errors="violations"
/>
<Loading :visible="isLoading || deleteLoading" />
</template>
<script>
import { mapActions, mapGetters } from 'vuex';
import { mapFields } from 'vuex-map-fields';
import ToolIntroForm from '../../components/ctoolintro/Form.vue';
import Loading from '../../components/Loading.vue';
import Toolbar from '../../components/Toolbar.vue';
import UpdateMixin from '../../mixins/UpdateMixin';
4 years ago
const servicePrefix = 'ctoolintro';
export default {
name: 'ToolIntroUpdate',
servicePrefix,
mixins: [UpdateMixin],
components: {
Loading,
Toolbar,
ToolIntroForm
},
computed: {
...mapFields('ctoolintro', {
deleteLoading: 'isLoading',
isLoading: 'isLoading',
error: 'error',
updated: 'updated',
violations: 'violations'
}),
4 years ago
...mapGetters('ctoolintro', ['find']),
...mapGetters({
'isCurrentTeacher': 'security/isCurrentTeacher',
}),
},
methods: {
...mapActions('ctoolintro', {
createReset: 'resetCreate',
deleteItem: 'del',
delReset: 'resetDelete',
retrieve: 'load',
update: 'update',
4 years ago
updateWithFormData: 'updateWithFormData',
updateReset: 'resetUpdate'
})
}
};
</script>