Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

included view: blurWhenOpen support #1249

Closed
teosarca opened this issue Oct 11, 2017 · 17 comments
Closed

included view: blurWhenOpen support #1249

teosarca opened this issue Oct 11, 2017 · 17 comments

Comments

@teosarca
Copy link
Member

Is this a bug or feature request?

FR

What is the current behavior?

In a view, you click on a row so the included view is opened on the right side panel.
While the included view (on the right) is open the main view (left side) is blurred out.
If you try to click on the actions button of the main view (left side) you just close the included view instead of running the action.

Which are the steps to reproduce?

image

What is the expected or desired behavior?

1. Refactoring: viewLayout response

We deprectated supportIncludedView and supportIncludedViewOnSelect properties.
Please don't use them because we plan to remove them.

Instead "includedView" (map) property was introduced, which can contain following properties:

  • openOnSelect: true/false => shall do the same as supportIncludedViewOnSelect
  • blurWhenOpen: true/false => the new property which is the subject of this task (see below)

So, the substitutes of the old properties are:

  • supportIncludedView => true if the "includedView" property is present
  • supportIncludedViewOnSelect => "includedView" -> "openOnSelect"

2. Support "includedView" -> "blurWhenOpen" property

If true, it shall behave EXACTLY how it is now.

If false:

  • the main view (left side) shall not be blurred out
  • the action button/dropdown shall be clickable, so i would be able to run an action without closing the right side view.

required for metasfresh/metasfresh#518

@ottosichert
Copy link
Contributor

ottosichert commented Oct 13, 2017

There is another issue first:

If there is no selection, quick actions are shown. => OK
If there an entry is selected, the included view is opened => OK but the quick actions of the main view disappear => NOK

@ottosichert
Copy link
Contributor

ottosichert commented Oct 13, 2017

EDIT: @metas-mk advised me there will only be actions for entries with a given handling unit, so this comment is obsolete

EDIT 2: @metas-mk confirmed there is an issue with Picking Tray, @teosarca will see about this


I further investigated this issue and could narrow it down to no actions passed for given windowType, viewId and entry id:

