From d30aa09b925bf6f0151cfc97a24a569036742280 Mon Sep 17 00:00:00 2001 From: Marc Date: Mon, 12 Jan 2026 11:02:30 +0100 Subject: [PATCH 01/12] =?UTF-8?q?A=C3=B1adir=20la=20descripci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project-edit/project-edit.component.html | 33 ++++++++++--------- .../project-edit/project-edit.component.ts | 28 ++++++++-------- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/src/app/components/projects/project-edit/project-edit.component.html b/src/app/components/projects/project-edit/project-edit.component.html index 96bc0b9..a436e84 100644 --- a/src/app/components/projects/project-edit/project-edit.component.html +++ b/src/app/components/projects/project-edit/project-edit.component.html @@ -13,18 +13,19 @@
-

{{ 'project.edit.editing' | translate }}: {{ project?.name }}

+

{{ 'project.edit.editing' | translate }}: {{ project?.name }}

+

{{'Description' | translate }}: {{project?.description}}

- +
- - + {{ 'project.edit' | translate }} {{ 'project.show' | translate }}
@@ -36,21 +37,21 @@
-->
- +
@@ -65,7 +66,7 @@ {{ 'project.button.activity' | translate }} / {{ 'project.button.warnings' | translate }} - +
- +
- \ No newline at end of file + diff --git a/src/app/components/projects/project-edit/project-edit.component.ts b/src/app/components/projects/project-edit/project-edit.component.ts index af5b295..df818cf 100644 --- a/src/app/components/projects/project-edit/project-edit.component.ts +++ b/src/app/components/projects/project-edit/project-edit.component.ts @@ -21,7 +21,7 @@ export class ProjectEditComponent implements OnInit, OnDestroy { private projectsService = inject(ProjectsService); private editStateService = inject(ProjectEditStateService); private drawerService = inject(DrawerService); - + public project: any; public projectUuid: string | null = null; public hasUnsavedChanges: boolean = false; @@ -32,12 +32,12 @@ export class ProjectEditComponent implements OnInit, OnDestroy { ngOnInit(): void { this.route.params.subscribe(params => { this.projectUuid = params['uuid']; - + if (this.projectUuid) { if (this.projectsService.projects().length === 0) { this.projectsService.getProjectList(); } - + this.projectsService.loadProject(this.projectUuid); } }); @@ -56,7 +56,7 @@ export class ProjectEditComponent implements OnInit, OnDestroy { projectData.uuid = this.projectUuid; } } - + this.project = projectData; } }); @@ -73,7 +73,7 @@ export class ProjectEditComponent implements OnInit, OnDestroy { savedProjectUuid => { if (this.projectUuid && savedProjectUuid === this.projectUuid) { this.editStateService.markProjectAsSaved(this.projectUuid); - + this.projectsService.loadProject(this.projectUuid); } } @@ -84,7 +84,7 @@ export class ProjectEditComponent implements OnInit, OnDestroy { this.changesSubscription?.unsubscribe(); this.projectLoadedSubscription?.unsubscribe(); this.projectSavedSubscription?.unsubscribe(); - + if (this.projectUuid) { this.editStateService.clearTemporaryCues(this.projectUuid); } @@ -108,13 +108,13 @@ export class ProjectEditComponent implements OnInit, OnDestroy { try { const updatedProject = JSON.parse(JSON.stringify(this.project)); - + const modifiedData = this.editStateService.getProjectModifiedData(this.projectUuid); - + if (!modifiedData || Object.keys(modifiedData).length === 0) { return; } - + if (modifiedData.sequence) { if (!updatedProject.CuemsScript) { updatedProject.CuemsScript = {}; @@ -129,7 +129,7 @@ export class ProjectEditComponent implements OnInit, OnDestroy { updatedProject.CuemsScript.CueList.id = this.generateUUID(); updatedProject.CuemsScript.CueList.contents = []; } else { - // Fallback + // Fallback updatedProject.CuemsScript.CueList = { autoload: false, description: null, @@ -148,7 +148,7 @@ export class ProjectEditComponent implements OnInit, OnDestroy { }; } } - + if (modifiedData.sequence.contents === null) { updatedProject.CuemsScript.CueList.contents = null; } else if (Array.isArray(modifiedData.sequence.contents) && modifiedData.sequence.contents.length === 0) { @@ -157,11 +157,11 @@ export class ProjectEditComponent implements OnInit, OnDestroy { updatedProject.CuemsScript.CueList.contents = modifiedData.sequence.contents; } } - + if (!updatedProject.uuid && this.projectUuid) { updatedProject.uuid = this.projectUuid; } - + this.projectsService.updateProject(updatedProject); } catch (error) { console.error('Error saving complete project:', error); @@ -175,4 +175,4 @@ export class ProjectEditComponent implements OnInit, OnDestroy { private generateUUID(): string { return uuidv4(); } -} \ No newline at end of file +} From 56ea71559f651b261dd3f2e36c7dcc98cb323509 Mon Sep 17 00:00:00 2001 From: Marc Date: Tue, 13 Jan 2026 09:28:17 +0100 Subject: [PATCH 02/12] =?UTF-8?q?Edici=C3=B3n=20de=20nombre=20de=20proyect?= =?UTF-8?q?o=20y=20descripci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project-edit/project-edit.component.html | 26 ++++++++++++++- .../project-edit/project-edit.component.ts | 33 ++++++++++++++++++- 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/src/app/components/projects/project-edit/project-edit.component.html b/src/app/components/projects/project-edit/project-edit.component.html index a436e84..df48867 100644 --- a/src/app/components/projects/project-edit/project-edit.component.html +++ b/src/app/components/projects/project-edit/project-edit.component.html @@ -13,8 +13,22 @@
+ +
+

{{'project.edit.editing' | translate}}: {{ project?.name }}

+

{{ project?.description || 'No description' | translate }}

+
+ +
+ + + + +
+
@@ -26,7 +40,17 @@ {{ 'project.edit.save.changes' | translate }} - {{ 'project.edit' | translate }} + + + + + {{ 'project.show' | translate }}
diff --git a/src/app/components/projects/project-edit/project-edit.component.ts b/src/app/components/projects/project-edit/project-edit.component.ts index df818cf..63414f6 100644 --- a/src/app/components/projects/project-edit/project-edit.component.ts +++ b/src/app/components/projects/project-edit/project-edit.component.ts @@ -9,11 +9,13 @@ import { ProjectEditStateService } from '../../../services/projects/project-edit import { IconComponent } from '../../ui/icon/icon.component'; import { DrawerService } from '../../../services/ui/drawer.service'; import { v4 as uuidv4 } from 'uuid'; +import { FormsModule } from '@angular/forms'; +import { WebsocketService } from '../../../services/websocket.service'; @Component({ selector: 'app-project-edit', standalone: true, - imports: [CommonModule, RouterModule, AppPageHeaderComponent, TranslateModule, IconComponent], + imports: [CommonModule, RouterModule, AppPageHeaderComponent, TranslateModule, IconComponent, FormsModule], templateUrl: './project-edit.component.html' }) export class ProjectEditComponent implements OnInit, OnDestroy { @@ -29,6 +31,12 @@ export class ProjectEditComponent implements OnInit, OnDestroy { private projectLoadedSubscription?: Subscription; private projectSavedSubscription?: Subscription; + //edición de descripción y nombre de proyectos= + public isEditing: boolean = false; + public editName: string = ''; + public editDescription: string = ''; + + ngOnInit(): void { this.route.params.subscribe(params => { this.projectUuid = params['uuid']; @@ -175,4 +183,27 @@ export class ProjectEditComponent implements OnInit, OnDestroy { private generateUUID(): string { return uuidv4(); } + + //métodos de edición de nombre y descripción + startEdit(): void { + this.isEditing = true; + this.editName = this.project?.name || ''; + this.editDescription = this.project?.description || ''; + } + + cancelEdit(): void { + this.isEditing = false; + } + + saveEdit(): void { + if (!this.project || !this.editName.trim()) return; + + this.project.name = this.editName; + this.project.description = this.editDescription; + + // Enviar al backend si tienes servicio + // this.projectsService.updateProject(this.project); //(modificar) + + this.isEditing = false; + } } From a5b6778115dc9ce3572bb39371a2996ba6476504 Mon Sep 17 00:00:00 2001 From: Marc Date: Tue, 13 Jan 2026 10:17:42 +0100 Subject: [PATCH 03/12] =?UTF-8?q?Mejora=20de=20la=20presentaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projects/project-edit/project-edit.component.html | 6 ++---- .../projects/project-edit/project-edit.component.ts | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/app/components/projects/project-edit/project-edit.component.html b/src/app/components/projects/project-edit/project-edit.component.html index df48867..bed9d1e 100644 --- a/src/app/components/projects/project-edit/project-edit.component.html +++ b/src/app/components/projects/project-edit/project-edit.component.html @@ -20,10 +20,8 @@
- - - - + +

{{'project.edit.editing' | translate}}: {{ project?.name }}

-

{{ project?.description || 'No description' | translate }}

+

{{ project?.description !== undefined && project?.description !== null ? project.description : ('No description' | translate) }}

+
@@ -26,6 +27,8 @@
diff --git a/src/app/components/projects/project-edit/project-edit.component.ts b/src/app/components/projects/project-edit/project-edit.component.ts index 9ff65d8..eb018fc 100644 --- a/src/app/components/projects/project-edit/project-edit.component.ts +++ b/src/app/components/projects/project-edit/project-edit.component.ts @@ -52,10 +52,18 @@ export class ProjectEditComponent implements OnInit, OnDestroy { this.projectLoadedSubscription = this.projectsService.projectLoaded.subscribe(projectData => { if (projectData) { const basicProjectData = this.projectsService.projects().find(p => p.uuid === this.projectUuid); + + //Mapear descripción desde CuemsScript si no existe + if (!projectData.description && projectData.CuemsScript?.description) { + projectData.description = projectData.CuemsScript.description; + } + if (basicProjectData) { if (!projectData.uuid) projectData.uuid = basicProjectData.uuid; if (!projectData.name) projectData.name = basicProjectData.name; - if (!projectData.description) projectData.description = basicProjectData.description; //revisar ProjectList + + if (!projectData.description && basicProjectData.description) projectData.description = basicProjectData.description; //revisar ProjectList + if (!projectData.unix_name) projectData.unix_name = basicProjectData.unix_name; if (!projectData.created) projectData.created = basicProjectData.created; if (!projectData.modified) projectData.modified = basicProjectData.modified; @@ -66,6 +74,10 @@ export class ProjectEditComponent implements OnInit, OnDestroy { } this.project = projectData; + + //Actualizar los campos de edición + this.editName = this.project.name; + this.editDescription = this.project.description; } }); @@ -125,11 +137,13 @@ export class ProjectEditComponent implements OnInit, OnDestroy { //guardar cambios de nombre y descripción if (modifiedData.metadata) { - updatedProject.name = - modifiedData.metadata.name ?? updatedProject.name; + if (modifiedData.metadata.name !== undefined && modifiedData.metadata.name.trim() !== '') { + updatedProject.name = modifiedData.metadata.name; + } - updatedProject.description = - modifiedData.metadata.description ?? updatedProject.description; + if (modifiedData.metadata.description !== undefined) { + updatedProject.description = modifiedData.metadata.description; + } } if (modifiedData.sequence) { diff --git a/src/app/services/projects/project-edit-state.service.ts b/src/app/services/projects/project-edit-state.service.ts index 44780a6..51f71f8 100644 --- a/src/app/services/projects/project-edit-state.service.ts +++ b/src/app/services/projects/project-edit-state.service.ts @@ -73,6 +73,8 @@ export class ProjectEditStateService { } }); + console.log('getProjectModifiedData', projectUuid, modifiedData); //debug + return modifiedData; } @@ -180,6 +182,8 @@ export class ProjectEditStateService { } }); + console.log('setProjectMetadata', key, this.componentStates.get(key)); //debug + this.updateGlobalState(); } } diff --git a/src/app/services/projects/projects.service.ts b/src/app/services/projects/projects.service.ts index b8f7388..34d4efb 100644 --- a/src/app/services/projects/projects.service.ts +++ b/src/app/services/projects/projects.service.ts @@ -219,6 +219,7 @@ export class ProjectsService { } if (response && response.type === 'project_list' && Array.isArray(response.value)) { + console.log('BAckend project list: ', response.value); //debug para ver la lista de proyectos handleProjectListResponse(response.value, projects => this.projects.set(projects)); } @@ -283,6 +284,7 @@ export class ProjectsService { } if (response && response.type === 'project' && response.value) { + console.log('Backend project data received: ', response.value); //debug para ver que info llega del backend sobre el proyecto this.projectLoaded.emit(response.value); } From 8bb161340a725653a83a38a3eb3b4a7d776a15ec Mon Sep 17 00:00:00 2001 From: Marc Date: Thu, 15 Jan 2026 10:19:37 +0100 Subject: [PATCH 07/12] =?UTF-8?q?A=C3=B1adir=20traducciones=20y=20comienzo?= =?UTF-8?q?=20del=20cambio=20de=20unix=5Fname=20por=20descrption?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projects/project-edit/project-edit.component.html | 10 ++++++---- .../projects/project-list/project-list.component.html | 4 ++-- src/assets/i18n/ca.json | 1 + src/assets/i18n/en.json | 3 ++- src/assets/i18n/es.json | 3 ++- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/app/components/projects/project-edit/project-edit.component.html b/src/app/components/projects/project-edit/project-edit.component.html index 44681b4..f7e43d9 100644 --- a/src/app/components/projects/project-edit/project-edit.component.html +++ b/src/app/components/projects/project-edit/project-edit.component.html @@ -16,12 +16,14 @@

{{'project.edit.editing' | translate}}: {{ project?.name }}

-

{{ project?.description !== undefined && project?.description !== null ? project.description : ('No description' | translate) }}

+

{{ project?.description !== undefined && project?.description !== null ? project.description : 'No description' }}

- + +

+
{{ 'project.list.created' | translate }} {{ 'project.list.modified' | translate }} @@ -74,7 +74,7 @@ {{ project.name }} - {{ project.unix_name }} + {{ project?.description }} {{ project.created | date:'medium' }} {{ project.modified | date:'medium' }} diff --git a/src/assets/i18n/ca.json b/src/assets/i18n/ca.json index d436d45..37aab85 100644 --- a/src/assets/i18n/ca.json +++ b/src/assets/i18n/ca.json @@ -106,6 +106,7 @@ "project.list.no.projects.available.description": "Crea el teu primer projecte o fes click en actualitzar per carregar els projectes existents.", "project.list.new.project": "Nou projecte", "project.list.name": "Nom", + "project.list.description": "Descripció", "project.list.unix_name": "Unix_name", "project.list.created": "Creat", "project.list.modified": "Modificat", diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 25f7665..bcf8a7a 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -106,6 +106,7 @@ "project.list.no.projects.available.description": "Create your first project or click refresh to load existing projects.", "project.list.new.project": "New project", "project.list.name": "Name", + "project.list.description": "Description", "project.list.unix_name": "Unix_name", "project.list.created": "Created", "project.list.modified": "Modified", @@ -212,6 +213,6 @@ "nodes.settings.no.nodes.configured": "No nodes configured", "nodes.settings.no.outputs.configured": "No outputs configured for this node", "footer.powered.text": "Powered", - "footer.promoted.text": "Promoted", + "footer.promoted.text": "Promoted", "footer.financed.text": "Financed" } diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json index 1e47394..1da1516 100644 --- a/src/assets/i18n/es.json +++ b/src/assets/i18n/es.json @@ -103,9 +103,10 @@ "project.list.upload.new.files": "Subir nuevos archivos", "project.list.cancel": "Cancelar", "project.list.no.projects.available": "No hay proyectos disponibles.", - "project.list.no.projects.available.description": "Crea tu primer proyecto o haz click en actualizar para cargar los proyectos existentes.", + "project.list.no.projects.available.description": "Crea tu primer proyecto o haz click en actualizar para cargar los proyectos existentes.", "project.list.new.project": "Nuevo proyecto", "project.list.name": "Nombre", + "project.list.description": "Descripción", "project.list.unix_name": "Unix_name", "project.list.created": "Creado", "project.list.modified": "Modificado", From abcb7f5be74704ad1b0d4fc21d576638aca918b2 Mon Sep 17 00:00:00 2001 From: Marc Date: Tue, 20 Jan 2026 10:24:22 +0100 Subject: [PATCH 08/12] =?UTF-8?q?Mostrar=20la=20descripci=C3=B3n=20por=20n?= =?UTF-8?q?=C3=BAmero=20de=20palabras=20(5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Se muestra el número de palabras de la descripción y se muestra completo cuando se pasa el ratón por encima --- .../project-list/project-list.component.html | 4 +- .../project-list/project-list.component.ts | 70 +++++++++++-------- .../projects/handlers/project-list.handler.ts | 11 ++- 3 files changed, 52 insertions(+), 33 deletions(-) diff --git a/src/app/components/projects/project-list/project-list.component.html b/src/app/components/projects/project-list/project-list.component.html index 262c364..f199007 100644 --- a/src/app/components/projects/project-list/project-list.component.html +++ b/src/app/components/projects/project-list/project-list.component.html @@ -59,7 +59,7 @@ {{ 'project.list.name' | translate }} - {{ 'project.list.description' | translate }} + {{ 'project.list.description' | translate }} {{ 'project.list.created' | translate }} {{ 'project.list.modified' | translate }} @@ -74,7 +74,7 @@ {{ project.name }} - {{ project?.description }} + {{ truncateWords(project.description, 5) }} {{ project.created | date:'medium' }} {{ project.modified | date:'medium' }} diff --git a/src/app/components/projects/project-list/project-list.component.ts b/src/app/components/projects/project-list/project-list.component.ts index 0152a80..01d1fcd 100644 --- a/src/app/components/projects/project-list/project-list.component.ts +++ b/src/app/components/projects/project-list/project-list.component.ts @@ -26,16 +26,16 @@ export class ProjectListComponent implements OnInit, OnDestroy { isConfirmDeleteOpen = false; isConfirmBulkDeleteOpen = false; isBulkDeleting = false; - + private deletingProjects = new Map(); - + constructor() { this.refreshProjects(); effect(() => { const projects = this.projectsService.projects(); this.isLoading = false; - + this.cleanupProjectMaps(projects); }); } @@ -44,13 +44,13 @@ export class ProjectListComponent implements OnInit, OnDestroy { this.subscription.add( this.projectsService.errorEvent.subscribe(error => { console.log('Error event received:', error); - + if (error.action === 'project_delete') { if (this.projectToDeleteUuid) { this.deletingProjects.delete(this.projectToDeleteUuid); this.projectToDeleteUuid = null; } - + this.isBulkDeleting = false; } }) @@ -63,16 +63,16 @@ export class ProjectListComponent implements OnInit, OnDestroy { cleanupProjectMaps(projects: ProjectList[]) { const existingUuids = projects.map(p => p.uuid); - + if (this.selectedProjects.length > 0) { const previousLength = this.selectedProjects.length; this.selectedProjects = this.selectedProjects.filter(uuid => existingUuids.includes(uuid)); - + if (previousLength !== this.selectedProjects.length) { console.log(`Removed ${previousLength - this.selectedProjects.length} non-existent projects from selection`); } } - + if (this.deletingProjects.size > 0) { let removed = 0; this.deletingProjects.forEach((value, uuid) => { @@ -81,7 +81,7 @@ export class ProjectListComponent implements OnInit, OnDestroy { removed++; } }); - + if (this.deletingProjects.size === 0) { this.isBulkDeleting = false; } @@ -122,7 +122,7 @@ export class ProjectListComponent implements OnInit, OnDestroy { this.executeProjectDeletion(this.projectToDeleteUuid); this.closeDeleteConfirmation(); - + const uuidToCleanup = this.projectToDeleteUuid; setTimeout(() => { if (this.deletingProjects.has(uuidToCleanup)) { @@ -141,7 +141,7 @@ export class ProjectListComponent implements OnInit, OnDestroy { if (this.isProjectBeingDeleted(uuid)) { return; } - + this.openDeleteConfirmation(uuid); } @@ -153,7 +153,7 @@ export class ProjectListComponent implements OnInit, OnDestroy { if (this.isProjectBeingDeleted(uuid)) { return; } - + if (this.selectedProjects.includes(uuid)) { this.selectedProjects = this.selectedProjects.filter(id => id !== uuid); } else { @@ -168,7 +168,7 @@ export class ProjectListComponent implements OnInit, OnDestroy { this.selectedProjects = this.getSelectableProjects(); } } - + getSelectableProjects(): string[] { return this.projectsService.projects() .filter(project => !this.isProjectBeingDeleted(project.uuid)) @@ -181,16 +181,16 @@ export class ProjectListComponent implements OnInit, OnDestroy { deleteSelectedProjects(): void { if (this.selectedProjects.length === 0) return; - - const validSelectedProjects = this.selectedProjects.filter(uuid => - !this.isProjectBeingDeleted(uuid) && + + const validSelectedProjects = this.selectedProjects.filter(uuid => + !this.isProjectBeingDeleted(uuid) && this.projectsService.projects().some(p => p.uuid === uuid) ); - + this.selectedProjects = validSelectedProjects; - + if (this.selectedProjects.length === 0) return; - + this.isConfirmBulkDeleteOpen = true; } @@ -199,39 +199,49 @@ export class ProjectListComponent implements OnInit, OnDestroy { } confirmBulkDelete(): void { - const validSelectedProjects = this.selectedProjects.filter(uuid => - !this.isProjectBeingDeleted(uuid) && + const validSelectedProjects = this.selectedProjects.filter(uuid => + !this.isProjectBeingDeleted(uuid) && this.projectsService.projects().some(p => p.uuid === uuid) ); - + if (validSelectedProjects.length > 0) { this.executeDeleteProjects([...validSelectedProjects]); } - + this.closeBulkDeleteConfirmation(); } executeDeleteProjects(uuids: string[]): void { if (uuids.length === 0) return; - + this.isBulkDeleting = true; - + uuids.forEach(uuid => { this.deletingProjects.set(uuid, true); }); - - uuids.forEach(uuid => + + uuids.forEach(uuid => this.projectsService.deleteProject(uuid) ); - + this.selectedProjects = []; - + setTimeout(() => { uuids.forEach(uuid => { this.deletingProjects.delete(uuid); }); - + this.isBulkDeleting = false; }, 5000); } + + //mostrar descripción de proyecto + truncateWords(text: string | undefined, maxWords: number): string { + if (!text) return ''; + const words = text.trim().split(/\s+/); + if (words.length <= maxWords) { + return text; + } + return words.slice(0, maxWords).join(' ') + '...'; + } } diff --git a/src/app/services/projects/handlers/project-list.handler.ts b/src/app/services/projects/handlers/project-list.handler.ts index e1ff7fb..bf6c6f7 100644 --- a/src/app/services/projects/handlers/project-list.handler.ts +++ b/src/app/services/projects/handlers/project-list.handler.ts @@ -9,12 +9,21 @@ export function transformProjectsResponse(projectsData: any[]): ProjectList[] { // Each item is an object with a single key (the UUID) const uuid = Object.keys(projectItem)[0]; const projectData = projectItem[uuid]; + + //debug + /* + console.log('RAW projectData:', projectData); + console.log('RAW description:', projectData.description); + console.log('RAW CuemsScript.description:', projectData.CuemsScript?.description); + */ + return { uuid, name: projectData.name, + description: projectData.description ?? projectData.CuemsScript?.description, //añadir descripción normal o mapeada unix_name: projectData.unix_name, created: projectData.created, - modified: projectData.modified + modified: projectData.modified, }; }); } From 571af12ce7eb22a05429e2cf8568561e69de7775 Mon Sep 17 00:00:00 2001 From: Marc Date: Wed, 18 Mar 2026 11:16:54 +0100 Subject: [PATCH 09/12] =?UTF-8?q?Mejora=20mostrar=20descripci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projects/project-list/project-list.component.html | 2 +- .../projects/project-list/project-list.component.ts | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/app/components/projects/project-list/project-list.component.html b/src/app/components/projects/project-list/project-list.component.html index f199007..4b16498 100644 --- a/src/app/components/projects/project-list/project-list.component.html +++ b/src/app/components/projects/project-list/project-list.component.html @@ -74,7 +74,7 @@ {{ project.name }} - {{ truncateWords(project.description, 5) }} + {{ truncateText(project.description || '', 17) }} {{ project.created | date:'medium' }} {{ project.modified | date:'medium' }} diff --git a/src/app/components/projects/project-list/project-list.component.ts b/src/app/components/projects/project-list/project-list.component.ts index 01d1fcd..81e8cd7 100644 --- a/src/app/components/projects/project-list/project-list.component.ts +++ b/src/app/components/projects/project-list/project-list.component.ts @@ -236,12 +236,10 @@ export class ProjectListComponent implements OnInit, OnDestroy { } //mostrar descripción de proyecto - truncateWords(text: string | undefined, maxWords: number): string { + truncateText(text: string, maxLength: number = 17): string { if (!text) return ''; - const words = text.trim().split(/\s+/); - if (words.length <= maxWords) { - return text; - } - return words.slice(0, maxWords).join(' ') + '...'; + return text.length > maxLength + ? text.substring(0, maxLength) + '...' + : text; } } From a62c6390bdee1ec21e1db726385e921a2107f198 Mon Sep 17 00:00:00 2001 From: Marc Date: Tue, 24 Mar 2026 10:57:45 +0100 Subject: [PATCH 10/12] default cursor --- .../projects/project-list/project-list.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/projects/project-list/project-list.component.html b/src/app/components/projects/project-list/project-list.component.html index 4b16498..2624ffa 100644 --- a/src/app/components/projects/project-list/project-list.component.html +++ b/src/app/components/projects/project-list/project-list.component.html @@ -74,7 +74,7 @@ {{ project.name }} - {{ truncateText(project.description || '', 17) }} + {{ truncateText(project.description || '', 17) }} {{ project.created | date:'medium' }} {{ project.modified | date:'medium' }} From 46ff0326642b82dbbb330a7bd648449bfa9e50d2 Mon Sep 17 00:00:00 2001 From: Marc Date: Tue, 31 Mar 2026 20:27:47 +0200 Subject: [PATCH 11/12] evitar errores --- .../projects/project-edit/project-edit.component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/components/projects/project-edit/project-edit.component.ts b/src/app/components/projects/project-edit/project-edit.component.ts index f4500f2..365d41f 100644 --- a/src/app/components/projects/project-edit/project-edit.component.ts +++ b/src/app/components/projects/project-edit/project-edit.component.ts @@ -34,7 +34,7 @@ export class ProjectEditComponent implements OnInit, OnDestroy { private projectSavedSubscription?: Subscription; //edición de descripción y nombre de proyectos= - public isEditing: boolean = false; + public isEditing: boolean = false; public editName: string = ''; public editDescription: string = ''; @@ -101,8 +101,6 @@ export class ProjectEditComponent implements OnInit, OnDestroy { savedProjectUuid => { if (this.projectUuid && savedProjectUuid === this.projectUuid) { this.editStateService.markProjectAsSaved(this.projectUuid); - - this.projectsService.loadProject(this.projectUuid); } } ); From 08b1e03f87966e3eab4fdc9147d4706b81d0966d Mon Sep 17 00:00:00 2001 From: Marc Date: Wed, 1 Apr 2026 09:52:14 +0200 Subject: [PATCH 12/12] =?UTF-8?q?fix=20final=20para=20guardar=20nombre=20y?= =?UTF-8?q?=20descripci=C3=B3n=20sin=20conflictos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project-edit/project-edit.component.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/app/components/projects/project-edit/project-edit.component.ts b/src/app/components/projects/project-edit/project-edit.component.ts index 365d41f..9d64c59 100644 --- a/src/app/components/projects/project-edit/project-edit.component.ts +++ b/src/app/components/projects/project-edit/project-edit.component.ts @@ -25,7 +25,7 @@ export class ProjectEditComponent implements OnInit, OnDestroy { private drawerService = inject(DrawerService); private workspace = inject(ProjectWorkspaceService); - + public project: any; public projectUuid: string | null = null; public hasUnsavedChanges: boolean = false; @@ -34,7 +34,7 @@ export class ProjectEditComponent implements OnInit, OnDestroy { private projectSavedSubscription?: Subscription; //edición de descripción y nombre de proyectos= - public isEditing: boolean = false; + public isEditing: boolean = false; public editName: string = ''; public editDescription: string = ''; @@ -143,12 +143,21 @@ export class ProjectEditComponent implements OnInit, OnDestroy { //guardar cambios de nombre y descripción if (modifiedData.metadata) { + + if (!updatedProject.CuemsScript) { + updatedProject.CuemsScript = {}; + } + if (modifiedData.metadata.name !== undefined && modifiedData.metadata.name.trim() !== '') { updatedProject.name = modifiedData.metadata.name; + + updatedProject.CuemsScript.name = modifiedData.metadata.name; } if (modifiedData.metadata.description !== undefined) { updatedProject.description = modifiedData.metadata.description; + + updatedProject.CuemsScript.description = modifiedData.metadata.description; } } @@ -246,5 +255,5 @@ export class ProjectEditComponent implements OnInit, OnDestroy { if (this.projectUuid) { this.workspace.requestClose(this.projectUuid); } - } + } }