Skip to content

Commit

Permalink
Merge pull request #17 from HRSpaceX/julia/fix/merge_bug_fix
Browse files Browse the repository at this point in the history
Julia/fix/merge bug fix
  • Loading branch information
yan-gabala authored Mar 17, 2024
2 parents 8a4491f + 9071825 commit e5283fd
Show file tree
Hide file tree
Showing 14 changed files with 354 additions and 156 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,3 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
.vscode/

3 changes: 3 additions & 0 deletions hrspace/api/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# from django.contrib import admin

# Register your models here.
12 changes: 6 additions & 6 deletions hrspace/api/apps.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.apps import AppConfig


class ApiConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "api"
from django.apps import AppConfig


class ApiConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "api"
3 changes: 3 additions & 0 deletions hrspace/api/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# from django.db import models

# Create your models here.
3 changes: 2 additions & 1 deletion hrspace/api/serializers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from orders.models import City, Order, Profession
from rest_framework import serializers

from orders.models import City, Order, Profession


class CitySerializer(serializers.ModelSerializer):

Expand Down
3 changes: 3 additions & 0 deletions hrspace/api/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# from django.test import TestCase

# Create your tests here.
5 changes: 2 additions & 3 deletions hrspace/api/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from django.urls import include, path
from rest_framework import routers
from django.urls import path, include

from api.views import (CityViewSet, OrderViewSet,
ProfessionViewSet)
from api.views import CityViewSet, OrderViewSet, ProfessionViewSet

router = routers.DefaultRouter()
router.register('cities', CityViewSet)
Expand Down
2 changes: 1 addition & 1 deletion hrspace/api/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from rest_framework.viewsets import ModelViewSet

from orders.models import City, Order, Profession
from api.serializers import CitySerializer, ProfessionSerializer
from orders.models import City, Order, Profession


class CityViewSet(ModelViewSet):
Expand Down
83 changes: 45 additions & 38 deletions hrspace/core/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,25 @@


class Limits(IntEnum):
BUSINESS_TRIP_LENGTH = 50
DESIGNATION = 200
EDUCATION_LENGTH = 50
LINE_OF_BUSINESS = 200
MAX_LEN_EMAIL_FIELD = 256
MAX_LEN_USERS_CHARFIELD = 150
DESIGNATION = 200
MIN_SАLARY = 17000
MAX_SALARY = 999999
NAME_MAX_LEN: int = 100

MIN_AMOUNT_EMPLOYEES = 1
MIN_SАLARY = 17000
NAME_MAX_LEN = 100
PAYMENT_LENGTH = 50
PORTFOLIO_LENGTH = 50
WORK_EXPERIENCE_LENGTH = 100
WORK_FORMAT_LENGTH = 200

BENEFITS_PACKAGE_LENGTH = 200
BUSINESS_TRIP_LENGTH = 50
EDUCATION_LENGTH = 50
LINE_OF_BUSINESS = 200
PAYMENT_LENGTH = 50
PORTFOLIO_LENGTH = 50
TYPE_EMPLOYMENT_LENGTH = 200
VACANCY_NAME = 200
WORK_EXPERIENCE_LENGTH = 100
WORK_FORMAT_LENGTH = 200

BENEFITS_PACKAGE_CHOICES = [
("VHI", "ДМС"),
("vocation", "Отпуск"),
("employment_record", "Оформление по ТК"),
("free_education", "Компенсация обучения"),
("free_meals", "Компенсация питания")
]
Expand All @@ -35,6 +31,11 @@ class Limits(IntEnum):
("sometimes", "Иногда")
]

CITY_CHOICES = [
('tver', 'Тверь'),
('pskov', 'Псков')
]

EDUCATION_CHOICES = [
("is_required", "Требуется"),
("not_required", "Не требуется")
Expand All @@ -54,17 +55,7 @@ class Limits(IntEnum):
"прошедшими предварительный отбор")
]

PAYMENT_CHOCES = [
("credit_card", "Банковская карта"),
("instant_payment_system", "СБП")
]

