Commit e2711a78 authored by Седнева Ольга's avatar Седнева Ольга

Merge branch 'master' of http://git-pub.intecracy.com/unitybase/samples

# Conflicts:
#	courses/cityPortal-v4/package.json
parents 3e78385d 4da51b9e
// @! "do not remove comments below unless you know what you do!"
// @isDefault "false"
// @entity "req_reqList"
// @model "RequestList"
// @formType "auto"
// @caption "My request list"
// @description "reqList"
//@! "do not remove comments below unless you know what you do!"
//@isDefault "false"
//@entity "req_reqList"
//@formType "auto"
//@caption "My request list"
//@description "reqList"
exports.formDef = {
parentConfig: {
layout: {
......
// @! "do not remove comments below unless you know what you do!"
// @isDefault "false"
// @entity "req_reqList"
// @model "RequestList"
// @formType "custom"
// @caption "Reassingn to"
// @description "Reassign to other departments"
//@! "do not remove comments below unless you know what you do!"
//@isDefault "false"
//@entity "req_reqList"
//@formType "custom"
//@caption "Reassingn to"
//@description "Reassign to other departments"
Ext.define('RequestList.reassignAll', {
extend: "Ext.form.Panel",
size: {
......
......@@ -12,12 +12,8 @@
"author": "Olga Sedeneva",
"license": "ISC",
"dependencies": {
"@ub-e/ube-pub": "^4.1.6",
"@unitybase/adminui-pub": "^4.2.1",
"@unitybase/mailer": "^4.0.10",
"@unitybase/ub-pub": "^4.3.0",
"@unitybase/ubm": "^4.0.21",
"@unitybase/ubq": "^4.1.4"
"@unitybase/adminui-pub": "^4.2.12",
"@unitybase/ubq": "^4.2.0"
},
"devDependencies": {
"babel-core": "^6.24.0",
......
......@@ -39,7 +39,31 @@ Use the editor to build such a template
As a result, you should get code like this (Tools / Source code)
![report_template_sourceCode](img/adminTools/report_template_sourceCode.png)
```javascript
<h1 style="text-align: center;">Request List current month</h1>
<p><span style="font-size: 12pt;">current month: {{curMonth}} , year: 2017</span></p>
<p><span style="font-size: 14pt;">Closed requests</span></p>
<table style="word-break: break-all; width: 779px;" border="1px" width="779px" cellspacing="0" cellpadding="3px">
<tbody>
<tr>
<td style="width: 808px; cursor: w-resize; text-align: center;"><strong><span style="font-size: 10pt;">Request date</span></strong></td>
<td style="width: 772px; cursor: default; text-align: center;"><strong><span style="font-size: 10pt;">Applicant info</span></strong></td>
<td style="width: 772px; cursor: default; text-align: center;"><strong><span style="font-size: 10pt;">Request text</span></strong></td>
<td style="width: 760px; cursor: default; text-align: center;"><strong><span style="font-size: 10pt;">Answer</span></strong></td>
</tr>
<!--{{#req_reqList}}-->
<tr>
<td class=" tinymce_templated_td" style="width: 808px; cursor: w-resize;">{{reqDate}}</td>
<td style="width: 772px;">{{applicantInfo}}</td>
<td style="width: 772px;">{{reqText}}</td>
<td style="width: 760px; cursor: w-resize;">{{answer}}</td>
</tr>
<!--{{/req_reqList}}-->
</tbody>
</table>
```
In the CODE section, you need to describe the operation of the template and getting the data.
To request data from the database, use the Repository for the client side.
......@@ -87,17 +111,35 @@ Save the template and test it using the Test button.
The template and the code to it are stored in the `models\requests\public\reports\' folder - you can remove templates from there only manually.
<a name = 'diagrams'></a>
## Creating diagramm entity
For visual display of the links between entities model used the tool Diagrams in Administrator/UI/ER diagrams menu.
For visual display of the links between entities model used the tool Diagrams in Administrator/UI/ER diagrams menu.
For use the ER diagrams you must install the `@ub-e/ube-pub` package
`npm install --save @ub-e/ube-pub`
Configure UBE model in ubConfig.json
```javascript
{
"name": "UBE",
"publicPath": "./node_modules/@ub-e/ube-pub",
"path": "_public_only_",
"moduleName": "@ub-e/ube-pub"
},
/// ...
```
Restart the UB Server after configuring.
Construct a diagram using visual components.
![diagram_creating](img/adminTools/diagram_creating.png)
<a name = 'audit'></a>
## Audit
......
......@@ -41,13 +41,16 @@ where the:
[+ For working with the console we recommend to install [ConEmu](https://conemu.github.io/ru/) and [Far Manager](http://www.farmanager.com/download.php) +]
3. Initialize your project with Node Package Manager in root of the project.
3. Initialize your project with Node Package Manager in root of the project `D:\ubProject\CityPortal\`.
```>npm init```
This utility will walk you through creating a package.json file.
This utility will walk you through creating a package.json file. You may press Enter of all instruction or input your data.
It only covers the most common items, and tries to guess sensible defaults.
4. install a package `@unitybase/adminui-pub` and save it as a dependency in the package.json file. This package contains UB models for your project.
```>npm install --save @unitybase/adminui-pub```
```
>npm install --save @unitybase/adminui-pub
>npm install --save @unitybase/ubq
```
5. Create the directory `D:\ubProject\CityPortal\models\requests` where
`models` the mandatory folder for creating folder
......@@ -349,6 +352,13 @@ If values of the following properties: "serverType", "protocol", "host", "port"
{
"name": "mdb",
"storeType": "Virtual"
},
{
"name": "attach", // Unique blobStore name.
"path": ".\\docs\\attach\\", // The path to store root folder
"storeSize": "Medium", // Approximate number of files to store. Simple = up to 10000
"isDefault": false, //Is this store default for application
"historyDepth":2
}
]
......
......@@ -33,7 +33,7 @@ Mixin has the following properties:
```
After execute the command in the console
`ub.exe cmd/generateDDL -u admin -p admin -host http://localhost:888 -autorun`
`ubcli generateDDL -u admin -p admin -host http://localhost:888 -autorun`
Go to the Request List section and see the new items in the context menu of the entries.
![dataHistory_menu](img/mixins/dataHistory_menu.png)
......@@ -55,7 +55,7 @@ It's useful in situations where you need to lock the document before editing so
Because the request list can be at the same time edited by a large number of users, it is necessary to provide for the blocking of the record, which is now "occupied" by another user.
Add the following code to the mixins section of the file `req_reqList.meta` and execute the command` cmd / generateDDL`
Add the following code to the mixins section of the file `req_reqList.meta` and execute the command` ubcli generateDDL -u admin -p admin -host http://localhost:888 -autorun`
```javascript
"softLock": {
......@@ -95,7 +95,7 @@ safeDelete is a boolean flag to use the soft delete function of the database. If
Make it possible to delete subdepartments so that they remain in the memory of the applications in which they were specified during their action.
In the file `req_subDepart.meta` in mixins section add the following code and execute the command
`ub.exe cmd/generateDDL -u admin -p admin -host http://localhost:888 -autorun`
`ubcli generateDDL -u admin -p admin -host http://localhost:888 -autorun`
```javascript
......@@ -135,8 +135,6 @@ In INTERFACE DEFINITION of req_depart form change the code to the next one
//@formType "auto"
//@caption "Departments"
//@description "Departments"
//@code "req_depart"
//@ID "331314364186625"
exports.formDef = {
dockedItems: [{ //add method button
xtype: "toolbar",
......@@ -272,8 +270,6 @@ Add the following code to the section
//@formType "custom"
//@caption "Reassingn to"
//@description "Reassign to other departments"
//@code "req_reqList-reassignAll"
//@ID "331338865639425"
Ext.define('RequestList.reassignAll', {
extend: "Ext.form.Panel",
......@@ -392,6 +388,6 @@ me.reassignDep = reassignDep;
Restart the UB server and make sure that the created functionality works correctly.
Restart the UB server and make sure if the created functionality works correctly.
......@@ -24,7 +24,7 @@ Create a new role in a system
![role_creating](img/rbac/role_creating.png)
Create a new user for the role.
Create a new user in the menu Users -> User list and add him the role. Set password for the user.
Create a new user in the menu Groups and Users -> User list and add him the role. Set password for the user.
![new_user](img/rbac/new_user.png)
......@@ -51,7 +51,7 @@ Add the rights for EducationDepartment to the City Requests Desktop and Request
This is a better way to quickly install a preconfigured project.
Add a new HealthDepartment role and rights to it.
Creqte the new file `030_setRole_navshortcuts.js` in the folder `models/requests\_initialData\`
Create the new file `030_setRole_navshortcuts.js` in the folder `models/requests/_initialData/`
Add to it following code
```javascript
......@@ -102,8 +102,8 @@ else{console.info('\t\tNOT provide rights for `CityReq_desktop` to HealthDepartm
```
Execute the command `cmd/initialize` and reboot the UBsever.
any of the methods add hd_user user and assign him the role of HealthDepartment.
Execute the command `ubcli initialize -u admin -p admin -host http://localhost:888 -m RequestList` and reboot the UB Server.
Any of the ways add hd_user user and assign him the role of HealthDepartment.
<a name = 'els'></a>
......@@ -130,7 +130,7 @@ Reboot the UB server and check if rules are applied correctly.
So that the user of the department sees only the records addressed to him, you need to configure the rights to read certain records.
To be able to associate the system role user and department from the list of applications, you need to add a new attribute to the entity req_department, associated with the entity uba_role (system roles)
To be able to associate the system role user and department from the list of applications, you need to add a new attribute to the entity req_department in `req_depart.meta` file, associated with the entity uba_role (system roles)
```javascript
......@@ -145,7 +145,7 @@ To be able to associate the system role user and department from the list of app
Update the model with the command
`ub.exe cmd/generateDDL -u admin -p admin -host http://localhost:888 -autorun`
`ubcli generateDDL -u admin -p admin -host http://localhost:888 -m RequestList -autorun `
You also need to add a field Role in system on the form for editing departments.
......@@ -180,7 +180,8 @@ Change the mixins section of the `req_reqList.meta` file to the following code
After the changes to the model, you need to recreate the sql script again with generateDDL.
After the changes to the model, you need to recreate the sql script again with generateDDL
`ubcli generateDDL -u admin -p admin -host http://localhost:888 -m RequestList -autorun `
In Administrator mode, create a few orders for different departments, log on to the system with created users, and make sure that the rules that are set are working correctly.
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