Skip to content

Commit

Permalink
Merge pull request #147 from eclipse-sw360/heliocastro/project_page
Browse files Browse the repository at this point in the history
Fix project page and messages
  • Loading branch information
heliocastro authored Oct 10, 2023
2 parents 4712071 + ec6f90b commit 493793f
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 21 deletions.
7 changes: 6 additions & 1 deletion messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,11 @@
"New Components": "New Components",
"New Release": "New Release",
"Name of the component": "Name of the component",
"No subscriptions available": "No subscriptions available.",
"NONE": "NONE",
"NAME_COMPONENT": "Name of the component",
"NoModerationRequests": "You do not have any open moderation requests.",
"NoProjectsFound": "There are no projects found with your selection.",
"Obligations": "Obligations",
"OPEN": "Open",
"Open": "Open",
Expand Down Expand Up @@ -698,6 +701,8 @@
"Your project is created": "Your project is created",
"My Subscriptions": "My Subscriptions",
"Recent Components": "Recent Components",
"Recent Releases": "Recent Releases"
"Recent Releases": "Recent Releases",
"NotOwnComponent": "You do not own any components.",
"NoTasksAssigned": "There are no tasks assigned to you."
}
}
7 changes: 6 additions & 1 deletion messages/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,11 @@
"There are some errors while creating project": "NOT TRANSLATED",
"My Subscriptions": "私の定期購読",
"Recent Components": "最近のコンポーネント",
"Recent Releases": "最近のリリース"
"Recent Releases": "最近のリリース",
"NoModerationRequests": "オープンなモデレーションリクエストはありません。",
"NoProjectsFound": "選択したプロジェクトは見つかりませんでした。",
"No subscriptions available": "利用できるサブスクリプションはありません。",
"NotOwnComponent": "あなたはコンポーネントを所有していません。",
"NoTasksAssigned": "あなたに割り当てられたタスクはありません。"
}
}
7 changes: 6 additions & 1 deletion messages/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,11 @@
"Your project is created": "Seu projeto foi criado",
"My Subscriptions": "Minhas assinaturas",
"Recent Components": "Componentes recentes",
"Recent Releases": "Lançamentos recentes"
"Recent Releases": "Lançamentos recentes",
"NoModerationRequests": "Você não tem nenhuma solicitação de moderação aberta.",
"NoProjectsFound": "Não foram encontrados projetos com sua seleção.",
"No subscriptions available": "Nenhuma assinatura disponível.",
"NotOwnComponent": "Você não possui nenhum componente.",
"NoTasksAssigned": "Não há tarefas atribuídas a você."
}
}
7 changes: 6 additions & 1 deletion messages/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,11 @@
"There are some errors while creating project": "NOT TRANSLATED",
"My Subscriptions": "Đăng ký của tôi",
"Recent Components": "Các thành phần gần đây",
"Recent Releases": "Các bản phát hành gần đây"
"Recent Releases": "Các bản phát hành gần đây",
"NoModerationRequests": "Bạn không có bất kỳ yêu cầu kiểm duyệt mở nào.",
"NoProjectsFound": "Không có dự án nào được tìm thấy với lựa chọn của bạn.",
"No subscriptions available": "Không có đăng ký có sẵn.",
"NotOwnComponent": "Bạn không sở hữu bất kỳ thành phần nào.",
"NoTasksAssigned": "Không có nhiệm vụ nào được giao cho bạn."
}
}
7 changes: 6 additions & 1 deletion messages/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,11 @@
"There are some errors while creating project": "NOT TRANSLATED",
"My Subscriptions": "我的订阅",
"Recent Components": "最近的组件",
"Recent Releases": "最近发布"
"Recent Releases": "最近发布",
"NoModerationRequests": "您没有任何开放的审核请求。",
"NoProjectsFound": "没有找到您选择的项目。",
"No subscriptions available": "没有可用的订阅。",
"NotOwnComponent": "您不拥有任何组件。",
"NoTasksAssigned": "没有任务分配给您。"
}
}
26 changes: 10 additions & 16 deletions src/app/[locale]/projects/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ import { Dropdown } from 'react-bootstrap'

import { AdvancedSearch, PageButtonHeader, Table } from '@/components/sw360'

interface ProjectType {
name: string
description: string
projectResponsible: string
state: string
}
// interface ProjectType {
// name: string
// description: string
// projectResponsible: string
// state: string
// }

function Project() {
const [data, setData] = useState([])
const [projectData, setProjectData] = useState([])
const t = useTranslations('default')

const pagination = { limit: 10 }
Expand Down Expand Up @@ -143,8 +143,7 @@ function Project() {
}

useEffect(() => {
const testData: ProjectType = null
setData([testData])
setProjectData([])
}, [])

return (
Expand All @@ -156,7 +155,7 @@ function Project() {

<div className='col'>
<div className='row'>
<PageButtonHeader title={`${t('Projects')} (${data.length})`} buttons={headerbuttons}>
<PageButtonHeader title={`${t('Projects')} (${projectData.length})`} buttons={headerbuttons}>
<div style={{ marginLeft: '5px' }} className='btn-group' role='group'>
<Dropdown>
<Dropdown.Toggle variant='secondary' id='project-export'>
Expand All @@ -169,12 +168,7 @@ function Project() {
</Dropdown>
</div>
</PageButtonHeader>
<Table
columns={columns}
data={data.map((data) => [data.name, data.description, data.projectResponsible])}
pagination={pagination}
selector={true}
/>
<Table columns={columns} data={projectData} pagination={pagination} selector={true} />
</div>
</div>
</div>
Expand Down

0 comments on commit 493793f

Please sign in to comment.