PORTFOLIO_CHOICES = [
("is_required", "Требуется"),
("not_required", "Не требуется")
]

RESPONSIBILITY_HR_CHOICES = [
HR_RESPONSIBILITY_CHOICES = [
(1, "Поиск и предоставление релевантных резюме"),
(2, "Проведение первичных интервью"),
(3, "Организация собеседований с заказчиком + "
Expand All @@ -75,22 +66,25 @@ class Limits(IntEnum):
(7, "Отправка финалисту приглашения на работу")
]

WORK_EXPERIENCE_CHOICES = [
("without_experience", "Без опыта"),
("up_to_year", "До года"),
("from_one_to_three_years", "От 1 года до 3 лет"),
("more_three_years", "Более 3 лет")
INFO_CANDIDATES_CHOICES = [
(1, "Резюме без предварительного собеседования"),
(2, "Резюме кандидатов с проведенными первичными интервью")
]

WORK_FORMAT_CHOICES = [
("remote", "Удалённая"),
("mixed", "Гибрид"),
("office", "Офис")
PAYMENT_CHOICES = [
("credit_card", "Банковская карта"),
("instant_payment_system", "СБП")
]

CITY_CHOICES = [
('tver', 'Тверь'),
('pskov', 'Псков')
PAYMENT_HR_CHOICES = [
(1, "100% за выход сотрудника"),
(2, "50% за выход и 50% по окончанию гарантийного периода"),
(3, "100% по окончанию гарантийного периода")
]

PORTFOLIO_CHOICES = [
("is_required", "Требуется"),
("not_required", "Не требуется")
]

PROFESSION_CHOICES = [
Expand All @@ -100,3 +94,16 @@ class Limits(IntEnum):
("web_dev", "Веб-разработчик"),
("qa_engineer", "Инженер по тестированию(QA)"),
]

WORK_EXPERIENCE_CHOICES = [
("without_experience", "Без опыта"),
("up_to_year", "До года"),
("from_one_to_three_years", "От 1 года до 3 лет"),
("more_three_years", "Более 3 лет")
]

WORK_FORMAT_CHOICES = [
("remote", "Удалённая"),
("mixed", "Гибрид"),
("office", "Офис")
]
2 changes: 1 addition & 1 deletion hrspace/hrspace/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"django.contrib.messages",
"django.contrib.staticfiles",
'rest_framework',
"orders.apps.OrdersConfig",
"api.apps.ApiConfig",
"orders.apps.OrdersConfig",
]

MIDDLEWARE = [
Expand Down
2 changes: 1 addition & 1 deletion hrspace/hrspace/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from django.urls import include, path

urlpatterns = [
path("admin/", admin.site.urls),
Expand Down
23 changes: 22 additions & 1 deletion hrspace/orders/admin.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
from django.contrib import admin

from orders.models import City, Order, Profession
from orders.models import (BenefitsPackage, City, HrResponsibility, Order,
Profession, Skill, TypeEmployment)


@admin.register(BenefitsPackage)
class BenefitsPackageAdmin(admin.ModelAdmin):
pass


@admin.register(City)
class CityAdmin(admin.ModelAdmin):
pass


@admin.register(HrResponsibility)
class HrResponsibilityAdmin(admin.ModelAdmin):
pass


@admin.register(Order)
class OrderAdmin(admin.ModelAdmin):
pass
Expand All @@ -16,3 +27,13 @@ class OrderAdmin(admin.ModelAdmin):
@admin.register(Profession)
class ProfessionAdmin(admin.ModelAdmin):
pass


@admin.register(Skill)
class SkillAdmin(admin.ModelAdmin):
pass


@admin.register(TypeEmployment)
class TypeEmploymentAdmin(admin.ModelAdmin):
pass
12 changes: 6 additions & 6 deletions hrspace/orders/apps.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.apps import AppConfig


class OrdersConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "orders"
from django.apps import AppConfig


class OrdersConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "orders"
Loading

0 comments on commit e5283fd

Please sign in to comment.