diff --git a/.changes/unreleased/Feature-20250424-142211.yaml b/.changes/unreleased/Feature-20250424-142211.yaml new file mode 100644 index 000000000..e1f5297c3 --- /dev/null +++ b/.changes/unreleased/Feature-20250424-142211.yaml @@ -0,0 +1,7 @@ +kind: Feature +body: Add the document file name to the document title when a user upload a document, + unless there is already a document title. +time: 2025-04-24T14:22:11.800975422+02:00 +custom: + Issue: "377" + SchemaChange: No schema change diff --git a/.changes/unreleased/Fixed-20250424-133943.yaml b/.changes/unreleased/Fixed-20250424-133943.yaml new file mode 100644 index 000000000..c11c42ac0 --- /dev/null +++ b/.changes/unreleased/Fixed-20250424-133943.yaml @@ -0,0 +1,7 @@ +kind: Fixed +body: trying to prevent bug of typeerror in doc-history + improved display of document + history +time: 2025-04-24T13:39:43.878468232+02:00 +custom: + Issue: "376" + SchemaChange: No schema change diff --git a/.changes/unreleased/Fixed-20250424-163746.yaml b/.changes/unreleased/Fixed-20250424-163746.yaml new file mode 100644 index 000000000..79c07b080 --- /dev/null +++ b/.changes/unreleased/Fixed-20250424-163746.yaml @@ -0,0 +1,7 @@ +kind: Fixed +body: Display previous participation in acc course work even if the person has left + the acc course +time: 2025-04-24T16:37:46.970203594+02:00 +custom: + Issue: "381" + SchemaChange: No schema change diff --git a/.changes/unreleased/UX-20250423-172624.yaml b/.changes/unreleased/UX-20250423-172624.yaml new file mode 100644 index 000000000..2a17e4195 --- /dev/null +++ b/.changes/unreleased/UX-20250423-172624.yaml @@ -0,0 +1,6 @@ +kind: UX +body: Remove default filter in_progress for the page 'my tasks'; Allows for new tasks to be displayed upon opening of the page +time: 2025-04-23T17:26:24.45777387+02:00 +custom: + Issue: "374" + SchemaChange: No schema change diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/index.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/index.ts index 8778cc7ef..30fe2b26a 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/index.ts +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/index.ts @@ -10,6 +10,9 @@ const startApp = ( collectionEntry: null | HTMLLIElement, ): void => { console.log("app started", divElement); + + const inputTitle = collectionEntry?.querySelector("input[type='text']"); + const input_stored_object: HTMLInputElement | null = divElement.querySelector("input[data-stored-object]"); if (null === input_stored_object) { @@ -26,9 +29,10 @@ const startApp = ( const app = createApp({ template: '', - data(vm) { + data() { return { existingDoc: existingDoc, + inputTitle: inputTitle, }; }, components: { @@ -38,10 +42,13 @@ const startApp = ( addDocument: function ({ stored_object, stored_object_version, + file_name, }: { stored_object: StoredObject; stored_object_version: StoredObjectVersion; + file_name: string; }): void { + stored_object.title = file_name; console.log("object added", stored_object); console.log("version added", stored_object_version); this.$data.existingDoc = stored_object; @@ -49,6 +56,11 @@ const startApp = ( input_stored_object.value = JSON.stringify( this.$data.existingDoc, ); + if (this.$data.inputTitle) { + if (!this.$data.inputTitle?.value) { + this.$data.inputTitle.value = file_name; + } + } }, removeDocument: function (object: StoredObject): void { console.log("catch remove document", object); diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFile.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFile.vue index cfeb6c66b..017629ee4 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFile.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFile.vue @@ -23,6 +23,7 @@ const emit = { stored_object_version: StoredObjectVersionCreated, stored_object: StoredObject, + file_name: string, }, ) => void >(); @@ -114,7 +115,21 @@ const handleFile = async (file: File): Promise => { persisted: false, }; - emit("addDocument", { stored_object, stored_object_version }); + const fileName = file.name; + let file_name = "Nouveau document"; + const file_name_split = fileName.split("."); + if (file_name_split.length > 1) { + const extension = file_name_split + ? file_name_split[file_name_split.length - 1] + : ""; + file_name = fileName.replace(extension, "").slice(0, -1); + } + + emit("addDocument", { + stored_object, + stored_object_version, + file_name: file_name, + }); uploading.value = false; }; diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFileModal.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFileModal.vue index 216e2ddad..956b3e859 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFileModal.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFileModal.vue @@ -20,6 +20,7 @@ const emit = defineEmits<{ { stored_object: StoredObject, stored_object_version: StoredObjectVersion, + file_name: string, }, ): void; (e: "removeDocument"): void; @@ -42,14 +43,16 @@ const buttonState = computed<"add" | "replace">(() => { function onAddDocument({ stored_object, stored_object_version, + file_name, }: { stored_object: StoredObject; stored_object_version: StoredObjectVersion; + file_name: string; }): void { const message = buttonState.value === "add" ? "Document ajouté" : "Document remplacé"; $toast.success(message); - emit("addDocument", { stored_object_version, stored_object }); + emit("addDocument", { stored_object_version, stored_object, file_name }); state.showModal = false; } diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFileWidget.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFileWidget.vue index 4e295e9ea..54f8ddf0c 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFileWidget.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFileWidget.vue @@ -19,6 +19,7 @@ const emit = defineEmits<{ { stored_object: StoredObject, stored_object_version: StoredObjectVersion, + file_name: string, }, ): void; (e: "removeDocument"): void; @@ -53,11 +54,13 @@ const dav_link_href = computed(() => { const onAddDocument = ({ stored_object, stored_object_version, + file_name, }: { stored_object: StoredObject; stored_object_version: StoredObjectVersion; + file_name: string; }): void => { - emit("addDocument", { stored_object, stored_object_version }); + emit("addDocument", { stored_object, stored_object_version, file_name }); }; const onRemoveDocument = (e: Event): void => { diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonList.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonList.vue index f44d18aaa..ac4bf4591 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonList.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/HistoryButton/HistoryButtonList.vue @@ -53,7 +53,7 @@ const onRestored = ({