Complete dashboard translations & small UI improvements (#69)

* fix dropdown action Estimate Dashboard and fix translating full Dasboard page

* Update app.php

* fix locale in app.php config

* Wizard install with translation, customer portal with translation, and fixing hardcoding strings to get translation

* fixes asked to review

* fixes pint

---------

Co-authored-by: Max <contact@agencetwogether.fr>
Co-authored-by: Darko Gjorgjijoski <5760249+gdarko@users.noreply.github.com>
This commit is contained in:
agencetwogether
2024-06-05 12:07:46 +02:00
committed by GitHub
parent 3259173066
commit 3b61440e1f
89 changed files with 925 additions and 213 deletions

View File

@@ -30,6 +30,10 @@
<span class="text-xs text-gray-500"> ({{ row.data.slug }})</span>
</template>
<template #cell-model_type="{ row }">
{{ getModelType(row.data.model_type) }}
</template>
<template #cell-is_required="{ row }">
<BaseBadge
:bg-color="
@@ -147,4 +151,21 @@ function addCustomField() {
async function refreshTable() {
table.value && table.value.refresh()
}
function getModelType(type) {
switch (type) {
case 'Customer':
return t('settings.custom_fields.model_type.customer')
case 'Invoice':
return t('settings.custom_fields.model_type.invoice')
case 'Estimate':
return t('settings.custom_fields.model_type.estimate')
case 'Expense':
return t('settings.custom_fields.model_type.expense')
case 'Payment':
return t('settings.custom_fields.model_type.payment')
default:
return type
}
}
</script>

View File

@@ -31,7 +31,7 @@
.color
"
>
{{ row.data.set_as_default ? 'Yes' : 'No'.replace('_', ' ') }}
{{ row.data.set_as_default ? $t('general.yes') : $t('general.no').replace('_', ' ') }}
</BaseBadge>
</template>

View File

@@ -31,6 +31,9 @@
:load-data="refreshTable"
/>
</template>
<template #cell-type="{ row }">
{{ getLabelNote(row.data.type) }}
</template>
</BaseTable>
</BaseSettingCard>
</template>
@@ -113,4 +116,17 @@ async function openNoteSelectModal() {
async function refreshTable() {
table.value && table.value.refresh()
}
function getLabelNote(type) {
switch (type) {
case 'Estimate':
return t('settings.customization.notes.types.estimate')
case 'Invoice':
return t('settings.customization.notes.types.invoice')
case 'Payment':
return t('settings.customization.notes.types.payment')
default:
return type
}
}
</script>

View File

@@ -95,7 +95,7 @@
<BaseMultiselect
v-model="settingsForm.fiscal_year"
:content-loading="isFetchingInitialData"
:options="globalStore.config.fiscal_years"
:options="fiscalYearsList"
label="key"
value-prop="value"
:invalid="v$.fiscal_year.$error"
@@ -197,6 +197,14 @@ const retrospectiveEditOptions = computed(() => {
})
})
const fiscalYearsList = computed(() => {
return globalStore.config.fiscal_years.map((item) => {
return Object.assign({}, item, {
key: t(item.key),
})
})
})
watch(
() => settingsForm.carbon_date_format,
(val) => {

View File

@@ -43,7 +43,7 @@
border-t border-b border-gray-200 border-solid
"
>
Component
{{ $t('settings.customization.component') }}
</th>
<th
class="
@@ -57,7 +57,7 @@
border-t border-b border-gray-200 border-solid
"
>
Parameter
{{ $t('settings.customization.Parameter') }}
</th>
<th
class="
@@ -126,7 +126,7 @@
variant="white"
@click.prevent="removeComponent(element)"
>
Remove
{{ $t('general.remove') }}
<template #left="slotProps">
<BaseIcon
name="XIcon"