datastake-daf 0.6.768 → 0.6.769
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.js +767 -551
- package/dist/layouts/index.js +495 -459
- package/dist/pages/index.js +2808 -738
- package/dist/style/datastake/mapbox-gl.css +330 -0
- package/dist/utils/index.js +481 -457
- package/package.json +1 -1
- package/src/@daf/core/components/Charts/ColumnChart/index.jsx +10 -0
- package/src/@daf/core/components/Charts/LineChart/index.jsx +14 -0
- package/src/@daf/core/components/Dashboard/Widget/ActivityIndicators/index.jsx +2 -0
- package/src/@daf/core/components/Dashboard/Widget/StatCard/StatCard.stories.js +226 -0
- package/src/@daf/core/components/Dashboard/Widget/StatCard/index.js +103 -0
- package/src/@daf/core/components/Dashboard/Widget/StatCard/style.js +83 -0
- package/src/@daf/core/components/Icon/configs/Down.js +8 -0
- package/src/@daf/core/components/Icon/configs/Up.js +8 -0
- package/src/@daf/core/components/Icon/configs/index.js +4 -0
- package/src/@daf/core/components/Icon/configs/partnerIcon.js +1 -1
- package/src/@daf/core/components/Sidenav/Menu.jsx +4 -4
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/AssociatedInformation/index.jsx +43 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CommunityParticipation/CommunityStats/helper.js +60 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CommunityParticipation/CommunityStats/index.jsx +36 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CommunityParticipation/GenderDistribution/helper.js +117 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CommunityParticipation/GenderDistribution/index.jsx +49 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CommunityParticipation/JobsTimeline/index.jsx +212 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CommunityParticipation/index.jsx +72 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleIndicators/CyclePartners/helper.js +91 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleIndicators/CyclePartners/index.jsx +50 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleIndicators/HealthAndSafety/helper.js +134 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleIndicators/HealthAndSafety/index.jsx +49 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleIndicators/index.jsx +112 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleOutcomes/index.jsx +498 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/KeyInformation/index.jsx +49 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/PlantingLocations/index.jsx +120 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/config.js +5 -10
- package/src/@daf/pages/Summary/Activities/PlantingCycle/helper.js +218 -0
- package/src/@daf/pages/Summary/Activities/PlantingCycle/index.jsx +22 -32
- package/src/@daf/pages/Summary/Activities/Restoration/components/ActivityImagery/index.jsx +29 -0
- package/src/@daf/pages/Summary/Activities/Restoration/components/ActivityLocation/index.jsx +94 -0
- package/src/@daf/pages/Summary/Activities/Restoration/components/WorkersDistribution/index.jsx +49 -0
- package/src/@daf/pages/Summary/Activities/Restoration/index.jsx +16 -138
- package/src/index.js +1 -0
package/package.json
CHANGED
|
@@ -104,6 +104,8 @@ export default function ColumnChart({
|
|
|
104
104
|
width,
|
|
105
105
|
legendConfig = {},
|
|
106
106
|
isPdf = false,
|
|
107
|
+
yAxis: customYAxis,
|
|
108
|
+
xAxis: customXAxis,
|
|
107
109
|
...rest
|
|
108
110
|
}) {
|
|
109
111
|
const containerRef = React.useRef(null);
|
|
@@ -146,6 +148,7 @@ export default function ColumnChart({
|
|
|
146
148
|
label: {
|
|
147
149
|
formatter: formattedXAxis,
|
|
148
150
|
},
|
|
151
|
+
...(customXAxis || {}),
|
|
149
152
|
},
|
|
150
153
|
yAxis: {
|
|
151
154
|
...(isPercentage
|
|
@@ -163,7 +166,12 @@ export default function ColumnChart({
|
|
|
163
166
|
(s) => `${s},`
|
|
164
167
|
) + " %"
|
|
165
168
|
: formattedYAxis,
|
|
169
|
+
...(customYAxis?.label || {}),
|
|
166
170
|
},
|
|
171
|
+
// Merge customYAxis properties (excluding label which is already merged above)
|
|
172
|
+
...(customYAxis ? Object.fromEntries(
|
|
173
|
+
Object.entries(customYAxis).filter(([key]) => key !== 'label')
|
|
174
|
+
) : {}),
|
|
167
175
|
},
|
|
168
176
|
legend: false,
|
|
169
177
|
...(showBackground && isPercentage && {
|
|
@@ -196,6 +204,8 @@ export default function ColumnChart({
|
|
|
196
204
|
color,
|
|
197
205
|
token.colorPrimary9,
|
|
198
206
|
groupField,
|
|
207
|
+
customYAxis,
|
|
208
|
+
customXAxis,
|
|
199
209
|
]);
|
|
200
210
|
|
|
201
211
|
React.useEffect(() => {
|
|
@@ -88,6 +88,8 @@ export default function LineChart({
|
|
|
88
88
|
isPdf = false,
|
|
89
89
|
legendConfig = {},
|
|
90
90
|
width,
|
|
91
|
+
yAxis: customYAxis,
|
|
92
|
+
xAxis: customXAxis,
|
|
91
93
|
...rest
|
|
92
94
|
}) {
|
|
93
95
|
const containerRef = React.useRef(null);
|
|
@@ -129,7 +131,12 @@ export default function LineChart({
|
|
|
129
131
|
style: {
|
|
130
132
|
fontSize: !autoHideXLabel ? 10 : undefined,
|
|
131
133
|
},
|
|
134
|
+
...(customXAxis?.label || {}),
|
|
132
135
|
},
|
|
136
|
+
// Merge customXAxis properties (excluding label which is already merged above)
|
|
137
|
+
...(customXAxis ? Object.fromEntries(
|
|
138
|
+
Object.entries(customXAxis).filter(([key]) => key !== 'label')
|
|
139
|
+
) : {}),
|
|
133
140
|
},
|
|
134
141
|
yAxis: {
|
|
135
142
|
...(isPercentage
|
|
@@ -143,7 +150,12 @@ export default function LineChart({
|
|
|
143
150
|
formatter: isPercentage
|
|
144
151
|
? (v) => `${v}`.replace(/\d{1,3}(?=(\d{3})+$)/g, (s) => `${s},`) + " %"
|
|
145
152
|
: formattedYAxis,
|
|
153
|
+
...(customYAxis?.label || {}),
|
|
146
154
|
},
|
|
155
|
+
// Merge customYAxis properties (excluding label which is already merged above)
|
|
156
|
+
...(customYAxis ? Object.fromEntries(
|
|
157
|
+
Object.entries(customYAxis).filter(([key]) => key !== 'label')
|
|
158
|
+
) : {}),
|
|
147
159
|
},
|
|
148
160
|
smooth: isSmooth,
|
|
149
161
|
meta: {
|
|
@@ -183,6 +195,8 @@ export default function LineChart({
|
|
|
183
195
|
tooltipConfig,
|
|
184
196
|
isPdf,
|
|
185
197
|
t,
|
|
198
|
+
customYAxis,
|
|
199
|
+
customXAxis,
|
|
186
200
|
]);
|
|
187
201
|
|
|
188
202
|
React.useEffect(() => {
|
|
@@ -48,6 +48,7 @@ export default function ActivityIndicatorsWidget({
|
|
|
48
48
|
}, [config, filterMode]);
|
|
49
49
|
|
|
50
50
|
const component = (
|
|
51
|
+
<section>
|
|
51
52
|
<Widget
|
|
52
53
|
loading={loading}
|
|
53
54
|
className={formatClassname(["flex-1 with-border-header h-w-btn-header no-p-body", widgetClassName])}
|
|
@@ -81,6 +82,7 @@ export default function ActivityIndicatorsWidget({
|
|
|
81
82
|
))}
|
|
82
83
|
</Style>
|
|
83
84
|
</Widget>
|
|
85
|
+
</section>
|
|
84
86
|
);
|
|
85
87
|
|
|
86
88
|
if (noMinWidth) {
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import ThemeLayout from "../../../ThemeLayout";
|
|
2
|
+
import StatCard from "./index";
|
|
3
|
+
import Widget from "../index.jsx";
|
|
4
|
+
import DashboardLayout from "../../DashboardLayout/index.jsx";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: "Dashboard/Widgets/StatCard",
|
|
8
|
+
component: StatCard,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
decorators: [
|
|
11
|
+
(Story) => (
|
|
12
|
+
<ThemeLayout>
|
|
13
|
+
<Story />
|
|
14
|
+
</ThemeLayout>
|
|
15
|
+
),
|
|
16
|
+
],
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const Primary = {
|
|
20
|
+
name: "StatCard - With All Props",
|
|
21
|
+
args: {
|
|
22
|
+
title: "Activity Participants",
|
|
23
|
+
value: "325",
|
|
24
|
+
icon: "Users",
|
|
25
|
+
change: {
|
|
26
|
+
value: 20,
|
|
27
|
+
direction: "up",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const WithPositiveChange = {
|
|
33
|
+
name: "With Positive Change",
|
|
34
|
+
args: {
|
|
35
|
+
title: "Activity Participants",
|
|
36
|
+
value: "325",
|
|
37
|
+
icon: "Users",
|
|
38
|
+
change: {
|
|
39
|
+
value: 20,
|
|
40
|
+
direction: "up",
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const WithNegativeChange = {
|
|
46
|
+
name: "With Negative Change",
|
|
47
|
+
args: {
|
|
48
|
+
title: "Total Revenue",
|
|
49
|
+
value: "$12,450",
|
|
50
|
+
icon: "Package",
|
|
51
|
+
change: {
|
|
52
|
+
value: 15,
|
|
53
|
+
direction: "down",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const WithoutChange = {
|
|
59
|
+
name: "Without Change Indicator",
|
|
60
|
+
args: {
|
|
61
|
+
title: "Total Projects",
|
|
62
|
+
value: "48",
|
|
63
|
+
icon: "Lock",
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const WithoutIcon = {
|
|
68
|
+
name: "Without Icon",
|
|
69
|
+
args: {
|
|
70
|
+
title: "Active Users",
|
|
71
|
+
value: "1,234",
|
|
72
|
+
change: {
|
|
73
|
+
value: 12,
|
|
74
|
+
direction: "up",
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const CustomChangeColors = {
|
|
80
|
+
name: "Custom Change Colors",
|
|
81
|
+
args: {
|
|
82
|
+
title: "Custom Metric",
|
|
83
|
+
value: "999",
|
|
84
|
+
icon: "Package",
|
|
85
|
+
change: {
|
|
86
|
+
value: 5,
|
|
87
|
+
direction: "up",
|
|
88
|
+
color: "#E0F2FE",
|
|
89
|
+
borderColor: "#7DD3FC",
|
|
90
|
+
textColor: "#0369A1",
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export const MultipleCards = {
|
|
96
|
+
name: "Multiple Stat Cards",
|
|
97
|
+
render: () => (
|
|
98
|
+
<div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(250px, 1fr))", gap: "16px" }}>
|
|
99
|
+
<StatCard
|
|
100
|
+
title="Activity Participants"
|
|
101
|
+
value="325"
|
|
102
|
+
icon="Users"
|
|
103
|
+
change={{
|
|
104
|
+
value: 20,
|
|
105
|
+
direction: "up",
|
|
106
|
+
}}
|
|
107
|
+
/>
|
|
108
|
+
<StatCard
|
|
109
|
+
title="Total Revenue"
|
|
110
|
+
value="$12,450"
|
|
111
|
+
icon="Package"
|
|
112
|
+
change={{
|
|
113
|
+
value: 15,
|
|
114
|
+
direction: "down",
|
|
115
|
+
}}
|
|
116
|
+
/>
|
|
117
|
+
<StatCard
|
|
118
|
+
title="Total Projects"
|
|
119
|
+
value="48"
|
|
120
|
+
icon="Lock"
|
|
121
|
+
/>
|
|
122
|
+
<StatCard
|
|
123
|
+
title="Active Users"
|
|
124
|
+
value="1,234"
|
|
125
|
+
icon="User"
|
|
126
|
+
change={{
|
|
127
|
+
value: 8,
|
|
128
|
+
direction: "up",
|
|
129
|
+
}}
|
|
130
|
+
/>
|
|
131
|
+
</div>
|
|
132
|
+
),
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export const InWidget = {
|
|
136
|
+
name: "Inside Widget",
|
|
137
|
+
render: () => (
|
|
138
|
+
<Widget title="Key Statistics" className="with-border-header">
|
|
139
|
+
<div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(250px, 1fr))", gap: "16px" }}>
|
|
140
|
+
<StatCard
|
|
141
|
+
title="Activity Participants"
|
|
142
|
+
value="325"
|
|
143
|
+
icon="Users"
|
|
144
|
+
change={{
|
|
145
|
+
value: 20,
|
|
146
|
+
direction: "up",
|
|
147
|
+
}}
|
|
148
|
+
/>
|
|
149
|
+
<StatCard
|
|
150
|
+
title="Total Revenue"
|
|
151
|
+
value="$12,450"
|
|
152
|
+
icon="Package"
|
|
153
|
+
change={{
|
|
154
|
+
value: 15,
|
|
155
|
+
direction: "down",
|
|
156
|
+
}}
|
|
157
|
+
/>
|
|
158
|
+
<StatCard
|
|
159
|
+
title="Total Projects"
|
|
160
|
+
value="48"
|
|
161
|
+
icon="Lock"
|
|
162
|
+
/>
|
|
163
|
+
</div>
|
|
164
|
+
</Widget>
|
|
165
|
+
),
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export const InDashboard = {
|
|
169
|
+
name: "In Dashboard Layout",
|
|
170
|
+
render: () => (
|
|
171
|
+
<DashboardLayout>
|
|
172
|
+
<section>
|
|
173
|
+
<Widget>
|
|
174
|
+
<div
|
|
175
|
+
style={{
|
|
176
|
+
height: "500px",
|
|
177
|
+
backgroundColor: "#f0f0f0",
|
|
178
|
+
display: "flex",
|
|
179
|
+
alignItems: "center",
|
|
180
|
+
justifyContent: "center",
|
|
181
|
+
}}
|
|
182
|
+
>
|
|
183
|
+
Placeholder
|
|
184
|
+
</div>
|
|
185
|
+
</Widget>
|
|
186
|
+
<Widget title="Statistics Overview" className="with-border-header">
|
|
187
|
+
<div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(250px, 1fr))", gap: "16px" }}>
|
|
188
|
+
<StatCard
|
|
189
|
+
title="Activity Participants"
|
|
190
|
+
value="325"
|
|
191
|
+
icon="Users"
|
|
192
|
+
change={{
|
|
193
|
+
value: 20,
|
|
194
|
+
direction: "up",
|
|
195
|
+
}}
|
|
196
|
+
/>
|
|
197
|
+
<StatCard
|
|
198
|
+
title="Total Revenue"
|
|
199
|
+
value="$12,450"
|
|
200
|
+
icon="Package"
|
|
201
|
+
change={{
|
|
202
|
+
value: 15,
|
|
203
|
+
direction: "down",
|
|
204
|
+
}}
|
|
205
|
+
/>
|
|
206
|
+
<StatCard
|
|
207
|
+
title="Total Projects"
|
|
208
|
+
value="48"
|
|
209
|
+
icon="Lock"
|
|
210
|
+
/>
|
|
211
|
+
<StatCard
|
|
212
|
+
title="Active Users"
|
|
213
|
+
value="1,234"
|
|
214
|
+
icon="User"
|
|
215
|
+
change={{
|
|
216
|
+
value: 8,
|
|
217
|
+
direction: "up",
|
|
218
|
+
}}
|
|
219
|
+
/>
|
|
220
|
+
</div>
|
|
221
|
+
</Widget>
|
|
222
|
+
</section>
|
|
223
|
+
</DashboardLayout>
|
|
224
|
+
),
|
|
225
|
+
};
|
|
226
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tooltip } from 'antd';
|
|
3
|
+
import CustomIcon from '../../../Icon/CustomIcon.jsx';
|
|
4
|
+
import Style from './style.js';
|
|
5
|
+
|
|
6
|
+
const StatCard = ({
|
|
7
|
+
title,
|
|
8
|
+
value,
|
|
9
|
+
icon,
|
|
10
|
+
iconTooltip,
|
|
11
|
+
change = null, // Object with { value, direction?, color?, borderColor?, textColor? }
|
|
12
|
+
}) => {
|
|
13
|
+
// Default colors for positive change (green)
|
|
14
|
+
const getChangeColors = () => {
|
|
15
|
+
if (!change) return {};
|
|
16
|
+
|
|
17
|
+
const isPositive = change.direction !== 'down';
|
|
18
|
+
const defaultPositive = {
|
|
19
|
+
backgroundColor: '#ECFDF3',
|
|
20
|
+
borderColor: '#A7F3D0',
|
|
21
|
+
textColor: '#52C41A',
|
|
22
|
+
};
|
|
23
|
+
const defaultNegative = {
|
|
24
|
+
backgroundColor: '#FEF3F2',
|
|
25
|
+
borderColor: '#FECACA',
|
|
26
|
+
textColor: '#D92D20',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const defaults = isPositive ? defaultPositive : defaultNegative;
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
changeColor: change.color || defaults.backgroundColor,
|
|
33
|
+
changeBorderColor: change.borderColor || defaults.borderColor,
|
|
34
|
+
changeTextColor: change.textColor || defaults.textColor,
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const changeColors = getChangeColors();
|
|
39
|
+
const isPositive = change?.direction !== 'down';
|
|
40
|
+
|
|
41
|
+
// Check if change value is 0 (handle both number and string formats like "0", "0%", "0.0%")
|
|
42
|
+
const isChangeZero = () => {
|
|
43
|
+
if (!change || !change.value) return true;
|
|
44
|
+
const valueStr = String(change.value).replace(/[%,]/g, '').trim();
|
|
45
|
+
const numValue = parseFloat(valueStr);
|
|
46
|
+
return isNaN(numValue) || numValue === 0;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const shouldShowChange = change && !isChangeZero();
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<Style {...changeColors}>
|
|
53
|
+
<div className="stat-card-header">
|
|
54
|
+
<h3 className="stat-card-title">{title}</h3>
|
|
55
|
+
{icon && (
|
|
56
|
+
<div className="stat-card-icon">
|
|
57
|
+
<CustomIcon name={icon} width={24} height={24} />
|
|
58
|
+
</div>
|
|
59
|
+
)}
|
|
60
|
+
</div>
|
|
61
|
+
<div className="stat-card-content">
|
|
62
|
+
<h2 className="stat-card-value">{value}</h2>
|
|
63
|
+
{shouldShowChange && (
|
|
64
|
+
<Tooltip
|
|
65
|
+
title={
|
|
66
|
+
change.tooltipText ||
|
|
67
|
+
(isPositive
|
|
68
|
+
? `Increased by ${change.value}`
|
|
69
|
+
: `Decreased by ${change.value}`)
|
|
70
|
+
}
|
|
71
|
+
>
|
|
72
|
+
<div className="stat-card-change">
|
|
73
|
+
<div className="change-icon">
|
|
74
|
+
{isPositive ? (
|
|
75
|
+
<>
|
|
76
|
+
<CustomIcon
|
|
77
|
+
name="Up"
|
|
78
|
+
width={10}
|
|
79
|
+
height={10}
|
|
80
|
+
color={changeColors.changeTextColor}
|
|
81
|
+
/>
|
|
82
|
+
</>
|
|
83
|
+
) : (
|
|
84
|
+
<>
|
|
85
|
+
<CustomIcon
|
|
86
|
+
name="Down"
|
|
87
|
+
width={10}
|
|
88
|
+
height={10}
|
|
89
|
+
color={changeColors.changeTextColor}
|
|
90
|
+
/>
|
|
91
|
+
</>
|
|
92
|
+
)}
|
|
93
|
+
</div>
|
|
94
|
+
<span className="change-value">{change.value}</span>
|
|
95
|
+
</div>
|
|
96
|
+
</Tooltip>
|
|
97
|
+
)}
|
|
98
|
+
</div>
|
|
99
|
+
</Style>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export default StatCard;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const Style = styled.div`
|
|
4
|
+
background: #ffffff;
|
|
5
|
+
border-radius: 8px;
|
|
6
|
+
border: 1px solid #E5E7EB;
|
|
7
|
+
padding: var(--size-lg);
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
position: relative;
|
|
11
|
+
height: 100%;
|
|
12
|
+
min-height: 120px;
|
|
13
|
+
width: 100%;
|
|
14
|
+
min-width: 300px;
|
|
15
|
+
|
|
16
|
+
.stat-card-header {
|
|
17
|
+
display: flex;
|
|
18
|
+
justify-content: space-between;
|
|
19
|
+
align-items: flex-start;
|
|
20
|
+
margin-bottom: auto;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.stat-card-title {
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
color: #6C737F;
|
|
27
|
+
line-height: 100%;
|
|
28
|
+
letter-spacing: 0%;
|
|
29
|
+
margin: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.stat-card-icon {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
color: #6C737F;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.stat-card-content {
|
|
40
|
+
display: flex;
|
|
41
|
+
justify-content: space-between;
|
|
42
|
+
align-items: flex-end;
|
|
43
|
+
margin-top: auto;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.stat-card-value {
|
|
47
|
+
font-size: 32px;
|
|
48
|
+
font-weight: 600;
|
|
49
|
+
color: #384250;
|
|
50
|
+
margin: 0;
|
|
51
|
+
line-height: 1.2;
|
|
52
|
+
letter-spacing: 0%;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.stat-card-change {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: 4px;
|
|
59
|
+
padding: 1px 8px;
|
|
60
|
+
border-radius: 4px;
|
|
61
|
+
border: 1px solid ${props => props.changeBorderColor || '#A7F3D0'};
|
|
62
|
+
background-color: ${props => props.changeColor || '#ECFDF3'};
|
|
63
|
+
|
|
64
|
+
.change-icon {
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
gap: 2px;
|
|
68
|
+
color: ${props => props.changeTextColor || '#52C41A'};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.change-value {
|
|
72
|
+
font-size: 12px;
|
|
73
|
+
font-weight: 500;
|
|
74
|
+
line-height: 18px;
|
|
75
|
+
letter-spacing: 0%;
|
|
76
|
+
color: ${props => props.changeTextColor || '#52C41A'};
|
|
77
|
+
margin: 0;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
81
|
+
|
|
82
|
+
export default Style;
|
|
83
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const config = {
|
|
2
|
+
viewBox: '0 0 11 10',
|
|
3
|
+
children: (
|
|
4
|
+
<path d="M7.75 0.75V6.25M7.75 6.25L5.75 4.25M7.75 6.25L9.75 4.25M2.75 0.75V8.75M2.75 8.75L0.75 6.75M2.75 8.75L4.75 6.75" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
|
|
5
|
+
),
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default config;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const config = {
|
|
2
|
+
viewBox: '0 0 11 10',
|
|
3
|
+
children: (
|
|
4
|
+
<path d="M2.75 8.75V0.75M2.75 0.75L0.75 2.75M2.75 0.75L4.75 2.75M7.75 8.75V3.25M7.75 3.25L5.75 5.25M7.75 3.25L9.75 5.25" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
|
|
5
|
+
),
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default config;
|
|
@@ -226,6 +226,8 @@ import ClockPlus from "./ClockPlus";
|
|
|
226
226
|
import WaziDarkIcon from "./WaziDarkIcon";
|
|
227
227
|
import SpacingHeight from "./SpacingHeight";
|
|
228
228
|
import SpacingWidth from "./SpacingWidth";
|
|
229
|
+
import Up from "./Up";
|
|
230
|
+
import Down from "./Down";
|
|
229
231
|
|
|
230
232
|
const config = {
|
|
231
233
|
AppAdmin,
|
|
@@ -456,6 +458,8 @@ const config = {
|
|
|
456
458
|
WaziDarkIcon,
|
|
457
459
|
SpacingHeight,
|
|
458
460
|
SpacingWidth,
|
|
461
|
+
Up,
|
|
462
|
+
Down,
|
|
459
463
|
};
|
|
460
464
|
|
|
461
465
|
export default config;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const config = {
|
|
2
2
|
viewBox: "0 0 18 14",
|
|
3
3
|
children: (
|
|
4
|
-
<path d="M5.08333 2.53462H0.75V8.75H1.50141C2.09639 8.75 2.67622 8.93763 3.15841 9.2862L7.44192 12.3827C7.74723 12.6034 8.15773 12.6105 8.47051 12.4006C8.95317 12.0765 9.00645 11.3867 8.5793 10.9924L6.81667 9.36538L9.68494 11.9601C9.95925 12.2082 10.366 12.2412 10.6767 12.0404C11.0996 11.7672 11.1772 11.1801 10.8398 10.8064L9.15 8.93462L11.4946 11.4923C11.828 11.8561 12.3838 11.9055 12.7762 11.6063C13.2258 11.2635 13.2802 10.607 12.8932 10.1948L11.0167 8.19615L13.3903 10.686C13.711 11.0223 14.2308 11.0702 14.6075 10.7981C15.0685 10.4651 15.1251 9.79991 14.727 9.39379L14.2167 8.87308M16.75 8.57952V2.79983M16.75 8.57952C16.75 8.57952 16.75 5.25112 16.75 2.79983M16.75 8.57952C16.75 8.72136 16.662 8.85066 16.5235 8.91219L15.2216 9.49081C15.0608 9.56228 14.8682 9.52676 14.7494 9.40375L8.66241 3.09692C8.52364 2.95315 8.28848 2.93195 8.1222 3.04823L7.31667 3.61154C6.63455 4.08854 5.73081 4.19895 4.93775 3.90217L4.14065 3.60388C3.96864 3.53951 3.93837 3.32657 4.08656 3.22341L6.64053 1.44562C7.4038 0.914316 8.33376 0.75 9.28973 0.75H9.89529C10.373 0.75 10.8476 0.821816 11.3003 0.962629L16.4777 2.44993C16.6404 2.50054 16.75 2.64134 16.75 2.79983" stroke="
|
|
4
|
+
<path d="M5.08333 2.53462H0.75V8.75H1.50141C2.09639 8.75 2.67622 8.93763 3.15841 9.2862L7.44192 12.3827C7.74723 12.6034 8.15773 12.6105 8.47051 12.4006C8.95317 12.0765 9.00645 11.3867 8.5793 10.9924L6.81667 9.36538L9.68494 11.9601C9.95925 12.2082 10.366 12.2412 10.6767 12.0404C11.0996 11.7672 11.1772 11.1801 10.8398 10.8064L9.15 8.93462L11.4946 11.4923C11.828 11.8561 12.3838 11.9055 12.7762 11.6063C13.2258 11.2635 13.2802 10.607 12.8932 10.1948L11.0167 8.19615L13.3903 10.686C13.711 11.0223 14.2308 11.0702 14.6075 10.7981C15.0685 10.4651 15.1251 9.79991 14.727 9.39379L14.2167 8.87308M16.75 8.57952V2.79983M16.75 8.57952C16.75 8.57952 16.75 5.25112 16.75 2.79983M16.75 8.57952C16.75 8.72136 16.662 8.85066 16.5235 8.91219L15.2216 9.49081C15.0608 9.56228 14.8682 9.52676 14.7494 9.40375L8.66241 3.09692C8.52364 2.95315 8.28848 2.93195 8.1222 3.04823L7.31667 3.61154C6.63455 4.08854 5.73081 4.19895 4.93775 3.90217L4.14065 3.60388C3.96864 3.53951 3.93837 3.32657 4.08656 3.22341L6.64053 1.44562C7.4038 0.914316 8.33376 0.75 9.28973 0.75H9.89529C10.373 0.75 10.8476 0.821816 11.3003 0.962629L16.4777 2.44993C16.6404 2.50054 16.75 2.64134 16.75 2.79983" stroke="currentColor" strokeWidth="1.5" strokeLinejoin="round"/>
|
|
5
5
|
),
|
|
6
6
|
};
|
|
7
7
|
|
|
@@ -468,9 +468,9 @@ export default function SidenavMenu({
|
|
|
468
468
|
className={formatClassname([
|
|
469
469
|
typeof selectedKeys[0] === "string"
|
|
470
470
|
? !!(
|
|
471
|
-
selectedKeys[0]
|
|
471
|
+
matchPath({ path: subitem.path, exact: true }, selectedKeys[0]) ||
|
|
472
472
|
(subitem.subPath || []).find((p) =>
|
|
473
|
-
matchPath(p, selectedKeys[0])
|
|
473
|
+
matchPath({ path: p, exact: true }, selectedKeys[0])
|
|
474
474
|
)
|
|
475
475
|
) && "selected-label"
|
|
476
476
|
: "",
|
|
@@ -494,9 +494,9 @@ export default function SidenavMenu({
|
|
|
494
494
|
className: formatClassname([
|
|
495
495
|
typeof selectedKeys[0] === "string"
|
|
496
496
|
? !!(
|
|
497
|
-
selectedKeys[0]
|
|
497
|
+
matchPath({ path: subitem.path, exact: true }, selectedKeys[0]) ||
|
|
498
498
|
(subitem.subPath || []).find((p) =>
|
|
499
|
-
matchPath(p, selectedKeys[0])
|
|
499
|
+
matchPath({ path: p, exact: true }, selectedKeys[0])
|
|
500
500
|
)
|
|
501
501
|
) && "selected-it"
|
|
502
502
|
: "",
|
package/src/@daf/pages/Summary/Activities/PlantingCycle/components/AssociatedInformation/index.jsx
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Widget } from '../../../../../../../../src/index.js';
|
|
3
|
+
|
|
4
|
+
const ACTIVITIES_TAB = 'activities';
|
|
5
|
+
const PARTNERS_TAB = 'partners';
|
|
6
|
+
const INCIDENTS_TAB = 'incidents';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const AssociatedInformation = ({
|
|
10
|
+
activityData,
|
|
11
|
+
loading = false,
|
|
12
|
+
t = (s) => s
|
|
13
|
+
}) => {
|
|
14
|
+
const [activeTab, setActiveTab] = useState(ACTIVITIES_TAB);
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<section>
|
|
18
|
+
|
|
19
|
+
<Widget
|
|
20
|
+
className="v2-widget no-px h-w-btn-header no-p-body"
|
|
21
|
+
title={t("Associated Information")}
|
|
22
|
+
tabsConfig={{
|
|
23
|
+
tabs: [
|
|
24
|
+
{ label: t("straatos::activities"), value: ACTIVITIES_TAB },
|
|
25
|
+
{ label: t("straatos::partners"), value: PARTNERS_TAB },
|
|
26
|
+
{ label: t("straatos::incidents"), value: INCIDENTS_TAB },
|
|
27
|
+
],
|
|
28
|
+
value: activeTab,
|
|
29
|
+
onChange: (value) => {
|
|
30
|
+
setActiveTab(value);
|
|
31
|
+
// setData([]);
|
|
32
|
+
},
|
|
33
|
+
}}
|
|
34
|
+
>
|
|
35
|
+
<div>
|
|
36
|
+
</div>
|
|
37
|
+
</Widget>
|
|
38
|
+
</section>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default AssociatedInformation;
|
|
43
|
+
|