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 '>
|
||||
<SelectField selectBy="type" lebel="type" option={typeselect} />
|
||||
|
||||
<AddButton onClick={()=>navigate('/key/add')}></AddButton>
|
||||
{/* <AddButton onClick={()=>navigate('/key/add')}></AddButton> */}
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,13 @@ function Form() {
|
|||
return (
|
||||
<Row xs={1} sm={1} md={1} lg={2} xl={2}>
|
||||
<Col>
|
||||
<ValidationField name="key" />
|
||||
<ValidationField name="key" isDisabled />
|
||||
|
||||
|
||||
</Col>
|
||||
<Col>
|
||||
{/* <ValidationField name="type" type='Select' option={typeselect} /> */}
|
||||
|
||||
{valueType === "text"
|
||||
?
|
||||
<ValidationField name="value" />
|
||||
|
|
@ -46,13 +52,7 @@ function Form() {
|
|||
<ValidationField type='File' name="value" />
|
||||
|
||||
}
|
||||
|
||||
|
||||
</Col>
|
||||
<Col>
|
||||
<ValidationField name="type" type='Select' option={typeselect} />
|
||||
|
||||
<ValidationField name="value_type" onChange={handelchange} type='Select' option={typeValueselect} />
|
||||
{/* <ValidationField name="value_type" onChange={handelchange} type='Select' option={typeValueselect} /> */}
|
||||
|
||||
</Col>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export const getInitialValues = (objectToEdit: any | null = null): any => {
|
|||
key: objectToEdit?.key ,
|
||||
type: objectToEdit?.type ,
|
||||
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
|
||||
onEdit={()=> navigate(`/key/${row.id}`) }
|
||||
showView={false}
|
||||
onDelete={() => deleteMutation.mutate({ id: row.id })}
|
||||
showDelete={false}
|
||||
// onDelete={() => deleteMutation.mutate({ id: row.id })}
|
||||
>
|
||||
</Actions>
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user