ndc-suez
v1.0.5
Published
Generate standard ndc UI
Downloads
32
Maintainers
Readme
Code Generator for NDC (Note de Calcul)
To use this package the xlsx file config for NDC is mandatory. It can generate both the angular application and the .Net classes for the api endpoint
How to use it
Angular
To create the angular app, run the following in your project:
ng g ndc-suez:m --name <note_name>
This will generate an angular module with a component with lazy load configuration.
Multi page ndc
Angular part of NDC with more than one page must use:
ng g ndc-suez:m --name <ndc_name> --filename <filename.xlsx> --page <page_name> --api-config true --version <version_name> --export-prefix <export_prefix>
Note with group (pages)
Note with grouped pages are generated with two command:
- run previous command with --partial true and --group-name <any_string_group_name>
- run the following :
ng g ndc-suez:m --name <note_name> --filename <filename.xlsx> --group page1 page2 page3 --group-name <any_string_group_name>
the last command will generate only one file, for the groups config
NB: use --slave true to prevent adding cases from a page
Multiple page in one shot
ng g ndc-suez:mp --pages LB4 LB5 --filename OMBR_2-5_specs_v2.xlsx --api-config true --export-prefix OndeorMbr --version OndeorMBR_02.5.002 --partial true --group-name OndeorMbr25 --slave true
.NET
To generate the code for the api endpoint :
ng g ndc-suez:ndc-net-module --name <note_name>
Multi page ndc (api)
ng g ndc-suez:ndc-net-module --name <note_name> --filename <filename.xlsx> --page <page_name>
Example
ng g ndc-suez:ndc-net-module --name OndeorMbrLe3 --filename OMBR_2-5_specs_v2.xlsx --page LE3
CREATE OndeorMbrLe3/OndeorMbrLe3Parameters.cs (15154 bytes)
CREATE OndeorMbrLe3/OndeorMbrLe3Dto.cs (29036 bytes)
CREATE OndeorMbrLe3/OndeorMbrLe3ResultDto.cs (11460 bytes)
CREATE OndeorMbrLe3/Constants.json (19972 bytes)
CREATE OndeorMbrLe3/OndeorMbrLe3Export.cs (34394 bytes)
CREATE OndeorMbrLe3/OndeorMbrLe3Controller.cs (5066 bytes)
Warning!
The excel file need to be properly formatted.
That's it!