bottomPanelsEditSmall won't work not sure why

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rabii
    Active Community Member
    • Jun 2016
    • 1250

    bottomPanelsEditSmall won't work not sure why

    Hey victor lazovic​,

    I am trying to add a relationship panel to a small detail view of the parent entity. i have an entity called (Client) has many transactions. so basically i have tried to show the transactions panel on the edit small view / detail small view of the client entity but nothing has worked, below my set up:

    In my clientDefs\Client.json i have this set up:

    PHP Code:
    "bottomPanels": {
          "editSmall":[
             "__APPEND__",
             {
                 "name": "transactions",
                 "label": "Transactions",
                 "view": "custom:views/client/record/panels/transactions",
                 "notRefreshable":true,
                 "sticked": true,
                 "isForm": true,
                 "index": 1
    
             }
          ]
    },"additionalLayouts": {
          "bottomPanelsEditSmall": {
              "type": "bottomPanelsEditSmall"
          }
       },
    This is the panel transations view:

    PHP Code:
    define('custom:views/client/record/panels/transactions', 'views/record/panels/relationship', function (Dep) {
    
        return Dep.extend({});
    
    });
    i even created a bottomPanelsEditSmall.json layout under client layout with this content but nothing worked. what i am missing?

    Any help would be appreciated.
    Rabii
    Web Dev
  • esforim
    Active Community Member
    • Jan 2020
    • 2204

    #2
    Came across this, almost sound like the two of you trying to do something similar? Create a custom view, not sure if it help:

    Hi, i little learn front-end but here i loose :) un custom modal view.. this open, template is rendered normaly.. if you see code, commented, if i uncomment the hard coded nomenclatureList, the template "content" is ok. Here my goal is render the template after collection.fetch. the value is retreived from back-end

    Comment


    • rabii
      rabii commented
      Editing a comment
      Thanks for sharing esforim but that is different from what i want to achieve. i am trying to display some relationship panels on the editSmall view but i have not been able to do it not sure what i am missing, the code i posed above should definitely work but it doesn't.
  • item
    Active Community Member
    • Mar 2017
    • 1476

    #3
    Hi Rabii,
    not my skill but maybe :
    see scheduler bottom on meeting. it's seemt your client.json is ok (i have look in meeting) .. but maybe your view.

    PHP Code:
    define('crm:views/meeting/record/panels/scheduler', ['views/record/panels/bottom'], function (Dep) {
    
        return Dep.extend({
    
            templateContent: '<div class="scheduler-container no-margin">{{{scheduler}}}</div>',
    
            setup: function () {
                Dep.prototype.setup.call(this);
    Certainly a how-to needed ..
    Last edited by item; 05-31-2023, 04:06 PM.
    If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

    Comment

    • yuri
      Member
      • Mar 2014
      • 8448

      #4
      Bottom panels disabled on the edit-small view : https://github.com/espocrm/espocrm/b...t-small.js#L33.

      You you enable it, then you should be able to use a regular relationship panels, no need to define "bottomPanels" in clientDefs.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • rabii
        Active Community Member
        • Jun 2016
        • 1250

        #5
        Hey yuri

        Thanks for your reply, i have enabled the bottom panels on my editSmall custom view for my entity as below:

        PHP Code:
        define('custom:views/client/record/edit-small', ['views/record/edit-small'], function (Dep) {
        
            return Dep.extend({
        
                bottomView: 'views/record/detail-bottom',
        
            });
        });
        i have added the layout to the additionaLayouts on the clientDefs:

        PHP Code:
        "additionalLayouts": {
              "bottomPanelsEditSmall": {
                  "type": "bottomPanelsEditSmall"
              }
        },
        Cleared cache and rebuild system when i visit editSmall of my client entity (i can see only stream added to the bottom) if i go to entity Manager i find the additional layout "bottomPanelsEditSmall" but it is not loading any relationships and is only empty.

        What ami missing? i thought this would enbale the layout "bottomPanelsEditSmall" through which i can choose which relationships to appear on the bottom view of the editSmall.

        I appreciate your help.
        Last edited by rabii; 06-01-2023, 07:51 AM.
        Rabii
        Web Dev

        Comment

        Working...