datastake-daf 0.6.346 → 0.6.348

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.
@@ -54524,7 +54524,8 @@ function useAdminTable({
54524
54524
  loading,
54525
54525
  initFetchDone,
54526
54526
  fetchData,
54527
- fetchPendingAccounts
54527
+ fetchPendingAccounts,
54528
+ setLoading
54528
54529
  };
54529
54530
  }
54530
54531
 
@@ -55633,7 +55634,8 @@ const getColumns$2 = ({
55633
55634
  token,
55634
55635
  selectedLocations,
55635
55636
  setSelectedLocations,
55636
- selectOptions
55637
+ selectOptions,
55638
+ namespace
55637
55639
  }) => {
55638
55640
  const cols = [{
55639
55641
  title: "",
@@ -55734,7 +55736,7 @@ const getColumns$2 = ({
55734
55736
  dataIndex: "administrativeLevel1",
55735
55737
  key: "administrativeLevel1",
55736
55738
  ellipsis: true,
55737
- show: true,
55739
+ show: namespace.includes("locations"),
55738
55740
  render: (value, all) => {
55739
55741
  if (all.empty) {
55740
55742
  return /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -55756,7 +55758,7 @@ const getColumns$2 = ({
55756
55758
  title: t("Territory"),
55757
55759
  dataIndex: "administrativeLevel2",
55758
55760
  key: "administrativeLevel2",
55759
- show: true,
55761
+ show: namespace.includes("locations"),
55760
55762
  ellipsis: true,
55761
55763
  render: (value, all) => {
55762
55764
  if (all.empty) {
@@ -55821,7 +55823,7 @@ const getColumns$2 = ({
55821
55823
  title: "",
55822
55824
  dataIndex: "actions",
55823
55825
  key: "actions",
55824
- width: 70,
55826
+ width: 60,
55825
55827
  show: true,
55826
55828
  render: (value, all) => {
55827
55829
  if (all.empty) {
@@ -56122,7 +56124,8 @@ function LocationTable(_ref) {
56122
56124
  loading,
56123
56125
  initFetchDone,
56124
56126
  fetchData,
56125
- fetchPendingAccounts
56127
+ fetchPendingAccounts,
56128
+ setLoading
56126
56129
  } = useAdminTable({
56127
56130
  goTo,
56128
56131
  location,
@@ -56153,9 +56156,10 @@ function LocationTable(_ref) {
56153
56156
  selectedLocations,
56154
56157
  setSelectedLocations,
56155
56158
  getRedirectLink,
56156
- selectOptions
56159
+ selectOptions,
56160
+ namespace: headerTitle
56157
56161
  });
56158
- }, [t, goTo, module, token, selectedLocations, getRedirectLink, selectOptions]);
56162
+ }, [t, goTo, module, token, selectedLocations, getRedirectLink, selectOptions, headerTitle]);
56159
56163
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
56160
56164
  children: [/*#__PURE__*/jsxRuntime.jsxs(AdminTable, {
56161
56165
  filters: filter,
@@ -56224,6 +56228,7 @@ function LocationTable(_ref) {
56224
56228
  },
56225
56229
  onSuccess: data => {
56226
56230
  setCombineLocationVisible(false);
56231
+ setLoading(true);
56227
56232
  if (typeof mergeSubjectsFunction === 'function') {
56228
56233
  mergeSubjectsFunction(data);
56229
56234
  setSelectedLocations([]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.346",
3
+ "version": "0.6.348",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -77,6 +77,7 @@ export const getColumns = ({
77
77
  selectedLocations,
78
78
  setSelectedLocations,
79
79
  selectOptions,
80
+ namespace,
80
81
  }) => {
81
82
  const cols = [
82
83
  {
@@ -173,7 +174,7 @@ export const getColumns = ({
173
174
  dataIndex: "administrativeLevel1",
174
175
  key: "administrativeLevel1",
175
176
  ellipsis: true,
176
- show: true,
177
+ show: namespace.includes("locations"),
177
178
  render: (value, all) => {
178
179
  if (all.empty) {
179
180
  return <div className="daf-default-cell" />;
@@ -193,7 +194,7 @@ export const getColumns = ({
193
194
  title: t("Territory"),
194
195
  dataIndex: "administrativeLevel2",
195
196
  key: "administrativeLevel2",
196
- show: true,
197
+ show: namespace.includes("locations"),
197
198
  ellipsis: true,
198
199
  render: (value, all) => {
199
200
  if (all.empty) {
@@ -263,7 +264,7 @@ export const getColumns = ({
263
264
  title: "",
264
265
  dataIndex: "actions",
265
266
  key: "actions",
266
- width: 70,
267
+ width: 60,
267
268
  show: true,
268
269
  render: (value, all) => {
269
270
  if (all.empty) {
@@ -47,6 +47,7 @@ export default function LocationTable({
47
47
  initFetchDone,
48
48
  fetchData,
49
49
  fetchPendingAccounts,
50
+ setLoading,
50
51
  } = useAdminTable({
51
52
  goTo,
52
53
  location,
@@ -79,8 +80,9 @@ export default function LocationTable({
79
80
  setSelectedLocations,
80
81
  getRedirectLink,
81
82
  selectOptions,
83
+ namespace: headerTitle
82
84
  });
83
- }, [t, goTo, module, token, selectedLocations, getRedirectLink, selectOptions]);
85
+ }, [t, goTo, module, token, selectedLocations, getRedirectLink, selectOptions, headerTitle]);
84
86
 
85
87
  return (
86
88
  <>
@@ -162,6 +164,7 @@ export default function LocationTable({
162
164
  }}
163
165
  onSuccess={(data) => {
164
166
  setCombineLocationVisible(false);
167
+ setLoading(true);
165
168
  if (typeof mergeSubjectsFunction === 'function') {
166
169
  mergeSubjectsFunction(data);
167
170
  setSelectedLocations([])
@@ -91,5 +91,6 @@ export function useAdminTable({
91
91
  initFetchDone,
92
92
  fetchData,
93
93
  fetchPendingAccounts,
94
+ setLoading,
94
95
  };
95
96
  }