Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions codbex-partners/codbex-partners.edm

Large diffs are not rendered by default.

515 changes: 509 additions & 6 deletions codbex-partners/codbex-partners.gen

Large diffs are not rendered by default.

271 changes: 269 additions & 2 deletions codbex-partners/codbex-partners.model
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
}
Expand Down Expand Up @@ -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`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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',
Expand Down
14 changes: 14 additions & 0 deletions codbex-partners/gen/codbex-partners/schema/codbex-partners.schema
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
{
"type": "VARCHAR",
"length": 20,
"nullable": true,
"name": "CUSTOMER_FAX"
},
{
Expand Down Expand Up @@ -82,6 +83,10 @@
"unique": true,
"name": "CUSTOMER_IBAN"
},
{
"type": "INTEGER",
"name": "CUSTOMER_RESPONSIBLEPERSON"
},
{
"type": "VARCHAR",
"length": 36,
Expand Down Expand Up @@ -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",
Expand Down
Loading
Loading