mirror of
https://github.com/IT4Change/gradido.git
synced 2026-04-04 16:45:27 +00:00
more checks for untilValid
This commit is contained in:
parent
aa32cffe7b
commit
0aace62dda
@ -117,7 +117,17 @@ const validLink = computed(() => {
|
|||||||
if (!isTransactionLinkLoaded.value) {
|
if (!isTransactionLinkLoaded.value) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return !(linkData.value.validUntil !== null && linkData.value.validUntil < new Date())
|
if (!linkData.value.validUntil) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const validUntilDate = new Date(linkData.value.validUntil)
|
||||||
|
console.log('TransactionLink.validLink... validUntilDate=', validUntilDate)
|
||||||
|
console.log('TransactionLink.validLink... new Date()=', new Date())
|
||||||
|
console.log(
|
||||||
|
'TransactionLink.validLink... validUntilDate.getTime() >= new Date().getTime()=',
|
||||||
|
validUntilDate.getTime() >= new Date().getTime(),
|
||||||
|
)
|
||||||
|
return validUntilDate.getTime() >= new Date().getTime()
|
||||||
})
|
})
|
||||||
|
|
||||||
const itemType = computed(() => {
|
const itemType = computed(() => {
|
||||||
@ -220,7 +230,7 @@ function updateRedeemedBoxText(type) {
|
|||||||
break
|
break
|
||||||
case 'TEXT_EXPIRED':
|
case 'TEXT_EXPIRED':
|
||||||
redeemedBoxText.value = t('gdd_per_link.link-expired', {
|
redeemedBoxText.value = t('gdd_per_link.link-expired', {
|
||||||
date: d(linkData.value.validUntil, 'long'),
|
date: d(new Date(linkData.value.validUntil), 'long'),
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
case 'TEXT_REDEEMED':
|
case 'TEXT_REDEEMED':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user