@visns-studio/visns-components 3.4.9 → 3.4.10
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.
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
ArrowCounterClockwise,
|
|
26
26
|
Backspace,
|
|
27
27
|
Check,
|
|
28
|
+
CircleCheck,
|
|
28
29
|
Clock,
|
|
29
30
|
CloudDownload,
|
|
30
31
|
Copy,
|
|
@@ -350,6 +351,11 @@ const DataGrid = forwardRef(
|
|
|
350
351
|
|
|
351
352
|
const handleSettingClick = (s, d) => {
|
|
352
353
|
switch (s.id) {
|
|
354
|
+
case 'activate':
|
|
355
|
+
CustomFetch(s.url, 'POST', { id: d[s.key] }, (result) => {
|
|
356
|
+
toast.success(result.message);
|
|
357
|
+
});
|
|
358
|
+
break;
|
|
353
359
|
case 'delete':
|
|
354
360
|
const getDataId = () => {
|
|
355
361
|
for (const item of ajaxSetting.where) {
|
|
@@ -936,7 +942,7 @@ const DataGrid = forwardRef(
|
|
|
936
942
|
if (s.hide && s.hide.id && s.hide.value >= 0) {
|
|
937
943
|
if (
|
|
938
944
|
d.hasOwnProperty(s.hide.id) &&
|
|
939
|
-
d[s.hide.id] === s.hide.value
|
|
945
|
+
parseInt(d[s.hide.id]) === parseInt(s.hide.value)
|
|
940
946
|
) {
|
|
941
947
|
allow = false;
|
|
942
948
|
}
|
|
@@ -944,6 +950,8 @@ const DataGrid = forwardRef(
|
|
|
944
950
|
|
|
945
951
|
if (allow) {
|
|
946
952
|
switch (s.id) {
|
|
953
|
+
case 'activate':
|
|
954
|
+
return getIconComponent(CircleCheck);
|
|
947
955
|
case 'archive':
|
|
948
956
|
return getIconComponent(ShippingBoxV1);
|
|
949
957
|
case 'complete':
|
package/package.json
CHANGED