Third Party Monitoring Module
  • Third Party Monitoring Module Documentation
  • INTRODUCTION
    • Glossary / Terminology
    • FAQ
    • Releases / Changelog*
    • Report an Issue / Contact us
  • PRODUCT / END-USER DOCUMENTATION
    • Overview
      • User rights and permissions
    • Third Party Monitoring Module Navigation
    • Overall User Interface
    • Third Party Monitors section
      • List of Third Party Monitors
      • TPM partner details screen
    • List of Visits section
      • List of Visits
      • Visit details
      • Statuses and corresponding actions
        • Draft
        • Assigned
        • TPM Accepted
        • TPM Rejected
        • Cancelled
        • TPM Reported
        • Sent Back to TPM
        • UNICEF Approved
      • Emails notifications flow
    • TPM workflow
  • TECHNICAL DOCUMENTATION
    • Architecture
    • Development Setup
    • Deployment / DevOps
    • Backend Module structure
    • Data Model
    • Fixtures & management commands
    • API Documentation
      • Error Handling
    • Synchronization with VISION
    • Permissions framework
    • FSM Transitions conditions
    • FSM Transitions in view
    • API Metadata
    • Serializer Mixins
    • Model Mixins
    • Tests
    • Attachments
    • Email links & Tokens Authorization
    • Frontend
      • Module structure
      • Build process
      • Tests
Powered by GitBook
On this page
  • Files structure
  • Elements directory structure
  • Component structure
  • Polytempl
  1. TECHNICAL DOCUMENTATION
  2. Frontend

Module structure

Files structure

I - .circleci/ - gulp-tasks/ - src/ I - assets/ I - images/ - js/ - elements/ - tests/ - index.html - manifest.json - package.json - bower.json - polymer.json - ...Other configuration files

In the application root directory you can find all configuration files for development and build process. Here you can find Docker config files, configs for code linting, tests, gulp config, node server. Code for gulp tasks is placed in gulp-tasks/ directory. You can find all source files in src/ directory.

src/ directory contains index.html file, assets/ directory with images and polyfill script, and elements directory with all application components.

Elements directory structure

I - app-behaviors/ - common-elements/ - core-elements/ I - app-config/ - app-shell/ (main application component) - app-main-header/ - app-sidebar/ - data-elements/ - pages/ I - not-found-page-view/ - partners-page-components/ - visits-page-components/ - styles-elements/

In elements/ you can find:

  1. app-behaviors/ directory with all application behaviors (permission, common-methods, error-handler and ect.)

  2. common-elements/ directory with elements that are used on different pages several times

  3. core-elements/ directory with application config element, application main element and base elements common to all modules (header, sidebar)

  4. data-elements/ directory with elements used to request the data from server (get-partner-data, update-engagement and ect.)

  5. pages/ directory with elements divided by pages, which will be lazy loaded

  6. styles-elements/ with common styles elements

Component structure

Almost all application components are split into 3 separate files:

  • html file with component template

  • js file with components logic

  • scss file with component styles

Polytempl

Polytempl plugin helps combine separate components files and resolve imports.

You need to specify the special html comment to combine your html template file with js and scss files:

<!-- inject styles './path_to_styles.scss'-->

or

<!-- inject scripts './path_to_logic.js'-->
<!--import [polymer]-->
<!--import [module-styles, page-layout-styles, shared-styles, list-tab-main,
            static-data-behavior, search-and-filter, engagements-list-data, 
            pages-header-element, permission-controller, etools-app-config]-->
PreviousFrontendNextBuild process

Last updated 6 years ago

You can specify the special html comment for imports. Polytempl will look for these components in your src files at first and then in bower_components/ . See more details about Polytempl .

here