@bisom/web_plugin 1.1.2 → 1.1.4

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/bisom-lib.js CHANGED
@@ -1811,7 +1811,7 @@ var Zr = Oe, Qr = () => `${Me().api_url}/api/v1/users`, $r = () => `${Qr()}/info
1811
1811
  userDivisions: [],
1812
1812
  showNewsBadge: !1,
1813
1813
  isAuth: !1,
1814
- versionApp: { VUE_APP_VERSION: "lrm-web1.1.2" }.VUE_APP_VERSION ?? ""
1814
+ versionApp: { VUE_APP_VERSION: "lrm-web1.1.4" }.VUE_APP_VERSION ?? ""
1815
1815
  }),
1816
1816
  getters: {
1817
1817
  userId(e) {
@@ -4278,7 +4278,7 @@ function No(e) {
4278
4278
  Lo(Io(e.target.value, e.contentEl.value), t);
4279
4279
  }
4280
4280
  function Po(e, t) {
4281
- let n = e.root.value?.offsetParent, r = Io(e.target.value, e.contentEl.value), i = [...new Set([...zn(r, t.contained ? n : void 0), ...zn(e.contentEl.value, t.contained ? n : void 0)])].filter((e) => !e.classList.contains("v-overlay-scroll-blocked")), a = window.innerWidth - document.documentElement.offsetWidth, o = ((e) => Bn(e) && e)(n || document.documentElement);
4281
+ let n = e.root.value?.offsetParent, r = Io(e.target.value, e.contentEl.value), i = [.../* @__PURE__ */ new Set([...zn(r, t.contained ? n : void 0), ...zn(e.contentEl.value, t.contained ? n : void 0)])].filter((e) => !e.classList.contains("v-overlay-scroll-blocked")), a = window.innerWidth - document.documentElement.offsetWidth, o = ((e) => Bn(e) && e)(n || document.documentElement);
4282
4282
  o && e.root.value.classList.add("v-overlay--scroll-blocked"), i.forEach((e, t) => {
4283
4283
  e.style.setProperty("--v-body-scroll-x", W(-e.scrollLeft)), e.style.setProperty("--v-body-scroll-y", W(-e.scrollTop)), (e !== document.documentElement || getComputedStyle(e).overflowY !== "scroll") && e.style.setProperty("--v-scrollbar-offset", W(a)), e.classList.add("v-overlay-scroll-blocked");
4284
4284
  }), M(() => {
@@ -6945,18 +6945,15 @@ var ml = /*#__PURE__*/ U(fl, [["render", pl]]), hl = () => `${Me().api_url}/api/
6945
6945
  return Promise.reject(e);
6946
6946
  }
6947
6947
  },
