From a40a8c6bb4111905146c08f2c4350851859a3c96 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 4 Dec 2025 22:43:23 +0100 Subject: [PATCH] Intermediate commit --- src/frontend/src/components/UI/Dropdown.vue | 5 +- .../src/components/UI/RouteDropdown.vue | 507 ++++++++++++++++++ .../layout/bulkedit/BulkEditRow.vue | 8 +- .../src/components/layout/config/Apps.vue | 30 +- .../layout/config/BulkOperations.vue | 1 + .../components/layout/config/Materials.vue | 5 +- .../src/components/layout/config/Nodes.vue | 6 +- .../components/layout/config/Properties.vue | 3 + .../src/components/layout/config/Rates.vue | 1 + .../src/components/layout/config/Users.vue | 15 +- .../DestinationEditHandlingCost.vue | 1 + .../destination/DestinationEditRoutes.vue | 1 + .../destination/mass/DestinationMassEdit.vue | 45 +- .../mass/DestinationMassHandlingCost.vue | 47 +- .../mass/DestinationMassHandlingCostRow.vue | 7 +- .../mass/DestinationMassQuantity.vue | 51 +- .../mass/DestinationMassQuantityRow.vue | 2 +- .../destination/mass/DestinationMassRoute.vue | 437 ++++++++++++--- .../mass/DestinationMassRouteCell.vue | 229 ++++++++ .../mass/DestinationMassRouteRow.vue | 75 +++ .../src/pages/CalculationMassEdit.vue | 26 +- src/frontend/src/store/destinationEdit.js | 65 ++- 22 files changed, 1400 insertions(+), 167 deletions(-) create mode 100644 src/frontend/src/components/UI/RouteDropdown.vue create mode 100644 src/frontend/src/components/layout/edit/destination/mass/DestinationMassRouteCell.vue create mode 100644 src/frontend/src/components/layout/edit/destination/mass/DestinationMassRouteRow.vue diff --git a/src/frontend/src/components/UI/Dropdown.vue b/src/frontend/src/components/UI/Dropdown.vue index b3aac56..8809650 100644 --- a/src/frontend/src/components/UI/Dropdown.vue +++ b/src/frontend/src/components/UI/Dropdown.vue @@ -4,7 +4,7 @@ ref="trigger" class="dropdown-trigger" :class="{ 'dropdown-trigger--open': isOpen}" - @click="toggleDropdown" + @click.stop="toggleDropdown" @keydown="handleTriggerKeydown" :disabled="disabled" > @@ -143,6 +143,9 @@ export default { return this.modelValue === option[this.valueKey] }, handleClickOutside(event) { + + console.log("HANDLE click outside") + if (!this.$refs.dropdown?.contains(event.target)) { this.closeDropdown() } diff --git a/src/frontend/src/components/UI/RouteDropdown.vue b/src/frontend/src/components/UI/RouteDropdown.vue new file mode 100644 index 0000000..86c5f0c --- /dev/null +++ b/src/frontend/src/components/UI/RouteDropdown.vue @@ -0,0 +1,507 @@ + + + + + \ No newline at end of file diff --git a/src/frontend/src/components/layout/bulkedit/BulkEditRow.vue b/src/frontend/src/components/layout/bulkedit/BulkEditRow.vue index 41aeed3..3b5d815 100644 --- a/src/frontend/src/components/layout/bulkedit/BulkEditRow.vue +++ b/src/frontend/src/components/layout/bulkedit/BulkEditRow.vue @@ -293,7 +293,7 @@ export default { destinationCheck() { if (((this.destinations ?? null) === null) || this.destinations.length === 0) - return false; + return true; return !this.destinations?.some(d => d.annual_amount == null); @@ -301,7 +301,7 @@ export default { routeCheck() { if (((this.destinations ?? null) === null) || this.destinations.length === 0) - return false; + return true; return this.destinations?.every(d => d.routes?.some((route) => route.is_selected)); }, @@ -352,7 +352,7 @@ export default { if (this.isInitialized && oldVal === false && newVal === true - && this.initialCheckStates?.destination !== true) { + && this.initialCheckStates?.destination === false) { // Hier war !== true, sollte === false sein this.showDestinationCheck = true; if (this.initialCheckStates) { this.initialCheckStates.destination = true; @@ -363,7 +363,7 @@ export default { if (this.isInitialized && oldVal === false && newVal === true - && this.initialCheckStates?.route !== true) { + && this.initialCheckStates?.route === false) { // Hier war !== true, sollte === false sein this.showRouteCheck = true; if (this.initialCheckStates) { this.initialCheckStates.route = true; diff --git a/src/frontend/src/components/layout/config/Apps.vue b/src/frontend/src/components/layout/config/Apps.vue index 451b131..5bb9dbb 100644 --- a/src/frontend/src/components/layout/config/Apps.vue +++ b/src/frontend/src/components/layout/config/Apps.vue @@ -1,20 +1,22 @@ @@ -65,6 +67,12 @@ export default { \ No newline at end of file diff --git a/src/frontend/src/components/layout/config/Nodes.vue b/src/frontend/src/components/layout/config/Nodes.vue index 2f221b2..b308524 100644 --- a/src/frontend/src/components/layout/config/Nodes.vue +++ b/src/frontend/src/components/layout/config/Nodes.vue @@ -1,5 +1,5 @@