-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
218 additions
and
17 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import { Avatar, Card, Col, Row } from '@openedx/paragon'; | ||
|
||
const OrgMemberCard = ({ original }) => { | ||
const { name, email, joinedOrg, enrollments } = original; | ||
|
||
return ( | ||
<Card orientation="horizontal"> | ||
<Card.Body> | ||
<Card.Section className="pb-1"> | ||
<Row className="d-flex flex-row"> | ||
<Col xs={2}> | ||
<Avatar size="lg" /> | ||
</Col> | ||
<Col> | ||
<Row> | ||
<h3 className="pt-2">{name}</h3> | ||
</Row> | ||
<Row> | ||
<p>{email}</p> | ||
</Row> | ||
</Col> | ||
<Col> | ||
<h5 className="pt-2 text-uppercase">Joined org</h5> | ||
{joinedOrg} | ||
</Col> | ||
<Col> | ||
<h5 className="pt-2 text-uppercase">Enrollments </h5> | ||
{enrollments} | ||
</Col> | ||
</Row> | ||
</Card.Section> | ||
</Card.Body> | ||
</Card> | ||
// <Card | ||
// className="mb-4 org-member-card" | ||
// orientation="horizontal" | ||
// > | ||
// <Card.Body> | ||
// <Card.Section> | ||
|
||
|
||
|
||
// <Col> | ||
// <h3> | ||
// {name} | ||
// {/* <FormattedMessage | ||
// id="executive.education.external.course.enrollment.page.registration.summarycard.title" | ||
// defaultMessage="Registration summary:" | ||
// description="Title for the registration summary card on the executive education course enrollment page" | ||
// /> */} | ||
// </h3> | ||
// <br /> | ||
// <p className="small font-weight-light text-gray-500 font-italic"> | ||
// {/* <FormattedMessage | ||
// id="executive.education.external.course.enrollment.page.course" | ||
// defaultMessage="This course is covered by the Learner Credit provided by your organization." | ||
// description="Message about the course being covered by the Learner Credit" | ||
// /> */} | ||
// {email} | ||
// </p> | ||
// </Col> | ||
// <Col xs={12} lg={{ span: 5, offset: 2 }}> | ||
// <div className="registration-details rounded-lg border p-3"> | ||
// <Row> | ||
// <Col xs={12} lg={{ span: 6, offset: 0 }} className="small font-weight-light text-gray-500 justify-content-start"> | ||
// {/* <FormattedMessage | ||
// id="executive.education.external.course.enrollment.page.registration.total.message" | ||
// defaultMessage="Registration total:" | ||
// description="Total registration cost for the executive education course" | ||
// /> */} | ||
// {joinedOrg} | ||
// </Col> | ||
// <Col xs={12} lg={{ span: 6, offset: 0 }} className="justify-content-end"> | ||
// <div className="d-flex justify-content-end small font-weight-light text-gray-500 mr-2.5"> | ||
// {/* <FormattedMessage | ||
// id="executive.education.external.course.enrollment.page.registration.tax.included" | ||
// defaultMessage="Tax included" | ||
// description="Message about tax being included in the registration cost" | ||
// /> */} | ||
// {enrollments} | ||
// </div> | ||
// </Col> | ||
// </Row> | ||
// </div> | ||
// </Col> | ||
// </Card.Section> | ||
// </Card.Body> | ||
// </Card> | ||
); | ||
}; | ||
|
||
export default OrgMemberCard; |
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,79 @@ | ||
import { CardView, Container, DataTable, TextFilter } from "@openedx/paragon"; | ||
import { useIntl } from "@edx/frontend-platform/i18n"; | ||
|
||
import OrgMemberCard from "./OrgMemberCard"; | ||
|
||
const PeopleManagementTable = () => { | ||
const pageSize = 10; | ||
const intl = useIntl(); | ||
// const tableColumns = [ | ||
// { | ||
// Header: "Name", | ||
// accessor: "name", | ||
// }, | ||
// { | ||
// Header: "Email", | ||
// accessor: "email", | ||
// }, | ||
// { | ||
// Header: "Joined org", | ||
// accessor: "joinedOrg", | ||
// }, | ||
// { | ||
// Header: "Enrollments", | ||
// accessor: "enrollments", | ||
// }, | ||
// ]; | ||
|
||
return ( | ||
<DataTable | ||
className="pt-4 mt-4" | ||
isFilterable | ||
isSortable | ||
defaultColumnValues={{ Filter: TextFilter }} | ||
// isLoading={isFetching} | ||
isPaginated | ||
manualPagination | ||
initialState={{ | ||
pageSize, | ||
pageIndex: 0, | ||
}} | ||
// itemCount={paginatedData.itemCount} | ||
// pageCount={paginatedData.pageCount} | ||
// fetchData={fetchData} | ||
// data={paginatedData.data} | ||
data={[ | ||
{ | ||
name: "April Ludgate", | ||
email: "[email protected]", | ||
joinedOrg: "Jan 21, 2021", | ||
enrollments: 3, | ||
}, | ||
{ | ||
name: "Ben Wyatt", | ||
email: "[email protected]", | ||
joinedOrg: "Oct 31, 2022", | ||
enrollments: 1, | ||
}, | ||
]} | ||
columns={tableColumns}> | ||
<DataTable.TableControlBar /> | ||
<CardView | ||
className="d-block" | ||
CardComponent={OrgMemberCard} | ||
columnSizes={{ xs: 12 }} | ||
/> | ||
{/* <DataTable.Table /> */} | ||
{/* <DataTable.EmptyTable | ||
content={intl.formatMessage({ | ||
id: 'peopleManagement.dataTable.empty', | ||
defaultMessage: 'No results found.', | ||
description: 'Message displayed when the table has no data.', | ||
})} | ||
/> */} | ||
<DataTable.TableFooter /> | ||
</DataTable> | ||
); | ||
}; | ||
|
||
export default PeopleManagementTable; |
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
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