Fix: User search & Event

Deskripsi:
- Tampilan avatar dan username
## NO Issue
This commit is contained in:
2024-09-30 11:01:17 +08:00
parent b13110be6f
commit ca5c30499a
80 changed files with 1764 additions and 918 deletions

View File

@@ -6,13 +6,13 @@ import _ from "lodash";
export async function event_getListAllPublish({ page }: { page: number }) {
const takeData = 10;
const skipData = page * takeData - takeData;
const data = await prisma.event.findMany({
take: takeData,
skip: skipData,
orderBy: [
{
tanggal: "desc",
tanggal: "asc",
},
],
where: {
@@ -22,17 +22,9 @@ export async function event_getListAllPublish({ page }: { page: number }) {
gte: new Date(),
},
},
select: {
id: true,
title: true,
lokasi: true,
tanggal: true,
deskripsi: true,
active: true,
catatan: true,
authorId: true,
include: {
Author: {
select: {
include: {
Profile: true,
},
},

View File

@@ -2,7 +2,7 @@
import prisma from "@/app/lib/prisma";
export async function Event_getOneById(eventId: string) {
export async function event_getOneById(eventId: string) {
const data = await prisma.event.findFirst({
where: {
id: eventId,
@@ -19,7 +19,7 @@ export async function Event_getOneById(eventId: string) {
catatan: true,
authorId: true,
Author: {
select: {
include: {
Profile: true,
},
},