MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / syncDateControls

Function syncDateControls

deployments/desktop/static/desktop.js:1535–1551  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1533 }
1534
1535 function syncDateControls() {
1536 const dateInput = $("paperDate");
1537 const daysInput = $("daysInput");
1538 const runButton = $("runDailyBtn");
1539 if (!dateInput || !daysInput || !runButton) return;
1540 if (state.dailyPolling) {
1541 runButton.disabled = true;
1542 runButton.textContent = ui().papers.backgroundRunning;
1543 return;
1544 }
1545 const today = todayDateValue();
1546 if (!dateInput.value) dateInput.value = today;
1547 if (dateInput.value > today) dateInput.value = today;
1548 daysInput.value = String(selectedDateFetchDays());
1549 runButton.disabled = false;
1550 runButton.textContent = dateInput.value === today ? ui().papers.pullToday : ui().papers.pullSelected;
1551 }
1552
1553 function setDailyTaskState(taskId = "", userId = "", polling = false) {
1554 state.dailyTaskId = taskId || "";

Callers 5

applyLocaleFunction · 0.85
setDailyTaskStateFunction · 0.85
runDailyFunction · 0.85
bindEventsFunction · 0.85
shiftDateFunction · 0.85

Calls 4

uiFunction · 0.85
todayDateValueFunction · 0.85
selectedDateFetchDaysFunction · 0.85
$Function · 0.70

Tested by

no test coverage detected