@controleonline/ui-crm 1.0.52 → 1.0.53

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.
@@ -1,13 +1,13 @@
1
1
  {
2
- "version": "1.0.51",
2
+ "version": "1.0.53",
3
3
  "rc": 1,
4
- "branch": "rc/1.0.51-rc.1",
5
- "baseMaster": "8c646f55e13ae9474154da39ee7b7b13fc2384f5",
4
+ "branch": "rc/1.0.53-rc.1",
5
+ "baseMaster": "0d446c3868d06b400e7bc1f7127233f2c4dc2612",
6
6
  "tasks": [
7
- 1308
7
+ 1312
8
8
  ],
9
9
  "frozen": true,
10
10
  "repositories": {
11
- "ControleOnline/ui-crm": "8a7cfc6a607b56bc695fd1da3baf3f6bda61694b"
11
+ "ControleOnline/ui-crm": "67053129abfdd7562d7d16ee3f8e3f9160d9cec3"
12
12
  }
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@controleonline/ui-crm",
3
- "version": "1.0.52",
3
+ "version": "1.0.53",
4
4
  "author": "ControleOnline",
5
5
  "description": "ControleOnline CRM Quasar UI Component",
6
6
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  import React, {useCallback, useEffect, useMemo, useState} from 'react';
2
2
  import {ScrollView, Text, TouchableOpacity, View} from 'react-native';
3
3
  import {SafeAreaView} from 'react-native-safe-area-context';
4
- import {useFocusEffect} from '@react-navigation/native';
4
+ import {useFocusEffect, useRoute} from '@react-navigation/native';
5
5
  import Icon from 'react-native-vector-icons/MaterialIcons';
6
6
 
7
7
  import css from '@controleonline/ui-orders/src/react/css/orders';
@@ -139,6 +139,7 @@ const SETTINGS_TABS = [
139
139
  ];
140
140
 
141
141
  const GeneralSettings = () => {
142
+ const route = useRoute();
142
143
  const {styles} = css();
143
144
  const localStyles = useGeneralSettingsStyles();
144
145
  const {
@@ -235,6 +236,20 @@ const GeneralSettings = () => {
235
236
  writeGeneralSettingsActiveTab(activeTab);
236
237
  }, [activeTab]);
237
238
 
239
+ useFocusEffect(
240
+ useCallback(() => {
241
+ const tabFromRoute = String(route?.params?.tab || '').trim();
242
+ if (!tabFromRoute) {
243
+ return undefined;
244
+ }
245
+ writeGeneralSettingsActiveTab(tabFromRoute);
246
+ setActiveTab(prev =>
247
+ prev === tabFromRoute ? prev : tabFromRoute,
248
+ );
249
+ return undefined;
250
+ }, [route?.params?.tab]),
251
+ );
252
+
238
253
  const activeTabConfig = useMemo(
239
254
  () =>
240
255
  availableTabs.find(tab => tab.key === activeTab) ||