@paro.io/expert-shared-components 1.12.4 → 1.12.5
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.
|
@@ -16,5 +16,5 @@ interface DiscussionSectionProps {
|
|
|
16
16
|
onCreateMessage: (variables: any) => Promise<any>;
|
|
17
17
|
isInternal?: boolean;
|
|
18
18
|
}
|
|
19
|
-
export declare const DiscussionSection: ({ disputeId, currentUser, messages, onCreateMessage, isInternal }: DiscussionSectionProps) => JSX.Element;
|
|
19
|
+
export declare const DiscussionSection: ({ disputeId, currentUser, messages, onCreateMessage, isInternal, }: DiscussionSectionProps) => JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -39,7 +39,8 @@ exports.DiscussionSection = void 0;
|
|
|
39
39
|
const react_1 = __importStar(require("react"));
|
|
40
40
|
const base_ui_1 = require("@paro.io/base-ui");
|
|
41
41
|
const dayjs_1 = __importDefault(require("dayjs"));
|
|
42
|
-
const
|
|
42
|
+
const base_icons_1 = require("@paro.io/base-icons");
|
|
43
|
+
const DiscussionSection = ({ disputeId, currentUser, messages, onCreateMessage, isInternal = false, }) => {
|
|
43
44
|
const [newMessage, setNewMessage] = (0, react_1.useState)('');
|
|
44
45
|
const [visibility, setVisibility] = (0, react_1.useState)('ALL');
|
|
45
46
|
const [isLoading, setIsLoading] = (0, react_1.useState)(false);
|
|
@@ -120,7 +121,22 @@ const DiscussionSection = ({ disputeId, currentUser, messages, onCreateMessage,
|
|
|
120
121
|
};
|
|
121
122
|
return (react_1.default.createElement("div", { className: "space-y-6" },
|
|
122
123
|
react_1.default.createElement("div", { className: "flex items-center justify-between" },
|
|
123
|
-
react_1.default.createElement("div", { className: "text-lg font-bold text-[#333333]" },
|
|
124
|
+
react_1.default.createElement("div", { className: "text-lg font-bold text-[#333333]" },
|
|
125
|
+
"Discussion Thread",
|
|
126
|
+
react_1.default.createElement("br", null),
|
|
127
|
+
react_1.default.createElement("div", { className: "flex items-center space-x-2 text-xs font-normal" },
|
|
128
|
+
react_1.default.createElement("div", { className: "flex items-center space-x-1" },
|
|
129
|
+
react_1.default.createElement("span", { className: "w-2 h-2 rounded-full", style: { backgroundColor: '#643E0C' } }),
|
|
130
|
+
react_1.default.createElement("span", null, "\u00A0Expert")),
|
|
131
|
+
react_1.default.createElement("div", { className: "flex items-center space-x-1" },
|
|
132
|
+
react_1.default.createElement("span", { className: "w-2 h-2 rounded-full", style: { backgroundColor: '#195C5C' } }),
|
|
133
|
+
react_1.default.createElement("span", null, "\u00A0Client")),
|
|
134
|
+
react_1.default.createElement("div", { className: "flex items-center space-x-1" },
|
|
135
|
+
react_1.default.createElement("span", { className: "w-2 h-2 rounded-full", style: { backgroundColor: '#2196F3' } }),
|
|
136
|
+
react_1.default.createElement("span", null, "\u00A0Paro Support")))),
|
|
137
|
+
react_1.default.createElement("div", { className: "flex flex-row justify-start mr-4 text-gray-600" },
|
|
138
|
+
react_1.default.createElement(base_icons_1.IconChat, { size: "sm", className: "text-blue-600 mr-2" }),
|
|
139
|
+
react_1.default.createElement("p", null, "This discussion applies to all projects in this dispute."))),
|
|
124
140
|
react_1.default.createElement("div", { className: "rounded" },
|
|
125
141
|
messages.length ? react_1.default.createElement("div", { className: "flex-1 max-h-[40vh] overflow-y-auto border rounded-md p-2 space-y-6" }, messages.map((message) => (react_1.default.createElement("div", { key: message.id, className: `flex ${getMessageAlignment(message.sender.userTypeId)}` },
|
|
126
142
|
react_1.default.createElement("div", { className: `flex space-x-4 ${getMessageOrder(message.sender.userTypeId)} ${getMessageAlignment(message.sender.userTypeId)}` },
|