Skip to content

Commit

Permalink
Merge branch 'develop' into #834-display-of-new-participants-redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
YanZhylavy committed Nov 1, 2024
2 parents 7ba4e66 + 42b05aa commit 3c5c461
Show file tree
Hide file tree
Showing 25 changed files with 399 additions and 802 deletions.
1 change: 0 additions & 1 deletion BackEnd/administration/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def filter_is_deleted(self, queryset, name, value):

ordering = filters.OrderingFilter(
fields=(
("id", "id"),
("name", "name"),
("surname", "surname"),
("email", "email"),
Expand Down
1 change: 1 addition & 0 deletions BackEnd/administration/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

class ListPagination(PageNumberPagination):
page_size_query_param = "page_size"
page_size = 20

def get_paginated_response(self, data):
return Response(
Expand Down
2 changes: 1 addition & 1 deletion BackEnd/administration/tests/test_admin_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def test_get_profiles_structure_json(self):
}
]
self.assertEqual(status.HTTP_200_OK, response.status_code)
self.assertEqual(data, response.json())
self.assertEqual(data, response.data["results"])

def test_get_profile_id_authenticated(self):
self.client.force_authenticate(self.user)
Expand Down
56 changes: 10 additions & 46 deletions BackEnd/administration/tests/test_admin_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,45 +29,9 @@ def setUp(self):
AdminUserFactory.reset_sequence(1)
self.user = self.users[0]

def test_get_users_ordering_desc(self):
def test_get_users_ordering_default(self):
self.client.force_authenticate(self.user)
response = self.client.get(path="/api/admin/users/?ordering=-id")
data = [
{
"id": 3,
"email": "test3@test.com",
"name": "Test person 3",
"surname": "Test person 3 surname",
"status": {
"is_active": True,
"is_staff": True,
"is_superuser": False,
"is_deleted": False,
},
"company_name": None,
"registration_date": None,
},
{
"id": 2,
"email": "test2@test.com",
"name": "Test person 2",
"surname": "Test person 2 surname",
"status": {
"is_active": True,
"is_staff": True,
"is_superuser": False,
"is_deleted": False,
},
"company_name": None,
"registration_date": None,
},
]
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(data, response.json())

def test_get_users_ordering_asc(self):
self.client.force_authenticate(self.user)
response = self.client.get(path="/api/admin/users/?ordering=id")
response = self.client.get(path="/api/admin/users/")
data = [
{
"id": 2,
Expand Down Expand Up @@ -99,7 +63,7 @@ def test_get_users_ordering_asc(self):
},
]
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(data, response.json())
self.assertEqual(data, response.data["results"])

def test_get_users_filter_id_surname(self):
self.client.force_authenticate(self.user)
Expand All @@ -121,7 +85,7 @@ def test_get_users_filter_id_surname(self):
},
]
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(data, response.json())
self.assertEqual(data, response.data["results"])


class TestAdminUsersStatusAPITests(APITestCase):
Expand Down Expand Up @@ -166,7 +130,7 @@ def test_get_users_filter_status_active_staff(self):
},
]
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(data, response.json())
self.assertEqual(data, response.data["results"])

def test_get_users_filter_status_superuser_staff_active(self):
self.client.force_authenticate(self.user)
Expand All @@ -175,7 +139,7 @@ def test_get_users_filter_status_superuser_staff_active(self):
)
data = []
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(data, response.json())
self.assertEqual(data, response.data["results"])


class TestAdminUsersAPITests(APITestCase):
Expand Down Expand Up @@ -211,11 +175,11 @@ def test_get_users_authenticated(self):
}
]
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(data, response.json())
self.assertEqual(data, response.data["results"])

def test_get_users_filter(self):
def test_get_users(self):
self.client.force_authenticate(self.user)
response = self.client.get(path="/api/admin/users/?ordering=id")
response = self.client.get(path="/api/admin/users/")
data = [
{
"id": 2,
Expand All @@ -233,7 +197,7 @@ def test_get_users_filter(self):
}
]
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(data, response.json())
self.assertEqual(data, response.data["results"])

def test_get_user_id_authenticated(self):
self.client.force_authenticate(self.user)
Expand Down
4 changes: 1 addition & 3 deletions BackEnd/administration/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ class UsersListView(ListAPIView):
serializer_class = AdminUserListSerializer
filter_backends = [DjangoFilterBackend]
filterset_class = UsersFilter

def get_queryset(self):
return CustomUser.objects.select_related("profile")
queryset = CustomUser.objects.select_related("profile").order_by("id")


class UserDetailView(RetrieveUpdateDestroyAPIView):
Expand Down
19 changes: 11 additions & 8 deletions FrontEnd/src/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
--about-as-main-background: #0B6C61;
--star-background: #FFD800;
--hint-background: #25292C;
--light-seashell-background: #F9F5EC;

/* text color*/
--main-text-color: #292E32;
Expand All @@ -44,14 +45,16 @@
--delete-text-color: #F15831;
--notification-text-color: #F34444;
--footer-dark-text-color: #A0ABC0;
--link-text-color: #000000;
--error-text-color: #F15831;

/* button color*/
--main-button-color: #1F9A7C;
--button-color-hover: #0b6c61 ;
--button-color-hover: #0b6c61;
--light-button-color: #FFFFFF;

/* fonts */
--font-main: 'Inter', sans-serif;
--font-main: 'Geologica', sans-serif;
--font-messages: 'Roboto', sans-serif;
--font-error: 'Roboto', sans-serif;
--font-logo: 'Geologica', sans-serif;
Expand All @@ -76,22 +79,22 @@
--footer-font-color: #FFF;
--footer-links-font-color: #A0ABC0;
--footer-bottom-backround: #333;

