From e258e6added453210b7bbaa7122b54a5188c5dcf Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Fri, 2 Jun 2023 22:29:08 +0530 Subject: [PATCH] Basic economic system --- .gitignore | 3 ++- index.html | 21 +++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index fcbd6ef..3077754 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -Untitled-1.sh \ No newline at end of file +Untitled-1.sh +.vscode/settings.json \ No newline at end of file diff --git a/index.html b/index.html index 7bfef49..3d2d2a3 100644 --- a/index.html +++ b/index.html @@ -272,8 +272,8 @@
-

Dashboard

-

Details of overall tokens issued

+

Tokenroom Economic system

+

Details of various parts of Tokenroom's Economic system

Production valuation

@@ -514,30 +514,31 @@ floDapps.launchStartUp().then((result) => { console.log(result); - window.location.hash = '#userinfo'; - getRef('user_flo_id').value = myFloID - getRef('user_login_popup_button').classList.add('hide') - getRef('userpage-userfloid').innerText = myFloID - getRef('user_signout_popup_button').classList.remove('hide') + //window.location.hash = '#userinfo'; + // getRef('user_flo_id').value = myFloID + // getRef('user_login_popup_button').classList.add('hide') + // getRef('userpage-userfloid').innerText = myFloID + // getRef('user_signout_popup_button').classList.remove('hide') // Check if subadmin if (floGlobals.subAdmins.includes(myFloID)) { console.log('This is a subadmin') document.getElementById('subadmin-nav').classList.remove('hide') } - // Show userinfo - document.getElementById('userinfo-nav').classList.remove('hide') - document.getElementById('userinfo-nav').click() + //document.getElementById('userinfo-nav').classList.remove('hide') + //document.getElementById('userinfo-nav').click() //App functions.... + console.log('before fetch') fetch('https://esapi-tokenroom.ranchimall.net/api/economicSystem/data',{ headers: { 'Access-Control-Allow-Origin': '*' }}) .then(response => response.json()) .then(data => { + console.log('after fetch') p1 = updateIdElement("total-amount-issued", data["productionValuation"]) p2 = updateIdElement("total-consumption-measured", data["consumptionNumber"]) p3 = updateIdElement("total-consumption-cost", data["consumptionCost"])