@paro.io/expert-shared-components 1.8.0 → 1.8.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/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/NetworkSection.js +1 -1
- package/lib/components/ExpertProfileHeader/ProfileSection.js +7 -7
- 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.d.ts +2 -2
- package/lib/components/ServiceLinesTemplate/index.js +146 -112
- 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/package.json +59 -59
|
@@ -39,22 +39,33 @@ const icons_1 = require("@material-ui/icons");
|
|
|
39
39
|
const ReviewsTab_1 = require("../ReviewsTab/ReviewsTab");
|
|
40
40
|
const base_ui_1 = require("@paro.io/base-ui");
|
|
41
41
|
const utils_1 = require("../shared/utils");
|
|
42
|
-
const lab_1 = require("@material-ui/lab");
|
|
43
42
|
const react_hot_toast_1 = require("react-hot-toast");
|
|
44
|
-
const ServiceLinesTemplate = ({ getFreelancerDataResult, createOrUpdateRates, getRatesByExpertId, updateExpert, openServiceLinesTemplate,
|
|
43
|
+
const ServiceLinesTemplate = ({ getFreelancerDataResult, createOrUpdateRates, getRatesByExpertId, updateExpert, openServiceLinesTemplate, getServiceLines, legacyFreelancerId, expertId, isFirmProfile, serviceLineData, selectedServicesList = [], isInternalProfile = false, updateFreelancerPreferences, getExpertVanityTitles, reactAppUrl, }) => {
|
|
45
44
|
const [selectedServices, dispatch] = (0, react_1.useReducer)(utils_1.selectedServicesReducer, selectedServicesList);
|
|
46
45
|
const [updateClicked, setUpdateClicked] = (0, react_1.useState)(false);
|
|
47
|
-
const [loading, setLoading] = (0, react_1.useState)(
|
|
46
|
+
const [loading, setLoading] = (0, react_1.useState)(true);
|
|
48
47
|
const [serviceLines, setServiceLines] = (0, react_1.useState)(serviceLineData);
|
|
49
48
|
const [currentServiveRate, setCurrentServiceRate] = (0, react_1.useState)(null);
|
|
50
49
|
const [value, setValue] = (0, react_1.useState)(0);
|
|
51
50
|
const [titleOptions, setTitleOptions] = (0, react_1.useState)([]);
|
|
52
51
|
const [selectedTitle, setSelectedTitle] = (0, react_1.useState)(null);
|
|
53
52
|
const [customTitle, setCustomTitle] = (0, react_1.useState)(null);
|
|
53
|
+
const [expandedServices, setExpandedServices] = (0, react_1.useState)(new Map());
|
|
54
|
+
const [currentFeatureStatus, setCurrentFeatureStatus] = (0, react_1.useState)({});
|
|
55
|
+
const [disablePublicProfile, setDisablePublicProfile] = (0, react_1.useState)(true);
|
|
56
|
+
const theme = (0, core_1.useTheme)();
|
|
57
|
+
const isSmallScreen = (0, core_1.useMediaQuery)(theme.breakpoints.down('sm'));
|
|
58
|
+
const handleExpandToggle = (serviceTitle) => {
|
|
59
|
+
setExpandedServices(prev => {
|
|
60
|
+
const updatedState = new Map(prev);
|
|
61
|
+
const currentExpandedState = updatedState.get(serviceTitle) || false;
|
|
62
|
+
updatedState.set(serviceTitle, !currentExpandedState);
|
|
63
|
+
return updatedState;
|
|
64
|
+
});
|
|
65
|
+
};
|
|
54
66
|
const fetchServiceLineData = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
55
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
67
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
56
68
|
try {
|
|
57
|
-
setLoading(true);
|
|
58
69
|
if (!isInternalProfile) {
|
|
59
70
|
const [expertVanityTitles] = yield Promise.all([
|
|
60
71
|
getExpertVanityTitles({ fetchPolicy: 'network-only' }),
|
|
@@ -73,7 +84,9 @@ const ServiceLinesTemplate = ({ getFreelancerDataResult, createOrUpdateRates, ge
|
|
|
73
84
|
const expertRates = (_j = ratesResponse === null || ratesResponse === void 0 ? void 0 : ratesResponse.data) === null || _j === void 0 ? void 0 : _j.getRatesByExpertId;
|
|
74
85
|
setCurrentServiceRate(currentRate);
|
|
75
86
|
const isTitleExists = (_l = (_k = freelancerResponse === null || freelancerResponse === void 0 ? void 0 : freelancerResponse.data) === null || _k === void 0 ? void 0 : _k.getExpertByLegacyFreelancerId) === null || _l === void 0 ? void 0 : _l.vanityTitle;
|
|
76
|
-
|
|
87
|
+
const featureStatus = (_o = (_m = freelancerResponse === null || freelancerResponse === void 0 ? void 0 : freelancerResponse.data) === null || _m === void 0 ? void 0 : _m.getExpertByLegacyFreelancerId) === null || _o === void 0 ? void 0 : _o.featureStatus;
|
|
88
|
+
setCurrentFeatureStatus(featureStatus);
|
|
89
|
+
isTitleExists && setSelectedTitle(isTitleExists);
|
|
77
90
|
dispatch({
|
|
78
91
|
currentService,
|
|
79
92
|
currentRate,
|
|
@@ -143,6 +156,7 @@ const ServiceLinesTemplate = ({ getFreelancerDataResult, createOrUpdateRates, ge
|
|
|
143
156
|
});
|
|
144
157
|
}).finally(() => {
|
|
145
158
|
setUpdateClicked(false);
|
|
159
|
+
setDisablePublicProfile(false);
|
|
146
160
|
});
|
|
147
161
|
});
|
|
148
162
|
const handleUpdateProfile = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -172,16 +186,18 @@ const ServiceLinesTemplate = ({ getFreelancerDataResult, createOrUpdateRates, ge
|
|
|
172
186
|
console.log('DB Updation failed: ', error.message);
|
|
173
187
|
}
|
|
174
188
|
finally {
|
|
175
|
-
|
|
189
|
+
setUpdateClicked(false);
|
|
190
|
+
setValue(1);
|
|
176
191
|
}
|
|
177
192
|
;
|
|
178
193
|
});
|
|
179
194
|
const updateFeatureStatus = () => {
|
|
195
|
+
const updateFeatureStatus = Object.assign(Object.assign({}, currentFeatureStatus), { serviceLines: true });
|
|
180
196
|
updateExpert({
|
|
181
197
|
variables: {
|
|
182
198
|
expertId: expertId,
|
|
183
199
|
input: {
|
|
184
|
-
featureStatus:
|
|
200
|
+
featureStatus: updateFeatureStatus
|
|
185
201
|
}
|
|
186
202
|
},
|
|
187
203
|
}).then(() => {
|
|
@@ -198,14 +214,11 @@ const ServiceLinesTemplate = ({ getFreelancerDataResult, createOrUpdateRates, ge
|
|
|
198
214
|
message: 'Update failed!',
|
|
199
215
|
icon: 'warning'
|
|
200
216
|
});
|
|
201
|
-
console.log('DB Updation failed : ', error.message);
|
|
202
217
|
}).finally(() => {
|
|
203
|
-
|
|
218
|
+
setUpdateClicked(false);
|
|
219
|
+
setValue(1);
|
|
204
220
|
});
|
|
205
221
|
};
|
|
206
|
-
const handleNotInterestedClick = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
207
|
-
yield updateFeatureStatus();
|
|
208
|
-
});
|
|
209
222
|
const isUpdateButtonDisabled = () => {
|
|
210
223
|
if ((selectedServices === null || selectedServices === void 0 ? void 0 : selectedServices.length) === 0)
|
|
211
224
|
return true;
|
|
@@ -229,110 +242,131 @@ const ServiceLinesTemplate = ({ getFreelancerDataResult, createOrUpdateRates, ge
|
|
|
229
242
|
type: 'update'
|
|
230
243
|
});
|
|
231
244
|
};
|
|
232
|
-
const handleChange = (event, newValue) => {
|
|
233
|
-
if (newValue >= 0) {
|
|
234
|
-
setValue(newValue);
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
245
|
const handleChangeTitle = (event) => {
|
|
238
246
|
setSelectedTitle(event.target.value);
|
|
239
247
|
};
|
|
240
|
-
const ActionButtons = () => {
|
|
241
|
-
return react_1.default.createElement(core_1.Grid, { container: true, direction: "row", justifyContent: "space-evenly", style: {
|
|
242
|
-
react_1.default.createElement(base_ui_1.Button, { label: "
|
|
243
|
-
react_1.default.createElement(base_ui_1.Button, { label: "
|
|
244
|
-
};
|
|
245
|
-
const ServiceLinesTab = () => {
|
|
246
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
247
|
-
react_1.default.createElement(core_1.Grid, { style: { backgroundColor: '#132f4a', padding: 12 }, className: "service-lines-header" },
|
|
248
|
-
react_1.default.createElement(core_1.Typography, { className: "headerTop", variant: "h5", style: { color: '#ffffff', fontWeight: 500, padding: 12, justifyContent: 'space-between', display: 'flex', alignItems: 'center' } },
|
|
249
|
-
"Expand Your Expertise: Add More Services to Your Profile",
|
|
250
|
-
react_1.default.createElement("img", { src: 'https://expert-files-dev.s3.us-east-1.amazonaws.com/ParoGroupLogo.png', alt: "Paro Group Logo", style: { width: 24, height: 24, marginLeft: 8 } })),
|
|
251
|
-
react_1.default.createElement(core_1.Typography, { className: "headerMiddle", style: { color: '#ffffff', fontWeight: 200, fontStyle: 'italic', paddingLeft: 12 } }, "Why Add More Services?"),
|
|
252
|
-
react_1.default.createElement(core_1.Grid, { container: true, spacing: 3, style: { padding: 12, color: '#ffffff' }, direction: "row", justifyContent: "flex-start", alignItems: "center" }, utils_1.features.map((feature, index) => (react_1.default.createElement(core_1.Box, { key: index, display: "flex", alignItems: "center", m: 2 },
|
|
253
|
-
react_1.default.createElement(icons_1.AdjustRounded, { style: {
|
|
254
|
-
marginRight: 8,
|
|
255
|
-
color: '#2A9D8F',
|
|
256
|
-
fontSize: 20
|
|
257
|
-
}, className: "headerCircle" }),
|
|
258
|
-
react_1.default.createElement(core_1.Typography, { className: "headerFeature", variant: "body2", style: { color: '#ffffff' } }, feature)))))),
|
|
259
|
-
react_1.default.createElement(core_1.Grid, { container: true, style: { padding: 4 } },
|
|
260
|
-
react_1.default.createElement(core_1.Typography, { variant: "h6", style: { marginLeft: 20, fontWeight: 500 } }, "Select from the following service lines:"),
|
|
261
|
-
react_1.default.createElement(core_1.Grid, { container: true, direction: "row", justifyContent: "space-evenly", alignItems: "center" }, services === null || services === void 0 ? void 0 :
|
|
262
|
-
services.map((service, index) => {
|
|
263
|
-
const serviceExistsInArray = selectedServices.find((svc) => svc.service === service.title);
|
|
264
|
-
return (react_1.default.createElement(core_1.Grid, { item: true, xs: 12, md: 5, key: index, style: { margin: 12 } },
|
|
265
|
-
react_1.default.createElement(core_1.Box, { sx: { display: "flex" } },
|
|
266
|
-
react_1.default.createElement(core_1.Box, { display: 'flex', alignItems: 'center' },
|
|
267
|
-
react_1.default.createElement(CustomCheckbox, { checked: serviceExistsInArray, disabled: serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.currentService, onChange: () => handleServiceToggle(service.title) })),
|
|
268
|
-
react_1.default.createElement(core_1.Box, { sx: { flex: 1 } },
|
|
269
|
-
react_1.default.createElement(core_1.Box, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 2 } },
|
|
270
|
-
react_1.default.createElement(core_1.Box, null,
|
|
271
|
-
react_1.default.createElement(core_1.Typography, { component: "div", style: { fontWeight: 300, fontSize: 16 } },
|
|
272
|
-
service.title,
|
|
273
|
-
(serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.currentService) && (react_1.default.createElement(core_1.Typography, { variant: "caption", style: { fontWeight: 400, fontSize: 16 } }, "\u00A0(current service line)"))),
|
|
274
|
-
react_1.default.createElement(core_1.Typography, { variant: "body2", style: { fontWeight: 50, fontSize: 14 } }, service.description)),
|
|
275
|
-
react_1.default.createElement(core_1.Box, { display: 'flex', alignItems: 'center', ml: 4 },
|
|
276
|
-
react_1.default.createElement(core_1.TextField, { size: "small", variant: "outlined", value: (serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.rate) || '', onChange: (e) => handlePriceChange(service.title, e.target.value ? parseInt(e.target.value) : 0, serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.currentService), InputProps: {
|
|
277
|
-
startAdornment: react_1.default.createElement(core_1.Typography, null, "$\u00A0"),
|
|
278
|
-
endAdornment: react_1.default.createElement(core_1.Typography, null, "\u00A0/hr"),
|
|
279
|
-
}, style: { width: 100 }, required: serviceExistsInArray, error: serviceExistsInArray && !serviceExistsInArray.rate, label: "Rate", className: "serviceLineRateInput" })))))));
|
|
280
|
-
}),
|
|
281
|
-
react_1.default.createElement(core_1.Grid, { item: true, xs: 12, md: 5, style: { margin: 5 } }, ActionButtons())))));
|
|
248
|
+
const ActionButtons = (disabled) => {
|
|
249
|
+
return react_1.default.createElement(core_1.Grid, { container: true, direction: "row", justifyContent: "space-evenly", style: { margin: 'auto' }, spacing: 2 },
|
|
250
|
+
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 }),
|
|
251
|
+
react_1.default.createElement(base_ui_1.Button, { label: "UPDATE PROFILE", onClick: handleUpdateExpertTitle, type: "button", isLoading: updateClicked, disabled: isUpdateButtonDisabled(), color: "primary" }));
|
|
282
252
|
};
|
|
283
|
-
const
|
|
253
|
+
const newServiceLine = () => {
|
|
284
254
|
var _a;
|
|
285
|
-
return react_1.default.createElement(core_1.Grid, { container: true, item: true, direction: "
|
|
286
|
-
|
|
287
|
-
react_1.default.createElement(core_1.
|
|
288
|
-
"
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
255
|
+
return (react_1.default.createElement(core_1.Grid, { container: true, item: true, direction: "column", justifyContent: "center" },
|
|
256
|
+
(value === 0 || isInternalProfile) ?
|
|
257
|
+
react_1.default.createElement(core_1.Grid, { container: true, className: "service-lines-header", direction: "column", justifyContent: "center" },
|
|
258
|
+
react_1.default.createElement(core_1.Grid, { item: true, container: true, direction: "row", justifyContent: "space-between", alignItems: "flex-start" },
|
|
259
|
+
react_1.default.createElement(core_1.Grid, { item: true, direction: "column", justifyContent: "flex-start" },
|
|
260
|
+
react_1.default.createElement(core_1.Typography, { variant: "h6", style: { color: '#12756F', fontSize: '18px', fontWeight: 600, fontFamily: "Roboto" } }, "Expand Your Expertise"),
|
|
261
|
+
react_1.default.createElement(core_1.Typography, { variant: "body2", style: { color: '#1C1F2B', fontSize: '12px', fontWeight: 600, fontFamily: "Roboto" } }, "Step 1: Add more services to your profile to stand out")),
|
|
262
|
+
react_1.default.createElement(core_1.Grid, { item: true, style: { backgroundColor: '#0E3435', color: '#ffffff', borderRadius: '20px', padding: '4px 16px' } },
|
|
263
|
+
react_1.default.createElement(core_1.Typography, { variant: "body2", style: { fontSize: '10px', fontWeight: 600, fontFamily: "Roboto" } },
|
|
264
|
+
"Step ",
|
|
265
|
+
value + 1,
|
|
266
|
+
" of 2"))),
|
|
267
|
+
react_1.default.createElement(core_1.Grid, { container: true, item: true, direction: "column", justifyContent: "center", alignItems: "center" },
|
|
268
|
+
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?")),
|
|
269
|
+
react_1.default.createElement(core_1.Grid, { item: true, container: true, direction: isSmallScreen ? "column" : "row", justifyContent: "space-between", alignItems: "center", style: { margin: 'auto' } },
|
|
270
|
+
react_1.default.createElement(core_1.Box, { display: "flex", flexDirection: "row", alignItems: "center", width: '50%' },
|
|
271
|
+
react_1.default.createElement(icons_1.AdjustRounded, { style: {
|
|
272
|
+
marginRight: 8,
|
|
273
|
+
color: '#248384',
|
|
274
|
+
fontSize: '16px'
|
|
275
|
+
}, className: "headerCircle" }),
|
|
276
|
+
react_1.default.createElement(core_1.Typography, { className: "headerFeature", variant: "body2", style: { fontSize: '12px', fontWeight: 400, fontFamily: "Roboto" } }, "Increase your visibility to clients searching for diverse expertise")),
|
|
277
|
+
react_1.default.createElement(core_1.Box, { display: "flex", flexDirection: "row", alignItems: "center", width: '50%' },
|
|
278
|
+
react_1.default.createElement(icons_1.AdjustRounded, { style: {
|
|
279
|
+
marginRight: 8,
|
|
280
|
+
color: '#248384',
|
|
281
|
+
fontSize: '16px'
|
|
282
|
+
}, className: "headerCircle" }),
|
|
283
|
+
react_1.default.createElement(core_1.Typography, { className: "headerFeature", variant: "body2", style: { fontSize: '12px', fontWeight: 400, fontFamily: "Roboto" } }, "Position yourself as a versatile professional"))),
|
|
284
|
+
react_1.default.createElement(core_1.Grid, { item: true, container: true, style: { marginTop: '16px' } },
|
|
285
|
+
react_1.default.createElement(core_1.Typography, { variant: "h6", style: { fontSize: '12px', fontWeight: 600, fontFamily: "Roboto" } }, "Add Service Lines to your profile:"),
|
|
286
|
+
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.map((service, index) => {
|
|
287
|
+
const serviceExistsInArray = selectedServices.find((svc) => svc.service === service.title);
|
|
288
|
+
const isExpanded = expandedServices.get(service.title) || false;
|
|
289
|
+
return (react_1.default.createElement(core_1.Grid, { item: true, xs: 12, key: index, style: { margin: 4 } },
|
|
290
|
+
react_1.default.createElement(core_1.Box, { sx: { display: "flex" } },
|
|
291
|
+
react_1.default.createElement(core_1.Box, { display: 'flex', alignItems: 'center' },
|
|
292
|
+
react_1.default.createElement(CustomCheckbox, { checked: serviceExistsInArray, disabled: serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.currentService, onChange: () => handleServiceToggle(service.title) })),
|
|
293
|
+
react_1.default.createElement(core_1.Box, { sx: { flex: 1 } },
|
|
294
|
+
react_1.default.createElement(core_1.Box, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center" } },
|
|
295
|
+
react_1.default.createElement(core_1.Box, { display: 'flex', alignItems: 'center' },
|
|
296
|
+
react_1.default.createElement(core_1.Typography, { component: "div", style: { fontWeight: 600, fontSize: '12px', color: '#1C1F2B', fontFamily: "Roboto" } },
|
|
297
|
+
service.title,
|
|
298
|
+
(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)")))),
|
|
299
|
+
react_1.default.createElement(core_1.Box, { display: 'flex', alignItems: 'center', ml: 4 },
|
|
300
|
+
react_1.default.createElement(core_1.TextField, { size: "small", variant: "outlined", value: (serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.rate) || '', onChange: (e) => handlePriceChange(service.title, e.target.value ? parseInt(e.target.value) : 0, serviceExistsInArray === null || serviceExistsInArray === void 0 ? void 0 : serviceExistsInArray.currentService), InputProps: {
|
|
301
|
+
startAdornment: react_1.default.createElement(core_1.Typography, null, "$\u00A0"),
|
|
302
|
+
endAdornment: react_1.default.createElement(core_1.Typography, null, "\u00A0/hr"),
|
|
303
|
+
}, style: { width: 100 }, required: serviceExistsInArray, error: serviceExistsInArray && !serviceExistsInArray.rate, label: "Rate", className: "serviceLineRateInput" }),
|
|
304
|
+
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)))))),
|
|
305
|
+
isExpanded && react_1.default.createElement(core_1.Box, { ml: 2 },
|
|
306
|
+
react_1.default.createElement(core_1.Typography, { variant: "caption", style: { fontWeight: 400, fontSize: '12px', fontFamily: "Roboto" } }, service.description))));
|
|
307
|
+
}))))
|
|
308
|
+
:
|
|
309
|
+
react_1.default.createElement(core_1.Grid, { container: true, className: "service-lines-header", direction: "column", justifyContent: "center" },
|
|
310
|
+
react_1.default.createElement(core_1.Grid, { item: true, container: true, direction: "row", justifyContent: "space-between", alignItems: "flex-start" },
|
|
311
|
+
react_1.default.createElement(core_1.Grid, { item: true, direction: "column", justifyContent: "flex-start" },
|
|
312
|
+
react_1.default.createElement(core_1.Typography, { variant: "h6", style: { color: '#12756F', fontSize: '18px', fontWeight: 600, fontFamily: "Roboto" } }, "Give your Expertise a Title"),
|
|
313
|
+
react_1.default.createElement(core_1.Typography, { variant: "body2", style: { color: '#1C1F2B', fontSize: '12px', fontWeight: 600, fontFamily: "Roboto" } }, "Step 2: Showcase your profile with a title")),
|
|
314
|
+
react_1.default.createElement(core_1.Grid, { item: true, style: { backgroundColor: '#0E3435', color: '#ffffff', borderRadius: '20px', padding: '4px 16px' } },
|
|
315
|
+
react_1.default.createElement(core_1.Typography, { variant: "body2", style: { fontSize: '10px', fontWeight: 600, fontFamily: "Roboto" } },
|
|
316
|
+
"Step ",
|
|
317
|
+
value + 1,
|
|
318
|
+
" of 2"))),
|
|
319
|
+
react_1.default.createElement(core_1.Grid, { container: true, item: true, direction: "column", justifyContent: "center", alignItems: "center" },
|
|
320
|
+
react_1.default.createElement(core_1.Typography, { variant: "subtitle1", style: { textDecoration: 'underline', fontStyle: 'italic', fontSize: '14px', fontWeight: 400, marginTop: '16px', marginBottom: '16px', fontFamily: "Roboto" } }, "Why Add a Job Title to Your Profile?")),
|
|
321
|
+
react_1.default.createElement(core_1.Grid, { container: true, item: true, direction: isSmallScreen ? "column" : "row", justifyContent: "space-between", alignItems: "center", spacing: 1, style: { margin: 'auto' } },
|
|
322
|
+
react_1.default.createElement(core_1.Box, { display: "flex", flexDirection: "row", alignItems: "center", width: '50%' },
|
|
323
|
+
react_1.default.createElement(icons_1.AdjustRounded, { style: {
|
|
324
|
+
marginRight: 8,
|
|
325
|
+
color: '#248384',
|
|
326
|
+
fontSize: '16px'
|
|
327
|
+
}, className: "headerCircle" }),
|
|
328
|
+
react_1.default.createElement(core_1.Typography, { className: "headerFeature", variant: "body2", style: { fontSize: '12px', fontWeight: 400, fontFamily: "Roboto" } },
|
|
329
|
+
react_1.default.createElement("b", { style: { display: 'inline', whiteSpace: 'nowrap' } }, "Showcase Your Brand:"),
|
|
330
|
+
" Your job title is the first impression Clients get of your professional identity")),
|
|
331
|
+
react_1.default.createElement(core_1.Box, { display: "flex", flexDirection: "row", alignItems: "center", width: '50%' },
|
|
332
|
+
react_1.default.createElement(icons_1.AdjustRounded, { style: {
|
|
333
|
+
marginRight: 8,
|
|
334
|
+
color: '#248384',
|
|
335
|
+
fontSize: '16px'
|
|
336
|
+
}, className: "headerCircle" }),
|
|
337
|
+
react_1.default.createElement(core_1.Typography, { className: "headerFeature", variant: "body2", style: { fontSize: '12px', fontWeight: 400, fontFamily: "Roboto" } },
|
|
338
|
+
react_1.default.createElement("b", { style: { display: 'inline', whiteSpace: 'nowrap' } }, "Control Your Narrative:"),
|
|
339
|
+
" Your job title gives you the opportunity to shape how Clients perceive you, positioning yourself as a trusted expert in your field."))),
|
|
340
|
+
react_1.default.createElement(core_1.Grid, { xs: 12, style: { marginTop: 16 }, container: true, direction: "column", justifyContent: "center", alignItems: "center" },
|
|
341
|
+
react_1.default.createElement(core_1.Box, null,
|
|
342
|
+
react_1.default.createElement(core_1.Typography, { variant: "h5", style: { fontWeight: 500, fontFamily: "Roboto", fontSize: '12px' } }, "Select from the following Expertise titles:")),
|
|
343
|
+
react_1.default.createElement(core_1.Grid, { item: true, style: { marginBottom: 12, width: '50%' } },
|
|
344
|
+
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 : (_a = titleOptions[0]) === null || _a === void 0 ? void 0 : _a.title },
|
|
345
|
+
titleOptions.length > 1 && (react_1.default.createElement(core_1.MenuItem, { disabled: true, value: "" },
|
|
346
|
+
react_1.default.createElement("em", null, "Select title"))),
|
|
347
|
+
titleOptions.map((option) => (react_1.default.createElement(core_1.MenuItem, { key: option.id, value: option.title }, option.title))),
|
|
348
|
+
react_1.default.createElement(core_1.MenuItem, { value: "Other" },
|
|
349
|
+
react_1.default.createElement("em", null, "Other")))),
|
|
350
|
+
selectedTitle === 'Other' && react_1.default.createElement(core_1.Grid, { item: true, style: { width: '70%' } },
|
|
351
|
+
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" })))),
|
|
352
|
+
(value === 1 || isInternalProfile) ?
|
|
353
|
+
react_1.default.createElement(react_1.default.Fragment, null, ActionButtons(disablePublicProfile))
|
|
354
|
+
:
|
|
355
|
+
react_1.default.createElement(core_1.Grid, { item: true, direction: "row", justifyContent: "flex-end", style: { marginLeft: 'auto' } },
|
|
356
|
+
react_1.default.createElement(base_ui_1.Button, { label: "NEXT", onClick: () => handleUpdateProfile(), type: "button", isLoading: updateClicked, disabled: isUpdateButtonDisabled(), color: "primary" }))));
|
|
318
357
|
};
|
|
319
|
-
|
|
320
|
-
react_1.default.createElement(core_1.
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
style: {
|
|
333
|
-
zIndex: 9999,
|
|
334
|
-
backgroundColor: 'transparent'
|
|
335
|
-
},
|
|
336
|
-
} }))))));
|
|
358
|
+
if (loading) {
|
|
359
|
+
return (react_1.default.createElement(core_1.Box, { display: "flex", justifyContent: "center", alignItems: "center", width: '100%', style: { margin: 'auto' } },
|
|
360
|
+
react_1.default.createElement(core_1.CircularProgress, null)));
|
|
361
|
+
}
|
|
362
|
+
return (openServiceLinesTemplate && (react_1.default.createElement(core_1.Grid, { style: { backgroundColor: '#fff', minWidth: '100%' } },
|
|
363
|
+
react_1.default.createElement(react_1.default.Fragment, null,
|
|
364
|
+
newServiceLine(),
|
|
365
|
+
react_1.default.createElement(react_hot_toast_1.Toaster, { position: "top-center", toastOptions: {
|
|
366
|
+
style: {
|
|
367
|
+
zIndex: 9999,
|
|
368
|
+
backgroundColor: 'transparent'
|
|
369
|
+
},
|
|
370
|
+
} })))));
|
|
337
371
|
};
|
|
338
372
|
exports.ServiceLinesTemplate = ServiceLinesTemplate;
|
|
@@ -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;
|
|
@@ -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;
|