i18n implementation into invoice module

This commit is contained in:
Peter Papp
2021-05-07 11:32:48 +02:00
parent 070f8b4d40
commit 73672bc023
31 changed files with 431 additions and 299 deletions
+28 -28
View File
@@ -1,27 +1,27 @@
<template>
<div id="single-page">
<MobileHeader :title="$router.currentRoute.meta.title" />
<PageHeader :title="$router.currentRoute.meta.title" />
<MobileHeader :title="$t($router.currentRoute.meta.title)" />
<PageHeader :title="$t($router.currentRoute.meta.title)" />
<div v-if="!isLoading && !profileNotExist" id="page-content" class="medium-width">
<div class="content-page">
<PageTab>
<PageTabGroup>
<div class="form block-form">
<FormLabel>Company & Logo</FormLabel>
<FormLabel>{{ $t('in.form.company_and_logo') }}</FormLabel>
<InfoBox>
<p>Here you can set your <b class="text-theme">billing profile</b> which will be paste to your every newly generated invoice.</p>
<p v-html="$t('in.bill_profile_note')"></p>
</InfoBox>
<div class="block-wrapper">
<label>Logo (optional):</label>
<label>{{ $t('in_editor.client_logo') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="logo" v-slot="{ errors }">
<ImageInput @input="$updateImage('/oasis/invoices/profile', 'logo', profile.logo)" :image="$getImage(profile.logo)" v-model="profile.logo" :error="errors[0]" />
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>Company name:</label>
<label>{{ $t('in.form.company_name') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="company" rules="required" v-slot="{ errors }">
<input @input="$updateText('/oasis/invoices/profile', 'company', profile.company)" v-model="profile.company" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -30,7 +30,7 @@
</div>
<div class="block-wrapper">
<label>Registration Notes (optional):</label>
<label>{{ $t('in.form.reg_notes') }} ({{ $t('global.optional') }}):</label>
<div class="input-wrapper">
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="registration_notes" rules="required" v-slot="{ errors }">
<textarea
@@ -50,10 +50,10 @@
</PageTabGroup>
<PageTabGroup>
<div class="form block-form">
<FormLabel>Company Details</FormLabel>
<FormLabel>{{ $t('in.form.company_details') }}</FormLabel>
<div class="block-wrapper">
<label>ICO:</label>
<label>{{ $t('in_editor.ico') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="ico" rules="required" v-slot="{ errors }">
<input @input="$updateText('/oasis/invoices/profile', 'ico', profile.ico)" v-model="profile.ico" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -62,7 +62,7 @@
</div>
<div class="block-wrapper">
<label>DIC:</label>
<label>{{ $t('in_editor.dic') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="dic" rules="required" v-slot="{ errors }">
<input @input="$updateText('/oasis/invoices/profile', 'dic', profile.dic)" v-model="profile.dic" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -71,7 +71,7 @@
</div>
<div class="block-wrapper">
<label>IC DPH (optional):</label>
<label>{{ $t('in_editor.ic_dph') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="ic_dph" rules="required" v-slot="{ errors }">
<input @input="$updateText('/oasis/invoices/profile', 'ic_dph', profile.ic_dph)" v-model="profile.ic_dph" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -82,10 +82,10 @@
</PageTabGroup>
<PageTabGroup>
<div class="form block-form">
<FormLabel>Company Address</FormLabel>
<FormLabel>{{ $t('in.form.company_address') }}</FormLabel>
<div class="block-wrapper">
<label>Address:</label>
<label>{{ $t('in_editor.client_address') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="address" rules="required" v-slot="{ errors }">
<input @input="$updateText('/oasis/invoices/profile', 'address', profile.address)" v-model="profile.address" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -95,7 +95,7 @@
<div class="wrapper-inline">
<div class="block-wrapper">
<label>City:</label>
<label>{{ $t('in_editor.client_city') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="city" rules="required" v-slot="{ errors }">
<input @input="$updateText('/oasis/invoices/profile', 'city', profile.city)" v-model="profile.city" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -104,7 +104,7 @@
</div>
<div class="block-wrapper">
<label>Postal Code:</label>
<label>{{ $t('in_editor.client_postal_code') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="postal_code" rules="required" v-slot="{ errors }">
<input @input="$updateText('/oasis/invoices/profile', 'postal_code', profile.postal_code)" v-model="profile.postal_code" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -114,7 +114,7 @@
</div>
<div class="block-wrapper">
<label>Country:</label>
<label>{{ $t('in_editor.client_country') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="country" rules="required" v-slot="{ errors }">
<SelectInput @input="$updateText('/oasis/invoices/profile', 'country', profile.country)" v-model="profile.country" :default="profile.country" :options="countries" placeholder="" :isError="errors[0]"/>
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
@@ -124,10 +124,10 @@
</PageTabGroup>
<PageTabGroup>
<div class="form block-form">
<FormLabel>Bank Info</FormLabel>
<FormLabel>{{ $t('in.form.bank_info') }}</FormLabel>
<div class="block-wrapper">
<label>Bank Name:</label>
<label>{{ $t('in.form.bank_name') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="bank" rules="required" v-slot="{ errors }">
<input @input="$updateText('/oasis/invoices/profile', 'bank', profile.bank)" v-model="profile.bank" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -136,7 +136,7 @@
</div>
<div class="block-wrapper">
<label>Iban:</label>
<label>{{ $t('in.form.iban') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="iban" rules="required" v-slot="{ errors }">
<input @input="$updateText('/oasis/invoices/profile', 'iban', profile.iban)" v-model="profile.iban" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -145,7 +145,7 @@
</div>
<div class="block-wrapper">
<label>Swift code:</label>
<label>{{ $t('in.form.swift_code') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="swift" rules="required" v-slot="{ errors }">
<input @input="$updateText('/oasis/invoices/profile', 'swift', profile.swift)" v-model="profile.swift" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -156,10 +156,10 @@
</PageTabGroup>
<PageTabGroup>
<div class="form block-form">
<FormLabel>Author</FormLabel>
<FormLabel>{{ $t('in.form.author') }}</FormLabel>
<div class="block-wrapper">
<label>Phone (optional):</label>
<label>{{ $t('in_editor.client_phone') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="phone" rules="required" v-slot="{ errors }">
<input @input="$updateText('/oasis/invoices/profile', 'phone', profile.phone)" v-model="profile.phone" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -168,7 +168,7 @@
</div>
<div class="block-wrapper">
<label>Email (optional):</label>
<label>{{ $t('in_editor.client_email') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="email" rules="required" v-slot="{ errors }">
<input @input="$updateText('/oasis/invoices/profile', 'email', profile.email)" v-model="profile.email" placeholder="" type="email"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -177,7 +177,7 @@
</div>
<div class="block-wrapper">
<label>Author name:</label>
<label>{{ $t('in.form.author_name') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="author" rules="required" v-slot="{ errors }">
<input @input="$updateText('/oasis/invoices/profile', 'author', profile.author)" v-model="profile.author" placeholder="" type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -186,7 +186,7 @@
</div>
<div class="block-wrapper">
<label>Stamp:</label>
<label>{{ $t('in.form.stamp') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="stamp" v-slot="{ errors }">
<ImageInput @input="$updateImage('/oasis/invoices/profile', 'stamp', profile.stamp)" :image="$getImage(profile.stamp)" v-model="profile.stamp" :error="errors[0]" />
</ValidationProvider>
@@ -200,12 +200,12 @@
<EmptyPageContent
v-if="!isLoading && profileNotExist"
icon="edit"
title="You don't have billing profile"
description="Before your first invoice, please set up your billing profile."
:title="$t('in.empty.bill_profile_title')"
:description="$t('in.empty.bill_profile_description')"
>
<router-link :to="{name: 'BillingProfileSetUp'}" tag="p">
<ButtonBase button-style="theme">
Set up Billing Profile
{{ $t('in.button.setup_bill_profile') }}
</ButtonBase>
</router-link>
</EmptyPageContent>
@@ -1,21 +1,21 @@
<template>
<div id="single-page">
<MobileHeader :title="$router.currentRoute.meta.title" />
<PageHeader :can-back="true" :title="$router.currentRoute.meta.title" />
<MobileHeader :title="$t($router.currentRoute.meta.title)" />
<PageHeader :can-back="true" :title="$t($router.currentRoute.meta.title)" />
<div id="page-content" class="medium-width">
<ValidationObserver @submit.prevent="createBillingProfile" ref="createBillingProfile" v-slot="{ invalid }" tag="div" class="content-page form block-form">
<FormLabel>Company & Logo</FormLabel>
<FormLabel>{{ $t('in.form.company_and_logo') }}</FormLabel>
<InfoBox>
<p>Here you can set your <b class="text-theme">billing profile</b> which will be paste to your every newly generated invoice.</p>
<p v-html="$t('in.bill_profile_note')"></p>
</InfoBox>
<div class="block-wrapper">
<label>Logo (optional):</label>
<label>{{ $t('in_editor.client_logo') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="logo" v-slot="{ errors }">
<ImageInput :image="$getImage(profile.logo)" v-model="profile.logo" :error="errors[0]" />
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>Company name:</label>
<label>{{ $t('in.form.company_name') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="company" rules="required" v-slot="{ errors }">
<input v-model="profile.company" placeholder="Type your company name..." type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -23,7 +23,7 @@
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>Registration Notes (optional):</label>
<label>{{ $t('in.form.reg_notes') }} ({{ $t('global.optional') }}):</label>
<div class="input-wrapper">
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="registration_notes" v-slot="{ errors }">
<textarea
@@ -37,9 +37,9 @@
</ValidationProvider>
</div>
</div>
<FormLabel class="mt-70">Company Details</FormLabel>
<FormLabel class="mt-70">{{ $t('in.form.company_details') }}</FormLabel>
<div class="block-wrapper">
<label>ICO:</label>
<label>{{ $t('in_editor.ico') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="ico" rules="required" v-slot="{ errors }">
<input v-model="profile.ico" placeholder="Type your company ICO..." type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -47,7 +47,7 @@
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>DIC:</label>
<label>{{ $t('in_editor.dic') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="dic" rules="required" v-slot="{ errors }">
<input v-model="profile.dic" placeholder="Type your company DIC..." type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -55,16 +55,16 @@
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>IC DPH (optional):</label>
<label>{{ $t('in_editor.ic_dph') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="ic_dph" v-slot="{ errors }">
<input v-model="profile.ic_dph" placeholder="Type your company IC DPH..." type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<FormLabel class="mt-70">Company Address</FormLabel>
<FormLabel class="mt-70">{{ $t('in.form.company_address') }}</FormLabel>
<div class="block-wrapper">
<label>Address:</label>
<label>{{ $t('in_editor.client_address') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="address" rules="required" v-slot="{ errors }">
<input v-model="profile.address" placeholder="Type your company address..." type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -73,7 +73,7 @@
</div>
<div class="wrapper-inline">
<div class="block-wrapper">
<label>City:</label>
<label>{{ $t('in_editor.client_city') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="city" rules="required" v-slot="{ errors }">
<input v-model="profile.city" placeholder="Type your company city..." type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -81,7 +81,7 @@
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>Postal Code:</label>
<label>{{ $t('in_editor.client_postal_code') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="postal_code" rules="required" v-slot="{ errors }">
<input v-model="profile.postal_code" placeholder="Type your company postal code..." type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -90,15 +90,15 @@
</div>
</div>
<div class="block-wrapper">
<label>Country:</label>
<label>{{ $t('in_editor.client_country') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="country" rules="required" v-slot="{ errors }">
<SelectInput v-model="profile.country" :default="profile.country" :options="countries" placeholder="Select your company country" :isError="errors[0]" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<FormLabel class="mt-70">Bank Info</FormLabel>
<FormLabel class="mt-70">{{ $t('in.form.bank_info') }}</FormLabel>
<div class="block-wrapper">
<label>Bank Name:</label>
<label>{{ $t('in.form.bank_name') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="bank" rules="required" v-slot="{ errors }">
<input v-model="profile.bank" placeholder="Type your bank name..." type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -106,7 +106,7 @@
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>IBAN:</label>
<label>{{ $t('in.form.iban') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="iban" rules="required" v-slot="{ errors }">
<input v-model="profile.iban" placeholder="Type your IBAN..." type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -114,16 +114,16 @@
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>Swift code:</label>
<label>{{ $t('in.form.swift_code') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="swift" rules="required" v-slot="{ errors }">
<input v-model="profile.swift" placeholder="Type your swift code..." type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<FormLabel class="mt-70">Author</FormLabel>
<FormLabel class="mt-70">{{ $t('in.form.author') }}</FormLabel>
<div class="block-wrapper">
<label>Phone (optional):</label>
<label>{{ $t('in_editor.client_phone') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="phone" v-slot="{ errors }">
<input v-model="profile.phone" placeholder="Type your phone number..." type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -131,7 +131,7 @@
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>Email (optional):</label>
<label>{{ $t('in_editor.client_email') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="email" v-slot="{ errors }">
<input v-model="profile.email" placeholder="Type your email..." type="email"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -139,7 +139,7 @@
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>Author name:</label>
<label>{{ $t('in.form.author_name') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="author" rules="required" v-slot="{ errors }">
<input v-model="profile.author" placeholder="Type the author invoice name..." type="text"
:class="{'is-error': errors[0]}" class="focus-border-theme" />
@@ -147,17 +147,17 @@
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>Stamp (optional):</label>
<label>{{ $t('in.form.stamp') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="stamp" v-slot="{ errors }">
<ImageInput v-model="profile.stamp" :error="errors[0]" />
</ValidationProvider>
</div>
<InfoBox v-if="isError" type="error">
<p>We found some issues in your form. Please check it out and submit again</p>
<p>{{ $t('in.form.some_issues') }}</p>
</InfoBox>
<div class="block-wrapper">
<ButtonBase @click.native="createBillingProfile" :disabled="isLoading" :loading="isLoading" button-style="theme" type="submit" style="margin-bottom: 35px">
Store My Billing Profile
{{ $t('in.button.store_bill_profile') }}
</ButtonBase>
</div>
</ValidationObserver>
@@ -269,7 +269,7 @@
events.$emit('toaster', {
type: 'success',
message: 'Your billing profile was successfully stored',
message: this.$t('in.toaster.success_bill_profile'),
})
this.$store.dispatch('getAppData')
@@ -1,8 +1,8 @@
<template>
<div id="single-page">
<div id="page-content" v-if="! isLoading">
<MobileHeader :title="$router.currentRoute.meta.title" />
<PageHeader :can-back="true" :title="$router.currentRoute.meta.title" />
<MobileHeader :title="$t($router.currentRoute.meta.title)" />
<PageHeader :can-back="true" :title="$t($router.currentRoute.meta.title)" />
<div class="content-page">
<!--Client thumbnail-->
@@ -1,122 +1,122 @@
<template>
<div id="single-page">
<MobileHeader :title="$router.currentRoute.meta.title" />
<PageHeader :title="$router.currentRoute.meta.title" :can-back="true" />
<MobileHeader :title="$t($router.currentRoute.meta.title)" />
<PageHeader :title="$t($router.currentRoute.meta.title)" :can-back="true" />
<div id="page-content" class="medium-width">
<div class="content-page">
<ValidationObserver @submit.prevent="createClient" ref="createClient" v-slot="{ invalid }" tag="form" class="form block-form">
<PageTab>
<PageTabGroup>
<FormLabel>Company & Logo</FormLabel>
<FormLabel>{{ $t('in.form.company_and_logo') }}</FormLabel>
<div class="block-wrapper">
<label>Logo (optional):</label>
<label>{{ $t('in_editor.client_logo') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="avatar" v-slot="{ errors }">
<ImageInput v-model="client.avatar" :error="errors[0]" />
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>Company name:</label>
<label>{{ $t('in_editor.company_name') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="name" rules="required" v-slot="{ errors }">
<input v-model="client.name" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input v-model="client.name" :placeholder="$t('in_editor.plac.client_company')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
</PageTabGroup>
<PageTabGroup>
<FormLabel>Company Details</FormLabel>
<FormLabel>{{ $t('in.form.company_details') }}</FormLabel>
<div class="wrapper-inline">
<div class="block-wrapper">
<label>ICO:</label>
<label>{{ $t('in_editor.ico') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="ico" rules="required" v-slot="{ errors }">
<input v-model="client.ico" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input v-model="client.ico" :placeholder="$t('in_editor.plac.client_ico')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>DIC (optional):</label>
<label>{{ $t('in_editor.dic') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="dic" v-slot="{ errors }">
<input v-model="client.dic" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input v-model="client.dic" :placeholder="$t('in_editor.plac.client_dic')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
</div>
<div class="block-wrapper">
<label>IC DPH (optional):</label>
<label>{{ $t('in_editor.ic_dph') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="ic_dph" v-slot="{ errors }">
<input v-model="client.ic_dph" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input v-model="client.ic_dph" :placeholder="$t('in_editor.plac.client_ic_dph')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
</PageTabGroup>
<PageTabGroup>
<FormLabel>Company Address</FormLabel>
<FormLabel>{{ $t('in.form.company_address') }}</FormLabel>
<div class="block-wrapper">
<label>Address:</label>
<label>{{ $t('in_editor.client_address') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="address" rules="required" v-slot="{ errors }">
<input v-model="client.address" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input v-model="client.address" :placeholder="$t('in_editor.plac.client_address')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="wrapper-inline">
<div class="block-wrapper">
<label>City:</label>
<label>{{ $t('in_editor.client_city') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="city" rules="required" v-slot="{ errors }">
<input v-model="client.city" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input v-model="client.city" :placeholder="$t('in_editor.plac.client_city')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>Postal Code:</label>
<label>{{ $t('in_editor.client_postal_code') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="postal_code" rules="required" v-slot="{ errors }">
<input v-model="client.postal_code" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input v-model="client.postal_code" :placeholder="$t('in_editor.plac.client_postal_code')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
</div>
<div class="block-wrapper">
<label>Country:</label>
<label>{{ $t('in_editor.client_country') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="country" rules="required" v-slot="{ errors }">
<SelectInput v-model="client.country" :default="client.country" :options="countries" placeholder="" :isError="errors[0]" />
<SelectInput v-model="client.country" :default="client.country" :options="countries" :placeholder="$t('in_editor.plac.client_country')" :isError="errors[0]" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
</PageTabGroup>
<PageTabGroup>
<FormLabel>Contact Informations</FormLabel>
<FormLabel>{{ $t('in.form.contact_info') }}</FormLabel>
<div class="block-wrapper">
<label>Phone (optional):</label>
<label>{{ $t('in_editor.client_phone') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="phone_number" v-slot="{ errors }">
<input v-model="client.phone_number" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input v-model="client.phone_number" :placeholder="$t('in_editor.plac.client_phone')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>Email (optional):</label>
<label>{{ $t('in_editor.client_email') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="email" v-slot="{ errors }">
<input v-model="client.email" placeholder="" type="email" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<input v-model="client.email" :placeholder="$t('in_editor.plac.client_email')" type="email" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<InfoBox v-if="isError" type="error">
<p>We found some issues in your form. Please check it out and submit again</p>
<p>{{ $t('in.form.some_issues') }}</p>
</InfoBox>
<div class="block-wrapper">
<ButtonBase :disabled="isLoading" :loading="isLoading" button-style="theme" type="submit" class="submit-button">
Create Client
{{ $t('in.form.create_client') }}
</ButtonBase>
</div>
</PageTabGroup>
@@ -170,7 +170,7 @@
return {
isLoading: false,
isError: false,
_client: {
client: {
avatar: undefined,
name: undefined,
email: undefined,
@@ -183,19 +183,6 @@
dic: undefined,
ic_dph: undefined,
},
client: {
avatar: undefined,
name: 'MakingCG s.r.o.',
email: 'info@makingcg.com',
phone_number: '+421950123456',
address: 'Karpatske namestie',
city: 'Bratislava',
postal_code: '04001',
country: 'SK',
ico: '4153514345',
dic: '5346542865',
ic_dph: 'SK200543253553',
},
}
},
methods: {
@@ -231,7 +218,7 @@
events.$emit('toaster', {
type: 'success',
message: 'Client was created successfully',
message: this.$t('in_toaster.success_client_creation'),
})
// Go to User page
@@ -1,15 +1,15 @@
<template>
<PageTab class="form-fixed-width">
<PageTabGroup class="form block-form">
<FormLabel>Company & Logo</FormLabel>
<FormLabel>{{ $t('in.form.company_and_logo') }}</FormLabel>
<div class="block-wrapper">
<label>Logo (optional):</label>
<label>{{ $t('in_editor.client_logo') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="avatar" v-slot="{ errors }">
<ImageInput @input="$updateImage(`/oasis/clients/${client.id}`, 'avatar', client.avatar)" v-model="client.avatar" :image="client.avatar" :error="errors[0]" />
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>Company name:</label>
<label>{{ $t('in_editor.company_name') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="name" rules="required" v-slot="{ errors }">
<input @input="$updateText(`/oasis/clients/${client.id}`, 'name', client.name)" v-model="client.name" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
@@ -17,23 +17,23 @@
</div>
</PageTabGroup>
<PageTabGroup class="form block-form">
<FormLabel>Company Details</FormLabel>
<FormLabel>{{ $t('in.form.company_details') }}</FormLabel>
<div class="block-wrapper">
<label>ICO:</label>
<label>{{ $t('in_editor.ico') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="ico" rules="required" v-slot="{ errors }">
<input @input="$updateText(`/oasis/clients/${client.id}`, 'ico', client.ico)" v-model="client.ico" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>DIC (optional):</label>
<label>{{ $t('in_editor.dic') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="dic" v-slot="{ errors }">
<input @input="$updateText(`/oasis/clients/${client.id}`, 'dic', client.dic)" v-model="client.dic" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>IC DPH (optional):</label>
<label>{{ $t('in_editor.ic_dph') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="ic_dph" v-slot="{ errors }">
<input @input="$updateText(`/oasis/clients/${client.id}`, 'ic_dph', client.ic_dph)" v-model="client.ic_dph" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
@@ -41,30 +41,30 @@
</div>
</PageTabGroup>
<PageTabGroup class="form block-form">
<FormLabel>Company Address</FormLabel>
<FormLabel>{{ $t('in.form.company_address') }}</FormLabel>
<div class="block-wrapper">
<label>Address:</label>
<label>{{ $t('in_editor.client_address') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="address" rules="required" v-slot="{ errors }">
<input @input="$updateText(`/oasis/clients/${client.id}`, 'address', client.address)" v-model="client.address" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>City:</label>
<label>{{ $t('in_editor.client_city') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="city" rules="required" v-slot="{ errors }">
<input @input="$updateText(`/oasis/clients/${client.id}`, 'city', client.city)" v-model="client.city" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>Postal Code:</label>
<label>{{ $t('in_editor.client_postal_code') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="postal_code" rules="required" v-slot="{ errors }">
<input @input="$updateText(`/oasis/clients/${client.id}`, 'postal_code', client.postal_code)" v-model="client.postal_code" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>Country:</label>
<label>{{ $t('in_editor.client_country') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="country" rules="required" v-slot="{ errors }">
<SelectInput @input="$updateText(`/oasis/clients/${client.id}`, 'country', client.country)" v-model="client.country" :default="client.country" :options="countries" placeholder="" :isError="errors[0]" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
@@ -72,16 +72,16 @@
</div>
</PageTabGroup>
<PageTabGroup class="form block-form">
<FormLabel>Contact Informations</FormLabel>
<FormLabel>{{ $t('in.form.contact_info') }}</FormLabel>
<div class="block-wrapper">
<label>Phone (optional):</label>
<label>{{ $t('in_editor.client_phone') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="phone_number" v-slot="{ errors }">
<input @input="$updateText(`/oasis/clients/${client.id}`, 'phone_number', client.phone_number)" v-model="client.phone_number" placeholder="" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>Email (optional):</label>
<label>{{ $t('in_editor.client_email') }} ({{ $t('global.optional') }}):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="email" v-slot="{ errors }">
<input @input="$updateText(`/oasis/clients/${client.id}`, 'email', client.email)" v-model="client.email" placeholder="" type="email" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
@@ -106,7 +106,7 @@
import {mapGetters} from "vuex";
export default {
name: 'UserDetail',
name: 'ClientDetail',
props: [
'client'
],
@@ -134,9 +134,6 @@
isLoading: false,
}
},
methods: {
},
}
</script>
@@ -43,7 +43,7 @@
<!--Empty page-->
<template v-slot:empty-page>
<InfoBox class="form-fixed-width">
<p>Client doesn't have any invoices yet.</p>
<p>{{ $t('in.empty.clients_invoices') }}</p>
</InfoBox>
</template>
</DatatableWrapper>
@@ -60,7 +60,7 @@
import {Edit2Icon, DownloadCloudIcon} from "vue-feather-icons";
export default {
name: 'UserInvoices',
name: 'ClientInvoices',
components: {
EmptyPageContent,
DatatableWrapper,
@@ -85,7 +85,7 @@
sortable: false
},
{
label: 'Created At',
label: this.$t('file_detail.created_at'),
field: 'data.attributes.created_at',
sortable: false
},
+7 -7
View File
@@ -21,13 +21,13 @@
<!--Sidebar navigation-->
<ContentSidebar>
<ContentGroup title="Invoicing" class="navigator menu-list-wrapper vertical">
<ContentGroup :title="$t('in.nav.group.invoicing')" class="navigator menu-list-wrapper vertical">
<a @click="goTo('regular-invoice')" :class="{'is-active': $isThisLocation(['regular-invoice']) && $route.name === 'InvoicesList'}" class="menu-list-item link">
<div class="icon text-theme">
<file-text-icon size="17" />
</div>
<div class="label text-theme">
Invoices
{{ $t('in.nav.invoices') }}
</div>
</a>
<a @click="goTo('advance-invoice')" :class="{'is-active': $isThisLocation(['advance-invoice']) && $route.name === 'InvoicesList'}" class="menu-list-item link">
@@ -35,7 +35,7 @@
<clock-icon size="17" />
</div>
<div class="label text-theme">
Advance Invoices
{{ $t('in.nav.advance_invoices') }}
</div>
</a>
<a @click="goTo('clients')" :class="{'is-active': $isThisLocation(['clients']) && $route.name === 'InvoicesList'}" class="menu-list-item link">
@@ -43,17 +43,17 @@
<users-icon size="17" />
</div>
<div class="label text-theme">
Clients
{{ $t('in.nav.clients') }}
</div>
</a>
</ContentGroup>
<ContentGroup title="Settings" class="navigator menu-list-wrapper vertical">
<ContentGroup :title="$t('in.nav.group.settings')" class="navigator menu-list-wrapper vertical">
<router-link :to="{name: 'BillingProfile'}" class="menu-list-item link">
<div class="icon text-theme">
<edit2-icon size="17" />
</div>
<div class="label text-theme">
My Billing Profile
{{ $t('in.nav.my_bill_profile') }}
</div>
</router-link>
</ContentGroup>
@@ -131,7 +131,7 @@
if (! this.currentFolder) {
this.$store.commit('STORE_CURRENT_FOLDER', {
name: 'Invoices',
name: this.$t('in.nav.invoices'),
id: undefined,
location: 'regular-invoice',
})
@@ -56,7 +56,7 @@
</div>
<div v-if="isNewClient" class="block-wrapper">
<label>{{ $t('in_editor.lab_ico') }}:</label>
<label>{{ $t('in_editor.ico') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="client_ico" rules="required" v-slot="{ errors }">
<input v-model="invoice.client_ico" :placeholder="$t('in_editor.plac.client_ico')" type="text" :class="{'is-error': errors[0]}" class="focus-border-theme" />
<small v-if="fullDetails" class="input-help">
@@ -1,7 +1,7 @@
<template>
<div id="single-page">
<MobileHeader :title="pageTitle" />
<PageHeader :title="pageTitle" />
<PageHeader :can-back="true" :title="pageTitle" />
<div id="page-content">
<div class="content-page" v-if="! isLoadingPage">
@@ -216,11 +216,11 @@
</div>
<ButtonBase :disabled="isLoading" @click.native="deleteInvoice" button-style="secondary" class="next-submit">
Delete Invoice
{{ $t('in.form.delete_invoice') }}
</ButtonBase>
<ButtonBase :disabled="isLoading" :loading="isLoading" @click.native="updateInvoice" button-style="theme-solid" class="next-submit" style="margin-top: 15px">
Save Changes
{{ $t('popup_share_edit.save') }}
</ButtonBase>
<p class="error-message" v-if="isError">
{{ errorMessage }}
@@ -472,8 +472,8 @@
},
deleteInvoice() {
events.$emit('confirm:open', {
title: `Are you sure you want to delete this invoice?`,
message: 'Your invoice will be permanently deleted.',
title: this.$t('in.popup.delete_single_invoice.title'),
message: this.$t('in.popup.delete_single_invoice.message'),
buttonColor: 'danger-solid',
action: {
id: this.$route.params.id,
@@ -514,7 +514,7 @@
events.$emit('toaster', {
type: 'success',
message: 'The invoice was successfully edited.',
message: this.$t('in_toaster.success_invoice_edition'),
})
})
.catch(error => {
@@ -23,9 +23,6 @@
contextMenu(event, item) {
events.$emit('contextMenu:show', event, item)
},
},
mounted() {
}
}
</script>
@@ -27,7 +27,7 @@
<div class="item-info">
<span class="item-size">
Created at: {{ item.created_at }}, Total: {{ item.totalNet }}
{{ $t('file_detail.created_at') }}: {{ item.created_at }}, {{ $t('global.total') }}: {{ item.totalNet }}
</span>
</div>
</div>
@@ -50,7 +50,7 @@ import {mapGetters} from 'vuex'
import {events} from '@/bus'
export default {
name: 'InvoiceItem',
name: 'ClientItem',
props: [
'item'
],
@@ -7,11 +7,10 @@
:title="clipboard[0].name"
:subtitle="clipboard[0].email"
/>
<MenuMobileGroup>
<OptionGroup class="menu-option-group">
<Option @click.native="goToProfile" title="Edit" icon="rename" />
<Option @click.native="deleteItem" title="Delete" icon="trash" />
<Option @click.native="goToProfile" :title="$t('in.menu.edit')" icon="rename" />
<Option @click.native="deleteItem" :title="$t('in.menu.delete')" icon="trash" />
</OptionGroup>
<OptionGroup>
<Option @click.native="goToProfile" :title="$t('context_menu.detail')" icon="detail" />
@@ -57,8 +56,8 @@ export default {
},
deleteItem() {
events.$emit('confirm:open', {
title: `Are you sure you want to delete client ${this.clipboard[0].name}?`,
message: 'Your client will be permanently deleted.',
title: this.$t('in.popup.delete_client.title', {name: this.clipboard[0].name}),
message: this.$t('in.popup.delete_client.message'),
buttonColor: 'danger-solid',
action: {
id: this.clipboard[0].id,
@@ -5,11 +5,11 @@
<!--Invoice message-->
<div class="text-content" v-if="hasBillingProfile && $isThisLocation(['regular-invoice', 'advance-invoice']) && !isLoading">
<h1 class="title">
Create Your First Invoice
{{ $t('in.empty.invoice_page_title') }}
</h1>
<p class="description">
It's very easy, just click on the button below.
{{ $t('in.empty.invoice_page_description') }}
</p>
<ButtonBase @click.native="createInvoice" button-style="theme" class="button">
@@ -20,30 +20,30 @@
<!--Client Message-->
<div class="text-content" v-if="hasBillingProfile && $isThisLocation('clients') && !isLoading">
<h1 class="title">
Create Your First Client
{{ $t('in.empty.client_page_title') }}
</h1>
<p class="description">
It's very easy, just click on the button below.
{{ $t('in.empty.invoice_page_description') }}
</p>
<ButtonBase @click.native="createClient" button-style="theme" class="button">
Create Client
{{ $t('in.form.create_client') }}
</ButtonBase>
</div>
<!--Billing Profile Message-->
<div class="text-content" v-if="! hasBillingProfile">
<h1 class="title">
You don't have billing profile
{{ $t('in.empty.bill_profile_title') }}
</h1>
<p class="description">
Before your first invoice, please set up your billing profile.
{{ $t('in.empty.bill_profile_description') }}
</p>
<ButtonBase @click.native="createBillingProfile" button-style="theme" class="button">
Set up Billing Profile
{{ $t('in.button.setup_bill_profile') }}
</ButtonBase>
</div>
@@ -81,7 +81,7 @@
return this.entries && this.entries.length == 0
},
buttonTitle() {
return this.$isThisLocation('regular-invoice') ? 'Create Regular Invoice' : 'Create Advance Invoice'
return this.$isThisLocation('regular-invoice') ? this.$t('in_editor.page.create_regular_invoice') : this.$t('in_editor.page.create_advance_invoice')
},
hasBillingProfile() {
return this.user && this.user.data.attributes.has_billing_profile
@@ -7,7 +7,7 @@
{{ directoryName }}
</MobileActionButton>
<MobileActionButton @click.native="createButton" icon="file-plus">
Create
{{ $t('create') }}
</MobileActionButton>
<MobileActionButton @click.native="showViewOptions" icon="th-list">
{{ $t('preview_sorting.preview_sorting_button') }}
@@ -24,7 +24,7 @@
import {events} from '@/bus'
export default {
name: 'FileActionsMobile',
name: 'InvoiceActionsMobile',
components: {
MobileActionButtonUpload,
MobileActionButton,
@@ -37,7 +37,7 @@
directoryName() {
return this.currentFolder
? this.currentFolder.name
: 'Invoices'
: this.$t('in.nav.invoices')
},
},
data() {
@@ -4,9 +4,9 @@
<!--Invoice-->
<div v-show="isInvoice" class="menu-options" id="menu-list">
<OptionGroup class="menu-option-group">
<Option @click.native="editItem" title="Edit Invoice" icon="rename" />
<Option @click.native="" title="Send Invoice" icon="send" />
<Option @click.native="goToCompany" title="Go to Company" icon="user" />
<Option @click.native="editItem" :title="$t('in.menu.edit_invoice')" icon="rename" />
<Option @click.native="" :title="$t('in.menu.send_invoice')" icon="send" />
<Option @click.native="goToCompany" :title="$t('in.menu.show_company')" icon="user" />
<Option @click.native="deleteInvoice" :title="$t('context_menu.delete')" icon="trash" />
</OptionGroup>
@@ -19,11 +19,11 @@
<!--Client-->
<div v-show="isClient" class="menu-options" id="menu-list">
<OptionGroup class="menu-option-group">
<Option @click.native="goToCompany" title="Edit" icon="rename" />
<Option @click.native="deleteClient" title="Delete" icon="trash" />
<Option @click.native="goToCompany" :title="$t('in.menu.edit')" icon="rename" />
<Option @click.native="deleteClient" :title="$t('context_menu.delete')" icon="trash" />
</OptionGroup>
<OptionGroup>
<Option @click.native="goToCompany" title="Go to Profile" icon="user" />
<Option @click.native="goToCompany" :title="$t('in.menu.show_company')" icon="user" />
<Option @click.native="showDetail" :title="$t('context_menu.detail')" icon="detail" />
</OptionGroup>
</div>
@@ -100,8 +100,8 @@ export default {
},
deleteInvoice() {
events.$emit('confirm:open', {
title: `Are you sure you want to delete invoice number ${this.item.invoice_number}?`,
message: 'Your invoice will be permanently deleted.',
title: this.$t('in.popup.delete_invoice.title', {number: this.item.invoice_number}),
message: this.$t('in.popup.delete_invoice.message'),
buttonColor: 'danger-solid',
action: {
id: this.item.id,
@@ -111,8 +111,8 @@ export default {
},
deleteClient() {
events.$emit('confirm:open', {
title: `Are you sure you want to delete client ${this.item.name}?`,
message: 'Your client will be permanently deleted.',
title: this.$t('in.popup.delete_client.title', {name: this.item.name}),
message: this.$t('in.popup.delete_client.message'),
buttonColor: 'danger-solid',
action: {
id: this.item.id,
@@ -2,11 +2,11 @@
<MenuMobile name="invoice-create">
<MenuMobileGroup>
<OptionGroup>
<Option @click.native="createInvoice('regular-invoice')" title="Create Invoice" icon="file-plus" is-hover-disabled="true" />
<Option @click.native="createInvoice('advance-invoice')" title="Create Advance Invoice" icon="clock" is-hover-disabled="true" />
<Option @click.native="createInvoice('regular-invoice')" :title="$t('in.create.regular_invoice')" icon="file-plus" is-hover-disabled="true" />
<Option @click.native="createInvoice('advance-invoice')" :title="$t('in.create.advance_invoice')" icon="clock" is-hover-disabled="true" />
</OptionGroup>
<OptionGroup>
<Option @click.native="createClient" title="Create Client" icon="user-plus" is-hover-disabled="true" />
<Option @click.native="createClient" :title="$t('in.create.client')" icon="user-plus" is-hover-disabled="true" />
</OptionGroup>
</MenuMobileGroup>
</MenuMobile>
@@ -14,7 +14,7 @@
<!--Search bar-->
<ToolbarGroup style="margin-left: 0">
<SearchBar v-model="query" @reset-query="query = ''" placeholder="Search your invoices..." />
<SearchBar v-model="query" @reset-query="query = ''" :placeholder="searchPlaceholder" />
</ToolbarGroup>
<!--Creating controls-->
@@ -23,11 +23,11 @@
<ToolbarButton @click.stop.native="createCreateMenu" source="plus" :action="$t('actions.create_folder')" />
<PopoverItem name="desktop-create-invoices">
<OptionGroup>
<Option @click.stop.native="createInvoice('regular-invoice')" title="Create Regular Invoice" icon="file-plus" />
<Option @click.stop.native="createInvoice('advance-invoice')" title="Create Advance Invoice" icon="clock" />
<Option @click.stop.native="createInvoice('regular-invoice')" :title="$t('in_editor.page.create_regular_invoice')" icon="file-plus" />
<Option @click.stop.native="createInvoice('advance-invoice')" :title="$t('in_editor.page.create_advance_invoice')" icon="clock" />
</OptionGroup>
<OptionGroup>
<Option @click.native="createClient" title="Create Client" icon="user-plus" />
<Option @click.native="createClient" :title="$t('in.create.client')" icon="user-plus" />
</OptionGroup>
</PopoverItem>
</PopoverWrapper>
@@ -94,7 +94,7 @@
'clipboard',
]),
directoryName() {
return this.currentFolder ? this.currentFolder.name : 'Invoices'
return this.currentFolder ? this.currentFolder.name : this.$t('in.nav.invoices')
},
canActiveInView() {
let locations = [
@@ -104,6 +104,11 @@
]
return !this.$isThisLocation(locations) || this.clipboard.length === 0
},
searchPlaceholder() {
return this.currentFolder && ['regular-invoice', 'advance-invoice'].includes(this.currentFolder.location)
? this.$t('inputs.placeholder_search_invoices')
: this.$t('inputs.placeholder_search_clients')
},
},
data() {
return {
@@ -133,8 +138,8 @@
if (this.$isThisLocation(['regular-invoice', 'advance-invoice']) && this.clipboard.length > 0) {
events.$emit('confirm:open', {
title: `Are you sure you want to delete invoice number ${this.clipboard[0].invoice_number}?`,
message: 'Your invoice will be permanently deleted.',
title: this.$t('in.popup.delete_invoice.title', {number: this.clipboard[0].invoice_number}),
message: this.$t('in.popup.delete_invoice.message'),
buttonColor: 'danger-solid',
action: {
id: this.clipboard[0].id,
@@ -145,8 +150,8 @@
if (this.$isThisLocation('clients') && this.clipboard.length > 0) {
events.$emit('confirm:open', {
title: `Are you sure you want to delete client ${this.clipboard[0].name}?`,
message: 'Your client will be permanently deleted.',
title: this.$t('in.popup.delete_client.title', {name: this.clipboard[0].name}),
message: this.$t('in.popup.delete_client.message'),
buttonColor: 'danger-solid',
action: {
id: this.clipboard[0].id,
@@ -2,11 +2,11 @@
<MenuMobile name="invoice-filter">
<MenuMobileGroup>
<OptionGroup>
<Option @click.native="showLocation('regular-invoice')" :is-active="$isThisLocation('regular-invoice')" title="Invoices" icon="file-text" is-hover-disabled="true" />
<Option @click.native="showLocation('advance-invoice')" :is-active="$isThisLocation('advance-invoice')" title="Advance Invoices" icon="clock" is-hover-disabled="true" />
<Option @click.native="showLocation('regular-invoice')" :is-active="$isThisLocation('regular-invoice')" :title="$t('in.nav.invoices')" icon="file-text" is-hover-disabled="true" />
<Option @click.native="showLocation('advance-invoice')" :is-active="$isThisLocation('advance-invoice')" :title="$t('in.nav.advance_invoices')" icon="clock" is-hover-disabled="true" />
</OptionGroup>
<OptionGroup>
<Option @click.native="showLocation('clients')" :is-active="$isThisLocation('clients')" title="Clients" icon="users" is-hover-disabled="true" />
<Option @click.native="showLocation('clients')" :is-active="$isThisLocation('clients')" :title="$t('in.nav.clients')" icon="users" is-hover-disabled="true" />
</OptionGroup>
</MenuMobileGroup>
</MenuMobile>
@@ -23,18 +23,18 @@
<ListInfo v-if="isSingleFile && !isEmpty">
<ListInfoItem
title="Email"
:title="$t('in_editor.client_email')"
:content="singleFile.email"
/>
<ListInfoItem
title="Total Net"
:title="$t('in.total_net')"
:content="singleFile.totalNet"
/>
<ListInfoItem
title="Total Invoices"
:content="singleFile.totalInvoices + ' Pcs.'"
:title="$t('in.total_invoices')"
:content="singleFile.totalInvoices + ' ' + $t('global.pcs')"
/>
<!--Created At-->
@@ -61,7 +61,7 @@
<TitlePreview
icon="file-text"
:title="singleFile.client_name"
:subtitle="'Invoice - ' + singleFile.invoice_number"
:subtitle="$t('invoice_title') + ' - ' + singleFile.invoice_number"
/>
</div>
@@ -69,17 +69,17 @@
<ListInfo v-if="isSingleFile && !isEmpty">
<ListInfoItem
title="Invoice Number"
:title="$t('invoice_number')"
:content="singleFile.invoice_number"
/>
<ListInfoItem
title="Total"
:title="$t('total')"
:content="singleFile.total"
/>
<ListInfoItem
title="Client"
:title="$t('client')"
:content="singleFile.client_name"
/>
@@ -106,7 +106,7 @@
import {events} from "@/bus"
export default {
name: 'InfoSidebar',
name: 'InvoiceInfoSidebar',
components: {
FilePreviewDetail,
ImageMetaData,
@@ -20,7 +20,7 @@
<div class="item-info">
<span class="item-size">
{{ item.created_at }}, n. {{ item.invoice_number }}
{{ item.created_at }}, {{ $t('in.n-abbreviation') }} {{ item.invoice_number }}
</span>
</div>
</div>
@@ -5,18 +5,17 @@
class="headline"
icon="file-text"
:title="clipboard[0].name"
:subtitle="'Invoice - ' + clipboard[0].invoice_number"
:subtitle="$t('in.invoice') + ' - ' + clipboard[0].invoice_number"
/>
<!--Trash location-->
<MenuMobileGroup>
<OptionGroup class="menu-option-group">
<Option @click.native="editInvoice" title="Edit Invoice" icon="rename" />
<Option @click.native="" title="Send Invoice" icon="send" />
<Option @click.native="goToCompany" title="Go to Company" icon="user" />
<Option @click.native="editInvoice" :title="$t('in.menu.edit_invoice')" icon="rename" />
<Option @click.native="" :title="$t('in.menu.send_invoice')" icon="send" />
<Option @click.native="goToCompany" :title="$t('in.menu.show_company')" icon="user" />
<Option @click.native="deleteInvoice" :title="$t('context_menu.delete')" icon="trash" />
</OptionGroup>
<OptionGroup>
<Option @click.native="downloadInvoice" :title="$t('context_menu.download')" icon="download" />
</OptionGroup>
@@ -35,7 +34,7 @@ import {mapGetters} from 'vuex'
import {events} from '@/bus'
export default {
name: 'FileMenuMobile',
name: 'InvoiceMobileMenu',
components: {
MenuMobileGroup,
ThumbnailItem,
@@ -67,8 +66,8 @@ export default {
},
deleteInvoice() {
events.$emit('confirm:open', {
title: `Are you sure you want to delete invoice number ${this.clipboard[0].invoice_number}?`,
message: 'Your invoice will be permanently deleted.',
title: this.$t('in.popup.delete_invoice.title', {number: this.clipboard[0].invoice_number}),
message: this.$t('in.popup.delete_invoice.message'),
buttonColor: 'danger-solid',
action: {
id: this.clipboard[0].id,
@@ -17,7 +17,7 @@ import Option from '@/components/FilesView/Option'
import {mapGetters} from 'vuex'
export default {
name: 'InvoiceFilterMobile',
name: 'InvoiceSortingMobile',
components: {
MenuMobileGroup,
OptionGroup,
@@ -30,32 +30,7 @@ export default {
]),
},
methods: {
showLocation(location) {
},
flushBrowseHistory() {
this.$store.commit('FLUSH_FOLDER_HISTORY')
},
goToFiles() {
this.$store.dispatch('getFolder', [{folder: this.homeDirectory, back: false, init: true}])
this.flushBrowseHistory()
},
goToLatest() {
this.$store.dispatch('getLatest')
this.flushBrowseHistory()
},
goToTrash() {
this.$store.dispatch('getTrash')
this.flushBrowseHistory()
},
goToShared() {
this.$store.dispatch('getShared', [{back: false, init: false}])
this.flushBrowseHistory()
},
goToParticipantUploads() {
this.$store.dispatch('getParticipantUploads')
this.flushBrowseHistory()
}
}
}
</script>
@@ -16,7 +16,7 @@
<!--Main navigation-->
<OptionGroup v-if="!clickedSubmenu">
<Option @click.native="goToFiles" :title="$t('menu.files')" icon="hard-drive" is-hover-disabled="true" />
<Option @click.native="goToInvoices" title="Invoices" icon="file-text" is-hover-disabled="true" />
<Option @click.native="goToInvoices" :title="$t('in.nav.invoices')" icon="file-text" is-hover-disabled="true" />
<Option @click.native.stop="showSubmenu('settings')" :title="$t('menu.settings')" icon="user" :is-arrow-right="true" is-hover-disabled="true" />
<Option v-if="isAdmin" @click.native.stop="showSubmenu('admin')" :title="$t('menu.admin')" icon="settings" :is-arrow-right="true" is-hover-disabled="true" />
</OptionGroup>
@@ -86,7 +86,7 @@
'admin': this.$t('menu.admin')
}
return 'Go back from ' + location[this.clickedSubmenu]
return this.$t('go_back_from') + ' ' + location[this.clickedSubmenu]
}
},
data() {
@@ -10,11 +10,11 @@
<router-link :to="{name: 'Files'}" :title="$t('locations.home')" class="icon-navigation-item home">
<div class="button-icon text-theme">
<hard-drive-icon size="19" class="text-theme"></hard-drive-icon>
<hard-drive-icon size="19" class="text-theme" />
</div>
</router-link>
<a @click="goToInvoice" title="Invoices" :class="{'is-active': $isThisRoute($route, invoiceRoutes)}" class="icon-navigation-item invoice">
<a @click="goToInvoice" :title="$t('in.nav.invoices')" :class="{'is-active': $isThisRoute($route, invoiceRoutes)}" class="icon-navigation-item invoice">
<div class="button-icon">
<file-text-icon size="19" />
</div>
@@ -22,13 +22,13 @@
<router-link :to="{name: 'Profile'}" :class="{'is-active': isUserProfileRoute}" :title="$t('locations.profile')" class="icon-navigation-item settings">
<div class="button-icon">
<user-icon size="19"></user-icon>
<user-icon size="19" />
</div>
</router-link>
<router-link v-if="user.data.attributes.role === 'admin'" :to="{name: 'Dashboard'}" :class="{'is-active': $isThisRoute($route, adminRoutes)}" :title="$t('locations.settings')" class="icon-navigation-item users">
<div class="button-icon">
<settings-icon size="19"></settings-icon>
<settings-icon size="19" />
</div>
</router-link>
</div>
@@ -37,7 +37,7 @@
<ul class="icon-navigation logout">
<li @click="$store.dispatch('logOut')" :title="$t('locations.logout')" class="icon-navigation-item">
<div class="button-icon">
<power-icon size="19"></power-icon>
<power-icon size="19" />
</div>
</li>
</ul>
+8 -8
View File
@@ -79,7 +79,7 @@ const routesOasis = [
import(/* webpackChunkName: "chunks/oasis/invoices" */ './Oasis/Invoices/Invoice'),
meta: {
requiresAuth: true,
title: 'Faktúry'
title: 'in.route_title.invoices'
},
children: [
{
@@ -89,7 +89,7 @@ const routesOasis = [
import(/* webpackChunkName: "chunks/oasis/invoices/list" */ './Oasis/Invoices/InvoicesView'),
meta: {
requiresAuth: true,
title: 'Invoices'
title: 'in.route_title.invoices'
},
},
{
@@ -99,7 +99,7 @@ const routesOasis = [
import(/* webpackChunkName: "chunks/oasis/invoices/profile" */ './Oasis/Invoices/BillingProfile'),
meta: {
requiresAuth: true,
title: 'My Billing Profile'
title: 'in.nav.my_bill_profile'
},
},
{
@@ -109,7 +109,7 @@ const routesOasis = [
import(/* webpackChunkName: "chunks/oasis/invoices/profile" */ './Oasis/Invoices/BillingProfileSetUp'),
meta: {
requiresAuth: true,
title: 'Set My Billing Profile'
title: 'in.button.setup_bill_profile'
},
},
{
@@ -119,7 +119,7 @@ const routesOasis = [
import(/* webpackChunkName: "chunks/oasis/invoices/create-client" */ './Oasis/Invoices/Clients/CreateClient'),
meta: {
requiresAuth: true,
title: 'Create Client'
title: 'in.create.client'
},
},
{
@@ -147,7 +147,7 @@ const routesOasis = [
import(/* webpackChunkName: "chunks/oasis/invoices/client" */ './Oasis/Invoices/Clients/Client'),
meta: {
requiresAuth: true,
title: 'Client'
title: 'in.route_title.client'
},
children: [
{
@@ -157,7 +157,7 @@ const routesOasis = [
import(/* webpackChunkName: "chunks/oasis/invoices/client-detail" */ './Oasis/Invoices/Clients/Tabs/ClientDetail'),
meta: {
requiresAuth: true,
title: 'Client Detail'
title: 'in.route_title.client_detail'
},
},
{
@@ -167,7 +167,7 @@ const routesOasis = [
import(/* webpackChunkName: "chunks/oasis/invoices/client-invoices" */ './Oasis/Invoices/Clients/Tabs/ClientInvoices'),
meta: {
requiresAuth: true,
title: 'Client Invoices'
title: 'in.route_title.client_invoices'
},
},
]