@genpact/genome.mfe.mgtwin-app 1.1.93-alpha → 1.1.95-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.
- package/dist/ArrowLeftCircleIcon-d14d37d9.mjs +18 -0
- package/dist/EditSkillAdminData-64097de0.mjs +208 -0
- package/dist/EditSkillData-940e04f8.mjs +208 -0
- package/dist/{HomeView-65b46931.mjs → HomeView-8565b645.mjs} +5 -5
- package/dist/{Loading-96184887.mjs → Loading-8093cad9.mjs} +2 -2
- package/dist/{MagnifyingGlassIcon-65d7af60.mjs → MagnifyingGlassIcon-bde33620.mjs} +1 -1
- package/dist/{PaperAirplaneIcon-e64f5c58.mjs → PaperAirplaneIcon-de2d8705.mjs} +1 -1
- package/dist/{PromptTesting-4e3ffb4f.mjs → PromptTesting-d2846920.mjs} +21 -21
- package/dist/SkillAutomation-0a31ef91.mjs +107 -0
- package/dist/SkillData-42a85714.mjs +180 -0
- package/dist/{UnderMaintenance-f950b82d.mjs → UnderMaintenance-bc6a1476.mjs} +1 -1
- package/dist/{loadernew-29c46ec0.mjs → loadernew-e939131e.mjs} +1 -1
- package/dist/{main-de6619f6.mjs → main-ff636b7d.mjs} +999 -991
- package/dist/mgtwin.es.min.js +1 -1
- package/dist/mgtwin.umd.min.js +7 -7
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/EditSkillData-68d524e2.mjs +0 -201
- package/dist/SkillAutomation-5bc72951.mjs +0 -103
- package/dist/SkillData-601795ac.mjs +0 -167
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { o as e, c as r, a } from "./main-ff636b7d.mjs";
|
|
2
|
+
function c(l, o) {
|
|
3
|
+
return e(), r("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
6
|
+
fill: "currentColor",
|
|
7
|
+
"aria-hidden": "true"
|
|
8
|
+
}, [
|
|
9
|
+
a("path", {
|
|
10
|
+
"fill-rule": "evenodd",
|
|
11
|
+
d: "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25zm-4.28 9.22a.75.75 0 000 1.06l3 3a.75.75 0 101.06-1.06l-1.72-1.72h5.69a.75.75 0 000-1.5h-5.69l1.72-1.72a.75.75 0 00-1.06-1.06l-3 3z",
|
|
12
|
+
"clip-rule": "evenodd"
|
|
13
|
+
})
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
c as r
|
|
18
|
+
};
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { d as j, J as R, o as d, c as u, a as e, b as I, e as r, u as G, j as L, h as i, p as g, v as b, n as D, q as T, F, r as O, i as E, t as x } from "./main-ff636b7d.mjs";
|
|
2
|
+
import { _ as W, p as A, a as q } from "./loadernew-e939131e.mjs";
|
|
3
|
+
import { r as z } from "./ArrowLeftCircleIcon-d14d37d9.mjs";
|
|
4
|
+
const M = { className: "flex justify-between items-center gap-4 h-14" }, U = /* @__PURE__ */ e("div", { class: "font-bold text-base md:text-xl" }, "Back", -1), H = /* @__PURE__ */ e("div", { class: "text-white font-bold md:text-xl text-base" }, "AI Guru Edit Skill Admin Data", -1), J = /* @__PURE__ */ e("img", {
|
|
5
|
+
class: "md:w-36 w-20",
|
|
6
|
+
src: W
|
|
7
|
+
}, null, -1), K = /* @__PURE__ */ j({
|
|
8
|
+
__name: "HeaderForEditSKillAdminDatas",
|
|
9
|
+
setup(N) {
|
|
10
|
+
const t = R(), n = () => {
|
|
11
|
+
const a = sessionStorage.getItem("role");
|
|
12
|
+
console.log("role", a), a === "user" ? t.push({ name: "SkillData" }) : a === "admin" ? t.push({ name: "SkillData" }) : t.push({ name: "SkillAutomation" }), sessionStorage.removeItem("dataViewAccess"), sessionStorage.removeItem("role");
|
|
13
|
+
};
|
|
14
|
+
return (a, h) => (d(), u("div", M, [
|
|
15
|
+
e("div", {
|
|
16
|
+
onClick: n,
|
|
17
|
+
class: "flex justify-start items-center text-white cursor-pointer"
|
|
18
|
+
}, [
|
|
19
|
+
I(r(z), { class: "md:w-9 w-5 h-5 md:h-9 mr-1" }),
|
|
20
|
+
U
|
|
21
|
+
]),
|
|
22
|
+
H,
|
|
23
|
+
J
|
|
24
|
+
]));
|
|
25
|
+
}
|
|
26
|
+
}), Y = { class: "bg-genpact-blue-box w-full px-5 mb-6" }, P = { class: "grid grid-cols-5 gap-8 p-10 items-stretch" }, Q = /* @__PURE__ */ e("div", { class: "col-span-1 text-right" }, [
|
|
27
|
+
/* @__PURE__ */ e("label", {
|
|
28
|
+
for: "topic",
|
|
29
|
+
class: "block text-lg font-bold text-gray-900 mb-1 italic"
|
|
30
|
+
}, "Topic Name")
|
|
31
|
+
], -1), X = { class: "col-span-4" }, Z = ["disabled"], ee = /* @__PURE__ */ e("div", { class: "col-span-1 text-right" }, [
|
|
32
|
+
/* @__PURE__ */ e("label", {
|
|
33
|
+
for: "description",
|
|
34
|
+
class: "block text-lg font-bold text-gray-900 mb-1 italic"
|
|
35
|
+
}, "Description")
|
|
36
|
+
], -1), te = { class: "col-span-4" }, se = /* @__PURE__ */ e("div", { class: "col-span-1 text-right" }, [
|
|
37
|
+
/* @__PURE__ */ e("label", {
|
|
38
|
+
for: "offeringType",
|
|
39
|
+
class: "block text-lg font-bold text-gray-900 mb-1 italic"
|
|
40
|
+
}, "Offering Type")
|
|
41
|
+
], -1), oe = { class: "col-span-4" }, le = /* @__PURE__ */ e("div", { class: "col-span-1" }, null, -1), ae = { class: "col-span-4" }, re = { class: "grid md:grid-cols-5 grid-cols-1 justify-start items-center gap-2" }, ie = { class: "col-span-1" }, ne = {
|
|
42
|
+
key: 1,
|
|
43
|
+
class: "flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40"
|
|
44
|
+
}, ce = /* @__PURE__ */ e("img", {
|
|
45
|
+
class: "w-10 h-10 block loadercss",
|
|
46
|
+
src: q,
|
|
47
|
+
alt: "Loader Gif"
|
|
48
|
+
}, null, -1), de = [
|
|
49
|
+
ce
|
|
50
|
+
], ue = /* @__PURE__ */ e("div", { class: "col-span-1" }, null, -1), pe = /* @__PURE__ */ e("div", { class: "col-span-1" }, null, -1), ge = /* @__PURE__ */ e("div", { class: "col-span-1 flex md:justify-end justify-start items-end" }, [
|
|
51
|
+
/* @__PURE__ */ e("div", { class: "bg-genpact-darkest-blue text-center text-white w-52 px-16 py-2 rounded-md font-bold" }, " Reject ")
|
|
52
|
+
], -1), he = { class: "col-span-1 flex md:justify-end justify-start items-end" }, fe = ["disabled"], me = { class: "pl-16 pr-8 py-2" }, _e = { class: "w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]" }, be = { class: "table-auto w-full text-sm text-left rtl:text-right rounded-lg" }, xe = /* @__PURE__ */ e("thead", { class: "text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10" }, [
|
|
53
|
+
/* @__PURE__ */ e("tr", null, [
|
|
54
|
+
/* @__PURE__ */ e("th", {
|
|
55
|
+
scope: "col",
|
|
56
|
+
class: "px-6 py-3"
|
|
57
|
+
}, "Topic name"),
|
|
58
|
+
/* @__PURE__ */ e("th", {
|
|
59
|
+
scope: "col",
|
|
60
|
+
class: "px-6 py-3"
|
|
61
|
+
}, "Description"),
|
|
62
|
+
/* @__PURE__ */ e("th", {
|
|
63
|
+
scope: "col",
|
|
64
|
+
class: "px-6 py-3"
|
|
65
|
+
}, "OfferingType")
|
|
66
|
+
])
|
|
67
|
+
], -1), ye = { class: "h-28" }, ve = { class: "px-3 py-4 font-medium text-gray-900 h-28" }, we = { class: "px-3 py-4 h-28" }, ke = { class: "px-3 py-4 h-28" }, Se = { class: "absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]" }, De = /* @__PURE__ */ e("div", { class: "w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white" }, " Data Submitted Successfully ", -1), Te = [
|
|
68
|
+
De
|
|
69
|
+
], je = /* @__PURE__ */ j({
|
|
70
|
+
__name: "EditSkillAdminData",
|
|
71
|
+
setup(N) {
|
|
72
|
+
const t = G(), n = L(), a = i(!0), h = i(!1), C = i(""), y = i(!1), f = i(!1), v = i(), _ = i(), w = i([]), B = async () => {
|
|
73
|
+
var c, s, o, m, k, S;
|
|
74
|
+
try {
|
|
75
|
+
const p = {
|
|
76
|
+
question: t.descriptionForSkillData
|
|
77
|
+
};
|
|
78
|
+
console.log("question", C.value), a.value = !1;
|
|
79
|
+
const l = await A("/SearchSkillTags", p);
|
|
80
|
+
_.value = (s = (c = l == null ? void 0 : l.data) == null ? void 0 : c.body) == null ? void 0 : s.length, console.log("ARRAY LENGTH", _.value), v.value = ((o = l == null ? void 0 : l.data) == null ? void 0 : o.body) || [], w.value = v.value, console.log("length", (k = (m = l == null ? void 0 : l.data) == null ? void 0 : m.body) == null ? void 0 : k.length), console.log("data", l), a.value = !0, y.value = !0, f.value = !0, console.log("showSubmitButton", f.value);
|
|
81
|
+
} catch (p) {
|
|
82
|
+
if (console.error(p), a.value = !0, E.isAxiosError(p)) {
|
|
83
|
+
const l = p;
|
|
84
|
+
n.setError(((S = l.response) == null ? void 0 : S.data).message);
|
|
85
|
+
} else
|
|
86
|
+
n.setError("We ran into an issue while fetching duplicate values.");
|
|
87
|
+
}
|
|
88
|
+
}, V = async () => {
|
|
89
|
+
var c;
|
|
90
|
+
try {
|
|
91
|
+
const s = {
|
|
92
|
+
Topic: t.topicNameForSkillData,
|
|
93
|
+
Description: t.descriptionForSkillData,
|
|
94
|
+
OfferingType: t.offeringTypeForSkillData,
|
|
95
|
+
DuplicateExists: _.value > 0 ? 1 : 0
|
|
96
|
+
};
|
|
97
|
+
console.log("payload-=====>", s);
|
|
98
|
+
const o = await A("/InsertIntoTempSkillFile", s);
|
|
99
|
+
console.log("data", o), $();
|
|
100
|
+
} catch (s) {
|
|
101
|
+
if (console.error(s), E.isAxiosError(s)) {
|
|
102
|
+
const o = s;
|
|
103
|
+
n.setError(((c = o.response) == null ? void 0 : c.data).message);
|
|
104
|
+
} else
|
|
105
|
+
n.setError("There was an issue while inserting data");
|
|
106
|
+
}
|
|
107
|
+
}, $ = () => {
|
|
108
|
+
h.value = !0, setTimeout(() => {
|
|
109
|
+
h.value = !1;
|
|
110
|
+
}, 1e4);
|
|
111
|
+
};
|
|
112
|
+
return (c, s) => (d(), u(F, null, [
|
|
113
|
+
e("nav", Y, [
|
|
114
|
+
I(K)
|
|
115
|
+
]),
|
|
116
|
+
e("div", P, [
|
|
117
|
+
Q,
|
|
118
|
+
e("div", X, [
|
|
119
|
+
g(e("input", {
|
|
120
|
+
disabled: r(t).enableInputbox !== !0,
|
|
121
|
+
class: D([
|
|
122
|
+
r(t).enableInputbox !== !0 ? "cursor-not-allowed fill-gray-400" : "cursor-pointer",
|
|
123
|
+
"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"
|
|
124
|
+
]),
|
|
125
|
+
"onUpdate:modelValue": s[0] || (s[0] = (o) => r(t).topicNameForSkillData = o),
|
|
126
|
+
id: "topic",
|
|
127
|
+
placeholder: "Write here..."
|
|
128
|
+
}, null, 10, Z), [
|
|
129
|
+
[b, r(t).topicNameForSkillData]
|
|
130
|
+
])
|
|
131
|
+
]),
|
|
132
|
+
ee,
|
|
133
|
+
e("div", te, [
|
|
134
|
+
g(e("textarea", {
|
|
135
|
+
"onUpdate:modelValue": s[1] || (s[1] = (o) => r(t).descriptionForSkillData = o),
|
|
136
|
+
id: "description",
|
|
137
|
+
rows: "5",
|
|
138
|
+
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",
|
|
139
|
+
placeholder: "Write here..."
|
|
140
|
+
}, null, 512), [
|
|
141
|
+
[b, r(t).descriptionForSkillData]
|
|
142
|
+
])
|
|
143
|
+
]),
|
|
144
|
+
se,
|
|
145
|
+
e("div", oe, [
|
|
146
|
+
g(e("input", {
|
|
147
|
+
"onUpdate:modelValue": s[2] || (s[2] = (o) => r(t).offeringTypeForSkillData = o),
|
|
148
|
+
id: "offeringType",
|
|
149
|
+
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",
|
|
150
|
+
placeholder: "Write here..."
|
|
151
|
+
}, null, 512), [
|
|
152
|
+
[b, r(t).offeringTypeForSkillData]
|
|
153
|
+
])
|
|
154
|
+
]),
|
|
155
|
+
le,
|
|
156
|
+
e("div", ae, [
|
|
157
|
+
e("div", re, [
|
|
158
|
+
e("div", ie, [
|
|
159
|
+
a.value ? (d(), u("button", {
|
|
160
|
+
key: 0,
|
|
161
|
+
onClick: B,
|
|
162
|
+
class: "bg-genpact-darkest-blue text-center whitespace-nowrap text-white w-52 px-4 py-2 rounded-md font-bold cursor-pointer"
|
|
163
|
+
}, " Duplicate Check ")) : (d(), u("div", ne, de))
|
|
164
|
+
]),
|
|
165
|
+
ue,
|
|
166
|
+
pe,
|
|
167
|
+
ge,
|
|
168
|
+
e("div", he, [
|
|
169
|
+
e("button", {
|
|
170
|
+
disabled: f.value !== !0,
|
|
171
|
+
class: D([
|
|
172
|
+
f.value !== !0 ? "cursor-not-allowed fill-gray-400" : "cursor-pointer",
|
|
173
|
+
"bg-genpact-darkest-blue text-center text-white w-52 px-2 py-2 rounded-md whitespace-nowrap font-bold"
|
|
174
|
+
]),
|
|
175
|
+
onClick: V
|
|
176
|
+
}, " Approve & Submit ", 10, fe)
|
|
177
|
+
])
|
|
178
|
+
])
|
|
179
|
+
])
|
|
180
|
+
]),
|
|
181
|
+
g(e("div", me, [
|
|
182
|
+
e("div", _e, [
|
|
183
|
+
e("table", be, [
|
|
184
|
+
xe,
|
|
185
|
+
e("tbody", ye, [
|
|
186
|
+
(d(!0), u(F, null, O(w.value, (o, m) => (d(), u("tr", {
|
|
187
|
+
key: m,
|
|
188
|
+
class: "odd:bg-white even:bg-gray-100"
|
|
189
|
+
}, [
|
|
190
|
+
e("th", ve, x(o.Topic || "title"), 1),
|
|
191
|
+
e("td", we, x(o.Description || "desc"), 1),
|
|
192
|
+
e("td", ke, x(o.OfferingType || "offeringType"), 1)
|
|
193
|
+
]))), 128))
|
|
194
|
+
])
|
|
195
|
+
])
|
|
196
|
+
])
|
|
197
|
+
], 512), [
|
|
198
|
+
[T, y.value]
|
|
199
|
+
]),
|
|
200
|
+
g(e("div", Se, Te, 512), [
|
|
201
|
+
[T, h.value]
|
|
202
|
+
])
|
|
203
|
+
], 64));
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
export {
|
|
207
|
+
je as default
|
|
208
|
+
};
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { d as N, J as R, o as i, c as n, a as e, b as j, e as r, K as O, u as U, j as W, h as l, p as f, v as x, n as T, q as F, F as E, r as q, i as I, t as y } from "./main-ff636b7d.mjs";
|
|
2
|
+
import { _ as z, p as A, a as B } from "./loadernew-e939131e.mjs";
|
|
3
|
+
import { r as M } from "./ArrowLeftCircleIcon-d14d37d9.mjs";
|
|
4
|
+
const H = { className: "flex justify-between items-center gap-4 h-14" }, J = /* @__PURE__ */ e("div", { class: "font-bold text-base md:text-xl" }, "Back", -1), K = /* @__PURE__ */ e("div", { class: "text-white font-bold md:text-xl text-base" }, "AI Guru Edit Skill Data", -1), Y = /* @__PURE__ */ e("img", {
|
|
5
|
+
class: "md:w-36 w-20",
|
|
6
|
+
src: z
|
|
7
|
+
}, null, -1), P = /* @__PURE__ */ N({
|
|
8
|
+
__name: "HeaderForEditSkillData",
|
|
9
|
+
setup(C) {
|
|
10
|
+
const o = R(), c = () => {
|
|
11
|
+
O(() => {
|
|
12
|
+
sessionStorage.removeItem("dataViewAccess");
|
|
13
|
+
}), o.push({ name: "SkillData" }), sessionStorage.removeItem("dataViewAccess"), sessionStorage.removeItem("role");
|
|
14
|
+
};
|
|
15
|
+
return (u, p) => (i(), n("div", H, [
|
|
16
|
+
e("div", {
|
|
17
|
+
onClick: c,
|
|
18
|
+
class: "flex justify-start items-center text-white cursor-pointer"
|
|
19
|
+
}, [
|
|
20
|
+
j(r(M), { class: "md:w-9 w-5 h-5 md:h-9 mr-1" }),
|
|
21
|
+
J
|
|
22
|
+
]),
|
|
23
|
+
K,
|
|
24
|
+
Y
|
|
25
|
+
]));
|
|
26
|
+
}
|
|
27
|
+
}), Q = { class: "bg-genpact-blue-box w-full px-5 mb-6" }, X = { class: "grid grid-cols-5 gap-8 p-10 items-stretch" }, Z = /* @__PURE__ */ e("div", { class: "col-span-1 text-right" }, [
|
|
28
|
+
/* @__PURE__ */ e("label", {
|
|
29
|
+
for: "topic",
|
|
30
|
+
class: "block text-lg font-bold text-gray-900 mb-1 italic"
|
|
31
|
+
}, "Topic Name")
|
|
32
|
+
], -1), ee = { class: "col-span-4" }, te = ["disabled"], se = /* @__PURE__ */ e("div", { class: "col-span-1 text-right" }, [
|
|
33
|
+
/* @__PURE__ */ e("label", {
|
|
34
|
+
for: "description",
|
|
35
|
+
class: "block text-lg font-bold text-gray-900 mb-1 italic"
|
|
36
|
+
}, "Description")
|
|
37
|
+
], -1), oe = { class: "col-span-4" }, ae = /* @__PURE__ */ e("div", { class: "col-span-1 text-right" }, [
|
|
38
|
+
/* @__PURE__ */ e("label", {
|
|
39
|
+
for: "offeringType",
|
|
40
|
+
class: "block text-lg font-bold text-gray-900 mb-1 italic"
|
|
41
|
+
}, "Offering Type")
|
|
42
|
+
], -1), le = { class: "col-span-4" }, re = /* @__PURE__ */ e("div", { class: "col-span-1" }, null, -1), ie = { class: "col-span-4" }, ne = { class: "md:flex block justify-between items-center space-y-2" }, ce = {
|
|
43
|
+
key: 1,
|
|
44
|
+
class: "flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-4 py-2"
|
|
45
|
+
}, de = /* @__PURE__ */ e("img", {
|
|
46
|
+
class: "w-6 h-6 block loadercss",
|
|
47
|
+
src: B,
|
|
48
|
+
alt: "Loader Gif"
|
|
49
|
+
}, null, -1), ue = [
|
|
50
|
+
de
|
|
51
|
+
], pe = ["disabled"], ge = {
|
|
52
|
+
key: 3,
|
|
53
|
+
class: "flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-10 py-2"
|
|
54
|
+
}, be = /* @__PURE__ */ e("img", {
|
|
55
|
+
class: "w-6 h-6 block loadercss",
|
|
56
|
+
src: B,
|
|
57
|
+
alt: "Loader Gif"
|
|
58
|
+
}, null, -1), fe = [
|
|
59
|
+
be
|
|
60
|
+
], he = { class: "pl-16 pr-8 py-2" }, me = { class: "w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]" }, _e = { class: "table-auto w-full text-sm text-left rtl:text-right rounded-lg" }, xe = /* @__PURE__ */ e("thead", { class: "text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10" }, [
|
|
61
|
+
/* @__PURE__ */ e("tr", null, [
|
|
62
|
+
/* @__PURE__ */ e("th", {
|
|
63
|
+
scope: "col",
|
|
64
|
+
class: "px-6 py-3"
|
|
65
|
+
}, "Topic name"),
|
|
66
|
+
/* @__PURE__ */ e("th", {
|
|
67
|
+
scope: "col",
|
|
68
|
+
class: "px-6 py-3"
|
|
69
|
+
}, "Description"),
|
|
70
|
+
/* @__PURE__ */ e("th", {
|
|
71
|
+
scope: "col",
|
|
72
|
+
class: "px-6 py-3"
|
|
73
|
+
}, "OfferingType")
|
|
74
|
+
])
|
|
75
|
+
], -1), ye = { class: "h-28" }, ve = { class: "px-3 py-4 font-medium text-gray-900 h-28" }, we = { class: "px-3 py-4 h-28" }, ke = { class: "px-3 py-4 h-28" }, Se = { class: "absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]" }, De = /* @__PURE__ */ e("div", { class: "w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white" }, " Data Submitted Successfully ", -1), Te = [
|
|
76
|
+
De
|
|
77
|
+
], Ae = /* @__PURE__ */ N({
|
|
78
|
+
__name: "EditSkillData",
|
|
79
|
+
setup(C) {
|
|
80
|
+
const o = U(), c = W(), u = l(!0), p = l(!0), m = l(!1), V = l(""), v = l(!1), g = l(!1), w = l(), _ = l(), k = l([]), $ = async () => {
|
|
81
|
+
var d, t, s, h, S, D;
|
|
82
|
+
try {
|
|
83
|
+
const b = {
|
|
84
|
+
question: o.descriptionForSkillData
|
|
85
|
+
};
|
|
86
|
+
console.log("question", V.value), u.value = !1;
|
|
87
|
+
const a = await A("/SearchSkillTags", b);
|
|
88
|
+
_.value = (t = (d = a == null ? void 0 : a.data) == null ? void 0 : d.body) == null ? void 0 : t.length, console.log("ARRAY LENGTH", _.value), w.value = ((s = a == null ? void 0 : a.data) == null ? void 0 : s.body) || [], k.value = w.value, console.log("length", (S = (h = a == null ? void 0 : a.data) == null ? void 0 : h.body) == null ? void 0 : S.length), console.log("data", a), u.value = !0, v.value = !0, g.value = !0, console.log("showSubmitButton", g.value);
|
|
89
|
+
} catch (b) {
|
|
90
|
+
if (console.error(b), u.value = !0, I.isAxiosError(b)) {
|
|
91
|
+
const a = b;
|
|
92
|
+
c.setError(((D = a.response) == null ? void 0 : D.data).message);
|
|
93
|
+
} else
|
|
94
|
+
c.setError("We ran into an issue while fetching duplicate values.");
|
|
95
|
+
}
|
|
96
|
+
}, G = async () => {
|
|
97
|
+
var d;
|
|
98
|
+
try {
|
|
99
|
+
const t = {
|
|
100
|
+
Topic: o.topicNameForSkillData,
|
|
101
|
+
Description: o.descriptionForSkillData,
|
|
102
|
+
OfferingType: o.offeringTypeForSkillData,
|
|
103
|
+
DuplicateExists: _.value > 0 ? 1 : 0
|
|
104
|
+
};
|
|
105
|
+
p.value = !1, console.log("payload-=====>", t);
|
|
106
|
+
const s = await A("/InsertIntoTempSkillFile", t);
|
|
107
|
+
console.log("data", s), p.value = !0, L();
|
|
108
|
+
} catch (t) {
|
|
109
|
+
if (console.error(t), p.value = !0, I.isAxiosError(t)) {
|
|
110
|
+
const s = t;
|
|
111
|
+
c.setError(((d = s.response) == null ? void 0 : d.data).message);
|
|
112
|
+
} else
|
|
113
|
+
c.setError("There was an issue while inserting data");
|
|
114
|
+
}
|
|
115
|
+
}, L = () => {
|
|
116
|
+
m.value = !0, setTimeout(() => {
|
|
117
|
+
m.value = !1;
|
|
118
|
+
}, 1e4);
|
|
119
|
+
};
|
|
120
|
+
return (d, t) => (i(), n(E, null, [
|
|
121
|
+
e("nav", Q, [
|
|
122
|
+
j(P)
|
|
123
|
+
]),
|
|
124
|
+
e("div", X, [
|
|
125
|
+
Z,
|
|
126
|
+
e("div", ee, [
|
|
127
|
+
f(e("input", {
|
|
128
|
+
disabled: r(o).enableInputbox !== !0,
|
|
129
|
+
class: T([
|
|
130
|
+
r(o).enableInputbox !== !0 ? "cursor-not-allowed fill-gray-400" : "cursor-pointer",
|
|
131
|
+
"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"
|
|
132
|
+
]),
|
|
133
|
+
"onUpdate:modelValue": t[0] || (t[0] = (s) => r(o).topicNameForSkillData = s),
|
|
134
|
+
id: "topic",
|
|
135
|
+
placeholder: "Write here..."
|
|
136
|
+
}, null, 10, te), [
|
|
137
|
+
[x, r(o).topicNameForSkillData]
|
|
138
|
+
])
|
|
139
|
+
]),
|
|
140
|
+
se,
|
|
141
|
+
e("div", oe, [
|
|
142
|
+
f(e("textarea", {
|
|
143
|
+
"onUpdate:modelValue": t[1] || (t[1] = (s) => r(o).descriptionForSkillData = s),
|
|
144
|
+
onInput: t[2] || (t[2] = (s) => g.value = !1),
|
|
145
|
+
id: "description",
|
|
146
|
+
rows: "5",
|
|
147
|
+
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",
|
|
148
|
+
placeholder: "Write here..."
|
|
149
|
+
}, null, 544), [
|
|
150
|
+
[x, r(o).descriptionForSkillData]
|
|
151
|
+
])
|
|
152
|
+
]),
|
|
153
|
+
ae,
|
|
154
|
+
e("div", le, [
|
|
155
|
+
f(e("input", {
|
|
156
|
+
"onUpdate:modelValue": t[3] || (t[3] = (s) => r(o).offeringTypeForSkillData = s),
|
|
157
|
+
id: "offeringType",
|
|
158
|
+
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",
|
|
159
|
+
placeholder: "Write here..."
|
|
160
|
+
}, null, 512), [
|
|
161
|
+
[x, r(o).offeringTypeForSkillData]
|
|
162
|
+
])
|
|
163
|
+
]),
|
|
164
|
+
re,
|
|
165
|
+
e("div", ie, [
|
|
166
|
+
e("div", ne, [
|
|
167
|
+
u.value ? (i(), n("button", {
|
|
168
|
+
key: 0,
|
|
169
|
+
onClick: $,
|
|
170
|
+
class: "bg-genpact-darkest-blue text-center whitespace-nowrap text-white w-40 px-4 py-2 rounded-md font-bold cursor-pointer"
|
|
171
|
+
}, " Duplicate Check ")) : (i(), n("div", ce, ue)),
|
|
172
|
+
p.value ? (i(), n("button", {
|
|
173
|
+
key: 2,
|
|
174
|
+
disabled: g.value !== !0,
|
|
175
|
+
class: T([g.value !== !0 ? "cursor-not-allowed bg-gray-600" : "cursor-pointer bg-genpact-darkest-blue", "text-center text-white w-40 px-10 py-2 rounded-md font-bold"]),
|
|
176
|
+
onClick: G
|
|
177
|
+
}, " Submit ", 10, pe)) : (i(), n("div", ge, fe))
|
|
178
|
+
])
|
|
179
|
+
])
|
|
180
|
+
]),
|
|
181
|
+
f(e("div", he, [
|
|
182
|
+
e("div", me, [
|
|
183
|
+
e("table", _e, [
|
|
184
|
+
xe,
|
|
185
|
+
e("tbody", ye, [
|
|
186
|
+
(i(!0), n(E, null, q(k.value, (s, h) => (i(), n("tr", {
|
|
187
|
+
key: h,
|
|
188
|
+
class: "odd:bg-white even:bg-gray-100"
|
|
189
|
+
}, [
|
|
190
|
+
e("th", ve, y(s.Topic || "title"), 1),
|
|
191
|
+
e("td", we, y(s.Description || "desc"), 1),
|
|
192
|
+
e("td", ke, y(s.OfferingType || "offeringType"), 1)
|
|
193
|
+
]))), 128))
|
|
194
|
+
])
|
|
195
|
+
])
|
|
196
|
+
])
|
|
197
|
+
], 512), [
|
|
198
|
+
[F, v.value]
|
|
199
|
+
]),
|
|
200
|
+
f(e("div", Se, Te, 512), [
|
|
201
|
+
[F, m.value]
|
|
202
|
+
])
|
|
203
|
+
], 64));
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
export {
|
|
207
|
+
Ae as default
|
|
208
|
+
};
|