Compare commits
2 Commits
dfa0992425
...
20378c7d0c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20378c7d0c | ||
|
|
d4771254c4 |
|
|
@ -3,6 +3,7 @@
|
|||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "^5.4.0",
|
||||
"@emotion/styled": "^11.11.0",
|
||||
"@mui/icons-material": "^5.14.19",
|
||||
"@react-google-maps/api": "^2.19.2",
|
||||
|
|
@ -31,6 +32,7 @@
|
|||
"i18next": "^23.6.0",
|
||||
"i18next-browser-languagedetector": "^7.1.0",
|
||||
"json-server": "^0.17.4",
|
||||
"prop-types": "^15.8.1",
|
||||
"react": "^18.2.0",
|
||||
"react-apexcharts": "^1.4.1",
|
||||
"react-bootstrap": "^2.9.1",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import React, { FC, useState } from "react";
|
||||
import { ErrorMessage, useField, Field } from "formik";
|
||||
import { FormGroup } from "reactstrap";
|
||||
import PropTypes from "prop-types";
|
||||
import { Eye, EyeOff } from "react-feather";
|
||||
import "./index.css";
|
||||
|
||||
|
|
@ -50,8 +49,5 @@ const PasswordField: FC<PasswordFieldProps> = ({ name, label, ...props }) => {
|
|||
);
|
||||
};
|
||||
|
||||
PasswordField.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export { PasswordField };
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
import React, { FC } from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import { HtmlEditor } from "./HtmlEditor";
|
||||
import { useFormikContext } from "formik";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
interface SingleLangEditorProps {
|
||||
langCode: number;
|
||||
property: string;
|
||||
}
|
||||
|
||||
const PROPERTY_TYPES: string[] = [
|
||||
"privacy_description",
|
||||
"conditions_description",
|
||||
"about_us_description",
|
||||
"product_description",
|
||||
"auction_description"
|
||||
];
|
||||
|
||||
const SingleLangEditor: FC<SingleLangEditorProps> = ({ langCode, property }) => {
|
||||
const formik:any = useFormikContext();
|
||||
const {t} = useTranslation();
|
||||
|
||||
const label = `${t(property)} (${t(`lang_${langCode}`)})`;
|
||||
const fieldName = `translated_fields[${langCode}][${property}]`;
|
||||
return (
|
||||
<>
|
||||
<h5 className="Information_title">{label}</h5>
|
||||
<HtmlEditor
|
||||
langCode={langCode}
|
||||
name={fieldName}
|
||||
editorState={formik.values.translated_fields[langCode][property]}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
SingleLangEditor.propTypes = {
|
||||
langCode: PropTypes.oneOf([1, 2]).isRequired,
|
||||
property: PropTypes.oneOf(PROPERTY_TYPES).isRequired,
|
||||
};
|
||||
|
||||
export default SingleLangEditor;
|
||||
|
|
@ -28,7 +28,7 @@ function FormStaticInfo({ isDisable = false }: { isDisable?: boolean }) {
|
|||
|
||||
</Col>
|
||||
<Col>
|
||||
<ValidationField name="value_type" option={valueTypeOptions || []} type="Select" label='value_type' placeholder='placeholder' />
|
||||
{/* <ValidationField name="value_type" option={valueTypeOptions || []} type="Select" label='value_type' placeholder='placeholder' /> */}
|
||||
|
||||
<ValidationField name="value" type={formik?.values?.value_type == 'image' ? 'File' : 'text'} label='value' placeholder='placeholder' />
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ function StaticInfoPage() {
|
|||
|
||||
return (
|
||||
// Pass Status to Layout
|
||||
<DashBody status={status as QueryStatusEnum} >
|
||||
<DashHeader title={'StaticInfo'}></DashHeader>
|
||||
<DashBody status={status as QueryStatusEnum} >
|
||||
<DashHeader showAddButton={false} title={'StaticInfo'}></DashHeader>
|
||||
|
||||
<LyTable
|
||||
data={data}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ const useTableColumns: any = () => {
|
|||
onView={() => {}}
|
||||
objectToEdit={row}
|
||||
showEdit={true}
|
||||
showDelete={false}
|
||||
showView={false}
|
||||
onDelete={() => deleteMutation.mutate({ id: row.id })}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user