From 3b61440e1f710d590d5d6dc8903bc7a3dbebffd4 Mon Sep 17 00:00:00 2001
From: agencetwogether <53862310+agencetwogether@users.noreply.github.com>
Date: Wed, 5 Jun 2024 12:07:46 +0200
Subject: [PATCH] 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
Co-authored-by: Darko Gjorgjijoski <5760249+gdarko@users.noreply.github.com>
---
.../Customer/CustomerStatsController.php | 2 +-
.../Admin/Dashboard/DashboardController.php | 2 +-
.../Report/CustomerSalesReportController.php | 4 +-
.../Admin/Report/ExpensesReportController.php | 4 +-
.../Report/ItemSalesReportController.php | 4 +-
.../Report/ProfitLossReportController.php | 4 +-
.../Report/TaxSummaryReportController.php | 4 +-
.../Customer/General/BootstrapController.php | 1 +
.../V1/Installation/LanguagesController.php | 21 +++
.../OnboardingWizardController.php | 11 ++
app/Http/Resources/RoleResource.php | 2 +-
app/Mail/EstimateViewedMail.php | 1 +
app/Mail/InvoiceViewedMail.php | 1 +
app/Models/Customer.php | 2 +-
app/Models/Estimate.php | 4 +-
app/Models/Expense.php | 4 +-
app/Models/Invoice.php | 4 +-
app/Models/Item.php | 2 +-
app/Models/Payment.php | 4 +-
app/Models/RecurringInvoice.php | 4 +-
app/Space/DateFormatter.php | 2 +-
app/Space/EnvironmentManager.php | 2 +-
config/app.php | 2 +-
config/invoiceshelf.php | 34 ++---
lang/en.json | 117 +++++++++++++--
lang/fr.json | 127 +++++++++++++++--
.../admin/components/CopyInputField.vue | 2 +-
.../modal-components/CustomerModal.vue | 2 +-
.../components/modal-components/NoteModal.vue | 10 +-
.../modal-components/SendEstimateModal.vue | 4 +-
.../modal-components/SendInvoiceModal.vue | 4 +-
.../modal-components/SendPaymentModal.vue | 4 +-
.../custom-fields/CustomFieldModal.vue | 14 +-
.../scripts/admin/stores/installation.js | 29 ++++
.../scripts/admin/stores/recurring-invoice.js | 22 +--
.../scripts/admin/stub/recurring-invoice.js | 4 +-
.../scripts/admin/views/customers/Create.vue | 2 +-
.../customers/partials/CustomerChart.vue | 4 +-
.../views/customers/partials/CustomerInfo.vue | 9 +-
.../admin/views/dashboard/DashboardChart.vue | 5 +-
.../admin/views/dashboard/DashboardStats.vue | 6 +-
.../admin/views/dashboard/DashboardTable.vue | 2 +-
.../scripts/admin/views/estimates/Index.vue | 15 +-
.../scripts/admin/views/estimates/View.vue | 2 +-
.../scripts/admin/views/expenses/Index.vue | 10 +-
.../admin/views/installation/Installation.vue | 13 +-
.../views/installation/Step0SetLanguage.vue | 85 +++++++++++
.../installation/Step3DatabaseConfig.vue | 8 ++
.../views/installation/Step4VerifyDomain.vue | 12 +-
.../installation/Step8CompanyPreferences.vue | 10 +-
.../scripts/admin/views/invoices/Index.vue | 22 ++-
.../scripts/admin/views/invoices/View.vue | 2 +-
.../scripts/admin/views/modules/Index.vue | 2 +-
.../scripts/admin/views/payments/Create.vue | 2 +-
.../scripts/admin/views/payments/Index.vue | 2 +-
.../admin/views/recurring-invoices/Index.vue | 8 +-
.../RecurringInvoiceCreateBasicFields.vue | 22 ++-
.../recurring-invoices/partials/Invoices.vue | 7 +-
.../partials/RecurringInvoiceViewSidebar.vue | 2 +-
.../admin/views/reports/SalesReports.vue | 11 +-
.../views/settings/CustomFieldsSetting.vue | 21 +++
.../admin/views/settings/FileDiskSetting.vue | 2 +-
.../admin/views/settings/NotesSetting.vue | 16 +++
.../views/settings/PreferencesSetting.vue | 10 +-
.../customization/NumberCustomizer.vue | 6 +-
.../scripts/components/GlobalSearchBar.vue | 2 +-
.../components/InvoiceInformationCard.vue | 2 +-
.../base-select/BaseMultiselect.vue | 4 +-
.../components/base/BaseDatePicker.vue | 133 ++++++++++++++++++
.../base/BaseEstimateStatusLabel.vue | 39 +++++
.../components/base/BaseFileUploader.vue | 6 +-
.../base/BaseInvoiceStatusLabel.vue | 43 ++++++
.../base/BaseRecurringInvoiceStatusLabel.vue | 31 ++++
.../components/base/base-table/BaseTable.vue | 2 +-
.../base/base-table/BaseTablePagination.vue | 12 +-
.../layouts/partials/TheSiteHeader.vue | 6 +-
resources/scripts/customer/stores/global.js | 8 +-
.../views/dashboard/DashboardStats.vue | 6 +-
.../views/dashboard/DashboardTable.vue | 4 +-
.../customer/views/estimates/Index.vue | 16 +--
.../scripts/customer/views/estimates/View.vue | 2 +-
.../scripts/customer/views/invoices/Index.vue | 14 +-
.../scripts/customer/views/invoices/View.vue | 2 +-
.../views/emails/send/estimate.blade.php | 2 +-
resources/views/emails/send/invoice.blade.php | 2 +-
resources/views/emails/send/payment.blade.php | 2 +-
.../views/emails/viewed/estimate.blade.php | 7 +-
.../views/emails/viewed/invoice.blade.php | 7 +-
routes/api.php | 4 +
89 files changed, 925 insertions(+), 213 deletions(-)
create mode 100755 app/Http/Controllers/V1/Installation/LanguagesController.php
create mode 100644 resources/scripts/admin/views/installation/Step0SetLanguage.vue
create mode 100644 resources/scripts/components/base/BaseEstimateStatusLabel.vue
create mode 100644 resources/scripts/components/base/BaseInvoiceStatusLabel.vue
create mode 100644 resources/scripts/components/base/BaseRecurringInvoiceStatusLabel.vue
diff --git a/app/Http/Controllers/V1/Admin/Customer/CustomerStatsController.php b/app/Http/Controllers/V1/Admin/Customer/CustomerStatsController.php
index 5fd034c5..f82aa001 100644
--- a/app/Http/Controllers/V1/Admin/Customer/CustomerStatsController.php
+++ b/app/Http/Controllers/V1/Admin/Customer/CustomerStatsController.php
@@ -88,7 +88,7 @@ class CustomerStatsController extends Controller
($receiptTotals[$i] - $expenseTotals[$i])
);
$i++;
- array_push($months, $start->format('M'));
+ array_push($months, $start->translatedFormat('M'));
$monthCounter++;
$end->startOfMonth();
$start->addMonth()->startOfMonth();
diff --git a/app/Http/Controllers/V1/Admin/Dashboard/DashboardController.php b/app/Http/Controllers/V1/Admin/Dashboard/DashboardController.php
index 23a47362..a0779312 100644
--- a/app/Http/Controllers/V1/Admin/Dashboard/DashboardController.php
+++ b/app/Http/Controllers/V1/Admin/Dashboard/DashboardController.php
@@ -91,7 +91,7 @@ class DashboardController extends Controller
($receipt_totals[$i] - $expense_totals[$i])
);
$i++;
- array_push($months, $start->format('M'));
+ array_push($months, $start->translatedFormat('M'));
$monthCounter++;
$end->startOfMonth();
$start->addMonth()->startOfMonth();
diff --git a/app/Http/Controllers/V1/Admin/Report/CustomerSalesReportController.php b/app/Http/Controllers/V1/Admin/Report/CustomerSalesReportController.php
index 94fd0596..a80ebf57 100644
--- a/app/Http/Controllers/V1/Admin/Report/CustomerSalesReportController.php
+++ b/app/Http/Controllers/V1/Admin/Report/CustomerSalesReportController.php
@@ -54,8 +54,8 @@ class CustomerSalesReportController extends Controller
}
$dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
- $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
- $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
+ $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->translatedFormat($dateFormat);
+ $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->translatedFormat($dateFormat);
$currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id));
$colors = [
diff --git a/app/Http/Controllers/V1/Admin/Report/ExpensesReportController.php b/app/Http/Controllers/V1/Admin/Report/ExpensesReportController.php
index 2ca998c1..fc1ad264 100644
--- a/app/Http/Controllers/V1/Admin/Report/ExpensesReportController.php
+++ b/app/Http/Controllers/V1/Admin/Report/ExpensesReportController.php
@@ -41,8 +41,8 @@ class ExpensesReportController extends Controller
}
$dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
- $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
- $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
+ $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->translatedFormat($dateFormat);
+ $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->translatedFormat($dateFormat);
$currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id));
$colors = [
diff --git a/app/Http/Controllers/V1/Admin/Report/ItemSalesReportController.php b/app/Http/Controllers/V1/Admin/Report/ItemSalesReportController.php
index 53c61014..684abe84 100644
--- a/app/Http/Controllers/V1/Admin/Report/ItemSalesReportController.php
+++ b/app/Http/Controllers/V1/Admin/Report/ItemSalesReportController.php
@@ -41,8 +41,8 @@ class ItemSalesReportController extends Controller
}
$dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
- $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
- $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
+ $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->translatedFormat($dateFormat);
+ $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->translatedFormat($dateFormat);
$currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id));
$colors = [
diff --git a/app/Http/Controllers/V1/Admin/Report/ProfitLossReportController.php b/app/Http/Controllers/V1/Admin/Report/ProfitLossReportController.php
index 16925e3f..a866b61c 100644
--- a/app/Http/Controllers/V1/Admin/Report/ProfitLossReportController.php
+++ b/app/Http/Controllers/V1/Admin/Report/ProfitLossReportController.php
@@ -47,8 +47,8 @@ class ProfitLossReportController extends Controller
}
$dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
- $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
- $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
+ $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->translatedFormat($dateFormat);
+ $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->translatedFormat($dateFormat);
$currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id));
$colors = [
diff --git a/app/Http/Controllers/V1/Admin/Report/TaxSummaryReportController.php b/app/Http/Controllers/V1/Admin/Report/TaxSummaryReportController.php
index a0c4c4a0..0e3a762d 100644
--- a/app/Http/Controllers/V1/Admin/Report/TaxSummaryReportController.php
+++ b/app/Http/Controllers/V1/Admin/Report/TaxSummaryReportController.php
@@ -42,8 +42,8 @@ class TaxSummaryReportController extends Controller
}
$dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
- $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
- $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
+ $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->translatedFormat($dateFormat);
+ $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->translatedFormat($dateFormat);
$currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id));
$colors = [
diff --git a/app/Http/Controllers/V1/Customer/General/BootstrapController.php b/app/Http/Controllers/V1/Customer/General/BootstrapController.php
index bfed72e7..f34f08ba 100644
--- a/app/Http/Controllers/V1/Customer/General/BootstrapController.php
+++ b/app/Http/Controllers/V1/Customer/General/BootstrapController.php
@@ -34,6 +34,7 @@ class BootstrapController extends Controller
'menu' => $menu,
'current_customer_currency' => Currency::find($customer->currency_id),
'modules' => Module::where('enabled', true)->pluck('name'),
+ 'current_company_language' => CompanySetting::getSetting('language', $customer->company_id),
]]);
}
}
diff --git a/app/Http/Controllers/V1/Installation/LanguagesController.php b/app/Http/Controllers/V1/Installation/LanguagesController.php
new file mode 100755
index 00000000..f6451616
--- /dev/null
+++ b/app/Http/Controllers/V1/Installation/LanguagesController.php
@@ -0,0 +1,21 @@
+json([
+ 'languages' => config('invoiceshelf.languages'),
+ ]);
+ }
+}
diff --git a/app/Http/Controllers/V1/Installation/OnboardingWizardController.php b/app/Http/Controllers/V1/Installation/OnboardingWizardController.php
index 20e278ec..9224fa8b 100644
--- a/app/Http/Controllers/V1/Installation/OnboardingWizardController.php
+++ b/app/Http/Controllers/V1/Installation/OnboardingWizardController.php
@@ -19,11 +19,13 @@ class OnboardingWizardController extends Controller
if (! InstallUtils::dbMarkerExists()) {
return response()->json([
'profile_complete' => 0,
+ 'profile_language' => 'en',
]);
}
return response()->json([
'profile_complete' => Setting::getSetting('profile_complete'),
+ 'profile_language' => Setting::getSetting('profile_language'),
]);
}
@@ -43,4 +45,13 @@ class OnboardingWizardController extends Controller
'profile_complete' => Setting::getSetting('profile_complete'),
]);
}
+
+ public function saveLanguage(Request $request)
+ {
+ Setting::setSetting('profile_language', $request->profile_language);
+
+ return response()->json([
+ 'profile_language' => Setting::getSetting('profile_language'),
+ ]);
+ }
}
diff --git a/app/Http/Resources/RoleResource.php b/app/Http/Resources/RoleResource.php
index 9450a485..9aa0954c 100644
--- a/app/Http/Resources/RoleResource.php
+++ b/app/Http/Resources/RoleResource.php
@@ -29,6 +29,6 @@ class RoleResource extends JsonResource
{
$dateFormat = CompanySetting::getSetting('carbon_date_format', $this->scope);
- return Carbon::parse($this->created_at)->format($dateFormat);
+ return Carbon::parse($this->created_at)->translatedFormat($dateFormat);
}
}
diff --git a/app/Mail/EstimateViewedMail.php b/app/Mail/EstimateViewedMail.php
index af816cde..b9e1bfe9 100644
--- a/app/Mail/EstimateViewedMail.php
+++ b/app/Mail/EstimateViewedMail.php
@@ -31,6 +31,7 @@ class EstimateViewedMail extends Mailable
public function build()
{
return $this->from(config('mail.from.address'), config('mail.from.name'))
+ ->subject(__('notification_view_estimate'))
->markdown('emails.viewed.estimate', ['data', $this->data]);
}
}
diff --git a/app/Mail/InvoiceViewedMail.php b/app/Mail/InvoiceViewedMail.php
index 40ee0eef..a43b8662 100644
--- a/app/Mail/InvoiceViewedMail.php
+++ b/app/Mail/InvoiceViewedMail.php
@@ -31,6 +31,7 @@ class InvoiceViewedMail extends Mailable
public function build()
{
return $this->from(config('mail.from.address'), config('mail.from.name'))
+ ->subject(__('notification_view_invoice'))
->markdown('emails.viewed.invoice', ['data', $this->data]);
}
}
diff --git a/app/Models/Customer.php b/app/Models/Customer.php
index 101efdd8..47eb2d65 100644
--- a/app/Models/Customer.php
+++ b/app/Models/Customer.php
@@ -54,7 +54,7 @@ class Customer extends Authenticatable implements HasMedia
{
$dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
- return Carbon::parse($this->created_at)->format($dateFormat);
+ return Carbon::parse($this->created_at)->translatedFormat($dateFormat);
}
public function setPasswordAttribute($value)
diff --git a/app/Models/Estimate.php b/app/Models/Estimate.php
index 43d8684e..395fee5b 100644
--- a/app/Models/Estimate.php
+++ b/app/Models/Estimate.php
@@ -112,14 +112,14 @@ class Estimate extends Model implements HasMedia
{
$dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
- return Carbon::parse($this->expiry_date)->format($dateFormat);
+ return Carbon::parse($this->expiry_date)->translatedFormat($dateFormat);
}
public function getFormattedEstimateDateAttribute($value)
{
$dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
- return Carbon::parse($this->estimate_date)->format($dateFormat);
+ return Carbon::parse($this->estimate_date)->translatedFormat($dateFormat);
}
public function scopeEstimatesBetween($query, $start, $end)
diff --git a/app/Models/Expense.php b/app/Models/Expense.php
index c7d297bc..ef46b514 100644
--- a/app/Models/Expense.php
+++ b/app/Models/Expense.php
@@ -72,14 +72,14 @@ class Expense extends Model implements HasMedia
{
$dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
- return Carbon::parse($this->expense_date)->format($dateFormat);
+ return Carbon::parse($this->expense_date)->translatedFormat($dateFormat);
}
public function getFormattedCreatedAtAttribute($value)
{
$dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
- return Carbon::parse($this->created_at)->format($dateFormat);
+ return Carbon::parse($this->created_at)->translatedFormat($dateFormat);
}
public function getReceiptUrlAttribute($value)
diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php
index 84e0361a..7bcc754f 100644
--- a/app/Models/Invoice.php
+++ b/app/Models/Invoice.php
@@ -189,14 +189,14 @@ class Invoice extends Model implements HasMedia
{
$dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
- return Carbon::parse($this->due_date)->format($dateFormat);
+ return Carbon::parse($this->due_date)->translatedFormat($dateFormat);
}
public function getFormattedInvoiceDateAttribute($value)
{
$dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
- return Carbon::parse($this->invoice_date)->format($dateFormat);
+ return Carbon::parse($this->invoice_date)->translatedFormat($dateFormat);
}
public function scopeWhereStatus($query, $status)
diff --git a/app/Models/Item.php b/app/Models/Item.php
index 9be3b144..a73b62b4 100644
--- a/app/Models/Item.php
+++ b/app/Models/Item.php
@@ -111,7 +111,7 @@ class Item extends Model
{
$dateFormat = CompanySetting::getSetting('carbon_date_format', request()->header('company'));
- return Carbon::parse($this->created_at)->format($dateFormat);
+ return Carbon::parse($this->created_at)->translatedFormat($dateFormat);
}
public function taxes(): HasMany
diff --git a/app/Models/Payment.php b/app/Models/Payment.php
index 423f6964..be7cb407 100644
--- a/app/Models/Payment.php
+++ b/app/Models/Payment.php
@@ -74,14 +74,14 @@ class Payment extends Model implements HasMedia
{
$dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
- return Carbon::parse($this->created_at)->format($dateFormat);
+ return Carbon::parse($this->created_at)->translatedFormat($dateFormat);
}
public function getFormattedPaymentDateAttribute($value)
{
$dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
- return Carbon::parse($this->payment_date)->format($dateFormat);
+ return Carbon::parse($this->payment_date)->translatedFormat($dateFormat);
}
public function getPaymentPdfUrlAttribute()
diff --git a/app/Models/RecurringInvoice.php b/app/Models/RecurringInvoice.php
index 8afbeed9..6e71f619 100644
--- a/app/Models/RecurringInvoice.php
+++ b/app/Models/RecurringInvoice.php
@@ -57,14 +57,14 @@ class RecurringInvoice extends Model
{
$dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
- return Carbon::parse($this->starts_at)->format($dateFormat);
+ return Carbon::parse($this->starts_at)->translatedFormat($dateFormat);
}
public function getFormattedNextInvoiceAtAttribute()
{
$dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
- return Carbon::parse($this->next_invoice_at)->format($dateFormat);
+ return Carbon::parse($this->next_invoice_at)->translatedFormat($dateFormat);
}
public function getFormattedLimitDateAttribute()
diff --git a/app/Space/DateFormatter.php b/app/Space/DateFormatter.php
index b3b58ecd..7510b83d 100644
--- a/app/Space/DateFormatter.php
+++ b/app/Space/DateFormatter.php
@@ -47,7 +47,7 @@ class DateFormatter
foreach (static::$formats as $format) {
$new[] = [
- 'display_date' => Carbon::now()->format($format['carbon_format']),
+ 'display_date' => Carbon::now()->translatedFormat($format['carbon_format']),
'carbon_format_value' => $format['carbon_format'],
'moment_format_value' => $format['moment_format'],
];
diff --git a/app/Space/EnvironmentManager.php b/app/Space/EnvironmentManager.php
index df87732b..571251ca 100755
--- a/app/Space/EnvironmentManager.php
+++ b/app/Space/EnvironmentManager.php
@@ -103,9 +103,9 @@ class EnvironmentManager
*/
public function saveDatabaseVariables(DatabaseEnvironmentRequest $request)
{
-
$dbEnv = [
'APP_URL' => $request->get('app_url'),
+ 'APP_LOCALE' => $request->get('app_locale'),
'DB_CONNECTION' => $request->get('database_connection'),
'SANCTUM_STATEFUL_DOMAINS' => $request->get('app_domain'),
'SESSION_DOMAIN' => explode(':', $request->get('app_domain'))[0],
diff --git a/config/app.php b/config/app.php
index efd5f969..b17b818c 100644
--- a/config/app.php
+++ b/config/app.php
@@ -11,4 +11,4 @@ return [
'Redis' => Illuminate\Support\Facades\Redis::class,
])->toArray(),
-];
+];
\ No newline at end of file
diff --git a/config/invoiceshelf.php b/config/invoiceshelf.php
index 75b29e94..e3305d38 100644
--- a/config/invoiceshelf.php
+++ b/config/invoiceshelf.php
@@ -78,18 +78,18 @@ return [
* List of Fiscal Years
*/
'fiscal_years' => [
- ['key' => 'january-december', 'value' => '1-12'],
- ['key' => 'february-january', 'value' => '2-1'],
- ['key' => 'march-february', 'value' => '3-2'],
- ['key' => 'april-march', 'value' => '4-3'],
- ['key' => 'may-april', 'value' => '5-4'],
- ['key' => 'june-may', 'value' => '6-5'],
- ['key' => 'july-june', 'value' => '7-6'],
- ['key' => 'august-july', 'value' => '8-7'],
- ['key' => 'september-august', 'value' => '9-8'],
- ['key' => 'october-september', 'value' => '10-9'],
- ['key' => 'november-october', 'value' => '11-10'],
- ['key' => 'december-november', 'value' => '12-11'],
+ ['key' => 'settings.preferences.fiscal_years.january_december', 'value' => '1-12'],
+ ['key' => 'settings.preferences.fiscal_years.february_january', 'value' => '2-1'],
+ ['key' => 'settings.preferences.fiscal_years.march_february', 'value' => '3-2'],
+ ['key' => 'settings.preferences.fiscal_years.april_march', 'value' => '4-3'],
+ ['key' => 'settings.preferences.fiscal_years.may_april', 'value' => '5-4'],
+ ['key' => 'settings.preferences.fiscal_years.june_may', 'value' => '6-5'],
+ ['key' => 'settings.preferences.fiscal_years.july_june', 'value' => '7-6'],
+ ['key' => 'settings.preferences.fiscal_years.august_july', 'value' => '8-7'],
+ ['key' => 'settings.preferences.fiscal_years.september_august', 'value' => '9-8'],
+ ['key' => 'settings.preferences.fiscal_years.october_september', 'value' => '10-9'],
+ ['key' => 'settings.preferences.fiscal_years.november_october', 'value' => '11-10'],
+ ['key' => 'settings.preferences.fiscal_years.december_november', 'value' => '12-11'],
],
/*
@@ -408,7 +408,7 @@ return [
*/
'customer_menu' => [
[
- 'title' => 'Dashboard',
+ 'title' => 'navigation.dashboard',
'link' => '/customer/dashboard',
'icon' => '',
'name' => '',
@@ -418,7 +418,7 @@ return [
'model' => '',
],
[
- 'title' => 'Invoices',
+ 'title' => 'navigation.invoices',
'link' => '/customer/invoices',
'icon' => '',
'name' => '',
@@ -428,7 +428,7 @@ return [
'model' => '',
],
[
- 'title' => 'Estimates',
+ 'title' => 'navigation.estimates',
'link' => '/customer/estimates',
'icon' => '',
'name' => '',
@@ -438,7 +438,7 @@ return [
'model' => '',
],
[
- 'title' => 'Payments',
+ 'title' => 'navigation.payments',
'link' => '/customer/payments',
'icon' => '',
'name' => '',
@@ -448,7 +448,7 @@ return [
'model' => '',
],
[
- 'title' => 'Settings',
+ 'title' => 'navigation.settings',
'link' => '/customer/settings',
'icon' => '',
'name' => '',
diff --git a/lang/en.json b/lang/en.json
index 9e042c29..3162e19e 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -100,16 +100,35 @@
"pay_invoice": "Pay Invoice",
"login_successfully": "Logged in successfully!",
"logged_out_successfully": "Logged out successfully",
- "mark_as_default": "Mark as default"
+ "mark_as_default": "Mark as default",
+ "no_data_found": "No data found",
+ "pagination": {
+ "previous": "Previous",
+ "next": "Next",
+ "showing": "Showing",
+ "to": "to",
+ "of": "of",
+ "results": "results"
+ },
+ "file_upload": {
+ "drag_a_file": "Drag a file here or",
+ "browse": "browse",
+ "to_choose": "to choose a file"
+ },
+ "multiselect": {
+ "the_list_is_empty": "The list is empty",
+ "no_results_found": "No results found"
+ },
+ "copy_to_clipboard": "Copy to Clipboard"
},
"dashboard": {
"select_year": "Select year",
"cards": {
"due_amount": "Amount Due",
- "customers": "Customers",
- "invoices": "Invoices",
- "estimates": "Estimates",
- "payments": "Payments"
+ "customers": "Customer | Customers",
+ "invoices": "Invoice | Invoices",
+ "estimates": "Estimate | Estimates",
+ "payments": "Payment | Payments"
},
"chart_info": {
"total_sales": "Sales",
@@ -548,7 +567,18 @@
"hour": "Hour",
"day_month": "Day of month",
"month": "Month",
- "day_week": "Day of week"
+ "day_week": "Day of week",
+ "every_minute": "Every Minute",
+ "every_30_minute": "Every 30 Minute",
+ "every_hour": "Every Hour",
+ "every_2_hour": "Every 2 Hour",
+ "every_day_at_midnight": "Every day at midnight",
+ "every_week": "Every Week",
+ "every_15_days_at_midnight": "Every 15 days at midnight",
+ "on_the_first_day_of_every_month_at_midnight": "On the first day of every month at 00:00",
+ "every_6_month": "Every 6 Month",
+ "every_year_on_the_first_day_of_january_at_midnight": "Every year on the first day of january at 00:00",
+ "custom": "Custom"
},
"confirm_delete": "You will not be able to recover this Invoice | You will not be able to recover these Invoices",
"created_message": "Recurring Invoice created successfully",
@@ -557,7 +587,12 @@
"marked_as_sent_message": "Recurring Invoice marked as sent successfully",
"user_email_does_not_exist": "User email does not exist",
"something_went_wrong": "something went wrong",
- "invalid_due_amount_message": "Total Recurring Invoice amount cannot be less than total paid amount for this Recurring Invoice. Please update the invoice or delete the associated payments to continue."
+ "invalid_due_amount_message": "Total Recurring Invoice amount cannot be less than total paid amount for this Recurring Invoice. Please update the invoice or delete the associated payments to continue.",
+ "limit": {
+ "none": "None",
+ "date": "Date",
+ "count": "Count"
+ }
},
"payments": {
"title": "Payments",
@@ -595,7 +630,8 @@
"created_message": "Payment created successfully",
"updated_message": "Payment updated successfully",
"deleted_message": "Payment deleted successfully | Payments deleted successfully",
- "invalid_amount_message": "Payment amount is invalid"
+ "invalid_amount_message": "Payment amount is invalid",
+ "amount_due": "Due Amount"
},
"expenses": {
"title": "Expenses",
@@ -700,7 +736,8 @@
"installed": "Installed",
"no_modules_installed": "No Modules Installed Yet!",
"disable_warning": "All the settings for this particular will be reverted.",
- "what_you_get": "What you get"
+ "what_you_get": "What you get",
+ "sign_up_and_get_token": "Sign up & Get Token"
},
"users": {
"title": "Users",
@@ -752,7 +789,11 @@
"date_range": "Select Date Range",
"to_date": "To Date",
"from_date": "From Date",
- "report_type": "Report Type"
+ "report_type": "Report Type",
+ "sort": {
+ "by_customer": "By Customer",
+ "by_item": "By Item"
+ }
},
"taxes": {
"taxes": "Taxes",
@@ -920,7 +961,14 @@
"added_message": "Custom Field added successfully",
"press_enter_to_add": "Press enter to add new option",
"model_in_use": "Cannot update model for fields which are already in use.",
- "type_in_use": "Cannot update type for fields which are already in use."
+ "type_in_use": "Cannot update type for fields which are already in use.",
+ "model_type": {
+ "customer": "Customer",
+ "invoice": "Invoice",
+ "estimate": "Estimate",
+ "expense": "Expense",
+ "payment": "Payment"
+ }
},
"customization": {
"customization": "customization",
@@ -1041,7 +1089,12 @@
"note_updated": "Note Updated successfully",
"note_confirm_delete": "You will not be able to recover this Note",
"already_in_use": "Note is already in use",
- "deleted_message": "Note deleted successfully"
+ "deleted_message": "Note deleted successfully",
+ "types": {
+ "estimate": "Estimate",
+ "invoice": "Invoice",
+ "payment": "Payment"
+ }
}
},
"account_settings": {
@@ -1196,7 +1249,21 @@
"on_hold": "On Hold",
"update_status": "Update Status",
"completed": "Completed",
- "company_currency_unchangeable": "Company currency cannot be changed"
+ "company_currency_unchangeable": "Company currency cannot be changed",
+ "fiscal_years": {
+ "january_december": "January - December",
+ "february_january": "February - January",
+ "march_february": "March - February",
+ "april_march": "April - March",
+ "may_april": "May - April",
+ "june_may": "June - May",
+ "july_june": "July - June",
+ "august_july": "August - July",
+ "september_august": "September - August",
+ "october_september": "October - September",
+ "november_october": "November - October",
+ "december_november": "December - November"
+ }
},
"update_app": {
"title": "Update App",
@@ -1355,6 +1422,10 @@
"next": "Next",
"continue": "Continue",
"skip": "Skip",
+ "install_language": {
+ "title": "Choose your language",
+ "description": "Select language wizard to install InvoiceShelf"
+ },
"database": {
"database": "Site URL & Database",
"connection": "Database Connection",
@@ -1381,7 +1452,14 @@
"verify_now": "Verify Now",
"success": "Domain Verify Successfully.",
"failed": "Domain verification failed. Please enter valid domain name.",
- "verify_and_continue": "Verify And Continue"
+ "verify_and_continue": "Verify And Continue",
+ "notes": {
+ "notes" : "Notes:",
+ "not_contain" : "App domain should not contain",
+ "or" : "or",
+ "in_front": "in front of the domain.",
+ "if_you": "If you're accessing the website on a different port, please mention the port. For example:"
+ }
},
"mail": {
"host": "Mail Host",
@@ -1532,5 +1610,14 @@
"pdf_received_from": "Received from:",
"pdf_tax_label": "Tax",
"pdf_tax_id": "Tax-ID",
- "pdf_vat_id": "VAT-ID"
+ "pdf_vat_id": "VAT-ID",
+ "mail_thanks": "Thanks",
+ "mail_view_estimate":"View Estimate",
+ "mail_viewed_estimate": ":name viewed this Estimate.",
+ "mail_view_invoice": "View Invoice",
+ "mail_viewed_invoice": ":name viewed this Invoice.",
+ "mail_view_payment": "View Payment",
+ "notification_view_estimate": "[Notification] Estimate viewed",
+ "notification_view_invoice": "[Notification] Invoice viewed",
+ "You have received a new invoice from {COMPANY_NAME} . Please download using the button below:": "You have received a new invoice from {COMPANY_NAME} . Please download using the button below:"
}
diff --git a/lang/fr.json b/lang/fr.json
index 28410ad1..d0bf8983 100644
--- a/lang/fr.json
+++ b/lang/fr.json
@@ -100,16 +100,35 @@
"pay_invoice": "Payer facture",
"login_successfully": "Identifié avec succès!",
"logged_out_successfully": "Déconnecté avec succès",
- "mark_as_default": "Marquer par défaut"
+ "mark_as_default": "Marquer par défaut",
+ "no_data_found": "Aucune donnée pour le moment",
+ "pagination": {
+ "previous": "Précédent",
+ "next": "Suivant",
+ "showing": "Affichage de",
+ "to": "à",
+ "of": "sur",
+ "results": "résultats"
+ },
+ "file_upload": {
+ "drag_a_file": "Déposez un fichier ici ou",
+ "browse": "parcourez",
+ "to_choose": "pour choisir un fichier"
+ },
+ "multiselect": {
+ "the_list_is_empty": "La liste est vide",
+ "no_results_found": "Aucun résultat"
+ },
+ "copy_to_clipboard": "Copier dans le presse-papier"
},
"dashboard": {
"select_year": "Sélectionnez l'année",
"cards": {
"due_amount": "Encours clients",
- "customers": "Clients",
- "invoices": "Factures",
- "estimates": "Devis",
- "payments": "Paiements"
+ "customers": "Client | Clients",
+ "invoices": "Facture | Factures",
+ "estimates": "Devis | Devis",
+ "payments": "Paiement | Paiements"
},
"chart_info": {
"total_sales": "Ventes",
@@ -548,7 +567,18 @@
"hour": "Heure",
"day_month": "Jour du mois",
"month": "Mois",
- "day_week": "Jour de la semaine"
+ "day_week": "Jour de la semaine",
+ "every_minute": "Toutes les minutes",
+ "every_30_minute": "Toutes les 30 minutes",
+ "every_hour": "Toutes les heures",
+ "every_2_hour": "Toutes les 2 heures",
+ "every_day_at_midnight": "Tous les jours à minuit",
+ "every_week": "Toutes les semaines",
+ "every_15_days_at_midnight": "Tous les 15 jours à minuit",
+ "on_the_first_day_of_every_month_at_midnight": "Au premier jour du mois à minuit",
+ "every_6_month": "Tous les 6 mois",
+ "every_year_on_the_first_day_of_january_at_midnight": "Tous les ans, au premier janvier à minuit",
+ "custom": "Personnalisée"
},
"confirm_delete": "Vous ne pourrez pas récupérer cette facture | Vous ne pourrez pas récupérer ces factures",
"created_message": "Facture récurrente créée",
@@ -557,7 +587,12 @@
"marked_as_sent_message": "Facture récurrente envoyée",
"user_email_does_not_exist": "L'email de l'utilisateur n'existe pas",
"something_went_wrong": "une erreur s’est produite",
- "invalid_due_amount_message": "Le montant total de la facture récurrente ne peut pas être inférieur au montant total payé pour cette facture récurrente. Veuillez mettre à jour la facture ou supprimer les paiements associés pour continuer."
+ "invalid_due_amount_message": "Le montant total de la facture récurrente ne peut pas être inférieur au montant total payé pour cette facture récurrente. Veuillez mettre à jour la facture ou supprimer les paiements associés pour continuer.",
+ "limit": {
+ "none": "Aucun",
+ "date": "Date",
+ "count": "Nombre"
+ }
},
"payments": {
"title": "Paiements",
@@ -595,7 +630,8 @@
"created_message": "Paiement créé",
"updated_message": "Paiement mis à jour",
"deleted_message": "Paiement supprimé | Paiements supprimés",
- "invalid_amount_message": "Le montant du paiement est invalide"
+ "invalid_amount_message": "Le montant du paiement est invalide",
+ "amount_due": "Montant dû"
},
"expenses": {
"title": "Dépenses",
@@ -700,7 +736,8 @@
"installed": "Installé",
"no_modules_installed": "Aucun module installé !",
"disable_warning": "Tous les paramètres de ce module seront réinitialisés.",
- "what_you_get": "Ce que vous obtenez"
+ "what_you_get": "Ce que vous obtenez",
+ "sign_up_and_get_token": "Inscrivez-vous et obtenez votre Jeton"
},
"users": {
"title": "Utilisateurs",
@@ -752,7 +789,11 @@
"date_range": "Période",
"to_date": "Au",
"from_date": "Du",
- "report_type": "Trier"
+ "report_type": "Trier",
+ "sort": {
+ "by_customer": "Par Client",
+ "by_item": "Par Article"
+ }
},
"taxes": {
"taxes": "Taxes",
@@ -863,6 +904,8 @@
"company_info": {
"company_info": "Coordonnées de la société",
"company_name": "Nom",
+ "tax_id": "Numéro d'identification fiscale",
+ "vat_id": "Numéro d'identification TVA",
"company_logo": "Logo",
"section_description": "Saisissez ici les coordonnées de votre entreprise qui s'afficheront sur tous vos documents.",
"phone": "Téléphone",
@@ -918,7 +961,14 @@
"added_message": "Champ personnalisé ajouté",
"press_enter_to_add": "Appuyez sur Entrée pour ajouter une nouvelle option",
"model_in_use": "Impossible de mettre à jour le modèle pour les champs qui sont déjà utilisés.",
- "type_in_use": "Impossible de mettre à jour le type des champs déjà utilisés."
+ "type_in_use": "Impossible de mettre à jour le type des champs déjà utilisés.",
+ "model_type": {
+ "customer": "Client",
+ "invoice": "Facture",
+ "estimate": "Devis",
+ "expense": "Dépense",
+ "payment": "Paiement"
+ }
},
"customization": {
"customization": "Personnalisation",
@@ -1039,7 +1089,12 @@
"note_updated": "Note de bas de page mise à jour",
"note_confirm_delete": "Vous ne pourrez pas récupérer cette note de bas de page",
"already_in_use": "La note de bas de page est déjà utilisée",
- "deleted_message": "Note de bas de page supprimée"
+ "deleted_message": "Note de bas de page supprimée",
+ "types": {
+ "estimate": "Devis",
+ "invoice": "Facture",
+ "payment": "Paiement"
+ }
}
},
"account_settings": {
@@ -1194,7 +1249,21 @@
"on_hold": "En attente",
"update_status": "Mettre à jour le statut",
"completed": "Terminé",
- "company_currency_unchangeable": "La devise de la société ne peut pas être modifiée"
+ "company_currency_unchangeable": "La devise de la société ne peut pas être modifiée",
+ "fiscal_years": {
+ "january_december": "Janvier - Décembre",
+ "february_january": "Février - Janvier",
+ "march_february": "Mars - Février",
+ "april_march": "Avril - Mars",
+ "may_april": "Mai - Avril",
+ "june_may": "Juin - Mai",
+ "july_june": "Juillet - Juin",
+ "august_july": "Aout - Juillet",
+ "september_august": "Septembre - Aout",
+ "october_september": "Octobre - Septembre",
+ "november_october": "Novembre - Octobre",
+ "december_november": "Décembre - Novembre"
+ }
},
"update_app": {
"title": "Mise à jour",
@@ -1267,6 +1336,12 @@
"aws_region": "Région AWS",
"aws_bucket": "Bucket",
"aws_root": "Répertoire",
+ "s3_endpoint": "S3 Endpoint",
+ "s3_key": "S3 Key",
+ "s3_secret": "S3 Secret",
+ "s3_region": "S3 Region",
+ "s3_bucket": "S3 Bucket",
+ "s3_root": "S3 Root",
"do_spaces_type": "Type",
"do_spaces_key": "Key",
"do_spaces_secret": "Secret",
@@ -1347,6 +1422,10 @@
"next": "Suivant",
"continue": "Poursuivre",
"skip": "Ignorer",
+ "install_language": {
+ "title": "Choix de la langue",
+ "description": "Sélectionner la langue de l'assistant pour installer InvoiceShelf"
+ },
"database": {
"database": "URL du site et base de données",
"connection": "Connexion à la base de données",
@@ -1373,7 +1452,14 @@
"verify_now": "Vérifier maintenant",
"success": "Vérification du domaine réussie.",
"failed": "La vérification du domaine a échoué. Veuillez entrer un nom de domaine valide.",
- "verify_and_continue": "Vérifier et continuer"
+ "verify_and_continue": "Vérifier et continuer",
+ "notes": {
+ "notes" : "Notes :",
+ "not_contain" : "Le domaine de l'application ne doit pas contenir",
+ "or" : "ou",
+ "in_front": "devant le domaine.",
+ "if_you": "Si vous accédez au site Web sur un autre port, veuillez mentionner le port. Par exemple :"
+ }
},
"mail": {
"host": "Serveur email",
@@ -1522,5 +1608,16 @@
"pdf_bill_to": "Facturer à",
"pdf_ship_to": "Expédier à",
"pdf_received_from": "Reçu de :",
- "pdf_tax_label": "Taxe"
+ "pdf_tax_label": "Taxe",
+ "pdf_tax_id": "Tax-ID",
+ "pdf_vat_id": "VAT-ID",
+ "mail_thanks": "Merci",
+ "mail_view_estimate":"Voir le Devis",
+ "mail_viewed_estimate": ":name a consulté ce Devis.",
+ "mail_view_invoice": "Voir la Facture",
+ "mail_viewed_invoice": ":name a consulté cette Facture.",
+ "mail_view_payment": "Voir le Paiement",
+ "notification_view_estimate": "[Notification] Un Devis a été consulté",
+ "notification_view_invoice": "[Notification] Une Facture a été consultée",
+ "You have received a new invoice from {COMPANY_NAME} . Please download using the button below:": "Vous avez reçu une nouvelle facture de {COMPANY_NAME} . Vous pouvez la télécharger en cliquant sur le bouton :"
}
diff --git a/resources/scripts/admin/components/CopyInputField.vue b/resources/scripts/admin/components/CopyInputField.vue
index 851a0bc4..a4995820 100644
--- a/resources/scripts/admin/components/CopyInputField.vue
+++ b/resources/scripts/admin/components/CopyInputField.vue
@@ -26,7 +26,7 @@
{{ token }}
@@ -122,7 +122,11 @@ const route = useRoute()
const { t } = useI18n()
let isSaving = ref(false)
-const types = reactive(['Invoice', 'Estimate', 'Payment'])
+const types = reactive([
+ {label: t('settings.customization.notes.types.invoice'), value: 'Invoice'},
+ {label: t('settings.customization.notes.types.estimate'), value: 'Estimate'},
+ {label: t('settings.customization.notes.types.payment'), value: 'Payment'}
+])
let fields = ref(['customer', 'customerCustom'])
const modalActive = computed(() => {
@@ -164,7 +168,7 @@ watch(
onMounted(() => {
if (route.name === 'estimates.create') {
noteStore.currentNote.type = 'Estimate'
- } else if (route.name === 'invoices.create') {
+ } else if (route.name === 'invoices.create' || route.name === 'recurring-invoices.create') {
noteStore.currentNote.type = 'Invoice'
} else {
noteStore.currentNote.type = 'Payment'
diff --git a/resources/scripts/admin/components/modal-components/SendEstimateModal.vue b/resources/scripts/admin/components/modal-components/SendEstimateModal.vue
index 795cdfeb..bbdecd82 100644
--- a/resources/scripts/admin/components/modal-components/SendEstimateModal.vue
+++ b/resources/scripts/admin/components/modal-components/SendEstimateModal.vue
@@ -96,7 +96,7 @@
@click="cancelPreview"
>
- Edit
+ {{ $t('general.edit') }}
{{ field.default_answer }}
diff --git a/resources/scripts/admin/views/dashboard/DashboardChart.vue b/resources/scripts/admin/views/dashboard/DashboardChart.vue
index cb7e0c07..c2302e9f 100644
--- a/resources/scripts/admin/views/dashboard/DashboardChart.vue
+++ b/resources/scripts/admin/views/dashboard/DashboardChart.vue
@@ -156,13 +156,16 @@ import LineChart from '@/scripts/admin/components/charts/LineChart.vue'
import ChartPlaceholder from './DashboardChartPlaceholder.vue'
import abilities from '@/scripts/admin/stub/abilities'
import { useUserStore } from '@/scripts/admin/stores/user'
+import { useI18n } from 'vue-i18n'
const dashboardStore = useDashboardStore()
const companyStore = useCompanyStore()
+const { t } = useI18n()
const utils = inject('utils')
const userStore = useUserStore()
-const years = ref(['This year', 'Previous year'])
+const years = ref( [{label: t('dateRange.this_year'), value: 'This year'}, {label: t( 'dateRange.previous_year'), value:
+ 'Previous year'}])
const selectedYear = ref('This year')
watch(
diff --git a/resources/scripts/admin/views/dashboard/DashboardStats.vue b/resources/scripts/admin/views/dashboard/DashboardStats.vue
index e54b3af6..6c392c35 100644
--- a/resources/scripts/admin/views/dashboard/DashboardStats.vue
+++ b/resources/scripts/admin/views/dashboard/DashboardStats.vue
@@ -21,7 +21,7 @@
:icon-component="CustomerIcon"
:loading="!dashboardStore.isDashboardDataLoaded"
route="/admin/customers"
- :label="$t('dashboard.cards.customers')"
+ :label="(dashboardStore.stats.totalCustomerCount <= 1 ? $t('dashboard.cards.customers', 1) : $t('dashboard.cards.customers', 2))"
>
{{ dashboardStore.stats.totalCustomerCount }}
@@ -32,7 +32,7 @@
:icon-component="InvoiceIcon"
:loading="!dashboardStore.isDashboardDataLoaded"
route="/admin/invoices"
- :label="$t('dashboard.cards.invoices')"
+ :label="(dashboardStore.stats.totalInvoiceCount <= 1 ? $t('dashboard.cards.invoices', 1) : $t('dashboard.cards.invoices', 2))"
>
{{ dashboardStore.stats.totalInvoiceCount }}
@@ -43,7 +43,7 @@
:icon-component="EstimateIcon"
:loading="!dashboardStore.isDashboardDataLoaded"
route="/admin/estimates"
- :label="$t('dashboard.cards.estimates')"
+ :label="(dashboardStore.stats.totalEstimateCount <= 1 ? $t( 'dashboard.cards.estimates', 1) : $t('dashboard.cards.estimates', 2))"
>
{{ dashboardStore.stats.totalEstimateCount }}
diff --git a/resources/scripts/admin/views/dashboard/DashboardTable.vue b/resources/scripts/admin/views/dashboard/DashboardTable.vue
index 0decb6a5..136526a7 100644
--- a/resources/scripts/admin/views/dashboard/DashboardTable.vue
+++ b/resources/scripts/admin/views/dashboard/DashboardTable.vue
@@ -95,7 +95,7 @@
v-if="hasAtleastOneEstimateAbility()"
#cell-actions="{ row }"
>
-
+
diff --git a/resources/scripts/admin/views/estimates/Index.vue b/resources/scripts/admin/views/estimates/Index.vue
index 90c729aa..7ab9ca83 100644
--- a/resources/scripts/admin/views/estimates/Index.vue
+++ b/resources/scripts/admin/views/estimates/Index.vue
@@ -216,7 +216,7 @@
- {{ row.data.status }}
+
@@ -249,6 +249,7 @@ import abilities from '@/scripts/admin/stub/abilities'
import ObservatoryIcon from '@/scripts/components/icons/empty/ObservatoryIcon.vue'
import EstimateDropDown from '@/scripts/admin/components/dropdowns/EstimateIndexDropdown.vue'
import SendEstimateModal from '@/scripts/admin/components/modal-components/SendEstimateModal.vue'
+import BaseEstimateStatusLabel from "@/scripts/components/base/BaseEstimateStatusLabel.vue";
const estimateStore = useEstimateStore()
const dialogStore = useDialogStore()
@@ -258,12 +259,12 @@ const tableComponent = ref(null)
const { t } = useI18n()
const showFilters = ref(false)
const status = ref([
- 'DRAFT',
- 'SENT',
- 'VIEWED',
- 'EXPIRED',
- 'ACCEPTED',
- 'REJECTED',
+ {label: t('estimates.draft'), value: 'DRAFT'},
+ {label: t('estimates.sent'), value: 'SENT'},
+ {label: t('estimates.viewed'), value: 'VIEWED'},
+ {label: t('estimates.expired'), value: 'EXPIRED'},
+ {label: t('estimates.accepted'), value: 'ACCEPTED'},
+ {label: t('estimates.rejected'), value: 'REJECTED'},
])
const isRequestOngoing = ref(true)
diff --git a/resources/scripts/admin/views/estimates/View.vue b/resources/scripts/admin/views/estimates/View.vue
index a4d0f799..74def49d 100644
--- a/resources/scripts/admin/views/estimates/View.vue
+++ b/resources/scripts/admin/views/estimates/View.vue
@@ -212,7 +212,7 @@
:status="estimate.status"
class="px-1 text-xs"
>
- {{ estimate.status }}
+
diff --git a/resources/scripts/admin/views/expenses/Index.vue b/resources/scripts/admin/views/expenses/Index.vue
index 364844de..8bd61972 100644
--- a/resources/scripts/admin/views/expenses/Index.vue
+++ b/resources/scripts/admin/views/expenses/Index.vue
@@ -278,19 +278,19 @@ const expenseColumns = computed(() => {
},
{
key: 'expense_date',
- label: 'Date',
+ label: t('expenses.date'),
thClass: 'extra',
tdClass: 'font-medium text-gray-900',
},
{
key: 'name',
- label: 'Category',
+ label: t('expenses.category'),
thClass: 'extra',
tdClass: 'cursor-pointer font-medium text-primary-500',
},
- { key: 'user_name', label: 'Customer' },
- { key: 'notes', label: 'Note' },
- { key: 'amount', label: 'Amount' },
+ { key: 'user_name', label: t('expenses.customer') },
+ { key: 'notes', label: t('expenses.note') },
+ { key: 'amount', label: t('expenses.amount') },
{
key: 'actions',
sortable: false,
diff --git a/resources/scripts/admin/views/installation/Installation.vue b/resources/scripts/admin/views/installation/Installation.vue
index 7a776bfb..af539165 100644
--- a/resources/scripts/admin/views/installation/Installation.vue
+++ b/resources/scripts/admin/views/installation/Installation.vue
@@ -9,7 +9,7 @@
/>
@@ -20,6 +20,7 @@
+
+
diff --git a/resources/scripts/admin/views/installation/Step3DatabaseConfig.vue b/resources/scripts/admin/views/installation/Step3DatabaseConfig.vue
index e4b938b6..b2a86821 100644
--- a/resources/scripts/admin/views/installation/Step3DatabaseConfig.vue
+++ b/resources/scripts/admin/views/installation/Step3DatabaseConfig.vue
@@ -36,11 +36,13 @@ export default {
const database_connection = ref('mysql')
const isSaving = ref(false)
const { t } = useI18n()
+ const { global } = window.i18n
const notificationStore = useNotificationStore()
const installationStore = useInstallationStore()
const databaseData = computed(() => {
+ installationStore.currentDataBaseData.app_locale = global.locale.value
return installationStore.currentDataBaseData
})
@@ -75,6 +77,12 @@ export default {
emit('next', 3)
+ let language = {
+ profile_language: global.locale.value,
+ }
+ await installationStore.addInstallationLanguage(language)
+
+
notificationStore.showNotification({
type: 'success',
message: t('wizard.success.' + res.data.success),
diff --git a/resources/scripts/admin/views/installation/Step4VerifyDomain.vue b/resources/scripts/admin/views/installation/Step4VerifyDomain.vue
index fd7084da..ec48d085 100644
--- a/resources/scripts/admin/views/installation/Step4VerifyDomain.vue
+++ b/resources/scripts/admin/views/installation/Step4VerifyDomain.vue
@@ -18,17 +18,15 @@
- Notes:
+ {{ $t('wizard.verify_domain.notes.notes') }}
- App domain should not contain
- https:// or
- http in front of
- the domain.
+ {{ $t('wizard.verify_domain.notes.not_contain') }}
+ https:// {{ $t('wizard.verify_domain.notes.or') }}
+ http {{ $t('wizard.verify_domain.notes.in_front') }}
- If you're accessing the website on a different port, please mention the
- port. For example:
+ {{ $t('wizard.verify_domain.notes.if_you') }}
localhost:8080
diff --git a/resources/scripts/admin/views/installation/Step8CompanyPreferences.vue b/resources/scripts/admin/views/installation/Step8CompanyPreferences.vue
index d372e367..0066bc19 100644
--- a/resources/scripts/admin/views/installation/Step8CompanyPreferences.vue
+++ b/resources/scripts/admin/views/installation/Step8CompanyPreferences.vue
@@ -115,7 +115,7 @@
{
+ return globalStore.fiscalYears.map((item) => {
+ return Object.assign({}, item, {
+ key: t(item.key),
+ })
+ })
+})
+
const options = reactive([
{
title: tm('settings.customization.invoices.allow'),
diff --git a/resources/scripts/admin/views/invoices/Index.vue b/resources/scripts/admin/views/invoices/Index.vue
index 5a5e28f9..dfa8d9de 100644
--- a/resources/scripts/admin/views/invoices/Index.vue
+++ b/resources/scripts/admin/views/invoices/Index.vue
@@ -225,7 +225,7 @@
- {{ row.data.status }}
+
@@ -249,7 +249,7 @@
:status="row.data.paid_status"
class="px-1 py-0.5 ml-2"
>
- {{ row.data.paid_status }}
+
@@ -277,6 +277,7 @@ import { debouncedWatch } from '@vueuse/core'
import MoonwalkerIcon from '@/scripts/components/icons/empty/MoonwalkerIcon.vue'
import InvoiceDropdown from '@/scripts/admin/components/dropdowns/InvoiceIndexDropdown.vue'
import SendInvoiceModal from '@/scripts/admin/components/modal-components/SendInvoiceModal.vue'
+import BaseInvoiceStatusLabel from "@/scripts/components/base/BaseInvoiceStatusLabel.vue";
// Stores
const invoiceStore = useInvoiceStore()
const dialogStore = useDialogStore()
@@ -291,12 +292,21 @@ const showFilters = ref(false)
const status = ref([
{
- label: 'Status',
- options: ['DRAFT', 'DUE', 'SENT', 'VIEWED', 'COMPLETED'],
+ label: t('invoices.status'),
+ options: [
+ {label: t('general.draft'), value: 'DRAFT'},
+ {label: t('general.due'), value: 'DUE'},
+ {label: t('general.sent'), value: 'SENT'},
+ {label: t('invoices.viewed'), value: 'VIEWED'},
+ {label: t('invoices.completed'), value: 'COMPLETED'}
+ ],
},
{
- label: 'Paid Status',
- options: ['UNPAID', 'PAID', 'PARTIALLY_PAID'],
+ label: t('invoices.paid_status'),
+ options: [
+ {label: t('invoices.unpaid'), value: 'UNPAID'},
+ {label: t('invoices.paid'), value: 'PAID'},
+ {label: t('invoices.partially_paid'), value: 'PARTIALLY_PAID'}],
},
,
])
diff --git a/resources/scripts/admin/views/invoices/View.vue b/resources/scripts/admin/views/invoices/View.vue
index 6e282934..891e3d6f 100644
--- a/resources/scripts/admin/views/invoices/View.vue
+++ b/resources/scripts/admin/views/invoices/View.vue
@@ -454,7 +454,7 @@ onSearched = debounce(onSearched, 500)
:status="invoice.status"
class="px-1 text-xs"
>
- {{ invoice.status }}
+
diff --git a/resources/scripts/admin/views/modules/Index.vue b/resources/scripts/admin/views/modules/Index.vue
index 1b587686..b7552913 100644
--- a/resources/scripts/admin/views/modules/Index.vue
+++ b/resources/scripts/admin/views/modules/Index.vue
@@ -101,7 +101,7 @@
target="_blank"
>
- Sign up & Get Token
+ {{ $t('modules.sign_up_and_get_token') }}
diff --git a/resources/scripts/admin/views/payments/Create.vue b/resources/scripts/admin/views/payments/Create.vue
index 27ab0422..5716203e 100644
--- a/resources/scripts/admin/views/payments/Create.vue
+++ b/resources/scripts/admin/views/payments/Create.vue
@@ -99,7 +99,7 @@
:label="$t('payments.invoice')"
:help-text="
selectedInvoice
- ? `Due Amount: ${
+ ? `${t('payments.amount_due')}: ${
paymentStore.currentPayment.maxPayableAmount / 100
}`
: ''
diff --git a/resources/scripts/admin/views/payments/Index.vue b/resources/scripts/admin/views/payments/Index.vue
index d7ea568e..9c62f2ce 100644
--- a/resources/scripts/admin/views/payments/Index.vue
+++ b/resources/scripts/admin/views/payments/Index.vue
@@ -251,7 +251,7 @@ const paymentColumns = computed(() => {
{ key: 'payment_number', label: t('payments.payment_number') },
{ key: 'name', label: t('payments.customer') },
{ key: 'payment_mode', label: t('payments.payment_mode') },
- { key: 'invoice_number', label: t('invoices.invoice_number') },
+ { key: 'invoice_number', label: t('payments.invoice') },
{ key: 'amount', label: t('payments.amount') },
{
key: 'actions',
diff --git a/resources/scripts/admin/views/recurring-invoices/Index.vue b/resources/scripts/admin/views/recurring-invoices/Index.vue
index 322bd0b4..0e8420f9 100644
--- a/resources/scripts/admin/views/recurring-invoices/Index.vue
+++ b/resources/scripts/admin/views/recurring-invoices/Index.vue
@@ -230,7 +230,7 @@
:status="row.data.status"
class="px-3 py-1"
>
- {{ row.data.status }}
+
@@ -276,7 +276,11 @@ const userStore = useUserStore()
const table = ref(null)
const { t } = useI18n()
const showFilters = ref(false)
-const statusList = ref(['ACTIVE', 'ON_HOLD', 'ALL'])
+const statusList = ref([
+ {label: t('recurring_invoices.active'), value: 'ACTIVE'},
+ {label: t('recurring_invoices.on_hold'), value: 'ON_HOLD'},
+ {label: t('recurring_invoices.all'), value: 'ALL'}
+])
const isRequestOngoing = ref(true)
const activeTab = ref('recurring-invoices.all')
const router = useRouter()
diff --git a/resources/scripts/admin/views/recurring-invoices/create/RecurringInvoiceCreateBasicFields.vue b/resources/scripts/admin/views/recurring-invoices/create/RecurringInvoiceCreateBasicFields.vue
index d0eb6a81..d21c556d 100644
--- a/resources/scripts/admin/views/recurring-invoices/create/RecurringInvoiceCreateBasicFields.vue
+++ b/resources/scripts/admin/views/recurring-invoices/create/RecurringInvoiceCreateBasicFields.vue
@@ -129,7 +129,7 @@
:invalid="v.status.$error"
:placeholder="$t('recurring_invoices.select_a_status')"
value-prop="value"
- label="value"
+ label="key"
/>
@@ -186,6 +186,7 @@ import { useDebounceFn } from '@vueuse/core'
import { useRecurringInvoiceStore } from '@/scripts/admin/stores/recurring-invoice'
import { computed, onMounted, reactive, ref, watch } from 'vue'
import { useRoute } from 'vue-router'
+import { useI18n } from 'vue-i18n'
import ExchangeRateConverter from '@/scripts/admin/components/estimate-invoice-common/ExchangeRateConverter.vue'
@@ -207,13 +208,14 @@ const props = defineProps({
const route = useRoute()
const recurringInvoiceStore = useRecurringInvoiceStore()
const globalStore = useGlobalStore()
+const { t } = useI18n()
const isLoadingNextDate = ref(false)
const limits = reactive([
- { label: 'None', value: 'NONE' },
- { label: 'Date', value: 'DATE' },
- { label: 'Count', value: 'COUNT' },
+ { label: t('recurring_invoices.limit.none'), value: 'NONE' },
+ { label: t('recurring_invoices.limit.date'), value: 'DATE' },
+ { label: t('recurring_invoices.limit.count'), value: 'COUNT' },
])
const isCustomFrequency = computed(() => {
@@ -226,9 +228,17 @@ const isCustomFrequency = computed(() => {
const getStatusOptions = computed(() => {
if (props.isEdit) {
- return globalStore.config.recurring_invoice_status.update_status
+ return globalStore.config.recurring_invoice_status.update_status.map((item) => {
+ return Object.assign({}, item, {
+ key: t(item.key),
+ })
+ })
}
- return globalStore.config.recurring_invoice_status.create_status
+ return globalStore.config.recurring_invoice_status.create_status.map((item) => {
+ return Object.assign({}, item, {
+ key: t(item.key),
+ })
+ })
})
watch(
diff --git a/resources/scripts/admin/views/recurring-invoices/partials/Invoices.vue b/resources/scripts/admin/views/recurring-invoices/partials/Invoices.vue
index fb2b7bdc..fa997aa3 100644
--- a/resources/scripts/admin/views/recurring-invoices/partials/Invoices.vue
+++ b/resources/scripts/admin/views/recurring-invoices/partials/Invoices.vue
@@ -27,10 +27,15 @@
/>
+
+
+ {{ row.data.formatted_invoice_date }}
+
+
- {{ row.data.status }}
+
diff --git a/resources/scripts/admin/views/recurring-invoices/partials/RecurringInvoiceViewSidebar.vue b/resources/scripts/admin/views/recurring-invoices/partials/RecurringInvoiceViewSidebar.vue
index 42445324..8e37b5f1 100644
--- a/resources/scripts/admin/views/recurring-invoices/partials/RecurringInvoiceViewSidebar.vue
+++ b/resources/scripts/admin/views/recurring-invoices/partials/RecurringInvoiceViewSidebar.vue
@@ -293,7 +293,7 @@ onSearched = debounce(onSearched, 500)
:status="invoice.status"
class="px-1 text-xs"
>
- {{ invoice.status }}
+
diff --git a/resources/scripts/admin/views/reports/SalesReports.vue b/resources/scripts/admin/views/reports/SalesReports.vue
index d73c78a4..4fed5772 100644
--- a/resources/scripts/admin/views/reports/SalesReports.vue
+++ b/resources/scripts/admin/views/reports/SalesReports.vue
@@ -156,7 +156,16 @@ const dateRange = reactive([
])
const selectedRange = ref(dateRange[2])
-const reportTypes = ref(['By Customer', 'By Item'])
+const reportTypes = ref([
+ {
+ label: t('reports.sales.sort.by_customer'),
+ value: 'By Customer'
+ },
+ {
+ label: t('reports.sales.sort.by_item'),
+ value: 'By Item'
+ }
+])
const selectedType = ref('By Customer')
let range = ref(new Date())
let url = ref(null)
diff --git a/resources/scripts/admin/views/settings/CustomFieldsSetting.vue b/resources/scripts/admin/views/settings/CustomFieldsSetting.vue
index 1cad62b0..016d37f9 100644
--- a/resources/scripts/admin/views/settings/CustomFieldsSetting.vue
+++ b/resources/scripts/admin/views/settings/CustomFieldsSetting.vue
@@ -30,6 +30,10 @@
({{ row.data.slug }})
+
+ {{ getModelType(row.data.model_type) }}
+
+
- {{ row.data.set_as_default ? 'Yes' : 'No'.replace('_', ' ') }}
+ {{ row.data.set_as_default ? $t('general.yes') : $t('general.no').replace('_', ' ') }}
diff --git a/resources/scripts/admin/views/settings/NotesSetting.vue b/resources/scripts/admin/views/settings/NotesSetting.vue
index c6026cdc..320e3d5b 100644
--- a/resources/scripts/admin/views/settings/NotesSetting.vue
+++ b/resources/scripts/admin/views/settings/NotesSetting.vue
@@ -31,6 +31,9 @@
:load-data="refreshTable"
/>
+
+ {{ getLabelNote(row.data.type) }}
+
@@ -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
+ }
+}
diff --git a/resources/scripts/admin/views/settings/PreferencesSetting.vue b/resources/scripts/admin/views/settings/PreferencesSetting.vue
index 3c7c9ebb..717d81cc 100644
--- a/resources/scripts/admin/views/settings/PreferencesSetting.vue
+++ b/resources/scripts/admin/views/settings/PreferencesSetting.vue
@@ -95,7 +95,7 @@
{
})
})
+const fiscalYearsList = computed(() => {
+ return globalStore.config.fiscal_years.map((item) => {
+ return Object.assign({}, item, {
+ key: t(item.key),
+ })
+ })
+})
+
watch(
() => settingsForm.carbon_date_format,
(val) => {
diff --git a/resources/scripts/admin/views/settings/customization/NumberCustomizer.vue b/resources/scripts/admin/views/settings/customization/NumberCustomizer.vue
index 7cab418a..5d74f306 100644
--- a/resources/scripts/admin/views/settings/customization/NumberCustomizer.vue
+++ b/resources/scripts/admin/views/settings/customization/NumberCustomizer.vue
@@ -43,7 +43,7 @@
border-t border-b border-gray-200 border-solid
"
>
- Component
+ {{ $t('settings.customization.component') }}
- Parameter
+ {{ $t('settings.customization.Parameter') }}
- Remove
+ {{ $t('general.remove') }}
- {{ invoice.paid_status }}
+
diff --git a/resources/scripts/components/base-select/BaseMultiselect.vue b/resources/scripts/components/base-select/BaseMultiselect.vue
index 2574552a..d055a8e4 100755
--- a/resources/scripts/components/base-select/BaseMultiselect.vue
+++ b/resources/scripts/components/base-select/BaseMultiselect.vue
@@ -181,11 +181,11 @@
-
+
-
+
diff --git a/resources/scripts/components/base/BaseDatePicker.vue b/resources/scripts/components/base/BaseDatePicker.vue
index c6eb24f1..e92745c7 100644
--- a/resources/scripts/components/base/BaseDatePicker.vue
+++ b/resources/scripts/components/base/BaseDatePicker.vue
@@ -49,8 +49,39 @@
diff --git a/resources/scripts/components/base/BaseFileUploader.vue b/resources/scripts/components/base/BaseFileUploader.vue
index e71ebccb..dd36662a 100644
--- a/resources/scripts/components/base/BaseFileUploader.vue
+++ b/resources/scripts/components/base/BaseFileUploader.vue
@@ -71,7 +71,7 @@
class="h-6 mb-2 text-xl leading-6 text-gray-400"
/>
- Drag a file here or
+ {{ $t('general.file_upload.drag_a_file') }}
- browse
+ {{ $t('general.file_upload.browse') }}
- to choose a file
+ {{ $t('general.file_upload.to_choose') }}
{{ recommendedText }}
diff --git a/resources/scripts/components/base/BaseInvoiceStatusLabel.vue b/resources/scripts/components/base/BaseInvoiceStatusLabel.vue
new file mode 100644
index 00000000..aa711e8d
--- /dev/null
+++ b/resources/scripts/components/base/BaseInvoiceStatusLabel.vue
@@ -0,0 +1,43 @@
+
+ {{ labelStatus }}
+
+
+
diff --git a/resources/scripts/components/base/BaseRecurringInvoiceStatusLabel.vue b/resources/scripts/components/base/BaseRecurringInvoiceStatusLabel.vue
new file mode 100644
index 00000000..f461f227
--- /dev/null
+++ b/resources/scripts/components/base/BaseRecurringInvoiceStatusLabel.vue
@@ -0,0 +1,31 @@
+
+ {{ labelStatus }}
+
+
+
diff --git a/resources/scripts/components/base/base-table/BaseTable.vue b/resources/scripts/components/base/base-table/BaseTable.vue
index 67320d12..4dd2a1da 100644
--- a/resources/scripts/components/base/base-table/BaseTable.vue
+++ b/resources/scripts/components/base/base-table/BaseTable.vue
@@ -128,7 +128,7 @@
class="w-6 h-6 text-gray-400"
/>
- {{ noResultsMessage }}
+ {{ $t('general.no_data_found') }}
- Previous
+ {{ $t('general.pagination.previous') }}
- Next
+ {{ $t('general.pagination.next') }}
- Showing
+ {{ $t('general.pagination.showing') }}
{{ ' ' }}
{{ ' ' }}
- to
+ {{ $t('general.pagination.to') }}
{{ ' ' }}
{{ ' ' }}
- of
+ {{ $t('general.pagination.of') }}
{{ ' ' }}
{{ pagination.totalCount }}
{{ ' ' }}
- results
+ {{ $t('general.pagination.results') }}
diff --git a/resources/scripts/customer/layouts/partials/TheSiteHeader.vue b/resources/scripts/customer/layouts/partials/TheSiteHeader.vue
index 4a6ae629..4b504a16 100644
--- a/resources/scripts/customer/layouts/partials/TheSiteHeader.vue
+++ b/resources/scripts/customer/layouts/partials/TheSiteHeader.vue
@@ -38,7 +38,7 @@
'inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium',
]"
>
- {{ item.title }}
+ {{ $t(item.title) }}
@@ -141,7 +141,7 @@
'block pl-3 pr-4 py-2 border-l-4 text-base font-medium',
]"
:aria-current="item.current ? 'page' : undefined"
- >{{ item.title }}
+ >{{ $t(item.title) }}
@@ -185,7 +185,7 @@
: 'border-transparent text-gray-600 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-800',
'block pl-3 pr-4 py-2 border-l-4 text-base font-medium',
]"
- >{{ item.title }}{{ $t(item.title) }}
diff --git a/resources/scripts/customer/stores/global.js b/resources/scripts/customer/stores/global.js
index 44197465..63cae536 100644
--- a/resources/scripts/customer/stores/global.js
+++ b/resources/scripts/customer/stores/global.js
@@ -2,6 +2,7 @@ import { handleError } from '@/scripts/customer/helpers/error-handling'
import { useUserStore } from './user'
const { defineStore } = window.pinia
import axios from 'axios'
+const { global } = window.i18n
export const useGlobalStore = defineStore({
id: 'CustomerPortalGlobalStore',
state: () => ({
@@ -29,7 +30,12 @@ export const useGlobalStore = defineStore({
this.currency = response.data.data.currency
this.enabledModules = response.data.meta.modules
Object.assign(userStore.userForm, response.data.data)
- window.i18n.locale = response.data.default_language
+
+ if(typeof global.locale !== 'string') {
+ global.locale.value =
+ response.data.meta.current_company_language || 'en'
+ }
+
this.isAppLoaded = true
resolve(response)
})
diff --git a/resources/scripts/customer/views/dashboard/DashboardStats.vue b/resources/scripts/customer/views/dashboard/DashboardStats.vue
index 328c8ec4..a32bb45f 100644
--- a/resources/scripts/customer/views/dashboard/DashboardStats.vue
+++ b/resources/scripts/customer/views/dashboard/DashboardStats.vue
@@ -19,7 +19,7 @@
:icon-component="InvoiceIcon"
:loading="!globalStore.getDashboardDataLoaded"
:route="{ name: 'invoices.dashboard' }"
- :label="$t('dashboard.cards.invoices')"
+ :label="(dashboardStore.invoiceCount <= 1 ? $t('dashboard.cards.invoices', 1) : $t('dashboard.cards.invoices', 2))"
>
{{ dashboardStore.invoiceCount }}
@@ -29,7 +29,7 @@
:icon-component="EstimateIcon"
:loading="!globalStore.getDashboardDataLoaded"
:route="{ name: 'estimates.dashboard' }"
- :label="$t('dashboard.cards.estimates')"
+ :label="(dashboardStore.estimateCount <= 1 ? $t('dashboard.cards.estimates', 1) : $t('dashboard.cards.estimates', 2))"
>
{{ dashboardStore.estimateCount }}
@@ -40,7 +40,7 @@
:icon-component="PaymentIcon"
:loading="!globalStore.getDashboardDataLoaded"
:route="{ name: 'payments.dashboard' }"
- :label="$t('dashboard.cards.payments')"
+ :label="(dashboardStore.paymentCount <= 1 ? $t('dashboard.cards.payments', 1 ) : $t('dashboard.cards.payments', 2))"
>
{{ dashboardStore.paymentCount }}
diff --git a/resources/scripts/customer/views/dashboard/DashboardTable.vue b/resources/scripts/customer/views/dashboard/DashboardTable.vue
index 25f57d96..1c8c4c3c 100644
--- a/resources/scripts/customer/views/dashboard/DashboardTable.vue
+++ b/resources/scripts/customer/views/dashboard/DashboardTable.vue
@@ -34,7 +34,7 @@
- {{ row.data.paid_status }}
+
@@ -80,7 +80,7 @@
- {{ row.data.status }}
+
diff --git a/resources/scripts/customer/views/estimates/Index.vue b/resources/scripts/customer/views/estimates/Index.vue
index 72c654af..be06c74e 100644
--- a/resources/scripts/customer/views/estimates/Index.vue
+++ b/resources/scripts/customer/views/estimates/Index.vue
@@ -108,7 +108,7 @@
- {{ row.data.status }}
+
@@ -156,12 +156,12 @@ let showFilters = ref(false)
let isFetchingInitialData = ref(true)
const status = ref([
- 'DRAFT',
- 'SENT',
- 'VIEWED',
- 'EXPIRED',
- 'ACCEPTED',
- 'REJECTED',
+ {label: t('estimates.draft'), value: 'DRAFT'},
+ {label: t('estimates.sent'), value: 'SENT'},
+ {label: t('estimates.viewed'), value: 'VIEWED'},
+ {label: t('estimates.expired'), value: 'EXPIRED'},
+ {label: t('estimates.accepted'), value: 'ACCEPTED'},
+ {label: t('estimates.rejected'), value: 'REJECTED'},
])
const filters = reactive({
status: '',
@@ -240,7 +240,7 @@ function toggleFilter() {
async function fetchData({ page, sort }) {
let data = {
- status: filters.status,
+ status: filters.status.value,
estimate_number: filters.estimate_number,
from_date: filters.from_date,
to_date: filters.to_date,
diff --git a/resources/scripts/customer/views/estimates/View.vue b/resources/scripts/customer/views/estimates/View.vue
index 01ce63ff..fcd920d3 100644
--- a/resources/scripts/customer/views/estimates/View.vue
+++ b/resources/scripts/customer/views/estimates/View.vue
@@ -170,7 +170,7 @@
- {{ estimate.status }}
+
diff --git a/resources/scripts/customer/views/invoices/Index.vue b/resources/scripts/customer/views/invoices/Index.vue
index 6fb4c4df..410fadc3 100644
--- a/resources/scripts/customer/views/invoices/Index.vue
+++ b/resources/scripts/customer/views/invoices/Index.vue
@@ -110,7 +110,7 @@
- {{ row.data.status }}
+
@@ -119,7 +119,7 @@
:status="row.data.paid_status"
class="px-3 py-1"
>
- {{ row.data.paid_status }}
+
@@ -160,7 +160,13 @@ const route = useRoute()
const table = ref(null)
let isFetchingInitialData = ref(true)
let showFilters = ref(false)
-const status = ref(['DRAFT', 'DUE', 'SENT', 'VIEWED', 'COMPLETED'])
+const status = ref([
+ {label: t('general.draft'), value: 'DRAFT'},
+ {label: t('general.due'), value: 'DUE'},
+ {label: t('general.sent'), value: 'SENT'},
+ {label: t('invoices.viewed'), value: 'VIEWED'},
+ {label: t('invoices.completed'), value: 'COMPLETED'}
+])
const filters = reactive({
status: '',
from_date: '',
@@ -247,7 +253,7 @@ function toggleFilter() {
async function fetchData({ page, sort }) {
let data = {
- status: filters.status,
+ status: filters.status.value,
invoice_number: filters.invoice_number,
from_date: filters.from_date,
to_date: filters.to_date,
diff --git a/resources/scripts/customer/views/invoices/View.vue b/resources/scripts/customer/views/invoices/View.vue
index 28442aea..f8161127 100644
--- a/resources/scripts/customer/views/invoices/View.vue
+++ b/resources/scripts/customer/views/invoices/View.vue
@@ -175,7 +175,7 @@
{{ invoice.invoice_number }}
- {{ invoice.status }}
+
diff --git a/resources/views/emails/send/estimate.blade.php b/resources/views/emails/send/estimate.blade.php
index 8e82bdc3..d066a250 100644
--- a/resources/views/emails/send/estimate.blade.php
+++ b/resources/views/emails/send/estimate.blade.php
@@ -19,7 +19,7 @@
{!! $data['body'] !!}
@if(!$data['attach']['data'])
@component('mail::button', ['url' => $data['url']])
- View Estimate
+ @lang('mail_view_estimate')
@endcomponent
@endif
@endcomponent
diff --git a/resources/views/emails/send/invoice.blade.php b/resources/views/emails/send/invoice.blade.php
index 53e2dce2..c1a3a7e5 100644
--- a/resources/views/emails/send/invoice.blade.php
+++ b/resources/views/emails/send/invoice.blade.php
@@ -19,7 +19,7 @@
{!! $data['body'] !!}
@if(!$data['attach']['data'])
@component('mail::button', ['url' => $data['url']])
- View Invoice
+ @lang('mail_view_invoice')
@endcomponent
@endif
@endcomponent
diff --git a/resources/views/emails/send/payment.blade.php b/resources/views/emails/send/payment.blade.php
index 4670542d..1e411a17 100644
--- a/resources/views/emails/send/payment.blade.php
+++ b/resources/views/emails/send/payment.blade.php
@@ -19,7 +19,7 @@
{!! $data['body'] !!}
@if(!$data['attach']['data'])
@component('mail::button', ['url' => $data['url']])
- View Payment
+ @lang('mail_view_payment')
@endcomponent
@endif
@endcomponent
diff --git a/resources/views/emails/viewed/estimate.blade.php b/resources/views/emails/viewed/estimate.blade.php
index 5bfd6588..787872a3 100644
--- a/resources/views/emails/viewed/estimate.blade.php
+++ b/resources/views/emails/viewed/estimate.blade.php
@@ -1,10 +1,9 @@
@component('mail::message')
-{{ $data['user']['name'] }} viewed this Estimate.
+@lang('mail_viewed_estimate', ['name' => $data['user']['name']])
-@component('mail::button', ['url' => url('/admin/estimates/'.$data['estimate']['id'].'/view')])
-View Estimate
+@component('mail::button', ['url' => url('/admin/estimates/'.$data['estimate']['id'].'/view')])@lang('mail_view_estimate')
@endcomponent
-Thanks,
+@lang('mail_thanks'),
{{ config('app.name') }}
@endcomponent
diff --git a/resources/views/emails/viewed/invoice.blade.php b/resources/views/emails/viewed/invoice.blade.php
index 9a28139b..02554fc3 100644
--- a/resources/views/emails/viewed/invoice.blade.php
+++ b/resources/views/emails/viewed/invoice.blade.php
@@ -1,10 +1,9 @@
@component('mail::message')
-{{ $data['user']['name'] }} viewed this Invoice.
+@lang('mail_viewed_invoice', ['name' => $data['user']['name']])
-@component('mail::button', ['url' => url('/admin/invoices/'.$data['invoice']['id'].'/view')])
-View Invoice
+@component('mail::button', ['url' => url('/admin/invoices/'.$data['invoice']['id'].'/view')])@lang('mail_view_invoice')
@endcomponent
-Thanks,
+@lang('mail_thanks'),
{{ config('app.name') }}
@endcomponent
diff --git a/routes/api.php b/routes/api.php
index 13d5caa3..19c9b4a8 100644
--- a/routes/api.php
+++ b/routes/api.php
@@ -164,6 +164,10 @@ Route::prefix('/v1')->group(function () {
Route::post('/wizard-step', [OnboardingWizardController::class, 'updateStep']);
+ Route::post('/wizard-language', [OnboardingWizardController::class, 'saveLanguage']);
+
+ Route::get('/languages', [LanguagesController::class, 'languages']);
+
Route::get('/requirements', [RequirementsController::class, 'requirements']);
Route::get('/permissions', [FilePermissionsController::class, 'permissions']);