Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmanuelDemey committed Nov 28, 2024
1 parent 8bd0479 commit 3562453
Show file tree
Hide file tree
Showing 19 changed files with 44 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { CheckSecondLang } from '@components/check-second-lang';
import { Row } from '@components/layout';
import { PageTitle } from '@components/page-title';
import { Tree } from '@components/tree';

import { useTitle } from '@utils/hooks/useTitle';

import { Tree } from '../../../components/tree';
import D from '../../../deprecated-locales';
import Controls from './controls';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { useCallback, useEffect, useState } from 'react';

import { ActionToolbar } from '@components/action-toolbar';
import { SaveButton } from '@components/buttons/buttons-with-icons';
import { TextInput } from '@components/form/input';
import LabelRequired from '@components/label-required';
import { Row } from '@components/layout';
import { AddLogo } from '@components/logo/logo-add';
import Select from '@components/select-rmes';

Expand All @@ -11,7 +13,6 @@ import {
ErrorBloc,
GlobalClientSideErrorBloc,
} from '../../../../utils';
import { Row, TextInput } from '../../../components';
import D, { D1, D2 } from '../../i18n/build-dictionary';
import { validateCode } from '../../utils';
import './edit.scss';
Expand Down
10 changes: 6 additions & 4 deletions src/packages/modules-codelists/components/code-detail/view.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { ActionToolbar } from '@components/action-toolbar';
import { ReturnButton } from '@components/buttons/buttons-with-icons';
import { ErrorBloc } from '@components/errors-bloc';
import { Row } from '@components/layout';
import { Note } from '@components/note';

import { HTMLUtils } from '../../../../utils';
import { ErrorBloc, Row } from '../../../components';
import { renderMarkdownElement } from '@utils/html-utils';

import D, { D1, D2 } from '../../i18n/build-dictionary';
import './view.scss';

