diff --git a/ComputersLabelText.vue b/ComputersLabelText.vue index ea453c0..05cbbf5 100644 --- a/ComputersLabelText.vue +++ b/ComputersLabelText.vue @@ -2,8 +2,8 @@
{{ name }}
{{ asset.name }}
-
{{ mac }}
-
{{ mac2 }}
+
{{ getCustom('MAC Address') }}
+
{{ getCustom('MAC Address 2') }}
@@ -21,11 +21,8 @@ export default class ComputersLabelText extends Vue { return numberToWords(this.asset.name.match(/[0-9]+$/)[0]).toUpperCase(); } - get mac() { - return this.asset.custom_fields['MAC Address']?.value; - } - get mac2() { - return this.asset.custom_fields['MAC Address 2']?.value; + getCustom(field) { + return this.asset.custom_fields[field]?.value; } }