Skip to content

Commit

Permalink
New initial flow
Browse files Browse the repository at this point in the history
  • Loading branch information
nizetic committed Dec 12, 2023
1 parent 150b262 commit 4ce48d0
Show file tree
Hide file tree
Showing 16 changed files with 691 additions and 507 deletions.
Binary file added src/common/assets/create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/common/assets/view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/common/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export const PATHS = {
INDEX: '/',
VIEW_CONVERSIONS: '/view-conversions',
CREATE_UPLOAD: '/create-upload',
PROCESSING: '/processing',
CREATE_GEOREFERENCE: '/create-georeference',
REVIEW_CREATE: '/review-create',
Expand All @@ -13,6 +15,8 @@ export const PATHS = {

export const ROUTE_NAME_BY_PATH = {
[PATHS.INDEX]: 'home',
[PATHS.CREATE_UPLOAD]: 'Create',
[PATHS.VIEW_CONVERSIONS]: 'View',
[PATHS.PROCESSING]: 'processing',
[PATHS.CREATE_GEOREFERENCE]: 'prepare.drawing.package',
[PATHS.LAYERS]: 'prepare.drawing.package',
Expand Down
3 changes: 3 additions & 0 deletions src/common/translations/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const en = {
cancel: 'Cancel',
close: 'Close',
create: 'Create',
'initial.description':
'Create and publish custom indoor maps that support maintaining control of design, distribution, scale, and access.',
'create.description': 'Create Tilesets by uploading your drawing files',
'create.download': 'Create + Download',
'create.indoor.map': 'Create Indoor Map',
'create.manifest': 'Create manifest',
Expand Down
2 changes: 1 addition & 1 deletion src/components/bread-crumb-nav/bread-crumb-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useLocation, useNavigate } from 'react-router-dom';
import { breadcrumbStyle } from './bread-crumb-nav.style';

const routesReset = [PATHS.CONVERSION];
const routesSkipAlert = [PATHS.PAST_CONVERSION];
const routesSkipAlert = [PATHS.PAST_CONVERSION, PATHS.CREATE_UPLOAD, PATHS.VIEW_CONVERSIONS];

const BreadCrumbNav = () => {
const { t } = useTranslation();
Expand Down
2 changes: 1 addition & 1 deletion src/components/bread-crumb-nav/bread-crumb-nav.style.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { color, fontSize, fontWeight } from 'common/styles';

export const breadcrumbStyle = {
root: { margin: '0.625rem 0px' },
root: { margin: '0.625rem 0px', lineHeight: '1rem' },
itemLink: {
color: color.accent.primary,
fontSize: fontSize.md,
Expand Down
3 changes: 3 additions & 0 deletions src/components/route/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import { footerPadding, routeStyle } from './route.style';
const responseStoreSelector = s => s.lroStatus;
const userStoreSelector = s => s.subscriptionKey;

const openRoutes = [PATHS.INDEX, PATHS.CREATE_UPLOAD, PATHS.VIEW_CONVERSIONS];

const Route = ({ title, component: Component, dataRequired }) => {
const { t } = useTranslation();
const navigate = useNavigate();
Expand All @@ -28,6 +30,7 @@ const Route = ({ title, component: Component, dataRequired }) => {
}, [currentPath]);

useEffect(() => {
if (openRoutes.includes(currentPath)) return;
// Redirect to index if there is no subscription key
if (!subKey) navigate(PATHS.INDEX, { replace: true });
}, [navigate, currentPath, subKey]);
Expand Down
14 changes: 10 additions & 4 deletions src/pages/conversions/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Spinner, SpinnerSize, TextField } from '@fluentui/react';
import { DetailsList, DetailsListLayoutMode, DetailsRow } from '@fluentui/react/lib/DetailsList';
import { DetailsList, DetailsListLayoutMode, DetailsRow, SelectionMode } from '@fluentui/react/lib/DetailsList';
import { PATHS } from 'common';
import { getExistingConversions } from 'common/api/conversions';
import { useConversionPastStore } from 'common/store/conversion-past.store';
Expand Down Expand Up @@ -146,7 +146,12 @@ const Conversions = () => {
tilesetStatus: ongoingConversion.tilesetStepStatus,
created: ongoingConversion.tilesetDate,
},
date: new Date(ongoingConversion.tilesetDate ?? ongoingConversion.uploadStartTime),
date: new Date(
ongoingConversion.tilesetDate ??
ongoingConversion.datasetDate ??
ongoingConversion.conversionDate ??
ongoingConversion.uploadStartTime
),
});
}

Expand Down Expand Up @@ -192,7 +197,7 @@ const Conversions = () => {
},
};
})
.filter(item => item.description.includes(descriptionFilter))
.filter(item => item.description.toLowerCase().includes(descriptionFilter.toLowerCase()))
.sort((a, b) => {
if (a[sorting.fieldName] < b[sorting.fieldName]) {
return sorting.descending ? 1 : -1;
Expand Down Expand Up @@ -232,8 +237,9 @@ const Conversions = () => {
styles={{ root: { fontSize: '0.875rem', cursor: 'pointer' } }}
/>
)}
onShouldVirtualize={() => false}
layoutMode={DetailsListLayoutMode.justified}
selectionMode={0}
selectionMode={SelectionMode.none}
/>
</>
);
Expand Down
83 changes: 0 additions & 83 deletions src/pages/create-manifest/FileUploader.js

This file was deleted.

Loading

0 comments on commit 4ce48d0

Please sign in to comment.