@genpact/genome.mfe.mgtwin-app 1.1.328-alpha → 1.1.329-alpha

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.
Files changed (23) hide show
  1. package/dist/{AssessmentAMA-72c54a74.mjs → AssessmentAMA-265050f2.mjs} +29 -31
  2. package/dist/{AssessmentSimulation-72e4ee6b.mjs → AssessmentSimulation-3a087e23.mjs} +7 -7
  3. package/dist/EditSkillAdminData-5e9f9068.mjs +252 -0
  4. package/dist/{EditSkillData-49ef4275.mjs → EditSkillData-95626c99.mjs} +82 -69
  5. package/dist/{HomeView-3d62ea04.mjs → HomeView-53364137.mjs} +125 -127
  6. package/dist/{Loading-c434e673.mjs → Loading-3be77584.mjs} +1 -1
  7. package/dist/{LoadingSimulation-f5917992.mjs → LoadingSimulation-6e1608c1.mjs} +1 -1
  8. package/dist/{Modal-55efd07c.mjs → Modal-8a04d494.mjs} +4 -5
  9. package/dist/{PaperAirplaneIcon-35d47726.mjs → PaperAirplaneIcon-e7f1ad92.mjs} +1 -1
  10. package/dist/{PromptTesting-ca6b362f.mjs → PromptTesting-f67667d6.mjs} +3 -3
  11. package/dist/{SkillAutomation-21539258.mjs → SkillAutomation-12a16283.mjs} +3 -3
  12. package/dist/{SkillData-27860de7.mjs → SkillData-5be389be.mjs} +3 -3
  13. package/dist/{Testcase-6a46ad9a.mjs → Testcase-d78f9a85.mjs} +3 -3
  14. package/dist/{UnderMaintenance-f355843a.mjs → UnderMaintenance-fd350fa8.mjs} +1 -1
  15. package/dist/{_commonjsHelpers-49bf7401.mjs → _commonjsHelpers-a3546faf.mjs} +1 -1
  16. package/dist/{api-d4fe1294.mjs → api-05b4a7bc.mjs} +1 -1
  17. package/dist/{main-74d4584a.mjs → main-dfd042f1.mjs} +866 -866
  18. package/dist/mgtwin.es.min.js +1 -1
  19. package/dist/mgtwin.umd.min.js +15 -15
  20. package/dist/style.css +1 -1
  21. package/package.json +1 -1
  22. package/dist/ArrowLeftCircleIcon-683541a2.mjs +0 -18
  23. package/dist/EditSkillAdminData-601f7e5f.mjs +0 -278
@@ -1,8 +1,8 @@
1
- import { _ as U, a as V, L as B } from "./LoadingSimulation-f5917992.mjs";
2
- import { _ as H, Q as M, a as z } from "./Modal-55efd07c.mjs";
3
- import { d as y, r as d, H as R, o as c, c as u, a as s, u as k, y as L, t as S, G, p as N, g as E, C as Q, z as D, h as x, F as O, e as Z, f as I, b as v, k as F, w as K, m as W, L as Y, q as P, s as J, l as X } from "./main-74d4584a.mjs";
1
+ import { _ as U, a as V, L as B } from "./LoadingSimulation-6e1608c1.mjs";
2
+ import { _ as H, Q as M, a as z } from "./Modal-8a04d494.mjs";
3
+ import { d as y, r as u, H as R, o as c, c as d, a as s, u as k, y as L, t as S, G, p as N, g as E, C as Q, z as D, h as x, F as O, e as Z, f as I, b as v, k as F, w as K, m as W, L as Y, q as P, s as J, l as X } from "./main-dfd042f1.mjs";
4
4
  import { _ as $ } from "./_plugin-vue_export-helper-dad06003.mjs";
5
- import { p as ee, g as se } from "./api-d4fe1294.mjs";
5
+ import { p as ee, g as se } from "./api-05b4a7bc.mjs";
6
6
  import "./loadernew-ac153a51.mjs";
