diff --git a/app/(workspace)/(routes)/worklog/admin/page.tsx b/app/(workspace)/(routes)/worklog/admin/page.tsx
index cd27fb752d0776b3ef67c65ff35226227646e4e6..1f93c952ecf2aa63e0510006ad41e5a1cb580e10 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 d7c05707eb66b1cfc0dd79e5a0eafc8d20524f44..45c4bb7269aae951309863750b680248032f076a 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
}
diff --git a/middleware.ts b/middleware.ts
index e65a65345981aa22870ac1136cf77747da0fcbc7..6a070fe5f329a914d904c5882d2c83db843d308d 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) {