Skip to content

Commit

Permalink
feat: bulk upload csv
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianJiang2021 authored and kris-liu-smile committed Mar 10, 2023
1 parent 4399aec commit 3f36e10
Show file tree
Hide file tree
Showing 10 changed files with 967 additions and 26 deletions.
7 changes: 6 additions & 1 deletion apps/storefront/src/components/table/B3PaginationTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ interface B3PaginationTableProps<T> {
noDataText?: string,
tableKey?: string,
getRequestList: any,
searchParams: T,
searchParams?: T,
requestLoading?: (bool: boolean) => void,
showCheckbox?: boolean,
selectedSymbol?: string,
Expand All @@ -55,6 +55,7 @@ interface B3PaginationTableProps<T> {
labelRowsPerPage?: string,
itemIsMobileSpacing?: number,
disableCheckbox?: boolean,
showRowsPerPageOptions?: boolean,
}

const PaginationTable:<T>(props: B3PaginationTableProps<T>) => ReactElement = ({
Expand Down Expand Up @@ -83,6 +84,8 @@ const PaginationTable:<T>(props: B3PaginationTableProps<T>) => ReactElement = ({
labelRowsPerPage = '',
itemIsMobileSpacing = 2,
disableCheckbox = false,
showPagination = true,
showRowsPerPageOptions = true,
}, ref?: Ref<unknown>) => {
const initPagination = {
offset: 0,
Expand Down Expand Up @@ -221,6 +224,8 @@ const PaginationTable:<T>(props: B3PaginationTableProps<T>) => ReactElement = ({
handleSelectOneItem={handleSelectOneItem}
showBorder={showBorder}
labelRowsPerPage={labelRowsPerPage}
showPagination={showPagination}
showRowsPerPageOptions={showRowsPerPageOptions}
/>
)
}
Expand Down
8 changes: 5 additions & 3 deletions apps/storefront/src/components/table/B3Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ interface TableProps<T> {
selectCheckbox?: Array<number | string>,
labelRowsPerPage?: string,
disableCheckbox?: boolean,
showRowsPerPageOptions?: boolean,
}

export const B3Table:<T>(props: TableProps<T>) => ReactElement = ({
Expand Down Expand Up @@ -101,6 +102,7 @@ export const B3Table:<T>(props: TableProps<T>) => ReactElement = ({
selectCheckbox = [],
labelRowsPerPage = '',
disableCheckbox = false,
showRowsPerPageOptions = true,
}) => {
const {
offset,
Expand Down Expand Up @@ -187,7 +189,7 @@ export const B3Table:<T>(props: TableProps<T>) => ReactElement = ({
{
showPagination && (
<TablePagination
rowsPerPageOptions={rowsPerPageOptions}
rowsPerPageOptions={showRowsPerPageOptions ? rowsPerPageOptions : []}
labelRowsPerPage={labelRowsPerPage || 'per page:'}
component="div"
count={count}
Expand Down Expand Up @@ -228,7 +230,7 @@ export const B3Table:<T>(props: TableProps<T>) => ReactElement = ({
{
showPagination && (
<TablePagination
rowsPerPageOptions={rowsPerPageOptions}
rowsPerPageOptions={showRowsPerPageOptions ? rowsPerPageOptions : []}
labelRowsPerPage={labelRowsPerPage || 'Cards per page:'}
component="div"
count={count}
Expand Down Expand Up @@ -336,7 +338,7 @@ export const B3Table:<T>(props: TableProps<T>) => ReactElement = ({
{
showPagination && (
<TablePagination
rowsPerPageOptions={rowsPerPageOptions}
rowsPerPageOptions={showRowsPerPageOptions ? rowsPerPageOptions : []}
labelRowsPerPage={labelRowsPerPage || 'Rows per page:'}
component="div"
count={count}
Expand Down
Loading

0 comments on commit 3f36e10

Please sign in to comment.