feat(market): add Minha Intenções tab with panel, hook, and badge

- Introduced "Minhas Intenções" tab visible only to logged-in users.
- Integrated MyPurchaseIntentionsPanel and useMyPurchaseIntentions hook.
- Added tab badge showing count of pending intentions.
- Extended session API to include user’s main character for downstream features.
This commit is contained in:
Evandro Fonseca Junior committed 2025-11-07 17:25:51 -03:00
1 parent f35fee944d
commit 7f42def478
55 files changed
+4906 -95

No files matched your search

-6
View File
@@ -36,7 +36,6 @@ export interface SearchItemsParams {
* Busca um item por ID unificado
*/
export async function getItemById(itemId: number): Promise<Item | null> {
// @ts-expect-error - Prisma Client pode não ter sido gerado ainda
const item = await prisma.item.findUnique({
where: { item_id: itemId },
});
@@ -56,7 +55,6 @@ export async function getItemById(itemId: number): Promise<Item | null> {
* Busca um item por nome (exato ou similar)
*/
export async function getItemByName(itemName: string): Promise<Item | null> {
// @ts-expect-error - Prisma Client pode não ter sido gerado ainda
const item = await prisma.item.findFirst({
where: {
item_name: {
@@ -91,7 +89,6 @@ export async function searchItems(
pageSize = 24,
} = params;
// @ts-expect-error - ItemWhereInput pode não estar disponível se Prisma Client não foi gerado
const where: Prisma.ItemWhereInput = {};
if (q) {
@@ -109,10 +106,8 @@ export async function searchItems(
where.rarity = rarity;
}
// @ts-expect-error - Prisma Client pode não ter sido gerado ainda
const total = await prisma.item.count({ where });
// @ts-expect-error - Prisma Client pode não ter sido gerado ainda
const items = await prisma.item.findMany({
where,
orderBy: { item_name: "asc" },
@@ -138,7 +133,6 @@ export async function getItemBySource(
sourceTableName: string,
sourceTableId: number
): Promise<Item | null> {
// @ts-expect-error - Prisma Client pode não ter sido gerado ainda
const item = await prisma.item.findUnique({
where: {
source_table_name_source_table_id: {