grid
grid copied to clipboard
IMAGEDAM-1667: Metadata panel displays send to photo sales usages
What does this change?
Note: this PR should be reviewed after https://github.com/guardian/grid/pull/4267 as it builds on the changes included in that PR
The relevant files for this PR are:
- kahuna/public/js/components/gr-image-usage-photosales/gr-image-usage-photosales.css
- kahuna/public/js/components/gr-image-usage-photosales/gr-image-usage-photosales.css
- kahuna/public/js/components/gr-image-usage/gr-image-usage.html
- kahuna/public/js/components/gr-image-usage/gr-image-usage.js
- kahuna/public/js/util/constants/sendToCapture-config.js
- usage/app/controllers/UsageApi.scala
Previously, after the user had completed the process of adding a photo sales and they navigated to the usages panel the usage was presented as if it was a standard syndication usage. Now a custom photo sales 'usage' is rendered instead. Additionally, as deleting the usage from the image, does not cause the image to be deleted in photo sales, changes have been made to usagesAPI so that the 'Delete All' button does not delete a syndication usage when it has a partnerName = Capture (i.e. is a photo sales usage).
The Photosales functionality is BBC specific, hence it is disabled by default via the showSendToPhotoSales feature flag.
How should a reviewer test this change?
As a user with elevated permissions and with the showSendToPhotoSales flag set to true:
- Select a number of image thumbnails from the main grid view, ensure none of these images have already been sent to Photosales
- Click the 'Send to Photo Sales Button' from the menu that appears
- A confirmation dialog modal will pop up
- Click 'Yes, send'
- A green notification banner will pop up
- Navigate to the usages panel
- A new 'Photo Sales' usage has been added
- Then, click the 'delete all button' and wait for the page to refresh
How can success be measured?
Confirm that the added photo sales usage has the following appearance:
And confirm that after clicking the 'delete all button' the 'Added to Photo Sales' usage remains on the image.
Who should look at this?
Tested? Documented?
- [x] locally by committer
- [ ] locally by Guardian reviewer
- [ ] on the Guardian's TEST environment
- [ ] relevant documentation added or amended (if needed)