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

[tra-14474] Ajouter la Quantité refusée et la Quantité traitée sur l'Aperçu des différents BSDD #3389

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions front/src/Apps/common/wordings/dashboard/wordingsDashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,5 @@ export const VALIDER_SYNTHESE_LABEL = "Valider la synthèse";
export const ROAD_CONTROL = "Contrôle routier";

export const NON_RENSEIGNE = "Non renseigné";
export const BSD_DETAILS_QTY_TOOLTIP =
"Les valeurs quantité refusée et traitée font suite à une mise à jour permettant à l'installation de destination d'un bordereau de les compléter. Si la valeur affichée est 'Non renseignée', cela signifie que le traitement est antérieur à la mise à disposition de cette fonctionnalité et que ces champs n'ont pas été complétés ultérieurement, par la révision par exemple. Pour plus d'informations sur ces nouveaux champs, consultez la FAQ.";
31 changes: 26 additions & 5 deletions front/src/dashboard/detail/bsdd/BSDDetailContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ import { getOperationModeLabel } from "../../../common/operationModes";
import { mapBsdd } from "../../../Apps/Dashboard/bsdMapper";
import { canAddAppendix1 } from "../../../Apps/Dashboard/dashboardServices";
import { usePermissions } from "../../../common/contexts/PermissionsContext";
import TdTooltip from "../../../common/components/Tooltip";
import {
BSD_DETAILS_QTY_TOOLTIP,
NON_RENSEIGNE
} from "../../../Apps/common/wordings/dashboard/wordingsDashboard";

type CompanyProps = {
company?: FormCompany | null;
Expand Down Expand Up @@ -382,16 +387,32 @@ const Recipient = ({
label="Quantité reçue"
/>
<DetailRow
value={form?.quantityRefused && `${form?.quantityRefused} tonnes`}
value={
form?.quantityRefused ? (
`${form?.quantityRefused} tonnes`
) : (
<>
{NON_RENSEIGNE} <TdTooltip msg={BSD_DETAILS_QTY_TOOLTIP} />
</>
)
}
label="Quantité refusée"
/>
<DetailRow
value={form?.quantityAccepted && `${form?.quantityAccepted} tonnes`}
label="Quantité acceptée"
/>
<DetailRow value={form.wasteRefusalReason} label="Motif de refus" />
</div>
<div className={styles.detailGrid}>
<DetailRow
value={
form?.quantityAccepted ? (
`${form?.quantityAccepted} tonnes`
) : (
<>
{NON_RENSEIGNE} <TdTooltip msg={BSD_DETAILS_QTY_TOOLTIP} />
</>
)
}
label="Quantité traitée"
/>
<DetailRow
value={recipient?.processingOperation}
label="Opération de traitement prévue"
Expand Down
Loading