hidden total score from transaction and installtion report
This commit is contained in:
@@ -14,7 +14,8 @@ type Props = {
|
||||
isLoading?: boolean,
|
||||
totalData?: number,
|
||||
tableScore?: number,
|
||||
totalScore?: number
|
||||
totalScore?: number,
|
||||
showTotalScore?: boolean
|
||||
}
|
||||
|
||||
type ADSortType = {
|
||||
@@ -22,7 +23,7 @@ type ADSortType = {
|
||||
value: 1 | -1
|
||||
}
|
||||
|
||||
export const Table: FC<Props> = ({ columns, data, tableStatus = false, tableScore = 0, isLoading = false, totalData = 0, totalScore = 0 }) => {
|
||||
export const Table: FC<Props> = ({ columns, data, tableStatus = false, tableScore = 0, isLoading = false, totalData = 0, totalScore = 0, showTotalScore = true }) => {
|
||||
const [aDSort, setADSort] = useState<ADSortType>({
|
||||
key: "",
|
||||
value: -1
|
||||
@@ -81,9 +82,11 @@ export const Table: FC<Props> = ({ columns, data, tableStatus = false, tableScor
|
||||
<div>
|
||||
{tableStatus && `امتیاز حال حاضر : ${tableScore}`}
|
||||
</div>
|
||||
<div>
|
||||
{`امتیاز کل : ${totalScore}`}
|
||||
</div>
|
||||
{showTotalScore && (
|
||||
<div>
|
||||
{`امتیاز کل : ${totalScore}`}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="block max-w-full min-h-max overflow-x-auto overflow-y-hidden bg-auth-form rounded-[40px] shadow-sm p-4 pb-0 xl:p-9 xl:pb-0 relative">
|
||||
<table>
|
||||
|
||||
@@ -33,6 +33,6 @@ export const InstallationReports = () => {
|
||||
})
|
||||
}, [mutate, params])
|
||||
return (
|
||||
<Table columns={installationReportsCol} data={data?.data} totalData={data?.total} isLoading={isPending} />
|
||||
<Table columns={installationReportsCol} data={data?.data} totalData={data?.total} isLoading={isPending} showTotalScore={false} />
|
||||
)
|
||||
}
|
||||
@@ -33,6 +33,6 @@ export const Transactions = () => {
|
||||
})
|
||||
}, [mutate, params])
|
||||
return (
|
||||
<Table columns={transactionsCol} data={data?.data} isLoading={isPending} totalData={data?.total} />
|
||||
<Table columns={transactionsCol} data={data?.data} isLoading={isPending} totalData={data?.total} showTotalScore={false} />
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user