7
7
  const te = { class: "flex h-14 w-full flex-1 items-center justify-between bg-[#021c42] md:pr-6 lg:pr-6" }, ae = ["href"], oe = /* @__PURE__ */ s("img", {
8
8
  class: "h-11 w-auto cursor-pointer",
@@ -19,8 +19,8 @@ const te = { class: "flex h-14 w-full flex-1 items-center justify-between bg-[#0
19
19
  ], ce = /* @__PURE__ */ y({
20
20
  __name: "headerAMA",
21
21
  setup(n) {
22
- const e = d(""), o = d("");
23
- return R === "prod" ? e.value = "https://genome.genpact.com" : e.value = "https://genome-dev.genpact.com", R === "prod" ? o.value = "https://genome.genpact.com/#aiguru" : o.value = "https://genome-dev.genpact.com/#aiguru", (l, p) => (c(), u("nav", te, [
22
+ const e = u(""), o = u("");
23
+ return R === "prod" ? e.value = "https://genome.genpact.com" : e.value = "https://genome-dev.genpact.com", R === "prod" ? o.value = "https://genome.genpact.com/#aiguru" : o.value = "https://genome-dev.genpact.com/#aiguru", (l, p) => (c(), d("nav", te, [
24
24
  s("a", {
25
25
  class: "px-2 md:px-0 lg:px-0",
26
26
  href: e.value,
@@ -37,7 +37,7 @@ const te = { class: "flex h-14 w-full flex-1 items-center justify-between bg-[#0
37
37
  __name: "greetingsAMA",
38
38
  setup(n) {
39
39
  const e = k(), o = ` Hi ${e.learnerName || "Learner"}! 👋`, l = L(() => o);
40
- return L(() => `I'm here and ready to help! What would you like to know about <span class='font-[600]'>${e.amaSkillName || "Skill"}</span>? <br/> Ask me to explain concepts, provide examples, or clarify anything that seems confusing.`), (p, m) => (c(), u("section", null, [
40
+ return L(() => `I'm here and ready to help! What would you like to know about <span class='font-[600]'>${e.amaSkillName || "Skill"}</span>? <br/> Ask me to explain concepts, provide examples, or clarify anything that seems confusing.`), (p, m) => (c(), d("section", null, [
41
41
  s("div", de, [
42
42
  s("div", ue, [
43
43
  s("div", _e, [
@@ -64,7 +64,7 @@ const te = { class: "flex h-14 w-full flex-1 items-center justify-between bg-[#0
64
64
  ), p = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;
65
65
  return l.replace(p, (m, r, t) => `<a href="${t}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${r}</a>`);
66
66
  });
67
- return (l, p) => (c(), u("div", fe, [
67
+ return (l, p) => (c(), d("div", fe, [
68
68
  s("div", ge, [
69
69
  s("span", {
70
70
  class: "fontFormattingAMA",
@@ -83,7 +83,7 @@ const ye = /* @__PURE__ */ $(xe, [["__scopeId", "data-v-f88d6450"]]), we = { cla
83
83
  }
84
84
  },
85
85
  setup(n) {
86
- return (e, o) => (c(), u("div", we, [
86
+ return (e, o) => (c(), d("div", we, [
87
87
  s("div", Ae, [
88
88
  s("div", be, S(n.question), 1)
89
89
  ])
@@ -96,7 +96,7 @@ const ye = /* @__PURE__ */ $(xe, [["__scopeId", "data-v-f88d6450"]]), we = { cla
96
96
  ], -1)), Se = /* @__PURE__ */ G('<div class="block w-full max-w-full items-stretch" data-v-12a02acf><div class="flex animate-pulse items-start justify-start space-x-4" data-v-12a02acf><div class="flex-1 space-y-6 py-1" data-v-12a02acf><div class="h-2 w-full rounded bg-gray-300" data-v-12a02acf></div><div class="space-y-3" data-v-12a02acf><div class="grid grid-cols-3 gap-4" data-v-12a02acf><div class="col-span-2 h-2 rounded bg-gray-300" data-v-12a02acf></div><div class="col-span-1 h-2 rounded bg-gray-300" data-v-12a02acf></div></div><div class="h-2 rounded bg-gray-300" data-v-12a02acf></div></div></div></div></div>', 1), Ne = /* @__PURE__ */ y({
97
97
  __name: "LoadingResponseAMA",
98
98
  setup(n) {
99
- const e = d("Generating response"), o = d([
99
+ const e = u("Generating response"), o = u([
100
100
  "This may take a few seconds",
101
101
  "Fetching the best response for you",
102
102
  "Thinking... give me a moment",
@@ -108,7 +108,7 @@ const ye = /* @__PURE__ */ $(xe, [["__scopeId", "data-v-f88d6450"]]), we = { cla
108
108
  return setTimeout(() => {
109
109
  const l = Math.floor(Math.random() * o.value.length);
110
110
  e.value = o.value[l];
111
- }, 15e3), (l, p) => (c(), u("div", qe, [
111
+ }, 15e3), (l, p) => (c(), d("div", qe, [
112
112
  s("div", Me, [
113
113
  s("div", Ie, S(e.value), 1),
114
114
  Le
@@ -123,9 +123,9 @@ const Ee = /* @__PURE__ */ $(Ne, [["__scopeId", "data-v-12a02acf"]]), Qe = { key
123
123
  }, Fe = /* @__PURE__ */ y({
124
124
  __name: "conversationAMA",
125
125
  setup(n) {
126
- let e = d(""), o = d("");
126
+ let e = u(""), o = u("");
127
127
  e.value = '<a style="color:#00AECF;"', o.value = '<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';
128
- const l = k(), p = d();
128
+ const l = k(), p = u();
129
129
  return Q(() => {
130
130
  var t;
131
131
  const m = document.getElementsByName("askQuestion"), r = Array.from(m);
@@ -134,14 +134,14 @@ const Ee = /* @__PURE__ */ $(Ne, [["__scopeId", "data-v-12a02acf"]]), Qe = { key
134
134
  var t;
135
135
  const m = document.getElementsByName("askQuestion"), r = Array.from(m);
136
136
  m.length && ((t = r == null ? void 0 : r.pop()) == null || t.scrollIntoView({ behavior: "smooth", block: "center" }));
137
- }), (m, r) => (c(), u("div", {
137
+ }), (m, r) => (c(), d("div", {
138
138
  ref_key: "nestedElement",
139
139
  ref: p,
140
140
  class: "smooth-scroll overflow-auto md:px-6 px-2"
141
141
  }, [
142
142
  x(he),
143
- (c(!0), u(O, null, Z(v(l).conversations, (t, _) => (c(), u("div", { key: _ }, [
144
- t.question ? (c(), u("div", Qe, [
143
+ (c(!0), d(O, null, Z(v(l).conversations, (t, _) => (c(), d("div", { key: _ }, [
144
+ t.question ? (c(), d("div", Qe, [
145
145
  x($e, {
146
146
  question: t.question,
147
147
  c2question: t.c2question,
@@ -151,7 +151,7 @@ const Ee = /* @__PURE__ */ $(Ne, [["__scopeId", "data-v-12a02acf"]]), Qe = { key
151
151
  "que-id": _
152
152
  }, null, 8, ["question", "c2question", "show-feedback", "id", "que-id"])
153
153
  ])) : I("", !0),
154
- t.answer ? (c(), u("div", Ce, [
154
+ t.answer ? (c(), d("div", Ce, [
155
155
  x(ye, {
156
156
  question: t == null ? void 0 : t.question,
157
157
  c2question: t == null ? void 0 : t.c2question,
@@ -165,7 +165,7 @@ const Ee = /* @__PURE__ */ $(Ne, [["__scopeId", "data-v-12a02acf"]]), Qe = { key
165
165
  }, null, 8, ["question", "c2question", "show-sources", "questionId", "answer", "show-feedback", "related-ques", "options-array", "ans-id"])
166
166
  ])) : I("", !0)
167
167
  ]))), 128)),
168
- v(l).dotLoader ? (c(), u("div", Re, [
168
+ v(l).dotLoader ? (c(), d("div", Re, [
169
169
  x(Ee)
170
170
  ])) : I("", !0)
171
171
  ], 512));
@@ -190,11 +190,11 @@ const Pe = /* @__PURE__ */ $(Fe, [["__scopeId", "data-v-e6168dd4"]]), q = (n) =>
190
190
  setup(n) {
191
191
  const e = k(), o = F();
192
192
  e.question = "";
193
- const l = d(null), p = d(!1), m = d(M), r = d(!1);
193
+ const l = u(null), p = u(!1), m = u(M), r = u(!1);
194
194
  Q(() => {
195
195
  l.value.focus();
196
196
  });
197
- const _ = d(((h) => new URLSearchParams(window.location.search).get(h) || "")("amaId"));
197
+ const _ = u(((h) => new URLSearchParams(window.location.search).get(h) || "")("amaId"));
198
198
  console.log("amaId", _.value);
199
199
  const w = (h) => {
200
200
  const i = h.length;
@@ -215,7 +215,7 @@ const Pe = /* @__PURE__ */ $(Fe, [["__scopeId", "data-v-e6168dd4"]]), q = (n) =>
215
215
  question: e == null ? void 0 : e.question
216
216
  };
217
217
  e.conversations.push(a);
218
- const g = d("");
218
+ const g = u("");
219
219
  g.value = e == null ? void 0 : e.question, e.question = "";
220
220
  const T = {
221
221
  skillId: _.value,
@@ -231,14 +231,14 @@ const Pe = /* @__PURE__ */ $(Fe, [["__scopeId", "data-v-e6168dd4"]]), q = (n) =>
231
231
  o.setError("There was an issue, please contact helpmate");
232
232
  }
233
233
  };
234
- return (h, i) => (c(), u("div", Te, [
234
+ return (h, i) => (c(), d("div", Te, [
235
235
  s("div", je, [
236
236
  s("div", Ue, [
237
237
  s("div", Ve, [
238
238
  s("div", Be, [
239
239
  s("div", He, [
240
- r.value ? (c(), u("div", Oe, We)) : (c(), u("div", ze, [
241
- (c(), u("svg", {
240
+ r.value ? (c(), d("div", Oe, We)) : (c(), d("div", ze, [
241
+ (c(), d("svg", {
242
242
  onClick: i[0] || (i[0] = (f) => A()),
243
243
  xmlns: "http://www.w3.org/2000/svg",
244
244
  fill: "currentColor",
@@ -272,7 +272,7 @@ const Pe = /* @__PURE__ */ $(Fe, [["__scopeId", "data-v-e6168dd4"]]), q = (n) =>
272
272
  ]));
273
273
  }
274
274
  });
275
- const ts = /* @__PURE__ */ $(ss, [["__scopeId", "data-v-4d4db1ef"]]), C = (n) => (N("data-v-944ca5e3"), n = n(), E(), n), as = /* @__PURE__ */ C(() => /* @__PURE__ */ s("div", { class: "max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916]" }, [
275
+ const ts = /* @__PURE__ */ $(ss, [["__scopeId", "data-v-4d4db1ef"]]), C = (n) => (N("data-v-4632b0a7"), n = n(), E(), n), as = /* @__PURE__ */ C(() => /* @__PURE__ */ s("div", { class: "max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916]" }, [
276
276
  /* @__PURE__ */ s("div", { class: "text-2xl font-[700]" }, "Assessment Access Required"),
277
277
  /* @__PURE__ */ s("h3", { className: "text-lg font-medium my-6 text-center text-gray-500" }, " You don't have access to this assessment. Please contact to administrator ")
278
278
  ], -1)), os = {
@@ -281,9 +281,7 @@ const ts = /* @__PURE__ */ $(ss, [["__scopeId", "data-v-4d4db1ef"]]), C = (n) =>
281
281
  }, ns = { class: "z-20" }, rs = /* @__PURE__ */ C(() => /* @__PURE__ */ s("div", { class: "mt-6" }, null, -1)), ls = { class: "flex h-full items-stretch overflow-hidden" }, is = { class: "mx-auto w-11/12 bg-white" }, cs = { class: "relative flex h-full w-full flex-col items-stretch overflow-hidden" }, ds = /* @__PURE__ */ C(() => /* @__PURE__ */ s("div", { class: "mt-[160px]" }, null, -1)), us = { class: "relative" }, _s = /* @__PURE__ */ y({
282
282
  __name: "AssessmentAMA",
283
283
  setup(n) {
284
- const e = d(!0), o = d(!1), l = k(), p = F();
285
- d("");
286
- const r = d(((_) => new URLSearchParams(window.location.search).get(_) || "")("amaId"));
284
+ const e = u(!0), o = u(!1), l = k(), p = F(), r = u(((_) => new URLSearchParams(window.location.search).get(_) || "")("amaId"));
287
285
  l.amaSkillId = r.value ?? "", Q(async () => {
288
286
  e.value = !0, await t(), e.value = !1;
289
287
  });
@@ -316,7 +314,7 @@ const ts = /* @__PURE__ */ $(ss, [["__scopeId", "data-v-4d4db1ef"]]), C = (n) =>
316
314
  p.setError("There was an issue, please contact helpmate");
317
315
  }
318
316
  };
319
- return (_, w) => (c(), u("section", null, [
317
+ return (_, w) => (c(), d("section", null, [
320
318
  x(z, { "is-visible": o.value }, {
321
319
  default: J(() => [
322
320
  as
@@ -324,7 +322,7 @@ const ts = /* @__PURE__ */ $(ss, [["__scopeId", "data-v-4d4db1ef"]]), C = (n) =>
324
322
  _: 1
325
323
  }, 8, ["is-visible"]),
326
324
  s("div", null, [
327
- e.value ? (c(), X(B, { key: 0 })) : (c(), u("main", os, [
325
+ e.value ? (c(), X(B, { key: 0 })) : (c(), d("main", os, [
328
326
  s("div", ns, [
329
327
  x(ce)
330
328
  ]),
@@ -345,7 +343,7 @@ const ts = /* @__PURE__ */ $(ss, [["__scopeId", "data-v-4d4db1ef"]]), C = (n) =>
345
343
  ]));
346
344
  }
347
345
  });
348
- const xs = /* @__PURE__ */ $(_s, [["__scopeId", "data-v-944ca5e3"]]);
346
+ const xs = /* @__PURE__ */ $(_s, [["__scopeId", "data-v-4632b0a7"]]);
349
347
  export {
350
348
  xs as default
351
349
  };
@@ -1,9 +1,9 @@
1
- import { _ as Sl, a as up, L as Cl } from "./LoadingSimulation-f5917992.mjs";
2
- import { _ as yl, a as pp, Q as jt, M as ba } from "./Modal-55efd07c.mjs";
3
- import { d as _e, r as _, H as Lt, o as D, c as k, a as P, u as Ne, k as wt, y as Uo, h as ye, s as dp, t as Xe, b as O, f as Pe, i as ge, I as Qi, F as Ho, e as Wo, w as Yo, J as Pl, p as Kn, g as Jn, G as es, C as Vt, z as Rl, K as El, q as Ie, n as xt, m as lp, L as hp, l as wl } from "./main-74d4584a.mjs";
1
+ import { _ as Sl, a as up, L as Cl } from "./LoadingSimulation-6e1608c1.mjs";
2
+ import { _ as yl, a as pp, Q as jt, M as ba } from "./Modal-8a04d494.mjs";
3
+ import { d as _e, r as _, H as Lt, o as D, c as k, a as P, u as Ne, k as wt, y as Uo, h as ye, s as dp, t as Xe, b as O, f as Pe, i as ge, I as Qi, F as Ho, e as Wo, w as Yo, J as Pl, p as Kn, g as Jn, G as es, C as Vt, z as Rl, K as El, q as Ie, n as xt, m as lp, L as hp, l as wl } from "./main-dfd042f1.mjs";
4
4
  import { _ as $t } from "./_plugin-vue_export-helper-dad06003.mjs";
5
- import { g as qn, p as Hn } from "./api-d4fe1294.mjs";
6
- import { c as q, a as Al, r as Il } from "./_commonjsHelpers-49bf7401.mjs";
5
+ import { g as qn, p as Hn } from "./api-05b4a7bc.mjs";
6
+ import { c as q, a as Al, r as Il } from "./_commonjsHelpers-a3546faf.mjs";
7
7
  import "./loadernew-ac153a51.mjs";
8
8
  const _l = { class: "flex h-14 w-full flex-1 items-center justify-between bg-[#021c42] md:pr-6 lg:pr-6" }, Tl = ["href"], bl = /* @__PURE__ */ P("img", {
9
9
  class: "h-11 w-auto cursor-pointer",
@@ -18259,7 +18259,7 @@ const Sy = /* @__PURE__ */ $t(my, [["__scopeId", "data-v-dd2e329e"]]), go = (t)
18259
18259
  ]));
18260
18260
  }
18261
18261
  });
18262
- const Ly = /* @__PURE__ */ $t(jy, [["__scopeId", "data-v-6c0980b5"]]), ai = (t) => (Kn("data-v-450b2de7"), t = t(), Jn(), t), xy = { class: "max-h-screen overflow-auto md:p-6 p-3 text-[#161916]" }, By = {
18262
+ const Ly = /* @__PURE__ */ $t(jy, [["__scopeId", "data-v-6c0980b5"]]), ai = (t) => (Kn("data-v-e37be657"), t = t(), Jn(), t), xy = { class: "max-h-screen overflow-auto md:p-6 p-3 text-[#161916]" }, By = {
18263
18263
  key: 0,
18264
18264
  class: "flex flex-col items-center justify-center gap-4"
18265
18265
  }, qy = /* @__PURE__ */ ai(() => /* @__PURE__ */ P("div", { class: "text-2xl font-[700]" }, "Assessment Access Required", -1)), Fy = /* @__PURE__ */ ai(() => /* @__PURE__ */ P("h3", { className: "text-lg font-medium my-6 text-center text-gray-500" }, " You don't have access to this assessment. Please contact to administrator ", -1)), Uy = [
@@ -18430,7 +18430,7 @@ const Ly = /* @__PURE__ */ $t(jy, [["__scopeId", "data-v-6c0980b5"]]), ai = (t)
18430
18430
  ]));
18431
18431
  }
18432
18432
  });
18433
- const MR = /* @__PURE__ */ $t(tP, [["__scopeId", "data-v-450b2de7"]]);
18433
+ const MR = /* @__PURE__ */ $t(tP, [["__scopeId", "data-v-e37be657"]]);
18434
18434
  export {
18435
18435
  MR as default
18436
18436
  };
@@ -0,0 +1,252 @@
1
+ import { d as U, u as z, k as O, r as c, o as i, c as d, a as e, w as b, m as k, b as n, n as S, v as L, F as V, e as P, t as _, q as D, D as T, p as $, g as H, i as F } from "./main-dfd042f1.mjs";
2
+ import { _ as j } from "./loadernew-ac153a51.mjs";
3
+ import { p as B, g as Y } from "./api-05b4a7bc.mjs";
4
+ import { _ as J } from "./_plugin-vue_export-helper-dad06003.mjs";
5
+ const r = (f) => ($("data-v-50115682"), f = f(), H(), f), Q = /* @__PURE__ */ r(() => /* @__PURE__ */ e("nav", { class: "bg-genpact-blue-box w-full px-5 mb-6" }, null, -1)), X = { class: "grid grid-cols-5 gap-8 p-10 items-stretch" }, Z = /* @__PURE__ */ r(() => /* @__PURE__ */ e("div", { class: "col-span-1 text-right" }, [
6
+ /* @__PURE__ */ e("label", {
7
+ for: "topic",
8
+ class: "block text-lg font-bold text-gray-900 mb-1 italic"
9
+ }, [
10
+ /* @__PURE__ */ F("Topic Name "),
11
+ /* @__PURE__ */ e("span", { class: "label" }, "*")
12
+ ])
13
+ ], -1)), ee = { class: "col-span-4" }, te = ["disabled"], se = /* @__PURE__ */ r(() => /* @__PURE__ */ e("div", { class: "col-span-1 text-right" }, [
14
+ /* @__PURE__ */ e("label", {
15
+ for: "description",
16
+ class: "block text-lg font-bold text-gray-900 mb-1 italic"
17
+ }, [
18
+ /* @__PURE__ */ F("Description "),
19
+ /* @__PURE__ */ e("span", { class: "label" }, "*")
20
+ ])
21
+ ], -1)), oe = { class: "col-span-4" }, le = /* @__PURE__ */ r(() => /* @__PURE__ */ e("div", { class: "col-span-1 text-right" }, [
22
+ /* @__PURE__ */ e("label", {
23
+ for: "Knowledge Corpus",
24
+ class: "block text-lg font-bold text-gray-900 mb-1 italic"
25
+ }, [
26
+ /* @__PURE__ */ F("Knowledge Corpus "),
27
+ /* @__PURE__ */ e("span", { class: "label" }, "*")
28
+ ])
29
+ ], -1)), ae = { class: "col-span-4" }, re = /* @__PURE__ */ r(() => /* @__PURE__ */ e("div", { class: "col-span-1" }, null, -1)), ce = { class: "col-span-4" }, ne = { class: "grid md:grid-cols-5 grid-cols-1 justify-start items-center gap-2" }, ie = { class: "col-span-1" }, de = ["disabled"], ue = {
30
+ key: 1,
31
+ class: "flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40"
32
+ }, pe = /* @__PURE__ */ r(() => /* @__PURE__ */ e("img", {
33
+ class: "w-10 h-10 block loadercss",
34
+ src: j,
35
+ alt: "Loader Gif"
36
+ }, null, -1)), ge = [
37
+ pe
38
+ ], be = /* @__PURE__ */ r(() => /* @__PURE__ */ e("div", { class: "col-span-1" }, null, -1)), _e = /* @__PURE__ */ r(() => /* @__PURE__ */ e("div", { class: "col-span-1" }, null, -1)), fe = { class: "col-span-1 flex md:justify-end justify-start items-end" }, he = {
39
+ key: 1,
40
+ class: "flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"
41
+ }, me = /* @__PURE__ */ r(() => /* @__PURE__ */ e("img", {
42
+ class: "w-10 h-10 block loadercss",
43
+ src: j,
44
+ alt: "Loader Gif"
45
+ }, null, -1)), xe = [
46
+ me
47
+ ], ye = { class: "col-span-1 flex md:justify-end justify-start items-end" }, ve = ["disabled"], we = {
48
+ key: 1,
49
+ class: "flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"
50
+ }, ke = /* @__PURE__ */ r(() => /* @__PURE__ */ e("img", {
51
+ class: "w-10 h-10 block loadercss",
52
+ src: j,
53
+ alt: "Loader Gif"
54
+ }, null, -1)), Se = [
55
+ ke
56
+ ], De = { class: "pl-16 pr-8 py-2" }, Te = { class: "w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]" }, Fe = { class: "table-auto w-full text-sm text-left rtl:text-right rounded-lg" }, je = /* @__PURE__ */ r(() => /* @__PURE__ */ e("thead", { class: "text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10" }, [
57
+ /* @__PURE__ */ e("tr", null, [
58
+ /* @__PURE__ */ e("th", {
59
+ scope: "col",
60
+ class: "px-6 py-3"
61
+ }, "Topic name"),
62
+ /* @__PURE__ */ e("th", {
63
+ scope: "col",
64
+ class: "px-6 py-3"
65
+ }, "Description"),
66
+ /* @__PURE__ */ e("th", {
67
+ scope: "col",
68
+ class: "px-6 py-3"
69
+ }, "Knowledge Corpus"),
70
+ /* @__PURE__ */ e("th", {
71
+ scope: "col",
72
+ class: "px-6 py-3"
73
+ }, "Score")
74
+ ])
75
+ ], -1)), Ee = { class: "px-3 py-4 font-medium text-gray-900 text-center" }, Ae = { class: "px-3 py-4" }, Ce = { class: "px-3 py-4 text-center" }, Ie = /* @__PURE__ */ r(() => /* @__PURE__ */ e("td", { class: "px-3 py-4 text-center" }, /* @__PURE__ */ _("1.05"), -1)), Ne = { class: "absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]" }, Re = { class: "w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white" }, qe = /* @__PURE__ */ U({
76
+ __name: "EditSkillAdminData",
77
+ setup(f) {
78
+ const o = z(), u = O(), h = c(!0), m = c(!0), x = c(!0), v = c(!1), G = c(""), E = c(!1), p = c(!1), A = c(), C = c(), w = c(""), I = c([]), M = async () => {
79
+ var l, t, s, y, R, q;
80
+ try {
81
+ const g = {
82
+ question: o.descriptionForSkillData
83
+ };
84
+ console.log("question", G.value), h.value = !1;
85
+ const a = await B("/SearchSkillTags", g);
86
+ C.value = (t = (l = a == null ? void 0 : a.data) == null ? void 0 : l.body) == null ? void 0 : t.length, console.log("ARRAY LENGTH", C.value), A.value = ((s = a == null ? void 0 : a.data) == null ? void 0 : s.body) || [], I.value = A.value, console.log("length", (R = (y = a == null ? void 0 : a.data) == null ? void 0 : y.body) == null ? void 0 : R.length), console.log("data", a), h.value = !0, E.value = !0, p.value = !0, console.log("showSubmitButton", p.value);
87
+ } catch (g) {
88
+ if (console.error(g), h.value = !0, D.isAxiosError(g)) {
89
+ const a = g;
90
+ u.setError(((q = a.response) == null ? void 0 : q.data).message);
91
+ } else
92
+ u.setError("We ran into an issue while fetching duplicate values.");
93
+ }
94
+ }, W = async () => {
95
+ var l;
96
+ try {
97
+ console.log("before rejecting topic"), m.value = !1;
98
+ const t = encodeURIComponent(o.topicNameForSkillData), s = await Y(`/rejectTempTopic?Topic=${t}`);
99
+ console.log("encoded topic", t), console.log("response", s), m.value = !0, s.status === 200 && (o.topicNameForSkillData = "", o.descriptionForSkillData = "", o.offeringTypeForSkillData = "", console.log("after rejecting topic"), w.value = "Data Rejected Successfully!", N());
100
+ } catch (t) {
101
+ if (console.error(t), m.value = !0, D.isAxiosError(t)) {
102
+ const s = t;
103
+ u.setError(((l = s.response) == null ? void 0 : l.data).message);
104
+ } else
105
+ u.setError("We ran into an issue while rejecting values.");
106
+ }
107
+ }, K = async () => {
108
+ var l;
109
+ try {
110
+ const t = {
111
+ Topic: o.topicNameForSkillData,
112
+ Description: o.descriptionForSkillData,
113
+ OfferingType: o.offeringTypeForSkillData
114
+ // DuplicateExists: duplicateLength.value > 0 ? 1 : 0
115
+ };
116
+ console.log("payload-=====>", t), x.value = !1;
117
+ const s = await B("/editMasterSkillFile", t);
118
+ console.log("data", s), x.value = !0, w.value = "Data Submitted Successfully!", N();
119
+ } catch (t) {
120
+ if (console.error(t), x.value = !0, D.isAxiosError(t)) {
121
+ const s = t;
122
+ u.setError(((l = s.response) == null ? void 0 : l.data).message);
123
+ } else
124
+ u.setError("There was an issue while inserting data");
125
+ }
126
+ }, N = () => {
127
+ v.value = !0, setTimeout(() => {
128
+ v.value = !1;
129
+ const l = sessionStorage.getItem("role");
130
+ console.log("role", l), l === "user" ? T.push({ name: "SkillData" }) : l === "admin" ? T.push({ name: "SkillData" }) : T.push({ name: "SkillAutomation" }), sessionStorage.removeItem("dataViewAccess"), sessionStorage.removeItem("role");
131
+ }, 3e3);
132
+ };
133
+ return (l, t) => (i(), d(V, null, [
134
+ Q,
135
+ e("div", X, [
136
+ Z,
137
+ e("div", ee, [
138
+ b(e("input", {
139
+ disabled: n(o).enableInputbox !== !0,
140
+ class: S([
141
+ n(o).enableInputbox !== !0 ? "cursor-not-allowed fill-gray-400" : "",
142
+ "w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1"
143
+ ]),
144
+ type: "text",
145
+ "onUpdate:modelValue": t[0] || (t[0] = (s) => n(o).topicNameForSkillData = s),
146
+ id: "topic",
147
+ placeholder: "Write here...",
148
+ required: ""
149
+ }, null, 10, te), [
150
+ [k, n(o).topicNameForSkillData]
151
+ ])
152
+ ]),
153
+ se,
154
+ e("div", oe, [
155
+ b(e("textarea", {
156
+ "onUpdate:modelValue": t[1] || (t[1] = (s) => n(o).descriptionForSkillData = s),
157
+ onInput: t[2] || (t[2] = (s) => p.value = !1),
158
+ type: "text",
159
+ id: "description",
160
+ rows: "5",
161
+ class: "w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",
162
+ placeholder: "Write here...",
163
+ required: ""
164
+ }, null, 544), [
165
+ [k, n(o).descriptionForSkillData]
166
+ ])
167
+ ]),
168
+ le,
169
+ e("div", ae, [
170
+ b(e("input", {
171
+ "onUpdate:modelValue": t[3] || (t[3] = (s) => n(o).offeringTypeForSkillData = s),
172
+ type: "text",
173
+ id: "offeringType",
174
+ class: "w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",
175
+ placeholder: "Write here...",
176
+ required: ""
177
+ }, null, 512), [
178
+ [k, n(o).offeringTypeForSkillData]
179
+ ])
180
+ ]),
181
+ re,
182
+ e("div", ce, [
183
+ e("div", ne, [
184
+ e("div", ie, [
185
+ h.value ? (i(), d("button", {
186
+ key: 0,
187
+ disabled: n(o).isTopicPending === !0,
188
+ class: S([
189
+ n(o).isTopicPending === !0 ? "cursor-not-allowed bg-gray-600" : "cursor-pointer bg-genpact-darkest-blue",
190
+ "text-center whitespace-nowrap text-white w-52 px-4 py-2 rounded-md font-bold"
191
+ ]),
192
+ type: "button",
193
+ onClick: M
194
+ }, " Duplicate Check ", 10, de)) : (i(), d("div", ue, ge))
195
+ ]),
196
+ be,
197
+ _e,
198
+ e("div", fe, [
199
+ m.value ? (i(), d("button", {
200
+ key: 0,
201
+ type: "button",
202
+ onClick: W,
203
+ class: "bg-genpact-darkest-blue text-center text-white w-52 px-16 py-2 rounded-md font-bold cursor-pointer"
204
+ }, " Reject ")) : (i(), d("div", he, xe))
205
+ ]),
206
+ e("div", ye, [
207
+ x.value ? (i(), d("button", {
208
+ key: 0,
209
+ type: "submit",
210
+ disabled: p.value !== !0,
211
+ class: S([
212
+ p.value !== !0 ? "cursor-not-allowed bg-gray-600" : "cursor-pointer bg-genpact-darkest-blue",
213
+ "text-center text-white w-52 px-2 py-2 rounded-md whitespace-nowrap font-bold"
214
+ ]),
215
+ onClick: K
216
+ }, " Approve & Submit ", 10, ve)) : (i(), d("div", we, Se))
217
+ ])
218
+ ])
219
+ ])
220
+ ]),
221
+ b(e("div", De, [
222
+ e("div", Te, [
223
+ e("table", Fe, [
224
+ je,
225
+ e("tbody", null, [
226
+ (i(!0), d(V, null, P(I.value, (s, y) => (i(), d("tr", {
227
+ key: y,
228
+ class: "odd:bg-white even:bg-gray-100"
229
+ }, [
230
+ e("th", Ee, _(s.Topic || "title"), 1),
231
+ e("td", Ae, _(s.Description || "desc"), 1),
232
+ e("td", Ce, _(s.OfferingType || "Knowledge Corpus"), 1),
233
+ Ie
234
+ ]))), 128))
235
+ ])
236
+ ])
237
+ ])
238
+ ], 512), [
239
+ [L, E.value]
240
+ ]),
241
+ b(e("div", Ne, [
242
+ e("div", Re, _(w.value), 1)
243
+ ], 512), [
244
+ [L, v.value]
245
+ ])
246
+ ], 64));
247
+ }
248
+ });
249
+ const Me = /* @__PURE__ */ J(qe, [["__scopeId", "data-v-50115682"]]);
250
+ export {
251
+ Me as default
252
+ };