update,
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { COL_CUSTOMERS } from '@/constants';
|
||||
import { COL_CUSTOMERS, COL_USER_METAS } from '@/constants';
|
||||
import { pb } from '@/lib/pb';
|
||||
|
||||
export default async function GetActiveCount(): Promise<number> {
|
||||
const { totalItems: count } = await pb.collection(COL_CUSTOMERS).getList(1, 1, {
|
||||
filter: 'status = "active"',
|
||||
const { totalItems: count } = await pb.collection(COL_USER_METAS).getList(1, 1, {
|
||||
filter: 'role = "teacher" && status = "active"',
|
||||
});
|
||||
return count;
|
||||
}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
import { COL_CUSTOMERS } from '@/constants';
|
||||
import { COL_CUSTOMERS, COL_USER_METAS } from '@/constants';
|
||||
import { pb } from '@/lib/pb';
|
||||
|
||||
export default async function GetBlockedCount(): Promise<number> {
|
||||
const { totalItems: count } = await pb.collection(COL_CUSTOMERS).getList(1, 1, {
|
||||
filter: 'status = "blocked"',
|
||||
const { totalItems: count } = await pb.collection(COL_USER_METAS).getList(1, 1, {
|
||||
filter: `role = "teacher" && status = "blocked"`,
|
||||
});
|
||||
return count;
|
||||
}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
import { COL_CUSTOMERS } from '@/constants';
|
||||
import { COL_CUSTOMERS, COL_USER_METAS } from '@/constants';
|
||||
import { pb } from '@/lib/pb';
|
||||
|
||||
export default async function GetPendingCount(): Promise<number> {
|
||||
const { totalItems: count } = await pb.collection(COL_CUSTOMERS).getList(1, 1, {
|
||||
filter: 'status = "pending"',
|
||||
const { totalItems: count } = await pb.collection(COL_USER_METAS).getList(1, 1, {
|
||||
filter: 'role = "teacher" && status = "pending"',
|
||||
});
|
||||
return count;
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# GUIDELINES
|
||||
|
||||
This folder contains drivers for `Customer`/`Customers` records using PocketBase:
|
||||
This folder contains drivers for `Customer`/`Customers`(Collection ID: pbc_108570809) records using PocketBase:
|
||||
|
||||
- create (Create.tsx)
|
||||
- read (GetById.tsx)
|
||||
|
Reference in New Issue
Block a user