Skip to content
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

feat: providers list handler #127

Merged
merged 19 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
feat: add provider in request body
  • Loading branch information
PUECH Fabien committed Feb 2, 2024
commit 4b3a96687c8a7fcd0e84e2664ea130e930839e02
5 changes: 1 addition & 4 deletions src/FormComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,6 @@ export const FormComponent: FC<IProps> = ({
const handleOpenSettings = (): void => {
commands.execute('settingeditor:open', { query: 'EODAG' });
};
useEffect(() => {
console.log(productTypesValue);
}, [productTypesValue]);

const loadProductTypesSuggestions = useFetchSuggestions();

Expand All @@ -184,7 +181,7 @@ export const FormComponent: FC<IProps> = ({
</div>
<div className="jp-EodagWidget-field">
<Controller
name="providers"
name="provider"
control={control}
rules={{ required: true }}
render={({ field: { onChange, value } }) => (
Expand Down
3 changes: 2 additions & 1 deletion src/SearchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class SearchService {
dtend: formValues.endDate ? formatDate(formValues.endDate) : undefined,
cloudCover: formValues.cloud < 100 ? formValues.cloud : undefined,
page: page,
geom: formValues.geometry
geom: formValues.geometry,
provider: formValues.provider
};

if (formValues.additionnalParameters) {
Expand Down
1 change: 0 additions & 1 deletion src/hooks/useFetchSuggestions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { EODAG_SERVER_ADRESS } from './../config';

const useFetchSuggestions = () => {
const guessProductTypes = async (inputValue: string) => {
console.log('01 inputValue', inputValue);
const _serverSettings = ServerConnection.makeSettings();
const _eodag_server = URLExt.join(
_serverSettings.baseUrl,
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface IFormInput {
startDate: Date;
endDate: Date;
productType: string;
providers: string;
provider: string;
cloud: number;
additionnalParameters?: { name: string; value: string }[];
}
Expand Down