diff --git a/codbex-partners/codbex-partners.edm b/codbex-partners/codbex-partners.edm index ee945f4..b2e1f78 100644 --- a/codbex-partners/codbex-partners.edm +++ b/codbex-partners/codbex-partners.edm @@ -8,13 +8,14 @@ - + + @@ -111,6 +112,23 @@ + + + + + + + + + + + + + + + + + Customerspartners-navigation-group/services/web/resources/unicons/user-plus.svg300 @@ -119,5 +137,5 @@ - + \ No newline at end of file diff --git a/codbex-partners/codbex-partners.gen b/codbex-partners/codbex-partners.gen index 274db5e..d657cfd 100644 --- a/codbex-partners/codbex-partners.gen +++ b/codbex-partners/codbex-partners.gen @@ -123,6 +123,18 @@ "navId": "", "icon": "/services/web/resources/unicons/globe.svg", "role": "" + }, + "Employees": { + "views": [ + "Employee" + ], + "name": "Employees", + "label": "Employees", + "header": "", + "order": "100", + "navId": "", + "icon": "/services/web/resources/unicons/user.svg", + "role": "" } }, "roles": [ @@ -372,20 +384,20 @@ "auditType": "NONE", "dataLength": "20", "dataName": "CUSTOMER_FAX", - "dataNullable": false, + "dataNullable": true, "dataType": "VARCHAR", "description": "", - "isRequiredProperty": true, "name": "Fax", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "fd-col-md--2 fd-col--3", "widgetType": "TEXTBOX", - "dataNotNull": true, + "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, + "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Fax", @@ -578,6 +590,38 @@ "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, + { + "auditType": "NONE", + "dataName": "CUSTOMER_RESPONSIBLEPERSON", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "ResponsiblePerson", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "Customer_Employee", + "relationshipEntityName": "Employee", + "relationshipEntityPerspectiveName": "Employees", + "relationshipEntityPerspectiveLabel": "Employees", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "ResponsiblePerson", + "widgetDropdownUrl": "/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeService.ts", + "widgetDropdownControllerUrl": "/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, { "auditType": "NONE", "dataLength": "36", @@ -673,6 +717,11 @@ "name": "City", "project": "codbex-cities", "genFolderName": "codbex-cities" + }, + { + "name": "Employee", + "project": "codbex-employees", + "genFolderName": "codbex-employees" } ], "primaryKeys": [ @@ -861,20 +910,20 @@ "auditType": "NONE", "dataLength": "20", "dataName": "CUSTOMER_FAX", - "dataNullable": false, + "dataNullable": true, "dataType": "VARCHAR", "description": "", - "isRequiredProperty": true, "name": "Fax", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "fd-col-md--2 fd-col--3", "widgetType": "TEXTBOX", - "dataNotNull": true, + "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, + "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Fax", @@ -1067,6 +1116,38 @@ "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, + { + "auditType": "NONE", + "dataName": "CUSTOMER_RESPONSIBLEPERSON", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "ResponsiblePerson", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "Customer_Employee", + "relationshipEntityName": "Employee", + "relationshipEntityPerspectiveName": "Employees", + "relationshipEntityPerspectiveLabel": "Employees", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "ResponsiblePerson", + "widgetDropdownUrl": "/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeService.ts", + "widgetDropdownControllerUrl": "/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, { "auditType": "NONE", "dataLength": "36", @@ -3747,6 +3828,428 @@ "primaryKeysString": "Id", "masterEntity": "Manufacturer", "masterEntityId": "Manufacturer" + }, + { + "properties": [ + { + "auditType": "NONE", + "dataAutoIncrement": true, + "dataName": "EMPLOYEE_ID", + "dataNullable": true, + "dataPrimaryKey": true, + "dataType": "INTEGER", + "description": "", + "name": "Id", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Id", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "EMPLOYEE_FIRSTNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "FirstName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLabel": "First Name", + "widgetLength": "50", + "widgetShortLabel": "First Name", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 50, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "EMPLOYEE_MIDDLENAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "MiddleName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLabel": "Middle Name", + "widgetLength": "50", + "widgetShortLabel": "Middle Name", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 50, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "EMPLOYEE_LASTNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "LastName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLabel": "Last Name", + "widgetLength": "50", + "widgetShortLabel": "Last Name", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 50, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "entity[\"FirstName\"] + \" \" + entity[\"LastName\"]", + "calculatedPropertyExpressionUpdate": "entity[\"FirstName\"] + \" \" + entity[\"LastName\"]", + "dataLength": "70", + "dataName": "EMPLOYEE_NAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": true, + "name": "Name", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "70", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Name", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 70, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "40", + "dataName": "EMPLOYEE_EMAIL", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "Email", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "40", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "EMAIL", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Email", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 40, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "20", + "dataName": "EMPLOYEE_PHONENUMBER", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "PhoneNumber", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEL", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "PhoneNumber", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEE_BIRTHDATE", + "dataNullable": true, + "dataType": "DATE", + "description": "", + "isRequiredProperty": true, + "name": "BirthDate", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "DATE", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "BirthDate", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "date", + "dataTypeTypescript": "Date", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "10", + "dataName": "EMPLOYEE_PERSONALNUMBER", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "PersonalNumber", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "10", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "PersonalNumber", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 10, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEE_NATIONALITY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Nationality", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_Country", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "DROPDOWN", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Nationality", + "widgetDropdownUrl": "/services/ts/codbex-partners/gen/codbex-partners/api/Settings/undefinedService.ts", + "widgetDropdownControllerUrl": "/services/ts/codbex-partners/gen/codbex-partners/api/Settings/undefinedController.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEE_GENDER", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Gender", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_Gender", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "DROPDOWN", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Gender", + "widgetDropdownUrl": "/services/ts/codbex-partners/gen/codbex-partners/api/Settings/undefinedService.ts", + "widgetDropdownControllerUrl": "/services/ts/codbex-partners/gen/codbex-partners/api/Settings/undefinedController.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEE_MARTIALSTATUS", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "MartialStatus", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_MartialStatus", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "DROPDOWN", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "MartialStatus", + "widgetDropdownUrl": "/services/ts/codbex-partners/gen/codbex-partners/api/Settings/undefinedService.ts", + "widgetDropdownControllerUrl": "/services/ts/codbex-partners/gen/codbex-partners/api/Settings/undefinedController.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "EMPLOYEE_IBAN", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "IBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "IBAN", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 34, + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" + } + ], + "caption": "Manage entity Employee", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_EMPLOYEE\"", + "dataName": "EMPLOYEE", + "dataQuery": "", + "description": "Manage entity Employee", + "generateDefaultRoles": "false", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "layoutType": "MANAGE", + "menuIndex": "100", + "menuKey": "employee", + "menuLabel": "Employee", + "multilingual": "false", + "name": "Employee", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/user.svg", + "perspectiveLabel": "Employees", + "perspectiveName": "Employees", + "perspectiveNavId": "", + "perspectiveOrder": "100", + "perspectiveRole": "", + "projectionReferencedEntity": "Employee", + "projectionReferencedModel": "/workspace/codbex-employees/codbex-employees.model", + "title": "Employee", + "tooltip": "Employee", + "type": "PROJECTION", + "dataSource": "DefaultDB", + "referencedProjections": [], + "primaryKeys": [ + "Id" + ], + "primaryKeysString": "Id", + "hasDates": true, + "hasDropdowns": true } ] } \ No newline at end of file diff --git a/codbex-partners/codbex-partners.model b/codbex-partners/codbex-partners.model index 9268238..0ae6a1c 100644 --- a/codbex-partners/codbex-partners.model +++ b/codbex-partners/codbex-partners.model @@ -112,10 +112,9 @@ "auditType": "NONE", "dataLength": "20", "dataName": "CUSTOMER_FAX", - "dataNullable": "false", + "dataNullable": "true", "dataType": "VARCHAR", "description": "", - "isRequiredProperty": "true", "name": "Fax", "tooltip": "", "widgetIsMajor": "true", @@ -226,6 +225,26 @@ "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX" }, + { + "auditType": "NONE", + "dataName": "CUSTOMER_RESPONSIBLEPERSON", + "dataNullable": "false", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "ResponsiblePerson", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "Customer_Employee", + "relationshipEntityName": "Employee", + "relationshipEntityPerspectiveName": "Employees", + "relationshipEntityPerspectiveLabel": "Employees" + }, { "auditType": "NONE", "dataLength": "36", @@ -1478,6 +1497,254 @@ "title": "ManufacturerContact", "tooltip": "ManufacturerContact", "type": "DEPENDENT" + }, + { + "properties": [ + { + "auditType": "NONE", + "dataAutoIncrement": "true", + "dataName": "EMPLOYEE_ID", + "dataNullable": "true", + "dataPrimaryKey": "true", + "dataType": "INTEGER", + "description": "", + "name": "Id", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "EMPLOYEE_FIRSTNAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "FirstName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLabel": "First Name", + "widgetLength": "50", + "widgetShortLabel": "First Name", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "EMPLOYEE_MIDDLENAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "MiddleName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLabel": "Middle Name", + "widgetLength": "50", + "widgetShortLabel": "Middle Name", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "EMPLOYEE_LASTNAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "LastName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLabel": "Last Name", + "widgetLength": "50", + "widgetShortLabel": "Last Name", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "entity[\"FirstName\"] + \" \" + entity[\"LastName\"]", + "calculatedPropertyExpressionUpdate": "entity[\"FirstName\"] + \" \" + entity[\"LastName\"]", + "dataLength": "70", + "dataName": "EMPLOYEE_NAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": "true", + "name": "Name", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "70", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "40", + "dataName": "EMPLOYEE_EMAIL", + "dataNullable": "true", + "dataType": "VARCHAR", + "dataUnique": "true", + "description": "", + "isRequiredProperty": "true", + "name": "Email", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "40", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "EMAIL" + }, + { + "auditType": "NONE", + "dataLength": "20", + "dataName": "EMPLOYEE_PHONENUMBER", + "dataNullable": "true", + "dataType": "VARCHAR", + "dataUnique": "true", + "description": "", + "isRequiredProperty": "true", + "name": "PhoneNumber", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEL" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEE_BIRTHDATE", + "dataNullable": "true", + "dataType": "DATE", + "description": "", + "isRequiredProperty": "true", + "name": "BirthDate", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "DATE" + }, + { + "auditType": "NONE", + "dataLength": "10", + "dataName": "EMPLOYEE_PERSONALNUMBER", + "dataNullable": "true", + "dataType": "VARCHAR", + "dataUnique": "true", + "description": "", + "isRequiredProperty": "true", + "name": "PersonalNumber", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "10", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEE_NATIONALITY", + "dataNullable": "true", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "Nationality", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_Country", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "DROPDOWN" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEE_GENDER", + "dataNullable": "true", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "Gender", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_Gender", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "DROPDOWN" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEE_MARTIALSTATUS", + "dataNullable": "true", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "MartialStatus", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_MartialStatus", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "DROPDOWN" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "EMPLOYEE_IBAN", + "dataNullable": "true", + "dataType": "VARCHAR", + "dataUnique": "true", + "description": "", + "isRequiredProperty": "true", + "name": "IBAN", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX" + } + ], + "caption": "Manage entity Employee", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}EMPLOYEE\"", + "dataName": "EMPLOYEE", + "dataQuery": "", + "description": "Manage entity Employee", + "generateDefaultRoles": "false", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "layoutType": "MANAGE", + "menuIndex": "100", + "menuKey": "employee", + "menuLabel": "Employee", + "multilingual": "false", + "name": "Employee", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/user.svg", + "perspectiveLabel": "Employees", + "perspectiveName": "Employees", + "perspectiveNavId": "", + "perspectiveOrder": "100", + "perspectiveRole": "", + "projectionReferencedEntity": "Employee", + "projectionReferencedModel": "/workspace/codbex-employees/codbex-employees.model", + "title": "Employee", + "tooltip": "Employee", + "type": "PROJECTION" } ], "perspectives": [ diff --git a/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts b/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts index 814fa55..f0b7bde 100644 --- a/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts +++ b/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts @@ -188,9 +188,6 @@ class CustomerController { if (entity.Phone?.length > 15) { throw new ValidationError(`The 'Phone' exceeds the maximum length of [15] characters`); } - if (entity.Fax === null || entity.Fax === undefined) { - throw new ValidationError(`The 'Fax' property is required, provide a valid value`); - } if (entity.Fax?.length > 20) { throw new ValidationError(`The 'Fax' exceeds the maximum length of [20] characters`); } @@ -227,6 +224,9 @@ class CustomerController { if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.IBAN)) { throw new ValidationError(`The value provided for the 'IBAN' property ('[${entity.IBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); } + if (entity.ResponsiblePerson === null || entity.ResponsiblePerson === undefined) { + throw new ValidationError(`The 'ResponsiblePerson' property is required, provide a valid value`); + } if (entity.Identifier === null || entity.Identifier === undefined) { throw new ValidationError(`The 'Identifier' property is required, provide a valid value`); } diff --git a/codbex-partners/gen/codbex-partners/data/Customers/CustomerEntity.ts b/codbex-partners/gen/codbex-partners/data/Customers/CustomerEntity.ts index c07da20..0bb3960 100644 --- a/codbex-partners/gen/codbex-partners/data/Customers/CustomerEntity.ts +++ b/codbex-partners/gen/codbex-partners/data/Customers/CustomerEntity.ts @@ -71,8 +71,9 @@ export class CustomerEntity { name: 'CUSTOMER_FAX', type: 'string', length: 20, + nullable: true, }) - public Fax!: string; + public Fax?: string; @Documentation('Country') @Column({ @@ -120,6 +121,13 @@ export class CustomerEntity { }) public IBAN!: string; + @Documentation('ResponsiblePerson') + @Column({ + name: 'CUSTOMER_RESPONSIBLEPERSON', + type: 'integer', + }) + public ResponsiblePerson!: number; + @Documentation('Identifier') @Column({ name: 'CUSTOMER_IDENTIFIER', diff --git a/codbex-partners/gen/codbex-partners/schema/codbex-partners.schema b/codbex-partners/gen/codbex-partners/schema/codbex-partners.schema index b5476e4..8a2f7b8 100644 --- a/codbex-partners/gen/codbex-partners/schema/codbex-partners.schema +++ b/codbex-partners/gen/codbex-partners/schema/codbex-partners.schema @@ -50,6 +50,7 @@ { "type": "VARCHAR", "length": 20, + "nullable": true, "name": "CUSTOMER_FAX" }, { @@ -82,6 +83,10 @@ "unique": true, "name": "CUSTOMER_IBAN" }, + { + "type": "INTEGER", + "name": "CUSTOMER_RESPONSIBLEPERSON" + }, { "type": "VARCHAR", "length": 36, @@ -439,6 +444,15 @@ "referencedTable": "CODBEX_CITY", "referencedColumns": "CITY_ID" }, + { + "name": "Customer_Employee", + "type": "foreignKey", + "table": "CODBEX_CUSTOMER", + "constraintName": "Customer_Employee", + "columns": "CUSTOMER_RESPONSIBLEPERSON", + "referencedTable": "CODBEX_EMPLOYEE", + "referencedColumns": "EMPLOYEE_ID" + }, { "name": "CustomerNote_Customer", "type": "foreignKey", diff --git a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/controller.js b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/controller.js index d49a9f9..5e8dbc5 100644 --- a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/controller.js +++ b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/controller.js @@ -138,6 +138,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer selectedMainEntityId: entity.Id, optionsCountry: $scope.optionsCountry, optionsCity: $scope.optionsCity, + optionsResponsiblePerson: $scope.optionsResponsiblePerson, }}); }; @@ -149,6 +150,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer entity: {}, optionsCountry: $scope.optionsCountry, optionsCity: $scope.optionsCity, + optionsResponsiblePerson: $scope.optionsResponsiblePerson, }}); }; @@ -158,6 +160,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer entity: $scope.selectedEntity, optionsCountry: $scope.optionsCountry, optionsCity: $scope.optionsCity, + optionsResponsiblePerson: $scope.optionsResponsiblePerson, }}); }; @@ -201,6 +204,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer entity: $scope.filterEntity, optionsCountry: $scope.optionsCountry, optionsCity: $scope.optionsCity, + optionsResponsiblePerson: $scope.optionsResponsiblePerson, }, }); }; @@ -208,6 +212,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer //----------------Dropdowns-----------------// $scope.optionsCountry = []; $scope.optionsCity = []; + $scope.optionsResponsiblePerson = []; $http.get('/services/ts/codbex-countries/gen/codbex-countries/api/Settings/CountryController.ts').then((response) => { @@ -240,6 +245,21 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); }); + $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts').then((response) => { + $scope.optionsResponsiblePerson = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'ResponsiblePerson', + message: LocaleService.t('codbex-partners:codbex-partners-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + $scope.optionsCountryValue = (optionKey) => { for (let i = 0; i < $scope.optionsCountry.length; i++) { if ($scope.optionsCountry[i].value === optionKey) { @@ -256,5 +276,13 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } return null; }; + $scope.optionsResponsiblePersonValue = (optionKey) => { + for (let i = 0; i < $scope.optionsResponsiblePerson.length; i++) { + if ($scope.optionsResponsiblePerson[i].value === optionKey) { + return $scope.optionsResponsiblePerson[i].text; + } + } + return null; + }; //----------------Dropdowns-----------------// }); diff --git a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-filter/controller.js b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-filter/controller.js index 118cdb6..8ac21b6 100644 --- a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-filter/controller.js +++ b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-filter/controller.js @@ -18,6 +18,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.selectedMainEntityId = params.selectedMainEntityId; $scope.optionsCountry = params.optionsCountry; $scope.optionsCity = params.optionsCity; + $scope.optionsResponsiblePerson = params.optionsResponsiblePerson; } $scope.filter = () => { @@ -86,6 +87,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'IBAN', operator: 'LIKE', value: `%${entity.IBAN}%` }; filter.$filter.conditions.push(condition); } + if (entity.ResponsiblePerson !== undefined) { + const condition = { propertyName: 'ResponsiblePerson', operator: 'EQ', value: entity.ResponsiblePerson }; + filter.$filter.conditions.push(condition); + } if (entity.Identifier) { const condition = { propertyName: 'Identifier', operator: 'LIKE', value: `%${entity.Identifier}%` }; filter.$filter.conditions.push(condition); diff --git a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-filter/index.html b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-filter/index.html index 14f1474..0c05970 100644 --- a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-filter/index.html +++ b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-filter/index.html @@ -234,6 +234,21 @@ + +
+ {{ 'codbex-partners:codbex-partners-model.t.CUSTOMER_RESPONSIBLEPERSON' | t }} +
+
+ + +
+
{{ 'codbex-partners:codbex-partners-model.t.CUSTOMER_IDENTIFIER' | t }} diff --git a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-window/controller.js b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-window/controller.js index e8d1f84..10302f3 100644 --- a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-window/controller.js +++ b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-window/controller.js @@ -39,6 +39,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.selectedMainEntityId = params.selectedMainEntityId; $scope.optionsCountry = params.optionsCountry; $scope.optionsCity = params.optionsCity; + $scope.optionsResponsiblePerson = params.optionsResponsiblePerson; } $scope.create = () => { @@ -118,6 +119,24 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer type: AlertTypes.Error }); }); + $scope.serviceResponsiblePerson = '/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts'; + + $scope.optionsResponsiblePerson = []; + + $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts').then((response) => { + $scope.optionsResponsiblePerson = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'ResponsiblePerson', + message: LocaleService.t('codbex-partners:codbex-partners-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); $scope.alert = (message) => { if (message) Dialogs.showAlert({ diff --git a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-window/index.html b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-window/index.html index 83d2710..60ae915 100644 --- a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-window/index.html +++ b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-window/index.html @@ -144,7 +144,7 @@
- {{ 'codbex-partners:codbex-partners-model.t.CUSTOMER_FAX' | t }} + {{ 'codbex-partners:codbex-partners-model.t.CUSTOMER_FAX' | t }}
+ +
+ {{ 'codbex-partners:codbex-partners-model.t.CUSTOMER_RESPONSIBLEPERSON' | t }} +
+
+ + +
+
{{ 'codbex-partners:codbex-partners-model.t.CUSTOMER_IDENTIFIER' | t }} diff --git a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/index.html b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/index.html index 9af215c..5c16745 100644 --- a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/index.html +++ b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/index.html @@ -52,6 +52,7 @@ {{next.PostalCode}} | {{next.TIN}} | {{next.IBAN}} | + {{optionsResponsiblePersonValue(next.ResponsiblePerson)}} | {{next.Identifier}} | {{next.CreatedAt | date: "dd/MMM/yyyy HH:MM"}} diff --git a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/controller.js b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/controller.js index 25e102f..8dd76e1 100644 --- a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/controller.js +++ b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/controller.js @@ -52,6 +52,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.entity = {}; $scope.optionsCountry = []; $scope.optionsCity = []; + $scope.optionsResponsiblePerson = []; $scope.action = 'select'; }); }}); @@ -63,6 +64,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.entity = data.entity; $scope.optionsCountry = data.optionsCountry; $scope.optionsCity = data.optionsCity; + $scope.optionsResponsiblePerson = data.optionsResponsiblePerson; $scope.action = 'select'; }); }}); @@ -71,6 +73,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.entity = {}; $scope.optionsCountry = data.optionsCountry; $scope.optionsCity = data.optionsCity; + $scope.optionsResponsiblePerson = data.optionsResponsiblePerson; $scope.action = 'create'; }); }}); @@ -82,12 +85,14 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.entity = data.entity; $scope.optionsCountry = data.optionsCountry; $scope.optionsCity = data.optionsCity; + $scope.optionsResponsiblePerson = data.optionsResponsiblePerson; $scope.action = 'update'; }); }}); $scope.serviceCountry = '/services/ts/codbex-countries/gen/codbex-countries/api/Settings/CountryController.ts'; $scope.serviceCity = '/services/ts/codbex-cities/gen/codbex-cities/api/Settings/CityController.ts'; + $scope.serviceResponsiblePerson = '/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts'; //-----------------Events-------------------// @@ -165,6 +170,16 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer closeButton: false }); }; + $scope.createResponsiblePerson = () => { + Dialogs.showWindow({ + id: 'Employee-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; //-----------------Dialogs-------------------// @@ -206,6 +221,23 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); }); }; + $scope.refreshResponsiblePerson = () => { + $scope.optionsResponsiblePerson = []; + $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts').then((response) => { + $scope.optionsResponsiblePerson = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'ResponsiblePerson', + message: LocaleService.t('codbex-partners:codbex-partners-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; //----------------Dropdowns-----------------// }); \ No newline at end of file diff --git a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/index.html b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/index.html index e04f419..aaaddc6 100644 --- a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/index.html +++ b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/index.html @@ -142,7 +142,7 @@
- {{ 'codbex-partners:codbex-partners-model.t.CUSTOMER_FAX' | t }} + {{ 'codbex-partners:codbex-partners-model.t.CUSTOMER_FAX' | t }}
+ +
+ {{ 'codbex-partners:codbex-partners-model.t.CUSTOMER_RESPONSIBLEPERSON' | t }} +
+
+ + +
+
+ + +
+
{{ 'codbex-partners:codbex-partners-model.t.CUSTOMER_IDENTIFIER' | t }} diff --git a/codbex-partners/package.json b/codbex-partners/package.json index 284239f..7167400 100644 --- a/codbex-partners/package.json +++ b/codbex-partners/package.json @@ -10,6 +10,7 @@ }, "dependencies": { "@codbex/codbex-countries": "^1.2.0", - "@codbex/codbex-cities": "^1.1.0" + "@codbex/codbex-cities": "^1.1.0", + "@codbex/codbex-partners": "^1.0.0" } -} +} \ No newline at end of file diff --git a/codbex-partners/project.json b/codbex-partners/project.json index 7ec93a2..52972ec 100644 --- a/codbex-partners/project.json +++ b/codbex-partners/project.json @@ -1,3 +1 @@ -{ - "guid": "codbex-partners" -} +{"guid":"codbex-partners","actions":[{"name":"Build TypeScript","commands":[{"os":"unix","command":"tsc"},{"os":"windows","command":"cmd /c tsc"}],"registry":"true"}]} \ No newline at end of file diff --git a/codbex-partners/translations/en-US/codbex-partners.model.json b/codbex-partners/translations/en-US/codbex-partners.model.json index ed0f1c0..87a2c8a 100644 --- a/codbex-partners/translations/en-US/codbex-partners.model.json +++ b/codbex-partners/translations/en-US/codbex-partners.model.json @@ -81,6 +81,7 @@ "CUSTOMER_POSTALCODE": "PostalCode", "CUSTOMER_TIN": "TIN", "CUSTOMER_IBAN": "IBAN", + "CUSTOMER_RESPONSIBLEPERSON": "ResponsiblePerson", "CUSTOMER_IDENTIFIER": "Identifier", "CUSTOMER_CREATEDAT": "CreatedAt", "SUPPLIER": "Supplier", @@ -150,6 +151,20 @@ "MANUFACTURERCONTACT_DESIGNATION": "Designation", "MANUFACTURERCONTACT_EMAIL": "Email", "MANUFACTURERCONTACT_PHONE": "Phone", + "EMPLOYEE": "Employee", + "EMPLOYEE_ID": "Id", + "EMPLOYEE_FIRSTNAME": "First Name", + "EMPLOYEE_MIDDLENAME": "Middle Name", + "EMPLOYEE_LASTNAME": "Last Name", + "EMPLOYEE_NAME": "Name", + "EMPLOYEE_EMAIL": "Email", + "EMPLOYEE_PHONENUMBER": "PhoneNumber", + "EMPLOYEE_BIRTHDATE": "BirthDate", + "EMPLOYEE_PERSONALNUMBER": "PersonalNumber", + "EMPLOYEE_NATIONALITY": "Nationality", + "EMPLOYEE_GENDER": "Gender", + "EMPLOYEE_MARTIALSTATUS": "MartialStatus", + "EMPLOYEE_IBAN": "IBAN", "Customers": "Customers", "Suppliers": "Suppliers", "Manufacturers": "Manufacturers"