Fakultas Ilmu Komputer UI

Commit 143beff8 authored by Zamil Majdy's avatar Zamil Majdy
Browse files

[#140657435] [#40] [Refactor] Add flexbox on login page

parent 170c246a
......@@ -75,8 +75,8 @@ padding-right:15%;
}
.formLogin{
margin: 30px auto 0;
width: 430px;
/*margin: auto;*/
/*width: 430px;*/
}
.registerModal{
......
......@@ -28,15 +28,15 @@ export default class Login extends React.Component {
</Header>
</div>
<Grid stackable columns={2} relaxed>
<Grid.Column>
<Grid stackable={true} columns={2} padded style={{ display: 'flex', justifyContent: 'center' }}>
<Grid.Column width="seven">
<Segment basic>
<LoginForm type="sso-ui" header="SSO Login" imgSrc="UI.png" imgSize="tiny" />
{this.props.children}
</Segment>
</Grid.Column>
<Grid.Column>
<Grid.Column width="seven">
<Segment basic>
<LoginForm type="company" header="Company Login" imgSrc="logo.png" imgSize="small" />
{this.props.children}
......
......@@ -16,7 +16,7 @@ export default class CompanyList extends React.Component {
/* istanbul ignore next */
this.state = { companies: [], loading: true };
Server.get(this.props.url, false).then((data) => {
this.setState({ companies: data, loading: false });
this.setState({ companies: data.results, loading: false });
});
this.generateCompanies = this.generateCompanies.bind(this);
......
......@@ -15,7 +15,7 @@ def is_admin_or_company(user):
if user.is_superuser or user.is_staff:
return True
if not hasattr(user, "company") or user.company != Company.VERIFIED :
if not hasattr(user, "company") or user.company.status != Company.VERIFIED:
raise PermissionDenied("This account is not valid company account or has not been verified")
return True
......
......@@ -5,6 +5,7 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Yuk Cari Tempat Kape :)</title>
<link rel="stylesheet" href="{% static 'css/custom.css' %}"/>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.css"/>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment