Badge indicator showing whether an opportunity has an associated Service Request

This commit is contained in:
2026-09-24 14:03:34 -03:00
parent b8c493fc20
commit f9595b94e0
14 changed files with 656 additions and 8 deletions

View File

@@ -51,6 +51,8 @@ function createContentModal({
renderStageFilterButtons,
renderStatusFilterButtons,
requestOpportunitiesForPeriod,
loadCrmServiceRequests,
resetCrmServiceRequests,
requestTokenRelayOnce,
resetCustomerAndOwnerFiltersForPeriod,
resetOpportunitiesTable,
@@ -73,7 +75,8 @@ function createContentModal({
existingModal.querySelector("select").focus();
document.documentElement.classList.add("opportunities-extension-scroll-lock");
ensureEscapeKeyHandler();
requestTokenRelayOnce().catch(() => {});
requestTokenRelayOnce().then(token => loadCrmServiceRequests(token, opportunitiesQueryState.periodRequestVersion))
.then(() => renderOpportunitiesTable()).catch(() => {});
return;
}
@@ -429,6 +432,7 @@ function createContentModal({
}
function closeOpportunitiesModal() {
resetCrmServiceRequests();
const modal = document.getElementById(MODAL_ID);
if (modal) {