This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from openedx/abdullah/paragon-status-alert-dep…
…recation Paragon StatusAlert deprecation
- Loading branch information
Showing
7 changed files
with
168 additions
and
420 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ import { | |
Collapsible, | ||
Pagination, | ||
SearchField, | ||
StatusAlert, | ||
Alert, | ||
} from '@edx/paragon'; | ||
|
||
import { | ||
|
@@ -113,32 +113,31 @@ export class ConsolePage extends React.Component { | |
return ( | ||
<div className="container half-width-element py-5 align-items-start"> | ||
<h1>Program Console</h1> | ||
<StatusAlert | ||
alertType="danger" | ||
<Alert | ||
variant="danger" | ||
dismissible={false} | ||
dialog={( | ||
<div> | ||
<p> | ||
An error was encountered while loading your program list: <em>{`${this.props.loadingError}`}</em> | ||
</p> | ||
<p> | ||
Please try waiting a moment and then refreshing the page. | ||
If the issue persists, please reach out to <a href="mailto:[email protected]">[email protected]</a>. | ||
</p> | ||
</div> | ||
)} | ||
open={!!this.props.loadingError} | ||
/> | ||
<StatusAlert | ||
dismissible={false} | ||
dialog={( | ||
show={!!this.props.loadingError} | ||
> | ||
<div> | ||
<p> | ||
An error was encountered while loading your program list: <em>{`${this.props.loadingError}`}</em> | ||
</p> | ||
<p> | ||
It appears you do not have proper permissions to access this application. | ||
Please reach out to <a href="mailto:[email protected]">[email protected]</a> requesting access to the Registrar service. | ||
Please try waiting a moment and then refreshing the page. | ||
If the issue persists, please reach out to <a href="mailto:[email protected]">[email protected]</a>. | ||
</p> | ||
)} | ||
open={!this.props.authorized && !this.props.loadingError} | ||
/> | ||
</div> | ||
</Alert> | ||
<Alert | ||
dismissible={false} | ||
show={!this.props.authorized && !this.props.loadingError} | ||
variant="warning" | ||
> | ||
<p> | ||
It appears you do not have proper permissions to access this application. | ||
Please reach out to <a href="mailto:[email protected]">[email protected]</a> requesting access to the Registrar service. | ||
</p> | ||
</Alert> | ||
{this.props.data.length > 0 && ( | ||
<div> | ||
<SearchField | ||
|
@@ -147,14 +146,15 @@ export class ConsolePage extends React.Component { | |
onClear={() => this.handleFilter('')} | ||
placeholder="Filter by Program Title" | ||
/> | ||
<StatusAlert | ||
<Alert | ||
className="mt-2" | ||
alertType="danger" | ||
variant="danger" | ||
dismissible | ||
dialog="Invalid program title." | ||
open={!!this.props.filterError} | ||
show={!!this.props.filterError} | ||
data-testid="filter-alert" | ||
/> | ||
> | ||
<p>Invalid program title.</p> | ||
</Alert> | ||
<Pagination | ||
className="mt-4" | ||
paginationLabel="pagination navigation" | ||
|
@@ -168,19 +168,18 @@ export class ConsolePage extends React.Component { | |
{this.props.programBanners[program.programKey] | ||
&& !!this.props.programBanners[program.programKey].length | ||
&& this.props.programBanners[program.programKey].map(banner => ( | ||
<StatusAlert | ||
<Alert | ||
dismissible | ||
open | ||
show | ||
key={banner.id} | ||
alertType={banner.bannerType} | ||
variant={banner.bannerType} | ||
onClose={() => this.props.removeBanner(program.programKey, banner.id)} | ||
dialog={( | ||
<div className="modal-alert"> | ||
{`${banner.message} `} | ||
{banner.linkMessage && <a href={banner.linkHref} target="_blank" rel="noopener noreferrer">{banner.linkMessage}</a>} | ||
</div> | ||
)} | ||
/> | ||
> | ||
<div className="modal-alert"> | ||
{`${banner.message} `} | ||
{banner.linkMessage && <a href={banner.linkHref} target="_blank" rel="noopener noreferrer">{banner.linkMessage}</a>} | ||
</div> | ||
</Alert> | ||
))} | ||
{program.areEnrollmentsWritable && this.renderEnrollmentsCollapsible(program)} | ||
{program.areReportsReadable | ||
|
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
Oops, something went wrong.