Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions webserver/prod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ ARG MAPBOX_ACCESS_TOKEN
ENV MAPBOX_ACCESS_TOKEN ${MAPBOX_ACCESS_TOKEN}
ARG REACT_APP_IS_MAPBOX_AVAILABLE
ENV REACT_APP_IS_MAPBOX_AVAILABLE ${MAPBOX_ACCESS_TOKEN:+true}
ARG REACT_APP_IS_GEOAP_EE_ENABLED
ENV REACT_APP_IS_GEOAP_EE_ENABLED $REACT_APP_IS_GEOAP_EE_ENABLED

WORKDIR /code
COPY ./webviewer /code
Expand Down
2 changes: 2 additions & 0 deletions webserver/remote.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ ARG MAPBOX_ACCESS_TOKEN
ENV MAPBOX_ACCESS_TOKEN ${MAPBOX_ACCESS_TOKEN}
ARG REACT_APP_IS_MAPBOX_AVAILABLE
ENV REACT_APP_IS_MAPBOX_AVAILABLE ${MAPBOX_ACCESS_TOKEN:+true}
ARG REACT_APP_IS_GEOAP_EE_ENABLED
ENV REACT_APP_IS_GEOAP_EE_ENABLED $REACT_APP_IS_GEOAP_EE_ENABLED

WORKDIR /code
COPY ./webviewer /code
Expand Down
42 changes: 24 additions & 18 deletions webviewer/src/pages/Account/components/Profile/Profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import {
UserMessage
} from './Profile.styles';

const { REACT_APP_IS_GEOAP_EE_ENABLED } = process.env;

export const Profile = () => {
const user = useSelector(selectUser);
const history = useHistory();
Expand All @@ -37,30 +39,34 @@ export const Profile = () => {
<InfoTitle>Email address:</InfoTitle>
<InfoValue>{user.email}</InfoValue>
</InfoItem>
{user.trial_finished_at ? (
{REACT_APP_IS_GEOAP_EE_ENABLED === 'true' && (
<>
<InfoItem>
<InfoTitle>Your balance:</InfoTitle>
<InfoValue large>${user.balance}</InfoValue>
</InfoItem>
<InfoItem>
<InfoTitle>Personal discount:</InfoTitle>
<InfoValue large>{user.discount}%</InfoValue>
</InfoItem>
{!user.is_trial_end_notified && (
{user.trial_finished_at ? (
<>
<InfoItem>
<InfoTitle>Your balance:</InfoTitle>
<InfoValue large>${user.balance}</InfoValue>
</InfoItem>
<InfoItem>
<InfoTitle>Personal discount:</InfoTitle>
<InfoValue large>{user.discount}%</InfoValue>
</InfoItem>
{!user.is_trial_end_notified && (
<UserMessage>
The trial period is finished. Please top up your balance.
</UserMessage>
)}
</>
) : (
<UserMessage>
The trial period is finished. Please top up your balance
To end the trial period and unlock all features, please top up your account.
</UserMessage>
)}
<Button icon='Plus' variant='primary' onClick={handleTopUp}>
Top-up account
</Button>
</>
) : (
<UserMessage>
To end trial period and unlock all features, please top up your account
</UserMessage>
)}
<Button icon='Plus' variant='primary' onClick={handleTopUp}>
Top-up account
</Button>
<Title>Administration</Title>
<StyledButton icon='Eye' onClick={handleChangePassword}>
Change password
Expand Down
3 changes: 2 additions & 1 deletion webviewer/src/pages/Account/components/Sidebar/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ const breadcrumbsItems = [
{ link: ROUTES.ROOT, text: 'Home' },
{ text: 'Personal account' }
];
const { REACT_APP_IS_GEOAP_EE_ENABLED } = process.env;

export const Sidebar = props => {
const { activeTab, setActiveTab } = props;
const user = useSelector(selectUser);
const history = useHistory();
const tabs = useMemo(() => {
return user.trial_finished_at
return REACT_APP_IS_GEOAP_EE_ENABLED === 'true' && user.trial_finished_at
? TABS
: TABS.filter(({ name }) => name !== TAB_NAMES.transactions);
}, [user.trial_finished_at]);
Expand Down