ptechcore_ui 1.0.31 → 1.0.32

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.cjs CHANGED
@@ -804,10 +804,11 @@ var FetchApi = class {
804
804
  if (local_token) {
805
805
  headers["Authorization"] = `Token ${local_token}`;
806
806
  }
807
+ const business_entity_id = localStorage.getItem("active_center_id");
807
808
  const res = await fetch(url, {
808
809
  method: "POST",
809
810
  headers,
810
- body: payload ? JSON.stringify({ ...payload, business_entity: localStorage.getItem("active_center_id") }) : void 0
811
+ body: payload ? JSON.stringify({ ...payload, business_entity_id, business_entity: business_entity_id }) : JSON.stringify({ business_entity_id, business_entity: business_entity_id })
811
812
  });
812
813
  if (!res.ok) throw new Error(await res.text());
813
814
  return res.json();
@@ -818,7 +819,10 @@ var FetchApi = class {
818
819
  if (local_token) {
819
820
  headers["Authorization"] = `Token ${local_token}`;
820
821
  }
821
- const res = await fetch(url, {
822
+ const business_entity_id = localStorage.getItem("active_center_id");
823
+ const separator = url.includes("?") ? "&" : "?";
824
+ const urlWithEntity = business_entity_id ? `${url}${separator}business_entity_id=${business_entity_id}&business_entity=${business_entity_id}` : url;
825
+ const res = await fetch(urlWithEntity, {
822
826
  method: "GET",
823
827
  headers
824
828
  });
@@ -833,10 +837,11 @@ var FetchApi = class {
833
837
  if (local_token) {
834
838
  headers["Authorization"] = `Token ${local_token}`;
835
839
  }
840
+ const business_entity_id = localStorage.getItem("active_center_id");
836
841
  const res = await fetch(url, {
837
842
  method: "PUT",
838
843
  headers,
839
- body: payload ? JSON.stringify(payload) : void 0
844
+ body: payload ? JSON.stringify({ ...payload, business_entity_id, business_entity: business_entity_id }) : JSON.stringify({ business_entity_id, business_entity: business_entity_id })
840
845
  });
841
846
  if (!res.ok) throw new Error(await res.text());
842
847
  return res.json();
@@ -876,10 +881,11 @@ var FetchApi = class {
876
881
  if (local_token) {
877
882
  headers["Authorization"] = `Token ${local_token}`;
878
883
  }
884
+ const business_entity_id = localStorage.getItem("active_center_id");
879
885
  const res = await fetch(url, {
880
886
  method: "PATCH",
881
887
  headers,
882
- body: payload ? JSON.stringify(payload) : void 0
888
+ body: payload ? JSON.stringify({ ...payload, business_entity_id, business_entity: business_entity_id }) : JSON.stringify({ business_entity_id, business_entity: business_entity_id })
883
889
  });
884
890
  if (!res.ok) throw new Error(await res.text());
885
891
  return res.json();
@@ -5424,7 +5430,7 @@ var ApprovalWorkflow = ({
5424
5430
  if (CustomBtn) {
5425
5431
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
5426
5432
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CustomBtn, { onClick: open_modal }),
5427
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Modals_default, { open: isOpen, onClose: close_modal, title, width: "max-w-lg", children: formulaire() })
5433
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Modals_default, { open: isOpen, onClose: close_modal, title, width: "w-[60%]", children: formulaire() })
5428
5434
  ] });
5429
5435
  }
5430
5436
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jsx_runtime14.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
@@ -8485,7 +8491,7 @@ var PrintPreview = ({
8485
8491
  transformOrigin: "top center",
8486
8492
  transition: "transform 0.2s ease"
8487
8493
  };
8488
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "fixed inset-0 z-50 overflow-hidden print:hidden", children: [
8494
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "fixed top-0 inset-0 z-50 overflow-hidden print:hidden", children: [
8489
8495
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8490
8496
  "div",
8491
8497
  {
@@ -8507,7 +8513,7 @@ var PrintPreview = ({
8507
8513
  "div",
8508
8514
  {
8509
8515
  ref: printRef,
8510
- className: "bg-white shadow-2xl",
8516
+ className: "bg-white",
8511
8517
  style: pageStyles,
8512
8518
  children
8513
8519
  }
package/dist/index.js CHANGED
@@ -734,10 +734,11 @@ var FetchApi = class {
734
734
  if (local_token) {
735
735
  headers["Authorization"] = `Token ${local_token}`;
736
736
  }
737
+ const business_entity_id = localStorage.getItem("active_center_id");
737
738
  const res = await fetch(url, {
738
739
  method: "POST",
739
740
  headers,
740
- body: payload ? JSON.stringify({ ...payload, business_entity: localStorage.getItem("active_center_id") }) : void 0
741
+ body: payload ? JSON.stringify({ ...payload, business_entity_id, business_entity: business_entity_id }) : JSON.stringify({ business_entity_id, business_entity: business_entity_id })
741
742
  });
742
743
  if (!res.ok) throw new Error(await res.text());
743
744
  return res.json();
@@ -748,7 +749,10 @@ var FetchApi = class {
748
749
  if (local_token) {
749
750
  headers["Authorization"] = `Token ${local_token}`;
750
751
  }
751
- const res = await fetch(url, {
752
+ const business_entity_id = localStorage.getItem("active_center_id");
753
+ const separator = url.includes("?") ? "&" : "?";
754
+ const urlWithEntity = business_entity_id ? `${url}${separator}business_entity_id=${business_entity_id}&business_entity=${business_entity_id}` : url;
755
+ const res = await fetch(urlWithEntity, {
752
756
  method: "GET",
753
757
  headers
754
758
  });
@@ -763,10 +767,11 @@ var FetchApi = class {
763
767
  if (local_token) {
764
768
  headers["Authorization"] = `Token ${local_token}`;
765
769
  }
770
+ const business_entity_id = localStorage.getItem("active_center_id");
766
771
  const res = await fetch(url, {
767
772
  method: "PUT",
768
773
  headers,
769
- body: payload ? JSON.stringify(payload) : void 0
774
+ body: payload ? JSON.stringify({ ...payload, business_entity_id, business_entity: business_entity_id }) : JSON.stringify({ business_entity_id, business_entity: business_entity_id })
770
775
  });
771
776
  if (!res.ok) throw new Error(await res.text());
772
777
  return res.json();
@@ -806,10 +811,11 @@ var FetchApi = class {
806
811
  if (local_token) {
807
812
  headers["Authorization"] = `Token ${local_token}`;
808
813
  }
814
+ const business_entity_id = localStorage.getItem("active_center_id");
809
815
  const res = await fetch(url, {
810
816
  method: "PATCH",
811
817
  headers,
812
- body: payload ? JSON.stringify(payload) : void 0
818
+ body: payload ? JSON.stringify({ ...payload, business_entity_id, business_entity: business_entity_id }) : JSON.stringify({ business_entity_id, business_entity: business_entity_id })
813
819
  });
814
820
  if (!res.ok) throw new Error(await res.text());
815
821
  return res.json();
@@ -5354,7 +5360,7 @@ var ApprovalWorkflow = ({
5354
5360
  if (CustomBtn) {
5355
5361
  return /* @__PURE__ */ jsxs11(Fragment6, { children: [
5356
5362
  /* @__PURE__ */ jsx14(CustomBtn, { onClick: open_modal }),
5357
- /* @__PURE__ */ jsx14(Modals_default, { open: isOpen, onClose: close_modal, title, width: "max-w-lg", children: formulaire() })
5363
+ /* @__PURE__ */ jsx14(Modals_default, { open: isOpen, onClose: close_modal, title, width: "w-[60%]", children: formulaire() })
5358
5364
  ] });
5359
5365
  }
5360
5366
  return /* @__PURE__ */ jsx14(Fragment6, { children: /* @__PURE__ */ jsx14(
@@ -8427,7 +8433,7 @@ var PrintPreview = ({
8427
8433
  transformOrigin: "top center",
8428
8434
  transition: "transform 0.2s ease"
8429
8435
  };
8430
- return /* @__PURE__ */ jsxs25("div", { className: "fixed inset-0 z-50 overflow-hidden print:hidden", children: [
8436
+ return /* @__PURE__ */ jsxs25("div", { className: "fixed top-0 inset-0 z-50 overflow-hidden print:hidden", children: [
8431
8437
  /* @__PURE__ */ jsx30(
8432
8438
  "div",
8433
8439
  {
@@ -8449,7 +8455,7 @@ var PrintPreview = ({
8449
8455
  "div",
8450
8456
  {
8451
8457
  ref: printRef,
8452
- className: "bg-white shadow-2xl",
8458
+ className: "bg-white",
8453
8459
  style: pageStyles,
8454
8460
  children
8455
8461
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ptechcore_ui",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",