feat: program restrictions

This commit is contained in:
Jannat Patel
2024-11-21 17:10:24 +05:30
parent 582c7af12d
commit 64ed0b3e94
14 changed files with 190 additions and 137 deletions

View File

@@ -1,12 +1,25 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
import { createResource } from 'frappe-ui'
export const useSettings = defineStore('settings', () => {
const isSettingsOpen = ref(false)
const activeTab = ref(null)
const learningPaths = createResource({
url: 'frappe.client.get_single_value',
makeParams(values) {
return {
doctype: 'LMS Settings',
field: 'enable_learning_paths',
}
},
auto: true,
cache: ['learningPaths'],
})
return {
isSettingsOpen,
activeTab,
learningPaths,
}
})