Skip to content
Code-Schnipsel Gruppen Projekte
Commit 5bf21ccc erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix: adjust uuid usage

Multiple changes were made to improve code quality and functionality. Here's a summary of the
changes:

- Debug log statements were removed from `ArticleList.js` and `ArticleSummary.js` for calculation
enabling and disabling methods. This helps to keep the console clean and focussed on critical
issues.
- Changed a misused property name from `hash` to `uuid` in `CopyErpEntityDialog.js`. This ensures
correct usage of identifiers.
- Multiple formatting changes for function declarations in `ERPEntities.js`, functions now follow
the format `function () {}` for unnamed functions.
- A `#id` field is newly included in `openPanelByUUID` function of `ERPEntities.js`.

These changes are expected to augment the performance of ERP modules, and improve the overall
readability of the code.
Übergeordneter 73b7d372
No related branches found
No related tags found
2 Merge Requests!178Update 'next-4.x' with latest changes from 'main',!177fix: adjust uuid usage
Pipeline #16374 bestanden mit Phase
in 2 Minuten und 36 Sekunden
......@@ -343,10 +343,8 @@ define('package/quiqqer/erp/bin/backend/controls/articles/ArticleList', [
}
if (!this.$calculate) {
console.log('add -> disableCalculation');
if (typeof Child.disableCalculation === 'function') Child.disableCalculation();
} else {
console.log('add -> enableCalculation');
if (typeof Child.enableCalculation === 'function') Child.enableCalculation();
}
......
......@@ -326,8 +326,6 @@ define('package/quiqqer/erp/bin/backend/controls/articles/ArticleSummary', [
}
this.getCurrencyFormatter().then(() => {
console.log(calculated.calculations.vatArray);
const vat = Object.entries(calculated.calculations.vatArray).map((val) => {
return {
text: val[1].text,
......
......@@ -153,7 +153,7 @@ define('package/quiqqer/erp/bin/backend/controls/dialogs/CopyErpEntityDialog', [
require([
'package/quiqqer/erp/bin/backend/utils/ERPEntities'
], function(ErpUtils) {
ErpUtils.openPanelByUUID(newCopy.hash);
ErpUtils.openPanelByUUID(newCopy.uuid);
});
}, {
'package': 'quiqqer/erp',
......
......@@ -2,7 +2,7 @@
* @module package/quiqqer/erp/bin/backend/utils/ERPEntities
* @author www.pcsg.de (Henning Leutz)
*/
define('package/quiqqer/erp/bin/backend/utils/ERPEntities', function() {
define('package/quiqqer/erp/bin/backend/utils/ERPEntities', function () {
'use strict';
return {
......@@ -13,7 +13,7 @@ define('package/quiqqer/erp/bin/backend/utils/ERPEntities', function() {
* @param {String} entityType
* @return {String}
*/
getPanelByEntity: function(entityType) {
getPanelByEntity: function (entityType) {
switch (entityType) {
case 'QUI\\ERP\\Order\\Order':
return 'package/quiqqer/order/bin/backend/controls/panels/Order';
......@@ -49,9 +49,9 @@ define('package/quiqqer/erp/bin/backend/utils/ERPEntities', function() {
return '';
},
getEntityTitle: function(uuid) {
return new Promise(function(resolve) {
require(['Ajax'], function(QUIAjax) {
getEntityTitle: function (uuid) {
return new Promise(function (resolve) {
require(['Ajax'], function (QUIAjax) {
QUIAjax.get('package_quiqqer_erp_ajax_getEntityTitle', resolve, {
'package': 'quiqqer/erp',
uuid: uuid
......@@ -60,13 +60,13 @@ define('package/quiqqer/erp/bin/backend/utils/ERPEntities', function() {
});
},
getEntity: function(uuid, entityPlugin) {
getEntity: function (uuid, entityPlugin) {
if (typeof entityPlugin === 'undefined') {
entityPlugin = false;
}
return new Promise(function(resolve) {
require(['Ajax'], function(QUIAjax) {
return new Promise(function (resolve) {
require(['Ajax'], function (QUIAjax) {
QUIAjax.get('package_quiqqer_erp_ajax_getEntity', resolve, {
'package': 'quiqqer/erp',
uuid: uuid,
......@@ -76,13 +76,14 @@ define('package/quiqqer/erp/bin/backend/utils/ERPEntities', function() {
});
},
openPanelByUUID: function(uuid) {
openPanelByUUID: function (uuid) {
return this.getTypeByUUID(uuid).then((entityType) => {
const panel = this.getPanelByEntity(entityType);
return new Promise(function(resolve) {
return new Promise(function (resolve) {
require(['utils/Panels', panel], (PanelUtils, Panel) => {
const PanelInstance = new Panel({
'#id': uuid,
uuid: uuid
});
......@@ -93,9 +94,9 @@ define('package/quiqqer/erp/bin/backend/utils/ERPEntities', function() {
});
},
getTypeByUUID: function(uuid) {
return new Promise(function(resolve) {
require(['Ajax'], function(QUIAjax) {
getTypeByUUID: function (uuid) {
return new Promise(function (resolve) {
require(['Ajax'], function (QUIAjax) {
QUIAjax.get('package_quiqqer_erp_ajax_getEntityType', resolve, {
'package': 'quiqqer/erp',
uuid: uuid
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren