Skip to content

Commit 337b718

Browse files
committed
PLACEHOLDER: illustrative commit showing how removing from resources.js allows test to pass
1 parent 73bb4c6 commit 337b718

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

webapp/src/components/FormattedItemName.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
</template>
2121

2222
<script>
23-
import { itemTypes } from "@/resources.js";
2423
import ChemicalFormula from "@/components/ChemicalFormula.vue";
2524
2625
export default {
@@ -30,6 +29,17 @@ export default {
3029
props: {
3130
item_id: { type: String, required: true },
3231
itemType: { type: String, required: true },
32+
itemTypes: {
33+
type: Object,
34+
default: () => ({
35+
samples: { lightColor: "#d0ebfb" },
36+
starting_materials: { lightColor: "#d9f2eb" },
37+
cells: { lightColor: "#D1C28F" },
38+
collections: { lightColor: "#cbd6f7" },
39+
users: { lightColor: "mediumseagreen" },
40+
equipment: { lightColor: "#f7d6a1" },
41+
}),
42+
},
3343
selecting: {
3444
type: Boolean,
3545
default: false,
@@ -58,7 +68,7 @@ export default {
5868
emits: ["itemIdClicked"],
5969
computed: {
6070
badgeColor() {
61-
return itemTypes[this.itemType]?.lightColor || "LightGrey";
71+
return this.itemTypes[this.itemType]?.lightColor || "LightGrey";
6272
},
6373
shortenedName() {
6474
if (this.maxLength && this.maxLength < this.name.length) {

0 commit comments

Comments
 (0)