datastake-daf 0.6.339 → 0.6.340

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.
@@ -55620,10 +55620,10 @@ const checkboxConfig$8 = {
55620
55620
  name: "Name",
55621
55621
  datastakeId: "ID"
55622
55622
  };
55623
- function getNameByLevel(data, level) {
55623
+ const getNameByLevel = (data, level) => {
55624
55624
  const entry = Object.values(data || {}).find(item => item.level === level);
55625
- return entry ? entry.name : null;
55626
- }
55625
+ return entry;
55626
+ };
55627
55627
  const getColumns$2 = ({
55628
55628
  t,
55629
55629
  goTo = () => {},
@@ -55655,7 +55655,7 @@ const getColumns$2 = ({
55655
55655
  return [...prev, all];
55656
55656
  }),
55657
55657
  checked: selectedLocations.some(p => p.id === all.id),
55658
- disabled: selectedLocations.length >= 3 && !selectedLocations.some(p => p.id === all.id)
55658
+ disabled: selectedLocations?.length >= 3 && !selectedLocations.some(p => p.id === all.id)
55659
55659
  });
55660
55660
  }
55661
55661
  }, {
@@ -55744,7 +55744,7 @@ const getColumns$2 = ({
55744
55744
  if (all?.administrativeLevel1 && value === all?.administrativeLevel1) {
55745
55745
  label = all?.linking?.SCL?.value?.name;
55746
55746
  } else {
55747
- label = getNameByLevel(all?.linking?.SCL, "level_1");
55747
+ label = getNameByLevel(all?.linking?.SCL, "level_1")?.name;
55748
55748
  }
55749
55749
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
55750
55750
  title: label || '-',
@@ -55767,7 +55767,7 @@ const getColumns$2 = ({
55767
55767
  if (all?.administrativeLevel2 && value === all?.administrativeLevel2) {
55768
55768
  label = all?.linking?.SCL?.value?.name;
55769
55769
  } else {
55770
- label = getNameByLevel(all?.linking?.SCL, "level_2");
55770
+ label = getNameByLevel(all?.linking?.SCL, "level_2")?.name;
55771
55771
  }
55772
55772
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
55773
55773
  title: label || '-',
@@ -55786,8 +55786,8 @@ const getColumns$2 = ({
55786
55786
  });
55787
55787
  }
55788
55788
  const MAX_SOURCES = 3;
55789
- const count = value.length === MAX_SOURCES + 1 ? value.length : MAX_SOURCES;
55790
- return Array.isArray(value) && value.length > 0 ? /*#__PURE__*/jsxRuntime.jsx(antd.Avatar.Group, {
55789
+ const count = value?.length === MAX_SOURCES + 1 ? value?.length : MAX_SOURCES;
55790
+ return Array.isArray(value) && value?.length > 0 ? /*#__PURE__*/jsxRuntime.jsx(antd.Avatar.Group, {
55791
55791
  max: {
55792
55792
  count: count,
55793
55793
  style: {
@@ -55851,8 +55851,8 @@ const getColumns$1 = ({
55851
55851
  }) => {
55852
55852
  return [{
55853
55853
  title: t("admin::organisation_id"),
55854
- dataIndex: "id",
55855
- key: "id",
55854
+ dataIndex: "datastakeId",
55855
+ key: "datastakeId",
55856
55856
  render: (value, all) => {
55857
55857
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
55858
55858
  title: value,
@@ -55860,7 +55860,7 @@ const getColumns$1 = ({
55860
55860
  });
55861
55861
  }
55862
55862
  }, {
55863
- title: t("name"),
55863
+ title: t("Name"),
55864
55864
  dataIndex: "name",
55865
55865
  key: "name",
55866
55866
  render: (value, all) => {
@@ -55892,23 +55892,37 @@ const getColumns$1 = ({
55892
55892
  });
55893
55893
  }
55894
55894
  }, {
55895
- title: t("admin-level-1"),
55896
- dataIndex: "adminLevel1",
55897
- key: "adminLevel1",
55895
+ title: t("Province"),
55896
+ dataIndex: "administrativeLevel1",
55897
+ key: "administrativeLevel1",
55898
+ ellipsis: true,
55899
+ show: true,
55898
55900
  render: (value, all) => {
55901
+ let label;
55902
+ if (all?.administrativeLevel1 && value === all?.administrativeLevel1) {
55903
+ label = all?.linking?.SCL?.value?.name;
55904
+ } else {
55905
+ label = getNameByLevel(all?.linking?.SCL, "level_1")?.name;
55906
+ }
55899
55907
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
55900
- title: value,
55901
- children: value
55908
+ title: label || '-',
55909
+ children: label || '-'
55902
55910
  });
55903
55911
  }
55904
55912
  }, {
55905
- title: t("admin-level-2"),
55906
- dataIndex: "adminLevel2",
55907
- key: "adminLevel2",
55913
+ title: t("Territory"),
55914
+ dataIndex: "administrativeLevel2",
55915
+ key: "administrativeLevel2",
55908
55916
  render: (value, all) => {
55917
+ let label;
55918
+ if (all?.administrativeLevel2 && value === all?.administrativeLevel2) {
55919
+ label = all?.linking?.SCL?.value?.name;
55920
+ } else {
55921
+ label = getNameByLevel(all?.linking?.SCL, "level_2")?.name;
55922
+ }
55909
55923
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
55910
- title: value,
55911
- children: value
55924
+ title: label || '-',
55925
+ children: label || '-'
55912
55926
  });
55913
55927
  }
55914
55928
  }];
@@ -55941,8 +55955,11 @@ function CombineLocationModal({
55941
55955
  }, [selectedLocations, t, selectOptions, module]);
55942
55956
  const onSubmit = () => {
55943
55957
  MainForm.validateFields().then(data => {
55944
- console.log(data, "data");
55945
- onSuccess(data);
55958
+ const ids = selectedLocations.map(location => location._id);
55959
+ onSuccess({
55960
+ ids,
55961
+ data
55962
+ });
55946
55963
  });
55947
55964
  };
55948
55965
  return /*#__PURE__*/jsxRuntime.jsxs(Modal, {
@@ -55996,8 +56013,8 @@ function CombineLocationModal({
55996
56013
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
55997
56014
  options: selectedLocations.map(location => {
55998
56015
  return {
55999
- label: location?.id || "--",
56000
- value: location?.id || "--"
56016
+ label: location?.datastakeId || "-",
56017
+ value: location?.datastakeId || "-"
56001
56018
  };
56002
56019
  }),
56003
56020
  placeholder: t("ID")
@@ -56014,8 +56031,8 @@ function CombineLocationModal({
56014
56031
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
56015
56032
  options: selectedLocations.map(location => {
56016
56033
  return {
56017
- label: (selectOptions?.category || []).find(option => option.value === location?.category)?.label || location?.category || "--",
56018
- value: location?.category || "--"
56034
+ label: (selectOptions?.category || []).find(option => option.value === location?.category)?.label || location?.category || "-",
56035
+ value: location?.category || "-"
56019
56036
  };
56020
56037
  }).filter((option, index, self) => index === self.findIndex(o => o.value === option.value)),
56021
56038
  placeholder: t("category")
@@ -56026,35 +56043,37 @@ function CombineLocationModal({
56026
56043
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
56027
56044
  options: selectedLocations.map(location => {
56028
56045
  return {
56029
- label: (selectOptions?.country || []).find(option => option.value === location?.country)?.label || location?.country || "--",
56030
- value: location?.country || "--"
56046
+ label: (selectOptions?.country || []).find(option => option.value === location?.country)?.label || location?.country || "-",
56047
+ value: location?.country || "-"
56031
56048
  };
56032
56049
  }).filter((option, index, self) => index === self.findIndex(o => o.value === option.value)),
56033
56050
  placeholder: t("admin::country")
56034
56051
  })
56035
56052
  }), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
56036
56053
  className: "flex-1",
56037
- name: "adminLevel1",
56054
+ name: "administrativeLevel1",
56038
56055
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
56039
56056
  placeholder: t("Province"),
56040
56057
  options: selectedLocations.map(location => {
56058
+ const _data = getNameByLevel(location?.linking?.SCL, "level_1");
56041
56059
  return {
56042
- label: location?.adminLevel1 || "--",
56043
- value: location?.adminLevel1 || "--"
56060
+ label: _data?.name || "-",
56061
+ value: _data?.id || "-"
56044
56062
  };
56045
- })
56063
+ }).filter((option, index, self) => index === self.findIndex(o => o.value === option.value))
56046
56064
  })
56047
56065
  }), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
56048
56066
  className: "flex-1",
56049
- name: "adminLevel2",
56067
+ name: "administrativeLevel2",
56050
56068
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
56051
56069
  placeholder: t("Territory"),
56052
56070
  options: selectedLocations.map(location => {
56071
+ const _data = getNameByLevel(location?.linking?.SCL, "level_2");
56053
56072
  return {
56054
- label: location?.adminLevel2 || "--",
56055
- value: location?.adminLevel2 || "--"
56073
+ label: _data?.name || "-",
56074
+ value: _data?.id || "-"
56056
56075
  };
56057
- })
56076
+ }).filter((option, index, self) => index === self.findIndex(o => o.value === option.value))
56058
56077
  })
56059
56078
  })]
