Compare commits
4 Commits
becd5d5e82
...
8438757db5
| Author | SHA1 | Date | |
|---|---|---|---|
| 8438757db5 | |||
| 5ad0008122 | |||
| 4cae70b5e8 | |||
| fe2d257653 |
@ -739,6 +739,7 @@ body {
|
||||
|
||||
.simplebar-scrollbar:before {
|
||||
background: #78787854 !important;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.printer-alerts-display-popover .ant-popover-inner {
|
||||
@ -1612,23 +1613,23 @@ span.ant-skeleton-input.ant-skeleton-input-sm.text-skeleton {
|
||||
top: 0;
|
||||
right: -11px;
|
||||
bottom: 0;
|
||||
width: 11px;
|
||||
width: 6px;
|
||||
z-index: 3;
|
||||
cursor: col-resize;
|
||||
touch-action: none;
|
||||
user-select: none;
|
||||
pointer-events: auto;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.objectKanbanColumnResizeHandle::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 11px;
|
||||
bottom: 11px;
|
||||
top: 11.15px;
|
||||
bottom: 10.85px;
|
||||
right: 1px;
|
||||
width: 2px;
|
||||
transform: translateX(-50%);
|
||||
opacity: 0.6;
|
||||
transition: opacity 0.15s ease;
|
||||
}
|
||||
|
||||
@ -1640,16 +1641,9 @@ span.ant-skeleton-input.ant-skeleton-input-sm.text-skeleton {
|
||||
width: 2px;
|
||||
height: 20px;
|
||||
transform: translate(-50%, -50%);
|
||||
opacity: 0.6;
|
||||
transition: opacity 0.15s ease;
|
||||
}
|
||||
|
||||
.objectKanbanColumnResizeHandle.active::before,
|
||||
.objectKanbanColumnResizeHandle.active::after {
|
||||
background: #0e3a5b;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.dark-mode .objectKanbanColumnResizeHandle::after {
|
||||
background: rgba(255, 255, 255, 0.18);
|
||||
}
|
||||
@ -1658,16 +1652,30 @@ span.ant-skeleton-input.ant-skeleton-input-sm.text-skeleton {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
.dark-mode .objectKanbanColumnResizeHandle.active::before,
|
||||
.dark-mode .objectKanbanColumnResizeHandle.active::after {
|
||||
background: #0b4c7e;
|
||||
opacity: 1;
|
||||
.light-mode .objectKanbanColumnResizeHandle::after {
|
||||
background: rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.objectKanbanColumnResizeHandle:hover::before {
|
||||
.light-mode .objectKanbanColumnResizeHandle::before {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.dark-mode .objectKanbanColumnResizeHandle:hover::before {
|
||||
background: #0e3a5b;
|
||||
}
|
||||
|
||||
.light-mode .objectKanbanColumnResizeHandle:hover::before {
|
||||
background: #e6f8ff;
|
||||
}
|
||||
|
||||
.dark-mode .objectKanbanColumnResizeHandle.active::before {
|
||||
background: #0b4c7e;
|
||||
}
|
||||
|
||||
.light-mode .objectKanbanColumnResizeHandle.active::before {
|
||||
background: #a3e3ff;
|
||||
}
|
||||
|
||||
body.objectKanbanColumnResizing,
|
||||
body.objectKanbanColumnResizing * {
|
||||
cursor: col-resize !important;
|
||||
@ -2313,6 +2321,15 @@ body.objectKanbanColumnResizing * {
|
||||
content: none;
|
||||
}
|
||||
|
||||
.farmcontrol-splitter .ant-splitter-bar-dragger {
|
||||
transition: opacity 0.3s ease;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.farmcontrol-splitter.vertical-scroll-visible .ant-splitter-bar-dragger {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.object-display-tag
|
||||
.elipsis-text-wrapper.ant-typography
|
||||
code.elipsis-text-measure,
|
||||
|
||||
@ -26,15 +26,11 @@ const Invoices = () => {
|
||||
const [showSortSidebar, setShowSortSidebar] =
|
||||
useSortSidebarVisibility('Invoices')
|
||||
|
||||
|
||||
return (
|
||||
<ObjectListViewProvider
|
||||
objectType='invoice'
|
||||
tableRef={tableRef}
|
||||
>
|
||||
<Flex vertical={'true'} gap='large' className='h-100'>
|
||||
<Flex justify='space-between' style={{ minHeight: 0 }} gap='small'>
|
||||
<Space size='small'>
|
||||
<ObjectListViewProvider objectType='invoice' tableRef={tableRef}>
|
||||
<Flex vertical={'true'} gap='large' className='h-100'>
|
||||
<Flex justify='space-between' style={{ minHeight: 0 }} gap='small'>
|
||||
<Space size='small'>
|
||||
<ObjectActions
|
||||
type='invoice'
|
||||
pageName='list'
|
||||
@ -48,8 +44,8 @@ const Invoices = () => {
|
||||
/>
|
||||
<ExportListButton objectType='invoice' />
|
||||
</Space>
|
||||
<ListViewTabs />
|
||||
<Space>
|
||||
<ListViewTabs />
|
||||
<Space>
|
||||
<SortSidebarButton
|
||||
active={showSortSidebar}
|
||||
onClick={() => setShowSortSidebar(!showSortSidebar)}
|
||||
@ -58,12 +54,10 @@ const Invoices = () => {
|
||||
active={showFilterSidebar}
|
||||
onClick={() => setShowFilterSidebar(!showFilterSidebar)}
|
||||
/>
|
||||
<ObjectTableViewButton
|
||||
objectType='invoice'
|
||||
/>
|
||||
<ObjectTableViewButton objectType='invoice' />
|
||||
<ListViewEditButtons showStartingDivider={true} />
|
||||
</Space>
|
||||
</Flex>
|
||||
</Flex>
|
||||
|
||||
<ObjectTable
|
||||
ref={tableRef}
|
||||
@ -81,8 +75,8 @@ const Invoices = () => {
|
||||
useSortInSession={true}
|
||||
useSortInUrl={true}
|
||||
/>
|
||||
</Flex>
|
||||
</ObjectListViewProvider>
|
||||
</Flex>
|
||||
</ObjectListViewProvider>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@ import { Flex } from 'antd'
|
||||
import PropTypes from 'prop-types'
|
||||
import classNames from 'classnames'
|
||||
import { ApiServerContext } from '../context/ApiServerContext'
|
||||
import { AuthContext } from '../context/AuthContext'
|
||||
import ObjectCard from './ObjectCard'
|
||||
import ObjectKanbanColumn from './ObjectKanbanColumn'
|
||||
import ObjectKanbanHeader from './ObjectKanbanHeader'
|
||||
@ -285,6 +286,7 @@ const ObjectKanban = forwardRef(
|
||||
subscribeToAllObjectUpdates,
|
||||
subscribeToObjectTypeUpdates
|
||||
} = useContext(ApiServerContext)
|
||||
const { token } = useContext(AuthContext)
|
||||
const columnRefs = useRef({})
|
||||
const headerTrackRef = useRef(null)
|
||||
const skeletonTrackRef = useRef(null)
|
||||
@ -698,19 +700,27 @@ const ObjectKanban = forwardRef(
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
if (connected == true && subscribeToObjectTypeUpdatesRef.current) {
|
||||
if (
|
||||
connected == true &&
|
||||
token &&
|
||||
subscribeToObjectTypeUpdatesRef.current
|
||||
) {
|
||||
subscribeToObjectTypeUpdatesRef.current()
|
||||
subscribeToObjectTypeUpdatesRef.current = null
|
||||
}
|
||||
if (connected == true && subscribeToAllObjectUpdatesRef.current) {
|
||||
if (
|
||||
connected == true &&
|
||||
token &&
|
||||
subscribeToAllObjectUpdatesRef.current
|
||||
) {
|
||||
subscribeToAllObjectUpdatesRef.current()
|
||||
subscribeToAllObjectUpdatesRef.current = null
|
||||
}
|
||||
}
|
||||
}, [connected])
|
||||
}, [connected, token])
|
||||
|
||||
useEffect(() => {
|
||||
if (connected !== true || !type) return
|
||||
if (connected !== true || !type || !token) return
|
||||
|
||||
const unsubscribe = subscribeToAllObjectUpdates(
|
||||
type,
|
||||
@ -725,10 +735,10 @@ const ObjectKanban = forwardRef(
|
||||
subscribeToAllObjectUpdatesRef.current = null
|
||||
}
|
||||
}
|
||||
}, [type, connected, subscribeToAllObjectUpdates])
|
||||
}, [type, connected, subscribeToAllObjectUpdates, token])
|
||||
|
||||
useEffect(() => {
|
||||
if (connected !== true) return
|
||||
if (connected !== true || !token) return
|
||||
if (subscribedTypeRef.current === type) return
|
||||
|
||||
const unsubscribe = subscribeToObjectTypeUpdatesFnRef.current(
|
||||
@ -747,7 +757,7 @@ const ObjectKanban = forwardRef(
|
||||
subscribedTypeRef.current = null
|
||||
}
|
||||
}
|
||||
}, [type, connected])
|
||||
}, [type, connected, token])
|
||||
|
||||
useImperativeHandle(
|
||||
ref,
|
||||
|
||||
@ -69,6 +69,9 @@ import {
|
||||
import { areValuesEqual } from '../utils/Utils'
|
||||
import MissingPlaceholder from './MissingPlaceholder'
|
||||
import LoadingPlaceholder from './LoadingPlaceholder'
|
||||
import useSidebarWidth from '../hooks/useSidebarWidth'
|
||||
|
||||
import classNames from 'classnames'
|
||||
|
||||
const logger = loglevel.getLogger('DasboardTable')
|
||||
logger.setLevel(config.logLevel)
|
||||
@ -412,6 +415,10 @@ const ObjectTable = forwardRef(
|
||||
const [sidebarFilter, setSidebarFilter] = useState({})
|
||||
const [tableSorter, setTableSorter] = useState({})
|
||||
const [initialized, setInitialized] = useState(false)
|
||||
const [sidebarWidth, setSidebarWidth] = useSidebarWidth(type)
|
||||
|
||||
const [verticalScrollVisible, setVerticalScrollVisible] = useState(false)
|
||||
const tableContentRef = useRef(null)
|
||||
|
||||
// Keep refs in sync with props. applyViewState may update them earlier in
|
||||
// the same tick; props remain the source of truth after commit.
|
||||
@ -1929,7 +1936,11 @@ const ObjectTable = forwardRef(
|
||||
const cardsContainerNodeRef = useRef(null)
|
||||
const cardsResizeObserverRef = useRef(null)
|
||||
|
||||
const measureCardColSpan = useCallback(() => {
|
||||
const measureCardColSpan = useCallback((sizes) => {
|
||||
if (sizes?.[1]) {
|
||||
setSidebarWidth(sizes[1])
|
||||
}
|
||||
|
||||
const node = cardsContainerNodeRef.current
|
||||
if (!node) return
|
||||
const panel = node.closest('.ant-splitter-panel')
|
||||
@ -2107,17 +2118,53 @@ const ObjectTable = forwardRef(
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
console.log('loading', loading)
|
||||
}, [loading])
|
||||
const container = tableContentRef.current
|
||||
|
||||
if (!container) return
|
||||
|
||||
const updateVisibility = () => {
|
||||
const scrollableY = container.querySelector('.simplebar-scrollable-y')
|
||||
|
||||
const scrollableX = container.querySelector('.simplebar-scrollable-x')
|
||||
|
||||
const scrollbar = container.querySelector(
|
||||
'.simplebar-vertical .simplebar-scrollbar'
|
||||
)
|
||||
|
||||
setVerticalScrollVisible(
|
||||
scrollbar?.classList.contains('simplebar-visible') ||
|
||||
scrollableY?.classList.contains('simplebar-mouse-entered') ||
|
||||
scrollableX?.classList.contains('simplebar-mouse-entered')
|
||||
)
|
||||
}
|
||||
|
||||
// Initial state
|
||||
updateVisibility()
|
||||
|
||||
const observer = new MutationObserver(updateVisibility)
|
||||
|
||||
observer.observe(container, {
|
||||
subtree: true,
|
||||
attributes: true,
|
||||
attributeFilter: ['class']
|
||||
})
|
||||
|
||||
return () => {
|
||||
observer.disconnect()
|
||||
}
|
||||
}, [])
|
||||
|
||||
const tableContent = (
|
||||
<Flex
|
||||
gap={'middle'}
|
||||
vertical
|
||||
style={{ flex: 1, minWidth: 0, minHeight: 0 }}
|
||||
ref={tableContentRef}
|
||||
>
|
||||
<Splitter
|
||||
className={'farmcontrol-splitter large'}
|
||||
className={classNames('farmcontrol-splitter large', {
|
||||
'vertical-scroll-visible': verticalScrollVisible
|
||||
})}
|
||||
onResize={measureCardColSpan}
|
||||
onResizeEnd={measureCardColSpan}
|
||||
>
|
||||
@ -2214,8 +2261,8 @@ const ObjectTable = forwardRef(
|
||||
</Spin>
|
||||
)}
|
||||
</Splitter.Panel>
|
||||
{(showSortSidebar || showFilterSidebar) && (
|
||||
<Splitter.Panel defaultSize={'25%'}>
|
||||
{(showSortSidebar || showFilterSidebar) && initialized && (
|
||||
<Splitter.Panel size={sidebarWidth}>
|
||||
<Flex
|
||||
vertical
|
||||
gap='large'
|
||||
|
||||
@ -16,6 +16,7 @@ import ObjectTimelineRow from './ObjectTimelineRow'
|
||||
import { getTimelineRangeFromValues, getTimelineTicks } from './timelineUtils'
|
||||
import cn from 'classnames'
|
||||
import { getStateTagInfo } from '../utils/Utils'
|
||||
import { AuthContext } from '../context/AuthContext'
|
||||
|
||||
const { Text } = Typography
|
||||
const LABEL_WIDTH = 226
|
||||
@ -40,7 +41,8 @@ const ObjectTimeline = ({
|
||||
onScroll,
|
||||
rowWrapper
|
||||
}) => {
|
||||
const { getModelPropertyValues } = useContext(ApiServerContext)
|
||||
const { getModelPropertyValues, connected } = useContext(ApiServerContext)
|
||||
const { token } = useContext(AuthContext)
|
||||
const getModelPropertyValuesRef = useRef(getModelPropertyValues)
|
||||
getModelPropertyValuesRef.current = getModelPropertyValues
|
||||
|
||||
@ -60,6 +62,8 @@ const ObjectTimeline = ({
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
if (connected !== true || !token) return
|
||||
|
||||
if (!type || !startDate) {
|
||||
setStartValues([])
|
||||
setEndValues([])
|
||||
@ -105,7 +109,7 @@ const ObjectTimeline = ({
|
||||
return () => {
|
||||
cancelled = true
|
||||
}
|
||||
}, [endDate, rangeQueryKey, startDate, type])
|
||||
}, [endDate, rangeQueryKey, startDate, type, connected, token])
|
||||
|
||||
const [showShadow, setShowShadow] = useState(false)
|
||||
|
||||
|
||||
128
src/components/Dashboard/hooks/useSidebarWidth.jsx
Normal file
128
src/components/Dashboard/hooks/useSidebarWidth.jsx
Normal file
@ -0,0 +1,128 @@
|
||||
import { useCallback, useContext, useEffect, useRef, useState } from 'react'
|
||||
|
||||
import { ApiServerContext } from '../context/ApiServerContext'
|
||||
|
||||
const useSidebarWidth = (componentName, defaultValue = 300) => {
|
||||
const { userSettings, updateUserSettings } = useContext(ApiServerContext)
|
||||
|
||||
const savedSidebarWidth =
|
||||
userSettings?.sidebarWidths?.[componentName] ?? defaultValue
|
||||
|
||||
const [localSidebarWidth, setLocalSidebarWidth] = useState(savedSidebarWidth)
|
||||
|
||||
const pendingValueRef = useRef(null)
|
||||
const lastUpdateRef = useRef(0)
|
||||
const timeoutRef = useRef(null)
|
||||
|
||||
/*
|
||||
* Keep the latest updateUserSettings arguments in refs so the
|
||||
* cleanup function always has the correct component name/value.
|
||||
*/
|
||||
const componentNameRef = useRef(componentName)
|
||||
const updateUserSettingsRef = useRef(updateUserSettings)
|
||||
|
||||
componentNameRef.current = componentName
|
||||
updateUserSettingsRef.current = updateUserSettings
|
||||
|
||||
const callUpdateUserSettings = useCallback((name, value) => {
|
||||
lastUpdateRef.current = Date.now()
|
||||
|
||||
updateUserSettingsRef.current('sidebarWidths', name, value)
|
||||
}, [])
|
||||
|
||||
const flush = useCallback(() => {
|
||||
if (timeoutRef.current) {
|
||||
clearTimeout(timeoutRef.current)
|
||||
timeoutRef.current = null
|
||||
}
|
||||
|
||||
const pending = pendingValueRef.current
|
||||
|
||||
if (!pending) return
|
||||
|
||||
pendingValueRef.current = null
|
||||
|
||||
callUpdateUserSettings(pending.componentName, pending.value)
|
||||
}, [callUpdateUserSettings])
|
||||
|
||||
/*
|
||||
* Flush the previous component's value when the component is
|
||||
* unmounted OR componentName changes.
|
||||
*/
|
||||
useEffect(() => {
|
||||
const name = componentName
|
||||
|
||||
return () => {
|
||||
const pending = pendingValueRef.current
|
||||
|
||||
if (pending && pending.componentName === name) {
|
||||
flush()
|
||||
}
|
||||
}
|
||||
}, [componentName, flush])
|
||||
|
||||
/*
|
||||
* Load the saved width when the component name changes.
|
||||
*/
|
||||
useEffect(() => {
|
||||
setLocalSidebarWidth(savedSidebarWidth)
|
||||
}, [componentName, savedSidebarWidth])
|
||||
|
||||
const setSidebarWidth = useCallback(
|
||||
(nextValue) => {
|
||||
const value =
|
||||
typeof nextValue === 'function'
|
||||
? nextValue(localSidebarWidth)
|
||||
: nextValue
|
||||
|
||||
if (value === localSidebarWidth) return
|
||||
|
||||
// Always update the UI immediately.
|
||||
setLocalSidebarWidth(value)
|
||||
|
||||
// Keep only the latest value waiting to be persisted.
|
||||
pendingValueRef.current = {
|
||||
componentName,
|
||||
value
|
||||
}
|
||||
|
||||
const elapsed = Date.now() - lastUpdateRef.current
|
||||
|
||||
/*
|
||||
* We haven't called updateUserSettings recently, so call it
|
||||
* immediately.
|
||||
*/
|
||||
if (elapsed >= 1000) {
|
||||
const pending = pendingValueRef.current
|
||||
pendingValueRef.current = null
|
||||
|
||||
callUpdateUserSettings(pending.componentName, pending.value)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
/*
|
||||
* Already rate limited. Schedule the next call for exactly
|
||||
* when the 1 second window expires.
|
||||
*/
|
||||
if (!timeoutRef.current) {
|
||||
timeoutRef.current = setTimeout(() => {
|
||||
timeoutRef.current = null
|
||||
|
||||
const pending = pendingValueRef.current
|
||||
|
||||
if (!pending) return
|
||||
|
||||
pendingValueRef.current = null
|
||||
|
||||
callUpdateUserSettings(pending.componentName, pending.value)
|
||||
}, 1000 - elapsed)
|
||||
}
|
||||
},
|
||||
[componentName, localSidebarWidth, callUpdateUserSettings]
|
||||
)
|
||||
|
||||
return [localSidebarWidth, setSidebarWidth]
|
||||
}
|
||||
|
||||
export default useSidebarWidth
|
||||
@ -5,7 +5,8 @@ const AppPasswordInfo = lazy(
|
||||
import('../../components/Dashboard/Management/AppPasswords/AppPasswordInfo')
|
||||
)
|
||||
const NewAppPassword = lazy(
|
||||
() => import('../../components/Dashboard/Management/AppPasswords/NewAppPassword')
|
||||
() =>
|
||||
import('../../components/Dashboard/Management/AppPasswords/NewAppPassword')
|
||||
)
|
||||
const RegenerateAppPasswordSecret = lazy(
|
||||
() =>
|
||||
@ -36,7 +37,11 @@ export const AppPassword = {
|
||||
label: 'New App Password',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewAppPassword, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewAppPassword, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -140,7 +145,7 @@ export const AppPassword = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -166,7 +171,7 @@ export const AppPassword = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'user',
|
||||
|
||||
@ -34,7 +34,11 @@ export const Client = {
|
||||
label: 'New Client',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewClient, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewClient, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -148,7 +152,7 @@ export const Client = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -173,7 +177,7 @@ export const Client = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'active',
|
||||
|
||||
@ -34,7 +34,11 @@ export const Courier = {
|
||||
label: 'New Courier',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewCourier, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewCourier, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -104,7 +108,15 @@ export const Courier = {
|
||||
content: () => createElement(CourierInfo)
|
||||
}
|
||||
],
|
||||
columns: ['_reference', 'name', 'country', 'email', 'website', 'createdAt', 'updatedAt'],
|
||||
columns: [
|
||||
'_reference',
|
||||
'name',
|
||||
'country',
|
||||
'email',
|
||||
'website',
|
||||
'createdAt',
|
||||
'updatedAt'
|
||||
],
|
||||
filters: [
|
||||
'name',
|
||||
'website',
|
||||
@ -116,14 +128,7 @@ export const Courier = {
|
||||
'updatedAt',
|
||||
'_reference'
|
||||
],
|
||||
sorters: [
|
||||
'name',
|
||||
'country',
|
||||
'email',
|
||||
'createdAt',
|
||||
'_id',
|
||||
'updatedAt'
|
||||
],
|
||||
sorters: ['name', 'country', 'email', 'createdAt', '_id', 'updatedAt'],
|
||||
group: ['country'],
|
||||
properties: [
|
||||
{
|
||||
@ -140,7 +145,7 @@ export const Courier = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -175,7 +180,7 @@ export const Courier = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'contact',
|
||||
|
||||
@ -168,7 +168,7 @@ export const CourierService = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -193,7 +193,7 @@ export const CourierService = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'courier',
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
import { createElement, lazy } from 'react'
|
||||
|
||||
const DocumentJobInfo = lazy(
|
||||
() => import('../../components/Dashboard/Management/DocumentJobs/DocumentJobInfo')
|
||||
() =>
|
||||
import('../../components/Dashboard/Management/DocumentJobs/DocumentJobInfo')
|
||||
)
|
||||
const NewDocumentJob = lazy(
|
||||
() => import('../../components/Dashboard/Management/DocumentJobs/NewDocumentJob')
|
||||
() =>
|
||||
import('../../components/Dashboard/Management/DocumentJobs/NewDocumentJob')
|
||||
)
|
||||
import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
||||
import PlusIcon from '../../components/Icons/PlusIcon'
|
||||
@ -31,7 +33,11 @@ export const DocumentJob = {
|
||||
label: 'New Document Job',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewDocumentJob, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewDocumentJob, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -80,7 +86,7 @@ export const DocumentJob = {
|
||||
visible: (objectData) => {
|
||||
return objectData?._isEditing && objectData?._isEditing == true
|
||||
}
|
||||
},
|
||||
}
|
||||
],
|
||||
pages: [
|
||||
{
|
||||
@ -88,7 +94,14 @@ export const DocumentJob = {
|
||||
content: () => createElement(DocumentJobInfo)
|
||||
}
|
||||
],
|
||||
columns: ['_reference', 'name', 'quantity', 'state', 'createdAt', 'updatedAt'],
|
||||
columns: [
|
||||
'_reference',
|
||||
'name',
|
||||
'quantity',
|
||||
'state',
|
||||
'createdAt',
|
||||
'updatedAt'
|
||||
],
|
||||
filters: [
|
||||
'name',
|
||||
'quantity',
|
||||
@ -114,7 +127,7 @@ export const DocumentJob = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -131,7 +144,7 @@ export const DocumentJob = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
@ -214,7 +227,10 @@ export const DocumentJob = {
|
||||
step: 1,
|
||||
columnWidth: 125,
|
||||
value: (objectData) => {
|
||||
if (objectData?.createdAt == undefined && objectData?.quantity == null) {
|
||||
if (
|
||||
objectData?.createdAt == undefined &&
|
||||
objectData?.quantity == null
|
||||
) {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
import { createElement, lazy } from 'react'
|
||||
|
||||
const DocumentPrinterInfo = lazy(
|
||||
() => import('../../components/Dashboard/Management/DocumentPrinters/DocumentPrinterInfo')
|
||||
() =>
|
||||
import('../../components/Dashboard/Management/DocumentPrinters/DocumentPrinterInfo')
|
||||
)
|
||||
const NewDocumentPrinter = lazy(
|
||||
() => import('../../components/Dashboard/Management/DocumentPrinters/NewDocumentPrinter')
|
||||
() =>
|
||||
import('../../components/Dashboard/Management/DocumentPrinters/NewDocumentPrinter')
|
||||
)
|
||||
import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
||||
import PlusIcon from '../../components/Icons/PlusIcon'
|
||||
@ -30,7 +32,11 @@ export const DocumentPrinter = {
|
||||
label: 'New Document Printer',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewDocumentPrinter, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewDocumentPrinter, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -79,7 +85,7 @@ export const DocumentPrinter = {
|
||||
visible: (objectData) => {
|
||||
return objectData?._isEditing && objectData?._isEditing == true
|
||||
}
|
||||
},
|
||||
}
|
||||
],
|
||||
pages: [
|
||||
{
|
||||
@ -131,7 +137,7 @@ export const DocumentPrinter = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -148,7 +154,7 @@ export const DocumentPrinter = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -147,7 +147,7 @@ export const DocumentSize = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -164,7 +164,7 @@ export const DocumentSize = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -153,7 +153,7 @@ export const DocumentTemplate = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -178,7 +178,7 @@ export const DocumentTemplate = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'objectType',
|
||||
|
||||
@ -34,7 +34,11 @@ export const Filament = {
|
||||
label: 'New Filament',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewFilament, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewFilament, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -171,7 +175,7 @@ export const Filament = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -188,7 +192,7 @@ export const Filament = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -5,7 +5,8 @@ const FilamentProfileInfo = lazy(
|
||||
import('../../components/Dashboard/Production/FilamentProfiles/FilamentProfileInfo')
|
||||
)
|
||||
const NewFilamentProfile = lazy(
|
||||
() => import('../../components/Dashboard/Production/FilamentProfiles/NewFilamentProfile')
|
||||
() =>
|
||||
import('../../components/Dashboard/Production/FilamentProfiles/NewFilamentProfile')
|
||||
)
|
||||
const DeleteObject = lazy(
|
||||
() => import('../../components/Dashboard/common/DeleteObject')
|
||||
@ -35,7 +36,11 @@ export const FilamentProfile = {
|
||||
label: 'New Filament Profile',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewFilamentProfile, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewFilamentProfile, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -131,7 +136,7 @@ export const FilamentProfile = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -148,7 +153,7 @@ export const FilamentProfile = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -162,7 +162,7 @@ export const FilamentSku = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -187,7 +187,7 @@ export const FilamentSku = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'filament',
|
||||
|
||||
@ -179,7 +179,7 @@ export const FilamentStock = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -196,7 +196,7 @@ export const FilamentStock = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'state',
|
||||
|
||||
@ -143,7 +143,7 @@ export const File = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -168,7 +168,7 @@ export const File = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'type',
|
||||
|
||||
@ -145,7 +145,7 @@ export const FulfillmentPolicy = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -162,7 +162,7 @@ export const FulfillmentPolicy = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -159,7 +159,7 @@ export const Host = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -176,7 +176,7 @@ export const Host = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -230,7 +230,7 @@ export const Invoice = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -248,7 +248,7 @@ export const Invoice = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'state',
|
||||
|
||||
@ -38,7 +38,11 @@ export const Job = {
|
||||
label: 'New Job',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewJob, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewJob, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -177,7 +181,7 @@ export const Job = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -194,7 +198,7 @@ export const Job = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'state',
|
||||
|
||||
@ -220,7 +220,7 @@ export const Listing = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -237,7 +237,7 @@ export const Listing = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'title',
|
||||
|
||||
@ -201,7 +201,7 @@ export const ListingVarient = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -218,7 +218,7 @@ export const ListingVarient = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'listing',
|
||||
|
||||
@ -337,7 +337,7 @@ export const Marketplace = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -354,7 +354,7 @@ export const Marketplace = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -34,7 +34,11 @@ export const Material = {
|
||||
label: 'New Material',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewMaterial, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewMaterial, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -105,14 +109,7 @@ export const Material = {
|
||||
}
|
||||
],
|
||||
columns: ['_reference', 'name', 'tags', 'createdAt', 'updatedAt'],
|
||||
filters: [
|
||||
'_id',
|
||||
'name',
|
||||
'tags',
|
||||
'createdAt',
|
||||
'updatedAt',
|
||||
'_reference'
|
||||
],
|
||||
filters: ['_id', 'name', 'tags', 'createdAt', 'updatedAt', '_reference'],
|
||||
sorters: ['name', 'createdAt', 'updatedAt', '_id'],
|
||||
group: ['tags'],
|
||||
properties: [
|
||||
@ -130,7 +127,7 @@ export const Material = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -155,7 +152,7 @@ export const Material = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'tags',
|
||||
|
||||
@ -30,7 +30,11 @@ export const NoteType = {
|
||||
label: 'New Note Type',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewNoteType, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewNoteType, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -79,7 +83,7 @@ export const NoteType = {
|
||||
visible: (objectData) => {
|
||||
return objectData?._isEditing && objectData?._isEditing == true
|
||||
}
|
||||
},
|
||||
}
|
||||
],
|
||||
pages: [
|
||||
{
|
||||
@ -112,7 +116,7 @@ export const NoteType = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -137,7 +141,7 @@ export const NoteType = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'color',
|
||||
|
||||
@ -178,7 +178,7 @@ export const OrderItem = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -195,7 +195,7 @@ export const OrderItem = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -30,7 +30,11 @@ export const Part = {
|
||||
label: 'New Part',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewPart, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewPart, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -150,7 +154,7 @@ export const Part = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -167,7 +171,7 @@ export const Part = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -167,7 +167,7 @@ export const PartSku = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -184,7 +184,7 @@ export const PartSku = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -181,7 +181,7 @@ export const PartStock = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -198,7 +198,7 @@ export const PartStock = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'state',
|
||||
|
||||
@ -231,7 +231,7 @@ export const Payment = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -249,7 +249,7 @@ export const Payment = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'state',
|
||||
|
||||
@ -130,7 +130,7 @@ export const PaymentPolicy = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -147,7 +147,7 @@ export const PaymentPolicy = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -5,7 +5,8 @@ const PermissionSettingInfo = lazy(
|
||||
import('../../components/Dashboard/Management/PermissionSettings/PermissionSettingInfo')
|
||||
)
|
||||
const NewPermissionSetting = lazy(
|
||||
() => import('../../components/Dashboard/Management/PermissionSettings/NewPermissionSetting')
|
||||
() =>
|
||||
import('../../components/Dashboard/Management/PermissionSettings/NewPermissionSetting')
|
||||
)
|
||||
const DeleteObject = lazy(
|
||||
() => import('../../components/Dashboard/common/DeleteObject')
|
||||
@ -36,7 +37,11 @@ export const PermissionSetting = {
|
||||
label: 'New Permission Setting',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewPermissionSetting, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewPermissionSetting, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -124,7 +129,7 @@ export const PermissionSetting = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -141,7 +146,7 @@ export const PermissionSetting = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -338,7 +338,7 @@ export const Printer = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -355,7 +355,7 @@ export const Printer = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
import { createElement, lazy } from 'react'
|
||||
|
||||
const PrinterProfileInfo = lazy(
|
||||
() => import('../../components/Dashboard/Production/PrinterProfiles/PrinterProfileInfo')
|
||||
() =>
|
||||
import('../../components/Dashboard/Production/PrinterProfiles/PrinterProfileInfo')
|
||||
)
|
||||
const NewPrinterProfile = lazy(
|
||||
() => import('../../components/Dashboard/Production/PrinterProfiles/NewPrinterProfile')
|
||||
() =>
|
||||
import('../../components/Dashboard/Production/PrinterProfiles/NewPrinterProfile')
|
||||
)
|
||||
const DeleteObject = lazy(
|
||||
() => import('../../components/Dashboard/common/DeleteObject')
|
||||
@ -299,7 +301,11 @@ export const PrinterProfile = {
|
||||
label: 'New Printer Profile',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewPrinterProfile, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewPrinterProfile, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -385,7 +391,7 @@ export const PrinterProfile = {
|
||||
'createdAt',
|
||||
'updatedAt'
|
||||
],
|
||||
filters: ['_id','name','createdAt','updatedAt','_reference'],
|
||||
filters: ['_id', 'name', 'createdAt', 'updatedAt', '_reference'],
|
||||
sorters: [
|
||||
'name',
|
||||
'printBedWidth',
|
||||
@ -410,7 +416,7 @@ export const PrinterProfile = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -427,7 +433,7 @@ export const PrinterProfile = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -30,7 +30,11 @@ export const Product = {
|
||||
label: 'New Product',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewProduct, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewProduct, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -155,7 +159,7 @@ export const Product = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -172,7 +176,7 @@ export const Product = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -138,7 +138,7 @@ export const ProductCategory = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -156,7 +156,7 @@ export const ProductCategory = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -169,7 +169,7 @@ export const ProductSku = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -195,7 +195,7 @@ export const ProductSku = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'product',
|
||||
|
||||
@ -187,7 +187,7 @@ export const ProductStock = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -204,7 +204,7 @@ export const ProductStock = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'state',
|
||||
|
||||
@ -296,7 +296,7 @@ export const PurchaseOrder = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -314,7 +314,7 @@ export const PurchaseOrder = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'state',
|
||||
|
||||
@ -154,7 +154,7 @@ export const ReturnPolicy = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -171,7 +171,7 @@ export const ReturnPolicy = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -43,7 +43,11 @@ export const SalesOrder = {
|
||||
label: 'New Sales Order',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewSalesOrder, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewSalesOrder, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -160,7 +164,10 @@ export const SalesOrder = {
|
||||
]
|
||||
return !allowedStates.includes(objectData?.state?.type)
|
||||
},
|
||||
objectData: (objectData) => ({ orderType: 'salesOrder', order: objectData })
|
||||
objectData: (objectData) => ({
|
||||
orderType: 'salesOrder',
|
||||
order: objectData
|
||||
})
|
||||
},
|
||||
{ type: 'divider' },
|
||||
{
|
||||
@ -233,14 +240,7 @@ export const SalesOrder = {
|
||||
}
|
||||
],
|
||||
group: ['client'],
|
||||
filters: [
|
||||
'client',
|
||||
'state',
|
||||
'value',
|
||||
'createdAt',
|
||||
'updatedAt',
|
||||
'_reference'
|
||||
],
|
||||
filters: ['client', 'state', 'value', 'createdAt', 'updatedAt', '_reference'],
|
||||
sorters: ['createdAt', 'state', 'updatedAt'],
|
||||
columns: [
|
||||
'_reference',
|
||||
@ -272,7 +272,7 @@ export const SalesOrder = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -290,7 +290,7 @@ export const SalesOrder = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'state',
|
||||
|
||||
@ -43,7 +43,11 @@ export const Shipment = {
|
||||
label: 'New Shipment',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewShipment, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewShipment, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -225,7 +229,7 @@ export const Shipment = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -243,7 +247,7 @@ export const Shipment = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'state',
|
||||
|
||||
@ -173,7 +173,7 @@ export const StockAudit = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -190,7 +190,7 @@ export const StockAudit = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'state',
|
||||
|
||||
@ -129,7 +129,7 @@ export const StockAuditLevel = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -146,7 +146,7 @@ export const StockAuditLevel = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
import { createElement, lazy } from 'react'
|
||||
|
||||
const StockLocationInfo = lazy(
|
||||
() => import('../../components/Dashboard/Inventory/StockLocations/StockLocationInfo')
|
||||
() =>
|
||||
import('../../components/Dashboard/Inventory/StockLocations/StockLocationInfo')
|
||||
)
|
||||
const NewStockLocation = lazy(
|
||||
() => import('../../components/Dashboard/Inventory/StockLocations/NewStockLocation')
|
||||
() =>
|
||||
import('../../components/Dashboard/Inventory/StockLocations/NewStockLocation')
|
||||
)
|
||||
import StockLocationIcon from '../../components/Icons/StockLocationIcon'
|
||||
import PlusIcon from '../../components/Icons/PlusIcon'
|
||||
@ -30,7 +32,11 @@ export const StockLocation = {
|
||||
label: 'New Stock Location',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewStockLocation, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewStockLocation, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -79,7 +85,7 @@ export const StockLocation = {
|
||||
visible: (objectData) => {
|
||||
return objectData?._isEditing && objectData?._isEditing == true
|
||||
}
|
||||
},
|
||||
}
|
||||
],
|
||||
pages: [
|
||||
{
|
||||
@ -87,8 +93,8 @@ export const StockLocation = {
|
||||
content: () => createElement(StockLocationInfo)
|
||||
}
|
||||
],
|
||||
filters: ['name','createdAt','updatedAt','_reference'],
|
||||
sorters: ['name','createdAt','updatedAt'],
|
||||
filters: ['name', 'createdAt', 'updatedAt', '_reference'],
|
||||
sorters: ['name', 'createdAt', 'updatedAt'],
|
||||
columns: ['_reference', 'name', 'address', 'createdAt', 'updatedAt'],
|
||||
properties: [
|
||||
{
|
||||
@ -105,7 +111,7 @@ export const StockLocation = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -122,7 +128,7 @@ export const StockLocation = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -172,7 +172,7 @@ export const StockTransfer = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -189,7 +189,7 @@ export const StockTransfer = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'state',
|
||||
|
||||
@ -97,7 +97,7 @@ export const SubJob = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -114,7 +114,7 @@ export const SubJob = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'state',
|
||||
|
||||
@ -35,7 +35,11 @@ export const TaxRate = {
|
||||
label: 'New Tax Rate',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewTaxRate, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewTaxRate, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -154,7 +158,7 @@ export const TaxRate = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -179,7 +183,7 @@ export const TaxRate = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'active',
|
||||
|
||||
@ -34,7 +34,11 @@ export const TaxRecord = {
|
||||
label: 'New Tax Record',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewTaxRecord, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewTaxRecord, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -148,7 +152,7 @@ export const TaxRecord = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
|
||||
@ -121,7 +121,7 @@ export const User = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -138,7 +138,7 @@ export const User = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -35,7 +35,11 @@ export const UserGroup = {
|
||||
label: 'New User Group',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewUserGroup, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewUserGroup, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -135,7 +139,7 @@ export const UserGroup = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -152,7 +156,7 @@ export const UserGroup = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@ -34,7 +34,11 @@ export const Vendor = {
|
||||
label: 'New Vendor',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewVendor, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewVendor, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -147,7 +151,7 @@ export const Vendor = {
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
@ -172,7 +176,7 @@ export const Vendor = {
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'contact',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user