Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Webforms frontend (mithril based reimplementation)

License

Notifications You must be signed in to change notification settings

Som-Energia/webforms-mithril

Repository files navigation

This repo is OBSOLETE

All the projects here have been migrated from Mithril to React in other repositories:

webforms-mithril

Som Energia Webforms frontend (mithril based reimplementation)

If you are new to Javascript, NodeJS, Webpack, Mithril or MDC4W, most of what you need to develop is explained in the internal course documentation

$ sudo apt install npm # on Debian or Ubuntu GNU/Linux
# From the project root
$ npm install # installs javascript dependencies
$ npm run server # To run the development server
$ npm run build # To generate a development build into dist/
$ npm run deploy # To generate a production build into dist/
$ ./deployopendata.sh # From the office network deploys Open Data into the server

Component Examples

The generated index.html page instatiates all the examples of the components in the repository.

Most components are documented with JSDoc.

Contract

Available as contract.html. It is the electritity contract form.

See the documentation

Open Data API front-end

It is a form to call the Som Energia Open Data API. Available at opendata.html.

This form is going to be eventually moved into its own repository as soon as we have a stable set of widgets to build them as a library.

Minor problems

Error loading images:

If when you start the development server and the following error ocurrs:

Module not found: Error: Can't resolve '../images/ic_keyboard_arrow_left_black_24px.svg' in '/home/juan-pe/projects/webforms_project/webforms-mithril/node_modules/md-date-time-picker/dist/css/themes/light/light-green'

It's because the time-picker cannot find the images folder. To solve it:

$ cd node_modules/md-date-time-picker/dist/css/themes/light
$ ln -s ../../../../../md-date-time-picker/src/images .

About

Webforms frontend (mithril based reimplementation)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published