From 2c8e7f8e95b6eaa0fe0139888c9f3c3ba6369bff Mon Sep 17 00:00:00 2001 From: Ramaguru Radhakrishnan <r_ramaguru@cb.amrita.edu> Date: Mon, 14 Feb 2022 20:51:51 +0530 Subject: [PATCH] Alignment Updated --- src/pages/Account.vue | 180 ++++++++++++++++++++++-------------------- 1 file changed, 95 insertions(+), 85 deletions(-) diff --git a/src/pages/Account.vue b/src/pages/Account.vue index f451c87..4cf6c84 100644 --- a/src/pages/Account.vue +++ b/src/pages/Account.vue @@ -1,113 +1,123 @@ <template> - <div id="Account"> - <!-- breadcrumb --> - <nav class="text-sm font-semibold mb-6" aria-label="Breadcrumb"> - <ol class="list-none p-0 inline-flex"> - <li class="flex items-center text-blue-500"> - <a href="#" class="text-gray-700">Account</a> - <svg class="fill-current w-3 h-3 mx-3" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg> + <div id="Account"> + <!-- breadcrumb --> + <nav class="text-sm font-semibold mb-6" aria-label="Breadcrumb"> + <ol class="list-none p-0 inline-flex"> + <li class="flex items-center text-blue-500"> + <a href="#" class="text-gray-700">Account</a> + <svg class="fill-current w-3 h-3 mx-3" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg> </li> <!-- <li class="flex items-center"> - <a href="#" class="text-gray-600"></a> + <a href="#" class="text-gray-600"></a> </li> --> - </ol> - </nav> - <!-- breadcrumb end --> + </ol> + </nav> + <!-- breadcrumb end --> - <div class="lg:flex justify-between items-center mb-6"> - <p class="text-xl mb-2 lg:mb-0">Welcome, {{did}}</p> - </div> + <div class="lg:flex justify-between items-center mb-6"> + <p class="text-xl mb-2 lg:mb-0">Welcome, {{getInfo.didHash}}</p> + </div> - <div class="flex flex-wrap -mx-3 mb-20"> - </div> - </div> + <div class="flex flex-wrap -mx-3 mb-20"> + </div> + </div> </template> <script> import axios from 'axios' export default { - name: 'DashboardHome', - data() { - return { - - did: 0, - } + name: 'DashboardHome', + data() { + return { + getInfo:{}, + } + }, + methods:{ + + getInfoFn: function () { + + console.log("loading getInfo") + + axios.get('http://localhost:1898/getInfo') + .then((response) => { + + console.log(response); + this.getInfo = response.data.data.payload + console.log(this.getInfo) + }) + .catch(function (error) { + console.log(error); + }); }, - methods:{ - checkStatus: function () { - + checkStatus: function () { + console.log("loading DID exists") axios.get('http://localhost:1898/checkDidExists') - .then((response) => { - - console.log(response); - if(response.data.data.payload == 'Failure'){ - console.log("moving to create DID") - this.$router.push({path: '/create-new-DID'}) - return; - } else { - console.log("loading DID verified") - axios.get('http://localhost:1898/checkDidVerified') - .then((response) => { - this.isVerified = response.data.data.payload - console.log(response); - if(response.data.data.payload == 'Failure'){ - console.log("moving to create DID [check]") + .then((response) => { + + console.log(response); + if(response.data.data.payload == 'Failure'){ + console.log("moving to create DID") + this.$router.push({path: '/create-new-DID'}) + return; + } else { + console.log("loading DID verified") + axios.get('http://localhost:1898/checkDidVerified') + .then((response) => { + this.isVerified = response.data.data.payload + console.log(response); + if(response.data.data.payload == 'Failure'){ + console.log("moving to create DID [check]") + this.$router.push({path: '/verification'}) + return; + } + }) + .catch(function (error) { + console.log(error); this.$router.push({path: '/verification'}) return; - } - }) - .catch(function (error) { - console.log(error); - this.$router.push({path: '/verification'}) - return; - }); - } - }) - .catch(function (error) { - console.log(error); - this.$router.push({path: '/create-new-DID'}) - return; - }); - - - - - axios.get('http://localhost:1898/checkRole') - .then((response) => { - - console.log(response); - // this.myRole = response.data.data.payload - }) - .catch(function (error) { - console.log(error); - // this.$router.push({path: '/create-new-DID'}) - }); + }); + } + }) + .catch(function (error) { + console.log(error); + this.$router.push({path: '/create-new-DID'}) + return; + }); + axios.get('http://localhost:1898/checkRole') + .then((response) => { + + console.log(response); + // this.myRole = response.data.data.payload + }) + .catch(function (error) { + console.log(error); + // this.$router.push({path: '/create-new-DID'}) + }); }, - getAccountInfo: function () { - + getAccountInfo: function () { + console.log("loading getAccountInfo") axios.get('http://localhost:1898/getAccountInfo') - .then((response) => { + .then((response) => { - console.log(response); - this.did = response.data.did + console.log(response); + this.did = response.data.did - }) - .catch(function (error) { - console.log(error); - }); - }, + }) + .catch(function (error) { + console.log(error); + }); }, - - beforeMount() { - this.getAccountInfo() - this.checkStatus() - } + }, + beforeMount() { + this.getAccountInfo() + this.checkStatus() + } } -</script> \ No newline at end of file +</script> -- GitLab