ordering-ui-react-native 0.22.37-release → 0.22.38-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
|
@@ -82,6 +82,7 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
82
82
|
const [phoneToShow, setPhoneToShow] = useState('');
|
|
83
83
|
const [openModal, setOpenModal] = useState(false)
|
|
84
84
|
const allowDriverUpdateData = user?.level !== 4 || configs?.allow_driver_update_data?.value === "1"
|
|
85
|
+
const allowDeleteDriverAccount = user?.level !== 4 || configs?.allow_delete_driver_account?.value === "1"
|
|
85
86
|
const isAdmin = user?.level === 0
|
|
86
87
|
|
|
87
88
|
const setUserCellPhone = (isEdit = false) => {
|
|
@@ -567,10 +568,12 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
567
568
|
|
|
568
569
|
<LogoutButton />
|
|
569
570
|
</Actions>
|
|
570
|
-
|
|
571
|
-
<
|
|
572
|
-
|
|
573
|
-
|
|
571
|
+
{allowDeleteDriverAccount && (
|
|
572
|
+
<RemoveAccount disabled={isAdmin} onPress={() => onRemoveAccount()} activeOpacity={0.7}>
|
|
573
|
+
<AntDesignIcon size={16} name='close' color={theme.colors.textNormal} style={{ marginEnd: 14 }} />
|
|
574
|
+
<OText size={14} lineHeight={24} weight={'400'} style={{ opacity: isAdmin ? 0.5 : 1 }} color={theme.colors.danger500}>{t('REMOVE_ACCOUNT', 'Remove account')}</OText>
|
|
575
|
+
</RemoveAccount>
|
|
576
|
+
)}
|
|
574
577
|
<OModal
|
|
575
578
|
open={openModal}
|
|
576
579
|
onClose={() => setOpenModal(false)}
|