@campxdev/shared 1.11.53 → 1.11.55
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
|
@@ -10,7 +10,7 @@ type FormQuotaSelectorProps = {
|
|
|
10
10
|
multiple?: boolean
|
|
11
11
|
allowAll?: boolean
|
|
12
12
|
onChange?: (value: any) => void
|
|
13
|
-
filters?: { courseId: number }
|
|
13
|
+
filters?: { courseId: number | string }
|
|
14
14
|
api?: string
|
|
15
15
|
} & BaseSelectProps
|
|
16
16
|
export default function FormQuotaSelector(props: FormQuotaSelectorProps) {
|
|
@@ -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
|
|
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
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
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
|
-
|
|
264
|
-
</>
|
|
265
|
-
))}
|
|
258
|
+
)}
|
|
259
|
+
</StyledTableCell>
|
|
260
|
+
</>
|
|
261
|
+
)
|
|
262
|
+
})}
|
|
266
263
|
</StyledTableRow>
|
|
267
264
|
)}
|
|
268
265
|
</TableBody>
|