Fakultas Ilmu Komputer UI

Commit 8d51f7cb authored by Satryaji Aulia's avatar Satryaji Aulia
Browse files

Merge branch 'master' into 1606885864-239

parents 29f6df30 22a40b01
Pipeline #26883 passed with stages
in 6 minutes and 30 seconds
File deleted
......@@ -71,7 +71,20 @@ img {
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
padding-bottom: 80px;
min-height: 100vh;
display: flex;
flex-flow: column;
}
.register-card {
width: calc(100% - 2rem) !important;
margin: 1rem !important;
padding: 1rem !important;
}
.auth-page-content {
flex-grow: 1;
padding-bottom: 30px;
}
.headerLoginform {
......
import React from 'react';
import { Item } from 'semantic-ui-react';
import Tabs from './components/Tabs';
import Pane from './components/Pane';
import AdminVacancy from './components/AdminVacancy';
const AdminVacancyPage = () => (
<Tabs selected={0}>
<Pane label="Lowongan Belum Terferivikasi">
<Item.Group>
<AdminVacancy />
</Item.Group>
</Pane>
<Pane label=" Semua Lamaran" />
</Tabs>
);
export default AdminVacancyPage;
import React from 'react';
import PropTypes from 'prop-types';
import CompanyRegisterModal from './components/CompanyRegisterModal';
import Footer from './components/Footer';
import {
Grid, Header, Image
} from 'semantic-ui-react';
const CompanyRegisterPage = () => {
return (
<div class="halamanLogin">
<div class="auth-page-content">
<div class="headerLogin">
<Header as="h2" icon textAlign="center">
<Image src="/assets/img/logo.png" size="medium" centered />
<Header.Content>Kanal Akses Pendaftaran KP Elektronik</Header.Content>
</Header>
</div>
<Grid
stackable
columns={2}
padded
style={{ display: 'flex', justifyContent: 'center' }}
>
<Grid.Column width="seven" style={{
backgroundColor: 'white', border: '1px solid #aeaeae',
borderRadius: '6px'
}}>
<CompanyRegisterModal />
</Grid.Column>
</Grid>
</div>
<Footer />
</div>
);
};
CompanyRegisterPage.propTypes = {
children: PropTypes.node,
};
CompanyRegisterPage.defaultProps = {
children: null,
};
export default CompanyRegisterPage;
......@@ -32,6 +32,8 @@ export default class EditProfile extends ProfileHandler {
phone_number: '',
portfolio_link: '',
show_transcript: '',
expected_salary: '',
self_description: '',
intro: '',
skills: '',
form: {
......@@ -100,11 +102,13 @@ export default class EditProfile extends ProfileHandler {
id: data.id,
name: data.full_name,
email: data.user.email,
self_description: data.self_description,
region: data.region,
alamat: data.alamat,
phone_number: data.phone_number,
portfolio_link: data.portfolio_link,
show_transcript: data.show_transcript,
expected_salary: data.expected_salary,
refresh: this.state.refresh + 1,
intro: data.intro,
linkedin_url: data.linkedin_url,
......@@ -124,6 +128,7 @@ export default class EditProfile extends ProfileHandler {
seminar: data.seminar,
interests: data.interests,
related_course: data.related_course,
volunteer: data.volunteer,
ielts: data.ielts,
});
if (this.props.route.own) {
......@@ -165,34 +170,245 @@ export default class EditProfile extends ProfileHandler {
if (show) {
return (
<div className="editProfile">
<Segment className="profile-form">
<Header as="h3" textAlign="center">
<Icon name="edit" />
<Header.Content>Edit Profile Page</Header.Content>
</Header>
<ModalAlert
ref={(modal) => {
this.modalAlert = modal;
}}
/>
<Form
ref={(input) => {
this.form = input;
}}
key={this.state.refresh}
size="small"
>
<Form.Field>
<label htmlFor="photo">Profile Picture</label>
<input
onChange={this.handleFile}
placeholder="Profile Photo.jpg"
name="photo"
type="File"
/>
</Form.Field>
<Form.Field>
<label htmlFor="email">Email</label>
<Segment className="profile-form">
<Header as="h3" textAlign="center">
<Icon name="edit" />
<Header.Content>Edit Profile Page</Header.Content>
</Header>
<ModalAlert
ref={(modal) => {
this.modalAlert = modal;
}}
/>
<Form
ref={(input) => {
this.form = input;
}}
key={this.state.refresh}
size="small"
>
<Form.Field>
<label htmlFor="photo">Profile Picture</label>
<input
onChange={this.handleFile}
placeholder="Profile Photo.jpg"
name="photo"
type="File"
/>
</Form.Field>
<Form.Field>
<label htmlFor="email">Email</label>
<input
onChange={this.handleChange}
placeholder={
this.state.email === null
? 'jojon@email.com'
: this.state.email
}
defaultValue={
this.state.email === null ? null : this.state.email
}
name="email"
/>
</Form.Field>
<Form.Field>
<label htmlFor="phone_number">No. Hp</label>
<input
onChange={this.handleChange}
placeholder={
this.state.phone_number === null
? '08123456789'
: this.state.phone_number
}
defaultValue={
this.state.phone_number === null
? null
: this.state.phone_number
}
name="phone_number"
/>
</Form.Field>
<Form.Field>
<label htmlFor="gender">Jenis Kelamin</label>
<Form.Radio
label="Perempuan"
name="gender"
value="Perempuan"
onClick={this.handleRadioGender}
/>
<Form.Radio
label="Laki-laki"
name="gender"
value="Laki-laki"
onClick={this.handleRadioGender}
/>
</Form.Field>
<Form.Field>
<label htmlFor="self_description">Deskripsi Diri</label>
<input
onChange={this.handleChange}
placeholder="Saya suka belajar"
defaultValue= {
this.state.self_description === null ? null : this.state.self_description
}
name="self_description"
/>
</Form.Field>
<Form.Field>
<label htmlFor="region">Region</label>
<input
onChange={this.handleChange}
placeholder={
this.state.region === null ? 'Indonesia' : this.state.region
}
defaultValue={
this.state.region === null ? null : this.state.region
}
name="region"
/>
</Form.Field>
<Form.Field>
<label htmlFor="alamat">Alamat</label>
<input
onChange={this.handleChange}
placeholder={
this.state.alamat === null
? 'JL. Satya Raya No.41'
: this.state.alamat
}
defaultValue={
this.state.alamat === null ? null : this.state.alamat
}
name="alamat"
/>
</Form.Field>
<Form.Field>
<label htmlFor="skills">Skills</label>
<input
onChange={this.handleChange}
placeholder="Isi sesuai dengan keahlian anda"
defaultValue={this.state.skills === null ? null : this.state.skills}
name="skills"
/>
</Form.Field>
<Form.Field>
<label htmlFor="languages">Bahasa yang dikuasai</label>
<input
onChange={this.handleChange}
placeholder="Indonesia, Jerman (pisahkan dengan koma)"
defaultValue={
this.state.languages === null ? null : this.state.languages
}
name="languages"
/>
</Form.Field>
<Form.Field>
<label htmlFor="interests">Interests</label>
<input
onChange={this.handleChange}
placeholder={this.state.interests === null ? 'Machine Learning' : this.state.interests}
defaultValue={this.state.interests === null ? null : this.state.interests}
name="interests"
/>
</Form.Field>
<Form.Field>
<label htmlFor="related_course">Related Coursework Taken</label>
<input
onChange={this.handleChange}
placeholder={
this.state.related_course === null
? 'Intraction System, Machine Learning'
: this.state.related_course
}
defaultValue={
this.state.related_course === null ? null : this.state.related_course
}
name="related_course"
/>
</Form.Field>
<Form.Field>
<label htmlFor="resume">Resume</label>
<input
onChange={this.handleFile}
placeholder="Resume"
name="resume"
type="File"
/>
</Form.Field>
<Form.Field>
<label htmlFor="expected_salary">Expected Salary</label>
<input
onChange={this.handleChange}
placeholder="2000000"
defaultValue = {
this.state.expected_salary === null ? null : this.state.expected_salary
}
name="expected_salary"
/>
</Form.Field>
<Form.Field>
<label htmlFor="intro">Intro</label>
<input
onChange={this.handleChange}
placeholder={
this.state.intro === null
? 'Ceritakan dirimu secara singkat'
: this.state.intro
}
defaultValue={
this.state.intro === null ? null : this.state.intro
}
name="intro"
/>
</Form.Field>
<Form.Field>
<label htmlFor="intro">Status Pencarian Kerja</label>
<Form.Radio
label="Aktif"
name="job_seeking_status"
value="Active"
onClick={this.handleRadio}
/>
<Form.Radio
label="Pasif"
name="job_seeking_status"
value="Passive"
onClick={this.handleRadio}
/>
</Form.Field>
<Form.Field>
<Checkbox
onChange={this.handleCheckbox}
checked={!!this.state.show_transcript}
label="Ijinkan perusahaan tempat saya mendaftar untuk melihat transkrip akademik saya"
name="show_transcript"
/>
</Form.Field>
<Form.Field>
<label htmlFor="student_gpa">GPA</label>
<input
onChange={this.handleChange}
placeholder={
this.state.student_gpa === null
? '3.50'
: this.state.student_gpa
}
defaultValue={
this.state.student_gpa === null
? null
: this.state.student_gpa
}
name="student_gpa"
/>
</Form.Field>
<Form.Field>
<label htmlFor="student_toefl">TOEFL</label>
<input
onChange={this.handleChange}
placeholder={
......@@ -344,42 +560,6 @@ export default class EditProfile extends ProfileHandler {
name="student_gpa"
/>
</Form.Field>
<Form.Field>
<label htmlFor="expected_salary">Expected Salary</label>
<input onChange={this.handleChange} placeholder="2000000" name="expected_salary" />
</Form.Field>
<Form.Field>
<label htmlFor="intro">Intro</label>
<input
onChange={this.handleChange}
placeholder={
this.state.intro === null
? 'Ceritakan dirimu secara singkat'
: this.state.intro
}
defaultValue={
this.state.intro === null ? null : this.state.intro
}
name="intro"
/>
</Form.Field>
<Form.Field>
<label htmlFor="student_gpa">GPA</label>
<input
onChange={this.handleChange}
placeholder={
this.state.student_gpa === null
? '3.50'
: this.state.student_gpa
}
defaultValue={
this.state.student_gpa === null
? null
: this.state.student_gpa
}
name="student_gpa"
/>
</Form.Field>
<Form.Field>
<label htmlFor="dependants">Dependants</label>
<input
......@@ -500,6 +680,19 @@ export default class EditProfile extends ProfileHandler {
name="projects"
/>
</Form.Field>
<Form.Field>
<label htmlFor="volunteer">Volunteering Experience</label>
<input
onChange={this.handleChange}
placeholder="Ketua Organisasi A - 2020"
name="volunteer"
defaultValue={
this.state.volunteer === null ? null :this.state.volunteer
}
/>
</Form.Field>
<Form.Field>
<label htmlFor="certification">Sertifikasi</label>
<input
......
......@@ -4,7 +4,6 @@ import {
Grid, Segment, Header, Card, Image, Button,
} from 'semantic-ui-react';
import LoginForm from './components/LoginForm';
import CompanyRegisterModal from './components/CompanyRegisterModal';
import Footer from './components/Footer';
import InfoModal from './components/InfoModal';
......@@ -66,46 +65,46 @@ const Login = ({ children }) => {
return (
<div className="halamanLogin">
<div className="headerLogin">
<Header as="h2" icon textAlign="center">
<Image src="/assets/img/logo.png" size="medium" centered />
<Header.Content>Kanal Akses Pendaftaran KP Elektronik</Header.Content>
<InfoModal>KAPE INFO</InfoModal>
</Header>
</div>
<div className="auth-page-content">
<div className="headerLogin">
<Header as="h2" icon textAlign="center">
<Image src="/assets/img/logo.png" size="medium" centered />
<Header.Content>Kanal Akses Pendaftaran KP Elektronik</Header.Content>
<InfoModal>KAPE INFO</InfoModal>
</Header>
</div>
<Grid
stackable
columns={2}
padded
style={{ display: 'flex', justifyContent: 'center' }}
>
<Grid.Column width="seven">
{activeForm === 'user' ? (
<UserForm onChange={(role) => setActiveForm(role)}>
{children}
</UserForm>
) : (
<CompanyForm onChange={(role) => setActiveForm(role)}>
{children}
</CompanyForm>
)}
<div className="register">
<Card centered className="register">
<Card.Content>
<Grid columns={2} relaxed>
<Grid.Column>
<Header as="h3">New to us ?</Header>
</Grid.Column>
<Grid.Column>
<CompanyRegisterModal />
</Grid.Column>
</Grid>
</Card.Content>
<Grid
stackable
columns={2}
padded
style={{ display: 'flex', justifyContent: 'center' }}
>
<Grid.Column width="seven">
{activeForm === 'user' ? (
<UserForm onChange={(role) => setActiveForm(role)}>
{children}
</UserForm>
) : (
<CompanyForm onChange={(role) => setActiveForm(role)}>
{children}
</CompanyForm>
)}
{activeForm !== 'user' ? (
<Card className="register register-card">
<Grid columns={2} relaxed>
<Grid.Column>
<Header as="h3">New to us ?</Header>
</Grid.Column>
<Grid.Column>
<a className="ui primary button" href="/register-perusahaan">Register Your Company</a>
</Grid.Column>
</Grid>
</Card>
</div>
</Grid.Column>
</Grid>
) : ""}
</Grid.Column>
</Grid>
</div>
<Footer />
</div>
);
......
......@@ -36,7 +36,6 @@ export default class NotificationPage extends React.Component {
}
console.log('Notifikasi');
Storage.set('menu-active-state', 'Notifikasi');
}
......@@ -51,8 +50,6 @@ export default class NotificationPage extends React.Component {
onClickDismiss = (index) => {
var array = [...this.state.list];
array.splice(index, 1);
console.log("eh kepencet")
console.log(index)
this.setState({
list : array
......
import requests
from twilio.rest import Client
endpoint = "https://api.twitch.tv/helix/streams?"
headers = {"Client-ID": "gitlab.cs.ui.ac.id"}
params = {"user_login": "nurma.ayu@ui.ac.id"}
response = request.get(endpoint, params=params, headers=headers)
json_response = response.json()
streams = json_response.get('data', [])
is_active = lambda stream:stream.get('type') == 'live'
streams_active = filter(is_active, streams)
at_least_one_stream_active = any(streams_active)
if at_least_one_stream_active:
client = Client(<Your Account SID>, <Your Auth Token>)
client.messages.create(body='LIVE !!!',from_=<Your Trial Number>,to=<Your Real Number>)
\ No newline at end of file
......@@ -115,8 +115,6 @@ export default class ProfilePage extends ProfileHandler {
this.gotoStudentToeflFile = this.gotoStudentToeflFile.bind(this);
this.getProfile();
console.log('profil');
Storage.set('menu-active-state', 'Profil');
}
......
export const isFromGithubLinkValid = github_link => {
if (github_link == null) return;
return github_link.includes('https://github.com/');
return (github_link.includes('https://github.com/') || github_link.length === 0);
};
export const gotoLink = url => window.open(url).focus();