/* main pages About block*/
--about-text-font-color: #292E32;
--about-text-background-color: #FFF;

--about-as-font-color: #FFF;
--about-as-background-color: #0B6C61;

--about-cards-font-color: #292E32;
--about-cards-background-color: #F0F1F3;
--about-cards-background-content-color: #FFF;

/* main pages Banner block*/
--banner-main-font-color: #000;
--banner-main-dark-color: #1F9A7C;

/* main pages JoinUs block*/
--join-us-batton-color: black;
--join-us-main-color: #B4D27A;
--join-us-font-color: black;
--join-us-batton-text-color: white;
/* CompanyCard */
--companies-card-text-color: #292e32;
--companies-card-box-shadow: rgba(65, 64, 69, 0.2);
Expand All @@ -111,7 +114,7 @@
--character-title-85: rgba(0, 0, 0, 0.85);

--wf-base-white: #FFF;

--profile-min-height-block: calc(100vh - 565px);
--min-height-block-main: calc(100vh - 305px);
--company-card-color: #FFF;
Expand Down
19 changes: 0 additions & 19 deletions FrontEnd/src/pages/Authorization/AuthorizationPage.jsx

This file was deleted.

30 changes: 0 additions & 30 deletions FrontEnd/src/pages/Authorization/AuthorizationPage.module.css

This file was deleted.

4 changes: 2 additions & 2 deletions FrontEnd/src/pages/Authorization/EyeVisible.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const EyeVisible = () => {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
<path d="M7.00008 3.52734C4.7948 3.52734 3.18015 4.6457 2.04129 7C3.18015 9.3543 4.7948 10.4727 7.00008 10.4727C9.20672 10.4727 10.8214 9.3543 11.9589 7C10.82 4.6457 9.20535 3.52734 7.00008 3.52734ZM6.94539 9.40625C5.61648 9.40625 4.53914 8.32891 4.53914 7C4.53914 5.67109 5.61648 4.59375 6.94539 4.59375C8.2743 4.59375 9.35164 5.67109 9.35164 7C9.35164 8.32891 8.2743 9.40625 6.94539 9.40625Z" fill="white"/>
<path d="M12.8817 6.64727C11.5856 3.91699 9.6264 2.54297 7.00003 2.54297C4.3723 2.54297 2.41449 3.91699 1.11839 6.64863C1.06641 6.75871 1.03944 6.87894 1.03944 7.00068C1.03944 7.12242 1.06641 7.24265 1.11839 7.35273C2.41449 10.083 4.37367 11.457 7.00003 11.457C9.62777 11.457 11.5856 10.083 12.8817 7.35137C12.9869 7.12988 12.9869 6.87285 12.8817 6.64727ZM7.00003 10.4727C4.79476 10.4727 3.18011 9.3543 2.04124 7C3.18011 4.6457 4.79476 3.52734 7.00003 3.52734C9.20531 3.52734 10.82 4.6457 11.9588 7C10.8213 9.3543 9.20667 10.4727 7.00003 10.4727Z" fill="#1F9A7C"/>
<path d="M6.94531 4.59375C5.61641 4.59375 4.53906 5.67109 4.53906 7C4.53906 8.32891 5.61641 9.40625 6.94531 9.40625C8.27422 9.40625 9.35156 8.32891 9.35156 7C9.35156 5.67109 8.27422 4.59375 6.94531 4.59375ZM6.94531 8.53125C6.09903 8.53125 5.41406 7.84629 5.41406 7C5.41406 6.15371 6.09903 5.46875 6.94531 5.46875C7.7916 5.46875 8.47656 6.15371 8.47656 7C8.47656 7.84629 7.7916 8.53125 6.94531 8.53125Z" fill="#1F9A7C"/>
<path d="M12.8817 6.64727C11.5856 3.91699 9.6264 2.54297 7.00003 2.54297C4.3723 2.54297 2.41449 3.91699 1.11839 6.64863C1.06641 6.75871 1.03944 6.87894 1.03944 7.00068C1.03944 7.12242 1.06641 7.24265 1.11839 7.35273C2.41449 10.083 4.37367 11.457 7.00003 11.457C9.62777 11.457 11.5856 10.083 12.8817 7.35137C12.9869 7.12988 12.9869 6.87285 12.8817 6.64727ZM7.00003 10.4727C4.79476 10.4727 3.18011 9.3543 2.04124 7C3.18011 4.6457 4.79476 3.52734 7.00003 3.52734C9.20531 3.52734 10.82 4.6457 11.9588 7C10.8213 9.3543 9.20667 10.4727 7.00003 10.4727Z" fill="#B4D27A"/>
<path d="M6.94531 4.59375C5.61641 4.59375 4.53906 5.67109 4.53906 7C4.53906 8.32891 5.61641 9.40625 6.94531 9.40625C8.27422 9.40625 9.35156 8.32891 9.35156 7C9.35156 5.67109 8.27422 4.59375 6.94531 4.59375ZM6.94531 8.53125C6.09903 8.53125 5.41406 7.84629 5.41406 7C5.41406 6.15371 6.09903 5.46875 6.94531 5.46875C7.7916 5.46875 8.47656 6.15371 8.47656 7C8.47656 7.84629 7.7916 8.53125 6.94531 8.53125Z" fill="#B4D27A"/>
</svg>
);
};
Expand Down
12 changes: 0 additions & 12 deletions FrontEnd/src/pages/Authorization/Login.jsx

This file was deleted.

8 changes: 0 additions & 8 deletions FrontEnd/src/pages/Authorization/Login.module.css

This file was deleted.

Loading

0 comments on commit 3c5c461

Please sign in to comment.