From c396e4cf45e7601e5facf971ca85e5e491b779c5 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期二, 18 三月 2025 14:11:28 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/page/mission/MissionColumn.jsx | 36 ++++++++++++++++--------------------
1 files changed, 16 insertions(+), 20 deletions(-)
diff --git a/zy-acs-flow/src/page/mission/MissionColumn.jsx b/zy-acs-flow/src/page/mission/MissionColumn.jsx
index bdb5aad..f2b6981 100644
--- a/zy-acs-flow/src/page/mission/MissionColumn.jsx
+++ b/zy-acs-flow/src/page/mission/MissionColumn.jsx
@@ -1,22 +1,22 @@
import { Droppable } from '@hello-pangea/dnd';
import { Box, Stack, Typography } from '@mui/material';
+import {
+ useTranslate,
+ useTheme,
+} from 'react-admin';
+import { MissionCard } from './MissionCard';
-import { Deal } from '../types';
-import { DealCard } from './MissionCard';
-import { useConfigurationContext } from '../root/ConfigurationContext';
-import { findDealLabel } from './deal';
+export const MissionColumn = ({ stage, missions, }) => {
+ const theme = useTheme();
+ const translate = useTranslate();
-export const MissionColumn = ({ stage, deals, }) => {
- const totalAmount = deals.reduce((sum, deal) => sum + deal.amount, 0);
-
- const { dealStages } = useConfigurationContext();
return (
<Box
sx={{
flex: 1,
paddingTop: '8px',
paddingBottom: '16px',
- bgcolor: '#eaeaee',
+ bgcolor: theme[0] === 'dark' ? '#303030' : '#eaeaee',
'&:first-of-type': {
paddingLeft: '5px',
borderTopLeftRadius: 5,
@@ -28,21 +28,17 @@
}}
>
<Stack alignItems="center">
- <Typography variant="subtitle1">
- {findDealLabel(dealStages, stage)}
+ <Typography variant="body1" sx={{
+ // fontWeight: 'bold'
+ }}>
+ {translate(`page.mission.enums.posType.${stage}`)}
</Typography>
<Typography
variant="subtitle1"
color="text.secondary"
fontSize="small"
>
- {totalAmount.toLocaleString('en-US', {
- notation: 'compact',
- style: 'currency',
- currency: 'USD',
- currencyDisplay: 'narrowSymbol',
- minimumSignificantDigits: 3,
- })}
+ {missions.length}
</Typography>
</Stack>
<Droppable droppableId={stage}>
@@ -63,8 +59,8 @@
},
}}
>
- {deals.map((deal, index) => (
- <DealCard key={deal.id} deal={deal} index={index} />
+ {missions.map((mission, idx) => (
+ <MissionCard key={mission.id} mission={mission} index={idx} />
))}
{droppableProvided.placeholder}
</Box>
--
Gitblit v1.9.1