feat: categorias de integracion (pagina-web/sam/profesores/otras-apps) + badge prod/dev

This commit is contained in:
Nurfog committed 2026-09-08 16:29:01 -03:00
1 parent 3787152ca0
commit 66ed027043
3 files changed
+59 -19

No files matched your search

+9 -4
View File
@@ -4,6 +4,7 @@ import { useSyncExternalStore } from "react";
import Link from "next/link";
import {
displayName,
envOf,
getModuleMeta,
getStatusInfo,
moduleUrl,
@@ -74,7 +75,7 @@ export default function Home() {
const bySection: Record<string, ModuleState[]> = {};
modules.forEach((m) => {
const s = sectionOf(m.name);
const s = sectionOf(m.name, m.category);
if (!bySection[s]) bySection[s] = [];
bySection[s].push(m);
});
@@ -82,6 +83,7 @@ export default function Home() {
const renderModuleCard = (m: ModuleState) => {
const meta = getModuleMeta(m.name);
const status = getStatusInfo(m);
const env = envOf(m.branch);
const url = moduleUrl(m);
const name = displayName(m.name);
return (
@@ -107,6 +109,9 @@ export default function Home() {
<small className="text-muted" style={{ fontSize: "0.75rem" }}>
{status.label} · :{m.port} · {m.branch}
</small>
<span className={`badge ${env.cls} badge-respaldo`}>
{env.label}
</span>
</div>
</td>
<td className="text-end pe-3" style={{ width: 40 }}>
@@ -202,8 +207,8 @@ export default function Home() {
{SECTIONS.map((section) => {
const list = bySection[section.id] ?? [];
const isSystem = section.id === "system";
if (!isSystem && list.length === 0) return null;
const isReview = section.id === "otras-apps";
if (!isReview && list.length === 0) return null;
return (
<div className="col-12" key={section.id}>
<div className="row row-cards">
@@ -224,7 +229,7 @@ export default function Home() {
{list.map(renderModuleCard)}
{isSystem && backend && (
{isReview && backend && (
<>
<div className="col-md-6">
<div className="app-card p-2">