fix key
This commit is contained in:
parent
b6fb78d9dc
commit
1d113ad047
|
|
@ -41,7 +41,7 @@ function Page() {
|
||||||
<div className='RightSide d-flex gap-2 align-center '>
|
<div className='RightSide d-flex gap-2 align-center '>
|
||||||
<SelectField selectBy="type" lebel="type" option={typeselect} />
|
<SelectField selectBy="type" lebel="type" option={typeselect} />
|
||||||
|
|
||||||
<AddButton onClick={()=>navigate('/key/add')}></AddButton>
|
{/* <AddButton onClick={()=>navigate('/key/add')}></AddButton> */}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,13 @@ function Form() {
|
||||||
return (
|
return (
|
||||||
<Row xs={1} sm={1} md={1} lg={2} xl={2}>
|
<Row xs={1} sm={1} md={1} lg={2} xl={2}>
|
||||||
<Col>
|
<Col>
|
||||||
<ValidationField name="key" />
|
<ValidationField name="key" isDisabled />
|
||||||
|
|
||||||
|
|
||||||
|
</Col>
|
||||||
|
<Col>
|
||||||
|
{/* <ValidationField name="type" type='Select' option={typeselect} /> */}
|
||||||
|
|
||||||
{valueType === "text"
|
{valueType === "text"
|
||||||
?
|
?
|
||||||
<ValidationField name="value" />
|
<ValidationField name="value" />
|
||||||
|
|
@ -46,13 +52,7 @@ function Form() {
|
||||||
<ValidationField type='File' name="value" />
|
<ValidationField type='File' name="value" />
|
||||||
|
|
||||||
}
|
}
|
||||||
|
{/* <ValidationField name="value_type" onChange={handelchange} type='Select' option={typeValueselect} /> */}
|
||||||
|
|
||||||
</Col>
|
|
||||||
<Col>
|
|
||||||
<ValidationField name="type" type='Select' option={typeselect} />
|
|
||||||
|
|
||||||
<ValidationField name="value_type" onChange={handelchange} type='Select' option={typeValueselect} />
|
|
||||||
|
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ export const getInitialValues = (objectToEdit: any | null = null): any => {
|
||||||
key: objectToEdit?.key ,
|
key: objectToEdit?.key ,
|
||||||
type: objectToEdit?.type ,
|
type: objectToEdit?.type ,
|
||||||
value: objectToEdit?.value ,
|
value: objectToEdit?.value ,
|
||||||
value_type: objectToEdit?.value.startsWith("/") ? "image" : "text" ,
|
value_type: objectToEdit?.key === "home_main_image" ? "image" : "text" ,
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,8 @@ const useTableColumns :any = () => {
|
||||||
showEdit
|
showEdit
|
||||||
onEdit={()=> navigate(`/key/${row.id}`) }
|
onEdit={()=> navigate(`/key/${row.id}`) }
|
||||||
showView={false}
|
showView={false}
|
||||||
onDelete={() => deleteMutation.mutate({ id: row.id })}
|
showDelete={false}
|
||||||
|
// onDelete={() => deleteMutation.mutate({ id: row.id })}
|
||||||
>
|
>
|
||||||
</Actions>
|
</Actions>
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user