summaryrefslogtreecommitdiff
path: root/src/modules/result/components/DetailRow.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/result/components/DetailRow.tsx')
-rw-r--r--src/modules/result/components/DetailRow.tsx38
1 files changed, 24 insertions, 14 deletions
diff --git a/src/modules/result/components/DetailRow.tsx b/src/modules/result/components/DetailRow.tsx
index 99ccb01..29cf984 100644
--- a/src/modules/result/components/DetailRow.tsx
+++ b/src/modules/result/components/DetailRow.tsx
@@ -7,6 +7,7 @@ import styles from './table.module.css'
import { CornerDownRightIcon } from 'lucide-react';
import { User } from '@prisma/client';
import clsxm from '@/common/libs/clsxm';
+import getClientCredential from '@/common/libs/getClientCredential';
const DetailRow = ({ productId }: { productId: number }) => {
const { filter } = useResultStore()
@@ -26,7 +27,7 @@ const DetailRow = ({ productId }: { productId: number }) => {
if (detailLocation.isLoading) {
return (
<tr>
- <td colSpan={7}>
+ <td colSpan={8}>
<div className='grid grid-cols-1 gap-y-2 w-full'>
<Skeleton className='w-full h-8' />
<Skeleton className='w-full h-8' />
@@ -54,6 +55,9 @@ const DetailRow = ({ productId }: { productId: number }) => {
<QuantityColumn data={location.COUNT2} />
</td>
<td className={styles.td}>
+ <QuantityColumn data={location.COUNT3} />
+ </td>
+ <td className={styles.td}>
<QuantityColumn data={location.VERIFICATION} />
</td>
<td className={styles.td} />
@@ -64,18 +68,24 @@ const DetailRow = ({ productId }: { productId: number }) => {
)
}
-const QuantityColumn = ({ data }: { data: { quantity?: number | undefined, user?: User } }) => (
- <div className='grid grid-cols-1'>
- {typeof data?.quantity !== 'number' && '-'}
- {data.quantity !== null && (
- <>
- <span>{data.quantity}</span>
- <div className='text-xs'>
- {data.user?.name}
- </div>
- </>
- )}
- </div>
-)
+const QuantityColumn = ({ data }: { data: { quantity?: number | undefined, user?: User } }) => {
+ const credential = getClientCredential()
+
+ if (!(credential?.team == "VERIFICATION")) return '-'
+
+ return (
+ <div className='grid grid-cols-1'>
+ {typeof data?.quantity !== 'number' && '-'}
+ {data.quantity !== null && (
+ <>
+ <span>{data.quantity}</span>
+ <div className='text-xs text-neutral-500'>
+ {data.user?.name}
+ </div>
+ </>
+ )}
+ </div>
+ )
+}
export default DetailRow \ No newline at end of file