add update member billable rate , fixes ST-241

This commit is contained in:
Gregor Vostrak
2024-06-05 18:28:47 +02:00
parent b1795392ad
commit 474c0de3ac
9 changed files with 141 additions and 17 deletions

View File

@@ -6,15 +6,20 @@ import {
getOrganizationCurrencySymbol,
} from '../../utils/money';
import { ref, watch } from 'vue';
import { useFocus } from '@vueuse/core';
defineProps<{
const props = defineProps<{
name: string;
focus?: boolean;
}>();
const model = defineModel<number | null>({
default: null,
});
const billableRateInput = ref<HTMLInputElement | null>(null);
useFocus(billableRateInput, { initialValue: props.focus });
function cleanUpDecimalValue(value: string) {
value = value.replace(/,/g, '');
value = value.replace(getOrganizationCurrencySymbol(), '');
@@ -67,7 +72,7 @@ const inputValue = ref(formatValue(model.value));
<div class="relative">
<TextInput
:id="name"
ref="projectMemberRateInput"
ref="billableRateInput"
v-model="inputValue"
@blur="updateRate($event.target.value)"
type="text"