@paro.io/expert-shared-components 1.12.46 → 1.12.47
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.
|
@@ -9,6 +9,7 @@ interface EscalationSubmitProps {
|
|
|
9
9
|
uploadExpertClientFiles: any;
|
|
10
10
|
createProjectEscalation: any;
|
|
11
11
|
user: any;
|
|
12
|
+
clientId: number;
|
|
12
13
|
}
|
|
13
|
-
declare const EscalationSubmitForm: ({ goBack, goHome, expertsOrClients, projects, documentUploadUrl, bucketName, uploadExpertClientFiles, createProjectEscalation, isExpert, user }: EscalationSubmitProps) => JSX.Element;
|
|
14
|
+
declare const EscalationSubmitForm: ({ goBack, goHome, expertsOrClients, projects, documentUploadUrl, bucketName, uploadExpertClientFiles, createProjectEscalation, isExpert, user, clientId, }: EscalationSubmitProps) => JSX.Element;
|
|
14
15
|
export default EscalationSubmitForm;
|
|
@@ -51,9 +51,10 @@ const issueTypeOptions = [
|
|
|
51
51
|
{ value: 'DelayedDeliverables', label: 'Delayed Deliverables or Deadlines due to Missing Information/Documentation' },
|
|
52
52
|
{ value: 'BillingConcern', label: 'Billing Concern' },
|
|
53
53
|
{ value: 'ScopeCreep', label: 'Scope Creep/Unauthorized Requests' },
|
|
54
|
+
{ value: 'QualityOfWork', label: 'Quality Of Work' },
|
|
54
55
|
{ value: 'Other', label: 'Other' },
|
|
55
56
|
];
|
|
56
|
-
const EscalationSubmitForm = ({ goBack, goHome, expertsOrClients, projects, documentUploadUrl, bucketName, uploadExpertClientFiles, createProjectEscalation, isExpert = false, user }) => {
|
|
57
|
+
const EscalationSubmitForm = ({ goBack, goHome, expertsOrClients, projects, documentUploadUrl, bucketName, uploadExpertClientFiles, createProjectEscalation, isExpert = false, user, clientId, }) => {
|
|
57
58
|
var _a;
|
|
58
59
|
const [isChecked, setIsChecked] = (0, react_1.useState)(false);
|
|
59
60
|
const [problemInput, setProblemInput] = (0, react_1.useState)('');
|
|
@@ -66,7 +67,7 @@ const EscalationSubmitForm = ({ goBack, goHome, expertsOrClients, projects, docu
|
|
|
66
67
|
const [selectedProjects, setSelectedProjects] = (0, react_1.useState)([]);
|
|
67
68
|
const [issueType, setIssueType] = (0, react_1.useState)('');
|
|
68
69
|
const [severity, setSeverity] = (0, react_1.useState)('');
|
|
69
|
-
const [issueStartDate, setIssueStartDate] = (0, react_1.useState)(
|
|
70
|
+
const [issueStartDate, setIssueStartDate] = (0, react_1.useState)((0, dayjs_1.default)(new Date).format('MM-DD-YYYY'));
|
|
70
71
|
const [isDateInvalid, setIsDateInvalid] = (0, react_1.useState)(false);
|
|
71
72
|
const [submitting, setSubmitting] = (0, react_1.useState)(false);
|
|
72
73
|
const fileInputRef = (0, react_1.useRef)(null);
|
|
@@ -74,8 +75,8 @@ const EscalationSubmitForm = ({ goBack, goHome, expertsOrClients, projects, docu
|
|
|
74
75
|
(0, react_1.useEffect)(() => {
|
|
75
76
|
if (expertsOrClients && expertsOrClients.length > 0) {
|
|
76
77
|
const options = expertsOrClients.map((user) => ({
|
|
77
|
-
label: user.name,
|
|
78
|
-
value: { id: user.id, name: user.name },
|
|
78
|
+
label: isExpert ? user.name : user.freelancerName,
|
|
79
|
+
value: { id: isExpert ? user.id : user.freelancerId, name: isExpert ? user.name : user.freelancerName },
|
|
79
80
|
}));
|
|
80
81
|
setExpertOptions(options);
|
|
81
82
|
}
|
|
@@ -172,14 +173,13 @@ const EscalationSubmitForm = ({ goBack, goHome, expertsOrClients, projects, docu
|
|
|
172
173
|
requiredProjectSelection);
|
|
173
174
|
};
|
|
174
175
|
const handleSubmit = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
175
|
-
var _a;
|
|
176
176
|
if (!isFormValid())
|
|
177
177
|
return;
|
|
178
178
|
setSubmitting(true);
|
|
179
179
|
const formData = {
|
|
180
180
|
escalationId: escalationId,
|
|
181
|
-
freelancerId: user.userId,
|
|
182
|
-
clientId:
|
|
181
|
+
freelancerId: isExpert ? user.userId : selectedUser === null || selectedUser === void 0 ? void 0 : selectedUser.id,
|
|
182
|
+
clientId: isExpert ? selectedUser === null || selectedUser === void 0 ? void 0 : selectedUser.id : clientId,
|
|
183
183
|
projectDetails: selectedProjects.map((p) => { return { projectId: p.id, projectName: p.name }; }),
|
|
184
184
|
issueStartDate: issueStartDate,
|
|
185
185
|
escalationType: issueType,
|
|
@@ -11,6 +11,7 @@ interface EscalationsProps {
|
|
|
11
11
|
createEscalationChatMessage: any;
|
|
12
12
|
bucketName: string;
|
|
13
13
|
user: any;
|
|
14
|
+
clientId?: number;
|
|
14
15
|
}
|
|
15
|
-
export declare const Escalations: ({ expertsOrClients, projects, isExpert, escalations, documentUploadUrl, downloadDocumentUrl, uploadExpertClientFiles, createProjectEscalation, updateProjectEscalation, createEscalationChatMessage, bucketName, user, }: EscalationsProps) => JSX.Element;
|
|
16
|
+
export declare const Escalations: ({ expertsOrClients, projects, isExpert, escalations, documentUploadUrl, downloadDocumentUrl, uploadExpertClientFiles, createProjectEscalation, updateProjectEscalation, createEscalationChatMessage, bucketName, user, clientId, }: EscalationsProps) => JSX.Element;
|
|
16
17
|
export {};
|
|
@@ -39,7 +39,7 @@ const AccountSuspensionBanner_1 = __importDefault(require("./AccountSuspensionBa
|
|
|
39
39
|
const AccountSuspensionModal_1 = __importDefault(require("./AccountSuspensionModal"));
|
|
40
40
|
const base_icons_1 = require("@paro.io/base-icons");
|
|
41
41
|
const EscalationIssueCard_1 = require("./EscalationIssueCard");
|
|
42
|
-
const Escalations = ({ expertsOrClients, projects, isExpert = false, escalations, documentUploadUrl, downloadDocumentUrl, uploadExpertClientFiles, createProjectEscalation, updateProjectEscalation, createEscalationChatMessage, bucketName, user, }) => {
|
|
42
|
+
const Escalations = ({ expertsOrClients, projects, isExpert = false, escalations, documentUploadUrl, downloadDocumentUrl, uploadExpertClientFiles, createProjectEscalation, updateProjectEscalation, createEscalationChatMessage, bucketName, user, clientId = 0, }) => {
|
|
43
43
|
const [activeSection, setActiveSection] = (0, react_1.useState)('support');
|
|
44
44
|
const [selectedProject, setSelectedProject] = (0, react_1.useState)(null);
|
|
45
45
|
const [selectedIssueId, setSelectedIssueId] = (0, react_1.useState)(null); // using selectedIssueId 0 for new escalation submission
|
|
@@ -153,7 +153,7 @@ const Escalations = ({ expertsOrClients, projects, isExpert = false, escalations
|
|
|
153
153
|
react_1.default.createElement(EscalationTabs_1.default, { activeTab: activeEscalationTab, setActiveTab: setActiveEscalationTab, activeIssues: activeIssues.length, inProgressIssues: inProgressIssues.length, resolvedIssues: resolvedIssues.length }),
|
|
154
154
|
react_1.default.createElement(EscalationTabsContent_1.default, { activeTab: activeEscalationTab, openEscalationChat: openEscalationChat, setSelectedIssueId: setSelectedIssueId, activeIssues: activeIssues, inProgressIssues: inProgressIssues, resolvedIssues: resolvedIssues, updateProjectEscalation: updateProjectEscalation, isExpert: isExpert, downloadDocumentUrl: downloadDocumentUrl, bucketName: bucketName })),
|
|
155
155
|
activeSection === 'support' && activeIssues.filter((issue) => issue.escalationNumber === selectedIssueId).length > 0 && (react_1.default.createElement(EscalationRespondForm_1.default, { goBack: goBack, selectedIssue: activeIssues.find((issue) => issue.escalationNumber === selectedIssueId), documentUploadUrl: documentUploadUrl, downloadDocumentUrl: downloadDocumentUrl, bucketName: bucketName, uploadExpertClientFiles: uploadExpertClientFiles, updateProjectEscalation: updateProjectEscalation, goHome: goHome, isExpert: isExpert })),
|
|
156
|
-
activeSection === 'support' && selectedIssueId === 0 && (react_1.default.createElement(EscalationSubmitForm_1.default, { goBack: goBack, goHome: goHome, expertsOrClients: expertsOrClients, projects: projects, documentUploadUrl: documentUploadUrl, bucketName: bucketName, uploadExpertClientFiles: uploadExpertClientFiles, createProjectEscalation: createProjectEscalation, isExpert: isExpert, user: user })),
|
|
156
|
+
activeSection === 'support' && selectedIssueId === 0 && (react_1.default.createElement(EscalationSubmitForm_1.default, { goBack: goBack, goHome: goHome, expertsOrClients: expertsOrClients, projects: projects, documentUploadUrl: documentUploadUrl, bucketName: bucketName, uploadExpertClientFiles: uploadExpertClientFiles, createProjectEscalation: createProjectEscalation, isExpert: isExpert, user: user, clientId: clientId })),
|
|
157
157
|
showEscalationChat && activeChatIssue && (react_1.default.createElement(EscalationChat_1.default, { activeChatIssue: activeChatIssue, showEscalationChat: showEscalationChat, setShowEscalationChat: setShowEscalationChat, user: user, createEscalationChatMessage: createEscalationChatMessage, documentUploadUrl: documentUploadUrl, bucketName: bucketName, uploadExpertClientFiles: uploadExpertClientFiles, createProjectEscalation: createProjectEscalation, isExpert: isExpert })),
|
|
158
158
|
showSuspensionModal &&
|
|
159
159
|
react_1.default.createElement(AccountSuspensionModal_1.default, { showSuspensionModal: showSuspensionModal, onClose: () => setShowSuspensionModal(false) }))));
|