Unit codes pulled from util.ts

This commit is contained in:
Jose Olarte III
2025-06-25 21:28:25 +08:00
parent b5a0503f7c
commit dc537ccf00
2 changed files with 24 additions and 10 deletions

View File

@@ -462,11 +462,13 @@
v-model="unitCode" v-model="unitCode"
class="flex-1 rounded border border-slate-400 ms-2 px-3 py-2" class="flex-1 rounded border border-slate-400 ms-2 px-3 py-2"
> >
<option value="HUR">Hours</option> <option
<option value="USD">US $</option> v-for="(displayName, code) in unitOptions"
<option value="BTC">BTC</option> :key="code"
<option value="BX">BX</option> :value="code"
<option value="ETH">ETH</option> >
{{ displayName }}
</option>
</select> </select>
</div> </div>
<router-link <router-link
@@ -1073,6 +1075,11 @@ export default class GiftedDialog extends Vue {
unitCode: this.unitCode, unitCode: this.unitCode,
}; };
} }
// Computed property to get unit options
get unitOptions() {
return this.libsUtil.UNIT_SHORT;
}
} }
</script> </script>

View File

@@ -72,11 +72,13 @@
v-model="unitCode" v-model="unitCode"
class="flex-1 rounded border border-slate-400 ms-2 px-3 py-2" class="flex-1 rounded border border-slate-400 ms-2 px-3 py-2"
> >
<option value="HUR">Hours</option> <option
<option value="USD">US $</option> v-for="(displayName, code) in unitOptions"
<option value="BTC">BTC</option> :key="code"
<option value="BX">BX</option> :value="code"
<option value="ETH">ETH</option> >
{{ displayName }}
</option>
</select> </select>
</div> </div>
@@ -916,5 +918,10 @@ export default class GiftedDetails extends Vue {
7000, 7000,
); );
} }
// Computed property to get unit options
get unitOptions() {
return this.libsUtil.UNIT_SHORT;
}
} }
</script> </script>