feat: localize resource fields.

This commit is contained in:
a.bouhuolia
2021-08-23 10:25:07 +02:00
parent 360e333276
commit 0be9f591b0
20 changed files with 613 additions and 219 deletions

View File

@@ -5,22 +5,22 @@ export default {
sortField: 'date',
},
fields: {
'date': {
name: 'Date',
date: {
name: 'inventory_adjustment.field.date',
column: 'date',
fieldType: 'date',
},
'type': {
name: 'Adjustment type',
type: {
name: 'inventory_adjustment.field.type',
column: 'type',
fieldType: 'enumeration',
options: [
{ key: 'increment', name: 'Increment' },
{ key: 'decrement', name: 'Decrement' },
{ key: 'increment', name: 'inventory_adjustment.field.type.increment' },
{ key: 'decrement', name: 'inventory_adjustment.field.type.decrement' },
],
},
'adjustment_account': {
name: 'Adjustment account',
adjustment_account: {
name: 'inventory_adjustment.field.adjustment_account',
column: 'adjustment_account_id',
fieldType: 'relation',
@@ -30,28 +30,28 @@ export default {
relationEntityLabel: 'name',
relationEntityKey: 'slug',
},
'reason': {
name: 'Reason',
reason: {
name: 'inventory_adjustment.field.reason',
column: 'reason',
fieldType: 'text',
},
'reference_no': {
name: 'Reference No.',
reference_no: {
name: 'inventory_adjustment.field.reference_no',
column: 'reference_no',
fieldType: 'text',
},
'description': {
name: 'Description',
description: {
name: 'inventory_adjustment.field.description',
column: 'description',
fieldType: 'text',
},
'published_at': {
name: 'Published at',
published_at: {
name: 'inventory_adjustment.field.published_at',
column: 'published_at',
fieldType: 'date',
},
'created_at': {
name: 'Created at',
created_at: {
name: 'inventory_adjustment.field.created_at',
column: 'created_at',
fieldType: 'date',
},