@paro.io/expert-shared-components 1.9.11 → 1.9.12
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.
|
@@ -104,7 +104,7 @@ const getDays = (oldValue, newValue) => {
|
|
|
104
104
|
return newDate.diff(oldDate, 'day');
|
|
105
105
|
};
|
|
106
106
|
const ActiveProjectCard = ({ project, projectsData, expertName, freelancerId, freelancerEmail, isAuthenticated, activeProject, adhocProject, upcomingProject, selectedTab, projectTagsMap, updateProjectStatusMutation, GetAllProjectIrprDetailsForFreelancerDocument, updateParoProjectTagsMutation, GetParoProjectsDocument, updateProjectTagReviewStatusMutation, updateProjectStatus, updateProjectTags, getSowLazyQuery, sendParoSupportEmail, createChangeRequestMutation, createChangeRequest, createOrUpdateRatingRequestMutation, updateProjectTaskMutation, updateProjectTask, submitProjectHoursMutation, getAuth0Roles, submitProjectHoursLambda, createOrUpdateRating, getParoProjectsByClientIdDocument, user, internalPortal = false, csmUserGroup = false, clientPortal = false, signedSow = false, isStageProd, isRequestReviewEnabled = false, changeRequests, GetAllChangeRequestsForFreelancerDocument, updateProjectRequestStatus, updateDBProjectRequestStatus, }) => {
|
|
107
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
107
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
108
108
|
const [editEndDate, setEditEndDate] = (0, react_1.useState)(false);
|
|
109
109
|
const [editStartDate, setEditStartDate] = (0, react_1.useState)(false);
|
|
110
110
|
const [showTimeModal, setShowTimeModal] = (0, react_1.useState)(false);
|
|
@@ -124,15 +124,14 @@ const ActiveProjectCard = ({ project, projectsData, expertName, freelancerId, fr
|
|
|
124
124
|
const sortRatingsAndRequests = (data) => {
|
|
125
125
|
return [...data].sort((a, b) => (0, dayjs_1.default)(b === null || b === void 0 ? void 0 : b.createdAt).diff((0, dayjs_1.default)(a === null || a === void 0 ? void 0 : a.createdAt), 'days'));
|
|
126
126
|
};
|
|
127
|
-
if ((project === null || project === void 0 ? void 0 : project.rating.length) > 1) {
|
|
127
|
+
if ((project === null || project === void 0 ? void 0 : project.rating) && (project === null || project === void 0 ? void 0 : project.rating.length) > 1) {
|
|
128
128
|
project.rating = sortRatingsAndRequests(project.rating);
|
|
129
129
|
}
|
|
130
|
-
if ((project === null || project === void 0 ? void 0 : project.ratingRequest.length) > 1) {
|
|
130
|
+
if ((project === null || project === void 0 ? void 0 : project.ratingRequest) && (project === null || project === void 0 ? void 0 : project.ratingRequest.length) > 1) {
|
|
131
131
|
project.ratingRequest = sortRatingsAndRequests(project.ratingRequest);
|
|
132
132
|
}
|
|
133
133
|
const showRating = ratingValue && (0, dayjs_1.default)((0, dayjs_1.default)().tz('America/Los_Angeles').format('YYYY-MM-DD HH:mm:ss')).diff((0, dayjs_1.default)((_g = (_f = project === null || project === void 0 ? void 0 : project.rating) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.createdAt.replace('Z', '')).format('YYYY-MM-DD HH:mm:ss'), 'hours') > 48;
|
|
134
|
-
const
|
|
135
|
-
const displayName = clientPortal ? freelancerName : (_s = project === null || project === void 0 ? void 0 : project.client) === null || _s === void 0 ? void 0 : _s.name;
|
|
134
|
+
const displayName = clientPortal ? expertName : (_h = project === null || project === void 0 ? void 0 : project.client) === null || _h === void 0 ? void 0 : _h.name;
|
|
136
135
|
return (react_1.default.createElement("div", { className: "w-full mb-8" },
|
|
137
136
|
internalPortal && changeRequests && changeRequests.length > 0 && (react_1.default.createElement("div", null, changeRequests
|
|
138
137
|
.filter((cr) => cr.entityId === project.id)
|
|
@@ -160,7 +159,7 @@ const ActiveProjectCard = ({ project, projectsData, expertName, freelancerId, fr
|
|
|
160
159
|
react_1.default.createElement("div", { className: "flex flex-col-reverse justify-between w-full mt-3 md:flex-row gap-y-4" },
|
|
161
160
|
react_1.default.createElement("div", { className: "flex flex-col" },
|
|
162
161
|
react_1.default.createElement("h1", null, displayName),
|
|
163
|
-
react_1.default.createElement("p", { className: "font-bold text-md mt-1" }, `${(
|
|
162
|
+
react_1.default.createElement("p", { className: "font-bold text-md mt-1" }, `${(_j = project === null || project === void 0 ? void 0 : project.name) !== null && _j !== void 0 ? _j : "Project"} ${(singleProjectData === null || singleProjectData === void 0 ? void 0 : singleProjectData.minFloorHours) ? "WITH" : "WITHOUT"} a min floor.`)),
|
|
164
163
|
react_1.default.createElement("div", { className: "flex flex-row gap-x-2 items-center ml-auto" },
|
|
165
164
|
showRating && react_1.default.createElement("div", { className: "flex flex-auto items-center justify-between" },
|
|
166
165
|
react_1.default.createElement(lab_1.Rating, { name: "read-only", value: Number(ratingValue), precision: 0.5, size: "large", readOnly: true, emptyIcon: react_1.default.createElement(Star_1.default, { fontSize: "inherit" }) })),
|