fix: open/closed status now supports Places API New hour/minute format
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
The periods data from Google Places API (New) uses {hour, minute} instead
of {time}. The JS check now handles both formats so business hours status
displays correctly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
404aeb162f
commit
a5be17821a
@ -5103,8 +5103,8 @@ function syncFacebookData(companyId, btn) {
|
||||
for (var i = 0; i < periods.length; i++) {
|
||||
var p = periods[i];
|
||||
if (p.open && p.close && p.open.day === day) {
|
||||
var openTime = parseInt(p.open.time, 10);
|
||||
var closeTime = parseInt(p.close.time, 10);
|
||||
var openTime = p.open.time ? parseInt(p.open.time, 10) : (p.open.hour || 0) * 100 + (p.open.minute || 0);
|
||||
var closeTime = p.close.time ? parseInt(p.close.time, 10) : (p.close.hour || 0) * 100 + (p.close.minute || 0);
|
||||
if (hhmm >= openTime && hhmm < closeTime) {
|
||||
isOpen = true;
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user