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/message/Update.vue

67 lines
1.6 KiB

<template>
<div v-if="!isLoading && item && isCurrentTeacher">
<!-- :handle-delete="del"-->
<Toolbar
:handle-reset="resetForm"
:handle-submit="onSendForm"
/>
<DocumentsForm
ref="updateForm"
:errors="violations"
:values="item"
>
<EditLinks
v-model="item"
links-type="users"
/>
</DocumentsForm>
<Loading :visible="isLoading || deleteLoading" />
</div>
</template>
<script>
import { mapActions, mapGetters } from "vuex"
import { mapFields } from "vuex-map-fields"
import DocumentsForm from "../../components/documents/Form.vue"
import Loading from "../../components/Loading.vue"
import Toolbar from "../../components/Toolbar.vue"
import UpdateMixin from "../../mixins/UpdateMixin"
import EditLinks from "../../components/resource_links/EditLinks.vue"
const servicePrefix = "Documents"
export default {
name: "DocumentsUpdate",
servicePrefix,
components: {
EditLinks,
Loading,
Toolbar,
DocumentsForm,
},
mixins: [UpdateMixin],
computed: {
...mapFields("documents", {
deleteLoading: "isLoading",
isLoading: "isLoading",
error: "error",
updated: "updated",
violations: "violations",
}),
...mapGetters("documents", ["find"]),
...mapGetters({
isCurrentTeacher: "security/isCurrentTeacher",
}),
},
methods: {
...mapActions("documents", {
createReset: "resetCreate",
deleteItem: "del",
delReset: "resetDelete",
retrieve: "load",
update: "update",
updateReset: "resetUpdate",
}),
},
}
</script>