mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-16 20:22:15 +01:00
show null billable rate as empty not as 0 to avoid confusion
This commit is contained in:
@@ -24,7 +24,7 @@ const billableRateInput = ref<HTMLInputElement | null>(null);
|
|||||||
useFocus(billableRateInput, { initialValue: props.focus });
|
useFocus(billableRateInput, { initialValue: props.focus });
|
||||||
|
|
||||||
function formatValue(modelValue: number | null) {
|
function formatValue(modelValue: number | null) {
|
||||||
return modelValue ? modelValue / 100 : 0;
|
return modelValue ? modelValue / 100 : null;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ function formatValue(modelValue: number | null) {
|
|||||||
currencyDisplay: 'code',
|
currencyDisplay: 'code',
|
||||||
currencySign: 'accounting',
|
currencySign: 'accounting',
|
||||||
}"
|
}"
|
||||||
@update:model-value="(value) => (model = value * 100)">
|
@update:model-value="(value) => (model = value ? value * 100 : null)">
|
||||||
<NumberFieldContent>
|
<NumberFieldContent>
|
||||||
<NumberFieldDecrement />
|
<NumberFieldDecrement />
|
||||||
<NumberFieldInput placeholder="Billable Rate" />
|
<NumberFieldInput placeholder="Billable Rate" />
|
||||||
|
|||||||
Reference in New Issue
Block a user