fix: docker build fallaba por public/ ausente y login alineado con sam-portal
This commit is contained in:
1 parent
2dc41ed4fa
commit
2b60a17645
6 files changed
+83
-53
No files matched your search
+2
-2
@@ -18,8 +18,8 @@ FROM base AS runner
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
RUN addgroup --system --gid 1001 nodejs
|
RUN addgroup --system --gid 1001 nodejs \
|
||||||
RUN adduser --system --uid 1001 nextjs
|
&& adduser --system --uid 1001 -G nodejs nextjs
|
||||||
|
|
||||||
COPY --from=builder /app/public ./public
|
COPY --from=builder /app/public ./public
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 97 KiB |
@@ -800,6 +800,23 @@ a:hover {
|
|||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login-page .login-main-text h1 {
|
||||||
|
font-size: 2rem;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-page .login-main-text h3 {
|
||||||
|
font-size: 1.05rem;
|
||||||
|
font-weight: 400;
|
||||||
|
opacity: 0.85;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Columna derecha: sin esta regla base la tarjeta queda bajo el sidenav
|
||||||
|
fijo, porque .main solo aporta el margen en pantallas >= 768px. */
|
||||||
|
.main {
|
||||||
|
padding: 0 24px;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------
|
/* ---------------------------------------------------------------
|
||||||
Responsive
|
Responsive
|
||||||
--------------------------------------------------------------- */
|
--------------------------------------------------------------- */
|
||||||
@@ -819,6 +836,22 @@ a:hover {
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login-page .sidenav {
|
||||||
|
padding: 20px 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-page .login-main-text {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-page .login-main-text h1 {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main {
|
||||||
|
padding: 0 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.detail-grid {
|
.detail-grid {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
gap: 24px;
|
gap: 24px;
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ export const metadata: Metadata = {
|
|||||||
template: "%s · Proyectos · SAM",
|
template: "%s · Proyectos · SAM",
|
||||||
},
|
},
|
||||||
description: "Gestor de proyectos estilo Linear para la plataforma SAM.",
|
description: "Gestor de proyectos estilo Linear para la plataforma SAM.",
|
||||||
|
icons: {
|
||||||
|
icon: "/favicon.png",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+45
-51
@@ -8,8 +8,9 @@ import { useAuth } from "@/lib/auth";
|
|||||||
* Acceso al módulo. Valida contra sige_sam_v3.usuario en el backend
|
* Acceso al módulo. Valida contra sige_sam_v3.usuario en el backend
|
||||||
* (POST /api/proyectos/auth/login), igual que el resto de módulos SAM.
|
* (POST /api/proyectos/auth/login), igual que el resto de módulos SAM.
|
||||||
*
|
*
|
||||||
* Patrón visual de sam-portal / SistemaCalidad: sidenav azul con la marca
|
* Estructura idéntica a la de sam-portal (ventas/login.aspx): sidenav azul
|
||||||
* a la izquierda y la tarjeta de acceso a la derecha.
|
* sólido #00285d con la marca a la izquierda, y el formulario en .main,
|
||||||
|
* que a partir de 768px se desplaza el 40% del sidenav.
|
||||||
*/
|
*/
|
||||||
export default function LoginPage() {
|
export default function LoginPage() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -43,90 +44,83 @@ export default function LoginPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="login-page">
|
<div className="login-page">
|
||||||
<div className="container-fluid">
|
<div className="sidenav">
|
||||||
<div className="row min-vh-100">
|
|
||||||
{/* Marca */}
|
|
||||||
<div className="col-md-5 sidenav d-flex flex-column justify-content-center">
|
|
||||||
<div className="login-main-text text-center">
|
<div className="login-main-text text-center">
|
||||||
<i className="bx bx-briefcase" style={{ fontSize: "5rem" }} />
|
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||||
<h1 className="fw-bold mt-3">Proyectos</h1>
|
<img src="/logo-sam.png" alt="SAM" />
|
||||||
<p className="mb-0" style={{ opacity: 0.8 }}>
|
<h1 className="fw-bold">Proyectos</h1>
|
||||||
Gestión de proyectos · SAM
|
<h3>Welcome | Bienvenido/a</h3>
|
||||||
</p>
|
<h3>Gestión de Proyectos</h3>
|
||||||
<p style={{ opacity: 0.5, fontSize: "0.85rem" }}>
|
|
||||||
Organismo Técnico de Capacitación
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Formulario */}
|
<div className="main">
|
||||||
<div className="col-md-7 d-flex align-items-center justify-content-center">
|
<div
|
||||||
<div className="lp-card p-4 p-md-5" style={{ maxWidth: 420, width: "100%" }}>
|
className="row justify-content-center align-items-center"
|
||||||
<h2 className="h5 fw-bold mb-1">Acceso al sistema</h2>
|
style={{ minHeight: "85vh" }}
|
||||||
<p className="small mb-4" style={{ color: "var(--inv-muted)" }}>
|
>
|
||||||
Use su RUT y clave del sistema central (SIGE).
|
<div className="col-md-12">
|
||||||
</p>
|
<div className="col-md-12 text-center">
|
||||||
|
<div className="row">
|
||||||
|
<div className="col-md-2" />
|
||||||
|
<div className="col-md-8">
|
||||||
|
<div className="card alert alert-secondary">
|
||||||
|
<div className="card-body">
|
||||||
|
<div className="mb-3">
|
||||||
|
<strong>USUARIO | CLAVE</strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
<form onSubmit={handleSubmit}>
|
<form onSubmit={handleSubmit}>
|
||||||
{error && (
|
{error && (
|
||||||
<div className="alert alert-danger d-flex align-items-center gap-2 py-2" role="alert">
|
<div className="alert alert-danger py-2 mb-2">
|
||||||
<i className="bx bx-error" />
|
<i className="bx bx-error me-1" />
|
||||||
<span className="small">{error}</span>
|
{error}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="mb-3">
|
|
||||||
<label htmlFor="idUsuario" className="form-label">
|
|
||||||
Usuario (RUT o legajo)
|
|
||||||
</label>
|
|
||||||
<input
|
<input
|
||||||
|
name="TextBoxRut"
|
||||||
type="text"
|
type="text"
|
||||||
id="idUsuario"
|
|
||||||
className="form-control"
|
|
||||||
autoComplete="username"
|
|
||||||
value={idUsuario}
|
value={idUsuario}
|
||||||
onChange={(event) => setIdUsuario(event.target.value)}
|
onChange={(event) => setIdUsuario(event.target.value)}
|
||||||
|
className="form-control shadow mb-2"
|
||||||
required
|
required
|
||||||
|
placeholder="Usuario"
|
||||||
|
autoComplete="username"
|
||||||
autoFocus
|
autoFocus
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="mb-4">
|
|
||||||
<label htmlFor="password" className="form-label">
|
|
||||||
Clave
|
|
||||||
</label>
|
|
||||||
<input
|
<input
|
||||||
|
name="TextBoxClave"
|
||||||
type="password"
|
type="password"
|
||||||
id="password"
|
|
||||||
className="form-control"
|
|
||||||
autoComplete="current-password"
|
|
||||||
value={password}
|
value={password}
|
||||||
onChange={(event) => setPassword(event.target.value)}
|
onChange={(event) => setPassword(event.target.value)}
|
||||||
|
className="form-control shadow mb-2"
|
||||||
required
|
required
|
||||||
|
placeholder="Clave"
|
||||||
|
autoComplete="current-password"
|
||||||
/>
|
/>
|
||||||
</div>
|
<div className="d-grid">
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="btn btn-accent w-100 py-2 d-flex align-items-center justify-content-center gap-2"
|
|
||||||
disabled={submitting}
|
disabled={submitting}
|
||||||
|
className="btn btn-success btn-sm"
|
||||||
>
|
>
|
||||||
{submitting ? (
|
{submitting ? (
|
||||||
<>
|
<span className="spinner-border spinner-border-sm" />
|
||||||
<span className="spinner-border spinner-border-sm" role="status" />
|
|
||||||
Verificando…
|
|
||||||
</>
|
|
||||||
) : (
|
) : (
|
||||||
<>
|
"Ingresar"
|
||||||
<i className="bx bx-log-in" />
|
|
||||||
Ingresar
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="col-md-2" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user