@paro.io/expert-shared-components 1.8.7 → 1.8.9
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/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/ExpertProfileHeader/ActionButtonSection.js +6 -6
- package/lib/components/ExpertProfileHeader/ExpertProfileHeader.js +1 -1
- package/lib/components/ExpertProfileHeader/ProfileSection.d.ts +1 -3
- package/lib/components/ExpertProfileHeader/ProfileSection.js +22 -32
- package/lib/components/OrganizationChart/OrganizationChart.js +7 -7
- 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/ServiceLinesTemplate/index.js +66 -20
- package/lib/components/shared/Error.d.ts +6 -6
- package/lib/components/shared/Error.js +40 -40
- 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/lib/components/shared/utils.js +12 -5
- package/package.json +59 -59
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
interface UploadFilesButtonProps {
|
|
2
|
-
onFileSelect: (file: File) => void;
|
|
3
|
-
isLoading?: boolean;
|
|
4
|
-
}
|
|
5
|
-
export declare const UploadFilesButton: ({ onFileSelect, isLoading, }: UploadFilesButtonProps) => JSX.Element;
|
|
6
|
-
export {};
|
|
1
|
+
interface UploadFilesButtonProps {
|
|
2
|
+
onFileSelect: (file: File) => void;
|
|
3
|
+
isLoading?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const UploadFilesButton: ({ onFileSelect, isLoading, }: UploadFilesButtonProps) => JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1,29 +1,29 @@
|
|
|
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
|
-
exports.UploadFilesButton = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const base_ui_1 = require("@paro.io/base-ui");
|
|
9
|
-
const react_2 = require("react");
|
|
10
|
-
const UploadFilesButton = ({ onFileSelect, isLoading, }) => {
|
|
11
|
-
const fileInputRef = (0, react_2.useRef)(null);
|
|
12
|
-
const handleClick = () => {
|
|
13
|
-
var _a;
|
|
14
|
-
(_a = fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
15
|
-
};
|
|
16
|
-
const handleFileChange = (event) => {
|
|
17
|
-
var _a;
|
|
18
|
-
const file = (_a = event.target.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
19
|
-
if (file) {
|
|
20
|
-
onFileSelect(file);
|
|
21
|
-
}
|
|
22
|
-
// Reset input value to allow uploading the same file again
|
|
23
|
-
event.target.value = '';
|
|
24
|
-
};
|
|
25
|
-
return (react_1.default.createElement("div", null,
|
|
26
|
-
react_1.default.createElement("input", { type: "file", ref: fileInputRef, onChange: handleFileChange, className: "hidden", accept: ".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx" }),
|
|
27
|
-
react_1.default.createElement(base_ui_1.Button, { onClick: handleClick, disabled: isLoading })));
|
|
28
|
-
};
|
|
29
|
-
exports.UploadFilesButton = UploadFilesButton;
|
|
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
|
+
exports.UploadFilesButton = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const base_ui_1 = require("@paro.io/base-ui");
|
|
9
|
+
const react_2 = require("react");
|
|
10
|
+
const UploadFilesButton = ({ onFileSelect, isLoading, }) => {
|
|
11
|
+
const fileInputRef = (0, react_2.useRef)(null);
|
|
12
|
+
const handleClick = () => {
|
|
13
|
+
var _a;
|
|
14
|
+
(_a = fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
15
|
+
};
|
|
16
|
+
const handleFileChange = (event) => {
|
|
17
|
+
var _a;
|
|
18
|
+
const file = (_a = event.target.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
19
|
+
if (file) {
|
|
20
|
+
onFileSelect(file);
|
|
21
|
+
}
|
|
22
|
+
// Reset input value to allow uploading the same file again
|
|
23
|
+
event.target.value = '';
|
|
24
|
+
};
|
|
25
|
+
return (react_1.default.createElement("div", null,
|
|
26
|
+
react_1.default.createElement("input", { type: "file", ref: fileInputRef, onChange: handleFileChange, className: "hidden", accept: ".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx" }),
|
|
27
|
+
react_1.default.createElement(base_ui_1.Button, { onClick: handleClick, disabled: isLoading })));
|
|
28
|
+
};
|
|
29
|
+
exports.UploadFilesButton = UploadFilesButton;
|
|
@@ -11,12 +11,12 @@ const CopyToClipboardAlert_1 = __importDefault(require("../shared/CopyToClipboar
|
|
|
11
11
|
const colors_1 = __importDefault(require("../ClientReferencesSection/constants/colors"));
|
|
12
12
|
const Banner_1 = __importDefault(require("./Banner"));
|
|
13
13
|
const base_icons_1 = require("@paro.io/base-icons");
|
|
14
|
-
const StyledButton = (0, styled_components_1.default)(core_1.Button) `
|
|
15
|
-
margin: 0px !important;
|
|
16
|
-
padding: 26px 0 18px 0 !important;
|
|
17
|
-
span {
|
|
18
|
-
color: ${colors_1.default.buttonText} !important
|
|
19
|
-
}
|
|
14
|
+
const StyledButton = (0, styled_components_1.default)(core_1.Button) `
|
|
15
|
+
margin: 0px !important;
|
|
16
|
+
padding: 26px 0 18px 0 !important;
|
|
17
|
+
span {
|
|
18
|
+
color: ${colors_1.default.buttonText} !important
|
|
19
|
+
}
|
|
20
20
|
`;
|
|
21
21
|
const ActionButton = ({ title, ariaLabel, onClick, icon: Icon }) => (react_1.default.createElement(core_1.Tooltip, { arrow: true, placement: "top", interactive: true, className: "whitespace-nowrap", title: title },
|
|
22
22
|
react_1.default.createElement(core_1.IconButton, { "aria-label": ariaLabel, onClick: onClick },
|
|
@@ -216,7 +216,7 @@ const ExpertProfileHeader = ({ expertId, legacyFreelancerId, address: addressFor
|
|
|
216
216
|
react_1.default.createElement(core_1.Divider, null),
|
|
217
217
|
react_1.default.createElement(core_1.Grid, { container: true, spacing: 2, style: { display: 'flex', flexWrap: isSmallScreen ? 'wrap' : 'nowrap' } },
|
|
218
218
|
react_1.default.createElement(core_1.Grid, { item: true, container: true, direction: 'column', justify: 'space-between', xs: 12, md: true, style: { flex: '1', width: 'auto' } },
|
|
219
|
-
react_1.default.createElement(ProfileSection_1.default, { legacyFreelancerId: Number(legacyFreelancerId), imageUrl: imageUrl, shouldAllowEditProfile: isExpertOps !== null && isExpertOps !== void 0 ? isExpertOps : false, firstName: firstName, lastName: lastName, primaryServiceLine: primaryServiceLine, editServiceLine: editServiceLine, city: city, stateAbbreviation: stateAbbreviation, email: email, phone: phone, setOpen: setOpen,
|
|
219
|
+
react_1.default.createElement(ProfileSection_1.default, { legacyFreelancerId: Number(legacyFreelancerId), imageUrl: imageUrl, shouldAllowEditProfile: isExpertOps !== null && isExpertOps !== void 0 ? isExpertOps : false, firstName: firstName, lastName: lastName, primaryServiceLine: primaryServiceLine, editServiceLine: editServiceLine, city: city, stateAbbreviation: stateAbbreviation, email: email, phone: phone, setOpen: setOpen, paroProjectsData: paroProjectsData, getUserDocument: getUserDocument, uploadUserPhotoMutation: uploadUserPhotoMutation, loadingNewImage: loadingNewImage, imageUpdateError: imageUpdateError, isInternal: isInternal, getUserByEmail: getUserByEmail, updateUserEmail: updateUserEmail, updateUserMutation: updateUserMutation, getUserByEmailLazyQuery: getUserByEmailLazyQuery, updateUserPassword: updateUserPassword, verifyUserPassword: verifyUserPassword, getExpertRates: getExpertRates }),
|
|
220
220
|
react_1.default.createElement(core_1.Divider, { orientation: isSmallScreen ? 'horizontal' : 'vertical', style: { marginLeft: '0px !important' } })),
|
|
221
221
|
react_1.default.createElement(core_1.Grid, { item: true, container: true, direction: 'column', justify: 'space-between', xs: 12, md: true, style: { flex: '1', width: 'auto' } },
|
|
222
222
|
react_1.default.createElement(NetworkSection_1.default, { handleScrollToBottom: isInternal && handleScrollToBottom ? handleScrollToBottom : () => { }, preferenceTasks: preferenceTasks, isWhiteLabel: isWhiteLabel, detailsSectionCompleted: detailsSectionCompleted, infoColor: infoColor, leftSideStatus: leftSideStatus, rightSideStatus: rightSideStatus, isInternal: isInternal, paroTenure: paroTenure, getExpertVanityTitles: getExpertVanityTitles, updateExpert: updateExpert, expertId: expertId, legacyFreelancerId: Number(legacyFreelancerId), vanityTitle: vanityTitle, getExpertByLegacyFreelancerIdDocument: getExpertByLegacyFreelancerIdDocument }),
|
|
@@ -13,8 +13,6 @@ interface ProfileSectionProps {
|
|
|
13
13
|
stateAbbreviation: string;
|
|
14
14
|
email: string;
|
|
15
15
|
phone: any;
|
|
16
|
-
paroTenure: string;
|
|
17
|
-
hourlyRate: number;
|
|
18
16
|
setOpen: (open: boolean) => void;
|
|
19
17
|
paroProjectsData: any;
|
|
20
18
|
getUserDocument?: any;
|
|
@@ -30,5 +28,5 @@ interface ProfileSectionProps {
|
|
|
30
28
|
verifyUserPassword?: any;
|
|
31
29
|
getExpertRates?: any;
|
|
32
30
|
}
|
|
33
|
-
declare const ProfileSection: ({ legacyFreelancerId, imageUrl, shouldAllowEditProfile, firstName, lastName, primaryServiceLine, editServiceLine, city, stateAbbreviation, email, phone, setOpen, paroProjectsData, getUserDocument, uploadUserPhotoMutation, loadingNewImage, imageUpdateError, isInternal, getUserByEmail, updateUserEmail, updateUserMutation, getUserByEmailLazyQuery, updateUserPassword, verifyUserPassword, getExpertRates,
|
|
31
|
+
declare const ProfileSection: ({ legacyFreelancerId, imageUrl, shouldAllowEditProfile, firstName, lastName, primaryServiceLine, editServiceLine, city, stateAbbreviation, email, phone, setOpen, paroProjectsData, getUserDocument, uploadUserPhotoMutation, loadingNewImage, imageUpdateError, isInternal, getUserByEmail, updateUserEmail, updateUserMutation, getUserByEmailLazyQuery, updateUserPassword, verifyUserPassword, getExpertRates, }: ProfileSectionProps) => JSX.Element;
|
|
34
32
|
export default ProfileSection;
|
|
@@ -53,15 +53,15 @@ const formatPhoneNumber = (phone) => {
|
|
|
53
53
|
return `(${numericPhone.slice(0, 3)}) ${numericPhone.slice(3, 6)} - ${numericPhone.slice(6)}`;
|
|
54
54
|
};
|
|
55
55
|
exports.formatPhoneNumber = formatPhoneNumber;
|
|
56
|
-
exports.ProfilePhotoPreview = styled_components_1.default.img `
|
|
57
|
-
height: 86px;
|
|
58
|
-
width: 86px;
|
|
59
|
-
border: 1px solid ${colors_1.default.lightGray};
|
|
60
|
-
border-radius: 50%;
|
|
61
|
-
object-fit: cover;
|
|
62
|
-
object-position: top;
|
|
56
|
+
exports.ProfilePhotoPreview = styled_components_1.default.img `
|
|
57
|
+
height: 86px;
|
|
58
|
+
width: 86px;
|
|
59
|
+
border: 1px solid ${colors_1.default.lightGray};
|
|
60
|
+
border-radius: 50%;
|
|
61
|
+
object-fit: cover;
|
|
62
|
+
object-position: top;
|
|
63
63
|
`;
|
|
64
|
-
const ProfileSection = ({ legacyFreelancerId, imageUrl, shouldAllowEditProfile, firstName, lastName, primaryServiceLine, editServiceLine, city, stateAbbreviation, email, phone, setOpen, paroProjectsData, getUserDocument, uploadUserPhotoMutation, loadingNewImage, imageUpdateError, isInternal, getUserByEmail, updateUserEmail, updateUserMutation, getUserByEmailLazyQuery, updateUserPassword, verifyUserPassword, getExpertRates,
|
|
64
|
+
const ProfileSection = ({ legacyFreelancerId, imageUrl, shouldAllowEditProfile, firstName, lastName, primaryServiceLine, editServiceLine, city, stateAbbreviation, email, phone, setOpen, paroProjectsData, getUserDocument, uploadUserPhotoMutation, loadingNewImage, imageUpdateError, isInternal, getUserByEmail, updateUserEmail, updateUserMutation, getUserByEmailLazyQuery, updateUserPassword, verifyUserPassword, getExpertRates, }) => {
|
|
65
65
|
var _a;
|
|
66
66
|
const [openReviews, setOpenReviews] = (0, react_1.useState)(false);
|
|
67
67
|
const [resetPasswordOpen, setResetPasswordOpen] = (0, react_1.useState)(false);
|
|
@@ -121,30 +121,20 @@ const ProfileSection = ({ legacyFreelancerId, imageUrl, shouldAllowEditProfile,
|
|
|
121
121
|
" Reviews")))),
|
|
122
122
|
react_1.default.createElement(core_1.Box, { mt: 1, mb: 1 },
|
|
123
123
|
react_1.default.createElement(core_1.Divider, null))),
|
|
124
|
-
react_1.default.createElement(core_1.
|
|
125
|
-
react_1.default.createElement(
|
|
126
|
-
react_1.default.createElement("b", null,
|
|
127
|
-
react_1.default.createElement(core_1.Box, {
|
|
128
|
-
react_1.default.createElement(core_1.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
react_1.default.createElement(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
react_1.default.createElement(core_1.Divider, null)), rates === null || rates === void 0 ? void 0 :
|
|
139
|
-
rates.map((data) => (react_1.default.createElement(core_1.Box, { mt: 1, mr: 2, display: "flex", justifyContent: "space-between", alignItems: "center", key: data.serviceLine },
|
|
140
|
-
react_1.default.createElement("p", { className: `${primaryServiceLine === data.serviceLine && "text-[#248384]"}` },
|
|
141
|
-
data.serviceLine,
|
|
142
|
-
primaryServiceLine === data.serviceLine && react_1.default.createElement(react_1.default.Fragment, null,
|
|
143
|
-
react_1.default.createElement("br", null),
|
|
144
|
-
" (Primary SL)")),
|
|
145
|
-
react_1.default.createElement("b", null,
|
|
146
|
-
"$",
|
|
147
|
-
data.rate)))))),
|
|
124
|
+
react_1.default.createElement(core_1.Grid, { item: true, container: true, direction: 'row', justifyContent: 'space-evenly' },
|
|
125
|
+
react_1.default.createElement("b", null, "SL's Offered:"),
|
|
126
|
+
react_1.default.createElement("b", null, "Hourly Exp. Rate:")),
|
|
127
|
+
react_1.default.createElement(core_1.Box, { mt: 1, mb: 1 },
|
|
128
|
+
react_1.default.createElement(core_1.Divider, null)),
|
|
129
|
+
(rates === null || rates === void 0 ? void 0 : rates.length) > 0 && (rates === null || rates === void 0 ? void 0 : rates.map((data) => (react_1.default.createElement(core_1.Box, { mt: 1, mr: 2, display: "flex", justifyContent: "space-between", alignItems: "center", key: data.serviceLine },
|
|
130
|
+
react_1.default.createElement("p", { className: `${primaryServiceLine === data.serviceLine && "text-[#248384]"}` },
|
|
131
|
+
data.serviceLine,
|
|
132
|
+
primaryServiceLine === data.serviceLine && react_1.default.createElement(react_1.default.Fragment, null,
|
|
133
|
+
react_1.default.createElement("br", null),
|
|
134
|
+
" (Primary SL)")),
|
|
135
|
+
react_1.default.createElement("b", null,
|
|
136
|
+
"$",
|
|
137
|
+
data.rate))))),
|
|
148
138
|
react_1.default.createElement(core_1.Box, { mt: 1, mb: 1 },
|
|
149
139
|
react_1.default.createElement(core_1.Divider, null)),
|
|
150
140
|
email && react_1.default.createElement(core_1.Box, { display: "flex", justifyContent: "center", alignItems: "center", "data-testid": "Matching-Id", style: { marginRight: '10px' } },
|
|
@@ -34,13 +34,13 @@ const Close_1 = __importDefault(require("@material-ui/icons/Close"));
|
|
|
34
34
|
const cdn_1 = require("../shared/constants/cdn");
|
|
35
35
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
36
36
|
const defaultAvatar = cdn_1.CDN_URL + 'defaultAvatar.png';
|
|
37
|
-
const ProfilePhotoPreview = styled_components_1.default.img `
|
|
38
|
-
height: 86px;
|
|
39
|
-
width: 86px;
|
|
40
|
-
border: 1px solid #e4e5e4;
|
|
41
|
-
border-radius: 50%;
|
|
42
|
-
object-fit: cover;
|
|
43
|
-
object-position: top;
|
|
37
|
+
const ProfilePhotoPreview = styled_components_1.default.img `
|
|
38
|
+
height: 86px;
|
|
39
|
+
width: 86px;
|
|
40
|
+
border: 1px solid #e4e5e4;
|
|
41
|
+
border-radius: 50%;
|
|
42
|
+
object-fit: cover;
|
|
43
|
+
object-position: top;
|
|
44
44
|
`;
|
|
45
45
|
const CustomDialog = (0, core_1.styled)(Dialog_1.default)(({ theme }) => ({
|
|
46
46
|
'& .MuiDialog-paper': {
|
|
@@ -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);
|
|
@@ -43,9 +43,10 @@ const react_hot_toast_1 = require("react-hot-toast");
|
|
|
43
43
|
const CustomTextField = (0, core_1.withStyles)({
|
|
44
44
|
root: {
|
|
45
45
|
'& .MuiOutlinedInput-input': {
|
|
46
|
-
width: '
|
|
47
|
-
padding: '
|
|
46
|
+
width: '20px',
|
|
47
|
+
padding: '6px !important',
|
|
48
48
|
fontFamily: 'Roboto',
|
|
49
|
+
fontSize: '14px',
|
|
49
50
|
},
|
|
50
51
|
},
|
|
51
52
|
})(core_1.TextField);
|
|
@@ -116,11 +117,12 @@ const ServiceLinesTemplate = ({ getFreelancerDataResult, createOrUpdateRates, ge
|
|
|
116
117
|
setLoading(false);
|
|
117
118
|
}
|
|
118
119
|
}, [openServiceLinesTemplate]);
|
|
119
|
-
const handlePriceChange = (serviceTitle, newPrice, currentService) => {
|
|
120
|
+
const handlePriceChange = (serviceTitle, newPrice, currentService, selected) => {
|
|
120
121
|
dispatch({
|
|
121
122
|
serviceTitle,
|
|
122
123
|
newPrice,
|
|
123
124
|
currentService,
|
|
125
|
+
selected,
|
|
124
126
|
type: 'price-change'
|
|
125
127
|
});
|
|
126
128
|
};
|
|
@@ -170,10 +172,11 @@ const ServiceLinesTemplate = ({ getFreelancerDataResult, createOrUpdateRates, ge
|
|
|
170
172
|
});
|
|
171
173
|
});
|
|
172
174
|
const handleUpdateProfile = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
175
|
+
var _a;
|
|
173
176
|
try {
|
|
174
177
|
setUpdateClicked(true);
|
|
175
178
|
const ratesInput = {
|
|
176
|
-
rates: selectedServices.map((service) => ({
|
|
179
|
+
rates: (_a = selectedServices.filter((service) => { return service.selected; })) === null || _a === void 0 ? void 0 : _a.map((service) => ({
|
|
177
180
|
serviceLine: service.service,
|
|
178
181
|
rate: Number(service.rate),
|
|
179
182
|
})),
|
|
@@ -232,7 +235,7 @@ const ServiceLinesTemplate = ({ getFreelancerDataResult, createOrUpdateRates, ge
|
|
|
232
235
|
const isUpdateButtonDisabled = () => {
|
|
233
236
|
if ((selectedServices === null || selectedServices === void 0 ? void 0 : selectedServices.length) === 0)
|
|
234
237
|
return true;
|
|
235
|
-
return selectedServices.some((service) => !service.service || service.rate === 0);
|
|
238
|
+
return selectedServices.some((service) => !service.service || service.rate === 0 || service.selected === false);
|
|
236
239
|
};
|
|
237
240
|
const CustomCheckbox = (0, core_1.withStyles)({
|
|
238
241
|
root: {
|
|
@@ -246,22 +249,30 @@ const ServiceLinesTemplate = ({ getFreelancerDataResult, createOrUpdateRates, ge
|
|
|
246
249
|
},
|
|
247
250
|
checked: {},
|
|
248
251
|
})((props) => react_1.default.createElement(core_1.Checkbox, Object.assign({ color: "default" }, props)));
|
|
249
|
-
const handleServiceToggle = (service) => {
|
|
252
|
+
const handleServiceToggle = (service, selected, rate = 0) => {
|
|
250
253
|
dispatch({
|
|
251
254
|
service,
|
|
255
|
+
selected,
|
|
256
|
+
rate,
|
|
252
257
|
type: 'update'
|
|
253
258
|
});
|
|
254
259
|
};
|
|
260
|
+
const handleRemoveService = (service) => {
|
|
261
|
+
dispatch({
|
|
262
|
+
service,
|
|
263
|
+
type: 'remove'
|
|
264
|
+
});
|
|
265
|
+
};
|
|
255
266
|
const handleChangeTitle = (event) => {
|
|
256
267
|
setSelectedTitle(event.target.value);
|
|
257
268
|
};
|
|
258
269
|
const ActionButtons = (disabled) => {
|
|
259
270
|
return react_1.default.createElement(core_1.Grid, { container: true, direction: "row", justifyContent: "space-evenly", style: { margin: 'auto' }, spacing: 2 },
|
|
260
|
-
react_1.default.createElement(base_ui_1.Button, { label: "PREVIEW PUBLIC PROFILE", onClick: () => window.open(`${reactAppUrl}/public/${legacyFreelancerId}`, '_blank'), type: "button", disabled: disabled, isLoading: updateClicked }),
|
|
261
|
-
react_1.default.createElement(base_ui_1.Button, { label: "UPDATE PROFILE", onClick: handleUpdateExpertTitle, type: "button", isLoading: updateClicked, disabled: isUpdateButtonDisabled(), color: "primary" }));
|
|
271
|
+
react_1.default.createElement(base_ui_1.Button, { label: "PREVIEW PUBLIC PROFILE", onClick: () => window.open(`${reactAppUrl}/public/${legacyFreelancerId}`, '_blank'), type: "button", disabled: disabled, isLoading: updateClicked, size: "sm" }),
|
|
272
|
+
react_1.default.createElement(base_ui_1.Button, { label: "UPDATE PROFILE", onClick: handleUpdateExpertTitle, type: "button", isLoading: updateClicked, disabled: isUpdateButtonDisabled(), color: "primary", size: "sm" }));
|
|
262
273
|
};
|
|
263
274
|
const newServiceLine = () => {
|
|
264
|
-
var _a;
|
|
275
|
+
var _a, _b;
|
|
265
276
|
return (react_1.default.createElement(core_1.Grid, { container: true, item: true, direction: "column", justifyContent: "center" },
|
|
266
277
|
(value === 0 || isInternalProfile) ?
|
|
267
278
|
react_1.default.createElement(core_1.Grid, { container: true, className: "service-lines-header", direction: "column", justifyContent: "center" },
|
|
@@ -276,7 +287,7 @@ const ServiceLinesTemplate = ({ getFreelancerDataResult, createOrUpdateRates, ge
|
|
|
276
287
|
" of 2"))),
|
|
277
288
|
react_1.default.createElement(core_1.Grid, { container: true, item: true, direction: "column", justifyContent: "center", alignItems: "center" },
|
|
278
289
|
react_1.default.createElement(core_1.Typography, { variant: "subtitle1", style: { textDecoration: 'underline', fontStyle: 'italic', fontSize: '14px', fontWeight: 400, marginTop: '8px', marginBottom: '8px', fontFamily: "Roboto" } }, "Why Add More Services?")),
|
|
279
|
-
react_1.default.createElement(core_1.Grid, { item: true, container: true, direction: "row", justifyContent: "space-between", alignItems: "center", style: {
|
|
290
|
+
react_1.default.createElement(core_1.Grid, { item: true, container: true, direction: "row", justifyContent: "space-between", alignItems: "center", style: { marginLeft: '10px', marginRight: '10px' } },
|
|
280
291
|
react_1.default.createElement(core_1.Box, { display: "flex", flexDirection: "row", alignItems: "center", width: '50%' },
|
|
281
292
|
react_1.default.createElement(icons_1.AdjustRounded, { style: {
|
|
282
293
|
marginRight: 8,
|
|
@@ -293,26 +304,61 @@ const ServiceLinesTemplate = ({ getFreelancerDataResult, createOrUpdateRates, ge
|
|
|
293
304
|
react_1.default.createElement(core_1.Typography, { className: "headerFeature", variant: "body2", style: { fontSize: '12px', fontWeight: 400, fontFamily: "Roboto" } }, "Position yourself as a versatile professional"))),
|
|
294
305
|
react_1.default.createElement(core_1.Grid, { item: true, container: true, style: { marginTop: '16px' } },
|
|
295
306
|
react_1.default.createElement(core_1.Typography, { variant: "h6", style: { fontSize: '12px', fontWeight: 600, fontFamily: "Roboto" } }, "Add Service Lines to your profile:"),
|
|
296
|
-
react_1.default.createElement(core_1.Grid, { item: true, container: true, direction: "row", justifyContent: "space-evenly", alignItems: "center" }, services === null || services === void 0 ? void 0 : services.
|
|
307
|
+
react_1.default.createElement(core_1.Grid, { item: true, container: true, direction: "row", justifyContent: "space-evenly", alignItems: "center" }, (_a = services === null || services === void 0 ? void 0 : services.sort((a, b) => {
|
|
308
|
+
const aExists = selectedServices.find((svc) => svc.service === a.title);
|
|
309
|
+
const bExists = selectedServices.find((svc) => svc.service === b.title);
|
|
310
|
+
const aCurrentService = aExists === null || aExists === void 0 ? void 0 : aExists.currentService;
|
|
311
|
+
const bCurrentService = bExists === null || bExists === void 0 ? void 0 : bExists.currentService;
|
|
312
|
+
if (aCurrentService && !bCurrentService)
|
|
313
|
+
return -1;
|
|
314
|
+
if (!aCurrentService && bCurrentService)
|
|
315
|
+
return 1;
|
|
316
|
+
return 0;
|
|
317
|
+
})) === null || _a === void 0 ? void 0 : _a.map((service, index) => {
|
|
297
318
|
const serviceExistsInArray = selectedServices.find((svc) => svc.service === service.title);
|
|
298
319
|
const isExpanded = expandedServices.get(service.title) || false;
|
|
299
320
|
return (react_1.default.createElement(core_1.Grid, { item: true, xs: 12, key: index, style: { margin: 4 } },
|
|
300
321
|
react_1.default.createElement(core_1.Box, { sx: { display: "flex" } },
|
|
301
322
|
react_1.default.createElement(core_1.Box, { display: 'flex', alignItems: 'center' },
|
|
302
|
-
react_1.default.createElement(CustomCheckbox, { checked: serviceExistsInArray, disabled: serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.currentService, onChange: () =>
|
|
323
|
+
react_1.default.createElement(CustomCheckbox, { checked: serviceExistsInArray && serviceExistsInArray.selected, disabled: serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.currentService, onChange: () => {
|
|
324
|
+
if (serviceExistsInArray) {
|
|
325
|
+
if (serviceExistsInArray.selected) {
|
|
326
|
+
handleRemoveService(service.title);
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
handleServiceToggle(service.title, !!serviceExistsInArray.selected, serviceExistsInArray.rate);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
handleServiceToggle(service.title, true);
|
|
334
|
+
}
|
|
335
|
+
} })),
|
|
303
336
|
react_1.default.createElement(core_1.Box, { sx: { flex: 1 } },
|
|
304
337
|
react_1.default.createElement(core_1.Box, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center" } },
|
|
305
338
|
react_1.default.createElement(core_1.Box, { display: 'flex', alignItems: 'center' },
|
|
306
339
|
react_1.default.createElement(core_1.Typography, { component: "div", style: { fontWeight: 600, fontSize: '12px', color: '#1C1F2B', fontFamily: "Roboto" } },
|
|
307
340
|
service.title,
|
|
341
|
+
react_1.default.createElement("br", null),
|
|
308
342
|
(serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.currentService) && (react_1.default.createElement(core_1.Typography, { variant: "caption", style: { fontWeight: 400, fontSize: '12px', fontStyle: 'italic', fontFamily: "Roboto" } }, "\u00A0(current service line)")))),
|
|
309
343
|
react_1.default.createElement(core_1.Box, { display: 'flex', alignItems: 'center', ml: 4 },
|
|
310
|
-
react_1.default.createElement(CustomTextField, { size: "small", variant: "outlined", value: (serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.rate) || '', onChange: (e) =>
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
344
|
+
react_1.default.createElement(CustomTextField, { size: "small", variant: "outlined", value: (serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.rate) || '', onChange: (e) => {
|
|
345
|
+
var _a, _b, _c;
|
|
346
|
+
if (serviceExistsInArray) {
|
|
347
|
+
if (e.target.value === '' && !serviceExistsInArray.selected) {
|
|
348
|
+
handleRemoveService(service.title);
|
|
349
|
+
}
|
|
350
|
+
handlePriceChange(service.title, e.target.value ? parseInt(e.target.value) : 0, serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.currentService, (_a = serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.selected) !== null && _a !== void 0 ? _a : false);
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
handleServiceToggle(service.title, (_b = serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.selected) !== null && _b !== void 0 ? _b : false, e.target.value ? parseInt(e.target.value) : 0);
|
|
354
|
+
handlePriceChange(service.title, e.target.value ? parseInt(e.target.value) : 0, serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.currentService, (_c = serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.selected) !== null && _c !== void 0 ? _c : false);
|
|
355
|
+
}
|
|
356
|
+
}, InputProps: {
|
|
357
|
+
startAdornment: react_1.default.createElement(core_1.Typography, { variant: "caption" }, "$\u00A0"),
|
|
358
|
+
endAdornment: react_1.default.createElement(core_1.Typography, { variant: "caption" }, "\u00A0/hr"),
|
|
359
|
+
}, required: serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.selected, error: serviceExistsInArray && !serviceExistsInArray.rate, label: "Rate" }),
|
|
314
360
|
react_1.default.createElement(core_1.IconButton, { onClick: () => handleExpandToggle(service.title) }, isExpanded ? react_1.default.createElement(icons_1.ExpandLess, null) : react_1.default.createElement(icons_1.ExpandMore, null)))))),
|
|
315
|
-
isExpanded && react_1.default.createElement(core_1.Box, { ml:
|
|
361
|
+
isExpanded && react_1.default.createElement(core_1.Box, { ml: 3, width: '70%' },
|
|
316
362
|
react_1.default.createElement(core_1.Typography, { variant: "caption", style: { fontWeight: 400, fontSize: '12px', fontFamily: "Roboto" } }, service.description))));
|
|
317
363
|
}))))
|
|
318
364
|
:
|
|
@@ -351,19 +397,19 @@ const ServiceLinesTemplate = ({ getFreelancerDataResult, createOrUpdateRates, ge
|
|
|
351
397
|
react_1.default.createElement(core_1.Box, null,
|
|
352
398
|
react_1.default.createElement(core_1.Typography, { variant: "h5", style: { fontWeight: 500, fontFamily: "Roboto", fontSize: '12px' } }, "Select from the following Expertise titles:")),
|
|
353
399
|
react_1.default.createElement(core_1.Grid, { item: true, style: { marginBottom: 12, width: '50%' } },
|
|
354
|
-
react_1.default.createElement(core_1.Select, { required: true, autoWidth: false, variant: "outlined", fullWidth: true, defaultValue: titleOptions, onChange: (event) => handleChangeTitle(event), value: selectedTitle !== null && selectedTitle !== void 0 ? selectedTitle : (
|
|
400
|
+
react_1.default.createElement(core_1.Select, { required: true, autoWidth: false, variant: "outlined", fullWidth: true, defaultValue: titleOptions, onChange: (event) => handleChangeTitle(event), value: selectedTitle !== null && selectedTitle !== void 0 ? selectedTitle : (_b = titleOptions[0]) === null || _b === void 0 ? void 0 : _b.title },
|
|
355
401
|
titleOptions.length > 1 && (react_1.default.createElement(core_1.MenuItem, { disabled: true, value: "" },
|
|
356
402
|
react_1.default.createElement("em", null, "Select title"))),
|
|
357
403
|
titleOptions.map((option) => (react_1.default.createElement(core_1.MenuItem, { key: option.id, value: option.title }, option.title))),
|
|
358
404
|
react_1.default.createElement(core_1.MenuItem, { value: "Other" },
|
|
359
405
|
react_1.default.createElement("em", null, "Other")))),
|
|
360
|
-
selectedTitle === 'Other' && react_1.default.createElement(core_1.Grid, { item: true, style: { width: '
|
|
406
|
+
selectedTitle === 'Other' && react_1.default.createElement(core_1.Grid, { item: true, style: { width: '50%' } },
|
|
361
407
|
react_1.default.createElement(core_1.TextField, { size: "small", variant: "outlined", value: customTitle, fullWidth: true, onChange: (e) => { setCustomTitle(e.target.value); }, placeholder: "Enter custom title" })))),
|
|
362
408
|
(value === 1 || isInternalProfile) ?
|
|
363
409
|
react_1.default.createElement(react_1.default.Fragment, null, ActionButtons(disablePublicProfile))
|
|
364
410
|
:
|
|
365
411
|
react_1.default.createElement(core_1.Grid, { item: true, direction: "row", justifyContent: "flex-end", style: { marginLeft: 'auto' } },
|
|
366
|
-
react_1.default.createElement(base_ui_1.Button, { label: "NEXT", onClick: () => handleUpdateProfile(), type: "button", isLoading: updateClicked, disabled: isUpdateButtonDisabled(), color: "primary" }))));
|
|
412
|
+
react_1.default.createElement(base_ui_1.Button, { label: "NEXT", onClick: () => handleUpdateProfile(), type: "button", isLoading: updateClicked, disabled: isUpdateButtonDisabled(), color: "primary", size: "sm" }))));
|
|
367
413
|
};
|
|
368
414
|
if (loading) {
|
|
369
415
|
return (react_1.default.createElement(core_1.Box, { display: "flex", justifyContent: "center", alignItems: "center", width: '100%', style: { margin: 'auto' } },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
type SectionContents = {
|
|
2
|
-
handleClose?: (...args: any) => void;
|
|
3
|
-
formError?: boolean;
|
|
4
|
-
};
|
|
5
|
-
declare const Error: ({ handleClose }: SectionContents) => JSX.Element;
|
|
6
|
-
export default Error;
|
|
1
|
+
type SectionContents = {
|
|
2
|
+
handleClose?: (...args: any) => void;
|
|
3
|
+
formError?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const Error: ({ handleClose }: SectionContents) => JSX.Element;
|
|
6
|
+
export default Error;
|
|
@@ -1,40 +1,40 @@
|
|
|
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 styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
const colors_1 = __importDefault(require("../shared/constants/colors"));
|
|
10
|
-
const CopyToClipboardAlert_1 = __importDefault(require("./CopyToClipboardAlert"));
|
|
11
|
-
const ErrorBox = (0, styled_components_1.default)(core_1.Box) `
|
|
12
|
-
width: 100%;
|
|
13
|
-
padding-bottom: 100;
|
|
14
|
-
`;
|
|
15
|
-
const ParoTitle = (0, styled_components_1.default)(core_1.Box) `
|
|
16
|
-
color: ${colors_1.default.paroBlack};
|
|
17
|
-
padding: 0px 0px 18px 0px;
|
|
18
|
-
`;
|
|
19
|
-
const ParoSubtitle = styled_components_1.default.div `
|
|
20
|
-
color: ${colors_1.default.paroBlack};
|
|
21
|
-
margin-bottom: 24px;
|
|
22
|
-
font-size: 1rem;
|
|
23
|
-
`;
|
|
24
|
-
const reloadWindow = () => {
|
|
25
|
-
window.location.reload();
|
|
26
|
-
};
|
|
27
|
-
const Error = ({ handleClose }) => {
|
|
28
|
-
const handleCancel = handleClose ? handleClose : reloadWindow;
|
|
29
|
-
const handleCancelLanguage = handleClose ? 'Close' : 'Retry';
|
|
30
|
-
return (react_1.default.createElement(ErrorBox, null,
|
|
31
|
-
react_1.default.createElement(core_1.Box, { display: 'flex', alignContent: 'center', alignItems: 'center', justifyContent: 'center', flexDirection: 'column', padding: '100px 0px 36px 5px;' },
|
|
32
|
-
react_1.default.createElement(core_1.Typography, { variant: 'h6', gutterBottom: true },
|
|
33
|
-
react_1.default.createElement(ParoTitle, null, "Oops! We had a misstep.")),
|
|
34
|
-
react_1.default.createElement(core_1.Typography, { component: 'span', gutterBottom: true },
|
|
35
|
-
react_1.default.createElement(ParoSubtitle, null, "Contact support if the issue persists")),
|
|
36
|
-
react_1.default.createElement(core_1.DialogActions, null,
|
|
37
|
-
react_1.default.createElement(core_1.Button, { variant: 'outlined', onClick: handleCancel, color: 'primary' }, handleCancelLanguage),
|
|
38
|
-
react_1.default.createElement(CopyToClipboardAlert_1.default, { alertMessage: 'Email address copied to clipboard', button: core_1.Button, buttonContent: 'Copy support email', copyContent: 'people@paro.io', variant: 'contained' })))));
|
|
39
|
-
};
|
|
40
|
-
exports.default = Error;
|
|
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 styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const colors_1 = __importDefault(require("../shared/constants/colors"));
|
|
10
|
+
const CopyToClipboardAlert_1 = __importDefault(require("./CopyToClipboardAlert"));
|
|
11
|
+
const ErrorBox = (0, styled_components_1.default)(core_1.Box) `
|
|
12
|
+
width: 100%;
|
|
13
|
+
padding-bottom: 100;
|
|
14
|
+
`;
|
|
15
|
+
const ParoTitle = (0, styled_components_1.default)(core_1.Box) `
|
|
16
|
+
color: ${colors_1.default.paroBlack};
|
|
17
|
+
padding: 0px 0px 18px 0px;
|
|
18
|
+
`;
|
|
19
|
+
const ParoSubtitle = styled_components_1.default.div `
|
|
20
|
+
color: ${colors_1.default.paroBlack};
|
|
21
|
+
margin-bottom: 24px;
|
|
22
|
+
font-size: 1rem;
|
|
23
|
+
`;
|
|
24
|
+
const reloadWindow = () => {
|
|
25
|
+
window.location.reload();
|
|
26
|
+
};
|
|
27
|
+
const Error = ({ handleClose }) => {
|
|
28
|
+
const handleCancel = handleClose ? handleClose : reloadWindow;
|
|
29
|
+
const handleCancelLanguage = handleClose ? 'Close' : 'Retry';
|
|
30
|
+
return (react_1.default.createElement(ErrorBox, null,
|
|
31
|
+
react_1.default.createElement(core_1.Box, { display: 'flex', alignContent: 'center', alignItems: 'center', justifyContent: 'center', flexDirection: 'column', padding: '100px 0px 36px 5px;' },
|
|
32
|
+
react_1.default.createElement(core_1.Typography, { variant: 'h6', gutterBottom: true },
|
|
33
|
+
react_1.default.createElement(ParoTitle, null, "Oops! We had a misstep.")),
|
|
34
|
+
react_1.default.createElement(core_1.Typography, { component: 'span', gutterBottom: true },
|
|
35
|
+
react_1.default.createElement(ParoSubtitle, null, "Contact support if the issue persists")),
|
|
36
|
+
react_1.default.createElement(core_1.DialogActions, null,
|
|
37
|
+
react_1.default.createElement(core_1.Button, { variant: 'outlined', onClick: handleCancel, color: 'primary' }, handleCancelLanguage),
|
|
38
|
+
react_1.default.createElement(CopyToClipboardAlert_1.default, { alertMessage: 'Email address copied to clipboard', button: core_1.Button, buttonContent: 'Copy support email', copyContent: 'people@paro.io', variant: 'contained' })))));
|
|
39
|
+
};
|
|
40
|
+
exports.default = Error;
|