Refactor Invoices Component for Improved Readability and Structure
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
- Streamlined the JSX structure in the Invoices component for better readability. - Removed unnecessary line breaks and adjusted indentation for consistent formatting. - Enhanced the organization of child components within the ObjectListViewProvider for clearer hierarchy.
This commit is contained in:
parent
5ad0008122
commit
8438757db5
@ -26,15 +26,11 @@ const Invoices = () => {
|
|||||||
const [showSortSidebar, setShowSortSidebar] =
|
const [showSortSidebar, setShowSortSidebar] =
|
||||||
useSortSidebarVisibility('Invoices')
|
useSortSidebarVisibility('Invoices')
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ObjectListViewProvider
|
<ObjectListViewProvider objectType='invoice' tableRef={tableRef}>
|
||||||
objectType='invoice'
|
<Flex vertical={'true'} gap='large' className='h-100'>
|
||||||
tableRef={tableRef}
|
<Flex justify='space-between' style={{ minHeight: 0 }} gap='small'>
|
||||||
>
|
<Space size='small'>
|
||||||
<Flex vertical={'true'} gap='large' className='h-100'>
|
|
||||||
<Flex justify='space-between' style={{ minHeight: 0 }} gap='small'>
|
|
||||||
<Space size='small'>
|
|
||||||
<ObjectActions
|
<ObjectActions
|
||||||
type='invoice'
|
type='invoice'
|
||||||
pageName='list'
|
pageName='list'
|
||||||
@ -48,8 +44,8 @@ const Invoices = () => {
|
|||||||
/>
|
/>
|
||||||
<ExportListButton objectType='invoice' />
|
<ExportListButton objectType='invoice' />
|
||||||
</Space>
|
</Space>
|
||||||
<ListViewTabs />
|
<ListViewTabs />
|
||||||
<Space>
|
<Space>
|
||||||
<SortSidebarButton
|
<SortSidebarButton
|
||||||
active={showSortSidebar}
|
active={showSortSidebar}
|
||||||
onClick={() => setShowSortSidebar(!showSortSidebar)}
|
onClick={() => setShowSortSidebar(!showSortSidebar)}
|
||||||
@ -58,12 +54,10 @@ const Invoices = () => {
|
|||||||
active={showFilterSidebar}
|
active={showFilterSidebar}
|
||||||
onClick={() => setShowFilterSidebar(!showFilterSidebar)}
|
onClick={() => setShowFilterSidebar(!showFilterSidebar)}
|
||||||
/>
|
/>
|
||||||
<ObjectTableViewButton
|
<ObjectTableViewButton objectType='invoice' />
|
||||||
objectType='invoice'
|
|
||||||
/>
|
|
||||||
<ListViewEditButtons showStartingDivider={true} />
|
<ListViewEditButtons showStartingDivider={true} />
|
||||||
</Space>
|
</Space>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<ObjectTable
|
<ObjectTable
|
||||||
ref={tableRef}
|
ref={tableRef}
|
||||||
@ -81,8 +75,8 @@ const Invoices = () => {
|
|||||||
useSortInSession={true}
|
useSortInSession={true}
|
||||||
useSortInUrl={true}
|
useSortInUrl={true}
|
||||||
/>
|
/>
|
||||||
</Flex>
|
</Flex>
|
||||||
</ObjectListViewProvider>
|
</ObjectListViewProvider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user