diff --git a/.gitignore b/.gitignore index 957c519f..95242ce7 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ __pycache__/ node_modules package-lock.json lms/public/frontend -lms/www/lms.html \ No newline at end of file +lms/www/lms.html +frappe-ui \ No newline at end of file diff --git a/docker/init.sh b/docker/init.sh index 54afbac5..178735c0 100644 --- a/docker/init.sh +++ b/docker/init.sh @@ -35,7 +35,6 @@ bench new-site lms.localhost \ bench --site lms.localhost install-app lms bench --site lms.localhost set-config developer_mode 1 bench --site lms.localhost clear-cache -bench --site lms.localhost set-config mute_emails 1 bench use lms.localhost bench start diff --git a/frontend/src/components/AppSidebar.vue b/frontend/src/components/AppSidebar.vue index 1b796b20..9bbbb0c9 100644 --- a/frontend/src/components/AppSidebar.vue +++ b/frontend/src/components/AppSidebar.vue @@ -7,7 +7,7 @@ class="flex flex-col overflow-hidden" :class="isSidebarCollapsed ? 'items-center' : ''" > - +
import { Star } from 'lucide-vue-next' import { ref } from 'vue' + const props = defineProps({ id: { type: String, diff --git a/frontend/src/components/Fields.vue b/frontend/src/components/Fields.vue new file mode 100644 index 00000000..5fe1abd3 --- /dev/null +++ b/frontend/src/components/Fields.vue @@ -0,0 +1,214 @@ + + + diff --git a/frontend/src/components/Modals/Settings.vue b/frontend/src/components/Modals/Settings.vue index d02152f2..e1d8a36d 100644 --- a/frontend/src/components/Modals/Settings.vue +++ b/frontend/src/components/Modals/Settings.vue @@ -1,25 +1,270 @@ diff --git a/frontend/src/components/SettingDetails.vue b/frontend/src/components/SettingDetails.vue new file mode 100644 index 00000000..fe4abe9d --- /dev/null +++ b/frontend/src/components/SettingDetails.vue @@ -0,0 +1,89 @@ + + + diff --git a/frontend/src/components/UserDropdown.vue b/frontend/src/components/UserDropdown.vue index efece54d..67c4bc96 100644 --- a/frontend/src/components/UserDropdown.vue +++ b/frontend/src/components/UserDropdown.vue @@ -1,5 +1,5 @@ diff --git a/lms/templates/search_course/search_course.js b/lms/templates/search_course/search_course.js deleted file mode 100644 index 2ba8d04d..00000000 --- a/lms/templates/search_course/search_course.js +++ /dev/null @@ -1,72 +0,0 @@ -frappe.ready(() => { - $("#search-course").keyup((e) => { - search_course(e); - }); - - $("#open-search").click((e) => { - show_search_bar(e); - }); - - $("#search-modal").on("hidden.bs.modal", () => { - hide_search_bar(); - }); - - $(document).keydown(function (e) { - if ((e.metaKey || e.ctrlKey) && e.key == "k") { - show_search_bar(e); - } - }); -}); - -const search_course = (e) => { - let input = $(e.currentTarget).val(); - if (input == window.input) return; - window.input = input; - - if (input.length < 3 || input.trim() == "") { - $(".result-row").remove(); - return; - } - - frappe.call({ - method: "lms.lms.doctype.lms_course.lms_course.search_course", - args: { - text: input, - }, - callback: (data) => { - render_course_list(data); - }, - }); -}; - -const render_course_list = (data) => { - let courses = data.message; - $(".result-row").remove(); - - if (!courses.length) { - let element = ` - ${__("No result found")} - `; - $(element).insertAfter("#search-course"); - return; - } - - for (let i in courses) { - let element = ` - ${courses[i].title} - `; - $(element).insertAfter("#search-course"); - } -}; - -const show_search_bar = (e) => { - $("#search-modal").modal("show"); - setTimeout(() => { - $("#search-course").focus(); - }, 1000); -}; - -const hide_search_bar = (e) => { - $("#search-course").val(""); - $(".result-row").remove(); -};