{{ 'codbex-partners:codbex-partners-model.t.CUSTOMER_IDENTIFIER' | t }}
diff --git a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/index.html b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/index.html
index 9af215c..5c16745 100644
--- a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/index.html
+++ b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/index.html
@@ -52,6 +52,7 @@
{{next.PostalCode}} |
{{next.TIN}} |
{{next.IBAN}} |
+ {{optionsResponsiblePersonValue(next.ResponsiblePerson)}} |
{{next.Identifier}} |
{{next.CreatedAt | date: "dd/MMM/yyyy HH:MM"}}
diff --git a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/controller.js b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/controller.js
index 25e102f..8dd76e1 100644
--- a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/controller.js
+++ b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/controller.js
@@ -52,6 +52,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
$scope.entity = {};
$scope.optionsCountry = [];
$scope.optionsCity = [];
+ $scope.optionsResponsiblePerson = [];
$scope.action = 'select';
});
}});
@@ -63,6 +64,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
$scope.entity = data.entity;
$scope.optionsCountry = data.optionsCountry;
$scope.optionsCity = data.optionsCity;
+ $scope.optionsResponsiblePerson = data.optionsResponsiblePerson;
$scope.action = 'select';
});
}});
@@ -71,6 +73,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
$scope.entity = {};
$scope.optionsCountry = data.optionsCountry;
$scope.optionsCity = data.optionsCity;
+ $scope.optionsResponsiblePerson = data.optionsResponsiblePerson;
$scope.action = 'create';
});
}});
@@ -82,12 +85,14 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
$scope.entity = data.entity;
$scope.optionsCountry = data.optionsCountry;
$scope.optionsCity = data.optionsCity;
+ $scope.optionsResponsiblePerson = data.optionsResponsiblePerson;
$scope.action = 'update';
});
}});
$scope.serviceCountry = '/services/ts/codbex-countries/gen/codbex-countries/api/Settings/CountryController.ts';
$scope.serviceCity = '/services/ts/codbex-cities/gen/codbex-cities/api/Settings/CityController.ts';
+ $scope.serviceResponsiblePerson = '/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts';
//-----------------Events-------------------//
@@ -165,6 +170,16 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
closeButton: false
});
};
+ $scope.createResponsiblePerson = () => {
+ Dialogs.showWindow({
+ id: 'Employee-details',
+ params: {
+ action: 'create',
+ entity: {},
+ },
+ closeButton: false
+ });
+ };
//-----------------Dialogs-------------------//
@@ -206,6 +221,23 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
});
});
};
+ $scope.refreshResponsiblePerson = () => {
+ $scope.optionsResponsiblePerson = [];
+ $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts').then((response) => {
+ $scope.optionsResponsiblePerson = response.data.map(e => ({
+ value: e.Id,
+ text: e.Name
+ }));
+ }, (error) => {
+ console.error(error);
+ const message = error.data ? error.data.message : '';
+ Dialogs.showAlert({
+ title: 'ResponsiblePerson',
+ message: LocaleService.t('codbex-partners:codbex-partners-model.messages.error.unableToLoad', { message: message }),
+ type: AlertTypes.Error
+ });
+ });
+ };
//----------------Dropdowns-----------------//
});
\ No newline at end of file
diff --git a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/index.html b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/index.html
index e04f419..aaaddc6 100644
--- a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/index.html
+++ b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/index.html
@@ -142,7 +142,7 @@
- {{ 'codbex-partners:codbex-partners-model.t.CUSTOMER_FAX' | t }}
+ {{ 'codbex-partners:codbex-partners-model.t.CUSTOMER_FAX' | t }}
+
+
+ {{ 'codbex-partners:codbex-partners-model.t.CUSTOMER_RESPONSIBLEPERSON' | t }}
+
+
+
+
+
+
+
+
+
+
{{ 'codbex-partners:codbex-partners-model.t.CUSTOMER_IDENTIFIER' | t }}
diff --git a/codbex-partners/package.json b/codbex-partners/package.json
index 284239f..7167400 100644
--- a/codbex-partners/package.json
+++ b/codbex-partners/package.json
@@ -10,6 +10,7 @@
},
"dependencies": {
"@codbex/codbex-countries": "^1.2.0",
- "@codbex/codbex-cities": "^1.1.0"
+ "@codbex/codbex-cities": "^1.1.0",
+ "@codbex/codbex-partners": "^1.0.0"
}
-}
+}
\ No newline at end of file
diff --git a/codbex-partners/project.json b/codbex-partners/project.json
index 7ec93a2..52972ec 100644
--- a/codbex-partners/project.json
+++ b/codbex-partners/project.json
@@ -1,3 +1 @@
-{
- "guid": "codbex-partners"
-}
+{"guid":"codbex-partners","actions":[{"name":"Build TypeScript","commands":[{"os":"unix","command":"tsc"},{"os":"windows","command":"cmd /c tsc"}],"registry":"true"}]}
\ No newline at end of file
diff --git a/codbex-partners/translations/en-US/codbex-partners.model.json b/codbex-partners/translations/en-US/codbex-partners.model.json
index ed0f1c0..87a2c8a 100644
--- a/codbex-partners/translations/en-US/codbex-partners.model.json
+++ b/codbex-partners/translations/en-US/codbex-partners.model.json
@@ -81,6 +81,7 @@
"CUSTOMER_POSTALCODE": "PostalCode",
"CUSTOMER_TIN": "TIN",
"CUSTOMER_IBAN": "IBAN",
+ "CUSTOMER_RESPONSIBLEPERSON": "ResponsiblePerson",
"CUSTOMER_IDENTIFIER": "Identifier",
"CUSTOMER_CREATEDAT": "CreatedAt",
"SUPPLIER": "Supplier",
@@ -150,6 +151,20 @@
"MANUFACTURERCONTACT_DESIGNATION": "Designation",
"MANUFACTURERCONTACT_EMAIL": "Email",
"MANUFACTURERCONTACT_PHONE": "Phone",
+ "EMPLOYEE": "Employee",
+ "EMPLOYEE_ID": "Id",
+ "EMPLOYEE_FIRSTNAME": "First Name",
+ "EMPLOYEE_MIDDLENAME": "Middle Name",
+ "EMPLOYEE_LASTNAME": "Last Name",
+ "EMPLOYEE_NAME": "Name",
+ "EMPLOYEE_EMAIL": "Email",
+ "EMPLOYEE_PHONENUMBER": "PhoneNumber",
+ "EMPLOYEE_BIRTHDATE": "BirthDate",
+ "EMPLOYEE_PERSONALNUMBER": "PersonalNumber",
+ "EMPLOYEE_NATIONALITY": "Nationality",
+ "EMPLOYEE_GENDER": "Gender",
+ "EMPLOYEE_MARTIALSTATUS": "MartialStatus",
+ "EMPLOYEE_IBAN": "IBAN",
"Customers": "Customers",
"Suppliers": "Suppliers",
"Manufacturers": "Manufacturers"