Commit 6c8b197c authored by Julien Bouquillon's avatar Julien Bouquillon 🐫

feat(legi): show NOTA diffs fix #24

parent 78e040ac
......@@ -205,7 +205,7 @@ const DilaFileChangeDetail = ({
size={16}
style={{ marginRight: 5, verticalAlign: "middle" }}
/>
Voir le diff
Voir les modifications sur l'article
</div>
}
>
......@@ -223,6 +223,32 @@ const DilaFileChangeDetail = ({
/>
</Collapsible>
)}
{previous && previous.data.nota !== data.nota && (
<Collapsible
trigger={
<div style={{ cursor: "pointer" }}>
<Search
size={16}
style={{ marginRight: 5, verticalAlign: "middle" }}
/>
Voir les modifications sur le "NOTA"
</div>
}
>
<Diff
inputA={previous.data.nota}
inputB={data.nota}
type={"words"}
style={{
padding: 5,
whiteSpace: "pre-line",
border: "1px solid silver",
background: "#fff",
borderRadius: 3
}}
/>
</Collapsible>
)}
</td>
</tr>
);
......
......@@ -12,7 +12,9 @@ const compareLegiArticles = (tree1, tree2) =>
tree1,
tree2,
(art1, art2) =>
art1.data.texte !== art2.data.texte || art1.data.etat !== art2.data.etat
art1.data.texte !== art2.data.texte ||
art1.data.etat !== art2.data.etat ||
art1.data.nota !== art2.data.nota
);
// todo: ensure the diff is useful, exclude html/format changes
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment