AmbireTech / adex-platform

AdEx Platform UI
https://platform.adex.network
GNU General Public License v3.0
58 stars 19 forks source link

Ability to clone ad unit and edit it #144

Closed ivopaunov closed 5 years ago

ivopaunov commented 5 years ago

Add a button in the ad units list and on the unit details page that opens the new Ad unit steps dialog with filled fields from cloned item. Just use the https://github.com/AdExNetwork/adex-dapp/blob/7162ba728cf84342ee65d77379873b1374c170ca/src/components/dashboard/forms/items/NewItems.js#L94 and before that use action that cones the unit and add it to store newItem.AdUnit but with removed id. Keep in mind that there might be an issue with the image. You to take it from its medirUrl and add it as { tempUrl: objectUrl, mime: file.type } to temp prop of the new AdUnit (use URL.createObjectURL)

rori4 commented 5 years ago

Should the targeting be copied as well?