Commit 1aace3c5 by littleploy

Merge branch 'feature/map_location_devices' of…

Merge branch 'feature/map_location_devices' of https://dev.nexpie.com/haouiha/toiletcoin into feature/map_location_devices
parents f1bad239 ad2bb792
asset-manifest.json,1565345231217,43bb1eb6b97f05ac75b9036a077c6cb6ee7115a2a25d7ae519062294c08d6a81
index.html,1565345231216,379a1b97a4ea129d51a0add9667f8c4c116b36a4d0cd90f4b37d87e568c7e364
precache-manifest.458fb82c1fca20cd548fb787babe66c2.js,1565345231217,5557d259821768cb86c8fb73cc8544ae20066357587a4bdca57651559b2272aa
service-worker.js,1565345231216,4289d63707eaf70ddc940aaccb1d1ed42be121699c097b641bf8245630d659cc
asset-manifest.json,1565666382029,8f2ecc6f6cefcdca2471879e4a5b5ee87534e414e20f661b62d5dec807706842
index.html,1565666382029,039edccc61c1b9d7005bf46ab38b825bad16717a44ca181e29c41ea99fe77857
precache-manifest.51efc1cc75bf6fea16a384776670a30e.js,1565666382029,8f391156b63ae31a88763663d4c394cd2e203042acab41d0cd06888303347c85
service-worker.js,1565666382029,532c274bfa1e7f85fdab8e828c5c2b20fdcba630a6704f04956bbb592e940d5f
static/css/2.6edff5b1.chunk.css,1565666382082,d22696c87c057d6462105312ce53dc1dda6a6df0d2a5152df235b068360b1ed4
static/css/2.6edff5b1.chunk.css.map,1565666382085,756daca795dac6b39811b15d55bd0d5ed0c7b27f065fb9cff5d1b23504658401
static/js/main.7a6b89a3.chunk.js,1565666382035,4184cb86846af3f5f5ec23d548198cde37a4461906140c33eb31cfa3c0d17740
static/js/runtime~main.a8a9905a.js,1565666382082,e1af5f94fdd13901b2e433d0d7607e27c01458151c35b1fe4b7feda2a32b7aa9
static/js/runtime~main.a8a9905a.js.map,1565666382082,c337bf8b58896da637a6e50ab8cfc779eb1ec42c55f8ec429030a03454a549db
manifest.json,1564985950299,851311324495b7eadd44a9e70f013e60f6ac9965a5a155cb4734894fd0e7dd5f
home.png,1564985950298,d3b21fd280b3304b29b980aab96dce3fb728c5a6c31f04c8dcf94480770e19ef
static/css/2.38695c78.chunk.css,1565345231276,df7c74b70fea8b04fd0985d5d2a2a2e7d14eb9920dbd0f99d131abbaf3fd44ce
static/css/2.38695c78.chunk.css.map,1565345231285,aee7adea8d3da5aba91a0208f66abdbbfcad0c53c36e3e69a24c51de68e4f62d
static/js/runtime~main.a8a9905a.js,1565345231219,e1af5f94fdd13901b2e433d0d7607e27c01458151c35b1fe4b7feda2a32b7aa9
static/js/runtime~main.a8a9905a.js.map,1565345231276,c337bf8b58896da637a6e50ab8cfc779eb1ec42c55f8ec429030a03454a549db
static/js/main.4402faf3.chunk.js,1565345231285,f5e3e14ccb3d24784a6b2321717e7e6bd144bb622ed633c1270ddd30644e1e0b
static/css/main.c94301d0.chunk.css,1565345231286,00fbfa1817afa31b3a27f9eab05eae40122f5440989ea818626bec07a47ecc0f
static/js/main.4402faf3.chunk.js.map,1565345231277,a2dbcbefa38891d3d67678f573fa969db976de296ff2af1112e340bf05df79bd
static/css/main.c94301d0.chunk.css.map,1565345231287,a79f7122311c1133cf74cf1d451194d507ecc6a055db9e42ecaca05c74b3f6a7
static/js/2.b700a521.chunk.js,1565345231279,f0ab74577c3b1b1742426e216085da178ca07c3fbc823d1618eeb09223875cb4
static/js/2.b700a521.chunk.js.map,1565345231284,9b4bd93b2ff15b97b8fda6612b24a01871901e1a36f1914ec356d27d45065d45
static/js/main.7a6b89a3.chunk.js.map,1565666382082,77f69fec5c39d46b62fde834d39501e3cb3a9637bdd3ec167096769e75dfa66f
static/css/main.68dd2bda.chunk.css,1565666382030,66c8800b6d2d44a2a616df8743d36668c67c33a2b5e293dd93ab9297fe6fa761
static/css/main.68dd2bda.chunk.css.map,1565666382082,26071f36cbb263d6b3157c7e86541a24b7439062252736760974986c2b63a349
static/js/2.4c2c236a.chunk.js,1565666382086,3f27fe7c38fd582032d0a045b33e358fac4c89fa6bbc8c9d916d8c637d10cef2
static/js/2.4c2c236a.chunk.js.map,1565666382085,1f3a0a2181f9df44b1380ef97ccd7d3e5e7228545113aaf27cf44bb1a862b25f
......@@ -21,8 +21,8 @@ export const SmCard = props => {
) : smdata.iconType === 'money' ? (
<FaMoneyBillAlt {...iconStyle} />
) : (
<FaUserFriends {...iconStyle} />
)}
<FaUserFriends {...iconStyle} />
)}
</Col>
<Col>
<h3 style={{ textAlign: 'right' }}>{datavalue.value}</h3>
......@@ -46,16 +46,17 @@ const DataCard = props => {
var mapValues = [];
for (let index = 0; index < allValues.length; index++) {
const timestamp = (allValues[index][0]).toString();
const key = timestamp.substring(0,8)+"00000";
if(Object.keys(mapValues).includes(key)){
const key = timestamp.substring(0, 8) + "00000";
if (Object.keys(mapValues).includes(key)) {
mapValues[key] += allValues[index][1];
}else{
} else {
mapValues[key] = allValues[index][1];
}
}
Object.keys(mapValues).sort().map(key => {
dataObj.push({ xAxis: moment(parseInt(key)).format('D/M/YY HH:mm'), yAxis: mapValues[key]})
});
let xAxis = moment(parseInt(key)).minutes(Math.round(moment(parseInt(key)).minutes() / 5)*5).format('D/M/YY HH:mm')
dataObj.push({ xAxis: xAxis, yAxis: mapValues[key] })
});
}
return (
......@@ -95,7 +96,7 @@ const DataCard = props => {
angle={-30}
textAnchor="end"
/>
<YAxis stroke="white" tick={{ fill: 'white' }} />
<YAxis stroke="white" tick={{ fill: 'white' }} />
<Area type="monotone" dataKey="yAxis" stroke="white" fill="white" />
{/* {dataKeys.map(function(key, index) {
......@@ -118,22 +119,22 @@ const DataCard = props => {
/>
</Col>
) : (
<Col
key={index}
md={6}
style={{
marginTop: '.7em',
paddingLeft: !props.isMobileSized ? (index % 2 === 0 ? '15px' : '7.5px') : '15px',
paddingRight: !props.isMobileSized ? (index % 2 !== 0 ? '15px' : '7.5px') : '15px',
}}
>
<SmCard
backgroundColor={data.backgroundColor}
smitem={item}
datavalue={props.datavalue[index]}
/>
</Col>
)
<Col
key={index}
md={6}
style={{
marginTop: '.7em',
paddingLeft: !props.isMobileSized ? (index % 2 === 0 ? '15px' : '7.5px') : '15px',
paddingRight: !props.isMobileSized ? (index % 2 !== 0 ? '15px' : '7.5px') : '15px',
}}
>
<SmCard
backgroundColor={data.backgroundColor}
smitem={item}
datavalue={props.datavalue[index]}
/>
</Col>
)
)}
</Row>
{/* <Row style={{ justifyContent: 'flex-end', marginRight: 1 }}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment