GithubHelp home page GithubHelp logo

metasfresh / metasfresh-webui-frontend-legacy Goto Github PK

View Code? Open in Web Editor NEW
58.0 21.0 34.0 10.22 MB

metasfresh Webui Frontend

License: GNU General Public License v2.0

HTML 0.04% JavaScript 88.28% CSS 11.38% Shell 0.21% Dockerfile 0.10%
javascript react-redux reactjs metasfresh erp jest-tests cypress docker-image

metasfresh-webui-frontend-legacy's Introduction

Metasfresh Front-end Application

Join the chat at https://gitter.im/metasfresh/metasfresh-webui-frontend Krihelimeter

For webui-frontend developers

Init

  • Install dependencies

npm install

  • Create config. In that case run:

cp src/config.js.dist src/config.js

Dev environment

  • install npm and node.js

  • make sure you have all dependencies by:

npm install

  • Then remember of creating config:

cp /config.js.dist /config.js

  • Then you should run node server by:

npm start

Build

In case of static version building execute (you are going need Webpack installed globally):

webpack --config webpack.prod.js

And after that we need config.js in dist folder

cp /config.js.dist /dist/

Contribution

Remember to ensure before contribution that your IDE supports .editorconfig file, and if needed fix your file before commit changes.

Also remember to respect our code-schema rules. All of them are listed in eslint and stylelint config files. To use them, just run:

npm run-script lint

npm run-script stylelint

(first one is also autofixing when possible)

Notice: CI/CD legacy

Submodule meta-frontend-ansible.git and .gitlab-ci.yml file are legacy of CI/CD.

Dictionary

Project has a generic structure. Name of components and their containers should be strictly defined and keep for better understanding.

MasterWindow - (e.g. /window/143/1000000) It is container for displaying single document view.

DocList - (e.g. /window/143/) It's a view with a list of documents kept in table.

DocumentList - It is a component that combining table for documents, filters, selection attributes, etc...

Window - It is a component that is generating set of sections, columns, element's groups, element's lines and widgets (these are defined by backend layout)

Widget - (MasterWidget, RawWidget) It is a component for getting user input.

Header - It is a top navbar with logo.

Subheader - It is a part of Header and is toggled by button with a home icon.

Sidelist - Toggled by button with hamburger menu icon in Header. It is collapsing panel situated on right side of 'browser window'.

MenuOverlay - These are components that float over Header and contain navigation links, triggered from breadcrumb.

SelectionAttributes - It is a panel that might contain Widgets and it is a side by side table in DocumentList.

Schema

  • MasterWindow
    • Container
    • Window
  • DocList
    • Container
    • DocumentList

  • Container
    • Header
    • Modal
    • RawModal
  • Window
    • Widget
    • Tabs
  • DocumentList
    • Table
    • Filters
    • SelectionAttributes

  • Header
    • Subheader
    • Sidelist
    • Breadcrumb
      • MenuOverlay
  • Modal
    • Window
    • Process
  • RawModal
    • DocumentList

For webui-api developers

If you are developing against the metasfresh-webui-api, you might want to run the webui-frontend without locally installing node and npm. If you have a docker host, you can do so by checking out this repository and then following the instructions in the docker file docker/Dockerfile-env.

Thanks to issue #1013 and Seweryn Zeman.

metasfresh-webui-frontend-legacy's People

Contributors

bambeusz avatar cadavre avatar damianprzygodzki avatar dunkat avatar gitter-badger avatar godev7 avatar metas-dev avatar metas-jb avatar metas-kay avatar metas-mk avatar metas-ts avatar metasnw avatar ottosichert avatar pablosichert avatar siemiatj avatar teosarca avatar wiadev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

metasfresh-webui-frontend-legacy's Issues

Advanced Edit isActive Flag 100%

In Advanced Edit (example opened from GridView), the isActive Flag is rendered in 100% witdh. Should not be. Must stay small and compact like flags.

Optimization: handle dynamic widgets and elementsGroups hiding

  1. Handle "case when the fields will be hidden dynamically".

  2. "We have the case when the fields will be hidden dynamically and if all of them are hidden, then the entire group shall be hidden."

  3. If /api/window/{n} returns empty section/column/elementGroup – treat is at it doesn't exist.

