90 lines
1.8 KiB
JavaScript
90 lines
1.8 KiB
JavaScript
import VendorIcon from '../../components/Icons/VendorIcon'
|
|
import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
|
|
|
export const Vendor = {
|
|
name: 'vendor',
|
|
label: 'Vendor',
|
|
prefix: 'VEN',
|
|
icon: VendorIcon,
|
|
actions: [
|
|
{
|
|
name: 'info',
|
|
label: 'Info',
|
|
default: true,
|
|
row: true,
|
|
icon: InfoCircleIcon,
|
|
url: (_id) => `/dashboard/management/vendors/info?vendorId=${_id}`
|
|
}
|
|
],
|
|
url: (id) => `/dashboard/management/vendors/info?vendorId=${id}`,
|
|
columns: ['name', '_id', 'country', 'email', 'createdAt'],
|
|
filters: ['name', '_id', 'country', 'email'],
|
|
sorters: ['name', 'country', 'email', 'createdAt', '_id'],
|
|
properties: [
|
|
{
|
|
name: '_id',
|
|
label: 'ID',
|
|
columnFixed: 'left',
|
|
type: 'id',
|
|
objectType: 'vendor',
|
|
showCopy: true
|
|
},
|
|
{
|
|
name: 'createdAt',
|
|
label: 'Created At',
|
|
type: 'dateTime',
|
|
readOnly: true
|
|
},
|
|
{
|
|
name: 'name',
|
|
label: 'Name',
|
|
columnFixed: 'left',
|
|
required: true,
|
|
type: 'text'
|
|
},
|
|
{
|
|
name: 'updatedAt',
|
|
label: 'Updated At',
|
|
type: 'dateTime',
|
|
readOnly: true
|
|
},
|
|
{
|
|
name: 'contact',
|
|
label: 'Contact',
|
|
type: 'text',
|
|
readOnly: false,
|
|
required: false
|
|
},
|
|
{
|
|
name: 'country',
|
|
label: 'Country',
|
|
type: 'country',
|
|
readOnly: false,
|
|
required: true
|
|
},
|
|
{
|
|
name: 'email',
|
|
label: 'Email',
|
|
columnWidth: 300,
|
|
type: 'email',
|
|
readOnly: false,
|
|
required: false
|
|
},
|
|
{
|
|
name: 'phone',
|
|
label: 'Phone',
|
|
type: 'phone',
|
|
readOnly: false,
|
|
required: false
|
|
},
|
|
{
|
|
name: 'website',
|
|
label: 'Website',
|
|
columnWidth: 300,
|
|
type: 'url',
|
|
readOnly: false,
|
|
required: false
|
|
}
|
|
]
|
|
}
|