I am currently attempting to resolve the following condition: if the condition is true, display a button, otherwise hide the button.
OfferMatching() { this.getmatchoffer.filter(obj => { debugger for (let i = 0; i < this.applicationJobList.length; i++){ var Options = { hour12: false }; const offerStartDate = new Date(this.applicationJobList[i].offerSteps.initial.jobDateoffer).toLocaleDateString(); const offerStartTime= new Date(this.applicationJobList[i].offerSteps.initial.startTime).toLocaleTimeString('it-IT',Options); const offerEndTime = new Date(this.applicationJobList[i].offerSteps.initial.endTime).toLocaleTimeString('it-IT',Options); const bookDateoffer = new Date (obj.offerSteps.initial.jobDateoffer).toLocaleDateString() ; const bookstartTime = new Date(obj.offerSteps.initial.startTime).toLocaleTimeString('it-IT',Options); const bookendTime = new Date(obj.offerSteps.initial.endTime).toLocaleTimeString('it-IT',Options); debugger if (bookDateoffer === offerStartDate ) {
if (bookstartTime < offerStartTime) {
if (bookendTime < offerEndTime) {
this.samemOffer = false;
} else {
this.samemOffer = true;
}
} else if (bookstartTime > offerEndTime) {
if (bookendTime > offerEndTime) {
this.samemOffer = false;
} else {
this.samemOffer = true;
}
} else {
this.samemOffer = true;
}
}
}
})
} this is a snippet of Angular TypeScript code
{{i+1}}{{c}}
</div>
Please assist in resolving my problem
This is Angular HTML code block