Save indicator

A small indicator showing user that this document is saved or save is in progress. Important to make user more comfortable with auto-save.

Advanced edit

Advanced Edit Functionality
Button as seen in the Layouts (with additional Popup for detail fields)

ToDo
a) talk about layout/ design/ concept
b) implement

New Button, advanced edit collapse menu

When u open menu (top left button) and press New or advanced edit, i believe that the menu should collapse/ dissapear after that.
Other menu entries that should behave like that?

Include .htaccess to src/

RewriteEngine On

If an existing asset or directory is requested go to it as it is

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]

If the requested resource doesn't exist, use index.html

RewriteRule ^ /index.html

System information texts

How will we get system information texts like:

  • text for info about empty dataset in table (i.e. no order lines)

Tab table row appearance

  • Excel like behaviour. Avoid cells expanding unnaturally in height, width.
  • Subtab component. Initial size fill 100% of remaining window space or fixed size.

Change frontend URL policy

/window/143/new - new 143 doc type form
/window/143/{id} - open 143 doc type {id} form
/window/143 - list of 143 doc type

IsDropShip Flag not initially set in Frontend

IsDropShip Flag not initially set in Frontend (Sales Order), although in response.

{field: "IsDropShip", value: true, readonly: false, mandatory: true, displayed: true,…}

Example: Window 143, ID 1001573

Implement column sorting for grid views

(See metasfresh/metasfresh-webui-api-legacy#27 )

(1) When the grid view is loaded, automatically set the sort indicators, as they were provided by "GET /rest/api/window/view/{viewId}" response, orderBy field.
It's format is:

[
{
"ascending": true,
"fieldName": "string"
}
]

(2) When clicking on a column, it shall be sorted ascending/descending. For that, you shall call "GET /rest/api/window/view/{viewId}" as usual, but also provide the ?orderBy=... parameter.

Mandatory Fields Information

Mandatory Fields Information
How are the mandatory fields distinguished when left empty (which prohibits data saving)?
atm you ca

a) talk about design, layout (empty, filled)
b) implement

Changing protocol messages for /dropdown and /typeahead

Abstract: atm we are returning an array of { value: name } pairs.

Change: we need to wrap that in map because along with the value/name pairs we want to provide more attributes. Atm will be just debug properties, but we really need them to figure out how our internal logic was evaluated.

e.g.

{
    debug-property1: bla bla
    ....
    values : [
        { "value1" : "name1" },
        { "value2" : "name2" },
        ...
    ]
}

PaymentRule button text is not rendered

PaymentRule button text is not rendered even though /commit response sent a value for it:


{field: "PaymentRule", value: {P: "P_On Credit"}, value-reason: "direct set from document wrapper",…}
debug-field-info
:
"DocumentField{fieldName=PaymentRule, documentPath=DocumentPath{AD_Window_ID=143, documentId=1000285}, value=null, initalValue=null, mandatory=LogicExpressionResult{value=false, expression=FALSE}, readonly=LogicExpressionResult{value=false, expression=FALSE}, displayed=LogicExpressionResult{value=false, expression=FALSE}}"
displayed
:
true
displayed-reason
:
"TriggeringField=null, DependencyType=DisplayLogic, EvaluationResult=LogicExpressionResult{value=true, expression=TRUE}"
field
:
"PaymentRule"
lookupValuesStale
:
true
lookupValuesStale-reason
:
"TriggeringField=null, DependencyType=LookupValues"
mandatory
:
true
mandatory-reason
:
"TriggeringField=null, DependencyType=MandatoryLogic, EvaluationResult=LogicExpressionResult{value=true, expression=TRUE}"
readonly
:
false
readonly-reason
:
"direct set from document wrapper"
value
:
{P: "P_On Credit"}
value-reason
:
"direct set from document wrapper"

Encode URL parameters before calling the REST API

Failing test case:

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: Could not get HttpServletRequest URI: Malformed escape pair at index 104: http://w101.metasfresh.com:8081/rest/api/window/typeahead?type=143&id=1002087&field=C_BPartner_ID&query=%

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.