@paro.io/expert-shared-components 1.9.1 → 1.9.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/DocumentCenter.js +1 -1
- package/lib/components/DocumentCenter/DocumentTable.d.ts +15 -15
- package/lib/components/DocumentCenter/DocumentTable.js +350 -350
- package/lib/components/DocumentCenter/DocumentUploadRow.d.ts +4 -1
- package/lib/components/DocumentCenter/DocumentUploadRow.js +63 -34
- package/lib/components/DocumentCenter/ParoDocumentsTable.d.ts +1 -0
- package/lib/components/DocumentCenter/ParoDocumentsTable.js +1 -44
- 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/ProfileSection.js +7 -7
- package/lib/components/OrganizationChart/OrgChart.d.ts +2 -0
- package/lib/components/OrganizationChart/OrgChart.js +232 -0
- package/lib/components/OrganizationChart/OrganizationChart.js +7 -7
- package/lib/components/OrganizationChart/index.d.ts +1 -1
- package/lib/components/OrganizationChart/index.js +2 -2
- package/lib/components/OrganizationChart/utils.d.ts +39 -0
- package/lib/components/OrganizationChart/utils.js +233 -0
- package/lib/components/Reviews/Pagination.js +6 -6
- package/lib/components/ReviewsTab/RatingHeader.js +6 -6
- package/lib/components/ReviewsTab/expert-shared-components.code-workspace +20 -20
- package/lib/components/ReviewsTab/reviewRequestModal.js +5 -5
- package/lib/components/shared/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
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Card } from '@material-ui/core';
|
|
2
|
+
type Employee = {
|
|
3
|
+
id: number;
|
|
4
|
+
employeeName: string;
|
|
5
|
+
yearsWithFirm: number;
|
|
6
|
+
firmRole: string;
|
|
7
|
+
employeeLocation: string;
|
|
8
|
+
level: number;
|
|
9
|
+
expertFirmId: string;
|
|
10
|
+
directReport: string;
|
|
11
|
+
__typename: string;
|
|
12
|
+
};
|
|
13
|
+
type TransformedEmployee = {
|
|
14
|
+
name: string;
|
|
15
|
+
position: string;
|
|
16
|
+
experience: number;
|
|
17
|
+
location: string;
|
|
18
|
+
initial: string;
|
|
19
|
+
level: number | null;
|
|
20
|
+
children: TransformedEmployee[];
|
|
21
|
+
};
|
|
22
|
+
export declare const transformEmployeeData: (employeeData: Employee[], firstName: string, lastName: string, primaryServiceLine: string, city: string, stateAbbreviation: string, paroTenure: number) => {
|
|
23
|
+
name: string;
|
|
24
|
+
position: string;
|
|
25
|
+
experience: number;
|
|
26
|
+
location: string;
|
|
27
|
+
initial: string;
|
|
28
|
+
level: number;
|
|
29
|
+
children: TransformedEmployee[];
|
|
30
|
+
};
|
|
31
|
+
export declare const ConnectorContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
32
|
+
export declare const InfoCard: import("styled-components").StyledComponent<typeof Card, any, {}, never>;
|
|
33
|
+
export declare const CustomDialog: import("react").ComponentType<Pick<import("@material-ui/core").DialogProps, "id" | "open" | "color" | "container" | "content" | "maxWidth" | "transitionDuration" | "translate" | "hidden" | "slot" | "style" | "title" | "dir" | "scroll" | "rel" | "accessKey" | "draggable" | "lang" | "prefix" | "role" | "children" | "contentEditable" | "enterKeyHint" | "inputMode" | "nonce" | "tabIndex" | "ref" | "suppressHydrationWarning" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "autoCapitalize" | "autoFocus" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "onClose" | "innerRef" | "onEnter" | "onEntering" | "onEntered" | "onExit" | "onExiting" | "onExited" | "fullWidth" | "BackdropComponent" | "BackdropProps" | "closeAfterTransition" | "disableAutoFocus" | "disableBackdropClick" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "manager" | "onBackdropClick" | "onEscapeKeyDown" | "onRendered" | "PaperProps" | "TransitionComponent" | "TransitionProps" | "PaperComponent" | "fullScreen"> & import("@material-ui/core").StyledComponentProps<"root"> & {
|
|
34
|
+
className?: string;
|
|
35
|
+
}>;
|
|
36
|
+
export declare const parseServices: (services: string[]) => object[];
|
|
37
|
+
export declare const checkEmployeeLocation: (data: any[]) => "none" | "Offshore & Onshore Team" | "Offshore Team" | "Onshore Team";
|
|
38
|
+
export declare const getTotalYearsWithFirm: (data: any[]) => any;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,233 @@
|
|
|
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.getTotalYearsWithFirm = exports.checkEmployeeLocation = exports.parseServices = exports.CustomDialog = exports.InfoCard = exports.ConnectorContainer = exports.transformEmployeeData = void 0;
|
|
7
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
+
const core_1 = require("@material-ui/core");
|
|
9
|
+
const Dialog_1 = __importDefault(require("@material-ui/core/Dialog"));
|
|
10
|
+
// export const transformEmployeeData = (
|
|
11
|
+
// employeeData: Employee[],
|
|
12
|
+
// firstName: string,
|
|
13
|
+
// lastName: string,
|
|
14
|
+
// primaryServiceLine: string,
|
|
15
|
+
// city: string,
|
|
16
|
+
// stateAbbreviation: string,
|
|
17
|
+
// paroTenure: number
|
|
18
|
+
// ) => {
|
|
19
|
+
// const getInitial = (name: string): string => name.charAt(0).toUpperCase();
|
|
20
|
+
// // // Organize employees by their level
|
|
21
|
+
// // const levels: { [key: number]: Employee[] } = {};
|
|
22
|
+
// // employeeData.forEach((employee) => {
|
|
23
|
+
// // if (!levels[employee.level]) {
|
|
24
|
+
// // levels[employee.level] = [];
|
|
25
|
+
// // }
|
|
26
|
+
// // levels[employee.level].push(employee);
|
|
27
|
+
// // });
|
|
28
|
+
// const buildHierarchy = (parent: Employee | null, level: number): TransformedEmployee[] => {
|
|
29
|
+
// // if (!levels[level]) return [];
|
|
30
|
+
// // Filter employees based on matching direct_report and expert_firm_id with the parent
|
|
31
|
+
// const children = employeeData.filter((employee) => {
|
|
32
|
+
// return (parent === null ||
|
|
33
|
+
// (employee.directReport === parent.employeeName &&
|
|
34
|
+
// employee.expertFirmId === parent.expertFirmId));
|
|
35
|
+
// }).map((employee) => ({
|
|
36
|
+
// name: employee.employeeName,
|
|
37
|
+
// position: employee.firmRole,
|
|
38
|
+
// experience: employee.yearsWithFirm,
|
|
39
|
+
// location: employee.employeeLocation,
|
|
40
|
+
// initial: getInitial(employee.employeeName),
|
|
41
|
+
// level: level,
|
|
42
|
+
// children: buildHierarchy(employee, level + 1), // Recursive call to get the next level of children
|
|
43
|
+
// }));
|
|
44
|
+
// return children;
|
|
45
|
+
// };
|
|
46
|
+
// // Start building hierarchy from level 1 (assuming the top-most level is level 1)
|
|
47
|
+
// const transformedData = buildHierarchy(null, 1);
|
|
48
|
+
// return {
|
|
49
|
+
// name: `${firstName} ${lastName}`,
|
|
50
|
+
// position: primaryServiceLine,
|
|
51
|
+
// experience: paroTenure,
|
|
52
|
+
// location: `${city}, ${stateAbbreviation}`,
|
|
53
|
+
// initial: firstName.charAt(0).toUpperCase(),
|
|
54
|
+
// level: 0,
|
|
55
|
+
// children: transformedData,
|
|
56
|
+
// };
|
|
57
|
+
// };
|
|
58
|
+
const transformEmployeeData = (employeeData, firstName, lastName, primaryServiceLine, city, stateAbbreviation, paroTenure) => {
|
|
59
|
+
const getInitial = (name) => name.charAt(0).toUpperCase();
|
|
60
|
+
const buildHierarchy = (parent) => {
|
|
61
|
+
if (parent === null) {
|
|
62
|
+
return employeeData.filter(employee => employee.level === 1)
|
|
63
|
+
.map(employee => ({
|
|
64
|
+
name: employee.employeeName,
|
|
65
|
+
position: employee.firmRole,
|
|
66
|
+
experience: employee.yearsWithFirm,
|
|
67
|
+
location: employee.employeeLocation,
|
|
68
|
+
initial: getInitial(employee.employeeName),
|
|
69
|
+
level: 1, // Top level employees (level 1)
|
|
70
|
+
children: buildHierarchy(employee), // Recursive call for next levels
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
// Filter employees based on matching direct_report and expert_firm_id with the parent
|
|
74
|
+
return employeeData.filter((employee) => {
|
|
75
|
+
return (parent === null ||
|
|
76
|
+
(employee.directReport === parent.employeeName &&
|
|
77
|
+
employee.expertFirmId === parent.expertFirmId));
|
|
78
|
+
}).map((employee) => ({
|
|
79
|
+
name: employee.employeeName,
|
|
80
|
+
position: employee.firmRole,
|
|
81
|
+
experience: employee.yearsWithFirm,
|
|
82
|
+
location: employee.employeeLocation,
|
|
83
|
+
initial: getInitial(employee.employeeName),
|
|
84
|
+
level: parent ? parent.level + 1 : 1, // Set level based on parent
|
|
85
|
+
children: buildHierarchy(employee), // Recursive call to get the next level of children
|
|
86
|
+
}));
|
|
87
|
+
};
|
|
88
|
+
// Start building hierarchy from null (the root level)
|
|
89
|
+
const transformedData = buildHierarchy(null);
|
|
90
|
+
return {
|
|
91
|
+
name: `${firstName} ${lastName}`,
|
|
92
|
+
position: primaryServiceLine,
|
|
93
|
+
experience: paroTenure,
|
|
94
|
+
location: `${city}, ${stateAbbreviation}`,
|
|
95
|
+
initial: firstName.charAt(0).toUpperCase(),
|
|
96
|
+
level: 0,
|
|
97
|
+
children: transformedData,
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
exports.transformEmployeeData = transformEmployeeData;
|
|
101
|
+
exports.ConnectorContainer = styled_components_1.default.div `
|
|
102
|
+
position: relative;
|
|
103
|
+
width: 100%;
|
|
104
|
+
display: flex;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
align-items: center;
|
|
107
|
+
|
|
108
|
+
&.parent-vertical-line {
|
|
109
|
+
height: 40px;
|
|
110
|
+
position: relative;
|
|
111
|
+
|
|
112
|
+
&:before {
|
|
113
|
+
content: '';
|
|
114
|
+
position: absolute;
|
|
115
|
+
top: 0;
|
|
116
|
+
left: 50%;
|
|
117
|
+
width: 2px;
|
|
118
|
+
height: calc(100% + 2px);
|
|
119
|
+
background-color: #D8D8D8;
|
|
120
|
+
transform: translateX(-50%);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&.child-vertical-line {
|
|
125
|
+
height: 40px;
|
|
126
|
+
position: relative;
|
|
127
|
+
margin-bottom: 4px;
|
|
128
|
+
&:before {
|
|
129
|
+
content: '';
|
|
130
|
+
position: absolute;
|
|
131
|
+
left: 50%;
|
|
132
|
+
width: 2px;
|
|
133
|
+
height: 100%;
|
|
134
|
+
background-color: #D8D8D8;
|
|
135
|
+
transform: translateX(-50%);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&:after {
|
|
139
|
+
content: '';
|
|
140
|
+
position: absolute;
|
|
141
|
+
bottom: -4px;
|
|
142
|
+
left: 50%;
|
|
143
|
+
width: 8px;
|
|
144
|
+
height: 8px;
|
|
145
|
+
border-right: 2px solid #D8D8D8;
|
|
146
|
+
border-bottom: 2px solid #D8D8D8;
|
|
147
|
+
transform: translateX(-50%) rotate(45deg);
|
|
148
|
+
background-color: transparent;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&.horizontal-line {
|
|
153
|
+
position: absolute;
|
|
154
|
+
height: 2px;
|
|
155
|
+
background-color: #D8D8D8;
|
|
156
|
+
top: 0;
|
|
157
|
+
width: 100%;
|
|
158
|
+
}
|
|
159
|
+
`;
|
|
160
|
+
exports.InfoCard = (0, styled_components_1.default)(core_1.Card) `
|
|
161
|
+
position: absolute;
|
|
162
|
+
top: 10;
|
|
163
|
+
right: 0;
|
|
164
|
+
width: fit-content;
|
|
165
|
+
max-width: 30%;
|
|
166
|
+
z-index: 1000;
|
|
167
|
+
padding: 8px;
|
|
168
|
+
margin: 16px;
|
|
169
|
+
background-color: white;
|
|
170
|
+
border-radius: 8px;
|
|
171
|
+
box-shadow: none;
|
|
172
|
+
border: 1px solid #e2e8f0;
|
|
173
|
+
max-height: 90vh;
|
|
174
|
+
overflow: auto;
|
|
175
|
+
@media (max-width: 600px) {
|
|
176
|
+
position: absolute;
|
|
177
|
+
top: 20;
|
|
178
|
+
right: auto;
|
|
179
|
+
min-width: 90%;
|
|
180
|
+
}
|
|
181
|
+
`;
|
|
182
|
+
exports.CustomDialog = (0, core_1.styled)(Dialog_1.default)(({ theme }) => ({
|
|
183
|
+
'& .MuiDialog-paper': {
|
|
184
|
+
backgroundColor: '#060821',
|
|
185
|
+
width: '90vw',
|
|
186
|
+
maxWidth: '90vw',
|
|
187
|
+
height: '90vh',
|
|
188
|
+
justifyContent: 'center',
|
|
189
|
+
alignItems: 'center',
|
|
190
|
+
overflow: 'hidden',
|
|
191
|
+
[theme.breakpoints.down('md')]: {
|
|
192
|
+
width: '100vw',
|
|
193
|
+
maxWidth: '100vw',
|
|
194
|
+
},
|
|
195
|
+
}
|
|
196
|
+
}));
|
|
197
|
+
const parseServices = (services) => {
|
|
198
|
+
var _a;
|
|
199
|
+
const uniqueArray = (_a = Array.from(new Set(services === null || services === void 0 ? void 0 : services.map(item => JSON.stringify(item))))) === null || _a === void 0 ? void 0 : _a.map(str => JSON.parse(str));
|
|
200
|
+
return uniqueArray;
|
|
201
|
+
};
|
|
202
|
+
exports.parseServices = parseServices;
|
|
203
|
+
const checkEmployeeLocation = (data) => {
|
|
204
|
+
let hasOffshore = false;
|
|
205
|
+
let hasOnshore = false;
|
|
206
|
+
data === null || data === void 0 ? void 0 : data.forEach(employee => {
|
|
207
|
+
var _a;
|
|
208
|
+
const location = (_a = employee === null || employee === void 0 ? void 0 : employee.employeeLocation) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
209
|
+
if (location === null || location === void 0 ? void 0 : location.includes("offshore")) {
|
|
210
|
+
hasOffshore = true;
|
|
211
|
+
}
|
|
212
|
+
if (location === null || location === void 0 ? void 0 : location.includes("onshore")) {
|
|
213
|
+
hasOnshore = true;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
if (hasOffshore && hasOnshore) {
|
|
217
|
+
return "Offshore & Onshore Team";
|
|
218
|
+
}
|
|
219
|
+
else if (hasOffshore) {
|
|
220
|
+
return "Offshore Team";
|
|
221
|
+
}
|
|
222
|
+
else if (hasOnshore) {
|
|
223
|
+
return "Onshore Team";
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
return "none";
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
exports.checkEmployeeLocation = checkEmployeeLocation;
|
|
230
|
+
const getTotalYearsWithFirm = (data) => {
|
|
231
|
+
return data === null || data === void 0 ? void 0 : data.reduce((total, employee) => total + employee.yearsWithFirm, 0);
|
|
232
|
+
};
|
|
233
|
+
exports.getTotalYearsWithFirm = getTotalYearsWithFirm;
|
|
@@ -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);
|
|
@@ -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;
|