Announcement

Collapse
No announcement yet.

How to show scheduler in meeting creation ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to show scheduler in meeting creation ?

    It is only shown as a panel after the entity is created for me...
    Attached Files

  • #2
    Hi there,
    Could you provide a little bit more information about how does your issue look like?
    Does that mean that you see only panel w/o any time points? Could you provide a screenshot?

    Comment


    • #3
      Basically this Maximus (see screenshot)

      I think this is what tothewine meant. At least I feel like it is the problem.

      I had a look at Layout Manager and it seem like Scheduler is available in Bottom Panels section but no where else (e.g. we want it in Detail (Small)); perhaps if you can figure out to unlock the restriction then we can have it shown in Details as well. But considering it is a Bottom Panels I don't think it be an easy task.
      Last edited by esforim; 10-06-2020, 05:35 AM.

      Comment


      • #4
        Hi esforim,
        Thanks for the input. I don't think that adding the 'Scheduler' panel to the bottom of the 'Edit small' view is possible w/o hard codding. I suggest you done it with the easiest way by creating the 'Scheduler' panel for the 'Edit small' view:
        1. Create the file /client/custom/src/views/meeting/record/panels/scheduler.js with this code:
        Code:
        define('custom:views/meeting/record/panels/scheduler', 'views/record/panels/side', function (Dep) {
        
            return Dep.extend({
        
                templateContent: '<div class="scheduler-container no-margin">{{{scheduler}}}</div>',
        
                setup: function () {
                    Dep.prototype.setup.call(this);
        
                    var viewName = this.getMetadata().get(['clientDefs', this.scope, 'schedulerView']) || 'crm:views/scheduler/scheduler';
        
                    this.createView('scheduler', viewName, {
                        el: this.getSelector() + ' .scheduler-container',
                        notToRender: true,
                        model: this.model,
                    });
        
                    this.once('after:render', function () {
                        if (this.disabled) return;
                        this.getView('scheduler').render();
                        this.getView('scheduler').notToRender = false;
                    }, this);
        
                    if (this.defs.disabled) {
                        this.once('show', function () {
                            this.getView('scheduler').render();
                            this.getView('scheduler').notToRender = false;
                        }, this);
                    }
                },
        
                actionRefresh: function () {
                    this.getView('scheduler').reRender();
                },
        
            });
        });
        2. Create the file or add to the file: /custom/Espo/Custom/Resources/metadata/clientDefs/Meeting.json this code:
        Code:
        {
            "sidePanels":{
                "editSmall":[
                    "__APPEND__",
                    {
                        "name":"scheduler",
                        "label":"Scheduler",
                        "view":"custom:views/meeting/record/panels/scheduler",
                        "sticked": true,
                        "isForm": true
                    }
                ]
            }
        }
        3. Administration -> Clear Cache
        4. Refresh a web page.

        Create a meeting via an Activity panel (see screenshot).
        Attached Files

        Comment


        • esforim
          esforim commented
          Editing a comment
          Oi you! Wonderful! Thank you. Adding this to my To-Do task.

      • #5
        NIce workaround Maximus ! and thanks for the explaining esforim

        Comment


        • tothewine
          tothewine commented
          Editing a comment
          Also, it is a great example of side panel creation.
      Working...
      X