mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-17 20:52:14 +01:00
fix bug where billable rates do not update because of whitespace
This commit is contained in:
@@ -18,6 +18,7 @@ function cleanUpDecimalValue(value: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateRate(value: string) {
|
function updateRate(value: string) {
|
||||||
|
value = value.trim();
|
||||||
if (value.includes(',')) {
|
if (value.includes(',')) {
|
||||||
const parts = value.split(',');
|
const parts = value.split(',');
|
||||||
const lastPart = (parts[parts.length - 1] = parts[parts.length - 1]);
|
const lastPart = (parts[parts.length - 1] = parts[parts.length - 1]);
|
||||||
@@ -43,7 +44,7 @@ function formatCents(modelValue: number) {
|
|||||||
modelValue / 100,
|
modelValue / 100,
|
||||||
getOrganizationCurrencyString()
|
getOrganizationCurrencyString()
|
||||||
);
|
);
|
||||||
return formattedValue.replace(getOrganizationCurrencySymbol(), '');
|
return formattedValue.replace(getOrganizationCurrencySymbol(), '').trim();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user