@visns-studio/visns-components 5.0.7 → 5.0.8

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/package.json CHANGED
@@ -75,7 +75,7 @@
75
75
  "react-dom": "^17.0.0 || ^18.0.0"
76
76
  },
77
77
  "name": "@visns-studio/visns-components",
78
- "version": "5.0.7",
78
+ "version": "5.0.8",
79
79
  "description": "Various packages to assist in the development of our Custom Applications.",
80
80
  "main": "src/index.js",
81
81
  "files": [
@@ -135,6 +135,14 @@ function GenericDetail({
135
135
  }
136
136
  };
137
137
 
138
+ const handleExport = (config) => {
139
+ if (config.url && config.key) {
140
+ window.open(`${config.url}/${data[config.key]}`);
141
+ } else {
142
+ toast.error('Export URL not found');
143
+ }
144
+ };
145
+
138
146
  const handleCheckboxUpdate = async () => {
139
147
  try {
140
148
  if (currentConfigRef.current.functions.checkboxUpdate) {
@@ -1068,6 +1076,21 @@ function GenericDetail({
1068
1076
  </button>
1069
1077
  </div>
1070
1078
  )}
1079
+
1080
+ {activeTabConfig.export && (
1081
+ <div className={styles.polActions}>
1082
+ <button
1083
+ className={styles.btn}
1084
+ onClick={() =>
1085
+ handleExport(
1086
+ activeTabConfig.export
1087
+ )
1088
+ }
1089
+ >
1090
+ Export
1091
+ </button>
1092
+ </div>
1093
+ )}
1071
1094
  </>
1072
1095
  );
1073
1096
  case 'qrCode':