@paro.io/expert-shared-components 1.14.9 → 1.14.11
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/LICENSE +21 -21
- package/README.md +2 -2
- package/lib/components/ClientReferencesSection/DeleteButton.js +11 -11
- package/lib/components/ClientReferencesSection/ParoError.js +10 -10
- package/lib/components/ClientReferencesSection/TagsSection.js +2 -2
- package/lib/components/ClientReferencesSection/styles/BrandedTypography.js +2 -2
- package/lib/components/ClientReferencesSection/styles/Buttons.js +15 -15
- package/lib/components/ClientReferencesSection/styles/Name.js +5 -5
- package/lib/components/ClientReferencesSection/styles/NullContentConditionalColor.js +4 -4
- package/lib/components/ClientReferencesSection/styles/SectionBody.js +11 -11
- package/lib/components/ClientReferencesSection/styles/SectionTitle.js +6 -6
- package/lib/components/ClientReferencesSection/styles/Tags.js +2 -2
- package/lib/components/DiscussionThread/chat.d.ts +22 -22
- package/lib/components/DiscussionThread/chat.js +106 -106
- package/lib/components/DocumentCenter/DocumentTable.d.ts +15 -15
- package/lib/components/DocumentCenter/DocumentTable.js +350 -350
- package/lib/components/DocumentCenter/UploadFilesButton.d.ts +6 -6
- package/lib/components/DocumentCenter/UploadFilesButton.js +29 -29
- package/lib/components/EarningsTracker/ActiveProjectCard.d.ts +52 -52
- package/lib/components/EarningsTracker/ActiveProjectCard.js +161 -161
- package/lib/components/EarningsTracker/CenterCardUI.d.ts +13 -13
- package/lib/components/EarningsTracker/CenterCardUI.js +134 -134
- package/lib/components/EarningsTracker/EarningsTracker.d.ts +52 -52
- package/lib/components/EarningsTracker/EarningsTracker.js +508 -508
- package/lib/components/EarningsTracker/EditDateModal.d.ts +22 -22
- package/lib/components/EarningsTracker/EditDateModal.js +149 -149
- package/lib/components/EarningsTracker/EmailModal.d.ts +14 -14
- package/lib/components/EarningsTracker/EmailModal.js +79 -79
- package/lib/components/EarningsTracker/EndProjectModal.d.ts +56 -56
- package/lib/components/EarningsTracker/EndProjectModal.js +221 -221
- package/lib/components/EarningsTracker/LeftCardUI.d.ts +18 -18
- package/lib/components/EarningsTracker/LeftCardUI.js +189 -189
- package/lib/components/EarningsTracker/LogTimeModalAuthenticated.d.ts +52 -52
- package/lib/components/EarningsTracker/LogTimeModalAuthenticated.js +358 -358
- package/lib/components/EarningsTracker/ProgressBar.d.ts +4 -4
- package/lib/components/EarningsTracker/ProgressBar.js +66 -66
- package/lib/components/EarningsTracker/ReviewRequestModal.d.ts +17 -17
- package/lib/components/EarningsTracker/ReviewRequestModal.js +135 -135
- package/lib/components/EarningsTracker/RightCardUI.d.ts +46 -46
- package/lib/components/EarningsTracker/RightCardUI.js +231 -231
- package/lib/components/EarningsTracker/index.d.ts +1 -1
- package/lib/components/EarningsTracker/index.js +5 -5
- package/lib/components/Escalations/AccountSuspensionBanner.js +9 -4
- package/lib/components/Escalations/CustomTag.d.ts +3 -3
- package/lib/components/Escalations/CustomTag.js +25 -25
- package/lib/components/Escalations/ViewReponseModal.d.ts +8 -8
- package/lib/components/Escalations/ViewReponseModal.js +27 -27
- package/lib/components/ExpertProfileHeader/ActionButtonSection.js +6 -6
- package/lib/components/ExpertProfileHeader/ProfileSection.js +7 -7
- package/lib/components/Invoices/DiscussionSection.js +22 -2
- package/lib/components/Invoices/TestDecisionSection.d.ts +1 -1
- package/lib/components/Invoices/TestDecisionSection.js +126 -126
- package/lib/components/OrganizationChart/OrganizationChart.js +7 -7
- package/lib/components/OrganizationChart/PersonCard.js +5 -5
- package/lib/components/OrganizationChart/utils.js +79 -79
- package/lib/components/ProjectCard/ProgressBar.js +4 -4
- package/lib/components/ProjectCard/ReviewRequestModal.js +5 -5
- package/lib/components/ProjectIntelligence/EngagementHeader/index.js +5 -1
- package/lib/components/ProjectIntelligence/FocusAreas/index.d.ts +1 -1
- package/lib/components/ProjectIntelligence/FocusAreas/index.js +5 -5
- package/lib/components/ProjectIntelligence/MissingInformation/index.d.ts +1 -1
- package/lib/components/ProjectIntelligence/MissingInformation/index.js +3 -3
- package/lib/components/ProjectIntelligence/index.d.ts +2 -2
- package/lib/components/ProjectIntelligence/index.js +110 -23
- package/lib/components/Reviews/Pagination.js +6 -6
- package/lib/components/ReviewsTab/RatingHeader.js +6 -6
- package/lib/components/ReviewsTab/expert-shared-components.code-workspace +20 -20
- package/lib/components/ReviewsTab/reviewRequestModal.js +5 -5
- package/lib/components/shared/Image.js +13 -13
- package/lib/components/shared/ProfileTextField.d.ts +18 -18
- package/lib/components/shared/ProfileTextField.js +16 -16
- package/lib/components/shared/StyledActionButtons.d.ts +7 -7
- package/lib/components/shared/StyledActionButtons.js +15 -15
- package/lib/components/shared/ToastNotification.d.ts +10 -10
- package/lib/components/shared/ToastNotification.js +63 -63
- package/package.json +67 -67
|
@@ -50,86 +50,86 @@ const transformEmployeeData = (employeeData, firstName, lastName, primaryService
|
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
exports.transformEmployeeData = transformEmployeeData;
|
|
53
|
-
exports.ConnectorContainer = styled_components_1.default.div `
|
|
54
|
-
position: relative;
|
|
55
|
-
width: 100%;
|
|
56
|
-
display: flex;
|
|
57
|
-
justify-content: center;
|
|
58
|
-
align-items: center;
|
|
59
|
-
|
|
60
|
-
&.parent-vertical-line {
|
|
61
|
-
height: 40px;
|
|
62
|
-
position: relative;
|
|
63
|
-
|
|
64
|
-
&:before {
|
|
65
|
-
content: '';
|
|
66
|
-
position: absolute;
|
|
67
|
-
top: 0;
|
|
68
|
-
left: 50%;
|
|
69
|
-
width: 2px;
|
|
70
|
-
height: calc(100% + 2px);
|
|
71
|
-
background-color: #D8D8D8;
|
|
72
|
-
transform: translateX(-50%);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&.child-vertical-line {
|
|
77
|
-
height: 40px;
|
|
78
|
-
position: relative;
|
|
79
|
-
margin-bottom: 4px;
|
|
80
|
-
&:before {
|
|
81
|
-
content: '';
|
|
82
|
-
position: absolute;
|
|
83
|
-
left: 50%;
|
|
84
|
-
width: 2px;
|
|
85
|
-
height: 100%;
|
|
86
|
-
background-color: #D8D8D8;
|
|
87
|
-
transform: translateX(-50%);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
&:after {
|
|
91
|
-
content: '';
|
|
92
|
-
position: absolute;
|
|
93
|
-
bottom: -4px;
|
|
94
|
-
left: 50%;
|
|
95
|
-
width: 8px;
|
|
96
|
-
height: 8px;
|
|
97
|
-
border-right: 2px solid #D8D8D8;
|
|
98
|
-
border-bottom: 2px solid #D8D8D8;
|
|
99
|
-
transform: translateX(-50%) rotate(45deg);
|
|
100
|
-
background-color: transparent;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&.horizontal-line {
|
|
105
|
-
position: absolute;
|
|
106
|
-
height: 2px;
|
|
107
|
-
background-color: #D8D8D8;
|
|
108
|
-
top: 0;
|
|
109
|
-
width: 100%;
|
|
110
|
-
}
|
|
53
|
+
exports.ConnectorContainer = styled_components_1.default.div `
|
|
54
|
+
position: relative;
|
|
55
|
+
width: 100%;
|
|
56
|
+
display: flex;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
align-items: center;
|
|
59
|
+
|
|
60
|
+
&.parent-vertical-line {
|
|
61
|
+
height: 40px;
|
|
62
|
+
position: relative;
|
|
63
|
+
|
|
64
|
+
&:before {
|
|
65
|
+
content: '';
|
|
66
|
+
position: absolute;
|
|
67
|
+
top: 0;
|
|
68
|
+
left: 50%;
|
|
69
|
+
width: 2px;
|
|
70
|
+
height: calc(100% + 2px);
|
|
71
|
+
background-color: #D8D8D8;
|
|
72
|
+
transform: translateX(-50%);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&.child-vertical-line {
|
|
77
|
+
height: 40px;
|
|
78
|
+
position: relative;
|
|
79
|
+
margin-bottom: 4px;
|
|
80
|
+
&:before {
|
|
81
|
+
content: '';
|
|
82
|
+
position: absolute;
|
|
83
|
+
left: 50%;
|
|
84
|
+
width: 2px;
|
|
85
|
+
height: 100%;
|
|
86
|
+
background-color: #D8D8D8;
|
|
87
|
+
transform: translateX(-50%);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&:after {
|
|
91
|
+
content: '';
|
|
92
|
+
position: absolute;
|
|
93
|
+
bottom: -4px;
|
|
94
|
+
left: 50%;
|
|
95
|
+
width: 8px;
|
|
96
|
+
height: 8px;
|
|
97
|
+
border-right: 2px solid #D8D8D8;
|
|
98
|
+
border-bottom: 2px solid #D8D8D8;
|
|
99
|
+
transform: translateX(-50%) rotate(45deg);
|
|
100
|
+
background-color: transparent;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&.horizontal-line {
|
|
105
|
+
position: absolute;
|
|
106
|
+
height: 2px;
|
|
107
|
+
background-color: #D8D8D8;
|
|
108
|
+
top: 0;
|
|
109
|
+
width: 100%;
|
|
110
|
+
}
|
|
111
111
|
`;
|
|
112
|
-
exports.InfoCard = (0, styled_components_1.default)(core_1.Card) `
|
|
113
|
-
position: absolute;
|
|
114
|
-
top: 10;
|
|
115
|
-
right: 0;
|
|
116
|
-
width: fit-content;
|
|
117
|
-
max-width: 30%;
|
|
118
|
-
z-index: 1000;
|
|
119
|
-
padding: 8px;
|
|
120
|
-
margin: 16px;
|
|
121
|
-
background-color: white;
|
|
122
|
-
border-radius: 8px;
|
|
123
|
-
box-shadow: none;
|
|
124
|
-
border: 1px solid #e2e8f0;
|
|
125
|
-
max-height: 90vh;
|
|
126
|
-
overflow: auto;
|
|
127
|
-
@media (max-width: 600px) {
|
|
128
|
-
position: absolute;
|
|
129
|
-
top: 20;
|
|
130
|
-
right: auto;
|
|
131
|
-
min-width: 90%;
|
|
132
|
-
}
|
|
112
|
+
exports.InfoCard = (0, styled_components_1.default)(core_1.Card) `
|
|
113
|
+
position: absolute;
|
|
114
|
+
top: 10;
|
|
115
|
+
right: 0;
|
|
116
|
+
width: fit-content;
|
|
117
|
+
max-width: 30%;
|
|
118
|
+
z-index: 1000;
|
|
119
|
+
padding: 8px;
|
|
120
|
+
margin: 16px;
|
|
121
|
+
background-color: white;
|
|
122
|
+
border-radius: 8px;
|
|
123
|
+
box-shadow: none;
|
|
124
|
+
border: 1px solid #e2e8f0;
|
|
125
|
+
max-height: 90vh;
|
|
126
|
+
overflow: auto;
|
|
127
|
+
@media (max-width: 600px) {
|
|
128
|
+
position: absolute;
|
|
129
|
+
top: 20;
|
|
130
|
+
right: auto;
|
|
131
|
+
min-width: 90%;
|
|
132
|
+
}
|
|
133
133
|
`;
|
|
134
134
|
exports.CustomDialog = (0, core_1.styled)(Dialog_1.default)(({ theme }) => ({
|
|
135
135
|
'& .MuiDialog-paper': {
|
|
@@ -44,15 +44,15 @@ const ProgressBar = ({ minFloorHours, maxFloorHours, loggedHours }) => {
|
|
|
44
44
|
};
|
|
45
45
|
return (react_1.default.createElement("div", { className: `relative m-6 ${minFloorHours <= 0 ? 'pt-4' : 'pt-6'}` },
|
|
46
46
|
react_1.default.createElement("div", { className: "h-8 w-full border-2 border-solid border-[#64748B] rounded-full relative flex flex-wrap bg-[#F1F5F9]" },
|
|
47
|
-
react_1.default.createElement("div", { className: `h-full w-full rounded-l-full ${isRounded ? 'rounded-r-full' : ''}
|
|
47
|
+
react_1.default.createElement("div", { className: `h-full w-full rounded-l-full ${isRounded ? 'rounded-r-full' : ''}
|
|
48
48
|
${totalLoggedHours >= minFloorHours && totalLoggedHours <= maxFloorHours
|
|
49
49
|
? 'bg-[#248384]'
|
|
50
50
|
: totalLoggedHours < minFloorHours
|
|
51
51
|
? 'bg-[#F9BABF]'
|
|
52
52
|
: 'bg-[#A73A43]'}`, style: { width: `${totalLoggedHours !== 0 ? ((totalLoggedHours / totalBar) * 100) : 0}%` } },
|
|
53
|
-
react_1.default.createElement("div", { className: `absolute top-1/2 left-1/2 transform -translate-x-1/2 z-10
|
|
54
|
-
${totalLoggedHours < (totalBar * 0.03) || totalLoggedHours > totalBar || (totalLoggedHours < (totalBar * 0.12)) ? 'translate-y-full' : '-translate-y-1/2'}
|
|
55
|
-
${totalLoggedHours < minFloorHours || totalLoggedHours === 0 ? 'text-black' : 'text-white'}
|
|
53
|
+
react_1.default.createElement("div", { className: `absolute top-1/2 left-1/2 transform -translate-x-1/2 z-10
|
|
54
|
+
${totalLoggedHours < (totalBar * 0.03) || totalLoggedHours > totalBar || (totalLoggedHours < (totalBar * 0.12)) ? 'translate-y-full' : '-translate-y-1/2'}
|
|
55
|
+
${totalLoggedHours < minFloorHours || totalLoggedHours === 0 ? 'text-black' : 'text-white'}
|
|
56
56
|
font-bold`, style: { left: `calc(${calculatePosition()}% - 1px)` } },
|
|
57
57
|
(0, exports.formatNumberingSystem)(totalLoggedHours),
|
|
58
58
|
" hrs")),
|
|
@@ -35,11 +35,11 @@ const react_hot_toast_1 = __importDefault(require("react-hot-toast"));
|
|
|
35
35
|
const ReviewRequestModal = ({ project, requestModal, setRequestModal, expertName, freelancerId, setRequestStatus, selectedProject, setSelectedProject, clientId, refetchParoProjects, setHighlightedRatings, createOrUpdateRatingRequestMutation, }) => {
|
|
36
36
|
var _a;
|
|
37
37
|
const [showError, setShowError] = (0, react_1.useState)(false);
|
|
38
|
-
const [textareaValue, setTextareaValue] = (0, react_1.useState)(`Hi ${(_a = project === null || project === void 0 ? void 0 : project.client) === null || _a === void 0 ? void 0 : _a.name},
|
|
39
|
-
I hope you are satisfied with the work I provided on ${project === null || project === void 0 ? void 0 : project.name}. Your feedback is very important to me and helps me improve my services and build my reputation on Paro. Could you please take a moment to leave a review of you experience? Your input is greatly appreciated!
|
|
40
|
-
|
|
41
|
-
Thank you in advance for your time and feedback.
|
|
42
|
-
Best regards,
|
|
38
|
+
const [textareaValue, setTextareaValue] = (0, react_1.useState)(`Hi ${(_a = project === null || project === void 0 ? void 0 : project.client) === null || _a === void 0 ? void 0 : _a.name},
|
|
39
|
+
I hope you are satisfied with the work I provided on ${project === null || project === void 0 ? void 0 : project.name}. Your feedback is very important to me and helps me improve my services and build my reputation on Paro. Could you please take a moment to leave a review of you experience? Your input is greatly appreciated!
|
|
40
|
+
|
|
41
|
+
Thank you in advance for your time and feedback.
|
|
42
|
+
Best regards,
|
|
43
43
|
${expertName}`);
|
|
44
44
|
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
45
45
|
const handleTextArea = (e) => {
|
|
@@ -24,7 +24,11 @@ const EngagementHeader = ({ clientName, expertName, expertTitle, startDate, stat
|
|
|
24
24
|
const formattedDate = startDate ? (0, date_fns_1.format)(new Date(startDate), 'MMMM dd, yyyy') : (0, date_fns_1.format)(new Date(), 'MMMM dd, yyyy');
|
|
25
25
|
return (react_1.default.createElement("div", { className: "bg-white rounded-lg shadow-sm border border-gray-200" },
|
|
26
26
|
react_1.default.createElement("div", { className: "px-6 pt-4" },
|
|
27
|
-
react_1.default.createElement("
|
|
27
|
+
react_1.default.createElement("div", { className: "flex justify-between items-center mb-3" },
|
|
28
|
+
react_1.default.createElement("p", { className: "text-sm font-medium text-gray-700" }, "Select Client:"),
|
|
29
|
+
react_1.default.createElement("div", { className: "inline-flex items-center text-sm text-gray-600 bg-blue-50 px-3 py-1 rounded-md" },
|
|
30
|
+
react_1.default.createElement("i", { className: "far fa-info-circle mr-2" }),
|
|
31
|
+
"Project Intelligence insights are updated every 12 hours.")),
|
|
28
32
|
react_1.default.createElement("div", { className: "flex flex-wrap gap-2 mb-4" }, clientTabs.map((client) => (react_1.default.createElement("button", { key: client.id, onClick: () => onClientChange(client.id), className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors cursor-pointer ${client.id === selectedClientId
|
|
29
33
|
? 'bg-blue bg-blue-600 text-white'
|
|
30
34
|
: 'bg-gray-100 text-gray-700 hover:bg-gray-200'}` }, client.label)))),
|
|
@@ -13,7 +13,7 @@ interface FocusAreasProps {
|
|
|
13
13
|
updateOpportunityFocusArea: any;
|
|
14
14
|
GetOpportunityInsightsDocument: any;
|
|
15
15
|
selectedOpportunityId: string;
|
|
16
|
-
|
|
16
|
+
onSaveMessage: any;
|
|
17
17
|
}
|
|
18
18
|
export declare const FocusAreas: React.FC<FocusAreasProps>;
|
|
19
19
|
export {};
|
|
@@ -44,7 +44,7 @@ const PRIORITY_COLORS = {
|
|
|
44
44
|
LOW: 'text-green-600',
|
|
45
45
|
};
|
|
46
46
|
// Modal Component
|
|
47
|
-
const EditFocusAreaModal = ({ isOpen, focusArea, onClose, onSave, updateOpportunityFocusArea, GetOpportunityInsightsDocument, selectedOpportunityId,
|
|
47
|
+
const EditFocusAreaModal = ({ isOpen, focusArea, onClose, onSave, updateOpportunityFocusArea, GetOpportunityInsightsDocument, selectedOpportunityId, onSaveMessage, }) => {
|
|
48
48
|
const [title, setTitle] = (0, react_1.useState)((focusArea === null || focusArea === void 0 ? void 0 : focusArea.title) || '');
|
|
49
49
|
const [description, setDescription] = (0, react_1.useState)((focusArea === null || focusArea === void 0 ? void 0 : focusArea.description) || '');
|
|
50
50
|
react_1.default.useEffect(() => {
|
|
@@ -68,7 +68,7 @@ const EditFocusAreaModal = ({ isOpen, focusArea, onClose, onSave, updateOpportun
|
|
|
68
68
|
]
|
|
69
69
|
});
|
|
70
70
|
(0, utils_1.showToast)('success', 'Focus area updated successfully');
|
|
71
|
-
|
|
71
|
+
onSaveMessage && onSaveMessage('Focus area updated successfully');
|
|
72
72
|
}
|
|
73
73
|
catch (error) {
|
|
74
74
|
console.error('Error updating focus area:', error);
|
|
@@ -103,7 +103,7 @@ const EditFocusAreaModal = ({ isOpen, focusArea, onClose, onSave, updateOpportun
|
|
|
103
103
|
react_1.default.createElement("button", { onClick: handleCancel, className: "px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 border border-gray-300 rounded-md hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-500 transition-colors" }, "Cancel"),
|
|
104
104
|
react_1.default.createElement("button", { onClick: handleSave, className: "px-4 py-2 text-sm font-medium text-white bg-blue bg-blue-600 border border-transparent rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors" }, "Save")))));
|
|
105
105
|
};
|
|
106
|
-
const FocusAreas = ({ focusAreas, updateOpportunityFocusArea, GetOpportunityInsightsDocument, selectedOpportunityId,
|
|
106
|
+
const FocusAreas = ({ focusAreas, updateOpportunityFocusArea, GetOpportunityInsightsDocument, selectedOpportunityId, onSaveMessage, }) => {
|
|
107
107
|
const [editingFocusArea, setEditingFocusArea] = (0, react_1.useState)(null);
|
|
108
108
|
const [isModalOpen, setIsModalOpen] = (0, react_1.useState)(false);
|
|
109
109
|
const [localFocusAreas, setLocalFocusAreas] = (0, react_1.useState)(focusAreas || []);
|
|
@@ -143,7 +143,7 @@ const FocusAreas = ({ focusAreas, updateOpportunityFocusArea, GetOpportunityInsi
|
|
|
143
143
|
setLocalFocusAreas(prev => prev.map(area => area.id === focusArea.id
|
|
144
144
|
? Object.assign(Object.assign({}, area), { status: newStatus }) : area));
|
|
145
145
|
(0, utils_1.showToast)('success', `Focus area marked as ${newStatus.toLowerCase()}`);
|
|
146
|
-
|
|
146
|
+
onSaveMessage && onSaveMessage(`Focus area marked as ${newStatus.toLowerCase()}`);
|
|
147
147
|
}
|
|
148
148
|
catch (error) {
|
|
149
149
|
console.error('Error updating focus area status:', error);
|
|
@@ -184,6 +184,6 @@ const FocusAreas = ({ focusAreas, updateOpportunityFocusArea, GetOpportunityInsi
|
|
|
184
184
|
area.priority,
|
|
185
185
|
" Priority"),
|
|
186
186
|
area.status === 'IN_PROGRESS' && (react_1.default.createElement("span", { className: "text-blue-600" }, "In progress")))))))))),
|
|
187
|
-
react_1.default.createElement(EditFocusAreaModal, { isOpen: isModalOpen, focusArea: editingFocusArea, onClose: handleCloseModal, onSave: handleSaveFocusArea, selectedOpportunityId: selectedOpportunityId, updateOpportunityFocusArea: updateOpportunityFocusArea, GetOpportunityInsightsDocument: GetOpportunityInsightsDocument,
|
|
187
|
+
react_1.default.createElement(EditFocusAreaModal, { isOpen: isModalOpen, focusArea: editingFocusArea, onClose: handleCloseModal, onSave: handleSaveFocusArea, selectedOpportunityId: selectedOpportunityId, updateOpportunityFocusArea: updateOpportunityFocusArea, GetOpportunityInsightsDocument: GetOpportunityInsightsDocument, onSaveMessage: onSaveMessage })));
|
|
188
188
|
};
|
|
189
189
|
exports.FocusAreas = FocusAreas;
|
|
@@ -19,7 +19,7 @@ interface MissingInformationProps {
|
|
|
19
19
|
} | null;
|
|
20
20
|
isInternal: boolean;
|
|
21
21
|
handleRouteToDocuments?: () => void;
|
|
22
|
-
|
|
22
|
+
onSaveMessage?: any;
|
|
23
23
|
isParoIntelligenceRolePresent: boolean;
|
|
24
24
|
}
|
|
25
25
|
export declare const MissingInformation: React.FC<MissingInformationProps>;
|
|
@@ -164,12 +164,12 @@ const RequestInfoModal = ({ isOpen, missingInfoItem, onClose, onSubmit, document
|
|
|
164
164
|
react_1.default.createElement("select", { id: "priorityLevel", disabled: isInternal && !isParoIntelligenceRolePresent, value: priorityLevel, onChange: (e) => { var _a; return setPriorityLevel((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.value); }, className: "w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm" }, PRIORITY_LEVELS.map((level) => (react_1.default.createElement("option", { key: level, value: level }, level))))),
|
|
165
165
|
react_1.default.createElement("div", null,
|
|
166
166
|
react_1.default.createElement("label", { htmlFor: "specificInformation", className: "block text-sm font-medium text-gray-700 mb-1" }, "Specific Information Needed"),
|
|
167
|
-
react_1.default.createElement("textarea", { id: "specificInformation", disabled: isInternal && !isParoIntelligenceRolePresent, value: specificInformation, onChange: (e) => { var _a; return setSpecificInformation((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.value); }, rows: 4, className: "w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm", placeholder: "Need NetSuite configuration details:\n \n 1. US vs Colombian entity setup\n 2. Consolidation process and requirements" }))),
|
|
167
|
+
react_1.default.createElement("textarea", { id: "specificInformation", disabled: isInternal && !isParoIntelligenceRolePresent, value: specificInformation, onChange: (e) => { var _a; return setSpecificInformation((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.value); }, rows: 4, className: "w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm", placeholder: "Need NetSuite configuration details:\r\n \r\n 1. US vs Colombian entity setup\r\n 2. Consolidation process and requirements" }))),
|
|
168
168
|
react_1.default.createElement("div", { className: "px-6 py-4 border-t border-gray-200 flex justify-end space-x-3" },
|
|
169
169
|
react_1.default.createElement("button", { onClick: handleCancel, className: "px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-gray-500 transition-colors" }, "Cancel"),
|
|
170
170
|
react_1.default.createElement("button", { onClick: handleSubmit, disabled: isInternal && !isParoIntelligenceRolePresent, className: `px-4 py-2 text-sm font-medium text-white bg-blue bg-blue-600 border border-transparent rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors cursor-${isInternal && !isParoIntelligenceRolePresent ? "not-allowed" : "pointer"}` }, buttonText)))));
|
|
171
171
|
};
|
|
172
|
-
const MissingInformation = ({ items, className = '', opportunityId, GetOpportunityInsightsDocument, updateOpportunityMissingInformation, documentCenterController, isInternal, handleRouteToDocuments,
|
|
172
|
+
const MissingInformation = ({ items, className = '', opportunityId, GetOpportunityInsightsDocument, updateOpportunityMissingInformation, documentCenterController, isInternal, handleRouteToDocuments, onSaveMessage, isParoIntelligenceRolePresent, }) => {
|
|
173
173
|
const [selectedItem, setSelectedItem] = (0, react_1.useState)(null);
|
|
174
174
|
const [isModalOpen, setIsModalOpen] = (0, react_1.useState)(false);
|
|
175
175
|
const [requestedItems, setRequestedItems] = (0, react_1.useState)({});
|
|
@@ -201,7 +201,7 @@ const MissingInformation = ({ items, className = '', opportunityId, GetOpportuni
|
|
|
201
201
|
]
|
|
202
202
|
});
|
|
203
203
|
(0, utils_1.showToast)('success', 'Information request submitted successfully');
|
|
204
|
-
|
|
204
|
+
onSaveMessage && onSaveMessage('Information request submitted successfully');
|
|
205
205
|
// Update local state to reflect the change immediately
|
|
206
206
|
setRequestedItems(prev => (Object.assign(Object.assign({}, prev), { [selectedItem.id]: true })));
|
|
207
207
|
console.log('Information request submitted successfully');
|
|
@@ -12,10 +12,10 @@ interface ProjectIntelligenceProps {
|
|
|
12
12
|
updateOpportunityFocusArea: any;
|
|
13
13
|
isInternal?: boolean;
|
|
14
14
|
handleRouteToDocuments?: () => void;
|
|
15
|
-
|
|
16
|
-
onSaveMissingInformation?: any;
|
|
15
|
+
onSaveMessage?: any;
|
|
17
16
|
isParoIntelligenceRolePresent?: boolean;
|
|
18
17
|
updateOpportunityPhase?: any;
|
|
18
|
+
getOpportunityInsights?: any;
|
|
19
19
|
}
|
|
20
20
|
export declare const ProjectIntelligence: React.FC<ProjectIntelligenceProps>;
|
|
21
21
|
export {};
|
|
@@ -33,15 +33,106 @@ const ProjectHealth_1 = require("./ProjectHealth");
|
|
|
33
33
|
const KeyMetrics_1 = require("./KeyMetrics");
|
|
34
34
|
const MissingInformation_1 = require("./MissingInformation");
|
|
35
35
|
const utils_1 = require("../shared/utils");
|
|
36
|
-
const ProjectIntelligence = ({ checkIfOpportunityInsightsExistData, opportunityInsightsData, selectedOpportunityId, setSelectedOpportunityId, GetOpportunityInsightsDocument, updateOpportunityMissingInformation, documentCenterController = null, updateOpportunityFocusArea, isInternal = false, handleRouteToDocuments,
|
|
36
|
+
const ProjectIntelligence = ({ checkIfOpportunityInsightsExistData, opportunityInsightsData, selectedOpportunityId, setSelectedOpportunityId, GetOpportunityInsightsDocument, updateOpportunityMissingInformation, documentCenterController = null, updateOpportunityFocusArea, isInternal = false, handleRouteToDocuments, onSaveMessage, isParoIntelligenceRolePresent = false, updateOpportunityPhase, getOpportunityInsights, }) => {
|
|
37
37
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10;
|
|
38
38
|
const [isLoading, setIsLoading] = (0, react_1.useState)(false);
|
|
39
39
|
const [currentPhase, setCurrentPhase] = (0, react_1.useState)('Setup');
|
|
40
40
|
const [nextStageData, setNextStageData] = (0, react_1.useState)(null);
|
|
41
|
+
const [isPolling, setIsPolling] = (0, react_1.useState)(false);
|
|
42
|
+
const [expectedNextPhase, setExpectedNextPhase] = (0, react_1.useState)(null);
|
|
43
|
+
const pollingIntervalRef = (0, react_1.useRef)(null);
|
|
44
|
+
const pollingCountRef = (0, react_1.useRef)(0);
|
|
41
45
|
const opportunityInsights = opportunityInsightsData === null || opportunityInsightsData === void 0 ? void 0 : opportunityInsightsData.getOpportunityInsights;
|
|
42
46
|
(0, react_1.useEffect)(() => {
|
|
43
47
|
setCurrentPhase((opportunityInsights === null || opportunityInsights === void 0 ? void 0 : opportunityInsights.phase) || 'In_Progress');
|
|
44
48
|
}, [opportunityInsights === null || opportunityInsights === void 0 ? void 0 : opportunityInsights.phase]);
|
|
49
|
+
// Determine the next phase based on the current phase
|
|
50
|
+
const getNextPhase = (phase) => {
|
|
51
|
+
switch (phase) {
|
|
52
|
+
case 'PreKickoff':
|
|
53
|
+
return 'Kickoff';
|
|
54
|
+
case 'Kickoff':
|
|
55
|
+
return 'Setup';
|
|
56
|
+
case 'Setup':
|
|
57
|
+
return 'Active';
|
|
58
|
+
case 'Active':
|
|
59
|
+
return 'Renewal';
|
|
60
|
+
default:
|
|
61
|
+
return 'Active'; // Default to Active if phase is unknown
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
// Polling effect for phase updates
|
|
65
|
+
(0, react_1.useEffect)(() => {
|
|
66
|
+
if (pollingIntervalRef.current) {
|
|
67
|
+
clearInterval(pollingIntervalRef.current);
|
|
68
|
+
pollingIntervalRef.current = null;
|
|
69
|
+
}
|
|
70
|
+
if (isPolling && selectedOpportunityId && getOpportunityInsights && expectedNextPhase) {
|
|
71
|
+
console.log('Starting polling for phase updates:', {
|
|
72
|
+
opportunityId: selectedOpportunityId,
|
|
73
|
+
expectedPhase: expectedNextPhase
|
|
74
|
+
});
|
|
75
|
+
// Immediately make an initial query
|
|
76
|
+
getOpportunityInsights({
|
|
77
|
+
variables: { opportunityId: selectedOpportunityId },
|
|
78
|
+
fetchPolicy: 'network-only',
|
|
79
|
+
}).then((result) => {
|
|
80
|
+
var _a, _b;
|
|
81
|
+
const fetchedPhase = (_b = (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.getOpportunityInsights) === null || _b === void 0 ? void 0 : _b.phase;
|
|
82
|
+
console.log('Initial poll result:', { fetchedPhase, expectedPhase: expectedNextPhase });
|
|
83
|
+
if (fetchedPhase === expectedNextPhase) {
|
|
84
|
+
setIsPolling(false);
|
|
85
|
+
pollingCountRef.current = 0;
|
|
86
|
+
setExpectedNextPhase(null);
|
|
87
|
+
(0, utils_1.showToast)('success', `Project phase updated to ${fetchedPhase}`);
|
|
88
|
+
onSaveMessage && onSaveMessage('Project phase updated to ' + fetchedPhase);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
pollingIntervalRef.current = setInterval(() => {
|
|
93
|
+
pollingCountRef.current += 1;
|
|
94
|
+
console.log('Polling iteration:', pollingCountRef.current);
|
|
95
|
+
getOpportunityInsights({
|
|
96
|
+
variables: { opportunityId: selectedOpportunityId },
|
|
97
|
+
fetchPolicy: 'network-only',
|
|
98
|
+
}).then((result) => {
|
|
99
|
+
var _a, _b;
|
|
100
|
+
const fetchedPhase = (_b = (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.getOpportunityInsights) === null || _b === void 0 ? void 0 : _b.phase;
|
|
101
|
+
console.log('Poll result:', { fetchedPhase, expectedPhase: expectedNextPhase });
|
|
102
|
+
if (fetchedPhase === expectedNextPhase) {
|
|
103
|
+
if (pollingIntervalRef.current) {
|
|
104
|
+
clearInterval(pollingIntervalRef.current);
|
|
105
|
+
pollingIntervalRef.current = null;
|
|
106
|
+
}
|
|
107
|
+
setIsPolling(false);
|
|
108
|
+
pollingCountRef.current = 0;
|
|
109
|
+
setExpectedNextPhase(null);
|
|
110
|
+
(0, utils_1.showToast)('success', `Project phase updated to ${fetchedPhase}`);
|
|
111
|
+
onSaveMessage && onSaveMessage('Project phase updated to ' + fetchedPhase);
|
|
112
|
+
}
|
|
113
|
+
if (pollingCountRef.current >= 12) {
|
|
114
|
+
if (pollingIntervalRef.current) {
|
|
115
|
+
clearInterval(pollingIntervalRef.current);
|
|
116
|
+
pollingIntervalRef.current = null;
|
|
117
|
+
}
|
|
118
|
+
setIsPolling(false);
|
|
119
|
+
pollingCountRef.current = 0;
|
|
120
|
+
setExpectedNextPhase(null);
|
|
121
|
+
(0, utils_1.showToast)('warning', 'Phase calculation is taking longer than expected. The page will update automatically when complete.');
|
|
122
|
+
onSaveMessage && onSaveMessage('Phase calculation is taking longer than expected. The page will update automatically when complete.');
|
|
123
|
+
}
|
|
124
|
+
}).catch((error) => {
|
|
125
|
+
console.error('Error polling for opportunity insights:', error);
|
|
126
|
+
});
|
|
127
|
+
}, 5000);
|
|
128
|
+
return () => {
|
|
129
|
+
if (pollingIntervalRef.current) {
|
|
130
|
+
clearInterval(pollingIntervalRef.current);
|
|
131
|
+
pollingIntervalRef.current = null;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
}, [isPolling, selectedOpportunityId, getOpportunityInsights, expectedNextPhase]);
|
|
45
136
|
// Create client tabs from checkIfOpportunityInsightsExistData
|
|
46
137
|
const clientTabs = ((_a = checkIfOpportunityInsightsExistData === null || checkIfOpportunityInsightsExistData === void 0 ? void 0 : checkIfOpportunityInsightsExistData.checkIfOpportunityInsightsExist) === null || _a === void 0 ? void 0 : _a.map((insight) => ({
|
|
47
138
|
id: insight.opportunityId,
|
|
@@ -129,19 +220,25 @@ const ProjectIntelligence = ({ checkIfOpportunityInsightsExistData, opportunityI
|
|
|
129
220
|
// Handle moving to the next stage
|
|
130
221
|
const handleMoveToNextStage = () => {
|
|
131
222
|
setIsLoading(true);
|
|
223
|
+
// Calculate what the next phase should be
|
|
224
|
+
const nextPhase = getNextPhase(currentPhase);
|
|
225
|
+
setExpectedNextPhase(nextPhase);
|
|
132
226
|
updateOpportunityPhase({
|
|
133
227
|
variables: {
|
|
134
228
|
opportunityId: selectedOpportunityId
|
|
135
|
-
}
|
|
136
|
-
refetchQueries: [
|
|
137
|
-
{ query: GetOpportunityInsightsDocument, variables: { opportunityId: selectedOpportunityId } }
|
|
138
|
-
]
|
|
229
|
+
}
|
|
139
230
|
}).then(() => {
|
|
140
231
|
setIsLoading(false);
|
|
232
|
+
// Start polling for phase updates
|
|
233
|
+
setIsPolling(true);
|
|
234
|
+
pollingCountRef.current = 0;
|
|
141
235
|
}).catch((error) => {
|
|
142
236
|
setIsLoading(false);
|
|
237
|
+
setIsPolling(false);
|
|
238
|
+
setExpectedNextPhase(null);
|
|
143
239
|
console.error('Error updating opportunity phase:', error);
|
|
144
240
|
(0, utils_1.showToast)('warning', 'Error updating opportunity phase. Please try again.');
|
|
241
|
+
onSaveMessage && onSaveMessage('Error updating opportunity phase. Please try again.');
|
|
145
242
|
});
|
|
146
243
|
};
|
|
147
244
|
const hasNoProjectIntelligence = !(checkIfOpportunityInsightsExistData === null || checkIfOpportunityInsightsExistData === void 0 ? void 0 : checkIfOpportunityInsightsExistData.checkIfOpportunityInsightsExist) ||
|
|
@@ -179,23 +276,13 @@ const ProjectIntelligence = ({ checkIfOpportunityInsightsExistData, opportunityI
|
|
|
179
276
|
clientResponse: (item === null || item === void 0 ? void 0 : item.clientResponse) || undefined
|
|
180
277
|
})) : [];
|
|
181
278
|
};
|
|
182
|
-
// Get the current phase and next steps text based on the current phase
|
|
183
|
-
const getPhaseInfo = () => {
|
|
184
|
-
if (currentPhase === 'Kickoff') {
|
|
185
|
-
return {
|
|
186
|
-
phaseDisplay: 'Kickoff Phase (Day 1 of 3)',
|
|
187
|
-
nextSteps: 'System access & team introductions'
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
return {
|
|
192
|
-
phaseDisplay: 'Preparation Phase',
|
|
193
|
-
nextSteps: 'Complete initial focus areas'
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
const phaseInfo = getPhaseInfo();
|
|
198
279
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
280
|
+
isPolling && (react_1.default.createElement("div", { className: "fixed top-4 right-4 bg-white shadow-lg rounded-md p-4 z-50 w-80" },
|
|
281
|
+
react_1.default.createElement("div", { className: "flex items-center mb-2" },
|
|
282
|
+
react_1.default.createElement("div", { className: "animate-spin rounded-full h-5 w-5 border-t-2 border-b-2 border-blue-500 mr-3" }),
|
|
283
|
+
react_1.default.createElement("span", { className: "font-medium" }, "Calculating next phase insights")),
|
|
284
|
+
react_1.default.createElement("div", { className: "w-full bg-gray-200 rounded-full h-2.5" },
|
|
285
|
+
react_1.default.createElement("div", { className: "bg-blue-600 h-2.5 rounded-full transition-all duration-500 ease-out", style: { width: `${Math.min((pollingCountRef.current / 12) * 100, 100)}%` } })))),
|
|
199
286
|
react_1.default.createElement("div", { className: "mx-auto px-4 py-8" },
|
|
200
287
|
react_1.default.createElement(EngagementHeader_1.EngagementHeader, { clientName: (opportunityInsights === null || opportunityInsights === void 0 ? void 0 : opportunityInsights.opportunityName) || '', expertName: ((_b = opportunityInsights === null || opportunityInsights === void 0 ? void 0 : opportunityInsights.expertInfo) === null || _b === void 0 ? void 0 : _b.name) || '', expertTitle: ((_c = opportunityInsights === null || opportunityInsights === void 0 ? void 0 : opportunityInsights.expertInfo) === null || _c === void 0 ? void 0 : _c.role) || '', startDate: (opportunityInsights === null || opportunityInsights === void 0 ? void 0 : opportunityInsights.startDate) || '', status: currentPhase || (opportunityInsights === null || opportunityInsights === void 0 ? void 0 : opportunityInsights.phase) || 'In_Progress', clientTabs: clientTabs, selectedClientId: selectedOpportunityId, onClientChange: handleClientChange, allFocusAreasCompleted: areAllFocusAreasCompleted(), onMoveToNextStage: handleMoveToNextStage, isLoading: isLoading }),
|
|
201
288
|
react_1.default.createElement(ProgressTracker_1.ProgressTracker, { percentage: 0, currentPhase: currentPhase }),
|
|
@@ -204,7 +291,7 @@ const ProjectIntelligence = ({ checkIfOpportunityInsightsExistData, opportunityI
|
|
|
204
291
|
react_1.default.createElement("div", { className: "animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-500 mx-auto mb-4" }),
|
|
205
292
|
react_1.default.createElement("p", { className: "text-lg font-medium text-gray-700" }, "Calculating Intelligence for your next Stage")))) : (react_1.default.createElement("div", { className: "flex flex-row space-x-4 mt-8" },
|
|
206
293
|
react_1.default.createElement("div", { className: "w-2/3 space-7-4" },
|
|
207
|
-
react_1.default.createElement(FocusAreas_1.FocusAreas, { focusAreas: convertFocusAreas(), onEditFocusAreas: () => { }, updateOpportunityFocusArea: updateOpportunityFocusArea, GetOpportunityInsightsDocument: GetOpportunityInsightsDocument, selectedOpportunityId: selectedOpportunityId,
|
|
294
|
+
react_1.default.createElement(FocusAreas_1.FocusAreas, { focusAreas: convertFocusAreas(), onEditFocusAreas: () => { }, updateOpportunityFocusArea: updateOpportunityFocusArea, GetOpportunityInsightsDocument: GetOpportunityInsightsDocument, selectedOpportunityId: selectedOpportunityId, onSaveMessage: onSaveMessage }),
|
|
208
295
|
react_1.default.createElement(ProjectHealth_1.ProjectHealth, { healthData: {
|
|
209
296
|
communicationFlow: {
|
|
210
297
|
status: mapHealthStatus((_e = (_d = opportunityInsights === null || opportunityInsights === void 0 ? void 0 : opportunityInsights.opportunityHealth) === null || _d === void 0 ? void 0 : _d.communicationFlow) === null || _e === void 0 ? void 0 : _e.status),
|
|
@@ -223,7 +310,7 @@ const ProjectIntelligence = ({ checkIfOpportunityInsightsExistData, opportunityI
|
|
|
223
310
|
description: ((_u = (_t = opportunityInsights === null || opportunityInsights === void 0 ? void 0 : opportunityInsights.opportunityHealth) === null || _t === void 0 ? void 0 : _t.riskManagement) === null || _u === void 0 ? void 0 : _u.description) || 'N/A'
|
|
224
311
|
}
|
|
225
312
|
}, className: "mt-8" }),
|
|
226
|
-
react_1.default.createElement(MissingInformation_1.MissingInformation, { items: getMissingInformationItems(), className: "mt-8", opportunityId: selectedOpportunityId, GetOpportunityInsightsDocument: GetOpportunityInsightsDocument, updateOpportunityMissingInformation: updateOpportunityMissingInformation, documentCenterController: documentCenterController, isInternal: isInternal, handleRouteToDocuments: handleRouteToDocuments,
|
|
313
|
+
react_1.default.createElement(MissingInformation_1.MissingInformation, { items: getMissingInformationItems(), className: "mt-8", opportunityId: selectedOpportunityId, GetOpportunityInsightsDocument: GetOpportunityInsightsDocument, updateOpportunityMissingInformation: updateOpportunityMissingInformation, documentCenterController: documentCenterController, isInternal: isInternal, handleRouteToDocuments: handleRouteToDocuments, onSaveMessage: onSaveMessage, isParoIntelligenceRolePresent: isParoIntelligenceRolePresent })),
|
|
227
314
|
react_1.default.createElement("div", { className: "w-1/3 space-y-4" },
|
|
228
315
|
react_1.default.createElement(TeamSection_1.TeamSection, { clientTeam: opportunityInsights === null || opportunityInsights === void 0 ? void 0 : opportunityInsights.clientTeam, expert: {
|
|
229
316
|
id: 'expert-1',
|
|
@@ -51,12 +51,12 @@ const Pagination = ({ total, currentPage = 1, setCurrentPage, perPageItems = 10,
|
|
|
51
51
|
};
|
|
52
52
|
const numberOfPages = Math.ceil(total / perPageItems);
|
|
53
53
|
return (react_1.default.createElement("div", { className: "bg-white px-4 py-3 border-t border-gray-200 sm:px-6 flex flex-col md:flex-row md:items-center md:justify-between" },
|
|
54
|
-
react_1.default.createElement("div", { className: "pb-2 md:pb-0" }, `Showing
|
|
55
|
-
${perPageItems * (currentPage - 1) + 1}
|
|
56
|
-
to
|
|
57
|
-
${Math.min(total, perPageItems * currentPage)}
|
|
58
|
-
of
|
|
59
|
-
${total}
|
|
54
|
+
react_1.default.createElement("div", { className: "pb-2 md:pb-0" }, `Showing
|
|
55
|
+
${perPageItems * (currentPage - 1) + 1}
|
|
56
|
+
to
|
|
57
|
+
${Math.min(total, perPageItems * currentPage)}
|
|
58
|
+
of
|
|
59
|
+
${total}
|
|
60
60
|
${displayText}`),
|
|
61
61
|
react_1.default.createElement("div", { className: "flex items-center justify-between" },
|
|
62
62
|
react_1.default.createElement("div", { className: "flex-1 flex justify-between sm:hidden" },
|
|
@@ -51,12 +51,12 @@ const isRatingExists = (rating) => {
|
|
|
51
51
|
return false;
|
|
52
52
|
};
|
|
53
53
|
exports.isRatingExists = isRatingExists;
|
|
54
|
-
const StyledButton = (0, styled_components_1.default)(core_2.Button) `
|
|
55
|
-
margin: 0px !important;
|
|
56
|
-
padding: 26px 0 18px 0 !important;
|
|
57
|
-
span {
|
|
58
|
-
color: #248384 !important
|
|
59
|
-
}
|
|
54
|
+
const StyledButton = (0, styled_components_1.default)(core_2.Button) `
|
|
55
|
+
margin: 0px !important;
|
|
56
|
+
padding: 26px 0 18px 0 !important;
|
|
57
|
+
span {
|
|
58
|
+
color: #248384 !important
|
|
59
|
+
}
|
|
60
60
|
`;
|
|
61
61
|
const RatingHeader = ({ ratings, project, index, highlightedRatings, requestStatus, handleRatingRequest, loadingSubmitId, handleAddToProfile, ratingReviewButtonlabel, setOpenClientReviewModal, setShowReviewModelWithRecentlyRatedProjects, enableReviewModal, disableReviewModal, isClientPortal, isInternal, createOrUpdateRating, getParoProjectsDocument, projectIdToShow, }) => {
|
|
62
62
|
var _a, _b, _c, _d;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
{
|
|
2
|
-
"folders": [
|
|
3
|
-
{
|
|
4
|
-
"path": "../../.."
|
|
5
|
-
},
|
|
6
|
-
{
|
|
7
|
-
"path": "../../../../internal-profile-app"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"path": "../../../../availability-gantt-chart"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"path": "../../../../client-portal"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"path": "../../../../expert-portal"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"settings": {}
|
|
20
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"folders": [
|
|
3
|
+
{
|
|
4
|
+
"path": "../../.."
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"path": "../../../../internal-profile-app"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"path": "../../../../availability-gantt-chart"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"path": "../../../../client-portal"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"path": "../../../../expert-portal"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"settings": {}
|
|
20
|
+
}
|
|
@@ -34,11 +34,11 @@ const react_hot_toast_1 = __importDefault(require("react-hot-toast"));
|
|
|
34
34
|
const ReviewRequestModal = ({ project, requestModal, setRequestModal, expertName, freelancerId, setRequestStatus, selectedProject, setSelectedProject, clientId, refetchParoProjects, setHighlightedRatings, createOrUpdateRatingRequestMutation, getParoProjectsDocument, }) => {
|
|
35
35
|
var _a;
|
|
36
36
|
const [showError, setShowError] = (0, react_1.useState)(false);
|
|
37
|
-
const [textareaValue, setTextareaValue] = (0, react_1.useState)(`Hi ${(_a = project === null || project === void 0 ? void 0 : project.client) === null || _a === void 0 ? void 0 : _a.name},
|
|
38
|
-
I hope you are satisfied with the work I provided on ${project === null || project === void 0 ? void 0 : project.name}. Your feedback is very important to me and helps me improve my services and build my reputation on Paro. Could you please take a moment to leave a review of you experience? Your input is greatly appreciated!
|
|
39
|
-
|
|
40
|
-
Thank you in advance for your time and feedback.
|
|
41
|
-
Best regards,
|
|
37
|
+
const [textareaValue, setTextareaValue] = (0, react_1.useState)(`Hi ${(_a = project === null || project === void 0 ? void 0 : project.client) === null || _a === void 0 ? void 0 : _a.name},
|
|
38
|
+
I hope you are satisfied with the work I provided on ${project === null || project === void 0 ? void 0 : project.name}. Your feedback is very important to me and helps me improve my services and build my reputation on Paro. Could you please take a moment to leave a review of you experience? Your input is greatly appreciated!
|
|
39
|
+
|
|
40
|
+
Thank you in advance for your time and feedback.
|
|
41
|
+
Best regards,
|
|
42
42
|
${expertName}`);
|
|
43
43
|
const handleTextArea = (e) => {
|
|
44
44
|
setTextareaValue(e.target.value);
|