diff --git a/codbex-payments/codbex-payments.edm b/codbex-payments/codbex-payments.edm index 9a50b61..acb1fc1 100644 --- a/codbex-payments/codbex-payments.edm +++ b/codbex-payments/codbex-payments.edm @@ -18,7 +18,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -146,7 +146,7 @@ - + @@ -171,5 +171,5 @@ - + \ No newline at end of file diff --git a/codbex-payments/codbex-payments.gen b/codbex-payments/codbex-payments.gen index 94120ec..0a8f6aa 100644 --- a/codbex-payments/codbex-payments.gen +++ b/codbex-payments/codbex-payments.gen @@ -33,6 +33,10 @@ "CustomerPayment-details", "CustomerPayment-details", "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", "CustomerPayment-details" ], "name": "CustomerPayment", @@ -43,7 +47,30 @@ }, "SupplierPayment": { "views": [ - "SupplierPayment" + "SupplierPayment", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details" ], "name": "SupplierPayment", "label": "SupplierPayment", @@ -72,6 +99,10 @@ "EmployeePayment-details", "EmployeePayment-details", "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", "EmployeePayment-details" ], "name": "EmployeePayment", @@ -82,7 +113,30 @@ }, "PaymentRecord": { "views": [ - "PaymentRecord" + "PaymentRecord", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details" ], "name": "PaymentRecord", "label": "PaymentRecord", @@ -144,7 +198,30 @@ }, "PaymentAdjustment": { "views": [ - "PaymentAdjustment" + "PaymentAdjustment", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details" ], "name": "PaymentAdjustment", "label": "PaymentAdjustment", @@ -1362,7 +1439,7 @@ "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", "importsCode": "import { NumberGeneratorService } from \"/codbex-number-generator/service/generator\";", - "layoutType": "MANAGE", + "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "supplierpayment", "menuLabel": "SupplierPayment", @@ -1393,420 +1470,9 @@ "Id" ], "primaryKeysString": "Id", - "hasDates": true, - "hasDropdowns": true - }, - { - "properties": [ - { - "dataAutoIncrement": true, - "dataName": "EMPLOYEEPAYMENT_ID", - "dataNullable": true, - "dataPrimaryKey": true, - "dataType": "INTEGER", - "description": "", - "name": "Id", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "Id", - "widgetDropdownUrl": "", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "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, - "widgetLabel": "Date", - "widgetDropdownUrl": "", - "dataTypeJava": "date", - "dataTypeTypescript": "Date", - "isDateType": true, - "inputRule": "" - }, - { - "dataName": "EMPLOYEEPAYMENT_VALOR", - "dataNullable": false, - "dataType": "DATE", - "description": "", - "isRequiredProperty": true, - "name": "Valor", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DATE", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "widgetLabel": "Valor", - "widgetDropdownUrl": "", - "dataTypeJava": "date", - "dataTypeTypescript": "Date", - "isDateType": true, - "inputRule": "" - }, - { - "dataLength": "34", - "dataName": "EMPLOYEEPAYMENT_COMPANYIBAN", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "CompanyIBAN", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "34", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "CompanyIBAN", - "widgetDropdownUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 34, - "inputRule": "" - }, - { - "dataLength": "34", - "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYIBAN", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "CounterpartyIBAN", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "34", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "CounterpartyIBAN", - "widgetDropdownUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 34, - "inputRule": "" - }, - { - "dataLength": "100", - "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYNAME", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "CounterpartyName", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "100", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "CounterpartyName", - "widgetDropdownUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 100, - "inputRule": "" - }, - { - "dataLength": "18", - "dataName": "EMPLOYEEPAYMENT_AMOUNT", - "dataNullable": false, - "dataPrecision": "16", - "dataScale": "2", - "dataType": "DECIMAL", - "description": "", - "isRequiredProperty": true, - "name": "Amount", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "NUMBER", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "widgetLabel": "Amount", - "widgetDropdownUrl": "", - "dataTypeJava": "double", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "dataName": "EMPLOYEEPAYMENT_CURRENCY", - "dataNullable": false, - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": true, - "name": "Currency", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Code", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "EmployeePayment_Currency", - "relationshipEntityName": "Currency", - "relationshipEntityPerspectiveName": "Currencies", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "widgetLabel": "Currency", - "widgetDropdownUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "dataLength": "100", - "dataName": "EMPLOYEEPAYMENT_REASON", - "dataNullable": false, - "dataType": "VARCHAR", - "description": "", - "isRequiredProperty": true, - "name": "Reason", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "100", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "widgetLabel": "Reason", - "widgetDropdownUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 100, - "inputRule": "" - }, - { - "dataLength": "100", - "dataName": "EMPLOYEEPAYMENT_DESCRIPTION", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "Description", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "100", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "Description", - "widgetDropdownUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 100, - "inputRule": "" - }, - { - "dataName": "EMPLOYEEPAYMENT_COMPANY", - "dataNullable": true, - "dataType": "INTEGER", - "description": "", - "name": "Company", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "EmployeePayment_Company", - "relationshipEntityName": "Company", - "relationshipEntityPerspectiveName": "Companies", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "Company", - "widgetDropdownUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(22)", - "dataLength": "20", - "dataName": "EMPLOYEEPAYMENT_NAME", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "isCalculatedProperty": true, - "name": "Name", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "widgetLabel": "Name", - "widgetDropdownUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, - "inputRule": "" - }, - { - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", - "dataLength": "36", - "dataName": "EMPLOYEEPAYMENT_UUID", - "dataNullable": false, - "dataType": "VARCHAR", - "dataUnique": true, - "description": "", - "isCalculatedProperty": true, - "name": "UUID", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "isRequiredProperty": false, - "widgetLabel": "UUID", - "widgetDropdownUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, - "inputRule": "" - }, - { - "dataLength": "36", - "dataName": "EMPLOYEEPAYMENT_REFERENCE", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "Reference", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "36", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "Reference", - "widgetDropdownUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 36, - "inputRule": "" - } - ], - "caption": "Manage entity EmployeePayment", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_EMPLOYEEPAYMENT\"", - "dataName": "EMPLOYEEPAYMENT", - "dataQuery": "", - "description": "Manage entity EmployeePayment", - "generateReport": "false", - "icon": "/services/web/resources/unicons/file.svg", - "importsCode": "import { NumberGeneratorService } from \"/codbex-number-generator/service/generator\";", - "layoutType": "MANAGE_MASTER", - "menuIndex": "100", - "menuKey": "employeepayment", - "menuLabel": "EmployeePayment", - "name": "EmployeePayment", - "navigationPath": "/Home", - "perspectiveIcon": "/services/web/resources/unicons/folder-check.svg", - "perspectiveLabel": "EmployeePayment", - "perspectiveName": "EmployeePayment", - "perspectiveOrder": "30", - "perspectiveRole": "", - "title": "EmployeePayment", - "tooltip": "EmployeePayment", - "type": "PRIMARY", - "dataSource": "DefaultDB", - "referencedProjections": [ - { - "name": "Currency", - "project": "codbex-currencies", - "genFolderName": "codbex-currencies" - }, - { - "name": "Company", - "project": "codbex-companies", - "genFolderName": "codbex-companies" - } - ], - "primaryKeys": [ - "Id" - ], - "primaryKeysString": "Id", - "masterProperties": { - "title": { - "dataName": "EMPLOYEEPAYMENT_DATE", + "masterProperties": { + "title": { + "dataName": "SUPPLIERPAYMENT_DATE", "dataNullable": false, "dataOrderBy": "DESC", "dataType": "DATE", @@ -1832,7 +1498,7 @@ }, "properties": [ { - "dataName": "EMPLOYEEPAYMENT_VALOR", + "dataName": "SUPPLIERPAYMENT_VALOR", "dataNullable": false, "dataType": "DATE", "description": "", @@ -1857,7 +1523,7 @@ }, { "dataLength": "34", - "dataName": "EMPLOYEEPAYMENT_COMPANYIBAN", + "dataName": "SUPPLIERPAYMENT_COMPANYIBAN", "dataNullable": true, "dataType": "VARCHAR", "description": "", @@ -1883,7 +1549,7 @@ }, { "dataLength": "34", - "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYIBAN", + "dataName": "SUPPLIERPAYMENT_COUNTERPARTYIBAN", "dataNullable": true, "dataType": "VARCHAR", "description": "", @@ -1909,7 +1575,7 @@ }, { "dataLength": "100", - "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYNAME", + "dataName": "SUPPLIERPAYMENT_COUNTERPARTYNAME", "dataNullable": true, "dataType": "VARCHAR", "description": "", @@ -1935,7 +1601,7 @@ }, { "dataLength": "18", - "dataName": "EMPLOYEEPAYMENT_AMOUNT", + "dataName": "SUPPLIERPAYMENT_AMOUNT", "dataNullable": false, "dataPrecision": "16", "dataScale": "2", @@ -1960,7 +1626,7 @@ "inputRule": "" }, { - "dataName": "EMPLOYEEPAYMENT_CURRENCY", + "dataName": "SUPPLIERPAYMENT_CURRENCY", "dataNullable": false, "dataType": "INTEGER", "description": "", @@ -1973,7 +1639,7 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "DROPDOWN", - "relationshipName": "EmployeePayment_Currency", + "relationshipName": "SupplierPayment_Currency", "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Currencies", "relationshipEntityPerspectiveLabel": "Entities", @@ -1990,7 +1656,7 @@ }, { "dataLength": "100", - "dataName": "EMPLOYEEPAYMENT_REASON", + "dataName": "SUPPLIERPAYMENT_REASON", "dataNullable": false, "dataType": "VARCHAR", "description": "", @@ -2016,7 +1682,7 @@ }, { "dataLength": "100", - "dataName": "EMPLOYEEPAYMENT_DESCRIPTION", + "dataName": "SUPPLIERPAYMENT_DESCRIPTION", "dataNullable": true, "dataType": "VARCHAR", "description": "", @@ -2041,7 +1707,7 @@ "inputRule": "" }, { - "dataName": "EMPLOYEEPAYMENT_COMPANY", + "dataName": "SUPPLIERPAYMENT_COMPANY", "dataNullable": true, "dataType": "INTEGER", "description": "", @@ -2053,7 +1719,7 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "DROPDOWN", - "relationshipName": "EmployeePayment_Company", + "relationshipName": "SupplierPayment_Company", "relationshipEntityName": "Company", "relationshipEntityPerspectiveName": "Companies", "relationshipEntityPerspectiveLabel": "Entities", @@ -2070,9 +1736,9 @@ "inputRule": "" }, { - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(22)", + "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(21)", "dataLength": "20", - "dataName": "EMPLOYEEPAYMENT_NAME", + "dataName": "SUPPLIERPAYMENT_NAME", "dataNullable": true, "dataType": "VARCHAR", "description": "", @@ -2099,7 +1765,7 @@ { "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", "dataLength": "36", - "dataName": "EMPLOYEEPAYMENT_UUID", + "dataName": "SUPPLIERPAYMENT_UUID", "dataNullable": false, "dataType": "VARCHAR", "dataUnique": true, @@ -2125,14 +1791,14 @@ }, { "dataLength": "36", - "dataName": "EMPLOYEEPAYMENT_REFERENCE", + "dataName": "SUPPLIERPAYMENT_REFERENCE", "dataNullable": true, "dataType": "VARCHAR", "description": "", "name": "Reference", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "36", + "widgetLength": "20", "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": false, @@ -2146,7 +1812,7 @@ "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, - "maxLength": 36, + "maxLength": 20, "inputRule": "" } ] @@ -2158,7 +1824,7 @@ "properties": [ { "dataAutoIncrement": true, - "dataName": "PAYMENTRECORD_ID", + "dataName": "EMPLOYEEPAYMENT_ID", "dataNullable": true, "dataPrimaryKey": true, "dataType": "INTEGER", @@ -2180,7 +1846,7 @@ "inputRule": "" }, { - "dataName": "PAYMENTRECORD_DATE", + "dataName": "EMPLOYEEPAYMENT_DATE", "dataNullable": false, "dataOrderBy": "DESC", "dataType": "DATE", @@ -2205,7 +1871,7 @@ "inputRule": "" }, { - "dataName": "PAYMENTRECORD_VALOR", + "dataName": "EMPLOYEEPAYMENT_VALOR", "dataNullable": false, "dataType": "DATE", "description": "", @@ -2230,7 +1896,7 @@ }, { "dataLength": "34", - "dataName": "PAYMENTRECORD_COMPANYIBAN", + "dataName": "EMPLOYEEPAYMENT_COMPANYIBAN", "dataNullable": true, "dataType": "VARCHAR", "description": "", @@ -2256,7 +1922,7 @@ }, { "dataLength": "34", - "dataName": "PAYMENTRECORD_COUNTERPARTYIBAN", + "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYIBAN", "dataNullable": true, "dataType": "VARCHAR", "description": "", @@ -2282,14 +1948,14 @@ }, { "dataLength": "100", - "dataName": "PAYMENTRECORD_COUNTERPARTYNAME", + "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYNAME", "dataNullable": true, "dataType": "VARCHAR", "description": "", "name": "CounterpartyName", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "20", + "widgetLength": "100", "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": false, @@ -2303,28 +1969,28 @@ "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, - "maxLength": 20, + "maxLength": 100, "inputRule": "" }, { "dataLength": "18", - "dataName": "PAYMENTRECORD_AMOUNT", - "dataNullable": true, + "dataName": "EMPLOYEEPAYMENT_AMOUNT", + "dataNullable": false, "dataPrecision": "16", "dataScale": "2", "dataType": "DECIMAL", "description": "", + "isRequiredProperty": true, "name": "Amount", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "", "widgetType": "NUMBER", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "widgetLabel": "Amount", "widgetDropdownUrl": "", @@ -2333,10 +1999,11 @@ "inputRule": "" }, { - "dataName": "PAYMENTRECORD_CURRENCY", - "dataNullable": true, + "dataName": "EMPLOYEEPAYMENT_CURRENCY", + "dataNullable": false, "dataType": "INTEGER", "description": "", + "isRequiredProperty": true, "name": "Currency", "tooltip": "", "widgetDropDownKey": "Id", @@ -2345,15 +2012,14 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "DROPDOWN", - "relationshipName": "PaymentRecord_Currency", + "relationshipName": "EmployeePayment_Currency", "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Currencies", "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "widgetLabel": "Currency", "widgetDropdownUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts", @@ -2363,40 +2029,40 @@ }, { "dataLength": "100", - "dataName": "PAYMENTRECORD_REASON", - "dataNullable": true, + "dataName": "EMPLOYEEPAYMENT_REASON", + "dataNullable": false, "dataType": "VARCHAR", "description": "", + "isRequiredProperty": true, "name": "Reason", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "20", + "widgetLength": "100", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "widgetLabel": "Reason", "widgetDropdownUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, - "maxLength": 20, + "maxLength": 100, "inputRule": "" }, { "dataLength": "100", - "dataName": "PAYMENTRECORD_DESCRIPTION", + "dataName": "EMPLOYEEPAYMENT_DESCRIPTION", "dataNullable": true, "dataType": "VARCHAR", "description": "", "name": "Description", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "20", + "widgetLength": "100", "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": false, @@ -2410,11 +2076,11 @@ "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, - "maxLength": 20, + "maxLength": 100, "inputRule": "" }, { - "dataName": "PAYMENTRECORD_COMPANY", + "dataName": "EMPLOYEEPAYMENT_COMPANY", "dataNullable": true, "dataType": "INTEGER", "description": "", @@ -2426,7 +2092,7 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "DROPDOWN", - "relationshipName": "PaymentRecord_Company", + "relationshipName": "EmployeePayment_Company", "relationshipEntityName": "Company", "relationshipEntityPerspectiveName": "Companies", "relationshipEntityPerspectiveLabel": "Entities", @@ -2443,96 +2109,36 @@ "inputRule": "" }, { - "dataName": "PAYMENTRECORD_PAYMENTRECORDDIRECTION", + "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(22)", + "dataLength": "20", + "dataName": "EMPLOYEEPAYMENT_NAME", "dataNullable": true, - "dataType": "INTEGER", + "dataType": "VARCHAR", "description": "", - "name": "PaymentRecordDirection", + "isCalculatedProperty": true, + "name": "Name", "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "PaymentRecord_PaymentRecordDirection", - "relationshipEntityName": "PaymentRecordDirection", - "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "PaymentRecordDirection", - "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentRecordDirectionService.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "dataName": "PAYMENTRECORD_PAYMENTSTATUS", - "dataNullable": true, - "dataType": "INTEGER", - "description": "", - "name": "PaymentStatus", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "PaymentRecord_PaymentStatus", - "relationshipEntityName": "PaymentStatus", - "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "PaymentStatus", - "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentStatusService.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "dataName": "PAYMENTRECORD_PAYMENTTYPE", - "dataNullable": true, - "dataType": "INTEGER", - "description": "", - "name": "PaymentType", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "PaymentRecord_PaymentType", - "relationshipEntityName": "PaymentType", - "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", + "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "PaymentType", - "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeService.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", + "widgetLabel": "Name", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 20, "inputRule": "" }, { "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", "dataLength": "36", - "dataName": "PAYMENTRECORD_UUID", + "dataName": "EMPLOYEEPAYMENT_UUID", "dataNullable": false, "dataType": "VARCHAR", "dataUnique": true, @@ -2558,7 +2164,7 @@ }, { "dataLength": "36", - "dataName": "PAYMENTRECORD_REFERENCE", + "dataName": "EMPLOYEEPAYMENT_REFERENCE", "dataNullable": true, "dataType": "VARCHAR", "description": "", @@ -2581,51 +2187,29 @@ "minLength": 0, "maxLength": 36, "inputRule": "" - }, - { - "dataName": "PAYMENTRECORD_DELETED", - "dataNullable": true, - "dataType": "BOOLEAN", - "description": "", - "name": "Deleted", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "CHECKBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "Deleted", - "widgetDropdownUrl": "", - "dataTypeJava": "boolean", - "dataTypeTypescript": "boolean", - "inputRule": "" } ], - "caption": "Manage entity PaymentRecord", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_PAYMENTRECORD\"", - "dataName": "PAYMENTRECORD", + "caption": "Manage entity EmployeePayment", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_EMPLOYEEPAYMENT\"", + "dataName": "EMPLOYEEPAYMENT", "dataQuery": "", - "description": "Manage entity PaymentRecord", - "generateReport": "true", + "description": "Manage entity EmployeePayment", + "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", - "layoutType": "MANAGE", + "importsCode": "import { NumberGeneratorService } from \"/codbex-number-generator/service/generator\";", + "layoutType": "MANAGE_MASTER", "menuIndex": "100", - "menuKey": "paymentrecord", - "menuLabel": "PaymentRecord", - "name": "PaymentRecord", + "menuKey": "employeepayment", + "menuLabel": "EmployeePayment", + "name": "EmployeePayment", "navigationPath": "/Home", - "perspectiveIcon": "/services/web/resources/unicons/align-justify.svg", - "perspectiveLabel": "PaymentRecord", - "perspectiveName": "PaymentRecord", - "perspectiveOrder": "40", + "perspectiveIcon": "/services/web/resources/unicons/folder-check.svg", + "perspectiveLabel": "EmployeePayment", + "perspectiveName": "EmployeePayment", + "perspectiveOrder": "30", "perspectiveRole": "", - "title": "PaymentRecord", - "tooltip": "PaymentRecord", + "title": "EmployeePayment", + "tooltip": "EmployeePayment", "type": "PRIMARY", "dataSource": "DefaultDB", "referencedProjections": [ @@ -2644,6 +2228,1276 @@ "Id" ], "primaryKeysString": "Id", + "masterProperties": { + "title": { + "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, + "widgetLabel": "Date", + "widgetDropdownUrl": "", + "dataTypeJava": "date", + "dataTypeTypescript": "Date", + "isDateType": true, + "inputRule": "" + }, + "properties": [ + { + "dataName": "EMPLOYEEPAYMENT_VALOR", + "dataNullable": false, + "dataType": "DATE", + "description": "", + "isRequiredProperty": true, + "name": "Valor", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "widgetLabel": "Valor", + "widgetDropdownUrl": "", + "dataTypeJava": "date", + "dataTypeTypescript": "Date", + "isDateType": true, + "inputRule": "" + }, + { + "dataLength": "34", + "dataName": "EMPLOYEEPAYMENT_COMPANYIBAN", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CompanyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "CompanyIBAN", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 34, + "inputRule": "" + }, + { + "dataLength": "34", + "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYIBAN", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "CounterpartyIBAN", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 34, + "inputRule": "" + }, + { + "dataLength": "100", + "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "CounterpartyName", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "dataLength": "18", + "dataName": "EMPLOYEEPAYMENT_AMOUNT", + "dataNullable": false, + "dataPrecision": "16", + "dataScale": "2", + "dataType": "DECIMAL", + "description": "", + "isRequiredProperty": true, + "name": "Amount", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "NUMBER", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "widgetLabel": "Amount", + "widgetDropdownUrl": "", + "dataTypeJava": "double", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "dataName": "EMPLOYEEPAYMENT_CURRENCY", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "EmployeePayment_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Currencies", + "relationshipEntityPerspectiveLabel": "Entities", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "widgetLabel": "Currency", + "widgetDropdownUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "dataLength": "100", + "dataName": "EMPLOYEEPAYMENT_REASON", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "Reason", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "widgetLabel": "Reason", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "dataLength": "100", + "dataName": "EMPLOYEEPAYMENT_DESCRIPTION", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Description", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Description", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "dataName": "EMPLOYEEPAYMENT_COMPANY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "EmployeePayment_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Entities", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Company", + "widgetDropdownUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(22)", + "dataLength": "20", + "dataName": "EMPLOYEEPAYMENT_NAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": true, + "name": "Name", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "widgetLabel": "Name", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "dataLength": "36", + "dataName": "EMPLOYEEPAYMENT_UUID", + "dataNullable": false, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isCalculatedProperty": true, + "name": "UUID", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isRequiredProperty": false, + "widgetLabel": "UUID", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "dataLength": "36", + "dataName": "EMPLOYEEPAYMENT_REFERENCE", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Reference", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "36", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Reference", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 36, + "inputRule": "" + } + ] + }, + "hasDates": true, + "hasDropdowns": true + }, + { + "properties": [ + { + "dataAutoIncrement": true, + "dataName": "PAYMENTRECORD_ID", + "dataNullable": true, + "dataPrimaryKey": true, + "dataType": "INTEGER", + "description": "", + "name": "Id", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Id", + "widgetDropdownUrl": "", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "dataName": "PAYMENTRECORD_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, + "widgetLabel": "Date", + "widgetDropdownUrl": "", + "dataTypeJava": "date", + "dataTypeTypescript": "Date", + "isDateType": true, + "inputRule": "" + }, + { + "dataName": "PAYMENTRECORD_VALOR", + "dataNullable": false, + "dataType": "DATE", + "description": "", + "isRequiredProperty": true, + "name": "Valor", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "widgetLabel": "Valor", + "widgetDropdownUrl": "", + "dataTypeJava": "date", + "dataTypeTypescript": "Date", + "isDateType": true, + "inputRule": "" + }, + { + "dataLength": "34", + "dataName": "PAYMENTRECORD_COMPANYIBAN", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CompanyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "CompanyIBAN", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 34, + "inputRule": "" + }, + { + "dataLength": "34", + "dataName": "PAYMENTRECORD_COUNTERPARTYIBAN", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "CounterpartyIBAN", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 34, + "inputRule": "" + }, + { + "dataLength": "100", + "dataName": "PAYMENTRECORD_COUNTERPARTYNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "CounterpartyName", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "dataLength": "18", + "dataName": "PAYMENTRECORD_AMOUNT", + "dataNullable": true, + "dataPrecision": "16", + "dataScale": "2", + "dataType": "DECIMAL", + "description": "", + "name": "Amount", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "NUMBER", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Amount", + "widgetDropdownUrl": "", + "dataTypeJava": "double", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "dataName": "PAYMENTRECORD_CURRENCY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Currencies", + "relationshipEntityPerspectiveLabel": "Entities", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Currency", + "widgetDropdownUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "dataLength": "100", + "dataName": "PAYMENTRECORD_REASON", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Reason", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Reason", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "dataLength": "100", + "dataName": "PAYMENTRECORD_DESCRIPTION", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Description", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Description", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "dataName": "PAYMENTRECORD_COMPANY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Entities", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Company", + "widgetDropdownUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "dataName": "PAYMENTRECORD_PAYMENTRECORDDIRECTION", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "PaymentRecordDirection", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_PaymentRecordDirection", + "relationshipEntityName": "PaymentRecordDirection", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Entities", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "PaymentRecordDirection", + "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentRecordDirectionService.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "dataName": "PAYMENTRECORD_PAYMENTSTATUS", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "PaymentStatus", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_PaymentStatus", + "relationshipEntityName": "PaymentStatus", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Entities", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "PaymentStatus", + "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentStatusService.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "dataName": "PAYMENTRECORD_PAYMENTTYPE", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "PaymentType", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_PaymentType", + "relationshipEntityName": "PaymentType", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Entities", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "PaymentType", + "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeService.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "dataLength": "36", + "dataName": "PAYMENTRECORD_UUID", + "dataNullable": false, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isCalculatedProperty": true, + "name": "UUID", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isRequiredProperty": false, + "widgetLabel": "UUID", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "dataLength": "36", + "dataName": "PAYMENTRECORD_REFERENCE", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Reference", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "36", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Reference", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 36, + "inputRule": "" + }, + { + "dataName": "PAYMENTRECORD_DELETED", + "dataNullable": true, + "dataType": "BOOLEAN", + "description": "", + "name": "Deleted", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "CHECKBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Deleted", + "widgetDropdownUrl": "", + "dataTypeJava": "boolean", + "dataTypeTypescript": "boolean", + "inputRule": "" + } + ], + "caption": "Manage entity PaymentRecord", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_PAYMENTRECORD\"", + "dataName": "PAYMENTRECORD", + "dataQuery": "", + "description": "Manage entity PaymentRecord", + "generateReport": "true", + "icon": "/services/web/resources/unicons/file.svg", + "layoutType": "MANAGE_MASTER", + "menuIndex": "100", + "menuKey": "paymentrecord", + "menuLabel": "PaymentRecord", + "name": "PaymentRecord", + "navigationPath": "/Home", + "perspectiveIcon": "/services/web/resources/unicons/align-justify.svg", + "perspectiveLabel": "PaymentRecord", + "perspectiveName": "PaymentRecord", + "perspectiveOrder": "40", + "perspectiveRole": "", + "title": "PaymentRecord", + "tooltip": "PaymentRecord", + "type": "PRIMARY", + "dataSource": "DefaultDB", + "referencedProjections": [ + { + "name": "Currency", + "project": "codbex-currencies", + "genFolderName": "codbex-currencies" + }, + { + "name": "Company", + "project": "codbex-companies", + "genFolderName": "codbex-companies" + } + ], + "primaryKeys": [ + "Id" + ], + "primaryKeysString": "Id", + "masterProperties": { + "title": { + "dataName": "PAYMENTRECORD_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, + "widgetLabel": "Date", + "widgetDropdownUrl": "", + "dataTypeJava": "date", + "dataTypeTypescript": "Date", + "isDateType": true, + "inputRule": "" + }, + "properties": [ + { + "dataName": "PAYMENTRECORD_VALOR", + "dataNullable": false, + "dataType": "DATE", + "description": "", + "isRequiredProperty": true, + "name": "Valor", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "widgetLabel": "Valor", + "widgetDropdownUrl": "", + "dataTypeJava": "date", + "dataTypeTypescript": "Date", + "isDateType": true, + "inputRule": "" + }, + { + "dataLength": "34", + "dataName": "PAYMENTRECORD_COMPANYIBAN", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CompanyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "CompanyIBAN", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 34, + "inputRule": "" + }, + { + "dataLength": "34", + "dataName": "PAYMENTRECORD_COUNTERPARTYIBAN", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "CounterpartyIBAN", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 34, + "inputRule": "" + }, + { + "dataLength": "100", + "dataName": "PAYMENTRECORD_COUNTERPARTYNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "CounterpartyName", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "dataLength": "18", + "dataName": "PAYMENTRECORD_AMOUNT", + "dataNullable": true, + "dataPrecision": "16", + "dataScale": "2", + "dataType": "DECIMAL", + "description": "", + "name": "Amount", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "NUMBER", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Amount", + "widgetDropdownUrl": "", + "dataTypeJava": "double", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "dataName": "PAYMENTRECORD_CURRENCY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Currencies", + "relationshipEntityPerspectiveLabel": "Entities", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Currency", + "widgetDropdownUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "dataLength": "100", + "dataName": "PAYMENTRECORD_REASON", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Reason", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Reason", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "dataLength": "100", + "dataName": "PAYMENTRECORD_DESCRIPTION", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Description", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Description", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "dataName": "PAYMENTRECORD_COMPANY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Entities", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Company", + "widgetDropdownUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "dataName": "PAYMENTRECORD_PAYMENTRECORDDIRECTION", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "PaymentRecordDirection", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_PaymentRecordDirection", + "relationshipEntityName": "PaymentRecordDirection", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Entities", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "PaymentRecordDirection", + "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentRecordDirectionService.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "dataName": "PAYMENTRECORD_PAYMENTSTATUS", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "PaymentStatus", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_PaymentStatus", + "relationshipEntityName": "PaymentStatus", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Entities", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "PaymentStatus", + "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentStatusService.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "dataName": "PAYMENTRECORD_PAYMENTTYPE", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "PaymentType", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_PaymentType", + "relationshipEntityName": "PaymentType", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Entities", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "PaymentType", + "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeService.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "dataLength": "36", + "dataName": "PAYMENTRECORD_UUID", + "dataNullable": false, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isCalculatedProperty": true, + "name": "UUID", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isRequiredProperty": false, + "widgetLabel": "UUID", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "dataLength": "36", + "dataName": "PAYMENTRECORD_REFERENCE", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Reference", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "36", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Reference", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 36, + "inputRule": "" + }, + { + "dataName": "PAYMENTRECORD_DELETED", + "dataNullable": true, + "dataType": "BOOLEAN", + "description": "", + "name": "Deleted", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "CHECKBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Deleted", + "widgetDropdownUrl": "", + "dataTypeJava": "boolean", + "dataTypeTypescript": "boolean", + "inputRule": "" + } + ] + }, "hasDates": true, "hasDropdowns": true }, @@ -4066,7 +4920,7 @@ "description": "Manage entity PaymentAdjustment", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", - "layoutType": "MANAGE", + "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "paymentadjustment", "menuLabel": "PaymentAdjustment", @@ -4097,6 +4951,195 @@ "Id" ], "primaryKeysString": "Id", + "masterProperties": { + "title": { + "dataName": "PAYMENTADJUSTMENT_DATE", + "dataNullable": true, + "dataType": "DATE", + "description": "", + "isRequiredProperty": true, + "name": "Date", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "widgetLabel": "Date", + "widgetDropdownUrl": "", + "dataTypeJava": "date", + "dataTypeTypescript": "Date", + "isDateType": true, + "inputRule": "" + }, + "properties": [ + { + "dataName": "PAYMENTADJUSTMENT_VALOR", + "dataNullable": true, + "dataType": "DATE", + "description": "", + "isRequiredProperty": true, + "name": "Valor", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "widgetLabel": "Valor", + "widgetDropdownUrl": "", + "dataTypeJava": "date", + "dataTypeTypescript": "Date", + "isDateType": true, + "inputRule": "" + }, + { + "dataLength": "18", + "dataName": "PAYMENTADJUSTMENT_AMOUNT", + "dataNullable": true, + "dataPrecision": "16", + "dataScale": "2", + "dataType": "DECIMAL", + "description": "", + "isRequiredProperty": true, + "name": "Amount", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "NUMBER", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "widgetLabel": "Amount", + "widgetDropdownUrl": "", + "dataTypeJava": "double", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "dataName": "PAYMENTADJUSTMENT_CURRENCY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentAdjustment_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Currencies", + "relationshipEntityPerspectiveLabel": "Entities", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "widgetLabel": "Currency", + "widgetDropdownUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "dataName": "PAYMENTADJUSTMENT_COMPANY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentAdjustment_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Entities", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "widgetLabel": "Company", + "widgetDropdownUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + }, + { + "dataLength": "100", + "dataName": "PAYMENTADJUSTMENT_REASON", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Reason", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "Reason", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "dataLength": "36", + "dataName": "PAYMENTADJUSTMENT_UUID", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": true, + "name": "UUID", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "widgetLabel": "UUID", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + } + ] + }, "hasDates": true, "hasDropdowns": true } diff --git a/codbex-payments/codbex-payments.model b/codbex-payments/codbex-payments.model index 92e7338..7036bea 100644 --- a/codbex-payments/codbex-payments.model +++ b/codbex-payments/codbex-payments.model @@ -483,7 +483,7 @@ "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", "importsCode": "aW1wb3J0IHsgTnVtYmVyR2VuZXJhdG9yU2VydmljZSB9IGZyb20gIi9jb2RiZXgtbnVtYmVyLWdlbmVyYXRvci9zZXJ2aWNlL2dlbmVyYXRvciI7", - "layoutType": "MANAGE", + "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "supplierpayment", "menuLabel": "SupplierPayment", @@ -990,7 +990,7 @@ "description": "Manage entity PaymentRecord", "generateReport": "true", "icon": "/services/web/resources/unicons/file.svg", - "layoutType": "MANAGE", + "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "paymentrecord", "menuLabel": "PaymentRecord", @@ -1866,7 +1866,7 @@ "description": "Manage entity PaymentAdjustment", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", - "layoutType": "MANAGE", + "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "paymentadjustment", "menuLabel": "PaymentAdjustment", diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/view.extension b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/view.extension index a72a3fa..56f9800 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/view.extension +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/view.extension @@ -1,5 +1,5 @@ { "module": "codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/view.js", - "extensionPoint": "codbex-payments-dialog-window", + "extensionPoint": "dialog-window", "description": "codbex-payments - Application Dialog Window" } \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/controller.js new file mode 100644 index 0000000..66faec3 --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/controller.js @@ -0,0 +1,127 @@ +angular.module('page', ["ideUI", "ideView", "entityApi"]) + .config(["messageHubProvider", function (messageHubProvider) { + messageHubProvider.eventIdPrefix = 'codbex-payments.CustomerPayment.CustomerPayment'; + }]) + .config(["entityApiProvider", function (entityApiProvider) { + entityApiProvider.baseUrl = "/services/ts/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentService.ts"; + }]) + .controller('PageController', ['$scope', '$http', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, $http, messageHub, ViewParameters, entityApi) { + + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: "CustomerPayment Details", + create: "Create CustomerPayment", + update: "Update CustomerPayment" + }; + $scope.action = 'select'; + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + $scope.action = params.action; + if (params.entity.Date) { + params.entity.Date = new Date(params.entity.Date); + } + if (params.entity.Valor) { + params.entity.Valor = new Date(params.entity.Valor); + } + $scope.entity = params.entity; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + $scope.optionsCustomer = params.optionsCustomer; + $scope.optionsCurrency = params.optionsCurrency; + $scope.optionsCompany = params.optionsCompany; + $scope.optionsPaymentMethod = params.optionsPaymentMethod; + } + + $scope.create = function () { + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + entityApi.create(entity).then(function (response) { + if (response.status != 201) { + $scope.errorMessage = `Unable to create CustomerPayment: '${response.message}'`; + return; + } + messageHub.postMessage("entityCreated", response.data); + $scope.cancel(); + messageHub.showAlertSuccess("CustomerPayment", "CustomerPayment successfully created"); + }); + }; + + $scope.update = function () { + let id = $scope.entity.Id; + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + entityApi.update(id, entity).then(function (response) { + if (response.status != 200) { + $scope.errorMessage = `Unable to update CustomerPayment: '${response.message}'`; + return; + } + messageHub.postMessage("entityUpdated", response.data); + $scope.cancel(); + messageHub.showAlertSuccess("CustomerPayment", "CustomerPayment successfully updated"); + }); + }; + + $scope.serviceCustomer = "/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerService.ts"; + + $scope.optionsCustomer = []; + + $http.get("/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerService.ts").then(function (response) { + $scope.optionsCustomer = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + $scope.serviceCurrency = "/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts"; + + $scope.optionsCurrency = []; + + $http.get("/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts").then(function (response) { + $scope.optionsCurrency = response.data.map(e => { + return { + value: e.Id, + text: e.Code + } + }); + }); + $scope.serviceCompany = "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts"; + + $scope.optionsCompany = []; + + $http.get("/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts").then(function (response) { + $scope.optionsCompany = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + $scope.servicePaymentMethod = "/services/ts/codbex-methods/gen/codbex-methods/api/Methods/PaymentMethodService.ts"; + + $scope.optionsPaymentMethod = []; + + $http.get("/services/ts/codbex-methods/gen/codbex-methods/api/Methods/PaymentMethodService.ts").then(function (response) { + $scope.optionsPaymentMethod = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + + $scope.cancel = function () { + $scope.entity = {}; + $scope.action = 'select'; + messageHub.closeDialogWindow("CustomerPayment-details"); + }; + + $scope.clearErrorMessage = function () { + $scope.errorMessage = null; + }; + + }]); \ No newline at end of file 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 new file mode 100644 index 0000000..7dad454 --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html @@ -0,0 +1,354 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ Customer +
+
+ + + +
+
+ +
+ Date +
+
+ + + + Incorrect Input + + +
+
+ +
+ Valor +
+
+ + + + Incorrect Input + + +
+
+ +
+ CompanyIBAN +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ CounterpartyIBAN +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ CounterpartyName +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Amount +
+
+ + + +
+
+ +
+ Currency +
+
+ + + +
+
+ +
+ Reason +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Description +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Company +
+
+ + + +
+
+ +
+ Name +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ UUID +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Reference +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ PaymentMethod +
+
+ + + +
+
+
+
+
+ + + + + + + + + + + + + + + diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/view.extension b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/view.extension new file mode 100644 index 0000000..45fd6d0 --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/view.extension @@ -0,0 +1 @@ +{"module":"codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/view.js","extensionPoint":"dialog-window","description":"codbex-payments - Application Dialog Window"} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/view.js b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/view.js new file mode 100644 index 0000000..0d908da --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/view.js @@ -0,0 +1,17 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: "CustomerPayment-details", + label: "CustomerPayment", + link: "/services/web/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html", + perspectiveName: "CustomerPayment", +}; + +if (typeof exports !== 'undefined') { + exports.getDialogWindow = function () { + return viewData; + } +} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/controller.js b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/controller.js index 4e48590..da6e2c7 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/controller.js @@ -5,7 +5,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) .config(["entityApiProvider", function (entityApiProvider) { entityApiProvider.baseUrl = "/services/ts/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentService.ts"; }]) - .controller('PageController', ['$scope', 'Extensions', 'messageHub', 'entityApi', function ($scope, Extensions, messageHub, entityApi) { + .controller('PageController', ['$scope', '$http', 'Extensions', 'messageHub', 'entityApi', function ($scope, $http, Extensions, messageHub, entityApi) { $scope.entity = {}; $scope.forms = { @@ -127,5 +127,86 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) $scope.cancel = function () { messageHub.postMessage("clearDetails"); }; + + //-----------------Dialogs-------------------// + + $scope.createCustomer = function () { + messageHub.showDialogWindow("Customer-details", { + action: "create", + entity: {}, + }, null, false); + }; + $scope.createCurrency = function () { + messageHub.showDialogWindow("Currency-details", { + action: "create", + entity: {}, + }, null, false); + }; + $scope.createCompany = function () { + messageHub.showDialogWindow("Company-details", { + action: "create", + entity: {}, + }, null, false); + }; + $scope.createPaymentMethod = function () { + messageHub.showDialogWindow("PaymentMethod-details", { + action: "create", + entity: {}, + }, null, false); + }; + + //-----------------Dialogs-------------------// + + + + //----------------Dropdowns-----------------// + + $scope.refreshCustomer = function () { + $scope.optionsCustomer = []; + $http.get("/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerService.ts").then(function (response) { + $scope.optionsCustomer = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + }; + $scope.refreshCurrency = function () { + $scope.optionsCurrency = []; + $http.get("/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts").then(function (response) { + $scope.optionsCurrency = response.data.map(e => { + return { + value: e.Id, + text: e.Code + } + }); + }); + }; + $scope.refreshCompany = function () { + $scope.optionsCompany = []; + $http.get("/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts").then(function (response) { + $scope.optionsCompany = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + }; + $scope.refreshPaymentMethod = function () { + $scope.optionsPaymentMethod = []; + $http.get("/services/ts/codbex-methods/gen/codbex-methods/api/Methods/PaymentMethodService.ts").then(function (response) { + $scope.optionsPaymentMethod = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + }; + + //----------------Dropdowns-----------------// + }]); \ No newline at end of file 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 6c441d7..4b2cacf 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 @@ -23,7 +23,7 @@
Customer
-
+
-
+
+ + + +
@@ -164,7 +172,7 @@
Currency
-
+
-
+
+ + + +
@@ -227,7 +243,7 @@
Company
-
+
-
+
+ + + +
@@ -313,7 +337,7 @@
PaymentMethod
-
+
-
+
+ + + +
diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/index.html b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/index.html index 143bbf8..0da12c7 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/index.html +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/index.html @@ -52,7 +52,7 @@ .constant('extensionPoint', { perspectives: 'codbex-payments', views: 'codbex-payments-view', - dialogWindows: 'codbex-payments-dialog-window' + dialogWindows: 'dialog-window' }) .controller('ApplicationController', ['$scope', 'messageHub', 'Extensions', function ($scope, messageHub, Extensions) { $scope.state = { diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/view.extension b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/view.extension index 8f465f7..2760f4f 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/view.extension +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/view.extension @@ -1,5 +1,5 @@ { "module": "codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/view.js", - "extensionPoint": "codbex-payments-dialog-window", + "extensionPoint": "dialog-window", "description": "codbex-payments - Application Dialog Window" } \ No newline at end of file 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 new file mode 100644 index 0000000..492d420 --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/controller.js @@ -0,0 +1,101 @@ +angular.module('page', ["ideUI", "ideView", "entityApi"]) + .config(["messageHubProvider", function (messageHubProvider) { + messageHubProvider.eventIdPrefix = 'codbex-payments.EmployeePayment.EmployeePayment'; + }]) + .config(["entityApiProvider", function (entityApiProvider) { + entityApiProvider.baseUrl = "/services/ts/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentService.ts"; + }]) + .controller('PageController', ['$scope', '$http', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, $http, messageHub, ViewParameters, entityApi) { + + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: "EmployeePayment Details", + create: "Create EmployeePayment", + update: "Update EmployeePayment" + }; + $scope.action = 'select'; + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + $scope.action = params.action; + if (params.entity.Date) { + params.entity.Date = new Date(params.entity.Date); + } + if (params.entity.Valor) { + params.entity.Valor = new Date(params.entity.Valor); + } + $scope.entity = params.entity; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + $scope.optionsCurrency = params.optionsCurrency; + $scope.optionsCompany = params.optionsCompany; + } + + $scope.create = function () { + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + entityApi.create(entity).then(function (response) { + if (response.status != 201) { + $scope.errorMessage = `Unable to create EmployeePayment: '${response.message}'`; + return; + } + messageHub.postMessage("entityCreated", response.data); + $scope.cancel(); + messageHub.showAlertSuccess("EmployeePayment", "EmployeePayment successfully created"); + }); + }; + + $scope.update = function () { + let id = $scope.entity.Id; + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + entityApi.update(id, entity).then(function (response) { + if (response.status != 200) { + $scope.errorMessage = `Unable to update EmployeePayment: '${response.message}'`; + return; + } + messageHub.postMessage("entityUpdated", response.data); + $scope.cancel(); + messageHub.showAlertSuccess("EmployeePayment", "EmployeePayment successfully updated"); + }); + }; + + $scope.serviceCurrency = "/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts"; + + $scope.optionsCurrency = []; + + $http.get("/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts").then(function (response) { + $scope.optionsCurrency = response.data.map(e => { + return { + value: e.Id, + text: e.Code + } + }); + }); + $scope.serviceCompany = "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts"; + + $scope.optionsCompany = []; + + $http.get("/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts").then(function (response) { + $scope.optionsCompany = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + + $scope.cancel = function () { + $scope.entity = {}; + $scope.action = 'select'; + messageHub.closeDialogWindow("EmployeePayment-details"); + }; + + $scope.clearErrorMessage = function () { + $scope.errorMessage = null; + }; + + }]); \ No newline at end of file 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 new file mode 100644 index 0000000..aff3496 --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html @@ -0,0 +1,320 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ Date +
+
+ + + + Incorrect Input + + +
+
+ +
+ Valor +
+
+ + + + Incorrect Input + + +
+
+ +
+ CompanyIBAN +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ CounterpartyIBAN +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ CounterpartyName +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Amount +
+
+ + + +
+
+ +
+ Currency +
+
+ + + +
+
+ +
+ Reason +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Description +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Company +
+
+ + + +
+
+ +
+ Name +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ UUID +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Reference +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+
+
+
+ + + + + + + + + + + + + + + diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/view.extension b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/view.extension new file mode 100644 index 0000000..fb51fdc --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/view.extension @@ -0,0 +1 @@ +{"module":"codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/view.js","extensionPoint":"dialog-window","description":"codbex-payments - Application Dialog Window"} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/view.js b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/view.js new file mode 100644 index 0000000..2bffcb1 --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/view.js @@ -0,0 +1,17 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: "EmployeePayment-details", + label: "EmployeePayment", + link: "/services/web/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html", + perspectiveName: "EmployeePayment", +}; + +if (typeof exports !== 'undefined') { + exports.getDialogWindow = function () { + return viewData; + } +} \ No newline at end of file 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 86d1220..327856a 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 @@ -5,7 +5,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) .config(["entityApiProvider", function (entityApiProvider) { entityApiProvider.baseUrl = "/services/ts/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentService.ts"; }]) - .controller('PageController', ['$scope', 'Extensions', 'messageHub', 'entityApi', function ($scope, Extensions, messageHub, entityApi) { + .controller('PageController', ['$scope', '$http', 'Extensions', 'messageHub', 'entityApi', function ($scope, $http, Extensions, messageHub, entityApi) { $scope.entity = {}; $scope.forms = { @@ -117,5 +117,52 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) $scope.cancel = function () { messageHub.postMessage("clearDetails"); }; + + //-----------------Dialogs-------------------// + + $scope.createCurrency = function () { + messageHub.showDialogWindow("Currency-details", { + action: "create", + entity: {}, + }, null, false); + }; + $scope.createCompany = function () { + messageHub.showDialogWindow("Company-details", { + action: "create", + entity: {}, + }, null, false); + }; + + //-----------------Dialogs-------------------// + + + + //----------------Dropdowns-----------------// + + $scope.refreshCurrency = function () { + $scope.optionsCurrency = []; + $http.get("/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts").then(function (response) { + $scope.optionsCurrency = response.data.map(e => { + return { + value: e.Id, + text: e.Code + } + }); + }); + }; + $scope.refreshCompany = function () { + $scope.optionsCompany = []; + $http.get("/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts").then(function (response) { + $scope.optionsCompany = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + }; + + //----------------Dropdowns-----------------// + }]); \ No newline at end of file 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 2710852..c0aab5c 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 @@ -147,7 +147,7 @@
Currency
-
+
-
+
+ + + +
@@ -210,7 +218,7 @@
Company
-
+
-
+
+ + + +
diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/index.html b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/index.html index 75d2c61..e6d8d05 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/index.html +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/index.html @@ -52,7 +52,7 @@ .constant('extensionPoint', { perspectives: 'codbex-payments', views: 'codbex-payments-view', - dialogWindows: 'codbex-payments-dialog-window' + dialogWindows: 'dialog-window' }) .controller('ApplicationController', ['$scope', 'messageHub', 'Extensions', function ($scope, messageHub, Extensions) { $scope.state = { diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/controller.js index 9ec6f44..1282cf6 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/controller.js @@ -9,12 +9,13 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) $scope.dataPage = 1; $scope.dataCount = 0; - $scope.dataLimit = 20; + $scope.dataOffset = 0; + $scope.dataLimit = 10; + $scope.action = "select"; //-----------------Custom Actions-------------------// Extensions.get('dialogWindow', 'codbex-payments-custom-action').then(function (response) { $scope.pageActions = response.filter(e => e.perspective === "PaymentAdjustment" && e.view === "PaymentAdjustment" && (e.type === "page" || e.type === undefined)); - $scope.entityActions = response.filter(e => e.perspective === "PaymentAdjustment" && e.view === "PaymentAdjustment" && e.type === "entity"); }); $scope.triggerPageAction = function (action) { @@ -26,33 +27,35 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) action ); }; - - $scope.triggerEntityAction = function (action) { - messageHub.showDialogWindow( - action.id, - { - id: $scope.entity.Id - }, - null, - true, - action - ); - }; //-----------------Custom Actions-------------------// + function refreshData() { + $scope.dataReset = true; + $scope.dataPage--; + } + function resetPagination() { + $scope.dataReset = true; $scope.dataPage = 1; $scope.dataCount = 0; - $scope.dataLimit = 20; + $scope.dataLimit = 10; } - resetPagination(); //-----------------Events-------------------// + messageHub.onDidReceiveMessage("clearDetails", function (msg) { + $scope.$apply(function () { + $scope.selectedEntity = null; + $scope.action = "select"; + }); + }); + messageHub.onDidReceiveMessage("entityCreated", function (msg) { + refreshData(); $scope.loadPage($scope.dataPage, $scope.filter); }); messageHub.onDidReceiveMessage("entityUpdated", function (msg) { + refreshData(); $scope.loadPage($scope.dataPage, $scope.filter); }); @@ -68,7 +71,10 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) if (!filter && $scope.filter) { filter = $scope.filter; } - $scope.dataPage = pageNumber; + if (!filter) { + filter = {}; + } + $scope.selectedEntity = null; entityApi.count(filter).then(function (response) { if (response.status != 200) { messageHub.showAlertError("PaymentAdjustment", `Unable to count PaymentAdjustment: '${response.message}'`); @@ -77,21 +83,23 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) if (response.data) { $scope.dataCount = response.data; } - let offset = (pageNumber - 1) * $scope.dataLimit; - let limit = $scope.dataLimit; - let request; - if (filter) { - filter.$offset = offset; - filter.$limit = limit; - request = entityApi.search(filter); - } else { - request = entityApi.list(offset, limit); + $scope.dataPages = Math.ceil($scope.dataCount / $scope.dataLimit); + filter.$offset = ($scope.dataPage - 1) * $scope.dataLimit; + filter.$limit = $scope.dataLimit; + if ($scope.dataReset) { + filter.$offset = 0; + filter.$limit = $scope.dataPage * $scope.dataLimit; } - request.then(function (response) { + + entityApi.search(filter).then(function (response) { if (response.status != 200) { messageHub.showAlertError("PaymentAdjustment", `Unable to list/filter PaymentAdjustment: '${response.message}'`); return; } + if ($scope.data == null || $scope.dataReset) { + $scope.data = []; + $scope.dataReset = false; + } response.data.forEach(e => { if (e.Date) { @@ -102,7 +110,8 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) } }); - $scope.data = response.data; + $scope.data = $scope.data.concat(response.data); + $scope.dataPage++; }); }); }; @@ -110,21 +119,9 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) $scope.selectEntity = function (entity) { $scope.selectedEntity = entity; - }; - - $scope.openDetails = function (entity) { - $scope.selectedEntity = entity; - messageHub.showDialogWindow("PaymentAdjustment-details", { - action: "select", + messageHub.postMessage("entitySelected", { entity: entity, - optionsCurrency: $scope.optionsCurrency, - optionsCompany: $scope.optionsCompany, - }); - }; - - $scope.openFilter = function (entity) { - messageHub.showDialogWindow("PaymentAdjustment-filter", { - entity: $scope.filterEntity, + selectedMainEntityId: entity.Id, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, }); @@ -132,25 +129,26 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) $scope.createEntity = function () { $scope.selectedEntity = null; - messageHub.showDialogWindow("PaymentAdjustment-details", { - action: "create", + $scope.action = "create"; + + messageHub.postMessage("createEntity", { entity: {}, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, - }, null, false); + }); }; - $scope.updateEntity = function (entity) { - messageHub.showDialogWindow("PaymentAdjustment-details", { - action: "update", - entity: entity, + $scope.updateEntity = function () { + $scope.action = "update"; + messageHub.postMessage("updateEntity", { + entity: $scope.selectedEntity, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, - }, null, false); + }); }; - $scope.deleteEntity = function (entity) { - let id = entity.Id; + $scope.deleteEntity = function () { + let id = $scope.selectedEntity.Id; messageHub.showDialogAsync( 'Delete PaymentAdjustment?', `Are you sure you want to delete PaymentAdjustment? This action cannot be undone.`, @@ -171,6 +169,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) messageHub.showAlertError("PaymentAdjustment", `Unable to delete PaymentAdjustment: '${response.message}'`); return; } + refreshData(); $scope.loadPage($scope.dataPage, $scope.filter); messageHub.postMessage("clearDetails"); }); @@ -178,6 +177,14 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) }); }; + $scope.openFilter = function (entity) { + messageHub.showDialogWindow("PaymentAdjustment-filter", { + entity: $scope.filterEntity, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + }); + }; + //----------------Dropdowns-----------------// $scope.optionsCurrency = []; $scope.optionsCompany = []; diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/controller.js index 86fdda5..95d0ea4 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/controller.js @@ -84,6 +84,7 @@ angular.module('page', ["ideUI", "ideView"]) entity: entity, filter: filter }); + messageHub.postMessage("clearDetails"); $scope.cancel(); }; diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/index.html index a039bb1..70502ee 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/index.html @@ -171,7 +171,7 @@ - + diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/view.extension b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/view.extension index 6f0c149..5898b5e 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/view.extension +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/view.extension @@ -1,5 +1,5 @@ { "module": "codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/view.js", - "extensionPoint": "codbex-payments-dialog-window", + "extensionPoint": "dialog-window", "description": "codbex-payments - Application Dialog Window" } \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/controller.js index cd43c61..f235871 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/controller.js @@ -5,7 +5,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) .config(["entityApiProvider", function (entityApiProvider) { entityApiProvider.baseUrl = "/services/ts/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentService.ts"; }]) - .controller('PageController', ['$scope', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, messageHub, ViewParameters, entityApi) { + .controller('PageController', ['$scope', '$http', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, $http, messageHub, ViewParameters, entityApi) { $scope.entity = {}; $scope.forms = { @@ -64,7 +64,29 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) }; $scope.serviceCurrency = "/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts"; + + $scope.optionsCurrency = []; + + $http.get("/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts").then(function (response) { + $scope.optionsCurrency = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); $scope.serviceCompany = "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts"; + + $scope.optionsCompany = []; + + $http.get("/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts").then(function (response) { + $scope.optionsCompany = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); $scope.cancel = function () { $scope.entity = {}; diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/view.extension b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/view.extension index 8634168..7610c5e 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/view.extension +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/view.extension @@ -1 +1 @@ -{"module":"codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/view.js","extensionPoint":"codbex-payments-dialog-window","description":"codbex-payments - Application Dialog Window"} \ No newline at end of file +{"module":"codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/view.js","extensionPoint":"dialog-window","description":"codbex-payments - Application Dialog Window"} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/index.html index 3e81fc1..952c6ec 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/index.html @@ -18,74 +18,53 @@ Items - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DateValorAmountCurrencyCompanyReasonUUID
No data available.
- - - - {{next.Amount}} - {{optionsCurrencyValue(next.Currency)}} - - {{optionsCompanyValue(next.Company)}} - {{next.Reason}}{{next.UUID}} - - - - - - - - - - - - - - -
+ + + + + + + {{next.Valor | date: "dd/MMM/yyyy"}} | + {{next.Amount}} | + {{optionsCurrencyValue(next.Currency)}} | + {{optionsCompanyValue(next.Company)}} | + {{next.Reason}} | + {{next.UUID}} + + + + + + + Load More ... + - - - diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/controller.js new file mode 100644 index 0000000..81c10ee --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/controller.js @@ -0,0 +1,168 @@ +angular.module('page', ["ideUI", "ideView", "entityApi"]) + .config(["messageHubProvider", function (messageHubProvider) { + messageHubProvider.eventIdPrefix = 'codbex-payments.PaymentAdjustment.PaymentAdjustment'; + }]) + .config(["entityApiProvider", function (entityApiProvider) { + entityApiProvider.baseUrl = "/services/ts/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentService.ts"; + }]) + .controller('PageController', ['$scope', '$http', 'Extensions', 'messageHub', 'entityApi', function ($scope, $http, Extensions, messageHub, entityApi) { + + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: "PaymentAdjustment Details", + create: "Create PaymentAdjustment", + update: "Update PaymentAdjustment" + }; + $scope.action = 'select'; + + //-----------------Custom Actions-------------------// + Extensions.get('dialogWindow', 'codbex-payments-custom-action').then(function (response) { + $scope.entityActions = response.filter(e => e.perspective === "PaymentAdjustment" && e.view === "PaymentAdjustment" && e.type === "entity"); + }); + + $scope.triggerEntityAction = function (action) { + messageHub.showDialogWindow( + action.id, + { + id: $scope.entity.Id + }, + null, + true, + action + ); + }; + //-----------------Custom Actions-------------------// + + //-----------------Events-------------------// + messageHub.onDidReceiveMessage("clearDetails", function (msg) { + $scope.$apply(function () { + $scope.entity = {}; + $scope.optionsCurrency = []; + $scope.optionsCompany = []; + $scope.action = 'select'; + }); + }); + + messageHub.onDidReceiveMessage("entitySelected", function (msg) { + $scope.$apply(function () { + if (msg.data.entity.Date) { + msg.data.entity.Date = new Date(msg.data.entity.Date); + } + if (msg.data.entity.Valor) { + msg.data.entity.Valor = new Date(msg.data.entity.Valor); + } + $scope.entity = msg.data.entity; + $scope.optionsCurrency = msg.data.optionsCurrency; + $scope.optionsCompany = msg.data.optionsCompany; + $scope.action = 'select'; + }); + }); + + messageHub.onDidReceiveMessage("createEntity", function (msg) { + $scope.$apply(function () { + $scope.entity = {}; + $scope.optionsCurrency = msg.data.optionsCurrency; + $scope.optionsCompany = msg.data.optionsCompany; + $scope.action = 'create'; + }); + }); + + messageHub.onDidReceiveMessage("updateEntity", function (msg) { + $scope.$apply(function () { + if (msg.data.entity.Date) { + msg.data.entity.Date = new Date(msg.data.entity.Date); + } + if (msg.data.entity.Valor) { + msg.data.entity.Valor = new Date(msg.data.entity.Valor); + } + $scope.entity = msg.data.entity; + $scope.optionsCurrency = msg.data.optionsCurrency; + $scope.optionsCompany = msg.data.optionsCompany; + $scope.action = 'update'; + }); + }); + + $scope.serviceCurrency = "/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts"; + $scope.serviceCompany = "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts"; + + //-----------------Events-------------------// + + $scope.create = function () { + entityApi.create($scope.entity).then(function (response) { + if (response.status != 201) { + messageHub.showAlertError("PaymentAdjustment", `Unable to create PaymentAdjustment: '${response.message}'`); + return; + } + messageHub.postMessage("entityCreated", response.data); + messageHub.postMessage("clearDetails", response.data); + messageHub.showAlertSuccess("PaymentAdjustment", "PaymentAdjustment successfully created"); + }); + }; + + $scope.update = function () { + entityApi.update($scope.entity.Id, $scope.entity).then(function (response) { + if (response.status != 200) { + messageHub.showAlertError("PaymentAdjustment", `Unable to update PaymentAdjustment: '${response.message}'`); + return; + } + messageHub.postMessage("entityUpdated", response.data); + messageHub.postMessage("clearDetails", response.data); + messageHub.showAlertSuccess("PaymentAdjustment", "PaymentAdjustment successfully updated"); + }); + }; + + $scope.cancel = function () { + messageHub.postMessage("clearDetails"); + }; + + //-----------------Dialogs-------------------// + + $scope.createCurrency = function () { + messageHub.showDialogWindow("Currency-details", { + action: "create", + entity: {}, + }, null, false); + }; + $scope.createCompany = function () { + messageHub.showDialogWindow("Company-details", { + action: "create", + entity: {}, + }, null, false); + }; + + //-----------------Dialogs-------------------// + + + + //----------------Dropdowns-----------------// + + $scope.refreshCurrency = function () { + $scope.optionsCurrency = []; + $http.get("/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts").then(function (response) { + $scope.optionsCurrency = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + }; + $scope.refreshCompany = function () { + $scope.optionsCompany = []; + $http.get("/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts").then(function (response) { + $scope.optionsCompany = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + }; + + //----------------Dropdowns-----------------// + + + }]); \ No newline at end of file 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 new file mode 100644 index 0000000..ccf9829 --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/index.html @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + +
+ Date +
+
+ + + + Incorrect Input + + +
+
+ +
+ Valor +
+
+ + + + Incorrect Input + + +
+
+ +
+ Amount +
+
+ + + +
+
+ +
+ Currency +
+
+ + +
+
+ + + +
+
+ +
+ Company +
+
+ + +
+
+ + + +
+
+ +
+ Reason +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ UUID +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/view.extension b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/view.extension new file mode 100644 index 0000000..3c5fa9b --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/view.extension @@ -0,0 +1 @@ +{"module":"codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/view.js","extensionPoint":"codbex-payments-view","description":"codbex-payments - Application View - Main Details"} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/view.js b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/view.js new file mode 100644 index 0000000..3ec691e --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/view.js @@ -0,0 +1,19 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: "PaymentAdjustment-details", + label: "PaymentAdjustment", + factory: "frame", + region: "center", + link: "/services/web/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/index.html", + perspectiveName: "PaymentAdjustment", +}; + +if (typeof exports !== 'undefined') { + exports.getView = function () { + return viewData; + } +} diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/view.js b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/view.js index 6e19fbe..12baf34 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/view.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/view.js @@ -7,7 +7,7 @@ const viewData = { id: "PaymentAdjustment", label: "PaymentAdjustment", factory: "frame", - region: "center", + region: "left", link: "/services/web/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/index.html", perspectiveName: "PaymentAdjustment", }; diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/index.html index 81abe8f..4391b4c 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/index.html @@ -52,7 +52,7 @@ .constant('extensionPoint', { perspectives: 'codbex-payments', views: 'codbex-payments-view', - dialogWindows: 'codbex-payments-dialog-window' + dialogWindows: 'dialog-window' }) .controller('ApplicationController', ['$scope', 'messageHub', 'Extensions', function ($scope, messageHub, Extensions) { $scope.state = { 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 3a2e217..4dfba17 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/controller.js @@ -9,12 +9,13 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) $scope.dataPage = 1; $scope.dataCount = 0; - $scope.dataLimit = 20; + $scope.dataOffset = 0; + $scope.dataLimit = 10; + $scope.action = "select"; //-----------------Custom Actions-------------------// Extensions.get('dialogWindow', 'codbex-payments-custom-action').then(function (response) { $scope.pageActions = response.filter(e => e.perspective === "PaymentRecord" && e.view === "PaymentRecord" && (e.type === "page" || e.type === undefined)); - $scope.entityActions = response.filter(e => e.perspective === "PaymentRecord" && e.view === "PaymentRecord" && e.type === "entity"); }); $scope.triggerPageAction = function (action) { @@ -26,33 +27,35 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) action ); }; - - $scope.triggerEntityAction = function (action) { - messageHub.showDialogWindow( - action.id, - { - id: $scope.entity.Id - }, - null, - true, - action - ); - }; //-----------------Custom Actions-------------------// + function refreshData() { + $scope.dataReset = true; + $scope.dataPage--; + } + function resetPagination() { + $scope.dataReset = true; $scope.dataPage = 1; $scope.dataCount = 0; - $scope.dataLimit = 20; + $scope.dataLimit = 10; } - resetPagination(); //-----------------Events-------------------// + messageHub.onDidReceiveMessage("clearDetails", function (msg) { + $scope.$apply(function () { + $scope.selectedEntity = null; + $scope.action = "select"; + }); + }); + messageHub.onDidReceiveMessage("entityCreated", function (msg) { + refreshData(); $scope.loadPage($scope.dataPage, $scope.filter); }); messageHub.onDidReceiveMessage("entityUpdated", function (msg) { + refreshData(); $scope.loadPage($scope.dataPage, $scope.filter); }); @@ -68,7 +71,10 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) if (!filter && $scope.filter) { filter = $scope.filter; } - $scope.dataPage = pageNumber; + if (!filter) { + filter = {}; + } + $scope.selectedEntity = null; entityApi.count(filter).then(function (response) { if (response.status != 200) { messageHub.showAlertError("PaymentRecord", `Unable to count PaymentRecord: '${response.message}'`); @@ -77,21 +83,23 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) if (response.data) { $scope.dataCount = response.data; } - let offset = (pageNumber - 1) * $scope.dataLimit; - let limit = $scope.dataLimit; - let request; - if (filter) { - filter.$offset = offset; - filter.$limit = limit; - request = entityApi.search(filter); - } else { - request = entityApi.list(offset, limit); + $scope.dataPages = Math.ceil($scope.dataCount / $scope.dataLimit); + filter.$offset = ($scope.dataPage - 1) * $scope.dataLimit; + filter.$limit = $scope.dataLimit; + if ($scope.dataReset) { + filter.$offset = 0; + filter.$limit = $scope.dataPage * $scope.dataLimit; } - request.then(function (response) { + + entityApi.search(filter).then(function (response) { if (response.status != 200) { messageHub.showAlertError("PaymentRecord", `Unable to list/filter PaymentRecord: '${response.message}'`); return; } + if ($scope.data == null || $scope.dataReset) { + $scope.data = []; + $scope.dataReset = false; + } response.data.forEach(e => { if (e.Date) { @@ -102,7 +110,8 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) } }); - $scope.data = response.data; + $scope.data = $scope.data.concat(response.data); + $scope.dataPage++; }); }); }; @@ -110,24 +119,9 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) $scope.selectEntity = function (entity) { $scope.selectedEntity = entity; - }; - - $scope.openDetails = function (entity) { - $scope.selectedEntity = entity; - messageHub.showDialogWindow("PaymentRecord-details", { - action: "select", + messageHub.postMessage("entitySelected", { entity: entity, - optionsCurrency: $scope.optionsCurrency, - optionsCompany: $scope.optionsCompany, - optionsPaymentRecordDirection: $scope.optionsPaymentRecordDirection, - optionsPaymentStatus: $scope.optionsPaymentStatus, - optionsPaymentType: $scope.optionsPaymentType, - }); - }; - - $scope.openFilter = function (entity) { - messageHub.showDialogWindow("PaymentRecord-filter", { - entity: $scope.filterEntity, + selectedMainEntityId: entity.Id, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, optionsPaymentRecordDirection: $scope.optionsPaymentRecordDirection, @@ -138,31 +132,32 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) $scope.createEntity = function () { $scope.selectedEntity = null; - messageHub.showDialogWindow("PaymentRecord-details", { - action: "create", + $scope.action = "create"; + + messageHub.postMessage("createEntity", { entity: {}, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, optionsPaymentRecordDirection: $scope.optionsPaymentRecordDirection, optionsPaymentStatus: $scope.optionsPaymentStatus, optionsPaymentType: $scope.optionsPaymentType, - }, null, false); + }); }; - $scope.updateEntity = function (entity) { - messageHub.showDialogWindow("PaymentRecord-details", { - action: "update", - entity: entity, + $scope.updateEntity = function () { + $scope.action = "update"; + messageHub.postMessage("updateEntity", { + entity: $scope.selectedEntity, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, optionsPaymentRecordDirection: $scope.optionsPaymentRecordDirection, optionsPaymentStatus: $scope.optionsPaymentStatus, optionsPaymentType: $scope.optionsPaymentType, - }, null, false); + }); }; - $scope.deleteEntity = function (entity) { - let id = entity.Id; + $scope.deleteEntity = function () { + let id = $scope.selectedEntity.Id; messageHub.showDialogAsync( 'Delete PaymentRecord?', `Are you sure you want to delete PaymentRecord? This action cannot be undone.`, @@ -183,6 +178,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) messageHub.showAlertError("PaymentRecord", `Unable to delete PaymentRecord: '${response.message}'`); return; } + refreshData(); $scope.loadPage($scope.dataPage, $scope.filter); messageHub.postMessage("clearDetails"); }); @@ -190,6 +186,17 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) }); }; + $scope.openFilter = function (entity) { + messageHub.showDialogWindow("PaymentRecord-filter", { + entity: $scope.filterEntity, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + optionsPaymentRecordDirection: $scope.optionsPaymentRecordDirection, + optionsPaymentStatus: $scope.optionsPaymentStatus, + optionsPaymentType: $scope.optionsPaymentType, + }); + }; + //----------------Dropdowns-----------------// $scope.optionsCurrency = []; $scope.optionsCompany = []; 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 36c142a..8e2b81c 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 @@ -114,6 +114,7 @@ angular.module('page', ["ideUI", "ideView"]) entity: entity, filter: filter }); + messageHub.postMessage("clearDetails"); $scope.cancel(); }; 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 906698b..8346870 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 @@ -321,7 +321,7 @@
- + diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/view.extension b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/view.extension index fb731f3..6264dce 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/view.extension +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/view.extension @@ -1,5 +1,5 @@ { "module": "codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/view.js", - "extensionPoint": "codbex-payments-dialog-window", + "extensionPoint": "dialog-window", "description": "codbex-payments - Application Dialog Window" } \ No newline at end of file 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 fadbf88..91ffc3b 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 @@ -5,7 +5,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) .config(["entityApiProvider", function (entityApiProvider) { entityApiProvider.baseUrl = "/services/ts/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordService.ts"; }]) - .controller('PageController', ['$scope', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, messageHub, ViewParameters, entityApi) { + .controller('PageController', ['$scope', '$http', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, $http, messageHub, ViewParameters, entityApi) { $scope.entity = {}; $scope.forms = { @@ -67,10 +67,65 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) }; $scope.serviceCurrency = "/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts"; + + $scope.optionsCurrency = []; + + $http.get("/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts").then(function (response) { + $scope.optionsCurrency = response.data.map(e => { + return { + value: e.Id, + text: e.Code + } + }); + }); $scope.serviceCompany = "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts"; + + $scope.optionsCompany = []; + + $http.get("/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts").then(function (response) { + $scope.optionsCompany = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); $scope.servicePaymentRecordDirection = "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentRecordDirectionService.ts"; + + $scope.optionsPaymentRecordDirection = []; + + $http.get("/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentRecordDirectionService.ts").then(function (response) { + $scope.optionsPaymentRecordDirection = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); $scope.servicePaymentStatus = "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentStatusService.ts"; + + $scope.optionsPaymentStatus = []; + + $http.get("/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentStatusService.ts").then(function (response) { + $scope.optionsPaymentStatus = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); $scope.servicePaymentType = "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeService.ts"; + + $scope.optionsPaymentType = []; + + $http.get("/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeService.ts").then(function (response) { + $scope.optionsPaymentType = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); $scope.cancel = function () { $scope.entity = {}; diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/view.extension b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/view.extension index dce3645..1fe713c 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/view.extension +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/view.extension @@ -1 +1 @@ -{"module":"codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/view.js","extensionPoint":"codbex-payments-dialog-window","description":"codbex-payments - Application Dialog Window"} \ No newline at end of file +{"module":"codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/view.js","extensionPoint":"dialog-window","description":"codbex-payments - Application Dialog Window"} \ No newline at end of file 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 ec8c418..7969d74 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/index.html @@ -18,101 +18,62 @@ Items - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DateValorCompanyIBANCounterpartyIBANCounterpartyNameAmountCurrencyReasonDescriptionCompanyPaymentRecordDirectionPaymentStatusPaymentTypeUUIDReferenceDeleted
No data available.
- - - - {{next.CompanyIBAN}}{{next.CounterpartyIBAN}}{{next.CounterpartyName}}{{next.Amount}} - {{optionsCurrencyValue(next.Currency)}} - {{next.Reason}}{{next.Description}} - {{optionsCompanyValue(next.Company)}} - - {{optionsPaymentRecordDirectionValue(next.PaymentRecordDirection)}} - - {{optionsPaymentStatusValue(next.PaymentStatus)}} - - {{optionsPaymentTypeValue(next.PaymentType)}} - {{next.UUID}}{{next.Reference}} - - - - - - - - - - - - - - - - - -
+ + + + + + + {{next.Valor | date: "dd/MMM/yyyy"}} | + {{next.CompanyIBAN}} | + {{next.CounterpartyIBAN}} | + {{next.CounterpartyName}} | + {{next.Amount}} | + {{optionsCurrencyValue(next.Currency)}} | + {{next.Reason}} | + {{next.Description}} | + {{optionsCompanyValue(next.Company)}} | + {{optionsPaymentRecordDirectionValue(next.PaymentRecordDirection)}} | + {{optionsPaymentStatusValue(next.PaymentStatus)}} | + {{optionsPaymentTypeValue(next.PaymentType)}} | + {{next.UUID}} | + {{next.Reference}} | + {{next.Deleted}} + + + + + + + Load More ... + - - - 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 new file mode 100644 index 0000000..78656f7 --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/controller.js @@ -0,0 +1,234 @@ +angular.module('page', ["ideUI", "ideView", "entityApi"]) + .config(["messageHubProvider", function (messageHubProvider) { + messageHubProvider.eventIdPrefix = 'codbex-payments.PaymentRecord.PaymentRecord'; + }]) + .config(["entityApiProvider", function (entityApiProvider) { + entityApiProvider.baseUrl = "/services/ts/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordService.ts"; + }]) + .controller('PageController', ['$scope', '$http', 'Extensions', 'messageHub', 'entityApi', function ($scope, $http, Extensions, messageHub, entityApi) { + + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: "PaymentRecord Details", + create: "Create PaymentRecord", + update: "Update PaymentRecord" + }; + $scope.action = 'select'; + + //-----------------Custom Actions-------------------// + Extensions.get('dialogWindow', 'codbex-payments-custom-action').then(function (response) { + $scope.entityActions = response.filter(e => e.perspective === "PaymentRecord" && e.view === "PaymentRecord" && e.type === "entity"); + }); + + $scope.triggerEntityAction = function (action) { + messageHub.showDialogWindow( + action.id, + { + id: $scope.entity.Id + }, + null, + true, + action + ); + }; + //-----------------Custom Actions-------------------// + + //-----------------Events-------------------// + messageHub.onDidReceiveMessage("clearDetails", function (msg) { + $scope.$apply(function () { + $scope.entity = {}; + $scope.optionsCurrency = []; + $scope.optionsCompany = []; + $scope.optionsPaymentRecordDirection = []; + $scope.optionsPaymentStatus = []; + $scope.optionsPaymentType = []; + $scope.action = 'select'; + }); + }); + + messageHub.onDidReceiveMessage("entitySelected", function (msg) { + $scope.$apply(function () { + if (msg.data.entity.Date) { + msg.data.entity.Date = new Date(msg.data.entity.Date); + } + if (msg.data.entity.Valor) { + msg.data.entity.Valor = new Date(msg.data.entity.Valor); + } + $scope.entity = msg.data.entity; + $scope.optionsCurrency = msg.data.optionsCurrency; + $scope.optionsCompany = msg.data.optionsCompany; + $scope.optionsPaymentRecordDirection = msg.data.optionsPaymentRecordDirection; + $scope.optionsPaymentStatus = msg.data.optionsPaymentStatus; + $scope.optionsPaymentType = msg.data.optionsPaymentType; + $scope.action = 'select'; + }); + }); + + messageHub.onDidReceiveMessage("createEntity", function (msg) { + $scope.$apply(function () { + $scope.entity = {}; + $scope.optionsCurrency = msg.data.optionsCurrency; + $scope.optionsCompany = msg.data.optionsCompany; + $scope.optionsPaymentRecordDirection = msg.data.optionsPaymentRecordDirection; + $scope.optionsPaymentStatus = msg.data.optionsPaymentStatus; + $scope.optionsPaymentType = msg.data.optionsPaymentType; + $scope.action = 'create'; + }); + }); + + messageHub.onDidReceiveMessage("updateEntity", function (msg) { + $scope.$apply(function () { + if (msg.data.entity.Date) { + msg.data.entity.Date = new Date(msg.data.entity.Date); + } + if (msg.data.entity.Valor) { + msg.data.entity.Valor = new Date(msg.data.entity.Valor); + } + $scope.entity = msg.data.entity; + $scope.optionsCurrency = msg.data.optionsCurrency; + $scope.optionsCompany = msg.data.optionsCompany; + $scope.optionsPaymentRecordDirection = msg.data.optionsPaymentRecordDirection; + $scope.optionsPaymentStatus = msg.data.optionsPaymentStatus; + $scope.optionsPaymentType = msg.data.optionsPaymentType; + $scope.action = 'update'; + }); + }); + + $scope.serviceCurrency = "/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts"; + $scope.serviceCompany = "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts"; + $scope.servicePaymentRecordDirection = "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentRecordDirectionService.ts"; + $scope.servicePaymentStatus = "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentStatusService.ts"; + $scope.servicePaymentType = "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeService.ts"; + + //-----------------Events-------------------// + + $scope.create = function () { + entityApi.create($scope.entity).then(function (response) { + if (response.status != 201) { + messageHub.showAlertError("PaymentRecord", `Unable to create PaymentRecord: '${response.message}'`); + return; + } + messageHub.postMessage("entityCreated", response.data); + messageHub.postMessage("clearDetails", response.data); + messageHub.showAlertSuccess("PaymentRecord", "PaymentRecord successfully created"); + }); + }; + + $scope.update = function () { + entityApi.update($scope.entity.Id, $scope.entity).then(function (response) { + if (response.status != 200) { + messageHub.showAlertError("PaymentRecord", `Unable to update PaymentRecord: '${response.message}'`); + return; + } + messageHub.postMessage("entityUpdated", response.data); + messageHub.postMessage("clearDetails", response.data); + messageHub.showAlertSuccess("PaymentRecord", "PaymentRecord successfully updated"); + }); + }; + + $scope.cancel = function () { + messageHub.postMessage("clearDetails"); + }; + + //-----------------Dialogs-------------------// + + $scope.createCurrency = function () { + messageHub.showDialogWindow("Currency-details", { + action: "create", + entity: {}, + }, null, false); + }; + $scope.createCompany = function () { + messageHub.showDialogWindow("Company-details", { + action: "create", + entity: {}, + }, null, false); + }; + $scope.createPaymentRecordDirection = function () { + messageHub.showDialogWindow("PaymentRecordDirection-details", { + action: "create", + entity: {}, + }, null, false); + }; + $scope.createPaymentStatus = function () { + messageHub.showDialogWindow("PaymentStatus-details", { + action: "create", + entity: {}, + }, null, false); + }; + $scope.createPaymentType = function () { + messageHub.showDialogWindow("PaymentType-details", { + action: "create", + entity: {}, + }, null, false); + }; + + //-----------------Dialogs-------------------// + + + + //----------------Dropdowns-----------------// + + $scope.refreshCurrency = function () { + $scope.optionsCurrency = []; + $http.get("/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts").then(function (response) { + $scope.optionsCurrency = response.data.map(e => { + return { + value: e.Id, + text: e.Code + } + }); + }); + }; + $scope.refreshCompany = function () { + $scope.optionsCompany = []; + $http.get("/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts").then(function (response) { + $scope.optionsCompany = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + }; + $scope.refreshPaymentRecordDirection = function () { + $scope.optionsPaymentRecordDirection = []; + $http.get("/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentRecordDirectionService.ts").then(function (response) { + $scope.optionsPaymentRecordDirection = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + }; + $scope.refreshPaymentStatus = function () { + $scope.optionsPaymentStatus = []; + $http.get("/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentStatusService.ts").then(function (response) { + $scope.optionsPaymentStatus = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + }; + $scope.refreshPaymentType = function () { + $scope.optionsPaymentType = []; + $http.get("/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeService.ts").then(function (response) { + $scope.optionsPaymentType = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + }; + + //----------------Dropdowns-----------------// + + + }]); \ No newline at end of file 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 new file mode 100644 index 0000000..7e2869a --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html @@ -0,0 +1,402 @@ + + + + + + + + + + + + + + + + + + + + +
+ Date +
+
+ + + + Incorrect Input + + +
+
+ +
+ Valor +
+
+ + + + Incorrect Input + + +
+
+ +
+ CompanyIBAN +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ CounterpartyIBAN +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ CounterpartyName +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Amount +
+
+ + + +
+
+ +
+ Currency +
+
+ + +
+
+ + + +
+
+ +
+ Reason +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Description +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Company +
+
+ + +
+
+ + + +
+
+ +
+ PaymentRecordDirection +
+
+ + +
+
+ + + +
+
+ +
+ PaymentStatus +
+
+ + +
+
+ + + +
+
+ +
+ PaymentType +
+
+ + +
+
+ + + +
+
+ +
+ UUID +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Reference +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+
+ + + Deleted +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/view.extension b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/view.extension new file mode 100644 index 0000000..d66e16d --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/view.extension @@ -0,0 +1 @@ +{"module":"codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/view.js","extensionPoint":"codbex-payments-view","description":"codbex-payments - Application View - Main Details"} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/view.js b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/view.js new file mode 100644 index 0000000..6b774f3 --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/view.js @@ -0,0 +1,19 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: "PaymentRecord-details", + label: "PaymentRecord", + factory: "frame", + region: "center", + link: "/services/web/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html", + perspectiveName: "PaymentRecord", +}; + +if (typeof exports !== 'undefined') { + exports.getView = function () { + return viewData; + } +} diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/view.js b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/view.js index b387ff4..7c1ae21 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/view.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/view.js @@ -7,7 +7,7 @@ const viewData = { id: "PaymentRecord", label: "PaymentRecord", factory: "frame", - region: "center", + region: "left", link: "/services/web/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/index.html", perspectiveName: "PaymentRecord", }; diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/index.html index 7528ffa..845385f 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/index.html @@ -52,7 +52,7 @@ .constant('extensionPoint', { perspectives: 'codbex-payments', views: 'codbex-payments-view', - dialogWindows: 'codbex-payments-dialog-window' + dialogWindows: 'dialog-window' }) .controller('ApplicationController', ['$scope', 'messageHub', 'Extensions', function ($scope, messageHub, Extensions) { $scope.state = { diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/view.extension b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/view.extension index 8d4dcee..00b007a 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/view.extension +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/view.extension @@ -1,5 +1,5 @@ { "module": "codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/view.js", - "extensionPoint": "codbex-payments-dialog-window", + "extensionPoint": "dialog-window", "description": "codbex-payments - Application Dialog Window" } \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/view.extension b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/view.extension index f46041f..460e1a7 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/view.extension +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/view.extension @@ -1,5 +1,5 @@ { "module": "codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/view.js", - "extensionPoint": "codbex-payments-dialog-window", + "extensionPoint": "dialog-window", "description": "codbex-payments - Application Dialog Window" } \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentRecordDirection/dialog-filter/view.extension b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentRecordDirection/dialog-filter/view.extension index 85b232a..32f624e 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentRecordDirection/dialog-filter/view.extension +++ b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentRecordDirection/dialog-filter/view.extension @@ -1,5 +1,5 @@ { "module": "codbex-payments/gen/codbex-payments/ui/Settings/PaymentRecordDirection/dialog-filter/view.js", - "extensionPoint": "codbex-payments-dialog-window", + "extensionPoint": "dialog-window", "description": "codbex-payments - Application Dialog Window" } \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentRecordDirection/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentRecordDirection/dialog-window/controller.js index 8756cbb..bc1af29 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentRecordDirection/dialog-window/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentRecordDirection/dialog-window/controller.js @@ -5,7 +5,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) .config(["entityApiProvider", function (entityApiProvider) { entityApiProvider.baseUrl = "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentRecordDirectionService.ts"; }]) - .controller('PageController', ['$scope', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, messageHub, ViewParameters, entityApi) { + .controller('PageController', ['$scope', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, messageHub, ViewParameters, entityApi) { $scope.entity = {}; $scope.forms = { diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentRecordDirection/dialog-window/view.extension b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentRecordDirection/dialog-window/view.extension index f8b78f8..36ce3b7 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentRecordDirection/dialog-window/view.extension +++ b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentRecordDirection/dialog-window/view.extension @@ -1 +1 @@ -{"module":"codbex-payments/gen/codbex-payments/ui/Settings/PaymentRecordDirection/dialog-window/view.js","extensionPoint":"codbex-payments-dialog-window","description":"codbex-payments - Application Dialog Window"} \ No newline at end of file +{"module":"codbex-payments/gen/codbex-payments/ui/Settings/PaymentRecordDirection/dialog-window/view.js","extensionPoint":"dialog-window","description":"codbex-payments - Application Dialog Window"} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentStatus/dialog-filter/view.extension b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentStatus/dialog-filter/view.extension index 2cca69e..9669f27 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentStatus/dialog-filter/view.extension +++ b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentStatus/dialog-filter/view.extension @@ -1,5 +1,5 @@ { "module": "codbex-payments/gen/codbex-payments/ui/Settings/PaymentStatus/dialog-filter/view.js", - "extensionPoint": "codbex-payments-dialog-window", + "extensionPoint": "dialog-window", "description": "codbex-payments - Application Dialog Window" } \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentStatus/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentStatus/dialog-window/controller.js index c92a854..b2d11b0 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentStatus/dialog-window/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentStatus/dialog-window/controller.js @@ -5,7 +5,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) .config(["entityApiProvider", function (entityApiProvider) { entityApiProvider.baseUrl = "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentStatusService.ts"; }]) - .controller('PageController', ['$scope', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, messageHub, ViewParameters, entityApi) { + .controller('PageController', ['$scope', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, messageHub, ViewParameters, entityApi) { $scope.entity = {}; $scope.forms = { diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentStatus/dialog-window/view.extension b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentStatus/dialog-window/view.extension index b2ab0b3..eaf79b6 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentStatus/dialog-window/view.extension +++ b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentStatus/dialog-window/view.extension @@ -1 +1 @@ -{"module":"codbex-payments/gen/codbex-payments/ui/Settings/PaymentStatus/dialog-window/view.js","extensionPoint":"codbex-payments-dialog-window","description":"codbex-payments - Application Dialog Window"} \ No newline at end of file +{"module":"codbex-payments/gen/codbex-payments/ui/Settings/PaymentStatus/dialog-window/view.js","extensionPoint":"dialog-window","description":"codbex-payments - Application Dialog Window"} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/view.extension b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/view.extension index fd788ca..7b420d3 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/view.extension +++ b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/view.extension @@ -1,5 +1,5 @@ { "module": "codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/view.js", - "extensionPoint": "codbex-payments-dialog-window", + "extensionPoint": "dialog-window", "description": "codbex-payments - Application Dialog Window" } \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/controller.js index cf3f99f..2a6ce59 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/controller.js @@ -5,7 +5,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) .config(["entityApiProvider", function (entityApiProvider) { entityApiProvider.baseUrl = "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeService.ts"; }]) - .controller('PageController', ['$scope', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, messageHub, ViewParameters, entityApi) { + .controller('PageController', ['$scope', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, messageHub, ViewParameters, entityApi) { $scope.entity = {}; $scope.forms = { diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/view.extension b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/view.extension index da6c35a..0f0eef4 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/view.extension +++ b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/view.extension @@ -1 +1 @@ -{"module":"codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/view.js","extensionPoint":"codbex-payments-dialog-window","description":"codbex-payments - Application Dialog Window"} \ No newline at end of file +{"module":"codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/view.js","extensionPoint":"dialog-window","description":"codbex-payments - Application Dialog Window"} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/index.html b/codbex-payments/gen/codbex-payments/ui/Settings/index.html index 821687b..b69f160 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/index.html +++ b/codbex-payments/gen/codbex-payments/ui/Settings/index.html @@ -52,7 +52,7 @@ .constant('extensionPoint', { perspectives: 'codbex-payments', views: 'codbex-payments-view', - dialogWindows: 'codbex-payments-dialog-window' + dialogWindows: 'dialog-window' }) .controller('ApplicationController', ['$scope', 'messageHub', 'Extensions', function ($scope, messageHub, Extensions) { $scope.state = { diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/controller.js b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/controller.js index 14ddc39..5ff68eb 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/controller.js @@ -9,12 +9,13 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) $scope.dataPage = 1; $scope.dataCount = 0; - $scope.dataLimit = 20; + $scope.dataOffset = 0; + $scope.dataLimit = 10; + $scope.action = "select"; //-----------------Custom Actions-------------------// Extensions.get('dialogWindow', 'codbex-payments-custom-action').then(function (response) { $scope.pageActions = response.filter(e => e.perspective === "SupplierPayment" && e.view === "SupplierPayment" && (e.type === "page" || e.type === undefined)); - $scope.entityActions = response.filter(e => e.perspective === "SupplierPayment" && e.view === "SupplierPayment" && e.type === "entity"); }); $scope.triggerPageAction = function (action) { @@ -26,33 +27,35 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) action ); }; - - $scope.triggerEntityAction = function (action) { - messageHub.showDialogWindow( - action.id, - { - id: $scope.entity.Id - }, - null, - true, - action - ); - }; //-----------------Custom Actions-------------------// + function refreshData() { + $scope.dataReset = true; + $scope.dataPage--; + } + function resetPagination() { + $scope.dataReset = true; $scope.dataPage = 1; $scope.dataCount = 0; - $scope.dataLimit = 20; + $scope.dataLimit = 10; } - resetPagination(); //-----------------Events-------------------// + messageHub.onDidReceiveMessage("clearDetails", function (msg) { + $scope.$apply(function () { + $scope.selectedEntity = null; + $scope.action = "select"; + }); + }); + messageHub.onDidReceiveMessage("entityCreated", function (msg) { + refreshData(); $scope.loadPage($scope.dataPage, $scope.filter); }); messageHub.onDidReceiveMessage("entityUpdated", function (msg) { + refreshData(); $scope.loadPage($scope.dataPage, $scope.filter); }); @@ -68,7 +71,10 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) if (!filter && $scope.filter) { filter = $scope.filter; } - $scope.dataPage = pageNumber; + if (!filter) { + filter = {}; + } + $scope.selectedEntity = null; entityApi.count(filter).then(function (response) { if (response.status != 200) { messageHub.showAlertError("SupplierPayment", `Unable to count SupplierPayment: '${response.message}'`); @@ -77,21 +83,23 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) if (response.data) { $scope.dataCount = response.data; } - let offset = (pageNumber - 1) * $scope.dataLimit; - let limit = $scope.dataLimit; - let request; - if (filter) { - filter.$offset = offset; - filter.$limit = limit; - request = entityApi.search(filter); - } else { - request = entityApi.list(offset, limit); + $scope.dataPages = Math.ceil($scope.dataCount / $scope.dataLimit); + filter.$offset = ($scope.dataPage - 1) * $scope.dataLimit; + filter.$limit = $scope.dataLimit; + if ($scope.dataReset) { + filter.$offset = 0; + filter.$limit = $scope.dataPage * $scope.dataLimit; } - request.then(function (response) { + + entityApi.search(filter).then(function (response) { if (response.status != 200) { messageHub.showAlertError("SupplierPayment", `Unable to list/filter SupplierPayment: '${response.message}'`); return; } + if ($scope.data == null || $scope.dataReset) { + $scope.data = []; + $scope.dataReset = false; + } response.data.forEach(e => { if (e.Date) { @@ -102,7 +110,8 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) } }); - $scope.data = response.data; + $scope.data = $scope.data.concat(response.data); + $scope.dataPage++; }); }); }; @@ -110,21 +119,9 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) $scope.selectEntity = function (entity) { $scope.selectedEntity = entity; - }; - - $scope.openDetails = function (entity) { - $scope.selectedEntity = entity; - messageHub.showDialogWindow("SupplierPayment-details", { - action: "select", + messageHub.postMessage("entitySelected", { entity: entity, - optionsCurrency: $scope.optionsCurrency, - optionsCompany: $scope.optionsCompany, - }); - }; - - $scope.openFilter = function (entity) { - messageHub.showDialogWindow("SupplierPayment-filter", { - entity: $scope.filterEntity, + selectedMainEntityId: entity.Id, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, }); @@ -132,25 +129,26 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) $scope.createEntity = function () { $scope.selectedEntity = null; - messageHub.showDialogWindow("SupplierPayment-details", { - action: "create", + $scope.action = "create"; + + messageHub.postMessage("createEntity", { entity: {}, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, - }, null, false); + }); }; - $scope.updateEntity = function (entity) { - messageHub.showDialogWindow("SupplierPayment-details", { - action: "update", - entity: entity, + $scope.updateEntity = function () { + $scope.action = "update"; + messageHub.postMessage("updateEntity", { + entity: $scope.selectedEntity, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, - }, null, false); + }); }; - $scope.deleteEntity = function (entity) { - let id = entity.Id; + $scope.deleteEntity = function () { + let id = $scope.selectedEntity.Id; messageHub.showDialogAsync( 'Delete SupplierPayment?', `Are you sure you want to delete SupplierPayment? This action cannot be undone.`, @@ -171,6 +169,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) messageHub.showAlertError("SupplierPayment", `Unable to delete SupplierPayment: '${response.message}'`); return; } + refreshData(); $scope.loadPage($scope.dataPage, $scope.filter); messageHub.postMessage("clearDetails"); }); @@ -178,6 +177,14 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) }); }; + $scope.openFilter = function (entity) { + messageHub.showDialogWindow("SupplierPayment-filter", { + entity: $scope.filterEntity, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + }); + }; + //----------------Dropdowns-----------------// $scope.optionsCurrency = []; $scope.optionsCompany = []; diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/controller.js b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/controller.js index a86f49e..7a28697 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/controller.js @@ -102,6 +102,7 @@ angular.module('page', ["ideUI", "ideView"]) entity: entity, filter: filter }); + messageHub.postMessage("clearDetails"); $scope.cancel(); }; diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/index.html b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/index.html index a410172..f8a2055 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/index.html +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/index.html @@ -285,7 +285,7 @@
- + diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/view.extension b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/view.extension index f023ea1..a518d80 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/view.extension +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/view.extension @@ -1,5 +1,5 @@ { "module": "codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/view.js", - "extensionPoint": "codbex-payments-dialog-window", + "extensionPoint": "dialog-window", "description": "codbex-payments - Application Dialog Window" } \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/controller.js index 4811fd5..6605f25 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/controller.js @@ -5,7 +5,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) .config(["entityApiProvider", function (entityApiProvider) { entityApiProvider.baseUrl = "/services/ts/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentService.ts"; }]) - .controller('PageController', ['$scope', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, messageHub, ViewParameters, entityApi) { + .controller('PageController', ['$scope', '$http', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, $http, messageHub, ViewParameters, entityApi) { $scope.entity = {}; $scope.forms = { @@ -64,7 +64,29 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) }; $scope.serviceCurrency = "/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts"; + + $scope.optionsCurrency = []; + + $http.get("/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts").then(function (response) { + $scope.optionsCurrency = response.data.map(e => { + return { + value: e.Id, + text: e.Code + } + }); + }); $scope.serviceCompany = "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts"; + + $scope.optionsCompany = []; + + $http.get("/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts").then(function (response) { + $scope.optionsCompany = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); $scope.cancel = function () { $scope.entity = {}; diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/view.extension b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/view.extension index 9854df4..0c1f297 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/view.extension +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/view.extension @@ -1 +1 @@ -{"module":"codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/view.js","extensionPoint":"codbex-payments-dialog-window","description":"codbex-payments - Application Dialog Window"} \ No newline at end of file +{"module":"codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/view.js","extensionPoint":"dialog-window","description":"codbex-payments - Application Dialog Window"} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html index 6cbd1ff..edc60e5 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html @@ -18,86 +18,59 @@ Items - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DateValorCompanyIBANCounterpartyIBANCounterpartyNameAmountCurrencyReasonDescriptionCompanyNameUUIDReference
No data available.
- - - - {{next.CompanyIBAN}}{{next.CounterpartyIBAN}}{{next.CounterpartyName}}{{next.Amount}} - {{optionsCurrencyValue(next.Currency)}} - {{next.Reason}}{{next.Description}} - {{optionsCompanyValue(next.Company)}} - {{next.Name}}{{next.UUID}}{{next.Reference}} - - - - - - - - - - - - - - -
+ + + + + + + {{next.Valor | date: "dd/MMM/yyyy"}} | + {{next.CompanyIBAN}} | + {{next.CounterpartyIBAN}} | + {{next.CounterpartyName}} | + {{next.Amount}} | + {{optionsCurrencyValue(next.Currency)}} | + {{next.Reason}} | + {{next.Description}} | + {{optionsCompanyValue(next.Company)}} | + {{next.Name}} | + {{next.UUID}} | + {{next.Reference}} + + + + + + + Load More ... + - - - diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/controller.js b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/controller.js new file mode 100644 index 0000000..76eb52a --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/controller.js @@ -0,0 +1,168 @@ +angular.module('page', ["ideUI", "ideView", "entityApi"]) + .config(["messageHubProvider", function (messageHubProvider) { + messageHubProvider.eventIdPrefix = 'codbex-payments.SupplierPayment.SupplierPayment'; + }]) + .config(["entityApiProvider", function (entityApiProvider) { + entityApiProvider.baseUrl = "/services/ts/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentService.ts"; + }]) + .controller('PageController', ['$scope', '$http', 'Extensions', 'messageHub', 'entityApi', function ($scope, $http, Extensions, messageHub, entityApi) { + + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: "SupplierPayment Details", + create: "Create SupplierPayment", + update: "Update SupplierPayment" + }; + $scope.action = 'select'; + + //-----------------Custom Actions-------------------// + Extensions.get('dialogWindow', 'codbex-payments-custom-action').then(function (response) { + $scope.entityActions = response.filter(e => e.perspective === "SupplierPayment" && e.view === "SupplierPayment" && e.type === "entity"); + }); + + $scope.triggerEntityAction = function (action) { + messageHub.showDialogWindow( + action.id, + { + id: $scope.entity.Id + }, + null, + true, + action + ); + }; + //-----------------Custom Actions-------------------// + + //-----------------Events-------------------// + messageHub.onDidReceiveMessage("clearDetails", function (msg) { + $scope.$apply(function () { + $scope.entity = {}; + $scope.optionsCurrency = []; + $scope.optionsCompany = []; + $scope.action = 'select'; + }); + }); + + messageHub.onDidReceiveMessage("entitySelected", function (msg) { + $scope.$apply(function () { + if (msg.data.entity.Date) { + msg.data.entity.Date = new Date(msg.data.entity.Date); + } + if (msg.data.entity.Valor) { + msg.data.entity.Valor = new Date(msg.data.entity.Valor); + } + $scope.entity = msg.data.entity; + $scope.optionsCurrency = msg.data.optionsCurrency; + $scope.optionsCompany = msg.data.optionsCompany; + $scope.action = 'select'; + }); + }); + + messageHub.onDidReceiveMessage("createEntity", function (msg) { + $scope.$apply(function () { + $scope.entity = {}; + $scope.optionsCurrency = msg.data.optionsCurrency; + $scope.optionsCompany = msg.data.optionsCompany; + $scope.action = 'create'; + }); + }); + + messageHub.onDidReceiveMessage("updateEntity", function (msg) { + $scope.$apply(function () { + if (msg.data.entity.Date) { + msg.data.entity.Date = new Date(msg.data.entity.Date); + } + if (msg.data.entity.Valor) { + msg.data.entity.Valor = new Date(msg.data.entity.Valor); + } + $scope.entity = msg.data.entity; + $scope.optionsCurrency = msg.data.optionsCurrency; + $scope.optionsCompany = msg.data.optionsCompany; + $scope.action = 'update'; + }); + }); + + $scope.serviceCurrency = "/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts"; + $scope.serviceCompany = "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts"; + + //-----------------Events-------------------// + + $scope.create = function () { + entityApi.create($scope.entity).then(function (response) { + if (response.status != 201) { + messageHub.showAlertError("SupplierPayment", `Unable to create SupplierPayment: '${response.message}'`); + return; + } + messageHub.postMessage("entityCreated", response.data); + messageHub.postMessage("clearDetails", response.data); + messageHub.showAlertSuccess("SupplierPayment", "SupplierPayment successfully created"); + }); + }; + + $scope.update = function () { + entityApi.update($scope.entity.Id, $scope.entity).then(function (response) { + if (response.status != 200) { + messageHub.showAlertError("SupplierPayment", `Unable to update SupplierPayment: '${response.message}'`); + return; + } + messageHub.postMessage("entityUpdated", response.data); + messageHub.postMessage("clearDetails", response.data); + messageHub.showAlertSuccess("SupplierPayment", "SupplierPayment successfully updated"); + }); + }; + + $scope.cancel = function () { + messageHub.postMessage("clearDetails"); + }; + + //-----------------Dialogs-------------------// + + $scope.createCurrency = function () { + messageHub.showDialogWindow("Currency-details", { + action: "create", + entity: {}, + }, null, false); + }; + $scope.createCompany = function () { + messageHub.showDialogWindow("Company-details", { + action: "create", + entity: {}, + }, null, false); + }; + + //-----------------Dialogs-------------------// + + + + //----------------Dropdowns-----------------// + + $scope.refreshCurrency = function () { + $scope.optionsCurrency = []; + $http.get("/services/ts/codbex-currencies/gen/codbex-currencies/api/Currencies/CurrencyService.ts").then(function (response) { + $scope.optionsCurrency = response.data.map(e => { + return { + value: e.Id, + text: e.Code + } + }); + }); + }; + $scope.refreshCompany = function () { + $scope.optionsCompany = []; + $http.get("/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts").then(function (response) { + $scope.optionsCompany = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + }; + + //----------------Dropdowns-----------------// + + + }]); \ No newline at end of file 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 new file mode 100644 index 0000000..27d5e06 --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html @@ -0,0 +1,334 @@ + + + + + + + + + + + + + + + + + + + + +
+ Date +
+
+ + + + Incorrect Input + + +
+
+ +
+ Valor +
+
+ + + + Incorrect Input + + +
+
+ +
+ CompanyIBAN +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ CounterpartyIBAN +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ CounterpartyName +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Amount +
+
+ + + +
+
+ +
+ Currency +
+
+ + +
+
+ + + +
+
+ +
+ Reason +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Description +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Company +
+
+ + +
+
+ + + +
+
+ +
+ Name +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ UUID +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Reference +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/view.extension b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/view.extension new file mode 100644 index 0000000..68643e5 --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/view.extension @@ -0,0 +1 @@ +{"module":"codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/view.js","extensionPoint":"codbex-payments-view","description":"codbex-payments - Application View - Main Details"} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/view.js b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/view.js new file mode 100644 index 0000000..2d404ac --- /dev/null +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/view.js @@ -0,0 +1,19 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: "SupplierPayment-details", + label: "SupplierPayment", + factory: "frame", + region: "center", + link: "/services/web/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html", + perspectiveName: "SupplierPayment", +}; + +if (typeof exports !== 'undefined') { + exports.getView = function () { + return viewData; + } +} diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/view.js b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/view.js index 9a39426..0f32a2b 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/view.js +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/view.js @@ -7,7 +7,7 @@ const viewData = { id: "SupplierPayment", label: "SupplierPayment", factory: "frame", - region: "center", + region: "left", link: "/services/web/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html", perspectiveName: "SupplierPayment", }; diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/index.html b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/index.html index 982edfb..ea14f76 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/index.html +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/index.html @@ -52,7 +52,7 @@ .constant('extensionPoint', { perspectives: 'codbex-payments', views: 'codbex-payments-view', - dialogWindows: 'codbex-payments-dialog-window' + dialogWindows: 'dialog-window' }) .controller('ApplicationController', ['$scope', 'messageHub', 'Extensions', function ($scope, messageHub, Extensions) { $scope.state = {