Loading .DS_Store (6 KiB) File changed.No diff preview for this file type. View original file View changed file capif_frontend/src/components/ConfigCapif.js +13 −6 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ const ConfigCapif = () => { current = current[keys[i]]; } current[keys[keys.length - 1]] = value; return { ...newConfig }; }); }; Loading Loading @@ -119,6 +120,7 @@ const ConfigCapif = () => { const handleJsonSubmit = () => { if (jsonError) { alert(`Invalid JSON: ${jsonError}`); return; } Loading Loading @@ -164,6 +166,7 @@ const ConfigCapif = () => { if (nestedError) return nestedError; } } return null; }; Loading @@ -174,10 +177,6 @@ const ConfigCapif = () => { return null; // No hay errores }; if (isLoading) return <Typography>Loading...</Typography>; if (isError) return <Typography>Error loading configuration</Typography>; const formatTitle = (text) => { return text .split(" ") Loading Loading @@ -213,6 +212,7 @@ const ConfigCapif = () => { const handleAddConfig = () => { if (!newParamName || newParamValue === undefined) { alert("Debe ingresar un nombre y un valor para la configuración."); return; } Loading @@ -222,6 +222,7 @@ const ConfigCapif = () => { const handleOpenSectionDialog = () => setOpenSectionDialog(true); const handleCloseSectionDialog = () => { setOpenSectionDialog(false); setNewSectionName(''); Loading @@ -231,11 +232,13 @@ const ConfigCapif = () => { const handleAddSection = () => { if (!newSectionName.trim() || newSectionParams.some(p => !p.key.trim())) { alert("Debes ingresar un nombre para la sección y al menos un parámetro."); return; } const categoryValues = newSectionParams.reduce((acc, param) => { acc[param.key] = param.value; return acc; }, {}); Loading @@ -246,6 +249,7 @@ const ConfigCapif = () => { setNewSectionParams(prevParams => { const updatedParams = [...prevParams]; updatedParams[index][field] = value; return updatedParams; }); }; Loading @@ -269,12 +273,14 @@ const ConfigCapif = () => { if (words.length === 0) return text; words[0] = words[0].charAt(0).toUpperCase() + words[0].slice(1).toLowerCase(); return words.join(" "); }; const handleDownloadJson = () => { if (!editableConfig) { alert("There is no configuration available for download."); return; } Loading Loading @@ -346,7 +352,8 @@ const ConfigCapif = () => { reader.readAsText(file); }; if (isLoading) return <Typography>Loading...</Typography>; if (isError) return <Typography>Error loading configuration</Typography>; return ( <Grid container spacing={3} marginTop={2}> Loading capif_frontend/src/components/ConfigRegister.js +12 −3 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ const ConfigRegister = () => { current = current[keys[i]]; } current[keys[keys.length - 1]] = value; return { ...newConfig }; }); }; Loading Loading @@ -112,6 +113,7 @@ const ConfigRegister = () => { const handleJsonSubmit = () => { if (jsonError) { alert(`Invalid JSON: ${jsonError}`); return; } Loading Loading @@ -157,6 +159,7 @@ const ConfigRegister = () => { if (nestedError) return nestedError; } } return null; }; Loading @@ -167,9 +170,6 @@ const ConfigRegister = () => { return null; // No hay errores }; if (isLoading) return <Typography>Loading...</Typography>; if (isError) return <Typography>Error loading configuration</Typography>; const formatTitle = (text) => { return text .split(" ") Loading Loading @@ -205,6 +205,7 @@ const ConfigRegister = () => { const handleAddConfig = () => { if (!newParamName || newParamValue === undefined) { alert("Debe ingresar un nombre y un valor para la configuración."); return; } Loading @@ -214,6 +215,7 @@ const ConfigRegister = () => { const handleOpenSectionDialog = () => setOpenSectionDialog(true); const handleCloseSectionDialog = () => { setOpenSectionDialog(false); setNewSectionName(''); Loading @@ -223,11 +225,13 @@ const ConfigRegister = () => { const handleAddSection = () => { if (!newSectionName.trim() || newSectionParams.some(p => !p.key.trim())) { alert("Debes ingresar un nombre para la sección y al menos un parámetro."); return; } const categoryValues = newSectionParams.reduce((acc, param) => { acc[param.key] = param.value; return acc; }, {}); Loading @@ -238,6 +242,7 @@ const ConfigRegister = () => { setNewSectionParams(prevParams => { const updatedParams = [...prevParams]; updatedParams[index][field] = value; return updatedParams; }); }; Loading @@ -261,12 +266,14 @@ const ConfigRegister = () => { if (words.length === 0) return text; words[0] = words[0].charAt(0).toUpperCase() + words[0].slice(1).toLowerCase(); return words.join(" "); }; const handleDownloadJson = () => { if (!editableConfig) { alert("There is no configuration available for download."); return; } Loading Loading @@ -340,6 +347,8 @@ const ConfigRegister = () => { reader.readAsText(file); }; if (isLoading) return <Typography>Loading...</Typography>; if (isError) return <Typography>Error loading configuration</Typography>; return ( <Grid container spacing={3} marginTop={2}> Loading capif_frontend/src/pages/configuration/[id].js +5 −0 Original line number Diff line number Diff line const ConfigurationById = () => { return <div>Configuration Detail</div> } export default ConfigurationById No newline at end of file capif_frontend/src/pages/configuration/index.js +1 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ const Configuration = () => { current = current[keys[i]]; } current[keys[keys.length - 1]] = value; return { ...newConfig }; }); }; Loading Loading
.DS_Store (6 KiB) File changed.No diff preview for this file type. View original file View changed file
capif_frontend/src/components/ConfigCapif.js +13 −6 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ const ConfigCapif = () => { current = current[keys[i]]; } current[keys[keys.length - 1]] = value; return { ...newConfig }; }); }; Loading Loading @@ -119,6 +120,7 @@ const ConfigCapif = () => { const handleJsonSubmit = () => { if (jsonError) { alert(`Invalid JSON: ${jsonError}`); return; } Loading Loading @@ -164,6 +166,7 @@ const ConfigCapif = () => { if (nestedError) return nestedError; } } return null; }; Loading @@ -174,10 +177,6 @@ const ConfigCapif = () => { return null; // No hay errores }; if (isLoading) return <Typography>Loading...</Typography>; if (isError) return <Typography>Error loading configuration</Typography>; const formatTitle = (text) => { return text .split(" ") Loading Loading @@ -213,6 +212,7 @@ const ConfigCapif = () => { const handleAddConfig = () => { if (!newParamName || newParamValue === undefined) { alert("Debe ingresar un nombre y un valor para la configuración."); return; } Loading @@ -222,6 +222,7 @@ const ConfigCapif = () => { const handleOpenSectionDialog = () => setOpenSectionDialog(true); const handleCloseSectionDialog = () => { setOpenSectionDialog(false); setNewSectionName(''); Loading @@ -231,11 +232,13 @@ const ConfigCapif = () => { const handleAddSection = () => { if (!newSectionName.trim() || newSectionParams.some(p => !p.key.trim())) { alert("Debes ingresar un nombre para la sección y al menos un parámetro."); return; } const categoryValues = newSectionParams.reduce((acc, param) => { acc[param.key] = param.value; return acc; }, {}); Loading @@ -246,6 +249,7 @@ const ConfigCapif = () => { setNewSectionParams(prevParams => { const updatedParams = [...prevParams]; updatedParams[index][field] = value; return updatedParams; }); }; Loading @@ -269,12 +273,14 @@ const ConfigCapif = () => { if (words.length === 0) return text; words[0] = words[0].charAt(0).toUpperCase() + words[0].slice(1).toLowerCase(); return words.join(" "); }; const handleDownloadJson = () => { if (!editableConfig) { alert("There is no configuration available for download."); return; } Loading Loading @@ -346,7 +352,8 @@ const ConfigCapif = () => { reader.readAsText(file); }; if (isLoading) return <Typography>Loading...</Typography>; if (isError) return <Typography>Error loading configuration</Typography>; return ( <Grid container spacing={3} marginTop={2}> Loading
capif_frontend/src/components/ConfigRegister.js +12 −3 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ const ConfigRegister = () => { current = current[keys[i]]; } current[keys[keys.length - 1]] = value; return { ...newConfig }; }); }; Loading Loading @@ -112,6 +113,7 @@ const ConfigRegister = () => { const handleJsonSubmit = () => { if (jsonError) { alert(`Invalid JSON: ${jsonError}`); return; } Loading Loading @@ -157,6 +159,7 @@ const ConfigRegister = () => { if (nestedError) return nestedError; } } return null; }; Loading @@ -167,9 +170,6 @@ const ConfigRegister = () => { return null; // No hay errores }; if (isLoading) return <Typography>Loading...</Typography>; if (isError) return <Typography>Error loading configuration</Typography>; const formatTitle = (text) => { return text .split(" ") Loading Loading @@ -205,6 +205,7 @@ const ConfigRegister = () => { const handleAddConfig = () => { if (!newParamName || newParamValue === undefined) { alert("Debe ingresar un nombre y un valor para la configuración."); return; } Loading @@ -214,6 +215,7 @@ const ConfigRegister = () => { const handleOpenSectionDialog = () => setOpenSectionDialog(true); const handleCloseSectionDialog = () => { setOpenSectionDialog(false); setNewSectionName(''); Loading @@ -223,11 +225,13 @@ const ConfigRegister = () => { const handleAddSection = () => { if (!newSectionName.trim() || newSectionParams.some(p => !p.key.trim())) { alert("Debes ingresar un nombre para la sección y al menos un parámetro."); return; } const categoryValues = newSectionParams.reduce((acc, param) => { acc[param.key] = param.value; return acc; }, {}); Loading @@ -238,6 +242,7 @@ const ConfigRegister = () => { setNewSectionParams(prevParams => { const updatedParams = [...prevParams]; updatedParams[index][field] = value; return updatedParams; }); }; Loading @@ -261,12 +266,14 @@ const ConfigRegister = () => { if (words.length === 0) return text; words[0] = words[0].charAt(0).toUpperCase() + words[0].slice(1).toLowerCase(); return words.join(" "); }; const handleDownloadJson = () => { if (!editableConfig) { alert("There is no configuration available for download."); return; } Loading Loading @@ -340,6 +347,8 @@ const ConfigRegister = () => { reader.readAsText(file); }; if (isLoading) return <Typography>Loading...</Typography>; if (isError) return <Typography>Error loading configuration</Typography>; return ( <Grid container spacing={3} marginTop={2}> Loading
capif_frontend/src/pages/configuration/[id].js +5 −0 Original line number Diff line number Diff line const ConfigurationById = () => { return <div>Configuration Detail</div> } export default ConfigurationById No newline at end of file
capif_frontend/src/pages/configuration/index.js +1 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ const Configuration = () => { current = current[keys[i]]; } current[keys[keys.length - 1]] = value; return { ...newConfig }; }); }; Loading