Mobile Web Pages Configuration - kwantu/platformconfiguration GitHub Wiki

Mobile / Web Pages Configuration

Introduction

React application and Web application will render Home page based on the content assigned/accessible to the logged in user. Home page called as "Application Selector" will show the list of applications. If user has access to only one application the landing page for that application will be opened. Application Selector page is not configuration driven but a application embedded page.

Once an item from Application Selector is clicked or user is automatically navigated top application landing page config rendering starts.

Application Landing Page

"layout" property under Application configuration file is read.

"layout": "dashboard:GRM:3:landing:layout", Each layout page is a JSON document that follows the same structure. Example

{
  "_id": "dashboard:GRM:3:landing:layout",
  "_rev": "18-b975c961404eb5f4f1132b7358cdc2b6",
  "communityId": "51b06478-5ff6-4571-b261-3b853abe57ef",
  "applicationId": "6a56304d-7f41-4d06-b93c-00f954c93815:3",
  "context": "application",
  "communityName": "GRM",
  "actions": {
    "items": [
      {
        "label": "Test Task for Doc Lib",
        "action": {
          "captureTask": {
            "uuid": "3f7e5d8c-ded5-49bb-de4c-0fbff31f6d7e:def:1"
          }
        },
        "uuid": "createjob"
      }
    ],
    "type": "bar"
  },
  "categoryToShow": "",
  "displayTitle": "#APPLICATION_TITLE",
  "filterCount": "undefined",
  "title": "GRM Home",
  "type": "dashboard",
  "adoptions": [],
  "templateArray": [
    {
      "width": 3,
      "height": 2,
      "x": 0,
      "y": 0,
      "customDataObject": {
        "config": {
          "card": {
            "title": "Projects",
            "icon": "projects.png",
            "color": "#03a5fc",
            "targetPageUUID": "dashboard:GRM:3:Projects_List:layout"
          }
        },
        "widget": "card",
        "title": "Projects"
      },
      "id": "node49831"
    }
  ],
  "_attachments": {
    "favourites.png": {
      "content_type": "image/png",
      "revpos": 15,
      "digest": "md5-bg1OSWRmqWpyAjc+YbPNMQ==",
      "length": 2911,
      "stub": true
    },
    "grievance.png": {
      "content_type": "image/png",
      "revpos": 14,
      "digest": "md5-zM4aNp4hhycHfvgXJPgooA==",
      "length": 2610,
      "stub": true
    },
    "projects.png": {
      "content_type": "image/png",
      "revpos": 13,
      "digest": "md5-YCHN0BmC1KJRcODTSVJcqQ==",
      "length": 2959,
      "stub": true
    }
  }
}

templateAray holds all the items or called components that are rendered on page. This application landing page also holds the images that will be displayed on the clickable Cards and actions that will come up as floating buttons for some user interaction buttons.