Announcement

Collapse
No announcement yet.

New dashlets

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

  • New dashlets

    Hi,

    Ive been asked to create some dashlets that show some aspects of the data.
    After some searching i failed to find resources about it.
    Is there any kind of documentation about it?

    Thanks in advance

  • #2
    Hi
    There you can see few examples application/Espo/Modules/Crm/Resources/metadata/dashlets
    In own module (application/Espo/Modules/{MODULE_NAME}/Resources/metadata/dashlets/{DASHLET_NAME}.json or in custom metadata (custom/Espo/Custom/Resources/metadata/dashlets/{DASHLET_NAME}.json) create file with your dashlet configuration
    if it's typical list dashlet, use "view":"views/dashlets/abstract/record-list",
    if not, create own view as well (there are a lot of examples).

    I hope it will help you

    Comment


    • #3
      Hi,

      Thanks for your quick reply.
      I got to the firts folder (application/Espo/Modules/Crm/Resources/metadata/dashlets) and copied one of the file to the (custom/Espo/Custom/Resources/metadata/) were i created a "dashlets folder".
      I made several changes to the file just to check the efect but i got no efect, in the dashboard no new dashlet was displayed.
      Im a bit lost....

      Comment


      • #4
        Cleared cache?

        Comment


        • #5
          I took an example, OportunitiesByStage.
          There is a file in application/Espo/Modules/Crm/Resources/metadata/dashlets. That file as, from what i can tell, the options of the dashlet.
          In client\modules\crm\src\views\dashlets you have another opportunities-by-stage.js that looks like were there are a couple of functions.
          But alot is missing, what other locations have resources for the dashlet?

          Thanks in advance

          Comment


          • #6
            do you need a chart dashlet?

            Comment


            • #7
              Yes the first one i have to create just needs to add a couple of things to that one.

              Comment


              • #8
                this view file extends client/modules/crm/src/views/dashlets/abstract/charts.js
                logical part is in application/Espo/Modules/Crm/Services/Opportunity.php (controller - application/Espo/Modules/Crm/Controllers/Opportunity.php)

                but I don't recommend you to change files from Module Crm. Create own module or work in custom section (after upgrading you can lose your changes)

                Comment


                • #9
                  Ok, ill give it a try

                  Comment


                  • #10
                    This is what i understout ultil now, please correct:
                    custom/Espo/Custom/Resources/metadata/dashlets/{DASHLET_NAME}.json you place the configuration options of the dashlet. That file also as the view. From what i understou this is the most important part since this parameter connects the dashlet to data is going to receive.

                    Were do you define the views?
                    custom/Espo/Custom/Resources/views/dashlets/{DASHLET_NAME}.json ??
                    What do you place in it? Is this the place were i define the look of the dashlet?

                    And next, views go to the controllers? Were do you define the custom controlers?

                    Next i guess os the services were the DB access.

                    For instance imagine i whant to make an dashlet very similar to Oportunityes by stage but that presents the total oportunities value and then de graph, what files i need to change?

                    I know i must make alot of basic questions and for that i apologise.




                    Comment

                    Working...
                    X