Expand All @@ -15,8 +17,8 @@ export const CodeDetailView = ({
col = 3,
serverSideError,
}) => {
const descriptionLg1 = HTMLUtils.renderMarkdownElement(code.descriptionLg1);
const descriptionLg2 = HTMLUtils.renderMarkdownElement(code.descriptionLg2);
const descriptionLg1 = renderMarkdownElement(code.descriptionLg1);
const descriptionLg2 = renderMarkdownElement(code.descriptionLg2);

const codesOptions = codes.map((code) => {
return {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { Column } from 'primereact/column';
import { useEffect, useState } from 'react';

import { DataTable } from '@components/datatable';
import {
ClientSideError,
GlobalClientSideErrorBloc,
} from '@components/errors-bloc';
import { TextInput } from '@components/form/input';
import LabelRequired from '@components/label-required';
import { Row } from '@components/layout';
import { RightSlidingPanel } from '@components/sliding-panel';

import { DataTable } from '../../../components/datatable';
import { RightSlidingPanel } from '../../../components/sliding-panel';
import { API } from '../../apis';
import D, { D1, D2 } from '../../i18n/build-dictionary';
import { validateCode } from '../../utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { Loading } from '@components/loading';
import { FeminineButton } from '@components/new-button';
import { PageTitle } from '@components/page-title';
import { SearchableList } from '@components/searchable-list';
import { VerticalMenu } from '@components/vertical-menu';

import { useTitle } from '@utils/hooks/useTitle';

import Auth from '../../../auth/components/auth';
import { ADMIN } from '../../../auth/roles';
import { VerticalMenu } from '../../../components/vertical-menu';
import { API } from '../../apis';
import D from '../../i18n/build-dictionary';
import { formatLabel } from '../../utils';
Expand Down
3 changes: 2 additions & 1 deletion src/packages/modules-codelists/menu/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { useLocation } from 'react-router-dom';

import { MainMenu } from '@components/menu';

import { ADMIN } from '../../auth/roles';
import { MainMenu } from '../../components/menu';
import { usePermission } from '../../redux/hooks/usePermission';
import D from '../i18n/build-dictionary';

Expand Down
4 changes: 2 additions & 2 deletions src/packages/modules-concepts/edition-creation/general.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { DatePicker } from '@components/date-picker';
import { DisseminationStatusInput } from '@components/dissemination-status/disseminationStatus';
import { ClientSideError } from '@components/errors-bloc';
import { TextInput } from '@components/form/input';
import { InputMultiRmes } from '@components/input-multi-rmes';
import { InputRmes } from '@components/input-rmes';
import { Row } from '@components/layout';
import { RequiredIcon } from '@components/required-icon';

import { InputMultiRmes } from '../../components/input-multi-rmes';
import D, { D1, D2 } from '../../deprecated-locales';
import { fields as generalFields } from '../../modules-concepts/utils/general';
import { fields as generalFields } from '../utils/general';

const handleFieldChange = (handleChange) =>
generalFields.reduce((handlers, fieldName) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Component } from 'react';

import { AddLogo } from '@components/logo/logo-add';
import { DelLogo } from '@components/logo/logo-del';
import { PickerItem } from '@components/picker-item';

import {
BROADER,
Expand All @@ -16,7 +17,6 @@ import {

import { filterDeburr } from '@utils/array-utils';

import { PickerItem } from '../../../components/picker-item';
import { D1 } from '../../../deprecated-locales';
import ConceptToLink from './concept-to-link';
import { EquivalentLinks } from './equivalentLinks';
Expand Down
3 changes: 2 additions & 1 deletion src/packages/modules-concepts/menu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useLocation } from 'react-router-dom';

import { MainMenu } from '../../components/menu';
import { MainMenu } from '@components/menu';

import D from '../../deprecated-locales';

const defaultAttrs = { 'aria-current': 'page' };
Expand Down
2 changes: 1 addition & 1 deletion src/packages/modules-datasets/datasets/edit/tabs/notes.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Row } from '@components/layout';
import { EditorMarkdown } from '@components/rich-editor/editor-markdown';

import { EditorMarkdown } from '../../../../components/rich-editor/editor-markdown';
import { D1, D2 } from '../../../../deprecated-locales';

export const Notes = ({ editingDataset, setEditingDataset }) => {
Expand Down
10 changes: 6 additions & 4 deletions src/packages/modules-datasets/distributions/edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ import LabelRequired from '@components/label-required';
import { Row } from '@components/layout';
import { Loading, Saving } from '@components/loading';
import { PageTitleBlock } from '@components/page-title-block';
import { EditorMarkdown } from '@components/rich-editor/editor-markdown';

import { DistributionApi } from '@sdk/index';

import { useGoBack } from '@utils/hooks/useGoBack';
import { useTitle } from '@utils/hooks/useTitle';

import { EditorMarkdown } from '../../components/rich-editor/editor-markdown';
import { D1, D2 } from '../../deprecated-locales';
import D from '../../deprecated-locales/build-dictionary';
import { DistributionApi } from '../../sdk';
import { useGoBack } from '../../utils/hooks/useGoBack';
import { useTitle } from '../../utils/hooks/useTitle';
import { useDatasetsForDistributions, useDistribution } from '../datasets';
import { ByteSizeInput } from './edit/byte-size-input';
import { validate } from './validation';
Expand Down
9 changes: 5 additions & 4 deletions src/packages/modules-operations/document/home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ import DOMPurify from 'dompurify';
import { useCallback, useEffect, useState } from 'react';
import { Link, useLocation, useNavigate } from 'react-router-dom';

import FilterToggleButtons from '@components/filter-toggle-buttons';
import { TextInput } from '@components/form/input';
import { Row } from '@components/layout';
import { NumberResults } from '@components/number-results';
import { PageTitle } from '@components/page-title';
import { Pagination } from '@components/pagination';

import FilterToggleButtons from '../../components/filter-toggle-buttons';
import { NumberResults } from '../../components/number-results';
import { filterKeyDeburr } from '@utils/array-utils';
import { useTitle } from '@utils/hooks/useTitle';

import D from '../../deprecated-locales';
import { filterKeyDeburr } from '../../utils/array-utils';
import { useTitle } from '../../utils/hooks/useTitle';
import { Menu } from './menu';
import { BOTH, DOCUMENT, LINK, isDocument, isLink } from './utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import LabelRequired from '@components/label-required';
import { Row } from '@components/layout';
import { Saving } from '@components/loading';
import { PageTitleBlock } from '@components/page-title-block';
import { EditorMarkdown } from '@components/rich-editor/editor-markdown';

import { OperationsApi } from '@sdk/operations-api';

import { EditorMarkdown } from '../../../components/rich-editor/editor-markdown';
import { D1, D2 } from '../../../deprecated-locales';
import D from '../../../deprecated-locales/build-dictionary';
import { validate } from './validation';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ActionToolbar } from '../../../../components/action-toolbar';
import { ActionToolbar } from '@components/action-toolbar';
import {
CancelButton,
SaveButton,
} from '../../../../components/buttons/buttons-with-icons';
} from '@components/buttons/buttons-with-icons';

type MenuTypes = {
goBackUrl: () => void;
Expand Down
2 changes: 1 addition & 1 deletion src/packages/modules-operations/series/edition/edition.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ import LabelRequired from '@components/label-required';
import { Row } from '@components/layout';
import { Saving } from '@components/loading';
import { PageTitleBlock } from '@components/page-title-block';
import { EditorMarkdown } from '@components/rich-editor/editor-markdown';
import { Select } from '@components/select-rmes';

import { OperationsApi } from '@sdk/operations-api';

import * as ItemToSelectModel from '@utils/item-to-select-model';

import { EditorMarkdown } from '../../../components/rich-editor/editor-markdown';
import D, { D1, D2 } from '../../../deprecated-locales';
import {
CL_FREQ,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { Select } from '../../../components/select-rmes';
import { Select } from '@components/select-rmes';

import { useCodesList } from '@utils/hooks/codeslist';

import D from '../../../deprecated-locales';
import { Option } from '../../../model/SelectOption';
import { CL_SOURCE_CATEGORY } from '../../../redux/actions/constants/codeList';
import { useCodesList } from '../../../utils/hooks/codeslist';

type TypeCodeInputTypes = {
value: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Column } from 'primereact/column';

import { DataTable } from '../../../components/datatable';
import { DataTable } from '@components/datatable';

import D from '../../i18n/build-dictionary';

export const ComponentsTable = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { useCallback, useState } from 'react';

import { AddButton } from '@components/buttons/add';
import { SeeButton } from '@components/buttons/see';
import { RightSlidingPanel } from '@components/sliding-panel';

import { RightSlidingPanel } from '../../../components/sliding-panel';
import { UNPUBLISHED } from '../../../model/ValidationState';
import D from '../../i18n/build-dictionary';
import { typeUriToLabel } from '../../utils';
Expand Down
3 changes: 2 additions & 1 deletion src/packages/modules-structures/menu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { useMemo } from 'react';
import { useLocation } from 'react-router-dom';

import { MainMenu } from '../../components/menu';
import { MainMenu } from '@components/menu';

import D from '../../deprecated-locales';

const ACTIVE = 'active';
Expand Down

0 comments on commit 3562453

Please sign in to comment.