Skip to content

Commit de33c76

Browse files
committed
remove console
1 parent c49db60 commit de33c76

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

UI/web-app/src/components/HRQuerySource/HRQuerySource.base.tsx

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,6 @@ const checkType = (value: string, type: string | undefined): string => {
578578
};
579579

580580
const addComponent = (groupIndex?: number, childIndex?: number) => {
581-
console.log("items", items);
582-
console.log("groups", groups);
583581
setFilterErrorMessage('');
584582
setSource(props.source);
585583

@@ -700,28 +698,19 @@ const checkType = (value: string, type: string | undefined): string => {
700698
};
701699

702700
const removeComponent = (indexToRemove: number) => {
703-
console.log("indexToRemove", indexToRemove);
704-
console.log("items", items);
705-
console.log("selectedIndices[0]", selectedIndices[0]);
706701
if (indexToRemove === -1) return;
707702
if (groupingEnabled) {
708-
709703
let a: number = -1;
710704
if ( selectedIndices[0] === -1) {
711-
console.log("not found in items");
712705
const emptyItemIndex = items.findIndex(item =>
713706
item.attribute === "" &&
714707
item.equalityOperator === "" &&
715708
item.value === "" &&
716709
item.andOr === ""
717710
);
718-
console.log("emptyItemIndex", emptyItemIndex);
719711
a = emptyItemIndex;
720712
}
721713
selectedIndices[0] = selectedIndices[0] === -1 ? a : selectedIndices[0];
722-
723-
console.log("updated selectedIndices", selectedIndices[0]);
724-
725714
let clonedNewGroups: Group[] = JSON.parse(JSON.stringify(groups));
726715
const selectedItems = items.filter((item, index) => selectedIndices.includes(index));
727716
const groupIndex = groups.findIndex(group =>
@@ -739,20 +728,15 @@ const checkType = (value: string, type: string | undefined): string => {
739728
)
740729
) : -1;
741730

742-
console.log("groupIndex", groupIndex);
743-
console.log("childIndex", childIndex);
744-
745731
const ifGroupItem = groups.some(group => isGroupItem(group, items[selectedIndices[0]]));
746732
const ifGroupChild = groups.some(group => isGroupChild(group, items[selectedIndices[0]]));
747733

748734
if (ifGroupItem && groups[groupIndex].items[indexToRemove ?? 0]) {
749-
console.log("it's a group item", groups[groupIndex].items[indexToRemove ?? 0]);
750735
if (groups[groupIndex].items.length === 1 && groups[groupIndex].children.length > 0) { return; }
751736
clonedNewGroups = filterItems(clonedNewGroups, selectedItems, groupIndex);
752737
}
753738

754739
if (ifGroupChild && groups[groupIndex].children[childIndex].items[indexToRemove ?? 0]) {
755-
console.log("it's a child item", groups[groupIndex].children[childIndex].items[indexToRemove ?? 0]);
756740
clonedNewGroups = filterChildren(clonedNewGroups, selectedItems, groupIndex, childIndex);
757741
}
758742

@@ -892,39 +876,17 @@ const checkType = (value: string, type: string | undefined): string => {
892876

893877
const updateGroupItem = (updateParams: UpdateParam, index: number, otherIndex?: number, gi?: number): void => {
894878
const { property, newValue } = updateParams;
895-
896879
let a: number = -1;
897-
898-
899-
console.log("selectedIndices", selectedIndices[0]);
900-
console.log("updateGroupItem - items", items);
901-
console.log("updateGroupItem - groups", groups);
902-
console.log("index", index);
903-
console.log("item", items[index]);
904-
console.log("group Index", gi);
905-
906880
if ( selectedIndices[0] === -1) {
907-
908-
console.log("not found in items");
909881
const emptyItemIndex = items.findIndex(item =>
910882
item.attribute === "" &&
911883
item.equalityOperator === "" &&
912884
item.value === "" &&
913885
item.andOr === ""
914886
);
915-
console.log("emptyItemIndex", emptyItemIndex);
916887
a = emptyItemIndex;
917-
// return;
918888
}
919-
920-
921-
922-
923889
selectedIndices[0] = selectedIndices[0] === -1 ? a : selectedIndices[0];
924-
925-
926-
console.log("updated selectedIndices", selectedIndices[0]);
927-
928890
const groupIndex = groups.findIndex(group =>
929891
group.children?.some(child =>
930892
child.items.some(item =>
@@ -940,9 +902,6 @@ const checkType = (value: string, type: string | undefined): string => {
940902
)
941903
) : -1;
942904

943-
console.log("group Index", groupIndex);
944-
console.log("child Index", childIndex);
945-
946905
const ifGroupItem = groups.some(group => isGroupItem(group, items[selectedIndices[0]]));
947906
const ifGroupChild = groups.some(group => isGroupChild(group, items[selectedIndices[0]]));
948907

@@ -973,9 +932,7 @@ const checkType = (value: string, type: string | undefined): string => {
973932
}
974933

975934
const handleAttributeChange = (event: React.FormEvent<IComboBox>, item?: IComboBoxOption, index?: number, groupIndex?: number): void => {
976-
console.log("items", items);
977935
if (item) {
978-
console.log("item", item);
979936
const selectedAttribute = attributes?.find(attribute => attribute.name === item.key);
980937
dispatch(fetchAttributeValues({attribute: item.key as string, type: selectedAttribute?.type }));
981938
const updatedItems = items.map((it, idx) => {
@@ -988,7 +945,6 @@ const checkType = (value: string, type: string | undefined): string => {
988945
}
989946

990947
if (groupingEnabled && item && index != null) {
991-
console.log("index", index);
992948
const updateParams: UpdateParam = {
993949
property: "attribute",
994950
newValue: item.text
@@ -1574,7 +1530,6 @@ const checkType = (value: string, type: string | undefined): string => {
15741530
};
15751531

15761532
const handleSelectionChanged = () => {
1577-
console.log("handleSelectionChanged", selection.getSelectedIndices());
15781533
setSelectedIndices(selection.getSelectedIndices());
15791534
};
15801535

@@ -1665,9 +1620,6 @@ const checkType = (value: string, type: string | undefined): string => {
16651620
}
16661621

16671622
function onGroupClick() {
1668-
console.log("onGroupClick - selectedIndices", selectedIndices);
1669-
console.log("onGroupClick - items", items);
1670-
16711623
let newGroups = [...groups];
16721624
let indices: { selectedItemIndex: number, groupIndex: number; childIndex: number }[] = [];
16731625
const selectedItems = items.filter((item, index) => selectedIndices.includes(index));
@@ -1825,13 +1777,7 @@ const checkType = (value: string, type: string | undefined): string => {
18251777

18261778

18271779
function handleSelectionChange(selection: Selection) {
1828-
console.log("handleSelectionChange", selection.getSelectedIndices());
1829-
1830-
console.log("handleSelectionChange - items", items);
1831-
1832-
18331780
const selectedItems = selection.getSelection() as any[];
1834-
console.log("handleSelectionChange - selectedItems", selectedItems);
18351781
const selectedIndices = selectedItems.map(selectedItem => {
18361782
return items.findIndex(item =>
18371783
item.attribute === selectedItem.attribute &&

0 commit comments

Comments
 (0)