Skip to content

Commit

Permalink
fix(selectCategoryUrl): /select-category path update to /select-form
Browse files Browse the repository at this point in the history
  • Loading branch information
NSUWAL123 committed Nov 8, 2024
1 parent 22d7860 commit 6fca8f3
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ const LayerSwitcherControl = ({ map, visible = 'osm', pmTileLayerData = null })
if (
location.pathname.includes('project/') ||
location.pathname.includes('upload-area') ||
location.pathname.includes('select-category') ||
location.pathname.includes('select-form') ||
location.pathname.includes('map-features') ||
location.pathname.includes('split-tasks')
) {
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/components/createnewproject/DataExtract.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const DataExtract = ({
}, [formValues?.dataExtractWays]);

const toggleStep = (step, url) => {
if (url === '/select-category') {
if (url === '/select-form') {
dispatch(
CreateProjectActions.SetIndividualProjectDetailsData({
...formValues,
Expand Down Expand Up @@ -327,7 +327,7 @@ const DataExtract = ({
btnText="PREVIOUS"
btnType="secondary"
type="button"
onClick={() => toggleStep(3, '/select-category')}
onClick={() => toggleStep(3, '/select-form')}
className="fmtm-font-bold"
/>
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const UploadArea = ({ flag, geojsonFile, setGeojsonFile, setCustomDataExtractUpl
}
dispatch(CreateProjectActions.SetIndividualProjectDetailsData(formValues));
dispatch(CommonActions.SetCurrentStepFormStep({ flag: flag, step: 3 }));
navigate('/select-category');
navigate('/select-form');
dispatch(CreateProjectActions.SetToggleSplittedGeojsonEdit(false));
};
const {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/constants/StepFormConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const createProjectSteps: ICreateProjectSteps[] = [
name: 'Upload Area',
},
{
url: '/select-category',
url: '/select-form',
step: 3,
label: '03',
name: 'Select Form',
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/constants/blockerUrl.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
const pathNotToBlock = ['/select-category', '/map-features', '/split-tasks', '/upload-area', '/create-project'];
const pathNotToBlock = ['/select-form', '/map-features', '/split-tasks', '/upload-area', '/create-project'];
export default pathNotToBlock;
2 changes: 1 addition & 1 deletion src/frontend/src/routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const routes = createBrowserRouter([
),
},
{
path: '/select-category',
path: '/select-form',
element: (
<ProtectedRoute>
<Suspense fallback={<div>Loading...</div>}>
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/views/CreateNewProject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const CreateNewProject = () => {
case '/upload-area':
dispatch(CommonActions.SetCurrentStepFormStep({ flag: 'create_project', step: 2 }));
break;
case '/select-category':
case '/select-form':
dispatch(CommonActions.SetCurrentStepFormStep({ flag: 'create_project', step: 3 }));
break;
case '/map-features':
Expand Down Expand Up @@ -69,7 +69,7 @@ const CreateNewProject = () => {
setCustomDataExtractUpload={setCustomDataExtractUpload}
/>
);
case '/select-category':
case '/select-form':
return (
<SelectForm
flag="create_project"
Expand Down

0 comments on commit 6fca8f3

Please sign in to comment.