-
Notifications
You must be signed in to change notification settings - Fork 4
feature(integrate-api): API integration #229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
30d27d8 to
a58531b
Compare
| "footprint": "Ověření", | ||
| "change-detection": "Porovnání", | ||
| "project-card-progress-text": "{{progress, number}}% dokončeno", | ||
| "project-card-last-update": "{{date, datetime}}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might need this, because this also happens during the build time. Need to take this from env or something in github pages.
| "change-detection": "Porovnání", | ||
| "project-card-progress-text": "{{progress, number}}% dokončeno", | ||
| "project-card-last-update": "{{date, datetime}}", | ||
| "project-card-contributors-text": "{{contributors}}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This too
src/components/Link/index.tsx
Outdated
| href = { | ||
| ...href, | ||
| pathname: href.pathname?.replace('[locale]', locale), | ||
| pathname: href?.pathname?.replace('[locale]', locale), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary?
src/components/ProjectsMap/index.tsx
Outdated
| .map((project) => (isDefined(project.exportHotTaskingManagerGeometries) ? { | ||
| ...project, | ||
| coordinates: [project.coordinates[1], project.coordinates[0]] as LatLngTuple, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to add this further
src/pages/[locale]/data/index.tsx
Outdated
| pagination: { | ||
| limit: PAGE_SIZE, | ||
| offset: 0, | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a note to remove this later
src/pages/[locale]/data/index.tsx
Outdated
| // icon={ | ||
| // projectTypeOptionsMap[project.projectType]?.icon | ||
| // } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this commented out? Bring it back please. This can be worked on right now, I think.
src/pages/[locale]/data/index.tsx
Outdated
| </Tag> | ||
| )} | ||
| {project.number_of_users && ( | ||
| {/* {project.number_of_users && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uncomment and hardcode in the transformation earlier
src/pages/queries.ts
Outdated
| import { gql } from 'graphql-request'; | ||
| import { ProjectStatus, ProjectType } from 'utils/common'; | ||
|
|
||
| export interface ProjectProperties { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to bring this from server/backend
src/utils/common.ts
Outdated
| export type ProjectType = 'FIND' | 'VALIDATE' | 'VALIDATE_IMAGE' | 'COMPARE' | 'COMPLETENESS'; | ||
|
|
||
| export type ProjectType = 1 | 2 | 3 | 4 | 10; | ||
| // export type ProjectType = 1 | 2 | 3 | 4 | 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
| .map(async (feature) => { | ||
| let geometry = null; | ||
|
|
||
| // 🔑 Fetch geometry from exportHotTaskingManagerGeometries URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh oh, i see chatgpt 😋
464bae9 to
da151f5
Compare
| @@ -0,0 +1,4 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we separated these out?
src/components/ProjectsMap/index.tsx
Outdated
| import Link from 'components/Link'; | ||
|
|
||
| import styles from './styles.module.css'; | ||
| import { ProjectProperties } from 'pages/queries'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why fetching this type from queries and not directly from the generated schema?
src/pages/[locale]/data/index.tsx
Outdated
| projectTypeOptionsMap[project.project_type].icon | ||
| )} | ||
| icon={ | ||
| projectTypeOptionsMap[project.projectType]?.icon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this mapping function?
da151f5 to
1bd8247
Compare
.gitmodules
Outdated
| @@ -1,3 +1,6 @@ | |||
| [submodule "server"] | |||
| path = server | |||
| url = git@github.com:mapswipe/python-mapswipe-workers.git | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need the other one anymore.
| export interface Props { | ||
| className?: string; | ||
| type: '1' | '2' | '3' | '10'; | ||
| type: 'FIND' | 'VALIDATE' | 'VALIDATE_IMAGE' | 'COMPARE' | 'COMPLETENESS'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add icon for completeness as well.
src/components/ProjectsMap/index.tsx
Outdated
| ), | ||
| }, | ||
| ]), [t]); | ||
| const projectTypeOptions: ProjectTypeOption[] = useMemo(() => ([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably need other projectType options too. All of them.
| icons={( | ||
| <ProjectTypeIcon | ||
| type="2" | ||
| type="VALIDATE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to add other project options here?
| 10: { | ||
| key: 'COMPLETENESS', | ||
| label: t('validate-image'), | ||
| icon: ( | ||
| <ProjectTypeIcon type="10" size="small" /> | ||
| <ProjectTypeIcon type="VALIDATE_IMAGE" size="small" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other project types are needed here too?
ffd7e45 to
c59a742
Compare
8d39e32 to
a43bbe5
Compare
9641647 to
c642ac8
Compare
eb46cf5 to
214348e
Compare
76d0c00 to
c642ac8
Compare
3cad8c7 to
953ca7d
Compare
6823ec1 to
8eba61c
Compare
c7f2739 to
7fc8133
Compare
ede0d78 to
5e6a07d
Compare
5e6a07d to
cb152f6
Compare
https://github.com/toggle-corp/mapswipe-meta/issues/542
Changes
This PR doesn't introduce any
console.logmeant for debuggingThis PR includes