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/07/15 17:05:51 UTC

[airavata-custos-portal] branch custos-pearc-tutorial-2021 updated: Refactoring

This is an automated email from the ASF dual-hosted git repository.

isjarana pushed a commit to branch custos-pearc-tutorial-2021
in repository https://gitbox.apache.org/repos/asf/airavata-custos-portal.git


The following commit(s) were added to refs/heads/custos-pearc-tutorial-2021 by this push:
     new efa9e68  Refactoring
     new ce9e8a1  Merge pull request #117 from dinukadesilva/reference-student-portal
efa9e68 is described below

commit efa9e689a4dd8e5f1ee596b87a1edb2450f899b3
Author: Dinuka De Silva <l....@gmail.com>
AuthorDate: Thu Jul 15 13:01:03 2021 -0400

    Refactoring
---
 src/lib/components/pages/TenantEntities.vue  | 8 ++++----
 src/lib/components/pages/TenantHome.vue      | 7 ++++---
 src/lib/components/pages/TenantNewEntity.vue | 4 ++--
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/lib/components/pages/TenantEntities.vue b/src/lib/components/pages/TenantEntities.vue
index 4906a18..30fb20d 100644
--- a/src/lib/components/pages/TenantEntities.vue
+++ b/src/lib/components/pages/TenantEntities.vue
@@ -465,7 +465,7 @@ export default {
       return false;
     },
     addNewSubmission(assignment) {
-      const newSubmissionEntityId = `${assignment.entityId}_${window.performance.now()}`;
+      const newSubmissionEntityId = `submission_${window.performance.now()}`;
       this.entitiesMap = {
         ...this.entitiesMap,
         [newSubmissionEntityId]: {
@@ -493,7 +493,7 @@ export default {
       };
     },
     addNewGrading(assignment, submission) {
-      const newGradingEntityId = `${submission.entityId}_${window.performance.now()}`;
+      const newGradingEntityId = `grading_${window.performance.now()}`;
       this.entitiesMap = {
         ...this.entitiesMap,
         [newGradingEntityId]: {
@@ -594,7 +594,7 @@ export default {
         await this.$store.dispatch("entity/updateEntity", {
           entityId: entity.entityId,
           clientId: this.clientId,
-          name: `custos-health-submission-${window.performance.now()}`,
+          name: entity.name,
           fullText: JSON.stringify(entity.fullTextJson),
           type: entity.type,
           ownerId: entity.ownerId
@@ -620,7 +620,7 @@ export default {
         await this.$store.dispatch("entity/createEntity", {
           entityId: entity.entityId,
           clientId: this.clientId,
-          name: `custos-health-submission-${window.performance.now()}`,
+          name: entity.name,
           fullText: JSON.stringify(entity.fullTextJson),
           type: entity.type,
           ownerId: this.$store.getters["auth/currentUsername"]
diff --git a/src/lib/components/pages/TenantHome.vue b/src/lib/components/pages/TenantHome.vue
index d3ac735..fe72ac3 100644
--- a/src/lib/components/pages/TenantHome.vue
+++ b/src/lib/components/pages/TenantHome.vue
@@ -1,6 +1,7 @@
 <template>
-  <div class="w-100">
-    <div class="w-100" :style="`display: flex;padding: 10px 40px;background-color:${headerColor};`">
+  <div class="w-100" :style="`background-color:${headerColor};`">
+
+    <div class="w-100" :style="`display: flex;padding: 10px 40px;background-color:#f9f9f9;`">
       <div style="flex: 1;">
         <!--        <div style="font-size: 1.4rem;" v-if="tenant">{{ tenant.name }}</div>-->
         <Breadcrumb :links="commonBreadcrumbLinks.concat(breadcrumbLinks)"/>
@@ -171,7 +172,7 @@ export default {
         return "#aed583";
       }
 
-      return "#f9f9f9";
+      return "";
     },
     commonBreadcrumbLinks() {
       const _breadcrumbLinks = [
diff --git a/src/lib/components/pages/TenantNewEntity.vue b/src/lib/components/pages/TenantNewEntity.vue
index e5a12b2..241f043 100644
--- a/src/lib/components/pages/TenantNewEntity.vue
+++ b/src/lib/components/pages/TenantNewEntity.vue
@@ -89,7 +89,7 @@ export default {
   },
   computed: {
     name() {
-      return `custos-student-portal-assignment-${window.performance.now()}`;
+      return this.title;
     },
     clientId() {
       return this.$route.params.clientId;
@@ -142,7 +142,7 @@ export default {
         this.processing = true;
 
         try {
-          const entityId = `${this.clientId}_${window.performance.now()}`;
+          const entityId = `assignment_${window.performance.now()}`;
 
           await this.$store.dispatch("entity/createEntity", {
             entityId: entityId,