All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
- Introduced new components for managing Payment Policies and Fulfillment Policies, enhancing the dashboard's functionality for financial management. - Added corresponding SVG icons for Payment Policy, Fulfillment Policy, and Return Policy to improve visual representation. - Updated App.css with new styles for file gallery previews, ensuring a cohesive layout and user experience across the dashboard. - Implemented new object forms and tables for Payment Policies, allowing for better data handling and user interaction.
50 lines
1.2 KiB
JavaScript
50 lines
1.2 KiB
JavaScript
export function marketplaceSyncMappingsProperty(objectType, extra) {
|
|
return {
|
|
name: 'marketplaces',
|
|
label: 'Marketplaces',
|
|
type: 'objectChildren',
|
|
required: false,
|
|
canAddRemove: true,
|
|
size: 'medium',
|
|
span: 2,
|
|
columns: ['marketplace', 'state', 'externalReference'],
|
|
properties: [
|
|
{
|
|
name: 'marketplace',
|
|
label: 'Marketplace',
|
|
type: 'object',
|
|
objectType: 'marketplace',
|
|
required: true,
|
|
showHyperlink: true,
|
|
columnWidth: 220
|
|
},
|
|
{
|
|
name: 'state',
|
|
label: 'State',
|
|
type: 'state',
|
|
objectType,
|
|
readOnly: true,
|
|
columnWidth: 160
|
|
},
|
|
{
|
|
name: 'externalReference',
|
|
label: 'External Reference',
|
|
type: (objectData) => {
|
|
return objectData?.marketplace?.provider === 'ebay'
|
|
? 'miscId'
|
|
: 'text'
|
|
},
|
|
readOnly: (objectData) => {
|
|
return objectData?.marketplace?.provider === 'ebay'
|
|
},
|
|
extra:
|
|
extra ||
|
|
'Marketplace policy ID. Filled when the policy is synced; you can paste an existing ID.',
|
|
showCopy: true,
|
|
required: false,
|
|
columnWidth: 240
|
|
}
|
|
]
|
|
}
|
|
}
|