diff --git a/resources/views/coolify.html b/resources/views/coolify.html
index 3ab2a38..36e4b83 100644
--- a/resources/views/coolify.html
+++ b/resources/views/coolify.html
@@ -307,8 +307,8 @@
@@ -630,10 +630,10 @@
Cargando entornos...
Sin entornos.
-
+
@@ -733,6 +733,17 @@ document.addEventListener('alpine:init', () => {
},
// ─── Helpers ────────────────────────────────────
+ projectEnvLabel(env) {
+ if (!env) return '—';
+ if (typeof env === 'string') return env;
+ return env.name || env.environment || env.slug || env.uuid || env.branch || 'Entorno';
+ },
+
+ projectEnvDescription(env) {
+ if (!env || typeof env === 'string') return '';
+ return env.description || env.branch || env.fqdn || env.url || '';
+ },
+
flash(msg, ok = true) {
this.flashMsg = msg;
this.flashOk = ok;
@@ -1221,14 +1232,14 @@ document.addEventListener('alpine:init', () => {
// ─── Project envs ────────────────────────────────
async openProjectEnvs(proj) {
this.projectTarget = proj;
- this.projectEnvsList = [];
+ this.projectEnvsList = Array.isArray(proj.environments) ? proj.environments : [];
this.projectEnvsModal = true;
this.projectEnvsLoading = true;
try {
const r = await fetch(`/app/coolify/projects/${proj.uuid}/environments`);
const j = await r.json();
this.projectEnvsList = Array.isArray(j) ? j
- : (j.environments || j.data || []);
+ : (j.environments || j.data || j.items || j.projects_environments || []);
} catch(e) { this.flash('Error: ' + e.message, false); }
finally { this.projectEnvsLoading = false; }
},