mirror of
https://github.com/mokuappio/serverless-invoices.git
synced 2025-10-28 08:21:08 -04:00
Add en translations.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<div v-for="tax in taxes" :key="tax.id" class="col-sm-6">
|
||||
<AppEditable :value="tax.label"
|
||||
placeholder="Label"
|
||||
:placeholder="$t('label')"
|
||||
@change="updateTaxProp({ label: $event }, tax)"/>
|
||||
<i class="material-icons md-18 float-right pointer" @click="removeTax(tax)">close</i>
|
||||
<AppInput :value="tax.value" @change="updateTaxProp({ value: $event }, tax)"
|
||||
@ -11,7 +11,7 @@
|
||||
<div class="col-12">
|
||||
<button class="btn btn-sm btn-secondary " @click="addNewTax">
|
||||
<i class="material-icons md-18">add</i>
|
||||
Tax
|
||||
{{ $t('tax') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -23,6 +23,7 @@ import AppEditable from '@/components/form/AppEditable';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
i18nOptions: { namespaces: 'team-taxes' },
|
||||
components: {
|
||||
AppEditable,
|
||||
AppInput,
|
||||
@ -37,17 +38,17 @@ export default {
|
||||
this.$store.dispatch('taxes/addNewTax');
|
||||
},
|
||||
async removeTax(field) {
|
||||
const confirmed = await this.$bvModal.msgBoxConfirm(`Delete tax ${field.label}?`, {
|
||||
okTitle: 'Delete',
|
||||
const confirmed = await this.$bvModal.msgBoxConfirm(`${this.$t('delete_modal.title')} ${field.label}?`, {
|
||||
okTitle: this.$t('delete_modal.ok_title'),
|
||||
okVariant: 'danger',
|
||||
cancelTitle: 'Dismiss',
|
||||
cancelTitle: this.$t('delete_modal.cancel_title'),
|
||||
cancelVariant: 'btn-link',
|
||||
contentClass: 'bg-base dp--24',
|
||||
});
|
||||
if (confirmed) {
|
||||
await this.$store.dispatch('taxes/deleteTax', field.id);
|
||||
try {
|
||||
NotificationService.success('Deleted');
|
||||
NotificationService.success(this.$t('notification_deleted'));
|
||||
} catch (err) {
|
||||
NotificationService.error(err.message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user