mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-16 20:22:15 +01:00
add frontend format support for currencies, add currencies endpoint
This commit is contained in:
@@ -3,7 +3,7 @@ import MainContainer from '@/packages/ui/src/MainContainer.vue';
|
||||
import AppLayout from '@/Layouts/AppLayout.vue';
|
||||
import { FolderIcon, PlusIcon } from '@heroicons/vue/16/solid';
|
||||
import SecondaryButton from '@/packages/ui/src/Buttons/SecondaryButton.vue';
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
import { computed, onMounted, ref, inject, type ComputedRef } from 'vue';
|
||||
import { useProjectsStore } from '@/utils/useProjects';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import {
|
||||
@@ -33,9 +33,12 @@ import ProjectEditModal from '@/Components/Common/Project/ProjectEditModal.vue';
|
||||
import { Badge } from '@/packages/ui/src';
|
||||
import { formatCents } from '../packages/ui/src/utils/money';
|
||||
import { getOrganizationCurrencyString } from '../utils/money';
|
||||
import type { Organization } from '@/packages/api/src';
|
||||
|
||||
const { projects } = storeToRefs(useProjectsStore());
|
||||
|
||||
const organization = inject<ComputedRef<Organization>>('organization');
|
||||
|
||||
const project = computed(() => {
|
||||
return (
|
||||
projects.value.find(
|
||||
@@ -112,7 +115,10 @@ const shownTasks = computed(() => {
|
||||
{{
|
||||
formatCents(
|
||||
project?.billable_rate ?? 0,
|
||||
getOrganizationCurrencyString()
|
||||
getOrganizationCurrencyString(),
|
||||
organization?.currency_format,
|
||||
organization?.currency_symbol,
|
||||
organization?.number_format
|
||||
)
|
||||
}}
|
||||
/ h
|
||||
@@ -145,15 +151,11 @@ const shownTasks = computed(() => {
|
||||
<div
|
||||
class="w-full items-center flex justify-between">
|
||||
<div class="pl-6">
|
||||
<TabBar
|
||||
v-model="activeTab"
|
||||
>
|
||||
<TabBarItem
|
||||
value="active"
|
||||
<TabBar v-model="activeTab">
|
||||
<TabBarItem value="active"
|
||||
>Active
|
||||
</TabBarItem>
|
||||
<TabBarItem
|
||||
value="done"
|
||||
<TabBarItem value="done"
|
||||
>Done
|
||||
</TabBarItem>
|
||||
</TabBar>
|
||||
@@ -185,11 +187,11 @@ const shownTasks = computed(() => {
|
||||
Add Member
|
||||
</SecondaryButton>
|
||||
<ProjectMemberCreateModal
|
||||
v-model:show="
|
||||
createProjectMember
|
||||
"
|
||||
v-model:show="createProjectMember"
|
||||
:project-id="projectId"
|
||||
:existing-members="projectMembers"></ProjectMemberCreateModal>
|
||||
:existing-members="
|
||||
projectMembers
|
||||
"></ProjectMemberCreateModal>
|
||||
</template>
|
||||
</CardTitle>
|
||||
<Card>
|
||||
|
||||
Reference in New Issue
Block a user