56060
56079
  })]
@@ -56082,7 +56101,8 @@ function LocationTable(_ref) {
56082
56101
  defaultPageSize = 20,
56083
56102
  view,
56084
56103
  headerTitle,
56085
- breadcrumbs
56104
+ breadcrumbs,
56105
+ mergeSubjectsFunction
56086
56106
  } = _ref;
56087
56107
  const [showFilters, setShowFilters] = React.useState(false);
56088
56108
  const [hasError, setHasError] = React.useState(false);
@@ -56166,12 +56186,12 @@ function LocationTable(_ref) {
56166
56186
  },
56167
56187
  children: selectedLocations.map(account => /*#__PURE__*/jsxRuntime.jsxs(antd.Tag, {
56168
56188
  className: "flex flex-row gap-2 items-center",
56169
- onClick: () => setSelectedLocations(prev => prev.filter(a => a.id !== account.id)),
56189
+ onClick: () => setSelectedLocations(prev => prev.filter(a => a.datastakeId !== account.datastakeId)),
56170
56190
  style: {
56171
56191
  cursor: "pointer"
56172
56192
  },
56173
56193
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
56174
- children: account.id
56194
+ children: account.datastakeId
56175
56195
  }), /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
56176
56196
  name: "Close",
56177
56197
  size: 10
@@ -56199,8 +56219,10 @@ function LocationTable(_ref) {
56199
56219
  onClose: () => {
56200
56220
  setCombineLocationVisible(false);
56201
56221
  },
56202
- onSuccess: () => {
56222
+ onSuccess: data => {
56223
+ console.log(data, "success data");
56203
56224
  setCombineLocationVisible(false);
56225
+ // mergeSubjectsFunction(data);
56204
56226
  },
56205
56227
  selectedLocations: selectedLocations,
56206
56228
  selectOptions: selectOptions || {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.339",
3
+ "version": "0.6.340",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -1,18 +1,19 @@
1
1
  import { findOptions } from "../../../../../../../helpers/StringHelper.js";
2
2
  import { Tooltip } from "antd";
3
+ import { getNameByLevel } from "../../AdminTables/LocationTable/helper.js";
3
4
 
4
5
  export const getColumns = ({ t, selectOptions, module }) => {
5
6
  return [
6
7
  {
7
8
  title: t("admin::organisation_id"),
8
- dataIndex: "id",
9
- key: "id",
9
+ dataIndex: "datastakeId",
10
+ key: "datastakeId",
10
11
  render: (value, all) => {
11
12
  return <Tooltip title={value}>{value}</Tooltip>;
12
13
  },
13
14
  },
14
15
  {
15
- title: t("name"),
16
+ title: t("Name"),
16
17
  dataIndex: "name",
17
18
  key: "name",
18
19
  render: (value, all) => {
@@ -38,19 +39,35 @@ export const getColumns = ({ t, selectOptions, module }) => {
38
39
  },
39
40
  },
40
41
  {
41
- title: t("admin-level-1"),
42
- dataIndex: "adminLevel1",
43
- key: "adminLevel1",
42
+ title: t("Province"),
43
+ dataIndex: "administrativeLevel1",
44
+ key: "administrativeLevel1",
45
+ ellipsis: true,
46
+ show: true,
44
47
  render: (value, all) => {
45
- return <Tooltip title={value}>{value}</Tooltip>;
48
+ let label;
49
+ if(all?.administrativeLevel1 && value === all?.administrativeLevel1) {
50
+ label = all?.linking?.SCL?.value?.name
51
+ } else {
52
+ label = getNameByLevel(all?.linking?.SCL, "level_1")?.name
53
+ }
54
+
55
+ return <Tooltip title={label || '-'}>{label || '-'}</Tooltip>;
46
56
  },
47
57
  },
48
58
  {
49
- title: t("admin-level-2"),
50
- dataIndex: "adminLevel2",
51
- key: "adminLevel2",
59
+ title: t("Territory"),
60
+ dataIndex: "administrativeLevel2",
61
+ key: "administrativeLevel2",
52
62
  render: (value, all) => {
53
- return <Tooltip title={value}>{value}</Tooltip>;
63
+ let label;
64
+ if(all?.administrativeLevel2 && value === all?.administrativeLevel2) {
65
+ label = all?.linking?.SCL?.value?.name
66
+ } else {
67
+ label = getNameByLevel(all?.linking?.SCL, "level_2")?.name
68
+ }
69
+
70
+ return <Tooltip title={label || '-'}>{label || '-'}</Tooltip>;
54
71
  },
55
72
  },
56
73
  ];
@@ -5,6 +5,8 @@ import { findOptions } from "../../../../../../../helpers/StringHelper.js";
5
5
  import DAFTable from "../../../../Table/index.jsx";
6
6
  import { useMemo, useState } from "react";
7
7
  import { getColumns } from "./helper.js";
8
+ import { getNameByLevel } from "../../AdminTables/LocationTable/helper.js";
9
+
8
10
  const { useToken } = theme;
9
11
 
10
12
  export default function CombineLocationModal({
@@ -31,8 +33,11 @@ export default function CombineLocationModal({
31
33
 
32
34
  const onSubmit = () => {
33
35
  MainForm.validateFields().then((data) => {
34
- console.log(data, "data");
35
- onSuccess(data);
36
+ const ids = selectedLocations.map((location) => location._id);
37
+ onSuccess({
38
+ ids,
39
+ data,
40
+ });
36
41
  });
37
42
  };
38
43
 
@@ -94,8 +99,8 @@ export default function CombineLocationModal({
94
99
  <Select
95
100
  options={selectedLocations.map((location) => {
96
101
  return {
97
- label: location?.id || "--",
98
- value: location?.id || "--",
102
+ label: location?.datastakeId || "-",
103
+ value: location?.datastakeId || "-",
99
104
  };
100
105
  })}
101
106
  placeholder={t("ID")}
@@ -116,8 +121,8 @@ export default function CombineLocationModal({
116
121
  (option) => option.value === location?.category,
117
122
  )?.label ||
118
123
  location?.category ||
119
- "--",
120
- value: location?.category || "--",
124
+ "-",
125
+ value: location?.category || "-",
121
126
  };
122
127
  })
123
128
  .filter(
@@ -138,8 +143,8 @@ export default function CombineLocationModal({
138
143
  (option) => option.value === location?.country,
139
144
  )?.label ||
140
145
  location?.country ||
141
- "--",
142
- value: location?.country || "--",
146
+ "-",
147
+ value: location?.country || "-",
143
148
  };
144
149
  })
145
150
  .filter(
@@ -150,27 +155,35 @@ export default function CombineLocationModal({
150
155
  ></Select>
151
156
  </Form.Item>
152
157
 
153
- <Form.Item className="flex-1" name="adminLevel1">
158
+ <Form.Item className="flex-1" name="administrativeLevel1">
154
159
  <Select
155
160
  placeholder={t("Province")}
156
161
  options={selectedLocations.map((location) => {
162
+ const _data = getNameByLevel(location?.linking?.SCL, "level_1");
157
163
  return {
158
- label: location?.adminLevel1 || "--",
159
- value: location?.adminLevel1 || "--",
160
- };
161
- })}
164
+ label: _data?.name || "-",
165
+ value: _data?.id || "-",
166
+ }
167
+ }).filter(
168
+ (option, index, self) =>
169
+ index === self.findIndex((o) => o.value === option.value),
170
+ )}
162
171
  ></Select>
163
172
  </Form.Item>
164
173
 
165
- <Form.Item className="flex-1" name="adminLevel2">
174
+ <Form.Item className="flex-1" name="administrativeLevel2">
166
175
  <Select
167
176
  placeholder={t("Territory")}
168
177
  options={selectedLocations.map((location) => {
178
+ const _data = getNameByLevel(location?.linking?.SCL, "level_2");
169
179
  return {
170
- label: location?.adminLevel2 || "--",
171
- value: location?.adminLevel2 || "--",
172
- };
173
- })}
180
+ label: _data?.name || "-",
181
+ value: _data?.id || "-",
182
+ }
183
+ }).filter(
184
+ (option, index, self) =>
185
+ index === self.findIndex((o) => o.value === option.value),
186
+ )}
174
187
  ></Select>
175
188
  </Form.Item>
176
189
  </Form>
@@ -27,7 +27,7 @@ export const Primary = {
27
27
  data: {
28
28
  data: [
29
29
  {
30
- "_id": {},
30
+ "_id": "68d15dff5c53c03e613a978b",
31
31
  "createdAt": "2025-09-22T14:32:31.513Z",
32
32
  "updatedAt": "2025-09-22T14:32:31.513Z",
33
33
  "id": "937b8b13-947d-4ee0-accf-961cbc63c663",
@@ -57,7 +57,7 @@ export const Primary = {
57
57
  "__v": 0
58
58
  },
59
59
  {
60
- "_id": {},
60
+ "_id": "68d26bad5c53c03e613a9fef",
61
61
  "createdAt": "2025-09-23T09:43:09.055Z",
62
62
  "updatedAt": "2025-09-23T09:43:09.055Z",
63
63
  "id": "e3d4b71c-63b2-4a57-8833-ea4cfa519a67",
@@ -87,7 +87,7 @@ export const Primary = {
87
87
  "__v": 0
88
88
  },
89
89
  {
90
- "_id": {},
90
+ "_id": "68d519355c53c03e613ad03a",
91
91
  "createdAt": "2025-09-25T10:28:05.989Z",
92
92
  "updatedAt": "2025-09-25T10:28:05.989Z",
93
93
  "id": "1f5ac021-c82d-46ce-817a-c4045392b13d",
@@ -102,7 +102,7 @@ export const Primary = {
102
102
  "__v": 0
103
103
  },
104
104
  {
105
- "_id": {},
105
+ "_id": "68d687408a2a09b08388b0e8",
106
106
  "createdAt": "2025-09-26T12:29:52.120Z",
107
107
  "updatedAt": "2025-09-26T12:29:52.120Z",
108
108
  "id": "9fe2475c-98a6-4a72-a9c7-0b459f44c0ed",
@@ -117,7 +117,7 @@ export const Primary = {
117
117
  "__v": 0
118
118
  },
119
119
  {
120
- "_id": {},
120
+ "_id": "68d6881b5b4566f0cabcbff2",
121
121
  "createdAt": "2025-09-26T12:33:31.263Z",
122
122
  "updatedAt": "2025-09-26T12:33:31.263Z",
123
123
  "id": "9c561b78-452a-468a-9c71-a8380d1bdc1d",
@@ -132,7 +132,7 @@ export const Primary = {
132
132
  "__v": 0
133
133
  },
134
134
  {
135
- "_id": {},
135
+ "_id": "68d6946a84cca23fe8a6abe4",
136
136
  "createdAt": "2025-09-26T13:26:02.415Z",
137
137
  "updatedAt": "2025-09-26T13:26:02.415Z",
138
138
  "id": "bb2a2497-eae6-47a4-b903-9f0663dc8b0c",
@@ -147,7 +147,7 @@ export const Primary = {
147
147
  "__v": 0
148
148
  },
149
149
  {
150
- "_id": {},
150
+ "_id": "68d6963009b07d172ba0ed25",
151
151
  "createdAt": "2025-09-26T13:33:36.403Z",
152
152
  "updatedAt": "2025-09-26T13:33:36.403Z",
153
153
  "id": "058894d7-22a8-4804-b4a8-98be5003f310",
@@ -162,7 +162,7 @@ export const Primary = {
162
162
  "__v": 0
163
163
  },
164
164
  {
165
- "_id": {},
165
+ "_id": "68d6999991fe77d8e0113b0b",
166
166
  "createdAt": "2025-09-26T13:48:09.933Z",
167
167
  "updatedAt": "2025-09-26T13:48:09.933Z",
168
168
  "id": "0777e572-6f47-4d54-a58c-7a43ef26d3c1",
@@ -63,9 +63,9 @@ export const checkboxConfig = {
63
63
  datastakeId: "ID",
64
64
  };
65
65
 
66
- function getNameByLevel(data, level) {
66
+ export const getNameByLevel = (data, level) => {
67
67
  const entry = Object.values(data || {}).find(item => item.level === level);
68
- return entry ? entry.name : null;
68
+ return entry;
69
69
  }
70
70
 
71
71
  export const getColumns = ({
@@ -102,7 +102,7 @@ export const getColumns = ({
102
102
  }
103
103
  checked={selectedLocations.some((p) => p.id === all.id)}
104
104
  disabled={
105
- selectedLocations.length >= 3 &&
105
+ selectedLocations?.length >= 3 &&
106
106
  !selectedLocations.some((p) => p.id === all.id)
107
107
  }
108
108
  />
@@ -183,7 +183,7 @@ export const getColumns = ({
183
183
  if(all?.administrativeLevel1 && value === all?.administrativeLevel1) {
184
184
  label = all?.linking?.SCL?.value?.name
185
185
  } else {
186
- label = getNameByLevel(all?.linking?.SCL, "level_1")
186
+ label = getNameByLevel(all?.linking?.SCL, "level_1")?.name
187
187
  }
188
188
 
189
189
  return <Tooltip title={label || '-'}>{label || '-'}</Tooltip>;
@@ -204,7 +204,7 @@ export const getColumns = ({
204
204
  if(all?.administrativeLevel2 && value === all?.administrativeLevel2) {
205
205
  label = all?.linking?.SCL?.value?.name
206
206
  } else {
207
- label = getNameByLevel(all?.linking?.SCL, "level_2")
207
+ label = getNameByLevel(all?.linking?.SCL, "level_2")?.name
208
208
  }
209
209
 
210
210
  return <Tooltip title={label || '-'}>{label || '-'}</Tooltip>;
@@ -221,9 +221,9 @@ export const getColumns = ({
221
221
  }
222
222
 
223
223
  const MAX_SOURCES = 3;
224
- const count = value.length === MAX_SOURCES + 1 ? value.length : MAX_SOURCES;
224
+ const count = value?.length === MAX_SOURCES + 1 ? value?.length : MAX_SOURCES;
225
225
  return (
226
- Array.isArray(value) && value.length > 0 ? <Avatar.Group
226
+ Array.isArray(value) && value?.length > 0 ? <Avatar.Group
227
227
  max={{
228
228
  count: count,
229
229
  style: {
@@ -28,6 +28,7 @@ export default function LocationTable({
28
28
  view,
29
29
  headerTitle,
30
30
  breadcrumbs,
31
+ mergeSubjectsFunction,
31
32
  }) {
32
33
  const [showFilters, setShowFilters] = useState(false);
33
34
  const [hasError, setHasError] = useState(false);
@@ -120,14 +121,14 @@ export default function LocationTable({
120
121
  className="flex flex-row gap-2 items-center"
121
122
  onClick={() =>
122
123
  setSelectedLocations((prev) =>
123
- prev.filter((a) => a.id !== account.id),
124
+ prev.filter((a) => a.datastakeId !== account.datastakeId),
124
125
  )
125
126
  }
126
127
  style={{
127
128
  cursor: "pointer",
128
129
  }}
129
130
  >
130
- <span>{account.id}</span>
131
+ <span>{account.datastakeId}</span>
131
132
  <CustomIcon name="Close" size={10} />
132
133
  </Tag>
133
134
  ))}
@@ -157,8 +158,10 @@ export default function LocationTable({
157
158
  onClose={() => {
158
159
  setCombineLocationVisible(false);
159
160
  }}
160
- onSuccess={() => {
161
+ onSuccess={(data) => {
162
+ console.log(data, "success data");
161
163
  setCombineLocationVisible(false);
164
+ // mergeSubjectsFunction(data);
162
165
  }}
163
166
  selectedLocations={selectedLocations}
164
167
  selectOptions={selectOptions || {}}