From b12bb2d9e4922c513185ca3bb480da1b54954304 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 09 九月 2024 14:42:48 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/i18n/en.js | 9 ++++
zy-acs-flow/src/page/user/UserListAside.jsx | 62 +++++++++++++++++++++++++++---
zy-acs-flow/src/i18n/zh.js | 9 ++++
3 files changed, 73 insertions(+), 7 deletions(-)
diff --git a/zy-acs-flow/src/i18n/en.js b/zy-acs-flow/src/i18n/en.js
index d7465c3..bb08e1a 100644
--- a/zy-acs-flow/src/i18n/en.js
+++ b/zy-acs-flow/src/i18n/en.js
@@ -46,6 +46,15 @@
scope: 'Assign',
},
},
+ filters: {
+ lastCreated: 'Last created',
+ today: 'Today',
+ thisWeek: 'This week',
+ lastWeek: 'Last week',
+ thisMonth: 'This month',
+ lastMonth: 'Last month',
+ earlier: 'Earlier...',
+ },
create: {
title: 'Create'
},
diff --git a/zy-acs-flow/src/i18n/zh.js b/zy-acs-flow/src/i18n/zh.js
index b42e705..429af54 100644
--- a/zy-acs-flow/src/i18n/zh.js
+++ b/zy-acs-flow/src/i18n/zh.js
@@ -46,6 +46,15 @@
scope: '鏉冮檺',
},
},
+ filters: {
+ lastCreated: '鏈�杩戝垱寤�',
+ today: '浠婂ぉ',
+ thisWeek: '鏈懆',
+ lastWeek: '涓婂懆',
+ thisMonth: '鏈湀',
+ lastMonth: '涓婃湀',
+ earlier: '鏇存棭...',
+ },
create: {
title: '娣诲姞'
},
diff --git a/zy-acs-flow/src/page/user/UserListAside.jsx b/zy-acs-flow/src/page/user/UserListAside.jsx
index 1f6dd0c..e38106a 100644
--- a/zy-acs-flow/src/page/user/UserListAside.jsx
+++ b/zy-acs-flow/src/page/user/UserListAside.jsx
@@ -11,9 +11,10 @@
import { styled } from '@mui/material/styles';
import { DEFAULT_THEME_NAME } from '@/config/setting';
import * as Common from '@/utils/common';
-import MailIcon from '@mui/icons-material/MailOutline'
+import WcIcon from '@mui/icons-material/Wc';
import BookmarkIcon from '@mui/icons-material/BookmarkBorder';
import CategoryIcon from '@mui/icons-material/LocalOffer';
+import AccessTimeIcon from '@mui/icons-material/AccessTime';
import {
endOfYesterday,
startOfWeek,
@@ -24,8 +25,7 @@
const UserListAside = (props) => {
const theme = useTheme();
- const [themeName] = useStore('themeName', DEFAULT_THEME_NAME);
- console.log()
+ console.log(endOfYesterday().toISOString())
const isSelected = (value, filters) => {
const categories = filters.categories || [];
@@ -61,12 +61,60 @@
>
<CardContent>
<SavedQueriesList icon={<BookmarkIcon />} />
-
<FilterLiveSearch source='condition' hiddenLabel />
- <FilterList label="aa" icon={<MailIcon />}>
- <FilterListItem label="Yes" value={{ status: '1' }} />
- <FilterListItem label="No" value={{ status: '0' }} />
+ <FilterList
+ label="filters.lastCreated"
+ icon={<AccessTimeIcon />}
+ >
+ <FilterListItem
+ label="filters.today"
+ value={{
+ timeStart: endOfYesterday().toISOString(),
+ timeEnd: undefined,
+ }}
+ />
+ <FilterListItem
+ label="filters.thisWeek"
+ value={{
+ timeStart: startOfWeek(new Date()).toISOString(),
+ timeEnd: undefined,
+ }}
+ />
+ <FilterListItem
+ label="filters.lastWeek"
+ value={{
+ timeStart: subWeeks(startOfWeek(new Date()), 1).toISOString(),
+ timeEnd: startOfWeek(new Date()).toISOString(),
+ }}
+ />
+ <FilterListItem
+ label="filters.thisMonth"
+ value={{
+ timeStart: startOfMonth(new Date()).toISOString(),
+ timeEnd: undefined,
+ }}
+ />
+ <FilterListItem
+ label="filters.lastMonth"
+ value={{
+ timeStart: subMonths(startOfMonth(new Date()), 1).toISOString(),
+ timeEnd: startOfMonth(new Date()).toISOString(),
+ }}
+ />
+ <FilterListItem
+ label="filters.earlier"
+ value={{
+ timeStart: undefined,
+ timeEnd: subMonths(startOfMonth(new Date()), 1).toISOString(),
+ }}
+ />
+ </FilterList>
+
+ <FilterList label="table.field.user.sex" icon={<WcIcon />}>
+ <FilterListItem label="Male" value={{ sex: '1' }} />
+ <FilterListItem label="Female" value={{ sex: '2' }} />
+ <FilterListItem label="They" value={{ sex: '0' }} />
</FilterList>
<FilterList label="Categories" icon={<CategoryIcon />}>
--
Gitblit v1.9.1