Skip to content

Commit

Permalink
fixed github connection display error and now you can click on assets…
Browse files Browse the repository at this point in the history
… in the calendar
  • Loading branch information
alesanchezr committed Apr 12, 2023
1 parent 34442b4 commit dceedb2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/app/views/admissions/student-form/StudentDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
} from '@material-ui/core';
import { Formik } from 'formik';
import PropTypes from 'prop-types';
import HelpIcon from '../../../components/HelpIcon';
import bc from '../../../services/breathecode';

const propTypes = {
Expand Down Expand Up @@ -139,10 +140,12 @@ const StudentDetails = ({
<TableCell className="pl-4">Github</TableCell>
<TableCell>
<div>{user?.user.github?.username}</div>
{user?.user.github === undefined ? (
<small className="px-1 py-2px bg-light-error text-red border-radius-4">
GITHUB UNVERIFIED
</small>
{user?.user.github === undefined || !user?.user.github ? (<>
<small className="px-1 py-2px bg-light-error text-red border-radius-4">
GITHUB UNVERIFIED
</small>
<HelpIcon message={`Ask student to connect github or share the github reset link from the additional accions`} />
</>
) : (
<small className="px-1 py-2px bg-light-green text-green border-radius-4">
GITHUB VERIFIED
Expand Down
3 changes: 3 additions & 0 deletions src/app/views/media/media_calendar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import CalendarHeader from "./components/CalendarHeader";
import * as ReactDOM from "react-dom";
import { Breadcrumb } from "matx";
import dayjs from 'dayjs';
import { useHistory } from 'react-router-dom';
import bc from 'app/services/breathecode';
// import EventEditorDialog from "./EventEditorDialog";
import { makeStyles } from "@material-ui/core/styles";
Expand Down Expand Up @@ -56,6 +57,7 @@ const getRanges = (_date=undefined) => {

const MatxCalendar = () => {
const [events, setEvents] = useState([]);
const history = useHistory();
const [dateRange, setDateRange] = useState(getRanges());

const headerComponentRef = useRef(null);
Expand Down Expand Up @@ -100,6 +102,7 @@ const MatxCalendar = () => {
events={events}
resizable
localizer={localizer}
onSelectEvent={asset => history.push(`/media/asset/${asset.slug}`)}
onNavigate={(startingFrom) => setDateRange(getRanges(startingFrom))}
defaultView={Views.MONTH}
startAccessor="start"
Expand Down

1 comment on commit dceedb2

@vercel
Copy link

@vercel vercel bot commented on dceedb2 Apr 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.