committing wiht errors wbut better than before, moved some stuff more moving coming,

This commit is contained in:
2024-11-25 16:51:47 -05:00
parent 4c37b9b248
commit 0dfd533b71
19 changed files with 537 additions and 20 deletions

View File

@@ -2,7 +2,7 @@
import { eq, not , asc} from "drizzle-orm";
import { revalidatePath } from "next/cache";
import { db } from "../db";
import { brand } from "../db/schema/Brand";
import { brand } from "@db/schema/Brand";
export const getData = async () => {
const data = await db.select().from(brand).orderBy(asc(brand.name));
return data;

View File

@@ -0,0 +1,10 @@
"use server";
import { eq, not , asc} from "drizzle-orm";
import { revalidatePath } from "next/cache";
import { db } from "../db";
import { ComponentType } from "@db/schema/ComponentTypes";
export const getData = async () => {
const data = await db.select().from(ComponentType).orderBy(asc(ComponentType.name));
return data;
};

View File

@@ -2,7 +2,7 @@
import { eq, not , asc} from "drizzle-orm";
import { revalidatePath } from "next/cache";
import { db } from "../db";
import { manufacturer } from "@/db/schema/Manufacturer";
import { manufacturer } from "@db/schema/Manufacturer";
export const getData = async () => {
const data = await db.select().from(manufacturer).orderBy(asc(manufacturer.name));
return data;