fix: documented the api
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
/>
|
/>
|
||||||
<Button @click="() => (showForm = true)">
|
<Button @click="() => (showForm = true)">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<component :is="icons['Plus']" class="h-3 w-3 stroke-1.5" />
|
<Plus class="h-3 w-3 stroke-1.5" />
|
||||||
</template>
|
</template>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
<div v-if="hasNextPage" class="flex justify-center">
|
<div v-if="hasNextPage" class="flex justify-center">
|
||||||
<Button variant="solid" @click="members.reload()">
|
<Button variant="solid" @click="members.reload()">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<component :is="icons['RefreshCw']" class="h-3 w-3 stroke-1.5" />
|
<RefreshCw class="h-3 w-3 stroke-1.5" />
|
||||||
</template>
|
</template>
|
||||||
{{ __('Load More') }}
|
{{ __('Load More') }}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -81,9 +81,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { createResource, Avatar, Button, FormControl } from 'frappe-ui'
|
import { createResource, Avatar, Button, FormControl } from 'frappe-ui'
|
||||||
import * as icons from 'lucide-vue-next'
|
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { ref, watch, reactive } from 'vue'
|
import { ref, watch, reactive } from 'vue'
|
||||||
|
import { RefreshCw, Plus } from "lucide-vue-next"
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const show = defineModel('show')
|
const show = defineModel('show')
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog v-model="show" :options="{ size: '3xl' }">
|
<Dialog v-model="show" :options="{ size: '3xl' }">
|
||||||
<template #body="{ close }">
|
<template #body>
|
||||||
<div class="flex h-[calc(100vh_-_8rem)]">
|
<div class="flex h-[calc(100vh_-_8rem)]">
|
||||||
<div class="flex w-52 shrink-0 flex-col bg-gray-50 p-2">
|
<div class="flex w-52 shrink-0 flex-col bg-gray-50 p-2">
|
||||||
<h1 class="mb-3 px-2 pt-2 text-lg font-semibold">
|
<h1 class="mb-3 px-2 pt-2 text-lg font-semibold">
|
||||||
|
|||||||
@@ -566,12 +566,17 @@ def get_categories(doctype, filters):
|
|||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_members(start=0, search=""):
|
def get_members(start=0, search=""):
|
||||||
|
""" Get members for the given search term and start index.
|
||||||
|
Args: start (int): Start index for the query.
|
||||||
|
search (str): Search term to filter the results.
|
||||||
|
Returns: List of members.
|
||||||
|
"""
|
||||||
|
|
||||||
filters = {"enabled": 1, "name": ["not in", ["Administrator", "Guest"]]}
|
filters = {"enabled": 1, "name": ["not in", ["Administrator", "Guest"]]}
|
||||||
|
|
||||||
if search:
|
if search:
|
||||||
filters["full_name"] = ["like", f"%{search}%"]
|
filters["full_name"] = ["like", f"%{search}%"]
|
||||||
|
|
||||||
print(filters)
|
|
||||||
members = frappe.get_all(
|
members = frappe.get_all(
|
||||||
"User",
|
"User",
|
||||||
filters=filters,
|
filters=filters,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "frappe_lms",
|
"name": "frappe_lms",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Easy to use, open-source, Learning Management System",
|
"description": "Easy to use, open-source, Learning Management System",
|
||||||
"workspaces": [
|
"workspaces1": [
|
||||||
"frappe-ui",
|
"frappe-ui",
|
||||||
"frontend"
|
"frontend"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user