@paro.io/expert-shared-components 1.10.2 → 1.10.3
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/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/ExpertProfileHeader/ActionButtonSection.js +6 -6
- package/lib/components/ExpertProfileHeader/ProfileSection.js +7 -7
- package/lib/components/OrganizationChart/OrganizationChart.d.ts +15 -15
- package/lib/components/OrganizationChart/OrganizationChart.js +312 -312
- package/lib/components/OrganizationChart/PersonCard.js +5 -5
- package/lib/components/OrganizationChart/utils.js +79 -79
- package/lib/components/ProjectCard/LogTimeModalAuthenticated.js +7 -5
- package/lib/components/ProjectCard/ProgressBar.js +4 -4
- package/lib/components/ProjectCard/ReviewRequestModal.js +5 -5
- 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 +61 -61
|
@@ -7,11 +7,11 @@ const react_1 = __importDefault(require("react"));
|
|
|
7
7
|
const PersonCard = ({ name, position, experience, location, initial, noOfchildren, }) => (react_1.default.createElement("div", { className: "relative group" },
|
|
8
8
|
react_1.default.createElement("div", { className: "flex flex-col items-center" },
|
|
9
9
|
react_1.default.createElement("div", { className: "flex flex-col items-center mb-2" },
|
|
10
|
-
react_1.default.createElement("div", { className: `
|
|
11
|
-
-mb-4 z-10 w-12 h-12 rounded-full bg-[#434889] flex items-center justify-center
|
|
12
|
-
text-white font-semibold text-lg
|
|
13
|
-
transition-all duration-200 hover:bg-[#102377]
|
|
14
|
-
${noOfchildren > 0 ? 'hover:shadow-lg' : ''}
|
|
10
|
+
react_1.default.createElement("div", { className: `
|
|
11
|
+
-mb-4 z-10 w-12 h-12 rounded-full bg-[#434889] flex items-center justify-center
|
|
12
|
+
text-white font-semibold text-lg
|
|
13
|
+
transition-all duration-200 hover:bg-[#102377]
|
|
14
|
+
${noOfchildren > 0 ? 'hover:shadow-lg' : ''}
|
|
15
15
|
` },
|
|
16
16
|
initial,
|
|
17
17
|
noOfchildren > 0 && (react_1.default.createElement("div", { className: "absolute -bottom-3 w-6 h-6 rounded bg-gray-400 flex items-center justify-center text-white text-sm" }, noOfchildren)))),
|
|
@@ -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': {
|
|
@@ -129,7 +129,7 @@ const SelectDate = ({ timeLogDate, setTimeLogDate, isInvalid, setIsDateInvalid,
|
|
|
129
129
|
};
|
|
130
130
|
exports.SelectDate = SelectDate;
|
|
131
131
|
const LogTimeModalAuthenticated = ({ project, freelancerId, showTimeModal, setShowTimeModal, isDateInvalid, setIsDateInvalid, validateDate, setSingleProjectData, projectData, isAuthenticated, selectedTab, submitProjectHoursMutation, GetAllProjectIrprDetailsForFreelancerDocument, getAuth0Roles, submitProjectHoursLambda, user, }) => {
|
|
132
|
-
var _a, _b, _c, _d;
|
|
132
|
+
var _a, _b, _c, _d, _e, _f;
|
|
133
133
|
const [timeLogDate, setTimeLogDate] = (0, react_1.useState)(new Date());
|
|
134
134
|
const [hours, setHours] = (0, react_1.useState)('');
|
|
135
135
|
const [minutes, setMinutes] = (0, react_1.useState)('');
|
|
@@ -150,6 +150,8 @@ const LogTimeModalAuthenticated = ({ project, freelancerId, showTimeModal, setSh
|
|
|
150
150
|
const isRecurringHourlyProject = ((_a = project === null || project === void 0 ? void 0 : project.projectScope) === null || _a === void 0 ? void 0 : _a.projectFrequencyId) === 1 || ((_b = project === null || project === void 0 ? void 0 : project.projectScope) === null || _b === void 0 ? void 0 : _b.projectFrequencyId) === 2;
|
|
151
151
|
const auth0Roles = user && getAuth0Roles && getAuth0Roles(user);
|
|
152
152
|
const disableHoursRounding = auth0Roles && auth0Roles.includes('expert_disable_rounding');
|
|
153
|
+
const disableRoundingClients = Array.isArray(user === null || user === void 0 ? void 0 : user.disableRoundingClients) ? user === null || user === void 0 ? void 0 : user.disableRoundingClients.map((e) => e.clientName) : [];
|
|
154
|
+
const disableHours = disableHoursRounding && disableRoundingClients.includes((_d = (_c = project === null || project === void 0 ? void 0 : project.client) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : '');
|
|
153
155
|
const validateHours = (value) => {
|
|
154
156
|
const empty = value == '';
|
|
155
157
|
const maxvalue = parseInt(value) > TASK_HOURS_VALIDATION.MAX_LENGTH;
|
|
@@ -255,7 +257,7 @@ const LogTimeModalAuthenticated = ({ project, freelancerId, showTimeModal, setSh
|
|
|
255
257
|
const taskDescriptionInvalid = validateTaskDescription(taskDescription);
|
|
256
258
|
if (isHoursInValid && minutesInvalid && taskDescriptionInvalid) {
|
|
257
259
|
const roundedTime = (0, exports.roundMinutes)(Number(minutes), Number(hours));
|
|
258
|
-
const totalHours =
|
|
260
|
+
const totalHours = disableHours ? parseFloat(addHoursAndMinutes(Number(hours), Number(minutes) || 0).toFixed(2)) : parseFloat((roundedTime.hours + roundedTime.minutes / 60).toFixed(2));
|
|
259
261
|
let progressBarHours = 0;
|
|
260
262
|
if (isRecurringHourlyProject) {
|
|
261
263
|
progressBarHours = ((0, dayjs_1.default)(timeLogDate).isAfter(firstDateOfMonth, 'day') && (0, dayjs_1.default)(timeLogDate).isBefore(lastDateOfMonth, 'day') || (0, dayjs_1.default)(timeLogDate).isSame(firstDateOfMonth, 'day') || (0, dayjs_1.default)(timeLogDate).isSame(lastDateOfMonth, 'day')) ? totalHours : 0;
|
|
@@ -324,8 +326,8 @@ const LogTimeModalAuthenticated = ({ project, freelancerId, showTimeModal, setSh
|
|
|
324
326
|
return (react_1.default.createElement(base_ui_1.Modal, { open: showTimeModal, onClose: () => onCloseModal(), size: "sm", className: "z-[100]" },
|
|
325
327
|
react_1.default.createElement("div", { className: "flex flex-col gap-y-2" },
|
|
326
328
|
react_1.default.createElement("h1", { className: "text-lg font-bold" },
|
|
327
|
-
"Add time for ", (
|
|
328
|
-
|
|
329
|
+
"Add time for ", (_e = project === null || project === void 0 ? void 0 : project.client) === null || _e === void 0 ? void 0 :
|
|
330
|
+
_e.name),
|
|
329
331
|
react_1.default.createElement("h1", { className: "text-md font-bold" },
|
|
330
332
|
"Project: ", project === null || project === void 0 ? void 0 :
|
|
331
333
|
project.name),
|
|
@@ -351,7 +353,7 @@ const LogTimeModalAuthenticated = ({ project, freelancerId, showTimeModal, setSh
|
|
|
351
353
|
react_1.default.createElement(base_ui_1.Button, { type: "button", onClick: () => onCloseModal(), label: "CANCEL", className: "mt-4" }),
|
|
352
354
|
react_1.default.createElement(base_ui_1.Button, { type: "button", onClick: () => { handleSubmit(); }, label: "SUBMIT", className: "mt-4 w-1/2 sm:w-1/4", color: "primary", isLoading: loading, disabled: isHoursInvalid || isMinutesInvalid || isHoursExceeded || isTaskdescriptionInvalid || !taskDescription.length || !timeLogDate || error })),
|
|
353
355
|
error && react_1.default.createElement("div", { className: "w-full" },
|
|
354
|
-
"You cannot log over the max hours of ", (
|
|
356
|
+
"You cannot log over the max hours of ", (_f = projectData === null || projectData === void 0 ? void 0 : projectData.maxHours) !== null && _f !== void 0 ? _f : 0,
|
|
355
357
|
" for this project. Please reach out to your Customer Success Manager if you have communication from the Client that you can submit over this amount."))));
|
|
356
358
|
};
|
|
357
359
|
exports.LogTimeModalAuthenticated = LogTimeModalAuthenticated;
|
|
@@ -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) => {
|
|
@@ -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);
|
|
@@ -31,20 +31,20 @@ const react_1 = __importStar(require("react"));
|
|
|
31
31
|
const core_1 = require("@material-ui/core");
|
|
32
32
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
33
33
|
const cdn_1 = require("./constants/cdn");
|
|
34
|
-
const ProfilePhotoPreview = styled_components_1.default.img `
|
|
35
|
-
height: 86px;
|
|
36
|
-
width: 86px;
|
|
37
|
-
border: 4px solid #F8FAFC;
|
|
38
|
-
border-radius: 10px;
|
|
39
|
-
object-fit: cover;
|
|
40
|
-
object-position: top;
|
|
34
|
+
const ProfilePhotoPreview = styled_components_1.default.img `
|
|
35
|
+
height: 86px;
|
|
36
|
+
width: 86px;
|
|
37
|
+
border: 4px solid #F8FAFC;
|
|
38
|
+
border-radius: 10px;
|
|
39
|
+
object-fit: cover;
|
|
40
|
+
object-position: top;
|
|
41
41
|
`;
|
|
42
|
-
const PhotoChangeButton = (0, styled_components_1.default)(core_1.Typography) `
|
|
43
|
-
text-decoration: underline;
|
|
44
|
-
cursor: pointer;
|
|
45
|
-
:active {
|
|
46
|
-
text-decoration: none !important;
|
|
47
|
-
}
|
|
42
|
+
const PhotoChangeButton = (0, styled_components_1.default)(core_1.Typography) `
|
|
43
|
+
text-decoration: underline;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
:active {
|
|
46
|
+
text-decoration: none !important;
|
|
47
|
+
}
|
|
48
48
|
`;
|
|
49
49
|
exports.defaultAvatar = cdn_1.CDN_URL + 'defaultAvatar.png';
|
|
50
50
|
const Image = ({ imageUrl, getUserDocument, uploadUserPhotoMutation, loadingNewImage, imageUpdateError, legacyFreelancerId, }) => {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { FieldError } from 'react-hook-form/dist/types/form';
|
|
2
|
-
type SectionContents = {
|
|
3
|
-
defaultValue?: string | number;
|
|
4
|
-
error?: boolean;
|
|
5
|
-
helperText: string | undefined | (FieldError | undefined)[];
|
|
6
|
-
inputRef?: ((instance: any) => void) | null | undefined;
|
|
7
|
-
label?: string;
|
|
8
|
-
multiline?: boolean;
|
|
9
|
-
name?: string;
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
props?: unknown;
|
|
12
|
-
size?: 'small' | 'medium' | undefined;
|
|
13
|
-
onChange?: ((value: any) => void) | undefined;
|
|
14
|
-
width?: boolean;
|
|
15
|
-
InputProps?: any;
|
|
16
|
-
};
|
|
17
|
-
declare const ProfileTextField: ({ defaultValue, error, helperText, inputRef, label, multiline, name, placeholder, props, size, width, onChange, InputProps }: SectionContents) => JSX.Element;
|
|
18
|
-
export default ProfileTextField;
|
|
1
|
+
import { FieldError } from 'react-hook-form/dist/types/form';
|
|
2
|
+
type SectionContents = {
|
|
3
|
+
defaultValue?: string | number;
|
|
4
|
+
error?: boolean;
|
|
5
|
+
helperText: string | undefined | (FieldError | undefined)[];
|
|
6
|
+
inputRef?: ((instance: any) => void) | null | undefined;
|
|
7
|
+
label?: string;
|
|
8
|
+
multiline?: boolean;
|
|
9
|
+
name?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
props?: unknown;
|
|
12
|
+
size?: 'small' | 'medium' | undefined;
|
|
13
|
+
onChange?: ((value: any) => void) | undefined;
|
|
14
|
+
width?: boolean;
|
|
15
|
+
InputProps?: any;
|
|
16
|
+
};
|
|
17
|
+
declare const ProfileTextField: ({ defaultValue, error, helperText, inputRef, label, multiline, name, placeholder, props, size, width, onChange, InputProps }: SectionContents) => JSX.Element;
|
|
18
|
+
export default ProfileTextField;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const TextField_1 = __importDefault(require("@material-ui/core/TextField"));
|
|
8
|
-
const ProfileTextField = ({ defaultValue, error, helperText, inputRef, label, multiline = false, name, placeholder, props, size, width = false, onChange, InputProps }) => {
|
|
9
|
-
return (onChange ? react_1.default.createElement(TextField_1.default, Object.assign({ InputProps: InputProps, "x-id": 'TextField' }, props, { defaultValue: defaultValue, error: error, fullWidth: true, helperText: helperText, InputLabelProps: {
|
|
10
|
-
shrink: true
|
|
11
|
-
}, inputRef: inputRef, label: label, margin: 'normal', multiline: multiline, name: name, placeholder: placeholder, size: size, style: Object.assign({ marginTop: '8px' }, (width && { width: '100%' })), variant: 'outlined', onChange: onChange, classes: { root: 'inputCurrency' } })) :
|
|
12
|
-
react_1.default.createElement(TextField_1.default, Object.assign({ InputProps: InputProps, "x-id": 'TextField' }, props, { defaultValue: defaultValue, error: error, fullWidth: true, helperText: helperText, InputLabelProps: {
|
|
13
|
-
shrink: true
|
|
14
|
-
}, inputRef: inputRef, label: label, margin: 'normal', multiline: multiline, name: name, placeholder: placeholder, size: size, style: Object.assign({ marginTop: '8px' }, (width && { width: '100%' })), variant: 'outlined' })));
|
|
15
|
-
};
|
|
16
|
-
exports.default = ProfileTextField;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const TextField_1 = __importDefault(require("@material-ui/core/TextField"));
|
|
8
|
+
const ProfileTextField = ({ defaultValue, error, helperText, inputRef, label, multiline = false, name, placeholder, props, size, width = false, onChange, InputProps }) => {
|
|
9
|
+
return (onChange ? react_1.default.createElement(TextField_1.default, Object.assign({ InputProps: InputProps, "x-id": 'TextField' }, props, { defaultValue: defaultValue, error: error, fullWidth: true, helperText: helperText, InputLabelProps: {
|
|
10
|
+
shrink: true
|
|
11
|
+
}, inputRef: inputRef, label: label, margin: 'normal', multiline: multiline, name: name, placeholder: placeholder, size: size, style: Object.assign({ marginTop: '8px' }, (width && { width: '100%' })), variant: 'outlined', onChange: onChange, classes: { root: 'inputCurrency' } })) :
|
|
12
|
+
react_1.default.createElement(TextField_1.default, Object.assign({ InputProps: InputProps, "x-id": 'TextField' }, props, { defaultValue: defaultValue, error: error, fullWidth: true, helperText: helperText, InputLabelProps: {
|
|
13
|
+
shrink: true
|
|
14
|
+
}, inputRef: inputRef, label: label, margin: 'normal', multiline: multiline, name: name, placeholder: placeholder, size: size, style: Object.assign({ marginTop: '8px' }, (width && { width: '100%' })), variant: 'outlined' })));
|
|
15
|
+
};
|
|
16
|
+
exports.default = ProfileTextField;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare const StyledActionButtons: ({ closeOnClick, isDisabled, isLoading, handleSubmit }: {
|
|
2
|
-
closeOnClick: () => void;
|
|
3
|
-
isDisabled: boolean;
|
|
4
|
-
isLoading: boolean;
|
|
5
|
-
handleSubmit?: () => void;
|
|
6
|
-
}) => JSX.Element;
|
|
7
|
-
export default StyledActionButtons;
|
|
1
|
+
declare const StyledActionButtons: ({ closeOnClick, isDisabled, isLoading, handleSubmit }: {
|
|
2
|
+
closeOnClick: () => void;
|
|
3
|
+
isDisabled: boolean;
|
|
4
|
+
isLoading: boolean;
|
|
5
|
+
handleSubmit?: () => void;
|
|
6
|
+
}) => JSX.Element;
|
|
7
|
+
export default StyledActionButtons;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const core_1 = require("@material-ui/core");
|
|
8
|
-
const Button_1 = __importDefault(require("@material-ui/core/Button"));
|
|
9
|
-
const Loader_1 = __importDefault(require("./Loader"));
|
|
10
|
-
const StyledActionButtons = ({ closeOnClick, isDisabled, isLoading, handleSubmit }) => {
|
|
11
|
-
return (react_1.default.createElement(core_1.DialogActions, null,
|
|
12
|
-
react_1.default.createElement(Button_1.default, { variant: 'outlined', onClick: closeOnClick, color: 'primary' }, "Close"),
|
|
13
|
-
react_1.default.createElement(Button_1.default, { color: 'default', disabled: isDisabled, key: String(isDisabled), onClick: handleSubmit, variant: 'contained' }, isLoading ? react_1.default.createElement(Loader_1.default, { key: String(isLoading) }) : 'Save')));
|
|
14
|
-
};
|
|
15
|
-
exports.default = StyledActionButtons;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const core_1 = require("@material-ui/core");
|
|
8
|
+
const Button_1 = __importDefault(require("@material-ui/core/Button"));
|
|
9
|
+
const Loader_1 = __importDefault(require("./Loader"));
|
|
10
|
+
const StyledActionButtons = ({ closeOnClick, isDisabled, isLoading, handleSubmit }) => {
|
|
11
|
+
return (react_1.default.createElement(core_1.DialogActions, null,
|
|
12
|
+
react_1.default.createElement(Button_1.default, { variant: 'outlined', onClick: closeOnClick, color: 'primary' }, "Close"),
|
|
13
|
+
react_1.default.createElement(Button_1.default, { color: 'default', disabled: isDisabled, key: String(isDisabled), onClick: handleSubmit, variant: 'contained' }, isLoading ? react_1.default.createElement(Loader_1.default, { key: String(isLoading) }) : 'Save')));
|
|
14
|
+
};
|
|
15
|
+
exports.default = StyledActionButtons;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface ToastModalProps {
|
|
3
|
-
color: 'success' | 'info' | 'warning' | 'danger';
|
|
4
|
-
icon: string;
|
|
5
|
-
message: string;
|
|
6
|
-
duration?: number;
|
|
7
|
-
position?: 'top-right' | 'bottom-right' | 'top-left' | 'bottom-left';
|
|
8
|
-
}
|
|
9
|
-
declare const ToastModal: React.FC<ToastModalProps>;
|
|
10
|
-
export default ToastModal;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ToastModalProps {
|
|
3
|
+
color: 'success' | 'info' | 'warning' | 'danger';
|
|
4
|
+
icon: string;
|
|
5
|
+
message: string;
|
|
6
|
+
duration?: number;
|
|
7
|
+
position?: 'top-right' | 'bottom-right' | 'top-left' | 'bottom-left';
|
|
8
|
+
}
|
|
9
|
+
declare const ToastModal: React.FC<ToastModalProps>;
|
|
10
|
+
export default ToastModal;
|