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

frontend: Labels widget #1138

Closed
metas-mk opened this issue Aug 15, 2017 · 5 comments
Closed

frontend: Labels widget #1138

metas-mk opened this issue Aug 15, 2017 · 5 comments

Comments

@metas-mk
Copy link
Member

Type of issue

Feature request

Current behavior

Currently, when adding Sub-Data References to a single entry, this can only be done via included tabs w/ grid view and advanced edit. This is annoying when the data in the included tab only has one column (or a few columns) or is some kind of reference list.

Expected behavior

We shall have a Lookup which allows opening a selection list (look & feel identical to lookup autoselect). The list opens and the user can scroll through the list, after selection the entry is shown as "ticked", the user can select multiple entries. After closing the selection list, the selected entries are shown as kind of labels (with a circled x to delete the label).

This kind of Lookup can be seen in GitHub Issues as example
image

image

@metas-mk metas-mk added this to the Backlog milestone Aug 15, 2017
@wiadev wiadev self-assigned this Aug 15, 2017
@metas-mk
Copy link
Member Author

metas-mk commented Aug 15, 2017

The Design of the labels shall be similar to the Filter Labels set from referenced documents. Here an example shown when opening a referenced document List for Invoices from Business Partner window.
image

@teosarca
Copy link
Member

note: we have to prepare the API first

@metas-mk metas-mk assigned teosarca and unassigned teosarca Sep 18, 2017
@teosarca
Copy link
Member

API and test case ready.

Open a business partner, e.g. https://w101.metasfresh.com:8443/window/123/2156425

Layout

image

Fetching available labels

To fetch ALL available labels (already assigned or not) you can use:

See

Field value

The field value can be obtained and it's handled like any other widget, using exactly the same API.
The value format is:

{
	"values": [
		{
			"K_Firma": "Firma"
		},
		{
			"K_Behörden": "Behörden"
		}
	]
}

Basically, an array of labels (described by key/name pairs)

Those labels are the assigned labels.
If you want to add or remove or change assigned labels, you just need to change the array and PATCH the document, same like any other field.
e.g.

curl -X PATCH --header 'Content-Type: application/json' --header 'Accept: application/json' -d '[ \ 
   { \ 
     "op": "replace", \ 
     "path": "Labels_548674", \ 
     "value": {"values": [{"K_Firma": "Firma"}, {"K_Behörden": "Behörden"}]} \ 
   } \ 
 ] \ 
 ' 'http://w101.metasfresh.com:8081/rest/api/window/123/2156425?advanced=false'

@teosarca
Copy link
Member

teosarca commented Oct 4, 2017

awesome, quick tested and integrated.

@teosarca teosarca changed the title New Lookup for multiple selections frontend: Labels widget Oct 4, 2017
@metas-rc metas-rc self-assigned this Oct 5, 2017
@metas-rc
Copy link
Member

metas-rc commented Oct 5, 2017

Results of IT

  • Adding and removing labels works correctly in the window Business Partner

metas-ts added a commit to metasfresh/metasfresh that referenced this issue Oct 6, 2017
[#2623](#2623) overhaul
shipment schedule closing
[#2494](#2494) Prices
changing in FlatrateTerms after Prolongation
[#2642](#2642) Flatrate
Import: Support explicit enddate and terminated contracts
[#2650](#2650) allow
subscription pause and recipient change with existing shipment scheds
[#1220](metasfresh/metasfresh-webui-frontend-legacy#1220)
frontend: Attach URL support
[#2657](#2657) don't show
active hus in hu costprice report
[#1339](#1339) Forecast
Window as Document
[#1138](metasfresh/metasfresh-webui-frontend-legacy#1138)
frontend: Labels widget
[#2592](#2592) Make
letter print preview work with AD_BoilerPlate jasper process
[#2590](#2590) Make use
of product documentnote on Quotation and Order Document
[#1212](metasfresh/metasfresh-webui-frontend-legacy#1212)
Selection using SHIFT does not work in Handling unit Editor
[#2525](#2525) Generate
Picking Document
[#2604](#2604) Printing
via standalone client takes too long
[#2611](#2611) Business
Partner Import with empty location
[#2543](#2543)
Businesspartner Import for different Partner with the same address
[#2627](#2627) Create
Zoom Across Reference between Flatrate Term and Invoice Candidate
[#2432](#2432) Process
for converting any table to a document
[#2152](#2152) Prepare
Default Filters for Retraceability window
[#2615](#2615) Make the
callout C_Flatrate_Matching.onC_Flatrate_Transition_ID comply with webui

me-45
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

7 participants