add frontend format support for currencies, add currencies endpoint

This commit is contained in:
Gregor Vostrak
2025-05-08 17:25:36 +02:00
parent 8b950d99d6
commit ed32c6b217
24 changed files with 352 additions and 128 deletions

View File

@@ -47,12 +47,17 @@ function archiveProject() {
});
}
const organization = inject<ComputedRef<Organization>>('organization');
const billableRateInfo = computed(() => {
if (props.project.is_billable) {
if (props.project.billable_rate) {
return formatCents(
props.project.billable_rate,
getOrganizationCurrencyString()
getOrganizationCurrencyString(),
organization?.value?.currency_format,
organization?.value?.currency_symbol,
organization?.value?.number_format
);
} else {
return 'Default Rate';
@@ -63,7 +68,6 @@ const billableRateInfo = computed(() => {
const showEditProjectModal = ref(false);
const organization = inject<ComputedRef<Organization>>('organization');
</script>
<template>