Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Part 1

  1. Add following models to plugin basic:
    1. resource with fields
      1. number - string identifier of resource
      2. quantity - quantity of resource
      3. product - related product from plugin basic
    2. transfer with fields
      1. resource - related resource
      2. quantity - quantity of product in transfer
      3. type - type of transfer (incoming or outgoing)
      4. status - status of transfer (planned or done)
      5. request date,
      6. the worker who filled the request
      7. confirmation date/worker.
  2. Create views with list of resources and transfers
  3. Create view with resource details:
    1. form will contains three inputs
      • number
      • product's lookup
      • quantity - disabled, because it is set using custom action
    2. expression will be used to generate window header
    3. window header will be displayed
  4. Create view with transfer details:
    1. form will contains eight inputs
      • resource's lookup
      • quantity
      • type
      • status
      • requestWorker - disabled, because it is set using custom action
      • requestDate - disabled, because it is set using custom action
      • confirmWorker - disabled, because it is set using custom action
      • confirmDate - disabled, because it is set using custom action
    2. expression will be used to generate window header
    3. window header will be displayed
  5. Add custom action on save for transfer model - it should automatically set the transfer's workers and dates. Workers will be set using the current logged user - the one who create request will be put into requestWorker, Afterwards the one who changes the status to done will be put into confirmWorker. If transfer has not been saved (id is null) it should set requests worker and date, if transfer's status is done it should set confirmation worker and date. This action should also change quantity of the related resources, when the transfer is done.
  6. Add custom validation for transfer model - it should check if a resource has enough quantity for delivery transfer.

...

Table of Contents

  1. Installation manual
  2. Building MES from source code - tutorial
  3. Plugin developement
  4. Our coding conventions
  5. Javadoc
  6. Github repository

Before you start

  1. Fork https://github.com/qcadoo/mes/
    create branch from master
    git checkout -b recruitment
  2. Change hotDeploy=false in file: mes/mes-application/conf/tomcat/app.properties 
  3. Read the comments below

Assignment

  1. Add new model purchase to plugin basic with fields:
    • product - product from basic plugin,
    • quantity - quantity of product,
    • price - price of product,
    • date - date with time.
  2. Add validator which would check if product price is > 0.
  3. Add validator which would check if product quantity is > 0.
  4. Add validator which would check if there is no product purchase with the same name product and price.
  5. Add views for that model with list and add/edit details.
  6. Add hooks which would set default system currency in field next to price (locale chosen in framework).
  7. (OPTIONAL) Add hooks which would set product unit in
    1. add disabled input field next to quantity
    -
    1. field in purchase details view
    2. when product changes, this field also should be updated.
  8. Add button to ribbon in purchases list or details which will count average price of all purchases or average price of product. The result can be presented in any way (for example as a simple popup or field on the view).
  1. Plugin developement
  2. Our coding conventions

 

...

  1. (OPTIONAL) Prepare additional functionality with simple dictionary and two fields: input and output. While the user enters input text, the application rewrites it, and mark words found in the dictionary.
    Requirements:
    * prepare a separate subpage (you can use component: staticPage)
    * allowed words can be stored in an external file or served by the controller in any format
    * use pure java script or jQuery