Commit 78dd3be1 authored by Melikhov Arsenii's avatar Melikhov Arsenii

Update initialData.md;

-wrapp shell commands with ```shell ```;
-add < > to urls;
-add nl before images
parent 66e12693
......@@ -125,10 +125,13 @@ if (!lastID) {
Independently create the `SubDepartments` menu in the Departments folder and the `Request List` shortcut.
The full code listing of `010_create_navshortcuts.js` file could be found [here](courses/cityPortal-v5/models/requests/_initialData/010_create_navshortcuts.js)
To run the script, run the command in the root of project
`npx ubcli initialize -u admin -p admin -host http://localhost:8881 -m requests`
To run the script, run the command in the root of project:
```shell
npx ubcli initialize -u admin -p admin -host http://localhost:8881 -m requests
```
The following message should appear in the console:
![creating_shortcut_console](img/initialData/creating_shortcut_console.PNG)
......@@ -148,8 +151,8 @@ Departments of health;addr1;phone1
Departments of education;addr2;phone2
```
Specification of methods used
https://unitybase.info/api/serverNew/module-dataLoader.html
Specification of methods used:
<https://unitybase.info/api/serverNew/module-dataLoader.html>
Create the javascript-file `\models\requests\_initialData\020_fill_departments.js` with following code.
......@@ -191,10 +194,13 @@ module.exports = function (session) {
}
```
To run the script, run the command in the root of project
`npx ubcli initialize -u admin -p admin -host http://localhost:8881 -m requests`
To run the script, run the command in the root of project:
```shell
npx ubcli initialize -u admin -p admin -host http://localhost:8881 -m requests
```
The following message should appear in the console:
![creating_shortcut_console](img/initialData/fill_depart_console.PNG)
......@@ -213,7 +219,6 @@ Ubm_enum have the next fields
Add a "status" attribute to the `req_reqList.meta` entity.
```javascript
{
"name":"status",
"dataType": "Enum",
......@@ -224,8 +229,10 @@ Add a "status" attribute to the `req_reqList.meta` entity.
```
For updating the models database, execute the command
`npx ubcli generateDDL -u admin -p admin -host http://localhost:8881 -autorun`
For updating the models database, execute the command:
```shell
npx ubcli generateDDL -u admin -p admin -host http://localhost:8881 -autorun
```
Create the file `\models\requests\_initialData\ubm_enum-req.csv` with enum of statuses that will be used in requests list.
```text
......@@ -259,7 +266,10 @@ module.exports = function(session){
}
```
Execute the command `npx ubcli initialize -u admin -p admin -host http://localhost:8881 -m requests`
Execute the command:
```shell
npx ubcli initialize -u admin -p admin -host http://localhost:8881 -m requests
```
As a result, the following message should appear in the console:
![fill_enum_console](img/initialData/fill_enum_console.PNG)
......@@ -354,7 +364,11 @@ To support the Ukrainian language in the project, add culture "uk" in the connec
```
Execute the command `npx ubcli initialize` and check if scripts work correctly.
Execute the command:
```shell
npx ubcli initialize
```
and check if scripts work correctly.
![change_lang](img/initialData/change_lang.png)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment