diff --git a/public/js/pages/WarehouseShippingNote/WarehouseShippingNote.js b/public/js/pages/WarehouseShippingNote/WarehouseShippingNote.js
index 597e26602..19cede786 100644
--- a/public/js/pages/WarehouseShippingNote/WarehouseShippingNote.js
+++ b/public/js/pages/WarehouseShippingNote/WarehouseShippingNote.js
@@ -306,12 +306,25 @@ Vue.component('warehouse-shipping-note-see-through', {
-
+
Erstellt aus Kalendereintrag: {{ calendarEventType }}
+
+
+
+ Erstellt am: {{ formatDate(currentRow.create) }}
+
+
+
+ Erstellt von:
+
+ {{ creatorName || 'Unbekannt' }}
+
+
+
@@ -340,7 +353,9 @@ Vue.component('warehouse-shipping-note-see-through', {
perPage: 1,
rows: [],
activeTab: 'Editieren',
- window: window
+ window: window,
+ creatorName: null,
+ creatorLoading: false,
}
},
computed: {
@@ -363,7 +378,35 @@ Vue.component('warehouse-shipping-note-see-through', {
return null;
}
},
+ watch: {
+ currentRow(newVal) {
+ if (newVal && newVal.createBy) {
+ this.fetchCreatorInfo(newVal.createBy);
+ } else {
+ this.creatorName = null;
+ }
+ }
+ },
methods: {
+ formatDate(timestamp) {
+ return window.moment(timestamp * 1000).format('DD.MM.YYYY HH:mm');
+ },
+ async fetchCreatorInfo(userId) {
+ if (!userId) {
+ this.creatorName = null;
+ return;
+ }
+ this.creatorLoading = true;
+ try {
+ const response = await axios.get(`/User/getById?id=${userId}`);
+ this.creatorName = response.data?.name || 'Unbekannt';
+ } catch (error) {
+ console.error(`Failed to fetch user with ID ${userId}`, error);
+ this.creatorName = 'Fehler';
+ } finally {
+ this.creatorLoading = false;
+ }
+ },
tabStyle(tab) {
return {
padding: '10px 20px',