datastake-daf 0.6.808 → 0.6.810

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.
@@ -43831,8 +43831,8 @@ const getFiltersConfig$3 = ({
43831
43831
  },
43832
43832
  category: {
43833
43833
  type: 'select',
43834
- label: 'Type',
43835
- placeholder: () => `${t('Filter by')} ${t('Type').toLowerCase()}`,
43834
+ label: 'Category',
43835
+ placeholder: () => `${t('Filter by')} ${t('Category').toLowerCase()}`,
43836
43836
  style: {
43837
43837
  flex: 1
43838
43838
  },
@@ -44004,6 +44004,24 @@ const getColumns$5 = ({
44004
44004
  children: v
44005
44005
  });
44006
44006
  }
44007
+ }, {
44008
+ dataIndex: 'category',
44009
+ title: t('Category'),
44010
+ ellipsis: true,
44011
+ show: true,
44012
+ render: (v, all) => {
44013
+ if (all.empty) {
44014
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
44015
+ className: "daf-default-cell"
44016
+ });
44017
+ }
44018
+ const locationCategories = [...(data?.options?.locationCategories || []), ...(options?.productionSiteCategories || [])];
44019
+ const category = findOptions(v, locationCategories);
44020
+ return category ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
44021
+ title: category,
44022
+ children: category
44023
+ }) : '-';
44024
+ }
44007
44025
  }, {
44008
44026
  dataIndex: 'region',
44009
44027
  title: findOptions(user?.company?.country, options?.administrativeLevel1)?.length > 2 ? findOptions(user?.company?.country, options?.administrativeLevel1) : t("Province"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.808",
3
+ "version": "0.6.810",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -39,7 +39,24 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
39
39
 
40
40
  return <Tooltip title={v}>{v}</Tooltip>;
41
41
  },
42
- },
42
+ },
43
+ {
44
+ dataIndex: 'category',
45
+ title: t('Category'),
46
+ ellipsis: true,
47
+ show: true,
48
+ render: (v, all) => {
49
+ if (all.empty) {
50
+ return <div className="daf-default-cell" />
51
+ }
52
+
53
+ const locationCategories = [...(data?.options?.locationCategories || []), ...(options?.productionSiteCategories || [])]
54
+
55
+ const category = findOptions(v, locationCategories);
56
+
57
+ return category ? <Tooltip title={category}>{category}</Tooltip> : '-';
58
+ },
59
+ },
43
60
  {
44
61
  dataIndex: 'region',
45
62
  title: findOptions(user?.company?.country, options?.administrativeLevel1)?.length > 2 ? findOptions(user?.company?.country, options?.administrativeLevel1) : t("Province"),
@@ -85,8 +85,8 @@ export const getFiltersConfig = ({t}) => {
85
85
  },
86
86
  category: {
87
87
  type: 'select',
88
- label: 'Type',
89
- placeholder: () => `${t('Filter by')} ${t('Type').toLowerCase()}`,
88
+ label: 'Category',
89
+ placeholder: () => `${t('Filter by')} ${t('Category').toLowerCase()}`,
90
90
  style: { flex: 1 },
91
91
  labelStyle: { flex: 1 },
92
92
  getLabel: (option) => option.label,