Commit f5026161 authored by Jérome Perrin's avatar Jérome Perrin

officejs_support_request_ui: don't use non existing action

There is no action with referecne `list` on support request module.
parent 463855b6
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
preference_href: context.getUrlFor({command: 'display', options: {page: "supportrequest_preference"}}), preference_href: context.getUrlFor({command: 'display', options: {page: "supportrequest_preference"}}),
logout_href: context.getUrlFor({command: 'display', options: {page: "logout"}}), logout_href: context.getUrlFor({command: 'display', options: {page: "logout"}}),
search_href: context.getUrlFor({command: 'display', options: {page: "search"}}), search_href: context.getUrlFor({command: 'display', options: {page: "search"}}),
supportrequest_href: context.getUrlFor({command: 'display', options: {jio_key: "support_request_module", page: "list"}}) supportrequest_href: context.getUrlFor({command: 'display', options: {jio_key: "support_request_module"}})
  • the argument page: "list" (as i understand) means when i check supportrequest_href in panel, i'll go to https://softinstxxxx#/support_request_module?page=list, then renderjs will render this list gadget.

    you should also delete this gadget files if you don't need it

    i guess the reason to use this gadget is to have a different header in Support Requests Module view, especially to remove 'Add'

    here is what i got when apply your changes in my instance

    Screenshot_2018-10-29_at_09.55.20

    in this view, i can click the 'Add' link and add a support request without "Title", "Project", "Support Type"

  • ah thanks, I did not notice there was a custom gadget for the list. Really good point also for the "+ Add" button.

    I don't understand how /erp5/web_site_module/erp5_officejs_support_request_ui/#/support_request_module/?page=list can render this gadget. I don't understand the relation with page=list and this gadget.

    Now, if I open /erp5/web_site_module/erp5_officejs_support_request_ui/#/support_request_module/?page=list I have the same 500 error

    Error Type: AttributeError
    Error Value: officejs_support_request_view

    from the erp5/web_site_module/erp5_officejs_support_request_ui/hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_officejs_support_request%2FSupportRequestModule_viewForOfficejsSupportRequest&view=officejs_support_request_view request.

    now, I don't know ... I feel it would be better to drop the custom list gadget and have this potential bug until we have an integrated solution for this ( I don't know, "add action" or something). There's a big "Add support request" button on the front page and that's what users will be using.

  • I still don't understand how this context.getUrlFor({command: 'display', options: {jio_key: "support_request_module", page: "list"}}) was working before, but I took a completely different approach that I find a bit easier.

    Instead of using a different gadget for page, use a different gadget for header, that would not render the add action ( I tried a bit to render the fast input action in this case but I gave up quickly, thinking it's "not really needed").

    I see it's possible to configure a different gadget as header gadget, so I guess it's the indented way of doing this kind of customisations.

    because this custom header gadget embeds the default gadget, the code is rather small ( html / js )

    [edit : updated hash in js/html links after pushing new commit]

    Edited by Jérome Perrin
Please register or sign in to reply
}); });
}) })
.push(function (panel_options) { .push(function (panel_options) {
......
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1540789939.84</float> <float>1540790669.05</float>
<string>GMT+9</string> <string>GMT+9</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment