@paro.io/expert-shared-components 1.14.40 → 1.14.41
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.
|
@@ -42,7 +42,7 @@ const dayjs_1 = __importDefault(require("dayjs"));
|
|
|
42
42
|
const base_icons_1 = require("@paro.io/base-icons");
|
|
43
43
|
const DiscussionSection = ({ disputeId, escalationNumber, currentUser, messages, onCreateMessage, isInternal = false, isExpert = true, internalEscalationTo, clientEscalationTo, }) => {
|
|
44
44
|
const [newMessage, setNewMessage] = (0, react_1.useState)('');
|
|
45
|
-
const [visibility, setVisibility] = (0, react_1.useState)('
|
|
45
|
+
const [visibility, setVisibility] = (0, react_1.useState)('INTERNAL_ONLY');
|
|
46
46
|
const [isLoading, setIsLoading] = (0, react_1.useState)(false);
|
|
47
47
|
const threadsEndRef = (0, react_1.useRef)(null);
|
|
48
48
|
(0, react_1.useEffect)(() => {
|
|
@@ -180,14 +180,22 @@ const DiscussionSection = ({ disputeId, escalationNumber, currentUser, messages,
|
|
|
180
180
|
isInternal && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
181
181
|
react_1.default.createElement("span", { className: "text-sm text-[#666666]" }, "Visible to:"),
|
|
182
182
|
react_1.default.createElement("div", { className: "flex items-center space-x-2" },
|
|
183
|
-
internalEscalationTo === 'expert' && (react_1.default.createElement(
|
|
184
|
-
react_1.default.createElement("
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
react_1.default.createElement("
|
|
188
|
-
|
|
183
|
+
internalEscalationTo === 'expert' && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
184
|
+
react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
|
|
185
|
+
react_1.default.createElement("input", { type: "radio", checked: visibility === 'EXPERT_INTERNAL_ONLY', onChange: () => setVisibility('EXPERT_INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
|
|
186
|
+
react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Expert Only")),
|
|
187
|
+
react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
|
|
188
|
+
react_1.default.createElement("input", { type: "radio", checked: visibility === 'INTERNAL_ONLY', onChange: () => setVisibility('INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
|
|
189
|
+
react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Internal Only")))),
|
|
190
|
+
internalEscalationTo === 'client' && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
191
|
+
react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
|
|
192
|
+
react_1.default.createElement("input", { type: "radio", checked: visibility === 'CLIENT_INTERNAL_ONLY', onChange: () => setVisibility('CLIENT_INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
|
|
193
|
+
react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Client Only")),
|
|
194
|
+
react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
|
|
195
|
+
react_1.default.createElement("input", { type: "radio", checked: visibility === 'INTERNAL_ONLY', onChange: () => setVisibility('INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
|
|
196
|
+
react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Internal Only")))),
|
|
189
197
|
internalEscalationTo === 'internal' && (react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
|
|
190
|
-
react_1.default.createElement("input", { type: "radio", checked:
|
|
198
|
+
react_1.default.createElement("input", { type: "radio", checked: visibility === 'INTERNAL_ONLY', onChange: () => setVisibility('INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
|
|
191
199
|
react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Internal Only"))),
|
|
192
200
|
internalEscalationTo === 'both' && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
193
201
|
react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
|
|
@@ -217,7 +225,7 @@ const DiscussionSection = ({ disputeId, escalationNumber, currentUser, messages,
|
|
|
217
225
|
react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "All")))),
|
|
218
226
|
!internalEscalationTo && clientEscalationTo === 'paro' && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
219
227
|
react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
|
|
220
|
-
react_1.default.createElement("input", { type: "radio", checked:
|
|
228
|
+
react_1.default.createElement("input", { type: "radio", checked: visibility === 'INTERNAL_ONLY', onChange: () => setVisibility('INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
|
|
221
229
|
react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Internal Only")),
|
|
222
230
|
react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
|
|
223
231
|
react_1.default.createElement("input", { type: "radio", checked: visibility === 'CLIENT_INTERNAL_ONLY', onChange: () => setVisibility('CLIENT_INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
|
|
@@ -239,7 +247,7 @@ const DiscussionSection = ({ disputeId, escalationNumber, currentUser, messages,
|
|
|
239
247
|
react_1.default.createElement("span", { className: "text-sm text-[#666666]" }, "Visible to:"),
|
|
240
248
|
react_1.default.createElement("div", { className: "flex items-center space-x-2" },
|
|
241
249
|
clientEscalationTo === 'paro' && (react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
|
|
242
|
-
react_1.default.createElement("input", { type: "radio", checked:
|
|
250
|
+
react_1.default.createElement("input", { type: "radio", checked: visibility === 'INTERNAL_ONLY', onChange: () => setVisibility('INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
|
|
243
251
|
react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Internal Only"))),
|
|
244
252
|
clientEscalationTo === 'both' && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
245
253
|
react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
|
|
@@ -252,14 +260,22 @@ const DiscussionSection = ({ disputeId, escalationNumber, currentUser, messages,
|
|
|
252
260
|
react_1.default.createElement("input", { type: "radio", checked: visibility === 'ALL', onChange: () => setVisibility('ALL'), className: "form-radio text-[#248384]" }),
|
|
253
261
|
react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "All"))))),
|
|
254
262
|
react_1.default.createElement("div", { className: "flex items-center space-x-2" },
|
|
255
|
-
internalEscalationTo === 'expert' && (react_1.default.createElement(
|
|
256
|
-
react_1.default.createElement("
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
react_1.default.createElement("
|
|
260
|
-
|
|
263
|
+
internalEscalationTo === 'expert' && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
264
|
+
react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
|
|
265
|
+
react_1.default.createElement("input", { type: "radio", checked: visibility === 'EXPERT_INTERNAL_ONLY', onChange: () => setVisibility('EXPERT_INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
|
|
266
|
+
react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Expert Only")),
|
|
267
|
+
react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
|
|
268
|
+
react_1.default.createElement("input", { type: "radio", checked: visibility === 'INTERNAL_ONLY', onChange: () => setVisibility('INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
|
|
269
|
+
react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Internal Only")))),
|
|
270
|
+
internalEscalationTo === 'client' && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
271
|
+
react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
|
|
272
|
+
react_1.default.createElement("input", { type: "radio", checked: visibility === 'CLIENT_INTERNAL_ONLY', onChange: () => setVisibility('CLIENT_INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
|
|
273
|
+
react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Client Only")),
|
|
274
|
+
react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
|
|
275
|
+
react_1.default.createElement("input", { type: "radio", checked: visibility === 'INTERNAL_ONLY', onChange: () => setVisibility('INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
|
|
276
|
+
react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Internal Only")))),
|
|
261
277
|
internalEscalationTo === 'internal' && (react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
|
|
262
|
-
react_1.default.createElement("input", { type: "radio", checked:
|
|
278
|
+
react_1.default.createElement("input", { type: "radio", checked: visibility === 'INTERNAL_ONLY', onChange: () => setVisibility('INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
|
|
263
279
|
react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Internal Only"))),
|
|
264
280
|
internalEscalationTo === 'both' || (!internalEscalationTo && !clientEscalationTo) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
265
281
|
react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
|