Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • kszk/devteam/kszkepzes/old/kszkepzes-frontend
  • kbgergely/kszkepzes-frontend
2 results
Show changes
import 'moment/locale/hu';
import "moment/locale/hu";
import {
Accordion,
......@@ -7,12 +7,12 @@ import {
Header,
Icon,
Segment,
} from 'semantic-ui-react';
import React, { Component } from 'react';
} from "semantic-ui-react";
import React, { Component } from "react";
import { connect } from 'react-redux';
import { getStudentEvents } from '../../actions/statistics';
import moment from 'moment';
import { connect } from "react-redux";
import { getStudentEvents } from "../../actions/statistics";
import moment from "moment";
class Schedule extends Component {
// eslint-disable-next-line react/state-in-constructor
......@@ -34,32 +34,34 @@ class Schedule extends Component {
const { activeIndex } = this.state;
const { events } = this.props;
const panels = events.map((event) => (
<Accordion key={Math.random()}>
<Accordion.Title
active={activeIndex === event.id}
index={event.id}
onClick={this.handleClick}
>
<h2>
<Grid>
<Grid.Column floated="left" width={5} textAlign="left">
<Icon name="calendar alternate outline" color="blue" />{' '}
{event.name}
</Grid.Column>
<Grid.Column floated="right" width={8} textAlign="right">
{moment(event.date).locale('hu').format('LLLL')}
</Grid.Column>
</Grid>
</h2>
</Accordion.Title>
<Accordion.Content active={activeIndex === event.id}>
<Segment textAlign="left" style={{ overflowWrap: 'break-word' }}>
{event.description}
</Segment>
</Accordion.Content>
</Accordion>
));
const panels = events
.sort((a, b) => a.date - b.date)
.map((event) => (
<Accordion key={Math.random()}>
<Accordion.Title
active={activeIndex === event.id}
index={event.id}
onClick={this.handleClick}
>
<h2>
<Grid>
<Grid.Column floated="left" width={5} textAlign="left">
<Icon name="calendar alternate outline" color="blue" />{" "}
{event.name}
</Grid.Column>
<Grid.Column floated="right" width={8} textAlign="right">
{moment(event.date).locale("hu").format("LLLL")}
</Grid.Column>
</Grid>
</h2>
</Accordion.Title>
<Accordion.Content active={activeIndex === event.id}>
<Segment textAlign="left" style={{ overflowWrap: "break-word" }}>
{event.description}
</Segment>
</Accordion.Content>
</Accordion>
));
return (
<div>
......@@ -68,10 +70,10 @@ class Schedule extends Component {
as="h1"
content="Képzés alkalmak"
style={{
fontSize: '2em',
fontWeight: 'bold',
marginBottom: '0.5em',
marginTop: '0.5em',
fontSize: "2em",
fontWeight: "bold",
marginBottom: "0.5em",
marginTop: "0.5em",
}}
/>
<Accordion fluid styled>
......@@ -79,12 +81,12 @@ class Schedule extends Component {
</Accordion>
<Header
as="h1"
content="Tábor"
content="Tábor: április 11-13"
style={{
fontSize: '2em',
fontWeight: 'bold',
marginBottom: '0.5em',
marginTop: '1.5em',
fontSize: "2em",
fontWeight: "bold",
marginBottom: "0.5em",
marginTop: "1.5em",
}}
/>
</Container>
......
const { createProxyMiddleware } = require('http-proxy-middleware');
const { createProxyMiddleware } = require("http-proxy-middleware");
module.exports = function (app) {
app.use(
'/api',
"/api",
createProxyMiddleware({
target: 'http://localhost:8000',
target: "http://localhost:8000",
changeOrigin: true,
})
}),
);
app.use(
'/admin',
"/admin",
createProxyMiddleware({
target: 'http://localhost:8000',
target: "http://localhost:8000",
changeOrigin: true,
})
}),
);
app.use(
'/staticfiles',
"/staticfiles",
createProxyMiddleware({
target: 'http://localhost:8000',
target: "http://localhost:8000",
changeOrigin: true,
})
}),
);
app.use(
'/mediafiles',
"/mediafiles",
createProxyMiddleware({
target: 'http://localhost:8000',
target: "http://localhost:8000",
changeOrigin: true,
})
}),
);
app.use(
"/oidc",
createProxyMiddleware({
target: "http://localhost:8000",
changeOrigin: true,
}),
);
};