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

fix: solve issue with operations menu and bootstrap #965

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 src/packages/application/app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Link } from 'react-router-dom';
import D from '../deprecated-locales';
import 'primereact/resources/themes/lara-light-blue/theme.css';
import '../styles/bootstrap.css';
import '../styles/bootstrap.scss';
import './app.scss';
import { useTitle } from '../utils/hooks/useTitle';
import { useAppContext } from './app-context';
Expand Down
4 changes: 2 additions & 2 deletions src/packages/components/layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ export const Column = ({ children }: PropsWithChildren<{}>) => {
return <div className="col-md-6">{children}</div>;
};

export const Row = ({ children }: PropsWithChildren<{}>) => (
<div className="row bauhaus-row">{children}</div>
export const Row = ({ children, className = '' }: PropsWithChildren<{ className: string}>) => (
<div className={`row ${className}`}>{children}</div>
);
8 changes: 2 additions & 6 deletions src/packages/modules-classifications/edition/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ export const ClassificationEdition = () => {
<Row>
<div className="col-md-6 form-group">
<LabelRequired htmlFor="prefLabelLg1">{D1.title}</LabelRequired>
<input
type="text"
className="form-control"
<TextInput
id="prefLabelLg1"
{...register('prefLabelLg1', { required: D.requiredPrefLabel })}
defaultValue={classification.general.prefLabelLg1}
Expand All @@ -122,10 +120,8 @@ export const ClassificationEdition = () => {
</div>
<div className="col-md-6 form-group">
<LabelRequired htmlFor="prefLabelLg2">{D2.title}</LabelRequired>
<input
<TextInput
id="prefLabelLg2"
className="form-control"
type="text"
{...register('prefLabelLg2', { required: D.requiredPrefLabel })}
defaultValue={classification.general.prefLabelLg2}
aria-describedby="prefLabelLg2-error"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ import { useState } from 'react';
import D from '../../../deprecated-locales';
import { CLOSE_MATCH } from '../../../sdk/constants';
import './equivalentLinks.scss';
import { TextInput } from '../../../components';
export const EquivalentLinks = ({ links = [], updateEquivalentLinks }) => {
const [value, setValue] = useState('');
return (
<div className="equivalentLinks">
<div className="row">
<div className="col-md-12">
<div className="form-group">
<input
<TextInput
placeholder={D.btnNewLink}
aria-label={D.btnNewLink}
className="form-control"
value={value}
onChange={(e) => setValue(e.target.value)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import D, { D1, D2 } from '../../i18n/build-dictionary';
import SimsGeographyI18NLabel from './sims-geography-i18n-label';
import SimsGeographySelector from './sims-geography-selector';
import { useGeographies } from './hooks';
import { ErrorBloc, Row } from '../../../components';
import { ErrorBloc, Row, TextInput } from '../../../components';
import { GeographieApi } from '../../../sdk/geographie';
import LabelRequired from '../../../components/label-required';
import { ActionToolbar } from '../../../components/action-toolbar';
Expand Down Expand Up @@ -82,19 +82,17 @@ const SimsGeographyField = ({ onCancel, onSave, territory = {} }) => {
<LabelRequired className="form-label w-100">
{D1.simsGeographyZoneName}
</LabelRequired>
<input
<TextInput
value={name}
className="form-control"
onChange={(e) => setName(e.target.value)}
/>
</div>
<div className="form-group col-md-6">
<LabelRequired className="form-label w-100">
{D2.simsGeographyZoneName}
</LabelRequired>
<input
<TextInput
value={nameLg2}
className="form-control"
onChange={(e) => setNameLg2(e.target.value)}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/packages/modules-operations/menu/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class MenuOperations extends Component {
},
operations: {
path: '/operations/operations',
pathKey: /operations\/operations/,
pathKey: /operations\/operation/,
className: 'active',
attrs: defaultAttrs,
order: 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { getBaseURI } from '../../../../sdk';
import { sortArray } from '../../../../utils/array-utils';
import { getLang } from '../../../../utils/dictionnary';
import { useDocumentsStoreContext } from '../../pages/sims-creation/documents-store-context';
import { TextInput } from '../../../../components';

function getAsideToTheDocument(document) {
let updatedDate;
Expand Down Expand Up @@ -148,8 +149,7 @@ export function DocumentsBloc({
<label className="sr-only" htmlFor="documentFilter">
{D.search}
</label>
<input
className="form-control"
<TextInput
id="documentFilter"
placeholder={D.search}
value={filter}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class OperationsOperationEdition extends Component {
{serverSideError && <ErrorBloc error={serverSideError} D={D} />}
<form>
{!isEditing && (
<Row>
<Row className="bauhaus-row">
<div className="form-group">
<LabelRequired>{D.serieTitle}</LabelRequired>
<Select
Expand All @@ -165,7 +165,7 @@ class OperationsOperationEdition extends Component {
</div>
</Row>
)}
<Row>
<Row className="bauhaus-row">
<div className="form-group">
<LabelRequired htmlFor="prefLabelLg1">{D1.title}</LabelRequired>
<TextInput
Expand Down Expand Up @@ -207,7 +207,7 @@ class OperationsOperationEdition extends Component {
></ClientSideError>
</div>
</Row>
<Row>
<Row className="bauhaus-row">
<div className="form-group">
<label htmlFor="altLabelLg1">{D1.altLabel}</label>
<TextInput
Expand Down
Loading