ordering-ui-react-native 0.18.3-release → 0.18.4-release
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.
package/package.json
CHANGED
|
@@ -39,7 +39,6 @@ import { NotFoundSource } from '../NotFoundSource';
|
|
|
39
39
|
import AntDesignIcon from 'react-native-vector-icons/AntDesign'
|
|
40
40
|
const ProfileUI = (props: ProfileParams) => {
|
|
41
41
|
const {
|
|
42
|
-
navigation,
|
|
43
42
|
formState,
|
|
44
43
|
isEdit,
|
|
45
44
|
validationFields,
|
|
@@ -48,9 +47,7 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
48
47
|
cleanFormState,
|
|
49
48
|
handleToggleAvalaibleStatusDriver,
|
|
50
49
|
userState,
|
|
51
|
-
|
|
52
|
-
isAlsea,
|
|
53
|
-
isHideDriverStatus
|
|
50
|
+
isAlsea
|
|
54
51
|
} = props;
|
|
55
52
|
|
|
56
53
|
const [{ user }] = useSession();
|
|
@@ -60,6 +57,8 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
60
57
|
const { errors } = useForm();
|
|
61
58
|
const theme = useTheme();
|
|
62
59
|
|
|
60
|
+
const isShowDriverStatus = user?.level === 4 && (props.isShowDriverStatus || (!props.isShowDriverStatus && !userState?.result?.result?.available))
|
|
61
|
+
|
|
63
62
|
const [phoneInputData, setPhoneInputData] = useState({
|
|
64
63
|
error: '',
|
|
65
64
|
phone: {
|
|
@@ -346,7 +345,7 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
346
345
|
/>
|
|
347
346
|
</CenterView>
|
|
348
347
|
|
|
349
|
-
{
|
|
348
|
+
{isShowDriverStatus && (
|
|
350
349
|
<EnabledStatusDriver>
|
|
351
350
|
<View style={{ flex: 1 }}>
|
|
352
351
|
<OText
|
|
@@ -374,7 +373,7 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
374
373
|
!userState?.result?.result?.available,
|
|
375
374
|
)
|
|
376
375
|
}
|
|
377
|
-
disabled={userState?.loading}
|
|
376
|
+
disabled={userState?.loading || userState?.result?.result?.available}
|
|
378
377
|
animationSpeed={200}
|
|
379
378
|
/>
|
|
380
379
|
)}
|