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: 1308 admin extraction des prqualifis #1315

Merged
merged 11 commits into from
Apr 2, 2024

Conversation

Viczei
Copy link
Contributor

@Viczei Viczei commented Mar 11, 2024

No description provided.

@Viczei Viczei changed the title Linked 1308 admin extraction des prqualifis feat: 1308 admin extraction des prqualifis Mar 11, 2024
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

import { gqlClient } from "@shared/utils";
import { context } from "../context";

const fetchPPrequalifiedQuery = `
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const fetchPPrequalifiedQuery = `
const fetchPrequalifiedQuery = `

Comment on lines 362 to 394
const prequalified = await fetchPrequalified();
const prequalifiedWithContrib =
prequalified?.map(({ variants, id, title, documents: refs }) => ({
cdtnId: id,
id,
breadcrumbs: [],
excludeFromSearch: true,
isPublished: true,
metaDescription: title,
text: title,
title,
source: SOURCES.PREQUALIFIED,
variants,
refs: refs.map(({ document }) => {
const documentRef = {
id: document.id,
cdtnId: document.cdtnId,
slug: document.slug,
title: document.title,
description: document.description,
source: document.source,
};
}
return ref;
}),
}));
if (!document.description) {
const foundContrib = newGeneratedContributions.find(
(newGeneratedContribution) => {
return newGeneratedContribution.cdtnId === document.cdtnId;
}
);
return {
...documentRef,
description: foundContrib?.description,
};
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ça serait pas mal de mettre cette logique dans un folder pour alléger ce fichier

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

voire mettre un TU

onDelete={async () => {
setModalDelete(true);
}}
></PrequalifiedForm>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
></PrequalifiedForm>
/>

Copy link

Quality Gate Passed Quality Gate passed

Issues
14 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

🎉 Deployment for commit b7a44be :

Ingresses
Docker images
  • 📦 docker pull harbor.fabrique.social.gouv.fr/cdtn/cdtn-admin/contributions:sha-b7a44be4d1913910413a1a66f4dffcbd35b7aa68
  • 📦 docker pull harbor.fabrique.social.gouv.fr/cdtn/cdtn-admin/export:sha-b7a44be4d1913910413a1a66f4dffcbd35b7aa68
  • 📦 docker pull harbor.fabrique.social.gouv.fr/cdtn/cdtn-admin/frontend:sha-b7a44be4d1913910413a1a66f4dffcbd35b7aa68
  • 📦 docker pull harbor.fabrique.social.gouv.fr/cdtn/cdtn-admin/hasura:sha-b7a44be4d1913910413a1a66f4dffcbd35b7aa68
Debug

@Viczei Viczei merged commit cef0ceb into master Apr 2, 2024
24 checks passed
@Viczei Viczei deleted the linked-1308-admin-extraction-des-prqualifis branch April 2, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants