Skip to content

Commit

Permalink
Minor style and dependencies updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
GhaziTriki committed Jul 24, 2023
1 parent 56b0f88 commit 8ddbbde
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 61 deletions.
106 changes: 66 additions & 40 deletions bbbeasy-backend/composer.lock

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions bbbeasy-frontend/src/components/LanguagesBBB.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,4 @@ export const LanguagesBBB: LanguageType[] = [
{ name: 'Vietnamese (Vietnam)', key: 'vi-VN', value: 'Vietnamese (Vietnam)' },
{ name: 'Chinese Simplified (China)', key: 'zh-CN', value: 'Chinese Simplified (China)' },
{ name: 'Chinese Traditional (Taiwan)', key: 'zh-TW', value: 'Chinese Traditional (Taiwan)' },

];

27 changes: 14 additions & 13 deletions bbbeasy-frontend/src/components/Presets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ import {
InputNumber,
Space,
Dropdown,
Menu, Select,
Menu,
Select,
} from 'antd';
import {
CheckOutlined,
Expand Down Expand Up @@ -78,7 +79,7 @@ import { UploadFile } from 'antd/lib/upload/interface';
import type { Color } from 'antd/es/color-picker';
import ReactDomServer from 'react-dom/server';
import { getType } from 'react-styleguidist/lib/client/rsg-components/Props/util';
import {LanguagesBBB} from "./LanguagesBBB";
import { LanguagesBBB } from './LanguagesBBB';
const { Title } = Typography;

interface PresetColProps {
Expand Down Expand Up @@ -433,10 +434,12 @@ const PresetsCol: React.FC<PresetColProps> = ({
{modalContent.map((item) => (
<div key={modalTitle + '_' + item.name}>
<Form.Item
label={ item.name.length > 30 ?
<div className="white-space">
{t(item.name)}
</div> : t(item.name)
label={
item.name.length > 30 ? (
<div className="white-space">{t(item.name)}</div>
) : (
t(item.name)
)
}
name={item.name}
>
Expand Down Expand Up @@ -540,15 +543,13 @@ const PresetsCol: React.FC<PresetColProps> = ({
/>
)}


{item.type === 'select' && (
<Select
defaultValue={item.value}
options={
LanguagesBBB.map((language) => ({
label: language.name,
value: language.value,
}))}
options={LanguagesBBB.map((language) => ({
label: language.name,
value: language.value,
}))}
onChange={(event) => {
item.value = event;
console.log(event);
Expand Down Expand Up @@ -739,4 +740,4 @@ const Presets = () => {
);
};

export default withTranslation()(Presets);
export default withTranslation()(Presets);
11 changes: 7 additions & 4 deletions bbbeasy-frontend/src/components/Step3Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,15 @@ export const Step3Form = (props: Props) => {
<div key={modalTitle + '_' + item.name}>
{item.name != modalTitle && (
<Form.Item
label=
{ item.name.length > 30 ?
label={
item.name.length > 30 ? (
<div className="white-space">
<Trans i18nKey={item.name} />
</div> : <Trans i18nKey={item.name} />
}
</div>
) : (
<Trans i18nKey={item.name} />
)
}
valuePropName="checked"
name={item.name}
>
Expand Down
1 change: 0 additions & 1 deletion bbbeasy-frontend/src/locale/ar-TN.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,5 +403,4 @@
"status_presets_inactive": "عاطل",
"availability": "التوفر",
"record": "سجل"

}
1 change: 0 additions & 1 deletion bbbeasy-frontend/src/locale/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,5 +403,4 @@
"status_presets_inactive": "Inactif",
"availability": "Disponibilité",
"record": "Enregistrer"

}

0 comments on commit 8ddbbde

Please sign in to comment.