Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop to release #779

Merged
merged 187 commits into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
38ddc03
UserStory#207 newest section mobile (#567)
0shar0 Sep 14, 2021
dfe0952
Editor bug fix (#566)
0shar0 Sep 14, 2021
aa90d8a
Change load more icon (#565)
niksonax Sep 15, 2021
42a84e7
Fix carousel responsiveness (#568)
shedanny Sep 15, 2021
a262503
Fix clickable link margin (#569)
niksonax Sep 15, 2021
8e783e6
header_Hot_Fix (#571)
0shar0 Sep 15, 2021
53518a9
Edit main page mobile (#574)
0shar0 Sep 20, 2021
232f720
Fixed width of video content (#573)
NabokinAlexandr Sep 20, 2021
229fd47
In component ArticleCreation changed langToken from post to article a…
daniloflek Sep 22, 2021
b8783d4
fix label in tab article (#578)
OksanLan Sep 22, 2021
fdcd3a1
Fix header and footer responsiveness on laptops (#575)
shedanny Sep 22, 2021
2349aca
editor bug fix & hide footer on mobile version (#577)
0shar0 Sep 22, 2021
d5eca89
Materials page mobile design (#576)
niksonax Sep 22, 2021
975f90d
Merge branch 'release' into develop
0shar0 Sep 22, 2021
cc61892
Edit accountmenu view (#589)
pavlyukdm Sep 27, 2021
0c27245
stylize the button "all" on mobile (#588)
OksanLan Sep 27, 2021
7f367ab
make_editor_remind_field_highlighted (#585)
0shar0 Sep 27, 2021
8d4e540
Edit sticky app bar & header (#583)
0shar0 Sep 27, 2021
ffd0e33
In LoginMode.css I set the property padding to 0 for congratulation-s…
daniloflek Sep 27, 2021
51a294c
Create mobile version for footer (#590)
IvanDanyliuk Sep 27, 2021
6a654a1
Update LoadMoreButton on mobile (#584)
niksonax Sep 27, 2021
2e1c8cc
remove default image (#592)
OksanLan Sep 29, 2021
1063baf
edit editor modal (#591)
0shar0 Sep 29, 2021
8dcf69d
Add flex wrap to selected types (#604)
niksonax Oct 5, 2021
ede8b66
bugfix #250 Fix incorrect video size (#603)
Stacey-dev Oct 5, 2021
357d776
Fix height of the preview card (#601)
OksanLan Oct 5, 2021
3b3d1a2
userStory-302: The Top section of the material(mobile) (#599)
OksanLan Oct 5, 2021
159264c
create mobile version for the authors page (#598)
IvanDanyliuk Oct 5, 2021
788f514
Fix directions query when checked all checkboxes (#596)
pavlyukdm Oct 5, 2021
309ead9
Feat/about page mobile (#595)
niksonax Oct 5, 2021
fdc1257
I changed selectedPostTypesString parsing algorithm and now if query …
daniloflek Oct 5, 2021
6c3157b
Fix incorrect redirection on translate post view page (#594)
0shar0 Oct 5, 2021
7bbf525
bugfix #319 (#602)
pavlyukdm Oct 6, 2021
b423cd6
userStory-303: Material's Full View on a separate page(mobile) (#605)
OksanLan Oct 6, 2021
260473f
Merge branch 'release' into develop
0shar0 Oct 6, 2021
9d864da
remove_unused_variable (#607)
0shar0 Oct 6, 2021
de49ff5
Load more button test (#619)
0shar0 Oct 13, 2021
407710b
test: create tests for PostView component (#618)
Stacey-dev Oct 13, 2021
c429412
Create specifications for ConditionNav component (#617)
niksonax Oct 13, 2021
74804cc
cover with tests ExpertsViewMobile component (#616)
IvanDanyliuk Oct 13, 2021
4bf8d4f
cover with tests SecondTopSection Component (#615)
OksanLan Oct 13, 2021
d29b608
cover with tests TopSection (#614)
OksanLan Oct 13, 2021
de2c205
Create tests for ExpertInfo, ExpertProfileView, and AutoPaginationExp…
IvanDanyliuk Oct 13, 2021
4e76c0d
create tests for PostInfo Component (#612)
OksanLan Oct 13, 2021
2a48ae1
Create specifications for NewestPostsList component (#611)
niksonax Oct 13, 2021
c95c004
bugFix main page styles (#610)
0shar0 Oct 13, 2021
7058110
Scrolable checkbox section (#609)
daniloflek Oct 13, 2021
e9dcb61
Test for auto pagination post list (#608)
0shar0 Oct 13, 2021
92a7113
Update release.yml
0shar0 Oct 20, 2021
5738cb2
Merge branch 'release' into develop
0shar0 Oct 20, 2021
9777a25
refactor_PostAuthorSelection.spec.tsx (#631)
0shar0 Oct 22, 2021
753fcd6
test for Notification.tsx (#630)
0shar0 Oct 22, 2021
30e9eb3
Tests for filters (#629)
IvanDanyliuk Oct 22, 2021
6b9af38
test: add tests for CheckboxFilterForm (#625)
Stacey-dev Oct 22, 2021
b36b665
cover with tests footer component (#623)
IvanDanyliuk Oct 22, 2021
e305859
refactor fetchMaterials asyncActions.ts (#624)
0shar0 Oct 22, 2021
2709682
Experts view test (#621)
IvanDanyliuk Oct 22, 2021
623c2cc
Update Dockerfile.prod
0shar0 Oct 28, 2021
1fabef5
Cover with tests FiltersButton component (#644)
IvanDanyliuk Oct 29, 2021
8406a15
Cover with tests PostsList component (#643)
IvanDanyliuk Oct 29, 2021
411276d
cover with tests ArticleUpdation (#640)
OksanLan Oct 29, 2021
b13e519
test: create tests for InformationModal component (#639)
Stacey-dev Oct 29, 2021
2d51925
scrollable filter section on experts page adde (#638)
daniloflek Oct 29, 2021
94c60dc
Filter items test (#636)
IvanDanyliuk Oct 29, 2021
67a3004
add Post Creation Buttons test (#635)
0shar0 Oct 29, 2021
9c81598
fix bug 298 (#634)
OksanLan Oct 29, 2021
b5b837d
burgerMenu_test (#633)
0shar0 Oct 29, 2021
fd41a6d
Add specification file (#632)
niksonax Oct 29, 2021
db01846
cover with tests PasswordResetView (#628)
OksanLan Oct 29, 2021
41624aa
cover with tests PostBreadcrumbs (#622)
OksanLan Oct 29, 2021
9a1d45c
hotfix PasswordResetView.test.tsx
0shar0 Nov 1, 2021
8df9e71
hotfix PasswordResetView.test.tsx
0shar0 Nov 1, 2021
64177f3
hotfix PasswordResetView.test.tsx
0shar0 Nov 1, 2021
5325759
PasswordResetView.test.tsx fix
0shar0 Nov 2, 2021
06e18c4
PasswordResetView.test.tsx fix
0shar0 Nov 2, 2021
b61ef09
cover with tests NoteUpdation (#656)
OksanLan Nov 5, 2021
f5fdd5a
Post creation menu test (#655)
IvanDanyliuk Nov 5, 2021
1786fbd
test: add tests for ExpertDataCard component (#654)
Stacey-dev Nov 5, 2021
3957220
cover with tests PostUpdationWrapper (#652)
OksanLan Nov 5, 2021
c4b87e5
Checkbox dropdown filter form tests (#650)
IvanDanyliuk Nov 5, 2021
10a6278
PasswordResetView.test.tsx fix (#649)
0shar0 Nov 5, 2021
f888c21
Increase coverage PostView component (#648)
0shar0 Nov 5, 2021
2765279
Add specification files and snapshots (#647)
niksonax Nov 5, 2021
469e9e5
Tests for Page404 (#646)
Stacey-dev Nov 5, 2021
4b8a8c8
Cover with tests Accordion component (#645)
IvanDanyliuk Nov 5, 2021
158730a
Feature: Admin control panel (MVP) (#657)
pavlyukdm Nov 9, 2021
0e008a2
Merge branch 'release' into develop
daniloflek Nov 10, 2021
826d0ef
api types fix
daniloflek Nov 10, 2021
22c7e28
Fix http redirect (#665)
0shar0 Nov 11, 2021
ce4177e
Update pull_request_template.md
VitaliiKulinskyi Nov 12, 2021
12c7961
Update develop.md
VitaliiKulinskyi Nov 12, 2021
e76a930
Update master.md
VitaliiKulinskyi Nov 12, 2021
1bb1cac
Merge branch 'release' into develop
daniloflek Nov 17, 2021
17463f4
Merge branch 'release' into develop
daniloflek Nov 24, 2021
fba51b8
Cover with tests PostDirectionChip component (#687)
Stacey-dev Dec 9, 2021
49f65bf
Cover PostDirectionLink component with tests (#684)
niksonax Dec 9, 2021
1e7e04f
cover with tests ExpertProfileViewWrapper (#683)
OksanLan Dec 9, 2021
be44c6c
Tests for MaterialsViewMobile (#682)
IvanDanyliuk Dec 9, 2021
866e6dd
test: add tests for AccountIcon component (#681)
Stacey-dev Dec 9, 2021
314a0c7
Cover with tests RegistrationModal component (#680)
IvanDanyliuk Dec 9, 2021
3e51f95
test: add tests for ExpertsList component (#677)
Stacey-dev Dec 9, 2021
62811e7
Login modal tests (#676)
IvanDanyliuk Dec 9, 2021
5c3bd40
increase coverage for BasicInput (#675)
OksanLan Dec 9, 2021
41b07c6
cover with tests Conditions component (#674)
OksanLan Dec 9, 2021
d916be5
Cover with tests TextPostUpdation (#673)
OksanLan Dec 9, 2021
c274ac8
test: cover with tests ExpertPhotoDataCard component (#672)
Stacey-dev Dec 9, 2021
1a17176
test: NewestContainer test (#671)
DelFlumen Dec 9, 2021
270b009
Add tests for ExpertBlock component (#668)
Stacey-dev Dec 9, 2021
82c7be0
Cover with tests CheckboxFilterForm component (#667)
IvanDanyliuk Dec 9, 2021
b1a7017
test: implement tests for ExpertsViewCard component (#664)
Stacey-dev Dec 9, 2021
187d378
Add specification file (#660)
niksonax Dec 9, 2021
a292df1
Cover with tests AccountMenu component (#659)
IvanDanyliuk Dec 9, 2021
c215cd5
MaterialsView test (#701)
Dergelyova Jan 11, 2022
af210f9
The counter is not shown at top section of opened material card (#698)
TkachukI1 Jan 11, 2022
6704d98
Email is not a link in Контакти section (#697)
TkachukI1 Jan 11, 2022
22b24d7
AdminPageWrapper test (#696)
TkachukI1 Jan 11, 2022
1b4f7e2
fix: add title in filters menu (#695)
Stacey-dev Jan 11, 2022
4e16131
fix: material card redirect to new screen (#694)
Stacey-dev Jan 11, 2022
976705b
fixed bug of the highlighting links in the hamburger menu (#693)
IvanDanyliuk Jan 11, 2022
5546729
#455 authors page mobile bugfix (#691)
IvanDanyliuk Jan 11, 2022
0c06eae
#408 Add UpButton on the 'Матеріали' page (#690)
Stacey-dev Jan 11, 2022
88e272f
fix: fix tests for PostInfo component (#704)
Stacey-dev Jan 16, 2022
460d528
Bugfix 467 author profile mobile adaptation (#710)
Dergelyova Feb 4, 2022
6cccaa1
Bugfix 444 mobile post cards are not adapted (#709)
Milichihin Feb 4, 2022
f157463
Added test for NewestMobile (#708)
Dergelyova Feb 4, 2022
34ccc84
Bugfix 465 mobile filter items disabling (#707)
IvanDanyliuk Feb 4, 2022
4d8147d
Bug fix(#431) filter menu is not hidden after swiping (#706)
MrShushka Feb 4, 2022
31045f6
Changed burger menu appearance direction (#692)
IvanDanyliuk Feb 4, 2022
7e0edc6
Pictures for carousel functional (#711)
besizzo Feb 4, 2022
629fc4a
Bug410 search input mobile (#705)
besizzo Feb 4, 2022
d84baa0
tests adjusted, snapshots updated (#712)
besizzo Feb 7, 2022
48ca198
Merge branch 'release' into develop
Stacey-dev Feb 10, 2022
e9259a4
Rewrite snapshots (#717)
Stacey-dev Feb 10, 2022
2240ddb
Feature: Admin control panel (#719)
Stacey-dev Feb 22, 2022
a06e24b
fix: change button color (#718)
Stacey-dev Feb 22, 2022
7655184
Merge branch 'release' into develop
Stacey-dev Feb 23, 2022
d22a8aa
bug fixed, posts cards are displayed now (#740)
besizzo Mar 25, 2022
b7dd1c9
bug fixed, layout adjusted (#739)
besizzo Mar 25, 2022
d4008d9
fixed date filter at admin table (#738)
MrShushka Mar 25, 2022
8e191a1
sorting by author added (#737)
MrShushka Mar 25, 2022
8830ae8
file adjusted (#736)
besizzo Mar 25, 2022
4f15bb8
bugfix536 uncropped tittle (#735)
besizzo Mar 25, 2022
eddcf72
bugfix526 reset filters btn (#733)
besizzo Mar 25, 2022
641ed15
Bugfix514 editor save button (#732)
besizzo Mar 25, 2022
b7fcdac
bug fixed (#728)
besizzo Mar 25, 2022
a4ad8a1
bug fixed (#726)
besizzo Mar 25, 2022
e8be295
bugfix508 - relocate materials table to the admin page (#724)
besizzo Mar 25, 2022
72431cf
year on footer changed to 2022 (#722)
besizzo Mar 25, 2022
4329afe
Admin table styling fix (#742)
besizzo Apr 1, 2022
198b65f
bug fixed (#725)
besizzo Apr 1, 2022
c568cde
bug fixed (#723)
besizzo Apr 1, 2022
a52747f
bug fixed, tooltip added (#730)
besizzo Apr 1, 2022
f5b1f9c
Bugfix#519/537 buttons save&post in editor, refactoring for post crea…
Dergelyova Apr 2, 2022
3fab212
Epic#13 - Author (#743)
besizzo Apr 4, 2022
f00b29a
minor bug with title input in admin table is fixed (#744)
besizzo Apr 4, 2022
8e0dff1
Merge release to develop
Dergelyova Apr 5, 2022
53d5606
bugfix 402 - confirmation window buttons text adjusted (#747)
besizzo Apr 6, 2022
a02e933
Bugfix560 experts cards view mobile (#758)
Dergelyova Apr 21, 2022
a503e26
bugfix561 minor grammar fix (#757)
besizzo Apr 21, 2022
5b12cc6
US557 carousel card redesign (#755)
besizzo Apr 21, 2022
6e9cb93
Bugfix511 (admin table width adjusted) (#754)
besizzo Apr 21, 2022
59a8380
US 551-552: redesigned delete edit buttons (#753)
Dergelyova Apr 21, 2022
d99e898
bug fixed (#751)
besizzo Apr 21, 2022
a87fc7f
fixed AdminTable Date Filter view (#750)
Dergelyova Apr 21, 2022
4b8ba43
Bugfix550 Adjusted mobile carousel height (#749)
Dergelyova Apr 21, 2022
3a3b011
bug fixed, placeholder text adjusted (#748)
besizzo Apr 21, 2022
d93c520
Bugfix514 revision (editor save button) (#752)
besizzo May 3, 2022
a7d902c
Bugfix558: fixed filter checkbox on materials page (#759)
Dergelyova May 3, 2022
6050b9c
Merge branch 'release' into develop
Dergelyova May 3, 2022
2b98966
Merge remote-tracking branch 'origin/release' into develop
Dergelyova Jun 22, 2022
2a46416
Issue 598 (author) send material for moderation (#775)
Dergelyova Aug 18, 2022
b8a93bd
fix: layout (#774)
Olenka-Yurchuk Aug 18, 2022
da603d9
Bugfix 562 authors not sorting (#773)
Olenka-Yurchuk Aug 18, 2022
e890028
bugfix_590 (#772)
KostiantynSoloviov Aug 18, 2022
f170ca8
fix: bug_147 clicking on the video card image (#771)
Olenka-Yurchuk Aug 18, 2022
b73af3b
Bugfix_514 (#770)
KostiantynSoloviov Aug 18, 2022
b32269b
bugfix_373 (#769)
KostiantynSoloviov Aug 18, 2022
ddc45ec
bugfix_584 (#768)
KostiantynSoloviov Aug 18, 2022
ebe58e8
Test/tests for components (#767)
Olenka-Yurchuk Aug 18, 2022
0dd3e72
bugfix_588 (#766)
KostiantynSoloviov Aug 18, 2022
aa7b432
Admin tests (#765)
KostiantynSoloviov Aug 18, 2022
9b64bba
login options order adjusted (#764)
besizzo Aug 18, 2022
6b75225
bug fixed (#763)
besizzo Aug 18, 2022
0d096c3
bugfix514 revision (#761)
besizzo Aug 18, 2022
474d9e5
spelling in filters on materials page fixed (#762)
besizzo Aug 18, 2022
2ea3e4d
fix: user role is now transfered to creation buttons component (#776)
Dergelyova Aug 18, 2022
849bdec
fix(token): add logout if access token expired (#778)
Dergelyova Sep 5, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ export const UrlInputModal: React.FC<IUrlInputModalProps> = ({
/>

<DialogActions>
<Button onClick={handleClose} color="primary">
<Button variant="contained" onClick={handleClose}>
{t(langTokens.common.cancel)}
</Button>
<Button color="primary" type="submit">
<Button variant="contained" type="submit" disabled={!url}>
{t(langTokens.common.add)}
</Button>
</DialogActions>
Expand Down
42 changes: 42 additions & 0 deletions src/components/Form/Buttons/__tests__/BasicButton.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import userEvent, { TargetElement } from '@testing-library/user-event';
import React from 'react';
import { render } from '@testing-library/react';
import { BasicButton } from '../BasicButton';

describe('Test for BasicButton component.', () => {
it('Should renders a BasicButton with accept type.', () => {
const { container } = render(<BasicButton type="accept" />);

expect(container).toMatchSnapshot();
expect(container.firstChild).toHaveClass('BasicInput-basicAcceptButton-1');
});

it('Should renders a BasicButton with sign type.', () => {
const { container } = render(<BasicButton type="sign" />);

expect(container.firstChild).toHaveClass('BasicInput-basicSignButton-4');
});

it('Should handle onClick', () => {
const handleClick = jest.fn();
const { container } = render(
<BasicButton type="accept" onClick={handleClick} />,
);
userEvent.click(container.firstChild as TargetElement);
expect(handleClick).toBeCalled();
});

it('Should not be active when disabled.', () => {
const { container } = render(<BasicButton type="accept" disabled />);

const button = container.firstChild as TargetElement;
expect(button).toBeDisabled();
});

it('Should be label in the button', () => {
const label = 'text';
const { container } = render(<BasicButton type="accept" label={label} />);
const button = container.firstChild as TargetElement;
expect(button).toHaveTextContent(label);
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Test for BasicButton component. Should renders a BasicButton with accept type. 1`] = `
<div>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained BasicInput-basicAcceptButton-1 MuiButton-fullWidth"
tabindex="0"
type="submit"
>
<span
class="MuiButton-label"
/>
<span
class="MuiTouchRipple-root"
/>
</button>
</div>
`;
25 changes: 16 additions & 9 deletions src/components/Header/AccountMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ import { Avatar, Button, Typography } from '@material-ui/core';
import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown';
import { useTranslation } from 'react-i18next';
import { useStyles } from './AccountMenu.styles';
import { StyledMenu, StyledMenuItem } from '../../old/lib/components/Menu/StyledMenu';
import { getUserAsyncAction, selectCurrentUser, signOutAction } from '../../models/user';
import {
StyledMenu,
StyledMenuItem,
} from '../../old/lib/components/Menu/StyledMenu';
import {
getUserAsyncAction,
selectCurrentUser,
signOutAction,
} from '../../models/user';
import { useActions } from '../../shared/hooks';
import { AuthContext } from '../../old/provider/AuthProvider/AuthContext';
import { AccountIcon } from '../../old/lib/components/icons/AccountIcon';
Expand Down Expand Up @@ -88,13 +95,6 @@ export const AccountMenu: React.FC = () => {
</Typography>
</StyledMenuItem>
</Link>
<Link to="/">
<StyledMenuItem onClick={onLogoutHandler}>
<Typography variant="button" color="inherit">
{t(langTokens.common.exit)}
</Typography>
</StyledMenuItem>
</Link>
{authorities ? (
<Link to="/admin">
<StyledMenuItem onClick={handleClose}>
Expand All @@ -104,6 +104,13 @@ export const AccountMenu: React.FC = () => {
</StyledMenuItem>
</Link>
) : null}
<Link to="/">
<StyledMenuItem onClick={onLogoutHandler}>
<Typography variant="button" color="inherit">
{t(langTokens.common.exit)}
</Typography>
</StyledMenuItem>
</Link>
</StyledMenu>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/__test__/AccountMenu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('should render AccountMenu component', () => {

it("should log out from current user profile by clicking on the button 'Вийти'", () => {
openAccounMenu();
menuLinkClick(1);
menuLinkClick(2);
expect(AuthContextMock.removeAuthorization).toHaveBeenCalled();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const VideoPostPreviewCard: React.FC<IPostPreviewCardProps> = ({
<Box className={classes.play} data-testid="videoIcon" />
)}
<iframe
style={{ pointerEvents: post.videoUrl ? 'inherit' : 'none' }}
src={url}
width="100%"
height="100%"
Expand Down
8 changes: 4 additions & 4 deletions src/components/Posts/PostInfo/PostInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ export interface IPostInfo {
origins: IOrigin[];
type: IPostType;
publishedAt: string;
realViews?: number;
displayViews?: number;
};
}

export default function PostInfo({ info }: IPostInfo): JSX.Element {
const { directions, origins, type, publishedAt, realViews } = info;
const { directions, origins, type, publishedAt, displayViews } = info;
const classes = useStyles();
const history = useHistory();

Expand Down Expand Up @@ -71,10 +71,10 @@ export default function PostInfo({ info }: IPostInfo): JSX.Element {
<VisibilityIcon fontSize="small" />
</li>
<li className={classes.counter} data-testid="counter">
{realViews === undefined ? (
{displayViews === undefined ? (
<Skeleton width={40} height={20} data-testid="skeleton" />
) : (
realViews
displayViews
)}
</li>
</>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Posts/PostInfo/__tests__/PostInfo.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('PostInfo tests', () => {
name: 'Стаття',
},
publishedAt: '05.10.2021',
realViews: 9,
displayViews: 9,
},
};
});
Expand Down Expand Up @@ -122,7 +122,7 @@ describe('PostInfo tests', () => {
});

it('should Skeleton be visible', () => {
delete mocks.info.realViews;
delete mocks.info.displayViews;

const { asFragment } = render(<PostInfo info={mocks.info} />);

Expand Down
2 changes: 2 additions & 0 deletions src/locales/uk/parts/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ export const admin = {
imagesTablet: 'Зображення для планшета',
review: 'Переглянути',
sendForReview: 'Відправити на модерацію',
sendForReviewTitle: 'Відправити публікацію на модерацію?',
sendForReviewSuccess: 'Ваша стаття була успішно відправлена на модерацію',
close: 'Закрити',
selectedImportantMaterials: 'Зараз використовуються:',
selectOption: `Оберіть об'єкт налаштування у меню`,
Expand Down
1 change: 1 addition & 0 deletions src/locales/uk/parts/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const editor = {
preview: 'Попередній перегляд',
publish: 'Опублікувати',
save: 'Зберегти',
sendToReview: 'Відправити на модерацію',
creation: 'Створення',
updation: 'Редагування',
videoTitle: 'Заголовок відео',
Expand Down
5 changes: 3 additions & 2 deletions src/models/experts/asyncActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ export const fetchExperts = createAsyncThunk(
params: {
page,
size: LOAD_EXPERTS_LIMIT,
regions: regions.some(region => region === 0) ? [] : regions,
directions: directions.some(dir => dir === 0) ? [] : directions,
regions: regions.some((region) => region === 0) ? [] : regions,
directions: directions.some((dir) => dir === 0) ? [] : directions,
sort: 'lastName',
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ export const useStyles = makeStyles(
container: {
overflowX: 'auto',
paddingTop: '10px',
display: 'grid',
gridTemplateColumns: '200px 1fr',
margin: '0 -50px',
},
}),
{ name: 'AdminPageWrapper' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const useStyles = makeStyles(
fontFamily: 'Raleway',
position: 'relative',
minHeight: '455px',
paddingLeft: '110px',
'& .adminInitialView': {
position: 'absolute',
top: '30%',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const useStyles = makeStyles(
},
'& input': {
padding: '3px 0 7px',
MozAppearance: 'textfield',
},
}),
previwTitle: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const useStyles = makeStyles(
height: '100%',
paddingTop: theme.spacing(2),
backgroundColor: '#e5e5e5',
position: 'absolute',
position: 'static',
border: 'none',
},
menuCategory: {
Expand Down
8 changes: 8 additions & 0 deletions src/old/lib/utilities/API/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ instance.interceptors.request.use(
);

instance.interceptors.response.use(undefined, (error: AxiosError) => {
const jwtToken = getToken();

if (error.message === 'Network Error' && !error.response) {
toast.error("The server isn't responding...");
}
Expand All @@ -58,6 +60,12 @@ instance.interceptors.response.use(undefined, (error: AxiosError) => {
throw error;
}

if (error.response.status === 401 && jwtToken) {
localStorage.removeItem('ACCESS_TOKEN');
localStorage.removeItem('PERMISSIONS');
document.location.href = '/opendoctorgate';
}

if (error.response.status === 500) {
toast.error('A server error occurred...');
}
Expand Down
2 changes: 1 addition & 1 deletion src/old/modules/materials/components/MaterialsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const MaterialsView: React.FC = () => {
const translations = {
'1': `${t(langTokens.common.article_1, defaultPlural)}`,
'2': `${t(langTokens.common.video)}`,
'3': `${t(langTokens.common.note, defaultPlural)}`,
'3': `${t(langTokens.common.post_1, defaultPlural)}`,
};
const translatedPostType = { ...postType };
translatedPostType.name = translations[postType.id] || postType.name;
Expand Down
4 changes: 4 additions & 0 deletions src/old/modules/materials/styles/MaterialsView.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export const useStyles = makeStyles<Theme, IStyleProps>(
lineHeight: '28px',
fontWeight: 'bold',
backgroundColor: theme.palette.primary.light,
zIndex: 'auto',
},

selectedFilters: {
margin: '0px 15px 15px 0px',
fontFamily: 'Raleway',
Expand Down Expand Up @@ -67,6 +69,8 @@ export const useStyles = makeStyles<Theme, IStyleProps>(
scrollabelContainer: {
position: 'sticky',
top: 80 + top,
backgroundColor: theme.palette.primary.light,
zIndex: 1,
overflowY: 'hidden',
maxHeight: ({ pageYOffset }) =>
`calc(100vh + ${
Expand Down
2 changes: 1 addition & 1 deletion src/old/modules/posts/components/PostView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const PostView: React.FC<IPostViewProps> = ({ isPreview, post, onDelete }) => {
origins: post.origins,
type: post.type,
publishedAt: post.publishedAt,
realViews: post.realViews,
displayViews: post.views,
videoUrl: post.videoUrl,
};

Expand Down
20 changes: 20 additions & 0 deletions src/views/Profile/AdminTable/ActionButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ const ActionButtons: React.FC<IActionButtons> = ({
closeModal();
};

const handleSendToReviewConfirm = () => {
boundedSetPostStatus({
id,
postStatus: StatusesForActions.MODERATION_SECOND_SIGN,
});
toast.success(t(langTokens.admin.sendForReviewSuccess));
closeModal();
};

const handleReturnConfirm = () => {
boundedSetPostStatus({
id,
Expand Down Expand Up @@ -159,6 +168,17 @@ const ActionButtons: React.FC<IActionButtons> = ({
onConfirmButtonClick: handlePublishConfirm,
},
adminUseStatuses: [MODERATION_SECOND_SIGN, ARCHIVED, PLANNED],
authorUseStatuses: [],
},
{
id: 'sentToModerationBtn',
label: t(langTokens.admin.sendForReview),
handler: (btnId) => openModal(btnId),
modal: {
title: t(langTokens.admin.sendForReviewTitle),
onConfirmButtonClick: handleSendToReviewConfirm,
},
adminUseStatuses: [],
authorUseStatuses: [DRAFT, NEEDS_EDITING],
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/views/Profile/AdminTable/AdminDatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const AdminDatePicker: React.FC<IMaterialsDate> = ({

return (
<div>
<FormControl>
<FormControl data-testid="select">
<Select
multiple
value={[]}
Expand Down
2 changes: 1 addition & 1 deletion src/views/Profile/AdminTable/AdminTextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import FormControl from '@material-ui/core/FormControl';
import TextField from '@material-ui/core/TextField';
import { FieldEnum, IField } from '../../../models/adminLab/types';


interface IMaterialsTextField {
field: FieldEnum;
setChanges: (payload: IField) => void;
Expand All @@ -29,6 +28,7 @@ export const AdminTextField: React.FC<IMaterialsTextField> = ({
return (
<FormControl>
<TextField
data-testid="admin-text-filter"
type="text"
value={inputValue}
placeholder={placeholder}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const ChangeViewsCountModal: React.FC<IChangeViewsCountModal> = ({ id }) => {
}, []);

const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {
const viewsCount = event.target.value.replace(/\D/g, '');
const viewsCount = event.target.valueAsNumber;
boundSetFakeViewsInput({ fakeViews: viewsCount });
};

Expand All @@ -35,6 +35,7 @@ const ChangeViewsCountModal: React.FC<IChangeViewsCountModal> = ({ id }) => {
variant="outlined"
value={fakeViews}
onChange={handleInputChange}
InputProps={{ inputProps: { min: 0 } }}
/>
</Box>
);
Expand Down
Loading