@paro.io/expert-shared-components 1.14.43 → 1.14.45
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/README.md +2 -0
- 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/DiscussionThread.d.ts +25 -25
- package/lib/components/DiscussionThread/DiscussionThread.js +137 -137
- package/lib/components/DiscussionThread/chat.d.ts +22 -22
- package/lib/components/DiscussionThread/chat.js +106 -106
- package/lib/components/DiscussionThread/index.d.ts +1 -1
- package/lib/components/DiscussionThread/index.js +5 -5
- package/lib/components/DocumentCenter/DocumentTable.d.ts +15 -15
- package/lib/components/DocumentCenter/DocumentTable.js +350 -350
- package/lib/components/DocumentCenter/DragDropUpload.js +4 -4
- 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/Escalations/CustomTag.d.ts +3 -3
- package/lib/components/Escalations/CustomTag.js +25 -25
- package/lib/components/Escalations/ViewReponseModal.d.ts +8 -8
- package/lib/components/Escalations/ViewReponseModal.js +27 -27
- package/lib/components/ExpertProfileHeader/ActionButtonSection.js +6 -6
- package/lib/components/ExpertProfileHeader/ProfileSection.js +7 -7
- 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/ProjectIntelligence/MissingInformation/index.js +1 -1
- 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/index.d.ts +13 -0
- package/lib/index.js +27 -1
- package/lib/package.json +68 -0
- package/lib/tax-axis/components/clientReport/ClientReportCover.d.ts +9 -0
- package/lib/tax-axis/components/clientReport/ClientReportCover.js +39 -0
- package/lib/tax-axis/components/clientReport/ClientReportTOC.d.ts +8 -0
- package/lib/tax-axis/components/clientReport/ClientReportTOC.js +24 -0
- package/lib/tax-axis/components/clientReport/ClientReportToolbar.d.ts +2 -0
- package/lib/tax-axis/components/clientReport/ClientReportToolbar.js +6 -0
- package/lib/tax-axis/components/clientReport/ETRChart.d.ts +10 -0
- package/lib/tax-axis/components/clientReport/ETRChart.js +50 -0
- package/lib/tax-axis/components/clientReport/ExecutiveSummary.d.ts +15 -0
- package/lib/tax-axis/components/clientReport/ExecutiveSummary.js +73 -0
- package/lib/tax-axis/components/clientReport/FootnoteBlock.d.ts +11 -0
- package/lib/tax-axis/components/clientReport/FootnoteBlock.js +34 -0
- package/lib/tax-axis/components/clientReport/ImplementationRoadmap.d.ts +26 -0
- package/lib/tax-axis/components/clientReport/ImplementationRoadmap.js +51 -0
- package/lib/tax-axis/components/clientReport/ImplementationTimelineChart.d.ts +10 -0
- package/lib/tax-axis/components/clientReport/ImplementationTimelineChart.js +49 -0
- package/lib/tax-axis/components/clientReport/Methodology.d.ts +10 -0
- package/lib/tax-axis/components/clientReport/Methodology.js +40 -0
- package/lib/tax-axis/components/clientReport/QuarterlyCashChart.d.ts +10 -0
- package/lib/tax-axis/components/clientReport/QuarterlyCashChart.js +56 -0
- package/lib/tax-axis/components/clientReport/RecommendedStrategies.d.ts +13 -0
- package/lib/tax-axis/components/clientReport/RecommendedStrategies.js +51 -0
- package/lib/tax-axis/components/clientReport/SavingsStackChart.d.ts +10 -0
- package/lib/tax-axis/components/clientReport/SavingsStackChart.js +66 -0
- package/lib/tax-axis/components/clientReport/SectionOpener.d.ts +11 -0
- package/lib/tax-axis/components/clientReport/SectionOpener.js +20 -0
- package/lib/tax-axis/components/clientReport/Sidebar.d.ts +8 -0
- package/lib/tax-axis/components/clientReport/Sidebar.js +37 -0
- package/lib/tax-axis/components/clientReport/StrategyCard.d.ts +16 -0
- package/lib/tax-axis/components/clientReport/StrategyCard.js +63 -0
- package/lib/tax-axis/components/clientReport/TaxAxisClientReport.d.ts +9 -0
- package/lib/tax-axis/components/clientReport/TaxAxisClientReport.js +125 -0
- package/lib/tax-axis/components/clientReport/applyFootnotes.d.ts +12 -0
- package/lib/tax-axis/components/clientReport/applyFootnotes.js +43 -0
- package/lib/tax-axis/components/clientReport/palette.d.ts +28 -0
- package/lib/tax-axis/components/clientReport/palette.js +34 -0
- package/lib/tax-axis/components/dashboard/ConfidenceArc.d.ts +7 -0
- package/lib/tax-axis/components/dashboard/ConfidenceArc.js +20 -0
- package/lib/tax-axis/components/dashboard/DashboardActions.d.ts +13 -0
- package/lib/tax-axis/components/dashboard/DashboardActions.js +96 -0
- package/lib/tax-axis/components/dashboard/DashboardSummary.d.ts +11 -0
- package/lib/tax-axis/components/dashboard/DashboardSummary.js +98 -0
- package/lib/tax-axis/components/dashboard/DashboardTopBar.d.ts +10 -0
- package/lib/tax-axis/components/dashboard/DashboardTopBar.js +48 -0
- package/lib/tax-axis/components/dashboard/StrategyDetailPanel.d.ts +10 -0
- package/lib/tax-axis/components/dashboard/StrategyDetailPanel.js +139 -0
- package/lib/tax-axis/components/dashboard/StrategyTile.d.ts +10 -0
- package/lib/tax-axis/components/dashboard/StrategyTile.js +82 -0
- package/lib/tax-axis/components/dashboard/TaxAxisDashboard.d.ts +12 -0
- package/lib/tax-axis/components/dashboard/TaxAxisDashboard.js +284 -0
- package/lib/tax-axis/components/dashboard/useCountUp.d.ts +1 -0
- package/lib/tax-axis/components/dashboard/useCountUp.js +25 -0
- package/lib/tax-axis/components/documents/DocumentCard.d.ts +18 -0
- package/lib/tax-axis/components/documents/DocumentCard.js +61 -0
- package/lib/tax-axis/components/documents/DocumentTier.d.ts +21 -0
- package/lib/tax-axis/components/documents/DocumentTier.js +23 -0
- package/lib/tax-axis/components/documents/TaxAxisDocuments.d.ts +8 -0
- package/lib/tax-axis/components/documents/TaxAxisDocuments.js +157 -0
- package/lib/tax-axis/components/extractionReview/DocumentCard.d.ts +17 -0
- package/lib/tax-axis/components/extractionReview/DocumentCard.js +105 -0
- package/lib/tax-axis/components/extractionReview/FieldRow.d.ts +17 -0
- package/lib/tax-axis/components/extractionReview/FieldRow.js +137 -0
- package/lib/tax-axis/components/extractionReview/PurposeBlock.d.ts +7 -0
- package/lib/tax-axis/components/extractionReview/PurposeBlock.js +18 -0
- package/lib/tax-axis/components/extractionReview/RerunFooter.d.ts +8 -0
- package/lib/tax-axis/components/extractionReview/RerunFooter.js +60 -0
- package/lib/tax-axis/components/extractionReview/TaxAxisExtractionReview.d.ts +11 -0
- package/lib/tax-axis/components/extractionReview/TaxAxisExtractionReview.js +186 -0
- package/lib/tax-axis/components/intake/ClientParametersSection.d.ts +7 -0
- package/lib/tax-axis/components/intake/ClientParametersSection.js +146 -0
- package/lib/tax-axis/components/intake/CpaIntakeQuestionsSection.d.ts +7 -0
- package/lib/tax-axis/components/intake/CpaIntakeQuestionsSection.js +93 -0
- package/lib/tax-axis/components/intake/IntakeCtaCards.d.ts +9 -0
- package/lib/tax-axis/components/intake/IntakeCtaCards.js +30 -0
- package/lib/tax-axis/components/intake/RefineAnalysisSection.d.ts +7 -0
- package/lib/tax-axis/components/intake/RefineAnalysisSection.js +151 -0
- package/lib/tax-axis/components/intake/StateMultiSelect.d.ts +7 -0
- package/lib/tax-axis/components/intake/StateMultiSelect.js +90 -0
- package/lib/tax-axis/components/intake/StrategyRadar.d.ts +7 -0
- package/lib/tax-axis/components/intake/StrategyRadar.js +240 -0
- package/lib/tax-axis/components/intake/TaxAxisIntake.d.ts +8 -0
- package/lib/tax-axis/components/intake/TaxAxisIntake.js +38 -0
- package/lib/tax-axis/components/intake/intakeSchema.d.ts +97 -0
- package/lib/tax-axis/components/intake/intakeSchema.js +91 -0
- package/lib/tax-axis/components/preparerWorkpaper/CalculationTraceAccordion.d.ts +9 -0
- package/lib/tax-axis/components/preparerWorkpaper/CalculationTraceAccordion.js +19 -0
- package/lib/tax-axis/components/preparerWorkpaper/EngagementHeader.d.ts +9 -0
- package/lib/tax-axis/components/preparerWorkpaper/EngagementHeader.js +43 -0
- package/lib/tax-axis/components/preparerWorkpaper/Position6694Accordion.d.ts +9 -0
- package/lib/tax-axis/components/preparerWorkpaper/Position6694Accordion.js +25 -0
- package/lib/tax-axis/components/preparerWorkpaper/PriorityGroup.d.ts +14 -0
- package/lib/tax-axis/components/preparerWorkpaper/PriorityGroup.js +20 -0
- package/lib/tax-axis/components/preparerWorkpaper/Section6694Summary.d.ts +9 -0
- package/lib/tax-axis/components/preparerWorkpaper/Section6694Summary.js +36 -0
- package/lib/tax-axis/components/preparerWorkpaper/SourceDocumentsAccordion.d.ts +9 -0
- package/lib/tax-axis/components/preparerWorkpaper/SourceDocumentsAccordion.js +20 -0
- package/lib/tax-axis/components/preparerWorkpaper/StrategyWorkpaperCard.d.ts +14 -0
- package/lib/tax-axis/components/preparerWorkpaper/StrategyWorkpaperCard.js +53 -0
- package/lib/tax-axis/components/preparerWorkpaper/TaxAxisPreparerWorkpaper.d.ts +9 -0
- package/lib/tax-axis/components/preparerWorkpaper/TaxAxisPreparerWorkpaper.js +175 -0
- package/lib/tax-axis/components/presentationMode/TaxAxisPresentationMode.d.ts +7 -0
- package/lib/tax-axis/components/presentationMode/TaxAxisPresentationMode.js +245 -0
- package/lib/tax-axis/components/processing/ProcessingStages.d.ts +7 -0
- package/lib/tax-axis/components/processing/ProcessingStages.js +17 -0
- package/lib/tax-axis/components/processing/TaxAxisProcessing.d.ts +7 -0
- package/lib/tax-axis/components/processing/TaxAxisProcessing.js +105 -0
- package/lib/tax-axis/components/prospectReport/ProspectCover.d.ts +10 -0
- package/lib/tax-axis/components/prospectReport/ProspectCover.js +47 -0
- package/lib/tax-axis/components/prospectReport/ProspectDocuments.d.ts +9 -0
- package/lib/tax-axis/components/prospectReport/ProspectDocuments.js +31 -0
- package/lib/tax-axis/components/prospectReport/ProspectNextSteps.d.ts +13 -0
- package/lib/tax-axis/components/prospectReport/ProspectNextSteps.js +37 -0
- package/lib/tax-axis/components/prospectReport/ProspectPrintView.d.ts +26 -0
- package/lib/tax-axis/components/prospectReport/ProspectPrintView.js +183 -0
- package/lib/tax-axis/components/prospectReport/ProspectStrategyCard.d.ts +10 -0
- package/lib/tax-axis/components/prospectReport/ProspectStrategyCard.js +52 -0
- package/lib/tax-axis/components/prospectReport/SampleAnalysisPreview.d.ts +7 -0
- package/lib/tax-axis/components/prospectReport/SampleAnalysisPreview.js +120 -0
- package/lib/tax-axis/components/prospectReport/TaxAxisProspectReport.d.ts +9 -0
- package/lib/tax-axis/components/prospectReport/TaxAxisProspectReport.js +173 -0
- package/lib/tax-axis/components/prospectReport/TaxPositionGap.d.ts +15 -0
- package/lib/tax-axis/components/prospectReport/TaxPositionGap.js +45 -0
- package/lib/tax-axis/components/prospectReport/theme.d.ts +26 -0
- package/lib/tax-axis/components/prospectReport/theme.js +33 -0
- package/lib/tax-axis/components/shared/ReportToolbar.d.ts +12 -0
- package/lib/tax-axis/components/shared/ReportToolbar.js +81 -0
- package/lib/tax-axis/components/shared/SectionHeader.d.ts +8 -0
- package/lib/tax-axis/components/shared/SectionHeader.js +15 -0
- package/lib/tax-axis/components/shared/TaxAxisBadge.d.ts +12 -0
- package/lib/tax-axis/components/shared/TaxAxisBadge.js +34 -0
- package/lib/tax-axis/components/shared/TaxAxisButton.d.ts +12 -0
- package/lib/tax-axis/components/shared/TaxAxisButton.js +17 -0
- package/lib/tax-axis/components/shared/TaxAxisCard.d.ts +9 -0
- package/lib/tax-axis/components/shared/TaxAxisCard.js +13 -0
- package/lib/tax-axis/index.d.ts +25 -0
- package/lib/tax-axis/index.js +51 -0
- package/lib/tax-axis/lib/compute/index.d.ts +8 -0
- package/lib/tax-axis/lib/compute/index.js +163 -0
- package/lib/tax-axis/lib/data/documents.d.ts +3 -0
- package/lib/tax-axis/lib/data/documents.js +33 -0
- package/lib/tax-axis/lib/data/extractedData.d.ts +2 -0
- package/lib/tax-axis/lib/data/extractedData.js +47 -0
- package/lib/tax-axis/lib/data/footnoteData.d.ts +2 -0
- package/lib/tax-axis/lib/data/footnoteData.js +48 -0
- package/lib/tax-axis/lib/data/index.d.ts +11 -0
- package/lib/tax-axis/lib/data/index.js +31 -0
- package/lib/tax-axis/lib/data/nextSteps.d.ts +2 -0
- package/lib/tax-axis/lib/data/nextSteps.js +35 -0
- package/lib/tax-axis/lib/data/sidebarLookup.d.ts +2 -0
- package/lib/tax-axis/lib/data/sidebarLookup.js +90 -0
- package/lib/tax-axis/lib/data/sourceDescriptions.d.ts +1 -0
- package/lib/tax-axis/lib/data/sourceDescriptions.js +32 -0
- package/lib/tax-axis/lib/data/states.d.ts +6 -0
- package/lib/tax-axis/lib/data/states.js +25 -0
- package/lib/tax-axis/lib/data/strategies.d.ts +8 -0
- package/lib/tax-axis/lib/data/strategies.js +166 -0
- package/lib/tax-axis/lib/data/strategyNarrative.d.ts +3 -0
- package/lib/tax-axis/lib/data/strategyNarrative.js +170 -0
- package/lib/tax-axis/lib/data/strategyProspect.d.ts +2 -0
- package/lib/tax-axis/lib/data/strategyProspect.js +66 -0
- package/lib/tax-axis/lib/data/workpaperInteractions.d.ts +1 -0
- package/lib/tax-axis/lib/data/workpaperInteractions.js +15 -0
- package/lib/tax-axis/lib/types/index.d.ts +183 -0
- package/lib/tax-axis/lib/types/index.js +7 -0
- package/package.json +68 -67
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface EditDateModalProps {
|
|
3
|
-
freelancerId: number;
|
|
4
|
-
freelancerEmail: string;
|
|
5
|
-
project: any;
|
|
6
|
-
previousDate: any;
|
|
7
|
-
editDate: any;
|
|
8
|
-
setEditDate: (editDate: any) => void;
|
|
9
|
-
isDateInvalid: boolean;
|
|
10
|
-
setIsDateInvalid: (isDateInvalid: boolean) => void;
|
|
11
|
-
validateDate: any;
|
|
12
|
-
changeType: string;
|
|
13
|
-
expertName: string;
|
|
14
|
-
isAuthenticated: boolean;
|
|
15
|
-
selectedTab: number;
|
|
16
|
-
createChangeRequestMutation?: any;
|
|
17
|
-
GetAllProjectIrprDetailsForFreelancerDocument: any;
|
|
18
|
-
createChangeRequest?: any;
|
|
19
|
-
isTestEnv: boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare const EditDateModal: ({ freelancerId, freelancerEmail, project, previousDate, editDate, setEditDate, setIsDateInvalid, validateDate, isDateInvalid, changeType, expertName, isAuthenticated, selectedTab, createChangeRequestMutation, GetAllProjectIrprDetailsForFreelancerDocument, createChangeRequest, isTestEnv }: EditDateModalProps) => React.JSX.Element;
|
|
22
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface EditDateModalProps {
|
|
3
|
+
freelancerId: number;
|
|
4
|
+
freelancerEmail: string;
|
|
5
|
+
project: any;
|
|
6
|
+
previousDate: any;
|
|
7
|
+
editDate: any;
|
|
8
|
+
setEditDate: (editDate: any) => void;
|
|
9
|
+
isDateInvalid: boolean;
|
|
10
|
+
setIsDateInvalid: (isDateInvalid: boolean) => void;
|
|
11
|
+
validateDate: any;
|
|
12
|
+
changeType: string;
|
|
13
|
+
expertName: string;
|
|
14
|
+
isAuthenticated: boolean;
|
|
15
|
+
selectedTab: number;
|
|
16
|
+
createChangeRequestMutation?: any;
|
|
17
|
+
GetAllProjectIrprDetailsForFreelancerDocument: any;
|
|
18
|
+
createChangeRequest?: any;
|
|
19
|
+
isTestEnv: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const EditDateModal: ({ freelancerId, freelancerEmail, project, previousDate, editDate, setEditDate, setIsDateInvalid, validateDate, isDateInvalid, changeType, expertName, isAuthenticated, selectedTab, createChangeRequestMutation, GetAllProjectIrprDetailsForFreelancerDocument, createChangeRequest, isTestEnv }: EditDateModalProps) => React.JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -1,149 +1,149 @@
|
|
|
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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.EditDateModal = void 0;
|
|
39
|
-
const react_1 = __importStar(require("react"));
|
|
40
|
-
const react_hot_toast_1 = __importDefault(require("react-hot-toast"));
|
|
41
|
-
const base_ui_1 = require("@paro.io/base-ui");
|
|
42
|
-
const LogTimeModalAuthenticated_1 = require("./LogTimeModalAuthenticated");
|
|
43
|
-
const dayjs_1 = __importDefault(require("dayjs"));
|
|
44
|
-
const utc_1 = __importDefault(require("dayjs/plugin/utc"));
|
|
45
|
-
const timezone_1 = __importDefault(require("dayjs/plugin/timezone"));
|
|
46
|
-
dayjs_1.default.extend(utc_1.default);
|
|
47
|
-
dayjs_1.default.extend(timezone_1.default);
|
|
48
|
-
const options = [
|
|
49
|
-
{
|
|
50
|
-
label: 'Select a Reason',
|
|
51
|
-
value: '',
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
label: 'The client has delayed the project',
|
|
55
|
-
value: 'The client has delayed the project',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
label: 'The expert has delayed the project',
|
|
59
|
-
value: 'The expert has delayed the project',
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
label: 'Extension of the previous phase',
|
|
63
|
-
value: 'Extension of the previous phase',
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
label: 'Other',
|
|
67
|
-
value: 'Other',
|
|
68
|
-
}
|
|
69
|
-
];
|
|
70
|
-
const EditDateModal = ({ freelancerId, freelancerEmail, project, previousDate, editDate, setEditDate, setIsDateInvalid, validateDate, isDateInvalid, changeType, expertName, isAuthenticated, selectedTab, createChangeRequestMutation, GetAllProjectIrprDetailsForFreelancerDocument, createChangeRequest, isTestEnv }) => {
|
|
71
|
-
const [date, setDate] = (0, react_1.useState)(null);
|
|
72
|
-
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
73
|
-
const [reason, setReason] = (0, react_1.useState)('');
|
|
74
|
-
const [inputReason, setInputReason] = (0, react_1.useState)('');
|
|
75
|
-
const todayDate = new Date();
|
|
76
|
-
const dateToUse = (project === null || project === void 0 ? void 0 : project.endDate) ? new Date(project === null || project === void 0 ? void 0 : project.endDate) : todayDate;
|
|
77
|
-
const maxDate = changeType === 'start' ? dateToUse : todayDate.setMonth((todayDate).getMonth() + 12);
|
|
78
|
-
const minDate = changeType === 'start' ? new Date(project === null || project === void 0 ? void 0 : project.startDate).setMonth((todayDate).getMonth() - 3) : project === null || project === void 0 ? void 0 : project.startDate;
|
|
79
|
-
const handleSubmitDate = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
80
|
-
var _a;
|
|
81
|
-
setLoading(true);
|
|
82
|
-
const projectTypes = ["ACTIVE", "ADHOC", "UPCOMING", "INACTIVE", "COMPLETED"];
|
|
83
|
-
try {
|
|
84
|
-
const changeRequestDetails = {
|
|
85
|
-
dateSubmitted: (0, dayjs_1.default)(new Date()).format('MM/DD/YYYY'),
|
|
86
|
-
changeReason: reason !== null && reason !== void 0 ? reason : inputReason,
|
|
87
|
-
changeType: `${changeType.charAt(0).toUpperCase() + changeType.slice(1)} Date`,
|
|
88
|
-
entityName: project === null || project === void 0 ? void 0 : project.name,
|
|
89
|
-
freelancerId: Number(freelancerId),
|
|
90
|
-
oldValue: (0, dayjs_1.default)(previousDate).format('MM/DD/YYYY'),
|
|
91
|
-
newValue: (0, dayjs_1.default)(date).format('MM/DD/YYYY'),
|
|
92
|
-
status: 'New',
|
|
93
|
-
projectType: projectTypes[selectedTab],
|
|
94
|
-
freelancerName: expertName,
|
|
95
|
-
email: freelancerEmail,
|
|
96
|
-
csmEmail: isTestEnv ? "admin@paro.io" : project === null || project === void 0 ? void 0 : project.csmEmail,
|
|
97
|
-
amEmail: isTestEnv ? "admin@paro.io" : (_a = project === null || project === void 0 ? void 0 : project.paroContact) === null || _a === void 0 ? void 0 : _a.email,
|
|
98
|
-
entityId: Number(project === null || project === void 0 ? void 0 : project.id),
|
|
99
|
-
};
|
|
100
|
-
isAuthenticated ? createChangeRequestMutation({
|
|
101
|
-
variables: {
|
|
102
|
-
input: changeRequestDetails
|
|
103
|
-
},
|
|
104
|
-
refetchQueries: [
|
|
105
|
-
{ query: GetAllProjectIrprDetailsForFreelancerDocument, variables: { freelancerId, projectType: 3, activeTabId: selectedTab } }
|
|
106
|
-
]
|
|
107
|
-
}) : yield createChangeRequest(changeRequestDetails);
|
|
108
|
-
(0, react_hot_toast_1.default)(react_1.default.createElement(base_ui_1.Alert, { color: "success", icon: "success", label: `Succesfully submitted ${changeType.charAt(0).toUpperCase() + changeType.slice(1)} Date Change Request` }), {
|
|
109
|
-
position: 'bottom-right',
|
|
110
|
-
style: { borderRadius: '8px' },
|
|
111
|
-
});
|
|
112
|
-
setLoading(false);
|
|
113
|
-
setDate(null);
|
|
114
|
-
setEditDate(false);
|
|
115
|
-
setReason('');
|
|
116
|
-
setInputReason('');
|
|
117
|
-
}
|
|
118
|
-
catch (error) {
|
|
119
|
-
setLoading(false);
|
|
120
|
-
console.log(`Error updating ${changeType} date`, error);
|
|
121
|
-
(0, react_hot_toast_1.default)(react_1.default.createElement(base_ui_1.Alert, { color: "danger", icon: "danger", label: `Failed to update ${changeType.charAt(0).toUpperCase() + changeType.slice(1)} Date` }), {
|
|
122
|
-
position: 'bottom-right',
|
|
123
|
-
style: { borderRadius: '8px' },
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
const onCloseModal = () => {
|
|
128
|
-
setLoading(false);
|
|
129
|
-
setDate(null);
|
|
130
|
-
setEditDate(false);
|
|
131
|
-
setReason('');
|
|
132
|
-
setInputReason('');
|
|
133
|
-
};
|
|
134
|
-
return (react_1.default.createElement(base_ui_1.Modal, { open: editDate, onClose: () => onCloseModal(), size: "sm", className: "z-[100]" },
|
|
135
|
-
react_1.default.createElement("div", { className: "flex flex-col gap-y-2" },
|
|
136
|
-
react_1.default.createElement("h1", { className: "font-bold text-xl" }, `Change the ${changeType === 'start' ? 'Start' : 'End'} Date`),
|
|
137
|
-
react_1.default.createElement("p", { className: "text-md mb-6" }, `To make changes to the ${changeType === 'start' ? 'start' : 'end'} date please fill out the fields below.`),
|
|
138
|
-
react_1.default.createElement("p", { className: "font-bold" }, `What is the new ${changeType === 'start' ? 'start' : 'end'} date?`),
|
|
139
|
-
react_1.default.createElement(LogTimeModalAuthenticated_1.SelectDate, { timeLogDate: date, setTimeLogDate: setDate, isInvalid: false, setIsDateInvalid: setIsDateInvalid, validateDate: validateDate, maxDate: (0, dayjs_1.default)(maxDate).format('MM/DD/YYYY'), minDate: (0, dayjs_1.default)(minDate).format('MM/DD/YYYY') }),
|
|
140
|
-
isDateInvalid && react_1.default.createElement("div", { className: "text-red-800 text-xs" }, "Please enter a valid date"),
|
|
141
|
-
react_1.default.createElement("p", { className: "font-bold mt-2" }, "Please select a reason for change:"),
|
|
142
|
-
react_1.default.createElement("div", { className: "w-full sm:w-2/3 flex flex-col gap-y-2" },
|
|
143
|
-
react_1.default.createElement(base_ui_1.Autocomplete, { label: "", name: 'reason-select', value: reason, onSelect: (value) => setReason(value), options: options, isInvalid: reason === '', isInvalidText: "Reason can't be empty", size: 'md' }),
|
|
144
|
-
reason === 'Other' && (react_1.default.createElement(base_ui_1.Input, { type: "select", placeholder: `Please enter your reason for ${changeType === 'start' ? 'start' : 'end'} date change`, value: inputReason, onChange: (e) => setInputReason(e.target.value) }))),
|
|
145
|
-
react_1.default.createElement("div", { className: "flex flex-row gap-x-2 mt-12 mb-4" },
|
|
146
|
-
react_1.default.createElement(base_ui_1.Button, { type: "button", onClick: () => onCloseModal(), label: "CANCEL", className: "mt-4" }),
|
|
147
|
-
react_1.default.createElement(base_ui_1.Button, { type: "button", onClick: () => handleSubmitDate(), label: "SAVE", className: "mt-4", color: "primary", disabled: isDateInvalid || !reason || !date, isLoading: loading })))));
|
|
148
|
-
};
|
|
149
|
-
exports.EditDateModal = EditDateModal;
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.EditDateModal = void 0;
|
|
39
|
+
const react_1 = __importStar(require("react"));
|
|
40
|
+
const react_hot_toast_1 = __importDefault(require("react-hot-toast"));
|
|
41
|
+
const base_ui_1 = require("@paro.io/base-ui");
|
|
42
|
+
const LogTimeModalAuthenticated_1 = require("./LogTimeModalAuthenticated");
|
|
43
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
44
|
+
const utc_1 = __importDefault(require("dayjs/plugin/utc"));
|
|
45
|
+
const timezone_1 = __importDefault(require("dayjs/plugin/timezone"));
|
|
46
|
+
dayjs_1.default.extend(utc_1.default);
|
|
47
|
+
dayjs_1.default.extend(timezone_1.default);
|
|
48
|
+
const options = [
|
|
49
|
+
{
|
|
50
|
+
label: 'Select a Reason',
|
|
51
|
+
value: '',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: 'The client has delayed the project',
|
|
55
|
+
value: 'The client has delayed the project',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: 'The expert has delayed the project',
|
|
59
|
+
value: 'The expert has delayed the project',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: 'Extension of the previous phase',
|
|
63
|
+
value: 'Extension of the previous phase',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
label: 'Other',
|
|
67
|
+
value: 'Other',
|
|
68
|
+
}
|
|
69
|
+
];
|
|
70
|
+
const EditDateModal = ({ freelancerId, freelancerEmail, project, previousDate, editDate, setEditDate, setIsDateInvalid, validateDate, isDateInvalid, changeType, expertName, isAuthenticated, selectedTab, createChangeRequestMutation, GetAllProjectIrprDetailsForFreelancerDocument, createChangeRequest, isTestEnv }) => {
|
|
71
|
+
const [date, setDate] = (0, react_1.useState)(null);
|
|
72
|
+
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
73
|
+
const [reason, setReason] = (0, react_1.useState)('');
|
|
74
|
+
const [inputReason, setInputReason] = (0, react_1.useState)('');
|
|
75
|
+
const todayDate = new Date();
|
|
76
|
+
const dateToUse = (project === null || project === void 0 ? void 0 : project.endDate) ? new Date(project === null || project === void 0 ? void 0 : project.endDate) : todayDate;
|
|
77
|
+
const maxDate = changeType === 'start' ? dateToUse : todayDate.setMonth((todayDate).getMonth() + 12);
|
|
78
|
+
const minDate = changeType === 'start' ? new Date(project === null || project === void 0 ? void 0 : project.startDate).setMonth((todayDate).getMonth() - 3) : project === null || project === void 0 ? void 0 : project.startDate;
|
|
79
|
+
const handleSubmitDate = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
80
|
+
var _a;
|
|
81
|
+
setLoading(true);
|
|
82
|
+
const projectTypes = ["ACTIVE", "ADHOC", "UPCOMING", "INACTIVE", "COMPLETED"];
|
|
83
|
+
try {
|
|
84
|
+
const changeRequestDetails = {
|
|
85
|
+
dateSubmitted: (0, dayjs_1.default)(new Date()).format('MM/DD/YYYY'),
|
|
86
|
+
changeReason: reason !== null && reason !== void 0 ? reason : inputReason,
|
|
87
|
+
changeType: `${changeType.charAt(0).toUpperCase() + changeType.slice(1)} Date`,
|
|
88
|
+
entityName: project === null || project === void 0 ? void 0 : project.name,
|
|
89
|
+
freelancerId: Number(freelancerId),
|
|
90
|
+
oldValue: (0, dayjs_1.default)(previousDate).format('MM/DD/YYYY'),
|
|
91
|
+
newValue: (0, dayjs_1.default)(date).format('MM/DD/YYYY'),
|
|
92
|
+
status: 'New',
|
|
93
|
+
projectType: projectTypes[selectedTab],
|
|
94
|
+
freelancerName: expertName,
|
|
95
|
+
email: freelancerEmail,
|
|
96
|
+
csmEmail: isTestEnv ? "admin@paro.io" : project === null || project === void 0 ? void 0 : project.csmEmail,
|
|
97
|
+
amEmail: isTestEnv ? "admin@paro.io" : (_a = project === null || project === void 0 ? void 0 : project.paroContact) === null || _a === void 0 ? void 0 : _a.email,
|
|
98
|
+
entityId: Number(project === null || project === void 0 ? void 0 : project.id),
|
|
99
|
+
};
|
|
100
|
+
isAuthenticated ? createChangeRequestMutation({
|
|
101
|
+
variables: {
|
|
102
|
+
input: changeRequestDetails
|
|
103
|
+
},
|
|
104
|
+
refetchQueries: [
|
|
105
|
+
{ query: GetAllProjectIrprDetailsForFreelancerDocument, variables: { freelancerId, projectType: 3, activeTabId: selectedTab } }
|
|
106
|
+
]
|
|
107
|
+
}) : yield createChangeRequest(changeRequestDetails);
|
|
108
|
+
(0, react_hot_toast_1.default)(react_1.default.createElement(base_ui_1.Alert, { color: "success", icon: "success", label: `Succesfully submitted ${changeType.charAt(0).toUpperCase() + changeType.slice(1)} Date Change Request` }), {
|
|
109
|
+
position: 'bottom-right',
|
|
110
|
+
style: { borderRadius: '8px' },
|
|
111
|
+
});
|
|
112
|
+
setLoading(false);
|
|
113
|
+
setDate(null);
|
|
114
|
+
setEditDate(false);
|
|
115
|
+
setReason('');
|
|
116
|
+
setInputReason('');
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
setLoading(false);
|
|
120
|
+
console.log(`Error updating ${changeType} date`, error);
|
|
121
|
+
(0, react_hot_toast_1.default)(react_1.default.createElement(base_ui_1.Alert, { color: "danger", icon: "danger", label: `Failed to update ${changeType.charAt(0).toUpperCase() + changeType.slice(1)} Date` }), {
|
|
122
|
+
position: 'bottom-right',
|
|
123
|
+
style: { borderRadius: '8px' },
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
const onCloseModal = () => {
|
|
128
|
+
setLoading(false);
|
|
129
|
+
setDate(null);
|
|
130
|
+
setEditDate(false);
|
|
131
|
+
setReason('');
|
|
132
|
+
setInputReason('');
|
|
133
|
+
};
|
|
134
|
+
return (react_1.default.createElement(base_ui_1.Modal, { open: editDate, onClose: () => onCloseModal(), size: "sm", className: "z-[100]" },
|
|
135
|
+
react_1.default.createElement("div", { className: "flex flex-col gap-y-2" },
|
|
136
|
+
react_1.default.createElement("h1", { className: "font-bold text-xl" }, `Change the ${changeType === 'start' ? 'Start' : 'End'} Date`),
|
|
137
|
+
react_1.default.createElement("p", { className: "text-md mb-6" }, `To make changes to the ${changeType === 'start' ? 'start' : 'end'} date please fill out the fields below.`),
|
|
138
|
+
react_1.default.createElement("p", { className: "font-bold" }, `What is the new ${changeType === 'start' ? 'start' : 'end'} date?`),
|
|
139
|
+
react_1.default.createElement(LogTimeModalAuthenticated_1.SelectDate, { timeLogDate: date, setTimeLogDate: setDate, isInvalid: false, setIsDateInvalid: setIsDateInvalid, validateDate: validateDate, maxDate: (0, dayjs_1.default)(maxDate).format('MM/DD/YYYY'), minDate: (0, dayjs_1.default)(minDate).format('MM/DD/YYYY') }),
|
|
140
|
+
isDateInvalid && react_1.default.createElement("div", { className: "text-red-800 text-xs" }, "Please enter a valid date"),
|
|
141
|
+
react_1.default.createElement("p", { className: "font-bold mt-2" }, "Please select a reason for change:"),
|
|
142
|
+
react_1.default.createElement("div", { className: "w-full sm:w-2/3 flex flex-col gap-y-2" },
|
|
143
|
+
react_1.default.createElement(base_ui_1.Autocomplete, { label: "", name: 'reason-select', value: reason, onSelect: (value) => setReason(value), options: options, isInvalid: reason === '', isInvalidText: "Reason can't be empty", size: 'md' }),
|
|
144
|
+
reason === 'Other' && (react_1.default.createElement(base_ui_1.Input, { type: "select", placeholder: `Please enter your reason for ${changeType === 'start' ? 'start' : 'end'} date change`, value: inputReason, onChange: (e) => setInputReason(e.target.value) }))),
|
|
145
|
+
react_1.default.createElement("div", { className: "flex flex-row gap-x-2 mt-12 mb-4" },
|
|
146
|
+
react_1.default.createElement(base_ui_1.Button, { type: "button", onClick: () => onCloseModal(), label: "CANCEL", className: "mt-4" }),
|
|
147
|
+
react_1.default.createElement(base_ui_1.Button, { type: "button", onClick: () => handleSubmitDate(), label: "SAVE", className: "mt-4", color: "primary", disabled: isDateInvalid || !reason || !date, isLoading: loading })))));
|
|
148
|
+
};
|
|
149
|
+
exports.EditDateModal = EditDateModal;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface EmailModalProps {
|
|
3
|
-
emailModal: boolean;
|
|
4
|
-
setEmailModal: (emailModal: boolean) => void;
|
|
5
|
-
emailText: string;
|
|
6
|
-
setEmailText: (emailText: string) => void;
|
|
7
|
-
setTicketModal: (ticketModal: boolean) => void;
|
|
8
|
-
project: any;
|
|
9
|
-
expertName: string;
|
|
10
|
-
sendParoSupportEmail: any;
|
|
11
|
-
isTestEnv: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare const EmailModal: ({ emailModal, setEmailModal, emailText, setEmailText, setTicketModal, project, expertName, sendParoSupportEmail, isTestEnv }: EmailModalProps) => React.JSX.Element;
|
|
14
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface EmailModalProps {
|
|
3
|
+
emailModal: boolean;
|
|
4
|
+
setEmailModal: (emailModal: boolean) => void;
|
|
5
|
+
emailText: string;
|
|
6
|
+
setEmailText: (emailText: string) => void;
|
|
7
|
+
setTicketModal: (ticketModal: boolean) => void;
|
|
8
|
+
project: any;
|
|
9
|
+
expertName: string;
|
|
10
|
+
sendParoSupportEmail: any;
|
|
11
|
+
isTestEnv: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const EmailModal: ({ emailModal, setEmailModal, emailText, setEmailText, setTicketModal, project, expertName, sendParoSupportEmail, isTestEnv }: EmailModalProps) => React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -1,79 +1,79 @@
|
|
|
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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.EmailModal = void 0;
|
|
39
|
-
const react_1 = __importStar(require("react"));
|
|
40
|
-
const react_hot_toast_1 = __importDefault(require("react-hot-toast"));
|
|
41
|
-
const base_ui_1 = require("@paro.io/base-ui");
|
|
42
|
-
const EmailModal = ({ emailModal, setEmailModal, emailText, setEmailText, setTicketModal, project, expertName, sendParoSupportEmail, isTestEnv }) => {
|
|
43
|
-
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
44
|
-
const handleSubmit = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
45
|
-
var _a, _b;
|
|
46
|
-
setLoading(true);
|
|
47
|
-
try {
|
|
48
|
-
yield sendParoSupportEmail({
|
|
49
|
-
csm_email: isTestEnv ? "admin@paro.io" : "projectsupport@paro.io",
|
|
50
|
-
am_email: isTestEnv ? "admin@paro.io" : (_a = project === null || project === void 0 ? void 0 : project.paroContact) === null || _a === void 0 ? void 0 : _a.email,
|
|
51
|
-
expert_name: expertName,
|
|
52
|
-
client_name: (_b = project === null || project === void 0 ? void 0 : project.client) === null || _b === void 0 ? void 0 : _b.name,
|
|
53
|
-
project_name: project === null || project === void 0 ? void 0 : project.name,
|
|
54
|
-
problem_description: emailText
|
|
55
|
-
});
|
|
56
|
-
(0, react_hot_toast_1.default)(react_1.default.createElement(base_ui_1.Alert, { color: "success", icon: "success", label: `Email sent successful` }), {
|
|
57
|
-
position: 'bottom-right',
|
|
58
|
-
style: { borderRadius: '8px' },
|
|
59
|
-
});
|
|
60
|
-
setTicketModal(true);
|
|
61
|
-
setEmailModal(false);
|
|
62
|
-
setEmailText("");
|
|
63
|
-
setLoading(false);
|
|
64
|
-
}
|
|
65
|
-
catch (error) {
|
|
66
|
-
setLoading(false);
|
|
67
|
-
console.log(`Error sending email`, error);
|
|
68
|
-
(0, react_hot_toast_1.default)(react_1.default.createElement(base_ui_1.Alert, { color: "danger", icon: "danger", label: `Failed to send email` }), {
|
|
69
|
-
position: 'bottom-right',
|
|
70
|
-
style: { borderRadius: '8px' },
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
return (react_1.default.createElement(base_ui_1.Modal, { open: emailModal, onClose: () => setEmailModal(false), size: "sm", className: "z-[100]" },
|
|
75
|
-
react_1.default.createElement("h1", { className: "font-bold text-lg mb-2" }, "Please describe your problem or issue"),
|
|
76
|
-
react_1.default.createElement(base_ui_1.Input, { value: emailText, type: "text", placeholder: "Please describe your problem or issue", onChange: (e) => setEmailText(e.target.value) }),
|
|
77
|
-
react_1.default.createElement(base_ui_1.Button, { type: "button", onClick: () => { handleSubmit(); }, label: "SUBMIT", className: "mt-4", color: "primary", isLoading: loading })));
|
|
78
|
-
};
|
|
79
|
-
exports.EmailModal = EmailModal;
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.EmailModal = void 0;
|
|
39
|
+
const react_1 = __importStar(require("react"));
|
|
40
|
+
const react_hot_toast_1 = __importDefault(require("react-hot-toast"));
|
|
41
|
+
const base_ui_1 = require("@paro.io/base-ui");
|
|
42
|
+
const EmailModal = ({ emailModal, setEmailModal, emailText, setEmailText, setTicketModal, project, expertName, sendParoSupportEmail, isTestEnv }) => {
|
|
43
|
+
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
44
|
+
const handleSubmit = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
45
|
+
var _a, _b;
|
|
46
|
+
setLoading(true);
|
|
47
|
+
try {
|
|
48
|
+
yield sendParoSupportEmail({
|
|
49
|
+
csm_email: isTestEnv ? "admin@paro.io" : "projectsupport@paro.io",
|
|
50
|
+
am_email: isTestEnv ? "admin@paro.io" : (_a = project === null || project === void 0 ? void 0 : project.paroContact) === null || _a === void 0 ? void 0 : _a.email,
|
|
51
|
+
expert_name: expertName,
|
|
52
|
+
client_name: (_b = project === null || project === void 0 ? void 0 : project.client) === null || _b === void 0 ? void 0 : _b.name,
|
|
53
|
+
project_name: project === null || project === void 0 ? void 0 : project.name,
|
|
54
|
+
problem_description: emailText
|
|
55
|
+
});
|
|
56
|
+
(0, react_hot_toast_1.default)(react_1.default.createElement(base_ui_1.Alert, { color: "success", icon: "success", label: `Email sent successful` }), {
|
|
57
|
+
position: 'bottom-right',
|
|
58
|
+
style: { borderRadius: '8px' },
|
|
59
|
+
});
|
|
60
|
+
setTicketModal(true);
|
|
61
|
+
setEmailModal(false);
|
|
62
|
+
setEmailText("");
|
|
63
|
+
setLoading(false);
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
setLoading(false);
|
|
67
|
+
console.log(`Error sending email`, error);
|
|
68
|
+
(0, react_hot_toast_1.default)(react_1.default.createElement(base_ui_1.Alert, { color: "danger", icon: "danger", label: `Failed to send email` }), {
|
|
69
|
+
position: 'bottom-right',
|
|
70
|
+
style: { borderRadius: '8px' },
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return (react_1.default.createElement(base_ui_1.Modal, { open: emailModal, onClose: () => setEmailModal(false), size: "sm", className: "z-[100]" },
|
|
75
|
+
react_1.default.createElement("h1", { className: "font-bold text-lg mb-2" }, "Please describe your problem or issue"),
|
|
76
|
+
react_1.default.createElement(base_ui_1.Input, { value: emailText, type: "text", placeholder: "Please describe your problem or issue", onChange: (e) => setEmailText(e.target.value) }),
|
|
77
|
+
react_1.default.createElement(base_ui_1.Button, { type: "button", onClick: () => { handleSubmit(); }, label: "SUBMIT", className: "mt-4", color: "primary", isLoading: loading })));
|
|
78
|
+
};
|
|
79
|
+
exports.EmailModal = EmailModal;
|