Browse Source

Unit codes pulled from util.ts

pull/143/head
Jose Olarte III 5 days ago
parent
commit
b6278ca148
  1. 17
      src/components/GiftedDialog.vue
  2. 17
      src/views/GiftedDetailsView.vue

17
src/components/GiftedDialog.vue

@ -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>

17
src/views/GiftedDetailsView.vue

@ -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>

Loading…
Cancel
Save