From 29a040778988a7e627a6372f955e0f2120bb4f38 Mon Sep 17 00:00:00 2001 From: ideaswork Date: Thu, 9 Jan 2025 16:25:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?2025-01-09=20=E6=9B=B4=E6=96=B0=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- middleware.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/middleware.ts b/middleware.ts index e65a653..6a070fe 100644 --- a/middleware.ts +++ b/middleware.ts @@ -19,8 +19,8 @@ type RoleAccess = Record const roleAccess: RoleAccess = { 'Team Member': ['/', '/workspace', '/dashboard', '/task', '/worklog/user', '/documentation'], - 'Scrum Master': ['/product', '/sprint', '/team', '/userstory', '/backlog', '/worklog/admin'], - 'Product Owner': ['/userstory', '/backlog'] + 'Scrum Master': ['/', '/workspace', '/dashboard', '/task', '/worklog/user', '/documentation','/product', '/sprint', '/team', '/userstory', '/backlog', '/worklog/admin'], + 'Product Owner': ['/', '/workspace', '/dashboard', '/task', '/worklog/user', '/documentation','/userstory', '/backlog'] } export async function middleware(request: NextRequest) { -- Gitee From e387a9f4697cf364ea3ef622acbc6cb237abccb0 Mon Sep 17 00:00:00 2001 From: ideaswork Date: Thu, 9 Jan 2025 16:29:38 +0800 Subject: [PATCH 2/2] =?UTF-8?q?2025-01-09=20=E4=BF=AE=E5=A4=8D=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E4=B8=8Eworklog=E6=90=9C=E7=B4=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(routes)/worklog/admin/page.tsx | 2 +- components/worklog/SearchInterface.tsx | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/(workspace)/(routes)/worklog/admin/page.tsx b/app/(workspace)/(routes)/worklog/admin/page.tsx index cd27fb7..1f93c95 100644 --- a/app/(workspace)/(routes)/worklog/admin/page.tsx +++ b/app/(workspace)/(routes)/worklog/admin/page.tsx @@ -1,7 +1,7 @@ const StatisticPeriodSummary = () => { return (
-

统计周期总结

+

统计周期总结(待开发)

diff --git a/components/worklog/SearchInterface.tsx b/components/worklog/SearchInterface.tsx index d7c0570..45c4bb7 100644 --- a/components/worklog/SearchInterface.tsx +++ b/components/worklog/SearchInterface.tsx @@ -27,28 +27,28 @@ export function SearchInterface({ isAdmin, users, onSearch, onExport }: SearchIn switch (value) { case 'today': - startDate = now.startOf('day').toDate() - endDate = now.endOf('day').toDate() + startDate = moment().startOf('day').toDate() + endDate = moment().endOf('day').toDate() break case 'yesterday': - startDate = now.subtract(1, 'day').startOf('day').toDate() - endDate = now.endOf('day').toDate() + startDate = moment().subtract(1, 'day').startOf('day').toDate() + endDate = moment().subtract(1, 'day').endOf('day').toDate() break case 'thisWeek': - startDate = now.startOf('week').toDate() - endDate = now.endOf('week').toDate() + startDate = moment().startOf('week').toDate() + endDate = moment().endOf('week').toDate() break case 'lastWeek': - startDate = now.subtract(1, 'week').startOf('week').toDate() - endDate = now.endOf('week').toDate() + startDate = moment().subtract(1, 'week').startOf('week').toDate() + endDate = moment().subtract(1, 'week').endOf('week').toDate() break case 'thisMonth': - startDate = now.startOf('month').toDate() - endDate = now.endOf('month').toDate() + startDate = moment().startOf('month').toDate() + endDate = moment().endOf('month').toDate() break case 'lastMonth': - startDate = now.subtract(1, 'month').startOf('month').toDate() - endDate = now.endOf('month').toDate() + startDate = moment().subtract(1, 'month').startOf('month').toDate() + endDate = moment().subtract(1, 'month').endOf('month').toDate() break } -- Gitee