feat: wip export resource data

This commit is contained in:
Ahmed Bouhuolia
2024-05-01 00:20:13 +02:00
parent 8a96c41258
commit 7e89966f20
34 changed files with 1259 additions and 30 deletions

View File

@@ -7,6 +7,7 @@ export default {
sortField: 'name',
},
importable: true,
exportable: true,
fields: {
name: {
name: 'account.field.name',
@@ -85,6 +86,62 @@ export default {
fieldType: 'date',
},
},
columns: {
name: {
name: 'account.field.name',
type: 'text',
exportable: true,
},
code: {
name: 'account.field.code',
type: 'text',
exportable: true,
},
description: {
name: 'account.field.description',
type: 'text',
exportable: true,
},
rootType: {
name: 'account.field.root_type',
type: 'text',
exportable: true,
},
accountType: {
name: 'account.field.type',
accessor: 'accountTypeLabel',
type: 'enumeration',
exportable: true,
},
accountNormal: {
name: 'account.field.normal',
accessor: 'accountNormalFormatted',
exportable: true,
},
currencyCode: {
name: 'account.field.currency',
exportable: true,
},
bankBalance: {
name: 'account.field.bank_balance',
accessor: 'bankBalanceFormatted',
exportable: true,
},
balance: {
name: 'account.field.bank_balance',
accessor: 'amount',
exportable: true,
},
active: {
name: 'account.field.active',
type: 'boolean',
exportable: true,
},
createdAt: {
name: 'account.field.created_at',
exportable: true,
},
},
fields2: {
name: {
name: 'account.field.name',

View File

@@ -5,6 +5,7 @@ export default {
sortField: 'bill_date',
},
importable: true,
exportable: true,
importAggregator: 'group',
importAggregateOn: 'entries',
importAggregateBy: 'billNumber',
@@ -80,6 +81,48 @@ export default {
fieldType: 'date',
},
},
columns: {
billNumber: {
name: 'Bill No.',
type: 'text',
exportable: true,
},
referenceNo: {
name: 'Reference No.',
type: 'text',
exportable: true,
},
billDate: {
name: 'Date',
type: 'date',
exportable: true,
},
dueDate: {
name: 'Due Date',
type: 'date',
exportable: true,
},
vendorId: {
name: 'Vendor',
type: 'text',
exportable: true,
},
exchangeRate: {
name: 'Exchange Rate',
type: 'number',
exportable: true,
},
note: {
name: 'Note',
type: 'text',
exportable: true,
},
open: {
name: 'Open',
type: 'boolean',
exportable: true,
},
},
fields2: {
billNumber: {
name: 'Bill No.',
@@ -132,7 +175,7 @@ export default {
relationModel: 'Item',
relationImportMatch: ['name', 'code'],
required: true,
importHint: "Matches the item name or code."
importHint: 'Matches the item name or code.',
},
rate: {
name: 'Rate',

View File

@@ -4,6 +4,7 @@ export default {
sortOrder: 'DESC',
sortField: 'bill_date',
},
exportable: true,
importable: true,
importAggregator: 'group',
importAggregateOn: 'entries',
@@ -67,6 +68,44 @@ export default {
fieldType: 'date',
},
},
columns: {
vendor: {
name: 'bill_payment.field.vendor',
type: 'relation',
exportable: true,
},
paymentDate: {
name: 'bill_payment.field.payment_date',
type: 'date',
required: true,
exportable: true,
},
paymentNumber: {
name: 'bill_payment.field.payment_number',
type: 'text',
exportable: true,
},
paymentAccountId: {
name: 'bill_payment.field.payment_account',
type: 'relation',
exportable: true,
},
exchangeRate: {
name: 'bill_payment.field.exchange_rate',
type: 'number',
exportable: true,
},
statement: {
name: 'bill_payment.field.statement',
type: 'text',
exportable: true,
},
reference: {
name: 'bill_payment.field.reference',
type: 'text',
exportable: true,
},
},
fields2: {
vendorId: {
name: 'bill_payment.field.vendor',
@@ -84,7 +123,7 @@ export default {
name: 'bill_payment.field.payment_number',
fieldType: 'text',
unique: true,
importHint: "The payment number should be unique."
importHint: 'The payment number should be unique.',
},
paymentAccountId: {
name: 'bill_payment.field.payment_account',
@@ -92,7 +131,7 @@ export default {
relationModel: 'Account',
relationImportMatch: ['name', 'code'],
required: true,
importHint: "Matches the account name or code."
importHint: 'Matches the account name or code.',
},
exchangeRate: {
name: 'bill_payment.field.exchange_rate',
@@ -120,7 +159,7 @@ export default {
relationModel: 'Bill',
relationImportMatch: 'billNumber',
required: true,
importHint: "Matches the bill number."
importHint: 'Matches the bill number.',
},
paymentAmount: {
name: 'bill_payment.field.entries.payment_amount',

View File

@@ -1,5 +1,6 @@
export default {
importable: true,
exportable: true,
defaultFilterField: 'displayName',
defaultSort: {
sortOrder: 'DESC',
@@ -90,6 +91,135 @@ export default {
},
},
},
columns: {
firstName: {
name: 'vendor.field.first_name',
type: 'text',
},
lastName: {
name: 'vendor.field.last_name',
type: 'text',
},
displayName: {
name: 'vendor.field.display_name',
type: 'text',
},
email: {
name: 'vendor.field.email',
type: 'text',
},
workPhone: {
name: 'vendor.field.work_phone',
type: 'text',
},
personalPhone: {
name: 'vendor.field.personal_pone',
type: 'text',
},
companyName: {
name: 'vendor.field.company_name',
type: 'text',
},
website: {
name: 'vendor.field.website',
type: 'text',
},
createdAt: {
name: 'vendor.field.created_at',
type: 'date',
},
balance: {
name: 'vendor.field.balance',
type: 'number',
},
openingBalance: {
name: 'vendor.field.opening_balance',
type: 'number',
},
openingBalanceAt: {
name: 'vendor.field.opening_balance_at',
type: 'date',
},
currencyCode: {
name: 'vendor.field.currency',
type: 'text',
},
status: {
name: 'vendor.field.status',
},
// Billing Address
billingAddress1: {
name: 'Billing Address 1',
column: 'billing_address1',
type: 'text',
},
billingAddress2: {
name: 'Billing Address 2',
column: 'billing_address2',
type: 'text',
},
billingAddressCity: {
name: 'Billing Address City',
column: 'billing_address_city',
type: 'text',
},
billingAddressCountry: {
name: 'Billing Address Country',
column: 'billing_address_country',
type: 'text',
},
billingAddressPostcode: {
name: 'Billing Address Postcode',
column: 'billing_address_postcode',
type: 'text',
},
billingAddressState: {
name: 'Billing Address State',
column: 'billing_address_state',
type: 'text',
},
billingAddressPhone: {
name: 'Billing Address Phone',
column: 'billing_address_phone',
type: 'text',
},
// Shipping Address
shippingAddress1: {
name: 'Shipping Address 1',
column: 'shipping_address1',
type: 'text',
},
shippingAddress2: {
name: 'Shipping Address 2',
column: 'shipping_address2',
type: 'text',
},
shippingAddressCity: {
name: 'Shipping Address City',
column: 'shipping_address_city',
type: 'text',
},
shippingAddressCountry: {
name: 'Shipping Address Country',
column: 'shipping_address_country',
type: 'text',
},
shippingAddressPostcode: {
name: 'Shipping Address Postcode',
column: 'shipping_address_postcode',
type: 'text',
},
shippingAddressPhone: {
name: 'Shipping Address Phone',
column: 'shipping_address_phone',
type: 'text',
},
shippingAddressState: {
name: 'Shipping Address State',
column: 'shipping_address_state',
type: 'text',
},
},
fields2: {
customerType: {
name: 'Customer Type',

View File

@@ -8,6 +8,7 @@ export default {
sortField: 'name',
},
importable: true,
exportabe: true,
fields: {
payment_date: {
name: 'expense.field.payment_date',
@@ -61,6 +62,47 @@ export default {
fieldType: 'date',
},
},
columns: {
paymentReceive: {
name: 'expense.field.payment_account',
exportable: true,
},
referenceNo: {
name: 'expense.field.reference_no',
type: 'text',
exportable: true,
},
paymentDate: {
name: 'expense.field.payment_date',
type: 'date',
exportable: true,
},
currencyCode: {
name: 'expense.field.currency_code',
type: 'text',
exportable: true,
},
exchangeRate: {
name: 'expense.field.exchange_rate',
type: 'number',
exportable: true,
},
description: {
name: 'expense.field.description',
type: 'text',
exportable: true,
},
categories: {
name: 'expense.field.categories',
type: 'collection',
exportable: true,
},
publish: {
name: 'expense.field.publish',
type: 'boolean',
exportable: true,
},
},
fields2: {
paymentAccountId: {
name: 'expense.field.payment_account',
@@ -68,7 +110,7 @@ export default {
relationModel: 'Account',
relationImportMatch: ['name', 'code'],
required: true,
importHint: "Matches the account name or code."
importHint: 'Matches the account name or code.',
},
referenceNo: {
name: 'expense.field.reference_no',
@@ -102,7 +144,7 @@ export default {
relationModel: 'Account',
relationImportMatch: ['name', 'code'],
required: true,
importHint: "Matches the account name or code."
importHint: 'Matches the account name or code.',
},
amount: {
name: 'expense.field.amount',

View File

@@ -4,6 +4,54 @@ export default {
sortOrder: 'DESC',
sortField: 'date',
},
columns: {
date: {
name: 'inventory_adjustment.field.date',
column: 'date',
fieldType: 'date',
exportable: true,
},
type: {
name: 'inventory_adjustment.field.type',
column: 'type',
fieldType: 'enumeration',
options: [
{ key: 'increment', name: 'inventory_adjustment.field.type.increment' },
{ key: 'decrement', name: 'inventory_adjustment.field.type.decrement' },
],
exportable: true,
},
adjustmentAccount: {
name: 'inventory_adjustment.field.adjustment_account',
type: 'adjustment_account_id',
exportable: true,
},
reason: {
name: 'inventory_adjustment.field.reason',
type: 'text',
exportable: true,
},
referenceNo: {
name: 'inventory_adjustment.field.reference_no',
type: 'text',
exportable: true,
},
description: {
name: 'inventory_adjustment.field.description',
type: 'text',
exportable: true,
},
publishedAt: {
name: 'inventory_adjustment.field.published_at',
type: 'date',
exportable: true,
},
createdAt: {
name: 'inventory_adjustment.field.created_at',
type: 'date',
exportable: true,
},
},
fields: {
date: {
name: 'inventory_adjustment.field.date',

View File

@@ -1,5 +1,6 @@
export default {
importable: true,
exportable: true,
defaultFilterField: 'name',
defaultSort: {
sortField: 'name',
@@ -121,6 +122,93 @@ export default {
fieldType: 'date',
},
},
columns: {
type: {
name: 'item.field.type',
type: 'text',
exportable: true,
},
name: {
name: 'item.field.name',
type: 'text',
exportable: true,
},
code: {
name: 'item.field.code',
type: 'text',
exportable: true,
},
sellable: {
name: 'item.field.sellable',
type: 'boolean',
exportable: true,
},
purchasable: {
name: 'item.field.purchasable',
type: 'boolean',
exportable: true,
},
sellPrice: {
name: 'item.field.cost_price',
type: 'number',
exportable: true,
},
costPrice: {
name: 'item.field.cost_account',
type: 'number',
exportable: true,
},
costAccount: {
name: 'item.field.sell_account',
type: 'text',
exportable: true,
},
sellAccount: {
name: 'item.field.sell_description',
type: 'text',
exportable: true,
},
inventoryAccount: {
name: 'item.field.inventory_account',
type: 'text',
exportable: true,
},
sellDescription: {
name: 'Sell description',
type: 'text',
exportable: true,
},
purchaseDescription: {
name: 'Purchase description',
type: 'text',
exportable: true,
},
quantityOnHand: {
name: 'item.field.quantity_on_hand',
type: 'number',
exportable: true,
},
note: {
name: 'item.field.note',
type: 'text',
exportable: true,
},
category: {
name: 'item.field.category',
type: 'text',
exportable: true,
},
active: {
name: 'item.field.active',
fieldType: 'boolean',
exportable: true,
},
createdAt: {
name: 'item.field.created_at',
type: 'date',
exportable: true,
},
},
fields2: {
type: {
name: 'item.field.type',
@@ -195,7 +283,7 @@ export default {
fieldType: 'relation',
relationModel: 'ItemCategory',
relationImportMatch: ['name'],
importHint: "Matches the category name."
importHint: 'Matches the category name.',
},
active: {
name: 'item.field.active',

View File

@@ -28,6 +28,28 @@ export default {
columnType: 'date',
},
},
columns: {
name: {
name: 'item_category.field.name',
type: 'text',
exportable: true,
},
description: {
name: 'item_category.field.description',
type: 'text',
exportable: true,
},
count: {
name: 'item_category.field.count',
type: 'text',
exportable: true,
},
createdAt: {
name: 'item_category.field.created_at',
type: 'text',
exportable: true,
},
},
fields2: {
name: {
name: 'item_category.field.name',

View File

@@ -5,6 +5,7 @@ export default {
sortField: 'name',
},
importable: true,
exportable: true,
importAggregator: 'group',
importAggregateOn: 'entries',
importAggregateBy: 'journalNumber',
@@ -56,6 +57,48 @@ export default {
fieldType: 'date',
},
},
columns: {
date: {
name: 'manual_journal.field.date',
type: 'date',
exportable: true,
},
journalNumber: {
name: 'manual_journal.field.journal_number',
type: 'text',
exportable: true,
},
reference: {
name: 'manual_journal.field.reference',
type: 'text',
exportable: true,
},
journalType: {
name: 'manual_journal.field.journal_type',
type: 'text',
exportable: true,
},
currencyCode: {
name: 'manual_journal.field.currency',
type: 'text',
exportable: true,
},
exchange_rate: {
name: 'manual_journal.field.exchange_rate',
type: 'number',
exportable: true,
},
description: {
name: 'manual_journal.field.description',
type: 'text',
exportable: true,
},
publish: {
name: 'Publish',
type: 'boolean',
exportable: true,
},
},
fields2: {
date: {
name: 'manual_journal.field.date',

View File

@@ -1,5 +1,6 @@
export default {
importable: true,
exportable: true,
importAggregator: 'group',
importAggregateOn: 'entries',
importAggregateBy: 'paymentReceiveNo',
@@ -57,6 +58,48 @@ export default {
fieldDate: 'date',
},
},
columns: {
customer: {
name: 'payment_receive.field.customer',
type: 'text',
importable: true,
},
paymentDate: {
name: 'payment_receive.field.payment_date',
type: 'date',
importable: true,
},
amount: {
name: 'payment_receive.field.amount',
type: 'number',
importable: true,
},
referenceNo: {
name: 'payment_receive.field.reference_no',
type: 'text',
importable: true,
},
depositAccount: {
name: 'payment_receive.field.deposit_account',
type: 'text',
importable: true,
},
paymentReceiveNo: {
name: 'payment_receive.field.payment_receive_no',
type: 'text',
importable: true,
},
statement: {
name: 'payment_receive.field.statement',
type: 'text',
importable: true,
},
created_at: {
name: 'payment_receive.field.created_at',
type: 'date',
importable: true,
},
},
fields2: {
customerId: {
name: 'payment_receive.field.customer',
@@ -84,12 +127,12 @@ export default {
relationModel: 'Account',
relationImportMatch: ['name', 'code'],
required: true,
importHint: "Matches the account name or code."
importHint: 'Matches the account name or code.',
},
paymentReceiveNo: {
name: 'payment_receive.field.payment_receive_no',
fieldType: 'text',
importHint: "The payment number should be unique."
importHint: 'The payment number should be unique.',
},
statement: {
name: 'payment_receive.field.statement',
@@ -108,7 +151,7 @@ export default {
relationModel: 'SaleInvoice',
relationImportMatch: 'invoiceNo',
required: true,
importHint: "Matches the invoice number."
importHint: 'Matches the invoice number.',
},
paymentAmount: {
name: 'payment_receive.field.entries.payment_amount',

View File

@@ -87,6 +87,58 @@ export default {
fieldType: 'date',
},
},
columns: {
invoiceDate: {
name: 'invoice.field.invoice_date',
type: 'date',
exportable: true,
},
dueDate: {
name: 'invoice.field.due_date',
type: 'date',
exportable: true,
},
referenceNo: {
name: 'invoice.field.reference_no',
type: 'text',
exportable: true,
},
invoiceNo: {
name: 'invoice.field.invoice_no',
type: 'text',
exportable: true,
},
customer: {
name: 'invoice.field.customer',
type: 'text',
exportable: true,
},
exchangeRate: {
name: 'invoice.field.exchange_rate',
type: 'number',
exportable: true,
},
currencyCode: {
name: 'invoice.field.currency',
type: 'text',
exportable: true,
},
invoiceMessage: {
name: 'invoice.field.invoice_message',
type: 'text',
exportable: true,
},
termsConditions: {
name: 'invoice.field.terms_conditions',
type: 'text',
exportable: true,
},
delivered: {
name: 'invoice.field.delivered',
type: 'boolean',
exportable: true,
},
},
fields2: {
invoiceDate: {
name: 'invoice.field.invoice_date',
@@ -142,7 +194,7 @@ export default {
relationModel: 'Item',
relationImportMatch: ['name', 'code'],
required: true,
importHint: "Matches the item name or code."
importHint: 'Matches the item name or code.',
},
rate: {
name: 'invoice.field.rate',

View File

@@ -77,6 +77,71 @@ export default {
sortCustomQuery: StatusFieldSortQuery,
},
},
columns: {
amount: {
name: 'receipt.field.amount',
column: 'amount',
type: 'number',
exportable: true,
},
depositAccount: {
column: 'deposit_account_id',
name: 'receipt.field.deposit_account',
type: 'relation',
exportable: true,
},
customer: {
name: 'receipt.field.customer',
column: 'customer_id',
type: 'relation',
exportable: true,
},
receiptDate: {
name: 'receipt.field.receipt_date',
column: 'receipt_date',
type: 'date',
exportable: true,
},
receiptNumber: {
name: 'receipt.field.receipt_number',
column: 'receipt_number',
type: 'text',
exportable: true,
},
referenceNo: {
name: 'receipt.field.reference_no',
column: 'reference_no',
type: 'text',
exportable: true,
},
receiptMessage: {
name: 'receipt.field.receipt_message',
column: 'receipt_message',
type: 'text',
exportable: true,
},
statement: {
name: 'receipt.field.statement',
column: 'statement',
type: 'text',
exportable: true,
},
createdAt: {
name: 'receipt.field.created_at',
column: 'created_at',
type: 'date',
exportable: true,
},
status: {
name: 'receipt.field.status',
type: 'enumeration',
options: [
{ key: 'draft', label: 'receipt.field.status.draft' },
{ key: 'closed', label: 'receipt.field.status.closed' },
],
exportable: true,
},
},
fields2: {
receiptDate: {
name: 'Receipt Date',
@@ -126,7 +191,7 @@ export default {
relationModel: 'Item',
relationImportMatch: ['name', 'code'],
required: true,
importHint: "Matches the item name or code."
importHint: 'Matches the item name or code.',
},
rate: {
name: 'invoice.field.rate',

View File

@@ -5,6 +5,7 @@ export default {
sortField: 'created_at',
},
importable: true,
exportable: true,
fields: {
first_name: {
name: 'vendor.field.first_name',
@@ -90,6 +91,135 @@ export default {
},
},
},
columns: {
firstName: {
name: 'vendor.field.first_name',
type: 'text',
},
lastName: {
name: 'vendor.field.last_name',
type: 'text',
},
displayName: {
name: 'vendor.field.display_name',
type: 'text',
},
email: {
name: 'vendor.field.email',
type: 'text',
},
workPhone: {
name: 'vendor.field.work_phone',
type: 'text',
},
personalPhone: {
name: 'vendor.field.personal_pone',
type: 'text',
},
companyName: {
name: 'vendor.field.company_name',
type: 'text',
},
website: {
name: 'vendor.field.website',
type: 'text',
},
createdAt: {
name: 'vendor.field.created_at',
type: 'date',
},
balance: {
name: 'vendor.field.balance',
type: 'number',
},
openingBalance: {
name: 'vendor.field.opening_balance',
type: 'number',
},
openingBalanceAt: {
name: 'vendor.field.opening_balance_at',
type: 'date',
},
currencyCode: {
name: 'vendor.field.currency',
type: 'text',
},
status: {
name: 'vendor.field.status',
},
// Billing Address
billingAddress1: {
name: 'Billing Address 1',
column: 'billing_address1',
type: 'text',
},
billingAddress2: {
name: 'Billing Address 2',
column: 'billing_address2',
type: 'text',
},
billingAddressCity: {
name: 'Billing Address City',
column: 'billing_address_city',
type: 'text',
},
billingAddressCountry: {
name: 'Billing Address Country',
column: 'billing_address_country',
type: 'text',
},
billingAddressPostcode: {
name: 'Billing Address Postcode',
column: 'billing_address_postcode',
type: 'text',
},
billingAddressState: {
name: 'Billing Address State',
column: 'billing_address_state',
type: 'text',
},
billingAddressPhone: {
name: 'Billing Address Phone',
column: 'billing_address_phone',
type: 'text',
},
// Shipping Address
shippingAddress1: {
name: 'Shipping Address 1',
column: 'shipping_address1',
type: 'text',
},
shippingAddress2: {
name: 'Shipping Address 2',
column: 'shipping_address2',
type: 'text',
},
shippingAddressCity: {
name: 'Shipping Address City',
column: 'shipping_address_city',
type: 'text',
},
shippingAddressCountry: {
name: 'Shipping Address Country',
column: 'shipping_address_country',
type: 'text',
},
shippingAddressPostcode: {
name: 'Shipping Address Postcode',
column: 'shipping_address_postcode',
type: 'text',
},
shippingAddressState: {
name: 'Shipping Address State',
column: 'shipping_address_state',
type: 'text',
},
shippingAddressPhone: {
name: 'Shipping Address Phone',
column: 'shipping_address_phone',
type: 'text',
}
},
fields2: {
firstName: {
name: 'vendor.field.first_name',

View File

@@ -8,6 +8,34 @@ export default {
sortField: 'name',
sortOrder: 'DESC',
},
columns: {
date: {
name: 'warehouse_transfer.field.date',
type: 'date',
exportable: true,
},
transaction_number: {
name: 'warehouse_transfer.field.transaction_number',
type: 'text',
exportable: true,
},
status: {
name: 'warehouse_transfer.field.status',
fieldType: 'enumeration',
options: [
{ key: 'draft', label: 'Draft' },
{ key: 'in-transit', label: 'In Transit' },
{ key: 'transferred', label: 'Transferred' },
],
sortable: false,
},
created_at: {
name: 'warehouse_transfer.field.created_at',
column: 'created_at',
columnType: 'date',
fieldType: 'date',
},
},
fields: {
date: {
name: 'warehouse_transfer.field.date',