Version 9 - Customise Bottom Panel Views for Activities and History - Any Ideas?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • crmscot
    Member
    • Jun 2014
    • 58

    Version 9 - Customise Bottom Panel Views for Activities and History - Any Ideas?

    Version 9 - Activities and History Bottom Panels Customisation. Help needed please.

    Great to have Activities and History now as bottom panels in tabbed view. I've turned off all side panels and I'm using a "wide view". For me, the icing on the cake would be to have a single line display per record in the Activities and History panels. At present each record takes 2 lines which would make sense for a narrow side panel but wastes space in the wide bottom panel view.

    Click image for larger version

Name:	thumb_13455.png
Views:	34
Size:	3.9 KB
ID:	114470

    I know it's not upgrade safe but I thought I'd initially try to get this to work following another post which suggested modifying the "defaultListLayout" file in /client/modules/crm/src/views/record/panels/activities.js

    This seems to have worked in previous versions. Has something changed in V9 because any changes I make have no effect even after clear cache, rebuild, logout and in.

    Any help will be appreciated.
  • rabii
    Active Community Member
    • Jun 2016
    • 1262

    #2
    Espocrm use ES6 and then in the build up process it transpile/compile the ES6 to AMD that is why you can't just change the core file and expect it will work. you can create a custom activities.js view and use pass the new detailListLayout something as below

    PHP Code:
    define('custom:views/record/panels/activities', ['views/record/panels/activities'], (View) => {
    
        return class extends View {
            
            defaultListLayout = {
                rows: [
                    [
                        {name: 'ico', view: 'crm:views/fields/ico'},
                        {name: 'name', link: true, view: 'views/event/fields/name-for-history'},
                        {name: 'dateStart', soft: true},
                        {name: 'assignedUser'},
                    ]
                ]
            }
    
            setup() {
                // Calling the parent `setup` method, can be omitted.
                super.setup();
            }
        }
    } 
    

    Now you need to add this to your clientDefs of your entity in custom folder. I have tried this but it should work
    Rabii
    Web Dev

    Comment


    • crmscot
      crmscot commented
      Editing a comment
      Hello Rabii

      Thanks for answering my cry for help.  When it comes to coding, I think I should be considered as a monkey with a bread knife!!
      I've tried to implement your code in various folders without success and conclude I don't know enough about the structure of EspoCRM and the way in which the application is developed.  I don't expect a crash course in programming on a support forum so I think I should accept EspoCRM for the great product it undoubtedly is and perhaps post an enhancement request for this instead - though I'm sure Yuri and his team have much more pressing tasks to be getting on with.
      Thanks again for your suggestion.
Working...