Compare commits
No commits in common. "f447ec287abadd44735135c3a26cb34d5a15dabc" and "26132d206c80e4c7b85f1e45940eca68efc98220" have entirely different histories.
f447ec287a
...
26132d206c
@ -12,7 +12,6 @@ import ObjectProperty from '../../common/ObjectProperty.jsx'
|
|||||||
import ViewButton from '../../common/ViewButton'
|
import ViewButton from '../../common/ViewButton'
|
||||||
import InfoCircleIcon from '../../../Icons/InfoCircleIcon.jsx'
|
import InfoCircleIcon from '../../../Icons/InfoCircleIcon.jsx'
|
||||||
import PictureIcon from '../../../Icons/PictureIcon.jsx'
|
import PictureIcon from '../../../Icons/PictureIcon.jsx'
|
||||||
import BulletListIcon from '../../../Icons/BulletListIcon.jsx'
|
|
||||||
import NoteIcon from '../../../Icons/NoteIcon.jsx'
|
import NoteIcon from '../../../Icons/NoteIcon.jsx'
|
||||||
import AuditLogIcon from '../../../Icons/AuditLogIcon.jsx'
|
import AuditLogIcon from '../../../Icons/AuditLogIcon.jsx'
|
||||||
import ObjectForm from '../../common/ObjectForm'
|
import ObjectForm from '../../common/ObjectForm'
|
||||||
@ -56,7 +55,6 @@ const ListingVarientInfo = () => {
|
|||||||
{
|
{
|
||||||
info: true,
|
info: true,
|
||||||
listingImages: true,
|
listingImages: true,
|
||||||
aspects: true,
|
|
||||||
notes: true,
|
notes: true,
|
||||||
auditLogs: false
|
auditLogs: false
|
||||||
}
|
}
|
||||||
@ -120,7 +118,6 @@ const ListingVarientInfo = () => {
|
|||||||
items={[
|
items={[
|
||||||
{ key: 'info', label: 'Listing Varient Information' },
|
{ key: 'info', label: 'Listing Varient Information' },
|
||||||
{ key: 'listingImages', label: 'Listing Images' },
|
{ key: 'listingImages', label: 'Listing Images' },
|
||||||
{ key: 'aspects', label: 'Aspects' },
|
|
||||||
{ key: 'notes', label: 'Notes' },
|
{ key: 'notes', label: 'Notes' },
|
||||||
{ key: 'auditLogs', label: 'Audit Logs' }
|
{ key: 'auditLogs', label: 'Audit Logs' }
|
||||||
]}
|
]}
|
||||||
@ -199,10 +196,7 @@ const ListingVarientInfo = () => {
|
|||||||
isEditing={isEditing}
|
isEditing={isEditing}
|
||||||
type='listingVarient'
|
type='listingVarient'
|
||||||
objectData={objectData}
|
objectData={objectData}
|
||||||
visibleProperties={{
|
visibleProperties={{ listingImages: false }}
|
||||||
listingImages: false,
|
|
||||||
aspects: false
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</InfoCollapse>
|
</InfoCollapse>
|
||||||
<InfoCollapse
|
<InfoCollapse
|
||||||
@ -223,23 +217,6 @@ const ListingVarientInfo = () => {
|
|||||||
showCard={false}
|
showCard={false}
|
||||||
/>
|
/>
|
||||||
</InfoCollapse>
|
</InfoCollapse>
|
||||||
<InfoCollapse
|
|
||||||
title='Aspects'
|
|
||||||
icon={<BulletListIcon />}
|
|
||||||
active={collapseState.aspects}
|
|
||||||
onToggle={(expanded) =>
|
|
||||||
updateCollapseState('aspects', expanded)
|
|
||||||
}
|
|
||||||
collapseKey='aspects'
|
|
||||||
>
|
|
||||||
<ObjectProperty
|
|
||||||
{...getModelProperty('listingVarient', 'aspects')}
|
|
||||||
isEditing={isEditing}
|
|
||||||
objectData={objectData}
|
|
||||||
loading={loading}
|
|
||||||
size='medium'
|
|
||||||
/>
|
|
||||||
</InfoCollapse>
|
|
||||||
</Flex>
|
</Flex>
|
||||||
)}
|
)}
|
||||||
</ObjectForm>
|
</ObjectForm>
|
||||||
|
|||||||
@ -77,7 +77,6 @@ const NewMarketplace = ({ onOk, defaultValues }) => {
|
|||||||
'config.marketplaceId': false,
|
'config.marketplaceId': false,
|
||||||
'config.sandbox': false,
|
'config.sandbox': false,
|
||||||
'config.verificationToken': false,
|
'config.verificationToken': false,
|
||||||
'config.webhookUrl': false,
|
|
||||||
'config.redirectUri': false,
|
'config.redirectUri': false,
|
||||||
'config.accessToken': false,
|
'config.accessToken': false,
|
||||||
'config.refreshToken': false,
|
'config.refreshToken': false,
|
||||||
|
|||||||
@ -1,20 +0,0 @@
|
|||||||
import PropTypes from 'prop-types'
|
|
||||||
import SyncAccountPolicies from './SyncAccountPolicies.jsx'
|
|
||||||
|
|
||||||
const SyncWebhooks = ({ onOk, objectData }) => (
|
|
||||||
<SyncAccountPolicies
|
|
||||||
onOk={onOk}
|
|
||||||
objectData={objectData}
|
|
||||||
functionName='sync/webhooks'
|
|
||||||
title='Sync marketplace webhooks?'
|
|
||||||
description={`This will register order webhooks on ${objectData?.name || objectData?._reference || objectData?._id} so new and updated marketplace orders are created or updated in FarmControl.`}
|
|
||||||
successMessage='Webhooks synced successfully'
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
|
|
||||||
SyncWebhooks.propTypes = {
|
|
||||||
onOk: PropTypes.func.isRequired,
|
|
||||||
objectData: PropTypes.object
|
|
||||||
}
|
|
||||||
|
|
||||||
export default SyncWebhooks
|
|
||||||
@ -1,5 +1,4 @@
|
|||||||
import { createElement, lazy } from 'react'
|
import { createElement, lazy } from 'react'
|
||||||
import config from '../../config'
|
|
||||||
|
|
||||||
const MarketplaceInfo = lazy(
|
const MarketplaceInfo = lazy(
|
||||||
() => import('../../components/Dashboard/Sales/Marketplaces/MarketplaceInfo')
|
() => import('../../components/Dashboard/Sales/Marketplaces/MarketplaceInfo')
|
||||||
@ -31,9 +30,6 @@ const SyncReturnPolicies = lazy(
|
|||||||
const SyncTaxRates = lazy(
|
const SyncTaxRates = lazy(
|
||||||
() => import('../../components/Dashboard/Sales/Marketplaces/SyncTaxRates')
|
() => import('../../components/Dashboard/Sales/Marketplaces/SyncTaxRates')
|
||||||
)
|
)
|
||||||
const SyncWebhooks = lazy(
|
|
||||||
() => import('../../components/Dashboard/Sales/Marketplaces/SyncWebhooks')
|
|
||||||
)
|
|
||||||
const DeleteObject = lazy(
|
const DeleteObject = lazy(
|
||||||
() => import('../../components/Dashboard/common/DeleteObject')
|
() => import('../../components/Dashboard/common/DeleteObject')
|
||||||
)
|
)
|
||||||
@ -166,19 +162,6 @@ export const Marketplace = {
|
|||||||
return createElement(SyncOrders, { objectData, onOk })
|
return createElement(SyncOrders, { objectData, onOk })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'syncWebhooks',
|
|
||||||
type: 'modal',
|
|
||||||
modalWidth: 520,
|
|
||||||
label: 'Sync Webhooks',
|
|
||||||
icon: ReloadIcon,
|
|
||||||
disabled: (objectData) => {
|
|
||||||
return objectData?.state?.type != 'ready'
|
|
||||||
},
|
|
||||||
content: (objectData, { onOk } = {}) => {
|
|
||||||
return createElement(SyncWebhooks, { objectData, onOk })
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'syncFulfillmentPolicies',
|
name: 'syncFulfillmentPolicies',
|
||||||
type: 'modal',
|
type: 'modal',
|
||||||
@ -644,27 +627,6 @@ export const Marketplace = {
|
|||||||
return `${window.location.origin}/auth/marketplace/callback`
|
return `${window.location.origin}/auth/marketplace/callback`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'config.webhookUrl',
|
|
||||||
label: 'Webhook URL',
|
|
||||||
type: 'url',
|
|
||||||
readOnly: true,
|
|
||||||
required: false,
|
|
||||||
columnWidth: 280,
|
|
||||||
extra:
|
|
||||||
'Registered with the marketplace so new and updated orders are written to FarmControl.',
|
|
||||||
visible: (objectData) =>
|
|
||||||
objectData?.provider === 'ebay' ||
|
|
||||||
objectData?.provider === 'tiktokShop',
|
|
||||||
value: (objectData) => {
|
|
||||||
const id = objectData?._id
|
|
||||||
const base = config.backendUrl?.replace(/\/$/, '')
|
|
||||||
if (!id || !base) {
|
|
||||||
return undefined
|
|
||||||
}
|
|
||||||
return `${base}/marketplaces/${id}/hook`
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'defaultFulfillmentPolicy',
|
name: 'defaultFulfillmentPolicy',
|
||||||
label: 'Default Fulfillment Policy',
|
label: 'Default Fulfillment Policy',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user