-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ajoute possibilité de reprendre l'intégration d'une livraison n…
…on terminée
- Loading branch information
Showing
3 changed files
with
73 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
assets/pages/datasheet/DatasheetView/DatasetListTab/UnfinishedUploadList.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { fr } from "@codegouvfr/react-dsfr"; | ||
import Button from "@codegouvfr/react-dsfr/Button"; | ||
import { FC } from "react"; | ||
import { symToStr } from "tsafe/symToStr"; | ||
|
||
import { routes } from "../../../../router/router"; | ||
import { Upload } from "../../../../types/app"; | ||
|
||
type UnfinishedUploadListProps = { | ||
datastoreId: string; | ||
uploadList?: Upload[]; | ||
title?: string; | ||
}; | ||
const UnfinishedUploadList: FC<UnfinishedUploadListProps> = ({ datastoreId, uploadList, title = "Livraisons" }) => { | ||
return ( | ||
<> | ||
<div className={fr.cx("fr-grid-row")}> | ||
<h5> | ||
<i className={fr.cx("fr-icon-database-fill")} /> | ||
{title} ({uploadList?.length ?? 0}) | ||
</h5> | ||
</div> | ||
|
||
{uploadList?.map((upload) => ( | ||
<div key={upload._id} className={fr.cx("fr-grid-row", "fr-grid-row--middle", "fr-mt-2v")}> | ||
<div className={fr.cx("fr-col")}> | ||
<div className={fr.cx("fr-grid-row", "fr-grid-row--middle")}>{upload.name}</div> | ||
</div> | ||
|
||
<div className={fr.cx("fr-col")}> | ||
<div className={fr.cx("fr-grid-row", "fr-grid-row--right", "fr-grid-row--middle")}> | ||
<Button linkProps={routes.datastore_datasheet_new_integration({ datastoreId, uploadId: upload._id }).link}> | ||
{"Reprendre l'intégration"} | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
))} | ||
</> | ||
); | ||
}; | ||
|
||
UnfinishedUploadList.displayName = symToStr({ UnfinishedUploadList }); | ||
|
||
export default UnfinishedUploadList; |