Skip to content

Commit

Permalink
Rename components with old names
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminCharmes committed Sep 19, 2024
1 parent 1671fdc commit 9a81e18
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 28 deletions.
6 changes: 3 additions & 3 deletions webapp/cypress/component/NavbarTest.cy.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe("Navbar", () => {
{ path: "/samples", name: "Samples" },
{ path: "/collections", name: "Collections" },
{ path: "/starting-materials", name: "Inventory" },
{ path: "/equipments", name: "Equipment" },
{ path: "/equipment", name: "Equipment" },
{ path: "/item-graph", name: "GraphView" },
],
});
Expand Down Expand Up @@ -91,7 +91,7 @@ describe("Navbar", () => {
cy.contains("Samples").should("have.attr", "href", "/samples");
cy.contains("Collections").should("have.attr", "href", "/collections");
cy.contains("Inventory").should("have.attr", "href", "/starting-materials");
cy.contains("Equipment").should("have.attr", "href", "/equipments");
cy.contains("Equipment").should("have.attr", "href", "/equipment");
cy.contains("Graph View").should("have.attr", "href", "/item-graph");
});
});
Expand All @@ -116,7 +116,7 @@ describe("Navbar", () => {
cy.url().should("include", "/starting-materials");

cy.contains("Equipment").click();
cy.url().should("include", "/equipments");
cy.url().should("include", "/equipment");

cy.contains("Graph View").click();
cy.url().should("include", "/item-graph");
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/AddToCollectionModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default {
getSampleList();
} else if (this.itemsSelected.some((item) => item.type === "startingMaterials")) {
getStartingMaterialList();
} else if (this.itemsSelected.some((item) => item.type === "equipments")) {
} else if (this.itemsSelected.some((item) => item.type === "equipment")) {
getEquipmentList();
}
console.log("Items added successfully.");
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions webapp/src/components/DynamicButtonDataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
Add a starting material
</button>
<button
v-if="dataType === 'equipments'"
v-if="dataType === 'equipment'"
class="btn btn-default"
@click="$emit('open-create-equipment-modal')"
>
Expand Down Expand Up @@ -143,7 +143,7 @@ export default {
this.deleteCollections();
} else if (this.dataType === "startingMaterials") {
this.deleteStartingMaterials();
} else if (this.dataType === "equipments") {
} else if (this.dataType === "equipment") {
this.deleteEquipments();
}
this.$emit("delete-selected-items");
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/DynamicDataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export default {
samples: "sample-table",
collections: "collection-table",
startingMaterials: "starting-material-table",
equipments: "equipment-table",
equipment: "equipment-table",
};
return dataTestIdMap[this.dataType] || "default-table";
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<DynamicDataTable
:columns="equipmentColumn"
:data="equipments"
:data-type="'equipments'"
:data="equipment"
:data-type="'equipment'"
:global-filter-fields="['item_id', 'name', 'location', 'creatorsList']"
/>
</template>
Expand All @@ -25,7 +25,7 @@ export default {
};
},
computed: {
equipments() {
equipment() {
return this.$store.state.equipment_list.map((equipment) => ({
...equipment,
// creatorsList: equipment.creators.map((creator) => creator.display_name).join(", "),
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<router-link to="/samples">Samples</router-link> |
<router-link to="/collections">Collections</router-link> |
<router-link to="/starting-materials">Inventory</router-link> |
<router-link to="/equipments">Equipment</router-link> |
<router-link to="/equipment">Equipment</router-link> |
<router-link to="/item-graph"
><font-awesome-icon icon="project-diagram" />&nbsp;Graph View</router-link
>
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions webapp/src/router/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createRouter, createWebHistory } from "vue-router";
import Samples from "../views/Samples.vue";
import Equipments from "../views/Equipments.vue";
import Equipment from "../views/Equipment.vue";
import StartingMaterials from "../views/StartingMaterials.vue";
import Collections from "@/views/Collections.vue";
import NotFound from "../views/NotFound.vue";
Expand All @@ -26,10 +26,10 @@ const routes = [
component: Samples,
},
{
path: "/equipments",
name: "equipments",
path: "/equipment",
name: "equipment",
alias: "/",
component: Equipments,
component: Equipment,
},
{
path: "/edit/:id",
Expand Down
6 changes: 3 additions & 3 deletions webapp/src/views/Collections.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
<div id="tableContainer" class="container">
<div class="row">
<div class="col-sm-12 mx-auto">
<CollectionsTable />
<CollectionTable />
</div>
</div>
</div>
</template>

<script>
import Navbar from "@/components/Navbar";
import CollectionsTable from "@/components/CollectionsTable";
import CollectionTable from "@/components/CollectionTable";
export default {
name: "Collections",
components: {
Navbar,
CollectionsTable,
CollectionTable,
},
};
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
<div id="tableContainer" class="container">
<div class="row">
<div class="col-sm-12 mx-auto">
<EquipmentsTable />
<EquipmentTable />
</div>
</div>
</div>
</template>

<script>
import Navbar from "@/components/Navbar";
import EquipmentsTable from "@/components/EquipmentsTable";
import EquipmentTable from "@/components/EquipmentTable";
export default {
name: "Equipments",
name: "Equipment",
components: {
Navbar,
EquipmentsTable,
EquipmentTable,
},
};
</script>
Expand Down
6 changes: 3 additions & 3 deletions webapp/src/views/Samples.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
<div id="tableContainer" class="container">
<div class="row">
<div class="col-sm-12 mx-auto">
<SamplesTable />
<SampleTable />
</div>
</div>
</div>
</template>

<script>
import Navbar from "@/components/Navbar";
import SamplesTable from "@/components/SamplesTable";
import SampleTable from "@/components/SampleTable";
export default {
name: "Samples",
components: {
Navbar,
SamplesTable,
SampleTable,
},
};
</script>
Expand Down
6 changes: 3 additions & 3 deletions webapp/src/views/StartingMaterials.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
<div id="tableContainer" class="container">
<div class="row">
<div class="col-sm-12 mx-auto">
<StartingMaterialsTable />
<StartingMaterialTable />
</div>
</div>
</div>
</template>

<script>
import Navbar from "@/components/Navbar";
import StartingMaterialsTable from "@/components/StartingMaterialsTable";
import StartingMaterialTable from "@/components/StartingMaterialTable";
export default {
name: "StartingMaterials",
components: {
Navbar,
StartingMaterialsTable,
StartingMaterialTable,
},
};
</script>
Expand Down

0 comments on commit 9a81e18

Please sign in to comment.