Announcement

Collapse
No announcement yet.

Folders Tree Documents View

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

  • Folders Tree Documents View

    Hi,

    We are using the Documents module and it works GREAT.

    However, isn't it strange that a file is viewed from all the above parents folders?

    Example: We have the following Folder Tree (structure):
    • Folder 1.0
      • Folder 1.1
        • Folder 1.2
    If we add a document to "Folder 1.2", it will also be shown in "Folder 1.0" and "Folder 1.1". I know these folders are parents of "Folder 1.2". However, I should only view what's in each folder and not in the subfolders.

    Is there any solution for this?

    Thanks a lot.

  • #2
    Hello
    This code is in client/modules/crm/src/views/document/list.js

    find
    Code:
    if (this.currentCategoryId) {
                                this.collection.whereAdditional = [
                                    {
                                        field: this.categoryField,
                                        type: this.categoryFilterType,
                                        value: model.id
                                    }
                                ];
                            }
    and modify to
    Code:
    if (this.currentCategoryId) {
                                this.collection.whereAdditional = [
                                    {
                                        type:'equals',
                                        attribute:'folderId',
                                        value: model.id
                                    }
                                ];
                            }
    You can do it in upgrade-safe way https://github.com/espocrm/documenta...ustom-views.md

    Possible needs to modify client/modules/crm/src/views/document/modals/select-records.js as well

    Comment


    • #3
      Hi tanya ,

      Thanks for your fast response as always! We will try your solution.

      Best regards.

      Comment

      Working...
      X