change function of fliter sort, modal and locate set new data and change it and update

This commit is contained in:
Ehsan
2025-09-12 09:39:48 +03:30
parent d04aa8568d
commit dbef29b9d9
18 changed files with 371 additions and 235 deletions
@@ -1,14 +1,14 @@
import { FormControlLabel, Switch } from "@mui/material";
function SwitchContent({ data, changeData }) {
function SwitchContent({ filter, updateData }) {
return (
<div className="flex items-center justify-start gap-[12px]">
<FormControlLabel
control={
<Switch
checked={data.turn}
checked={filter.active}
onChange={(event) =>
changeData(event.target.checked ? 1 : 0, "turn", false, "turn")
updateData("active", event.target.checked ? 1 : 0)
}
/>
}