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

frontend: Attach URL support #1220

Closed
teosarca opened this issue Sep 28, 2017 · 7 comments
Closed

frontend: Attach URL support #1220

teosarca opened this issue Sep 28, 2017 · 7 comments

Comments

@teosarca
Copy link
Member

teosarca commented Sep 28, 2017

Type of issue

Feature request

Current behavior

Take a look in any document (e.g. https://w101.metasfresh.com:8443/window/143/1000031),
you are able to drop a file over it and the file will be attached.
You can see the attached files here:
image

Expected behavior

We want to also attach URLs (you will copy paste them in some modal panel.... read below).

It shall work as following:

  • user is opening the attachmens side list
  • at the bottom of attachments list, there will be a link-ish called "Add url...".
  • when clicked, a small modal will be opened. The modal will have 2 fields:
    ** URL: where user will be able to paste or write an URL
    ** Name: a name which user will gave to the URL. By default, when the URL field is changed, the Name field shall be automatically set by extracting the file name from URL (e.g. from http://somesite.com/a/b/c/file.pdf?query=bla the filename is "file.pdf")
  • when clicking "Attach" button:
    ** the backend API will be called to create the URL attachment (see http://w101.metasfresh.com:8081/swagger-ui.html#!/document-attachments-rest-controller/attachURLUsingPOST )
    ** close the modal (if attachment did not failed)
    ** refresh the attachments list

image

Also please check the backend task: metasfresh/metasfresh-webui-api-legacy#605

@teosarca
Copy link
Member Author

update: the "Add URL" modal shall look like the mail modal, but much more smaller.
image

@ottosichert ottosichert self-assigned this Oct 4, 2017
@ottosichert
Copy link
Contributor

@teosarca or @metas-ts please add these translations:

{
  "window.attachment.url.create": "Create",
  "window.attachment.url.name": "Name",
  "window.attachment.url.url": "URL",
  "window.attachment.url.title": "URL attachment",
  "window.attachment.url.success": "URL attachment has been added.",
  "window.attachment.url.error": "URL attachment could not be added!",
  "window.attachment.url.add": "Add URL attachment"
}

@teosarca
Copy link
Member Author

teosarca commented Oct 4, 2017

great, thanks !
on a quick test, works.

@ottosichert @metas-mk from UX point of view, i have following observations. wdyt?

image

image

image

@ottosichert
Copy link
Contributor

@teosarca Thanks for your feedback.

I agree on the two styling improvements. When pasting or typing a URL and leaving the input (onBlur), the name field is filled automatically. I can remove the success notification, then you can remove the obsolete translation again (window.attachment.url.success).

I will create a new PR tomorrow :)

@teosarca
Copy link
Member Author

teosarca commented Oct 4, 2017

@ottosichert merci

@ottosichert
Copy link
Contributor

@teosarca I added the changes in PR #1236 according to your comment above :)

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
@metas-lc metas-lc self-assigned this Oct 17, 2017
@metas-lc
Copy link

metas-lc commented Oct 17, 2017

IT

  1. drag and drop for attachment - still works like before (you get notification and progress bar) OK
  2. open the attachment from 1 and copy the url
  3. go to attachments
    => notice that there is a "Add URL attachment" on a grey line OK
  4. select add url attachment
    => a large modal appears
  5. paste the link you copied on step 2
    => notice the name is already set
  6. update the name, press on create
    => new attachment created, no popup
  7. repeat 5 and 6 without changing the name
    => works the same

Question: if you use backspace on name field, when you get to remove the whole name, the name is set back. Is it wanted?
will leave this like it is for now. Closing the issue

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

4 participants