@@ -48,6 +48,9 @@ const SHOULD_INCLUDE_DEPRECATED = true;
4848type TOrganizationOptions = {
4949 orgLabel : string ;
5050} ;
51+ type TProjectResponseCommonExtended = ProjectResponseCommon & {
52+ _markedForDeletion : boolean ;
53+ } ;
5154interface TPageOptions {
5255 sort : TSort ;
5356}
@@ -75,6 +78,7 @@ type TProjectItem = {
7578 updatedAt : Date ;
7679 organization : string ;
7780 nexus : NexusClient ;
81+ toDelete : boolean ;
7882} ;
7983const fetchOrganizationDetails = async ( {
8084 nexus,
@@ -151,6 +155,7 @@ const ProjectItem = ({
151155 access,
152156 organization,
153157 nexus,
158+ toDelete,
154159} : TProjectItem ) => {
155160 const { data } = useQuery ( {
156161 queryKey : [ 'datesets' , { orgLabel : organization , projectLabel : title } ] ,
@@ -166,7 +171,21 @@ const ProjectItem = ({
166171 < div className = "org" >
167172 < Link to = { to } >
168173 < h3 >
169- { title } { ' ' }
174+ { toDelete && (
175+ < span style = { { verticalAlign : 'top' , margin : '0 3px' } } >
176+ < LoadingOutlined
177+ style = { {
178+ fontSize : 12 ,
179+ color : '#dc7943' ,
180+ verticalAlign : 'middle' ,
181+ } }
182+ />
183+ </ span >
184+ ) }
185+ { title }
186+ { toDelete && (
187+ < span className = "deletion-tag" > Project being deleted</ span >
188+ ) }
170189 { deprected && (
171190 < span className = "depreacted-tag" >
172191 < DeprecatedIcon /> deprecated
@@ -181,15 +200,15 @@ const ProjectItem = ({
181200 < div > Datasets</ div >
182201 < div > { ( datasets && formatNumber ( datasets ) ) ?? '0' } </ div >
183202 </ div >
184- < div className = "statistics_item" />
185- < div className = "statistics_item" >
186- < div > Created</ div >
187- < div > { timeago ( createdAt ) } </ div >
188- </ div >
189203 < div className = "statistics_item" >
190204 < div > Last update</ div >
191205 < div > { timeago ( updatedAt ) } </ div >
192206 </ div >
207+ < div className = "statistics_item" >
208+ < div > Created</ div >
209+ < div > { timeago ( createdAt ) } </ div >
210+ </ div >
211+ < div className = "statistics_item" />
193212 </ div >
194213 < div className = "redirection" >
195214 < Link to = { to } >
@@ -267,10 +286,9 @@ const OrganizationProjectsPage: React.FC<{}> = ({}) => {
267286 } ) ;
268287 const total =
269288 data && data . pages ? ( ( data . pages [ 0 ] as ProjectList ) ?. _total as number ) : 0 ;
270- const dataSource : ProjectResponseCommon [ ] =
271- data && data . pages
272- ? data . pages . map ( page => ( page as ProjectList ) . _results ) . flat ( )
273- : [ ] ;
289+ const dataSource : TProjectResponseCommonExtended [ ] = ( data && data . pages
290+ ? data . pages . map ( page => ( page as ProjectList ) . _results ) . flat ( )
291+ : [ ] ) as TProjectResponseCommonExtended [ ] ;
274292 if ( ! query . trim ( ) . length ) {
275293 totalProjectsRef . current = total ;
276294 }
@@ -323,6 +341,7 @@ const OrganizationProjectsPage: React.FC<{}> = ({}) => {
323341 onCreateClick = { ( ) => updateCreateModelVisibility ( true ) }
324342 permissions = { [ 'projects/create' ] }
325343 path = { [ `/${ orgLabel } ` ] }
344+ supTitle = "Organization"
326345 />
327346 < div className = "route-body" >
328347 < div className = "route-body-container" >
@@ -372,13 +391,14 @@ const OrganizationProjectsPage: React.FC<{}> = ({}) => {
372391 itemLayout = "horizontal"
373392 loadMore = { LoadMore }
374393 dataSource = { dataSource }
375- renderItem = { ( item : ProjectResponseCommon ) => {
394+ renderItem = { ( item : TProjectResponseCommonExtended ) => {
376395 const to = `/orgs/${ item . _organizationLabel } /${ item . _label } ` ;
377396 return (
378397 < ProjectItem
379398 { ...{
380399 to,
381400 nexus,
401+ toDelete : item . _markedForDeletion ,
382402 title : item . _label ,
383403 organization : item . _organizationLabel ,
384404 deprected : item . _deprecated ,
0 commit comments