Added the ability to bookmark the extension, along with some visual adjustments
This commit is contained in:
@@ -67,7 +67,7 @@ function createFusionCrmServiceRequests({ isCurrentPeriodRequest,
|
||||
throw new Error("CRM service request pagination did not advance.");
|
||||
}
|
||||
items.push(...data.items);
|
||||
onProgress(items.length, Number.isFinite(data.totalResults) && data.totalResults >= items.length ? data.totalResults : null);
|
||||
onProgress(items.length, Number.isFinite(data.totalResults) && data.totalResults >= items.length ? data.totalResults : null, items.slice());
|
||||
if (!data.hasMore) return items;
|
||||
offset = current + received;
|
||||
attempt = 1;
|
||||
|
||||
@@ -9,7 +9,6 @@ function createFusionOpportunities({
|
||||
getOpportunityTypeValues,
|
||||
readResponseBodyForDebug,
|
||||
resetDebugRequests = () => {},
|
||||
loadServiceRequests = async () => {},
|
||||
environment
|
||||
}) {
|
||||
const { fetch } = environment;
|
||||
@@ -40,9 +39,6 @@ function createFusionOpportunities({
|
||||
// One history per query, preserving all pages of the same result set.
|
||||
if (page === 1) {
|
||||
resetDebugRequests();
|
||||
// SR queries do not depend on opportunity or product IDs. Keep their
|
||||
// diagnostics in this query's history and reuse the loaded SR state later.
|
||||
try { await loadServiceRequests(token, requestVersion); } catch { /* SR failure must not block opportunities. */ }
|
||||
if (!isCurrentPeriodRequest(requestVersion)) return null;
|
||||
}
|
||||
const requestEntry = logRequestStart({
|
||||
|
||||
Reference in New Issue
Block a user