update delete & edit data

This commit is contained in:
Raja Oktafrianto
2025-03-19 09:44:25 +07:00
parent 2909fadc01
commit 621cae6694
3 changed files with 4 additions and 3 deletions

View File

@ -162,6 +162,7 @@ const EditDialog = () => {
doFetchPostoAdms([{ id: 'name', desc: false }]);
}, []);
console.log(selectedSucos);
return (
<Dialog open={showEditDialog} onOpenChange={(open) => handleEditDialog(open, null)}>
<DialogContent className="container-fixed max-w-[768px] flex flex-col p-5 overflow-hidden">

View File

@ -16,7 +16,7 @@ const ListToolbar = () => {
<input
type="text"
placeholder="Search Sucos"
value={table.getColumn(`sucos_id`)?.getFilterValue() as string}
value={table.getColumn(`id`)?.getFilterValue() as string}
onChange={(event) =>
table.getColumn('sucos_name')?.setFilterValue(event.target.value)
}

View File

@ -126,13 +126,13 @@ const ManageSucosContextProvider = ({ children }: { children: React.ReactNode })
<>
<button
className="btn btn-sm btn-icon btn-clear btn-light"
onClick={() => handleEditDialog(true, row.id)}
onClick={() => handleEditDialog(true, row.sucos_id)}
>
<KeenIcon icon="notepad-edit" />
</button>
<button
className="btn btn-sm btn-icon btn-clear btn-light"
onClick={() => handleDeleteDialog(true, row.id)}
onClick={() => handleDeleteDialog(true, row.sucos_id)}
>
<KeenIcon icon="trash" />
</button>