fix(admin): fix search (or vs and), remove sticky header
This commit is contained in:
@@ -392,10 +392,10 @@ function AdminPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen">
|
<div className="min-h-screen">
|
||||||
{/* ── Top bar ── */}
|
<main className="mx-auto max-w-[1600px] space-y-6 px-5 py-6">
|
||||||
<header className="sticky top-0 z-30 border-white/8 border-b bg-[#0d1f20]/95 backdrop-blur-md">
|
{/* ── Utility row ── */}
|
||||||
<div className="mx-auto flex max-w-[1600px] items-center justify-between px-5 py-3">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-3">
|
||||||
<Link
|
<Link
|
||||||
to="/"
|
to="/"
|
||||||
className="font-mono text-white/40 text-xs hover:text-white/80"
|
className="font-mono text-white/40 text-xs hover:text-white/80"
|
||||||
@@ -432,9 +432,6 @@ function AdminPage() {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
|
||||||
|
|
||||||
<main className="mx-auto max-w-[1600px] space-y-6 px-5 py-6">
|
|
||||||
{/* ── Pending admin requests ── */}
|
{/* ── Pending admin requests ── */}
|
||||||
{pendingRequests.length > 0 && (
|
{pendingRequests.length > 0 && (
|
||||||
<div className="rounded-xl border border-yellow-500/25 bg-yellow-500/8 p-4">
|
<div className="rounded-xl border border-yellow-500/25 bg-yellow-500/8 p-4">
|
||||||
|
|||||||
@@ -5,7 +5,18 @@ import { user } from "@kk/db/schema/auth";
|
|||||||
import { drinkkaart, drinkkaartTopup } from "@kk/db/schema/drinkkaart";
|
import { drinkkaart, drinkkaartTopup } from "@kk/db/schema/drinkkaart";
|
||||||
import { env } from "@kk/env/server";
|
import { env } from "@kk/env/server";
|
||||||
import type { RouterClient } from "@orpc/server";
|
import type { RouterClient } from "@orpc/server";
|
||||||
import { and, count, desc, eq, gte, isNull, like, lte, sum } from "drizzle-orm";
|
import {
|
||||||
|
and,
|
||||||
|
count,
|
||||||
|
desc,
|
||||||
|
eq,
|
||||||
|
gte,
|
||||||
|
isNull,
|
||||||
|
like,
|
||||||
|
lte,
|
||||||
|
or,
|
||||||
|
sum,
|
||||||
|
} from "drizzle-orm";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import {
|
import {
|
||||||
sendCancellationEmail,
|
sendCancellationEmail,
|
||||||
@@ -426,7 +437,7 @@ export const appRouter = {
|
|||||||
if (input.search) {
|
if (input.search) {
|
||||||
const term = `%${input.search}%`;
|
const term = `%${input.search}%`;
|
||||||
conditions.push(
|
conditions.push(
|
||||||
and(
|
or(
|
||||||
like(registration.firstName, term),
|
like(registration.firstName, term),
|
||||||
like(registration.lastName, term),
|
like(registration.lastName, term),
|
||||||
like(registration.email, term),
|
like(registration.email, term),
|
||||||
|
|||||||
Reference in New Issue
Block a user