feat: bugfixes, spedup, bulk actions,

This commit is contained in:
Vasily Zubarev
2025-03-17 18:36:25 +01:00
parent b27f07043e
commit 14967e1c85
34 changed files with 433 additions and 225 deletions

View File

@@ -1,6 +1,7 @@
import { addCategoryAction, deleteCategoryAction, editCategoryAction } from "@/app/settings/actions"
import { CrudTable } from "@/components/settings/crud"
import { getCategories } from "@/data/categories"
import { randomHexColor } from "@/lib/utils"
export default async function CategoriesSettingsPage() {
const categories = await getCategories()
@@ -18,7 +19,7 @@ export default async function CategoriesSettingsPage() {
columns={[
{ key: "name", label: "Name", editable: true },
{ key: "llm_prompt", label: "LLM Prompt", editable: true },
{ key: "color", label: "Color", editable: true },
{ key: "color", label: "Color", defaultValue: randomHexColor(), editable: true },
]}
onDelete={async (code) => {
"use server"

View File

@@ -16,7 +16,7 @@ export default async function CurrenciesSettingsPage() {
<CrudTable
items={currenciesWithActions}
columns={[
{ key: "code", label: "Code" },
{ key: "code", label: "Code", editable: true },
{ key: "name", label: "Name", editable: true },
]}
onDelete={async (code) => {

View File

@@ -1,6 +1,7 @@
import { addProjectAction, deleteProjectAction, editProjectAction } from "@/app/settings/actions"
import { CrudTable } from "@/components/settings/crud"
import { getProjects } from "@/data/projects"
import { randomHexColor } from "@/lib/utils"
export default async function ProjectsSettingsPage() {
const projects = await getProjects()
@@ -18,7 +19,7 @@ export default async function ProjectsSettingsPage() {
columns={[
{ key: "name", label: "Name", editable: true },
{ key: "llm_prompt", label: "LLM Prompt", editable: true },
{ key: "color", label: "Color", editable: true },
{ key: "color", label: "Color", defaultValue: randomHexColor(), editable: true },
]}
onDelete={async (code) => {
"use server"