Inbox Plugin

Example

<!DOCTYPE html>
<html lang="en">
  <head>
    <!-- load plugin styles -->
    <link href="https://plugins.wedat.eu/inbox/plugin.css" rel="stylesheet" />
  </head>
  <body>
    <!-- element to which plugin will be rendered -->
    <div class="plugin"></div>

    <!-- load plugin JS synchronously -->
    <script src="https://plugins.wedat.eu/inbox/plugin.js"></script>

    <!-- init plugin options in your JS file or inline JS like this -->
    <script>
      window.INBOX_API.init({
          selector: ".plugin";
      });
    </script>
  </body>
</html>

columnsShownBasedOnFilter filr structure in configuration

   settings?: {
        pageLimit?: string;
        importIni?: string; // define template field to store data from file
        efficiency?: {};
        preview?: { };
        "columnsShownBasedOnFilter": {
            "Vehicles": {
                "columns": [
                    {
                        "name": "vin",
                        "type": "string",
                        "requestTypeForSearching": "search",
                    },
                    {
                        "name": "mileageRead",
                        "type": "string",
                       "requestTypeForSearching": "search",
                    }
                ]
            },
            "Check In": {
                "columns": [
                    {
                        "name": "Date_checkIn_possible_exit_date",
                        "type": "Date",
                        "requestTypeForSearching": "search",
                    },
                    {
                        "name": "Date_checkIn_checkOut_Date",
                        "type": "Date",
                        "requestTypeForSearching": "search",
                    }
                ]
            },
            "Events": {
                "columns": [
                    {
                        "name": "String_event_type",
                        "type": "string",
                        "requestTypeForSearching": "search",
                    }
                ]
            },
            "Appointments": {
                "columns": [
                    {
                        "name": "String_repairer_zip",
                        "type": "string",
                        "requestTypeForSearching": "search",
                    },
                ]
            }
        }
    };

The Check-In is a filter name that we retrieve from the getFilter response. The columns in this context are defined as objects, each containing the following properties: name, type, and requestTypeForSearching.

  • name: This must match exactly with the values from the templateFieldAndValue object or the default columns from the listClaims. It ensures the correct mapping between the filter name and the displayed columns.
  • type: The type can either be string or Date. If the type is Date, additional formatting is required to properly display the date in the desired format.
  • requestTypeForSearching: This property determines how the column interacts with the search functionality:
    • If it’s set to 'search', the system sends the searchable data from the parameters.
    • If it’s set to 'filter', the system sends searchable data based on the active filter.

    Columns that don’t have the requestTypeForSearching property should not be visible in the search selection list, as they are not intended for searchable interactions.

To ensure proper functionality, each column object must have its name, type, and requestTypeForSearching properties correctly filled out.

Displaying Columns Based on Filters

  • If columnsShownBasedOnFilter is null, the system will show the default columns, either from a mocked list or from dynamic_columns (if defined in the configuration file).
  • If no dynamic columns are defined, the default columns will be displayed.

## dynamicc_columns object structure in config

```javascript
"inbox" : {
        "dynamic_columns": [
           {
               "name": "String_auditionDate",
               "type": "Date",
               "requestTypeForSearching": "search",
               "accessor": "templateFieldAndValue",
               "width": "150px"
           },
           {
               "name": "lastEntry",
               "type": "Date",
               "props": {
                   "hiddingPoint": 1325
               }
           },
           {
                "name": "totalPrice",
                "requestTypeForSearching": "search",
                "type": "string",
                "width": "140px",
                "isPrice": true
           },

    ],
}

example of additional columns in inbox

"Inbox": {
    "settings": {
        "additionalColumnsForInbox": [
            {
                "name": "String_repairer_name",
                "requestTypeForSearching": "search",
                "accessor": "templateFieldAndValue",
                "width": "150px"
            },
            {
                "name": "String_expert_name",
                "requestTypeForSearching": "search",
                "accessor": "templateFieldAndValue",
                "width": "130px"
            }
        ],
    }
}

example of displayGross columns in inbox

Whith this props in totalPrice column value shoud take the gross value instead of net

"Inbox": {
    "settings": {
       "displayGross": true
    }
}