Feature #1015
closedContent with result codes
100%
Description
Each module can contain result codes (e.g. 'CoreResultCode'). Codes are localized on FE and used through the app.
Create content (page) with list of codes on FE:
- expose new GET endpoint in 'ModuleController' - <server>/modules/{moduleId}/result-codes. Available under 'MODULE_READ' permission
- create new link in 'Documentation' column in BE modules table (Setting > Modules > Modules (backend) ) - 'Result codes'
- after link is clicked, then modal or new content will be shown with localized module's result codes in the 'Basic.Table'. Columns - status (number), code, message (flash message can be used). Table will be sorted by status number and then by code. Filter by code can be added (optional).
- Check result codes localization and add localization, if missing.
Related issues
Updated by Roman Kučera almost 7 years ago
- Status changed from New to In Progress
Implementation in branch rkucera/1015-modules-result-codes
New endpoint on backend which is returning list of result codes for module by moduleId.
On frontend I implemented modal window which show result codes for each modul. It's a button in documentation column on be-modules tab as Radek wrote. Probably will be better use some kind of link or diffrent style of button, I am not sure that current solution fit into design :)
Need to implement sorting by status number and then by code.
Updated by Roman Kučera almost 7 years ago
- % Done changed from 0 to 80
Implemented default sorting by code number a then by code. Modal window contains filter by code and whole implementation is in separate file.
On BE I edited previously created endpoint, so now it accepts searchparameters which is for filtering.
I have only one issue with design of the modal window, I am using large version of modal but still is to small, because code and message columns are large. Solution will be probably limit the column width for some of them.
Updated by Roman Kučera almost 7 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Roman Kučera to Radek Tomiška
Added localization for result codes. Remove some duplicate localization on core module which I found.
Design of modal window is fixed to. When all messages is loaded from localization the flash message automatically fit in column.
Updated by Roman Kučera over 6 years ago
I should probably write documentation how to support result codes in module (override method in SomemoduleModuleDescriptor.java otherwise endpoint will return empty list for modul)
Updated by Radek Tomiška over 6 years ago
- Status changed from Needs feedback to In Progress
- Assignee changed from Radek Tomiška to Roman Kučera
- Target version set to Jade (8.1.0)
- % Done changed from 80 to 90
This feature is really nice, it works and code looks nice. I did test, review and refactoring:
- change filter to text
- change design - using OperationResult component
- 'module' variable was removed - it's keyword for javascript, so just for sure
- close button added to modal detail
- FE component api was simplified
I merged it into develop. Could you add integration tests and documentation (idea with developer tutorial is great.)). Then this ticket can be closed.
Updated by Radek Tomiška over 6 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
I've added unit test and doc: https://wiki.czechidm.com/tutorial/dev/module_result_code
Updated by Radek Tomiška over 5 years ago
- Related to Defect #1754: Parameters are not propagate to flash messages added