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] =
|
||||
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>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user