@campxdev/shared 1.11.54 → 1.11.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/shared",
3
- "version": "1.11.54",
3
+ "version": "1.11.56",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -127,13 +127,12 @@ export default function Table({
127
127
  totalCount[colIndex] = 'Total'
128
128
  return
129
129
  }
130
-
131
- totalCount[colIndex] += colValue
130
+ totalCount[colIndex] += colValue ? colValue : 0
132
131
  })
133
132
  }
134
133
 
135
134
  const convertToAmount = (data) => {
136
- return data.toLocaleString('en-IN', {
135
+ return data?.toLocaleString('en-IN', {
137
136
  style: 'currency',
138
137
  currency: 'INR',
139
138
  })
@@ -240,29 +239,27 @@ export default function Table({
240
239
 
241
240
  {showTotal && (
242
241
  <StyledTableRow canRowClick={false}>
243
- {columns.map((col, colIndex) => (
244
- <>
245
- <StyledTableCell
246
- key={colIndex}
247
- columnsLength={columns.length}
248
- columnIndex={colIndex + 1}
249
- rowIndex={dataSource.length + 1}
250
- col={col}
251
- isBodyCell
252
- sx={sx}
253
- >
254
- {totalCols.includes(colIndex + 1) ? (
255
- col?.dataType && col?.dataType == 'currency' ? (
242
+ {columns.map((col, colIndex) => {
243
+ return (
244
+ <>
245
+ <StyledTableCell
246
+ key={colIndex}
247
+ columnsLength={columns.length}
248
+ columnIndex={colIndex + 1}
249
+ rowIndex={dataSource.length + 1}
250
+ col={col}
251
+ isBodyCell
252
+ sx={sx}
253
+ >
254
+ {col?.dataType && col?.dataType == 'currency' ? (
256
255
  <>{convertToAmount(totalCount[colIndex])}</>
257
256
  ) : (
258
257
  <>{totalCount[colIndex]}</>
259
- )
260
- ) : (
261
- '---'
262
- )}
263
- </StyledTableCell>
264
- </>
265
- ))}
258
+ )}
259
+ </StyledTableCell>
260
+ </>
261
+ )
262
+ })}
266
263
  </StyledTableRow>
267
264
  )}
268
265
  </TableBody>
@@ -71,6 +71,13 @@ export const StyledMainContentContainer = muiStyled('main')(() => ({
71
71
  },
72
72
  },
73
73
 
74
+ ['@media (max-width: 760px)']: {
75
+ left: 0,
76
+ right: 0,
77
+ bottom: 0,
78
+ width: '100%',
79
+ },
80
+
74
81
  // '&::-webkit-scrollbar': {
75
82
  // width: '0.6em',
76
83
  // height: '0.6em',