@@ -69,6 +69,7 @@ const ReportTable = (props) => {
69
69
const [ publicUserName , setIsPublicUserName ] = useState ( "" ) ;
70
70
const [ isViewShare , setIsViewShare ] = useState ( { } ) ;
71
71
const [ isSubscribe , setIsSubscribe ] = useState ( true ) ;
72
+ const [ isModal , setIsModal ] = useState ( { } ) ;
72
73
const [ reason , setReason ] = useState ( "" ) ;
73
74
const Extand_Class = localStorage . getItem ( "Extand_Class" ) ;
74
75
const extClass = Extand_Class && JSON . parse ( Extand_Class ) ;
@@ -1288,9 +1289,55 @@ const ReportTable = (props) => {
1288
1289
{ item ?. URL ? t ( "download" ) : "-" }
1289
1290
</ button >
1290
1291
</ td >
1291
- < td className = "px-4 py-2" >
1292
- { formatRow ( item ?. ExtUserPtr ) }
1293
- </ td >
1292
+ { props . ReportName === "In-progress documents" ? (
1293
+ < td className = "px-4 py-2" >
1294
+ < button
1295
+ onClick = { ( ) =>
1296
+ item ?. AuditTrail ?. length > 0 &&
1297
+ setIsModal ( { [ item ?. objectId ] : true } )
1298
+ }
1299
+ className = { `${
1300
+ item ?. AuditTrail ?. length
1301
+ ? "border-green-400"
1302
+ : "cursor-default op-border-primary"
1303
+ } focus:outline-none w-[60px] border-[2px] text-[12px] rounded-full md:self-center`}
1304
+ >
1305
+ { item ?. AuditTrail ?. length ? "VIEWED" : "SENT" }
1306
+ </ button >
1307
+ { isModal [ item . objectId ] && (
1308
+ < ModalUi
1309
+ isOpen
1310
+ title = { t ( "document-logs" ) }
1311
+ handleClose = { ( ) => setIsModal ( { } ) }
1312
+ >
1313
+ { item ?. AuditTrail ?. map ( ( x , i ) => (
1314
+ < div
1315
+ key = { i }
1316
+ className = "pl-3 first:mt-2 text-sm font-medium flex flex-col md:flex-row items-start md:gap-4 border-t-[1px] border-gray-600"
1317
+ >
1318
+ < div className = "py-2 break-all font-bold md:text-[12px] md:col-span-2 w-full md:w-[210px]" >
1319
+ { x ?. UserPtr ?. Email || "-" }
1320
+ </ div >
1321
+ < button className = "px-2 cursor-default border-[2px] text-[12px] border-green-400 rounded-full md:self-center" >
1322
+ { x ?. Activity ?. toUpperCase ( ) || "-" }
1323
+ </ button >
1324
+ < div className = " text-[12px] py-2" >
1325
+ { x ?. Activity === "Signed"
1326
+ ? new Date ( x ?. SignedOn ) ?. toUTCString ( )
1327
+ : new Date (
1328
+ x ?. ViewedOn
1329
+ ) ?. toUTCString ( ) || "-" }
1330
+ </ div >
1331
+ </ div >
1332
+ ) ) }
1333
+ </ ModalUi >
1334
+ ) }
1335
+ </ td >
1336
+ ) : (
1337
+ < td className = "px-4 py-2" >
1338
+ { formatRow ( item ?. ExtUserPtr ) }
1339
+ </ td >
1340
+ ) }
1294
1341
< td className = "px-4 py-2" >
1295
1342
{ ! item ?. IsSignyourself && item ?. Placeholders ? (
1296
1343
< button
@@ -1308,11 +1355,7 @@ const ReportTable = (props) => {
1308
1355
< td className = " pl-[20px] py-2" >
1309
1356
{ props . ReportName === "Templates" && (
1310
1357
< div className = "flex flex-row" >
1311
- < label
1312
- className = {
1313
- "cursor-pointer relative inline-flex items-center mb-0"
1314
- }
1315
- >
1358
+ < label className = "cursor-pointer relative inline-flex items-center mb-0" >
1316
1359
< input
1317
1360
checked = { props . isPublic ?. [ item . objectId ] }
1318
1361
onChange = { ( e ) =>
0 commit comments