@@ -4,6 +4,105 @@ import { useSelector } from 'react-redux';
44import { v4 as uuidv4 } from 'uuid' ;
55import WeeklyProjectSummaryHeader from './WeeklyProjectSummaryHeader' ;
66
7+ const projectStatusButtons = [
8+ {
9+ title : 'Total Projects' ,
10+ value : 426 ,
11+ change : '+16% week over week' ,
12+ bgColor : '#F0FFEE' ,
13+ buttonColor : '#BAF0B6' ,
14+ textColor : '#328D1B' ,
15+ } ,
16+ {
17+ title : 'Completed Projects' ,
18+ value : 127 ,
19+ change : '+14% week over week' ,
20+ bgColor : '#F3FCFF' ,
21+ buttonColor : '#C1EFFB' ,
22+ textColor : '#328D1B' ,
23+ } ,
24+ {
25+ title : 'Delayed Projects' ,
26+ value : 34 ,
27+ change : '-18% week over week' ,
28+ bgColor : '#FFE9FA' ,
29+ buttonColor : '#FECFF3' ,
30+ textColor : '#C82F2F' ,
31+ } ,
32+ {
33+ title : 'Active Projects' ,
34+ value : 265 ,
35+ change : '+3% week over week' ,
36+ bgColor : '#E8E8FF' ,
37+ buttonColor : '#CBCBFE' ,
38+ textColor : '#328D1B' ,
39+ } ,
40+ {
41+ title : 'Avg Project Duration' ,
42+ value : '17 hrs' ,
43+ change : '+13% week over week' ,
44+ bgColor : '#FFF6EE' ,
45+ buttonColor : '#FFD8A5' ,
46+ textColor : '#FFD8A5' ,
47+ } ,
48+ {
49+ title : 'Total Material Cost' ,
50+ value : '$27.6K' ,
51+ change : '+9% week over week' ,
52+ bgColor : '#FFF3F3' ,
53+ buttonColor : '#FBC1C2' ,
54+ textColor : '#328D1B' ,
55+ } ,
56+ {
57+ title : 'Total Material Used' ,
58+ value : '2714' ,
59+ change : '+11% week over week' ,
60+ bgColor : '#DAC8FF' ,
61+ buttonColor : '#B28ECC' ,
62+ textColor : '#328D1B' ,
63+ } ,
64+ {
65+ title : 'Active Projects' ,
66+ value : '265' ,
67+ change : '+3% week over week' ,
68+ bgColor : '#E8E8FF' ,
69+ buttonColor : '#CBCBFE' ,
70+ textColor : '#328D1B' ,
71+ } ,
72+ {
73+ title : 'Total Labor Hours Invested' ,
74+ value : '12.8K' ,
75+ change : '+17% week over week' ,
76+ bgColor : '#E5C1FC' ,
77+ buttonColor : '#F6E1FB' ,
78+ textColor : '#328D1B' ,
79+ } ,
80+ {
81+ title : 'Total Labor Cost' ,
82+ value : '$18.4K' ,
83+ change : '+14% week over week' ,
84+ bgColor : '#FFFDF3' ,
85+ buttonColor : '#FBF9C1' ,
86+ textColor : '#328D1B' ,
87+ } ,
88+ {
89+ title : 'Material Available' ,
90+ value : 693 ,
91+ change : '-8% week over week' ,
92+ bgColor : '#B4D9C5' ,
93+ buttonColor : '#31BD41' ,
94+ textColor : '#C82F2F' ,
95+ } ,
96+ {
97+ title : 'Material Wasted' ,
98+ value : 879 ,
99+ change : '+14% week over week' ,
100+ bgColor : '#EFBABB' ,
101+ buttonColor : '#F79395' ,
102+ textColor : '#328D1B' ,
103+ } ,
104+ ] ;
105+
7106export default function WeeklyProjectSummary ( ) {
8107 const [ openSections , setOpenSections ] = useState ( { } ) ;
9108
@@ -23,11 +122,27 @@ export default function WeeklyProjectSummary() {
23122 className : 'full' ,
24123 content : (
25124 < div className = "project-status-grid" >
26- { Array . from ( { length : 12 } ) . map ( ( ) => {
125+ { projectStatusButtons . map ( button => {
27126 const uniqueId = uuidv4 ( ) ;
28127 return (
29- < div key = { uniqueId } className = "weekly-project-summary-card small-card" >
30- 📊 Card
128+ < div
129+ key = { uniqueId }
130+ className = "weekly-project-summary-card status-card"
131+ style = { { backgroundColor : button . bgColor } } // Dynamic Background
132+ >
133+ < div className = "weekly-card-title" > { button . title } </ div >
134+ < div
135+ className = "weekly-status-button"
136+ style = { { backgroundColor : button . buttonColor } } // Dynamic Oval Color
137+ >
138+ < span className = "weekly-status-value" > { button . value } </ span >
139+ </ div >
140+ < div
141+ className = "weekly-status-change"
142+ style = { { color : button . textColor } } // Dynamic Change Color
143+ >
144+ { button . change }
145+ </ div >
31146 </ div >
32147 ) ;
33148 } ) }
0 commit comments