ordering-ui-react-native 0.21.76 → 0.21.77

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.21.76",
3
+ "version": "0.21.77",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -46,7 +46,8 @@ const ProfileUI = (props: ProfileParams) => {
46
46
  toggleIsEdit,
47
47
  cleanFormState,
48
48
  handleToggleAvalaibleStatusDriver,
49
- isAlsea
49
+ isAlsea,
50
+ isHideDriverStatus
50
51
  } = props;
51
52
 
52
53
  const [{ user, sessionLoading }] = useSession();
@@ -56,8 +57,6 @@ const ProfileUI = (props: ProfileParams) => {
56
57
  const { errors } = useForm();
57
58
  const theme = useTheme();
58
59
 
59
- const isShowDriverStatus = user?.level === 4 && (props.isShowDriverStatus || (!props.isShowDriverStatus && !userState?.result?.result?.available))
60
-
61
60
  const [phoneInputData, setPhoneInputData] = useState({
62
61
  error: '',
63
62
  phone: {
@@ -362,7 +361,7 @@ const ProfileUI = (props: ProfileParams) => {
362
361
  />
363
362
  </CenterView>
364
363
 
365
- {isShowDriverStatus && (
364
+ {user?.level === 4 && !isHideDriverStatus && (
366
365
  <EnabledStatusDriver>
367
366
  <View style={{ flex: 1 }}>
368
367
  <OText
@@ -390,7 +389,7 @@ const ProfileUI = (props: ProfileParams) => {
390
389
  !userState?.result?.result?.available,
391
390
  )
392
391
  }
393
- disabled={userState?.loading || userState?.result?.result?.available}
392
+ disabled={userState?.loading}
394
393
  animationSpeed={200}
395
394
  />
396
395
  )}
@@ -57,7 +57,7 @@ export interface ProfileParams {
57
57
  showField?: any;
58
58
  isRequiredField?: any;
59
59
  isAlsea?: boolean;
60
- isShowDriverStatus?: boolean;
60
+ isHideDriverStatus?: boolean;
61
61
  isFocused?: boolean;
62
62
  }
63
63