|
|
@@ -94,7 +94,7 @@ const ClientDetailCard = ( |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
if (brNo != undefined && brNo.length > 0) { |
|
|
|
console.log(brExpiryDate) |
|
|
|
// console.log(brExpiryDate) |
|
|
|
var currentDate = new Date(); // Current date |
|
|
|
var targetDate = new Date(brExpiryDate); // Target date |
|
|
|
|
|
|
@@ -102,9 +102,9 @@ const ClientDetailCard = ( |
|
|
|
alert("The BR is expired.") |
|
|
|
} else { |
|
|
|
var timeDiff = Math.abs(currentDate.getTime() - targetDate.getTime()); |
|
|
|
console.log(timeDiff) |
|
|
|
// console.log(timeDiff) |
|
|
|
var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24)); |
|
|
|
console.log(diffDays) |
|
|
|
// console.log(diffDays) |
|
|
|
if (diffDays <= 7 && diffDays > 0) { |
|
|
|
alert("The BR is expiring.") |
|
|
|
} |
|
|
@@ -114,7 +114,7 @@ const ClientDetailCard = ( |
|
|
|
}, [brNo]); |
|
|
|
|
|
|
|
const handleViewClick = () => () => { |
|
|
|
console.log(currentApplicationDetailData) |
|
|
|
// console.log(currentApplicationDetailData) |
|
|
|
currentApplicationDetailData.type == "ORG" ? |
|
|
|
window.open('/orgUser/' + currentApplicationDetailData.id, "_blank", "noreferrer") : |
|
|
|
window.open('/indUser/' + currentApplicationDetailData.id, "_blank", "noreferrer"); |
|
|
|