Fakultas Ilmu Komputer UI

Commit b42b23f6 authored by Swastinika Naima Moertadho's avatar Swastinika Naima Moertadho
Browse files

Fixed conflicts with master branch

parents 6de490f9 da903270
Pipeline #23046 failed with stages
in 5 minutes and 16 seconds
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -301,6 +301,7 @@ dmypy.json
.pyre/
### VisualStudioCode ###
.vscode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
......@@ -319,3 +320,8 @@ webpack-stats.json
assets/bundles/*
test/*
.tmp/
# package-lock.json
package-lock.json
# MacOS related files
.DS_Store
---
image: python:2-jessie
image: python:2-stretch
stages:
- build
- test
- deploy
test:
test-frontend:
image: amio/node-chrome:latest
stage: test
script:
- npm install
- npm run build-production
- npm run karma
artifacts:
paths:
- test/
test-backend:
services:
- postgres:9.6-alpine
variables:
......@@ -15,18 +26,10 @@ test:
POSTGRES_PASSWORD: kape
stage: test
script:
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
- apt-get update && apt-get install -y google-chrome-stable libappindicator1 libindicator7 libpq-dev libxss1 python-dev python-pip sudo
- export CHROME_BIN=/usr/bin/google-chrome
- curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
- apt-get install -y build-essential nodejs
- npm install
- npm run build-production
- pip install -r requirements.txt
- python manage.py makemigrations
- python manage.py migrate
- python manage.py test
- npm run karma
artifacts:
paths:
- test/
......@@ -44,14 +47,15 @@ SonarScanner Analysis:
pages:
stage: deploy
dependencies:
- test
- test-backend
- test-frontend
script:
- mv test/ public/
artifacts:
paths:
- public
expire_in: 30 days
staging:
type: deploy
script:
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
FROM node:4 AS frontend-builder
FROM node:8 AS frontend-builder
WORKDIR /home/kape/app
COPY . .
......@@ -7,7 +7,7 @@ RUN npm config set proxy ${NPM_PROXY} \
&& npm install \
&& npm run build-production
FROM python:2-jessie AS app
FROM python:2-stretch AS app
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
......@@ -65,20 +65,20 @@ ARG IMAGE_VENDOR="Faculty of Computer Science Universitas Indonesia"
ARG IMAGE_TITLE="Kape"
ARG IMAGE_DESCRIPTION="Fork of https://gitlab.com/PPL2017csui/PPLA1"
LABEL org.opencontainers.image.created=${IMAGE_CREATED} \
org.opencontainers.image.authors=${IMAGE_AUTHORS} \
org.opencontainers.image.source=${IMAGE_SOURCE} \
org.opencontainers.image.version=${IMAGE_VERSION} \
org.opencontainers.image.revision=${IMAGE_REVISION} \
org.opencontainers.image.vendor=${IMAGE_VENDOR} \
org.opencontainers.image.licenses="ISC" \
org.opencontainers.image.title=${IMAGE_TITLE} \
org.opencontainers.image.description=${IMAGE_DESCRIPTION}
org.opencontainers.image.authors=${IMAGE_AUTHORS} \
org.opencontainers.image.source=${IMAGE_SOURCE} \
org.opencontainers.image.version=${IMAGE_VERSION} \
org.opencontainers.image.revision=${IMAGE_REVISION} \
org.opencontainers.image.vendor=${IMAGE_VENDOR} \
org.opencontainers.image.licenses="ISC" \
org.opencontainers.image.title=${IMAGE_TITLE} \
org.opencontainers.image.description=${IMAGE_DESCRIPTION}
## Note to editors: The following label assignments are to ensure backward
## compatibility with Label Schema standard
LABEL org.label-schema.build-date=${IMAGE_CREATED} \
org.label-schema.vcs-url=${IMAGE_SOURCE} \
org.label-schema.version=${IMAGE_VERSION} \
org.label-schema.vendor=${IMAGE_VENDOR} \
org.label-schema.title=${IMAGE_TITLE} \
org.label-schema.description=${IMAGE_DESCRIPTION}
\ No newline at end of file
org.label-schema.vcs-url=${IMAGE_SOURCE} \
org.label-schema.version=${IMAGE_VERSION} \
org.label-schema.vendor=${IMAGE_VENDOR} \
org.label-schema.title=${IMAGE_TITLE} \
org.label-schema.description=${IMAGE_DESCRIPTION}
\ No newline at end of file
File mode changed from 100644 to 100755
......@@ -19,20 +19,21 @@
## Install
This project uses Python 2 and Node.js v4 for building the backend and frontend,
This project uses Python 2 and Node.js v8 for building the backend and frontend,
respectively. The backend uses Django Framework and PostgreSQL database, while
the frontend is developed using React. You need to install the required
dependencies prior to building and contributing to the project.
- [Node.js v4.9.1](https://nodejs.org/en/download/releases/) and `npm` package
- [Node.js v10.16.0](https://nodejs.org/en/download/releases/) and `npm` package
manager.
> Note: We recommend `nvm` (Node Version Manager) for installing Node.js. You
> can find `nvm` for your OS at the following links:
>
> - [nvm for macOS or GNU/Linux-based OS](https://github.com/creationix/nvm)
> - [nvm for Windows](https://github.com/coreybutler/nvm-windows)
>
> Once `nvm` has been installed, install Node.js and activate it by executing
> `nvm install 4.9.1` followed by `nvm activate 4.9.1`.
> `nvm install 10.16.0` followed by `nvm activate 10.16.0`.
- [Python 2.7.16](https://www.python.org/downloads/release/) and `pip` package
manager.
> Note: We recommend using _virtual environment_ to isolate project-specific
......@@ -59,7 +60,7 @@ $ source env/bin/activate
$ python --version # or: python2 --version
Python 2.7.16
$ node --version
v4.9.1
v10.16.0
```
Now install the packages required by Node.js and Python 2:
......@@ -114,7 +115,7 @@ npm run webpack
# If you want the uglified, zipped, production-ready version, run: npm run build-production
```
You can see the app running by going to `localhost:8080` via your favourite
You can see the app running by going to `localhost:8000` via your favourite
Web browser.
## Running Development Mode (Containerised)
......@@ -130,6 +131,7 @@ docker-compose run --rm app python manage.py loaddata seeder.json
```
> Explanation:
>
> 1. Rebuild the application (the frontend + backend), then start it along with
> the database (`postgres`) and Web server (`nginx`).
> 1. Perform database migration
......
File mode changed from 100644 to 100755
.center{
.center {
text-align: center;
}
......@@ -13,9 +13,9 @@ img {
-moz-box-sizing: border-box;
}
.ui.inverted.segment.header{
background-color: #EEEEEE;
color:black;
.ui.inverted.segment.header {
background-color: #eeeeee;
color: black;
}
.item-list {
......@@ -23,17 +23,17 @@ img {
width: 100%;
}
.ui.card.register{
background-color: #EEEEEE;
.ui.card.register {
background-color: #eeeeee;
}
.create-lowongan{
padding-bottom: 7%;
padding-left:15%;
padding-right:15%;
.create-lowongan {
padding-bottom: 7%;
padding-left: 15%;
padding-right: 15%;
}
.ui.segment.form-segment{
.ui.segment.form-segment {
padding-bottom: 50px;
}
......@@ -65,9 +65,8 @@ background-color: #EEEEEE;
padding: 25px;
}
.halamanLogin{
background-size: cover;
background: url("../img/background.png")no-repeat center center fixed;
.halamanLogin {
background: url("../img/background.png") no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
......@@ -75,64 +74,58 @@ background-color: #EEEEEE;
padding-bottom: 80px;
}
.headerLoginform{
.headerLoginform {
background-color: #2e6da4;
}
.formLogin{
/*margin: auto;*/
/*width: 430px;*/
}
.registerModal{
.registerModal {
margin: 0 auto;
}
.bookmark{
.bookmark {
float: right;
}
.formLogin img{
height: 70px !important;
margin:5px;
.formLogin img {
height: 70px !important;
margin: 5px;
}
.formLogin span{
font-size: 32px;
.formLogin span {
font-size: 32px;
}
.formLogin span{
.formLogin span {
margin-left: 5px;
}
.LoginPage{
.LoginPage {
height: 700px;
}
.input{
.input {
margin-top: 5px;
}
.daftar{
.daftar {
float: right;
margin-top:10px;
margin-top: 10px;
}
.registerForm{
.registerForm {
margin: 0 auto;
/*padding:50px;*/
background-color: #3B8686;
background-color: #3b8686;
}
h3{
color:black;
h3 {
color: black;
}
h4{
h4 {
color: black;
}
h5{
h5 {
color: black;
}
......@@ -155,43 +148,43 @@ input.active:invalid {
margin-top: 5px;
}
card .formRegis{
card .formRegis {
margin-top: 100px;
}
.itemLowongan{
.itemLowongan {
color: black;
}
.ui.pointing.secondary.menu{
.ui.pointing.secondary.menu {
background-color: #ffffff;
margin-bottom: 10px;
margin-top: 0px;
}
.extra.extra-company h3{
padding-top:10px;
.extra.extra-company h3 {
padding-top: 10px;
}
.extra.extra-company h2{
.extra.extra-company h2 {
color: black;
}
.biodata h5{
.biodata h5 {
line-height: 30%;
}
.biodataCompany h4{
.biodataCompany h4 {
color: grey;
}
.buttonProfile{
margin-top:30px;
.buttonProfile {
margin-top: 30px;
}
.ui.segment.profile-form{
.ui.segment.profile-form {
padding-bottom: 37px;
margin-top:4%;
margin-top: 4%;
}
.profilePage {
......@@ -200,93 +193,119 @@ card .formRegis{
margin-right: 5%;
}
#react-app{
position: relative; /* needed for footer positioning*/
/*height: 100% !important; !* real browsers *!*/
min-height: 100%; /* real browsers */
background-color: #EEEEEE;
#react-app {
position: relative; /* needed for footer positioning*/
/*height: 100% !important; !* real browsers *!*/
min-height: 100%; /* real browsers */
background-color: #eeeeee;
}
.content{
.content {
padding-bottom: 5%;
}
.mainContent{
padding-bottom: 40px;
.mainContent {
padding-bottom: 40px;
}
.footer{
background-color: #031634;
position: absolute;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 30px;
padding: 6px;
.footer {
background-color: #031634;
position: absolute;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 30px;
padding: 6px;
}
.footer h5{
color:white;
.footer h5 {
color: white;
}
.profilePage{
margin-left:5%;
margin-right:5%;
.profilePage {
margin-left: 5%;
margin-right: 5%;
margin-bottom: auto;
}
.ui.segment.segmentProfileCompany{
.ui.segment.segmentProfileCompany {
margin-left: 10%;
margin-right: 10%;
padding: 5%;
}
.ui.segment.profileFormCompany{
margin-top:4%;
.ui.segment.profileFormCompany {
margin-top: 4%;
margin-left: 10%;
margin-right: 10%;
padding-bottom:3%;
padding-bottom: 3%;
}
.companyProfile{
padding-bottom:5%;
.companyProfile {
padding-bottom: 5%;
}
.ui.segment.vacancyListCompany{
.ui.segment.vacancyListCompany {
margin-left: 10%;
margin-right: 10%;
}
.ui.segment.paginationCompany{
.ui.segment.paginationCompany {
margin: 2% 7%;
}
.admin-bar{
.admin-bar {
margin: 0;
padding: 10px;
width: 100%;
text-align: right;
background-color: #304D8A;
background-color: #304d8a;
color: white;
}
.dropdownApplicant{
margin-left:7%;
margin-top:2%;
.dropdownApplicant {
margin-left: 7%;
margin-top: 2%;
margin-bottom: 0;
}
.administrationButtons {
margin-left:7%;
margin-top:2%;
margin-left: 7%;
margin-top: 2%;
margin-bottom: 2%;
}
.ui.segment.transkrip{
margin-left:7%;
margin-right:7%;
.ui.segment.transkrip {
margin-left: 7%;
margin-right: 7%;
}
.ui.segment.kop {
line-height: 5px;
}
\ No newline at end of file
}
.jumlahLamaran {
font-weight: bold;
}
.search-container {
width: fit-content;
margin: auto;
}
.search-form {
border: none;
border-bottom: solid #0d5aa7 2px;
text-decoration: none;
outline: none;
font-size: 14pt;
}
.search-button {
background-color: #0d5aa7;
color: white;
border: none;
padding: 10px;
font-size: 14pt;
border-radius: 5px;
margin-left: 10px;
}
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -7,7 +7,6 @@ import Pagination from './components/Pagination';
import Server from './lib/Server';
export default class ApplicantPage extends React.Component {
static propTypes = {
user: React.PropTypes.object.isRequired,
};
......@@ -29,33 +28,39 @@ export default class ApplicantPage extends React.Component {
this.getVacancyList();
}
getVacancyList= () => Server.get(`/companies/${this.props.user.data.company.id}/vacancies/`, false).then((data) => {
const results = data.results;
const names = ['Semua Lowongan'];
const urls = [{
key: 0,
value: `/companies/${this.props.user.data.company.id}/applications/`,
text: 'Semua Lowongan',
}];
results.map((vacancy) => {
names.push(vacancy.name);
const url = `/companies/${this.props.user.data.company.id}/applications/${vacancy.id}/by_vacancy/`;
const info = {
key: vacancy.id,
value: url,
text: vacancy.name,
};
urls.push(info);
return urls;
});
this.setState({ urls });
}, error => error.then((r) => {
this.modalAlert.open('Gagal mendapatkan daftar lowongan', r.detail);
}));
getVacancyList = () =>
Server.get(`/companies/${this.props.user.data.company.id}/vacancies/`, false).then(
(data) => {
const results = data.results;
const names = ['Semua Lowongan'];
const urls = [
{
key: 0,
value: `/companies/${this.props.user.data.company.id}/applications/`,
text: 'Semua Lowongan',
},
];
results.map((vacancy) => {
names.push(vacancy.name);
const url = `/companies/${this.props.user.data.company.id}/applications/${vacancy.id}/by_vacancy/`;
const info = {
key: vacancy.id,
value: url,
text: vacancy.name,
};
urls.push(info);
return urls;
});
this.setState({ urls });
},
error =>
error.then((r) => {
this.modalAlert.open('Gagal mendapatkan daftar lowongan', r.detail);
}),
);
handleChange = (e, data) => {
this.setState({ selected: data.value, refresh: this.state.refresh + 5 });
this.setState({ selected: data.value, refresh: this.state.refresh + 6 });
};
render() {
......@@ -63,9 +68,23 @@ export default class ApplicantPage extends React.Component {
return (
<div>
<div className="dropdownApplicant">
<Dropdown placeholder="Semua Lowongan" search selection options={this.state.urls} onChange={this.handleChange} />
<Dropdown
placeholder="Semua Lowongan"