@paro.io/expert-shared-components 1.12.34 → 1.12.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +2 -2
- package/lib/components/ClientReferencesSection/DeleteButton.js +11 -11
- package/lib/components/ClientReferencesSection/ParoError.js +10 -10
- package/lib/components/ClientReferencesSection/TagsSection.js +2 -2
- package/lib/components/ClientReferencesSection/styles/BrandedTypography.js +2 -2
- package/lib/components/ClientReferencesSection/styles/Buttons.js +15 -15
- package/lib/components/ClientReferencesSection/styles/Name.js +5 -5
- package/lib/components/ClientReferencesSection/styles/NullContentConditionalColor.js +4 -4
- package/lib/components/ClientReferencesSection/styles/SectionBody.js +11 -11
- package/lib/components/ClientReferencesSection/styles/SectionTitle.js +6 -6
- package/lib/components/ClientReferencesSection/styles/Tags.js +2 -2
- package/lib/components/DiscussionThread/chat.d.ts +22 -22
- package/lib/components/DiscussionThread/chat.js +106 -106
- package/lib/components/DocumentCenter/ClientDocumentsTable.d.ts +2 -1
- package/lib/components/DocumentCenter/ClientDocumentsTable.js +6 -5
- package/lib/components/DocumentCenter/DocumentCenter.d.ts +2 -1
- package/lib/components/DocumentCenter/DocumentCenter.js +2 -2
- package/lib/components/DocumentCenter/DocumentTable.d.ts +15 -15
- package/lib/components/DocumentCenter/DocumentTable.js +350 -350
- package/lib/components/DocumentCenter/UploadFilesButton.d.ts +6 -6
- package/lib/components/DocumentCenter/UploadFilesButton.js +29 -29
- package/lib/components/EarningsTracker/ActiveProjectCard.d.ts +52 -52
- package/lib/components/EarningsTracker/ActiveProjectCard.js +161 -161
- package/lib/components/EarningsTracker/CenterCardUI.d.ts +13 -13
- package/lib/components/EarningsTracker/CenterCardUI.js +134 -134
- package/lib/components/EarningsTracker/EarningsTracker.d.ts +52 -52
- package/lib/components/EarningsTracker/EarningsTracker.js +508 -508
- package/lib/components/EarningsTracker/EditDateModal.d.ts +22 -22
- package/lib/components/EarningsTracker/EditDateModal.js +149 -149
- package/lib/components/EarningsTracker/EmailModal.d.ts +14 -14
- package/lib/components/EarningsTracker/EmailModal.js +79 -79
- package/lib/components/EarningsTracker/EndProjectModal.d.ts +56 -56
- package/lib/components/EarningsTracker/EndProjectModal.js +221 -221
- package/lib/components/EarningsTracker/LeftCardUI.d.ts +18 -18
- package/lib/components/EarningsTracker/LeftCardUI.js +189 -189
- package/lib/components/EarningsTracker/LogTimeModalAuthenticated.d.ts +52 -52
- package/lib/components/EarningsTracker/LogTimeModalAuthenticated.js +358 -358
- package/lib/components/EarningsTracker/ProgressBar.d.ts +4 -4
- package/lib/components/EarningsTracker/ProgressBar.js +66 -66
- package/lib/components/EarningsTracker/ReviewRequestModal.d.ts +17 -17
- package/lib/components/EarningsTracker/ReviewRequestModal.js +135 -135
- package/lib/components/EarningsTracker/RightCardUI.d.ts +46 -46
- package/lib/components/EarningsTracker/RightCardUI.js +231 -231
- package/lib/components/EarningsTracker/index.d.ts +1 -1
- package/lib/components/EarningsTracker/index.js +5 -5
- package/lib/components/ExpertProfileHeader/ActionButtonSection.js +6 -6
- package/lib/components/ExpertProfileHeader/ProfileSection.js +7 -10
- package/lib/components/FileUploader/index.d.ts +10 -1
- package/lib/components/FileUploader/index.js +42 -14
- package/lib/components/Invoices/ClientDisputeProjectCard.d.ts +2 -1
- package/lib/components/Invoices/ClientDisputeProjectCard.js +11 -2
- package/lib/components/Invoices/DecisionSection.d.ts +2 -1
- package/lib/components/Invoices/DecisionSection.js +56 -25
- package/lib/components/Invoices/DisputeSection.d.ts +3 -1
- package/lib/components/Invoices/DisputeSection.js +13 -4
- package/lib/components/Invoices/InvoiceCard.d.ts +3 -1
- package/lib/components/Invoices/InvoiceCard.js +8 -5
- package/lib/components/Invoices/InvoiceDetails.js +2 -2
- package/lib/components/Invoices/TestDecisionSection.d.ts +1 -1
- package/lib/components/Invoices/TestDecisionSection.js +126 -126
- package/lib/components/OrganizationChart/OrganizationChart.d.ts +15 -15
- package/lib/components/OrganizationChart/OrganizationChart.js +312 -312
- package/lib/components/OrganizationChart/PersonCard.js +5 -5
- package/lib/components/OrganizationChart/utils.js +79 -79
- package/lib/components/ProjectCard/ProgressBar.js +4 -4
- package/lib/components/ProjectCard/ReviewRequestModal.js +5 -5
- package/lib/components/Reviews/Pagination.js +6 -6
- package/lib/components/ReviewsTab/RatingHeader.js +6 -6
- package/lib/components/ReviewsTab/expert-shared-components.code-workspace +20 -20
- package/lib/components/ReviewsTab/reviewRequestModal.js +5 -5
- package/lib/components/shared/Image.js +13 -13
- package/lib/components/shared/ProfileTextField.d.ts +18 -18
- package/lib/components/shared/ProfileTextField.js +16 -16
- package/lib/components/shared/StyledActionButtons.d.ts +7 -7
- package/lib/components/shared/StyledActionButtons.js +15 -15
- package/lib/components/shared/ToastNotification.d.ts +10 -10
- package/lib/components/shared/ToastNotification.js +63 -63
- package/lib/components/shared/utils.d.ts +1 -0
- package/lib/components/shared/utils.js +2 -1
- package/package.json +61 -61
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 Paro, Inc
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Paro, Inc
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
# expert-shared-components
|
|
2
|
-
Repository to store Components shared between the Expert Apps and Internal Apps
|
|
1
|
+
# expert-shared-components
|
|
2
|
+
Repository to store Components shared between the Expert Apps and Internal Apps
|
|
@@ -15,26 +15,26 @@ const omitDeleteButtonIconProps = ["isDisabled"];
|
|
|
15
15
|
const omitDeleteButtonTypographyProps = ["isDisabled"];
|
|
16
16
|
const DeleteButtonTypography = (0, styled_components_1.default)((props) => {
|
|
17
17
|
return react_1.default.createElement(Typography_1.default, Object.assign({}, (0, omit_1.default)(props, omitDeleteButtonTypographyProps)));
|
|
18
|
-
}) `
|
|
19
|
-
padding-right: 17px;
|
|
20
|
-
color: ${colors_1.default.deleteButtonRed} !important ;
|
|
18
|
+
}) `
|
|
19
|
+
padding-right: 17px;
|
|
20
|
+
color: ${colors_1.default.deleteButtonRed} !important ;
|
|
21
21
|
${({ isDisabled }) => {
|
|
22
22
|
return (isDisabled &&
|
|
23
|
-
`
|
|
24
|
-
color: ${colors_1.default.notice} !important;
|
|
23
|
+
`
|
|
24
|
+
color: ${colors_1.default.notice} !important;
|
|
25
25
|
`);
|
|
26
|
-
}}
|
|
26
|
+
}}
|
|
27
27
|
`;
|
|
28
28
|
const DeleteButtonIcon = (0, styled_components_1.default)((props) => {
|
|
29
29
|
return react_1.default.createElement(Clear_1.default, Object.assign({}, (0, omit_1.default)(props, omitDeleteButtonIconProps)));
|
|
30
|
-
}) `
|
|
31
|
-
color: ${colors_1.default.deleteButtonRed} !important ;
|
|
30
|
+
}) `
|
|
31
|
+
color: ${colors_1.default.deleteButtonRed} !important ;
|
|
32
32
|
${({ isDisabled }) => {
|
|
33
33
|
return (isDisabled &&
|
|
34
|
-
`
|
|
35
|
-
color: ${colors_1.default.notice} !important;
|
|
34
|
+
`
|
|
35
|
+
color: ${colors_1.default.notice} !important;
|
|
36
36
|
`);
|
|
37
|
-
}}
|
|
37
|
+
}}
|
|
38
38
|
`;
|
|
39
39
|
const DeleteButton = ({ buttonText, onClick, variant = "text", isDisabled, className }) => {
|
|
40
40
|
return (react_1.default.createElement(Buttons_1.StyledEditOrDeleteButton, { onClick: () => {
|
|
@@ -9,18 +9,18 @@ const core_1 = require("@material-ui/core");
|
|
|
9
9
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
10
10
|
const colors_1 = __importDefault(require("./constants/colors"));
|
|
11
11
|
const AlertSnackBarButton_1 = require("./AlertSnackBarButton");
|
|
12
|
-
const ErrorBox = (0, styled_components_1.default)(core_1.Box) `
|
|
13
|
-
width: 100%;
|
|
14
|
-
padding-bottom: 100;
|
|
12
|
+
const ErrorBox = (0, styled_components_1.default)(core_1.Box) `
|
|
13
|
+
width: 100%;
|
|
14
|
+
padding-bottom: 100;
|
|
15
15
|
`;
|
|
16
|
-
const ParoTitle = (0, styled_components_1.default)(core_1.Box) `
|
|
17
|
-
color: ${colors_1.default.paroBlack};
|
|
18
|
-
padding: 0px 0px 18px 0px;
|
|
16
|
+
const ParoTitle = (0, styled_components_1.default)(core_1.Box) `
|
|
17
|
+
color: ${colors_1.default.paroBlack};
|
|
18
|
+
padding: 0px 0px 18px 0px;
|
|
19
19
|
`;
|
|
20
|
-
const ParoSubtitle = styled_components_1.default.div `
|
|
21
|
-
color: ${colors_1.default.paroBlack};
|
|
22
|
-
margin-bottom: 24px;
|
|
23
|
-
font-size: 1rem;
|
|
20
|
+
const ParoSubtitle = styled_components_1.default.div `
|
|
21
|
+
color: ${colors_1.default.paroBlack};
|
|
22
|
+
margin-bottom: 24px;
|
|
23
|
+
font-size: 1rem;
|
|
24
24
|
`;
|
|
25
25
|
const ParoError = ({ handleClose }) => {
|
|
26
26
|
const handleCancelLanguage = handleClose ? "Close" : "Retry";
|
|
@@ -9,8 +9,8 @@ const core_1 = require("@material-ui/core");
|
|
|
9
9
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
10
10
|
const NullContentConditionalColor_1 = require("./styles/NullContentConditionalColor");
|
|
11
11
|
const Tags_1 = require("./styles/Tags");
|
|
12
|
-
const ProfileTags = (0, styled_components_1.default)(Tags_1.Tags) `
|
|
13
|
-
margin: 0 5px 8px 0;
|
|
12
|
+
const ProfileTags = (0, styled_components_1.default)(Tags_1.Tags) `
|
|
13
|
+
margin: 0 5px 8px 0;
|
|
14
14
|
`;
|
|
15
15
|
const TagsSection = ({ multiLine, tags = [], tagsExpected, }) => {
|
|
16
16
|
if ((tags === null || tags === void 0 ? void 0 : tags.length) < 1) {
|
|
@@ -7,6 +7,6 @@ exports.StyledTypography = void 0;
|
|
|
7
7
|
const Typography_1 = __importDefault(require("@material-ui/core/Typography"));
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
9
|
const colors_1 = __importDefault(require("../constants/colors"));
|
|
10
|
-
exports.StyledTypography = (0, styled_components_1.default)(Typography_1.default) `
|
|
11
|
-
color: ${colors_1.default.paroDeepblue} !important ;
|
|
10
|
+
exports.StyledTypography = (0, styled_components_1.default)(Typography_1.default) `
|
|
11
|
+
color: ${colors_1.default.paroDeepblue} !important ;
|
|
12
12
|
`;
|
|
@@ -7,21 +7,21 @@ exports.StyledEditOrDeleteButton = exports.HeaderButtonUnderline = exports.Heade
|
|
|
7
7
|
const core_1 = require("@material-ui/core");
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
9
|
const colors_1 = __importDefault(require("../constants/colors"));
|
|
10
|
-
exports.HeaderButtons = (0, styled_components_1.default)(core_1.Button) `
|
|
11
|
-
margin-left: 0px !important;
|
|
12
|
-
padding-left: 0px !important;
|
|
13
|
-
span {
|
|
14
|
-
color: ${colors_1.default.buttonText} !important;
|
|
15
|
-
}
|
|
10
|
+
exports.HeaderButtons = (0, styled_components_1.default)(core_1.Button) `
|
|
11
|
+
margin-left: 0px !important;
|
|
12
|
+
padding-left: 0px !important;
|
|
13
|
+
span {
|
|
14
|
+
color: ${colors_1.default.buttonText} !important;
|
|
15
|
+
}
|
|
16
16
|
`;
|
|
17
|
-
exports.HeaderButtonUnderline = (0, styled_components_1.default)(exports.HeaderButtons) `
|
|
18
|
-
text-decoration: underline;
|
|
17
|
+
exports.HeaderButtonUnderline = (0, styled_components_1.default)(exports.HeaderButtons) `
|
|
18
|
+
text-decoration: underline;
|
|
19
19
|
`;
|
|
20
|
-
exports.StyledEditOrDeleteButton = (0, styled_components_1.default)(core_1.Button) `
|
|
21
|
-
margin: 10px 0px !important;
|
|
22
|
-
background-color: ${colors_1.default.primary};
|
|
23
|
-
color: ${colors_1.default.white};
|
|
24
|
-
:hover {
|
|
25
|
-
color: ${colors_1.default.primary} !important;
|
|
26
|
-
}
|
|
20
|
+
exports.StyledEditOrDeleteButton = (0, styled_components_1.default)(core_1.Button) `
|
|
21
|
+
margin: 10px 0px !important;
|
|
22
|
+
background-color: ${colors_1.default.primary};
|
|
23
|
+
color: ${colors_1.default.white};
|
|
24
|
+
:hover {
|
|
25
|
+
color: ${colors_1.default.primary} !important;
|
|
26
|
+
}
|
|
27
27
|
`;
|
|
@@ -11,12 +11,12 @@ const styled_components_1 = __importDefault(require("styled-components"));
|
|
|
11
11
|
const colors_1 = __importDefault(require("../constants/colors"));
|
|
12
12
|
exports.Name = (0, styled_components_1.default)((props) => {
|
|
13
13
|
return react_1.default.createElement(core_1.Typography, Object.assign({}, (0, omit_1.default)(props, ["isNull"])));
|
|
14
|
-
}) `
|
|
15
|
-
font-family: Roboto-Bold;
|
|
14
|
+
}) `
|
|
15
|
+
font-family: Roboto-Bold;
|
|
16
16
|
${({ isNull }) => {
|
|
17
17
|
return (isNull &&
|
|
18
|
-
`
|
|
19
|
-
color: ${colors_1.default.paroRed} !important;
|
|
18
|
+
`
|
|
19
|
+
color: ${colors_1.default.paroRed} !important;
|
|
20
20
|
`);
|
|
21
|
-
}}
|
|
21
|
+
}}
|
|
22
22
|
`;
|
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.NullContentConditionalColor = void 0;
|
|
7
7
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
8
|
const colors_1 = __importDefault(require("../constants/colors"));
|
|
9
|
-
exports.NullContentConditionalColor = styled_components_1.default.span `
|
|
9
|
+
exports.NullContentConditionalColor = styled_components_1.default.span `
|
|
10
10
|
${(props) => {
|
|
11
11
|
return (props.isNull &&
|
|
12
|
-
`
|
|
13
|
-
color: ${colors_1.default.paroRed} !important
|
|
12
|
+
`
|
|
13
|
+
color: ${colors_1.default.paroRed} !important
|
|
14
14
|
`);
|
|
15
|
-
}}
|
|
15
|
+
}}
|
|
16
16
|
`;
|
|
@@ -10,18 +10,18 @@ const styled_components_1 = __importDefault(require("styled-components"));
|
|
|
10
10
|
const colors_1 = __importDefault(require("../constants/colors"));
|
|
11
11
|
exports.SectionBody = (0, styled_components_1.default)((props) => {
|
|
12
12
|
return react_1.default.createElement("div", Object.assign({}, (0, omit_1.default)(props, ["atLeastOneValueIsNull"])));
|
|
13
|
-
}) `
|
|
14
|
-
background-color: ${colors_1.default.white};
|
|
15
|
-
border-radius: 2px;
|
|
16
|
-
border: 1px Solid ${colors_1.default.lightGray};
|
|
17
|
-
color: ${colors_1.default.paroBlack};
|
|
18
|
-
font-family: Roboto;
|
|
19
|
-
padding: 32.5px 42.5px 32.5px 42.5px;
|
|
20
|
-
width: 100%;
|
|
13
|
+
}) `
|
|
14
|
+
background-color: ${colors_1.default.white};
|
|
15
|
+
border-radius: 2px;
|
|
16
|
+
border: 1px Solid ${colors_1.default.lightGray};
|
|
17
|
+
color: ${colors_1.default.paroBlack};
|
|
18
|
+
font-family: Roboto;
|
|
19
|
+
padding: 32.5px 42.5px 32.5px 42.5px;
|
|
20
|
+
width: 100%;
|
|
21
21
|
${({ atLeastOneValueIsNull }) => {
|
|
22
22
|
return (atLeastOneValueIsNull &&
|
|
23
|
-
`
|
|
24
|
-
border-color: ${colors_1.default.paroRed} !important;
|
|
23
|
+
`
|
|
24
|
+
border-color: ${colors_1.default.paroRed} !important;
|
|
25
25
|
`);
|
|
26
|
-
}}
|
|
26
|
+
}}
|
|
27
27
|
`;
|
|
@@ -10,12 +10,12 @@ const styled_components_1 = __importDefault(require("styled-components"));
|
|
|
10
10
|
const colors_1 = __importDefault(require("../constants/colors"));
|
|
11
11
|
exports.SectionTitle = (0, styled_components_1.default)((props) => {
|
|
12
12
|
return react_1.default.createElement("div", Object.assign({}, (0, omit_1.default)(props, ["noBottomPadding"])));
|
|
13
|
-
}) `
|
|
14
|
-
font-family: Roboto-Bold;
|
|
15
|
-
font-size: 20px;
|
|
16
|
-
color: ${colors_1.default.paroBlack};
|
|
17
|
-
padding: 23px 0px 15.5px 0px;
|
|
13
|
+
}) `
|
|
14
|
+
font-family: Roboto-Bold;
|
|
15
|
+
font-size: 20px;
|
|
16
|
+
color: ${colors_1.default.paroBlack};
|
|
17
|
+
padding: 23px 0px 15.5px 0px;
|
|
18
18
|
${({ noBottomPadding }) => {
|
|
19
19
|
return noBottomPadding && "padding-bottom: 0 !important;";
|
|
20
|
-
}}
|
|
20
|
+
}}
|
|
21
21
|
`;
|
|
@@ -6,6 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Tags = void 0;
|
|
7
7
|
const core_1 = require("@material-ui/core");
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
exports.Tags = (0, styled_components_1.default)(core_1.Chip) `
|
|
10
|
-
font-family: Roboto-Bold;
|
|
9
|
+
exports.Tags = (0, styled_components_1.default)(core_1.Chip) `
|
|
10
|
+
font-family: Roboto-Bold;
|
|
11
11
|
`;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface ChatProps {
|
|
3
|
-
currentUser: {
|
|
4
|
-
id: number;
|
|
5
|
-
name: string;
|
|
6
|
-
avatar: null;
|
|
7
|
-
};
|
|
8
|
-
initialThreads: {
|
|
9
|
-
id: number;
|
|
10
|
-
content: string;
|
|
11
|
-
sender: {
|
|
12
|
-
id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
avatar: string | null;
|
|
15
|
-
};
|
|
16
|
-
timestamp: string;
|
|
17
|
-
isCurrentUser: boolean;
|
|
18
|
-
}[] | [];
|
|
19
|
-
updateChatMutation: () => void;
|
|
20
|
-
}
|
|
21
|
-
export declare const Chat: ({ currentUser, initialThreads, updateChatMutation, }: ChatProps) => React.JSX.Element;
|
|
22
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ChatProps {
|
|
3
|
+
currentUser: {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
avatar: null;
|
|
7
|
+
};
|
|
8
|
+
initialThreads: {
|
|
9
|
+
id: number;
|
|
10
|
+
content: string;
|
|
11
|
+
sender: {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
avatar: string | null;
|
|
15
|
+
};
|
|
16
|
+
timestamp: string;
|
|
17
|
+
isCurrentUser: boolean;
|
|
18
|
+
}[] | [];
|
|
19
|
+
updateChatMutation: () => void;
|
|
20
|
+
}
|
|
21
|
+
export declare const Chat: ({ currentUser, initialThreads, updateChatMutation, }: ChatProps) => React.JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Chat = void 0;
|
|
27
|
-
const base_ui_1 = require("@paro.io/base-ui");
|
|
28
|
-
const react_1 = __importStar(require("react"));
|
|
29
|
-
const Chat = ({ currentUser, initialThreads, updateChatMutation, }) => {
|
|
30
|
-
const [messages, setMessages] = (0, react_1.useState)(initialThreads);
|
|
31
|
-
const [comment, setComment] = (0, react_1.useState)("");
|
|
32
|
-
const threadsEndRef = (0, react_1.useRef)(null);
|
|
33
|
-
const [invalid, setInvalid] = (0, react_1.useState)(false);
|
|
34
|
-
// Auto scroll to bottom when messages change
|
|
35
|
-
(0, react_1.useEffect)(() => {
|
|
36
|
-
var _a;
|
|
37
|
-
(_a = threadsEndRef.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
|
|
38
|
-
}, [messages]);
|
|
39
|
-
const handleSend = () => {
|
|
40
|
-
setInvalid(false);
|
|
41
|
-
if (comment) {
|
|
42
|
-
updateChatMutation();
|
|
43
|
-
handleSendMessage();
|
|
44
|
-
setComment("");
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
setInvalid(true);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
// Handle sending a new message
|
|
51
|
-
const handleSendMessage = () => {
|
|
52
|
-
const newMsg = {
|
|
53
|
-
id: Date.now(),
|
|
54
|
-
content: comment,
|
|
55
|
-
sender: Object.assign(Object.assign({}, currentUser), { id: currentUser.id.toString() }),
|
|
56
|
-
timestamp: new Date().toISOString(),
|
|
57
|
-
isCurrentUser: true
|
|
58
|
-
};
|
|
59
|
-
setMessages([...messages, newMsg]);
|
|
60
|
-
setComment("");
|
|
61
|
-
};
|
|
62
|
-
// Handle key press (send on Enter)
|
|
63
|
-
const handleKeyPress = (e) => {
|
|
64
|
-
if (e.key === "Enter" && !e.shiftKey) {
|
|
65
|
-
e.preventDefault();
|
|
66
|
-
handleSend();
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
// Format timestamp
|
|
70
|
-
const formatTime = (timestamp) => {
|
|
71
|
-
const date = new Date(timestamp);
|
|
72
|
-
return date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) +
|
|
73
|
-
' · ' + date.toLocaleDateString([], { month: 'short', day: 'numeric', year: 'numeric' });
|
|
74
|
-
};
|
|
75
|
-
// Get initials for avatar
|
|
76
|
-
const getInitials = (name) => {
|
|
77
|
-
return name
|
|
78
|
-
.split(' ')
|
|
79
|
-
.map(word => word[0])
|
|
80
|
-
.join('')
|
|
81
|
-
.toUpperCase()
|
|
82
|
-
.substring(0, 2);
|
|
83
|
-
};
|
|
84
|
-
return (react_1.default.createElement("div", { className: "flex flex-col w-full rounded-lg bg-white px-4 h-auto" },
|
|
85
|
-
react_1.default.createElement("div", { className: `py-3 flex items-center` },
|
|
86
|
-
react_1.default.createElement("div", { className: "font-semibold text-gray-800 capitalize" }, "Discussion Thread")),
|
|
87
|
-
react_1.default.createElement("div", { className: "flex-1 max-h-[30vh] overflow-y-auto border rounded-md p-2" },
|
|
88
|
-
messages.map((message) => {
|
|
89
|
-
var _a, _b, _c;
|
|
90
|
-
return (react_1.default.createElement("div", { key: message.id, className: `flex mb-4 ${message.isCurrentUser ? 'justify-end' : 'justify-start'}` },
|
|
91
|
-
!message.isCurrentUser && (react_1.default.createElement("div", { className: "flex-shrink-0 mr-2" }, ((_a = message.sender) === null || _a === void 0 ? void 0 : _a.avatar) ? (react_1.default.createElement("img", { src: message.sender.avatar, alt: message.sender.name, className: "h-8 w-8 rounded-full" })) : (react_1.default.createElement("div", { className: `h-8 w-8 rounded-full bg-gray-400 flex items-center justify-center text-white text-xs font-medium ${message.isCurrentUser ? 'bg-[#255b5c]' : 'bg-[#5f4508]'}` }, getInitials(((_b = message.sender) === null || _b === void 0 ? void 0 : _b.name) || 'User'))))),
|
|
92
|
-
react_1.default.createElement("div", { className: `${message.isCurrentUser ? 'order-1' : 'order-2'} ml-1 min-w-min max-w-[75%]` },
|
|
93
|
-
!message.isCurrentUser && (react_1.default.createElement("div", { className: "text-xs text-gray-500 font-medium mb-1" }, ((_c = message.sender) === null || _c === void 0 ? void 0 : _c.name) || 'Unknown User')),
|
|
94
|
-
react_1.default.createElement("div", { className: `px-4 py-2 rounded-lg ${message.isCurrentUser
|
|
95
|
-
? 'bg-[#dbefef] rounded-br-none'
|
|
96
|
-
: 'bg-[#f9d8a7] border rounded-bl-none'}` }, message.content),
|
|
97
|
-
react_1.default.createElement("div", { className: "text-xs text-gray-500 mt-1" }, formatTime(message.timestamp))),
|
|
98
|
-
message.isCurrentUser && (react_1.default.createElement("div", { className: "flex-shrink-0 ml-2" }, (currentUser === null || currentUser === void 0 ? void 0 : currentUser.avatar) ? (react_1.default.createElement("img", { src: currentUser.avatar, alt: currentUser.name, className: "h-8 w-8 rounded-full" })) : (react_1.default.createElement("div", { className: "h-8 w-8 rounded-full bg-blue-400 flex items-center justify-center text-white text-xs font-medium" }, getInitials((currentUser === null || currentUser === void 0 ? void 0 : currentUser.name) || 'You')))))));
|
|
99
|
-
}),
|
|
100
|
-
react_1.default.createElement("div", { ref: threadsEndRef })),
|
|
101
|
-
react_1.default.createElement("div", { className: "py-3" },
|
|
102
|
-
react_1.default.createElement("div", { className: "flex items-center" },
|
|
103
|
-
react_1.default.createElement("textarea", { value: comment, onChange: (e) => setComment(e.target.value), onKeyDown: handleKeyPress, placeholder: "Type your message here...", className: "flex-1 border rounded-lg px-3 py-2 resize-none focus:outline-none focus:ring-2 focus:ring-blue-500", rows: 1 }),
|
|
104
|
-
react_1.default.createElement(base_ui_1.Button, { label: "Send", onClick: handleSend, disabled: !comment.trim(), color: "primary", className: "ml-2 px-4 py-2" })))));
|
|
105
|
-
};
|
|
106
|
-
exports.Chat = Chat;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Chat = void 0;
|
|
27
|
+
const base_ui_1 = require("@paro.io/base-ui");
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
29
|
+
const Chat = ({ currentUser, initialThreads, updateChatMutation, }) => {
|
|
30
|
+
const [messages, setMessages] = (0, react_1.useState)(initialThreads);
|
|
31
|
+
const [comment, setComment] = (0, react_1.useState)("");
|
|
32
|
+
const threadsEndRef = (0, react_1.useRef)(null);
|
|
33
|
+
const [invalid, setInvalid] = (0, react_1.useState)(false);
|
|
34
|
+
// Auto scroll to bottom when messages change
|
|
35
|
+
(0, react_1.useEffect)(() => {
|
|
36
|
+
var _a;
|
|
37
|
+
(_a = threadsEndRef.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
|
|
38
|
+
}, [messages]);
|
|
39
|
+
const handleSend = () => {
|
|
40
|
+
setInvalid(false);
|
|
41
|
+
if (comment) {
|
|
42
|
+
updateChatMutation();
|
|
43
|
+
handleSendMessage();
|
|
44
|
+
setComment("");
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
setInvalid(true);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
// Handle sending a new message
|
|
51
|
+
const handleSendMessage = () => {
|
|
52
|
+
const newMsg = {
|
|
53
|
+
id: Date.now(),
|
|
54
|
+
content: comment,
|
|
55
|
+
sender: Object.assign(Object.assign({}, currentUser), { id: currentUser.id.toString() }),
|
|
56
|
+
timestamp: new Date().toISOString(),
|
|
57
|
+
isCurrentUser: true
|
|
58
|
+
};
|
|
59
|
+
setMessages([...messages, newMsg]);
|
|
60
|
+
setComment("");
|
|
61
|
+
};
|
|
62
|
+
// Handle key press (send on Enter)
|
|
63
|
+
const handleKeyPress = (e) => {
|
|
64
|
+
if (e.key === "Enter" && !e.shiftKey) {
|
|
65
|
+
e.preventDefault();
|
|
66
|
+
handleSend();
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
// Format timestamp
|
|
70
|
+
const formatTime = (timestamp) => {
|
|
71
|
+
const date = new Date(timestamp);
|
|
72
|
+
return date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) +
|
|
73
|
+
' · ' + date.toLocaleDateString([], { month: 'short', day: 'numeric', year: 'numeric' });
|
|
74
|
+
};
|
|
75
|
+
// Get initials for avatar
|
|
76
|
+
const getInitials = (name) => {
|
|
77
|
+
return name
|
|
78
|
+
.split(' ')
|
|
79
|
+
.map(word => word[0])
|
|
80
|
+
.join('')
|
|
81
|
+
.toUpperCase()
|
|
82
|
+
.substring(0, 2);
|
|
83
|
+
};
|
|
84
|
+
return (react_1.default.createElement("div", { className: "flex flex-col w-full rounded-lg bg-white px-4 h-auto" },
|
|
85
|
+
react_1.default.createElement("div", { className: `py-3 flex items-center` },
|
|
86
|
+
react_1.default.createElement("div", { className: "font-semibold text-gray-800 capitalize" }, "Discussion Thread")),
|
|
87
|
+
react_1.default.createElement("div", { className: "flex-1 max-h-[30vh] overflow-y-auto border rounded-md p-2" },
|
|
88
|
+
messages.map((message) => {
|
|
89
|
+
var _a, _b, _c;
|
|
90
|
+
return (react_1.default.createElement("div", { key: message.id, className: `flex mb-4 ${message.isCurrentUser ? 'justify-end' : 'justify-start'}` },
|
|
91
|
+
!message.isCurrentUser && (react_1.default.createElement("div", { className: "flex-shrink-0 mr-2" }, ((_a = message.sender) === null || _a === void 0 ? void 0 : _a.avatar) ? (react_1.default.createElement("img", { src: message.sender.avatar, alt: message.sender.name, className: "h-8 w-8 rounded-full" })) : (react_1.default.createElement("div", { className: `h-8 w-8 rounded-full bg-gray-400 flex items-center justify-center text-white text-xs font-medium ${message.isCurrentUser ? 'bg-[#255b5c]' : 'bg-[#5f4508]'}` }, getInitials(((_b = message.sender) === null || _b === void 0 ? void 0 : _b.name) || 'User'))))),
|
|
92
|
+
react_1.default.createElement("div", { className: `${message.isCurrentUser ? 'order-1' : 'order-2'} ml-1 min-w-min max-w-[75%]` },
|
|
93
|
+
!message.isCurrentUser && (react_1.default.createElement("div", { className: "text-xs text-gray-500 font-medium mb-1" }, ((_c = message.sender) === null || _c === void 0 ? void 0 : _c.name) || 'Unknown User')),
|
|
94
|
+
react_1.default.createElement("div", { className: `px-4 py-2 rounded-lg ${message.isCurrentUser
|
|
95
|
+
? 'bg-[#dbefef] rounded-br-none'
|
|
96
|
+
: 'bg-[#f9d8a7] border rounded-bl-none'}` }, message.content),
|
|
97
|
+
react_1.default.createElement("div", { className: "text-xs text-gray-500 mt-1" }, formatTime(message.timestamp))),
|
|
98
|
+
message.isCurrentUser && (react_1.default.createElement("div", { className: "flex-shrink-0 ml-2" }, (currentUser === null || currentUser === void 0 ? void 0 : currentUser.avatar) ? (react_1.default.createElement("img", { src: currentUser.avatar, alt: currentUser.name, className: "h-8 w-8 rounded-full" })) : (react_1.default.createElement("div", { className: "h-8 w-8 rounded-full bg-blue-400 flex items-center justify-center text-white text-xs font-medium" }, getInitials((currentUser === null || currentUser === void 0 ? void 0 : currentUser.name) || 'You')))))));
|
|
99
|
+
}),
|
|
100
|
+
react_1.default.createElement("div", { ref: threadsEndRef })),
|
|
101
|
+
react_1.default.createElement("div", { className: "py-3" },
|
|
102
|
+
react_1.default.createElement("div", { className: "flex items-center" },
|
|
103
|
+
react_1.default.createElement("textarea", { value: comment, onChange: (e) => setComment(e.target.value), onKeyDown: handleKeyPress, placeholder: "Type your message here...", className: "flex-1 border rounded-lg px-3 py-2 resize-none focus:outline-none focus:ring-2 focus:ring-blue-500", rows: 1 }),
|
|
104
|
+
react_1.default.createElement(base_ui_1.Button, { label: "Send", onClick: handleSend, disabled: !comment.trim(), color: "primary", className: "ml-2 px-4 py-2" })))));
|
|
105
|
+
};
|
|
106
|
+
exports.Chat = Chat;
|
|
@@ -16,6 +16,7 @@ interface ClientDocumentTableProps {
|
|
|
16
16
|
documentUploadUrl?: string;
|
|
17
17
|
downloadDocumentUrl?: string;
|
|
18
18
|
clientId?: number;
|
|
19
|
+
stage?: string;
|
|
19
20
|
}
|
|
20
|
-
export declare const ClientDocumentsTable: ({ legacyFreelancerId, expertFiles, setExpertClientFiles, clientAndProjectsList, uploadExpertClientFiles, paroDocuments, freelancerName, freelancerEmail, updateFileLastViewed, deleteExpertClientFile, getFileLazyQuery, expertClientFilesLazyQuery, isClientPortal, documentUploadUrl, downloadDocumentUrl, clientId }: ClientDocumentTableProps) => JSX.Element;
|
|
21
|
+
export declare const ClientDocumentsTable: ({ legacyFreelancerId, expertFiles, setExpertClientFiles, clientAndProjectsList, uploadExpertClientFiles, paroDocuments, freelancerName, freelancerEmail, updateFileLastViewed, deleteExpertClientFile, getFileLazyQuery, expertClientFilesLazyQuery, isClientPortal, documentUploadUrl, downloadDocumentUrl, clientId, stage }: ClientDocumentTableProps) => JSX.Element;
|
|
21
22
|
export {};
|
|
@@ -135,7 +135,7 @@ const getKeyByValue = (object, value) => {
|
|
|
135
135
|
}
|
|
136
136
|
return Object.keys(object).find(key => object[key] === value);
|
|
137
137
|
};
|
|
138
|
-
const ClientDocumentsTable = ({ legacyFreelancerId, expertFiles, setExpertClientFiles, clientAndProjectsList, uploadExpertClientFiles, paroDocuments, freelancerName, freelancerEmail, updateFileLastViewed, deleteExpertClientFile, getFileLazyQuery, expertClientFilesLazyQuery, isClientPortal, documentUploadUrl, downloadDocumentUrl, clientId }) => {
|
|
138
|
+
const ClientDocumentsTable = ({ legacyFreelancerId, expertFiles, setExpertClientFiles, clientAndProjectsList, uploadExpertClientFiles, paroDocuments, freelancerName, freelancerEmail, updateFileLastViewed, deleteExpertClientFile, getFileLazyQuery, expertClientFilesLazyQuery, isClientPortal, documentUploadUrl, downloadDocumentUrl, clientId, stage }) => {
|
|
139
139
|
const classes = (0, exports.useStyles)();
|
|
140
140
|
const [order, setOrder] = react_1.default.useState('desc');
|
|
141
141
|
const [orderBy, setOrderBy] = react_1.default.useState('lastViewed');
|
|
@@ -304,12 +304,13 @@ const ClientDocumentsTable = ({ legacyFreelancerId, expertFiles, setExpertClient
|
|
|
304
304
|
setFileId(null);
|
|
305
305
|
});
|
|
306
306
|
};
|
|
307
|
-
const handleDownloadFile = (fileName, fileId, projectId, docSize) => __awaiter(void 0, void 0, void 0, function* () {
|
|
307
|
+
const handleDownloadFile = (fileName, fileId, projectId, docSize, docType) => __awaiter(void 0, void 0, void 0, function* () {
|
|
308
308
|
(0, utils_1.showToast)('success', 'Starting File Download...');
|
|
309
309
|
fileId && setFileId(fileId);
|
|
310
|
+
const bucketName = docType === 'Dispute Documents' ? `expert-client-dispute-files${!stage || stage === 'dev' ? '' : `-${stage}`}` : `expert-client-files-${stage}`;
|
|
310
311
|
if (docSize >= 5) {
|
|
311
312
|
const downloadFileName = `project-${projectId}/${fileName}`;
|
|
312
|
-
const downloadClient = new DownloadClient_1.default({ downloadDocumentUrl: downloadDocumentUrl, fileKey: downloadFileName });
|
|
313
|
+
const downloadClient = new DownloadClient_1.default({ downloadDocumentUrl: downloadDocumentUrl, fileKey: downloadFileName, bucketName: bucketName });
|
|
313
314
|
const downloadData = yield downloadClient.downloadDocument();
|
|
314
315
|
(0, utils_1.handleDownloadPdf)({ fileData: downloadData, downloadFilename: fileName, streamData: true });
|
|
315
316
|
updateLastViewed();
|
|
@@ -355,7 +356,7 @@ const ClientDocumentsTable = ({ legacyFreelancerId, expertFiles, setExpertClient
|
|
|
355
356
|
return (react_1.default.createElement(core_1.TableRow, { key: fileId },
|
|
356
357
|
react_1.default.createElement(core_1.TableCell, { className: classes.tableCell, align: "center" }, index + 1),
|
|
357
358
|
react_1.default.createElement(core_1.TableCell, { className: classes.tableCell, align: "center" },
|
|
358
|
-
react_1.default.createElement("a", { onClick: () => handleDownloadFile(fileName, fileId, projectId, docSize), style: {
|
|
359
|
+
react_1.default.createElement("a", { onClick: () => handleDownloadFile(fileName, fileId, projectId, docSize, docType), style: {
|
|
359
360
|
color: 'blue',
|
|
360
361
|
textDecoration: 'underline',
|
|
361
362
|
cursor: 'pointer',
|
|
@@ -373,7 +374,7 @@ const ClientDocumentsTable = ({ legacyFreelancerId, expertFiles, setExpertClient
|
|
|
373
374
|
react_1.default.createElement(core_1.TableCell, { className: classes.tableCell },
|
|
374
375
|
react_1.default.createElement(core_1.Grid, { item: true, container: true, direction: "row", justify: "space-evenly", alignItems: "center" },
|
|
375
376
|
react_1.default.createElement(core_1.Tooltip, { arrow: true, placement: "top", interactive: true, className: "whitespace-nowrap", title: "Download Document" },
|
|
376
|
-
react_1.default.createElement(core_1.IconButton, { onClick: () => __awaiter(void 0, void 0, void 0, function* () { return handleDownloadFile(fileName, fileId, projectId, docSize); }) },
|
|
377
|
+
react_1.default.createElement(core_1.IconButton, { onClick: () => __awaiter(void 0, void 0, void 0, function* () { return handleDownloadFile(fileName, fileId, projectId, docSize, docType); }) },
|
|
377
378
|
" ",
|
|
378
379
|
react_1.default.createElement(base_icons_1.IconDocumentDownload, { size: "sm" }),
|
|
379
380
|
" ")),
|
|
@@ -23,6 +23,7 @@ interface DocumentCenterProps {
|
|
|
23
23
|
downloadDocumentUrl?: string;
|
|
24
24
|
loading?: boolean;
|
|
25
25
|
clientId?: number;
|
|
26
|
+
stage?: string;
|
|
26
27
|
}
|
|
27
|
-
export declare const DocumentCenter: ({ legacyFreelancerId, openModal, setOpenModal, expertClientFilesLazyQuery, getClientAndProjectsLazyQuery, clientFilesData, uploadExpertClientFiles, uploadFileData, deleteFileMutation, updateFreelancerExpiryMutation, foldername, getFilesLazyQuery, getFileLazyQuery, freelancerName, freelancerEmail, updateFileLastViewed, deleteExpertClientFile, isClientPortal, expertProjectsList, getFreelancerLazyQuery, documentUploadUrl, downloadDocumentUrl, clientId, loading, }: DocumentCenterProps) => JSX.Element;
|
|
28
|
+
export declare const DocumentCenter: ({ legacyFreelancerId, openModal, setOpenModal, expertClientFilesLazyQuery, getClientAndProjectsLazyQuery, clientFilesData, uploadExpertClientFiles, uploadFileData, deleteFileMutation, updateFreelancerExpiryMutation, foldername, getFilesLazyQuery, getFileLazyQuery, freelancerName, freelancerEmail, updateFileLastViewed, deleteExpertClientFile, isClientPortal, expertProjectsList, getFreelancerLazyQuery, documentUploadUrl, downloadDocumentUrl, clientId, loading, stage, }: DocumentCenterProps) => JSX.Element;
|
|
28
29
|
export {};
|
|
@@ -80,7 +80,7 @@ const CustomDialogContent = (0, core_1.styled)(core_1.DialogContent)(({ theme })
|
|
|
80
80
|
background: '#707070',
|
|
81
81
|
},
|
|
82
82
|
}));
|
|
83
|
-
const DocumentCenter = ({ legacyFreelancerId, openModal, setOpenModal, expertClientFilesLazyQuery, getClientAndProjectsLazyQuery, clientFilesData, uploadExpertClientFiles, uploadFileData, deleteFileMutation, updateFreelancerExpiryMutation, foldername, getFilesLazyQuery, getFileLazyQuery, freelancerName, freelancerEmail, updateFileLastViewed, deleteExpertClientFile, isClientPortal = false, expertProjectsList, getFreelancerLazyQuery, documentUploadUrl, downloadDocumentUrl, clientId, loading = false, }) => {
|
|
83
|
+
const DocumentCenter = ({ legacyFreelancerId, openModal, setOpenModal, expertClientFilesLazyQuery, getClientAndProjectsLazyQuery, clientFilesData, uploadExpertClientFiles, uploadFileData, deleteFileMutation, updateFreelancerExpiryMutation, foldername, getFilesLazyQuery, getFileLazyQuery, freelancerName, freelancerEmail, updateFileLastViewed, deleteExpertClientFile, isClientPortal = false, expertProjectsList, getFreelancerLazyQuery, documentUploadUrl, downloadDocumentUrl, clientId, loading = false, stage = 'dev', }) => {
|
|
84
84
|
var _a;
|
|
85
85
|
const [value, setValue] = (0, react_1.useState)(0);
|
|
86
86
|
const [expertClientFiles, setExpertClientFiles] = (0, react_1.useState)(clientFilesData !== null && clientFilesData !== void 0 ? clientFilesData : []);
|
|
@@ -175,7 +175,7 @@ const DocumentCenter = ({ legacyFreelancerId, openModal, setOpenModal, expertCli
|
|
|
175
175
|
react_1.default.createElement("b", null, value === 0 ? ((expertClientFiles === null || expertClientFiles === void 0 ? void 0 : expertClientFiles.length) ? (_a = expertClientFiles === null || expertClientFiles === void 0 ? void 0 : expertClientFiles.filter((file) => !(file === null || file === void 0 ? void 0 : file.lastViewed))) === null || _a === void 0 ? void 0 : _a.length : 0) : expertFiles === null || expertFiles === void 0 ? void 0 : expertFiles.length),
|
|
176
176
|
" Documents Unread")))),
|
|
177
177
|
react_1.default.createElement(lab_1.TabPanel, { value: '0', style: { paddingTop: '0px' } },
|
|
178
|
-
react_1.default.createElement(ClientDocumentsTable_1.ClientDocumentsTable, { legacyFreelancerId: legacyFreelancerId, expertFiles: expertClientFiles, setExpertClientFiles: setExpertClientFiles, clientAndProjectsList: clientAndProjects, uploadExpertClientFiles: uploadExpertClientFiles, updateFileLastViewed: updateFileLastViewed, deleteExpertClientFile: deleteExpertClientFile, paroDocuments: false, freelancerName: freelancerName !== null && freelancerName !== void 0 ? freelancerName : '', freelancerEmail: freelancerEmail !== null && freelancerEmail !== void 0 ? freelancerEmail : '', getFileLazyQuery: getFileLazyQuery, expertClientFilesLazyQuery: expertClientFilesLazyQuery, isClientPortal: isClientPortal, documentUploadUrl: documentUploadUrl, downloadDocumentUrl: downloadDocumentUrl, clientId: clientId })),
|
|
178
|
+
react_1.default.createElement(ClientDocumentsTable_1.ClientDocumentsTable, { legacyFreelancerId: legacyFreelancerId, expertFiles: expertClientFiles, setExpertClientFiles: setExpertClientFiles, clientAndProjectsList: clientAndProjects, uploadExpertClientFiles: uploadExpertClientFiles, updateFileLastViewed: updateFileLastViewed, deleteExpertClientFile: deleteExpertClientFile, paroDocuments: false, freelancerName: freelancerName !== null && freelancerName !== void 0 ? freelancerName : '', freelancerEmail: freelancerEmail !== null && freelancerEmail !== void 0 ? freelancerEmail : '', getFileLazyQuery: getFileLazyQuery, expertClientFilesLazyQuery: expertClientFilesLazyQuery, isClientPortal: isClientPortal, documentUploadUrl: documentUploadUrl, downloadDocumentUrl: downloadDocumentUrl, clientId: clientId, stage: stage })),
|
|
179
179
|
react_1.default.createElement(lab_1.TabPanel, { value: '1' },
|
|
180
180
|
react_1.default.createElement(ParoDocumentsTable_1.ParoDocumentsTable, { legacyFreelancerId: legacyFreelancerId, expiryDate: insuranceExpiryDate !== null && insuranceExpiryDate !== void 0 ? insuranceExpiryDate : '', setExpiryDate: setInsuranceExpiryDate, expertFiles: expertFiles, setExpertFiles: setExpertFiles, uploadExpertClientFiles: uploadExpertClientFiles, uploadFileData: uploadFileData, deleteFileMutation: deleteFileMutation, updateFreelancerExpiryMutation: updateFreelancerExpiryMutation, foldername: foldername !== null && foldername !== void 0 ? foldername : '', paroDocuments: true, getFileLazyQuery: getFileLazyQuery, getFilesLazyQuery: getFilesLazyQuery }))))),
|
|
181
181
|
react_1.default.createElement(react_hot_toast_1.Toaster, { position: "top-center", toastOptions: {
|