Skip to content

Commit 82a8ebc

Browse files
committed
Solucion errores
1 parent 0e8941e commit 82a8ebc

3 files changed

Lines changed: 13 additions & 8 deletions

File tree

assets/i18n/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"title": "Projects",
112112

113113
"psr_labels": { "problem": "Problem", "solution": "Solution", "result": "Result" },
114-
"case_labels": { "problem": "Problem", "solution": "Solution", "signal": "Signal" },
114+
"case_labels": { "problem": "Problem", "solution": "Solution", "result": "Result" },
115115

116116
"p1_title": "WEB-DE-PROTOCOLOS-HSJD",
117117
"p1_desc": "PowerApps + SharePoint app that allows each employee to access only the protocols assigned to their role and department.",

assets/i18n/es.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"title": "Proyectos",
112112

113113
"psr_labels": { "problem": "Problema", "solution": "Solución", "result": "Resultado" },
114-
"case_labels": { "problem": "Problema", "solution": "Solución", "signal": "Señal" },
114+
"case_labels": { "problem": "Problema", "solution": "Solución", "result": "Resultado" },
115115

116116
"p1_title": "WEB-DE-PROTOCOLOS-HSJD",
117117
"p1_desc": "Aplicación desarrollada con PowerApps y SharePoint para que cada empleado acceda solo a los protocolos que le corresponden según su categoría y servicio.",

assets/js/app.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,11 @@ function renderProjects(){
317317
return;
318318
}
319319

320-
// ✅ Labels seguros (si faltan en el JSON no rompe)
321-
const L = proj.psr_labels || proj.case_labels || {
322-
problem: "Problem",
323-
solution: "Solution",
324-
result: "Result"
325-
};
320+
// Labels ultra seguros (nunca rompen)
321+
const labels = (proj.case_labels ?? proj.psr_labels ?? {});
322+
const LP = labels.problem ?? (STATE.lang === "es" ? "Problema" : "Problem");
323+
const LS = labels.solution ?? (STATE.lang === "es" ? "Solución" : "Solution");
324+
const LR = labels.result ?? (STATE.lang === "es" ? "Resultado" : "Result");
326325

327326
const items = getProjectItems(proj); // 👈 importante, ver B)
328327
if (!items.length){
@@ -343,6 +342,12 @@ function renderProjects(){
343342
<h3>${p.title}</h3>
344343
<p>${p.desc}</p>
345344
345+
<div class="project-psr">
346+
<div><strong>${LP}:</strong> ${p.problem || "—"}</div>
347+
<div><strong>${LS}:</strong> ${p.solution || "—"}</div>
348+
<div><strong>${LR}:</strong> ${p.result || "—"}</div>
349+
</div>
350+
346351
<div class="tech">
347352
${(p.tech || []).map(t => `<span class="${t.cls || ""}">${t.label}</span>`).join("")}
348353
</div>

0 commit comments

Comments
 (0)