diff --git a/.github/helper/update_pot_file.sh b/.github/helper/update_pot_file.sh index d07d2e25..c0682779 100644 --- a/.github/helper/update_pot_file.sh +++ b/.github/helper/update_pot_file.sh @@ -22,7 +22,7 @@ git config user.name "frappe-pr-bot" echo "Setting the correct git remote..." # Here, the git remote is a local file path by default. Let's change it to the upstream repo. -git remote add upstream https://github.com/frappe/lms.git +git remote set-url upstream https://github.com/frappe/lms.git echo "Creating a new branch..." isodate=$(date -u +"%Y-%m-%d") diff --git a/.github/workflows/generate-pot-file.yml b/.github/workflows/generate-pot-file.yml index 390393d7..4c5d81e1 100644 --- a/.github/workflows/generate-pot-file.yml +++ b/.github/workflows/generate-pot-file.yml @@ -5,7 +5,7 @@ on: workflow_dispatch: jobs: - regeneratee-pot-file: + regenerate-pot-file: name: Release runs-on: ubuntu-latest strategy: diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..e82154a1 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "frappe-ui"] + path = frappe-ui + url = https://github.com/pateljannat/frappe-ui diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 6a9d4d5b..e7dfc8dc 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -8,10 +8,12 @@ diff --git a/frontend/src/components/AppSidebar.vue b/frontend/src/components/AppSidebar.vue index 49f33da6..1b796b20 100644 --- a/frontend/src/components/AppSidebar.vue +++ b/frontend/src/components/AppSidebar.vue @@ -100,7 +100,7 @@ import { ChevronRight, Plus } from 'lucide-vue-next' import { createResource, Button } from 'frappe-ui' import PageModal from '@/components/Modals/PageModal.vue' -const { user } = sessionStore() +const { user, sidebarSettings } = sessionStore() const { userResource } = usersStore() const socket = inject('$socket') const unreadCount = ref(0) @@ -115,6 +115,20 @@ onMounted(() => { unreadNotifications.reload() }) addNotifications() + sidebarSettings.reload( + {}, + { + onSuccess(data) { + Object.keys(data).forEach((key) => { + if (!parseInt(data[key])) { + sidebarLinks.value = sidebarLinks.value.filter( + (link) => link.label.toLowerCase().split(' ').join('_') !== key + ) + } + }) + }, + } + ) }) const unreadNotifications = createResource({ @@ -153,21 +167,6 @@ const addNotifications = () => { } } -const sidebarSettings = createResource({ - url: 'lms.lms.api.get_sidebar_settings', - cache: 'Sidebar Settings', - auto: true, - onSuccess(data) { - Object.keys(data).forEach((key) => { - if (!parseInt(data[key])) { - sidebarLinks.value = sidebarLinks.value.filter( - (link) => link.label.toLowerCase().split(' ').join('_') !== key - ) - } - }) - }, -}) - const openPageModal = (link) => { showPageModal.value = true pageToEdit.value = link diff --git a/frontend/src/components/BatchOverlay.vue b/frontend/src/components/BatchOverlay.vue index 2eb225c2..670548a4 100644 --- a/frontend/src/components/BatchOverlay.vue +++ b/frontend/src/components/BatchOverlay.vue @@ -81,7 +81,7 @@ @@ -87,7 +87,16 @@ name="item-label" v-bind="{ active, selected, option }" > - {{ option.label }} +
+
+ {{ option.label }} +
+
+
diff --git a/frontend/src/components/Controls/Link.vue b/frontend/src/components/Controls/Link.vue index 8ce30846..c5f6f63f 100644 --- a/frontend/src/components/Controls/Link.vue +++ b/frontend/src/components/Controls/Link.vue @@ -118,6 +118,7 @@ const options = createResource({ return { label: option.value, value: option.value, + description: option.description, } }) }, diff --git a/frontend/src/components/CourseCardOverlay.vue b/frontend/src/components/CourseCardOverlay.vue index 83a00ac6..3b8aa170 100644 --- a/frontend/src/components/CourseCardOverlay.vue +++ b/frontend/src/components/CourseCardOverlay.vue @@ -75,7 +75,7 @@ - {{ __('New {0}').format(title) }} + {{ __('New {0}').format(singularize(title)) }}
{{ __(title) }} @@ -65,7 +65,7 @@ + diff --git a/frontend/src/pages/BatchCreation.vue b/frontend/src/pages/BatchForm.vue similarity index 98% rename from frontend/src/pages/BatchCreation.vue rename to frontend/src/pages/BatchForm.vue index 2ac16ac9..c5fd6d80 100644 --- a/frontend/src/pages/BatchCreation.vue +++ b/frontend/src/pages/BatchForm.vue @@ -236,6 +236,7 @@ import MultiSelect from '@/components/Controls/MultiSelect.vue' import { useRouter } from 'vue-router' import { getFileSize, showToast } from '../utils' import { X, FileText } from 'lucide-vue-next' +import { capture } from '@/telemetry' const router = useRouter() const user = inject('$user') @@ -274,6 +275,8 @@ onMounted(() => { if (!user.data) window.location.href = '/login' if (props.batchName != 'new') { batchDetail.reload() + } else { + capture('batch_form_opened') } window.addEventListener('keydown', keyboardShortcut) }) @@ -377,6 +380,7 @@ const createNewBatch = () => { {}, { onSuccess(data) { + capture('batch_created') router.push({ name: 'BatchDetail', params: { @@ -447,7 +451,7 @@ const breadcrumbs = computed(() => { } crumbs.push({ label: props.batchName == 'new' ? 'New Batch' : 'Edit Batch', - route: { name: 'BatchCreation', params: { batchName: props.batchName } }, + route: { name: 'BatchForm', params: { batchName: props.batchName } }, }) return crumbs }) diff --git a/frontend/src/pages/Batches.vue b/frontend/src/pages/Batches.vue index b099826c..77e73c5d 100644 --- a/frontend/src/pages/Batches.vue +++ b/frontend/src/pages/Batches.vue @@ -5,7 +5,7 @@ >
@@ -19,13 +19,13 @@ diff --git a/frontend/src/pages/CertifiedParticipants.vue b/frontend/src/pages/CertifiedParticipants.vue index 583a1061..8351eb20 100644 --- a/frontend/src/pages/CertifiedParticipants.vue +++ b/frontend/src/pages/CertifiedParticipants.vue @@ -6,9 +6,10 @@