@bygd/nc-report-ui 0.1.44 → 0.1.45
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/app/esm/index.js +16 -57
- package/dist/default/cjs/index.cjs +8 -54
- package/dist/default/esm/index.js +8 -54
- package/package.json +1 -1
package/dist/app/esm/index.js
CHANGED
|
@@ -90727,11 +90727,6 @@ const Filters = ({
|
|
|
90727
90727
|
|
|
90728
90728
|
// Check if this is a date filter
|
|
90729
90729
|
if (isDateDimension(existingFilter.dimension)) {
|
|
90730
|
-
// For date filters, validate that at least one date is provided
|
|
90731
|
-
if (!dateRangeFrom && !dateRangeTo) {
|
|
90732
|
-
return; // Don't save if no dates provided
|
|
90733
|
-
}
|
|
90734
|
-
|
|
90735
90730
|
// Update with new date range values (only include provided dates)
|
|
90736
90731
|
const dateValues = {};
|
|
90737
90732
|
if (dateRangeFrom) {
|
|
@@ -90748,11 +90743,6 @@ const Filters = ({
|
|
|
90748
90743
|
// Save the updated filter
|
|
90749
90744
|
onSaveFilter(fullPath, updatedFilter);
|
|
90750
90745
|
} else {
|
|
90751
|
-
// For regular filters, validate selected values
|
|
90752
|
-
if (selectedFilterValues.length === 0) {
|
|
90753
|
-
return; // Don't save if no values selected
|
|
90754
|
-
}
|
|
90755
|
-
|
|
90756
90746
|
// Update with new values
|
|
90757
90747
|
const updatedFilter = {
|
|
90758
90748
|
...existingFilter,
|
|
@@ -90926,13 +90916,6 @@ const Filters = ({
|
|
|
90926
90916
|
|
|
90927
90917
|
// Check if this is a date filter
|
|
90928
90918
|
const isDate = isDateDimension(selectedItem.dimension);
|
|
90929
|
-
|
|
90930
|
-
// Validate based on filter type
|
|
90931
|
-
if (isDate) {
|
|
90932
|
-
if (!dateRangeFrom && !dateRangeTo) return; // At least one date must be provided
|
|
90933
|
-
} else {
|
|
90934
|
-
if (selectedFilterValues.length === 0) return; // Regular filters must have values
|
|
90935
|
-
}
|
|
90936
90919
|
if (!selectedDimension) return;
|
|
90937
90920
|
|
|
90938
90921
|
// Build the complete relation objects array
|
|
@@ -91007,13 +90990,6 @@ const Filters = ({
|
|
|
91007
90990
|
// Check if this is a date filter
|
|
91008
90991
|
const isDate = isDateDimension(dimensionData.dimension);
|
|
91009
90992
|
|
|
91010
|
-
// Validate based on filter type
|
|
91011
|
-
if (isDate) {
|
|
91012
|
-
if (!dateRangeFrom && !dateRangeTo) return; // At least one date must be provided
|
|
91013
|
-
} else {
|
|
91014
|
-
if (selectedFilterValues.length === 0) return; // Regular filters must have values
|
|
91015
|
-
}
|
|
91016
|
-
|
|
91017
90993
|
// Prepare filter values based on type
|
|
91018
90994
|
let filterValues;
|
|
91019
90995
|
if (isDate) {
|
|
@@ -91385,14 +91361,7 @@ const Filters = ({
|
|
|
91385
91361
|
}, "Cancel"), /*#__PURE__*/gn.createElement(Button, {
|
|
91386
91362
|
variant: "contained",
|
|
91387
91363
|
onClick: handleSave,
|
|
91388
|
-
disabled:
|
|
91389
|
-
if (!selectedDimension) return true;
|
|
91390
|
-
const dimensionItems = getDimensionItems();
|
|
91391
|
-
const selectedItem = dimensionItems.find(item => item.key === selectedDimension);
|
|
91392
|
-
if (!selectedItem) return true;
|
|
91393
|
-
const isDate = isDateDimension(selectedItem.dimension);
|
|
91394
|
-
return isDate ? !dateRangeFrom && !dateRangeTo : selectedFilterValues.length === 0;
|
|
91395
|
-
})(),
|
|
91364
|
+
disabled: !selectedDimension,
|
|
91396
91365
|
sx: {
|
|
91397
91366
|
height: "40px",
|
|
91398
91367
|
fontFamily: "system-ui",
|
|
@@ -91538,13 +91507,7 @@ const Filters = ({
|
|
|
91538
91507
|
}, "Cancel"), /*#__PURE__*/gn.createElement(Button, {
|
|
91539
91508
|
variant: "contained",
|
|
91540
91509
|
onClick: handleSaveFromDimension,
|
|
91541
|
-
disabled:
|
|
91542
|
-
if (!selectedExistingDimension) return true;
|
|
91543
|
-
const dimensionData = existingDimensions.find(dim => dim.fullPath === selectedExistingDimension);
|
|
91544
|
-
if (!dimensionData) return true;
|
|
91545
|
-
const isDate = isDateDimension(dimensionData.dimension);
|
|
91546
|
-
return isDate ? !dateRangeFrom && !dateRangeTo : selectedFilterValues.length === 0;
|
|
91547
|
-
})(),
|
|
91510
|
+
disabled: !selectedExistingDimension,
|
|
91548
91511
|
sx: {
|
|
91549
91512
|
height: "40px",
|
|
91550
91513
|
fontFamily: "system-ui",
|
|
@@ -91818,7 +91781,6 @@ const Filters = ({
|
|
|
91818
91781
|
variant: "contained",
|
|
91819
91782
|
size: "small",
|
|
91820
91783
|
onClick: () => handleSaveEditedFilter(fullPath),
|
|
91821
|
-
disabled: isDate ? !dateRangeFrom && !dateRangeTo : selectedFilterValues.length === 0,
|
|
91822
91784
|
sx: {
|
|
91823
91785
|
textTransform: 'none',
|
|
91824
91786
|
borderRadius: '6px',
|
|
@@ -93114,20 +93076,12 @@ const ReportBuilder = ({
|
|
|
93114
93076
|
if (report.filters && Object.keys(report.filters).length > 0) {
|
|
93115
93077
|
Object.entries(report.filters).forEach(([fullPath, filterData]) => {
|
|
93116
93078
|
if (filterData.values) {
|
|
93117
|
-
//
|
|
93118
|
-
|
|
93119
|
-
|
|
93120
|
-
|
|
93121
|
-
|
|
93122
|
-
|
|
93123
|
-
});
|
|
93124
|
-
}
|
|
93125
|
-
} else if (typeof filterData.values === "object") {
|
|
93126
|
-
// Date range filter - add the object as-is
|
|
93127
|
-
conditions.push({
|
|
93128
|
-
[fullPath]: filterData.values
|
|
93129
|
-
});
|
|
93130
|
-
}
|
|
93079
|
+
// Include the condition as-is regardless of whether the array/object
|
|
93080
|
+
// has any entries - an explicitly saved (but empty) filter should
|
|
93081
|
+
// still appear in the query.
|
|
93082
|
+
conditions.push({
|
|
93083
|
+
[fullPath]: filterData.values
|
|
93084
|
+
});
|
|
93131
93085
|
}
|
|
93132
93086
|
});
|
|
93133
93087
|
}
|
|
@@ -93931,6 +93885,7 @@ const Root = () => {
|
|
|
93931
93885
|
const config = useConfig();
|
|
93932
93886
|
const client = config.client;
|
|
93933
93887
|
const merchants = config.merchants;
|
|
93888
|
+
const organizations = config.organizations;
|
|
93934
93889
|
|
|
93935
93890
|
//const test_token = config.test_token;
|
|
93936
93891
|
const token = config.tokens[config.active_user];
|
|
@@ -93948,8 +93903,10 @@ const Root = () => {
|
|
|
93948
93903
|
// client:"7774bcad-05dc-48cf-a52b-9a8a56168818",
|
|
93949
93904
|
// client:"7774bcad-05dc-48cf-a52b-9a8a56168829" // this is some wrong client id for testing
|
|
93950
93905
|
// client: undefined
|
|
93951
|
-
client: client || "7774bcad-05dc-48cf-a52b-9a8a56168818",
|
|
93952
|
-
|
|
93906
|
+
//client: client || "7774bcad-05dc-48cf-a52b-9a8a56168818",
|
|
93907
|
+
client: client || [],
|
|
93908
|
+
merchants: merchants || [],
|
|
93909
|
+
organizations: organizations || []
|
|
93953
93910
|
};
|
|
93954
93911
|
|
|
93955
93912
|
// Api.setBaseUrl(apiDefaults.base_url);
|
|
@@ -93988,8 +93945,9 @@ var tokens = {
|
|
|
93988
93945
|
"serdar.kizilkurt@gmail.com": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJXeFB6alpqaXJUcm5ienYwZW5iWHBhUjhoWklNQWRxb29FdEhaY0Nmbl9zIn0.eyJleHAiOjE3NjU5ODIzMjcsImlhdCI6MTc2NTk4MTQyNywianRpIjoiYjA4ZWMyMmYtN2IxMC00YzVjLWEwODgtNzA5MDhmNzJlNGIxIiwiaXNzIjoiaHR0cHM6Ly9pZHAubmV0Y2FwaXRhbC5wcm8vcmVhbG1zL25ldGNhcGl0YWwiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiNjAzNGI5NzktNzkyNi00NjJlLTljYjQtYjJmZWMzYjNjYzhjIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiYXBwIiwic2lkIjoiMjczYzA0OTItYjQwZS00ZmIwLWEwYWItMTRmMDU5NzUzYTM2IiwiYWNyIjoiMSIsImFsbG93ZWQtb3JpZ2lucyI6WyJodHRwOi8vbG9jYWxob3N0OjMxMDIiLCJodHRwczovL2FwcC5uZXRjYXBpdGFsLnBybyIsImh0dHBzOi8vZGV2Lm5ldGNhcGl0YWwucHJvIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJkZWZhdWx0LXJvbGVzLW5ldGNhcGl0YWwiLCJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJvcGVuaWQgZW1haWwgcHJvZmlsZSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiU2VyZGFyIFJlZFdvbGYiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJzZXJkYXIua2l6aWxrdXJ0QGdtYWlsLmNvbSIsImdpdmVuX25hbWUiOiJTZXJkYXIiLCJmYW1pbHlfbmFtZSI6IlJlZFdvbGYiLCJlbWFpbCI6InNlcmRhci5raXppbGt1cnRAZ21haWwuY29tIn0.mIrffBy6n4HmCnFJAX7Njl8fR-m-QQtsn2iGbyefXXK17lCP8b_lUlAvHHFaan7Te8OT8P8rHu9FgfSyPQkBMqZ0AVVf6VrhUmEO12wZx71Di59QNHjcZKfljNykPKLXXWEIWlulvScrLUsxuR5emufTJaxD9zU4fJzRh00vDCIuzIyl9o51asLmhNAtNnW8QUtT-rWOM6Fgh3pskP4yrGUe5dI17DpAYafcWgUNx86Qi9E09nzUE5IToKgXfQvVpPs7_ZwlcfOE95VNcO_pwRQQ85sJmFiUCg5_TWzNFJKoTui5barb74oBCP7OCJTb5yj5KeriL2ozg0e2IyVrHA"
|
|
93989
93946
|
};
|
|
93990
93947
|
var active_user = "s.kizilkurt@azerion.com";
|
|
93991
|
-
var client =
|
|
93948
|
+
var client = [];
|
|
93992
93949
|
var merchants = [];
|
|
93950
|
+
var organizations = [];
|
|
93993
93951
|
var base_url_local = "http://localhost:8081";
|
|
93994
93952
|
var base_url_prod = "https://dev-report-api.netcapital.pro";
|
|
93995
93953
|
var base_url = "http://localhost:8081";
|
|
@@ -94001,6 +93959,7 @@ var config = {
|
|
|
94001
93959
|
active_user: active_user,
|
|
94002
93960
|
client: client,
|
|
94003
93961
|
merchants: merchants,
|
|
93962
|
+
organizations: organizations,
|
|
94004
93963
|
base_url_local: base_url_local,
|
|
94005
93964
|
base_url_prod: base_url_prod,
|
|
94006
93965
|
base_url: base_url,
|
|
@@ -4792,11 +4792,6 @@ const Filters = ({
|
|
|
4792
4792
|
|
|
4793
4793
|
// Check if this is a date filter
|
|
4794
4794
|
if (isDateDimension(existingFilter.dimension)) {
|
|
4795
|
-
// For date filters, validate that at least one date is provided
|
|
4796
|
-
if (!dateRangeFrom && !dateRangeTo) {
|
|
4797
|
-
return; // Don't save if no dates provided
|
|
4798
|
-
}
|
|
4799
|
-
|
|
4800
4795
|
// Update with new date range values (only include provided dates)
|
|
4801
4796
|
const dateValues = {};
|
|
4802
4797
|
if (dateRangeFrom) {
|
|
@@ -4813,11 +4808,6 @@ const Filters = ({
|
|
|
4813
4808
|
// Save the updated filter
|
|
4814
4809
|
onSaveFilter(fullPath, updatedFilter);
|
|
4815
4810
|
} else {
|
|
4816
|
-
// For regular filters, validate selected values
|
|
4817
|
-
if (selectedFilterValues.length === 0) {
|
|
4818
|
-
return; // Don't save if no values selected
|
|
4819
|
-
}
|
|
4820
|
-
|
|
4821
4811
|
// Update with new values
|
|
4822
4812
|
const updatedFilter = {
|
|
4823
4813
|
...existingFilter,
|
|
@@ -4991,13 +4981,6 @@ const Filters = ({
|
|
|
4991
4981
|
|
|
4992
4982
|
// Check if this is a date filter
|
|
4993
4983
|
const isDate = isDateDimension(selectedItem.dimension);
|
|
4994
|
-
|
|
4995
|
-
// Validate based on filter type
|
|
4996
|
-
if (isDate) {
|
|
4997
|
-
if (!dateRangeFrom && !dateRangeTo) return; // At least one date must be provided
|
|
4998
|
-
} else {
|
|
4999
|
-
if (selectedFilterValues.length === 0) return; // Regular filters must have values
|
|
5000
|
-
}
|
|
5001
4984
|
if (!selectedDimension) return;
|
|
5002
4985
|
|
|
5003
4986
|
// Build the complete relation objects array
|
|
@@ -5072,13 +5055,6 @@ const Filters = ({
|
|
|
5072
5055
|
// Check if this is a date filter
|
|
5073
5056
|
const isDate = isDateDimension(dimensionData.dimension);
|
|
5074
5057
|
|
|
5075
|
-
// Validate based on filter type
|
|
5076
|
-
if (isDate) {
|
|
5077
|
-
if (!dateRangeFrom && !dateRangeTo) return; // At least one date must be provided
|
|
5078
|
-
} else {
|
|
5079
|
-
if (selectedFilterValues.length === 0) return; // Regular filters must have values
|
|
5080
|
-
}
|
|
5081
|
-
|
|
5082
5058
|
// Prepare filter values based on type
|
|
5083
5059
|
let filterValues;
|
|
5084
5060
|
if (isDate) {
|
|
@@ -5450,14 +5426,7 @@ const Filters = ({
|
|
|
5450
5426
|
}, "Cancel"), /*#__PURE__*/React__namespace.default.createElement(material.Button, {
|
|
5451
5427
|
variant: "contained",
|
|
5452
5428
|
onClick: handleSave,
|
|
5453
|
-
disabled:
|
|
5454
|
-
if (!selectedDimension) return true;
|
|
5455
|
-
const dimensionItems = getDimensionItems();
|
|
5456
|
-
const selectedItem = dimensionItems.find(item => item.key === selectedDimension);
|
|
5457
|
-
if (!selectedItem) return true;
|
|
5458
|
-
const isDate = isDateDimension(selectedItem.dimension);
|
|
5459
|
-
return isDate ? !dateRangeFrom && !dateRangeTo : selectedFilterValues.length === 0;
|
|
5460
|
-
})(),
|
|
5429
|
+
disabled: !selectedDimension,
|
|
5461
5430
|
sx: {
|
|
5462
5431
|
height: "40px",
|
|
5463
5432
|
fontFamily: "system-ui",
|
|
@@ -5603,13 +5572,7 @@ const Filters = ({
|
|
|
5603
5572
|
}, "Cancel"), /*#__PURE__*/React__namespace.default.createElement(material.Button, {
|
|
5604
5573
|
variant: "contained",
|
|
5605
5574
|
onClick: handleSaveFromDimension,
|
|
5606
|
-
disabled:
|
|
5607
|
-
if (!selectedExistingDimension) return true;
|
|
5608
|
-
const dimensionData = existingDimensions.find(dim => dim.fullPath === selectedExistingDimension);
|
|
5609
|
-
if (!dimensionData) return true;
|
|
5610
|
-
const isDate = isDateDimension(dimensionData.dimension);
|
|
5611
|
-
return isDate ? !dateRangeFrom && !dateRangeTo : selectedFilterValues.length === 0;
|
|
5612
|
-
})(),
|
|
5575
|
+
disabled: !selectedExistingDimension,
|
|
5613
5576
|
sx: {
|
|
5614
5577
|
height: "40px",
|
|
5615
5578
|
fontFamily: "system-ui",
|
|
@@ -5883,7 +5846,6 @@ const Filters = ({
|
|
|
5883
5846
|
variant: "contained",
|
|
5884
5847
|
size: "small",
|
|
5885
5848
|
onClick: () => handleSaveEditedFilter(fullPath),
|
|
5886
|
-
disabled: isDate ? !dateRangeFrom && !dateRangeTo : selectedFilterValues.length === 0,
|
|
5887
5849
|
sx: {
|
|
5888
5850
|
textTransform: 'none',
|
|
5889
5851
|
borderRadius: '6px',
|
|
@@ -7175,20 +7137,12 @@ const ReportBuilder = ({
|
|
|
7175
7137
|
if (report.filters && Object.keys(report.filters).length > 0) {
|
|
7176
7138
|
Object.entries(report.filters).forEach(([fullPath, filterData]) => {
|
|
7177
7139
|
if (filterData.values) {
|
|
7178
|
-
//
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
});
|
|
7185
|
-
}
|
|
7186
|
-
} else if (typeof filterData.values === "object") {
|
|
7187
|
-
// Date range filter - add the object as-is
|
|
7188
|
-
conditions.push({
|
|
7189
|
-
[fullPath]: filterData.values
|
|
7190
|
-
});
|
|
7191
|
-
}
|
|
7140
|
+
// Include the condition as-is regardless of whether the array/object
|
|
7141
|
+
// has any entries - an explicitly saved (but empty) filter should
|
|
7142
|
+
// still appear in the query.
|
|
7143
|
+
conditions.push({
|
|
7144
|
+
[fullPath]: filterData.values
|
|
7145
|
+
});
|
|
7192
7146
|
}
|
|
7193
7147
|
});
|
|
7194
7148
|
}
|
|
@@ -4711,11 +4711,6 @@ const Filters = ({
|
|
|
4711
4711
|
|
|
4712
4712
|
// Check if this is a date filter
|
|
4713
4713
|
if (isDateDimension(existingFilter.dimension)) {
|
|
4714
|
-
// For date filters, validate that at least one date is provided
|
|
4715
|
-
if (!dateRangeFrom && !dateRangeTo) {
|
|
4716
|
-
return; // Don't save if no dates provided
|
|
4717
|
-
}
|
|
4718
|
-
|
|
4719
4714
|
// Update with new date range values (only include provided dates)
|
|
4720
4715
|
const dateValues = {};
|
|
4721
4716
|
if (dateRangeFrom) {
|
|
@@ -4732,11 +4727,6 @@ const Filters = ({
|
|
|
4732
4727
|
// Save the updated filter
|
|
4733
4728
|
onSaveFilter(fullPath, updatedFilter);
|
|
4734
4729
|
} else {
|
|
4735
|
-
// For regular filters, validate selected values
|
|
4736
|
-
if (selectedFilterValues.length === 0) {
|
|
4737
|
-
return; // Don't save if no values selected
|
|
4738
|
-
}
|
|
4739
|
-
|
|
4740
4730
|
// Update with new values
|
|
4741
4731
|
const updatedFilter = {
|
|
4742
4732
|
...existingFilter,
|
|
@@ -4910,13 +4900,6 @@ const Filters = ({
|
|
|
4910
4900
|
|
|
4911
4901
|
// Check if this is a date filter
|
|
4912
4902
|
const isDate = isDateDimension(selectedItem.dimension);
|
|
4913
|
-
|
|
4914
|
-
// Validate based on filter type
|
|
4915
|
-
if (isDate) {
|
|
4916
|
-
if (!dateRangeFrom && !dateRangeTo) return; // At least one date must be provided
|
|
4917
|
-
} else {
|
|
4918
|
-
if (selectedFilterValues.length === 0) return; // Regular filters must have values
|
|
4919
|
-
}
|
|
4920
4903
|
if (!selectedDimension) return;
|
|
4921
4904
|
|
|
4922
4905
|
// Build the complete relation objects array
|
|
@@ -4991,13 +4974,6 @@ const Filters = ({
|
|
|
4991
4974
|
// Check if this is a date filter
|
|
4992
4975
|
const isDate = isDateDimension(dimensionData.dimension);
|
|
4993
4976
|
|
|
4994
|
-
// Validate based on filter type
|
|
4995
|
-
if (isDate) {
|
|
4996
|
-
if (!dateRangeFrom && !dateRangeTo) return; // At least one date must be provided
|
|
4997
|
-
} else {
|
|
4998
|
-
if (selectedFilterValues.length === 0) return; // Regular filters must have values
|
|
4999
|
-
}
|
|
5000
|
-
|
|
5001
4977
|
// Prepare filter values based on type
|
|
5002
4978
|
let filterValues;
|
|
5003
4979
|
if (isDate) {
|
|
@@ -5369,14 +5345,7 @@ const Filters = ({
|
|
|
5369
5345
|
}, "Cancel"), /*#__PURE__*/React__default.createElement(Button, {
|
|
5370
5346
|
variant: "contained",
|
|
5371
5347
|
onClick: handleSave,
|
|
5372
|
-
disabled:
|
|
5373
|
-
if (!selectedDimension) return true;
|
|
5374
|
-
const dimensionItems = getDimensionItems();
|
|
5375
|
-
const selectedItem = dimensionItems.find(item => item.key === selectedDimension);
|
|
5376
|
-
if (!selectedItem) return true;
|
|
5377
|
-
const isDate = isDateDimension(selectedItem.dimension);
|
|
5378
|
-
return isDate ? !dateRangeFrom && !dateRangeTo : selectedFilterValues.length === 0;
|
|
5379
|
-
})(),
|
|
5348
|
+
disabled: !selectedDimension,
|
|
5380
5349
|
sx: {
|
|
5381
5350
|
height: "40px",
|
|
5382
5351
|
fontFamily: "system-ui",
|
|
@@ -5522,13 +5491,7 @@ const Filters = ({
|
|
|
5522
5491
|
}, "Cancel"), /*#__PURE__*/React__default.createElement(Button, {
|
|
5523
5492
|
variant: "contained",
|
|
5524
5493
|
onClick: handleSaveFromDimension,
|
|
5525
|
-
disabled:
|
|
5526
|
-
if (!selectedExistingDimension) return true;
|
|
5527
|
-
const dimensionData = existingDimensions.find(dim => dim.fullPath === selectedExistingDimension);
|
|
5528
|
-
if (!dimensionData) return true;
|
|
5529
|
-
const isDate = isDateDimension(dimensionData.dimension);
|
|
5530
|
-
return isDate ? !dateRangeFrom && !dateRangeTo : selectedFilterValues.length === 0;
|
|
5531
|
-
})(),
|
|
5494
|
+
disabled: !selectedExistingDimension,
|
|
5532
5495
|
sx: {
|
|
5533
5496
|
height: "40px",
|
|
5534
5497
|
fontFamily: "system-ui",
|
|
@@ -5802,7 +5765,6 @@ const Filters = ({
|
|
|
5802
5765
|
variant: "contained",
|
|
5803
5766
|
size: "small",
|
|
5804
5767
|
onClick: () => handleSaveEditedFilter(fullPath),
|
|
5805
|
-
disabled: isDate ? !dateRangeFrom && !dateRangeTo : selectedFilterValues.length === 0,
|
|
5806
5768
|
sx: {
|
|
5807
5769
|
textTransform: 'none',
|
|
5808
5770
|
borderRadius: '6px',
|
|
@@ -7094,20 +7056,12 @@ const ReportBuilder = ({
|
|
|
7094
7056
|
if (report.filters && Object.keys(report.filters).length > 0) {
|
|
7095
7057
|
Object.entries(report.filters).forEach(([fullPath, filterData]) => {
|
|
7096
7058
|
if (filterData.values) {
|
|
7097
|
-
//
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
});
|
|
7104
|
-
}
|
|
7105
|
-
} else if (typeof filterData.values === "object") {
|
|
7106
|
-
// Date range filter - add the object as-is
|
|
7107
|
-
conditions.push({
|
|
7108
|
-
[fullPath]: filterData.values
|
|
7109
|
-
});
|
|
7110
|
-
}
|
|
7059
|
+
// Include the condition as-is regardless of whether the array/object
|
|
7060
|
+
// has any entries - an explicitly saved (but empty) filter should
|
|
7061
|
+
// still appear in the query.
|
|
7062
|
+
conditions.push({
|
|
7063
|
+
[fullPath]: filterData.values
|
|
7064
|
+
});
|
|
7111
7065
|
}
|
|
7112
7066
|
});
|
|
7113
7067
|
}
|