You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by is...@apache.org on 2021/06/21 19:47:48 UTC
[airavata-custos-portal] branch reference-portal updated: Bug fixes
This is an automated email from the ASF dual-hosted git repository.
isjarana pushed a commit to branch reference-portal
in repository https://gitbox.apache.org/repos/asf/airavata-custos-portal.git
The following commit(s) were added to refs/heads/reference-portal by this push:
new bcbe486 Bug fixes
new dec8c65 Merge pull request #82 from dinukadesilva/reference-portal
bcbe486 is described below
commit bcbe486282f5c676cd7f73c2424eaf3b76fdec6b
Author: Dinuka De Silva <l....@gmail.com>
AuthorDate: Mon Jun 21 13:56:51 2021 -0400
Bug fixes
---
custos-demo-gateway/src/components/Header.vue | 5 +++-
.../src/components/admin-portal/TenantEntities.vue | 30 ++++++++++++++--------
.../src/components/landing/Landing.vue | 26 +++++++++----------
custos-demo-gateway/src/config.js | 2 +-
4 files changed, 37 insertions(+), 26 deletions(-)
diff --git a/custos-demo-gateway/src/components/Header.vue b/custos-demo-gateway/src/components/Header.vue
index 86917d0..5e258e7 100644
--- a/custos-demo-gateway/src/components/Header.vue
+++ b/custos-demo-gateway/src/components/Header.vue
@@ -2,7 +2,10 @@
<div>
<div class="header p-3">
<div class="custos-logo text-primary">
- <div style="font-size: 23px; font-weight: 600; font-style: italic;">Custos Health</div>
+ <div style="font-size: 23px; font-weight: 600; font-style: italic;">
+ <b-icon icon="shield-fill-plus"/>
+ IU Health
+ </div>
<!-- <img src="../assets/custos-logo_custos-logo-color-v1.png" style="width: 140px;">-->
</div>
<div class="user-details" v-if="this.authenticated && user">
diff --git a/custos-demo-gateway/src/components/admin-portal/TenantEntities.vue b/custos-demo-gateway/src/components/admin-portal/TenantEntities.vue
index 00c8206..d7b3d0a 100644
--- a/custos-demo-gateway/src/components/admin-portal/TenantEntities.vue
+++ b/custos-demo-gateway/src/components/admin-portal/TenantEntities.vue
@@ -1,11 +1,12 @@
<template>
- <TenantHome title="Appointments" :breadcrumb-links="breadcrumbLinks" :errors="errors">
- <template #header-right>
+ <TenantHome :title="title" :breadcrumb-links="breadcrumbLinks" :errors="errors">
+ <template #header-right v-if="hasPatientRole">
<router-link :to="`/tenants/${clientId}/entities/new`" v-slot="{href, navigate}" tag="">
<b-button variant="primary" @click="navigate">Make an Appointment</b-button>
</router-link>
</template>
- <table-overlay-info :rows="5" :columns="1" :data="appointments">
+ <table-overlay-info :rows="5" :columns="1" :data="appointments"
+ v-if="hasPatientRole || hasNurseRole || hasDoctorRole">
<b-table-simple>
<b-thead>
<b-tr>
@@ -212,6 +213,7 @@
</b-tbody>
</b-table-simple>
</table-overlay-info>
+ <div v-else>Unauthorized. Please contact the system administrator.</div>
</TenantHome>
</template>
@@ -235,7 +237,7 @@ const groupIdDoctor = config.value('groupIdDoctor');
// const groupIdNurse = config.value('groupIdNurse');
const permissionTypeViewer = config.value('permissionTypeViewer');
const permissionTypeEditor = config.value('permissionTypeEditor');
-const permissionTypeShare = config.value('permissionTypeShare');
+// const permissionTypeShare = config.value('permissionTypeShare');
export default {
@@ -255,10 +257,17 @@ export default {
appointmentEntityIds: [],
permissionTypeEditor,
- permissionTypeShare
+ // permissionTypeShare
}
},
computed: {
+ title() {
+ if (this.hasPatientRole || this.hasNurseRole || this.hasDoctorRole) {
+ return "Appointments";
+ } else {
+ return "Unauthorized";
+ }
+ },
clientId() {
console.log("this.$route.params : ", this.$route.params);
return this.$route.params.clientId;
@@ -496,16 +505,15 @@ export default {
},
getEntity({entityId}) {
let entity = this.entitiesMap[entityId];
- // if (!entity) {
- // alert(entityId)
- // }
- if (entity.type === entityTypeIdAppointment) {
+ if (!entity) {
+ return null;
+ } else if (entity.type === entityTypeIdAppointment) {
entity = {
...entity,
fullTextJson: {
...entity.fullTextJson,
- histories: entity.fullTextJson.histories.map(entityId => this.getEntity({entityId})),
- prescriptions: entity.fullTextJson.prescriptions.map(entityId => this.getEntity({entityId}))
+ histories: entity.fullTextJson.histories.map(entityId => this.getEntity({entityId})).filter(entity => !!entity),
+ prescriptions: entity.fullTextJson.prescriptions.map(entityId => this.getEntity({entityId})).filter(entity => !!entity)
}
}
} else {
diff --git a/custos-demo-gateway/src/components/landing/Landing.vue b/custos-demo-gateway/src/components/landing/Landing.vue
index f1ef368..15998ae 100644
--- a/custos-demo-gateway/src/components/landing/Landing.vue
+++ b/custos-demo-gateway/src/components/landing/Landing.vue
@@ -1,19 +1,19 @@
<template>
<b-container style="padding-top: 60px;">
<b-row align-v="start" align-h="center">
- <b-col style="min-width: 300px; max-width: 600px;">
- <h2>Welcome to Custos</h2>
- <p class="h2-sub">Sign up and start authenticating</p>
- <!-- <div class="main-links">-->
- <!-- <b-link href="http://airavata.apache.org/custos/" target="_blank">Custos Website</b-link>-->
- <!-- <b-link class="ml-5"-->
- <!-- href="https://cwiki.apache.org/confluence/display/CUSTOS/Gateways+2020%3ACustos+Tutorial"-->
- <!-- target="_blank">-->
- <!-- Tutorial Instructions-->
- <!-- </b-link>-->
- <!-- </div>-->
- <img style="width: 70%;" src="../../assets/custos_home.png">
- </b-col>
+ <!-- <b-col style="min-width: 300px; max-width: 600px;" >-->
+ <!-- <h2>Welcome to Custos</h2>-->
+ <!-- <p class="h2-sub">Sign up and start authenticating</p>-->
+ <!-- <!– <div class="main-links">–>-->
+ <!-- <!– <b-link href="http://airavata.apache.org/custos/" target="_blank">Custos Website</b-link>–>-->
+ <!-- <!– <b-link class="ml-5"–>-->
+ <!-- <!– href="https://cwiki.apache.org/confluence/display/CUSTOS/Gateways+2020%3ACustos+Tutorial"–>-->
+ <!-- <!– target="_blank">–>-->
+ <!-- <!– Tutorial Instructions–>-->
+ <!-- <!– </b-link>–>-->
+ <!-- <!– </div>–>-->
+ <!-- <img style="width: 70%;" src="../../assets/custos_home.png">-->
+ <!-- </b-col>-->
<b-col style="max-width: 350px;min-width: 300px;" align-h="center">
<div class="w-100">
<div class="p-2 text-center">
diff --git a/custos-demo-gateway/src/config.js b/custos-demo-gateway/src/config.js
index 6c30681..ded1906 100644
--- a/custos-demo-gateway/src/config.js
+++ b/custos-demo-gateway/src/config.js
@@ -34,7 +34,7 @@ export default class Configuration {
groupIdNurse: '$VUE_APP_CLIENT_GROUP_ID_NURSE',
permissionTypeViewer: '$VUE_APP_CLIENT_PERMISSION_TYPE_VIEWER',
permissionTypeEditor: '$VUE_APP_CLIENT_PERMISSION_TYPE_EDITOR',
- permissionTypeShare: '$VUE_APP_CLIENT_PERMISSION_TYPE_SHARE'
+ // permissionTypeShare: '$VUE_APP_CLIENT_PERMISSION_TYPE_SHARE'
}
}