shared-ritm 1.2.87 → 1.2.88

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.
@@ -12062,7 +12062,7 @@ const z_ = Ge({
12062
12062
  ], 64);
12063
12063
  };
12064
12064
  }
12065
- }), iC = /* @__PURE__ */ Fe(aC, [["__scopeId", "data-v-2e33c030"]]), sC = { class: "modal-title" }, uC = {
12065
+ }), iC = /* @__PURE__ */ Fe(aC, [["__scopeId", "data-v-d70e00a1"]]), sC = { class: "modal-title" }, uC = {
12066
12066
  key: 0,
12067
12067
  class: "field-label"
12068
12068
  }, lC = {
@@ -12075,7 +12075,8 @@ const z_ = Ge({
12075
12075
  title: {},
12076
12076
  mode: {},
12077
12077
  fields: {},
12078
- initialData: {}
12078
+ initialData: {},
12079
+ loading: { type: Boolean }
12079
12080
  },
12080
12081
  emits: ["update:modelValue", "submit", "edit", "delete"],
12081
12082
  setup(e, { emit: n }) {
@@ -12233,27 +12234,31 @@ const z_ = Ge({
12233
12234
  class: "remove",
12234
12235
  flat: "",
12235
12236
  label: "Удалить",
12237
+ loading: h.loading,
12236
12238
  onClick: p[0] || (p[0] = (v) => r("delete"))
12237
- })) : tt("", !0),
12239
+ }, null, 8, ["loading"])) : tt("", !0),
12238
12240
  h.mode !== "view" ? (Q(), Pe(St, {
12239
12241
  key: 1,
12240
12242
  class: "confirm",
12241
12243
  flat: "",
12242
12244
  label: h.mode === "edit" ? "Сохранить" : "Создать",
12243
12245
  disable: u.value,
12246
+ loading: h.loading,
12244
12247
  onClick: l
12245
- }, null, 8, ["label", "disable"])) : (Q(), Pe(St, {
12248
+ }, null, 8, ["label", "disable", "loading"])) : (Q(), Pe(St, {
12246
12249
  key: 2,
12247
12250
  class: "confirm",
12248
12251
  flat: "",
12249
12252
  label: "Редактировать",
12253
+ disable: h.loading,
12250
12254
  onClick: p[1] || (p[1] = (v) => h.$emit("edit"))
12251
- })),
12255
+ }, null, 8, ["disable"])),
12252
12256
  qn(_e(St, {
12253
12257
  class: "cancel",
12254
12258
  flat: "",
12255
- label: "Закрыть"
12256
- }, null, 512), [
12259
+ label: "Закрыть",
12260
+ disable: h.loading
12261
+ }, null, 8, ["disable"]), [
12257
12262
  [ou]
12258
12263
  ])
12259
12264
  ]),
@@ -12266,7 +12271,7 @@ const z_ = Ge({
12266
12271
  _: 1
12267
12272
  }, 8, ["model-value"]));
12268
12273
  }
12269
- }), WA = /* @__PURE__ */ Fe(cC, [["__scopeId", "data-v-61118cdf"]]), ph = Ge({
12274
+ }), WA = /* @__PURE__ */ Fe(cC, [["__scopeId", "data-v-26f3d43f"]]), ph = Ge({
12270
12275
  name: "QTd",
12271
12276
  props: {
12272
12277
  props: Object,
@@ -16036,13 +16041,14 @@ class Zn {
16036
16041
  throw this.handleError(a), o;
16037
16042
  }
16038
16043
  }
16039
- // protected patch<T1, T2>(url: string, payload: T1, type: ApiServiceType, options?: AxiosRequestConfig): Promise<T2> {
16040
- // return axios
16041
- // .patch<T1, AxiosResponse<T2>>(apiServiceUrls[type] + url, payload, options)
16042
- // .catch((err: AxiosError) => processError401<T2>(err))
16043
- // .then(extractData)
16044
- // }
16045
- //
16044
+ async patch(n, t, r) {
16045
+ try {
16046
+ return (await this.axiosInstance.patch(n, t, r)).data;
16047
+ } catch (o) {
16048
+ const a = o;
16049
+ throw this.handleError(a), o;
16050
+ }
16051
+ }
16046
16052
  async put(n, t, r) {
16047
16053
  try {
16048
16054
  return (await this.axiosInstance.put(n, t, r)).data;
@@ -16428,8 +16434,32 @@ class j3 extends Zn {
16428
16434
  async deleteUser(n) {
16429
16435
  return await this.delete(`/admin/users/${n}`);
16430
16436
  }
16431
- getRoles(n) {
16432
- return this.get("/search/roles", { params: n });
16437
+ async getRoles(n) {
16438
+ return await this.get("/search/roles", { params: n });
16439
+ }
16440
+ async getPositions(n) {
16441
+ return await this.get("/search/positions", { params: n });
16442
+ }
16443
+ async createPosition(n) {
16444
+ return await this.post("/admin/positions", n);
16445
+ }
16446
+ async editPosition(n, t) {
16447
+ return await this.put(`/admin/positions/${n}`, t);
16448
+ }
16449
+ async deletePosition(n) {
16450
+ return await this.delete(`/admin/positions/${n}`);
16451
+ }
16452
+ async getTeams(n) {
16453
+ return await this.get("/search/teams", { params: n });
16454
+ }
16455
+ async createTeam(n) {
16456
+ return await this.post("/teams", n);
16457
+ }
16458
+ async editTeam(n, t) {
16459
+ return await this.patch(`/teams/${n}`, t);
16460
+ }
16461
+ async deleteTeam(n) {
16462
+ return await this.delete(`/teams/${n}`);
16433
16463
  }
16434
16464
  }
16435
16465
  let cl;