chore: restructure into monorepo and add open-source documentation

- Rename helix-server -> server and helix-web -> web
- Remove helix-api (bruno collection and docs site)
- Merge per-module .gitignore files into the root .gitignore
- Add README, AGENTS, CONTRIBUTING and MIT LICENCE
- Add full-stack docker-compose (postgres, redis, server, web via Caddy)
  with web Dockerfile, Caddyfile and Compose server config
- Keep the Gradle wrapper jar tracked after the .gitignore merge
- Copy gradle.properties into the server Docker build image
This commit is contained in:
siujamo committed 2026-09-01 10:48:45 +08:00
1 parent 112d0f3be4
commit 965b92b47d
315 files changed
+741 -7394

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
import { type TreeDataNode } from "antd"
import type { TreeNode } from "@/types/tree"
import type { Department } from "@/types/entity"
export function transformDepartmentData(departments: TreeNode<Department>[]): TreeDataNode[] {
if (!departments || departments.length === 0) {
return []
}
return departments
.sort((a, b) => a.item.sort - b.item.sort)
.map((node) => {
const { item, children } = node
const hasChildren = children && children.length > 0
const treeItem: TreeDataNode = {
key: item.id,
title: item.name,
}
if (hasChildren) {
// Append children
return { ...treeItem, children: transformDepartmentData(children) }
}
return treeItem
})
}