Implemented the Organization Chart feature to create customer organizational
This commit is contained in:
@@ -3,6 +3,7 @@ function createContentApplication(overrides = {}) {
|
||||
document: globalThis.document,
|
||||
window: globalThis.window,
|
||||
navigator: globalThis.navigator,
|
||||
crypto: globalThis.crypto,
|
||||
get localStorage() { return globalThis.localStorage; },
|
||||
fetch: globalThis.fetch,
|
||||
browser: globalThis.browser,
|
||||
@@ -30,6 +31,27 @@ function createContentApplication(overrides = {}) {
|
||||
const authSalesCommonState = createAuthSalesCommonState();
|
||||
const opportunitiesQueryState = createOpportunitiesQueryState();
|
||||
const tableSorting = createTableSorting({ environment });
|
||||
const orgChartIcons = createOrgChartIcons({ environment });
|
||||
const accountContact = createFusionAccountContact({ environment,
|
||||
getToken: () => authContentSession.requestTokenRelayOnce(),
|
||||
logRequestStart: (...args) => debugContentLog.logRequestStart(...args),
|
||||
logRequestSuccess: (...args) => debugContentLog.logRequestSuccess(...args),
|
||||
logRequestFailure: (...args) => debugContentLog.logRequestFailure(...args),
|
||||
readResponseBodyForDebug: (...args) => debugContentLog.readResponseBodyForDebug(...args)
|
||||
});
|
||||
const orgChart = createOrgChartView({ environment, tableSorting, model: createOrgChartModel(),
|
||||
requestQueryAccountContact: (...args) => accountContact.requestQueryAccountContact(...args),
|
||||
requestPersistContact: (...args) => accountContact.requestPersistContact(...args),
|
||||
requestOpportunitiesByContact: (...args) => accountContact.requestOpportunitiesByContact(...args),
|
||||
loadLayout: loadOrganizationLayout, icon: orgChartIcons.icon, searchableSelect, modalId: contracts.MODAL_ID,
|
||||
getPrincipal: () => currentUser.getUserId(), notify: (...args) => opportunitiesLinks.showCopyConfirmation(...args),
|
||||
async request(operation, data) {
|
||||
const result = await platformContentMessages.sendRuntimeMessage({ ...data,
|
||||
type: operation === "load" ? messageTypes.loadOrganizationChart : messageTypes.saveOrganizationChart });
|
||||
if (!result?.ok) throw new Error(result?.error || "Unable to access local organization charts.");
|
||||
return result.chart;
|
||||
}
|
||||
});
|
||||
const opportunitiesTableState = createOpportunitiesTableState();
|
||||
const opportunitiesFilterState = createOpportunitiesFilterState(contracts);
|
||||
const preferencesState = createPreferencesState(contracts);
|
||||
@@ -94,6 +116,7 @@ function createContentApplication(overrides = {}) {
|
||||
closeAccountPlansModal: (...args) => consumptionPlansView.closeAccountPlansModal(...args),
|
||||
closeInstallBaseModal: (...args) => installBaseView.closeInstallBaseModal(...args),
|
||||
closeServiceRequestsModal: (...args) => serviceRequestsView.closeServiceRequestsModal(...args),
|
||||
closeOrganizationChart: () => orgChart.close(),
|
||||
closeCustomerFilterPanel: (...args) => opportunitiesFilters.closeCustomerFilterPanel(...args),
|
||||
closeOwnerFilterPanel: (...args) => opportunitiesFilters.closeOwnerFilterPanel(...args),
|
||||
closePreferencesModal: (...args) => preferencesView.closePreferencesModal(...args),
|
||||
@@ -376,6 +399,7 @@ function createContentApplication(overrides = {}) {
|
||||
createCloudConsumptionButton: (...args) => consumptionPlansAction.createCloudConsumptionButton(...args),
|
||||
createInstallBaseButton: (...args) => installBaseAction.createInstallBaseButton(...args),
|
||||
createServiceRequestsButton: (...args) => serviceRequestsAction.createServiceRequestsButton(...args),
|
||||
createOrganizationChartButton: (...args) => orgChart.createButton(...args),
|
||||
createCopyOpportunityButton: (...args) => opportunitiesLinks.createCopyOpportunityButton(...args),
|
||||
createDetailLink: (...args) => opportunitiesLinks.createDetailLink(...args),
|
||||
createProductsCountButton: (...args) => productsDetails.createProductsCountButton(...args),
|
||||
@@ -779,6 +803,7 @@ function createContentApplication(overrides = {}) {
|
||||
}
|
||||
return {
|
||||
opportunityCalendar,
|
||||
orgChart,
|
||||
workloadActionForm,
|
||||
activityFilters,
|
||||
start, contracts,
|
||||
|
||||
Reference in New Issue
Block a user