feat: read only mode

This commit is contained in:
Jannat Patel
2025-04-30 18:03:00 +05:30
parent 0d32c2a9d9
commit 603e80fd26
26 changed files with 427 additions and 302 deletions

View File

@@ -89,6 +89,7 @@ import {
} from 'frappe-ui'
import { Plus, Trash2 } from 'lucide-vue-next'
import { showToast } from '@/utils'
const readOnlyMode = window.read_only_mode
const showCourseModal = ref(false)
const user = inject('$user')
@@ -159,6 +160,9 @@ const removeCourses = (selections, unselectAll) => {
}
const canSeeAddButton = () => {
if (readOnlyMode) {
return false
}
return user.data?.is_moderator || user.data?.is_evaluator
}
</script>