-
Couldn't load subscription status.
- Fork 23
fix(add):analytics #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix(add):analytics #47
Conversation
|
🤖 Fork Repository Check Complete ✅ Basic security scan completed This PR from a fork repository has passed basic safety checks. A maintainer will review the changes before running full CI/CD pipeline. This is an automated safety check for contributions from fork repositories. |
- Add @eslint/js to eslint-config - Move i18next to dependencies and add to server - Add @tiptap/core, lucide-react, date-fns to ui package - Add @types/markdown-it to server - Refactor menubar component (user changes) - Remove bun-types from frontend TypeScript config Resolves all CI typecheck and build failures.
feat(server): add ticket autoclose job,knowledge access log
cf44b85 to
ecbb631
Compare
| import { useTranslation } from "i18n"; | ||
|
|
||
| const getRatingChartConfig = (t: any) => ({ | ||
| "1星": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i18n 国际化
|
|
||
| <AlertTitle className="text-black flex items-center gap-2"><TriangleAlert className="h-4 w-4 text-red-600" />{t("tkt_backlog_rate_error")}</AlertTitle> | ||
| <AlertDescription className="text-black"> | ||
| 当前未处理工单占比 <span className="text-red-600 ">{data.backlogRate}%</span>,超过正常水平,建议增加处理人力。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i18n 国际化
| staleTime: 0, | ||
| refetchOnMount: true, | ||
| refetchOnWindowFocus: true, | ||
| staleTime: 5 * 60 * 1000, // 5分钟缓存 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么修改这里
| 支付问题: "#F59E0B", | ||
| 性能问题: "#EF4444", | ||
| 界面问题: "#8B5CF6", | ||
| 服务问题: "#06B6D4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
颜色为什么定义在后端
|
|
||
| const analyticsRouter = factory | ||
| .createApp() | ||
| .use("*", authMiddleware) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
还是之前说的问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
server/api/feedback/index.ts 可以参考这个的写法
| ratingDistribution: [ | ||
| { name: "未评分", value: unratedTickets, percentage: 0 }, | ||
| { name: "1星", value: ratingMap[1], percentage: 0 }, | ||
| { name: "2星", value: ratingMap[2], percentage: 0 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
国家化
| ticketId, | ||
| payload.title, | ||
| payload.description | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以参考 server/api/kb/index.ts
server/utils/events/kb
export const Events = {
KBFavoritesSync: "kb.favorites.sync",
} as const;
添加一个 工单分析事件,然后写一个 工单分析的 listener 和 数据 repo 操作
避免创建工单时等待分析
| export const hotIssues = tentix.table( | ||
| "hot_issues", | ||
| { | ||
| id: serial("id").primaryKey().notNull(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tag 没有抽离出来吗,那么怎么人工修改tag 或者添加tag,例如如果已经有一组 tag 用于使用,现在要修改tag 怎么操作,没有用到 tags 吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hotIssues 用单数 hotIssue
| } | ||
|
|
||
| export async function getHotIssuesStats( | ||
| db: NodePgDatabase<AppSchema>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
db: NodePgDatabase
换成
db: ReturnType
a4ebf1c to
c738ae3
Compare
No description provided.