forked from geolba/tethys.frontend
Code cleaning
This commit is contained in:
parent
9ad4037c74
commit
6fb7ad0e93
|
@ -5,7 +5,7 @@ import { Component, Vue, Prop, Emit } from "vue-facing-decorator";
|
||||||
name: "ActiveFacetCategory",
|
name: "ActiveFacetCategory",
|
||||||
})
|
})
|
||||||
export default class ActiveFacetCategory extends Vue {
|
export default class ActiveFacetCategory extends Vue {
|
||||||
|
|
||||||
@Prop({
|
@Prop({
|
||||||
type: Array<string>,
|
type: Array<string>,
|
||||||
})
|
})
|
||||||
|
@ -46,7 +46,7 @@ export default class ActiveFacetCategory extends Vue {
|
||||||
case "subjects":
|
case "subjects":
|
||||||
return "keyword";
|
return "keyword";
|
||||||
case "doctype":
|
case "doctype":
|
||||||
return "Data Type";
|
return "data type";
|
||||||
default:
|
default:
|
||||||
return this.categoryName;
|
return this.categoryName;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ export default class ActiveFacetCategory extends Vue {
|
||||||
*/
|
*/
|
||||||
filterItemsAlias(categoryAlias: string): string {
|
filterItemsAlias(categoryAlias: string): string {
|
||||||
console.log(categoryAlias);
|
console.log(categoryAlias);
|
||||||
if (categoryAlias === ("Data Type") || categoryAlias === ("language")) {
|
if (categoryAlias === ("data type") || categoryAlias === ("language")) {
|
||||||
/**
|
/**
|
||||||
* Iterate over the filterItems array using the map method to create a new array (updatedItems).
|
* Iterate over the filterItems array using the map method to create a new array (updatedItems).
|
||||||
* For each item in the array, check if the item exists as a key in the replacements map.
|
* For each item in the array, check if the item exists as a key in the replacements map.
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
<span>{{ categoryAlias + ": " }}</span>
|
<span>{{ categoryAlias + ": " }}</span>
|
||||||
<!-- <a v-if="filterItems && filterItems.length > 0" class="gsaterm">{{ filterItems.join(" | ") }}</a> -->
|
<!-- <a v-if="filterItems && filterItems.length > 0" class="gsaterm">{{ filterItems.join(" | ") }}</a> -->
|
||||||
<a v-if="filterItems && filterItems.length > 0" class="gsaterm">{{ filterItemsAlias(categoryAlias) }}</a>
|
<a v-if="filterItems && filterItems.length > 0" class="gsaterm">{{ filterItemsAlias(categoryAlias) }}</a>
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -44,6 +43,7 @@ input[type="checkbox"].css-checkbox {
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="checkbox"].css-checkbox + label.css-label {
|
input[type="checkbox"].css-checkbox + label.css-label {
|
||||||
|
text-transform: capitalize;
|
||||||
padding-left: 25px;
|
padding-left: 25px;
|
||||||
/* height: 24px;
|
/* height: 24px;
|
||||||
display: inline-block; */
|
display: inline-block; */
|
||||||
|
|
|
@ -56,27 +56,7 @@ export default class FacetCategory extends Vue {
|
||||||
* NOTE: This could be corrected directly in the index
|
* NOTE: This could be corrected directly in the index
|
||||||
*/
|
*/
|
||||||
itemAlias(val: string): string {
|
itemAlias(val: string): string {
|
||||||
// console.log("filterName:", this.filterName);
|
|
||||||
// return this.filterName == "datatype" ? "doctype" : this.filterName;
|
|
||||||
|
|
||||||
return this.replacements.get(val) || val;
|
return this.replacements.get(val) || val;
|
||||||
|
|
||||||
// switch (val) {
|
|
||||||
// case "gis":
|
|
||||||
// return "GIS";
|
|
||||||
// case "analysisdata":
|
|
||||||
// return "Analysis Data";
|
|
||||||
// case "models":
|
|
||||||
// return "Models";
|
|
||||||
// case "monitoring":
|
|
||||||
// return "Monitoring";
|
|
||||||
// case "measurementdata":
|
|
||||||
// return "Measurement Data";
|
|
||||||
// case "mixedtype":
|
|
||||||
// return "Mixed Type";
|
|
||||||
// default:
|
|
||||||
// return val;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get filterItems(): Array<FilterItem> {
|
// get filterItems(): Array<FilterItem> {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user