When an entry is selected (in https://w101.metasfresh.com:8443/window/540206), the QuickActions component requests actions from the API with current windowType and viewId and stores them in its state. The result (e.g. to http://w101.metasfresh.com:8081/rest/api/documentView/540206/540206-c37eb8e86b464da3b7f8cb3767bc5879/quickActions?selectedIds=1000124) for all entries in this exact table is each

{"actions":[]}

Interestingly when multiple items are selected (e.g. http://w101.metasfresh.com:8081/rest/api/documentView/540206/540206-c37eb8e86b464da3b7f8cb3767bc5879/quickActions?selectedIds=1000104,1000103) this response is yielded:

{"actions":[{"processId":"ADP_540874","caption":"Take out HU","description":"","quickAction":true,"defaultQuickAction":false,"disabled":true,"disabledReason":"Nur eine Zeile soll ausgewählt sein"}]}

@teosarca Do you know if there was an API change in the last two days regarding the Picking Tray?

@teosarca
Copy link
Member Author

EDIT 2: @metas-mk confirmed there is an issue with Picking Tray, @teosarca will see about this

Yes, basically i cannot add an HU to picking slot if #1258 is not fixed.

@ottosichert
Copy link
Contributor

1. Refactoring: viewLayout response

We deprectated supportIncludedView and supportIncludedViewOnSelect properties.
Please don't use them because we plan to remove them.

Instead "includedView" (map) property was introduced, which can contain following properties:

  • openOnSelect: true/false => shall do the same as supportIncludedViewOnSelect
  • blurWhenOpen: true/false => the new property which is the subject of this task (see below)

So, the substitutes of the old properties are:

  • supportIncludedView => true if the "includedView" property is present
  • supportIncludedViewOnSelect => "includedView" -> "openOnSelect"

@teosarca Does this also apply to row data? It currently looks like this:

[
  {
    "...": "...",

    "includedView": {
      "viewId": "afterPickingHUs-4e881f59082a4a28a17a4ab3db2a5a7f",
      "windowId": "afterPickingHUs"
    },
    "supportAttributes": false,
    "supportIncludedViews": true
  },
  { "...": "..." }
]

@teosarca
Copy link
Member Author

@ottosichert nop, i did the change only on layout level.

@ottosichert
Copy link
Contributor

Okay thanks for the info. Will it be changed anytime soon?

@teosarca
Copy link
Member Author

not planned.

@teosarca
Copy link
Member Author

only if is needed or if u have an improvement suggestion....

@ottosichert
Copy link
Contributor

It's not needed and I don't necessarily see an improvement here (maybe besides consistency). I would have added a fallback in my coming PR if it was planned.

@teosarca
Copy link
Member Author

@ottosichert lili created some data for you: https://w101.metasfresh.com:8443/window/540371

image

@ottosichert
Copy link
Contributor

Thansk for the data. Clicking on Take out HU will not close the included view and execute the quick action.

After clicking the quick action the view flashed but nothing changed. When refreshing the page, the entries are gone. Is this supposed to work like that?

Furthermore the selection seems buggy, when selecting the item as in your screen shot everything works fine (one item selected, quick action enabled). When selecting the item below, both TU and CU are selected. Is this correct?

metas-ts added a commit to metasfresh/metasfresh that referenced this issue Oct 22, 2017
[#2761](#2761) Window Partner dist orgs: link using dropship partner
[#1317](#1317) AD_ChangeLog: don't log Updated and UpdatedBy
[#2766](#2766) add description in c_doctype_trl
[#2784](#2784) Partner Import : Add fields address3 and address4
[#1263](metasfresh/metasfresh-webui-frontend-legacy#1263) Row not selected and no actions after closing the modal view
[#480](#480) Co-Product improvement in Manufacturing
[#1258](metasfresh/metasfresh-webui-frontend-legacy#1258) Opening a new included view is broken (again)
[#2786](#2786) Drop org.adempiere.model.virtualColumn legacy functionality
[#2564](#2564) Concept for entering multiple discounts for order and subscription
[#2311](#2311) Customer Invoices and Invoice Candidates adjustments
[#1281](metasfresh/metasfresh-webui-frontend-legacy#1281) Translations of Photo Widget in User Window
[#2763](#2763) New Window Picking Tray Clearing
[#1249](metasfresh/metasfresh-webui-frontend-legacy#1249) included view: blurWhenOpen support
[#1275](metasfresh/metasfresh-webui-frontend-legacy#1275) Scrolling in Modal window throws errors
[#2768](#2768) Translate window for process "Change Password" into EN
[#625](metasfresh/metasfresh-webui-api-legacy#625) WebUI Scheduler Window Log Subtab: Invalid Client ID=0
[#1248](metasfresh/metasfresh-webui-frontend-legacy#1248) included view: wrong selectedIds when calling quickActions
[#639](metasfresh/metasfresh-webui-api-legacy#639) Can't save a new partner
[#2774](#2774) Vendor Invoice Layout and Translations in WebUI
[#1268](metasfresh/metasfresh-webui-frontend-legacy#1268) Sitemap broken
[#1227](metasfresh/metasfresh-webui-frontend-legacy#1227) The Letter window dissapears after Print Preview
[#1278](metasfresh/metasfresh-webui-frontend-legacy#1278) Shortcuts for New, Batch and Expand are broken
[#2755](#2755) error on hu changing status from shipped to active
[#1271](metasfresh/metasfresh-webui-frontend-legacy#1271) Open ANY included view broken
[#2769](#2769) model generator: wrong columns are generated
[#2750](#2750) Flatrate Import: Support tax category
[#2752](#2752) Inherit C_Taxcategory_ID and IsTaxIncluded from orderline to FT
[#2751](#2571) Report Translations to en_US: menu reports
[#2379](#2379) Procurement Candidates generate Purchase Order
[#2739](#2739) Add context into if exception happens in WorkpackageProcessorTask.processWorkpackage
[#637](metasfresh/metasfresh-webui-api-legacy#637) Move Picking Tray Clearing Functionality to new window
[#472](#472) Picking from Handling Unit Editor (WebUI)
[#1092](metasfresh/metasfresh-webui-frontend-legacy#1092) Prepare Update to React 16
[#1223](metasfresh/metasfresh-webui-frontend-legacy#1223) Scrollbar missing in Handling Unit Editor after "Internal Usage Action"
[#2726](#2726) Set correct identifiers in the table M_ShipmentSchedule (v2)
[#2731](#2731) Window Design Webui: Improve window Shipment Restrictions
[#2732](#2732) Window Design Webui : Add description field in sales order line
[#2725](#2725) Webui Window Design: Improvements in window ESR Payment Import
[#2728](#2728) Webui Design Window: Add Translations to Business Partner
[#2653](#2653) Window Design Webui: Improve Businesspartner Dist-Orgs window
[#2729](#2729) Window Design Webui: Add missing fields to window Tourversion
[#2240](#2240) npe on zoom into header aggregation
[#2730](#2730) Window Design Webui: Improvements in window Purchase order
[#2740](#2740) Picking slot Rack System flag
[#632](metasfresh/metasfresh-webui-api-legacy#632) HU-Trace: show all connected records

me-73
@metas-lc metas-lc self-assigned this Oct 23, 2017
@metas-lc
Copy link

metas-lc commented Oct 23, 2017

IT

  1. open Picking Tray Clearing (Prototype) (540371)
  2. select a slot that has picked and processed HUs
    => right view opens OK
    => left view is still visible (not blurred) OK
  3. on the left side, select the HU
    => take out HU button appeared OK
  4. select something on right side
    => take out HU button is still there OK
  5. press on "take out HU" button
    => the selected Hu goes on the right side OK
    => both sides are independent OK

=> you have to select the "Picking Tray Clearing (Prototype)" breadcrumb to see the HUs from the right side (created backend task: metasfresh/metasfresh-webui-api-legacy#643)

!!! @ottosichert Question: when you navigate on slots (left side), the right side is not refreshed . (e.g. there is no afterPickingHUs). Is it wanted? (for me it's ok, but just to make sure)

@ottosichert
Copy link
Contributor

@metas-lc Thanks for your feedback and sorry for my late response.

I can see the right side is not refreshed after the selection on the left side changes:

  • Open Picking Tray Clearing (Prototype) (windowType 540371)

  • Window fetches data from http://w101.metasfresh.com:8081/rest/api/documentView/540371/540371-439d70cb96de466fb1b0bc7274b6c8e7?firstRow=0&pageLength=20

    See JSON response
    {
     "windowId": "540371",
     "viewId": "540371-439d70cb96de466fb1b0bc7274b6c8e7",
     "size": 18,
     "result": [
       {
         "id": "1000104",
         "fieldsByName": {
           "ID": {
             "field": "ID",
             "value": "1000104",
             "widgetType": "Integer"
           }
         },
         "type": "M_Picking_Slot",
         "supportAttributes": false,
         "supportIncludedViews": true,
         "includedView": {
           "windowId": "afterPickingHUs",
           "viewId": "afterPickingHUs-439d70cb96de466fb1b0bc7274b6c8e7"
         },
         "colspan": true,
         "caption": "101.0  "
       },
       {
         "id": "1000103",
         "fieldsByName": {
           "ID": {
             "field": "ID",
             "value": "1000103",
             "widgetType": "Integer"
           }
         },
         "type": "M_Picking_Slot",
         "supportAttributes": false,
         "supportIncludedViews": true,
         "includedView": {
           "windowId": "afterPickingHUs",
           "viewId": "afterPickingHUs-439d70cb96de466fb1b0bc7274b6c8e7"
         },
         "colspan": true,
         "caption": "102.0  "
       },
       "[...]"
     ],
     "firstRow": 0,
     "pageLength": 20,
     "type": "540371"
    }
  • All items on the left side have the same includedView:

    {
      "windowId": "afterPickingHUs",
      "viewId": "afterPickingHUs-439d70cb96de466fb1b0bc7274b6c8e7"
    }
  • Thus changing the selection on the left side does not refresh the right side as it's the same view!

@teosarca Do you know if this is wanted?

@teosarca
Copy link
Member Author

@ottosichert in case it's exactly the same view it's OK to not be queried again.
But in case the viewId is different the frontend shall query it.

@ottosichert
Copy link
Contributor

@teosarca okay that makes sense.

Is it intended that in this case all items on the left side have the exact same includedView?

Besides that, by manually altering the includedView of some items I found out the view does not query again, I will resolve this now.

@ottosichert ottosichert assigned ottosichert and unassigned metas-lc Oct 29, 2017
@teosarca
Copy link
Member Author

Is it intended that in this case all items on the left side have the exact same includedView?

Generally speaking, no.
But for our particular case, the Picking Tray Clearning window, yes we want to have the same includedViewId.

Reason behind: when we initially developed this included view feature, we started with cases where the "included view" really depends on what row you select on main view.
But in case of Picking Tray Clearing that does not apply because there we want to have side by side views. So we decided to return same viewId for any row you select, just to have that effect.

Besides that, by manually altering the includedView of some items I found out the view does not query again, I will resolve this now.

thanks!

@metas-dh
Copy link
Member

Results of IT2
tested in mf15

  • repeated testcase of IT1: working fine, OK (remaining problem in back end task also OK now)
  • changing the selection on the left side does not refresh the right side as it's the same view:
    =>if it is the exact same includedViewID as is true in Picking Tray Clearing (Prototype): OK
  • changing the selection on the left side does refresh the right side if it's not the same view:
    => if includedViewID is different (e.g. in Picking Terminal), then view queries again: OK

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants