add crud municipio

This commit is contained in:
Wikzyy
2025-03-03 11:59:32 +07:00
parent 84408ac869
commit e6cf8106c8
7 changed files with 338 additions and 22 deletions

View File

@ -21,7 +21,7 @@ import {
SelectValue
} from '@/components/ui/select';
interface PostoAdms {
interface PostoAdmsProps {
id: number;
name: string;
}
@ -44,7 +44,7 @@ const SearchDialog = () => {
const resetForm = () => {
setFormField(initialState);
};
const [postoadms, setPostoadms] = useState<PostoAdms[]>([]);
const [postoadms, setPostoadms] = useState<PostoAdmsProps[]>([]);
const [isFound, setIsFound] = useState(false);
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
@ -62,7 +62,7 @@ const SearchDialog = () => {
if (response.data.status) {
setPostoadms(response.data.data);
setIsFound(true);
console.log('Found postoadms: ', response.data.data);
// console.log('Found postoadms: ', response.data.data);
} else {
setPostoadms([]);
setIsFound(false);
@ -147,7 +147,7 @@ const SearchDialog = () => {
{isFound && postoadms.length > 0 && (
<div className="mt-4 border-t pt-4">
<h2 className="text-md font-semibold">Postu Administravo: </h2>
<h2 className="text-md font-semibold">Sucos: </h2>
<br />
<div className="flex flex-col">
<span className="text-sm form-hint">