diff --git a/database/queries/admin.sql b/database/queries/admin.sql index 66d5446..206cfae 100644 --- a/database/queries/admin.sql +++ b/database/queries/admin.sql @@ -6,8 +6,7 @@ SELECT CAST((SELECT COUNT(*) FROM events WHERE deleted_at IS NULL) AS INTEGER) as event_count, CAST((SELECT COUNT(DISTINCT name) FROM modules WHERE deleted_at IS NULL) AS INTEGER) as module_count, CAST((SELECT COUNT(*) FROM programs WHERE deleted_at IS NULL) AS INTEGER) as program_count, - CAST((SELECT COUNT(*) FROM activities WHERE deleted_at IS NULL) AS INTEGER) as activity_count, - CAST((SELECT COUNT(*) FROM sessions) AS INTEGER) as session_count; + CAST((SELECT COUNT(*) FROM activities WHERE deleted_at IS NULL) AS INTEGER) as activity_count; -- name: GetDailyUserGrowth :many SELECT @@ -27,15 +26,6 @@ WHERE created_at >= date('now', '-90 days') AND deleted_at IS NULL GROUP BY date ORDER BY date ASC; --- name: GetDailySessionTrend :many -SELECT - date(created_at) as date, - COUNT(*) as count -FROM sessions -WHERE created_at >= date('now', '-90 days') -GROUP BY date -ORDER BY date ASC; - -- name: GetDailyExamGrowth :many SELECT date(created_at) as date, diff --git a/docs/docs.go b/docs/docs.go index 5470daa..145376b 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1849,12 +1849,6 @@ const docTemplate = `{ "$ref": "#/definitions/dto.ActivityResponse" } }, - "session_trend": { - "type": "array", - "items": { - "$ref": "#/definitions/dto.DashboardTrendItem" - } - }, "stats": { "$ref": "#/definitions/dto.AdminStatsResponse" }, @@ -1887,9 +1881,6 @@ const docTemplate = `{ "program_count": { "type": "integer" }, - "session_count": { - "type": "integer" - }, "user_count": { "type": "integer" } diff --git a/docs/swagger.json b/docs/swagger.json index bd7d0d9..e60fd23 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1842,12 +1842,6 @@ "$ref": "#/definitions/dto.ActivityResponse" } }, - "session_trend": { - "type": "array", - "items": { - "$ref": "#/definitions/dto.DashboardTrendItem" - } - }, "stats": { "$ref": "#/definitions/dto.AdminStatsResponse" }, @@ -1880,9 +1874,6 @@ "program_count": { "type": "integer" }, - "session_count": { - "type": "integer" - }, "user_count": { "type": "integer" } diff --git a/docs/swagger.yaml b/docs/swagger.yaml index eda6acb..8dbc42b 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -47,10 +47,6 @@ definitions: items: $ref: '#/definitions/dto.ActivityResponse' type: array - session_trend: - items: - $ref: '#/definitions/dto.DashboardTrendItem' - type: array stats: $ref: '#/definitions/dto.AdminStatsResponse' user_growth_trend: @@ -72,8 +68,6 @@ definitions: type: integer program_count: type: integer - session_count: - type: integer user_count: type: integer type: object diff --git a/internal/api/api.go b/internal/api/api.go index de01db5..7b3e5f4 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -71,11 +71,6 @@ func Run() error { IdleTimeout: 120 * time.Second, } - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - go handler.StartSessionSweeper(ctx, querier, logger) - go func() { logger.Info("Server starting", "port", cfg.HTTPPort, "version", Version) if err := httpServer.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) { diff --git a/internal/api/dto/dto.go b/internal/api/dto/dto.go index ee36078..a60b11c 100644 --- a/internal/api/dto/dto.go +++ b/internal/api/dto/dto.go @@ -269,7 +269,6 @@ type AdminStatsResponse struct { ModuleCount int64 `json:"module_count"` ProgramCount int64 `json:"program_count"` ActivityCount int64 `json:"activity_count"` - SessionCount int64 `json:"session_count"` } type DashboardTrendItem struct { @@ -290,7 +289,6 @@ type AdminDashboardResponse struct { ModuleGrowthTrend []DashboardTrendItem `json:"module_growth_trend"` ProgramGrowthTrend []DashboardTrendItem `json:"program_growth_trend"` ActivityTrend []DashboardTrendItem `json:"activity_trend"` - SessionTrend []DashboardTrendItem `json:"session_trend"` ProgramDistribution []ProgramDistributionItem `json:"program_distribution"` RecentActivities []ActivityResponse `json:"recent_activities"` } diff --git a/internal/api/handler/admin.go b/internal/api/handler/admin.go index 93959fa..99a01db 100644 --- a/internal/api/handler/admin.go +++ b/internal/api/handler/admin.go @@ -123,7 +123,6 @@ func (s *Server) GetAdminStats(w http.ResponseWriter, r *http.Request) { ModuleCount: stats.ModuleCount, ProgramCount: stats.ProgramCount, ActivityCount: stats.ActivityCount, - SessionCount: stats.SessionCount, }) } @@ -142,7 +141,6 @@ func (s *Server) GetAdminDashboard(w http.ResponseWriter, r *http.Request) { discGrowth, _ := s.DB.GetDailyDiscussionGrowth(ctx) moduleGrowth, _ := s.DB.GetDailyModuleGrowth(ctx) programGrowth, _ := s.DB.GetDailyProgramGrowth(ctx) - sessionTrend, _ := s.DB.GetDailySessionTrend(ctx) dist, _ := s.DB.GetUserProgramDistribution(ctx) activities, _ := s.DB.ListAllActivities(ctx, database.ListAllActivitiesParams{ Limit: 10, @@ -233,20 +231,6 @@ func (s *Server) GetAdminDashboard(w http.ResponseWriter, r *http.Request) { } } - sessionDto := make([]dto.DashboardTrendItem, len(sessionTrend)) - for i, s := range sessionTrend { - dateStr := "" - if str, ok := s.Date.(string); ok { - dateStr = str - } else if s.Date != nil { - dateStr = fmt.Sprint(s.Date) - } - sessionDto[i] = dto.DashboardTrendItem{ - Date: dateStr, - Count: s.Count, - } - } - distDto := make([]dto.ProgramDistributionItem, len(dist)) for i, d := range dist { distDto[i] = dto.ProgramDistributionItem{ @@ -277,7 +261,6 @@ func (s *Server) GetAdminDashboard(w http.ResponseWriter, r *http.Request) { ModuleCount: stats.ModuleCount, ProgramCount: stats.ProgramCount, ActivityCount: stats.ActivityCount, - SessionCount: stats.SessionCount, }, UserGrowthTrend: growthDto, ExamGrowthTrend: examDto, @@ -285,7 +268,6 @@ func (s *Server) GetAdminDashboard(w http.ResponseWriter, r *http.Request) { ModuleGrowthTrend: moduleGrowthDto, ProgramGrowthTrend: programGrowthDto, ActivityTrend: trendDto, - SessionTrend: sessionDto, ProgramDistribution: distDto, RecentActivities: activitiesDto, }) diff --git a/internal/api/handler/sessions.go b/internal/api/handler/sessions.go deleted file mode 100644 index bf6d8d0..0000000 --- a/internal/api/handler/sessions.go +++ /dev/null @@ -1,27 +0,0 @@ -package handler - -import ( - "context" - "time" - - "github.com/fachschaftinformatik/web/internal/database" - "github.com/go-chi/httplog/v2" -) - -func StartSessionSweeper(ctx context.Context, querier database.Querier, logger *httplog.Logger) { - logger.Info("Session sweeper started.") - ticker := time.NewTicker(15 * time.Minute) - defer ticker.Stop() - - for { - if err := querier.DeleteExpiredSessions(ctx); err != nil { - logger.Error("Error sweeping sessions", "err", err) - } - select { - case <-ticker.C: - case <-ctx.Done(): - logger.Info("Session sweeper stopped.") - return - } - } -} diff --git a/internal/database/admin.sql.go b/internal/database/admin.sql.go index 4ef0536..497f043 100644 --- a/internal/database/admin.sql.go +++ b/internal/database/admin.sql.go @@ -17,8 +17,7 @@ SELECT CAST((SELECT COUNT(*) FROM events WHERE deleted_at IS NULL) AS INTEGER) as event_count, CAST((SELECT COUNT(DISTINCT name) FROM modules WHERE deleted_at IS NULL) AS INTEGER) as module_count, CAST((SELECT COUNT(*) FROM programs WHERE deleted_at IS NULL) AS INTEGER) as program_count, - CAST((SELECT COUNT(*) FROM activities WHERE deleted_at IS NULL) AS INTEGER) as activity_count, - CAST((SELECT COUNT(*) FROM sessions) AS INTEGER) as session_count + CAST((SELECT COUNT(*) FROM activities WHERE deleted_at IS NULL) AS INTEGER) as activity_count ` type GetAdminStatsRow struct { @@ -29,7 +28,6 @@ type GetAdminStatsRow struct { ModuleCount int64 `json:"module_count"` ProgramCount int64 `json:"program_count"` ActivityCount int64 `json:"activity_count"` - SessionCount int64 `json:"session_count"` } func (q *Queries) GetAdminStats(ctx context.Context) (GetAdminStatsRow, error) { @@ -43,7 +41,6 @@ func (q *Queries) GetAdminStats(ctx context.Context) (GetAdminStatsRow, error) { &i.ModuleCount, &i.ProgramCount, &i.ActivityCount, - &i.SessionCount, ) return i, err } @@ -252,44 +249,6 @@ func (q *Queries) GetDailyProgramGrowth(ctx context.Context) ([]GetDailyProgramG return items, nil } -const getDailySessionTrend = `-- name: GetDailySessionTrend :many -SELECT - date(created_at) as date, - COUNT(*) as count -FROM sessions -WHERE created_at >= date('now', '-90 days') -GROUP BY date -ORDER BY date ASC -` - -type GetDailySessionTrendRow struct { - Date interface{} `json:"date"` - Count int64 `json:"count"` -} - -func (q *Queries) GetDailySessionTrend(ctx context.Context) ([]GetDailySessionTrendRow, error) { - rows, err := q.db.QueryContext(ctx, getDailySessionTrend) - if err != nil { - return nil, err - } - defer rows.Close() - var items []GetDailySessionTrendRow - for rows.Next() { - var i GetDailySessionTrendRow - if err := rows.Scan(&i.Date, &i.Count); err != nil { - return nil, err - } - items = append(items, i) - } - if err := rows.Close(); err != nil { - return nil, err - } - if err := rows.Err(); err != nil { - return nil, err - } - return items, nil -} - const getDailyUserGrowth = `-- name: GetDailyUserGrowth :many SELECT date(created_at) as date, diff --git a/internal/database/querier.go b/internal/database/querier.go index d5509c7..a41a664 100644 --- a/internal/database/querier.go +++ b/internal/database/querier.go @@ -49,7 +49,6 @@ type Querier interface { GetDailyExamGrowth(ctx context.Context) ([]GetDailyExamGrowthRow, error) GetDailyModuleGrowth(ctx context.Context) ([]GetDailyModuleGrowthRow, error) GetDailyProgramGrowth(ctx context.Context) ([]GetDailyProgramGrowthRow, error) - GetDailySessionTrend(ctx context.Context) ([]GetDailySessionTrendRow, error) GetDailyUserGrowth(ctx context.Context) ([]GetDailyUserGrowthRow, error) GetDiscussionComment(ctx context.Context, id int64) (DiscussionComment, error) GetDiscussionPost(ctx context.Context, arg GetDiscussionPostParams) (GetDiscussionPostRow, error) diff --git a/website/app/admin/page.tsx b/website/app/admin/page.tsx index 38999f7..6b90ddd 100644 --- a/website/app/admin/page.tsx +++ b/website/app/admin/page.tsx @@ -36,9 +36,7 @@ const AdminDashboard: React.FC = () => { }, []); const growthData = data?.user_growth_trend?.map(item => Number(item.count) || 0) || []; - - const sessionData = data?.session_trend?.map(item => Number(item.count) || 0) || []; - const sessionLabels = data?.session_trend?.map(item => item.date ? new Date(item.date).toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit' }) : '') || []; + const growthLabels = data?.user_growth_trend?.map(item => item.date ? new Date(item.date).toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit' }) : '') || []; const examData = data?.exam_growth_trend?.map(item => Number(item.count) || 0) || []; const discData = data?.discussion_growth_trend?.map(item => Number(item.count) || 0) || []; @@ -117,12 +115,12 @@ const AdminDashboard: React.FC = () => { minWidth: 0 }}> diff --git a/website/bun.lock b/website/bun.lock index 8896bb9..ec49053 100644 --- a/website/bun.lock +++ b/website/bun.lock @@ -14,7 +14,7 @@ "@mui/material": "^7.3.8", "@mui/material-nextjs": "^7.3.8", "@mui/x-charts": "^8.27.0", - "@mui/x-data-grid": "^8.27.1", + "@mui/x-data-grid": "^8.27.3", "jose": "^6.1.3", "next": "^16.1.6", "next-auth": "^5.0.0-beta.30", @@ -29,7 +29,7 @@ "@types/react-dom": "19.2.3", "@typescript-eslint/eslint-plugin": "8.56.1", "@typescript-eslint/parser": "8.56.1", - "@typescript/native-preview": "^7.0.0-dev.20260224.1", + "@typescript/native-preview": "^7.0.0-dev.20260225.1", "eslint": "10.0.2", "eslint-config-next": "^16.1.6", "eslint-plugin-react-hooks": "7.0.1", @@ -227,7 +227,7 @@ "@mui/x-charts-vendor": ["@mui/x-charts-vendor@8.26.0", "", { "dependencies": { "@babel/runtime": "^7.28.4", "@types/d3-array": "^3.2.2", "@types/d3-color": "^3.1.3", "@types/d3-format": "^3.0.4", "@types/d3-interpolate": "^3.0.4", "@types/d3-path": "^3.1.1", "@types/d3-scale": "^4.0.9", "@types/d3-shape": "^3.1.7", "@types/d3-time": "^3.0.4", "@types/d3-time-format": "^4.0.3", "@types/d3-timer": "^3.0.2", "d3-array": "^3.2.4", "d3-color": "^3.1.0", "d3-format": "^3.1.0", "d3-interpolate": "^3.0.1", "d3-path": "^3.1.0", "d3-scale": "^4.0.2", "d3-shape": "^3.2.0", "d3-time": "^3.1.0", "d3-time-format": "^4.1.0", "d3-timer": "^3.0.1", "flatqueue": "^3.0.0", "internmap": "^2.0.3" } }, "sha512-R//+WSWvsLJRTjTRN90EKX9sgRzAb4HQBvtUA3cTQpkGrmEjmatD4BJAm3IdRdkSagf6yKWF+ypESctyRhbwnA=="], - "@mui/x-data-grid": ["@mui/x-data-grid@8.27.1", "", { "dependencies": { "@babel/runtime": "^7.28.4", "@mui/utils": "^7.3.5", "@mui/x-internals": "8.26.0", "@mui/x-virtualizer": "0.3.3", "clsx": "^2.1.1", "prop-types": "^15.8.1", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "@emotion/react": "^11.9.0", "@emotion/styled": "^11.8.1", "@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0", "@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-Xje197cUzmch33vLip5KR44SQ0CB49iutBTaoIMSxIVSfNqI8BadEh8PpPCacuTeSty06tJKpBMe66NNYWfHFw=="], + "@mui/x-data-grid": ["@mui/x-data-grid@8.27.3", "", { "dependencies": { "@babel/runtime": "^7.28.4", "@mui/utils": "^7.3.5", "@mui/x-internals": "8.26.0", "@mui/x-virtualizer": "0.3.3", "clsx": "^2.1.1", "prop-types": "^15.8.1", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "@emotion/react": "^11.9.0", "@emotion/styled": "^11.8.1", "@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0", "@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "optionalPeers": ["@emotion/react", "@emotion/styled"] }, "sha512-4JhwMBLGpaSyg8tqnYkegk4gfXovqxT+gRlm2Lb8f3WDFUPsVGL5c/bMi7MSRkYJ2h1pGXaLKaYORLR62xuRAQ=="], "@mui/x-internal-gestures": ["@mui/x-internal-gestures@0.4.0", "", { "dependencies": { "@babel/runtime": "^7.28.4" } }, "sha512-i0W6v9LoiNY8Yf1goOmaygtz/ncPJGBedhpDfvNg/i8BvzPwJcBaeW4rqPucJfVag9KQ8MSssBBrvYeEnrQmhw=="], @@ -335,21 +335,21 @@ "@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.56.1", "", { "dependencies": { "@typescript-eslint/types": "8.56.1", "eslint-visitor-keys": "^5.0.0" } }, "sha512-KiROIzYdEV85YygXw6BI/Dx4fnBlFQu6Mq4QE4MOH9fFnhohw6wX/OAvDY2/C+ut0I3RSPKenvZJIVYqJNkhEw=="], - "@typescript/native-preview": ["@typescript/native-preview@7.0.0-dev.20260224.1", "", { "optionalDependencies": { "@typescript/native-preview-darwin-arm64": "7.0.0-dev.20260224.1", "@typescript/native-preview-darwin-x64": "7.0.0-dev.20260224.1", "@typescript/native-preview-linux-arm": "7.0.0-dev.20260224.1", "@typescript/native-preview-linux-arm64": "7.0.0-dev.20260224.1", "@typescript/native-preview-linux-x64": "7.0.0-dev.20260224.1", "@typescript/native-preview-win32-arm64": "7.0.0-dev.20260224.1", "@typescript/native-preview-win32-x64": "7.0.0-dev.20260224.1" }, "bin": { "tsgo": "bin/tsgo.js" } }, "sha512-PU0zBXLvz6RKxbIubT66RCnJXgScdDIhfmNMkvRhOnX/C4SZom5TFSn7BEHC3w8JPj7OSz5OYoubtV1Haty2GA=="], + "@typescript/native-preview": ["@typescript/native-preview@7.0.0-dev.20260225.1", "", { "optionalDependencies": { "@typescript/native-preview-darwin-arm64": "7.0.0-dev.20260225.1", "@typescript/native-preview-darwin-x64": "7.0.0-dev.20260225.1", "@typescript/native-preview-linux-arm": "7.0.0-dev.20260225.1", "@typescript/native-preview-linux-arm64": "7.0.0-dev.20260225.1", "@typescript/native-preview-linux-x64": "7.0.0-dev.20260225.1", "@typescript/native-preview-win32-arm64": "7.0.0-dev.20260225.1", "@typescript/native-preview-win32-x64": "7.0.0-dev.20260225.1" }, "bin": { "tsgo": "bin/tsgo.js" } }, "sha512-mUf1aON+eZLupLorX4214n4W6uWIz/lvNv81ErzjJylD/GyJPEJkvDLmgIK3bbvLpMwTRWdVJLhpLCah5Qe8iA=="], - "@typescript/native-preview-darwin-arm64": ["@typescript/native-preview-darwin-arm64@7.0.0-dev.20260224.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-9VHXRhB7sM5DFqdlKaeDww8vuklgfzhYCjBazLCEnuFvb4J+rJ1DodLykc2bL+6kE8k6sdhYi3x8ipfbjtO44g=="], + "@typescript/native-preview-darwin-arm64": ["@typescript/native-preview-darwin-arm64@7.0.0-dev.20260225.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-3qSsqv7FmM4z09wEpEXdhmgMfiJF/OMOZa41AdgMsXTTRpX2/38hDg2KGhi3fc24M2T3MnLPLTqw6HyTOBaV1Q=="], - "@typescript/native-preview-darwin-x64": ["@typescript/native-preview-darwin-x64@7.0.0-dev.20260224.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-uCHipPRcIhHnvb7lAM29MQ1QT9pZ+uirqtH630aOMFm8VG3j8mkxVM9iGRLx829n38DMSDLjc3joCrQO3+sDcQ=="], + "@typescript/native-preview-darwin-x64": ["@typescript/native-preview-darwin-x64@7.0.0-dev.20260225.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-F8ZCCX2UESHcbxvnkd1Dn5PTnOOgpGddFHYgn4usyWRMzNZLPP+YjyGALZe9zdR/D8L0uraND0Haok+TPq8xYg=="], - "@typescript/native-preview-linux-arm": ["@typescript/native-preview-linux-arm@7.0.0-dev.20260224.1", "", { "os": "linux", "cpu": "arm" }, "sha512-cEWSRQ8b+CXdMJvoG18IjNTvBo+qT22B5imqm6nAssMpyHHQb62PvZGnrA8mPRQNPzLpa5F956j8GwAjyP8hBQ=="], + "@typescript/native-preview-linux-arm": ["@typescript/native-preview-linux-arm@7.0.0-dev.20260225.1", "", { "os": "linux", "cpu": "arm" }, "sha512-Iu5rnCmqwGIMUu//BXkl9VQaxAAsqVvFhU4mJoNexNkMxPqVcu9quqYAouY7tN/95WcKzUsPpyRfkThdbNFO/g=="], - "@typescript/native-preview-linux-arm64": ["@typescript/native-preview-linux-arm64@7.0.0-dev.20260224.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-yFEEq6hD2R70+lTogb211sPdCwz3H5hpYh0+YuKVMPsKo0oM8/jMvgjj2pyutmj/uCKLdbcJ9HP2vJ/13Szbcg=="], + "@typescript/native-preview-linux-arm64": ["@typescript/native-preview-linux-arm64@7.0.0-dev.20260225.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-Up8Z/QNcwce5C4rWnbLNW5w7lRARdyKZcNbB1NMnaswaGOBdeDmdP0wbVsOgJMoDp6vnun+EkvrSft8hWLLhIg=="], - "@typescript/native-preview-linux-x64": ["@typescript/native-preview-linux-x64@7.0.0-dev.20260224.1", "", { "os": "linux", "cpu": "x64" }, "sha512-zGz5kVcCeBRheQwA4jVTAxtbLsBsTkp9AEvWK5AlyCs1rQCUQobBhtx37X4VEmxn4ekIDMxYgaZdlZb7/PGp8w=="], + "@typescript/native-preview-linux-x64": ["@typescript/native-preview-linux-x64@7.0.0-dev.20260225.1", "", { "os": "linux", "cpu": "x64" }, "sha512-WWjIfHCWlcriempYYc/sPJ3HFt6znNZKp60nvDNih0+wmxNqEfT5Yzu5zAY0awIe7XLelFSY+bolkpzMYVWEIQ=="], - "@typescript/native-preview-win32-arm64": ["@typescript/native-preview-win32-arm64@7.0.0-dev.20260224.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-A0f9ZDQqKvGk/an59HuAJuzoI/wMyrgTd69oX9gFCx7+5E/ajSdgv0Eg1Fco+nyLfT/UVM0CV3ERyWrKzx277w=="], + "@typescript/native-preview-win32-arm64": ["@typescript/native-preview-win32-arm64@7.0.0-dev.20260225.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-lmfQO+HdmPMk0dtPoNo8dZereTUYNQuapsAI7nFHCP8F25I8eGKKXY2nD1R8W1hp/LmVtske1pqKFNN6IOCt5g=="], - "@typescript/native-preview-win32-x64": ["@typescript/native-preview-win32-x64@7.0.0-dev.20260224.1", "", { "os": "win32", "cpu": "x64" }, "sha512-Se9JrcMdVLeDYMLn+CKEV3qy1yiildb5N23USGvnC9siNFalz8tVgd589dhRP+ywDhXnbIsZiFKDrZF/7B4wSQ=="], + "@typescript/native-preview-win32-x64": ["@typescript/native-preview-win32-x64@7.0.0-dev.20260225.1", "", { "os": "win32", "cpu": "x64" }, "sha512-e4eJyzR9ne0XreqYgQNqfX7SNuaePxggnUtVrLERgBv25QKwdQl72GnSXDhdxZHzrb97YwumiXWMQQJj9h8NCg=="], "@unrs/resolver-binding-android-arm-eabi": ["@unrs/resolver-binding-android-arm-eabi@1.11.1", "", { "os": "android", "cpu": "arm" }, "sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw=="], diff --git a/website/package.json b/website/package.json index 6b1b923..3f4907a 100644 --- a/website/package.json +++ b/website/package.json @@ -21,7 +21,7 @@ "@mui/material": "^7.3.8", "@mui/material-nextjs": "^7.3.8", "@mui/x-charts": "^8.27.0", - "@mui/x-data-grid": "^8.27.1", + "@mui/x-data-grid": "^8.27.3", "jose": "^6.1.3", "next": "^16.1.6", "next-auth": "^5.0.0-beta.30", @@ -36,7 +36,7 @@ "@types/react-dom": "19.2.3", "@typescript-eslint/eslint-plugin": "8.56.1", "@typescript-eslint/parser": "8.56.1", - "@typescript/native-preview": "^7.0.0-dev.20260224.1", + "@typescript/native-preview": "^7.0.0-dev.20260225.1", "eslint": "10.0.2", "eslint-config-next": "^16.1.6", "eslint-plugin-react-hooks": "7.0.1", diff --git a/website/src/lib/api/types.gen.ts b/website/src/lib/api/types.gen.ts index 0db20af..de56f06 100644 --- a/website/src/lib/api/types.gen.ts +++ b/website/src/lib/api/types.gen.ts @@ -22,7 +22,6 @@ export type DtoAdminDashboardResponse = { program_distribution?: Array; program_growth_trend?: Array; recent_activities?: Array; - session_trend?: Array; stats?: DtoAdminStatsResponse; user_growth_trend?: Array; }; @@ -34,7 +33,6 @@ export type DtoAdminStatsResponse = { module_count?: number; post_count?: number; program_count?: number; - session_count?: number; user_count?: number; }; diff --git a/website/src/lib/api/zod.gen.ts b/website/src/lib/api/zod.gen.ts index 799cfc8..714ba8e 100644 --- a/website/src/lib/api/zod.gen.ts +++ b/website/src/lib/api/zod.gen.ts @@ -19,7 +19,6 @@ export const zDtoAdminStatsResponse = z.object({ module_count: z.int().optional(), post_count: z.int().optional(), program_count: z.int().optional(), - session_count: z.int().optional(), user_count: z.int().optional() }); @@ -177,7 +176,6 @@ export const zDtoAdminDashboardResponse = z.object({ program_distribution: z.array(zDtoProgramDistributionItem).optional(), program_growth_trend: z.array(zDtoDashboardTrendItem).optional(), recent_activities: z.array(zDtoActivityResponse).optional(), - session_trend: z.array(zDtoDashboardTrendItem).optional(), stats: zDtoAdminStatsResponse.optional(), user_growth_trend: z.array(zDtoDashboardTrendItem).optional() });