Hide per-date rescrape button for past columns
Scraping a past date via the hotel-page backend wouldn't return anything useful (Booking.com shows no availability for dates gone by). The ↻ button is now only rendered for today and future dates. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c49985bec7
commit
0721769e03
1 changed files with 17 additions and 15 deletions
|
|
@ -1729,21 +1729,23 @@ const RateMatrixTab: React.FC = () => {
|
||||||
<span style={styles.scrapeAge}>{scrapeAge}</span>
|
<span style={styles.scrapeAge}>{scrapeAge}</span>
|
||||||
) : null}
|
) : null}
|
||||||
<div style={{ display: 'flex', gap: 2, alignItems: 'center', justifyContent: 'center' }}>
|
<div style={{ display: 'flex', gap: 2, alignItems: 'center', justifyContent: 'center' }}>
|
||||||
<button
|
{d >= todayStr && (
|
||||||
onClick={() => enqueueScrape(d, d)}
|
<button
|
||||||
disabled={queuePos >= 0}
|
onClick={() => enqueueScrape(d, d)}
|
||||||
style={mergeStyles(
|
disabled={queuePos >= 0}
|
||||||
styles.scrapeBtn,
|
style={mergeStyles(
|
||||||
queuePos >= 0 ? styles.scrapeBtnActive : {}
|
styles.scrapeBtn,
|
||||||
)}
|
queuePos >= 0 ? styles.scrapeBtnActive : {}
|
||||||
title={
|
)}
|
||||||
scrapingDate === d ? `Scraping ${d}…`
|
title={
|
||||||
: queuePos >= 0 ? `Queued (#${queuePos + 1})`
|
scrapingDate === d ? `Scraping ${d}…`
|
||||||
: `Scrape ${d}`
|
: queuePos >= 0 ? `Queued (#${queuePos + 1})`
|
||||||
}
|
: `Scrape ${d}`
|
||||||
>
|
}
|
||||||
{scrapingDate === d ? '...' : queuePos >= 0 ? `#${queuePos + 1}` : '↻'}
|
>
|
||||||
</button>
|
{scrapingDate === d ? '...' : queuePos >= 0 ? `#${queuePos + 1}` : '↻'}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
{locationName && d >= todayStr && (
|
{locationName && d >= todayStr && (
|
||||||
<a
|
<a
|
||||||
href={buildSearchUrl(locationName, d)}
|
href={buildSearchUrl(locationName, d)}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue