File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 2020</template >
2121
2222<script >
23- import { itemTypes } from " @/resources.js" ;
2423import ChemicalFormula from " @/components/ChemicalFormula.vue" ;
2524
2625export 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 ) {
You can’t perform that action at this time.
0 commit comments