diff --git a/codbex-payments/codbex-payments.edm b/codbex-payments/codbex-payments.edm index 5c7972d..37af8ac 100644 --- a/codbex-payments/codbex-payments.edm +++ b/codbex-payments/codbex-payments.edm @@ -2,7 +2,7 @@ - + @@ -20,7 +20,7 @@ - + @@ -37,6 +37,7 @@ + @@ -68,6 +69,8 @@ + + @@ -148,26 +151,43 @@ - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - + @@ -179,5 +199,5 @@ - + \ No newline at end of file diff --git a/codbex-payments/codbex-payments.gen b/codbex-payments/codbex-payments.gen index c2a4b16..33647ce 100644 --- a/codbex-payments/codbex-payments.gen +++ b/codbex-payments/codbex-payments.gen @@ -206,6 +206,18 @@ "icon": "/services/web/resources/unicons/paypal.svg", "role": "" }, + "Employees": { + "views": [ + "Employee" + ], + "name": "Employees", + "label": "Employees", + "header": "", + "order": "100", + "navId": "", + "icon": "/services/web/resources/unicons/user.svg", + "role": "" + }, "Suppliers": { "views": [ "Supplier" @@ -284,7 +296,7 @@ { "auditType": "NONE", "dataName": "CUSTOMERPAYMENT_CUSTOMER", - "dataNullable": true, + "dataNullable": false, "dataType": "INTEGER", "description": "", "isRequiredProperty": true, @@ -300,7 +312,7 @@ "relationshipEntityName": "Customer", "relationshipEntityPerspectiveName": "Customers", "relationshipEntityPerspectiveLabel": "Customers", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, @@ -790,7 +802,7 @@ "title": { "auditType": "NONE", "dataName": "CUSTOMERPAYMENT_CUSTOMER", - "dataNullable": true, + "dataNullable": false, "dataType": "INTEGER", "description": "", "isRequiredProperty": true, @@ -806,7 +818,7 @@ "relationshipEntityName": "Customer", "relationshipEntityPerspectiveName": "Customers", "relationshipEntityPerspectiveLabel": "Customers", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, @@ -1211,9 +1223,10 @@ { "auditType": "NONE", "dataName": "SUPPLIERPAYMENT_SUPPLIER", - "dataNullable": true, + "dataNullable": false, "dataType": "INTEGER", "description": "", + "isRequiredProperty": true, "name": "Supplier", "tooltip": "", "widgetDropDownKey": "Id", @@ -1226,11 +1239,10 @@ "relationshipEntityName": "Supplier", "relationshipEntityPerspectiveName": "Suppliers", "relationshipEntityPerspectiveLabel": "Suppliers", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Supplier", @@ -1680,9 +1692,10 @@ "title": { "auditType": "NONE", "dataName": "SUPPLIERPAYMENT_SUPPLIER", - "dataNullable": true, + "dataNullable": false, "dataType": "INTEGER", "description": "", + "isRequiredProperty": true, "name": "Supplier", "tooltip": "", "widgetDropDownKey": "Id", @@ -1695,11 +1708,10 @@ "relationshipEntityName": "Supplier", "relationshipEntityPerspectiveName": "Suppliers", "relationshipEntityPerspectiveLabel": "Suppliers", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Supplier", @@ -2125,6 +2137,38 @@ "dataTypeTypescript": "number", "inputRule": "" }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_EMPLOYEE", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Employee", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "EmployeePayment_Employee", + "relationshipEntityName": "Employee", + "relationshipEntityPerspectiveName": "Employees", + "relationshipEntityPerspectiveLabel": "Employees", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Employee", + "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", "dataName": "EMPLOYEEPAYMENT_DATE", @@ -2539,6 +2583,11 @@ "type": "PRIMARY", "dataSource": "DefaultDB", "referencedProjections": [ + { + "name": "Employee", + "project": "codbex-employees", + "genFolderName": "codbex-employees" + }, { "name": "Currency", "project": "codbex-currencies", @@ -2559,33 +2608,65 @@ "masterProperties": { "title": { "auditType": "NONE", - "dataName": "EMPLOYEEPAYMENT_DATE", + "dataName": "EMPLOYEEPAYMENT_EMPLOYEE", "dataNullable": false, - "dataOrderBy": "DESC", - "dataType": "DATE", + "dataType": "INTEGER", "description": "", "isRequiredProperty": true, - "name": "Date", + "name": "Employee", "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "", - "widgetType": "DATE", + "widgetType": "DROPDOWN", + "relationshipName": "EmployeePayment_Employee", + "relationshipEntityName": "Employee", + "relationshipEntityPerspectiveName": "Employees", + "relationshipEntityPerspectiveLabel": "Employees", "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Date", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "date", - "dataTypeTypescript": "Date", - "isDateType": true, + "widgetLabel": "Employee", + "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": "" }, "properties": [ + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_DATE", + "dataNullable": false, + "dataOrderBy": "DESC", + "dataType": "DATE", + "description": "", + "isRequiredProperty": true, + "name": "Date", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Date", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "date", + "dataTypeTypescript": "Date", + "isDateType": true, + "inputRule": "" + }, { "auditType": "NONE", "dataName": "EMPLOYEEPAYMENT_VALOR", @@ -2942,8 +3023,8 @@ } ] }, - "hasDates": true, - "hasDropdowns": true + "hasDropdowns": true, + "hasDates": true }, { "properties": [ @@ -3193,7 +3274,7 @@ "relationshipName": "PaymentRecord_PaymentDirection", "relationshipEntityName": "PaymentDirection", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "", + "relationshipEntityPerspectiveLabel": "Entities", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, @@ -3414,6 +3495,62 @@ "dataTypeJava": "boolean", "dataTypeTypescript": "boolean", "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_DELETEDAT", + "dataNullable": true, + "dataType": "TIMESTAMP", + "description": "", + "name": "DeletedAt", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "DeletedAt", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "255", + "dataName": "PAYMENTRECORD_DELETEDREASON", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "DeletedReason", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "DeletedReason", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 255, + "inputRule": "" } ], "caption": "Manage entity PaymentRecord", @@ -3685,7 +3822,7 @@ "relationshipName": "PaymentRecord_PaymentDirection", "relationshipEntityName": "PaymentDirection", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "", + "relationshipEntityPerspectiveLabel": "Entities", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, @@ -3906,6 +4043,62 @@ "dataTypeJava": "boolean", "dataTypeTypescript": "boolean", "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_DELETEDAT", + "dataNullable": true, + "dataType": "TIMESTAMP", + "description": "", + "name": "DeletedAt", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "DeletedAt", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "255", + "dataName": "PAYMENTRECORD_DELETEDREASON", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "DeletedReason", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "DeletedReason", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 255, + "inputRule": "" } ] }, @@ -5567,7 +5760,7 @@ { "auditType": "NONE", "dataAutoIncrement": true, - "dataName": "SUPPLIER_ID", + "dataName": "PAYMENTDIRECTION_ID", "dataNullable": true, "dataPrimaryKey": true, "dataType": "INTEGER", @@ -5592,19 +5785,19 @@ }, { "auditType": "NONE", - "dataLength": "100", - "dataName": "SUPPLIER_NAME", - "dataNullable": true, + "dataLength": "20", + "dataName": "PAYMENTDIRECTION_NAME", + "dataNullable": false, "dataType": "VARCHAR", "description": "", "isRequiredProperty": true, "name": "Name", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "100", + "widgetLength": "20", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, @@ -5616,50 +5809,111 @@ "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, - "maxLength": 100, + "maxLength": 20, "inputRule": "" - }, + } + ], + "caption": "Manage entity PaymentDirection", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_PAYMENTDIRECTION\"", + "dataName": "PAYMENTDIRECTION", + "dataQuery": "", + "description": "Manage entity PaymentDirection", + "generateDefaultRoles": "false", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "menuIndex": "100", + "menuKey": "paymentdirection", + "menuLabel": "PaymentDirection", + "multilingual": "false", + "name": "PaymentDirection", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/copy.svg", + "perspectiveName": "Settings", + "perspectiveNavId": "", + "perspectiveOrder": "100", + "perspectiveRole": "", + "title": "PaymentDirection", + "tooltip": "PaymentDirection", + "type": "SETTING", + "dataSource": "DefaultDB", + "referencedProjections": [], + "primaryKeys": [ + "Id" + ], + "primaryKeysString": "Id" + }, + { + "properties": [ { "auditType": "NONE", - "dataLength": "200", - "dataName": "SUPPLIER_ADDRESS", + "dataAutoIncrement": true, + "dataName": "EMPLOYEE_ID", "dataNullable": true, - "dataType": "VARCHAR", + "dataPrimaryKey": true, + "dataType": "INTEGER", "description": "", - "isRequiredProperty": true, - "name": "Address", + "name": "Id", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "200", + "widgetLength": "20", "widgetSize": "", - "widgetType": "TEXTAREA", + "widgetType": "TEXTBOX", "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": 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, - "widgetLabel": "Address", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, - "maxLength": 200, + "maxLength": 50, "inputRule": "" }, { "auditType": "NONE", - "dataLength": "20", - "dataName": "SUPPLIER_POSTALCODE", + "dataLength": "50", + "dataName": "EMPLOYEE_MIDDLENAME", "dataNullable": true, "dataType": "VARCHAR", "description": "", - "name": "PostalCode", + "name": "MiddleName", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", + "widgetLabel": "Middle Name", + "widgetLength": "50", + "widgetShortLabel": "Middle Name", + "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, @@ -5668,27 +5922,28 @@ "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "PostalCode", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, - "maxLength": 20, + "maxLength": 50, "inputRule": "" }, { "auditType": "NONE", - "dataLength": "100", - "dataName": "SUPPLIER_EMAIL", + "dataLength": "50", + "dataName": "EMPLOYEE_LASTNAME", "dataNullable": true, "dataType": "VARCHAR", "description": "", "isRequiredProperty": true, - "name": "Email", + "name": "LastName", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "100", + "widgetLabel": "Last Name", + "widgetLength": "50", + "widgetShortLabel": "Last Name", "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX", "dataNotNull": false, @@ -5697,65 +5952,95 @@ "dataUnique": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Email", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, - "maxLength": 100, + "maxLength": 50, "inputRule": "" }, { "auditType": "NONE", - "dataLength": "20", - "dataName": "SUPPLIER_PHONE", + "calculatedPropertyExpressionCreate": "entity[\"FirstName\"] + \" \" + entity[\"LastName\"]", + "calculatedPropertyExpressionUpdate": "entity[\"FirstName\"] + \" \" + entity[\"LastName\"]", + "dataLength": "70", + "dataName": "EMPLOYEE_NAME", "dataNullable": true, "dataType": "VARCHAR", "description": "", - "name": "Phone", + "isCalculatedProperty": true, + "name": "Name", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", + "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": "Phone", + "widgetLabel": "Email", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, - "maxLength": 20, + "maxLength": 40, "inputRule": "" }, { "auditType": "NONE", "dataLength": "20", - "dataName": "SUPPLIER_FAX", + "dataName": "EMPLOYEE_PHONENUMBER", "dataNullable": true, "dataType": "VARCHAR", + "dataUnique": true, "description": "", - "name": "Fax", + "isRequiredProperty": true, + "name": "PhoneNumber", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", - "widgetType": "TEXTBOX", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEL", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Fax", + "widgetLabel": "PhoneNumber", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", @@ -5766,21 +6051,77 @@ }, { "auditType": "NONE", - "dataName": "SUPPLIER_COUNTRY", + "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": "Country", - "relationshipEntityPerspectiveLabel": "Entities", - "relationshipEntityPerspectiveName": "Countries", - "relationshipName": "Supplier_Country", + "name": "Nationality", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_Country", "tooltip": "", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", "widgetIsMajor": true, "widgetLength": "20", - "widgetSize": "", + "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "DROPDOWN", "dataNotNull": false, "dataAutoIncrement": false, @@ -5788,30 +6129,30 @@ "dataUnique": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Country", - "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Countries/undefinedService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Countries/undefinedController.ts", + "widgetLabel": "Nationality", + "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/undefinedService.ts", + "widgetDropdownControllerUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/undefinedController.ts", "dataTypeJava": "int", "dataTypeTypescript": "number", "inputRule": "" }, { "auditType": "NONE", - "dataName": "SUPPLIER_CITY", + "dataName": "EMPLOYEE_GENDER", "dataNullable": true, "dataType": "INTEGER", "description": "", "isRequiredProperty": true, - "name": "City", + "name": "Gender", "relationshipEntityPerspectiveLabel": "Entities", - "relationshipEntityPerspectiveName": "Cities", - "relationshipName": "Supplier_City", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_Gender", "tooltip": "", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", "widgetIsMajor": true, "widgetLength": "20", - "widgetSize": "", + "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "DROPDOWN", "dataNotNull": false, "dataAutoIncrement": false, @@ -5819,60 +6160,62 @@ "dataUnique": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "City", - "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Cities/undefinedService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Cities/undefinedController.ts", + "widgetLabel": "Gender", + "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/undefinedService.ts", + "widgetDropdownControllerUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/undefinedController.ts", "dataTypeJava": "int", "dataTypeTypescript": "number", "inputRule": "" }, { "auditType": "NONE", - "dataLength": "20", - "dataName": "SUPPLIER_TIN", + "dataName": "EMPLOYEE_MARTIALSTATUS", "dataNullable": true, - "dataType": "VARCHAR", + "dataType": "INTEGER", "description": "", - "name": "TIN", + "isRequiredProperty": true, + "name": "MartialStatus", + "relationshipEntityPerspectiveLabel": "Entities", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_MartialStatus", "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "TEXTBOX", + "widgetType": "DROPDOWN", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "TIN", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, + "widgetLabel": "MartialStatus", + "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/undefinedService.ts", + "widgetDropdownControllerUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/undefinedController.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", "inputRule": "" }, { "auditType": "NONE", - "dataLength": "36", - "dataName": "SUPPLIER_IBAN", + "dataLength": "34", + "dataName": "EMPLOYEE_IBAN", "dataNullable": true, "dataType": "VARCHAR", + "dataUnique": true, "description": "", + "isRequiredProperty": true, "name": "IBAN", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "36", + "widgetLength": "34", "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "IBAN", @@ -5881,42 +6224,43 @@ "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, - "maxLength": 36, + "maxLength": 34, "inputRule": "" } ], - "caption": "Manage entity Supplier", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_SUPPLIER\"", - "dataName": "SUPPLIER", + "caption": "Manage entity Employee", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_EMPLOYEE\"", + "dataName": "EMPLOYEE", "dataQuery": "", - "description": "Manage entity Supplier", + "description": "Manage entity Employee", "generateDefaultRoles": "false", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", "layoutType": "MANAGE", "menuIndex": "100", - "menuKey": "supplier", - "menuLabel": "Supplier", + "menuKey": "employee", + "menuLabel": "Employee", "multilingual": "false", - "name": "Supplier", + "name": "Employee", "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/user-minus.svg", - "perspectiveLabel": "Suppliers", - "perspectiveName": "Suppliers", + "perspectiveIcon": "/services/web/resources/unicons/user.svg", + "perspectiveLabel": "Employees", + "perspectiveName": "Employees", "perspectiveNavId": "", - "perspectiveOrder": "200", + "perspectiveOrder": "100", "perspectiveRole": "", - "projectionReferencedEntity": "Supplier", - "projectionReferencedModel": "/workspace/codbex-partners/codbex-partners.model", - "title": "Supplier", - "tooltip": "Supplier", - "type": "COPIED", + "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 }, { @@ -5924,7 +6268,7 @@ { "auditType": "NONE", "dataAutoIncrement": true, - "dataName": "PAYMENTDIRECTION_ID", + "dataName": "SUPPLIER_ID", "dataNullable": true, "dataPrimaryKey": true, "dataType": "INTEGER", @@ -5947,27 +6291,203 @@ "dataTypeTypescript": "number", "inputRule": "" }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "SUPPLIER_FIRSTNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "FirstName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "50", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "FirstName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 50, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "SUPPLIER_LASTNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "LastName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "50", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "LastName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 50, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "255", + "dataName": "SUPPLIER_LEGALENTITYNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "LegalEntityName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "LegalEntityName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 255, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "(entity.FirstName && entity.LastName) ? (entity.FirstName + \" \" + entity.LastName) : entity.LegalEntityName", + "calculatedPropertyExpressionUpdate": "(entity.FirstName && entity.LastName) ? (entity.FirstName + \" \" + entity.LastName) : entity.LegalEntityName", + "dataLength": "255", + "dataName": "SUPPLIER_NAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": true, + "name": "Name", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "255", + "widgetSize": "", + "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": 255, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "SUPPLIER_EMAIL", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "Email", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "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": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "15", + "dataName": "SUPPLIER_PHONE", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "Phone", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "15", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEL", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Phone", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 15, + "inputRule": "" + }, { "auditType": "NONE", "dataLength": "20", - "dataName": "PAYMENTDIRECTION_NAME", - "dataNullable": false, + "dataName": "SUPPLIER_FAX", + "dataNullable": true, "dataType": "VARCHAR", "description": "", "isRequiredProperty": true, - "name": "Name", + "name": "Fax", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", - "widgetSize": "", + "widgetSize": "fd-col-md--2 fd-col--3", "widgetType": "TEXTBOX", - "dataNotNull": true, + "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Name", + "widgetLabel": "Fax", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", @@ -5975,36 +6495,126 @@ "minLength": 0, "maxLength": 20, "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "15", + "dataName": "SUPPLIER_TIN", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "TIN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "15", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "TIN", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 15, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "SUPPLIER_IBAN", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "IBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "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": "" + }, + { + "auditType": "CREATED_AT", + "dataName": "SUPPLIER_CREATEDAT", + "dataNullable": true, + "dataType": "TIMESTAMP", + "description": "", + "name": "CreatedAt", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CreatedAt", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "isDateType": true, + "inputRule": "" } ], - "caption": "Manage entity PaymentDirection", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_PAYMENTDIRECTION\"", - "dataName": "PAYMENTDIRECTION", + "caption": "Manage entity Supplier", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_SUPPLIER\"", + "dataName": "SUPPLIER", "dataQuery": "", - "description": "Manage entity PaymentDirection", + "description": "Manage entity Supplier", "generateDefaultRoles": "false", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", + "layoutType": "MANAGE", "menuIndex": "100", - "menuKey": "paymentdirection", - "menuLabel": "PaymentDirection", + "menuKey": "supplier", + "menuLabel": "Supplier", "multilingual": "false", - "name": "PaymentDirection", + "name": "Supplier", "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/copy.svg", - "perspectiveName": "Settings", + "perspectiveIcon": "/services/web/resources/unicons/user-minus.svg", + "perspectiveLabel": "Suppliers", + "perspectiveName": "Suppliers", "perspectiveNavId": "", - "perspectiveOrder": "100", + "perspectiveOrder": "200", "perspectiveRole": "", - "title": "PaymentDirection", - "tooltip": "PaymentDirection", - "type": "SETTING", + "projectionReferencedEntity": "Supplier", + "projectionReferencedModel": "/workspace/codbex-partners/codbex-partners.model", + "title": "Supplier", + "tooltip": "Supplier", + "type": "PROJECTION", "dataSource": "DefaultDB", "referencedProjections": [], "primaryKeys": [ "Id" ], - "primaryKeysString": "Id" + "primaryKeysString": "Id", + "hasDates": true } ] } \ No newline at end of file diff --git a/codbex-payments/codbex-payments.model b/codbex-payments/codbex-payments.model index 42b5f89..5fdb37b 100644 --- a/codbex-payments/codbex-payments.model +++ b/codbex-payments/codbex-payments.model @@ -21,7 +21,7 @@ { "auditType": "NONE", "dataName": "CUSTOMERPAYMENT_CUSTOMER", - "dataNullable": "true", + "dataNullable": "false", "dataType": "INTEGER", "description": "", "isRequiredProperty": "true", @@ -311,9 +311,10 @@ { "auditType": "NONE", "dataName": "SUPPLIERPAYMENT_SUPPLIER", - "dataNullable": "true", + "dataNullable": "false", "dataType": "INTEGER", "description": "", + "isRequiredProperty": "true", "name": "Supplier", "tooltip": "", "widgetDropDownKey": "Id", @@ -578,6 +579,26 @@ "widgetSize": "", "widgetType": "TEXTBOX" }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_EMPLOYEE", + "dataNullable": "false", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "Employee", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "EmployeePayment_Employee", + "relationshipEntityName": "Employee", + "relationshipEntityPerspectiveName": "Employees", + "relationshipEntityPerspectiveLabel": "Employees" + }, { "auditType": "NONE", "dataName": "EMPLOYEEPAYMENT_DATE", @@ -952,7 +973,7 @@ "relationshipName": "PaymentRecord_PaymentDirection", "relationshipEntityName": "PaymentDirection", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "" + "relationshipEntityPerspectiveLabel": "Entities" }, { "auditType": "NONE", @@ -1063,6 +1084,33 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "CHECKBOX" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_DELETEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "name": "DeletedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "255", + "dataName": "PAYMENTRECORD_DELETEDREASON", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "DeletedReason", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX" } ], "caption": "Manage entity PaymentRecord", @@ -1938,7 +1986,7 @@ { "auditType": "NONE", "dataAutoIncrement": "true", - "dataName": "SUPPLIER_ID", + "dataName": "PAYMENTDIRECTION_ID", "dataNullable": "true", "dataPrimaryKey": "true", "dataType": "INTEGER", @@ -1952,191 +2000,298 @@ }, { "auditType": "NONE", - "dataLength": "100", - "dataName": "SUPPLIER_NAME", - "dataNullable": "true", + "dataLength": "20", + "dataName": "PAYMENTDIRECTION_NAME", + "dataNullable": "false", "dataType": "VARCHAR", "description": "", "isRequiredProperty": "true", "name": "Name", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "100", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + } + ], + "caption": "Manage entity PaymentDirection", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}PAYMENTDIRECTION\"", + "dataName": "PAYMENTDIRECTION", + "dataQuery": "", + "description": "Manage entity PaymentDirection", + "generateDefaultRoles": "false", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "layoutType": "MANAGE", + "menuIndex": "100", + "menuKey": "paymentdirection", + "menuLabel": "PaymentDirection", + "multilingual": "false", + "name": "PaymentDirection", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/copy.svg", + "perspectiveLabel": "Entities", + "perspectiveName": "Settings", + "perspectiveNavId": "", + "perspectiveOrder": "100", + "perspectiveRole": "", + "title": "PaymentDirection", + "tooltip": "PaymentDirection", + "type": "SETTING" + }, + { + "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": "200", - "dataName": "SUPPLIER_ADDRESS", + "dataLength": "50", + "dataName": "EMPLOYEE_FIRSTNAME", "dataNullable": "true", "dataType": "VARCHAR", "description": "", "isRequiredProperty": "true", - "name": "Address", + "name": "FirstName", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "200", - "widgetSize": "", - "widgetType": "TEXTAREA" + "widgetLabel": "First Name", + "widgetLength": "50", + "widgetShortLabel": "First Name", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "dataLength": "20", - "dataName": "SUPPLIER_POSTALCODE", + "dataLength": "50", + "dataName": "EMPLOYEE_MIDDLENAME", "dataNullable": "true", "dataType": "VARCHAR", "description": "", - "name": "PostalCode", + "name": "MiddleName", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", + "widgetLabel": "Middle Name", + "widgetLength": "50", + "widgetShortLabel": "Middle Name", + "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "dataLength": "100", - "dataName": "SUPPLIER_EMAIL", + "dataLength": "50", + "dataName": "EMPLOYEE_LASTNAME", "dataNullable": "true", "dataType": "VARCHAR", "description": "", "isRequiredProperty": "true", - "name": "Email", + "name": "LastName", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "100", + "widgetLabel": "Last Name", + "widgetLength": "50", + "widgetShortLabel": "Last Name", "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "dataLength": "20", - "dataName": "SUPPLIER_PHONE", + "calculatedPropertyExpressionCreate": "entity[\"FirstName\"] + \" \" + entity[\"LastName\"]", + "calculatedPropertyExpressionUpdate": "entity[\"FirstName\"] + \" \" + entity[\"LastName\"]", + "dataLength": "70", + "dataName": "EMPLOYEE_NAME", "dataNullable": "true", "dataType": "VARCHAR", "description": "", - "name": "Phone", + "isCalculatedProperty": "true", + "name": "Name", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", + "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": "SUPPLIER_FAX", + "dataName": "EMPLOYEE_PHONENUMBER", "dataNullable": "true", "dataType": "VARCHAR", + "dataUnique": "true", "description": "", - "name": "Fax", + "isRequiredProperty": "true", + "name": "PhoneNumber", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", + "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": "SUPPLIER_COUNTRY", + "dataName": "EMPLOYEE_NATIONALITY", "dataNullable": "true", "dataType": "INTEGER", "description": "", "isRequiredProperty": "true", - "name": "Country", - "relationshipEntityPerspectiveLabel": "Entities", - "relationshipEntityPerspectiveName": "Countries", - "relationshipName": "Supplier_Country", + "name": "Nationality", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_Country", "tooltip": "", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "", + "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "DROPDOWN" }, { "auditType": "NONE", - "dataName": "SUPPLIER_CITY", + "dataName": "EMPLOYEE_GENDER", "dataNullable": "true", "dataType": "INTEGER", "description": "", "isRequiredProperty": "true", - "name": "City", + "name": "Gender", "relationshipEntityPerspectiveLabel": "Entities", - "relationshipEntityPerspectiveName": "Cities", - "relationshipName": "Supplier_City", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_Gender", "tooltip": "", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "", + "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "DROPDOWN" }, { "auditType": "NONE", - "dataLength": "20", - "dataName": "SUPPLIER_TIN", + "dataName": "EMPLOYEE_MARTIALSTATUS", "dataNullable": "true", - "dataType": "VARCHAR", + "dataType": "INTEGER", "description": "", - "name": "TIN", + "isRequiredProperty": "true", + "name": "MartialStatus", + "relationshipEntityPerspectiveLabel": "Entities", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_MartialStatus", "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", "widgetIsMajor": "true", "widgetLength": "20", "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "TEXTBOX" + "widgetType": "DROPDOWN" }, { "auditType": "NONE", - "dataLength": "36", - "dataName": "SUPPLIER_IBAN", + "dataLength": "34", + "dataName": "EMPLOYEE_IBAN", "dataNullable": "true", "dataType": "VARCHAR", + "dataUnique": "true", "description": "", + "isRequiredProperty": "true", "name": "IBAN", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "36", + "widgetLength": "34", "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX" } ], - "caption": "Manage entity Supplier", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}SUPPLIER\"", - "dataName": "SUPPLIER", + "caption": "Manage entity Employee", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}EMPLOYEE\"", + "dataName": "EMPLOYEE", "dataQuery": "", - "description": "Manage entity Supplier", + "description": "Manage entity Employee", "generateDefaultRoles": "false", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", "layoutType": "MANAGE", "menuIndex": "100", - "menuKey": "supplier", - "menuLabel": "Supplier", + "menuKey": "employee", + "menuLabel": "Employee", "multilingual": "false", - "name": "Supplier", + "name": "Employee", "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/user-minus.svg", - "perspectiveLabel": "Suppliers", - "perspectiveName": "Suppliers", + "perspectiveIcon": "/services/web/resources/unicons/user.svg", + "perspectiveLabel": "Employees", + "perspectiveName": "Employees", "perspectiveNavId": "", - "perspectiveOrder": "200", + "perspectiveOrder": "100", "perspectiveRole": "", - "projectionReferencedEntity": "Supplier", - "projectionReferencedModel": "/workspace/codbex-partners/codbex-partners.model", - "title": "Supplier", - "tooltip": "Supplier", - "type": "COPIED" + "projectionReferencedEntity": "Employee", + "projectionReferencedModel": "/workspace/codbex-employees/codbex-employees.model", + "title": "Employee", + "tooltip": "Employee", + "type": "PROJECTION" }, { "properties": [ { "auditType": "NONE", "dataAutoIncrement": "true", - "dataName": "PAYMENTDIRECTION_ID", + "dataName": "SUPPLIER_ID", "dataNullable": "true", "dataPrimaryKey": "true", "dataType": "INTEGER", @@ -2148,15 +2303,150 @@ "widgetSize": "", "widgetType": "TEXTBOX" }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "SUPPLIER_FIRSTNAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "FirstName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "50", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "SUPPLIER_LASTNAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "LastName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "50", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "255", + "dataName": "SUPPLIER_LEGALENTITYNAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "LegalEntityName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "(entity.FirstName && entity.LastName) ? (entity.FirstName + \" \" + entity.LastName) : entity.LegalEntityName", + "calculatedPropertyExpressionUpdate": "(entity.FirstName && entity.LastName) ? (entity.FirstName + \" \" + entity.LastName) : entity.LegalEntityName", + "dataLength": "255", + "dataName": "SUPPLIER_NAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": "true", + "name": "Name", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "SUPPLIER_EMAIL", + "dataNullable": "true", + "dataType": "VARCHAR", + "dataUnique": "true", + "description": "", + "isRequiredProperty": "true", + "name": "Email", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "100", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "EMAIL" + }, + { + "auditType": "NONE", + "dataLength": "15", + "dataName": "SUPPLIER_PHONE", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "Phone", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "15", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEL" + }, { "auditType": "NONE", "dataLength": "20", - "dataName": "PAYMENTDIRECTION_NAME", - "dataNullable": "false", + "dataName": "SUPPLIER_FAX", + "dataNullable": "true", "dataType": "VARCHAR", "description": "", "isRequiredProperty": "true", - "name": "Name", + "name": "Fax", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "15", + "dataName": "SUPPLIER_TIN", + "dataNullable": "true", + "dataType": "VARCHAR", + "dataUnique": "true", + "description": "", + "isRequiredProperty": "true", + "name": "TIN", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "15", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "SUPPLIER_IBAN", + "dataNullable": "true", + "dataType": "VARCHAR", + "dataUnique": "true", + "description": "", + "isRequiredProperty": "true", + "name": "IBAN", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "34", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX" + }, + { + "auditType": "CREATED_AT", + "dataName": "SUPPLIER_CREATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "name": "CreatedAt", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", @@ -2164,30 +2454,32 @@ "widgetType": "TEXTBOX" } ], - "caption": "Manage entity PaymentDirection", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}PAYMENTDIRECTION\"", - "dataName": "PAYMENTDIRECTION", + "caption": "Manage entity Supplier", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}SUPPLIER\"", + "dataName": "SUPPLIER", "dataQuery": "", - "description": "Manage entity PaymentDirection", + "description": "Manage entity Supplier", "generateDefaultRoles": "false", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", - "layoutType": "", + "layoutType": "MANAGE", "menuIndex": "100", - "menuKey": "paymentdirection", - "menuLabel": "PaymentDirection", + "menuKey": "supplier", + "menuLabel": "Supplier", "multilingual": "false", - "name": "PaymentDirection", + "name": "Supplier", "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/copy.svg", - "perspectiveLabel": "", - "perspectiveName": "Settings", + "perspectiveIcon": "/services/web/resources/unicons/user-minus.svg", + "perspectiveLabel": "Suppliers", + "perspectiveName": "Suppliers", "perspectiveNavId": "", - "perspectiveOrder": "100", + "perspectiveOrder": "200", "perspectiveRole": "", - "title": "PaymentDirection", - "tooltip": "PaymentDirection", - "type": "SETTING" + "projectionReferencedEntity": "Supplier", + "projectionReferencedModel": "/workspace/codbex-partners/codbex-partners.model", + "title": "Supplier", + "tooltip": "Supplier", + "type": "PROJECTION" } ], "perspectives": [ diff --git a/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts b/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts index b5e7705..4a469bc 100644 --- a/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts +++ b/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts @@ -29,7 +29,7 @@ class CustomerPaymentController { const options: Options = { limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : 20, offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : 0, - language: request.getLocale().slice(0, 2) + language: request.getLocale().split("_")[0] }; return this.repository.findAll(options); @@ -98,7 +98,7 @@ class CustomerPaymentController { this.checkPermissions('read'); const id = parseInt(ctx.pathParameters.id); const options: Options = { - language: request.getLocale().slice(0, 2) + language: request.getLocale().split("_")[0] }; const entity = this.repository.findById(id, options); if (entity) { diff --git a/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts b/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts index 8bad28a..beeda30 100644 --- a/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts +++ b/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts @@ -29,7 +29,7 @@ class EmployeePaymentController { const options: Options = { limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : 20, offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : 0, - language: request.getLocale().slice(0, 2) + language: request.getLocale().split("_")[0] }; return this.repository.findAll(options); @@ -98,7 +98,7 @@ class EmployeePaymentController { this.checkPermissions('read'); const id = parseInt(ctx.pathParameters.id); const options: Options = { - language: request.getLocale().slice(0, 2) + language: request.getLocale().split("_")[0] }; const entity = this.repository.findById(id, options); if (entity) { @@ -166,6 +166,9 @@ class EmployeePaymentController { } private validateEntity(entity: any): void { + if (entity.Employee === null || entity.Employee === undefined) { + throw new ValidationError(`The 'Employee' property is required, provide a valid value`); + } if (entity.Date === null || entity.Date === undefined) { throw new ValidationError(`The 'Date' property is required, provide a valid value`); } diff --git a/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts b/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts index 3ae8393..5e0e429 100644 --- a/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts +++ b/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts @@ -27,7 +27,7 @@ class PaymentAdjustmentController { const options: Options = { limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : 20, offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : 0, - language: request.getLocale().slice(0, 2) + language: request.getLocale().split("_")[0] }; return this.repository.findAll(options); @@ -96,7 +96,7 @@ class PaymentAdjustmentController { this.checkPermissions('read'); const id = parseInt(ctx.pathParameters.id); const options: Options = { - language: request.getLocale().slice(0, 2) + language: request.getLocale().split("_")[0] }; const entity = this.repository.findById(id, options); if (entity) { diff --git a/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts b/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts index 8954493..4e2bc9f 100644 --- a/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts +++ b/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts @@ -27,7 +27,7 @@ class PaymentRecordController { const options: Options = { limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : 20, offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : 0, - language: request.getLocale().slice(0, 2) + language: request.getLocale().split("_")[0] }; return this.repository.findAll(options); @@ -96,7 +96,7 @@ class PaymentRecordController { this.checkPermissions('read'); const id = parseInt(ctx.pathParameters.id); const options: Options = { - language: request.getLocale().slice(0, 2) + language: request.getLocale().split("_")[0] }; const entity = this.repository.findById(id, options); if (entity) { @@ -191,6 +191,9 @@ class PaymentRecordController { if (entity.Reference?.length > 36) { throw new ValidationError(`The 'Reference' exceeds the maximum length of [36] characters`); } + if (entity.DeletedReason?.length > 255) { + throw new ValidationError(`The 'DeletedReason' exceeds the maximum length of [255] characters`); + } for (const next of validationModules) { next.validate(entity); } diff --git a/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts b/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts index a2f673e..5c8d54c 100644 --- a/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts +++ b/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts @@ -24,7 +24,7 @@ class PaymentDirectionController { const options: Options = { limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : 20, offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : 0, - language: request.getLocale().slice(0, 2) + language: request.getLocale().split("_")[0] }; return this.repository.findAll(options); @@ -88,7 +88,7 @@ class PaymentDirectionController { try { const id = parseInt(ctx.pathParameters.id); const options: Options = { - language: request.getLocale().slice(0, 2) + language: request.getLocale().split("_")[0] }; const entity = this.repository.findById(id, options); if (entity) { diff --git a/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts b/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts index c5d8135..32ffd2b 100644 --- a/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts +++ b/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts @@ -27,7 +27,7 @@ class PaymentTypeController { const options: Options = { limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : 20, offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : 0, - language: request.getLocale().slice(0, 2) + language: request.getLocale().split("_")[0] }; return this.repository.findAll(options); @@ -96,7 +96,7 @@ class PaymentTypeController { this.checkPermissions('read'); const id = parseInt(ctx.pathParameters.id); const options: Options = { - language: request.getLocale().slice(0, 2) + language: request.getLocale().split("_")[0] }; const entity = this.repository.findById(id, options); if (entity) { diff --git a/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts b/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts index 069d5b4..4f9580f 100644 --- a/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts +++ b/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts @@ -29,7 +29,7 @@ class SupplierPaymentController { const options: Options = { limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : 20, offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : 0, - language: request.getLocale().slice(0, 2) + language: request.getLocale().split("_")[0] }; return this.repository.findAll(options); @@ -98,7 +98,7 @@ class SupplierPaymentController { this.checkPermissions('read'); const id = parseInt(ctx.pathParameters.id); const options: Options = { - language: request.getLocale().slice(0, 2) + language: request.getLocale().split("_")[0] }; const entity = this.repository.findById(id, options); if (entity) { @@ -166,6 +166,9 @@ class SupplierPaymentController { } private validateEntity(entity: any): void { + if (entity.Supplier === null || entity.Supplier === undefined) { + throw new ValidationError(`The 'Supplier' property is required, provide a valid value`); + } if (entity.Date === null || entity.Date === undefined) { throw new ValidationError(`The 'Date' property is required, provide a valid value`); } diff --git a/codbex-payments/gen/codbex-payments/api/Suppliers/SupplierController.ts b/codbex-payments/gen/codbex-payments/api/Suppliers/SupplierController.ts deleted file mode 100644 index cf31aed..0000000 --- a/codbex-payments/gen/codbex-payments/api/Suppliers/SupplierController.ts +++ /dev/null @@ -1,192 +0,0 @@ -import { Controller, Get, Post, Put, Delete, Documentation, request, response } from '@aerokit/sdk/http' -import { HttpUtils } from "@aerokit/sdk/http/utils"; -import { ValidationError } from '@aerokit/sdk/http/errors' -import { Options } from '@aerokit/sdk/db' -import { Extensions } from "@aerokit/sdk/extensions" -import { Injected, Inject } from '@aerokit/sdk/component' -import { SupplierRepository } from '../../data/Suppliers/SupplierRepository' -import { SupplierEntity } from '../../data/Suppliers/SupplierEntity' - -const validationModules = await Extensions.loadExtensionModules('codbex-payments-Suppliers-Supplier', ['validate']); - -@Controller -@Documentation('codbex-payments - Supplier Controller') -@Injected() -class SupplierController { - - @Inject('SupplierRepository') - private readonly repository!: SupplierRepository; - - @Get('/') - @Documentation('Get All Supplier') - public getAll(_: any, ctx: any): SupplierEntity[] { - try { - const options: Options = { - limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : 20, - offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : 0, - language: request.getLocale().slice(0, 2) - }; - - return this.repository.findAll(options); - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/') - @Documentation('Create Supplier') - public create(entity: SupplierEntity): SupplierEntity { - try { - this.validateEntity(entity); - entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/Suppliers/SupplierService.ts/' + entity.Id); - response.setStatus(response.CREATED); - return entity; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Get('/count') - @Documentation('Count Supplier') - public count(): { count: number } { - try { - return { count: this.repository.count() }; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/count') - @Documentation('Count Supplier with filter') - public countWithFilter(filter: any): { count: number } { - try { - return { count: this.repository.count(filter) }; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/search') - @Documentation('Search Supplier') - public search(filter: any): SupplierEntity[] { - try { - return this.repository.findAll(filter); - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Get('/:id') - @Documentation('Get Supplier by id') - public getById(_: any, ctx: any): SupplierEntity { - try { - const id = parseInt(ctx.pathParameters.id); - const options: Options = { - language: request.getLocale().slice(0, 2) - }; - const entity = this.repository.findById(id, options); - if (entity) { - return entity; - } else { - HttpUtils.sendResponseNotFound('Supplier not found'); - } - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Put('/:id') - @Documentation('Update Supplier by id') - public update(entity: SupplierEntity, ctx: any): SupplierEntity { - try { - const id = parseInt(ctx.pathParameters.id); - entity.Id = id; - this.validateEntity(entity); - this.repository.update(entity); - return entity; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Delete('/:id') - @Documentation('Delete Supplier by id') - public deleteById(_: any, ctx: any): void { - try { - const id = parseInt(ctx.pathParameters.id); - const entity = this.repository.findById(id); - if (entity) { - this.repository.deleteById(id); - HttpUtils.sendResponseNoContent(); - } else { - HttpUtils.sendResponseNotFound('Supplier not found'); - } - } catch (error: any) { - this.handleError(error); - } - } - - private handleError(error: any) { - if (error.name === 'ForbiddenError') { - HttpUtils.sendForbiddenRequest(error.message); - } else if (error.name === 'ValidationError') { - HttpUtils.sendResponseBadRequest(error.message); - } else { - HttpUtils.sendInternalServerError(error.message); - } - } - - private validateEntity(entity: any): void { - if (entity.Name === null || entity.Name === undefined) { - throw new ValidationError(`The 'Name' property is required, provide a valid value`); - } - if (entity.Name?.length > 100) { - throw new ValidationError(`The 'Name' exceeds the maximum length of [100] characters`); - } - if (entity.Address === null || entity.Address === undefined) { - throw new ValidationError(`The 'Address' property is required, provide a valid value`); - } - if (entity.Address?.length > 200) { - throw new ValidationError(`The 'Address' exceeds the maximum length of [200] characters`); - } - if (entity.PostalCode?.length > 20) { - throw new ValidationError(`The 'PostalCode' exceeds the maximum length of [20] characters`); - } - if (entity.Email === null || entity.Email === undefined) { - throw new ValidationError(`The 'Email' property is required, provide a valid value`); - } - if (entity.Email?.length > 100) { - throw new ValidationError(`The 'Email' exceeds the maximum length of [100] characters`); - } - if (entity.Phone?.length > 20) { - throw new ValidationError(`The 'Phone' exceeds the maximum length of [20] characters`); - } - if (entity.Fax?.length > 20) { - throw new ValidationError(`The 'Fax' exceeds the maximum length of [20] characters`); - } - if (entity.Country === null || entity.Country === undefined) { - throw new ValidationError(`The 'Country' property is required, provide a valid value`); - } - if (entity.City === null || entity.City === undefined) { - throw new ValidationError(`The 'City' property is required, provide a valid value`); - } - if (entity.TIN?.length > 20) { - throw new ValidationError(`The 'TIN' exceeds the maximum length of [20] characters`); - } - if (entity.IBAN?.length > 36) { - throw new ValidationError(`The 'IBAN' exceeds the maximum length of [36] characters`); - } - for (const next of validationModules) { - next.validate(entity); - } - } - -} diff --git a/codbex-payments/gen/codbex-payments/dao/CustomerPayment/CustomerPaymentRepository.ts b/codbex-payments/gen/codbex-payments/dao/CustomerPayment/CustomerPaymentRepository.ts index 8ac3faf..900aacb 100644 --- a/codbex-payments/gen/codbex-payments/dao/CustomerPayment/CustomerPaymentRepository.ts +++ b/codbex-payments/gen/codbex-payments/dao/CustomerPayment/CustomerPaymentRepository.ts @@ -8,7 +8,7 @@ import { NumberGeneratorService } from "/codbex-number-generator/service/generat export interface CustomerPaymentEntity { readonly Id: number; - Customer?: number; + Customer: number; Date: Date; Valor: Date; CompanyIBAN?: string; @@ -26,7 +26,7 @@ export interface CustomerPaymentEntity { } export interface CustomerPaymentCreateEntity { - readonly Customer?: number; + readonly Customer: number; readonly Date: Date; readonly Valor: Date; readonly CompanyIBAN?: string; @@ -213,6 +213,7 @@ export class CustomerPaymentRepository { name: "Customer", column: "CUSTOMERPAYMENT_CUSTOMER", type: "INTEGER", + required: true }, { name: "Date", diff --git a/codbex-payments/gen/codbex-payments/dao/EmployeePayment/EmployeePaymentRepository.ts b/codbex-payments/gen/codbex-payments/dao/EmployeePayment/EmployeePaymentRepository.ts index fa3eb41..88ae4d6 100644 --- a/codbex-payments/gen/codbex-payments/dao/EmployeePayment/EmployeePaymentRepository.ts +++ b/codbex-payments/gen/codbex-payments/dao/EmployeePayment/EmployeePaymentRepository.ts @@ -8,6 +8,7 @@ import { NumberGeneratorService } from "/codbex-number-generator/service/generat export interface EmployeePaymentEntity { readonly Id: number; + Employee: number; Date: Date; Valor: Date; CompanyIBAN?: string; @@ -24,6 +25,7 @@ export interface EmployeePaymentEntity { } export interface EmployeePaymentCreateEntity { + readonly Employee: number; readonly Date: Date; readonly Valor: Date; readonly CompanyIBAN?: string; @@ -45,6 +47,7 @@ export interface EmployeePaymentEntityOptions { $filter?: { equals?: { Id?: number | number[]; + Employee?: number | number[]; Date?: Date | Date[]; Valor?: Date | Date[]; CompanyIBAN?: string | string[]; @@ -61,6 +64,7 @@ export interface EmployeePaymentEntityOptions { }; notEquals?: { Id?: number | number[]; + Employee?: number | number[]; Date?: Date | Date[]; Valor?: Date | Date[]; CompanyIBAN?: string | string[]; @@ -77,6 +81,7 @@ export interface EmployeePaymentEntityOptions { }; contains?: { Id?: number; + Employee?: number; Date?: Date; Valor?: Date; CompanyIBAN?: string; @@ -93,6 +98,7 @@ export interface EmployeePaymentEntityOptions { }; greaterThan?: { Id?: number; + Employee?: number; Date?: Date; Valor?: Date; CompanyIBAN?: string; @@ -109,6 +115,7 @@ export interface EmployeePaymentEntityOptions { }; greaterThanOrEqual?: { Id?: number; + Employee?: number; Date?: Date; Valor?: Date; CompanyIBAN?: string; @@ -125,6 +132,7 @@ export interface EmployeePaymentEntityOptions { }; lessThan?: { Id?: number; + Employee?: number; Date?: Date; Valor?: Date; CompanyIBAN?: string; @@ -141,6 +149,7 @@ export interface EmployeePaymentEntityOptions { }; lessThanOrEqual?: { Id?: number; + Employee?: number; Date?: Date; Valor?: Date; CompanyIBAN?: string; @@ -191,6 +200,12 @@ export class EmployeePaymentRepository { id: true, autoIncrement: true, }, + { + name: "Employee", + column: "EMPLOYEEPAYMENT_EMPLOYEE", + type: "INTEGER", + required: true + }, { name: "Date", column: "EMPLOYEEPAYMENT_DATE", diff --git a/codbex-payments/gen/codbex-payments/dao/PaymentRecord/PaymentRecordRepository.ts b/codbex-payments/gen/codbex-payments/dao/PaymentRecord/PaymentRecordRepository.ts index 3a8353a..c557eb4 100644 --- a/codbex-payments/gen/codbex-payments/dao/PaymentRecord/PaymentRecordRepository.ts +++ b/codbex-payments/gen/codbex-payments/dao/PaymentRecord/PaymentRecordRepository.ts @@ -21,6 +21,8 @@ export interface PaymentRecordEntity { UUID: string; Reference?: string; Deleted?: boolean; + DeletedAt?: Date; + DeletedReason?: string; } export interface PaymentRecordCreateEntity { @@ -38,6 +40,8 @@ export interface PaymentRecordCreateEntity { readonly Company?: number; readonly Reference?: string; readonly Deleted?: boolean; + readonly DeletedAt?: Date; + readonly DeletedReason?: string; } export interface PaymentRecordUpdateEntity extends PaymentRecordCreateEntity { @@ -63,6 +67,8 @@ export interface PaymentRecordEntityOptions { UUID?: string | string[]; Reference?: string | string[]; Deleted?: boolean | boolean[]; + DeletedAt?: Date | Date[]; + DeletedReason?: string | string[]; }; notEquals?: { Id?: number | number[]; @@ -81,6 +87,8 @@ export interface PaymentRecordEntityOptions { UUID?: string | string[]; Reference?: string | string[]; Deleted?: boolean | boolean[]; + DeletedAt?: Date | Date[]; + DeletedReason?: string | string[]; }; contains?: { Id?: number; @@ -99,6 +107,8 @@ export interface PaymentRecordEntityOptions { UUID?: string; Reference?: string; Deleted?: boolean; + DeletedAt?: Date; + DeletedReason?: string; }; greaterThan?: { Id?: number; @@ -117,6 +127,8 @@ export interface PaymentRecordEntityOptions { UUID?: string; Reference?: string; Deleted?: boolean; + DeletedAt?: Date; + DeletedReason?: string; }; greaterThanOrEqual?: { Id?: number; @@ -135,6 +147,8 @@ export interface PaymentRecordEntityOptions { UUID?: string; Reference?: string; Deleted?: boolean; + DeletedAt?: Date; + DeletedReason?: string; }; lessThan?: { Id?: number; @@ -153,6 +167,8 @@ export interface PaymentRecordEntityOptions { UUID?: string; Reference?: string; Deleted?: boolean; + DeletedAt?: Date; + DeletedReason?: string; }; lessThanOrEqual?: { Id?: number; @@ -171,6 +187,8 @@ export interface PaymentRecordEntityOptions { UUID?: string; Reference?: string; Deleted?: boolean; + DeletedAt?: Date; + DeletedReason?: string; }; }, $select?: (keyof PaymentRecordEntity)[], @@ -285,6 +303,16 @@ export class PaymentRecordRepository { name: "Deleted", column: "PAYMENTRECORD_DELETED", type: "BOOLEAN", + }, + { + name: "DeletedAt", + column: "PAYMENTRECORD_DELETEDAT", + type: "TIMESTAMP", + }, + { + name: "DeletedReason", + column: "PAYMENTRECORD_DELETEDREASON", + type: "VARCHAR", } ] }; diff --git a/codbex-payments/gen/codbex-payments/dao/SupplierPayment/SupplierPaymentRepository.ts b/codbex-payments/gen/codbex-payments/dao/SupplierPayment/SupplierPaymentRepository.ts index d5a7495..084af67 100644 --- a/codbex-payments/gen/codbex-payments/dao/SupplierPayment/SupplierPaymentRepository.ts +++ b/codbex-payments/gen/codbex-payments/dao/SupplierPayment/SupplierPaymentRepository.ts @@ -8,7 +8,7 @@ import { NumberGeneratorService } from "/codbex-number-generator/service/generat export interface SupplierPaymentEntity { readonly Id: number; - Supplier?: number; + Supplier: number; Date: Date; Valor: Date; CompanyIBAN?: string; @@ -25,7 +25,7 @@ export interface SupplierPaymentEntity { } export interface SupplierPaymentCreateEntity { - readonly Supplier?: number; + readonly Supplier: number; readonly Date: Date; readonly Valor: Date; readonly CompanyIBAN?: string; @@ -204,6 +204,7 @@ export class SupplierPaymentRepository { name: "Supplier", column: "SUPPLIERPAYMENT_SUPPLIER", type: "INTEGER", + required: true }, { name: "Date", diff --git a/codbex-payments/gen/codbex-payments/dao/Suppliers/Supplier.extensionpoint b/codbex-payments/gen/codbex-payments/dao/Suppliers/Supplier.extensionpoint deleted file mode 100644 index eec18c7..0000000 --- a/codbex-payments/gen/codbex-payments/dao/Suppliers/Supplier.extensionpoint +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "codbex-payments-Suppliers-Supplier", - "description": "Extension Point for the codbex-payments-Suppliers-Supplier entity" -} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/dao/Suppliers/SupplierRepository.ts b/codbex-payments/gen/codbex-payments/dao/Suppliers/SupplierRepository.ts deleted file mode 100644 index 730e2ae..0000000 --- a/codbex-payments/gen/codbex-payments/dao/Suppliers/SupplierRepository.ts +++ /dev/null @@ -1,323 +0,0 @@ -import { sql, query } from "@aerokit/sdk/db"; -import { producer } from "@aerokit/sdk/messaging"; -import { extensions } from "@aerokit/sdk/extensions"; -import { dao as daoApi } from "@aerokit/sdk/db"; - -export interface SupplierEntity { - readonly Id: number; - Name?: string; - Address?: string; - PostalCode?: string; - Email?: string; - Phone?: string; - Fax?: string; - Country?: number; - City?: number; - TIN?: string; - IBAN?: string; -} - -export interface SupplierCreateEntity { - readonly Name?: string; - readonly Address?: string; - readonly PostalCode?: string; - readonly Email?: string; - readonly Phone?: string; - readonly Fax?: string; - readonly Country?: number; - readonly City?: number; - readonly TIN?: string; - readonly IBAN?: string; -} - -export interface SupplierUpdateEntity extends SupplierCreateEntity { - readonly Id: number; -} - -export interface SupplierEntityOptions { - $filter?: { - equals?: { - Id?: number | number[]; - Name?: string | string[]; - Address?: string | string[]; - PostalCode?: string | string[]; - Email?: string | string[]; - Phone?: string | string[]; - Fax?: string | string[]; - Country?: number | number[]; - City?: number | number[]; - TIN?: string | string[]; - IBAN?: string | string[]; - }; - notEquals?: { - Id?: number | number[]; - Name?: string | string[]; - Address?: string | string[]; - PostalCode?: string | string[]; - Email?: string | string[]; - Phone?: string | string[]; - Fax?: string | string[]; - Country?: number | number[]; - City?: number | number[]; - TIN?: string | string[]; - IBAN?: string | string[]; - }; - contains?: { - Id?: number; - Name?: string; - Address?: string; - PostalCode?: string; - Email?: string; - Phone?: string; - Fax?: string; - Country?: number; - City?: number; - TIN?: string; - IBAN?: string; - }; - greaterThan?: { - Id?: number; - Name?: string; - Address?: string; - PostalCode?: string; - Email?: string; - Phone?: string; - Fax?: string; - Country?: number; - City?: number; - TIN?: string; - IBAN?: string; - }; - greaterThanOrEqual?: { - Id?: number; - Name?: string; - Address?: string; - PostalCode?: string; - Email?: string; - Phone?: string; - Fax?: string; - Country?: number; - City?: number; - TIN?: string; - IBAN?: string; - }; - lessThan?: { - Id?: number; - Name?: string; - Address?: string; - PostalCode?: string; - Email?: string; - Phone?: string; - Fax?: string; - Country?: number; - City?: number; - TIN?: string; - IBAN?: string; - }; - lessThanOrEqual?: { - Id?: number; - Name?: string; - Address?: string; - PostalCode?: string; - Email?: string; - Phone?: string; - Fax?: string; - Country?: number; - City?: number; - TIN?: string; - IBAN?: string; - }; - }, - $select?: (keyof SupplierEntity)[], - $sort?: string | (keyof SupplierEntity)[], - $order?: 'ASC' | 'DESC', - $offset?: number, - $limit?: number, - $language?: string -} - -export interface SupplierEntityEvent { - readonly operation: 'create' | 'update' | 'delete'; - readonly table: string; - readonly entity: Partial; - readonly key: { - name: string; - column: string; - value: number; - } -} - -export interface SupplierUpdateEntityEvent extends SupplierEntityEvent { - readonly previousEntity: SupplierEntity; -} - -export class SupplierRepository { - - private static readonly DEFINITION = { - table: "CODBEX_SUPPLIER", - properties: [ - { - name: "Id", - column: "SUPPLIER_ID", - type: "INTEGER", - id: true, - autoIncrement: true, - }, - { - name: "Name", - column: "SUPPLIER_NAME", - type: "VARCHAR", - }, - { - name: "Address", - column: "SUPPLIER_ADDRESS", - type: "VARCHAR", - }, - { - name: "PostalCode", - column: "SUPPLIER_POSTALCODE", - type: "VARCHAR", - }, - { - name: "Email", - column: "SUPPLIER_EMAIL", - type: "VARCHAR", - }, - { - name: "Phone", - column: "SUPPLIER_PHONE", - type: "VARCHAR", - }, - { - name: "Fax", - column: "SUPPLIER_FAX", - type: "VARCHAR", - }, - { - name: "Country", - column: "SUPPLIER_COUNTRY", - type: "INTEGER", - }, - { - name: "City", - column: "SUPPLIER_CITY", - type: "INTEGER", - }, - { - name: "TIN", - column: "SUPPLIER_TIN", - type: "VARCHAR", - }, - { - name: "IBAN", - column: "SUPPLIER_IBAN", - type: "VARCHAR", - } - ] - }; - - private readonly dao; - - constructor(dataSource = "DefaultDB") { - this.dao = daoApi.create(SupplierRepository.DEFINITION, undefined, dataSource); - } - - public findAll(options: SupplierEntityOptions = {}): SupplierEntity[] { - let list = this.dao.list(options); - return list; - } - - public findById(id: number, options: SupplierEntityOptions = {}): SupplierEntity | undefined { - const entity = this.dao.find(id); - return entity ?? undefined; - } - - public create(entity: SupplierCreateEntity): number { - const id = this.dao.insert(entity); - this.triggerEvent({ - operation: "create", - table: "CODBEX_SUPPLIER", - entity: entity, - key: { - name: "Id", - column: "SUPPLIER_ID", - value: id - } - }); - return id; - } - - public update(entity: SupplierUpdateEntity): void { - const previousEntity = this.findById(entity.Id); - this.dao.update(entity); - this.triggerEvent({ - operation: "update", - table: "CODBEX_SUPPLIER", - entity: entity, - previousEntity: previousEntity, - key: { - name: "Id", - column: "SUPPLIER_ID", - value: entity.Id - } - }); - } - - public upsert(entity: SupplierCreateEntity | SupplierUpdateEntity): number { - const id = (entity as SupplierUpdateEntity).Id; - if (!id) { - return this.create(entity); - } - - const existingEntity = this.findById(id); - if (existingEntity) { - this.update(entity as SupplierUpdateEntity); - return id; - } else { - return this.create(entity); - } - } - - public deleteById(id: number): void { - const entity = this.dao.find(id); - this.dao.remove(id); - this.triggerEvent({ - operation: "delete", - table: "CODBEX_SUPPLIER", - entity: entity, - key: { - name: "Id", - column: "SUPPLIER_ID", - value: id - } - }); - } - - public count(options?: SupplierEntityOptions): number { - return this.dao.count(options); - } - - public customDataCount(): number { - const resultSet = query.execute('SELECT COUNT(*) AS COUNT FROM "CODBEX_SUPPLIER"'); - if (resultSet !== null && resultSet[0] !== null) { - if (resultSet[0].COUNT !== undefined && resultSet[0].COUNT !== null) { - return resultSet[0].COUNT; - } else if (resultSet[0].count !== undefined && resultSet[0].count !== null) { - return resultSet[0].count; - } - } - return 0; - } - - private async triggerEvent(data: SupplierEntityEvent | SupplierUpdateEntityEvent) { - const triggerExtensions = await extensions.loadExtensionModules("codbex-payments-Suppliers-Supplier", ["trigger"]); - triggerExtensions.forEach(triggerExtension => { - try { - triggerExtension.trigger(data); - } catch (error) { - console.error(error); - } - }); - producer.topic("codbex-payments-Suppliers-Supplier").send(JSON.stringify(data)); - } -} diff --git a/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentEntity.ts b/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentEntity.ts index 0e75a36..964b4ee 100644 --- a/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentEntity.ts +++ b/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentEntity.ts @@ -18,7 +18,6 @@ export class CustomerPaymentEntity { @Column({ name: 'CUSTOMERPAYMENT_CUSTOMER', type: 'integer', - nullable: true, }) public Customer!: number; diff --git a/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentEntity.ts b/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentEntity.ts index 27c8a66..552834d 100644 --- a/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentEntity.ts +++ b/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentEntity.ts @@ -14,6 +14,13 @@ export class EmployeePaymentEntity { }) public Id?: number; + @Documentation('Employee') + @Column({ + name: 'EMPLOYEEPAYMENT_EMPLOYEE', + type: 'integer', + }) + public Employee!: number; + @Documentation('Date') @Column({ name: 'EMPLOYEEPAYMENT_DATE', diff --git a/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordEntity.ts b/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordEntity.ts index ea890a4..3e26043 100644 --- a/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordEntity.ts +++ b/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordEntity.ts @@ -140,6 +140,23 @@ export class PaymentRecordEntity { }) public Deleted?: boolean; + @Documentation('DeletedAt') + @Column({ + name: 'PAYMENTRECORD_DELETEDAT', + type: 'timestamp', + nullable: true, + }) + public DeletedAt?: Date; + + @Documentation('DeletedReason') + @Column({ + name: 'PAYMENTRECORD_DELETEDREASON', + type: 'string', + length: 255, + nullable: true, + }) + public DeletedReason?: string; + } (new PaymentRecordEntity()); diff --git a/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentEntity.ts b/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentEntity.ts index 1e2710d..18993b0 100644 --- a/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentEntity.ts +++ b/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentEntity.ts @@ -18,9 +18,8 @@ export class SupplierPaymentEntity { @Column({ name: 'SUPPLIERPAYMENT_SUPPLIER', type: 'integer', - nullable: true, }) - public Supplier?: number; + public Supplier!: number; @Documentation('Date') @Column({ diff --git a/codbex-payments/gen/codbex-payments/data/Suppliers/Supplier.extensionpoint b/codbex-payments/gen/codbex-payments/data/Suppliers/Supplier.extensionpoint deleted file mode 100644 index eec18c7..0000000 --- a/codbex-payments/gen/codbex-payments/data/Suppliers/Supplier.extensionpoint +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "codbex-payments-Suppliers-Supplier", - "description": "Extension Point for the codbex-payments-Suppliers-Supplier entity" -} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/data/Suppliers/SupplierEntity.ts b/codbex-payments/gen/codbex-payments/data/Suppliers/SupplierEntity.ts deleted file mode 100644 index ffb120e..0000000 --- a/codbex-payments/gen/codbex-payments/data/Suppliers/SupplierEntity.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { Entity, Table, Id, Generated, Column, Documentation, CreatedAt, CreatedBy, UpdatedAt, UpdatedBy} from '@aerokit/sdk/db' - -@Entity('SupplierEntity') -@Table('CODBEX_SUPPLIER') -@Documentation('Supplier entity mapping') -export class SupplierEntity { - - @Id() - @Generated('sequence') - @Documentation('Id') - @Column({ - name: 'SUPPLIER_ID', - type: 'integer', - }) - public Id?: number; - - @Documentation('Name') - @Column({ - name: 'SUPPLIER_NAME', - type: 'string', - length: 100, - nullable: true, - }) - public Name!: string; - - @Documentation('Address') - @Column({ - name: 'SUPPLIER_ADDRESS', - type: 'string', - length: 200, - nullable: true, - }) - public Address!: string; - - @Documentation('PostalCode') - @Column({ - name: 'SUPPLIER_POSTALCODE', - type: 'string', - length: 20, - nullable: true, - }) - public PostalCode?: string; - - @Documentation('Email') - @Column({ - name: 'SUPPLIER_EMAIL', - type: 'string', - length: 100, - nullable: true, - }) - public Email!: string; - - @Documentation('Phone') - @Column({ - name: 'SUPPLIER_PHONE', - type: 'string', - length: 20, - nullable: true, - }) - public Phone?: string; - - @Documentation('Fax') - @Column({ - name: 'SUPPLIER_FAX', - type: 'string', - length: 20, - nullable: true, - }) - public Fax?: string; - - @Documentation('Country') - @Column({ - name: 'SUPPLIER_COUNTRY', - type: 'integer', - nullable: true, - }) - public Country!: number; - - @Documentation('City') - @Column({ - name: 'SUPPLIER_CITY', - type: 'integer', - nullable: true, - }) - public City!: number; - - @Documentation('TIN') - @Column({ - name: 'SUPPLIER_TIN', - type: 'string', - length: 20, - nullable: true, - }) - public TIN?: string; - - @Documentation('IBAN') - @Column({ - name: 'SUPPLIER_IBAN', - type: 'string', - length: 36, - nullable: true, - }) - public IBAN?: string; - -} - -(new SupplierEntity()); diff --git a/codbex-payments/gen/codbex-payments/data/Suppliers/SupplierRepository.ts b/codbex-payments/gen/codbex-payments/data/Suppliers/SupplierRepository.ts deleted file mode 100644 index 83abe3c..0000000 --- a/codbex-payments/gen/codbex-payments/data/Suppliers/SupplierRepository.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Repository, EntityEvent, EntityConstructor } from '@aerokit/sdk/db' -import { Component } from '@aerokit/sdk/component' -import { Producer } from '@aerokit/sdk/messaging' -import { Extensions } from '@aerokit/sdk/extensions' -import { SupplierEntity } from './SupplierEntity' - -@Component('SupplierRepository') -export class SupplierRepository extends Repository { - - constructor() { - super((SupplierEntity as EntityConstructor)); - } - - protected override async triggerEvent(data: EntityEvent): Promise { - const triggerExtensions = await Extensions.loadExtensionModules('codbex-payments-Suppliers-Supplier', ['trigger']); - triggerExtensions.forEach(triggerExtension => { - try { - triggerExtension.trigger(data); - } catch (error) { - console.error(error); - } - }); - Producer.topic('codbex-payments-Suppliers-Supplier').send(JSON.stringify(data)); - } -} diff --git a/codbex-payments/gen/codbex-payments/schema/codbex-payments.schema b/codbex-payments/gen/codbex-payments/schema/codbex-payments.schema index 198e138..0589dcf 100644 --- a/codbex-payments/gen/codbex-payments/schema/codbex-payments.schema +++ b/codbex-payments/gen/codbex-payments/schema/codbex-payments.schema @@ -14,7 +14,6 @@ }, { "type": "INTEGER", - "nullable": true, "name": "CUSTOMERPAYMENT_CUSTOMER" }, { @@ -108,7 +107,6 @@ }, { "type": "INTEGER", - "nullable": true, "name": "SUPPLIERPAYMENT_SUPPLIER" }, { @@ -195,6 +193,10 @@ "nullable": true, "name": "EMPLOYEEPAYMENT_ID" }, + { + "type": "INTEGER", + "name": "EMPLOYEEPAYMENT_EMPLOYEE" + }, { "type": "DATE", "name": "EMPLOYEEPAYMENT_DATE" @@ -361,6 +363,17 @@ "type": "BOOLEAN", "nullable": true, "name": "PAYMENTRECORD_DELETED" + }, + { + "type": "TIMESTAMP", + "nullable": true, + "name": "PAYMENTRECORD_DELETEDAT" + }, + { + "type": "VARCHAR", + "length": 255, + "nullable": true, + "name": "PAYMENTRECORD_DELETEDREASON" } ] }, @@ -436,77 +449,6 @@ } ] }, - { - "name": "CODBEX_SUPPLIER", - "type": "TABLE", - "columns": [ - { - "type": "INTEGER", - "primaryKey": true, - "identity": true, - "nullable": true, - "name": "SUPPLIER_ID" - }, - { - "type": "VARCHAR", - "length": 100, - "nullable": true, - "name": "SUPPLIER_NAME" - }, - { - "type": "VARCHAR", - "length": 200, - "nullable": true, - "name": "SUPPLIER_ADDRESS" - }, - { - "type": "VARCHAR", - "length": 20, - "nullable": true, - "name": "SUPPLIER_POSTALCODE" - }, - { - "type": "VARCHAR", - "length": 100, - "nullable": true, - "name": "SUPPLIER_EMAIL" - }, - { - "type": "VARCHAR", - "length": 20, - "nullable": true, - "name": "SUPPLIER_PHONE" - }, - { - "type": "VARCHAR", - "length": 20, - "nullable": true, - "name": "SUPPLIER_FAX" - }, - { - "type": "INTEGER", - "nullable": true, - "name": "SUPPLIER_COUNTRY" - }, - { - "type": "INTEGER", - "nullable": true, - "name": "SUPPLIER_CITY" - }, - { - "type": "VARCHAR", - "length": 20, - "nullable": true, - "name": "SUPPLIER_TIN" - }, - { - "type": "VARCHAR", - "length": 36, - "nullable": true, - "name": "SUPPLIER_IBAN" - } - ] - }, { "name": "CODBEX_PAYMENTDIRECTION", "type": "TABLE", @@ -588,6 +530,15 @@ "referencedTable": "CODBEX_COMPANY", "referencedColumns": "COMPANY_ID" }, + { + "name": "EmployeePayment_Employee", + "type": "foreignKey", + "table": "CODBEX_EMPLOYEEPAYMENT", + "constraintName": "EmployeePayment_Employee", + "columns": "EMPLOYEEPAYMENT_EMPLOYEE", + "referencedTable": "CODBEX_EMPLOYEE", + "referencedColumns": "EMPLOYEE_ID" + }, { "name": "EmployeePayment_Currency", "type": "foreignKey", diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html index 805c767..363c880 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html @@ -74,7 +74,9 @@ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COMPANYIBAN' | t }}
- + @@ -94,7 +95,9 @@ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COUNTERPARTYIBAN' | t }}
- + @@ -114,7 +116,9 @@ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COUNTERPARTYNAME' | t }}
- + @@ -166,7 +169,9 @@ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_REASON' | t }}
- + @@ -186,7 +190,9 @@ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_DESCRIPTION' | t }}
- + @@ -251,7 +256,9 @@ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_REFERENCE' | t }}
- + diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html index 579b800..ea6ae3d 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html @@ -76,7 +76,9 @@ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COMPANYIBAN' | t }}
- + @@ -96,7 +97,9 @@ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COUNTERPARTYIBAN' | t }}
- + @@ -116,7 +118,9 @@ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COUNTERPARTYNAME' | t }}
- + @@ -172,7 +175,9 @@ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_REASON' | t }}
- + @@ -192,7 +196,9 @@ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_DESCRIPTION' | t }}
- + @@ -261,7 +266,9 @@ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_REFERENCE' | t }}
- + diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/controller.js b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/controller.js index 91a45e0..660ba10 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/controller.js @@ -139,6 +139,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer Dialogs.postMessage({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.entitySelected', data: { entity: entity, selectedMainEntityId: entity.Id, + optionsEmployee: $scope.optionsEmployee, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, }}); @@ -150,6 +151,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer Dialogs.postMessage({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.createEntity', data: { entity: {}, + optionsEmployee: $scope.optionsEmployee, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, }}); @@ -159,6 +161,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.action = 'update'; Dialogs.postMessage({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.updateEntity', data: { entity: $scope.selectedEntity, + optionsEmployee: $scope.optionsEmployee, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, }}); @@ -202,6 +205,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer id: 'EmployeePayment-filter', params: { entity: $scope.filterEntity, + optionsEmployee: $scope.optionsEmployee, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, }, @@ -209,10 +213,26 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }; //----------------Dropdowns-----------------// + $scope.optionsEmployee = []; $scope.optionsCurrency = []; $scope.optionsCompany = []; + $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts').then((response) => { + $scope.optionsEmployee = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Employee', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, @@ -243,6 +263,14 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); }); + $scope.optionsEmployeeValue = (optionKey) => { + for (let i = 0; i < $scope.optionsEmployee.length; i++) { + if ($scope.optionsEmployee[i].value === optionKey) { + return $scope.optionsEmployee[i].text; + } + } + return null; + }; $scope.optionsCurrencyValue = (optionKey) => { for (let i = 0; i < $scope.optionsCurrency.length; i++) { if ($scope.optionsCurrency[i].value === optionKey) { diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/controller.js b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/controller.js index 96dda7d..24e0489 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/controller.js @@ -22,6 +22,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.entity = params.entity ?? {}; $scope.selectedMainEntityKey = params.selectedMainEntityKey; $scope.selectedMainEntityId = params.selectedMainEntityId; + $scope.optionsEmployee = params.optionsEmployee; $scope.optionsCurrency = params.optionsCurrency; $scope.optionsCompany = params.optionsCompany; } @@ -40,6 +41,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Id', operator: 'EQ', value: entity.Id }; filter.$filter.conditions.push(condition); } + if (entity.Employee !== undefined) { + const condition = { propertyName: 'Employee', operator: 'EQ', value: entity.Employee }; + filter.$filter.conditions.push(condition); + } if (entity.DateFrom) { const condition = { propertyName: 'Date', operator: 'GE', value: entity.DateFrom }; filter.$filter.conditions.push(condition); diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/index.html b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/index.html index a7b1572..8cfd06b 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/index.html +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/index.html @@ -17,6 +17,21 @@ + +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_EMPLOYEE' | t }} +
+
+ + +
+
{{ 'codbex-payments:codbex-payments-model.defaults.from' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_DATE)'} }} diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/controller.js index aa66538..29a925d 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/controller.js @@ -40,6 +40,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.entity = params.entity; $scope.selectedMainEntityKey = params.selectedMainEntityKey; $scope.selectedMainEntityId = params.selectedMainEntityId; + $scope.optionsEmployee = params.optionsEmployee; $scope.optionsCurrency = params.optionsCurrency; $scope.optionsCompany = params.optionsCompany; } @@ -85,6 +86,24 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); }; + $scope.serviceEmployee = '/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts'; + + $scope.optionsEmployee = []; + + $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts').then((response) => { + $scope.optionsEmployee = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Employee', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); $scope.serviceCurrency = '/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts'; $scope.optionsCurrency = []; diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html index 2381369..cffcbf0 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html @@ -18,6 +18,23 @@ + +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_EMPLOYEE' | t }} +
+
+ + +
+
{{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_DATE' | t }} @@ -57,7 +74,9 @@ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COMPANYIBAN' | t }}
- + @@ -77,7 +95,9 @@ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COUNTERPARTYIBAN' | t }}
- + @@ -97,7 +116,9 @@ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COUNTERPARTYNAME' | t }}
- + @@ -149,7 +169,9 @@ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_REASON' | t }}
- + @@ -169,7 +190,9 @@ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_DESCRIPTION' | t }}
- + @@ -234,7 +256,9 @@ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_REFERENCE' | t }}
- + diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html index 33a6396..ad1b1fd 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html @@ -38,8 +38,9 @@ navigated="next.Id === selectedEntity.Id" ng-click="action == 'select' ? selectEntity(next) : ''"> + item-title="{{optionsEmployeeValue(next.Employee)}}"> + {{next.Date | date: "dd/MMM/yyyy"}} | {{next.Valor | date: "dd/MMM/yyyy"}} | {{next.CompanyIBAN}} | {{next.CounterpartyIBAN}} | diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/controller.js b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/controller.js index 75e2878..3e97e78 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/controller.js @@ -50,6 +50,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer Dialogs.addMessageListener({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.clearDetails', handler: () => { $scope.$evalAsync(() => { $scope.entity = {}; + $scope.optionsEmployee = []; $scope.optionsCurrency = []; $scope.optionsCompany = []; $scope.action = 'select'; @@ -64,6 +65,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer data.entity.Valor = new Date(data.entity.Valor); } $scope.entity = data.entity; + $scope.optionsEmployee = data.optionsEmployee; $scope.optionsCurrency = data.optionsCurrency; $scope.optionsCompany = data.optionsCompany; $scope.action = 'select'; @@ -72,6 +74,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer Dialogs.addMessageListener({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.createEntity', handler: (data) => { $scope.$evalAsync(() => { $scope.entity = {}; + $scope.optionsEmployee = data.optionsEmployee; $scope.optionsCurrency = data.optionsCurrency; $scope.optionsCompany = data.optionsCompany; $scope.action = 'create'; @@ -86,12 +89,14 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer data.entity.Valor = new Date(data.entity.Valor); } $scope.entity = data.entity; + $scope.optionsEmployee = data.optionsEmployee; $scope.optionsCurrency = data.optionsCurrency; $scope.optionsCompany = data.optionsCompany; $scope.action = 'update'; }); }}); + $scope.serviceEmployee = '/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts'; $scope.serviceCurrency = '/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts'; $scope.serviceCompany = '/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts'; @@ -151,6 +156,16 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); }; + $scope.createEmployee = () => { + Dialogs.showWindow({ + id: 'Employee-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; $scope.createCurrency = () => { Dialogs.showWindow({ id: 'Currency-details', @@ -178,6 +193,23 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer //----------------Dropdowns-----------------// + $scope.refreshEmployee = () => { + $scope.optionsEmployee = []; + $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts').then((response) => { + $scope.optionsEmployee = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Employee', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; $scope.refreshCurrency = () => { $scope.optionsCurrency = []; $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html index a71a711..8390676 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html @@ -16,6 +16,27 @@ + +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_EMPLOYEE' | t }} +
+
+ + +
+
+ + +
+
{{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_DATE' | t }} @@ -55,7 +76,9 @@ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COMPANYIBAN' | t }}
- + @@ -75,7 +97,9 @@ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COUNTERPARTYIBAN' | t }}
- + @@ -95,7 +118,9 @@ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COUNTERPARTYNAME' | t }}
- + @@ -151,7 +175,9 @@ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_REASON' | t }}
- + @@ -171,7 +196,9 @@ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_DESCRIPTION' | t }}
- + @@ -240,7 +266,9 @@ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_REFERENCE' | t }}
- + diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/index.html index 4038c6e..399b430 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/index.html @@ -106,7 +106,9 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_REASON' | t }}
- + diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/index.html index 58cb513..a4b4f3c 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/index.html @@ -112,7 +112,9 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_REASON' | t }}
- + diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/controller.js index 5d716a7..09b5ca7 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/controller.js @@ -109,6 +109,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (e.Valor) { e.Valor = new Date(e.Valor); } + if (e.DeletedAt) { + e.DeletedAt = new Date(e.DeletedAt); + } }); $scope.data = $scope.data.concat(response.data); diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/controller.js index c847905..499b400 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/controller.js @@ -19,6 +19,12 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle if (params?.entity?.ValorTo) { params.entity.ValorTo = new Date(params.entity.ValorTo); } + if (params?.entity?.DeletedAtFrom) { + params.entity.DeletedAtFrom = new Date(params.entity.DeletedAtFrom); + } + if (params?.entity?.DeletedAtTo) { + params.entity.DeletedAtTo = new Date(params.entity.DeletedAtTo); + } $scope.entity = params.entity ?? {}; $scope.selectedMainEntityKey = params.selectedMainEntityKey; $scope.selectedMainEntityId = params.selectedMainEntityId; @@ -110,6 +116,18 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Deleted', operator: 'EQ', value: entity.Deleted }; filter.$filter.conditions.push(condition); } + if (entity.DeletedAtFrom) { + const condition = { propertyName: 'DeletedAt', operator: 'GE', value: entity.DeletedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.DeletedAtTo) { + const condition = { propertyName: 'DeletedAt', operator: 'LE', value: entity.DeletedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.DeletedReason) { + const condition = { propertyName: 'DeletedReason', operator: 'LIKE', value: `%${entity.DeletedReason}%` }; + filter.$filter.conditions.push(condition); + } Dialogs.postMessage({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.entitySearch', data: { entity: entity, filter: filter diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html index 7e72e05..b6c72a7 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html @@ -278,6 +278,39 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETED' | t }}
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDREASON' | t }} +
+
+ + + + +
+
diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/controller.js index 9d620b1..b63e39f 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/controller.js @@ -37,6 +37,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (params.entity.Valor) { params.entity.Valor = new Date(params.entity.Valor); } + if (params.entity.DeletedAt) { + params.entity.DeletedAt = new Date(params.entity.DeletedAt); + } $scope.entity = params.entity; $scope.selectedMainEntityKey = params.selectedMainEntityKey; $scope.selectedMainEntityId = params.selectedMainEntityId; diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html index ecde131..83258ec 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html @@ -57,7 +57,9 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANYIBAN' | t }}
- + @@ -77,7 +78,9 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t }}
- + @@ -97,7 +99,9 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYNAME' | t }}
- + @@ -183,7 +186,9 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REASON' | t }}
- + @@ -203,7 +207,9 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DESCRIPTION' | t }}
- + @@ -254,7 +259,9 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REFERENCE' | t }}
- + @@ -281,6 +287,47 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETED' | t }}
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDREASON' | t }} +
+
+ + + + +
+
diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/index.html index d7cd2ea..fb0d226 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/index.html @@ -53,7 +53,9 @@ {{optionsCompanyValue(next.Company)}} | {{next.UUID}} | {{next.Reference}} | - {{next.Deleted}} + {{next.Deleted}} | + {{next.DeletedAt}} | + {{next.DeletedReason}} diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/controller.js index 1b56b13..5e416e0 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/controller.js @@ -65,6 +65,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (data.entity.Valor) { data.entity.Valor = new Date(data.entity.Valor); } + if (data.entity.DeletedAt) { + data.entity.DeletedAt = new Date(data.entity.DeletedAt); + } $scope.entity = data.entity; $scope.optionsCurrency = data.optionsCurrency; $scope.optionsPaymentDirection = data.optionsPaymentDirection; @@ -91,6 +94,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (data.entity.Valor) { data.entity.Valor = new Date(data.entity.Valor); } + if (data.entity.DeletedAt) { + data.entity.DeletedAt = new Date(data.entity.DeletedAt); + } $scope.entity = data.entity; $scope.optionsCurrency = data.optionsCurrency; $scope.optionsPaymentDirection = data.optionsPaymentDirection; diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html index 7b9ab94..d60c2c6 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html @@ -55,7 +55,9 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANYIBAN' | t }}
- + @@ -75,7 +76,9 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t }}
- + @@ -95,7 +97,9 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYNAME' | t }}
- + @@ -193,7 +196,9 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REASON' | t }}
- + @@ -213,7 +217,9 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DESCRIPTION' | t }}
- + @@ -268,7 +273,9 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REFERENCE' | t }}
- + @@ -295,6 +301,47 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETED' | t }}
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDREASON' | t }} +
+
+ + + + +
+
diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/controller.js b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/controller.js index 960e43e..448b44d 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/controller.js @@ -91,6 +91,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (e.Valor) { e.Valor = new Date(e.Valor); } + if (e.DeletedAt) { + e.DeletedAt = new Date(e.DeletedAt); + } }); $scope.data = response.data; diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/controller.js b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/controller.js index 5db3241..594d35b 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/controller.js @@ -19,6 +19,12 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle if (params?.entity?.ValorTo) { params.entity.ValorTo = new Date(params.entity.ValorTo); } + if (params?.entity?.DeletedAtFrom) { + params.entity.DeletedAtFrom = new Date(params.entity.DeletedAtFrom); + } + if (params?.entity?.DeletedAtTo) { + params.entity.DeletedAtTo = new Date(params.entity.DeletedAtTo); + } $scope.entity = params.entity ?? {}; $scope.selectedMainEntityKey = params.selectedMainEntityKey; $scope.selectedMainEntityId = params.selectedMainEntityId; @@ -110,6 +116,18 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Deleted', operator: 'EQ', value: entity.Deleted }; filter.$filter.conditions.push(condition); } + if (entity.DeletedAtFrom) { + const condition = { propertyName: 'DeletedAt', operator: 'GE', value: entity.DeletedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.DeletedAtTo) { + const condition = { propertyName: 'DeletedAt', operator: 'LE', value: entity.DeletedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.DeletedReason) { + const condition = { propertyName: 'DeletedReason', operator: 'LIKE', value: `%${entity.DeletedReason}%` }; + filter.$filter.conditions.push(condition); + } Dialogs.postMessage({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.entitySearch', data: { entity: entity, filter: filter diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/index.html b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/index.html index 8a5488c..17e4b9b 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/index.html +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/index.html @@ -273,6 +273,39 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETED' | t }}
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDREASON' | t }} +
+
+ + + + +
+
diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/controller.js b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/controller.js index 1423990..bc57e32 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/controller.js @@ -88,6 +88,18 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer const condition = { propertyName: 'Deleted', operator: 'EQ', value: entity.Deleted }; filter.$filter.conditions.push(condition); } + if (entity.DeletedAtFrom) { + const condition = { propertyName: 'DeletedAt', operator: 'GE', value: entity.DeletedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.DeletedAtTo) { + const condition = { propertyName: 'DeletedAt', operator: 'LE', value: entity.DeletedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.DeletedReason) { + const condition = { propertyName: 'DeletedReason', operator: 'LIKE', value: `%${entity.DeletedReason}%` }; + filter.$filter.conditions.push(condition); + } $scope.filter = filter; @@ -115,6 +127,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (e.Valor) { e.Valor = new Date(e.Valor); } + if (e.DeletedAt) { + e.DeletedAt = new Date(e.DeletedAt); + } }); $scope.data = response.data; diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html index 5efdaef..1b842c8 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html @@ -35,6 +35,8 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UUID' | t:'UUID' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REFERENCE' | t:'Reference' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETED' | t:'Deleted' }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDAT' | t:'DeletedAt' }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDREASON' | t:'DeletedReason' }} @@ -64,6 +66,8 @@ + {{next.DeletedAt}} + {{next.DeletedReason}} diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/controller.js index b09f472..1f29631 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/controller.js @@ -11,6 +11,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle if (params.entity.Valor) { params.entity.Valor = new Date(params.entity.Valor); } + if (params.entity.DeletedAt) { + params.entity.DeletedAt = new Date(params.entity.DeletedAt); + } $scope.entity = params.entity; $scope.optionsCurrency = params.optionsCurrency; $scope.optionsPaymentDirection = params.optionsPaymentDirection; diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html index b62ad59..49e914d 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html @@ -233,6 +233,36 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETED' | t }} + + +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDAT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDREASON' | t }} +
+
+ + +
diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/index.html b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/index.html index 528be82..ceb6022 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/index.html +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/index.html @@ -39,6 +39,8 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UUID' | t:'UUID' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REFERENCE' | t:'Reference' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETED' | t:'Deleted' }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDAT' | t:'DeletedAt' }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDREASON' | t:'DeletedReason' }} @@ -78,6 +80,8 @@ + {{next.DeletedAt}} + {{next.DeletedReason}} diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/index.html index 2847e95..e5fa2c8 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/index.html @@ -23,7 +23,9 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION_NAME' | t }}
- + diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/index.html index c67ea87..e0fce33 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/index.html @@ -23,7 +23,9 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTTYPE_NAME' | t }}
- + diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html index 7b7295a..92976b3 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html @@ -20,13 +20,13 @@
- {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_SUPPLIER' | t }} + {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_SUPPLIER' | t }}
{{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COMPANYIBAN' | t }}
- + @@ -94,7 +95,9 @@ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COUNTERPARTYIBAN' | t }}
- + @@ -114,7 +116,9 @@ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COUNTERPARTYNAME' | t }}
- + @@ -166,7 +169,9 @@ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_REASON' | t }}
- + @@ -186,7 +190,9 @@ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_DESCRIPTION' | t }}
- + @@ -251,7 +256,9 @@ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_REFERENCE' | t }}
- + diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html index 1b387b9..1b56224 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html @@ -18,13 +18,13 @@
- {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_SUPPLIER' | t }} + {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_SUPPLIER' | t }}
{{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COMPANYIBAN' | t }}
- + @@ -96,7 +97,9 @@ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COUNTERPARTYIBAN' | t }}
- + @@ -116,7 +118,9 @@ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COUNTERPARTYNAME' | t }}
- + @@ -172,7 +175,9 @@ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_REASON' | t }}
- + @@ -192,7 +196,9 @@ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_DESCRIPTION' | t }}
- + @@ -261,7 +266,9 @@ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_REFERENCE' | t }}
- + diff --git a/codbex-payments/translations/en-US/codbex-payments.model.json b/codbex-payments/translations/en-US/codbex-payments.model.json index 0eead0d..83c6602 100644 --- a/codbex-payments/translations/en-US/codbex-payments.model.json +++ b/codbex-payments/translations/en-US/codbex-payments.model.json @@ -24,7 +24,10 @@ "unableToLoad": "Unable to load data: '{{message}}'", "unableToLF": "Unable to list/filter {{name}}: '{{message}}'", "unableToCount": "Unable to count {{name}}: '{{message}}'", - "pattern": "The value doesn't match the required pattern: {{rule}}" + "pattern": "The value doesn't match the required pattern: {{rule}}", + "lengthMinMax": "Value must be between {{min}} and {{max}} characters long", + "lengthMin": "Value must not be less than {{min}} characters", + "lengthMax": "Value must not be more than {{max}} characters" }, "propertySuccessfullyCreated": "{{name}} successfully created", "propertySuccessfullyUpdated": "{{name}} successfully updated", @@ -98,6 +101,7 @@ "SUPPLIERPAYMENT_REFERENCE": "Reference", "EMPLOYEEPAYMENT": "EmployeePayment", "EMPLOYEEPAYMENT_ID": "Id", + "EMPLOYEEPAYMENT_EMPLOYEE": "Employee", "EMPLOYEEPAYMENT_DATE": "Date", "EMPLOYEEPAYMENT_VALOR": "Valor", "EMPLOYEEPAYMENT_COMPANYIBAN": "CompanyIBAN", @@ -128,6 +132,8 @@ "PAYMENTRECORD_UUID": "UUID", "PAYMENTRECORD_REFERENCE": "Reference", "PAYMENTRECORD_DELETED": "Deleted", + "PAYMENTRECORD_DELETEDAT": "DeletedAt", + "PAYMENTRECORD_DELETEDREASON": "DeletedReason", "CURRENCY": "Currency", "CURRENCY_ID": "Id", "CURRENCY_CODE": "Code", @@ -175,21 +181,35 @@ "PAYMENTADJUSTMENT_COMPANY": "Company", "PAYMENTADJUSTMENT_REASON": "Reason", "PAYMENTADJUSTMENT_UUID": "UUID", + "PAYMENTDIRECTION": "PaymentDirection", + "PAYMENTDIRECTION_ID": "Id", + "PAYMENTDIRECTION_NAME": "Name", + "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", "SUPPLIER": "Supplier", "SUPPLIER_ID": "Id", + "SUPPLIER_FIRSTNAME": "FirstName", + "SUPPLIER_LASTNAME": "LastName", + "SUPPLIER_LEGALENTITYNAME": "LegalEntityName", "SUPPLIER_NAME": "Name", - "SUPPLIER_ADDRESS": "Address", - "SUPPLIER_POSTALCODE": "PostalCode", "SUPPLIER_EMAIL": "Email", "SUPPLIER_PHONE": "Phone", "SUPPLIER_FAX": "Fax", - "SUPPLIER_COUNTRY": "Country", - "SUPPLIER_CITY": "City", "SUPPLIER_TIN": "TIN", "SUPPLIER_IBAN": "IBAN", - "PAYMENTDIRECTION": "PaymentDirection", - "PAYMENTDIRECTION_ID": "Id", - "PAYMENTDIRECTION_NAME": "Name", + "SUPPLIER_CREATEDAT": "CreatedAt", "CustomerPayment": "CustomerPayment", "SupplierPayment": "SupplierPayment", "PaymentRecord": "PaymentRecord",