Skip to content

Commit 7b10d4c

Browse files
feat(dashboard/invoice): added localisation to invoiceusertable and invoicecreatemodal
1 parent 5ad7b98 commit 7b10d4c

File tree

3 files changed

+23
-18
lines changed

3 files changed

+23
-18
lines changed

apps/dashboard/src/locales/en.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@
263263
"payoutCreated": "Successfully created payout.",
264264
"payoutDeleted": "Successfully deleted payout.",
265265
"payoutApproved": "Successfully approved payout.",
266-
"payoutDenied": "Successfully denied payout."
266+
"payoutDenied": "Successfully denied payout.",
267+
"invoiceCreated": "Successfully created invoice."
267268
},
268269
"termsOfService": {
269270
"acceptFirst": "Accept the Terms of Service",
@@ -377,7 +378,12 @@
377378
"AreYouSure": "Are you sure you want to delete this invoice?",
378379
"CreditNoteWarning": "This will not create a credit note.",
379380
"Unrecoverable": "This deletes the invoice and cannot be undone.",
380-
"Credit": "Credit Invoice"
381+
"Credit": "Credit Invoice",
382+
"InvoiceUsers": "Invoice Users",
383+
"Name": "Name",
384+
"Balance": "Balance",
385+
"CreateInvoice": "Create Invoice",
386+
"isCreditInvoice": "Is credit invoice"
381387
},
382388
"pdf": {
383389
"Table": "Table",

apps/dashboard/src/modules/financial/components/invoice/InvoiceUserTable.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<template>
2-
<CardComponent header="Invoice Users" class="w-5">
2+
<CardComponent :header="$t('c_invoiceInfo.InvoiceUsers')" class="w-5">
33
<DataTable
44
:value="invoiceableUsersWithBalance"
55
>
6-
<Column field="user.id" header="ID"/>
7-
<Column header="Name" field="user.firstName">
6+
<Column field="user.id" :header="$t('c_invoiceInfo.id')"/>
7+
<Column :header="$t('c_invoiceInfo.Name')" field="user.firstName">
88
<template #body="slotProps">
99
{{ `${slotProps.data.user.firstName} ${slotProps.data.user.lastName}` }}
1010
</template>
1111
</Column>
12-
<Column field="balance.amount" header="Balance">
12+
<Column field="balance.amount" :header="$t('c_invoiceInfo.Balance')">
1313
<template #body="slotProps">
1414
{{ formatPrice(slotProps.data.balance.amount) }}
1515
</template>
@@ -35,7 +35,7 @@
3535

3636
</DataTable>
3737
</CardComponent>
38-
<FormDialog v-model="showDialog" :form="form" :header="$t('invoice.Create invoice')">
38+
<FormDialog v-model="showDialog" :form="form" :header="$t('invoice.CreateInvoice')">
3939
<template #form="slotProps">
4040
<InvoiceCreateForm :form="slotProps.form" @submit:success="showDialog = false"/>
4141
</template>
@@ -61,7 +61,6 @@ interface InvoiceableUserWithBalance {
6161
balance: BalanceResponse;
6262
}
6363
64-
const authStore = useAuthStore();
6564
const userStore = useUserStore();
6665
const invoiceableUsers: Ref<UserResponse[]> = ref([]);
6766
const balances: Ref<BalanceResponse[]> = ref([]);

apps/dashboard/src/modules/financial/components/invoice/forms/InvoiceCreateForm.vue

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,61 @@
22
<span class="text-gray-700">{{ `Creating invoice for ${form.model.for.value.value.firstName} ${form.model.for.value.value.lastName} as ` }}</span>
33
<UserLink :user="form.model.by.value.value"/>
44
<div class="flex flex-column justify-content-between gap-2">
5-
<InputSpan :label="$t('invoice.Description')"
5+
<InputSpan :label="$t('c_invoiceInfo.Description')"
66
:value="form.model.description.value.value"
77
:attributes="form.model.description.attr.value"
88
@update:value="form.context.setFieldValue('description', $event)"
99
:errors="form.context.errors.value.description"
1010
id="description" placeholder="Invoice Description" type="textarea"/>
11-
<InputSpan :label="$t('invoice.Reference')"
11+
<InputSpan :label="$t('c_invoiceInfo.Reference')"
1212
:value="form.model.reference.value.value"
1313
:attributes="form.model.reference.attr.value"
1414
@update:value="form.context.setFieldValue('reference', $event)"
1515
:errors="form.context.errors.value.reference"
1616
id="reference" placeholder="Invoice Reference" type="text"/>
17-
<InputSpan :label="$t('invoice.Date')"
17+
<InputSpan :label="$t('c_invoiceInfo.Date')"
1818
:value="form.model.date.value.value"
1919
:attributes="form.model.date.attr.value"
2020
@update:value="form.context.setFieldValue('date', $event)"
2121
:errors="form.context.errors.value.date"
2222
id="date" placeholder="Invoice Date" type="date"/>
23-
<InputSpan :label="$t('invoice.Addressee')"
23+
<InputSpan :label="$t('c_invoiceInfo.Addressee')"
2424
:value="form.model.addressee.value.value"
2525
:attributes="form.model.addressee.attr.value"
2626
@update:value="form.context.setFieldValue('addressee', $event)"
2727
:errors="form.context.errors.value.addressee"
2828
id="addressee" placeholder="Addressee" type="text"/>
29-
<InputSpan :label="$t('invoice.Attention')"
29+
<InputSpan :label="$t('c_invoiceInfo.Attention')"
3030
:value="form.model.attention.value.value"
3131
:attributes="form.model.attention.attr.value"
3232
@update:value="form.context.setFieldValue('attention', $event)"
3333
:errors="form.context.errors.value.attention"
3434
id="attention" placeholder="Attention" type="text"/>
35-
<InputSpan :label="$t('invoice.Street')"
35+
<InputSpan :label="$t('c_invoiceInfo.Street')"
3636
:value="form.model.street.value.value"
3737
:attributes="form.model.street.attr.value"
3838
@update:value="form.context.setFieldValue('street', $event)"
3939
:errors="form.context.errors.value.street"
4040
id="street" placeholder="Street" type="text"/>
41-
<InputSpan :label="$t('invoice.Postal code')"
41+
<InputSpan :label="$t('c_invoiceInfo.Postal code')"
4242
:value="form.model.postalCode.value.value"
4343
:attributes="form.model.postalCode.attr.value"
4444
@update:value="form.context.setFieldValue('postalCode', $event)"
4545
:errors="form.context.errors.value.postalCode"
4646
id="postalCode" placeholder="Postal code" type="text"/>
47-
<InputSpan :label="$t('invoice.City')"
47+
<InputSpan :label="$t('c_invoiceInfo.City')"
4848
:value="form.model.city.value.value"
4949
:attributes="form.model.city.attr.value"
5050
@update:value="form.context.setFieldValue('city', $event)"
5151
:errors="form.context.errors.value.city"
5252
id="city" placeholder="City" type="text"/>
53-
<InputSpan :label="$t('invoice.Country')"
53+
<InputSpan :label="$t('c_invoiceInfo.Country')"
5454
:value="form.model.country.value.value"
5555
:attributes="form.model.country.attr.value"
5656
@update:value="form.context.setFieldValue('country', $event)"
5757
:errors="form.context.errors.value.country"
5858
id="country" placeholder="Country" type="text"/>
59-
<InputSpan :label="$t('invoice.Is credit invoice')"
59+
<InputSpan :label="$t('c_invoiceInfo.IsCreditInvoice')"
6060
:value="form.model.isCreditInvoice.value.value"
6161
:attributes="form.model.isCreditInvoice.attr.value"
6262
@update:value="form.context.setFieldValue('isCreditInvoice', $event)"

0 commit comments

Comments
 (0)