fixed modified machines' programs
This commit is contained in:
@@ -14,7 +14,7 @@ export default function ProgramSelector({
|
||||
ubicacion,
|
||||
id,
|
||||
}: {
|
||||
ubicacion?: string | null;
|
||||
ubicacion?: number | null;
|
||||
id?: number | null;
|
||||
}) {
|
||||
const [programas, setProgramas] = useState<Programa[]>([]);
|
||||
@@ -56,7 +56,7 @@ export default function ProgramSelector({
|
||||
.map(Number);
|
||||
|
||||
try {
|
||||
if (ubicacion && ubicacion !== "0") {
|
||||
if (ubicacion) {
|
||||
await axios.patch(
|
||||
`${envConfig.apiUrl}/programa-equipo/equipo/${ubicacion}`,
|
||||
{
|
||||
@@ -121,7 +121,7 @@ export default function ProgramSelector({
|
||||
try {
|
||||
let res;
|
||||
|
||||
if (ubicacion && ubicacion !== "0") {
|
||||
if (ubicacion) {
|
||||
res = await axios.get(
|
||||
`${envConfig.apiUrl}/programa-equipo/${ubicacion}`,
|
||||
{ headers },
|
||||
|
||||
Reference in New Issue
Block a user