@controleonline/ui-crm 1.0.42 → 1.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -69,11 +69,11 @@ const MapsSection = () => {
69
69
  const categoryActions = categoriesStore.actions;
70
70
  const {
71
71
  currentCompany,
72
- mainCompany,
72
+ defaultCompany,
73
73
  effectiveCompanyConfigs,
74
74
  saveConfig,
75
75
  saveConfigs,
76
- saveMainCompanyConfigs,
76
+ saveDefaultCompanyConfigs,
77
77
  } = useGeneralSettingsConfig();
78
78
 
79
79
  const [webGoogleMapsApiKey, setWebGoogleMapsApiKey] = useState('');
@@ -96,9 +96,9 @@ const MapsSection = () => {
96
96
  [],
97
97
  );
98
98
 
99
- const mainCompanyId = mainCompany?.id || mainCompany?.['@id'];
100
- const mainCompanyIri = mainCompanyId
101
- ? '/people/' + mainCompanyId
99
+ const defaultCompanyId = defaultCompany?.id || defaultCompany?.['@id'];
100
+ const defaultCompanyIri = defaultCompanyId
101
+ ? '/people/' + defaultCompanyId
102
102
  : '';
103
103
  const currentCompanyId = normalizeShopEntityId(
104
104
  currentCompany?.id || currentCompany?.['@id'],
@@ -147,7 +147,7 @@ const MapsSection = () => {
147
147
  }, [effectiveCompanyConfigs, shopSettings.franchiseAddressCategoryIds]);
148
148
 
149
149
  useEffect(() => {
150
- if (!mainCompanyIri || !categoryActions?.getItems) {
150
+ if (!defaultCompanyIri || !categoryActions?.getItems) {
151
151
  setFranchiseAddressCategories([]);
152
152
  return undefined;
153
153
  }
@@ -158,7 +158,7 @@ const MapsSection = () => {
158
158
  categoryActions
159
159
  .getItems({
160
160
  context: SHOP_FRANCHISE_ADDRESS_CATEGORY_CONTEXT,
161
- people: mainCompanyIri,
161
+ people: defaultCompanyIri,
162
162
  itemsPerPage: 100,
163
163
  })
164
164
  .then(result => {
@@ -187,7 +187,7 @@ const MapsSection = () => {
187
187
  return () => {
188
188
  isMounted = false;
189
189
  };
190
- }, [categoryActions, categoriesStore.getters, mainCompanyIri]);
190
+ }, [categoryActions, categoriesStore.getters, defaultCompanyIri]);
191
191
 
192
192
  useEffect(() => {
193
193
  if (!franchiseLocatorEnabled || !currentCompanyId) {
@@ -317,14 +317,14 @@ const MapsSection = () => {
317
317
  ? franchiseAddressCategoryIds.filter(id => id !== categoryId)
318
318
  : [...franchiseAddressCategoryIds, categoryId];
319
319
  setFranchiseAddressCategoryIds(nextIds);
320
- const saved = saveMainCompanyConfigs?.({
320
+ const saved = saveDefaultCompanyConfigs?.({
321
321
  [SHOP_FRANCHISE_ADDRESS_CATEGORY_IDS_CONFIG_KEY]: nextIds,
322
322
  });
323
323
  if (!saved) {
324
324
  setFranchiseAddressCategoryIds(franchiseAddressCategoryIds);
325
325
  }
326
326
  },
327
- [franchiseAddressCategoryIds, saveMainCompanyConfigs],
327
+ [franchiseAddressCategoryIds, saveDefaultCompanyConfigs],
328
328
  );
329
329
 
330
330
  const toggleSalesPage = useCallback(() => {
@@ -88,7 +88,7 @@ const ShopSection = () => {
88
88
  const localStyles = useGeneralSettingsStyles();
89
89
  const {
90
90
  currentCompany,
91
- mainCompanyLabel,
91
+ defaultCompanyLabel,
92
92
  effectiveCompanyConfigs,
93
93
  isMainCompanySelected,
94
94
  saveConfig,
@@ -232,7 +232,7 @@ const ShopSection = () => {
232
232
  <View style={localStyles.emptyBox}>
233
233
  <Text style={localStyles.emptyTitle}>Disponivel na empresa principal</Text>
234
234
  <Text style={localStyles.emptyText}>
235
- Selecione a empresa principal ({mainCompanyLabel}) para configurar o shop.
235
+ Selecione a empresa principal ({defaultCompanyLabel}) para configurar o shop.
236
236
  </Text>
237
237
  </View>
238
238
  </GeneralSettingsSection>
@@ -6,6 +6,7 @@ import CrmIndex from '@controleonline/ui-crm/src/react/pages/crm/index';
6
6
  import ProposalsPage from '../pages/proposals';
7
7
  import CrmConversation from '../pages/crm/conversation';
8
8
  import GeneralSettings from '../pages/settings/GeneralSettings';
9
+ import McpPage from '../pages/mcp/McpPage';
9
10
  import ProposalDetails from '../pages/proposals/ProposalDetails';
10
11
 
11
12
  const crmRoutes = [
@@ -120,6 +121,19 @@ const crmRoutes = [
120
121
  title: 'Propostas',
121
122
  },
122
123
  },
124
+ {
125
+ name: 'McpPage',
126
+ component: McpPage,
127
+ path: 'mcp',
128
+ options: {
129
+ showCompanyFilter: true,
130
+ showBottomToolBar: true,
131
+ headerShown: true,
132
+ headerBackVisible: true,
133
+ companyFilterMode: 'icon',
134
+ title: 'Chat IA / MCP',
135
+ },
136
+ },
123
137
  {
124
138
  name: 'CrmConversation',
125
139
  component: CrmConversation,