update title

This commit is contained in:
Wikzyy
2025-04-09 14:28:02 +07:00
parent 01a77f0067
commit c52db0a6e5
21 changed files with 120 additions and 142 deletions

View File

@ -75,7 +75,6 @@ const ManageMunicipiosProvider = ({ children }: { children: React.ReactNode }) =
const [selectedMunicipios, setSelectedMunicipios] = useState<string | null>(null);
const [municipios, setMunicipios] = useState<MunicipiosProps[]>([]);
const { GetData } = useCallApi();
const navigate = useNavigate();
const handleSearchDialog = useCallback((show: boolean) => {
setShowSearchDialog(show);
@ -95,18 +94,13 @@ const ManageMunicipiosProvider = ({ children }: { children: React.ReactNode }) =
setShowDeleteDialog(show);
}, []);
const handleNavigate = (path: string) => {
const url = navigate(`${API_URL}/municipios/postoadms/${path}`);
console.log(url);
};
const columns = useMemo<ColumnDef<any>[]>(
() => [
{
// accessorFn: (row) => row.name,
// id: 'name',
accessorKey: 'name',
header: ({ column }) => <DataGridColumnHeader title="Municipios Name" column={column} />,
header: ({ column }) => <DataGridColumnHeader title="Municipio Name" column={column} />,
enableSorting: true,
enableHiding: false,
meta: {
@ -158,12 +152,6 @@ const ManageMunicipiosProvider = ({ children }: { children: React.ReactNode }) =
order_direction: sorting[0].desc == false ? 'ASC' : 'DESC',
filter: JSON.stringify(filter)
});
// console.log(response?.data);
// const sortedList = response.data.data.list.sort((a: MunicipiosProps, b: MunicipiosProps) => {
// if (a.name < b.name) return -1;
// if (a.name > b.name) return 1;
// return 0;
// });
setMunicipios(response?.data.list);
return { data: response?.data.list, totalCount: response?.data.total_count };
} catch (error) {