6948
- getRegulationFolderPdf: async (e, t, n) => {
6948
+ getRegulationFolderPdf: async (e, t) => {
6949
6949
  try {
6950
- let r = "application/pdf", i = {
6951
- ...Ce(r),
6952
- params: {
6953
- drm_bloc: t,
6954
- regulation_folder_patient_id: n
6955
- }
6956
- }, a = await Zr.get(`${hl()}/${e}/generate_drm`, i), o = window.URL.createObjectURL(new Blob([a.data], { type: r })), s = gl(a.headers?.["content-disposition"]);
6950
+ let n = "application/pdf", r = {
6951
+ ...Ce(n),
6952
+ params: { ...t }
6953
+ }, i = await Zr.get(`${hl()}/${e}/generate_drm`, r), a = window.URL.createObjectURL(new Blob([i.data], { type: n })), o = gl(i.headers?.["content-disposition"]);
6957
6954
  return Promise.resolve({
6958
- url: o,
6959
- fileName: s
6955
+ url: a,
6956
+ fileName: o
6960
6957
  });
6961
6958
  } catch (e) {
6962
6959
  return Promise.reject(e);
@@ -6981,6 +6978,10 @@ var ml = /*#__PURE__*/ U(fl, [["render", pl]]), hl = () => `${Me().api_url}/api/
6981
6978
  rfpId: {
6982
6979
  type: Number,
6983
6980
  required: !0
6981
+ },
6982
+ meanIds: {
6983
+ type: Array,
6984
+ default: () => []
6984
6985
  }
6985
6986
  },
6986
6987
  data() {
@@ -6990,6 +6991,7 @@ var ml = /*#__PURE__*/ U(fl, [["render", pl]]), hl = () => `${Me().api_url}/api/
6990
6991
  pdfFileName: "document.pdf",
6991
6992
  selectAll: !0,
6992
6993
  onLoading: !1,
6994
+ includeBilanPdf: !0,
6993
6995
  blocs: [
6994
6996
  {
6995
6997
  label: this.$t("printDrm.bloc1"),
@@ -7032,17 +7034,22 @@ var ml = /*#__PURE__*/ U(fl, [["render", pl]]), hl = () => `${Me().api_url}/api/
7032
7034
  };
7033
7035
  },
7034
7036
  watch: { dialog(e) {
7035
- e ? (this.selectedBlocs = this.blocs.map((e) => e.id), this.pdfValue = "", this.pdfFileName = "document.pdf") : this.pdfValue && this.revokePdf();
7037
+ e ? (this.selectedBlocs = this.blocs.map((e) => e.id), this.includeBilanPdf = !0, this.pdfValue = "", this.pdfFileName = "document.pdf") : this.pdfValue && this.revokePdf();
7036
7038
  } },
7037
7039
  methods: {
7038
7040
  changeModelValue() {
7039
- this.selectedBlocs = this.selectAll ? [] : this.blocs.map((e) => e.id), this.selectAll = !this.selectAll;
7041
+ this.selectedBlocs = this.selectAll ? [] : this.blocs.map((e) => e.id), this.selectAll = !this.selectAll, this.includeBilanPdf = this.selectAll;
7040
7042
  },
7041
7043
  async handleGenerate() {
7042
7044
  try {
7043
7045
  this.revokePdf(), this.onLoading = !0;
7044
- let e = await _l.getRegulationFolderPdf(this.folderId, this.selectedBlocs, [this.rfpId]);
7045
- this.pdfValue = e.url, this.pdfFileName = e.fileName;
7046
+ let e = {
7047
+ drm_bloc: this.selectedBlocs,
7048
+ regulation_folder_patient_id: [this.rfpId],
7049
+ include_bilan_pdfs: this.includeBilanPdf,
7050
+ mean_ids: this.includeBilanPdf ? this.meanIds : null
7051
+ }, t = await _l.getRegulationFolderPdf(this.folderId, e);
7052
+ this.pdfValue = t.url, this.pdfFileName = t.fileName;
7046
7053
  } catch (e) {
7047
7054
  si.notifyError(e);
7048
7055
  } finally {
@@ -7356,9 +7363,9 @@ function jl(t, n, r, i, a, o) {
7356
7363
  onOnClick: n[0] ||= (e) => t.dialog = !0
7357
7364
  }, null, 8, ["message"]), m(_, {
7358
7365
  modelValue: t.dialog,
7359
- "onUpdate:modelValue": n[4] ||= (e) => t.dialog = e,
7366
+ "onUpdate:modelValue": n[5] ||= (e) => t.dialog = e,
7360
7367
  title: t.$t("printDrm.generateDrm"),
7361
- onOnClose: n[5] ||= (e) => t.dialog = !1
7368
+ onOnClose: n[6] ||= (e) => t.dialog = !1
7362
7369
  }, {
7363
7370
  toolbarButton: H(() => [m(s, {
7364
7371
  color: "white",
@@ -7419,7 +7426,16 @@ function jl(t, n, r, i, a, o) {
7419
7426
  "value"
7420
7427
  ])]),
7421
7428
  _: 2
7422
- }, 1024))), 128))]),
7429
+ }, 1024))), 128)), m(Z, { cols: "6" }, {
7430
+ default: H(() => [m(Ol, {
7431
+ modelValue: t.includeBilanPdf,
7432
+ "onUpdate:modelValue": n[3] ||= (e) => t.includeBilanPdf = e,
7433
+ color: "primary",
7434
+ label: "Pdf Bilans",
7435
+ value: !0
7436
+ }, null, 8, ["modelValue"])]),
7437
+ _: 1
7438
+ })]),
7423
7439
  _: 1
7424
7440
  })
7425
7441
  ]),
@@ -7452,7 +7468,7 @@ function jl(t, n, r, i, a, o) {
7452
7468
  default: H(() => [m(h, {
7453
7469
  confirmBtnLabel: "generate",
7454
7470
  onOnSave: t.handleGenerate,
7455
- onOnClose: n[3] ||= (e) => t.dialog = !1
7471
+ onOnClose: n[4] ||= (e) => t.dialog = !1
7456
7472
  }, null, 8, ["onOnSave"])]),
7457
7473
  _: 1
7458
7474
  })
@@ -7576,8 +7592,13 @@ function Bl(t, n, r, i, a, o) {
7576
7592
  m(Lr),
7577
7593
  m(c, {
7578
7594
  "rfp-id": t.selectedEmergency.regulation_folder_patient_id,
7579
- "folder-id": t.selectedEmergency.rf_id
7580
- }, null, 8, ["rfp-id", "folder-id"])
7595
+ "folder-id": t.selectedEmergency.rf_id,
7596
+ meanIds: t.selectedEmergency.means.means.map((e) => e.id)
7597
+ }, null, 8, [
7598
+ "rfp-id",
7599
+ "folder-id",
7600
+ "meanIds"
7601
+ ])
7581
7602
  ]),
7582
7603
  _: 1
7583
7604
  }),
@@ -7706,7 +7727,8 @@ var Kl = /*#__PURE__*/ U(Hl, [["render", Gl]]), ql = {
7706
7727
  emits: [
7707
7728
  "onMissionSelected",
7708
7729
  "update:search",
7709
- "onSearch"
7730
+ "onSearch",
7731
+ "onRefresh"
7710
7732
  ],
7711
7733
  data() {
7712
7734
  return { getOperatorIcon: Jl };
@@ -8337,7 +8359,7 @@ var bu = (e) => {
8337
8359
  return {
8338
8360
  activate: ({ activated: e, id: n, ...r }) => {
8339
8361
  n = se(n);
8340
- let i = e.has(n) ? new Set([n]) : /* @__PURE__ */ new Set();
8362
+ let i = e.has(n) ? /* @__PURE__ */ new Set([n]) : /* @__PURE__ */ new Set();
8341
8363
  return t.activate({
8342
8364
  ...r,
8343
8365
  id: n,
@@ -8440,7 +8462,7 @@ var bu = (e) => {
8440
8462
  return {
8441
8463
  select: ({ selected: e, id: n, ...r }) => {
8442
8464
  n = se(n);
8443
- let i = e.has(n) ? new Map([[n, e.get(n)]]) : /* @__PURE__ */ new Map();
8465
+ let i = e.has(n) ? /* @__PURE__ */ new Map([[n, e.get(n)]]) : /* @__PURE__ */ new Map();
8444
8466
  return t.select({
8445
8467
  ...r,
8446
8468
  id: n,
@@ -9279,7 +9301,7 @@ var Vu = On({
9279
9301
  },
9280
9302
  returnObject: Boolean,
9281
9303
  valueComparator: Function
9282
- }, "list-items"), ed = new Set([
9304
+ }, "list-items"), ed = /* @__PURE__ */ new Set([
9283
9305
  "item",
9284
9306
  "divider",
9285
9307
  "subheader"
@@ -9315,7 +9337,7 @@ function nd(e, t) {
9315
9337
  }
9316
9338
  //#endregion
9317
9339
  //#region node_modules/vuetify/lib/components/VList/VList.js
9318
- var rd = new Set([
9340
+ var rd = /* @__PURE__ */ new Set([
9319
9341
  "item",
9320
9342
  "divider",
9321
9343
  "subheader"
@@ -9906,7 +9928,7 @@ function kd(t, n, r, i, a, o) {
9906
9928
  let s = I("BIconBtnWithTooltip"), c = I("BBoldMissionCode");
9907
9929
  return N(), l(wd, {
9908
9930
  permanent: "",
9909
- width: "400",
9931
+ width: "350",
9910
9932
  elevation: "3"
9911
9933
  }, {
9912
9934
  prepend: H(() => [f("div", Td, [
@@ -9920,7 +9942,12 @@ function kd(t, n, r, i, a, o) {
9920
9942
  _: 1
9921
9943
  }),
9922
9944
  f("div", Ed, R(t.$t("labelText.patientsFolders")), 1),
9923
- m(Lr)
9945
+ m(Lr),
9946
+ m(s, {
9947
+ icon: "$iconRefresh",
9948
+ message: t.$t("tooltip.refresh"),
9949
+ onOnClick: n[0] ||= (e) => t.$emit("onRefresh")
9950
+ }, null, 8, ["message"])
9924
9951
  ]),
9925
9952
  _: 1
9926
9953
  }),
@@ -9932,8 +9959,8 @@ function kd(t, n, r, i, a, o) {
9932
9959
  label: t.$t("labelText.search"),
9933
9960
  placeholder: t.$t("labelText.searchPatient"),
9934
9961
  clearable: "",
9935
- onKeydown: n[0] ||= he((e) => t.$emit("onSearch"), ["enter"]),
9936
- "onUpdate:modelValue": n[1] ||= (e) => t.$emit("update:search", e)
9962
+ onKeydown: n[1] ||= he((e) => t.$emit("onSearch"), ["enter"]),
9963
+ "onUpdate:modelValue": n[2] ||= (e) => t.$emit("update:search", e)
9937
9964
  }, null, 8, [
9938
9965
  "modelValue",
9939
9966
  "label",
@@ -9943,7 +9970,7 @@ function kd(t, n, r, i, a, o) {
9943
9970
  }), m(s, {
9944
9971
  icon: "$iconSearch",
9945
9972
  message: t.$t("labelText.search"),
9946
- onOnClick: n[2] ||= (e) => t.$emit("onSearch")
9973
+ onOnClick: n[3] ||= (e) => t.$emit("onSearch")
9947
9974
  }, null, 8, ["message"])]),
9948
9975
  _: 1
9949
9976
  })
@@ -10853,19 +10880,23 @@ function _f(t, n, r, i, a, o) {
10853
10880
  key: e.id,
10854
10881
  cols: "3"
10855
10882
  }, {
10856
- default: H(() => [m(s, {
10857
- modelValue: e.value,
10858
- "onUpdate:modelValue": (t) => e.value = t,
10859
- label: e.name,
10860
- disabled: "",
10861
- placeholder: e.placeholder,
10862
- "persistent-placeholder": ""
10863
- }, null, 8, [
10864
- "modelValue",
10865
- "onUpdate:modelValue",
10866
- "label",
10867
- "placeholder"
10868
- ])]),
10883
+ default: H(() => [m(xs, { location: "bottom" }, {
10884
+ activator: H(({ props: t }) => [f("div", C({ ref_for: !0 }, t), [m(s, {
10885
+ modelValue: e.value,
10886
+ "onUpdate:modelValue": (t) => e.value = t,
10887
+ label: e.name,
10888
+ disabled: "",
10889
+ placeholder: e.placeholder,
10890
+ "persistent-placeholder": ""
10891
+ }, null, 8, [
10892
+ "modelValue",
10893
+ "onUpdate:modelValue",
10894
+ "label",
10895
+ "placeholder"
10896
+ ])], 16)]),
10897
+ default: H(() => [f("span", null, R(e.name), 1)]),
10898
+ _: 2
10899
+ }, 1024)]),
10869
10900
  _: 2
10870
10901
  }, 1024))), 128))]),
10871
10902
  _: 1
@@ -11163,7 +11194,8 @@ var vf = /*#__PURE__*/ U(gf, [["render", _f]]), yf = G({
11163
11194
  components: {
11164
11195
  BCommentCard: hf,
11165
11196
  SauBilanStructureConstant: vf,
11166
- SauBilanTextCommentsButton: Tf
11197
+ SauBilanTextCommentsButton: Tf,
11198
+ BCardHeader: Xr
11167
11199
  },
11168
11200
  props: {
11169
11201
  folderId: {
@@ -11219,22 +11251,6 @@ var vf = /*#__PURE__*/ U(gf, [["render", _f]]), yf = G({
11219
11251
  si.notifyError(e);
11220
11252
  }
11221
11253
  },
11222
- async postBilanTextComment() {
11223
- try {
11224
- if (this.comment?.trim().length) {
11225
- let e = {
11226
- comment: this.comment,
11227
- user_id: this.userId,
11228
- user_full_name: this.username,
11229
- user_function: this.userFunction
11230
- }, { id: t, decision_id: n, mean_id: r } = this.medicalReport;
11231
- await Df.postBilanTextComment(this.folderId, this.folderPatientId, n, r, t, e), this.comment = "";
11232
- }
11233
- this.getBilanTextComment();
11234
- } catch (e) {
11235
- si.notifyError(e);
11236
- }
11237
- },
11238
11254
  async putBilanTextComment(e) {
11239
11255
  try {
11240
11256
  let t = { comment: e.comment }, { id: n, decision_id: r, mean_id: i } = this.medicalReport;
@@ -11271,7 +11287,7 @@ var vf = /*#__PURE__*/ U(gf, [["render", _f]]), yf = G({
11271
11287
  //#endregion
11272
11288
  //#region src/components/sauView/SauBilanStructure.vue
11273
11289
  function kf(t, n, r, i, a, o) {
11274
- let s = I("SauBilanStructureConstant"), c = I("BTextarea"), f = I("BCommentCard"), p = I("SauBilanTextCommentsButton");
11290
+ let s = I("SauBilanStructureConstant"), c = I("BTextarea"), f = I("BCardHeader"), p = I("BCommentCard"), h = I("SauBilanTextCommentsButton");
11275
11291
  return N(), d(e, null, [
11276
11292
  m(s, { constants: t.constants.slice(0, 4) }, null, 8, ["constants"]),
11277
11293
  m(s, { constants: t.constants.slice(4, 8) }, null, 8, ["constants"]),
@@ -11289,31 +11305,18 @@ function kf(t, n, r, i, a, o) {
11289
11305
  })]),
11290
11306
  _: 1
11291
11307
  }),
11292
- m(Q, null, {
11293
- default: H(() => [m(Z, null, {
11294
- default: H(() => [m(c, {
11295
- modelValue: t.comment,
11296
- "onUpdate:modelValue": n[0] ||= (e) => t.comment = e,
11297
- clearable: "",
11298
- label: t.$t("bilanVector.bilanText"),
11299
- onBlur: t.postBilanTextComment
11300
- }, null, 8, [
11301
- "modelValue",
11302
- "label",
11303
- "onBlur"
11304
- ])]),
11305
- _: 1
11306
- })]),
11307
- _: 1
11308
- }),
11308
+ m(f, {
11309
+ title: t.$t("bilanVector.bilanText"),
11310
+ "icon-title": "$iconBilan"
11311
+ }, null, 8, ["title"]),
11309
11312
  t.bilanTextComments?.[0] ? (N(), l(Q, { key: 0 }, {
11310
11313
  default: H(() => [m(Z, null, {
11311
- default: H(() => [m(f, { message: t.bilanTextComments[0] }, null, 8, ["message"])]),
11314
+ default: H(() => [m(p, { message: t.bilanTextComments[0] }, null, 8, ["message"])]),
11312
11315
  _: 1
11313
11316
  })]),
11314
11317
  _: 1
11315
11318
  })) : u("", !0),
11316
- m(p, {
11319
+ m(h, {
11317
11320
  "bilan-text-comments": t.bilanTextComments,
11318
11321
  onOnUpdateMessage: t.putBilanTextComment
11319
11322
  }, null, 8, ["bilan-text-comments", "onOnUpdateMessage"])
@@ -11654,10 +11657,12 @@ var Uf = /*#__PURE__*/ U(Bf, [["render", Hf]]), Wf = "api/v1/regulation_folders"
11654
11657
  }
11655
11658
  async function T(e, t) {
11656
11659
  if (e && t) try {
11657
- h.value = await zf.getPatientReasons(e, t) ?? {};
11660
+ let n = await zf.getPatientReasons(e, t);
11661
+ h.value = n ?? {};
11658
11662
  } catch (e) {
11659
11663
  si.notifyError(e);
11660
11664
  }
11665
+ else h.value = {};
11661
11666
  }
11662
11667
  async function E(e, t) {
11663
11668
  try {
@@ -11678,7 +11683,9 @@ var Uf = /*#__PURE__*/ U(Bf, [["render", Hf]]), Wf = "api/v1/regulation_folders"
11678
11683
  }
11679
11684
  async function k() {
11680
11685
  try {
11681
- _.value = !0, o.value = (await Fl.getEmergencies(v.value)).emergency_hall ?? [], i.value && await O(i.value);
11686
+ _.value = !0;
11687
+ let e = await Fl.getEmergencies(v.value);
11688
+ o.value = e.emergency_hall ?? [], i.value && await O(i.value);
11682
11689
  } catch (e) {
11683
11690
  si.notifyError(e);
11684
11691
  } finally {
@@ -11698,7 +11705,8 @@ var Uf = /*#__PURE__*/ U(Bf, [["render", Hf]]), Wf = "api/v1/regulation_folders"
11698
11705
  emergencies: o.value,
11699
11706
  "selected-emergency-id": i.value,
11700
11707
  onOnMissionSelected: O,
11701
- onOnSearch: t[1] ||= (e) => (k(), O(null))
11708
+ onOnSearch: t[1] ||= (e) => (k(), O(null)),
11709
+ onOnRefresh: t[2] ||= (e) => (v.value = null, k(), O(null))
11702
11710
  }, null, 8, [
11703
11711
  "search",
11704
11712
  "emergencies",