This commit is contained in:
karimalden 2024-07-28 14:54:08 +03:00
parent b6fb78d9dc
commit 1d113ad047
4 changed files with 12 additions and 11 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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" ,
};

View File

@ -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>
),