@esvndev/es-react-config-setting 1.0.66 → 1.0.68

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/dist/index.js CHANGED
@@ -18784,7 +18784,6 @@ const GetSettingConfigByGroup = (obj, callback) => {
18784
18784
  if (text) {
18785
18785
  try {
18786
18786
  JSON.parse(text); // Kiểm tra nếu là JSON hợp lệ
18787
- console.log('Response JSON string:', text);
18788
18787
  }
18789
18788
  catch (err) {
18790
18789
  console.log('Invalid JSON:', err);
@@ -18805,6 +18804,7 @@ const UpdateSettingConfig = (obj, file, callback) => {
18805
18804
  const _url = `${BASE_URL}/api/config/update-setting-config`;
18806
18805
  const formData = new FormData();
18807
18806
  formData.append(`GroupId`, obj.GroupId);
18807
+ formData.append(`ModuleId`, REACT_APP_PRODUCT_CODE ?? "");
18808
18808
  obj.Items.forEach((item, index) => {
18809
18809
  formData.append(`Items[${index}].Key`, item.Key);
18810
18810
  formData.append(`Items[${index}].Value`, item.Value);
@@ -18969,12 +18969,15 @@ const SettingApp = (props) => {
18969
18969
  return (jsxRuntime.jsx("div", { className: "radio-group", title: data.description, children: data.option?.map((opt, index) => (jsxRuntime.jsxs("label", { children: [jsxRuntime.jsx(Input$1, { type: "radio", name: data.name, value: opt.value, checked: value === opt.value, onChange: (e) => change_save(root, data, e) }), opt.name] }, index))) }, data.id));
18970
18970
  case "combobox":
18971
18971
  let _data_option = [];
18972
- try {
18973
- _data_option = JSON.parse(data.option ?? []);
18974
- }
18975
- catch (ex) {
18976
- console.log("Error config option setting", data);
18972
+ if (data.option) {
18973
+ try {
18974
+ _data_option = JSON.parse(data.option ?? '[]');
18975
+ }
18976
+ catch (ex) {
18977
+ console.log("Error config option setting", data);
18978
+ }
18977
18979
  }
18980
+ data.option = _data_option;
18978
18981
  return (jsxRuntime.jsx("div", { className: "combobox", title: data.description, children: jsxRuntime.jsxs(Input$1, { type: "select", className: "input-custom", name: data.name, value: value, onChange: (e) => change_save(root, data, e), children: [jsxRuntime.jsx("option", { value: "", children: "Ch\u1ECDn m\u1ED9t gi\u00E1 tr\u1ECB" }), data.option?.map((opt, index) => (jsxRuntime.jsx("option", { value: opt.value, children: opt.name }, index)))] }) }, data.id));
18979
18982
  case "slider":
18980
18983
  case "text":