Commit 5aeef69b by Chaiwith Santaweesuk

update

parent 36029a22
......@@ -120,6 +120,7 @@ export const getFeedData = () => async (dispatch, getState) => {
// if (location == "eLNvYvm6YT8LTHrCA7Ne" || location == "fKtBvZyBArnTdlMRXOY0" || location == "yb1udKQSTGBFHKn1m5MQ" || location == "rJLbWBPZoJof30KCE07h" || location == "ZMfFDqiAJhXDqRVopTCT" || location == "hWHZMc1dbzjxDuNeIMYf" || location == "sfE95i3WDGy7W4k5pc9T" || location == "uX8Cq15AkjWgVXqWCbdf" || location == "yILqREcDQu85AD1wGyBP" || location == "1ppp1nJuBlNLOpl67dtZ" || location == "9u2ATildmRThi3eA5zMz" || location == "MIenGAtMgckindwrPE6A" || location == "vP59HiIEhvDooBSV1klc" || location == "mcE8DirvsQhUMdL09nNb" || location == "yXjV2x9uKgYa0DpQHRJ3" || location == "yXQPQvuL64vlD0TfJ3lE" || location == "ue2AxjvfFh7IxeV3iOXS" || location == "n0rIiEhHx7Hd9R3N5abU" || location == "RogL7WhBNwkwSNAlPt8X" || location == "FLDNnlycMGBW9ndP84DP" || location == "fRQvPi3NknMcT7o4LefP" || location == "WsDBpCKW0SJThukN1HvE" || location == "T9sfsC0PdX1E5qm32zxV" || location == "bts8v0Sw9nH6DrY1rDqu" || location == "1IKI77wv6ZK6ptRUR9nQ"
// ) {
if (query.results[0].tags.attr == "['Current Cash']") {
console.log(query.results[0].values)
let currentFeed = { deviceId: query.results[0].name, value: query.results[0].values }
let revenueFeed = { deviceId: query.results[0].name, value: [[query.results[0].values[0][0], 0]] }
for (let index = 1; index < query.results[0].values.length; index++) {
......@@ -130,7 +131,7 @@ export const getFeedData = () => async (dispatch, getState) => {
}
else {
revenueFeed.value[revenueFeed.value.length] = [query.results[0].values[index][0], current]
console.log("Revenue",current,before)
}
if (index == query.results[0].values.length - 1) {
let i = 0;
......@@ -158,6 +159,7 @@ export const getFeedData = () => async (dispatch, getState) => {
lengthFeedj -= 1
}
}
console.log(revenueFeed)
revenueFeedList.push(revenueFeed);
}
}
......@@ -192,7 +194,9 @@ export const getFeedData = () => async (dispatch, getState) => {
}
}
else if (query.results[0].tags.attr == "People") {
let peopleFeed = { deviceId: query.results[0].name, value: [[query.results[0].values[0][0], 0]] }
console.log(query.results[0].values)
let peopleFeed = { deviceId: query.results[0].name, value: [[query.results[0].values[0][0], query.resulldsf]] }
for (let index = 1; index < query.results[0].values.length; index++) {
const current = query.results[0].values[index][1];
const before = query.results[0].values[index - 1][1];
......@@ -201,6 +205,8 @@ export const getFeedData = () => async (dispatch, getState) => {
}
else {
peopleFeed.value[peopleFeed.value.length] = [query.results[0].values[index][0], current]
console.log("People",current,before)
}
if (index == query.results[0].values.length - 1) {
let i = 0;
......
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