@optimiser/common 1.0.300 → 1.0.302
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/helper.js +1 -0
- package/dist/lib/utility.js +3 -3
- package/package.json +1 -1
package/dist/lib/helper.js
CHANGED
|
@@ -405,6 +405,7 @@ var GetDateRangeFromOperatorValue = function (operator, fiscalMonth, fiscalFrom)
|
|
|
405
405
|
var momentObj = moment_1.default();
|
|
406
406
|
var getFiscalMonthIndex = moment_1.default.monthsShort().findIndex(function (month) { return month === fiscalMonth; });
|
|
407
407
|
// GET FISCAL MONTH INDEX
|
|
408
|
+
// if (operator.includes("Fiscal")) {
|
|
408
409
|
if (operator.includes("Fiscal") || ["Year to Date", "year-to-date"].includes(operator)) {
|
|
409
410
|
if (fiscalFrom === "End") {
|
|
410
411
|
fiscalMonth = momentObj.clone().month(fiscalMonth).add(1, "months").format('MMM'); // Modify FiscalMonth in FiscalFrom - End
|
package/dist/lib/utility.js
CHANGED
|
@@ -4635,10 +4635,10 @@ function ValidateUserInput(options) {
|
|
|
4635
4635
|
else if (field.UIDataType == 'decimal' && isNaN(fieldData)) {
|
|
4636
4636
|
msg = 'Invalid value for ' + field.DisplayName + '!';
|
|
4637
4637
|
}
|
|
4638
|
-
else if (field.MinValue !== undefined && fieldData < field.MinValue) {
|
|
4638
|
+
else if (field.MinValue !== undefined && field.MinValue !== null && fieldData < field.MinValue) {
|
|
4639
4639
|
msg = field.DisplayName + ' value must be greater then or equal to ' + field.MinValue;
|
|
4640
4640
|
}
|
|
4641
|
-
else if (field.
|
|
4641
|
+
else if (field.MaxValue !== undefined && field.MaxValue !== null && field.MaxValue < fieldData) {
|
|
4642
4642
|
msg = field.DisplayName + ' value must be smaller then or equal to ' + field.MaxValue;
|
|
4643
4643
|
}
|
|
4644
4644
|
}
|
|
@@ -4879,7 +4879,7 @@ function ValidateUserInput(options) {
|
|
|
4879
4879
|
case 45:
|
|
4880
4880
|
{
|
|
4881
4881
|
// Maxlength check;
|
|
4882
|
-
if (field.MaxLength !== undefined && fieldData.length > field.MaxLength) {
|
|
4882
|
+
if (field.MaxLength !== undefined && field.MaxLength !== null && fieldData.length > field.MaxLength) {
|
|
4883
4883
|
msg = field.DisplayName + ' can not be greater then ' + field.MaxLength + ' characters!';
|
|
4884
4884
|
}
|
|
4885
4885
|
if (!IsStringValue(fieldData)) {
|