Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
bed199f
Update npm dependencies to latest stable versions & fix related issues
andrxpie May 19, 2026
f44a959
chore(client): update npm dependencies and resolve critical vulnerabi…
andrxpie May 19, 2026
a6d47e4
Sort imports
andrxpie May 21, 2026
3dd58c4
feat(AdminPage): update AdminBar component and add DictionaryMainPage…
andrxpie May 21, 2026
a2f60a8
Implement DictionaryMainPage and DictionaryModal components.
andrxpie May 23, 2026
79f07c0
Replace DictionaryMainPage with Dictionary component and update routi…
andrxpie May 25, 2026
faef069
in progess
BodyaAP May 27, 2026
1506c94
in progess
BodyaAP May 28, 2026
a643ae5
Merge pull request #8 from project-studying-dotnet/chore/83/update-np…
andrxpie May 28, 2026
d630513
feat/104/added_mainblock_page_crud
BodyaAP May 28, 2026
b8b83f1
feat/33: Add fact crud (#2)
snitochka May 28, 2026
f1e716e
Merge branch 'dev' into task/104/frontend_admin_main_streetcode_block
BodyaAP May 29, 2026
0028117
fix/104/added_mainblock_page_crud_sonar_issues
BodyaAP May 31, 2026
3e28eba
fix/104/added_mainblock_page_crud_sonar_issues
BodyaAP May 31, 2026
ce950d7
Ignore .vs folder
BodyaAP May 31, 2026
4bdfce1
fix/104/added_mainblock_page_crud_sonar_issues
BodyaAP May 31, 2026
cba447b
ignor .vs
BodyaAP May 31, 2026
1ceb863
fix/104/sonar_issues
BodyaAP May 31, 2026
e859f28
resolved sonar issues
BodyaAP May 31, 2026
99cc797
resolved sonar issues
BodyaAP May 31, 2026
84b7ca1
resolved issues
BodyaAP May 31, 2026
f100d0d
resolved issue
BodyaAP May 31, 2026
206446e
Ignore .vs folder
BodyaAP May 31, 2026
ad1b0c0
add admin chronology block
Vasia1101 May 31, 2026
68bf348
fix styles update ui
Vasia1101 Jun 1, 2026
3c85b79
feat/9: implement search functionality and improve sorting in the Dic…
andrxpie Jun 1, 2026
c55b20b
add login functional
Vasia1101 Jun 1, 2026
d3eb1f3
fix sonar
Vasia1101 Jun 1, 2026
cc12b0d
Clean up .gitignore by removing unnecessary entries
BodyaAP Jun 1, 2026
1560e54
change version node to "^16.18.9"
BodyaAP Jun 1, 2026
d191e90
Merge branch 'task/104/frontend_admin_main_streetcode_block' of https…
BodyaAP Jun 1, 2026
69f5096
Merge pull request #10 from project-studying-dotnet/task/104/frontend…
BodyaAP Jun 2, 2026
95872c2
feat/9: Place styles in scss.
andrxpie Jun 2, 2026
dcf67c6
merge dev
Vasia1101 Jun 2, 2026
569c63e
feat/9: change modal call via modalsStore.
andrxpie Jun 3, 2026
fba8c11
feat/9: implement update Term logic.
andrxpie Jun 3, 2026
41330a7
Merge branch 'dev' of https://github.com/project-studying-dotnet/Stre…
andrxpie Jun 3, 2026
5f0bc74
feat/9: delete modal call fix
andrxpie Jun 3, 2026
7f5bb28
feat/9: styles fix.
andrxpie Jun 3, 2026
3c92fca
feat/9: refactor modals and implement delete modal logic
andrxpie Jun 3, 2026
436086a
feat/9: styles fix.
andrxpie Jun 3, 2026
bac0d37
feat/9: sonar fix.
andrxpie Jun 3, 2026
f77b2af
feat/9: remove old modals.
andrxpie Jun 3, 2026
6de95fa
Merge pull request #12 from project-studying-dotnet/feature/116/imple…
Vasia1101 Jun 4, 2026
e47fbac
Merge branch 'dev' of https://github.com/project-studying-dotnet/Stre…
andrxpie Jun 4, 2026
03e4f73
feat/9: router fix.
andrxpie Jun 4, 2026
e0a94a8
Merge pull request #15 from project-studying-dotnet/feat/9/admin-term…
andrxpie Jun 4, 2026
508b1fb
feat: implement TextVideoBlock form with validation and preview
InnetaSh May 27, 2026
6305080
feat(admin): finish text and video block functionality
InnetaSh Jun 2, 2026
c99ce97
update utils removeTermTag
InnetaSh Jun 2, 2026
cfd8305
fix sonar issues
InnetaSh Jun 2, 2026
01cc995
fix sonar issue
InnetaSh Jun 2, 2026
d3c64c6
fix
InnetaSh Jun 2, 2026
73b7987
fix issue
InnetaSh Jun 2, 2026
802074e
fix issue by sonar
InnetaSh Jun 2, 2026
0e49981
fix
InnetaSh Jun 2, 2026
a691d19
fix sonar issue
InnetaSh Jun 2, 2026
dc6abb8
fix sonar issue
InnetaSh Jun 2, 2026
0a32155
fix
InnetaSh Jun 2, 2026
a7b08f0
update
InnetaSh Jun 2, 2026
cd3b2a3
fix
InnetaSh Jun 2, 2026
e19202d
fix
InnetaSh Jun 2, 2026
72d4c6a
update bugs on components
InnetaSh Jun 5, 2026
8c0ef79
fix sonar issues
InnetaSh Jun 5, 2026
384022a
fix issue
InnetaSh Jun 5, 2026
38c1ed8
fix naming
InnetaSh Jun 5, 2026
b7c4def
fix issue
InnetaSh Jun 6, 2026
8710002
fix
InnetaSh Jun 6, 2026
56d20a4
fix
InnetaSh Jun 6, 2026
63ed08d
six issue
InnetaSh Jun 7, 2026
d55148e
fix sonar issue
InnetaSh Jun 7, 2026
677745e
Merge pull request #13 from project-studying-dotnet/chore/1/Admin/Tex…
InnetaSh Jun 7, 2026
f9f099f
Aligns project styling and extends type definitions
andrxpie Jun 10, 2026
5cb6e4a
Introduces nested routing for comments feature
andrxpie Jun 10, 2026
123c513
Refactor: Standardizes imports and updates page navigation
andrxpie Jun 10, 2026
ae30349
Feat: Implements comments drawer functionality
andrxpie Jun 10, 2026
3845e52
Refactor: Enhances Top Carousel accessibility and responsiveness
andrxpie Jun 10, 2026
9adccb4
Style: Refines Streetcode card layout and responsiveness
andrxpie Jun 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module.exports = {
'plugin:react-hooks/recommended',
],
rules: {
'@typescript-eslint/quotes': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
Expand All @@ -30,7 +31,6 @@ module.exports = {
'import/no-cycle': 'off',
'react/jsx-indent': 'off',
'no-nested-ternary': 'off',
'@typescript-eslint/indent': 'off',
'consistent-return': 'off',
'react/react-in-jsx-scope': 'off',
'react/require-default-props': 'off',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
push:
branches:
- main
- dev
# - dev
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
- dev
# - dev

jobs:
build_and_deploy_job:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
.vs/
3 changes: 0 additions & 3 deletions .vs/ProjectSettings.json

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file removed .vs/StreetCode_Client/v17/.wsuo
Binary file not shown.
Binary file removed .vs/StreetCode_Client/v17/TestStore/0/000.testlog
Binary file not shown.
Binary file removed .vs/StreetCode_Client/v17/TestStore/0/testlog.manifest
Binary file not shown.
Empty file.
Binary file removed .vs/StreetcodeMasterEdit/v17/.wsuo
Binary file not shown.
Binary file removed .vs/StreetcodeMasterEdit/v17/workspaceFileList.bin
Binary file not shown.
16 changes: 0 additions & 16 deletions .vs/VSWorkspaceState.json

This file was deleted.

Binary file removed .vs/slnx.sqlite
Binary file not shown.
30 changes: 21 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@tinymce/tinymce-react": "^4.3.0",
"@tinymce/tinymce-react": "^6.3.0",
"@types/googlemaps": "^3.43.3",
"@types/jest": "^27.5.2",
"@types/maplibre-gl": "^1.14.0",
"@types/node": "^16.18.9",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"antd": "^5.21.2",
Expand All @@ -28,6 +27,7 @@
"date-fns": "^2.29.3",
"dayjs": "^1.11.7",
"dnd-core": "^16.0.1",
"dompurify": "^3.4.6",
"dotenv": "^16.1.4",
"dotenv-webpack": "^8.0.1",
"eslint-config-airbnb-typescript": "^17.0.0",
Expand Down Expand Up @@ -69,10 +69,9 @@
"react-toastify": "^9.1.1",
"slick-carousel": "^1.8.1",
"styled-components": "^5.3.6",
"svg-react-loader": "^0.4.6",
"svg-url-loader": "^8.0.0",
"swiper": "^8.4.6",
"tinymce": "^6.4.0",
"swiper": "^12.1.4",
"tinymce": "^8.5.0",
"typescript": "^4.9.4",
"yet-another-react-lightbox": "^2.2.7"
},
Expand Down Expand Up @@ -111,6 +110,7 @@
"@babel/core": "^7.21.3",
"@svgr/webpack": "^6.5.1",
"@types/leaflet": "^1.9.0",
"@types/node": "^16.18.9",
"@types/react-beautiful-dnd": "^13.1.3",
"@types/react-google-recaptcha": "^2.1.5",
"@types/react-slick": "^0.23.10",
Expand All @@ -122,14 +122,26 @@
"eslint-config-airbnb": "^19.0.4",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.0",
"lint-staged": "^13.1.0",
"sass": "^1.57.1",
"sass-loader": "^13.2.0",
"lint-staged": "^17.0.5",
"sass": "^1.99.0",
"sass-loader": "^16.0.8",
"ts-loader": "^9.4.2",
"url-loader": "^4.1.1",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.11.1"
"webpack-dev-server": "^5.2.4"
},
"overrides": {
"tangram": {
"js-yaml": "^3.14.2",
"jszip": "^3.10.1"
},
"nth-check": "^2.1.1",
"postcss": "^8.4.38",
"react-scripts": {
"webpack-dev-server": "^5.2.4",
"serialize-javascript": "^6.0.2"
}
},
"description": "<a href=\"https://softserve.academy/\"> <img src=\"https://raw.githubusercontent.com/ita-social-projects/StreetCode/master/StreerCodeLogo.jpg\" title=\"SoftServe IT Academy\" alt=\"SoftServe IT Academy\"> </a>",
"main": ".eslintrc.js",
Expand Down
33 changes: 26 additions & 7 deletions src/app/api/agent.api.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
import { redirect } from 'react-router-dom';
import { toast } from 'react-toastify';
import axios, { AxiosError, AxiosResponse } from 'axios';
import { ReasonPhrases, StatusCodes } from 'http-status-codes';

import FRONTEND_ROUTES from '../common/constants/frontend-routes.constants';
import UserLoginStore from '../stores/user-login-store';

axios.defaults.baseURL = process.env.NODE_ENV === 'development'
? 'https://localhost:5001/api' : 'https://app-streetcode-webapi-eu-prop-001-gsbqfwc2fdh6hhaw.polandcentral-01.azurewebsites.net/api';
const isDevelopment = process.env.NODE_ENV === 'development';

axios.defaults.baseURL = isDevelopment
? 'https://localhost:5001/api'
: 'https://app-streetcode-webapi-eu-prop-001-gsbqfwc2fdh6hhaw.polandcentral-01.azurewebsites.net/api';

const getErrorMessage = (data: unknown): string | undefined => {
if (Array.isArray(data)) {
return data[0]?.message;
}

if (
typeof data === 'object'
&& data !== null
&& 'message' in data
) {
return String(data['message']);
}

return undefined;
};

axios.interceptors.response.use(
async (response) => response,
Expand All @@ -22,13 +40,14 @@ axios.interceptors.response.use(
break;
case StatusCodes.UNAUTHORIZED:
errorMessage = ReasonPhrases.UNAUTHORIZED;
redirect(FRONTEND_ROUTES.ADMIN.LOGIN);
UserLoginStore.clearUserData();
globalThis.location.href = FRONTEND_ROUTES.ADMIN.LOGIN;
break;
case StatusCodes.NOT_FOUND:
errorMessage = ReasonPhrases.NOT_FOUND;
break;
case StatusCodes.BAD_REQUEST:
errorMessage = ReasonPhrases.BAD_REQUEST;
case StatusCodes.BAD_REQUEST:
errorMessage = getErrorMessage(response?.data) || ReasonPhrases.BAD_REQUEST;
break;
case StatusCodes.FORBIDDEN:
errorMessage = ReasonPhrases.FORBIDDEN;
Expand All @@ -40,7 +59,7 @@ axios.interceptors.response.use(
toast.error(errorMessage);
}

return Promise.reject(message);
return Promise.reject(response?.data || message);
},
);

Expand Down
3 changes: 2 additions & 1 deletion src/app/api/media/videos.api.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { VideoCreateDto } from '@/models/media/video.model';
import Agent from '@api/agent.api';
import { API_ROUTES } from '@constants/api-routes.constants';
import Video from '@models/media/video.model';
Expand All @@ -11,7 +12,7 @@ const VideosApi = {
`${API_ROUTES.VIDEOS.GET_BY_STREETCODE_ID}/${streetcodeId}`,
),

create: (video: Video) => Agent.post<Video>(`${API_ROUTES.VIDEOS.CREATE}`, video),
create: (video: VideoCreateDto) => Agent.post<Video>(`${API_ROUTES.VIDEOS.CREATE}`, video),

update: (video: Video) => Agent.post<Video>(`${API_ROUTES.VIDEOS.UPDATE}`, video),

Expand Down
6 changes: 6 additions & 0 deletions src/app/api/streetcode/streetcodes.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ const StreetcodesApi = {
existWithIndex: (index:number) => Agent.get<boolean>(`${API_ROUTES.STREETCODES.EXIST_WITH_INDEX}/${index}`),

existWithUrl: (url: string) => Agent.get<boolean>(`${API_ROUTES.STREETCODES.EXIST_WITH_URL}/${url}`),

create: (streetcode: Streetcode) => Agent.post<Streetcode>(`${API_ROUTES.STREETCODES.CREATE}`, streetcode),

update: (streetcode: Streetcode) => Agent.put<Streetcode>(`${API_ROUTES.STREETCODES.UPDATE}`, streetcode),

getAll: () => Agent.get<Streetcode[]>(`${API_ROUTES.STREETCODES.GET_ALL}`),
};

export default StreetcodesApi;
7 changes: 4 additions & 3 deletions src/app/api/streetcode/text-content/related-terms.api.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import Agent from '@api/agent.api';
import { API_ROUTES } from '@constants/api-routes.constants';

import { RelatedTerm } from '@/models/streetcode/text-contents.model';
import { CreateRelatedTerm, RelatedTerm } from '@/models/streetcode/text-contents.model';

const RelatedTermApi = {
getAllByTermId: (id: number) => Agent.get<RelatedTerm[]>(`${API_ROUTES.RELATED_TERMS.GET_ALL_BY_TERM_ID}/${id}`),

create: (relatedTerm: RelatedTerm) => Agent.post<RelatedTerm>(`${API_ROUTES.RELATED_TERMS.CREATE}`, relatedTerm),
create: (relatedTerm: CreateRelatedTerm) => Agent.post<RelatedTerm>(`${API_ROUTES.RELATED_TERMS.CREATE}`, relatedTerm),

update: (id: number, relatedTerm: RelatedTerm) => Agent.put<RelatedTerm>(
`${API_ROUTES.RELATED_TERMS.UPDATE}/${id}`,
relatedTerm,
),

delete: (word: string) => Agent.delete<RelatedTerm>(`${API_ROUTES.RELATED_TERMS.DELETE}/${word}`),
delete: (word: string, termId: number) =>
Agent.delete(`${API_ROUTES.RELATED_TERMS.DELETE}/${word}/${termId}`)
};

export default RelatedTermApi;
4 changes: 2 additions & 2 deletions src/app/api/streetcode/text-content/terms.api.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import Agent from '@api/agent.api';
import { API_ROUTES } from '@constants/api-routes.constants';
import { Term } from '@models/streetcode/text-contents.model';
import { Term, TermCreate } from '@models/streetcode/text-contents.model';

const TermsApi = {
getById: (id: number) => Agent.get<Term>(`${API_ROUTES.TERMS.GET}/${id}`),

getAll: () => Agent.get<Term[]>(`${API_ROUTES.TERMS.GET_ALL}`),

create: (term: Term) => Agent.post<Term>(`${API_ROUTES.TERMS.CREATE}`, term),
create: (term: TermCreate) => Agent.post<Term>(`${API_ROUTES.TERMS.CREATE}`, term),

update: (term: Term) => Agent.put<Term>(`${API_ROUTES.TERMS.UPDATE}`, term),

Expand Down
3 changes: 2 additions & 1 deletion src/app/api/streetcode/text-content/texts.api.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { TextCreateUpdate } from '@/models/streetcode/text-contents.model';
import Agent from '@api/agent.api';
import { API_ROUTES } from '@constants/api-routes.constants';
import { Text } from '@models/streetcode/text-contents.model';
Expand All @@ -11,7 +12,7 @@ const TextsApi = {
`${API_ROUTES.TEXTS.GET_BY_STREETCODE_ID}/${streetcodeId}`,
),

create: (text: Text) => Agent.post<Text>(`${API_ROUTES.TEXTS.CREATE}`, text),
create: (text: TextCreateUpdate) => Agent.post<Text>(`${API_ROUTES.TEXTS.CREATE}`, text),

update: (text: Text) => Agent.put<Text>(`${API_ROUTES.TEXTS.UPDATE}`, text),

Expand Down
30 changes: 25 additions & 5 deletions src/app/api/user/user.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,29 @@ import {
UserLoginRequest, UserLoginResponce,
} from '@/models/user/user.model';

const UserApi = {
login: (loginParams:UserLoginRequest) => Agent.post<UserLoginResponce>(API_ROUTES.USERS.LOGIN, loginParams),
refreshToken: (token:RefreshTokenRequest) => Agent
.post<RefreshTokenResponce>(API_ROUTES.USERS.REFRESH_TOKEN, token),
};
const UserApi = {
login: (loginParams: UserLoginRequest) =>
Agent.post<UserLoginResponce>(
API_ROUTES.USERS.LOGIN,
loginParams,
),

refreshToken: (token: RefreshTokenRequest) =>
Agent.post<RefreshTokenResponce>(
API_ROUTES.USERS.REFRESH_TOKEN,
token,
),

adminLogin: (loginParams: UserLoginRequest) =>
Agent.post<UserLoginResponce>(
API_ROUTES.ADMIN_AUTHORIZATION.LOGIN,
loginParams,
),

adminRefreshToken: (token: RefreshTokenRequest) =>
Agent.post<RefreshTokenResponce>(
API_ROUTES.ADMIN_AUTHORIZATION.REFRESH_TOKEN,
token,
),
};
export default UserApi;
13 changes: 13 additions & 0 deletions src/app/common/components/RequireAuth/RequireAuth.component.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Navigate, Outlet } from 'react-router-dom';
import FRONTEND_ROUTES from '@constants/frontend-routes.constants';
import UserLoginStore from '@stores/user-login-store';

const RequireAuth = () => {
if (!UserLoginStore.isLoggedIn) {
return <Navigate to={FRONTEND_ROUTES.ADMIN.LOGIN} replace />;
}

return <Outlet />;
};

export default RequireAuth;
29 changes: 29 additions & 0 deletions src/app/common/components/SortIcon.component.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Виносимо за межі Dictionary!
const CustomSortIcon = ({ sortOrder }: { sortOrder?: "ascend" | "descend" | null }) => {
const color = "#1D1F23";

return (
<svg
width="13"
height="13"
viewBox="0 0 13 18"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M0.5 7.25L12.5 7.25L6.5 0.5L0.5 7.25Z"
fill={sortOrder === "ascend" ? color : "transparent"}
stroke={color}
strokeLinejoin="round"
/>
<path
d="M0.5 10.75L12.5 10.75L6.5 17.5L0.5 10.75Z"
fill={sortOrder === "descend" ? color : "transparent"}
stroke={color}
strokeLinejoin="round"
/>
</svg>
);
};

export default CustomSortIcon;
1 change: 0 additions & 1 deletion src/app/common/components/StrictModeDroppable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const StrictModeDroppable = ({ children, ...props }: DroppableProps) => {
const animation = requestAnimationFrame(() => setEnabled(true));
return () => {
cancelAnimationFrame(animation);
setEnabled(false);
};
}, []);
if (!enabled) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@ const ConfirmationModal = () => {
<Modal
title="Підтведження"
open={confirmation.isOpen}
onOk={() => {
if (confirmation.confirmationProps?.onSubmit) {
confirmation.confirmationProps.onSubmit();
onOk={async () => {
try {
await confirmation.confirmationProps?.onSubmit?.();
} finally {
setConfirmationModal('confirmation', undefined, undefined, false);
}
}}
onCancel={() => {
if (confirmation.confirmationProps?.onCancel) {
confirmation.confirmationProps?.onCancel();
confirmation.confirmationProps.onCancel();
} else {
setConfirmationModal('confirmation', undefined, undefined, false);
}
setConfirmationModal('confirmation');
}}
>
{(confirmation.confirmationProps?.text)
Expand Down
Loading
Loading