@@ -49,6 +49,22 @@ <h2 class="shared-contents-panel__title">Contenus partagés</h2>
4949 x-text ="`(${$store.sharedContentsPanel.filesCount})` "> </ span >
5050 </ label >
5151 </ div >
52+ < template x-if ="isSwitchtender ">
53+ < div class ="fr-segmented__element ">
54+ < input type ="radio "
55+ value ="draft-recommendations "
56+ id ="shared-contents-tab-draft-recommendations "
57+ name ="shared-contents-tab "
58+ :checked ="$store.sharedContentsPanel.activeTab === 'draft-recommendations' "
59+ :disabled ="$store.sharedContentsPanel.draftRecommendationsCount === 0 "
60+ @click ="$store.sharedContentsPanel.switchTab('draft-recommendations') ">
61+ < label class ="fr-label " for ="shared-contents-tab-draft-recommendations ">
62+ Brouillons
63+ < span class ="shared-contents-panel__item-count "
64+ x-text ="`(${$store.sharedContentsPanel.draftRecommendationsCount})` "> </ span >
65+ </ label >
66+ </ div >
67+ </ template >
5268 </ div >
5369 </ fieldset >
5470 </ div >
@@ -70,9 +86,10 @@ <h2 class="shared-contents-panel__title">Contenus partagés</h2>
7086 :key ="reco.id ">
7187 < div class ="fr-mb-3v ">
7288 <!-- Date header with grouping -->
73- < template x-if ="index === 0 || formatDateFrench (reco.messageCreated) !== formatDateFrench($store.sharedContentsPanel.recommendations[index - 1]?.messageCreated ) ">
89+ < template x-if ="index === 0 || formatDate (reco.messageCreated, { year: 'numeric', month: 'long', day: 'numeric' } ) !== formatDate(reco.messageCreated, { year: 'numeric', month: 'long', day: 'numeric' } ) ">
7490 < p class ="shared-contents-panel__date-header "
75- x-text ="formatDateFrench(reco.messageCreated) "> </ p >
91+ x-text ="formatDate(reco.messageCreated, { year: 'numeric', month: 'long', day: 'numeric' }) ">
92+ </ p >
7693 </ template >
7794 {% include "conversations/messages/fragments/shared_contents_recommendation_card.html" %}
7895 </ div >
@@ -99,9 +116,10 @@ <h2 class="shared-contents-panel__title">Contenus partagés</h2>
99116 :key ="file.id ">
100117 < div >
101118 <!-- Date header with grouping -->
102- < template x-if ="index === 0 || formatDateFrench (file.messageCreated) !== formatDateFrench ($store.sharedContentsPanel.files[index - 1]?.messageCreated) ">
119+ < template x-if ="index === 0 || formatDate (file.messageCreated, { year: 'numeric', month: 'long', day: 'numeric' } ) !== formatDate ($store.sharedContentsPanel.files[index - 1]?.messageCreated, { year: 'numeric', month: 'long', day: 'numeric' } ) ">
103120 < p class ="shared-contents-panel__date-header "
104- x-text ="formatDateFrench(file.messageCreated) "> </ p >
121+ x-text ="formatDate(file.messageCreated, { year: 'numeric', month: 'long', day: 'numeric' }) ">
122+ </ p >
105123 </ template >
106124 {% include "conversations/messages/fragments/shared_contents_file_card.html" with external=False %}
107125 </ div >
@@ -122,7 +140,35 @@ <h2 class="shared-contents-panel__title">Contenus partagés</h2>
122140 </ template >
123141 </ div >
124142 </ template >
143+ <!-- Draft recommendations tab -->
144+ < template x-if ="isSwitchtender && $store.sharedContentsPanel.activeTab === 'draft-recommendations' ">
145+ < div >
146+ < template x-if ="$store.sharedContentsPanel.draftRecommendationsCount === 0 ">
147+ < div class ="shared-contents-panel__empty ">
148+ < span class ="fr-icon fr-icon-draft-line " aria-hidden ="true "> </ span >
149+ < p > Aucun brouillon de recommandation dans cette conversation.</ p >
150+ </ div >
151+ </ template >
152+ < template x-if ="$store.sharedContentsPanel.draftRecommendationsCount > 0 ">
153+ < div >
154+ < template x-for ="(reco, index) in $store.sharedContentsPanel.draftRecommendations "
155+ :key ="reco.id ">
156+ < div class ="fr-mb-3v ">
157+ <!-- Date header with grouping -->
158+ < template x-if ="index === 0 || formatDate(reco.messageCreated, { year: 'numeric', month: 'long', day: 'numeric' }) !== formatDate($store.sharedContentsPanel.draftRecommendations[index - 1]?.messageCreated, { year: 'numeric', month: 'long', day: 'numeric' }) ">
159+ < p class ="shared-contents-panel__date-header "
160+ x-text ="formatDate(reco.messageCreated, { year: 'numeric', month: 'long', day: 'numeric' }) ">
161+ </ p >
162+ </ template >
163+ {% include "conversations/messages/fragments/shared_contents_draft_recommendation_card.html" %}
164+ </ div >
165+ </ template >
166+ </ div >
167+ </ template >
168+ </ div >
169+ </ template >
125170 </ div >
126171 </ div >
172+ {% include "projects/project/fragments/tasks_modal/delete_task_confirmation_modal.html" %}
127173 </ div >
128174</ template >
0 commit comments