Skip to content

Commit 2a5d755

Browse files
committed
seperated the credit and usage page
1 parent 5edc37c commit 2a5d755

File tree

5 files changed

+611
-36
lines changed

5 files changed

+611
-36
lines changed

src/App.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,11 @@ export default {
560560
title: "Credential",
561561
icon: "fa fa-certificate",
562562
})
563-
563+
menu.push({
564+
href: "/studio/ssi/usage/" + this.getSelectedService.appId,
565+
title: "Usages",
566+
icon: "fa fa-chart-bar",
567+
})
564568
565569
menu.push({
566570
href: "/studio/ssi/credit/" + this.getSelectedService.appId,

src/router.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const Credential = () => import('./views/playground/Sessions.vue')
1212
const CredentialDetails = () => import('./views/playground/SessionsDetails.vue')
1313
const DIDs = () => import('./views/playground/DID.vue')
1414
const SSIDashboardCredit = () => import('./views/playground/SSIDashboardCredit.vue')
15+
const SSIDashboardUsage = () => import('./views/playground/SSIDashboardUsages.vue')
1516
const KYCCreditDashboard = () => import('./views/playground/KYCDashboardCredit.vue')
1617
const UsageS = () => import('./views/playground/Usage.vue')
1718
const OnChainKycSystems = () => import('./views/playground/OnChainKycSystems.vue')
@@ -125,6 +126,15 @@ const router = new Router({
125126
title: `${config.app.name} - SSI Credit`
126127
}
127128
},
129+
{
130+
path: '/studio/ssi/usage/:appId',
131+
name: 'Usage',
132+
component: SSIDashboardUsage,
133+
meta: {
134+
requiresAuth: true,
135+
title: `${config.app.name} - Usages`
136+
}
137+
},
128138
{
129139
path: '/studio/onchainkyc/credit/:appId',
130140
name: 'KYCCredit',

src/views/playground/KYCDashboardCredit.vue

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,26 @@ h5 span {
158158
<div class="">
159159
<div class="">
160160
<p><b>Total Credits</b></p>
161-
<p>
162-
<span style="font-size:xx-large;">
163-
{{ numberFormat(myKYCCredits.allRemainingCredits) }}
164-
</span> <span style="font-size:larger;">/</span>
165-
<span style="font-size:larger; color: grey">
166-
{{ numberFormat(myKYCCredits.allAvailableCredits) }}
161+
<p v-if="myKYCCredits.allRemainingCredits === 0 && myKYCCredits.allAvailableCredits === 0">
162+
<span style="font-size: xx-large;">
163+
{{ numberFormat(myKYCCredits.allRemainingCredits) }}
164+
</span>
165+
</p>
166+
<p v-else>
167+
<span style="font-size: xx-large;">
168+
{{ numberFormat(myKYCCredits.allRemainingCredits) }}
169+
</span>
170+
<span style="font-size: larger;">/</span>
171+
<span style="font-size: larger; color: grey">
172+
{{ numberFormat(myKYCCredits.allAvailableCredits) }}
173+
</span>
174+
</p>
175+
<p v-if="this.timeRemaining==='Expired'">
176+
<span style="font-size:small; color: grey">
177+
Expired
167178
</span>
168179
</p>
169-
<p>
180+
<p v-else>
170181
<span style="font-size:small; color: grey">
171182
Expires In: {{ this.timeRemaining }}
172183
</span>

src/views/playground/SSIDashboardCredit.vue

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -185,34 +185,6 @@ h5 span {
185185
</div>
186186
</div>
187187

188-
<!--Usage -->
189-
<div class="">
190-
<div class="" style="text-align: left">
191-
<div class="form-group" style="display:flex">
192-
<h3 style="text-align: left;">Usage</h3>
193-
</div>
194-
</div>
195-
</div>
196-
<div class="row">
197-
<div class="col-4">
198-
<v-card class="p-4">
199-
<canvas id="didChart"></canvas>
200-
</v-card>
201-
</div>
202-
203-
<div class="col-4">
204-
<v-card class="p-4">
205-
<canvas id="credChart"></canvas>
206-
</v-card>
207-
</div>
208-
209-
<div class="col-4">
210-
<v-card class="p-4">
211-
<canvas id="schemaChart"></canvas>
212-
</v-card>
213-
</div>
214-
</div>
215-
216188
<!-- Credit History -->
217189
<!--
218190

0 commit comments

Comments
 (0)