diff --git a/codbex-payments/codbex-payments.edm b/codbex-payments/codbex-payments.edm
index 98765c8..5759155 100644
--- a/codbex-payments/codbex-payments.edm
+++ b/codbex-payments/codbex-payments.edm
@@ -13,7 +13,7 @@
-
+
@@ -31,7 +31,7 @@
-
+
@@ -49,7 +49,7 @@
-
+
@@ -205,5 +205,5 @@
-
+
\ No newline at end of file
diff --git a/codbex-payments/codbex-payments.gen b/codbex-payments/codbex-payments.gen
index adacd1d..21e0ed6 100644
--- a/codbex-payments/codbex-payments.gen
+++ b/codbex-payments/codbex-payments.gen
@@ -4,13 +4,46 @@
"brandUrl": "https://www.codbex.com/",
"title": "Payments Management Module",
"description": "Managing Payments Data",
+ "fileName": "codbex-payments",
+ "genFolderName": "codbex-payments",
+ "dataSource": "DefaultDB",
+ "roles": [
+ {
+ "entityName": "CustomerPayment",
+ "roleRead": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly",
+ "roleWrite": "codbex-payments.CustomerPayment.CustomerPaymentFullAccess"
+ },
+ {
+ "entityName": "SupplierPayment",
+ "roleRead": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly",
+ "roleWrite": "codbex-payments.SupplierPayment.SupplierPaymentFullAccess"
+ },
+ {
+ "entityName": "EmployeePayment",
+ "roleRead": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly",
+ "roleWrite": "codbex-payments.EmployeePayment.EmployeePaymentFullAccess"
+ },
+ {
+ "entityName": "PaymentRecord",
+ "roleRead": "codbex-payments.PaymentRecord.PaymentRecordReadOnly",
+ "roleWrite": "codbex-payments.PaymentRecord.PaymentRecordFullAccess"
+ },
+ {
+ "entityName": "PaymentType",
+ "roleRead": "codbex-payments.Settings.PaymentTypeReadOnly",
+ "roleWrite": "codbex-payments.Settings.PaymentTypeFullAccess"
+ },
+ {
+ "entityName": "PaymentAdjustment",
+ "roleRead": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly",
+ "roleWrite": "codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess"
+ }
+ ],
+ "tprefix": "codbex-payments-model",
"projectName": "codbex-payments",
"workspaceName": "workspace",
"filePath": "codbex-payments.model",
"templateId": "template-application-angular-v2/template/template.js",
- "fileName": "codbex-payments",
- "genFolderName": "codbex-payments",
- "dataSource": "DefaultDB",
"perspectives": {
"CustomerPayment": {
"views": [
@@ -231,39 +264,6 @@
"role": ""
}
},
- "roles": [
- {
- "entityName": "CustomerPayment",
- "roleRead": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly",
- "roleWrite": "codbex-payments.CustomerPayment.CustomerPaymentFullAccess"
- },
- {
- "entityName": "SupplierPayment",
- "roleRead": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly",
- "roleWrite": "codbex-payments.SupplierPayment.SupplierPaymentFullAccess"
- },
- {
- "entityName": "EmployeePayment",
- "roleRead": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly",
- "roleWrite": "codbex-payments.EmployeePayment.EmployeePaymentFullAccess"
- },
- {
- "entityName": "PaymentRecord",
- "roleRead": "codbex-payments.PaymentRecord.PaymentRecordReadOnly",
- "roleWrite": "codbex-payments.PaymentRecord.PaymentRecordFullAccess"
- },
- {
- "entityName": "PaymentType",
- "roleRead": "codbex-payments.Settings.PaymentTypeReadOnly",
- "roleWrite": "codbex-payments.Settings.PaymentTypeFullAccess"
- },
- {
- "entityName": "PaymentAdjustment",
- "roleRead": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly",
- "roleWrite": "codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess"
- }
- ],
- "tprefix": "codbex-payments-model",
"models": [
{
"properties": [
@@ -622,7 +622,7 @@
},
{
"auditType": "NONE",
- "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(18)",
+ "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Customer Payment')",
"dataLength": "20",
"dataName": "CUSTOMERPAYMENT_NAME",
"dataNullable": true,
@@ -1131,7 +1131,7 @@
},
{
"auditType": "NONE",
- "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(18)",
+ "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Customer Payment')",
"dataLength": "20",
"dataName": "CUSTOMERPAYMENT_NAME",
"dataNullable": true,
@@ -1553,7 +1553,7 @@
},
{
"auditType": "NONE",
- "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(19)",
+ "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Supplier Payment')",
"dataLength": "20",
"dataName": "SUPPLIERPAYMENT_NAME",
"dataNullable": true,
@@ -2060,7 +2060,7 @@
},
{
"auditType": "NONE",
- "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(19)",
+ "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Supplier Payment')",
"dataLength": "20",
"dataName": "SUPPLIERPAYMENT_NAME",
"dataNullable": true,
@@ -2539,7 +2539,7 @@
},
{
"auditType": "NONE",
- "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(20)",
+ "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Employee Payment')",
"dataLength": "20",
"dataName": "EMPLOYEEPAYMENT_NAME",
"dataNullable": true,
@@ -3046,7 +3046,7 @@
},
{
"auditType": "NONE",
- "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(20)",
+ "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Employee Payment')",
"dataLength": "20",
"dataName": "EMPLOYEEPAYMENT_NAME",
"dataNullable": true,
diff --git a/codbex-payments/codbex-payments.model b/codbex-payments/codbex-payments.model
index f9788d5..a310069 100644
--- a/codbex-payments/codbex-payments.model
+++ b/codbex-payments/codbex-payments.model
@@ -200,7 +200,7 @@
},
{
"auditType": "NONE",
- "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(18)",
+ "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Customer Payment')",
"dataLength": "20",
"dataName": "CUSTOMERPAYMENT_NAME",
"dataNullable": "true",
@@ -495,7 +495,7 @@
},
{
"auditType": "NONE",
- "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(19)",
+ "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Supplier Payment')",
"dataLength": "20",
"dataName": "SUPPLIERPAYMENT_NAME",
"dataNullable": "true",
@@ -788,7 +788,7 @@
},
{
"auditType": "NONE",
- "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(20)",
+ "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Employee Payment')",
"dataLength": "20",
"dataName": "EMPLOYEEPAYMENT_NAME",
"dataNullable": "true",
diff --git a/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentRepository.ts b/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentRepository.ts
index aea064b..aac6864 100644
--- a/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentRepository.ts
+++ b/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentRepository.ts
@@ -32,13 +32,13 @@ export class CustomerPaymentRepository extends Repository
}
public override create(entity: CustomerPaymentEntity): string | number {
- entity.Name = new NumberGeneratorService().generate(18);
+ entity.Name = new NumberGeneratorService().generateByType('Customer Payment');
entity.UUID = require("sdk/utils/uuid").random();
return super.create(entity);
}
public override upsert(entity: CustomerPaymentEntity): string | number {
- entity.Name = new NumberGeneratorService().generate(18);
+ entity.Name = new NumberGeneratorService().generateByType('Customer Payment');
entity.UUID = require("sdk/utils/uuid").random();
return super.upsert(entity);
}
diff --git a/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentRepository.ts b/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentRepository.ts
index ca0161c..93e2db5 100644
--- a/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentRepository.ts
+++ b/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentRepository.ts
@@ -32,13 +32,13 @@ export class EmployeePaymentRepository extends Repository
}
public override create(entity: EmployeePaymentEntity): string | number {
- entity.Name = new NumberGeneratorService().generate(20);
+ entity.Name = new NumberGeneratorService().generateByType('Employee Payment');
entity.UUID = require("sdk/utils/uuid").random();
return super.create(entity);
}
public override upsert(entity: EmployeePaymentEntity): string | number {
- entity.Name = new NumberGeneratorService().generate(20);
+ entity.Name = new NumberGeneratorService().generateByType('Employee Payment');
entity.UUID = require("sdk/utils/uuid").random();
return super.upsert(entity);
}
diff --git a/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentRepository.ts b/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentRepository.ts
index a800a9a..abf645a 100644
--- a/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentRepository.ts
+++ b/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentRepository.ts
@@ -32,13 +32,13 @@ export class SupplierPaymentRepository extends Repository
}
public override create(entity: SupplierPaymentEntity): string | number {
- entity.Name = new NumberGeneratorService().generate(19);
+ entity.Name = new NumberGeneratorService().generateByType('Supplier Payment');
entity.UUID = require("sdk/utils/uuid").random();
return super.create(entity);
}
public override upsert(entity: SupplierPaymentEntity): string | number {
- entity.Name = new NumberGeneratorService().generate(19);
+ entity.Name = new NumberGeneratorService().generateByType('Supplier Payment');
entity.UUID = require("sdk/utils/uuid").random();
return super.upsert(entity);
}
diff --git a/codbex-payments/package.json b/codbex-payments/package.json
index 8b39717..a87758c 100644
--- a/codbex-payments/package.json
+++ b/codbex-payments/package.json
@@ -8,12 +8,11 @@
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
- "scripts": {
- "build": "tsc"
- },
"dependencies": {
- "@codbex/codbex-partners": "0.9.2",
- "@codbex/codbex-employees": "0.6.0",
- "@codbex/codbex-currencies": "1.0.0"
+ "@codbex/codbex-partners": "^1.0.0",
+ "@codbex/codbex-employees": "^1.0.0",
+ "@codbex/codbex-currencies": "^1.2.0",
+ "@codbex/codbex-number-generator": "^1.1.0",
+ "@codbex/codbex-number-generator-data": "^1.0.0"
}
}
diff --git a/codbex-payments/project.json b/codbex-payments/project.json
index a5e6620..672c5ae 100644
--- a/codbex-payments/project.json
+++ b/codbex-payments/project.json
@@ -1,50 +1,3 @@
{
- "guid": "codbex-payments",
- "repository": {
- "type": "git",
- "branch": "main",
- "url": "https://github.com/codbex/codbex-payments.git"
- },
- "dependencies": [
- {
- "guid": "codbex-partners",
- "type": "git",
- "url": "https://github.com/codbex/codbex-partners.git",
- "branch": "main"
- },
- {
- "guid": "codbex-employees",
- "type": "git",
- "url": "https://github.com/codbex/codbex-employees.git",
- "branch": "main"
- },
- {
- "guid": "codbex-currencies",
- "type": "git",
- "url": "https://github.com/codbex/codbex-currencies.git",
- "branch": "main"
- },
- {
- "guid": "codbex-navigation-groups",
- "type": "git",
- "url": "https://github.com/codbex/codbex-navigation-groups",
- "branch": "main"
- }
- ],
- "actions": [
- {
- "name": "Build TypeScript",
- "commands": [
- {
- "os": "unix",
- "command": "tsc"
- },
- {
- "os": "windows",
- "command": "cmd /c tsc"
- }
- ],
- "registry": "true"
- }
- ]
+ "guid": "codbex-payments"
}
\ No newline at end of file
diff --git a/codbex-payments/tsconfig.json b/codbex-payments/tsconfig.json
deleted file mode 100644
index 9b957e3..0000000
--- a/codbex-payments/tsconfig.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "compilerOptions": {
- "module": "ESNext",
- "target": "ES6",
- "moduleResolution": "Node",
- "baseUrl": "../",
- "lib": [
- "ESNext",
- "DOM"
- ],
- "paths": {
- "sdk/*": [
- "./modules/src/*"
- ],
- "/*": [
- "./*"
- ]
- },
- "types": [
- "../modules/types"
- ]
- }
-}
\ No newline at end of file