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MACRtuC,MAAM,6BACNyuC,WAAW,+BACX51C,aAEA,gBAAC,QACCQ,KAAK,eACLO,EAAE,8vBACFc,GAAG,SAEL,gBAAC,QACCrB,KAAK,eACLO,EAAE,2vBACFc,GAAG,S,iiBCuBF,MAAMizC,EAAiB,CAAC9rC,EAAM+E,KACvB,aAAR/E,IAAqB,QAAgB,MAAA+E,OAAA,EAAAA,EAAS4E,SAC3C,QAAY3J,EAAM+E,IAEd8nC,EAAyB,CAAC7sC,EAAM+E,MAC3C,QAAgB/E,EAAM+E,EAAQ,EAGzB,SAAS+nC,EACd9sC,EACA+sC,EACAC,EAAmBlB,GAEnB,OAAQ/mC,GAAYioC,EAAQhtC,EAAM,OAAK+E,GAAYgoC,GACrD,CAeO,SAASE,EACdF,EACAC,GAEA,OAAQjoC,GAAYioC,EAAQ,OAAKjoC,GAAagoC,GAChD,CAEO,SAASG,EACdH,EACAC,EAAmBlB,GAInB,MAAO,CAFa/mC,GAAYioC,EAAQ,QAAS,OAAKjoC,GAAYgoC,IACzChoC,GAAYioC,EAAQ,aAAc,OAAKjoC,GAAYgoC,IAE9E,CAEO,MAAMI,EAvBN,SACLntC,EACA+sC,EACAC,EAAmBlB,GAEnB,OAAQ/mC,GAAYioC,EAAQhtC,EAAM,OAAK+E,GAAYgoC,GACrD,CAiBgCK,CAA+B,aAClDC,EAAa1jC,GAAmCwjC,EAAiB,CAAExjC,WACnE2jC,EAAaR,EAA0B,SAEvCS,GAlCN,SACLvtC,EACA+sC,EACAC,EAAuBH,GAGzB,CA2B6BW,CAA8B,SAC5BV,EAA0B,c","sources":["webpack://realm_app/./app/javascript/components/Button2.tsx","webpack://realm_app/./app/javascript/components/Core/CoreDivider.tsx","webpack://realm_app/./app/javascript/components/Markdown/styles.module.scss?e41c","webpack://realm_app/./app/javascript/components/Markdown/index.tsx","webpack://realm_app/./app/javascript/store/vendors/types.ts","webpack://realm_app/./app/javascript/store/vendors/state.ts","webpack://realm_app/./app/javascript/store/vendors/api.ts","webpack://realm_app/./app/javascript/non-rendering/VendorAuthentication.tsx","webpack://realm_app/./app/javascript/svgs/vendor-signin.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Signin/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/SetPassword/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/ForgotPassword/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/EditPassword/index.tsx","webpack://realm_app/./app/javascript/svgs/payment/amex.tsx","webpack://realm_app/./app/javascript/svgs/payment/apple-pay.tsx","webpack://realm_app/./app/javascript/svgs/payment/citadele.tsx","webpack://realm_app/./app/javascript/svgs/payment/diners-club.tsx","webpack://realm_app/./app/javascript/svgs/payment/discover.tsx","webpack://realm_app/./app/javascript/svgs/payment/giropay.tsx","webpack://realm_app/./app/javascript/svgs/payment/ideal.tsx","webpack://realm_app/./app/javascript/svgs/payment/jcb.tsx","webpack://realm_app/./app/javascript/svgs/payment/mastercard.tsx","webpack://realm_app/./app/javascript/svgs/payment/paypal.tsx","webpack://realm_app/./app/javascript/svgs/payment/union-pay.tsx","webpack://realm_app/./app/javascript/svgs/payment/visa.tsx","webpack://realm_app/./app/javascript/svgs/payment/webmoney.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Pay/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Checkout/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/PayReturn/index.tsx","webpack://realm_app/./app/javascript/store/vendors/hooks/index.ts","webpack://realm_app/./app/javascript/store/vendors/hooks/nfluxdrivers/common.ts","webpack://realm_app/./app/javascript/store/vendors/hooks/nfluxdrivers/20250121-new-features.ts","webpack://realm_app/./app/javascript/pages/Vendor/utils.ts","webpack://realm_app/./app/javascript/pages/Vendor/components/DatePill.tsx","webpack://realm_app/./app/javascript/pages/Vendor/components/OpportunitySmallGroupHeader.tsx","webpack://realm_app/./app/javascript/pages/Vendor/components/ConditionalLink.tsx","webpack://realm_app/./app/javascript/pages/Vendor/components/OpportunityRow.tsx","webpack://realm_app/./app/javascript/pages/Vendor/components/OpportunitySmallRow.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Overview/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/AllProjects/AllProjectsContent.tsx","webpack://realm_app/./app/javascript/pages/Vendor/AllProjects/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/AwardedProjects/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/components/PaymentRow.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Payments/PaymentsTableHeaders.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Payments/PaymentsList.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Payments/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Contract/ContractErrorModal.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Contract/DocumentModal/Documents/ReferralAgreement.ts","webpack://realm_app/./app/javascript/pages/Vendor/Contract/DocumentModal/DocumentLink.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Contract/DocumentModal/Documents/PaymentTerms.ts","webpack://realm_app/./app/javascript/pages/Vendor/Contract/DocumentModal/Documents/RulesOfConduct.ts","webpack://realm_app/./app/javascript/pages/Vendor/Contract/DocumentModal/styles.module.scss?6f84","webpack://realm_app/./app/javascript/pages/Vendor/Contract/DocumentModal/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Contract/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/DiscountedMaterials/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ProjectStatus.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/statuses/StatusLayout.tsx","webpack://realm_app/./app/javascript/svgs/remove-circle-outline.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/statuses/RejectedStatus.tsx","webpack://realm_app/./app/javascript/svgs/hourglass-top.tsx","webpack://realm_app/./app/javascript/svgs/message.tsx","webpack://realm_app/./app/javascript/svgs/send.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/statuses/SubmittedStatus.tsx","webpack://realm_app/./app/javascript/svgs/thumb-up-alt.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/statuses/SelectedStatus.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/statuses/PublishedStatus.tsx","webpack://realm_app/./app/javascript/svgs/update.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/statuses/UpdatesRequestedStatus.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/statuses/WithdrawnStatus.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/BidStatus.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/VerifyLicenseModal/VerifyLicense.tsx","webpack://realm_app/./app/javascript/svgs/report.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/VerifyLicenseModal/UnavailableLicense.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/VerifyLicenseModal/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/FlexiblePaymentsModal.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/SelectPaymentMethodModal.tsx","webpack://realm_app/./app/javascript/svgs/file-copy.tsx","webpack://realm_app/./app/javascript/svgs/warning-filled.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/VendorBidFile.tsx","webpack://realm_app/./app/javascript/svgs/files.tsx","webpack://realm_app/./app/javascript/svgs/warning.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/SelectBidPriceModal.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/VendorBidFiles.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/PointOfContactModal.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ProjectStatusModal.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/WithdrawModal.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/components/DatePicker/Button.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/components/DatePicker/TimePicker.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/components/DatePicker/Calendar.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/components/DatePicker/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/screens/PickExtensionDate.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/screens/ExtensionRequested.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/components/BaseScreen.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/components/SelectScreen.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/screens/PickExtensionReason.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/components/ConfirmScreen.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/screens/ConfirmRescheduled.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/components/PickDateScreen.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/screens/PickRescheduledDate.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/screens/AssistanceForRescheduled.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/screens/AssistanceForFollowup.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/screens/PickFollowupReason.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/screens/PickMoreTimeReason.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/screens/ConfirmScope.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/screens/ConfirmBudget.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/screens/ConfirmFollowup.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/screens/PickFollowupDate.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/ExtensionModal/index.tsx","webpack://realm_app/./app/javascript/svgs/check-circle.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/PaymentsTab.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/Banners.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Project/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/VendorProfileIllustration.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/components/GridItem.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/components/PastProjectGridItem.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/components/FormField.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/components/MediaGallery.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/EditPastProjectModal/VendorPhotosIllustration.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/components/ProjectTypesPicker.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/EditPastProjectModal/EditPastProjectModalContent.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/EditPastProjectModal/PhotosTipsWalkthrough.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/EditPastProjectModal/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/ReviewIllustration.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/ImagesIllustration.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/UpdateIllustration.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/SuccessIllustration.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/SuccessModal.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/PastProjectsGrid.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/PortfolioStats/PortfolioStatsChart.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/PortfolioStats/PortfolioStatsModal.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/PortfolioStats/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Profile/index.tsx","webpack://realm_app/./app/javascript/store/vendors/hooks/nfluxdrivers/20250121-business-profile.ts","webpack://realm_app/./app/javascript/pages/Vendor/Settings/BusinessUnits/BusinessUnitTabButton.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Settings/BusinessUnits/ServiceAreaMap.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Settings/BusinessUnits/ProjectTypesCheckBoxes.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Settings/BusinessUnits/EditGeneralSettingsModal.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Settings/BusinessUnits/AddBusinessUnitModal.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Settings/BusinessUnits/AvailabilityForm.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Settings/BusinessUnits/InnerBusinessUnits.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Settings/BusinessUnits/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Settings/Team/ActionsMenu.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Settings/Team/RolesPermissions.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Settings/Team/VendorContactPictureField.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Settings/Team/VendorContactFormModal.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Settings/Team/VendorContactRow.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Settings/Team/VendorContactListItem.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Settings/Team/InnerTeam.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Settings/Team/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/Settings/index.tsx","webpack://realm_app/./app/javascript/store/vendors/hooks/nfluxdrivers/20250121-business-settings.ts","webpack://realm_app/./app/javascript/pages/Vendor/components/VendorTopBarMenu/AvailabilityMenu.tsx","webpack://realm_app/./app/javascript/pages/Vendor/components/VendorTopBarMenu/index.tsx","webpack://realm_app/./app/javascript/pages/Vendor/components/VendorTopBar.tsx","webpack://realm_app/./app/javascript/pages/Vendor/components/VendorOffCanvasMenu.tsx","webpack://realm_app/./app/javascript/pages/Vendor/components/VendorSideBar.tsx","webpack://realm_app/./app/javascript/pages/Vendor/components/VendorContactInfoModal.tsx","webpack://realm_app/./app/javascript/pages/Vendor/components/VendorLayout.tsx","webpack://realm_app/./app/javascript/vendors/VendorRouter.tsx","webpack://realm_app/./app/javascript/packs/vendors.tsx","webpack://realm_app/./app/javascript/pages/_serverRendered/VendorSiteVisit/Availabilities/Calendar/types.tsx","webpack://realm_app/./app/javascript/pages/_serverRendered/VendorSiteVisit/Availabilities/Calendar/styles.module.scss?7ea7","webpack://realm_app/./app/javascript/pages/_serverRendered/VendorSiteVisit/Availabilities/Calendar/Month.tsx","webpack://realm_app/./app/javascript/pages/_serverRendered/VendorSiteVisit/Availabilities/Calendar/Week.tsx","webpack://realm_app/./app/javascript/pages/_serverRendered/VendorSiteVisit/Availabilities/Calendar/index.tsx","webpack://realm_app/./app/javascript/svgs/add.tsx","webpack://realm_app/./app/javascript/svgs/arrow-forward-ios.tsx","webpack://realm_app/./app/javascript/svgs/dropdown-arrow.tsx","webpack://realm_app/./app/javascript/svgs/email-2.tsx","webpack://realm_app/./app/javascript/svgs/phone.tsx","webpack://realm_app/./app/javascript/svgs/realm-business.tsx","webpack://realm_app/./app/javascript/svgs/search.tsx","webpack://realm_app/./app/javascript/svgs/sparkles-two.tsx","webpack://realm_app/./app/javascript/utils/analyticsV2.ts"],"sourcesContent":["import React, { CSSProperties, ForwardRefRenderFunction, forwardRef, PropsWithChildren } from 'react'\nimport cx from 'classnames'\n\nexport interface ButtonProps {\n className?: string\n disabled?: boolean\n loading?: boolean\n onClick?: () => void\n onMouseDown?: (e: React.MouseEvent) => void\n type?: 'button' | 'submit' | 'reset'\n style?: CSSProperties\n}\n\nconst Button: ForwardRefRenderFunction> = (\n { children, className, disabled, loading, onClick, onMouseDown, style, type = 'button' },\n ref\n) => {\n return (\n \n {loading && (\n \n \n \n \n )}\n {children}\n \n )\n}\n\nexport default forwardRef(Button)\n","import React, { FC } from 'react'\n\nimport cx from 'classnames'\n\ninterface CoreDividerProps {\n className?: string\n}\n\nconst Section: FC = ({ className }) => {\n return
\n}\n\nconst Full: FC = ({ className }) => {\n return
\n}\n\nconst Indent: FC = ({ className }) => {\n return
\n}\n\nconst Center: FC = ({ className }) => {\n return
\n}\n\nconst CoreDivider = {\n Section: Section,\n Full: Full,\n Indent: Indent,\n Center: Center,\n}\n\nexport default CoreDivider\n","// extracted by mini-css-extract-plugin\nexport default {\"markdown\":\"A3TmDIAkUZZT4AStfGqw\"};","import React, { FC } from 'react'\nimport classnames from 'classnames'\nimport MarkdownElement from 'markdown-to-jsx'\nimport type { MarkdownToJSX } from 'markdown-to-jsx'\n\nimport styles from './styles.module.scss'\n\nconst Markdown: FC<{\n [key: string]: any\n children: string\n className?: string\n options?: MarkdownToJSX.Options\n}> = ({ className, ...other }) => (\n
\n \n
\n)\n\nexport default Markdown\n","import type { FeatureCollection, Polygon } from 'geojson'\n\n// see view :me in app/blueprints/vendor_portal/vendor_contact_blueprint.rb\nexport interface VendorContactUserMe {\n id: number\n email: string\n full_name: string\n roles: ('owner' | 'admin' | 'billing' | 'pm')[]\n normalized_phone_number: string | null\n display_phone_number: string | null\n primary_contact: boolean\n reminders_enabled: boolean\n subscribed_to_emails: boolean\n vendor_name: string\n vendor_license: {\n number: string\n last_checked_at: string\n } | null\n vendor_allow_capchase: boolean\n vendor_contract_version: null | 'Legacy' | 'Aug 2024 New User' | 'Aug 2024 Legacy User'\n vendor_contract_hold: boolean\n vendor_contract_needs_attention: boolean\n vendor_contract_accepted_at: string // iso8601\n vendor_contract_accepted_due_at: string | null // iso8601\n vendor_contract_accepted_by_full_name: string | null\n vendor_contract_accepted_by_email: string | null\n vendor_contract_overdue: boolean\n vendor_contract_presented_at: string | null // iso8601\n vendor_insta_pay_rate: null | number\n vendor_payment_plan_rate: null | number\n vendor_pay_at_construction_rate: null | number\n vendor_allow_pac: boolean\n vendor_multiple_business_units: boolean\n vendor_insufficient_photos_warning_at: string | null // iso8601\n vendor_insufficient_photos_block: boolean\n vendor_project_types_with_insufficient_photos: string[]\n created_at: string\n ooo: boolean\n ooo_starts_at: string | null\n ooo_ends_at: string | null\n backup_vendor_contact_id: number | null\n headshot_url: string | null\n}\n\nexport type VendorContactFields = {\n id: number | null\n headshot_to_upload: FileList | null\n headshot_signed_id?: string\n full_name: string\n email: string\n phone_number: string\n roles: ('owner' | 'admin' | 'billing' | 'pm')[]\n vendor_business_unit_ids: number[]\n}\n\n// see view :team in app/blueprints/vendor_portal/vendor_contact_blueprint.rb\nexport interface TeamVendorContact {\n id: number\n initials: string\n full_name: string\n pic_url: string | null\n email: string | null\n display_phone_number: string | null\n normalized_phone_number: string | null\n reminders_enabled: boolean\n vendor_business_units: { id: number; name: string }[]\n account_status: 'active' | 'pending_activation' | 'activation_failed' | 'archived'\n roles: ('owner' | 'admin' | 'billing' | 'pm')[]\n subscribed_to_emails: boolean\n ooo: boolean\n}\n\nexport interface GenericErrors {\n errors: Record\n}\n\n// see view :settings in app/blueprints/vendor_portal/vendor_contact_blueprint.rb\nexport interface BusinessUnitVendorContact {\n id: number\n initials: string\n full_name: string | null\n headshot_url: string | null\n email: string | null\n display_phone_number: string | null\n}\n\nexport interface BusinessUnit {\n id: number\n name: string | null\n vendor_contacts: BusinessUnitVendorContact[]\n dispatcher: {\n id: number\n full_name: string | null\n email: string | null\n display_phone_number: string | null\n } | null\n state: string\n hq_address: string | null\n project_types: string[]\n service_area_as_feature_collection: FeatureCollection\n categories: string[]\n created_at: string\n self_hold: boolean\n self_hold_end_date: string | null\n}\n\nexport interface VendorSettings {\n id: number\n name: string\n realm_status: string\n website: string\n bio: string\n review_sites: string[]\n company_type: string\n allow_pac: string\n allow_capchase: string\n badges: string[]\n business_units: BusinessUnit[]\n contract_effective_at: string\n created_at: string\n logo_url: string | null\n}\n\nexport interface VendorPayment {\n sfdc_id: string\n type: null | 'Design payment' | 'Construction payment' | 'Change Order'\n status: 'Invoiced' | 'Initiated' | 'Collected' | 'Customer Cancel - Refunded' | 'Failed'\n method: null | 'Legacy' | 'Design' | 'Insta-Pay' | 'Payment Plan' | 'Pay at Construction' | 'Realm Payment Plan'\n stripe_next_action:\n | null\n | {\n type: 'verify_with_microdeposits'\n verify_with_microdeposits: {\n arrival_date: number\n hosted_verification_url: string\n microdeposit_type: string | null\n }\n }\n | { type: 'redirect_to_url' | 'use_stripe_sdk' | 'alipay_handle_redirect' | 'oxxo_display_details' } // other possiblities, we don't care about these right now\n stripe_url: null | string\n capchase_url: null | string\n quickbooks_url: null | string\n amount_in_cents: number\n invoice_sent_date: string // iso8601\n invoice_due_date: string // iso8601\n collected_date: string // iso8601\n}\n\nexport interface VendorOpportunity {\n id: string\n opportunity_id: string\n bid_due_ts: string | null // iso8601\n bid_extension_ts: string | null // iso8601\n site_visit_ts: string | null // iso8601\n timestamp: string | null // iso8601\n bid_extension_requested: boolean | null\n bid_status:\n | 'Not Submitted'\n | 'On Hold'\n | 'Submitted'\n | 'Published'\n | 'Updates Requested'\n | 'Accepted'\n | 'Rejected'\n | 'Withdrawn'\n | null\n visit_status:\n | null\n | 'Created'\n | 'Requested'\n | 'Request Expired'\n | 'Request Declined'\n | 'Disqualified'\n | 'Scheduled'\n | 'Rescheduled'\n | 'Reschedule requested by homeowner'\n | 'Canceled'\n | 'Canceled by customer'\n | 'Canceled by vendor'\n | 'Presumed Visited'\n | 'Visited'\n | 'No Show'\n | 'no response'\n group: 'Overdue' | 'Upcoming' | 'Awarded' | 'Archived' | null\n coming_soon: boolean\n project_status: Record<\n 'New Opportunity' | 'Site Visit' | 'Proposal' | 'Client Decision' | 'Contract' | 'Invoice',\n {\n status: 'Done' | 'Current' | 'NotYet' | 'Closed'\n action?: 'Visit' | 'On hold' | 'Submit' | 'Pay'\n }\n >\n action: 'Review' | 'Visit' | 'On hold' | 'Submit' | 'Pay' | null\n scheduling_url: string | null\n current_status:\n | 'New Opportunity'\n | 'Site Visit'\n | 'Proposal'\n | 'Client Decision'\n | 'Contract'\n | 'Invoice'\n | 'Awarded'\n | 'Archived'\n | null\n advisor_bid_message: string | null\n advisor: {\n name: string\n title: string\n normalized_phone_number: string | null\n display_phone_number: string | null\n email: string\n profile_pic_url: string | null\n }\n property: {\n address_line_1: string\n address_city: string\n address_state: string\n address_zip: string\n coords: [number, number]\n }\n client: {\n name: string\n email: string\n normalized_phone_number: string | null\n display_phone_number: string | null\n }\n payments: VendorPayment[]\n}\n\nexport interface VendorSubmittedBid {\n files: { id: number; filename: string; filesize: number; url: string; kind: string; bid_type: string }[]\n submitted_at: string\n bid_status:\n | 'Not Submitted'\n | 'On Hold'\n | 'Submitted'\n | 'Published'\n | 'Updates Requested'\n | 'Accepted'\n | 'Rejected'\n | 'Withdrawn'\n}\n\nexport interface VendorConversationParticipant {\n sid: string\n name: string\n pic_url: string\n role: string\n affiliation: string\n}\n\nexport interface VendorPaymentForIndex extends VendorPayment {\n sfdc_opp_id: string\n take_rate: null | number\n property: {\n address_line_1: string\n address_city: string\n address_state: string\n address_zip: string\n coords: [number, number]\n }\n client: {\n name: string\n email: string\n normalized_phone_number: string | null\n display_phone_number: string | null\n }\n}\n\nexport interface PastProjectAttachment {\n id: number | null\n file_type: 'photo' | 'video' | 'document'\n url: string\n signed_id?: string\n}\n\nexport interface VendorPastProject {\n id: number\n vendor_id: number\n property_plan_id: number | null\n sfdc_opportunity_ref: string | null\n start_date: string | null // YYYY-DD-MM\n end_date: string | null // YYYY-DD-mm\n project_types: string[]\n additional_info: string\n address: string | null\n name: string | null\n created_at: string // iso8601\n updated_at: string // iso8601\n user: {\n id: number\n email: string\n full_name: string\n }\n property: {\n id: number\n address: string\n }\n city: string\n before_media: PastProjectAttachment[]\n after_media: PastProjectAttachment[]\n cover_photo: string\n uncategorized: boolean\n total_cost_in_dollars: number | null\n square_footage: number | null\n}\n\nexport interface VendorOpportunityDetail extends VendorOpportunity {\n scope: string | null\n submitted_bid: VendorSubmittedBid | null\n project_type: null | 'Design' | 'Design & Construction' | 'Construction'\n payment_method: null | 'Legacy' | 'Design' | 'Insta-Pay' | 'Payment Plan' | 'Pay at Construction'\n take_rate: null | number\n pac_confirmed: boolean\n}\n\nexport enum VendorLoginStatus {\n Unknown,\n LoggedOut,\n LoggedIn,\n}\n\nexport type ExtensionReason =\n | 'site-visit-did-not-happen'\n | 'need-more-time'\n | 'need-another-meeting'\n | 'scope-undefined'\n | 'unrealistic-budget'\n | 'other'\nexport type FollowupReason = 'present-bid' | 'gather-info'\nexport type MoreTimeReason = 'scope-complex' | 'too-busy'\n\nexport interface ExtensionOptions {\n extension_reason?: ExtensionReason\n followup_reason?: FollowupReason\n followup_date?: Date\n need_followup_assistance?: boolean\n need_rescheduled_assistance?: boolean\n bid_ready?: boolean\n budget_details?: string\n followup_scheduled?: boolean\n site_visit_rescheduled?: boolean\n scope_details?: string\n extension_date?: Date\n need_more_than_a_week?: boolean\n additional_details?: string\n more_time_reason?: MoreTimeReason\n rescheduled_date?: Date\n}\n\nexport type ExtensionModalScreen =\n | 'pick-extension-reason'\n | 'pick-extension-date'\n | 'extension-requested'\n | 'confirm-rescheduled'\n | 'pick-rescheduled-date'\n | 'assistance-for-rescheduled'\n | 'pick-followup-reason'\n | 'confirm-followup'\n | 'pick-followup-date'\n | 'assistance-for-followup'\n | 'pick-more-time-reason'\n | 'confirm-scope'\n | 'confirm-budget'\n","import { atom, atomFamily, selector } from 'recoil'\nimport {\n ExtensionOptions,\n ExtensionReason,\n FollowupReason,\n MoreTimeReason,\n TeamVendorContact,\n VendorContactUserMe,\n VendorLoginStatus,\n VendorOpportunity,\n VendorOpportunityDetail,\n VendorPastProject,\n VendorPaymentForIndex,\n VendorSettings,\n} from 'store/vendors/types'\nimport { identify } from 'utils/analytics'\nimport { sessionStorageEffect } from 'utils/recoil'\n\nexport const vendorMeState = atom({\n key: 'vendorMeState',\n default: null,\n effects_UNSTABLE: [\n ({ onSet }) => {\n onSet(async (vendorContactUser) => {\n if (!vendorContactUser) return\n identify({\n id: `vendor-contact-${vendorContactUser.id}`,\n full_name: vendorContactUser.full_name,\n email: vendorContactUser.email,\n phone_number: vendorContactUser.normalized_phone_number || '',\n created_at: vendorContactUser.created_at,\n vendor_name: vendorContactUser.vendor_name,\n })\n })\n },\n ],\n})\n\nexport const vendorSettingsState = atom({\n key: 'vendorSettingsState',\n default: null,\n})\n\nexport const vendorContactsState = atom | null>({\n key: 'vendorContactsState',\n default: null,\n})\n\nexport const vendorLoginStatusState = atom({\n key: 'vendorLoginStatusState',\n default: VendorLoginStatus.Unknown,\n})\n\nexport const vendorOpportunitiesState = atom({\n key: 'vendorOpportunitiesState',\n default: null,\n})\n\nexport const vendorPaymentsState = atom({\n key: 'vendorPaymentsState',\n default: null,\n})\n\nexport const vendorClientSecretState = atom({\n key: 'vendorClientSecretState',\n default: null,\n})\n\nexport const vendorPastProjectsState = atom | null>({\n key: 'vendorPastProjects',\n default: null,\n})\n\nexport const vendorShowAddedPastProjectsSuccessDialogState = atom({\n key: 'vendorShowAddedPastProjectsSuccessDialogState',\n default: true,\n effects_UNSTABLE: [sessionStorageEffect('vendorShowAddedPastProjectsSuccessDialogState', false)],\n})\n\nexport const vendorOpportunityDetailState = atomFamily({\n key: 'vendorOpportunityDetailState',\n default: null,\n})\n\nexport const extensionOptionsState = atom({\n key: 'extensionOptionsState',\n default: {},\n})\n\nexport const extensionModalState = atom<'start' | 'pending' | 'success' | 'error'>({\n key: 'extensionModalState',\n default: 'start',\n})\n\nexport const extensionExtensionReasonSelector = selector({\n key: 'extensionExtensionReasonSelector',\n get: ({ get }) => get(extensionOptionsState)?.extension_reason,\n set: ({ set }, value: ExtensionReason | undefined) => {\n set(extensionOptionsState, (o) => ({ ...o, extension_reason: value }))\n },\n})\n\nexport const extensionFollowupReasonSelector = selector({\n key: 'extensionFormFollowupReasonSelector',\n get: ({ get }) => get(extensionOptionsState)?.followup_reason,\n set: ({ set }, value: FollowupReason | undefined) => {\n set(extensionOptionsState, (o) => ({ ...o, followup_reason: value }))\n },\n})\n\nexport const extensionFollowupDateSelector = selector({\n key: 'extensionFormFollowupDateSelector',\n get: ({ get }) => get(extensionOptionsState)?.followup_date,\n set: ({ set }, value: Date | undefined) => {\n set(extensionOptionsState, (o) => ({ ...o, followup_date: value }))\n },\n})\n\nexport const extensionFollowupAssistanceSelector = selector({\n key: 'extensionFollowupAssistanceSelector',\n get: ({ get }) => get(extensionOptionsState)?.need_followup_assistance,\n set: ({ set }, value: boolean | undefined) => {\n set(extensionOptionsState, (o) => ({ ...o, need_followup_assistance: value }))\n },\n})\n\nexport const extensionRescheduledAssistanceSelector = selector({\n key: 'extensionRescheduledAssistanceSelector',\n get: ({ get }) => get(extensionOptionsState)?.need_rescheduled_assistance,\n set: ({ set }, value: boolean | undefined) => {\n set(extensionOptionsState, (o) => ({ ...o, need_rescheduled_assistance: value }))\n },\n})\n\nexport const extensionBidReadySelector = selector({\n key: 'extensionBidReadySelector',\n get: ({ get }) => get(extensionOptionsState)?.bid_ready,\n set: ({ set }, value: boolean | undefined) => {\n set(extensionOptionsState, (o) => ({ ...o, bid_ready: value }))\n },\n})\n\nexport const extensionBudgetDetailsSelector = selector({\n key: 'extensionBudgetDetailsSelector',\n get: ({ get }) => get(extensionOptionsState)?.budget_details,\n set: ({ set }, value: string | undefined) => {\n set(extensionOptionsState, (o) => ({ ...o, budget_details: value }))\n },\n})\n\nexport const extensionFollowupScheduledSelector = selector({\n key: 'extensionFollowupScheduledSelector',\n get: ({ get }) => get(extensionOptionsState)?.followup_scheduled,\n set: ({ set }, value: boolean | undefined) => {\n set(extensionOptionsState, (o) => ({ ...o, followup_scheduled: value }))\n },\n})\n\nexport const extensionSiteVisitRescheduledSelector = selector({\n key: 'extensionSiteVistRescheduledSelector',\n get: ({ get }) => get(extensionOptionsState)?.site_visit_rescheduled,\n set: ({ set }, value: boolean | undefined) => {\n set(extensionOptionsState, (o) => ({ ...o, site_visit_rescheduled: value }))\n },\n})\n\nexport const extensionScopeDetailsSelector = selector({\n key: 'extensionScopeDetailsSelector',\n get: ({ get }) => get(extensionOptionsState)?.scope_details,\n set: ({ set }, value: string | undefined) => {\n set(extensionOptionsState, (o) => ({ ...o, scope_details: value }))\n },\n})\n\nexport const extensionExtensionDateSelector = selector({\n key: 'extensionExtensionDateSelector',\n get: ({ get }) => get(extensionOptionsState)?.extension_date,\n set: ({ set }, value: Date | undefined) => {\n set(extensionOptionsState, (o) => ({ ...o, extension_date: value }))\n },\n})\n\nexport const extensionNeedMoreThanAWeekSelector = selector({\n key: 'extensionNeedMoreThanAWeekSelector',\n get: ({ get }) => get(extensionOptionsState)?.need_more_than_a_week,\n set: ({ set }, value: boolean | undefined) => {\n set(extensionOptionsState, (o) => ({ ...o, need_more_than_a_week: value }))\n },\n})\n\nexport const extensionAdditionalDetailsSelector = selector({\n key: 'extensionAdditionalDetailsSelector',\n get: ({ get }) => get(extensionOptionsState)?.additional_details,\n set: ({ set }, value: string | undefined) => {\n set(extensionOptionsState, (o) => ({ ...o, additional_details: value }))\n },\n})\n\nexport const extensionMoreTimeReasonSelector = selector({\n key: 'extensionMoreTimeReasonSelector',\n get: ({ get }) => get(extensionOptionsState)?.more_time_reason,\n set: ({ set }, value: MoreTimeReason | undefined) => {\n set(extensionOptionsState, (o) => ({ ...o, more_time_reason: value }))\n },\n})\n\nexport const extensionRescheduledDateSelector = selector({\n key: 'extensionRescheduledDateSelector',\n get: ({ get }) => get(extensionOptionsState)?.rescheduled_date,\n set: ({ set }, value: Date | undefined) => {\n set(extensionOptionsState, (o) => ({ ...o, rescheduled_date: value }))\n },\n})\n\nexport const vendorTopMenuOpenState = atom({\n key: 'vendorTopMenuOpenState',\n default: false,\n})\n\nexport const vendorSidebarOpenState = atom({\n key: 'vendorSidebarOpenState',\n default: false,\n})\n","import ReactOnRails from 'react-on-rails'\nimport { DirectUpload } from '@rails/activestorage'\nimport {\n GenericErrors,\n TeamVendorContact,\n VendorContactFields,\n VendorContactUserMe,\n VendorOpportunity,\n VendorOpportunityDetail,\n VendorPastProject,\n VendorPaymentForIndex,\n VendorSettings,\n} from 'store/vendors/types'\nimport { deleteJSON, FetchResponse, getJSON, patchJSON, postJSON } from 'utils/fetch'\n\nexport const directUploadFile = (file: File): Promise<{ signed_id: string }> => {\n const directUpload = new DirectUpload(file, '/rails/active_storage/direct_uploads')\n\n return new Promise((resolve, reject) => {\n directUpload.create((error, blob: { signed_id: string }) => {\n if (error) {\n reject(error)\n } else {\n resolve(blob)\n }\n })\n })\n}\n\nexport const fetchVendorContactUserMe = (signal?: AbortSignal): Promise => {\n return getJSON('/vendors/me', { cache: 'no-store', signal })\n}\n\nexport const fetchVendorSettings = (signal?: AbortSignal): Promise => {\n return getJSON('/vendors/me/vendor/settings', { cache: 'no-store', signal })\n}\n\nexport const updateVendorSettings = (body: BodyInit, signal: AbortSignal): Promise => {\n const headers = ReactOnRails.authenticityHeaders({ Accept: 'application/json', 'Content-Type': 'application/json' })\n if (process.env.REALM_APP_VERSION) headers['X-Realm-App-Version'] = process.env.REALM_APP_VERSION\n\n return fetch('/vendors/me/vendor/settings', {\n method: 'POST',\n credentials: 'same-origin',\n headers,\n body,\n signal,\n })\n}\n\nexport const fetchVendorContactUsers = (signal?: AbortSignal): Promise => {\n return getJSON('/vendors/api/vendor_contacts', { cache: 'no-store', signal })\n}\n\nexport const deleteVendorContact = (id: number, signal: AbortSignal): Promise => {\n return deleteJSON(`/vendors/api/vendor_contacts/${id}`, signal)\n}\n\nexport const inviteVendorContact = (id: number, signal: AbortSignal): Promise> => {\n return postJSON(`/vendors/api/vendor_contacts/${id}/invite`, {}, signal)\n}\n\nexport const fetchVendorOpportunities = (signal: AbortSignal): Promise => {\n return getJSON('/vendors/api/opportunities', { signal })\n}\n\nexport const fetchVendorOpportunity = (id: string, signal: AbortSignal): Promise => {\n return getJSON(`/vendors/api/opportunities/${id}`, { signal })\n}\n\nexport const fetchVendorPayments = (signal: AbortSignal): Promise => {\n return getJSON('/vendors/api/payments', { signal })\n}\n\nexport const fetchPastProjects = (signal: AbortSignal): Promise => {\n return getJSON('/vendors/api/past_projects', { signal })\n}\n\nexport const deleteVendorPastProject = (id: number, signal: AbortSignal): Promise => {\n return deleteJSON(`/vendors/api/past_projects/${id}`, signal)\n}\n\nexport const createVendorPayCheckout = (\n sfdcPaymentRef: string,\n body: Record,\n signal: AbortSignal\n): Promise => {\n return postJSON(`/vendors/api/pay/${sfdcPaymentRef}/create_checkout`, body, signal)\n}\n\nexport const updateMeVendorContact = (body: BodyInit, signal: AbortSignal): Promise => {\n const headers = ReactOnRails.authenticityHeaders({ Accept: 'application/json', 'Content-Type': 'application/json' })\n if (process.env.REALM_APP_VERSION) headers['X-Realm-App-Version'] = process.env.REALM_APP_VERSION\n\n return fetch('/vendors/me', {\n method: 'POST',\n credentials: 'same-origin',\n headers,\n body,\n signal,\n })\n}\n\nexport const createVendorContact = (\n body: VendorContactFields,\n signal: AbortSignal\n): Promise> => {\n return postJSON('/vendors/api/vendor_contacts', body, signal)\n}\n\nexport const updateVendorContact = (\n id: number,\n body: VendorContactFields,\n signal: AbortSignal\n): Promise> => {\n return patchJSON(`/vendors/api/vendor_contacts/${id}`, body, signal)\n}\n\nexport const deleteVendorContactHeadshot = (\n id: number,\n signal: AbortSignal\n): Promise> => {\n return deleteJSON(`/vendors/api/vendor_contacts/${id}/delete_headshot`, signal)\n}\n\nexport const acceptVendorContract = (signal?: AbortSignal): Promise => {\n const headers = ReactOnRails.authenticityHeaders({ Accept: 'application/json', 'Content-Type': 'application/json' })\n if (process.env.REALM_APP_VERSION) headers['X-Realm-App-Version'] = process.env.REALM_APP_VERSION\n\n return fetch('/vendors/api/contracts/accept', {\n method: 'POST',\n credentials: 'same-origin',\n headers,\n signal,\n })\n}\n\nexport const declineVendorOpportunity = (id: string, body: BodyInit, signal: AbortSignal): Promise => {\n const headers = ReactOnRails.authenticityHeaders({ Accept: 'application/json', 'Content-Type': 'application/json' })\n if (process.env.REALM_APP_VERSION) headers['X-Realm-App-Version'] = process.env.REALM_APP_VERSION\n\n return fetch(`/vendors/api/opportunities/${id}/decline`, {\n method: 'POST',\n credentials: 'same-origin',\n headers,\n body,\n signal,\n })\n}\n\nexport const requestBidExtension = (id: string, body: BodyInit, signal: AbortSignal): Promise => {\n const headers = ReactOnRails.authenticityHeaders({ Accept: 'application/json', 'Content-Type': 'application/json' })\n if (process.env.REALM_APP_VERSION) headers['X-Realm-App-Version'] = process.env.REALM_APP_VERSION\n\n return fetch(`/vendors/api/opportunities/${id}/extend`, {\n method: 'POST',\n credentials: 'same-origin',\n headers,\n body,\n signal,\n })\n}\n","import React, { FC, PropsWithChildren, useEffect } from 'react'\nimport { useSetRecoilState } from 'recoil'\nimport { VendorLoginStatus } from 'store/vendors/types'\nimport { vendorLoginStatusState, vendorMeState } from 'store/vendors/state'\nimport { fetchVendorContactUserMe } from 'store/vendors/api'\n\nconst VendorAuthentication: FC = ({ children }) => {\n const setMe = useSetRecoilState(vendorMeState)\n const setVendorLoginStatus = useSetRecoilState(vendorLoginStatusState)\n\n useEffect(() => {\n const controller = new AbortController()\n const _ = async () => {\n try {\n const newVendorContactUserMe = await fetchVendorContactUserMe(controller.signal)\n setMe(newVendorContactUserMe)\n setVendorLoginStatus(VendorLoginStatus.LoggedIn)\n } catch (error) {\n if (!controller.signal.aborted) {\n if (error.code !== 401) console.error(error)\n setVendorLoginStatus(VendorLoginStatus.LoggedOut)\n }\n }\n }\n _()\n return () => {\n controller.abort()\n }\n }, [setVendorLoginStatus, setMe])\n\n return <>{children}\n}\n\nexport default VendorAuthentication\n","import React, { FC } from 'react'\n\ntype VendorSignupSvgProps = {\n className?: string\n}\n\nconst VendorSignupSvg: FC = ({ className }) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\nexport default VendorSignupSvg\n","import React, { FC, useCallback, useEffect, useState } from 'react'\nimport { track } from 'utils/analytics'\nimport CoreInput from 'components/Core/CoreInput'\nimport CoreButton from 'components/Core/CoreButton'\nimport PageTitle from 'components/PageTitle'\nimport Spinner from 'components/Spinner'\nimport RealmBusiness from 'svgs/realm-business'\nimport StripesBg from 'svgs/stripes-bg'\nimport VendorSignupSvg from 'svgs/vendor-signin'\nimport { Link } from 'react-router-dom'\n\nconst VendorSignin: FC = () => {\n const [submitting, setSubmitting] = useState(false)\n const handleSubmit = useCallback(() => {\n setSubmitting(true)\n track('vendor signin', { via: 'form' })\n // we let the event's default behaviour proceed, which will submit the actual form\n }, [])\n\n const csrfParam = document.querySelector('meta[name=csrf-param]')?.getAttribute('content')\n const csrfToken = document.querySelector('meta[name=csrf-token]')?.getAttribute('content')\n\n // prevent refresh from asking to re-submit POST\n useEffect(() => {\n window.history.replaceState(null, '', window.location.href)\n }, [])\n\n return (\n
\n \n
\n \n
\n
\n \n
\n \n {'Join our vendors network'}\n \n \n {'For Homeowners'}\n \n
\n
\n
\n
\n
\n
\n
\n

\n {'Sign in'}\n

\n

\n {'Want to Join our Vendor Network? '}\n \n {'Sign Up'}\n \n

\n
\n \n \n \n \n : undefined}\n className=\"tw:w-full\"\n />\n
\n \n {'Forgot password?'}\n \n \n
\n
\n
\n
\n
\n
\n \n
\n
\n \n {'🤝'}\n \n
\n
\n \n {'✨'}\n \n
\n
\n
\n
\n
\n )\n}\n\nexport default VendorSignin\n","import React, { FC, useCallback, useState } from 'react'\nimport { useRecoilValue } from 'recoil'\nimport { track } from 'utils/analytics'\nimport { vendorMeState } from 'store/vendors/state'\nimport CoreInput from 'components/Core/CoreInput'\nimport CoreButton from 'components/Core/CoreButton'\nimport PageTitle from 'components/PageTitle'\nimport Spinner from 'components/Spinner'\nimport RealmBusiness from 'svgs/realm-business'\nimport StripesBg from 'svgs/stripes-bg'\n\nconst SetPassword: FC = () => {\n const [submitting, setSubmitting] = useState(false)\n const handleSubmit = useCallback(() => {\n setSubmitting(true)\n track('vendor set password')\n // we let the event's default behaviour proceed, which will submit the actual form\n }, [])\n\n const me = useRecoilValue(vendorMeState)\n if (!me) return null\n\n const csrfParam = document.querySelector('meta[name=csrf-param]')?.getAttribute('content')\n const csrfToken = document.querySelector('meta[name=csrf-token]')?.getAttribute('content')\n\n return (\n
\n \n
\n \n
\n
\n
\n \n
\n
\n

\n {'Set up your password'}\n

\n

{'Please set you password here (min length: 6) for future logins to your portal.'}

\n
\n \n \n \n \n \n : undefined}\n className=\"tw:w-full\"\n />\n
\n
\n
\n
\n
\n
\n )\n}\n\nexport default SetPassword\n","import React, { FC, useCallback, useState } from 'react'\nimport { track } from 'utils/analytics'\nimport CoreInput from 'components/Core/CoreInput'\nimport CoreButton from 'components/Core/CoreButton'\nimport PageTitle from 'components/PageTitle'\nimport Spinner from 'components/Spinner'\nimport RealmBusiness from 'svgs/realm-business'\nimport StripesBg from 'svgs/stripes-bg'\n\nconst ForgotPassword: FC = () => {\n const [submitting, setSubmitting] = useState(false)\n const handleSubmit = useCallback(() => {\n setSubmitting(true)\n track('vendor forgot password')\n // we let the event's default behaviour proceed, which will submit the actual form\n }, [])\n\n const csrfParam = document.querySelector('meta[name=csrf-param]')?.getAttribute('content')\n const csrfToken = document.querySelector('meta[name=csrf-token]')?.getAttribute('content')\n\n return (\n
\n \n
\n \n
\n
\n
\n \n
\n
\n

\n {'Forgot your password?'}\n

\n
\n \n \n \n : undefined}\n className=\"tw:w-full\"\n />\n
\n
\n
\n
\n
\n
\n )\n}\n\nexport default ForgotPassword\n","import React, { FC, useCallback, useState } from 'react'\nimport { track } from 'utils/analytics'\nimport CoreInput from 'components/Core/CoreInput'\nimport CoreButton from 'components/Core/CoreButton'\nimport PageTitle from 'components/PageTitle'\nimport Spinner from 'components/Spinner'\nimport RealmBusiness from 'svgs/realm-business'\nimport StripesBg from 'svgs/stripes-bg'\n\nconst EditPassword: FC = () => {\n const [submitting, setSubmitting] = useState(false)\n const handleSubmit = useCallback(() => {\n setSubmitting(true)\n track('vendor edit password')\n // we let the event's default behaviour proceed, which will submit the actual form\n }, [])\n\n const csrfParam = document.querySelector('meta[name=csrf-param]')?.getAttribute('content')\n const csrfToken = document.querySelector('meta[name=csrf-token]')?.getAttribute('content')\n\n return (\n
\n \n
\n \n
\n
\n
\n \n
\n
\n

\n {'Change your password'}\n

\n
\n \n \n \n \n \n : undefined}\n className=\"tw:w-full\"\n />\n
\n
\n
\n
\n
\n
\n )\n}\n\nexport default EditPassword\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n \n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n \n \n \n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n \n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n \n \n)\n\nexport default Svg\n","import React, { FC, FormEvent, MouseEvent, useCallback, useEffect, useState } from 'react'\nimport { Link, useHistory, useParams } from 'react-router-dom'\nimport { useSetRecoilState } from 'recoil'\nimport cx from 'classnames'\nimport CheckCircle from '@mui/icons-material/CheckCircle'\nimport RadioButtonUnchecked from '@mui/icons-material/RadioButtonUnchecked'\nimport ExpandMore from '@mui/icons-material/ExpandMore'\nimport { vendorClientSecretState } from 'store/vendors/state'\nimport { createVendorPayCheckout } from 'store/vendors/api'\nimport { alertState } from 'recoil/alert'\nimport PageTitle from 'components/PageTitle'\nimport CoreButton from 'components/Core/CoreButton'\nimport Spinner from 'svgs/spinner'\nimport SparklesTwo from 'svgs/sparkles-two'\nimport Amex from 'svgs/payment/amex'\nimport ApplePay from 'svgs/payment/apple-pay'\nimport Citadele from 'svgs/payment/citadele'\nimport DinersClub from 'svgs/payment/diners-club'\nimport Discover from 'svgs/payment/discover'\nimport Giropay from 'svgs/payment/giropay'\nimport Ideal from 'svgs/payment/ideal'\nimport Jcb from 'svgs/payment/jcb'\nimport Mastercard from 'svgs/payment/mastercard'\nimport Paypal from 'svgs/payment/paypal'\nimport UnionPay from 'svgs/payment/union-pay'\nimport Visa from 'svgs/payment/visa'\nimport Webmoney from 'svgs/payment/webmoney'\n\ntype SfdcPayment = {\n amount_in_cents: number\n sfdc_ref: string\n status: 'Invoiced' | 'Initiated' | 'Collected' | 'Failed'\n type: 'Design payment' | 'Construction payment' | 'Change Order'\n}\n\nconst sfdcPayment: SfdcPayment = window\n ? JSON.parse(document.querySelector('template#sfdc_payment_info')?.innerHTML || '{}')\n : null\n\nconst Pay: FC = () => {\n const [submitting, setSubmitting] = useState(false)\n const [payVia, setPayVia] = useState<'bank_transfer' | 'bank_card' | null>(null)\n const [paymentProvidersExpanded, setPaymentProvidersExpanded] = useState(false)\n const setClientSecret = useSetRecoilState(vendorClientSecretState)\n const setAlert = useSetRecoilState(alertState)\n const { payment_id: paymentId, token } = useParams<{ payment_id: string; token: string }>()\n const history = useHistory()\n\n const handleBankTransferClick = useCallback(() => {\n setPayVia('bank_transfer')\n }, [])\n\n const handleBankCardClick = useCallback(() => {\n setPayVia('bank_card')\n }, [])\n\n const expandPaymentProviders = useCallback((event: MouseEvent) => {\n event.stopPropagation()\n event.preventDefault()\n setPaymentProvidersExpanded(true)\n }, [])\n\n const handleSubmit = useCallback((event: FormEvent) => {\n event.preventDefault()\n setSubmitting(true)\n }, [])\n\n useEffect(() => {\n if (!submitting) return\n\n const controller = new AbortController()\n const _ = async () => {\n try {\n const body = {\n token: window.location.pathname.split('/').pop(),\n pay_via: payVia,\n }\n const response = await createVendorPayCheckout(sfdcPayment.sfdc_ref, body, controller.signal)\n setClientSecret(response.jsonBody.client_secret)\n history.push(`/vendors/pay/checkout/${paymentId}/${token}`)\n } catch (e) {\n if (e instanceof DOMException && e.name == 'AbortError') {\n // no-op\n } else {\n console.error(e)\n setAlert({\n id: Date.now(),\n type: 'ERROR',\n message: 'An error has occured. Please try again or contact us.',\n })\n setSubmitting(false)\n }\n }\n }\n _()\n\n return () => {\n controller.abort()\n }\n }, [history, payVia, paymentId, setAlert, setClientSecret, submitting, token])\n\n return (\n
\n \n
\n
\n
\n \n
\n

{'Realm'}

\n
\n
\n {sfdcPayment.status == 'Initiated' ? (\n
\n

{'This payment is being processed.'}

\n

\n {\"If you feel there's something wrong here, please contact us at \"}\n \n {'payments@realmhome.com'}\n \n {'.'}\n

\n
\n ) : sfdcPayment.status == 'Collected' ? (\n
\n

{'This payment has already been completed.'}

\n

\n {'Return to your '}\n \n {'Vendor Portal'}\n \n

\n
\n ) : (\n
\n
\n

{'How would you like to pay?'}

\n

\n {\"Please choose how you'd like to pay for this invoice:\"}\n

\n
\n \n
\n \n {payVia == 'bank_transfer' ? (\n \n ) : (\n \n )}\n
\n
\n
\n
{'Bank transfer'}
\n
{'No Fees'}
\n
\n
\n {'Pay securely through a bank transfer with no additional fees.'}\n
\n
\n \n
\n \n
\n : undefined}\n className=\"tw:w-full tw:!rounded-md\"\n />\n
\n \n )}\n
\n
\n \n )\n}\n\nexport default Pay\n","import React, { FC, useEffect } from 'react'\nimport { useHistory, useParams } from 'react-router-dom'\nimport { loadStripe } from '@stripe/stripe-js/pure'\nimport { EmbeddedCheckoutProvider, EmbeddedCheckout } from '@stripe/react-stripe-js'\nimport { useRecoilValue } from 'recoil'\nimport { vendorClientSecretState } from 'store/vendors/state'\n\nconst stripePromise = loadStripe(document.body.dataset.stripePublishableKey || '')\n\nconst Checkout: FC = () => {\n const clientSecret = useRecoilValue(vendorClientSecretState)\n const { payment_id: paymentId, token } = useParams<{ payment_id: string; token: string }>()\n const history = useHistory()\n\n useEffect(() => {\n if (!clientSecret) {\n history.replace(`/vendors/pay/${paymentId}/${token}`)\n }\n }, [clientSecret, history, paymentId, token])\n\n if (!clientSecret) return null\n\n return (\n \n \n \n )\n}\n\nexport default Checkout\n","import React, { FC } from 'react'\nimport PageTitle from 'components/PageTitle'\nimport SparklesTwo from 'svgs/sparkles-two'\n\ntype StripeSession = {\n status: 'complete' | 'expired' | 'open'\n payment_status: 'no_payment_required' | 'paid' | 'unpaid'\n}\n\nconst stripeSession: StripeSession = window\n ? JSON.parse(document.querySelector('template#stripe_session_info')?.innerHTML || '{}')\n : null\n\nconst PayReturn: FC = () => {\n return (\n
\n \n
\n
\n
\n \n
\n

{'Realm'}

\n
\n
\n {stripeSession.status == 'complete' && stripeSession.payment_status == 'unpaid' ? (\n
\n

{'Payment is processing - Thank you.'}

\n
\n ) : stripeSession.status == 'complete' && stripeSession.payment_status == 'paid' ? (\n
\n

{'Payment is complete - Thank you.'}

\n
\n ) : (\n
\n

\n {'An unexpected problem has occurred, please contact us at '}\n \n {'payments@realmhome.com'}\n \n {'.'}\n

\n
\n )}\n
\n
\n
\n )\n}\n\nexport default PayReturn\n","import { Dispatch, SetStateAction, useCallback, useEffect, useState } from 'react'\nimport { FieldPath, FieldValues, useController, UseControllerProps } from 'react-hook-form'\nimport { useHistory, useRouteMatch } from 'react-router-dom'\nimport { useRecoilState, useSetRecoilState } from 'recoil'\nimport { alertState } from 'recoil/alert'\nimport {\n createVendorContact,\n declineVendorOpportunity,\n deleteVendorContact,\n deleteVendorContactHeadshot,\n deleteVendorPastProject,\n directUploadFile,\n fetchPastProjects,\n fetchVendorContactUsers,\n fetchVendorOpportunities,\n fetchVendorOpportunity,\n fetchVendorPayments,\n fetchVendorSettings,\n inviteVendorContact,\n requestBidExtension,\n updateVendorContact,\n} from 'store/vendors/api'\nimport {\n vendorContactsState,\n vendorLoginStatusState,\n vendorOpportunitiesState,\n vendorOpportunityDetailState,\n vendorPastProjectsState,\n vendorPaymentsState,\n vendorSettingsState,\n} from 'store/vendors/state'\nimport {\n ExtensionModalScreen,\n ExtensionOptions,\n GenericErrors,\n TeamVendorContact,\n VendorContactFields,\n VendorLoginStatus,\n} from 'store/vendors/types'\n\nexport const useAddressController = >(\n props: UseControllerProps\n) => {\n const originalController = useController(props)\n const handleChangePrediction = (selected: { address: string; place_id: string }) => {\n const modifiedValue = selected ? selected.address.split(', ').slice(0, -1).join(', ') : ''\n originalController.field.onChange(modifiedValue)\n }\n\n return {\n ...originalController,\n field: {\n ...originalController.field,\n query: originalController.field.value,\n onChange: undefined,\n onChangePrediction: handleChangePrediction,\n },\n }\n}\n\nexport const useLoadVendorSettings = () => {\n const setVendorSettings = useSetRecoilState(vendorSettingsState)\n const setVendorLoginStatus = useSetRecoilState(vendorLoginStatusState)\n\n useEffect(() => {\n const controller = new AbortController()\n const _ = async () => {\n try {\n const newVendorSettings = await fetchVendorSettings(controller.signal)\n setVendorSettings(newVendorSettings)\n } catch (error) {\n if (!controller.signal.aborted) {\n if (error.code !== 401) console.error(error)\n setVendorLoginStatus(VendorLoginStatus.LoggedOut)\n }\n }\n }\n _()\n return () => {\n controller.abort()\n }\n }, [setVendorLoginStatus, setVendorSettings])\n}\n\nexport const useLoadVendorOpportunities = (fetching: boolean, setFetching: (value: boolean) => void): void => {\n const setVendorLoginStatus = useSetRecoilState(vendorLoginStatusState)\n const [vendorOpportunities, setVendorOpportunities] = useRecoilState(vendorOpportunitiesState)\n\n useEffect(() => {\n if (!fetching || vendorOpportunities != null) return\n\n const controller = new AbortController()\n const _ = async () => {\n try {\n const newVendorOpportunities = await fetchVendorOpportunities(controller.signal)\n setVendorOpportunities(newVendorOpportunities)\n setFetching(false)\n } catch (error) {\n if (!controller.signal.aborted) {\n setFetching(false)\n if (error.code == 401) {\n setVendorLoginStatus(VendorLoginStatus.LoggedOut)\n } else {\n console.error(error)\n }\n }\n }\n }\n _()\n return () => {\n controller.abort()\n }\n }, [fetching, setFetching, setVendorLoginStatus, setVendorOpportunities, vendorOpportunities])\n}\n\nexport const useLoadVendorOpportunity = (\n id: string,\n fetching: boolean,\n setFetching: (value: boolean) => void\n): void => {\n const setVendorLoginStatus = useSetRecoilState(vendorLoginStatusState)\n const setVendorOpportunityDetail = useSetRecoilState(vendorOpportunityDetailState(id))\n const setAlert = useSetRecoilState(alertState)\n\n useEffect(() => {\n if (!fetching) return\n\n const controller = new AbortController()\n const _ = async () => {\n try {\n const newVendorOpportunityDetail = await fetchVendorOpportunity(id, controller.signal)\n setVendorOpportunityDetail(newVendorOpportunityDetail)\n setFetching(false)\n } catch (error) {\n if (!controller.signal.aborted) {\n setFetching(false)\n if (error.code == 401) {\n setVendorLoginStatus(VendorLoginStatus.LoggedOut)\n } else if (error.code == 404) {\n setAlert({ type: 'ERROR', message: 'Error 404: Page Not Found', id: Date.now() })\n } else {\n console.error(error)\n }\n }\n }\n }\n _()\n return () => {\n controller.abort()\n }\n }, [fetching, id, setAlert, setFetching, setVendorLoginStatus, setVendorOpportunityDetail])\n}\n\nexport const useLoadVendorContacts = () => {\n const setVendorContacts = useSetRecoilState(vendorContactsState)\n const setVendorLoginStatus = useSetRecoilState(vendorLoginStatusState)\n\n useEffect(() => {\n const controller = new AbortController()\n const _ = async () => {\n try {\n const newVendorContactsArray = await fetchVendorContactUsers(controller.signal)\n const newVendorContacts = newVendorContactsArray.reduce((a, e) => {\n a[e.id] = e\n return a\n }, {})\n setVendorContacts(newVendorContacts)\n } catch (error) {\n if (!controller.signal.aborted) {\n if (error.code !== 401) console.error(error)\n setVendorLoginStatus(VendorLoginStatus.LoggedOut)\n }\n }\n }\n _()\n return () => {\n controller.abort()\n }\n }, [setVendorLoginStatus, setVendorContacts])\n}\n\nexport const useUpsertVendorContact = (\n id?: number\n): [VendorContactFields | null, Dispatch>] => {\n const [upsertingContact, setUpsertingContact] = useState(null)\n const setVendorContacts = useSetRecoilState(vendorContactsState)\n const setAlert = useSetRecoilState(alertState)\n\n useEffect(() => {\n if (upsertingContact == null) return\n\n const controller = new AbortController()\n const _ = async () => {\n const actionLabel = id ? 'updating' : 'creating'\n try {\n const response = id\n ? await updateVendorContact(id, upsertingContact, controller.signal)\n : await createVendorContact(upsertingContact, controller.signal)\n setUpsertingContact(null)\n if (!response.isError) {\n const updatedVendorContact = response.jsonBody as TeamVendorContact\n setVendorContacts((oldVendorContacts) => ({\n ...oldVendorContacts,\n [updatedVendorContact.id]: updatedVendorContact,\n }))\n } else {\n const errors = response.jsonBody as GenericErrors\n const errorsArray = Object.keys(errors.errors).reduce(\n (a, e) => a.concat(`${e}: ${errors.errors[e].join(', ')}`),\n [] as string[]\n )\n setAlert({\n type: 'ERROR',\n message: `Error ${actionLabel} user: ${errorsArray.join('; ')}.`,\n id: Date.now(),\n })\n }\n } catch (e) {\n if (!controller.signal.aborted) {\n console.error(e)\n setAlert({ type: 'ERROR', message: `Error ${actionLabel} user.`, id: Date.now() })\n setUpsertingContact(null)\n }\n }\n }\n _()\n\n return () => {\n controller.abort()\n }\n }, [upsertingContact, id, setAlert, setVendorContacts])\n\n return [upsertingContact, setUpsertingContact]\n}\n\nexport const useDeleteVendorContact = (id: number): [boolean, Dispatch>] => {\n const [deletingContact, setDeletingContact] = useState(false)\n const setVendorContacts = useSetRecoilState(vendorContactsState)\n const setAlert = useSetRecoilState(alertState)\n\n useEffect(() => {\n if (!deletingContact) return\n\n const controller = new AbortController()\n const _ = async () => {\n try {\n const response = await deleteVendorContact(id, controller.signal)\n setDeletingContact(false)\n if (!response.isError) {\n setVendorContacts((oldVendorContacts) => {\n const newVendorContacts = { ...oldVendorContacts }\n delete newVendorContacts[id]\n return newVendorContacts\n })\n } else {\n setAlert({ type: 'ERROR', message: 'Error deleting user.', id: Date.now() })\n }\n } catch (e) {\n if (!controller.signal.aborted) {\n console.error(e)\n setDeletingContact(false)\n }\n }\n }\n _()\n\n return () => {\n controller.abort()\n }\n }, [deletingContact, id, setAlert, setVendorContacts])\n\n return [deletingContact, setDeletingContact]\n}\n\nexport const useDeleteVendorContactHeadshot = (\n id?: number\n): [boolean, (deletingVendorContactHeadshot: boolean) => void] => {\n const [deletingVendorContactHeadshot, setDeletingVendorContactHeadshot] = useState(false)\n const setVendorContacts = useSetRecoilState(vendorContactsState)\n const setVendorLoginStatus = useSetRecoilState(vendorLoginStatusState)\n const setAlert = useSetRecoilState(alertState)\n\n useEffect(() => {\n if (!deletingVendorContactHeadshot || !id) return\n\n const controller = new AbortController()\n const _ = async () => {\n try {\n const response = await deleteVendorContactHeadshot(id, controller.signal)\n if (!response.isError) {\n const updatedVendorContact = response.jsonBody\n setVendorContacts((oldVendorContacts) => ({\n ...oldVendorContacts,\n [updatedVendorContact.id]: updatedVendorContact,\n }))\n } else {\n setAlert({ type: 'ERROR', message: 'Error deleting picture, please reload page.', id: Date.now() })\n }\n setDeletingVendorContactHeadshot(false)\n } catch (error) {\n if (!controller.signal.aborted) {\n if (error.code == 401) {\n setVendorLoginStatus(VendorLoginStatus.LoggedOut)\n } else {\n setAlert({ type: 'ERROR', message: 'Error deleting picture, please reload page.', id: Date.now() })\n console.error(error)\n }\n }\n }\n }\n _()\n\n return () => {\n controller.abort()\n }\n }, [deletingVendorContactHeadshot, id, setAlert, setVendorContacts, setVendorLoginStatus])\n\n return [deletingVendorContactHeadshot, setDeletingVendorContactHeadshot]\n}\n\nexport const useInviteVendorContact = (id: number, cb: () => void): [boolean, Dispatch>] => {\n const [invitingContact, setInvitingContact] = useState(false)\n const setVendorContacts = useSetRecoilState(vendorContactsState)\n const setAlert = useSetRecoilState(alertState)\n\n useEffect(() => {\n if (!invitingContact) return\n\n const controller = new AbortController()\n const _ = async () => {\n try {\n const response = await inviteVendorContact(id, controller.signal)\n setInvitingContact(false)\n if (!response.isError) {\n const updatedVendorContact = response.jsonBody\n setVendorContacts((oldVendorContacts) => ({\n ...oldVendorContacts,\n [updatedVendorContact.id]: updatedVendorContact,\n }))\n setAlert({ type: 'SUCCESS', message: 'Invite sent.', id: Date.now() })\n } else {\n setAlert({ type: 'ERROR', message: 'Error inviting user.', id: Date.now() })\n }\n cb()\n } catch (e) {\n if (!controller.signal.aborted) {\n console.error(e)\n setInvitingContact(false)\n cb()\n }\n }\n }\n _()\n\n return () => {\n controller.abort()\n }\n }, [invitingContact, id, setAlert, setVendorContacts, cb])\n\n return [invitingContact, setInvitingContact]\n}\n\nexport const useLoadPayments = (fetching: boolean, setFetching: (value: boolean) => void): void => {\n const setVendorLoginStatus = useSetRecoilState(vendorLoginStatusState)\n const [vendorPayments, setVendorPayments] = useRecoilState(vendorPaymentsState)\n\n useEffect(() => {\n if (!fetching || vendorPayments != null) return\n\n const controller = new AbortController()\n const _ = async () => {\n try {\n const newVendorPayments = await fetchVendorPayments(controller.signal)\n setVendorPayments(newVendorPayments)\n setFetching(false)\n } catch (error) {\n if (!controller.signal.aborted) {\n setFetching(false)\n if (error.code == 401) {\n setVendorLoginStatus(VendorLoginStatus.LoggedOut)\n } else {\n console.error(error)\n }\n }\n }\n }\n _()\n return () => {\n controller.abort()\n }\n }, [fetching, setFetching, setVendorLoginStatus, setVendorPayments, vendorPayments])\n}\n\nexport const useLoadPastProjects = (fetching: boolean, setFetching: (value: boolean) => void): void => {\n const setVendorLoginStatus = useSetRecoilState(vendorLoginStatusState)\n const [vendorPastProjects, setVendorPastProjects] = useRecoilState(vendorPastProjectsState)\n\n useEffect(() => {\n if (!fetching || vendorPastProjects != null) return\n\n const controller = new AbortController()\n const _ = async () => {\n try {\n const newVendorPastProjects = await fetchPastProjects(controller.signal)\n setVendorPastProjects(newVendorPastProjects.reduce((acc, project) => ({ ...acc, [project.id]: project }), {}))\n setFetching(false)\n } catch (error) {\n if (!controller.signal.aborted) {\n setFetching(false)\n if (error.code == 401) {\n setVendorLoginStatus(VendorLoginStatus.LoggedOut)\n } else {\n console.error(error)\n }\n }\n }\n }\n _()\n return () => {\n controller.abort()\n }\n }, [fetching, setFetching, setVendorLoginStatus, setVendorPastProjects, vendorPastProjects])\n}\n\nexport const useDeletePastProject = (id: number): [boolean, Dispatch>] => {\n const [deletingPastProject, setDeletingPastProject] = useState(false)\n const setVendorPastProjects = useSetRecoilState(vendorPastProjectsState)\n const setAlert = useSetRecoilState(alertState)\n\n useEffect(() => {\n if (!deletingPastProject) return\n\n const controller = new AbortController()\n const _ = async () => {\n try {\n const response = await deleteVendorPastProject(id, controller.signal)\n setDeletingPastProject(false)\n if (!response.isError) {\n setVendorPastProjects((oldVendorPastProjects) => {\n const newVendorPastProjects = { ...oldVendorPastProjects }\n delete newVendorPastProjects[id]\n return newVendorPastProjects\n })\n } else {\n setAlert({ type: 'ERROR', message: 'Error deleting user.', id: Date.now() })\n }\n } catch (e) {\n if (!controller.signal.aborted) {\n console.error(e)\n setDeletingPastProject(false)\n }\n }\n }\n _()\n\n return () => {\n controller.abort()\n }\n }, [deletingPastProject, id, setAlert, setVendorPastProjects])\n\n return [deletingPastProject, setDeletingPastProject]\n}\n\nexport const useDeclineVendorOpportunity = (\n id: string,\n formData: FormData | null,\n setFormData: (value: FormData | null) => void,\n onComplete: (response: Response) => void\n): void => {\n const setVendorLoginStatus = useSetRecoilState(vendorLoginStatusState)\n\n useEffect(() => {\n if (!formData) return\n\n const controller = new AbortController()\n const _ = async () => {\n try {\n const body = JSON.stringify((Object as any).fromEntries(formData))\n const response = await declineVendorOpportunity(id, body, controller.signal)\n onComplete(response)\n setFormData(null)\n } catch (error) {\n if (!controller.signal.aborted) {\n setFormData(null)\n if (error.code == 401) {\n setVendorLoginStatus(VendorLoginStatus.LoggedOut)\n } else {\n console.error(error)\n }\n }\n }\n }\n _()\n return () => {\n controller.abort()\n }\n }, [formData, id, onComplete, setFormData, setVendorLoginStatus])\n}\n\nexport const useRequestBidExtension = (\n id: string,\n formData: ExtensionOptions | null,\n setFormData: (value: ExtensionOptions | null) => void,\n onComplete: (response: Response) => void\n): void => {\n const setVendorLoginStatus = useSetRecoilState(vendorLoginStatusState)\n\n useEffect(() => {\n if (!formData) return\n\n const controller = new AbortController()\n const _ = async () => {\n try {\n const body = JSON.stringify(formData)\n const response = await requestBidExtension(id, body, controller.signal)\n onComplete(response)\n setFormData(null)\n } catch (error) {\n if (!controller.signal.aborted) {\n setFormData(null)\n if (error.code == 401) {\n setVendorLoginStatus(VendorLoginStatus.LoggedOut)\n } else {\n console.error(error)\n }\n }\n }\n }\n _()\n return () => {\n controller.abort()\n }\n }, [formData, id, onComplete, setFormData, setVendorLoginStatus])\n}\nexport const useExtensionModalNavigate: () => (screen: ExtensionModalScreen) => void = () => {\n const match = useRouteMatch('/vendors/projects/:id/extension')\n const history = useHistory()\n\n return useCallback(\n (screen: ExtensionModalScreen) => {\n const next = `${match?.url}/${screen}`\n\n history.push(next)\n },\n [history, match]\n )\n}\n\nexport const useDirectUploadFile = (\n onUpload: (signed_id: string) => void\n): [File | null, (fileToUpload: File | null) => void] => {\n const [fileToUpload, setFileToUpload] = useState(null)\n const setAlert = useSetRecoilState(alertState)\n\n useEffect(() => {\n if (!fileToUpload) return\n\n const controller = new AbortController()\n const _ = async () => {\n try {\n const blob = await directUploadFile(fileToUpload)\n onUpload(blob.signed_id)\n } catch (error) {\n setAlert({ type: 'ERROR', message: 'Error uploading file - please reload the page.', id: Date.now() })\n console.error('Direct upload failed:', error)\n } finally {\n setFileToUpload(null)\n }\n }\n _()\n\n return () => {\n controller.abort()\n }\n }, [fileToUpload, onUpload, setAlert])\n\n return [fileToUpload, setFileToUpload]\n}\n","import { MutableRefObject, useEffect } from 'react'\nimport cx from 'classnames'\nimport { driver } from 'driver.js'\nimport type { Driver, DriveStep } from 'driver.js'\nimport dayjs from 'dayjs'\nimport { track } from 'utils/analyticsV2'\nimport { VendorContactUserMe } from 'store/vendors/types'\n\nexport const skipNflux = ({\n feature,\n startDate,\n endDate,\n beta,\n me,\n}: {\n feature: string\n startDate: string\n endDate: string\n beta?: boolean\n me: VendorContactUserMe\n}) => {\n const userJoinedAfterThisFeatureLaunched = dayjs(me.created_at).isAfter(startDate, 'day')\n\n if (dayjs().isAfter(endDate, 'day')) return true\n if (userJoinedAfterThisFeatureLaunched) return true\n if (localStorage.getItem(`saw-journey-${feature}-${startDate}-${endDate}`)) return true\n if (beta && !document.body.dataset.ml) return true\n\n return false\n}\n\nexport const useNewFeatureJourneyEffect = ({\n feature,\n startDate,\n endDate,\n beta,\n me,\n ready,\n steps,\n driverObj,\n}: {\n feature: string\n startDate: string\n endDate: string\n beta?: boolean\n me: VendorContactUserMe | null\n ready: boolean\n steps: null | DriveStep[]\n driverObj: MutableRefObject\n}) => {\n useEffect(() => {\n if (!me || !ready || !steps) return\n\n if (skipNflux({ feature, startDate, endDate, beta, me })) return\n\n const popoverClass = cx(\n 'tw:z-[1000000000] tw:box-border tw:fixed tw:top-0 tw:right-0 tw:bg-white tw:py-6 tw:px-4 tw:max-w-[90vw] tw:md:max-w-lg tw:shadow-sm tw:rounded-2xl',\n 'tw:[&_.driver-popover-close-btn]:!hidden',\n 'tw:[&_.driver-popover-title]:text-xl tw:[&_.driver-popover-title]:font-bold tw:[&_.driver-popover-title]:leading-tight',\n 'tw:[&_.driver-popover-description]:mt-2 tw:[&_.driver-popover-description]:text-sm tw:[&_.driver-popover-description]:leading-tight',\n 'tw:[&_.driver-popover-footer]:mt-4',\n 'tw:[&_.driver-popover-navigation-btns]:w-full tw:[&_.driver-popover-navigation-btns]:flex tw:[&_.driver-popover-navigation-btns]:justify-between tw:[&_.driver-popover-navigation-btns]:gap-2',\n 'tw:[&_button.driver-popover-btn-disabled]:!bg-neutrals-100 tw:[&_button.driver-popover-btn-disabled]:!text-disabled-black',\n 'tw:[&_button]:outline-hidden tw:[&_button]:w-1/2 tw:[&_button]:py-2 tw:[&_button]:px-3 tw:[&_button]:text-sm tw:[&_button]:font-bold tw:[&_button]:rounded-full tw:[&_button]:bg-black tw:[&_button]:text-white'\n )\n\n driverObj.current = driver({\n onNextClick: (_element, _step, options) => {\n const index = options.state.activeIndex\n track('click', { code: 'nflux', section: 'next', feature, flexfield_1: { index } })\n driverObj.current?.moveNext()\n },\n onPrevClick: (_element, _step, options) => {\n const index = options.state.activeIndex\n track('click', { code: 'nflux', section: 'prev', feature, flexfield_1: { index } })\n driverObj.current?.movePrevious()\n },\n onHighlighted: (_element, _step, options) => {\n const index = options.state.activeIndex\n track('impression', { code: 'nflux', feature, flexfield_1: { index } })\n },\n animate: true,\n disableActiveInteraction: true,\n prevBtnText: 'Previous',\n nextBtnText: 'Next',\n onDestroyed: () => {\n track('state-event', { code: 'nflux', section: 'destroy', feature })\n localStorage.setItem(`saw-journey-${feature}-${startDate}-${endDate}`, 'true')\n window.scrollTo({ top: 0, behavior: 'smooth' })\n },\n popoverClass,\n steps,\n })\n\n driverObj.current.drive()\n\n return () => {\n driverObj.current?.destroy()\n }\n }, [endDate, driverObj, me, feature, ready, steps, startDate, beta])\n}\n","import { useMemo, useRef } from 'react'\nimport type { Driver, DriveStep } from 'driver.js'\nimport { useRecoilValue, useSetRecoilState } from 'recoil'\nimport { track } from 'utils/analyticsV2'\nimport { vendorMeState, vendorSidebarOpenState } from 'store/vendors/state'\nimport { useNewFeatureJourneyEffect } from './common'\n\nexport const useNewFeatureJourney = (ready: boolean) => {\n const feature = 'new-features'\n const startDate = '2025-01-21'\n const endDate = '2025-02-28'\n const me = useRecoilValue(vendorMeState)\n const setSidebarOpen = useSetRecoilState(vendorSidebarOpenState)\n const driverObj = useRef()\n\n const steps = useMemo(() => {\n if (!me || !ready) return null\n\n const hasBusinessSettings = me.roles.filter((e) => ['owner', 'admin'].includes(e)).length > 0\n const hasBusinessUnits = me.vendor_multiple_business_units\n const vendorSideMenuButtonElementVisible = document.querySelector('#vendor-sidemenu-button')?.checkVisibility()\n const menuItemPrefix = vendorSideMenuButtonElementVisible ? '#headlessui-portal-root' : '#main'\n\n // preload assets immediately:\n new Image().src =\n 'https://realm-public-images.imgix.net/vendors/nflux/journey-two-new-features-2025-01-21-business-profile.png'\n new Image().src =\n 'https://realm-public-images.imgix.net/vendors/nflux/journey-two-new-features-2025-01-21-business-settings.png'\n const video = document.createElement('video')\n video.src =\n 'https://realm-public-images.s3.us-east-1.amazonaws.com/vendors/nflux/journey-two-new-features-2025-01-21-business-settings.mp4'\n video.preload = 'auto'\n video.load()\n\n return [\n {\n popover: {\n title: 'Introducing new features!',\n description: \"We're making it easier than ever to manage your business on Realm.\",\n onNextClick: (_element, _step, options) => {\n const index = options.state.activeIndex\n track('click', { code: 'nflux', section: 'next', feature, flexfield_1: { index } })\n if (!vendorSideMenuButtonElementVisible) {\n driverObj.current?.moveNext()\n } else {\n const wrapper = options.state.popover?.wrapper\n if (wrapper) {\n wrapper.querySelectorAll('footer button').forEach((element) => {\n ;(element as HTMLButtonElement).disabled = true\n })\n }\n\n setSidebarOpen(true)\n\n setTimeout(() => {\n driverObj.current?.moveNext()\n }, 500) // should be enough to open sidebar\n }\n },\n },\n } as DriveStep,\n {\n element: `${menuItemPrefix} .business-profile-menuitem`,\n popover: {\n title: `\n \"\"\n
Showcase your project portfolio
\n `,\n description: 'Head to the Business Profile tab to upload project before and afters for homeowners to see.',\n side: vendorSideMenuButtonElementVisible ? 'top' : 'right',\n align: vendorSideMenuButtonElementVisible ? 'start' : 'end',\n onPrevClick: (_element, _step, options) => {\n const index = options.state.activeIndex\n track('click', { code: 'nflux', section: 'prev', feature, flexfield_1: { index } })\n if (!vendorSideMenuButtonElementVisible) {\n driverObj.current?.movePrevious()\n } else {\n const wrapper = options.state.popover?.wrapper\n if (wrapper) {\n wrapper.querySelectorAll('footer button').forEach((element) => {\n ;(element as HTMLButtonElement).disabled = true\n })\n }\n\n setSidebarOpen(false)\n\n setTimeout(() => {\n driverObj.current?.movePrevious()\n }, 500) // should be enough to close sidebar\n }\n },\n },\n } as DriveStep,\n hasBusinessSettings\n ? ({\n element: `${menuItemPrefix} .business-settings-menuitem`,\n popover: {\n title: `\n \"\"\n
Manage team permissions and settings
\n `,\n side: vendorSideMenuButtonElementVisible ? 'top' : 'right',\n align: vendorSideMenuButtonElementVisible ? 'start' : 'end',\n description: [\n 'Assign team members roles with unique permissions.',\n hasBusinessUnits ? ' You can also set up separate business units or crews.' : null,\n ]\n .filter(Boolean)\n .join(' '),\n onNextClick: (_element, _step, options) => {\n const index = options.state.activeIndex\n track('click', { code: 'nflux', section: 'next', feature, flexfield_1: { index } })\n if (!vendorSideMenuButtonElementVisible) {\n driverObj.current?.moveNext()\n } else {\n const wrapper = options.state.popover?.wrapper\n if (wrapper) {\n wrapper.querySelectorAll('footer button').forEach((element) => {\n ;(element as HTMLButtonElement).disabled = true\n })\n }\n setSidebarOpen(false)\n setTimeout(() => {\n driverObj.current?.moveNext()\n }, 500) // should be enough to load in the new page\n }\n },\n },\n } as DriveStep)\n : null,\n {\n popover: {\n title: `\n \n
Manage your availability
\n `,\n description: \"Click your profile icon to indicate when you'll be out of office and who your backup will be.\",\n },\n } as DriveStep,\n ].filter(Boolean) as DriveStep[]\n }, [me, ready, setSidebarOpen])\n\n useNewFeatureJourneyEffect({ feature, startDate, endDate, driverObj, me, ready, steps })\n}\n","export function groupBy(x: T[], f: (b: T, i: number, x: T[]) => any): Record {\n return x.reduce((a, b, i) => ((a[f(b, i, x)] ||= []).push(b), a), {})\n}\n","import React, { FC } from 'react'\nimport dayjs from 'dayjs'\nimport cx from 'classnames'\n\ntype DatePillProps = {\n date: dayjs.Dayjs\n status?: 'upcoming' | 'due' | 'overdue' | 'failed'\n}\n\nconst DatePill: FC = ({ date, status = 'upcoming' }) => {\n return (\n \n
\n
\n \n {dayjs(date).format('DD')}\n
\n
\n
\n \n {dayjs(date).format('MMM')}\n
\n \n {dayjs(date).format('ddd')}\n \n \n \n \n )\n}\n\nexport default DatePill\n","import React, { FC } from 'react'\nimport cx from 'classnames'\nimport dayjs from 'dayjs'\n\ninterface OpportunitySmallGroupHeaderProps {\n timestamp: string\n}\n\nconst OpportunitySmallGroupHeader: FC = ({ timestamp }) => {\n if (!timestamp || timestamp == 'null') return null\n\n const overdue = dayjs().isAfter(timestamp, 'day')\n const comingSoon = !overdue && dayjs().add(2, 'day').isAfter(timestamp, 'day')\n\n return (\n \n \n \n \n
\n \n {dayjs(timestamp).format('DD')}\n

\n
\n
\n \n {dayjs(timestamp).format('MMM')}\n
\n \n {dayjs(timestamp).format('ddd')}\n \n \n \n \n \n \n )\n}\n\nexport default OpportunitySmallGroupHeader\n","import React, { FC, PropsWithChildren } from 'react'\nimport { Link } from 'react-router-dom'\n\nconst ConditionalLink: FC> = ({ children, to, className }) => {\n return to ? (\n \n {children}\n \n ) : (\n
{children}
\n )\n}\n\nexport default ConditionalLink\n","import React, { FC } from 'react'\nimport { Link } from 'react-router-dom'\nimport cx from 'classnames'\nimport dayjs from 'dayjs'\nimport relativeTime from 'dayjs/plugin/relativeTime'\nimport { VendorOpportunity } from 'store/vendors/types'\nimport ConditionalLink from './ConditionalLink'\n\ndayjs.extend(relativeTime)\n\ninterface OpportunityRowProps {\n opportunity: VendorOpportunity\n showNotesCol: boolean\n}\n\nconst OpportunityRow: FC = ({ opportunity, showNotesCol }) => {\n const opportunityName = [opportunity.client.name.trim(), opportunity.property.address_line_1].join(', ')\n\n return (\n td]:!border-t-0 tw:[&:last-child>td]:!border-b-0\">\n \n {opportunity.timestamp ? (\n \n
\n
\n \n {!opportunity.bid_extension_requested || !!opportunity.bid_extension_ts\n ? dayjs(opportunity.timestamp).format('DD')\n : 'TBD'}\n
\n
\n {(!opportunity.bid_extension_requested || !!opportunity.bid_extension_ts) && (\n
\n \n {dayjs(opportunity.timestamp).format('MMM')}\n
\n \n {dayjs(opportunity.timestamp).format('ddd')}\n \n \n )}\n \n {((opportunity.bid_extension_ts && dayjs(opportunity.bid_extension_ts).isAfter(opportunity.bid_due_ts)) ||\n (!opportunity.bid_extension_ts && opportunity.bid_extension_requested)) && (\n \n {dayjs(opportunity.bid_due_ts).format('ddd DD MMM')}\n \n )}\n \n ) : (\n
\n )}\n \n \n \n
{opportunity.current_status || 'Unknown'}
\n {opportunity.action == 'On hold' && (\n \n {'On hold'}\n
\n )}\n \n \n \n \n
{opportunityName}
\n \n \n {showNotesCol && (\n \n
\n {opportunity.advisor_bid_message}\n
\n \n )}\n \n
\n {opportunity.action && opportunity.action == 'Review' && opportunity.scheduling_url ? (\n \n {'Review'}\n \n ) : opportunity.action && !['Review', 'Visit', 'On hold'].includes(opportunity.action) ? (\n \n {opportunity.action}\n \n ) : (\n \n {'View'}\n \n )}\n
\n \n \n )\n}\n\nexport default OpportunityRow\n","import React, { FC } from 'react'\nimport { Link } from 'react-router-dom'\nimport dayjs from 'dayjs'\nimport relativeTime from 'dayjs/plugin/relativeTime'\nimport { VendorOpportunity } from 'store/vendors/types'\nimport ConditionalLink from './ConditionalLink'\n\ndayjs.extend(relativeTime)\n\ninterface OpportunitySmallRowProps {\n opportunity: VendorOpportunity\n}\n\nconst OpportunitySmallRow: FC = ({ opportunity }) => {\n const opportunityName = [opportunity.client.name.trim(), opportunity.property.address_line_1].join(', ')\n\n return (\n \n \n \n
\n
{opportunity.current_status || 'Unknown'}
\n {opportunity.action == 'On hold' && (\n
\n {'On hold'}\n
\n )}\n
\n

{opportunityName}

\n \n \n \n
\n \n {opportunity.action && opportunity.action == 'Review' && opportunity.scheduling_url ? (\n \n {'Review'}\n \n ) : opportunity.action && !['Review', 'Visit', 'On hold'].includes(opportunity.action) ? (\n \n {opportunity.action}\n \n ) : (\n \n {'View'}\n \n )}\n
\n \n \n )\n}\n\nexport default OpportunitySmallRow\n","import React, { FC, Fragment, useState } from 'react'\nimport { Link } from 'react-router-dom'\nimport cx from 'classnames'\nimport { useRecoilValue } from 'recoil'\nimport dayjs from 'dayjs'\nimport flatten from 'lodash.flatten'\nimport HourglassEmpty from '@mui/icons-material/HourglassEmpty'\nimport MonetizationOn from '@mui/icons-material/MonetizationOn'\nimport ChevronRight from '@mui/icons-material/ChevronRight'\nimport { VendorOpportunity, VendorPayment } from 'store/vendors/types'\nimport { vendorMeState, vendorOpportunitiesState } from 'store/vendors/state'\nimport { useLoadVendorOpportunities } from 'store/vendors/hooks'\nimport { useNewFeatureJourney } from 'store/vendors/hooks/nfluxdrivers/20250121-new-features'\nimport { groupBy } from 'pages/Vendor/utils'\nimport PageTitle from 'components/PageTitle'\nimport Spinner from 'components/Spinner'\nimport DatePill from '../components/DatePill'\nimport OpportunitySmallGroupHeader from '../components/OpportunitySmallGroupHeader'\nimport OpportunityRow from '../components/OpportunityRow'\nimport OpportunitySmallRow from '../components/OpportunitySmallRow'\n\nconst VendorOverview: FC = () => {\n const me = useRecoilValue(vendorMeState)\n const vendorOpportunities = useRecoilValue(vendorOpportunitiesState)\n\n const [fetching, setFetching] = useState(true)\n useLoadVendorOpportunities(fetching, setFetching)\n\n useNewFeatureJourney(!fetching && !!me)\n\n if (!me) return null\n\n const overdue = vendorOpportunities?.filter((e) => e.group == 'Overdue') || []\n const upcoming = vendorOpportunities?.filter((e) => (e.group == 'Upcoming' || e.group == 'Awarded') && e.action) || []\n\n const overdueGroup = groupBy(overdue, (e) => e.timestamp)\n const upcomingGroup = groupBy(upcoming, (e) => e.timestamp)\n\n const outstandingPayments: VendorPayment[] = flatten(\n vendorOpportunities?.map((e) =>\n e.payments.filter(\n (e) => ['Invoiced', 'Failed'].includes(e.status) || (e.status == 'Initiated' && e.stripe_next_action != null)\n )\n )\n )\n const overduePayments = outstandingPayments.filter((e) => dayjs(e.invoice_due_date).isBefore(dayjs()))\n const dueSoonPayments = outstandingPayments.filter(\n (e) => !dayjs(e.invoice_due_date).isBefore(dayjs()) && dayjs(e.invoice_due_date).isBefore(dayjs().add(7, 'day'))\n )\n\n const anyNote = [...overdue, ...upcoming].some((e) => e.advisor_bid_message)\n\n return (\n <>\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n

{`Hello ${\n me.full_name.split(' ')[0]\n },`}

\n

{`Here's what's most important for ${me.vendor_name}`}

\n

\n {'Complete all your tasks to increase your chances of getting more site visits.'}\n

\n
\n
\n {vendorOpportunities == null && fetching ? (\n
\n \n
\n ) : vendorOpportunities == null ? (\n
\n {'An error occurred, please try again.'}\n
\n ) : overdue.length + upcoming.length == 0 ? (\n
\n
\n \n
\n
\n

{'Nothing scheduled yet'}

\n

\n {\"Once you are assigned opportunities, you'll see upcoming proposals and site visits information here.\"}\n

\n
\n
\n ) : (\n <>\n {(overduePayments.length > 0 || dueSoonPayments.length > 0) &&\n !!me.vendor_contract_version &&\n ['Aug 2024 Legacy User', 'Aug 2024 New User'].includes(me.vendor_contract_version) &&\n !!me.vendor_contract_accepted_at && (\n \n \n {overduePayments.length > 0 && (\n \n \n \n \n \n \n \n )}\n {overduePayments.length > 0 && dueSoonPayments.length > 0 && (\n \n \n \n )}\n {dueSoonPayments.length > 0 && (\n \n \n \n \n \n \n \n )}\n \n
\n e.invoice_due_date).sort((a, b) => a.localeCompare(b))[0]\n )}\n status=\"overdue\"\n />\n \n
\n \n
\n
\n
{`${overduePayments.length} Overdue Payment${overduePayments.length != 1 ? 's' : ''}`}
\n
\n
\n {'Pay invoices to avoid any business disruption'}\n
\n
\n
\n \n \n \n
\n
\n e.invoice_due_date).sort((a, b) => a.localeCompare(b))[0]\n )}\n status=\"due\"\n />\n \n
\n \n
\n
\n
{`${dueSoonPayments.length} Payment${dueSoonPayments.length != 1 ? 's' : ''} Due Soon`}
\n
\n
\n {'You have invoices due in the next 7 days'}\n
\n
\n
\n \n \n \n
\n
\n )}\n \n {overdue.length > 0 && (\n \n \n \n \n \n )}\n {overdue.length > 0 &&\n Object.keys(overdueGroup).map((timestamp) => (\n \n \n \n {overdueGroup[timestamp].map((e) => (\n \n ))}\n \n \n ))}\n {upcoming.length > 0 && (\n \n \n \n \n \n )}\n {upcoming.length > 0 &&\n Object.keys(upcomingGroup).map((timestamp) => (\n \n \n \n {upcomingGroup[timestamp].map((e) => (\n \n ))}\n \n \n ))}\n
\n
\n
{`Overdue (${overdue.length})`}
\n
\n
\n
\n
{`Upcoming (${upcoming.length})`}
\n
\n
\n \n {overdue.length > 0 && (\n \n \n \n \n \n \n \n \n \n \n )}\n {overdue.length > 0 && (\n \n {overdue.map((e) => (\n \n ))}\n \n )}\n {upcoming.length > 0 && (\n \n \n \n \n \n \n \n \n \n \n )}\n {upcoming.length > 0 && (\n \n {upcoming.map((e) => (\n \n ))}\n \n )}\n
\n
\n
{`Overdue (${overdue.length})`}
\n
\n
\n {'Due Date'}\n {'Project Stage'}\n {'Property'}\n
\n
\n 0 })}\n >{`Upcoming (${upcoming.length})`}
\n \n
\n {'Due Date'}\n {'Project Stage'}\n {'Property'}\n
\n \n )}\n \n )\n}\n\nexport default VendorOverview\n","import React, { FC, Fragment, useCallback, useState } from 'react'\nimport cx from 'classnames'\nimport { track } from 'utils/analytics'\nimport { VendorOpportunity } from 'store/vendors/types'\nimport { groupBy } from 'pages/Vendor/utils'\nimport OpportunityRow from '../components/OpportunityRow'\nimport OpportunitySmallGroupHeader from '../components/OpportunitySmallGroupHeader'\nimport OpportunitySmallRow from '../components/OpportunitySmallRow'\n\ninterface AllProjectsContentProps {\n vendorOpportunities: VendorOpportunity[]\n}\n\nconst AllProjectsContent: FC = ({ vendorOpportunities }) => {\n const awarded = vendorOpportunities.filter((e) => e.group == 'Awarded') || []\n const archived = vendorOpportunities.filter((e) => e.group == 'Archived') || []\n const open = vendorOpportunities.filter((e) => !['Awarded', 'Archived'].includes(e.group || '')) || []\n\n const [activeTab, setActiveTab] = useState<'Open' | 'Awarded' | 'Archived'>(\n open.length > 0 ? 'Open' : awarded.length > 0 ? 'Awarded' : 'Archived'\n )\n const setActiveTabToOpen = useCallback(() => {\n track('click', { code: 'tab', feature: 'Open' })\n setActiveTab('Open')\n }, [])\n const setActiveTabToAwarded = useCallback(() => {\n track('click', { code: 'tab', feature: 'Awarded' })\n setActiveTab('Awarded')\n }, [])\n const setActiveTabToArchived = useCallback(() => {\n track('click', { code: 'tab', feature: 'Archived' })\n setActiveTab('Archived')\n }, [])\n\n const group = groupBy(\n activeTab == 'Open' ? open : activeTab == 'Awarded' ? awarded : archived,\n (e) => e.timestamp\n )\n\n const anyNote = [...awarded, ...archived, ...open].some((e) => e.advisor_bid_message)\n\n return (\n <>\n \n {open.length + awarded.length + archived.length > 0 && (\n \n \n \n \n \n )}\n {open.length + awarded.length + archived.length > 0 &&\n Object.keys(group).map((timestamp) => (\n \n \n \n {group[timestamp].map((e) => (\n \n ))}\n \n \n ))}\n
\n
\n {open.length > 0 && (\n {`Open (${open.length})`}\n )}\n {awarded.length > 0 && (\n {`Awarded (${awarded.length})`}\n )}\n {archived.length > 0 && (\n {`Archived (${archived.length})`}\n )}\n
\n
\n \n {open.length + awarded.length + archived.length > 0 && (\n \n \n \n \n \n \n \n \n {anyNote && }\n \n \n )}\n {open.length + awarded.length + archived.length > 0 && (\n \n {(activeTab == 'Open' ? open : activeTab == 'Awarded' ? awarded : archived).map((e) => (\n \n ))}\n \n )}\n
\n
\n {open.length > 0 && (\n {`Open (${open.length})`}\n )}\n {awarded.length > 0 && (\n {`Awarded (${awarded.length})`}\n )}\n {archived.length > 0 && (\n {`Archived (${archived.length})`}\n )}\n
\n
\n {activeTab == 'Open' ? 'Due Date' : activeTab == 'Awarded' ? 'Won Date' : 'Date'}\n {'Project Stage'}{'Property'}{'Notes'}\n
\n \n )\n}\n\nexport default AllProjectsContent\n","import React, { FC, useState } from 'react'\nimport { useRecoilValue } from 'recoil'\nimport HourglassEmpty from '@mui/icons-material/HourglassEmpty'\nimport { vendorOpportunitiesState } from 'store/vendors/state'\nimport { useLoadVendorOpportunities } from 'store/vendors/hooks'\nimport { useNewFeatureJourney } from 'store/vendors/hooks/nfluxdrivers/20250121-new-features'\nimport PageTitle from 'components/PageTitle'\nimport CoreText from 'components/Core/CoreText'\nimport Spinner from 'components/Spinner'\nimport AllProjectsContent from './AllProjectsContent'\n\nconst AllProjects: FC = () => {\n const vendorOpportunities = useRecoilValue(vendorOpportunitiesState)\n\n const [fetching, setFetching] = useState(true)\n useLoadVendorOpportunities(fetching, setFetching)\n\n useNewFeatureJourney(!fetching)\n\n return (\n <>\n \n \n {'All Projects'}\n \n {vendorOpportunities == null && fetching ? (\n
\n \n
\n ) : vendorOpportunities == null ? (\n
\n {'An error occurred, please try again.'}\n
\n ) : vendorOpportunities.length == 0 ? (\n
\n
\n \n
\n
\n {'Nothing yet'}\n \n {\"Once you are assigned opportunities, you'll see them here.\"}\n \n
\n
\n ) : (\n \n )}\n \n )\n}\n\nexport default AllProjects\n","import React, { FC, Fragment, useState } from 'react'\nimport cx from 'classnames'\nimport { useRecoilValue } from 'recoil'\nimport HourglassEmpty from '@mui/icons-material/HourglassEmpty'\nimport { VendorOpportunity } from 'store/vendors/types'\nimport { vendorOpportunitiesState } from 'store/vendors/state'\nimport { useLoadVendorOpportunities } from 'store/vendors/hooks'\nimport { useNewFeatureJourney } from 'store/vendors/hooks/nfluxdrivers/20250121-new-features'\nimport { groupBy } from 'pages/Vendor/utils'\nimport OpportunityRow from '../components/OpportunityRow'\nimport OpportunitySmallGroupHeader from '../components/OpportunitySmallGroupHeader'\nimport OpportunitySmallRow from '../components/OpportunitySmallRow'\nimport PageTitle from 'components/PageTitle'\nimport CoreText from 'components/Core/CoreText'\nimport Spinner from 'components/Spinner'\n\nconst WonProjects: FC = () => {\n const vendorOpportunities = useRecoilValue(vendorOpportunitiesState)\n\n const [fetching, setFetching] = useState(true)\n useLoadVendorOpportunities(fetching, setFetching)\n\n useNewFeatureJourney(!fetching)\n\n const awarded = vendorOpportunities?.filter((e) => e.group == 'Awarded') || []\n const awardedPaid = awarded.filter((e) => e.action == null)\n const awardedPaymentsDue = awarded.filter((e) => e.action == 'Pay')\n\n const awardedPaidGroup = groupBy(awardedPaid, (e) => e.timestamp)\n const awardedPaymentsDueGroup = groupBy(awardedPaymentsDue, (e) => e.timestamp)\n\n const anyNote = [...awardedPaid, ...awardedPaymentsDue].some((e) => e.advisor_bid_message)\n\n return (\n <>\n \n \n {'Awarded Projects'}\n \n {vendorOpportunities == null && fetching ? (\n
\n \n
\n ) : vendorOpportunities == null ? (\n
\n {'An error occurred, please try again.'}\n
\n ) : awarded.length == 0 ? (\n
\n
\n \n
\n
\n {'Nothing won yet'}\n \n {\"Once you win projects, you'll see them here.\"}\n \n
\n
\n ) : (\n <>\n {awardedPaid.length > 0 && (\n <>\n
{`Paid (${awardedPaid.length})`}
\n \n {awardedPaid.length > 0 &&\n Object.keys(awardedPaidGroup).map((timestamp) => (\n \n \n \n {awardedPaidGroup[timestamp].map((e) => (\n \n ))}\n \n \n ))}\n
\n \n \n \n \n \n \n \n \n \n {awardedPaid.map((e) => (\n \n ))}\n \n
\n {'Won Date'}\n {'Project Stage'}\n {'property'}\n
\n \n )}\n {awardedPaymentsDue.length > 0 && (\n <>\n 0 })}\n >{`Payments Due (${awardedPaymentsDue.length})`}\n \n {awardedPaymentsDue.length > 0 &&\n Object.keys(awardedPaymentsDueGroup).map((timestamp) => (\n \n \n \n {awardedPaymentsDueGroup[timestamp].map((e) => (\n \n ))}\n \n \n ))}\n
\n \n \n \n \n \n \n \n \n \n {awardedPaymentsDue.map((e) => (\n \n ))}\n \n
\n {'Won Date'}\n {'Project Stage'}\n {'property'}\n
\n \n )}\n \n )}\n \n )\n}\n\nexport default WonProjects\n","import React, { FC } from 'react'\nimport dayjs from 'dayjs'\nimport timezone from 'dayjs/plugin/timezone'\nimport cx from 'classnames'\nimport MonetizationOn from '@mui/icons-material/MonetizationOn'\nimport { VendorPayment, VendorPaymentForIndex } from 'store/vendors/types'\nimport { formatMoney } from 'utils/formatting'\nimport DatePill from 'pages/Vendor/components/DatePill'\n\ndayjs.extend(timezone)\n\ntype PaymentRowProps = {\n payment: VendorPayment | VendorPaymentForIndex\n takeRate: number | null\n}\n\nconst PaymentRow: FC = ({ payment, takeRate }) => {\n const status =\n ['Invoiced', 'Failed'].includes(payment.status) ||\n (payment.status == 'Initiated' && payment.stripe_next_action != null)\n ? dayjs(payment.invoice_due_date).isBefore(dayjs())\n ? 'overdue'\n : 'upcoming'\n : 'upcoming'\n\n const label = payment.capchase_url\n ? payment.status == 'Invoiced'\n ? 'Click “Set Up Payments” to initiate before due date.'\n : payment.status == 'Initiated' && !dayjs(payment.invoice_due_date).isBefore(dayjs())\n ? `Your first installment will be charged on ${dayjs(payment.invoice_due_date).format('MM/DD/YYYY')}.`\n : payment.status == 'Initiated' && dayjs(payment.invoice_due_date).isBefore(dayjs())\n ? 'One or more installment payments failed.'\n : payment.status == 'Collected' && dayjs(payment.invoice_due_date).isBefore(dayjs().add(30 * 9, 'day'))\n ? 'Ensure timely payment of your installments to maintain access to payment plans.'\n : payment.status == 'Failed'\n ? 'Payment failed.'\n : null\n : null\n\n return (\n <>\n \n \n \n \n \n \n \n \n \n \n
\n {payment.method == 'Insta-Pay' ? 'InstaPay' : payment.method || 'Legacy'}\n
\n \n \n \n {formatMoney(payment.amount_in_cents / 100)}\n \n \n \n {takeRate &&
{`${takeRate}%`}
}\n \n \n
\n {payment.type?.replace(' payment', '')}\n
\n \n {'client' in payment && (\n \n
\n {[payment.client.name.trim(), payment.property.address_line_1].join(', ')}\n
\n \n )}\n \n
\n {payment.status == 'Collected' ? (\n
\n {'Received'}\n
\n ) : payment.status == 'Customer Cancel - Refunded' ? (\n
\n {'Cancelled'}\n
\n ) : payment.capchase_url && payment.status == 'Invoiced' ? (\n \n
{'Set Up Payments'}
\n \n ) : payment.capchase_url && payment.status == 'Failed' ? (\n
\n {'Failed'}\n
\n ) : payment.stripe_url && (payment.status == 'Invoiced' || payment.status == 'Failed') ? (\n \n
{payment.status == 'Failed' ? 'Retry' : 'Pay'}
\n \n ) : payment.quickbooks_url && (payment.status == 'Invoiced' || payment.status == 'Failed') ? (\n \n
{payment.status == 'Failed' ? 'Retry' : 'Pay'}
\n \n ) : payment.status == 'Initiated' && payment.stripe_next_action?.type == 'verify_with_microdeposits' ? (\n \n
{'Verify'}
\n \n ) : null}\n
\n \n \n {label && (\n \n \n
\n \n {label}\n
\n \n \n \n )}\n \n )\n}\n\nexport default PaymentRow\n","import React, { FC } from 'react'\n\nconst PaymentTableHeaders: FC = () => {\n return (\n \n \n \n
{'Due date'}
\n \n \n {'Payment option'}\n \n {'Amount'}\n {'Rate'}\n {'Payment type'}\n {'Property'}\n \n \n \n )\n}\n\nexport default PaymentTableHeaders\n","import React, { FC, useCallback, useEffect, useState } from 'react'\nimport dayjs from 'dayjs'\nimport cx from 'classnames'\nimport { track } from 'utils/analytics'\nimport { VendorPaymentForIndex } from 'store/vendors/types'\nimport { groupBy } from 'pages/Vendor/utils'\nimport PaymentRow from 'pages/Vendor/components/PaymentRow'\nimport PaymentTableHeaders from './PaymentsTableHeaders'\n\ntype PaymentsListProps = {\n vendorPayments: VendorPaymentForIndex[]\n}\n\nconst PaymentsList: FC = ({ vendorPayments }) => {\n const [initiatedPaymentsExpanded, setInitiatedPaymentsExpanded] = useState(false)\n\n const toggleInitiatedPaymentsExpanded = useCallback(() => {\n track('click', { code: 'toggle', feature: 'Initiated' })\n setInitiatedPaymentsExpanded((oldInitiatedPaymentsExpanded) => !oldInitiatedPaymentsExpanded)\n }, [])\n\n const setActiveTabToOutstanding = useCallback(() => {\n track('click', { code: 'tab', feature: 'Outstanding' })\n window.location.hash = 'outstanding'\n }, [])\n const setActiveTabToHistory = useCallback(() => {\n track('click', { code: 'tab', feature: 'History' })\n window.location.hash = 'history'\n }, [])\n const setActiveTabToCancelled = useCallback(() => {\n track('click', { code: 'tab', feature: 'Cancelled' })\n window.location.hash = 'cancelled'\n }, [])\n\n const outstandingPayments = vendorPayments.filter(\n (e) => ['Invoiced', 'Failed'].includes(e.status) || (e.status == 'Initiated' && e.stripe_next_action != null)\n )\n const overduePayments = outstandingPayments.filter((e) => dayjs(e.invoice_due_date).isBefore(dayjs()))\n const upcomingPayments = outstandingPayments.filter((e) => !dayjs(e.invoice_due_date).isBefore(dayjs()))\n const historyPayments = vendorPayments.filter(\n (e) => e.status == 'Collected' || (e.status == 'Initiated' && e.stripe_next_action == null)\n )\n const initiatedPayments = historyPayments.filter((e) => e.status == 'Initiated')\n const collectedPayments = historyPayments.filter((e) => e.status == 'Collected')\n const cancelledPayments = vendorPayments.filter((e) => e.status == 'Customer Cancel - Refunded')\n\n const [activeTab, setActiveTab] = useState<'Outstanding' | 'History' | 'Cancelled'>(\n window.location.hash == '#history' || (outstandingPayments.length == 0 && cancelledPayments.length == 0)\n ? 'History'\n : window.location.hash == '#cancelled' || (collectedPayments.length == 0 && outstandingPayments.length == 0)\n ? 'Cancelled'\n : 'Outstanding'\n )\n\n const handleHashChange = useCallback(() => {\n if (window.location.hash == '#history' && collectedPayments.length > 0) {\n setActiveTab('History')\n } else if (window.location.hash == '#cancelled' && cancelledPayments.length > 0) {\n setActiveTab('Cancelled')\n } else {\n setActiveTab('Outstanding')\n }\n }, [cancelledPayments.length, collectedPayments.length])\n\n useEffect(() => {\n window.addEventListener('hashchange', handleHashChange)\n return () => {\n window.removeEventListener('hashchange', handleHashChange)\n }\n }, [handleHashChange])\n\n const overduePaymentsByYear = groupBy(overduePayments, (e) =>\n String(dayjs(e.invoice_due_date).year())\n )\n const upcomingPaymentsByYear = groupBy(upcomingPayments, (e) =>\n String(dayjs(e.invoice_due_date).year())\n )\n const initiatedPaymentsByYear = groupBy(initiatedPayments, (e) =>\n String(dayjs(e.invoice_due_date).year())\n )\n const collectedPaymentsByYear = groupBy(collectedPayments, (e) =>\n String(dayjs(e.invoice_due_date).year())\n )\n const cancelledPaymentsByYear = groupBy(cancelledPayments, (e) =>\n String(dayjs(e.invoice_due_date).year())\n )\n\n return (\n <>\n
\n {outstandingPayments.length > 0 && (\n \n {`Outstanding (${outstandingPayments.length})`}\n \n )}\n {historyPayments.length > 0 && (\n \n {`History (${historyPayments.length})`}\n \n )}\n {cancelledPayments.length > 0 && (\n \n {`Cancelled (${cancelledPayments.length})`}\n \n )}\n
\n {activeTab == 'Outstanding' ? (\n \n {overduePayments.length > 0 && (\n <>\n \n \n \n \n \n \n {Object.keys(overduePaymentsByYear).map((year) => (\n \n \n \n {year}\n \n \n {overduePaymentsByYear[year].map((payment) => (\n \n ))}\n \n ))}\n \n )}\n {upcomingPayments.length > 0 && (\n <>\n \n \n \n \n \n \n {Object.keys(upcomingPaymentsByYear).map((year) => (\n \n \n \n {year}\n \n \n {upcomingPaymentsByYear[year].map((payment) => (\n \n ))}\n \n ))}\n \n )}\n
\n
\n
{`Overdue (${overduePayments.length})`}
\n
\n
\n
\n
{`Upcoming (${upcomingPayments.length})`}
\n
\n
\n ) : activeTab == 'History' ? (\n \n {initiatedPayments.length > 0 && (\n <>\n \n \n \n \n \n {initiatedPaymentsExpanded && (\n <>\n \n {Object.keys(initiatedPaymentsByYear).map((year) => (\n \n \n \n {year}\n \n \n {initiatedPaymentsByYear[year].map((payment) => (\n \n ))}\n \n ))}\n \n )}\n \n )}\n {collectedPayments.length > 0 && (\n <>\n \n \n \n \n \n \n {Object.keys(collectedPaymentsByYear).map((year) => (\n \n \n \n {year}\n \n \n {collectedPaymentsByYear[year].map((payment) => (\n \n ))}\n \n ))}\n \n )}\n
\n
\n {`Initiated (${initiatedPayments.length})`}\n
\n
\n
\n
{`Collected (${collectedPayments.length})`}
\n
\n
\n ) : activeTab == 'Cancelled' ? (\n \n \n {Object.keys(cancelledPaymentsByYear).map((year) => (\n \n \n \n \n {cancelledPaymentsByYear[year].map((payment) => (\n \n ))}\n \n ))}\n
\n {year}\n
\n ) : null}\n \n )\n}\n\nexport default PaymentsList\n","import React, { FC, useState } from 'react'\nimport { useRecoilValue } from 'recoil'\nimport HourglassEmpty from '@mui/icons-material/HourglassEmpty'\nimport { vendorPaymentsState } from 'store/vendors/state'\nimport { useLoadPayments } from 'store/vendors/hooks'\nimport CoreText from 'components/Core/CoreText'\nimport PageTitle from 'components/PageTitle'\nimport Spinner from 'components/Spinner'\nimport PaymentsList from './PaymentsList'\n\nconst Payments: FC = () => {\n const vendorPayments = useRecoilValue(vendorPaymentsState)\n\n const [fetching, setFetching] = useState(true)\n useLoadPayments(fetching, setFetching)\n\n return (\n
\n \n \n {'Payments'}\n \n {vendorPayments == null && fetching ? (\n
\n \n
\n ) : vendorPayments == null ? (\n
\n {'An error occurred, please try again.'}\n
\n ) : vendorPayments.length == 0 ? (\n
\n
\n \n
\n
\n {'Nothing yet'}\n \n {'Once you win a project any associated payments will be shown here.'}\n \n
\n
\n ) : (\n \n )}\n
\n )\n}\n\nexport default Payments\n","import React, { FC, useCallback } from 'react'\nimport { track } from 'utils/analytics'\nimport BaseModal from 'components/BaseModal'\nimport Close from '@mui/icons-material/Close'\nimport Error from '@mui/icons-material/Error'\nimport CoreText from 'components/Core/CoreText'\n\ninterface ContractErrorModalProps {\n error: 'not_owner' | 'unknown' | null\n open: boolean\n setOpen: (value: boolean) => void\n}\n\nconst ContractErrorModal: FC = ({ error, open, setOpen }) => {\n const handleCloseClick = useCallback(() => {\n track('click', { code: 'close', feature: 'ContractErrorModal' })\n setOpen(false)\n }, [setOpen])\n\n return (\n \n
\n

{'Not allowed'}

\n \n {'Close modal'}\n \n \n
\n
\n \n \n {error == 'not_owner' ? 'You are not recognized as the owner of this account' : 'An error ocurred'}\n \n \n {error == 'not_owner'\n ? 'Only the owner of the account is allowed to submit this agreement. Please contact the owner for assistance.'\n : 'Try again later'}\n \n
\n
\n )\n}\n\nexport default ContractErrorModal\n","const ReferralAgreementMarkdown = `\n> THIS VENDOR REFERRAL AGREEMENT (THE “AGREEMENT”) CONTAINS THE TERMS AND CONDITIONS BETWEEN REALM LIVING, INC. \n> (“COMPANY”), AND YOU (TOGETHER WITH THE ENTITY FOR WHICH YOU REGISTER, ACCESS OR USE THE REALM REFERRAL PROGRAM, \n> “VENDOR”), REGARDING ACCESS AND USE OF THE REALM PLATFORM AND REFERRAL PROGRAM. THE COMPANY AND VENDOR ARE EACH \n> REFERRED TO HEREIN AS A “PARTY” AND, COLLECTIVELY, AS THE \"PARTIES.\" YOU REPRESENT AND WARRANT THAT YOU HAVE \n> FULL LEGAL AUTHORITY TO ENTER INTO THIS AGREEMENT, UNDER ALL APPLICABLE LAWS AND ON BEHALF OF VENDOR. \n> BY SELECTING THE “ACCEPT”, “SIGN UP” OR SIMILAR BUTTON OR CHECKBOX REFERENCING THIS AGREEMENT OR SIGNING ANY \n> OTHER DOCUMENT MAKING REFERENCE TO THIS AGREEMENT, YOU WILL CREATE A LEGALLY ENFORCEABLE CONTRACT WHERE VENDOR \n> AGREES TO BE BOUND BY ALL TERMS AND CONDITIONS OF THIS AGREEMENT WITHOUT MODIFICATION. \n\n1. **Acceptance of Realm’s Terms of Use and Privacy Policy.** By entering this Agreement, the Parties agree to the \n terms stated herein and the Vendor accepts and agrees to be bound by the Company’s [Terms of Use](https://realmhome.com/terms) \n and [Privacy Policy](https://realmhome.com/privacy), which include disclaimers, indemnities, and limitations of \n liability, and are hereby incorporated by reference. In the event of any conflict, this Agreement will control. \n\n2. **Term and Termination.**\n\n 1. This Agreement shall begin on the Effective Date and will remain in effect for a twelve month period.\n 2. This Agreement will automatically renew on a month-to-month basis unless either Party provides written \n notice of termination which will be effective immediately. \n 3. Termination of this Agreement shall not affect the obligation of Vendor to pay the Company any amounts \n owed or to become owed as a result of a referral provided by the Company on or before the date of such \n termination.\n 4. This Agreement may be terminated by either Party for cause by providing notice of such cause to the \n breaching Party which cause remains uncured after a reasonable time specified in such notice.\n\n3. **Referral Description.** Upon the execution of this Agreement, the Company may refer potential clients \n (“Leads”) to the Vendor. \n\n4. **Referral Amount.** The Vendor agrees to pay a referral fee based on a percentage of the total project value \n (each a “Referral Fee”) for all current and future contracts derived from Leads (each, a “Contract”) in \n the amounts, and in accordance with the payment terms set forth in the current [Realm Referral Payment Terms](#payment_terms), \n which may include one or more payment options. Some payment options may involve a third party provider \n (each a “Payment Provider”). In the event Vendor elects to use a Payment Provider payment option, Vendor \n agrees to comply with all applicable terms and conditions, and that Company is not responsible for the services \n provided by such Payment Provider. In addition to any specific terms set forth in the Realm Referral Payment Terms, \n any amount not paid when due shall bear a late payment charge, until paid, at the rate of 1.5% per month or the \n maximum amount permitted by law, whichever is less. Vendor agrees to reimburse Company for all costs (including \n attorneys' fees) incurred in collecting late payments and to indemnify Vendor from any damages, liabilities, \n costs and expenses (including reasonable attorneys' fees) arising out of Vendor use of any Payment Provider. \n Without limiting any of Company’s other remedies, Vendor agrees that failure to make a Referral Fee payment \n when due may result in suspension or removal from the Company referral program and legal action. Notwithstanding \n anything to the contrary (including any arbitration provisions found in the Terms of Use), Company will be \n entitled to seek relief in any court of competent jurisdiction for Vendor’s breach of this Agreement. \n In any action or proceeding to enforce or interpret this Agreement, the prevailing party will be \n entitled to recover from the other party its costs and expenses (including reasonable attorneys' \n fees) incurred in connection with such action or proceeding and enforcing any judgment or order obtained.\n\n5. **Exclusivity.** This Agreement shall not be construed to be a commitment by either of the Parties to work \n exclusively with one another regarding referrals of potential new business or any other business activities.\n\n6. **Non-Circumvention.** The Vendor agrees that all third parties introduced to Vendor by Company under this \n Agreement represent significant efforts and working relationships that are unique to, and part of, the work product \n and intellectual capital of the Company. Accordingly, Vendor agrees to refrain from conducting direct or indirect \n business dealings of any kind with any referrals introduced to Vendor by Company under this Agreement, with the \n exception of third parties with whom the Vendor had a formal business relationship prior to such referral, as \n reasonably documented. \n\n7. **Confidentiality.** Vendor acknowledges that the existence and the terms of this Agreement, and any oral or \n written information exchanged between the Parties in connection with the preparation and performance of this Agreement, \n is regarded as Company’s confidential information. Vendor agrees not to possess, access, use or disclose such confidential \n information without Company’s written consent, and will use reasonable care to protect such confidential information. \n Vendor will be responsible for any breach of confidentiality by its employees and contractors. This section will \n survive termination.\n\n8. **Compliance.** Vendor shall comply with all applicable, local, state, and federal laws and shall obtain necessary \n licenses pursuant to their business and the performance of any Contract. Vendor agrees to comply with the current \n [Realm Vendor Rules of Conduct](#rules_of_conduct), and that failure to comply may result in removal from the Realm platform.**\n\n9. **Contracts.** Contracts must comply with all applicable laws, rules, regulations and requirements (including, \n without those limitations, as set forth by the state license boards). Contracts must include, without limitation, \n a payment schedule, a three day right to cancel, an estimated timeline, warranty coverage, and scope of work. \n Contracts are subject to Company’s reasonable approval and must be sent to the Company before sending to the client.\n\n10. **Extended Warranty.** Vendor agrees to offer clients an extended warranty on workmanship for a period of a minimum \n of 2 years after completion of the applicable work. \n`\n\nexport default ReferralAgreementMarkdown\n","import React from 'react'\n\nconst DocumentLink = ({ children, ...props }) => {\n return (\n \n {children}\n \n )\n}\n\nexport default DocumentLink\n","const PaymentTermsMardownNewVendors = `\n**Realm Project Referral Payment Terms**\n\n## How It Works\n\n- **Success Only:** Only pay for leads that result in a signed client contract.\n- **Payment Method:** Securely pay via ACH through the Stripe platform. Payments may also be made via auto-debit by providing banking information for any payment option. Payment Plan payments must be paid by credit card or auto-debit. If selected, funds will not be pulled until the payment due date(s). \n- **Payment Options:** Selecting a payment option will be done through the Vendor Portal when a project proposal is uploaded. \n\n## Rates\n\n### For construction and Design-Build Contracts\n\n*Payment options are selected in the Vendor Portal when uploading a proposal*\n\n| Payment Option | Terms of Payment | **Referral Amount** | Restrictions |\n|----------------|------------------|---------------------|--------------|\n| **Insta-Pay** | Full payment is due within 3 business days of a signed construction contract. | 4.99% | N/A |\n| **Payment Plan** | Payments broken out into 10 month installments starting 30 days after a signed construction contract. Option provided through the Company’s lending partner who will handle payments. | 6.49% | Vendor cannot be a sole proprietorship |\n| **Pay at Construction** | Full payment is due at construction start or 270 days after a signed construction contract, whichever comes first. | 7.99% | By application only and approval at Realm's sole discretion |\n\n\n### For Design And Architecture Only Contracts\n\n| Total Design Price | Terms of Payment | Referral Amount |\n| ------------------ | ---------------- | --------------- |\n| All Design Contract Values | Full payment is due within 7 business days of a signed design contract. | 10% |\n\n## Refunds\n\nAll Realm referral fees are non-refundable, except in case of the following:\n\nRefunds shall only be issued in the event the Vendor is unable to fulfill their obligations due to a client cancellation from circumstances \nbeyond the client’s control, such as a natural disaster, personal hardship, or inability to secure sufficient financing. Satisfactory \nevidence must be provided of such circumstances to Realm, including documentation of the event and its impact on their ability to fulfill \ntheir obligations. A referral fee will not be refunded if the contract is canceled due to failure to deliver on the agreed upon contract \nby the Vendor. Determination of refunds will be at the sole discretion of Realm.\n\nUnder no circumstances shall a referral fee be refunded to Vendor if Vendor is found to have caused the cancellation of a contract due to \nits or its employees negligence, poor performance, or failure to meet the terms of their contract with the client.\n\n## Change Orders\nChange orders will be included in the Referral Fees, and will be billed at 4.49%. \n\n\n## Late Fees\n\n - Insta-Pay: A 1 percentage point increase on the total fee will be enforced which will be due within 30 days of the contract signed \n date if the original payment window is missed. If the 30 day extension is missed, Vendor will be removed from Realm’s platform until \n full payment is received. \n - For example, if a contract is signed at $100k and the original payment was due on July 15th, for $4,990 using the 4.99% Referral \n Amount rate, then the new payment amount would increase to 5.99% totaling $5,990, and would be due 30 days after the contract \n signed date (July 15th) on August 14th.\n - Payment Plan: Any failed payments that are not corrected within 5 days will incur an automatic $250 late fee on the account. If any \n installment payment is more than 30 days late, the third party provider will be owed the entirety of the outstanding balance \n immediately. Failure to pay on time may result in legal implications (including, without limitation, removal from the third party \n platform) and the Vendor will be removed from Realm’s platform until full payment is received. See full terms and conditions from \n third party vendor. \n - For example, if a contract is signed at $200k at 6.49% and $12,980 is due to the Company, the original payment structure would have \n $1,298 paid to the Company every month for 10 months, with the first payment due 30 days after the contract is signed. If any of \n those payments are missed, the outstanding balance will become immediately due, for example, $11,682 due to Realm directly if the \n second payment was missed after paying the first $1,298 payment. Additionally, a $250 late fee will be automatically debited from \n the bank account on file if not corrected within 5 days. \n - Pay at Construction: If the payment is missed, Realm may pursue legal action. The Vendor will also be removed from the Company platform.\n - For example, if a contract is signed at $350k at 7.99%, and $27,965 is due to the Company then that payment would be due in full to \n the Company after 270 days, unless construction starts before then. If payment is not made in 270 days, then Realm would remove \n the Vendor from the Realm platform and consider legal action.\n\n`\n\nconst PaymentTermsMardownLegacyVendors = `\n**Realm Project Referral Payment Terms**\n\n## How It Works\n\n- **Success Only:** Only pay for leads that result in a signed client contract.\n- **Payment Method:** Securely pay via ACH through the Stripe platform. Payments may also be made via auto-debit by providing banking information for any payment option. Payment Plan payments must be paid by credit card or auto-debit. If selected, funds will not be pulled until the payment due date(s). \n- **Payment Options:** Selecting a payment option will be done through the Vendor Portal when a project proposal is uploaded. \n\n## Rates\n\n### For construction and Design-Build Contracts\n\n*Payment options are selected in the Vendor Portal when uploading a proposal*\n\n| Payment Option | Terms of Payment | **Referral Amount** | Restrictions |\n|----------------|------------------|---------------------|--------------|\n| **Insta-Pay** | Full payment is due within 3 business days of a signed construction contract. | 3.99% | N/A |\n| **Payment Plan** | Payments broken out into 10 month installments starting 30 days after a signed construction contract. Option provided through the Company’s lending partner who will handle payments. | 5.49% | Vendor cannot be a sole proprietorship |\n| **Pay at Construction** | Full payment is due at construction start or 270 days after a signed construction contract, whichever comes first. | 7.49% | By application only and approval at Realm's sole discretion |\n\n\n### For Design And Architecture Only Contracts\n\n| Total Design Price | Terms of Payment | Referral Amount |\n| ------------------ | ---------------- | --------------- |\n| All Design Contract Values | Full payment is due within 7 business days of a signed design contract. | 10% |\n\n## Refunds\n\nAll Realm referral fees are non-refundable, except in case of the following:\n\nRefunds shall only be issued in the event the Vendor is unable to fulfill their obligations due to a client cancellation from circumstances \nbeyond the client’s control, such as a natural disaster, personal hardship, or inability to secure sufficient financing. Satisfactory \nevidence must be provided of such circumstances to Realm, including documentation of the event and its impact on their ability to fulfill \ntheir obligations. A referral fee will not be refunded if the contract is canceled due to failure to deliver on the agreed upon contract \nby the Vendor. Determination of refunds will be at the sole discretion of Realm.\n\nUnder no circumstances shall a referral fee be refunded to Vendor if Vendor is found to have caused the cancellation of a contract due to \nits or its employees negligence, poor performance, or failure to meet the terms of their contract with the client.\n\n## Change Orders\nChange orders will be included in the Referral Fees, and will be billed at 4.49%. \n\n\n## Late Fees\n\n - Insta-Pay: A 1 percentage point increase on the total fee will be enforced which will be due within 30 days of the contract signed \n date if the original payment window is missed. If the 30 day extension is missed, Vendor will be removed from Realm’s platform until \n full payment is received. \n - For example, if a contract is signed at $100k and the original payment was due on July 15th, for $3,990 using the 3.99% Referral \n Amount rate, then the new payment amount would increase to 4.99% totaling $4,990, and would be due 30 days after the contract \n signed date (July 15th) on August 14th.\n - Payment Plan: Any failed payments that are not corrected within 5 days will incur an automatic $250 late fee on the account. If any \n installment payment is more than 30 days late, the third party provider will be owed the entirety of the outstanding balance \n immediately. Failure to pay on time may result in legal implications (including, without limitation, removal from the third party \n platform) and the Vendor will be removed from Realm’s platform until full payment is received. See full terms and conditions from \n third party vendor. \n - For example, if a contract is signed at $200k at 5.49% and $10,980 is due to the Company, the original payment structure would have \n $1,098 paid to the Company every month for 10 months, with the first payment due 30 days after the contract is signed. If any of \n those payments are missed, the outstanding balance will become immediately due, for example, $9,882 due to Realm directly if the \n second payment was missed after paying the first $1,098 payment. Additionally, a $250 late fee will be automatically debited from \n the bank account on file if not corrected within 5 days. \n - Pay at Construction: If the payment is missed, Realm may pursue legal action. The Vendor will also be removed from the Company platform.\n - For example, if a contract is signed at $350k at 7.49%, and $26,215 is due to the Company then that payment would be due in full to \n the Company after 270 days, unless construction starts before then. If payment is not made in 270 days, then Realm would remove \n the Vendor from the Realm platform and consider legal action.\n\n`\n\nconst PaymentTermsMarkdown = {\n NewVendors: PaymentTermsMardownNewVendors,\n LegacyVendors: PaymentTermsMardownLegacyVendors,\n}\n\nexport default PaymentTermsMarkdown\n","const RulesOfConductMarkdown = `\n**Realm Vendor Rules of Conduct**\n\n**Proposals.** Vendors must upload bids to their Realm for Business Vendor Portal prior to sharing \nthem with the client and within 7 days after conducting a site visit. All proposals must include payment \nschedules. Vendor agrees that Realm reserves the right to require revisions to all bids in its \nreasonable discretion. \n\n**Construction Milestones & Cooperation.** Vendors agree to notify Realm of major milestones \npost-contract signing, including design complete, permit application submitted, permit approved, \nconstruction start, construction mid-point, and final inspection passed. Vendors can choose to \nnotify Realm advisors directly or through the Vendor Portal. Updates should include photos of \nconstruction. Vendors must include Realm advisors as contacts on permit applications when able \nto do so. \n\n**Change Orders.** Vendors must send a copy of all change orders to Realm with context within 3\ndays of presenting to the client.\n\n**Site Visit Etiquette.** Vendors must notify Realm who will be conducting site visits prior \nto scheduling and ensure that the Vendor representative is familiar with Realm and who the \nreferring Realm advisor is. This can be done by adding the Vendor representative to the calendar \ninvite at the time of booking the site visit. Vendors should arrive on time, in professional attire.\nIn the case of delays or cancellations, Vendors must inform clients directly with 1 hour minimum \nnotice. Vendors must confirm that they understand the scope and have reviewed all project \ndocumentation prior to arriving at the site visit. If a site visit is conducted, proposals are required \nto be submitted, unless otherwise communicated by the client that a proposal is not needed. Vendors should \nexpect to spend 1 hour minimum conducting site visits, meeting with the client and aligning on scope. \n`\n\nexport default RulesOfConductMarkdown\n","// extracted by mini-css-extract-plugin\nexport default {\"document\":\"VDJWOQYTuz_l02jlGqBT\"};","import React, { FC, useCallback, useEffect, useMemo } from 'react'\nimport { useRecoilValue } from 'recoil'\nimport cx from 'classnames'\nimport Close from '@mui/icons-material/Close'\nimport { track } from 'utils/analytics'\nimport { vendorMeState } from 'store/vendors/state'\nimport { DocumentType } from 'pages/Vendor/Contract'\nimport ReferralAgreementMarkdown from 'pages/Vendor/Contract/DocumentModal/Documents/ReferralAgreement'\nimport DocumentLink from 'pages/Vendor/Contract/DocumentModal/DocumentLink'\nimport getPaymentTermsMarkdown from 'pages/Vendor/Contract/DocumentModal/Documents/PaymentTerms'\nimport RulesOfConductMarkdown from 'pages/Vendor/Contract/DocumentModal/Documents/RulesOfConduct'\nimport BaseModal from 'components/BaseModal'\nimport Markdown from 'components/Markdown'\nimport styles from './styles.module.scss'\n\ninterface DocumentModal {\n documentType: DocumentType\n open: boolean\n setOpen: (value: boolean) => void\n}\n\nconst DocumentModal: FC = ({ documentType, open, setOpen }) => {\n const me = useRecoilValue(vendorMeState)\n\n const handleCloseClick = useCallback(() => {\n track('click', { code: 'close', feature: 'ContractErrorModal' })\n setOpen(false)\n }, [setOpen])\n\n useEffect(() => {\n track('impression', { code: 'document', feature: 'ContractErrorModal', flexfield_1: { documentType } })\n }, [documentType])\n\n const documentMarkdown = useMemo(() => {\n switch (documentType) {\n case 'referral_agreement':\n return ReferralAgreementMarkdown\n case 'rules_of_conduct':\n return RulesOfConductMarkdown\n case 'payment_terms':\n return me?.vendor_contract_version == 'Aug 2024 New User'\n ? getPaymentTermsMarkdown.NewVendors\n : getPaymentTermsMarkdown.LegacyVendors\n default:\n return ''\n }\n }, [documentType, me?.vendor_contract_version])\n\n const documentTitle = useMemo(() => {\n if (!documentType) return\n\n return {\n referral_agreement: 'Realm Vendor Referral Agreement',\n payment_terms: 'Realm Referral Payment Terms',\n rules_of_conduct: 'Realm Vendor Rules of Conduct',\n }[documentType]\n }, [documentType])\n\n if (!documentType) return null\n\n return (\n \n
\n

{documentTitle}

\n \n {'Close modal'}\n \n \n
\n \n {documentMarkdown}\n \n
\n )\n}\n\nexport default DocumentModal\n","import React, { FC, useCallback, useEffect, useState } from 'react'\nimport { useHistory, useLocation } from 'react-router-dom'\nimport Check from '@mui/icons-material/Check'\nimport Update from '@mui/icons-material/Update'\nimport FileCopy from '@mui/icons-material/FileCopy'\nimport { useRecoilState } from 'recoil'\nimport cx from 'classnames'\nimport dayjs from 'dayjs'\nimport CalendarToday from '@mui/icons-material/CalendarToday'\nimport EventBusy from '@mui/icons-material/EventBusy'\nimport CheckBox from '@mui/icons-material/CheckBox'\nimport CheckBoxOutlineBlank from '@mui/icons-material/CheckBoxOutlineBlank'\nimport Info from '@mui/icons-material/Info'\nimport { track } from 'utils/analytics'\nimport { vendorMeState } from 'store/vendors/state'\nimport { acceptVendorContract, fetchVendorContactUserMe } from 'store/vendors/api'\nimport ContractErrorModal from 'pages/Vendor/Contract/ContractErrorModal'\nimport DocumentModal from 'pages/Vendor/Contract/DocumentModal'\nimport CoreList from 'components/Core/CoreList'\nimport CoreButton from 'components/Core/CoreButton'\nimport CoreText from 'components/Core/CoreText'\nimport PageTitle from 'components/PageTitle'\nimport Spinner from 'components/Spinner'\n\nexport type DocumentType = 'referral_agreement' | 'payment_terms' | 'rules_of_conduct' | null\n\nconst Contract: FC = () => {\n const [contractAcceptedCheck, setContractAcceptedCheck] = useState(false)\n const [me, setMe] = useRecoilState(vendorMeState)\n const [fetching, setFetching] = useState(false)\n const [error, setError] = useState<'not_owner' | 'unknown' | null>(null)\n const [errorModalOpen, setErrorModalOpen] = useState(false)\n\n const [documentToView, setDocumentToView] = useState(null)\n const [documentModalOpen, setDocumentModalOpen] = useState(false)\n\n const location = useLocation()\n const history = useHistory()\n\n useEffect(() => {\n // Parse the hash from the URL (e.g., #FOO=value1&BAR=value2)\n const hash = location.hash.substring(1) // Remove the '#' character\n\n if (['referral_agreement', 'rules_of_conduct', 'payment_terms'].includes(hash)) {\n setDocumentToView(hash as DocumentType)\n history.replace({ pathname: window.location.pathname, search: window.location.search })\n }\n\n // Add any other conditions as needed\n }, [location.hash, history])\n\n useEffect(() => setContractAcceptedCheck(!!me?.vendor_contract_accepted_at), [me?.vendor_contract_accepted_at])\n\n const handleToggleAccepted = useCallback(() => {\n if (me?.vendor_contract_accepted_at) return\n\n setContractAcceptedCheck((val) => !val)\n }, [me?.vendor_contract_accepted_at])\n\n const handleSubmit = useCallback(async () => {\n setFetching(true)\n setError(null)\n const response = await acceptVendorContract()\n\n if (response.status == 200) {\n track('accept contract')\n\n const newMe = await fetchVendorContactUserMe()\n setMe(newMe)\n setFetching(false)\n } else {\n setFetching(false)\n\n try {\n const errors = await response.json()\n if (errors['accepted_by']) setError('not_owner')\n else setError('unknown')\n } catch (e) {\n console.error(e)\n setError('unknown')\n }\n }\n }, [setMe])\n\n const handleClickDocument = useCallback((type: DocumentType) => () => setDocumentToView(type), [])\n\n useEffect(() => setErrorModalOpen(!!error), [error])\n useEffect(() => setDocumentModalOpen(!!documentToView), [documentToView])\n\n return (\n <>\n
\n \n
\n {'Contract'}\n {!!me?.vendor_contract_needs_attention && (\n \n {me.vendor_contract_hold ? (\n \n ) : (\n \n )}\n \n {me.vendor_contract_version == 'Aug 2024 New User'\n ? `To be eligible for leads, contract must be accepted.`\n : me.vendor_contract_overdue\n ? 'Contract acceptance is overdue and you are not eligible for new leads until you agree to the new terms.'\n : `To prevent a pause in new leads, contract must be signed by ${dayjs(me.vendor_contract_accepted_due_at).tz('America/Los_Angeles').format('DD MMMM YYYY')}`}\n \n
\n )}\n
\n {!me || fetching ? (\n
\n \n
\n ) : (\n
\n
\n \n {me?.vendor_contract_accepted_at ? : }\n
\n
\n
\n \n {me?.vendor_contract_accepted_at ? (\n <>\n {`${me.vendor_contract_accepted_by_full_name} (${me.vendor_contract_accepted_by_email}) `}\n {'agreed'}\n {` on ${dayjs(me.vendor_contract_accepted_at).tz('America/Los_Angeles').format('DD MMMM YYYY')}.`}\n \n ) : (\n <>\n {me?.vendor_contract_version == 'Aug 2024 New User'\n ? \"Please review and agree to the Realm's referral agreement and payment terms.\"\n : \"Realm's referral agreement and payment terms have changed. Please review and agree to the updated terms.\"}\n \n )}\n \n {!me?.vendor_contract_accepted_at && me?.vendor_contract_version == 'Aug 2024 Legacy User' && (\n
\n {\n 'For any customers that have you have already scheduled a site visit with, the legacy payment terms will apply.'\n }\n
\n )}\n
\n \n }\n text=\"Realm Vendor Referral Agreement\"\n size=\"s\"\n className=\"tw:border tw:p-2 tw:rounded-lg tw:mb-2\"\n textClassName=\"tw:!text-sm\"\n onClick={handleClickDocument('referral_agreement')}\n />\n \n }\n text=\"Realm Referral Payment Terms\"\n size=\"s\"\n className=\"tw:border tw:p-2 tw:rounded-lg tw:mb-2\"\n textClassName=\"tw:!text-sm\"\n onClick={handleClickDocument('payment_terms')}\n />\n }\n text=\"Realm Vendor Rules of Conduct\"\n size=\"s\"\n className=\"tw:border tw:p-2 tw:rounded-lg\"\n textClassName=\"tw:!text-sm\"\n onClick={handleClickDocument('rules_of_conduct')}\n />\n \n \n \n {contractAcceptedCheck ? (\n \n ) : (\n \n )}\n
\n {\n 'By checking this box, I agree that I have read, understood and agree to be bound by the Realm Referral Program Terms'\n }\n
\n \n {!me?.vendor_contract_accepted_at && (\n \n )}\n {!me?.vendor_contract_accepted_at && (\n
\n \n \n {'Need Help? '}\n \n {\n 'If you have any questions or need clarification on any section of the contract, feel free to contact our support team for assistance at '\n }\n \n \n {'team@realmhome.com'}\n \n \n
\n )}\n
\n
\n \n )}\n \n \n \n \n )\n}\n\nexport default Contract\n","import React, { FC, useCallback, useEffect, useState } from 'react'\nimport { useParams } from 'react-router-dom'\nimport cx from 'classnames'\nimport PageTitle from 'components/PageTitle'\nimport Spinner from 'svgs/spinner'\n\nconst DiscountedMaterials: FC = () => {\n const [iframeLoaded, setIframeLoaded] = useState(false)\n\n const handleIframeLoaded = useCallback(() => {\n setIframeLoaded(true)\n }, [])\n\n const { provider } = useParams<{ provider: 'ge' | 'msi' }>()\n const url =\n provider == 'ge'\n ? 'https://storefronts.sibipro.com/0e4e8cc1-84c8-484a-a9d8-4e209f1e373b'\n : 'https://storefronts.sibipro.com/16e8acde-d06a-4032-8f07-f6ee9024f902'\n\n useEffect(() => {\n setIframeLoaded(false)\n }, [url])\n\n return (\n
\n \n {!iframeLoaded && (\n
\n \n
\n )}\n \n
\n )\n}\n\nexport default DiscountedMaterials\n","import React, { FC } from 'react'\nimport cx from 'classnames'\nimport Check from '@mui/icons-material/Check'\nimport HighlightOff from '@mui/icons-material/HighlightOff'\nimport Pause from '@mui/icons-material/Pause'\nimport { VendorOpportunityDetail } from 'store/vendors/types'\n\ninterface ProjectStatusProps {\n projectStatus: VendorOpportunityDetail['project_status']\n}\n\nconst ProjectStatus: FC = ({ projectStatus }) => {\n return (\n
\n
\n
\n {Object.keys(projectStatus).map((status) => (\n
\n \n {projectStatus[status].status == 'Done' ? (\n \n ) : projectStatus[status].status == 'Closed' ? (\n \n ) : projectStatus[status].status == 'Current' && projectStatus[status].action == 'On hold' ? (\n \n ) : projectStatus[status].status == 'Current' ? (\n
\n ) : null}\n
\n
\n \n {status}\n
\n {projectStatus[status].action == 'On hold' && (\n
\n {'On hold'}\n
\n )}\n
\n
\n ))}\n
\n \n )\n}\n\nexport default ProjectStatus\n","import React, { FC, PropsWithChildren, ReactNode } from 'react'\n\ninterface StatusLayoutProps {\n icon: ReactNode\n title: string\n description: string\n}\n\nconst StatusLayout: FC> = ({ icon, title, description, children }) => {\n return (\n
\n {icon}\n
{title}
\n
{description}
\n {children}\n
\n )\n}\n\nexport default StatusLayout\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst RemoveCircleOutline: FC = ({ className }) => (\n \n \n \n)\n\nexport default RemoveCircleOutline\n","import React, { FC } from 'react'\nimport StatusLayout from './StatusLayout'\nimport RemoveCircleOutline from 'svgs/remove-circle-outline'\n\nconst RejectedStatus: FC = () => {\n return (\n \n \n \n }\n />\n )\n}\n\nexport default RejectedStatus\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst HourglassTop: FC = ({ className }) => (\n \n \n \n)\n\nexport default HourglassTop\n","import React, { FC } from 'react'\n\ninterface MessageProps {\n className?: string\n}\n\nconst Message: FC = ({ className }) => (\n \n \n \n)\n\nexport default Message\n","import React, { FC } from 'react'\n\ninterface SendProps {\n className?: string\n}\n\nconst Send: FC = ({ className }) => (\n \n \n \n)\n\nexport default Send\n","import React, { FC } from 'react'\nimport { VendorSubmittedBid } from 'store/vendors/types'\nimport StatusLayout from './StatusLayout'\nimport HourglassTop from 'svgs/hourglass-top'\nimport MessageIcon from 'svgs/message'\nimport SearchIcon from 'svgs/search'\nimport SendIcon from 'svgs/send'\n\ninterface SubmittedStatusProps {\n submittedBid: VendorSubmittedBid\n}\n\nconst SubmittedStatus: FC = ({ submittedBid }) => {\n return (\n \n \n \n }\n >\n
\n
\n
\n
\n \n
\n
\n
{'Realm team will review the proposals'}
\n
{'1-3 working days'}
\n
\n
\n
\n
\n \n
\n
\n
\n {\"If needed, we we'll request updates or clarifications\"}\n
\n
{'1-3 working days'}
\n
\n
\n
\n
\n \n
\n
{'Proposals are shared with the client'}
\n
\n
\n \n )\n}\n\nexport default SubmittedStatus\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst ThumbUpAlt: FC = ({ className }) => (\n \n \n \n)\n\nexport default ThumbUpAlt\n","import React, { FC } from 'react'\nimport StatusLayout from './StatusLayout'\nimport ThumbUpAltIcon from 'svgs/thumb-up-alt'\n\nconst SelectedStatus: FC = () => {\n return (\n \n \n \n }\n />\n )\n}\n\nexport default SelectedStatus\n","import React, { FC } from 'react'\nimport StatusLayout from './StatusLayout'\nimport SendIcon from 'svgs/send'\n\nconst PublishedStatus: FC = () => {\n return (\n \n \n \n }\n />\n )\n}\n\nexport default PublishedStatus\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Update: FC = ({ className }) => (\n \n \n \n)\n\nexport default Update\n","import React, { FC } from 'react'\nimport StatusLayout from './StatusLayout'\nimport UpdateIcon from 'svgs/update'\n\nconst UpdatesRequestedStatus: FC = () => {\n return (\n \n \n \n }\n />\n )\n}\n\nexport default UpdatesRequestedStatus\n","import React, { FC } from 'react'\nimport StatusLayout from './StatusLayout'\nimport Cancel from '@mui/icons-material/Cancel'\n\nconst RejectedStatus: FC = () => {\n return (\n \n \n \n }\n />\n )\n}\n\nexport default RejectedStatus\n","import React, { FC } from 'react'\nimport { VendorSubmittedBid } from 'store/vendors/types'\nimport RejectedStatus from './statuses/RejectedStatus'\nimport SubmittedStatus from './statuses/SubmittedStatus'\nimport SelectedStatus from './statuses/SelectedStatus'\nimport PublishedStatus from './statuses/PublishedStatus'\nimport UpdatesRequestedStatus from './statuses/UpdatesRequestedStatus'\nimport WithdrawnStatus from './statuses/WithdrawnStatus'\n\ninterface BidStatusProps {\n submittedBid: VendorSubmittedBid\n}\n\nconst BidStatus: FC = ({ submittedBid }) => {\n return {\n ['Submitted']: ,\n ['Published']: ,\n ['Updates Requested']: ,\n ['Accepted']: ,\n ['Rejected']: ,\n ['Withdrawn']: ,\n }[submittedBid.bid_status]\n}\n\nexport default BidStatus\n","import React, { FC, useState, useCallback } from 'react'\nimport { VendorContactUserMe } from 'store/vendors/types'\nimport cx from 'classnames'\nimport Button from 'components/Button2'\n\ninterface VerifyLicenseProps {\n vendorLicense: VendorContactUserMe['vendor_license']\n onClose?: () => void\n onConfirm?: () => void\n}\n\nconst VerifyLicense: FC = ({ vendorLicense, onClose, onConfirm }) => {\n const [licenseEl, setLicenseEl] = useState(null)\n const [smallerFont, setSmallerFont] = useState(false)\n\n // Support changing the size of the text\n // based on how much text we have to show.\n // We only need a \"big\" and a \"small\" here.\n const handleCanvasRef = useCallback(\n (e: HTMLCanvasElement) => {\n if (!window || !licenseEl || !vendorLicense || !e) return\n\n const family = window.getComputedStyle(licenseEl, null).getPropertyValue('font-family')\n const size = window.getComputedStyle(licenseEl, null).getPropertyValue('font-size')\n const weight = window.getComputedStyle(licenseEl, null).getPropertyValue('font-weight')\n const letterSpacing = window.getComputedStyle(licenseEl, null).getPropertyValue('letter-spacing')\n\n const font = `${weight} ${size} ${family}`\n const context = e.getContext('2d')\n\n if (!context) return\n\n context.font = font\n // Doesn't exist in safari, but we'll include it for more\n // accuracy in other browsers.\n ;(context as any).letterSpacing = letterSpacing\n\n const width = context.measureText(vendorLicense.number).width\n const available = licenseEl.offsetWidth\n\n // We want to use a smaller text if it spans more than 2 lines.\n // We discount by 20% in order to compensate for word wrapping.\n setSmallerFont(Math.ceil((width * 1.2) / available) > 2)\n },\n [vendorLicense, licenseEl]\n )\n\n return (\n \n \n
\n {'Please confirm your License No. for this project:'}\n
\n \n {`#${vendorLicense?.number}`}\n \n
{`Last checked: ${vendorLicense?.last_checked_at}`}
\n
\n \n {\"That's correct\"}\n \n \n {\"That's incorrect\"}\n \n
\n \n )\n}\n\nexport default VerifyLicense\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Report: FC = ({ className }) => (\n \n \n \n)\n\nexport default Report\n","import React, { FC } from 'react'\nimport { VendorOpportunityDetail } from 'store/vendors/types'\nimport EmailIcon from 'svgs/email-2'\nimport PhoneIcon from 'svgs/phone'\nimport ReportIcon from 'svgs/report'\n\ninterface UnavailableLicenseProps {\n advisor: VendorOpportunityDetail['advisor']\n}\n\nconst UnavailableLicense: FC = ({ advisor }) => {\n return (\n
\n
\n \n
\n {'Proposal submission unavailable for non-matching licenses'}\n
\n
{`In order to maintain the quality and trustworthiness of our platform, we cannot accept proposals that do not have accurate license information.`}
\n
\n
\n
{'Contact our team for further assistance:'}
\n
\n
\n {advisor.profile_pic_url ? (\n \n ) : (\n
\n {advisor.name\n .split(' ')\n .map((e) => e[0])\n .join('')}\n
\n )}\n
\n
\n
{advisor.name}
\n
{advisor.title}
\n
\n
\n {advisor.normalized_phone_number && advisor.display_phone_number ? (\n \n ) : null}\n {advisor.email ? (\n
\n \n \n {advisor.email}\n \n
\n ) : null}\n
\n
\n )\n}\n\nexport default UnavailableLicense\n","import React, { FC, useState, useCallback } from 'react'\nimport { VendorContactUserMe, VendorOpportunityDetail } from 'store/vendors/types'\nimport BaseModal from 'components/BaseModal'\nimport VerifyLicense from './VerifyLicense'\nimport UnavailableLicense from './UnavailableLicense'\n\ninterface VerifyLicenseModalProps {\n vendorLicense: VendorContactUserMe['vendor_license']\n advisor: VendorOpportunityDetail['advisor']\n open: boolean\n setOpen: (value: boolean) => void\n onConfirm?: () => void\n}\n\nconst VerifyLicenseModal: FC = ({ open, vendorLicense, advisor, setOpen, onConfirm }) => {\n const [denied, setDenied] = useState(false)\n\n const handleVerifyClose = useCallback(() => {\n setDenied(true)\n }, [])\n\n return (\n \n {!vendorLicense || denied ? (\n \n ) : (\n \n )}\n \n )\n}\n\nexport default VerifyLicenseModal\n","import React, { FC, useCallback } from 'react'\nimport { useRecoilValue } from 'recoil'\nimport Close from '@mui/icons-material/Close'\nimport { vendorMeState } from 'store/vendors/state'\nimport BaseModal from 'components/BaseModal'\nimport PaymentIllustration from 'images/vendors/payment_illustration.png'\nimport Flourish from 'svgs/flourish'\n\ntype FlexiblePaymentsModalProps = {\n open: boolean\n setOpen: (open: boolean) => void\n onContinue: () => void\n}\n\nconst FlexiblePaymentsModal: FC = ({ open, setOpen, onContinue }) => {\n const me = useRecoilValue(vendorMeState)\n\n const handleCloseClick = useCallback(() => {\n setOpen(false)\n }, [setOpen])\n\n return (\n \n
\n
{'Select Project Payment Schedule'}
\n \n {'Close modal'}\n \n \n
\n
\n
\n
\n \"\"\n
\n
\n
\n {'Introducing Flexible Payments'}\n
\n
\n {'With Flexible Payments, you can choose your preferred payment schedule for each project.'}\n
\n
\n
\n \n
\n
{'Select a Payment Option when submitting proposals'}
\n
\n {'Payments are generated only when you win a project.'}\n
\n
\n
\n
\n \n
\n
{'Pay Less Early'}
\n
{'Save up to 40% by paying early.'}
\n
\n
\n {!!me?.vendor_allow_pac && (\n
\n \n
\n
{'Pay at Construction'}
\n
\n {'Get up to 270 days to pay if you need more time.'}\n
\n
\n
\n )}\n
\n \n {'Continue'}\n \n
\n
\n )\n}\n\nexport default FlexiblePaymentsModal\n","import React, { FC, useCallback, useMemo } from 'react'\nimport cx from 'classnames'\nimport compact from 'lodash.compact'\nimport Close from '@mui/icons-material/Close'\nimport Info from '@mui/icons-material/Info'\nimport RadioButtonUnchecked from '@mui/icons-material/RadioButtonUnchecked'\nimport CheckCircle from '@mui/icons-material/CheckCircle'\nimport { formatMoneyNoDecimals } from 'utils/formatting'\nimport { VendorContactUserMe } from 'store/vendors/types'\nimport BaseModal from 'components/BaseModal'\n\ntype SelectPaymentMethodModalProps = {\n open: boolean\n setOpen: (open: boolean) => void\n paymentMethod: null | 'Legacy' | 'Design' | 'Insta-Pay' | 'Payment Plan' | 'Pay at Construction'\n setPaymentMethod: (\n paymentMethod: null | 'Legacy' | 'Design' | 'Insta-Pay' | 'Payment Plan' | 'Pay at Construction'\n ) => void\n bidPrice: number | null\n submitting: boolean\n projectType: null | 'Design' | 'Design & Construction' | 'Construction'\n me: VendorContactUserMe\n onConfirm: () => void\n}\n\nconst SelectPaymentMethodModal: FC = ({\n open,\n setOpen,\n paymentMethod,\n setPaymentMethod,\n submitting,\n bidPrice,\n projectType,\n me,\n onConfirm,\n}) => {\n const handleCloseClick = useCallback(() => {\n setOpen(false)\n }, [setOpen])\n\n const handleInstaPayClick = useCallback(() => {\n setPaymentMethod('Insta-Pay')\n }, [setPaymentMethod])\n const handlePaymentPlanClick = useCallback(() => {\n setPaymentMethod('Payment Plan')\n }, [setPaymentMethod])\n const handlePayAtConstructionClick = useCallback(() => {\n setPaymentMethod('Pay at Construction')\n }, [setPaymentMethod])\n const handleLegacyClick = useCallback(() => {\n setPaymentMethod('Legacy')\n }, [setPaymentMethod])\n const handleDesignClick = useCallback(() => {\n setPaymentMethod('Design')\n }, [setPaymentMethod])\n\n const instaPayPrice = useMemo(() => {\n if (!bidPrice) return null\n\n const instaPayRate = me.vendor_insta_pay_rate\n if (!instaPayRate) return null\n\n return Math.round((instaPayRate / 100.0) * bidPrice)\n }, [bidPrice, me.vendor_insta_pay_rate])\n\n const paymentPlanPrice = useMemo(() => {\n if (!bidPrice) return null\n\n const paymentPlanRate = me.vendor_payment_plan_rate\n if (!paymentPlanRate) return null\n\n return Math.round(((paymentPlanRate / 100.0) * bidPrice) / 10.0)\n }, [bidPrice, me.vendor_payment_plan_rate])\n\n const pacPrice = useMemo(() => {\n if (!bidPrice) return null\n\n const pacRate = me.vendor_pay_at_construction_rate\n if (!pacRate) return null\n\n return Math.round((pacRate / 100.0) * bidPrice)\n }, [bidPrice, me.vendor_pay_at_construction_rate])\n\n return (\n \n
\n
{'Select Project Payment Schedule'}
\n \n {'Close modal'}\n \n \n
\n
\n {projectType != 'Design' &&\n compact([me.vendor_insta_pay_rate, me.vendor_payment_plan_rate, me.vendor_pay_at_construction_rate]).length >\n 1 && (\n
\n {\n 'Choose your preferred payment schedule for this project before submitting your bid. Realm offers a range of payment options to suit your needs. Please select the one that best fits this project.'\n }\n
\n )}\n
\n
\n \n
\n {'The selected payment option will only apply if you win the project.'}\n
\n
\n
\n {\n '*Payment amounts are estimates based on your bid. Final amount will be determined by the payment method you choose and the final contract amount at contract signing'\n }\n
\n
\n
{`Select ${projectType} Payment Option`}
\n
\n {projectType != 'Design' && me.vendor_insta_pay_rate && (\n \n {paymentMethod == 'Insta-Pay' ? (\n \n ) : (\n \n )}\n
\n
{'InstaPay'}
\n {instaPayPrice && (\n
\n {formatMoneyNoDecimals(instaPayPrice)}\n {'*'}\n
\n )}\n
\n {'Pay within 72 business hours of signed contract'}\n
\n {`${me.vendor_insta_pay_rate}%`}\n {` of ${projectType} Project Value`}\n
\n
\n \n )}\n {projectType != 'Design' && me.vendor_payment_plan_rate && (\n \n {paymentMethod == 'Payment Plan' ? (\n \n ) : (\n \n )}\n
\n \n {'Payment Plan'}\n
\n {paymentPlanPrice && (\n
\n {formatMoneyNoDecimals(paymentPlanPrice)}\n {'/month*'}\n
\n )}\n
\n

\n {'Pay '}\n {`${me.vendor_payment_plan_rate}%`}\n {` of ${projectType} Project Value`}\n

\n {!me.vendor_allow_capchase && (\n

\n {'Additional information required for approval, contact us at '}\n \n {'vendors@realmhome.com'}\n \n

\n )}\n
\n
\n \n )}\n {projectType != 'Design' && me.vendor_pay_at_construction_rate && (\n \n {paymentMethod == 'Pay at Construction' ? (\n \n ) : (\n \n )}\n
\n
\n {me.vendor_allow_pac\n ? 'Pay at Construction'\n : 'Request Pay at Construction (Realm team will be in touch within 1 business day)'}\n
\n {pacPrice && (\n
\n {formatMoneyNoDecimals(pacPrice)}\n {'*'}\n
\n )}\n
\n {'Pay within 270 days of signed contract or at Construction (whichever comes first)'}\n
\n {`${me.vendor_pay_at_construction_rate}%`}\n {` of ${projectType} Project Value`}\n
\n
\n \n )}\n {projectType != 'Design' &&\n me.vendor_insta_pay_rate == null &&\n me.vendor_payment_plan_rate == null &&\n me.vendor_pay_at_construction_rate == null && (\n \n {paymentMethod == 'Legacy' ? (\n \n ) : (\n \n )}\n
\n
{'Legacy'}
\n
\n {'Due within 30 days from Closed Won'}\n
\n {`4.5%`}\n {` of ${projectType} Project Value`}\n
\n
\n \n )}\n {projectType == 'Design' && (\n \n {paymentMethod == 'Design' ? (\n \n ) : (\n \n )}\n
\n
{'Standard'}
\n
\n {'Due within 30 days from Closed Won'}\n
\n {`10%`}\n {` of ${projectType} Project Value`}\n
\n
\n \n )}\n
\n \n {'Confirm & Submit Proposal'}\n \n \n
\n )\n}\n\nexport default SelectPaymentMethodModal\n","import React, { FC } from 'react'\n\ninterface DocumentFilledProps {\n className?: string\n}\n\nconst DocumentFilled: FC = ({ className }) => {\n return (\n \n \n \n )\n}\n\nexport default DocumentFilled\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst WarningFilled: FC = ({ className }) => (\n \n \n \n)\n\nexport default WarningFilled\n","import React, { ChangeEvent, FC, useCallback } from 'react'\nimport cx from 'classnames'\nimport ArrowDownIcon from 'svgs/dropdown-arrow'\nimport DocumentIcon from 'svgs/file-copy'\nimport RemoveIcon from 'svgs/remove'\nimport WarningFilledIcon from 'svgs/warning-filled'\n\nfunction humanFileSize(size: number) {\n const i = size == 0 ? 0 : Math.floor(Math.log(size) / Math.log(1024))\n return Number((size / Math.pow(1024, i)).toFixed(2)) + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i]\n}\n\ninterface VendorBidFileProps {\n id: string\n filename: string\n filesize: number\n bid_type: null | 'construction' | 'design' | 'design_and_construction'\n url?: string\n\n editable: boolean\n submitting: boolean\n\n onRemove?: (id: string) => void\n onBidTypeChange?: (id: string, bidType: null | 'construction' | 'design' | 'design_and_construction') => void\n}\n\nconst VendorBidFile: FC = ({\n id,\n filename,\n filesize,\n bid_type,\n url,\n editable,\n submitting,\n onRemove,\n onBidTypeChange,\n}) => {\n const handleRemove = useCallback(() => {\n if (submitting) return\n if (onRemove) onRemove(id)\n }, [submitting, onRemove, id])\n\n const handleBidTypeChange = useCallback(\n (e: ChangeEvent) => {\n if (submitting) return\n\n const value =\n ['construction', 'design', 'design_and_construction'].indexOf(e.target.value) != -1\n ? (e.target.value as 'construction' | 'design' | 'design_and_construction')\n : null\n\n if (onBidTypeChange) onBidTypeChange(id, value)\n },\n [submitting, onBidTypeChange, id]\n )\n\n return (\n
  • \n
    \n \n
    \n \n
    \n \n {editable ? : }\n \n \n \n \n {editable && (\n <>\n {!bid_type && (\n \n )}\n \n \n )}\n
    \n {editable && (\n \n )}\n
  • \n )\n}\n\nexport default VendorBidFile\n","import React, { FC } from 'react'\n\ninterface FilesProps {\n className?: string\n}\n\nconst Files: FC = ({ className }) => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n)\n\nexport default Files\n","import React, { FC } from 'react'\n\ninterface WarningProps {\n className?: string\n}\n\nconst Warning: FC = ({ className }) => (\n \n \n \n)\n\nexport default Warning\n","import React, { ChangeEvent, Dispatch, FC, SetStateAction, useCallback } from 'react'\nimport Close from '@mui/icons-material/Close'\nimport BaseModal from 'components/BaseModal'\nimport MaskedInput from 'react-text-mask'\nimport createNumberMask from 'text-mask-addons/dist/createNumberMask'\nimport CoreButton from 'components/Core/CoreButton'\n\ntype SelectBidPriceModalProps = {\n open: boolean\n setOpen: (open: boolean) => void\n bidPrice: number | null\n setBidPrice: Dispatch>\n submitting: boolean\n onContinue: () => void\n}\n\nconst currencyMaskOptions = {\n prefix: '$',\n suffix: '',\n includeThousandsSeparator: true,\n thousandsSeparatorSymbol: ',',\n allowDecimal: false,\n allowNegative: false,\n allowLeadingZeroes: false,\n}\nconst currencyMask = createNumberMask(currencyMaskOptions)\n\nconst SelectBidPriceModal: FC = ({\n open,\n setOpen,\n bidPrice,\n setBidPrice,\n submitting,\n onContinue,\n}) => {\n const handleCloseClick = useCallback(() => {\n setOpen(false)\n }, [setOpen])\n\n const handleChangePrice = useCallback(\n (e: ChangeEvent) => {\n const newVal: string | null = e.target.value.replace(/[$,]/g, '')\n if (newVal === '') setBidPrice(null)\n else setBidPrice(parseInt(newVal))\n },\n [setBidPrice]\n )\n\n return (\n \n
    \n
    {'Proposal Price'}
    \n \n {'Close modal'}\n \n \n
    \n
    \n
    \n {'Please insert the Proposal Price for Project Payment Schedule estimations'}\n
    \n\n
    \n {\n 'Payment amounts are estimates based on your bid. Final amount will be determined by the payment method you choose and the final contract amount at contract signing'\n }\n
    \n \n \n
    \n
    \n )\n}\n\nexport default SelectBidPriceModal\n","import React, { FC, useCallback, useEffect, useRef, useState, useMemo } from 'react'\nimport ReactOnRails from 'react-on-rails'\nimport cx from 'classnames'\nimport { track } from 'utils/analytics'\nimport { VendorContactUserMe, VendorOpportunityDetail, VendorSubmittedBid } from 'store/vendors/types'\nimport VerifyLicenseModal from './VerifyLicenseModal'\nimport FlexiblePaymentsModal from './FlexiblePaymentsModal'\nimport SelectPaymentMethodModal from './SelectPaymentMethodModal'\nimport VendorBidFile from './VendorBidFile'\nimport AddIcon from 'svgs/add'\nimport FilesIcon from 'svgs/files'\nimport SendIcon from 'svgs/send'\nimport WarningIcon from 'svgs/warning'\nimport SelectBidPriceModal from 'pages/Vendor/Project/SelectBidPriceModal'\n\nconst FILE_TYPE_MAP = {\n ['image/jpeg']: 'JPG',\n ['image/png']: 'PNG',\n ['video/mp4']: 'MP4',\n}\nconst DEFAULT_FILE_TYPE = 'This'\n\ninterface BidFile {\n filename: string\n filesize: number\n url?: string\n kind: string\n file: File | null\n bid_type: null | 'construction' | 'design' | 'design_and_construction'\n}\n\ninterface VendorBidFilesProps {\n vendorRelId: string\n me: VendorContactUserMe\n advisor: VendorOpportunityDetail['advisor']\n files: VendorSubmittedBid['files']\n allowSubmit: boolean\n}\n\ntype PaymentMethod = 'Legacy' | 'Design' | 'Insta-Pay' | 'Payment Plan' | 'Pay at Construction'\n\nconst VendorBidFiles: FC = ({ vendorRelId, me, advisor, files: existingFiles, allowSubmit }) => {\n const inputRef = useRef(null)\n const [dragActive, setDragActive] = useState(false)\n const [files, setFiles] = useState>(() => {\n // For now, skip non-bids.\n return existingFiles\n .filter((file) => file.kind == 'bid')\n .reduce>(\n (record, file) => ({\n ...record,\n [`${file.id}`]: {\n filename: file.filename,\n filesize: file.filesize,\n url: file.url,\n kind: file.kind,\n bid_type: file.bid_type as null | 'construction' | 'design' | 'design_and_construction',\n file: null,\n },\n }),\n {}\n )\n })\n const [dataToSubmit, setDataToSubmit] = useState(null)\n const [submitting, setSubmitting] = useState(false)\n const [submissionErrors, setSubmissionErrors] = useState(null)\n const [verifyLicenseModalOpen, setVerifyLicenseModalOpen] = useState(false)\n const [flexiblePaymentsIntroModalOpen, setFlexiblePaymentsIntroModalOpen] = useState(false)\n const [selectBidPriceModalOpen, setSelectBidPriceModalOpen] = useState(false)\n const [selectPaymentMethodModalOpen, setSelectPaymentMethodModalOpen] = useState(false)\n const [paymentMethod, setPaymentMethod] = useState(null)\n const [bidPrice, setBidPrice] = useState(null)\n\n const projectType = useMemo(() => {\n const bidTypes = Object.values(files).map((e) => e.bid_type)\n if (\n bidTypes.includes('design_and_construction') ||\n (bidTypes.includes('construction') && bidTypes.includes('design'))\n ) {\n return 'Design & Construction'\n } else if (bidTypes.includes('construction')) {\n return 'Construction'\n } else if (bidTypes.includes('design')) {\n return 'Design'\n }\n return null\n }, [files])\n\n const handleDrag = useCallback((event) => {\n event.preventDefault()\n event.stopPropagation()\n if (event.type === 'dragenter' || event.type === 'dragover') {\n setDragActive(true)\n } else if (event.type === 'dragleave') {\n setDragActive(false)\n }\n }, [])\n\n const handleDrop = useCallback((event) => {\n event.preventDefault()\n event.stopPropagation()\n setDragActive(false)\n if ((event.dataTransfer.files?.length || 0) == 0) return\n setFiles((oldFiles) => {\n const oldFiles2 = Array.from(event.dataTransfer.files) as File[]\n return oldFiles2.reduce(\n (a, e) => {\n a[crypto.randomUUID()] = {\n filename: e.name,\n filesize: e.size,\n kind: 'bid',\n file: e,\n bid_type: null,\n }\n return a\n },\n { ...oldFiles }\n )\n })\n }, [])\n\n const handleChange = useCallback((event) => {\n event.preventDefault()\n if ((event.target.files?.length || 0) == 0) return\n setFiles((oldFiles) => {\n const oldFiles2 = Array.from(event.target.files) as File[]\n return oldFiles2.reduce(\n (a, e) => {\n a[crypto.randomUUID()] = {\n filename: e.name,\n filesize: e.size,\n kind: 'bid',\n file: e,\n bid_type: null,\n }\n return a\n },\n { ...oldFiles }\n )\n })\n }, [])\n\n const handleButtonClick = useCallback(() => {\n if (!inputRef.current) return\n\n inputRef.current.click()\n }, [])\n\n const handleRemove = useCallback((uuid) => {\n setFiles((oldFiles) => {\n const { [uuid]: _, ...newFiles } = oldFiles\n return newFiles\n })\n }, [])\n\n const handleBidTypeChange = useCallback((uuid, bidType) => {\n setFiles((oldFiles) => {\n const updatedFile = { ...oldFiles[uuid], bid_type: bidType }\n return { ...oldFiles, [uuid]: updatedFile }\n })\n }, [])\n\n const handleSubmitInner = useCallback(\n (paymentMethodOveride?: PaymentMethod) => {\n const paymentMethodToUse = paymentMethodOveride || paymentMethod\n\n if (submitting || paymentMethodToUse == null) return\n\n const newDataToSubmit = new FormData()\n Object.keys(files).forEach((e, i) => {\n // If there is no 'file' then it is an old, preexisting upload\n // and we should skip it.\n // We don't allow updating existing files at the moment.\n if (!files[e].file) return\n\n newDataToSubmit.append(`property_plan[property_plan_files][${i}][kind]`, 'bid')\n newDataToSubmit.append(`property_plan[property_plan_files][${i}][file]`, files[e].file as File)\n newDataToSubmit.append(`property_plan[property_plan_files][${i}][bid_type]`, files[e].bid_type as string)\n newDataToSubmit.append(`property_plan[property_plan_files][${i}][price]`, bidPrice?.toString() || '')\n })\n newDataToSubmit.append('property_plan[payment_method]', paymentMethodToUse)\n setDataToSubmit(newDataToSubmit)\n },\n [files, paymentMethod, submitting, bidPrice]\n )\n\n const handleConfirmPaymentMethod = useCallback(() => {\n handleSubmitInner()\n setSelectPaymentMethodModalOpen(false)\n }, [handleSubmitInner])\n\n const handleSubmit = useCallback(() => {\n if (submitting) return\n\n const bidTypes = Object.values(files).map((e) => e.bid_type)\n if (!me.vendor_contract_version || me.vendor_contract_version == 'Legacy' || !me.vendor_contract_presented_at) {\n handleSubmitInner('Legacy')\n } else if (\n (bidTypes.includes('construction') || bidTypes.includes('design_and_construction')) &&\n localStorage.getItem('shown-flexible-payments-intro') == null\n ) {\n localStorage.setItem('shown-flexible-payments-intro', 'true')\n setFlexiblePaymentsIntroModalOpen(true)\n } else {\n setSelectBidPriceModalOpen(true)\n }\n }, [files, submitting, me.vendor_contract_version, me.vendor_contract_presented_at, handleSubmitInner])\n\n useEffect(() => {\n if (!dataToSubmit) return\n\n const controller = new AbortController()\n const _ = async () => {\n const headers = ReactOnRails.authenticityHeaders({ Accept: 'application/json' })\n setSubmitting(true)\n try {\n setTimeout(() => controller.abort(), 30000)\n const response = await fetch(`/vendors/api/opportunities/${vendorRelId}/upload_bid`, {\n method: 'post',\n signal: controller.signal,\n headers,\n body: dataToSubmit,\n })\n if (response.ok) {\n track('upload bid')\n window.location.reload()\n } else {\n const json = await response.json()\n setSubmissionErrors(json.errors)\n setDataToSubmit(null)\n setSubmitting(false)\n }\n } catch (e) {\n setSubmissionErrors('There was a problem uploading your file(s). Please try again')\n setDataToSubmit(null)\n setSubmitting(false)\n }\n }\n _()\n return () => {\n controller.abort()\n setSubmitting(false)\n }\n }, [dataToSubmit, vendorRelId])\n\n const [touchDevice, setTouchDevice] = useState(null)\n useEffect(() => {\n setTouchDevice('ontouchstart' in window)\n }, [])\n\n const handleIntroContinue = useCallback(() => {\n setFlexiblePaymentsIntroModalOpen(false)\n setSelectBidPriceModalOpen(true)\n }, [])\n\n const handleSelectPriceContinue = useCallback(() => {\n setSelectBidPriceModalOpen(false)\n setSelectPaymentMethodModalOpen(true)\n }, [])\n\n const handleConfirmVerification = useCallback(() => {\n handleSubmit()\n setVerifyLicenseModalOpen(false)\n }, [handleSubmit])\n\n const handleAttemptSubmit = useCallback(\n (event) => {\n event.preventDefault()\n if (submitting) return\n // Attempting to submit should clear any submission errors.\n // Doing this before the verification seems correct.\n setSubmissionErrors(null)\n const licenseRequired = Object.values(files).some((x) => x.bid_type != 'design')\n\n licenseRequired ? setVerifyLicenseModalOpen(true) : handleConfirmVerification()\n },\n [submitting, files, handleConfirmVerification]\n )\n\n const newFiles = useMemo(() => {\n return Object.entries(files)\n .map(([_, file]) => file)\n .filter((file) => !!file.file)\n }, [files])\n\n // Validation errors\n const validationErrors = useMemo(() => {\n // Build a list of validation errors that stop the user from submitting.\n // Submission errors don't count because they shouldn't stop the user from\n // submitting.\n const errors: string[] = []\n\n newFiles.forEach((file) => {\n if (file.filesize > 1024 * 1024 * 25) {\n const extension = (file.file ? FILE_TYPE_MAP[file.file.type] : DEFAULT_FILE_TYPE) || DEFAULT_FILE_TYPE\n errors.push(\n `${file.filename} - ${extension} format is not supported for a Proposal. Please upload a PDF, DOC, CSV or XLS file`\n )\n }\n })\n\n newFiles.forEach((file) => {\n if (file.filesize > 1024 * 1024 * 25) {\n errors.push(`${file.filename} is too large. maximum file size is 125MB`)\n }\n })\n\n if (newFiles.some((file) => !file.bid_type)) {\n errors.push('Select Proposal Type to submit your Opportunity Proposals')\n }\n\n return errors\n }, [newFiles])\n\n // All errors (for display)\n const errors = useMemo(() => {\n const errors: string[] = []\n\n if (validationErrors.length > 0) errors.push(...validationErrors)\n\n if (submissionErrors) errors.push(submissionErrors)\n\n return errors\n }, [validationErrors, submissionErrors])\n\n const disabled = validationErrors.length > 0 || newFiles.length == 0\n\n return (\n
    \n
    \n {Object.keys(files).length == 0 &&
    {'You haven’t uploaded any files yet'}
    }\n
    \n {allowSubmit && (\n
    \n \n
    \n \n {dragActive && (\n \n )}\n \n )}\n
    \n {Object.keys(files).length > 0 && (\n <>\n
      \n {Object.keys(files).map((id) => (\n \n ))}\n
    \n {errors.length > 0 &&\n errors.map((error) => (\n \n \n
    {error}
    \n
    \n ))}\n {allowSubmit && (\n \n {submitting ? (\n \n \n \n \n ) : (\n <>\n \n \n )}\n
    {'Submit proposal'}
    \n \n )}\n \n )}\n \n \n \n \n \n \n )\n}\n\nexport default VendorBidFiles\n","import React, { FC, useCallback } from 'react'\nimport Close from '@mui/icons-material/Close'\nimport Email from '@mui/icons-material/Email'\nimport Phone from '@mui/icons-material/Phone'\nimport { track } from 'utils/analytics'\nimport { getInitials } from 'utils/formatting'\nimport { VendorOpportunityDetail } from 'store/vendors/types'\nimport BaseModal from 'components/BaseModal'\n\ninterface PointOfContactProps {\n advisor: VendorOpportunityDetail['advisor']\n open: boolean\n setOpen: (value: boolean) => void\n}\n\nconst PointOfContact: FC = ({ advisor, open, setOpen }) => {\n const handleCloseClick = useCallback(() => {\n track('click', { code: 'close', feature: 'PointOfContactModal' })\n setOpen(false)\n }, [setOpen])\n\n return (\n \n
    \n

    {'Realm Point of Contact'}

    \n \n {'Close sidebar'}\n \n \n
    \n
    \n {advisor.profile_pic_url ? (\n {advisor.title}\n ) : (\n
    \n {getInitials(advisor.name)}\n
    \n )}\n
    \n
    {advisor.name}
    \n
    {advisor.title}
    \n
    \n
    \n {advisor.normalized_phone_number && advisor.display_phone_number ? (\n \n ) : null}\n {advisor.email ? (\n
    \n \n \n {advisor.email}\n \n
    \n ) : null}\n
    \n )\n}\n\nexport default PointOfContact\n","import React, { FC, useCallback } from 'react'\nimport Close from '@mui/icons-material/Close'\nimport { track } from 'utils/analytics'\nimport { VendorOpportunityDetail } from 'store/vendors/types'\nimport ProjectStatus from 'pages/Vendor/Project/ProjectStatus'\nimport BaseModal from 'components/BaseModal'\nimport CoreButton from 'components/Core/CoreButton'\n\ninterface ProjectStatusModalProps {\n opportunity: VendorOpportunityDetail\n open: boolean\n setOpen: (value: boolean) => void\n openWithdrawModal: () => void\n}\n\nconst ProjectStatusModal: FC = ({ opportunity, open, setOpen, openWithdrawModal }) => {\n const handleCloseClick = useCallback(() => {\n track('click', { code: 'close', feature: 'ProjectStatusModal' })\n setOpen(false)\n }, [setOpen])\n\n return (\n \n
    \n

    {'Project Progress'}

    \n \n {'Close modal'}\n \n \n
    \n \n {!['Awarded', 'Archived'].includes(opportunity.group || '') && opportunity.current_status != 'Invoice' && (\n \n )}\n
    \n )\n}\n\nexport default ProjectStatusModal\n","import React, { FC, FormEvent, useCallback, useState } from 'react'\nimport Close from '@mui/icons-material/Close'\nimport { VendorOpportunityDetail } from 'store/vendors/types'\nimport { useDeclineVendorOpportunity } from 'store/vendors/hooks'\nimport BaseModal from 'components/BaseModal'\nimport CoreButton from 'components/Core/CoreButton'\n\ninterface WithdrawModalProps {\n opportunity: VendorOpportunityDetail\n open: boolean\n setOpen: (value: boolean) => void\n setFetching: (value: boolean) => void\n}\n\nconst WithdrawModal: FC = ({ opportunity, open, setOpen, setFetching }) => {\n const [error, setError] = useState(false)\n const handleComplete = useCallback(\n (response: Response) => {\n if (response.ok) {\n setOpen(false)\n setFetching(true)\n } else {\n setError(true)\n }\n },\n [setFetching, setOpen]\n )\n const [formData, setFormData] = useState(null)\n useDeclineVendorOpportunity(opportunity.id, formData, setFormData, handleComplete)\n\n const handleCloseClick = useCallback(() => {\n setOpen(false)\n }, [setOpen])\n\n const handleSetOpen = useCallback(\n (value: boolean) => {\n if (!formData) setOpen(value)\n },\n [formData, setOpen]\n )\n\n const handleSubmit = useCallback((event: FormEvent) => {\n event.preventDefault()\n\n setError(false)\n setFormData(new FormData(event.target as HTMLFormElement))\n }, [])\n\n const address = [\n opportunity.property.address_line_1,\n opportunity.property.address_city,\n opportunity.property.address_state,\n opportunity.property.address_zip,\n ].join(', ')\n\n return (\n \n
    \n

    {'Withdraw from Project'}

    \n \n {'Close modal'}\n \n \n
    \n
    \n
    {`What is the reason for withdrawing from ${address}?`}
    \n \n {error &&
    {'An error has occurred, please contact us.'}
    }\n
    \n \n \n
    \n \n
    \n )\n}\n\nexport default WithdrawModal\n","import React, { FC } from 'react'\nimport cx from 'classnames'\nimport dayjs from 'dayjs'\nimport CalendarToday from '@mui/icons-material/CalendarToday'\n\ninterface DatePickerButtonProps {\n className?: string\n value?: Date\n onClick?: () => void\n showTime?: boolean\n}\n\nconst DatePickerButton: FC = ({ className, onClick, value, showTime }) => {\n const format = `D MMM YYYY${showTime ? ' [at] hh:mm A' : ''}`\n\n return (\n \n
    {value ? dayjs(value).format(format) : 'Select date'}
    \n \n \n )\n}\n\nexport default DatePickerButton\n","import dayjs from 'dayjs'\nimport React, { ChangeEvent, Dispatch, FC, SetStateAction, useCallback } from 'react'\n\ninterface TimePickerProps {\n date?: Date\n setDate: Dispatch>\n}\n\nconst TimePicker: FC = ({ date = new Date(), setDate }) => {\n const localDate = dayjs(date).local()\n\n const handleChangeHour = useCallback(\n (e: ChangeEvent) => {\n const hour = parseInt(e.target.value)\n const newDate = localDate.hour(hour).toDate()\n setDate(newDate)\n },\n [localDate, setDate]\n )\n\n const handleChangeMinute = useCallback(\n (e: ChangeEvent) => {\n const minute = parseInt(e.target.value)\n const newDate = localDate.minute(minute).toDate()\n setDate(newDate)\n },\n [localDate, setDate]\n )\n\n const handleChangePeriod = useCallback(\n (e: ChangeEvent) => {\n const period = e.target.value\n const newDate = localDate.hour(period === 'AM' ? localDate.hour() % 12 : (localDate.hour() % 12) + 12).toDate()\n setDate(newDate)\n },\n [localDate, setDate]\n )\n\n return (\n
    \n
    {`${dayjs(date).local().format('ddd, D MMM YYYY')} at `}
    \n \n {':'}\n \n \n \n \n \n
    \n )\n}\n\nexport default TimePicker\n","import Info from '@mui/icons-material/Info'\nimport CoreButton from 'components/Core/CoreButton'\nimport dayjs from 'dayjs'\nimport CalendarControl, { CalendarMarks } from 'pages/_serverRendered/VendorSiteVisit/Availabilities/Calendar'\nimport React, { CSSProperties, Dispatch, ForwardRefRenderFunction, SetStateAction, forwardRef, useMemo } from 'react'\nimport cx from 'classnames'\nimport TimePicker from 'pages/Vendor/Project/ExtensionModal/components/DatePicker/TimePicker'\n\ninterface DatePickerCalendarProps {\n date?: Date\n setDate: Dispatch>\n style?: CSSProperties\n onDone: () => void\n marks?: CalendarMarks\n darkenMonth?: boolean\n note?: string\n timezone?: string\n pickTime?: boolean\n className?: string\n}\n\nconst DatePickerCalendar: ForwardRefRenderFunction = (\n { date, setDate, style, onDone, note, marks: marksProp, darkenMonth, timezone, pickTime, className },\n ref\n) => {\n const marks = useMemo(() => {\n const darkMarks: CalendarMarks = {}\n\n if (darkenMonth) {\n let cursor = dayjs(date).startOf('month')\n while (cursor <= dayjs(date).endOf('month')) {\n darkMarks[cursor.toDate().getTime()] = 'dark'\n cursor = cursor.add(1, 'day')\n }\n }\n\n return { ...darkMarks, ...marksProp }\n }, [date, darkenMonth, marksProp])\n\n return (\n
    \n \n {note && (\n
    \n \n
    {note}
    \n
    \n )}\n {pickTime && }\n
    \n \n \n
    \n
    \n )\n}\n\nexport default forwardRef(DatePickerCalendar)\n","import React, { FC, useCallback, useState } from 'react'\n\nimport dayjs from 'dayjs'\nimport timezone from 'dayjs/plugin/timezone'\nimport BaseModal from 'components/BaseModal'\nimport { FloatingPortal, offset, useClick, useDismiss, useFloating, useInteractions } from '@floating-ui/react'\nimport type { ElementProps } from '@floating-ui/react'\nimport Button from 'pages/Vendor/Project/ExtensionModal/components/DatePicker/Button'\nimport Calendar from 'pages/Vendor/Project/ExtensionModal/components/DatePicker/Calendar'\nimport { CalendarMarks } from 'pages/_serverRendered/VendorSiteVisit/Availabilities/Calendar'\n\ndayjs.extend(timezone)\n\ninterface DatePickerProps {\n value?: Date\n name?: string\n onChange: (date: Date) => void\n note?: string\n marks?: CalendarMarks\n darkenMonth?: boolean\n timezone?: string\n pickTime?: boolean\n}\n\nconst DatePicker: FC = ({ value, name, onChange, pickTime, ...rest }) => {\n const [modalOpen, setModalOpen] = useState(false)\n const [popoverOpen, setPopoverOpen] = useState(false)\n\n const handleOpenModal = useCallback(() => {\n setModalOpen(true)\n }, [setModalOpen])\n\n const handleCloseModal = useCallback(() => {\n setModalOpen(false)\n }, [])\n\n const handleOpenPopover = useCallback(() => {\n setPopoverOpen(true)\n }, [])\n\n const handleClosePopover = useCallback(() => {\n setPopoverOpen(false)\n }, [])\n\n const { context, x, y, refs, strategy } = useFloating({\n open: popoverOpen,\n onOpenChange: setPopoverOpen,\n placement: 'bottom-end',\n middleware: [\n offset(({ rects }) => {\n return {\n mainAxis: -(rects.reference.height + rects.floating.height / 4),\n crossAxis: rects.floating.width / 2,\n }\n }),\n ],\n })\n\n const clickHook = useClick(context)\n const interactions = [clickHook, useDismiss(context)].filter((e) => e) as ElementProps[]\n\n const { getReferenceProps, getFloatingProps } = useInteractions(interactions)\n\n const overlayStyle = {\n zIndex: 50,\n position: strategy,\n top: y ?? '',\n left: x ?? '',\n }\n\n return (\n <>\n \n
    \n
    \n
    \n
    \n \n \n \n \n {popoverOpen && (\n \n )}\n \n \n )\n}\n\nexport default DatePicker\n","import React, { FC, useCallback, useEffect, useMemo } from 'react'\nimport { useHistory, useParams } from 'react-router-dom'\nimport dayjs from 'dayjs'\nimport { useRecoilState, useRecoilValue } from 'recoil'\nimport RadioButtonUnchecked from '@mui/icons-material/RadioButtonUnchecked'\nimport CheckCircle from '@mui/icons-material/CheckCircle'\nimport {\n extensionExtensionDateSelector,\n extensionExtensionReasonSelector,\n extensionFollowupDateSelector,\n extensionModalState,\n extensionNeedMoreThanAWeekSelector,\n extensionAdditionalDetailsSelector,\n vendorOpportunityDetailState,\n} from 'store/vendors/state'\nimport DatePicker from 'pages/Vendor/Project/ExtensionModal/components/DatePicker'\nimport CoreButton from 'components/Core/CoreButton'\nimport CoreInput from 'components/Core/CoreInput'\nimport { setMark } from 'pages/_serverRendered/VendorSiteVisit/Availabilities/Calendar'\n\nconst PickExtensionDate: FC = () => {\n const { id } = useParams<{ id: string }>()\n const opportunity = useRecoilValue(vendorOpportunityDetailState(id))\n const extensionReason = useRecoilValue(extensionExtensionReasonSelector)\n const [extensionDate, setExtensionDate] = useRecoilState(extensionExtensionDateSelector)\n const secondSiteVisitDate = useRecoilValue(extensionFollowupDateSelector)\n const [additionalDetails, setAdditionalDetails] = useRecoilState(extensionAdditionalDetailsSelector)\n const [needMoreThanAWeek, setNeedMoreThanAWeek] = useRecoilState(extensionNeedMoreThanAWeekSelector)\n const modalState = useRecoilValue(extensionModalState)\n const history = useHistory()\n\n const toggleNeedMoreThanAWeek = useCallback(() => setNeedMoreThanAWeek((val) => !val), [setNeedMoreThanAWeek])\n\n const originalDueDate = opportunity?.bid_due_ts\n const originalDuePacific = dayjs(originalDueDate).tz('America/Los_Angeles')\n const nowPacific = dayjs().tz('America/Los_Angeles')\n const overAWeekPastDue = originalDuePacific.add(7, 'days') < nowPacific\n\n const needsAdditionalDetails = useMemo(() => {\n return extensionReason == 'other' || needMoreThanAWeek\n }, [extensionReason, needMoreThanAWeek])\n\n const valid = useMemo(() => {\n if (!extensionDate) return false\n if (needsAdditionalDetails && !(additionalDetails && additionalDetails.length > 10)) return false\n\n return true\n }, [extensionDate, needsAdditionalDetails, additionalDetails])\n\n const calendarMarks = useMemo(() => {\n let marks = setMark({}, originalDuePacific, 'default')\n\n const startDate = overAWeekPastDue ? nowPacific : originalDuePacific.add(1, 'day')\n const endDate = startDate.add(6, 'day')\n for (let cursor = startDate; cursor <= endDate; cursor = cursor.add(1, 'day')) {\n marks = setMark(marks, cursor, 'dark')\n }\n\n return marks\n }, [originalDuePacific, nowPacific, overAWeekPastDue])\n\n useEffect(() => {\n if (overAWeekPastDue) setNeedMoreThanAWeek(true)\n }, [overAWeekPastDue, needMoreThanAWeek, setNeedMoreThanAWeek])\n\n useEffect(() => {\n if (secondSiteVisitDate) setExtensionDate(dayjs(secondSiteVisitDate).add(7, 'days').toDate())\n }, [secondSiteVisitDate, setExtensionDate])\n\n const handleDateChange = useCallback(\n (date: Date) => {\n if (dayjs(date) <= nowPacific) return // must be in the future\n if (dayjs(date) < originalDuePacific) return // must be after original due date\n if (dayjs(date) > originalDuePacific.add(7, 'days') && !needMoreThanAWeek) return // can't be more than a week out unless override\n\n setExtensionDate(date)\n },\n [originalDuePacific, nowPacific, needMoreThanAWeek, setExtensionDate]\n )\n\n useEffect(() => {\n if (modalState == 'success') history.push(`/vendors/projects/${id}`)\n }, [modalState, history, id])\n\n return (\n
    \n

    {'Select a new proposal submission date'}

    \n

    \n {'Please indicate by when you will be able to submit your proposal. '}\n {overAWeekPastDue\n ? 'Your proposal is already more than 7 days past due.'\n : 'Note that this date must be no later than 7 days from the original due date.'}\n

    \n \n {!overAWeekPastDue && (\n \n {needMoreThanAWeek ? : }\n
    {'I need more than 7 days extension'}
    \n \n )}\n

    \n {'Provide additional details for the extension '}\n {!needMoreThanAWeek && {'(Optional)'}}\n

    \n \n \n
    \n )\n}\n\nexport default PickExtensionDate\n","import React, { FC, useCallback } from 'react'\nimport { useHistory, useParams } from 'react-router-dom'\nimport { useRecoilValue } from 'recoil'\nimport cx from 'classnames'\nimport Info from '@mui/icons-material/Info'\nimport { extensionExtensionReasonSelector, vendorOpportunityDetailState } from 'store/vendors/state'\nimport CoreButton from 'components/Core/CoreButton'\n\ninterface ExtensionRequestedProps {\n className?: string\n}\n\nconst ExtensionRequested: FC = ({ className }) => {\n const { id } = useParams<{ id: string }>()\n const opportunity = useRecoilValue(vendorOpportunityDetailState(id))\n const history = useHistory()\n const extensionReason = useRecoilValue(extensionExtensionReasonSelector)\n\n const handleClickContinue = useCallback(() => {\n history.push(`/vendors/projects/${id}`)\n }, [history, id])\n\n if (!opportunity) return null\n\n return (\n
    \n

    \n {'Extension requested'}\n {(extensionReason == 'scope-undefined' || extensionReason == 'unrealistic-budget') &&\n ' to clarify further details'}\n

    \n
    \n \n

    \n {`Your Project Ops. Manager ${opportunity.advisor.name} will be notified and will reach out to assist \n ${\n extensionReason == 'scope-undefined' || extensionReason == 'unrealistic-budget'\n ? 'with next steps.'\n : 'with scheduling shortly. For reference, the clients contact information is on the project page.'\n }`}\n

    \n
    \n \n
    \n )\n}\n\nexport default ExtensionRequested\n","import React, { FC, PropsWithChildren } from 'react'\nimport cx from 'classnames'\nimport CoreText from 'components/Core/CoreText'\nimport Info from '@mui/icons-material/Info'\nimport CoreButton from 'components/Core/CoreButton'\n\nexport interface BaseScreenProps extends PropsWithChildren {\n className?: string\n title: string\n subtitle?: string\n alert?: { type: 'info' | 'success' | 'warning' | 'error'; message: string; position?: 'top' | 'bottom' }\n button: { text: string; onClick?: () => void; type?: 'button' | 'submit' | 'reset' }\n valid?: boolean\n}\n\nconst BaseScreen: FC = ({ className, title, subtitle, alert, button, children, valid = true }) => {\n const bgColor =\n alert &&\n { info: 'tw:bg-blue-100', success: 'tw:bg-green-100', warning: 'tw:bg-yellow-100', error: 'tw:bg-red-100' }[\n alert.type\n ]\n const textColor1 =\n alert &&\n {\n info: 'tw:text-blue-1000',\n success: 'tw:text-green-1000',\n warning: 'tw:text-yellow-1000',\n error: 'tw:text-red-1000',\n }[alert.type]\n const textColor2 =\n alert &&\n {\n info: 'tw:!text-blue-600',\n success: 'tw:!text-green-600',\n warning: 'tw:!text-yellow-600',\n error: 'tw:!text-red-600',\n }[alert.type]\n const Alert = alert && (\n
    \n \n
    {alert.message}
    \n
    \n )\n\n return (\n
    \n {alert?.position == 'top' && Alert}\n {subtitle ? (\n
    \n

    {title}

    \n

    {subtitle}

    \n
    \n ) : (\n \n {title}\n \n )}\n {children}\n {alert?.position == 'bottom' && Alert}\n \n
    \n )\n}\n\nexport default BaseScreen\n","import CoreList from 'components/Core/CoreList'\nimport React, { useCallback, useEffect, useState } from 'react'\nimport cx from 'classnames'\nimport CheckCircle from '@mui/icons-material/CheckCircle'\nimport RadioButtonUnchecked from '@mui/icons-material/RadioButtonUnchecked'\nimport BaseScreen, { BaseScreenProps } from 'pages/Vendor/Project/ExtensionModal/components/BaseScreen'\n\ninterface Option {\n key: T\n name: string\n}\n\nexport interface SelectScreenProps extends Omit {\n value?: T\n onChange?: (value?: T) => void\n options: Option[]\n}\n\nfunction SelectScreen({\n value: valueProp,\n onChange,\n options,\n ...rest\n}: SelectScreenProps): React.ReactElement {\n const [value, setValue] = useState(valueProp)\n\n const handleClickOption = useCallback((key: T) => () => setValue(key), [])\n\n useEffect(() => {\n if (onChange) onChange(value)\n }, [value, onChange])\n\n useEffect(() => {\n setValue(valueProp)\n }, [valueProp])\n\n return (\n \n \n {options.map((option) => {\n const selected = value == option.key\n return (\n : }\n onClick={handleClickOption(option.key)}\n />\n )\n })}\n \n \n )\n}\n\nexport default SelectScreen\n","import React, { FC, useCallback } from 'react'\nimport { useParams } from 'react-router-dom'\nimport dayjs from 'dayjs'\nimport { useRecoilState, useRecoilValue } from 'recoil'\nimport { track } from 'utils/analytics'\nimport { ExtensionModalScreen, ExtensionReason } from 'store/vendors/types'\nimport { extensionExtensionReasonSelector, vendorOpportunityDetailState } from 'store/vendors/state'\nimport { useExtensionModalNavigate } from 'store/vendors/hooks'\nimport SelectScreen from 'pages/Vendor/Project/ExtensionModal/components/SelectScreen'\n\nconst PickExtensionReason: FC = () => {\n const { id } = useParams<{ id: string }>()\n const opportunity = useRecoilValue(vendorOpportunityDetailState(id))\n const [reason, setReason] = useRecoilState(extensionExtensionReasonSelector)\n const navigate = useExtensionModalNavigate()\n\n const handleContinueClick = useCallback(() => {\n if (!reason) return\n\n track('click', { code: 'continue', feature: reason })\n\n const nextScreen = (\n {\n 'site-visit-did-not-happen': 'confirm-rescheduled',\n 'need-another-meeting': 'pick-followup-reason',\n 'need-more-time': 'pick-more-time-reason',\n 'scope-undefined': 'confirm-scope',\n 'unrealistic-budget': 'confirm-budget',\n other: 'pick-extension-date',\n } as { [key in ExtensionReason]: ExtensionModalScreen }\n )[reason]\n navigate(nextScreen)\n }, [reason, navigate])\n\n if (!opportunity) return null\n\n return (\n \n value={reason}\n onChange={setReason}\n title={`Why can't you submit the proposal by ${dayjs(opportunity.bid_due_ts).format('DD MMM YYYY')}`}\n alert={{\n type: 'warning',\n message:\n 'This feature is intended for legitimate schedule adjustments. Frequent or unjustified requests may be subject to review and could impact your standing on our platform/network. Please use responsibly.',\n }}\n options={[\n { key: 'site-visit-did-not-happen', name: 'Site visit did not happen' },\n {\n key: 'need-another-meeting',\n name: 'I need a follow up site visit or meeting with the client',\n },\n { key: 'need-more-time', name: 'I need more time for preparing the proposal' },\n {\n key: 'scope-undefined',\n name: 'Scope undefined',\n },\n {\n key: 'unrealistic-budget',\n name: 'Unrealistic budget',\n },\n { key: 'other', name: 'Other' },\n ]}\n button={{ text: 'Continue', onClick: handleContinueClick }}\n />\n )\n}\n\nexport default PickExtensionReason\n","import React, { FC, useCallback } from 'react'\n\nimport SelectScreen, { SelectScreenProps } from 'pages/Vendor/Project/ExtensionModal/components/SelectScreen'\n\ntype ConfirmScreenProps = Omit, 'value' | 'onChange' | 'options'> & {\n value?: boolean\n onChange?: (value?: boolean) => void\n}\n\nconst ConfirmScreen: FC = ({ value: valueProp, onChange: onChangeProp, ...rest }) => {\n const value = valueProp?.toString()\n const onChange = useCallback(\n (value?: string) => {\n if (!onChangeProp) return\n\n onChangeProp(value === 'true' ? true : value === 'false' ? false : undefined)\n },\n [onChangeProp]\n )\n\n return (\n ({ key: x.toString(), name: x ? 'Yes' : 'No' }))}\n />\n )\n}\n\nexport default ConfirmScreen\n","import React, { FC, useCallback } from 'react'\nimport { useRecoilState } from 'recoil'\nimport { extensionSiteVisitRescheduledSelector } from 'store/vendors/state'\nimport { useExtensionModalNavigate } from 'store/vendors/hooks'\nimport ConfirmScreen from 'pages/Vendor/Project/ExtensionModal/components/ConfirmScreen'\n\nconst ConfirmRescheduled: FC = () => {\n const [wasRescheduled, setWasRescheduled] = useRecoilState(extensionSiteVisitRescheduledSelector)\n const navigate = useExtensionModalNavigate()\n\n const handleContinueClick = useCallback(() => {\n navigate(wasRescheduled ? 'pick-rescheduled-date' : 'assistance-for-rescheduled')\n }, [wasRescheduled, navigate])\n\n return (\n \n )\n}\n\nexport default ConfirmRescheduled\n","import React, { FC, useEffect, useMemo, useState } from 'react'\nimport { setMark } from 'pages/_serverRendered/VendorSiteVisit/Availabilities/Calendar'\nimport DatePicker from 'pages/Vendor/Project/ExtensionModal/components/DatePicker'\nimport dayjs from 'dayjs'\nimport timezone from 'dayjs/plugin/timezone'\nimport utc from 'dayjs/plugin/utc'\nimport BaseScreen, { BaseScreenProps } from 'pages/Vendor/Project/ExtensionModal/components/BaseScreen'\n\n// Extend dayjs with the plugins\ndayjs.extend(utc)\ndayjs.extend(timezone)\n\nexport interface PickDateScreenProps extends Omit {\n value?: Date\n onChange?: (value?: Date) => void\n calendarNote?: string\n isValid?: (value?: Date) => boolean\n pickTime?: boolean\n}\n\nconst PickDateScreen: FC = ({\n value: valueProp,\n onChange,\n calendarNote,\n isValid,\n pickTime,\n ...rest\n}) => {\n const timezone = pickTime ? dayjs().format('Z') : 'America/Los_Angeles'\n const [value, setValue] = useState(valueProp)\n\n useEffect(() => {\n if (onChange) onChange(value)\n }, [value, onChange])\n\n useEffect(() => {\n setValue(valueProp)\n }, [valueProp])\n\n const calendarMarks = useMemo(() => {\n const start = dayjs(value).tz(timezone).add(-1, 'month').startOf('month').startOf('day')\n const end = start.add(2, 'months').endOf('month').startOf('day')\n\n let marks = {}\n for (let ts = start; ts <= end; ts = ts.add(1, 'day')) {\n const valid = isValid ? isValid(ts.toDate()) : true\n if (valid) marks = setMark(marks, ts, 'dark')\n }\n\n return marks\n }, [isValid, value, timezone])\n\n return (\n \n \n \n )\n}\n\nexport default PickDateScreen\n","import React, { FC, useCallback, useEffect } from 'react'\nimport { useHistory, useParams } from 'react-router-dom'\nimport dayjs from 'dayjs'\nimport { useRecoilState, useRecoilValue } from 'recoil'\nimport { extensionModalState, extensionRescheduledDateSelector } from 'store/vendors/state'\nimport PickDateScreen from 'pages/Vendor/Project/ExtensionModal/components/PickDateScreen'\n\nconst PickRescheduledDate: FC = () => {\n const { id } = useParams<{ id: string }>()\n const history = useHistory()\n const [rescheduledDate, setRescheduledDate] = useRecoilState(extensionRescheduledDateSelector)\n const modalState = useRecoilValue(extensionModalState)\n\n const validateDate = useCallback((value?: Date) => {\n if (!value) return false\n\n return dayjs(value) >= dayjs()\n }, [])\n\n useEffect(() => {\n if (modalState == 'success') history.push(`/vendors/projects/${id}`)\n }, [modalState, history, id])\n\n return (\n \n )\n}\n\nexport default PickRescheduledDate\n","import React, { FC, useCallback, useEffect } from 'react'\nimport { useRecoilState, useRecoilValue } from 'recoil'\nimport { extensionModalState, extensionRescheduledAssistanceSelector } from 'store/vendors/state'\nimport { useExtensionModalNavigate } from 'store/vendors/hooks'\nimport ConfirmScreen from 'pages/Vendor/Project/ExtensionModal/components/ConfirmScreen'\n\nconst AssistanceForRescheduled: FC = () => {\n const [needRescheduleAssistance, setNeedRescheduleAssistance] = useRecoilState(extensionRescheduledAssistanceSelector)\n const navigate = useExtensionModalNavigate()\n const modalState = useRecoilValue(extensionModalState)\n\n const handleContinueClick = useCallback(() => {\n if (!needRescheduleAssistance) navigate('pick-extension-date')\n }, [needRescheduleAssistance, navigate])\n\n useEffect(() => {\n if (modalState == 'success') navigate('extension-requested')\n }, [modalState, navigate])\n\n return (\n \n )\n}\n\nexport default AssistanceForRescheduled\n","import React, { FC, useCallback, useEffect } from 'react'\nimport { useParams } from 'react-router-dom'\nimport { useRecoilState, useRecoilValue } from 'recoil'\nimport {\n extensionFollowupAssistanceSelector,\n extensionModalState,\n vendorOpportunityDetailState,\n} from 'store/vendors/state'\nimport { useExtensionModalNavigate } from 'store/vendors/hooks'\nimport ConfirmScreen from 'pages/Vendor/Project/ExtensionModal/components/ConfirmScreen'\n\nconst AssistanceForFollowup: FC = () => {\n const { id } = useParams<{ id: string }>()\n const opportunity = useRecoilValue(vendorOpportunityDetailState(id))\n const [needFollowupAssistance, setNeedFollowupAssistance] = useRecoilState(extensionFollowupAssistanceSelector)\n const modalState = useRecoilValue(extensionModalState)\n const navigate = useExtensionModalNavigate()\n\n const handleContinueClick = useCallback(() => {\n if (needFollowupAssistance) navigate('assistance-for-followup')\n }, [needFollowupAssistance, navigate])\n\n useEffect(() => {\n if (modalState == 'success') navigate('extension-requested')\n }, [modalState, navigate])\n\n if (!opportunity) return null\n\n return (\n \n )\n}\n\nexport default AssistanceForFollowup\n","import React, { FC, useCallback } from 'react'\nimport { useParams } from 'react-router-dom'\nimport dayjs from 'dayjs'\nimport { useRecoilState, useRecoilValue } from 'recoil'\nimport { track } from 'utils/analytics'\nimport { extensionFollowupReasonSelector, vendorOpportunityDetailState } from 'store/vendors/state'\nimport { useExtensionModalNavigate } from 'store/vendors/hooks'\nimport SelectScreen from 'pages/Vendor/Project/ExtensionModal/components/SelectScreen'\nimport { FollowupReason } from 'store/vendors/types'\n\nconst PickFollowupReason: FC = () => {\n const { id } = useParams<{ id: string }>()\n const opportunity = useRecoilValue(vendorOpportunityDetailState(id))\n const [followupReason, setFollowupReason] = useRecoilState(extensionFollowupReasonSelector)\n const navigate = useExtensionModalNavigate()\n\n const handleContinueClick = useCallback(() => {\n if (!followupReason) return\n track('click', { code: 'continue', feature: followupReason })\n\n navigate(followupReason == 'present-bid' ? 'pick-extension-date' : 'confirm-followup')\n }, [followupReason, navigate])\n\n if (!opportunity) return null\n\n return (\n \n value={followupReason}\n onChange={setFollowupReason}\n title={`Why can't you submit the proposal by ${dayjs(opportunity.bid_due_ts).format('DD MMM YYYY')}`}\n options={[\n { key: 'present-bid', name: 'Present bid to the client' },\n { key: 'gather-info', name: 'Gather more info' },\n ]}\n button={{ text: 'Continue', onClick: handleContinueClick }}\n />\n )\n}\n\nexport default PickFollowupReason\n","import React, { FC, useCallback } from 'react'\nimport { useRecoilState } from 'recoil'\nimport { MoreTimeReason } from 'store/vendors/types'\nimport { extensionMoreTimeReasonSelector } from 'store/vendors/state'\nimport { useExtensionModalNavigate } from 'store/vendors/hooks'\nimport SelectScreen from 'pages/Vendor/Project/ExtensionModal/components/SelectScreen'\n\nconst PickMoreTimeReason: FC = () => {\n const [reason, setReason] = useRecoilState(extensionMoreTimeReasonSelector)\n const navigate = useExtensionModalNavigate()\n\n const handleContinueClick = useCallback(() => {\n navigate('pick-extension-date')\n }, [navigate])\n\n return (\n \n value={reason}\n onChange={setReason}\n title=\"Why do you need more time?\"\n options={[\n { key: 'scope-complex', name: 'Scope is complex' },\n { key: 'too-busy', name: 'We have been busy' },\n ]}\n button={{ text: 'Continue', onClick: handleContinueClick }}\n />\n )\n}\n\nexport default PickMoreTimeReason\n","import React, { FC, useEffect } from 'react'\nimport { useRecoilState, useRecoilValue } from 'recoil'\nimport { extensionModalState, extensionScopeDetailsSelector } from 'store/vendors/state'\nimport { useExtensionModalNavigate } from 'store/vendors/hooks'\nimport BaseScreen from 'pages/Vendor/Project/ExtensionModal/components/BaseScreen'\nimport CoreInput from 'components/Core/CoreInput'\n\nconst ConfirmScope: FC = () => {\n const navigate = useExtensionModalNavigate()\n const modalState = useRecoilValue(extensionModalState)\n\n const [scope, setScope] = useRecoilState(extensionScopeDetailsSelector)\n\n useEffect(() => {\n if (modalState == 'success') navigate('extension-requested')\n }, [modalState, navigate])\n\n return (\n 10) || false}\n >\n \n \n )\n}\n\nexport default ConfirmScope\n","import React, { FC, useEffect } from 'react'\nimport { useRecoilState, useRecoilValue } from 'recoil'\nimport BaseScreen from 'pages/Vendor/Project/ExtensionModal/components/BaseScreen'\nimport { extensionBudgetDetailsSelector, extensionModalState } from 'store/vendors/state'\nimport { useExtensionModalNavigate } from 'store/vendors/hooks'\nimport CoreInput from 'components/Core/CoreInput'\n\nconst ConfirmBudget: FC = () => {\n const [budget, setBudget] = useRecoilState(extensionBudgetDetailsSelector)\n const navigate = useExtensionModalNavigate()\n const modalState = useRecoilValue(extensionModalState)\n\n useEffect(() => {\n if (modalState == 'success') navigate('extension-requested')\n }, [modalState, navigate])\n\n return (\n 10) || false}\n >\n \n \n )\n}\n\nexport default ConfirmBudget\n","import React, { FC, useCallback } from 'react'\nimport { useRecoilState } from 'recoil'\nimport { extensionFollowupScheduledSelector } from 'store/vendors/state'\nimport { useExtensionModalNavigate } from 'store/vendors/hooks'\nimport ConfirmScreen from 'pages/Vendor/Project/ExtensionModal/components/ConfirmScreen'\n\nconst ConfirmFollowup: FC = () => {\n const [followupScheduled, setFollowupScheduled] = useRecoilState(extensionFollowupScheduledSelector)\n const navigate = useExtensionModalNavigate()\n\n const handleContinueClick = useCallback(() => {\n navigate(followupScheduled ? 'pick-followup-date' : 'assistance-for-followup')\n }, [followupScheduled, navigate])\n\n return (\n \n )\n}\n\nexport default ConfirmFollowup\n","import React, { FC, useCallback } from 'react'\nimport dayjs from 'dayjs'\nimport { useRecoilState } from 'recoil'\nimport { extensionFollowupDateSelector } from 'store/vendors/state'\nimport { useExtensionModalNavigate } from 'store/vendors/hooks'\nimport PickDateScreen from 'pages/Vendor/Project/ExtensionModal/components/PickDateScreen'\n\nconst PickFollowupDate: FC = () => {\n const [followupDate, setFollowupDate] = useRecoilState(extensionFollowupDateSelector)\n const navigate = useExtensionModalNavigate()\n\n const validateDate = useCallback((value?: Date) => {\n if (!value) return false\n\n return dayjs(value) >= dayjs()\n }, [])\n\n const handleClickContinue = useCallback(() => {\n navigate('pick-extension-date')\n }, [navigate])\n\n return (\n \n )\n}\n\nexport default PickFollowupDate\n","import React, { FC, FormEvent, useCallback, useEffect, useState } from 'react'\nimport { Redirect, Route, Switch, useParams, useRouteMatch } from 'react-router-dom'\nimport { useRecoilState, useResetRecoilState, useRecoilValue } from 'recoil'\nimport Close from '@mui/icons-material/Close'\nimport Info from '@mui/icons-material/Info'\nimport { track } from 'utils/analytics'\nimport { ExtensionOptions, VendorOpportunityDetail } from 'store/vendors/types'\nimport { extensionModalState, extensionOptionsState } from 'store/vendors/state'\nimport { useRequestBidExtension } from 'store/vendors/hooks'\nimport PickExtensionDate from 'pages/Vendor/Project/ExtensionModal/screens/PickExtensionDate'\nimport ExtensionRequested from 'pages/Vendor/Project/ExtensionModal/screens/ExtensionRequested'\nimport PickExtensionReason from 'pages/Vendor/Project/ExtensionModal/screens/PickExtensionReason'\nimport ConfirmRescheduled from 'pages/Vendor/Project/ExtensionModal/screens/ConfirmRescheduled'\nimport PickRescheduledDate from 'pages/Vendor/Project/ExtensionModal/screens/PickRescheduledDate'\nimport AssistanceForRescheduled from 'pages/Vendor/Project/ExtensionModal/screens/AssistanceForRescheduled'\nimport AssistanceForFollowup from 'pages/Vendor/Project/ExtensionModal/screens/AssistanceForFollowup'\nimport PickFollowupReason from 'pages/Vendor/Project/ExtensionModal/screens/PickFollowupReason'\nimport PickMoreTimeReason from 'pages/Vendor/Project/ExtensionModal/screens/PickMoreTimeReason'\nimport ConfirmScope from 'pages/Vendor/Project/ExtensionModal/screens/ConfirmScope'\nimport ConfirmBudget from 'pages/Vendor/Project/ExtensionModal/screens/ConfirmBudget'\nimport ConfirmFollowup from 'pages/Vendor/Project/ExtensionModal/screens/ConfirmFollowup'\nimport PickFollowupDate from 'pages/Vendor/Project/ExtensionModal/screens/PickFollowupDate'\nimport BaseModal from 'components/BaseModal'\n\ninterface ExtensionModalProps {\n opportunity: VendorOpportunityDetail\n open: boolean\n setOpen: (value: boolean) => void\n setFetching: (value: boolean) => void\n}\n\nconst ExtensionModal: FC = ({ opportunity, open, setOpen, setFetching }) => {\n const { id } = useParams<{ id: string }>()\n const resetExtensionOptions = useResetRecoilState(extensionOptionsState)\n const [modalState, setModalState] = useRecoilState(extensionModalState)\n const extensionOptions = useRecoilValue(extensionOptionsState)\n const [formData, setFormData] = useState(null)\n const match = useRouteMatch('/vendors/projects/:id/extension')\n\n const handleCloseClick = useCallback(() => {\n track('click', { code: 'close', feature: 'ExtensionModal' })\n setOpen(false)\n }, [setOpen])\n\n useEffect(() => {\n if (!open) {\n if (modalState == 'success') setFetching(true)\n resetExtensionOptions()\n setModalState('start')\n }\n }, [open, resetExtensionOptions, modalState, setModalState, setFetching])\n\n const handleComplete = useCallback(\n (response: Response) => {\n setModalState(response.ok ? 'success' : 'error')\n },\n [setModalState]\n )\n\n useRequestBidExtension(id, formData, setFormData, handleComplete)\n\n const handleSubmit = useCallback(\n (event: FormEvent) => {\n track('click', {\n code: 'submit',\n feature: 'ExtensionModal',\n flexfield_1: {\n ...extensionOptions,\n originalDueDate: opportunity.bid_due_ts,\n id: opportunity.id,\n },\n })\n event.preventDefault()\n setModalState('pending')\n setFormData(extensionOptions)\n },\n [opportunity, setFormData, extensionOptions, setModalState]\n )\n\n return (\n \n
    \n

    {'Proposal due date extension'}

    \n \n {'Close modal'}\n \n \n
    \n\n {modalState == 'error' && (\n
    \n \n
    {'An error occurred.'}
    \n
    \n )}\n\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n )\n}\n\nexport default ExtensionModal\n","import cx from 'classnames'\nimport React, { FC } from 'react'\n\ninterface CheckCircleProps {\n className?: string\n}\n\nconst CheckCircle: FC = ({ className }) => (\n \n \n \n)\n\nexport default CheckCircle\n","import React, { FC, useCallback, useState } from 'react'\nimport dayjs from 'dayjs'\nimport AttachMoney from '@mui/icons-material/AttachMoney'\nimport Close from '@mui/icons-material/Close'\nimport Info from '@mui/icons-material/Info'\nimport WarningRounded from '@mui/icons-material/WarningRounded'\nimport { VendorOpportunityDetail, VendorPayment } from 'store/vendors/types'\nimport { groupBy } from 'pages/Vendor/utils'\nimport PaymentRow from 'pages/Vendor/components/PaymentRow'\nimport CoreCard from 'components/Core/CoreCard'\nimport BaseModal from 'components/BaseModal'\nimport CheckCircle from 'svgs/check-circle'\n\ntype PaymentsTabProps = {\n opportunity: VendorOpportunityDetail\n}\n\nconst PaymentsTab: FC = ({ opportunity }) => {\n const [editPaymentModalOpen, setEditPaymentModalOpen] = useState(false)\n\n const openEditPaymentModal = useCallback(() => {\n setEditPaymentModalOpen(true)\n }, [])\n const closeEditPaymentModal = useCallback(() => {\n setEditPaymentModalOpen(false)\n }, [])\n\n const paymentsByYear = groupBy(opportunity.payments, (payment) =>\n String(dayjs(payment.invoice_due_date).year())\n )\n\n return (\n
    \n
    {'Payments'}
    \n {opportunity.payments.length == 0 && opportunity.payment_method && opportunity.take_rate ? (\n <>\n
    \n
    \n \n
    \n {'The selected payment option will only apply if you win the project.'}\n
    \n
    \n
    \n
    \n {'Selected Payment Option'}\n
    \n
    \n \n
    \n
    \n {opportunity.payment_method == 'Design' ? (\n 'Design Default Rate'\n ) : opportunity.payment_method == 'Legacy' ? (\n 'Construction Default Rate'\n ) : opportunity.payment_method == 'Insta-Pay' ? (\n 'InstaPay'\n ) : opportunity.payment_method == 'Payment Plan' ? (\n 'Payment Plan'\n ) : opportunity.payment_method == 'Pay at Construction' ? (\n <>\n {'Pay at Construction'}\n {!opportunity.pac_confirmed && ' [Pending Review]'}{' '}\n \n ) : (\n ''\n )}\n
    \n
    \n {opportunity.payment_method != 'Payment Plan' && (\n
    \n {opportunity.payment_method == 'Design'\n ? 'Due within 30 days from Closed Won'\n : opportunity.payment_method == 'Legacy'\n ? 'Due within 30 days from Closed Won'\n : opportunity.payment_method == 'Insta-Pay'\n ? 'Pay within 72 business hours from Closed Won'\n : opportunity.payment_method == 'Pay at Construction'\n ? 'Pay within 270 days from Closed Won or at Construction (whichever comes first)'\n : ''}\n
    \n )}\n {opportunity.payment_method == 'Payment Plan' ? 'Pay ' : null}\n {`${opportunity.take_rate}%`}\n {` of ${opportunity.project_type} Project Value`}\n
    \n
    \n \n {'Edit'}\n \n
    \n
    \n
    \n \n
    \n
    {'Edit Payment Option'}
    \n \n {'Close modal'}\n \n \n
    \n
    \n
    \n \n
    \n
    \n {'Contact the Project Operations Manager if you want to change the selected payment option'}\n
    \n
    \n
    \n \n ) : opportunity.payments.length == 0 ? (\n }\n iconColor=\"gray\"\n title=\"No payment info to show yet\"\n description=\"Payment info will be shown here once you upload proposals\"\n className=\"tw:border tw:border-neutrals-300 tw:!mt-0\"\n />\n ) : (\n \n \n \n \n \n \n \n \n \n \n \n {Object.keys(paymentsByYear).map((year) => (\n \n \n \n \n {paymentsByYear[year].map((payment) => {\n return \n })}\n \n ))}\n
    \n
    {'Due date'}
    \n
    \n {'Payment option'}\n {'Amount'}{'Rate'}{'Payment type'}
    \n {year}\n
    \n )}\n
    \n )\n}\n\nexport default PaymentsTab\n","import React, { FC } from 'react'\nimport cx from 'classnames'\nimport dayjs from 'dayjs'\nimport CalendarToday from '@mui/icons-material/CalendarToday'\nimport Cancel from '@mui/icons-material/Cancel'\nimport HistoryToggleOff from '@mui/icons-material/HistoryToggleOff'\nimport Home from '@mui/icons-material/Home'\nimport Info from '@mui/icons-material/Info'\nimport { VendorOpportunityDetail } from 'store/vendors/types'\n\ntype BannersProps = {\n opportunity: VendorOpportunityDetail\n openExtensionModal: () => void\n}\n\nconst Banners: FC = ({ opportunity, openExtensionModal }) => {\n const effectiveBidDueDate =\n opportunity.bid_extension_ts && opportunity.bid_due_ts\n ? dayjs(opportunity.bid_extension_ts).isAfter(opportunity.bid_due_ts)\n ? opportunity.bid_extension_ts\n : opportunity.bid_due_ts\n : opportunity.bid_due_ts\n\n return (\n
    \n {opportunity.current_status == 'Proposal' && opportunity.project_status['Proposal'].action == 'On hold' && (\n
    \n
    \n \n
    {'Bid proposal is on hold'}
    \n
    \n {opportunity.advisor_bid_message &&
    {opportunity.advisor_bid_message}
    }\n
    \n )}\n {opportunity.current_status == 'Proposal' && opportunity.project_status['Proposal'].status == 'Closed' && (\n
    \n
    \n \n
    {'Proposal Withdrawn'}
    \n
    \n
    \n \n
    {'You have withdrawn from this project'}
    \n
    \n
    \n )}\n {!opportunity.site_visit_ts && opportunity.current_status == 'Site Visit' && (\n
    \n
    \n \n
    {'Site visit not scheduled'}
    \n
    \n
    \n \n
    {'Contact the Project’s Manager or homeowner to schedule'}
    \n
    \n
    \n )}\n {opportunity.site_visit_ts &&\n !dayjs().isAfter(opportunity.site_visit_ts, 'day') &&\n opportunity.current_status == 'Site Visit' && (\n
    \n
    \n \n
    {`Site visit scheduled on ${dayjs(\n opportunity.site_visit_ts\n ).format('ddd, DD MMM hh:mm A')}`}
    \n
    \n
    \n \n
    {'Contact the Project’s Manager or homeowner to reschedule'}
    \n
    \n
    \n )}\n {opportunity.bid_due_ts && opportunity.current_status == 'Proposal' && opportunity.submitted_bid == null && (\n \n
    \n \n
    \n {!opportunity.bid_extension_ts && opportunity.bid_extension_requested ? (\n 'Pending assistance from Realm'\n ) : (\n <>\n {opportunity.bid_extension_ts &&\n dayjs(opportunity.bid_extension_ts).isAfter(opportunity.bid_due_ts) && (\n \n {'(Extended) '}\n \n )}\n {`Proposal${dayjs().isAfter(effectiveBidDueDate, 'day') ? ' was' : ''} expected before ${dayjs(\n effectiveBidDueDate\n ).format('ddd, DD MMMM')} `}\n \n )}\n {opportunity.bid_extension_ts && dayjs(opportunity.bid_extension_ts).isAfter(opportunity.bid_due_ts) && (\n \n {dayjs(opportunity.bid_due_ts).format('ddd, DD MMMM')}\n \n )}\n
    \n
    \n {(!opportunity.bid_extension_ts || dayjs().isAfter(effectiveBidDueDate, 'day')) && (\n \n {'Extend proposal due date'}\n \n )}\n
    \n )}\n \n )\n}\n\nexport default Banners\n","import React, { FC, KeyboardEvent, useCallback, useEffect, useLayoutEffect, useMemo, useState } from 'react'\nimport { useHistory, useLocation, useParams } from 'react-router-dom'\nimport cx from 'classnames'\nimport { useRecoilValue } from 'recoil'\nimport ChevronRight from '@mui/icons-material/ChevronRight'\nimport Email from '@mui/icons-material/Email'\nimport HighlightOff from '@mui/icons-material/HighlightOff'\nimport Home from '@mui/icons-material/Home'\nimport Map from '@mui/icons-material/Map'\nimport Pause from '@mui/icons-material/Pause'\nimport Person from '@mui/icons-material/Person'\nimport Phone from '@mui/icons-material/Phone'\nimport RotateRight from '@mui/icons-material/RotateRight'\nimport { vendorMeState, vendorOpportunityDetailState } from 'store/vendors/state'\nimport { useLoadVendorOpportunity } from 'store/vendors/hooks'\nimport { track } from 'utils/analytics'\nimport { getGoogleMapsUrl } from 'utils/property'\nimport { getInitials } from 'utils/formatting'\nimport PageTitle from 'components/PageTitle'\nimport StreetViewImage from 'components/StreetViewImage'\nimport Spinner from 'components/Spinner'\nimport CoreButton from 'components/Core/CoreButton'\nimport ProjectStatus from './ProjectStatus'\nimport BidStatus from './BidStatus'\nimport VendorBidFiles from './VendorBidFiles'\nimport PointOfContactModal from './PointOfContactModal'\nimport ProjectStatusModal from './ProjectStatusModal'\nimport WithdrawModal from './WithdrawModal'\nimport ExtensionModal from './ExtensionModal'\nimport PaymentsTab from './PaymentsTab'\nimport Banners from './Banners'\n\nconst Project: FC = () => {\n const { id } = useParams<{ id: string }>()\n const me = useRecoilValue(vendorMeState)\n const opportunity = useRecoilValue(vendorOpportunityDetailState(id))\n const [fetching, setFetching] = useState(true)\n const { pathname } = useLocation()\n const history = useHistory()\n\n useLoadVendorOpportunity(id, fetching, setFetching)\n\n const handleVisibilityChange = useCallback(() => {\n if (document.visibilityState == 'visible') {\n setFetching(true)\n }\n }, [])\n\n useLayoutEffect(() => {\n document.addEventListener('visibilitychange', handleVisibilityChange)\n\n return () => {\n document.removeEventListener('visibilitychange', handleVisibilityChange)\n }\n }, [handleVisibilityChange])\n\n const [activeTab, setActiveTab] = useState<'Project Details' | 'Proposals' | 'Payments'>(\n window.location.hash == '#proposals'\n ? 'Proposals'\n : window.location.hash == '#payments'\n ? 'Payments'\n : 'Project Details'\n )\n const [pointOfContactModalOpen, setPointOfContactModalOpen] = useState(false)\n const [projectStatusModalOpen, setProjectStatusModalOpen] = useState(false)\n const [withdrawModalOpen, setWithdrawModalOpen] = useState(false)\n const extensionModalOpen = useMemo(() => pathname.includes('/extension'), [pathname])\n\n const setExtensionModalOpen = useCallback(\n (value: boolean) => {\n const next = `/vendors/projects/${id}${value ? '/extension' : ''}`\n history.push(next)\n },\n [id, history]\n )\n\n const openPointOfContactModal = useCallback(() => {\n track('click', { code: 'open', feature: 'PointOfContactModal' })\n setPointOfContactModalOpen(true)\n }, [])\n\n const handlePointOfContactModalKeyUp = useCallback((event: KeyboardEvent) => {\n if (['Space', 'Enter', 'ArrowRight'].includes(event.code)) {\n track('keyup', { code: 'open', feature: 'PointOfContactModal' })\n setPointOfContactModalOpen(true)\n }\n }, [])\n\n const openProjectStatusModal = useCallback(() => {\n track('click', { code: 'open', feature: 'ProjectStatusModal' })\n setProjectStatusModalOpen(true)\n }, [])\n\n const openWithdrawModal = useCallback(() => {\n track('click', { code: 'open', feature: 'WithdrawModal' })\n setProjectStatusModalOpen(false)\n setWithdrawModalOpen(true)\n }, [])\n\n const openExtensionModal = useCallback(() => {\n track('click', { code: 'open', feature: 'ExtensionModal' })\n setExtensionModalOpen(true)\n }, [setExtensionModalOpen])\n\n const handleProjectStatusModalKeyUp = useCallback((event: KeyboardEvent) => {\n if (['Space', 'Enter', 'ArrowRight'].includes(event.code)) {\n track('keyup', { code: 'open', feature: 'ProjectStatusModal' })\n setProjectStatusModalOpen(true)\n }\n }, [])\n\n const setActiveTabToProjectDetails = useCallback(() => {\n track('click', { code: 'tab', feature: 'ProjectDetails' })\n window.location.hash = 'project_details'\n }, [])\n const setActiveTabToProposals = useCallback(() => {\n track('click', { code: 'tab', feature: 'Proposals' })\n window.location.hash = 'proposals'\n }, [])\n const setActiveTabToPayments = useCallback(() => {\n track('click', { code: 'tab', feature: 'Payments' })\n window.location.hash = 'payments'\n }, [])\n\n const handleHashChange = useCallback(() => {\n if (window.location.hash == '#proposals') {\n setActiveTab('Proposals')\n } else if (window.location.hash == '#payments') {\n setActiveTab('Payments')\n } else {\n setActiveTab('Project Details')\n }\n }, [])\n\n useEffect(() => {\n window.addEventListener('hashchange', handleHashChange)\n return () => {\n window.removeEventListener('hashchange', handleHashChange)\n }\n }, [handleHashChange])\n\n if (fetching) {\n return (\n
    \n \n
    \n )\n }\n\n if (!opportunity || !me) {\n return (\n
    \n {'An error occurred, please try again.'}\n
    \n )\n }\n\n const opportunityName = [opportunity.client.name.trim(), opportunity.property.address_line_1].join(', ')\n\n const address = [\n opportunity.property.address_line_1,\n opportunity.property.address_city,\n opportunity.property.address_state,\n opportunity.property.address_zip,\n ].join(', ')\n\n const addressRest = [\n opportunity.property.address_city,\n opportunity.property.address_state,\n opportunity.property.address_zip,\n ].join(', ')\n\n const propertyInfo = {\n line1: opportunity.property.address_line_1,\n city: opportunity.property.address_city,\n state: opportunity.property.address_state,\n zip5: opportunity.property.address_zip,\n lat: opportunity.property.coords[1],\n long: opportunity.property.coords[0],\n }\n const googleMapsUrl = getGoogleMapsUrl(propertyInfo)\n\n const projectStatusKey = Object.keys(opportunity.project_status).find((projectStatus) =>\n ['Current', 'Closed'].includes(opportunity.project_status[projectStatus].status)\n )\n\n return (\n <>\n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    {opportunityName}
    \n \n \n

    {addressRest}

    \n \n
    \n
    \n {fetching && }\n
    \n \n \n {projectStatusKey && opportunity.project_status[projectStatusKey].status == 'Closed' ? (\n
    \n \n
    \n ) : opportunity.current_status == 'Proposal' &&\n opportunity.project_status['Proposal'].action == 'On hold' ? (\n
    \n \n
    \n ) : (\n
    \n \n
    \n )}\n
    \n
    \n
    {opportunity.current_status || 'Unknown'}
    \n {opportunity.action == 'On hold' && (\n \n {'On hold'}\n
    \n )}\n
    \n
    {'Status'}
    \n
    \n
    \n \n
    \n
    \n \n {opportunity.advisor.profile_pic_url ? (\n \"Realm\n ) : (\n
    \n {getInitials(opportunity.advisor.name)}\n
    \n )}\n
    \n
    {opportunity.advisor.name}
    \n
    {'Realm Point of Contact'}
    \n
    \n
    \n \n
    \n
    \n
    \n \n {'Project Details'}\n \n \n {'Proposals'}\n \n {!!me.vendor_contract_version &&\n ['Aug 2024 Legacy User', 'Aug 2024 New User'].includes(me.vendor_contract_version) &&\n !!me.vendor_contract_accepted_at && (\n \n {'Payments'}\n \n )}\n
    \n {activeTab == 'Project Details' ? (\n
    \n

    {'Summary'}

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n \n {'Homeowner'}\n
    \n
    {opportunity.client.name}
    \n
    \n \n {'Email'}\n
    \n
    \n \n {opportunity.client.email}\n \n
    \n
    \n \n {'Phone No.'}\n
    \n
    \n {opportunity.client.normalized_phone_number ? (\n \n {opportunity.client.display_phone_number}\n \n ) : (\n

    {'Not filled in yet'}

    \n )}\n
    \n
    \n \n {'Address'}\n
    \n
    {address}
    \n {opportunity.scope && (\n
    \n

    {'Scope'}

    \n
    \n
    \n )}\n
    \n ) : activeTab == 'Proposals' ? (\n
    \n {opportunity.submitted_bid &&\n !(\n opportunity.current_status == 'Proposal' && opportunity.project_status['Proposal'].action == 'On hold'\n ) && }\n {opportunity.current_status == 'Proposal' &&\n opportunity.project_status['Proposal'].action == 'On hold' ? (\n
    \n
    \n \n
    \n
    {'Bid proposal is on hold'}
    \n
    \n ) : (\n \n )}\n
    \n ) : activeTab == 'Payments' ? (\n \n ) : null}\n
    \n
    \n
    \n
    {'Project Progress'}
    \n \n {!['Awarded', 'Archived'].includes(opportunity.group || '') && opportunity.current_status != 'Invoice' && (\n \n )}\n
    \n
    \n
    \n
    {'Realm Point of Contact'}
    \n
    \n {opportunity.advisor.profile_pic_url ? (\n {opportunity.advisor.title}\n ) : (\n
    \n {getInitials(opportunity.advisor.name)}\n
    \n )}\n
    \n
    {opportunity.advisor.name}
    \n
    \n {opportunity.advisor.title}\n
    \n
    \n
    \n {opportunity.advisor.normalized_phone_number && opportunity.advisor.display_phone_number ? (\n
    \n \n \n {opportunity.advisor.display_phone_number}\n \n
    \n ) : null}\n {opportunity.advisor.email ? (\n
    \n \n \n {opportunity.advisor.email}\n \n
    \n ) : null}\n
    \n
    \n \n \n \n \n \n \n )\n}\n\nexport default Project\n","import React, { FC } from 'react'\n\nconst VendorProfileIllustration: FC = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nexport default VendorProfileIllustration\n","import React, { FC, PropsWithChildren } from 'react'\nimport cx from 'classnames'\n\ninterface GridItemProps extends PropsWithChildren {\n id?: string\n className?: string\n}\n\nconst GridItem: FC = ({ className, id, children }) => {\n return (\n
    \n {children}\n
    \n )\n}\n\nexport default GridItem\n","import React, { FC, useCallback, useMemo } from 'react'\nimport { useHistory } from 'react-router-dom'\nimport dayjs from 'dayjs'\nimport Delete from '@mui/icons-material/Delete'\nimport { humanize } from 'utils/formatting'\nimport { VendorPastProject } from 'store/vendors/types'\nimport { useDeletePastProject } from 'store/vendors/hooks'\nimport GridItem from 'pages/Vendor/Profile/components/GridItem'\nimport Spinner from 'svgs/spinner'\nimport { businessUnitProjectTypeToLabel } from 'store/vendors/consts'\n\ninterface PastProjectGridItemProps {\n pastProject: VendorPastProject\n}\n\nconst PastProjectGridItem: FC = ({ pastProject }) => {\n const [deletingPastProject, setDeletingPastProject] = useDeletePastProject(pastProject.id)\n const history = useHistory()\n\n const handleDeleteClick = useCallback(() => {\n setDeletingPastProject(true)\n }, [setDeletingPastProject])\n\n const handleLinkClick = useCallback(() => {\n history.push(`/vendors/profile/past_projects/${pastProject.id}`)\n }, [history, pastProject.id])\n\n const startDate = useMemo(() => {\n if (!pastProject.start_date) return null\n\n const startDateDayJs = dayjs(pastProject.start_date)\n if (!pastProject.end_date) return startDateDayJs.format('MMM YYYY')\n\n const endDateDayJs = dayjs(pastProject.end_date)\n return startDateDayJs.format(startDateDayJs.year == endDateDayJs.year ? 'MMM' : 'MMM YYYY')\n }, [pastProject.start_date, pastProject.end_date])\n\n const endDate = useMemo(() => {\n if (!pastProject.end_date) return 'present'\n\n const endDateDayJs = dayjs(pastProject.end_date)\n return endDateDayJs.format('MMM YYYY')\n }, [pastProject.end_date])\n\n return (\n \n \n {pastProject.before_media.length == 0 && pastProject.after_media.length == 0 && (\n
    \n \n {deletingPastProject ? : }\n \n
    \n )}\n
    \n )\n}\n\nexport default PastProjectGridItem\n","import React, { FC, PropsWithChildren } from 'react'\nimport cx from 'classnames'\n\ninterface FormFieldProps extends PropsWithChildren {\n label: string\n sublabel?: string\n className?: string\n labelClassName?: string\n}\n\nconst FormField: FC = ({ label, sublabel, className, labelClassName, children }) => {\n return (\n
    \n
    \n
    {label}
    \n {sublabel &&
    {sublabel}
    }\n
    \n {children}\n
    \n )\n}\n\nexport default FormField\n","import React, { FC, useState, ChangeEvent, useCallback, DragEvent, useRef, Dispatch, SetStateAction } from 'react'\nimport { useRecoilValue, useSetRecoilState } from 'recoil'\nimport cx from 'classnames'\nimport FileUpload from '@mui/icons-material/FileUpload'\nimport MoreVert from '@mui/icons-material/MoreVert'\nimport RemoveCircle from '@mui/icons-material/RemoveCircle'\nimport ChevronRight from '@mui/icons-material/ChevronRight'\nimport { capitalize } from 'utils/formatting'\nimport { deleteJSON, patchJSON } from 'utils/fetch'\nimport { PastProjectAttachment, VendorPastProject } from 'store/vendors/types'\nimport { vendorPastProjectsState } from 'store/vendors/state'\nimport Dropdown from 'components/Dropdown'\nimport CoreList from 'components/Core/CoreList'\nimport { directUploadFile } from 'store/vendors/api'\nimport { heicTo, isHeic } from 'heic-to'\nimport { alertState } from 'recoil/alert'\nimport Spinner from 'svgs/spinner'\n\ninterface MediaGalleryProps {\n className?: string\n stage: 'before' | 'after'\n pastProject: VendorPastProject | null\n setSaving: (value: boolean) => void\n setError: (value: boolean) => void\n kind?: 'enabled' | 'alert'\n hint?: string\n attachments: PastProjectAttachment[]\n setAttachments: Dispatch>\n uploading: boolean\n setUploading: Dispatch>\n}\n\nconst MediaGallery: FC = ({\n className,\n stage,\n pastProject,\n setSaving,\n setError,\n kind = 'enabled',\n attachments,\n setAttachments,\n uploading,\n setUploading,\n hint,\n}) => {\n const setAlert = useSetRecoilState(alertState)\n const fileInputRef = useRef(null)\n const [invalidFiles, setInvalidFiles] = useState(false)\n\n const vendorPastProjects = useRecoilValue(vendorPastProjectsState)\n const setPastProjects = useSetRecoilState(vendorPastProjectsState)\n\n const [isDragging, setIsDragging] = useState(false)\n\n const handleDragOver = useCallback((e: DragEvent) => {\n const items = e.dataTransfer.items\n const unsupportedFiles = Array.from(items).some(\n (item) => item.kind === 'file' && !item.type.startsWith('image') && !item.type.startsWith('video')\n )\n\n if (unsupportedFiles) {\n e.dataTransfer.dropEffect = 'none'\n setInvalidFiles(true)\n setIsDragging(true)\n } else {\n e.dataTransfer.dropEffect = 'copy'\n setInvalidFiles(false)\n setIsDragging(true)\n }\n }, [])\n\n const handleDrop = useCallback((e: DragEvent) => {\n e.preventDefault()\n setIsDragging(false)\n setInvalidFiles(false)\n\n const files = e.dataTransfer.files\n if (!files.length) return\n\n const unsupportedFiles = Array.from(files).some(\n (file) => !file.type.startsWith('image') && !file.type.startsWith('video')\n )\n\n if (unsupportedFiles) return\n\n // Create a new DataTransfer object to set files in the input\n const dataTransfer = new DataTransfer()\n Array.from(files).forEach((file) => dataTransfer.items.add(file))\n\n // Assign the files to the file input using its ref\n if (fileInputRef.current) {\n ;(fileInputRef.current as HTMLInputElement).files = dataTransfer.files\n\n // Manually trigger the change event to process the files\n const event = new Event('change', { bubbles: true })\n fileInputRef.current.dispatchEvent(event)\n }\n }, [])\n\n const handleDragLeave = useCallback(() => {\n setIsDragging(false)\n setInvalidFiles(false)\n }, [])\n\n const handleFileChange = useCallback(\n async (e: ChangeEvent) => {\n const { files } = e.target\n if (!files?.length) return\n\n for (const file of Array.from(files)) {\n const video = file.type.startsWith('video')\n const limit = video ? 250 : 125\n\n if (!file.type.startsWith('video') && !file.type.startsWith('image')) {\n e.target.setCustomValidity(`File type ${file.type} not supported`)\n e.target.reportValidity()\n return\n }\n if (file.size > limit * 1024 * 1024) {\n e.target.setCustomValidity(`${video ? 'Videos' : 'Images'} must be less than ${limit}MB`)\n e.target.reportValidity()\n return\n }\n }\n\n e.target.setCustomValidity('')\n\n const newAttachments: PastProjectAttachment[] = []\n\n for (let file of Array.from(files)) {\n setUploading(true)\n try {\n if (await isHeic(file)) {\n const converted = await heicTo({\n blob: file,\n type: 'image/jpeg',\n quality: 0.5,\n })\n file = new File([converted], file.name.replace(/\\.heic$/, '.jpg'), { type: 'image/jpeg' })\n }\n\n const blob = await directUploadFile(file)\n\n newAttachments.push({\n id: null,\n signed_id: blob.signed_id, // Store signed ID\n file_type: file.type.startsWith('image') ? 'photo' : 'video',\n url: URL.createObjectURL(file),\n })\n } catch (error) {\n setAlert({ type: 'ERROR', message: 'Error uploading file - please reload the page.', id: Date.now() })\n console.error('Direct upload failed:', error)\n }\n }\n\n setUploading(false)\n setAttachments((oldAttachments) => [...oldAttachments, ...newAttachments])\n },\n [setAttachments, setAlert, setUploading]\n )\n\n const moveProject = useCallback(\n async ({\n attachment,\n destination,\n stage,\n }: {\n attachment: PastProjectAttachment\n destination?: VendorPastProject\n stage?: 'before' | 'after'\n }) => {\n if (!pastProject) return\n\n setSaving(true)\n setError(false)\n try {\n const response = await patchJSON(\n `/vendors/api/past_projects/${pastProject.id}/move_attachment`,\n {\n attachment_id: attachment.id,\n ...(destination ? { destination_project_id: destination?.id } : {}),\n ...(stage ? { destination_stage: stage } : {}),\n }\n )\n\n if (response.isError) {\n console.error(response.jsonBody)\n setError(true)\n } else {\n const newProjects = response.jsonBody\n setPastProjects((existing) => ({\n ...existing,\n ...newProjects.reduce((acc, project) => ({ ...acc, [project.id]: project }), {}),\n }))\n }\n } catch (e) {\n console.error(e)\n setError(true)\n }\n\n setSaving(false)\n },\n [pastProject, setPastProjects, setSaving, setError]\n )\n\n const handleDelete = useCallback(\n (attachment: PastProjectAttachment) => {\n return async () => {\n if (!pastProject) return\n\n setSaving(true)\n setError(false)\n try {\n const response = await deleteJSON(\n `/vendors/api/past_projects/${pastProject.id}/delete_attachment?attachment_id=${attachment.id}&stage=${stage}`\n )\n if (response.isError) {\n setError(true)\n console.error(response.jsonBody)\n } else {\n const newProject = response.jsonBody\n setPastProjects((existing) => ({ ...existing, [newProject.id]: newProject }))\n }\n } catch (e) {\n console.error(e)\n setError(true)\n }\n\n setSaving(false)\n }\n },\n [pastProject, setPastProjects, setSaving, stage, setError]\n )\n\n const handleMoveType = useCallback(\n (attachment: PastProjectAttachment) => {\n return async () => await moveProject({ attachment, stage: stage == 'before' ? 'after' : 'before' })\n },\n [stage, moveProject]\n )\n\n const handleMoveProject = useCallback(\n (attachment: PastProjectAttachment, project: VendorPastProject) => {\n return async () => await moveProject({ attachment, destination: project })\n },\n [moveProject]\n )\n\n return (\n
    \n
    {capitalize(stage)}
    \n
    \n \n
    \n \n {`Upload ${capitalize(stage)} Photo or Video`}\n
    \n \n \n\n {attachments.map((attachment, i) => (\n
    \n {attachment.file_type == 'photo' ? (\n \n ) : attachment.file_type == 'video' ? (\n
    \n }\n click\n >\n \n \n
    \n )}\n
    \n ))}\n {uploading && (\n
    \n
    \n \n
    \n
    \n )}\n \n\n {!!hint &&
    {hint}
    }\n \n )\n}\n\nexport default MediaGallery\n","import React, { FC } from 'react'\n\nconst VendorPhotosIllustration: FC = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n)\nexport default VendorPhotosIllustration\n","import React, { ChangeEvent, Dispatch, FC, Fragment, SetStateAction, useCallback, useMemo, useState } from 'react'\nimport cx from 'classnames'\nimport Add from '@mui/icons-material/Add'\nimport Check from '@mui/icons-material/Check'\nimport Close from '@mui/icons-material/Close'\nimport { humanize } from 'utils/formatting'\nimport Dropdown from 'components/Dropdown'\nimport { businessUnitProjectTypes, businessUnitProjectTypeToLabel } from 'store/vendors/consts'\n\ninterface ProjectTypesPickerProps {\n className?: string\n kind?: 'enabled' | 'alert'\n hint?: string\n selectedProjects: string[]\n setSelectedProjects: Dispatch>\n}\n\nconst ProjectTypesPicker: FC = ({\n selectedProjects,\n setSelectedProjects,\n kind = 'enabled',\n hint,\n}) => {\n const [query, setQuery] = useState('')\n\n const filteredProjectTypes = useMemo(() => {\n return businessUnitProjectTypes.filter((x) => x.toLowerCase().includes(query)).sort()\n }, [query])\n\n const handleChangeQuery = useCallback((e: ChangeEvent) => setQuery(e.target.value), [])\n const handleClickProject = useCallback(\n (projectType: string) => () =>\n setSelectedProjects((existing) =>\n existing.includes(projectType) ? existing.filter((x) => x !== projectType) : [...existing, projectType]\n ),\n [setSelectedProjects]\n )\n const handleClickRemoveProject = useCallback(\n (projectType: string) => () => setSelectedProjects((existing) => existing.filter((x) => x !== projectType)),\n [setSelectedProjects]\n )\n\n return (\n
    \n
    \n \n \n
    \n {filteredProjectTypes.map((projectType) => {\n const selected = selectedProjects.includes(projectType)\n return (\n \n {businessUnitProjectTypeToLabel[projectType] || humanize(projectType)}\n {!!selected && }\n \n )\n })}\n
    \n
    \n }\n >\n \n \n \n \n {selectedProjects.map((projectType) => (\n \n
    \n
    \n {businessUnitProjectTypeToLabel[projectType] || humanize(projectType)}\n
    \n \n
    \n\n \n
    \n ))}\n
    \n {/* hidden input for client-side validation */}\n \n {!!hint &&
    {hint}
    }\n \n )\n}\n\nexport default ProjectTypesPicker\n","import React, { FC, FormEvent, useCallback, useEffect, useMemo, useRef, useState, DragEvent } from 'react'\nimport cx from 'classnames'\nimport { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil'\nimport Close from '@mui/icons-material/Close'\nimport Info from '@mui/icons-material/Info'\nimport PhotoCamera from '@mui/icons-material/PhotoCamera'\nimport RadioButtonChecked from '@mui/icons-material/RadioButtonChecked'\nimport RadioButtonUnchecked from '@mui/icons-material/RadioButtonUnchecked'\nimport Warning from '@mui/icons-material/Warning'\nimport { patchFormData, postFormData } from 'utils/fetch'\nimport { track } from 'utils/analytics'\nimport { PastProjectAttachment, VendorOpportunity, VendorPastProject } from 'store/vendors/types'\nimport { vendorMeState, vendorOpportunitiesState, vendorPastProjectsState } from 'store/vendors/state'\nimport { useLoadVendorOpportunities } from 'store/vendors/hooks'\nimport CoreComboBox from 'components/Core/CoreComboBox'\nimport CoreButton from 'components/Core/CoreButton'\nimport CoreInput from 'components/Core/CoreInput'\nimport CoreDivider from 'components/Core/CoreDivider'\nimport Spinner from 'components/Spinner'\nimport FormField from '../components/FormField'\nimport MediaGallery from '../components/MediaGallery'\nimport VendorPhotosIllustration from './VendorPhotosIllustration'\nimport ProjectTypesPicker from '../components/ProjectTypesPicker'\nimport GreenGradientBg from 'images/vendors/green-gradient-bg.png'\nimport { fetchVendorContactUserMe } from 'store/vendors/api'\n\ninterface EditPastProjectModalContentProps {\n pastProject: VendorPastProject | null\n onClose: (status: 'added' | 'updated' | null) => void\n fetchingProjects: boolean\n onTipsClick: () => void\n className?: string\n}\n\nconst EditPastProjectModalContent: FC = ({\n onClose,\n pastProject,\n fetchingProjects,\n onTipsClick,\n className,\n}) => {\n const [error, setError] = useState(false)\n const [validationErrors, setValidationErrors] = useState>({})\n const vendorOpportunities = useRecoilValue(vendorOpportunitiesState)\n const [realmLead, setRealmLead] = useState(null)\n const [startDate, setStartDate] = useState('')\n const [address, setAddress] = useState('')\n const [selectedProjects, setSelectedProjects] = useState([])\n const [squareFootage, setSquareFootage] = useState('')\n const [totalCostInDollars, setTotalCostInDollars] = useState('')\n const [beforeAttachments, setBeforeAttachments] = useState([])\n const [afterAttachments, setAfterAttachments] = useState([])\n const [uploadingBeforeMedia, setUploadingBeforeMedia] = useState(false)\n const [uploadingAfterMedia, setUploadingAfterMedia] = useState(false)\n const setMe = useSetRecoilState(vendorMeState)\n\n const uploadingMedia = useMemo(\n () => uploadingBeforeMedia || uploadingAfterMedia,\n [uploadingBeforeMedia, uploadingAfterMedia]\n )\n\n const allAttachments = [...beforeAttachments, ...afterAttachments]\n\n useEffect(() => {\n if (!pastProject) return\n\n setRealmLead(!!pastProject.sfdc_opportunity_ref)\n setStartDate(pastProject.start_date || '')\n setAddress(pastProject.address || '')\n setSelectedProjects(pastProject.project_types || [])\n setSquareFootage(pastProject?.square_footage?.toString() || '')\n setTotalCostInDollars(pastProject?.total_cost_in_dollars?.toString() || '')\n setBeforeAttachments(pastProject?.before_media || [])\n setAfterAttachments(pastProject?.after_media || [])\n }, [pastProject, error])\n\n const [pastProjects, setPastProjects] = useRecoilState(vendorPastProjectsState)\n\n const [fetchingOpps, setFetchingOpps] = useState(!vendorOpportunities)\n const [saving, setSaving] = useState(false)\n\n useLoadVendorOpportunities(fetchingOpps, setFetchingOpps)\n\n const fetching = fetchingOpps || fetchingProjects || saving\n\n const formRef = useRef(null)\n\n const handleClickRealmLead = useCallback((value: boolean | null) => () => setRealmLead(value), [])\n\n const handleClickSave = useCallback(() => formRef.current?.requestSubmit(), [])\n\n const handleClickClose = useCallback(() => {\n track('click', { code: 'close', feature: 'EditPastProjectModal' })\n onClose(null)\n }, [onClose])\n\n const awardedVendorOpps = useMemo(\n () => vendorOpportunities?.filter((e) => e.group == 'Awarded') || [],\n [vendorOpportunities]\n )\n\n const handleDrop = useCallback((e: DragEvent) => {\n e.preventDefault()\n e.stopPropagation()\n }, [])\n\n // only show awarded opps\n // don't show opps already associated with a past project\n const availableVendorOps = useMemo(() => {\n const claimedOpps = pastProjects\n ? Object.values(pastProjects)\n .filter((x) => x.id !== pastProject?.id)\n .map((x) => x.sfdc_opportunity_ref)\n : []\n\n return awardedVendorOpps.filter((opp) => !claimedOpps.includes(opp.opportunity_id))\n }, [awardedVendorOpps, pastProjects, pastProject])\n\n const handleSubmit = useCallback(\n async (e: FormEvent) => {\n setSaving(true)\n setError(false)\n e.preventDefault()\n try {\n const formData = new FormData(e.target as HTMLFormElement)\n const newBeforePhotos = (formData.getAll('vendor_past_project[before_media][]') || []) as File[]\n const newAfterPhotos = (formData.getAll('vendor_past_project[after_media][]') || []) as File[]\n const allNewPhotos = [...newBeforePhotos, ...newAfterPhotos]\n\n const opportunityId = formData.get('vendor_past_project[sfdc_opportunity_ref]')?.toString()\n const customerName =\n opportunityId && vendorOpportunities\n ? vendorOpportunities.find((x) => x.opportunity_id == opportunityId)?.client?.name\n : null\n\n track('click', {\n code: 'submit',\n feature: 'EditPastProjectModal',\n flexfield_1: {\n mode: pastProject ? 'update' : 'create',\n newPhotoCount: allNewPhotos.length,\n newBeforePhotoCount: newBeforePhotos.length,\n newAfterPhotoCount: newAfterPhotos.length,\n address,\n customerName,\n fileTypes: allNewPhotos.map((x) => x.type).join(';'),\n },\n })\n\n const response = await (pastProject\n ? patchFormData(`/vendors/api/past_projects/${pastProject.id}`, formData)\n : postFormData('/vendors/api/past_projects', formData))\n\n if (response.isError) {\n setError(true)\n const { errors: rawErrors } = response.jsonBody as unknown as { errors: Record }\n const validationErrors = Object.keys(rawErrors).reduce((previousValue, currentValue) => {\n return { ...previousValue, [currentValue]: rawErrors[currentValue].join(', ') }\n }, {})\n setValidationErrors(validationErrors)\n console.error(response.jsonBody)\n } else {\n const newProject = response.jsonBody as VendorPastProject\n setPastProjects((existing) => ({ ...existing, [newProject.id]: newProject }))\n const newMe = await fetchVendorContactUserMe()\n setMe(newMe)\n onClose(pastProject ? 'updated' : 'added')\n }\n } catch (e) {\n console.error(e)\n setError(true)\n }\n setSaving(false)\n },\n [pastProject, setPastProjects, onClose, address, vendorOpportunities, setMe]\n )\n\n const queryVendorOpps = useCallback(\n (query: string) => {\n return availableVendorOps.filter((opp) => {\n if (opp.property.address_line_1.toLowerCase().includes(query.toLowerCase())) return true\n if (opp.client.name.toLowerCase().includes(query.toLowerCase())) return true\n\n return false\n })\n },\n [availableVendorOps]\n )\n\n const findVendorOpp = useCallback(\n async (id: string) => {\n if (!awardedVendorOpps) return null\n\n return awardedVendorOpps.find((opp) => opp.opportunity_id == id) || null\n },\n [awardedVendorOpps]\n )\n\n const mapVendorPrediction = useCallback((prediction: VendorOpportunity) => {\n return {\n title: prediction.client.name,\n value: prediction.opportunity_id,\n subtitle: prediction.property.address_line_1,\n }\n }, [])\n\n const handleChangePrediction = useCallback((prediction: VendorOpportunity | undefined) => {\n const newAddress = prediction\n ? [\n prediction.property.address_line_1,\n prediction.property.address_city,\n prediction.property.address_zip,\n prediction.property.address_state,\n ]\n .filter(Boolean)\n .join(', ')\n : ''\n if (newAddress) setAddress(newAddress)\n }, [])\n\n const pricePerSquareFoot = useMemo(() => {\n if (\n !selectedProjects.includes('adu') &&\n !selectedProjects.includes('new_build') &&\n !selectedProjects.includes('addition')\n )\n return\n\n if (!squareFootage) return\n if (!totalCostInDollars) return\n\n return (parseFloat(totalCostInDollars) / parseFloat(squareFootage)).toFixed(0)\n }, [selectedProjects, squareFootage, totalCostInDollars])\n\n return (\n
    \n
    \n \n {'Close modal'}\n \n \n
    \n {pastProject ? `Edit ${pastProject.address || pastProject.name}` : 'Add Renovation Photos'}\n
    \n
    \n {uploadingMedia && (\n
    \n \n
    \n )}\n \n
    \n {error ? (\n
    \n \n {`An error ocurred${validationErrors['base'] ? `: ${validationErrors['base']}` : ', please try again.'}`}\n
    \n ) : (\n \n \n
    \n {'Upload as many photos as possible. We’ll carefully curate them to showcase the very best to customers.'}\n
    \n
    \n )}\n {fetching ? (\n
    \n \n
    \n ) : (\n
    \n
    \n
    \n
    {'Renovation Details'}
    \n
    \n \n
    \n {\n 'We will not share this info outside of Realm. Matched Realm homeowners might see some of this information.'\n }\n
    \n
    \n
    \n \n
    \n \n \n
    \n {realmLead === false ? (\n \n ) : (\n \n )}\n
    \n
    {'No'}
    \n \n
    \n
    \n \n \n \n\n \n {realmLead ? (\n \n ) : (\n \n )}\n \n \n
    \n \n \n
    \n
    \n \n \n \n \n \n \n \n \n \n {pricePerSquareFoot && (\n \n \n \n )}\n \n
    \n \n
    \n \n
    \n {'Specify all project types that apply to this address/renovation.'}\n
    \n
    \n
    \n
    \n
    \n \n
    {'Renovation Photos'}
    \n
    \n \n
    {'See tips for capturing great before & after photos'}
    \n \n {'See tips'}\n \n
    \n \n {/* hidden input for client-side validation */}\n a.file_type).join(';')}\n readOnly\n required={!pastProject}\n />\n \n {/* hidden input for client-side validation */}\n a.file_type).join(';')}\n readOnly\n required={!pastProject}\n />\n \n )}\n
    \n )\n}\n\nexport default EditPastProjectModalContent\n","import React, { FC, useCallback, useState } from 'react'\nimport cx from 'classnames'\nimport ArrowBack from '@mui/icons-material/ArrowBack'\nimport WbSunny from '@mui/icons-material/WbSunny'\nimport CenterFocusStrong from '@mui/icons-material/CenterFocusStrong'\nimport ScreenRotation from '@mui/icons-material/ScreenRotation'\nimport ThreeSixty from '@mui/icons-material/ThreeSixty'\nimport { track } from 'utils/analytics'\n\ntype PhotosTipsWalkthroughProps = {\n onBack: () => void\n className?: string\n}\n\nconst PhotosTipsWalkthrough: FC = ({ onBack, className }) => {\n const [activeTab, setActiveTab] = useState<'interior' | 'exterior'>('interior')\n\n const setActiveTabToInterior = useCallback(() => {\n track('click', { code: 'tab', feature: 'interior' })\n setActiveTab('interior')\n }, [])\n\n const setActiveTabToExterior = useCallback(() => {\n track('click', { code: 'tab', feature: 'interior' })\n setActiveTab('exterior')\n }, [])\n\n return (\n
    \n
    \n \n {'Close tips'}\n \n \n
    {'Tips for Capturing Great Before & After Photos'}
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    {'Use natural light'}
    \n
    \n {\"Ideally shoot during the day, but use overhead lights if it's too dim.\"}\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    {'Get clear images'}
    \n
    {'Ensure photos aren’t blurry.'}
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    {'Shoot in portrait and landscape'}
    \n
    \n {'Shoot both portrait (vertical) and landscape (horizontal) versions of the shots.'}\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    {'Shoot from multiple angles'}
    \n
    \n {\n 'Capture the space from various perspectives, including a wide shot of the whole space, shots from each side, and some close ups.'\n }\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n {'Interior Example'}\n \n \n {'Exterior Example'}\n \n
    \n {activeTab == 'interior' ? (\n
    \n
    \n
    \n
    \n {'Get a wide shot that captures the whole space – from the left and right'}\n
    \n
    \n {'This is the most important shot. Try to frame it so you’re seeing some of the floor and ceiling.'}\n
    \n
    \n \n
    \n
    \n
    \n
    \n {'Get a few close up shots'}\n
    \n
    \n {'Highlight specific textures, patterns, or unique elements that make the space stand out.'}\n
    \n
    \n \n
    \n
    \n
    \n
    \n {'Get a straight-on shot of each side of the room'}\n
    \n
    \n {\n 'Position yourself directly in front of each wall to take a straight-on photo of every side of the room.'\n }\n
    \n
    \n \n
    \n
    \n ) : (\n
    \n
    \n
    \n
    \n {'Get a wide shot that captures the whole space – from the left and right'}\n
    \n
    {'This is the most important shot.'}
    \n
    \n \n
    \n
    \n
    \n
    \n {'Get a few close up shots, capturing any special details'}\n
    \n
    \n {'Highlight specific textures, patterns, or unique elements that make the space stand out.'}\n
    \n
    \n \n
    \n
    \n
    \n
    \n {'Get a straight-on shot of each side of the space'}\n
    \n
    \n {\n 'Position yourself directly in front of each wall to take a straight-on photo of every side of the space.'\n }\n
    \n
    \n \n
    \n
    \n )}\n
    \n
    \n
    \n )\n}\n\nexport default PhotosTipsWalkthrough\n","import React, { FC, useCallback, useRef, useState } from 'react'\nimport { track } from 'utils/analytics'\nimport { VendorPastProject } from 'store/vendors/types'\nimport BaseModal from 'components/BaseModal'\nimport EditPastProjectModalContent from './EditPastProjectModalContent'\nimport PhotosTipsWalkthrough from './PhotosTipsWalkthrough'\n\ninterface EditPastProjectModalProps {\n open: boolean\n setOpen: (value: boolean) => void\n pastProject: VendorPastProject | null\n onClose: (status: 'added' | 'updated' | null) => void\n fetchingProjects: boolean\n}\n\nconst EditPastProjectModal: FC = ({\n open,\n setOpen,\n onClose,\n pastProject,\n fetchingProjects: fetchingProjects,\n}) => {\n const [showingTips, setShowingTips] = useState(false)\n const dialogPanelRef = useRef(null)\n\n const startShowingTips = useCallback(() => {\n dialogPanelRef.current?.scroll(0, 0)\n track('click', { code: 'open', feature: 'PhotosTipsWalkthrough' })\n setShowingTips(true)\n }, [])\n\n const stopShowingTips = useCallback(() => {\n dialogPanelRef.current?.scroll(0, 0)\n track('click', { code: 'close', feature: 'PhotosTipsWalkthrough' })\n setShowingTips(false)\n }, [])\n\n return (\n \n \n \n \n )\n}\n\nexport default EditPastProjectModal\n","import React, { FC } from 'react'\n\nconst ReviewIllustration: FC = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n)\n\nexport default ReviewIllustration\n","import React, { FC } from 'react'\n\nconst ImagesIllustration: FC = () => (\n \n \n \n \n \n \n \n \n)\n\nexport default ImagesIllustration\n","import React, { FC } from 'react'\n\nconst UpdateIllustration: FC = () => (\n \n \n \n \n \n \n)\n\nexport default UpdateIllustration\n","import React, { FC } from 'react'\n\nconst SuccessIllustration: FC = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n)\n\nexport default SuccessIllustration\n","import React, { FC, useCallback } from 'react'\nimport { useRecoilState } from 'recoil'\nimport CheckBox from '@mui/icons-material/CheckBox'\nimport CheckBoxOutlineBlank from '@mui/icons-material/CheckBoxOutlineBlank'\nimport { vendorShowAddedPastProjectsSuccessDialogState } from 'store/vendors/state'\nimport ReviewIllustration from 'pages/Vendor/Profile/ReviewIllustration'\nimport ImagesIllustration from 'pages/Vendor/Profile/ImagesIllustration'\nimport UpdateIllustration from 'pages/Vendor/Profile/UpdateIllustration'\nimport SuccessIllustration from 'pages/Vendor/Profile/SuccessIllustration'\nimport BaseModal from 'components/BaseModal'\nimport CoreButton from 'components/Core/CoreButton'\nimport CoreText from 'components/Core/CoreText'\n\ninterface SuccessModalProps {\n open: boolean\n setOpen: (value: boolean) => void\n onClose: () => void\n}\n\nconst SuccessModal: FC = ({ open, setOpen, onClose }) => {\n const [showAgain, setShowAgain] = useRecoilState(vendorShowAddedPastProjectsSuccessDialogState)\n const handleClickCheckbox = useCallback(() => setShowAgain((val) => !val), [setShowAgain])\n\n return (\n \n
    \n
    \n \n {'Amazing!'}\n \n {'Your project photos have been added'}\n \n
    \n
    \n
    \n \n \n {'We’ll review your photos and select the best to showcase to homeowners.'}\n \n
    \n
    \n \n \n {\n \"For your next matches, we'll show your projects that align directly with the homeowner’s specific project needs.\"\n }\n \n
    \n
    \n \n \n {'Keep your profile and projects up-to-date to attract and impress more homeowners.'}\n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n )\n}\n\nexport default SuccessModal\n","import Spinner from 'components/Spinner'\nimport React, { FC, useCallback, useEffect, useState } from 'react'\nimport { useRecoilValue } from 'recoil'\nimport { VendorPastProject } from 'store/vendors/types'\nimport { vendorPastProjectsState, vendorShowAddedPastProjectsSuccessDialogState } from 'store/vendors/state'\nimport { useLoadPastProjects } from 'store/vendors/hooks'\nimport cx from 'classnames'\nimport PastProjectGridItem from 'pages/Vendor/Profile/components/PastProjectGridItem'\nimport { Link, Route, Switch, useHistory, useRouteMatch } from 'react-router-dom'\nimport EditPastProjectModal from 'pages/Vendor/Profile/EditPastProjectModal'\nimport SuccessModal from 'pages/Vendor/Profile/SuccessModal'\nimport GridItem from 'pages/Vendor/Profile/components/GridItem'\nimport Add from '@mui/icons-material/Add'\n\ninterface PastProjectsProps {\n className?: string\n fetching: boolean\n setFetching: (fetching: boolean) => void\n}\n\nconst PastProjectsGrid: FC = ({ className, fetching, setFetching }) => {\n const vendorPastProjects = useRecoilValue(vendorPastProjectsState)\n const [addModalOpen, setAddModalOpen] = useState(false)\n const [successModalOpen, setSuccessModalOpen] = useState(false)\n const showSuccessModal = useRecoilValue(vendorShowAddedPastProjectsSuccessDialogState)\n\n const [projectToEdit, setProjectToEdit] = useState(null)\n const matchAdd = useRouteMatch<{ past_project_id?: string }>('/vendors/profile/past_projects/:past_project_id')\n const matchSuccess = useRouteMatch<{ past_project_id?: string }>(\n '/vendors/profile/past_projects/:past_project_id/success'\n )\n const history = useHistory()\n\n useLoadPastProjects(fetching, setFetching)\n\n useEffect(() => {\n const addId = matchAdd?.params?.past_project_id\n const successId = matchSuccess?.params?.past_project_id\n\n const projectId = successId ?? addId\n\n if (!projectId) {\n setProjectToEdit(null)\n setAddModalOpen(false)\n setSuccessModalOpen(false)\n return\n }\n\n const project = vendorPastProjects ? vendorPastProjects[parseInt(projectId)] || null : null\n\n setProjectToEdit(project)\n setAddModalOpen(!successId) // If it’s not the success route, open the add modal\n setSuccessModalOpen(!!successId) // If it’s the success route, open success modal\n }, [matchAdd?.params, matchSuccess?.params, vendorPastProjects])\n\n const handleCloseAddModal = useCallback(\n (result: 'added' | 'updated' | null) => {\n const next =\n result == 'added' && showSuccessModal && projectToEdit\n ? `/vendors/profile/past_projects/${projectToEdit}/success`\n : '/vendors/profile'\n setProjectToEdit(null)\n history.push(next)\n },\n [history, showSuccessModal, projectToEdit]\n )\n\n const handleCloseSuccessModal = useCallback(() => {\n history.push('/vendors/profile')\n }, [history])\n\n const renderAddModal = useCallback(() => {\n return (\n \n )\n }, [addModalOpen, setAddModalOpen, projectToEdit, handleCloseAddModal, fetching])\n\n const renderSuccessModal = useCallback(() => {\n return \n }, [successModalOpen, setSuccessModalOpen, handleCloseSuccessModal])\n\n return (\n <>\n
    \n {vendorPastProjects == null && fetching ? (\n
    \n \n
    \n ) : vendorPastProjects == null ? (\n
    \n {'An error occurred, please try again.'}\n
    \n ) : (\n
    \n \n \n \n \n \n {Object.values(vendorPastProjects)\n .sort((a, b) => a.id - b.id)\n .map((pastProject) => (\n \n ))}\n
    \n )}\n
    \n\n \n \n \n \n \n \n )\n}\n\nexport default PastProjectsGrid\n","import React, { FC, Fragment } from 'react'\nimport { businessUnitProjectTypeToLabel } from 'store/vendors/consts'\nimport { VendorPastProject } from 'store/vendors/types'\nimport cx from 'classnames'\n\ninterface PortfolioStatsChartProps {\n pastProjects: Record\n allProjectTypes: string[]\n}\n\nconst PortfolioStatsChart: FC = ({ pastProjects, allProjectTypes }) => {\n return (\n \n {allProjectTypes.map((projectType) => {\n const count = Object.values(pastProjects).reduce((memo, pastProject) => {\n if (pastProject.project_types.includes(projectType)) {\n memo = memo + 1\n }\n return memo\n }, 0)\n\n return (\n \n
    {businessUnitProjectTypeToLabel[projectType]}
    \n
    = 2 })}>\n {count}\n {'/2 projects'}\n
    \n
    \n )\n })}\n
    \n )\n}\n\nexport default PortfolioStatsChart\n","import React, { FC, useCallback } from 'react'\nimport { VendorPastProject } from 'store/vendors/types'\nimport BaseModal from 'components/BaseModal'\nimport PortfolioStatsChart from 'pages/Vendor/Profile/PortfolioStats/PortfolioStatsChart'\nimport ChevronLeft from '@mui/icons-material/ChevronLeft'\nimport { Link } from 'react-router-dom'\n\ninterface PortfolioStatsModalProps {\n open: boolean\n setOpen: (value: boolean) => void\n pastProjects: Record\n allProjectTypes: string[]\n}\n\nconst PortfolioStatsModal: FC = ({ open, setOpen, pastProjects, allProjectTypes }) => {\n const handleClickClose = useCallback(() => {\n setOpen(false)\n }, [setOpen])\n\n return (\n \n
    \n
    \n \n {'Close modal'}\n \n \n
    {'Portfolio Stats '}
    \n
    \n
    \n
    \n {\n 'Upload at least two projects per type to stay eligible for leads. If you no longer offer these services, update your business settings '\n }\n \n {'here'}\n \n {'.'}\n
    \n
    \n \n
    \n
    \n \n )\n}\n\nexport default PortfolioStatsModal\n","import React, { FC, Fragment, useCallback, useMemo, useState } from 'react'\nimport { VendorPastProject, VendorSettings } from 'store/vendors/types'\nimport cx from 'classnames'\nimport CoreDivider from 'components/Core/CoreDivider'\nimport { Link } from 'react-router-dom'\nimport Error from '@mui/icons-material/Error'\nimport PlaylistAddCheck from '@mui/icons-material/PlaylistAddCheck'\nimport ChevronRight from '@mui/icons-material/ChevronRight'\nimport PortfolioStatsChart from 'pages/Vendor/Profile/PortfolioStats/PortfolioStatsChart'\nimport PortfolioStatsModal from 'pages/Vendor/Profile/PortfolioStats/PortfolioStatsModal'\n\ninterface PortfolioStatsProps {\n pastProjects: Record\n vendorSettings: VendorSettings\n}\n\nconst PortfolioStats: FC = ({ pastProjects, vendorSettings }) => {\n const [modalOpen, setModalOpen] = useState(false)\n\n const allProjectTypes = useMemo(\n () =>\n vendorSettings.business_units.reduce((memo, businessUnit) => {\n memo = [\n ...memo,\n ...businessUnit.project_types.filter(\n (projectType) =>\n memo.includes(projectType) == false &&\n ['hvac', 'electrical', 'solar', 'roof', 'commercial'].includes(projectType) == false\n ),\n ]\n return memo\n }, [] as string[]),\n [vendorSettings.business_units]\n )\n\n const projectTypesMissing = useMemo(() => {\n return allProjectTypes.filter((projectType) => {\n const count = Object.values(pastProjects).reduce((memo, pastProject) => {\n if (pastProject.project_types.includes(projectType)) {\n memo = memo + 1\n }\n return memo\n }, 0)\n\n return count < 2\n })\n }, [allProjectTypes, pastProjects])\n\n const handleExpand = useCallback(() => {\n setModalOpen(true)\n }, [])\n\n return (\n \n \n \n {projectTypesMissing.length ? : }\n
    \n
    \n
    \n {'Portfolio Stats'}\n
    \n {!!projectTypesMissing.length && (\n
    \n {`${projectTypesMissing.length} project types missing photos`}{' '}\n
    \n )}\n
    \n
    \n \n
    \n
    \n {\n 'Upload at least two projects per type to stay eligible for leads. If you no longer offer these services, update your business settings '\n }\n \n {'here'}\n \n {'.'}\n
    \n \n
    \n \n
    \n \n \n \n )\n}\n\nexport default PortfolioStats\n","import React, { FC, useState } from 'react'\nimport { useRecoilValue } from 'recoil'\nimport StoreMallDirectory from '@mui/icons-material/StoreMallDirectory'\nimport { vendorPastProjectsState, vendorSettingsState } from 'store/vendors/state'\nimport { useLoadVendorSettings } from 'store/vendors/hooks'\nimport { useNewFeatureJourney } from 'store/vendors/hooks/nfluxdrivers/20250121-business-profile'\nimport VendorProfileIllustration from 'pages/Vendor/Profile/VendorProfileIllustration'\nimport PageTitle from 'components/PageTitle'\nimport PastProjectsGrid from 'pages/Vendor/Profile/PastProjectsGrid'\nimport PortfolioStats from 'pages/Vendor/Profile/PortfolioStats'\n\nconst VendorProfile: FC = () => {\n const vendorSettings = useRecoilValue(vendorSettingsState)\n const vendorPastProjects = useRecoilValue(vendorPastProjectsState)\n const [fetchingPastProjects, setFetchingPastProjects] = useState(vendorPastProjects == null)\n\n useLoadVendorSettings()\n useNewFeatureJourney(vendorSettings != null && !fetchingPastProjects)\n\n // show loading maybe?\n if (!vendorSettings) return null\n\n return (\n
    \n \n
    \n
    \n
    \n {\n 'Upload photos of recent projects so that we can showcase the work that best applies to each new customer.'\n }\n
    \n \n
    \n
    {'Showcase your business to homeowners on Realm App.'}
    \n
    {'Use high-quality photos and a clear, professional description to make a strong impression.'}
    \n
    \n
    \n
    \n
    \n {vendorSettings.logo_url ? (\n \n ) : (\n \n )}\n {/* TODO: enable editing\n \n \n \n */}\n
    \n
    \n
    \n
    {vendorSettings?.name}
    \n
    \n {vendorSettings?.bio}\n
    \n
    \n {/* TODO: enable editing\n \n */}\n
    \n
    \n {!fetchingPastProjects && !!vendorPastProjects && (\n
    \n \n
    \n )}\n\n
    \n \n
    \n
    \n
    \n )\n}\n\nexport default VendorProfile\n","import { useMemo, useRef } from 'react'\nimport type { Driver, DriveStep } from 'driver.js'\nimport { useRecoilValue } from 'recoil'\nimport { vendorMeState } from 'store/vendors/state'\nimport { useNewFeatureJourneyEffect } from './common'\n\nexport const useNewFeatureJourney = (ready: boolean) => {\n const feature = 'business-profile'\n const startDate = '2025-01-21'\n const endDate = '2025-02-28'\n const me = useRecoilValue(vendorMeState)\n const driverObj = useRef()\n\n const steps = useMemo(() => {\n if (!me || !ready) return null\n\n return [\n {\n element: '#add-past-project',\n popover: {\n title: 'Upload before and after photos',\n side: 'right',\n description:\n 'Add photos of projects you’ve completed on or off of Realm. A rich project portfolio can increase your chance of winning a contract.',\n },\n } as DriveStep,\n ].filter(Boolean) as DriveStep[]\n }, [me, ready])\n\n useNewFeatureJourneyEffect({ feature, startDate, endDate, driverObj, me, ready, steps })\n}\n","import React, { FC, useCallback } from 'react'\nimport cx from 'classnames'\nimport { BusinessUnit } from 'store/vendors/types'\n\ninterface BusinessUnitTabButtonProps {\n businessUnit: BusinessUnit\n selected: boolean\n setBusinessUnitId: (id: number) => void\n index: number\n}\n\nconst BusinessUnitTabButton: FC = ({\n businessUnit,\n selected,\n setBusinessUnitId,\n index,\n}) => {\n const handleClick = useCallback(() => {\n setBusinessUnitId(businessUnit.id)\n }, [businessUnit, setBusinessUnitId])\n\n return (\n \n {businessUnit.name || `Crew #${index + 1}`}\n \n )\n}\n\nexport default BusinessUnitTabButton\n","import React, { FC, useEffect, useRef } from 'react'\nimport mapboxgl, { LngLatLike } from 'mapbox-gl'\nimport MapboxDraw from '@mapbox/mapbox-gl-draw'\nimport * as turf from '@turf/turf'\nimport type { FeatureCollection, Polygon } from 'geojson'\n\ntype ServiceAreaMapProps = {\n serviceAreaAsFeatureCollection: FeatureCollection\n}\n\nconst ServiceAreaMap: FC = ({ serviceAreaAsFeatureCollection }) => {\n const mapRef = useRef(null)\n const { mapboxglAccessToken } = document.body.dataset\n\n useEffect(() => {\n if (!mapboxglAccessToken) return\n if (!mapRef.current) return\n if (!serviceAreaAsFeatureCollection) return\n\n const featureCollection = serviceAreaAsFeatureCollection\n mapboxgl.accessToken = mapboxglAccessToken\n const map = new mapboxgl.Map({\n container: mapRef.current,\n style: 'mapbox://styles/mapbox/streets-v12',\n zoom: 7,\n maxZoom: 9,\n minZoom: 5,\n })\n\n const draw = new MapboxDraw({\n displayControlsDefault: false,\n controls: {},\n })\n map.addControl(draw)\n\n map.on('load', () => {\n const bbox = turf.bbox(featureCollection)\n const bounds: [LngLatLike, LngLatLike] = [\n [bbox[0], bbox[1]], // southwest corner\n [bbox[2], bbox[3]], // northeast corner\n ]\n map.fitBounds(bounds, { duration: 0, padding: 20, maxZoom: 9, minZoom: 5 })\n draw.add(featureCollection)\n })\n\n return () => {\n map.remove()\n }\n }, [serviceAreaAsFeatureCollection, mapboxglAccessToken])\n\n return
    \n}\n\nexport default ServiceAreaMap\n","import React, { FC, useCallback } from 'react'\nimport { Control, useController } from 'react-hook-form'\nimport { businessUnitProjectTypes } from 'store/vendors/consts'\nimport { humanize } from 'utils/formatting'\nimport CoreInput from 'components/Core/CoreInput'\nimport { BusinessUnitSettingsFields } from './types'\n\ntype ProjectTypesCheckboxProps = {\n projectType: string\n checked: boolean\n onChangeProjectType: (projectType: string, checked: boolean) => void\n}\n\nconst ProjectTypesCheckbox: FC = ({ projectType, checked, onChangeProjectType }) => {\n const handleChange = useCallback(\n (event) => {\n onChangeProjectType(projectType, event.target.checked)\n },\n [projectType, onChangeProjectType]\n )\n\n return (\n \n )\n}\n\ntype ProjectTypesCheckboxesProps = {\n control: Control\n}\n\nconst ProjectTypesCheckboxes: FC = ({ control }) => {\n const { field } = useController({ control, name: 'project_types' })\n\n const handleChangeProjectType = useCallback(\n (projectType: string, checked: boolean) => {\n let valueCopy\n if (checked && !field.value.includes(projectType)) {\n valueCopy = [...field.value]\n valueCopy.push(projectType)\n } else if (!checked && field.value.includes(projectType)) {\n valueCopy = field.value.filter((e) => e != projectType)\n }\n field.onChange(valueCopy)\n },\n [field]\n )\n\n return (\n
    \n {businessUnitProjectTypes.map((projectType) => (\n \n ))}\n
    \n )\n}\n\nexport default ProjectTypesCheckboxes\n","import React, { FC, useCallback, useEffect, useState } from 'react'\nimport { SubmitHandler, useForm } from 'react-hook-form'\nimport { useSetRecoilState } from 'recoil'\nimport AutoAwesome from '@mui/icons-material/AutoAwesome'\nimport Close from '@mui/icons-material/Close'\nimport { track } from 'utils/analytics'\nimport { useAddressController } from 'store/vendors/hooks'\nimport { alertState } from 'recoil/alert'\nimport { BusinessUnit, VendorSettings } from 'store/vendors/types'\nimport { vendorSettingsState } from 'store/vendors/state'\nimport { updateVendorSettings } from 'store/vendors/api'\nimport BaseModal from 'components/BaseModal'\nimport CoreInput from 'components/Core/CoreInput'\nimport CoreButton from 'components/Core/CoreButton'\nimport { BusinessUnitSettingsFields } from './types'\nimport ProjectTypesCheckboxes from './ProjectTypesCheckBoxes'\n\ntype EditGeneralSettingsModalProps = {\n businessUnit: BusinessUnit\n open: boolean\n setOpen: (open: boolean) => void\n}\n\nconst EditGeneralSettingsModal: FC = ({ businessUnit, open, setOpen }) => {\n const [submitting, setSubmitting] = useState(null)\n const setVendorSettings = useSetRecoilState(vendorSettingsState)\n const setAlert = useSetRecoilState(alertState)\n\n const {\n control,\n register,\n handleSubmit: handleSubmitF,\n } = useForm({\n defaultValues: {\n id: businessUnit.id,\n name: businessUnit.name || '',\n dispatcher_id: businessUnit.dispatcher?.id || null,\n hq_address: businessUnit.hq_address || '',\n project_types: businessUnit.project_types,\n },\n })\n\n const { field: hqAddressField } = useAddressController({ name: 'hq_address', control })\n\n const handleCloseClick = useCallback(() => {\n track('click', { code: 'close', feature: 'editGeneralSettingsModal' })\n setOpen(false)\n }, [setOpen])\n\n const handleSubmit: SubmitHandler = useCallback((data) => {\n setSubmitting(data)\n }, [])\n\n useEffect(() => {\n if (!submitting) return\n\n const controller = new AbortController()\n const _ = async () => {\n try {\n const response = await updateVendorSettings(JSON.stringify(submitting), controller.signal)\n if (response.ok) {\n const newVendorSettings: VendorSettings = await response.json()\n setVendorSettings(newVendorSettings)\n setOpen(false)\n } else {\n const errorsHash = await response.json()\n const errors = Object.keys(errorsHash).reduce((a, e) => {\n a.push(`${e}: ${errorsHash[e].join(', ')}`)\n return a\n }, [] as string[])\n setAlert({ type: 'ERROR', message: `Error: ${errors.join('; ')}`, id: Date.now() })\n }\n setSubmitting(null)\n } catch (error) {\n setOpen(false)\n if (!controller.signal.aborted) {\n console.error(error)\n }\n }\n }\n _()\n\n return () => {\n controller.abort()\n }\n }, [setAlert, setOpen, setVendorSettings, submitting])\n\n return (\n \n
    \n
    {'Edit Crew Details'}
    \n \n {'Close modal'}\n \n \n
    \n
    \n
    \n \n \n \n {businessUnit.vendor_contacts.map((vendorContact) => {\n return (\n \n )\n })}\n \n \n\n
    \n
    \n {'Project Types You Service'}\n
    \n \n
    \n\n
    \n \n
    \n {\n \"You'll need to provide 2 examples of past work for each project type you service to be eligible for relevant leads.\"\n }\n
    \n
    \n\n \n
    \n
    \n
    \n )\n}\n\nexport default EditGeneralSettingsModal\n","import React, { FC, useCallback } from 'react'\nimport Close from '@mui/icons-material/Close'\nimport PinDrop from '@mui/icons-material/PinDrop'\nimport { track } from 'utils/analytics'\nimport BaseModal from 'components/BaseModal'\n\ninterface AddBusinessUnitModalProps {\n open: boolean\n setOpen: (open: boolean) => void\n}\n\nconst AddBusinessUnitModal: FC = ({ open, setOpen }) => {\n const handleCloseClick = useCallback(() => {\n track('click', { code: 'close', feature: 'addBusinessUnitModal' })\n setOpen(false)\n }, [setOpen])\n\n return (\n \n
    \n
    {'New Crew'}
    \n \n {'Close modal'}\n \n \n
    \n
    \n
    \n \n
    \n

    \n {'Contact us at '}\n \n {'vendors@realmhome.com'}\n \n {' to add a new crew.'}\n

    \n
    \n
    \n )\n}\n\nexport default AddBusinessUnitModal\n","import React, { FC, useCallback, useEffect, useState } from 'react'\n\nimport Help from '@mui/icons-material/Help'\nimport CoreInput from 'components/Core/CoreInput'\nimport ToggleSwitchButton from 'components/ToggleSwitchButton'\nimport dayjs from 'dayjs'\nimport { AvailabilityFormFields } from 'pages/Vendor/Settings/BusinessUnits/types'\nimport { SubmitHandler, useController, useForm } from 'react-hook-form'\nimport { useSetRecoilState } from 'recoil'\nimport { alertState } from 'recoil/alert'\nimport { updateVendorSettings } from 'store/vendors/api'\nimport { vendorSettingsState } from 'store/vendors/state'\nimport { BusinessUnit, VendorSettings } from 'store/vendors/types'\nimport { track } from 'utils/analytics'\n\ninterface AvailabilityFormProps {\n businessUnit: BusinessUnit\n}\n\nconst AvailabilityForm: FC = ({ businessUnit }) => {\n const [submitting, setSubmitting] = useState(null)\n const setVendorSettings = useSetRecoilState(vendorSettingsState)\n const setAlert = useSetRecoilState(alertState)\n\n const {\n control,\n setValue,\n handleSubmit: handleSubmitF,\n } = useForm({\n defaultValues: {\n id: businessUnit.id,\n self_hold: businessUnit.self_hold,\n self_hold_end_date: businessUnit.self_hold_end_date || '',\n },\n })\n\n const { field: selfHoldField } = useController({\n name: 'self_hold',\n control,\n })\n\n const { field: selfHoldEndDateField } = useController({\n name: 'self_hold_end_date',\n control,\n })\n\n const handleSubmit: SubmitHandler = useCallback(\n (data) => {\n track('click', {\n code: 'submit',\n feature: 'BusinessUnitsAvailabilityForm',\n flexfield_1: {\n selfHold: selfHoldField.value,\n businessUnitId: businessUnit.id,\n },\n })\n\n setSubmitting(data)\n },\n [businessUnit, selfHoldField.value]\n )\n\n useEffect(() => {\n if (!submitting) return\n\n const controller = new AbortController()\n const _ = async () => {\n try {\n const response = await updateVendorSettings(JSON.stringify(submitting), controller.signal)\n if (response.ok) {\n const newVendorSettings: VendorSettings = await response.json()\n setVendorSettings(newVendorSettings)\n } else {\n const errorsHash = await response.json()\n const errors = Object.keys(errorsHash).reduce((a, e) => {\n a.push(`${e}: ${errorsHash[e].join(', ')}`)\n return a\n }, [] as string[])\n setAlert({ type: 'ERROR', message: `Error: ${errors.join('; ')}`, id: Date.now() })\n }\n setSubmitting(null)\n } catch (error) {\n if (!controller.signal.aborted) {\n console.error(error)\n }\n }\n }\n _()\n\n return () => {\n controller.abort()\n }\n }, [setAlert, setVendorSettings, submitting])\n\n const handleAcceptingLeadsChange = useCallback(\n (value: boolean) => {\n const selfHold = !value\n selfHoldField.onChange(selfHold)\n\n if (!selfHold) {\n setValue('self_hold_end_date', '')\n handleSubmitF(handleSubmit)()\n }\n },\n [selfHoldField, setValue, handleSubmitF, handleSubmit]\n )\n\n const handleRefusingLeadsChange = useCallback(\n (value: string) => {\n selfHoldEndDateField.onChange(value)\n handleSubmitF(handleSubmit)()\n },\n [selfHoldEndDateField, handleSubmitF, handleSubmit]\n )\n\n return (\n
    \n
    {'Accepting new leads'}
    \n
    \n \n
    \n {!!selfHoldField.value && (\n
    \n \n
    \n \n

    \n {'If you want to pause leads for more than 90 days please '}\n \n {'Contact Us'}\n \n

    \n
    \n
    \n )}\n
    \n )\n}\n\nexport default AvailabilityForm\n","import React, { FC, useCallback, useState } from 'react'\nimport cx from 'classnames'\nimport Add from '@mui/icons-material/Add'\nimport Help from '@mui/icons-material/Help'\nimport Edit from '@mui/icons-material/Edit'\nimport People from '@mui/icons-material/People'\nimport { track } from 'utils/analytics'\nimport { humanize } from 'utils/formatting'\nimport { VendorSettings } from 'store/vendors/types'\nimport BusinessUnitTabButton from './BusinessUnitTabButton'\nimport ServiceAreaMap from './ServiceAreaMap'\nimport EditGeneralSettingsModal from './EditGeneralSettingsModal'\nimport AddBusinessUnitModal from './AddBusinessUnitModal'\nimport AvailabilityForm from 'pages/Vendor/Settings/BusinessUnits/AvailabilityForm'\n\ninterface InnerBusinessUnitsProps {\n vendorSettings: VendorSettings\n}\n\nconst InnerBusinessUnits: FC = ({ vendorSettings }) => {\n const [editModalOpen, setEditModalOpen] = useState(false)\n const [addBusinessUnitModalOpen, setAddBusinessUnitModalOpen] = useState(false)\n const [businessUnitId, setBusinessUnitId] = useState(vendorSettings.business_units[0].id)\n const businessUnit = vendorSettings.business_units.find((e) => e.id == businessUnitId)\n\n const handleEditDetailsClick = useCallback(() => {\n setEditModalOpen(true)\n }, [])\n\n const handleAddBusinessUnitClick = useCallback(() => {\n track('click', { code: 'open', feature: 'addBusinessUnitModal' })\n setAddBusinessUnitModalOpen(true)\n }, [])\n\n // show loading maybe?\n if (!vendorSettings || !businessUnit) return null\n\n return (\n
    \n {vendorSettings.business_units.length > 1 && (\n
    \n \n \n \n {vendorSettings.business_units.map((e, index) => (\n \n ))}\n
    \n )}\n
    \n
    {'Details'}
    \n \n \n
    {'Edit'}
    \n \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    {'Crew members'}
    \n
    \n
    \n
    \n {businessUnit.vendor_contacts.map((e, i) => (\n 0 }\n )}\n >\n {e.headshot_url ? (\n \n ) : (\n
    \n {e.initials}\n
    \n )}\n
    \n ))}\n
    \n \n \n
    {'Manage team'}
    \n
    \n \n
    \n
    {'Dispatcher'}
    \n
    \n
    \n {businessUnit.dispatcher\n ? businessUnit.dispatcher.full_name ||\n businessUnit.dispatcher.email ||\n businessUnit.dispatcher.display_phone_number\n : 'Not Set'}\n
    \n
    \n
    {'State'}
    \n
    \n
    {businessUnit.state}
    \n
    \n
    {'Address'}
    \n
    \n
    \n {businessUnit.hq_address || 'Not Provided'}\n
    \n
    \n {businessUnit.project_types.length > 0 ? (\n \n \n \n \n \n {businessUnit.project_types.map((projectType) => (\n \n \n \n ))}\n \n
    \n
    {'Serviced project types'}
    \n
    \n
    \n {projectType == 'adu' ? 'ADU' : projectType == 'hvac' ? 'HVAC' : humanize(projectType)}\n
    \n
    \n ) : null}\n
    \n
    \n
    {'Availability'}
    \n \n {businessUnit.service_area_as_feature_collection ? (\n <>\n
    \n
    \n
    {'Service Area'}
    \n
    \n \n

    \n {'Service area incorrect or needs to be changed? '}\n \n {'Contact Us'}\n \n

    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n ) : null}\n \n \n
    \n )\n}\n\nexport default InnerBusinessUnits\n","import React, { FC } from 'react'\nimport { useRecoilValue } from 'recoil'\nimport { vendorSettingsState } from 'store/vendors/state'\nimport { useLoadVendorSettings } from 'store/vendors/hooks'\nimport InnerBusinessUnits from './InnerBusinessUnits'\n\nconst BusinessUnits: FC = () => {\n const vendorSettings = useRecoilValue(vendorSettingsState)\n\n useLoadVendorSettings()\n\n // show loading maybe?\n if (!vendorSettings) return null\n\n return \n}\n\nexport default BusinessUnits\n","import React, { FC, useCallback } from 'react'\nimport cx from 'classnames'\nimport { useRecoilValue } from 'recoil'\nimport Edit from '@mui/icons-material/Edit'\nimport Send from '@mui/icons-material/Send'\nimport RemoveCircle from '@mui/icons-material/RemoveCircle'\nimport { TeamVendorContact } from 'store/vendors/types'\nimport { vendorMeState } from 'store/vendors/state'\nimport { useDeleteVendorContact, useInviteVendorContact } from 'store/vendors/hooks'\nimport CoreList from 'components/Core/CoreList'\nimport Spinner from 'svgs/spinner'\n\ntype ActionsMenuProps = {\n vendorContact: TeamVendorContact\n setActionsMenuOpen: (value: boolean) => void\n setEditVendorContactFormModalOpen: (value: boolean) => void\n}\n\nconst ActionsMenu: FC = ({\n vendorContact,\n setActionsMenuOpen,\n setEditVendorContactFormModalOpen,\n}) => {\n const [deletingContact, setDeletingContact] = useDeleteVendorContact(vendorContact.id)\n const [invitingContact, setInvitingContact] = useInviteVendorContact(vendorContact.id, () =>\n setActionsMenuOpen(false)\n )\n const me = useRecoilValue(vendorMeState)\n const isSelf = me?.id == vendorContact.id\n const meOwner = me?.roles.includes('owner')\n const theyOwner = vendorContact.roles.includes('owner')\n\n const editDisabled = deletingContact || invitingContact || (!meOwner && theyOwner)\n const inviteDisabled = deletingContact || invitingContact\n const deleteDisabled = deletingContact || invitingContact || isSelf || (!meOwner && theyOwner)\n\n const handleClickEdit = useCallback(() => {\n if (editDisabled) return\n\n setEditVendorContactFormModalOpen(true)\n setActionsMenuOpen(false)\n }, [editDisabled, setActionsMenuOpen, setEditVendorContactFormModalOpen])\n\n const handleClickResendInvite = useCallback(() => {\n if (inviteDisabled) return\n\n setInvitingContact(true)\n }, [inviteDisabled, setInvitingContact])\n\n const handleClickDelete = useCallback(() => {\n if (deleteDisabled) return\n\n setDeletingContact(true)\n }, [deleteDisabled, setDeletingContact])\n\n return (\n \n }\n onClick={handleClickEdit}\n />\n {['pending_activation', 'activation_failed'].includes(vendorContact.account_status) && (\n }\n onClick={handleClickResendInvite}\n />\n )}\n \n ) : (\n \n )\n }\n onClick={handleClickDelete}\n />\n \n )\n}\n\nexport default ActionsMenu\n","import React, { FC, useCallback, useState } from 'react'\nimport Add from '@mui/icons-material/Add'\nimport Remove from '@mui/icons-material/Remove'\n\nconst RolesPermissions: FC = () => {\n const [expanded, setExpanded] = useState(false)\n\n const toggleExpanded = useCallback(() => {\n setExpanded((oldExpanded) => !oldExpanded)\n }, [])\n\n return (\n
    \n \n
    {expanded ? : }
    \n
    {'View role permissions'}
    \n \n {expanded && (\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n {'Role'}\n \n {'Permission'}\n
    \n {'Owner'}\n \n
      \n
    • {'Update team members'}
    • \n
    • {'Sign contracts'}
    • \n
    \n
    \n {'Admin'}\n \n
      \n
    • {'Update team members'}
    • \n
    \n
    \n {'Billing'}\n \n
      \n
    • {'Manage and pay invoices'}
    • \n
    \n
    {'PM'}\n
      \n
    • {'Manage site visits and bid submission for assigned projects'}
    • \n
    \n
    \n
    \n )}\n
    \n )\n}\n\nexport default RolesPermissions\n","import React, { ChangeEvent, FC, useCallback, useEffect, useRef, useState } from 'react'\nimport { UseFormRegister, UseFormSetValue } from 'react-hook-form'\nimport Add from '@mui/icons-material/Add'\nimport Remove from '@mui/icons-material/Remove'\nimport { TeamVendorContact, VendorContactFields } from 'store/vendors/types'\nimport { useDeleteVendorContactHeadshot } from 'store/vendors/hooks'\nimport Spinner from 'svgs/spinner'\n\ntype VendorContactPictureFieldProps = {\n vendorContact: TeamVendorContact | null\n register: UseFormRegister\n setValue: UseFormSetValue\n fileToUpload: File | null\n setFileToUpload: (fileToUpload: File | null) => void\n}\n\nconst VendorContactPictureField: FC = ({\n vendorContact,\n register,\n setValue,\n fileToUpload,\n setFileToUpload,\n}) => {\n const [file, setFile] = useState(null)\n const [previewUrl, setPreviewUrl] = useState(null)\n const [isDragging, setIsDragging] = useState(false)\n const fileInputRef = useRef(null)\n\n const [deletingVendorContactHeadshot, setDeletingVendorContactHeadshot] = useDeleteVendorContactHeadshot(\n vendorContact?.id\n )\n\n useEffect(() => {\n if (!file) return\n\n const newPreviewUrl = URL.createObjectURL(file)\n setPreviewUrl(newPreviewUrl)\n\n return () => {\n setPreviewUrl(null)\n URL.revokeObjectURL(newPreviewUrl)\n }\n }, [file])\n\n const handleAddClick = useCallback(() => {\n if (!fileInputRef.current) return\n fileInputRef.current.click()\n }, [])\n\n const handleDragOver = useCallback((event) => {\n event.preventDefault()\n setIsDragging(true)\n }, [])\n\n const handleDragLeave = useCallback(() => {\n setIsDragging(false)\n }, [])\n\n const handleDrop = useCallback((event) => {\n event.preventDefault()\n setIsDragging(false)\n if (!fileInputRef.current) return\n const newFile = event.dataTransfer.files[0]\n if (newFile && (newFile.type === 'image/png' || newFile.type === 'image/jpeg')) {\n const dataTransfer = new DataTransfer()\n dataTransfer.items.add(newFile)\n fileInputRef.current.files = dataTransfer.files\n fileInputRef.current.dispatchEvent(new Event('change', { bubbles: true }))\n } else {\n alert('Please use a PNG or JPEG image.')\n }\n }, [])\n\n const handleFileChange = useCallback(\n (event: ChangeEvent) => {\n setValue('headshot_signed_id', undefined)\n const newFile = (event.target.files || [])[0]\n setFile(newFile)\n setFileToUpload(newFile)\n },\n [setFileToUpload, setValue]\n )\n\n const handleClear = useCallback(() => {\n setDeletingVendorContactHeadshot(true)\n }, [setDeletingVendorContactHeadshot])\n\n const handleReset = useCallback(() => {\n if (!fileInputRef.current) return\n fileInputRef.current.value = ''\n fileInputRef.current.dispatchEvent(new Event('change', { bubbles: true }))\n }, [])\n\n const fileInputRegister = register('headshot_to_upload', { onChange: handleFileChange })\n\n const handleRegister = useCallback(\n (inputElement: HTMLInputElement) => {\n fileInputRegister.ref(inputElement)\n fileInputRef.current = inputElement\n },\n [fileInputRegister]\n )\n\n return (\n \n \n \n
    \n
    \n {isDragging ? (\n
    \n {'Drop'}\n
    \n ) : previewUrl ? (\n <>\n \n \n \n \n \n ) : vendorContact?.pic_url ? (\n <>\n \n \n \n \n {deletingVendorContactHeadshot ? (\n \n ) : (\n \n )}\n \n \n ) : (\n <>\n
    \n {vendorContact?.initials}\n
    \n \n \n \n \n )}\n
    \n
    \n
    \n )\n}\n\nexport default VendorContactPictureField\n","import React, { FC, useCallback, useEffect } from 'react'\nimport { SubmitHandler, useController, useForm } from 'react-hook-form'\nimport { useRecoilValue } from 'recoil'\nimport Close from '@mui/icons-material/Close'\nimport { humanize } from 'utils/formatting'\nimport { TeamVendorContact, VendorContactFields } from 'store/vendors/types'\nimport { vendorMeState, vendorSettingsState } from 'store/vendors/state'\nimport { useDeleteVendorContact, useDirectUploadFile, useUpsertVendorContact } from 'store/vendors/hooks'\nimport CoreInput from 'components/Core/CoreInput'\nimport CoreMultiComboBox, { MappedPrediction, useMultiSelectController } from 'components/Core/CoreMultiComboBox'\nimport BaseModal from 'components/BaseModal'\nimport RolesPermissions from './RolesPermissions'\nimport VendorContactPictureField from './VendorContactPictureField'\nimport { track } from 'utils/analytics'\n\nconst vendorContactRoles = ['owner', 'admin', 'billing', 'pm']\n\ntype VendorContactFormModalProps = {\n title: string\n open: boolean\n setOpen: (open: boolean) => void\n vendorContact?: TeamVendorContact\n}\n\nconst VendorContactFormModal: FC = ({ title, open, setOpen, vendorContact }) => {\n const vendorSettings = useRecoilValue(vendorSettingsState)\n const [deletingContact, setDeletingContact] = useDeleteVendorContact(vendorContact?.id || 0)\n const [upsertingContact, setUpsertingContact] = useUpsertVendorContact(vendorContact?.id)\n const me = useRecoilValue(vendorMeState)\n const isSelf = me?.id == vendorContact?.id\n const meOwner = me?.roles.includes('owner')\n const theyOwner = (vendorContact?.roles || []).includes('owner')\n\n const deleteDisabled = deletingContact || isSelf || (!meOwner && theyOwner)\n\n const handleClickDelete = useCallback(() => {\n if (deleteDisabled) return\n\n track('click', {\n code: 'delete',\n feature: 'VendorContactFormModal',\n })\n\n setDeletingContact(true)\n }, [deleteDisabled, setDeletingContact])\n\n const {\n control,\n register,\n handleSubmit: handleSubmitF,\n setValue,\n } = useForm({\n defaultValues: {\n id: vendorContact?.id,\n full_name: vendorContact?.full_name || '',\n email: vendorContact?.email || '',\n phone_number: vendorContact?.display_phone_number || '',\n roles: vendorContact?.roles || ['pm'],\n vendor_business_unit_ids: vendorContact?.vendor_business_units?.map((e) => e.id) || [],\n },\n })\n\n const { field: phoneNumberField } = useController({ name: 'phone_number', control })\n const { field: rolesField } = useMultiSelectController({ name: 'roles', control })\n const { field: businessUnitsField } = useMultiSelectController({ name: 'vendor_business_unit_ids', control })\n\n const handleUpload = useCallback(\n (signedId: string) => {\n track('click', {\n code: 'upload-headshot',\n feature: 'VendorContactFormModal',\n })\n\n setValue('headshot_signed_id', signedId)\n },\n [setValue]\n )\n const [fileToUpload, setFileToUpload] = useDirectUploadFile(handleUpload)\n\n const handleCloseClick = useCallback(() => {\n track('click', {\n code: 'close',\n feature: 'VendorContactFormModal',\n })\n\n setOpen(false)\n }, [setOpen])\n\n const handleSubmit: SubmitHandler = useCallback(\n (data) => {\n track('click', {\n code: 'submit',\n feature: 'VendorContactFormModal',\n flexfield_1: {\n roleChanged: !(\n data.roles.length == vendorContact?.roles.length &&\n data.roles.every((role) => vendorContact.roles.includes(role))\n ),\n },\n })\n\n if (vendorSettings && vendorSettings.business_units.length <= 1) {\n data['vendor_business_unit_ids'] = vendorSettings.business_units.map((e) => e.id)\n }\n setUpsertingContact(data)\n },\n [setUpsertingContact, vendorSettings, vendorContact?.roles]\n )\n\n useEffect(() => {\n if (upsertingContact == null) setOpen(false)\n }, [setOpen, upsertingContact])\n\n const mapRolePrediction = useCallback(\n (role: string): MappedPrediction => {\n const title = role == 'pm' ? 'PM' : humanize(role)\n const enabledRoles = meOwner ? ['owner', 'admin', 'billing', 'pm'] : ['admin', 'billing', 'pm']\n return {\n title,\n value: role,\n disabled: !enabledRoles.includes(role) || (isSelf && ['owner', 'admin'].includes(role)),\n }\n },\n [isSelf, meOwner]\n )\n\n const queryRole = useCallback((query: string) => {\n return vendorContactRoles.filter((e) => e.toLowerCase().includes(query.toLowerCase()))\n }, [])\n\n const queryBusinessUnit = useCallback(\n (query: string) => {\n return (vendorSettings?.business_units || [])\n .filter((e) => (e.name || 'Primary').toLowerCase().includes(query.toLowerCase()))\n .map((e) => String(e.id))\n },\n [vendorSettings?.business_units]\n )\n\n const mapBusinessUnitPrediction = useCallback(\n (businessUnitId: string): MappedPrediction => {\n const title = vendorSettings?.business_units?.find((e) => String(e.id) == businessUnitId)?.name || businessUnitId\n return { title, value: businessUnitId }\n },\n [vendorSettings?.business_units]\n )\n\n if (!vendorSettings) return null\n\n return (\n \n
    \n
    {title}
    \n \n {'Close modal'}\n \n \n
    \n
    \n
    \n \n \n \n \n \n {vendorSettings.business_units.length > 1 && (\n String(e.id))}\n queryMethod={queryBusinessUnit}\n mapPrediction={mapBusinessUnitPrediction}\n {...businessUnitsField}\n />\n )}\n \n \n\n
    \n {vendorContact ? (\n \n {'Delete user'}\n \n ) : null}\n \n {'Save'}\n \n
    \n
    \n
    \n
    \n )\n}\n\nexport default VendorContactFormModal\n","import React, { FC, useState } from 'react'\nimport cx from 'classnames'\nimport { useRecoilValue } from 'recoil'\nimport Error from '@mui/icons-material/Error'\nimport MoreVert from '@mui/icons-material/MoreVert'\nimport { humanize } from 'utils/formatting'\nimport { TeamVendorContact } from 'store/vendors/types'\nimport { vendorMeState, vendorSettingsState } from 'store/vendors/state'\nimport Dropdown from 'components/Dropdown'\nimport ActionsMenu from './ActionsMenu'\nimport VendorContactFormModal from './VendorContactFormModal'\n\ntype VendorContactRowProps = {\n vendorContact: TeamVendorContact\n first?: boolean\n last?: boolean\n}\n\nconst VendorContactRow: FC = ({ vendorContact, first, last }) => {\n const [editVendorContactFormModalOpen, setEditVendorContactFormModalOpen] = useState(false)\n const [actionsMenuOpen, setActionsMenuOpen] = useState(false)\n const me = useRecoilValue(vendorMeState)\n const vendorSettings = useRecoilValue(vendorSettingsState)\n const isSelf = me?.id == vendorContact.id\n\n if (!vendorSettings) return null\n\n return (\n \n \n
    \n
    \n
    \n
    \n {vendorContact.pic_url ? (\n \n ) : (\n
    \n {vendorContact.initials}\n
    \n )}\n
    \n
    \n
    \n {[isSelf ? '(You)' : null, vendorContact.full_name, vendorContact.ooo ? '(OOO)' : null]\n .filter((e) => e)\n .join(' ')}\n
    \n
    \n
    \n \n \n
    \n
    \n \n {vendorContact.email}\n \n {!vendorContact.subscribed_to_emails && (\n
    \n \n
    \n )}\n
    \n \n {vendorContact.display_phone_number}\n \n
    \n \n {vendorSettings.business_units.length > 1 && (\n \n
    \n {vendorContact.vendor_business_units.length == 0 ? (\n {'(none)'}\n ) : (\n vendorContact.vendor_business_units.map((e) => e.name).join(', ')\n )}\n
    \n \n )}\n \n
    \n \n
    {humanize(vendorContact.account_status)}
    \n
    \n \n \n
    \n {vendorContact.reminders_enabled ? 'Yes' : 'No'}\n
    \n \n \n
    \n {vendorContact.roles.map((e) => (\n \n {e == 'pm' ? 'PM' : humanize(e)}\n
    \n ))}\n \n \n \n
    \n \n \n
    \n }\n >\n \n \n \n \n \n \n )\n}\n\nexport default VendorContactRow\n","import React, { FC, useCallback, useState } from 'react'\nimport cx from 'classnames'\nimport { useRecoilValue } from 'recoil'\nimport Error from '@mui/icons-material/Error'\nimport ChevronRight from '@mui/icons-material/ChevronRight'\nimport { humanize } from 'utils/formatting'\nimport { TeamVendorContact } from 'store/vendors/types'\nimport { vendorMeState } from 'store/vendors/state'\nimport VendorContactFormModal from './VendorContactFormModal'\n\ntype VendorContactListItemProps = {\n vendorContact: TeamVendorContact\n}\n\nconst VendorContactListItem: FC = ({ vendorContact }) => {\n const [editVendorContactFormModalOpen, setEditVendorContactFormModalOpen] = useState(false)\n const me = useRecoilValue(vendorMeState)\n const isSelf = me?.id == vendorContact.id\n\n const handleClick = useCallback(() => {\n setEditVendorContactFormModalOpen(true)\n }, [])\n\n return (\n <>\n \n
    \n
    \n {vendorContact.pic_url ? (\n \n ) : (\n
    \n {vendorContact.initials}\n
    \n )}\n
    \n
    \n
    \n
    \n {[isSelf ? '(You)' : null, vendorContact.full_name, vendorContact.ooo ? '(OOO)' : null]\n .filter((e) => e)\n .join(' ')}\n
    \n\n
    \n \n
    {humanize(vendorContact.account_status)}
    \n\n {!vendorContact.subscribed_to_emails && (\n
    \n \n
    \n )}\n
    \n\n
    \n {vendorContact.roles.map((e) => (\n \n {e == 'pm' ? 'PM' : humanize(e)}\n
    \n ))}\n
    \n \n \n \n \n \n )\n}\n\nexport default VendorContactListItem\n","import React, { FC, useCallback, useState } from 'react'\nimport { useRecoilValue } from 'recoil'\nimport Add from '@mui/icons-material/Add'\nimport Help from '@mui/icons-material/Help'\nimport { TeamVendorContact } from 'store/vendors/types'\nimport { vendorSettingsState } from 'store/vendors/state'\nimport VendorContactRow from './VendorContactRow'\nimport VendorContactListItem from './VendorContactListItem'\nimport VendorContactFormModal from './VendorContactFormModal'\n\ntype InnerTeamProps = {\n vendorContacts: Record\n}\n\nconst InnerTeam: FC = ({ vendorContacts }) => {\n const vendorSettings = useRecoilValue(vendorSettingsState)\n const [newVendorContactFormModalOpen, setNewVendorContactFormModalOpen] = useState(false)\n\n const handleAddUserClick = useCallback(() => {\n setNewVendorContactFormModalOpen(true)\n }, [])\n\n if (!vendorSettings) return null\n\n return (\n
    \n
    \n
    \n
    \n

    {`All users (${Object.keys(vendorContacts).length})`}

    \n
    \n \n \n
    {'Add User'}
    \n \n
    \n
    \n \n

    \n {'PMs can be assigned to projects. Create user accounts to allow them to use Realm Business.'}\n

    \n
    \n
    \n\n
    \n
    \n

    {`All users (${Object.keys(vendorContacts).length})`}

    \n
    \n \n

    \n {'PMs can be assigned to projects. Create user accounts to allow them to use Realm Business.'}\n

    \n
    \n
    \n \n \n
    {'Add User'}
    \n \n
    \n\n
    \n {Object.values(vendorContacts).map((vendorContact) => (\n \n ))}\n
    \n\n \n \n \n \n \n {vendorSettings.business_units.length > 1 && (\n \n )}\n \n \n \n \n \n \n \n {Object.values(vendorContacts).map((vendorContact, index) => (\n \n ))}\n \n
    \n {'User'}\n \n {'Contacts'}\n \n {'Crews'}\n \n {'Account Status'}\n \n {'Reminders'}\n {'Roles'}
    \n\n \n
    \n )\n}\n\nexport default InnerTeam\n","import React, { FC } from 'react'\nimport { useRecoilValue } from 'recoil'\nimport { vendorContactsState } from 'store/vendors/state'\nimport { useLoadVendorContacts } from 'store/vendors/hooks'\nimport InnerTeam from './InnerTeam'\n\nconst Team: FC = () => {\n const vendorContacts = useRecoilValue(vendorContactsState)\n\n useLoadVendorContacts()\n\n // show loading maybe?\n if (!vendorContacts) return null\n\n return \n}\n\nexport default Team\n","import React, { FC, useCallback, useEffect, useState } from 'react'\nimport cx from 'classnames'\nimport BusinessCenter from '@mui/icons-material/BusinessCenter'\nimport People from '@mui/icons-material/People'\nimport { useLoadVendorSettings } from 'store/vendors/hooks'\nimport { useNewFeatureJourney } from 'store/vendors/hooks/nfluxdrivers/20250121-business-settings'\nimport { track } from 'utils/analytics'\nimport BusinessUnits from 'pages/Vendor/Settings/BusinessUnits'\nimport Team from 'pages/Vendor/Settings/Team'\nimport PageTitle from 'components/PageTitle'\n\nconst VendorSettings: FC = () => {\n useLoadVendorSettings()\n useNewFeatureJourney(true)\n\n const [activeTab, setActiveTab] = useState<'General' | 'Team'>(window.location.hash == '#team' ? 'Team' : 'General')\n\n const setActiveTabToGeneral = useCallback(() => {\n track('click', { code: 'tab', feature: 'General' })\n window.location.hash = 'general'\n }, [])\n const setActiveTabToTeam = useCallback(() => {\n track('click', { code: 'tab', feature: 'Team' })\n window.location.hash = 'team'\n }, [])\n\n const handleHashChange = useCallback(() => {\n if (window.location.hash == '#team') {\n setActiveTab('Team')\n } else {\n setActiveTab('General')\n }\n }, [])\n\n useEffect(() => {\n window.addEventListener('hashchange', handleHashChange)\n return () => {\n window.removeEventListener('hashchange', handleHashChange)\n }\n }, [handleHashChange])\n\n return (\n
    \n \n

    {'Business Settings'}

    \n
    \n \n \n
    {'General'}
    \n \n \n \n
    {'Team Members'}
    \n \n
    \n\n {activeTab == 'General' ? : }\n
    \n )\n}\n\nexport default VendorSettings\n","import { useEffect, useMemo, useRef, useState } from 'react'\nimport { useHistory } from 'react-router-dom'\nimport type { Driver, DriveStep } from 'driver.js'\nimport { useRecoilValue, useSetRecoilState } from 'recoil'\nimport { track } from 'utils/analyticsV2'\nimport { vendorMeState, vendorSidebarOpenState } from 'store/vendors/state'\nimport { skipNflux, useNewFeatureJourneyEffect } from './common'\n\nexport const useNewFeatureJourney = (ready: boolean) => {\n const feature = 'business-settings'\n const startDate = '2025-01-21'\n const endDate = '2025-02-28'\n const me = useRecoilValue(vendorMeState)\n const setSidebarOpen = useSetRecoilState(vendorSidebarOpenState)\n const history = useHistory()\n const driverObj = useRef()\n const [innerReady, setInnerReady] = useState(false)\n\n useEffect(() => {\n if (!ready || !me) return\n if (skipNflux({ feature, startDate, endDate, beta: false, me })) return\n\n setTimeout(() => {\n history.push('/vendors/settings#team')\n window.dispatchEvent(new HashChangeEvent('hashchange'))\n setInnerReady(true)\n }, 200)\n }, [history, me, ready])\n\n const steps = useMemo(() => {\n if (!me || !ready || !innerReady) return null\n\n const hasBusinessUnits = me.vendor_multiple_business_units\n const vendorSideMenuButtonElementVisible = document.querySelector('#vendor-sidemenu-button')?.checkVisibility()\n\n return [\n {\n element: window.innerWidth >= 768 ? '.js-vendor-contact-roles-md' : '.js-vendor-contact-roles',\n onHighlighted: () => {\n // workaround for https://github.com/kamranahmedse/driver.js/issues/531\n const popoverArrow = document.querySelector('.driver-popover-arrow-align-end')\n popoverArrow?.classList.remove('driver-popover-arrow-align-end')\n popoverArrow?.classList.add('driver-popover-arrow-align-start')\n },\n popover: {\n title: 'Assign your team members to roles',\n description:\n 'Indicate whether a team member is an Owner, Admin, Project Manager, or Billing member. Roles ensure your team members have the right permissions and notifications.',\n side: window.innerWidth >= 768 ? undefined : 'bottom',\n align: window.innerWidth >= 768 ? undefined : 'start',\n onPrevClick: (_element, _step, options) => {\n const index = options.state.activeIndex\n track('click', { code: 'nflux', section: 'prev', feature, flexfield_1: { index } })\n if (!vendorSideMenuButtonElementVisible) {\n driverObj.current?.movePrevious()\n } else {\n const wrapper = options.state.popover?.wrapper\n if (wrapper) {\n wrapper.querySelectorAll('footer button').forEach((element) => {\n ;(element as HTMLButtonElement).disabled = true\n })\n }\n\n setSidebarOpen(true)\n\n setTimeout(() => {\n driverObj.current?.movePrevious()\n }, 500) // should be enough to open sidebar\n }\n },\n onNextClick: (_element, _step, options) => {\n const index = options.state.activeIndex\n track('click', { code: 'nflux', section: 'next', feature, flexfield_1: { index } })\n if (!hasBusinessUnits) {\n driverObj.current?.moveNext()\n } else {\n const wrapper = options.state.popover?.wrapper\n if (wrapper) {\n wrapper.querySelectorAll('footer button').forEach((element) => {\n ;(element as HTMLButtonElement).disabled = true\n })\n }\n\n history.push('/vendors/settings#general')\n window.dispatchEvent(new HashChangeEvent('hashchange'))\n\n setTimeout(() => {\n driverObj.current?.moveNext()\n }, 500) // should be enough to load in the new page or set menu open\n }\n },\n },\n } as DriveStep,\n hasBusinessUnits\n ? ({\n element: '#business-units-tabs',\n popover: {\n title: 'Add unique business units',\n description: 'If you have unique crews for certain regions or project types, you can add them here.',\n side: 'bottom',\n onPrevClick: (_element, _step, options) => {\n const index = options.state.activeIndex\n track('click', { code: 'nflux', section: 'prev', feature, flexfield_1: { index } })\n const wrapper = options.state.popover?.wrapper\n if (wrapper) {\n wrapper.querySelectorAll('footer button').forEach((element) => {\n ;(element as HTMLButtonElement).disabled = true\n })\n }\n history.goBack()\n setTimeout(() => {\n driverObj.current?.movePrevious()\n }, 500) // should be enough to load in the new page\n },\n },\n } as DriveStep)\n : null,\n ].filter(Boolean) as DriveStep[]\n }, [history, innerReady, me, ready, setSidebarOpen])\n\n useNewFeatureJourneyEffect({ feature, startDate, endDate, driverObj, me, ready, steps })\n}\n","import React, { FC, useCallback, useEffect, useMemo, useRef, useState } from 'react'\nimport cx from 'classnames'\nimport { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil'\nimport Close from '@mui/icons-material/Close'\nimport RequestQuote from '@mui/icons-material/RequestQuote'\nimport Info from '@mui/icons-material/Info'\nimport { track } from 'utils/analytics'\nimport { vendorContactsState, vendorLoginStatusState, vendorMeState, vendorSettingsState } from 'store/vendors/state'\nimport { updateMeVendorContact } from 'store/vendors/api'\nimport { VendorLoginStatus } from 'store/vendors/types'\nimport { useLoadVendorSettings } from 'store/vendors/hooks'\nimport CoreList from 'components/Core/CoreList'\nimport CoreInput from 'components/Core/CoreInput'\nimport CoreText from 'components/Core/CoreText'\nimport CoreButton from 'components/Core/CoreButton'\nimport Spinner from 'components/Spinner'\n\ninterface AvailabilityMenuProps {\n setMenuMode: (mode: 'root' | 'availability') => void\n}\n\nconst AvailabilityMenu: FC = ({ setMenuMode }) => {\n const [me, setMe] = useRecoilState(vendorMeState)\n\n const vendorContacts = useRecoilValue(vendorContactsState)\n const setVendorLoginStatus = useSetRecoilState(vendorLoginStatusState)\n const vendorSettings = useRecoilValue(vendorSettingsState)\n\n useLoadVendorSettings()\n\n const [ooo, setOoo] = useState(!!me?.ooo_starts_at || !!me?.ooo_ends_at)\n const [startDate, setStartDate] = useState(me?.ooo_starts_at || '')\n const [endDate, setEndDate] = useState(me?.ooo_ends_at || '')\n const [selectedContact, setSelectedContact] = useState(me?.backup_vendor_contact_id?.toString() || '')\n const [updating, setUpdating] = useState(false)\n\n const isDispatcher = useMemo(() => {\n if (!me) return false\n return vendorSettings?.business_units.some((businessUnit) => businessUnit.dispatcher?.id == me.id)\n }, [me, vendorSettings])\n\n const formRef = useRef(null)\n\n const handleCloseAvailabilityClick = useCallback(\n (e) => {\n e.stopPropagation()\n track('click', { code: 'close', feature: 'AvailabilityMenu' })\n setMenuMode('root')\n },\n [setMenuMode]\n )\n\n const handleOooClick = useCallback(() => setOoo((val) => !val), [])\n const handleChangeContact = useCallback((value: string) => setSelectedContact(value), [])\n\n const handleSubmit = useCallback(\n async (e) => {\n e.preventDefault()\n e.stopPropagation()\n\n const controller = new AbortController()\n\n try {\n setUpdating(true)\n\n track('click', {\n code: 'submit',\n feature: 'AvailabilityMenu',\n flexfield_1: {\n ooo,\n },\n })\n\n const body = {\n ooo_starts_at: ooo ? startDate : null,\n ooo_ends_at: ooo ? endDate : null,\n backup_vendor_contact_id: ooo && selectedContact ? parseInt(selectedContact) : null,\n }\n const response = await updateMeVendorContact(JSON.stringify(body), controller.signal)\n const newVendorContactUser = await response.json()\n track('update availability', body)\n setMe(newVendorContactUser)\n setUpdating(false)\n } catch (error) {\n if (!controller.signal.aborted) {\n setUpdating(false)\n if (error.code !== 401) {\n console.error(error)\n window.location.reload()\n } else {\n setVendorLoginStatus(VendorLoginStatus.LoggedOut)\n }\n }\n }\n },\n [ooo, startDate, endDate, selectedContact, setMe, setVendorLoginStatus]\n )\n\n useEffect(() => {\n if (!ooo) {\n setStartDate('')\n setEndDate('')\n setSelectedContact('')\n }\n }, [ooo])\n\n useEffect(() => {\n if (!ooo) {\n formRef.current?.requestSubmit()\n }\n }, [ooo])\n\n const availableVendorContacts = useMemo(() => {\n if (!vendorContacts) return null\n if (!me) return null\n\n return Object.values(vendorContacts).filter(\n (vendorContact) => vendorContact.id != me.id && vendorContact.roles.includes('pm')\n )\n }, [vendorContacts, me])\n\n if (!vendorContacts) return null\n if (!me) return null\n\n return (\n
    \n \n \n \n }\n />\n \n
    \n
    \n
    \n }\n onClick={handleOooClick}\n />\n {!!ooo && (\n \n {'Schedule away timeframe'}\n \n \n
    \n {'Backup'}\n \n \n {availableVendorContacts?.map((vendorContact) => {\n return (\n \n )\n })}\n \n {!!availableVendorContacts && availableVendorContacts.length > 0 ? (\n \n {isDispatcher\n ? 'Your backup will pick-up on your projects and communications, and become the default dispatcher while you are away.'\n : 'Your backup will pick-up on your projects and communication while you are away'}\n \n ) : (\n
    \n \n \n {`There are no contacts available to pick-up on your projects and communications${isDispatcher ? ', and become the default dispatcher' : ''}.`}\n \n
    \n )}\n
    \n \n \n {'Make sure you return any outstanding bids before leaving'}\n \n
    \n
    \n }\n iconAlignment=\"left\"\n type=\"submit\"\n />\n
    \n }\n />\n )}\n \n )\n}\n\nexport default AvailabilityMenu\n","import React, { FC, useCallback, useEffect, useState } from 'react'\nimport { useRecoilValue } from 'recoil'\nimport ChevronRightIcon from '@mui/icons-material/ChevronRight'\nimport LogoutIcon from '@mui/icons-material/Logout'\nimport EventAvailable from '@mui/icons-material/EventAvailable'\nimport Block from '@mui/icons-material/Block'\nimport { track } from 'utils/analytics'\nimport { vendorMeState } from 'store/vendors/state'\nimport CoreList from 'components/Core/CoreList'\nimport AvailabilityMenu from './AvailabilityMenu'\nimport AvatarOrInitials from 'components/AvatarOrInitials'\n\ninterface VendorTopBarMenuProps {\n menuOpen: boolean\n setUserModalOpen: (value: boolean) => void\n}\n\nconst VendorTopBarMenu: FC = ({ menuOpen, setUserModalOpen }) => {\n const me = useRecoilValue(vendorMeState)\n\n const [menuMode, setMenuMode] = useState<'root' | 'availability'>('root')\n\n const handleVendorContactClick = useCallback(() => {\n track('click', { code: 'open', feature: 'UserModal' })\n setUserModalOpen(true)\n }, [setUserModalOpen])\n\n const handleAvailabilityClick = useCallback((e) => {\n e.stopPropagation()\n track('click', { code: 'open', feature: 'Availability' })\n setMenuMode('availability')\n }, [])\n\n const handleSignout = useCallback((e) => {\n e.stopPropagation()\n track('click', { code: 'sign out' })\n window.location.href = '/vendors/sign_out'\n }, [])\n\n useEffect(() => {\n if (!menuOpen) setMenuMode('root')\n }, [menuOpen])\n\n if (!me) return null\n\n return (\n \n {menuMode == 'availability' ? (\n \n ) : (\n <>\n \n }\n rightIcon={}\n onClick={handleVendorContactClick}\n />\n \n
    {'Availability'}
    \n
    \n {me.ooo ? (\n {'🏖️ Out of office'}\n ) : (\n {'Available'}\n )}\n
    \n \n }\n text=\"Availability\"\n leftIcon={me.ooo ? : }\n rightIcon={}\n onClick={handleAvailabilityClick}\n className=\"tw:cursor-pointer\"\n />\n }\n rightIcon={}\n onClick={handleSignout}\n />\n \n )}\n
    \n )\n}\n\nexport default VendorTopBarMenu\n","import React, { FC, useCallback, useMemo } from 'react'\nimport { Link } from 'react-router-dom'\nimport { useRecoilState, useRecoilValue } from 'recoil'\nimport MenuIcon from '@mui/icons-material/Menu'\nimport { track } from 'utils/analytics'\nimport { vendorMeState, vendorTopMenuOpenState } from 'store/vendors/state'\nimport { useLoadVendorContacts } from 'store/vendors/hooks'\nimport Dropdown from 'components/Dropdown'\nimport VendorTopBarMenu from './VendorTopBarMenu'\nimport RealmBusiness from 'svgs/realm-business'\nimport ExpandMore from '@mui/icons-material/ExpandMore'\nimport ExpandLess from '@mui/icons-material/ExpandLess'\nimport AvatarOrInitials from 'components/AvatarOrInitials'\nimport EventBusy from '@mui/icons-material/EventBusy'\n\ninterface VendorTopBarProps {\n setSidebarOpen: (value: boolean) => void\n setUserModalOpen: (value: boolean) => void\n}\n\nconst VendorTopBar: FC = ({ setSidebarOpen, setUserModalOpen }) => {\n const me = useRecoilValue(vendorMeState)\n const [menuOpen, setMenuOpen] = useRecoilState(vendorTopMenuOpenState)\n\n useLoadVendorContacts()\n\n const handleMenuClick = useCallback(() => {\n track('click', { code: 'open', feature: 'Sidebar' })\n setSidebarOpen(true)\n }, [setSidebarOpen])\n\n const currentlyOutOfOffice = useMemo(() => !!me && me.ooo, [me])\n const upcomingOutOfOffice = useMemo(() => !!me && me.ooo_starts_at && me.ooo_ends_at && !me.ooo, [me])\n\n if (!me) return null\n\n return (\n
    \n \n \n \n \n \n \n \n \n
    \n }\n click\n menu\n placement=\"bottom-end\"\n open={menuOpen}\n setOpen={setMenuOpen}\n zIndex={50}\n useShiftMiddleware={false}\n >\n
    \n
    \n {currentlyOutOfOffice ? (\n
    \n \n
    \n ) : (\n \n )}\n
    \n {upcomingOutOfOffice ? (\n
    {'Upcoming OOO'}
    \n ) : currentlyOutOfOffice ? (\n
    {'Out of Office'}
    \n ) : null}\n
    \n {menuOpen ? (\n \n ) : (\n \n )}\n
    \n
    \n \n \n )\n}\n\nexport default VendorTopBar\n","import React, { FC, Fragment, PropsWithChildren } from 'react'\nimport { Dialog, Transition } from '@headlessui/react'\n\ninterface VendorOffCanvasMenuProps {\n sidebarOpen: boolean\n setSidebarOpen: (value: boolean) => void\n}\n\nconst VendorOffCanvasMenu: FC> = ({\n children,\n sidebarOpen,\n setSidebarOpen,\n}) => {\n return (\n \n \n \n
    \n \n\n
    \n \n \n {children}\n \n \n
    \n
    \n
    \n )\n}\n\nexport default VendorOffCanvasMenu\n","import React, { FC, RefObject, useCallback, useEffect, useState } from 'react'\nimport { useHistory, useLocation } from 'react-router-dom'\nimport cx from 'classnames'\nimport { useRecoilValue } from 'recoil'\nimport Close from '@mui/icons-material/Close'\nimport LocalShipping from '@mui/icons-material/LocalShipping'\nimport Widgets from '@mui/icons-material/Widgets'\nimport Handyman from '@mui/icons-material/Handyman'\nimport MonetizationOn from '@mui/icons-material/MonetizationOn'\nimport Draw from '@mui/icons-material/Draw'\nimport Store from '@mui/icons-material/Store'\nimport { track } from 'utils/analytics'\nimport { vendorMeState } from 'store/vendors/state'\nimport CoreList from 'components/Core/CoreList'\nimport FlourishSvg from 'svgs/flourish'\n\ninterface VendorSideBarProps {\n setSidebarOpen?: (value: boolean) => void\n topBarsRef?: RefObject\n}\n\nconst VendorSideBar: FC = ({ setSidebarOpen, topBarsRef }) => {\n const history = useHistory()\n const location = useLocation()\n const me = useRecoilValue(vendorMeState)\n const [topBarsHeight, setTopBarsHeight] = useState(0)\n\n const handleCloseClick = useCallback(() => {\n track('click', { code: 'close', feature: 'Sidebar' })\n setSidebarOpen?.(false)\n }, [setSidebarOpen])\n\n const navToOverview = useCallback(() => {\n if (me?.vendor_contract_hold) return\n\n history.push('/vendors')\n setSidebarOpen?.(false)\n }, [history, setSidebarOpen, me?.vendor_contract_hold])\n\n const navToProjects = useCallback(() => {\n if (me?.vendor_contract_hold) return\n\n history.push('/vendors/projects')\n setSidebarOpen?.(false)\n }, [history, setSidebarOpen, me?.vendor_contract_hold])\n\n const navToWonProjects = useCallback(() => {\n if (me?.vendor_contract_hold) return\n\n history.push('/vendors/awarded-projects')\n setSidebarOpen?.(false)\n }, [history, setSidebarOpen, me?.vendor_contract_hold])\n\n const navToPayments = useCallback(() => {\n if (me?.vendor_contract_hold) return\n\n history.push('/vendors/payments')\n setSidebarOpen?.(false)\n }, [history, setSidebarOpen, me?.vendor_contract_hold])\n\n const navToProfile = useCallback(() => {\n history.push('/vendors/profile')\n setSidebarOpen?.(false)\n }, [history, setSidebarOpen])\n\n const navToSettings = useCallback(() => {\n history.push('/vendors/settings')\n setSidebarOpen?.(false)\n }, [history, setSidebarOpen])\n\n const navToContract = useCallback(() => {\n history.push('/vendors/contract')\n setSidebarOpen?.(false)\n }, [history, setSidebarOpen])\n\n const navToDiscountedMaterialsGE = useCallback(() => {\n history.push('/vendors/discounted-materials/ge')\n setSidebarOpen?.(false)\n }, [history, setSidebarOpen])\n\n const navToDiscountedMaterialsMSI = useCallback(() => {\n history.push('/vendors/discounted-materials/msi')\n setSidebarOpen?.(false)\n }, [history, setSidebarOpen])\n\n useEffect(() => {\n if (me?.vendor_contract_needs_attention) navToContract()\n }, [me, navToContract])\n\n useEffect(() => {\n if (!topBarsRef?.current) return\n\n setTopBarsHeight(topBarsRef.current.offsetHeight)\n }, [topBarsRef])\n\n return (\n \n {setSidebarOpen && (\n \n {'Close sidebar'}\n \n \n )}\n \n \n )\n}\n\nexport default VendorSideBar\n","import React, { FC, useCallback, useEffect, useState } from 'react'\nimport CloseIcon from '@mui/icons-material/Close'\nimport InfoIcon from '@mui/icons-material/Info'\nimport { useRecoilState, useSetRecoilState } from 'recoil'\nimport { track } from 'utils/analytics'\nimport { getInitials } from 'utils/formatting'\nimport { VendorLoginStatus } from 'store/vendors/types'\nimport { vendorLoginStatusState, vendorMeState } from 'store/vendors/state'\nimport { updateMeVendorContact } from 'store/vendors/api'\nimport CoreText from 'components/Core/CoreText'\nimport CoreInput from 'components/Core/CoreInput'\nimport BaseModal from 'components/BaseModal'\nimport Checkbox from 'components/Checkbox'\nimport Spinner from 'components/Spinner'\n\ninterface VendorContactInfoModalProps {\n userModalOpen: boolean\n setUserModalOpen: (value: boolean) => void\n}\n\nconst VendorContactInfoModal: FC = ({ userModalOpen, setUserModalOpen }) => {\n const [me, setMe] = useRecoilState(vendorMeState)\n const setVendorLoginStatus = useSetRecoilState(vendorLoginStatusState)\n const [submittingRemindersEnabled, setSubmittingRemindersEnabled] = useState(false)\n\n const handleCloseClick = useCallback(() => {\n track('click', { code: 'close', feature: 'VendorContactInfoModal' })\n setUserModalOpen(false)\n }, [setUserModalOpen])\n\n const handleRemindersEnabledChange = useCallback(() => {\n setSubmittingRemindersEnabled(true)\n }, [])\n\n useEffect(() => {\n if (!submittingRemindersEnabled) return\n\n const controller = new AbortController()\n const _ = async () => {\n try {\n const body = {\n reminders_enabled: (document.getElementById('reminders_enabled') as HTMLInputElement)?.checked,\n }\n const response = await updateMeVendorContact(JSON.stringify(body), controller.signal)\n const newVendorContactUser = await response.json()\n track('set reminders enabled', body)\n setMe(newVendorContactUser)\n } catch (error) {\n if (!controller.signal.aborted) {\n if (error.code !== 401) {\n console.error(error)\n window.location.reload()\n } else {\n setVendorLoginStatus(VendorLoginStatus.LoggedOut)\n }\n }\n } finally {\n setSubmittingRemindersEnabled(false)\n }\n }\n _()\n return () => {\n controller.abort()\n }\n }, [setMe, setVendorLoginStatus, submittingRemindersEnabled])\n\n if (!me) return null\n\n return (\n \n
    \n {me.full_name}\n \n {'Close sidebar'}\n \n \n
    \n
    \n
    \n {getInitials(me.full_name)}\n
    \n \n \n \n {me.primary_contact && (\n \n )}\n
    \n \n

    \n {'To change your contact info, email us. '}\n \n {'vendors@realmhome.com'}\n \n

    \n
    \n
    \n
    \n )\n}\n\nexport default VendorContactInfoModal\n","import React, { FC, PropsWithChildren, useMemo, useRef, useState } from 'react'\nimport { Link, useLocation } from 'react-router-dom'\nimport { useRecoilState, useRecoilValue } from 'recoil'\nimport cx from 'classnames'\nimport { vendorMeState, vendorSidebarOpenState } from 'store/vendors/state'\nimport VendorTopBar from './VendorTopBar'\nimport VendorOffCanvasMenu from './VendorOffCanvasMenu'\nimport VendorSideBar from './VendorSideBar'\nimport VendorContactInfoModal from './VendorContactInfoModal'\nimport dayjs from 'dayjs'\nimport utc from 'dayjs/plugin/utc'\nimport timezone from 'dayjs/plugin/timezone'\nimport advancedFormat from 'dayjs/plugin/advancedFormat'\nimport Error from '@mui/icons-material/Error'\nimport { humanize, toSentence } from 'utils/formatting'\nimport pluralize from 'pluralize'\n\ndayjs.extend(utc)\ndayjs.extend(timezone)\ndayjs.extend(advancedFormat)\n\nconst VendorLayout: FC = ({ children }) => {\n const me = useRecoilValue(vendorMeState)\n const [sidebarOpen, setSidebarOpen] = useRecoilState(vendorSidebarOpenState)\n const [userModalOpen, setUserModalOpen] = useState(false)\n const topBarsRef = useRef(null)\n const location = useLocation()\n\n const missingProjectTypes = useMemo(() => {\n if (!me) return null\n\n const adjustedProjectTypes = me.vendor_project_types_with_insufficient_photos.map((projectType) => {\n return (\n {\n kitchen_or_bathroom: 'kitchen/bathroom remodels',\n adu: 'ADUs',\n hardscaping: 'hardscaping',\n landscaping: 'landscaping',\n }[projectType] || pluralize(humanize(projectType).toLowerCase())\n )\n })\n\n return toSentence(adjustedProjectTypes)\n }, [me])\n\n return (\n
    \n \n \n \n\n
    \n \n\n {me && document.body.dataset.ml && (\n
    \n
    {`You are impersonating ${me.email}.`}
    \n
    \n )}\n\n {me && (\n <>\n {!me.subscribed_to_emails ? (\n
    \n \n
    \n
    \n {\"You’ve unsubscribed from our emails - This means you're not receiving new leads.\"}\n
    \n
    \n {'To fix this, contact us at '}\n \n {'vendors@realmhome.com'}\n \n
    \n
    \n
    \n ) : me.vendor_insufficient_photos_block && me.vendor_project_types_with_insufficient_photos.length > 0 ? (\n
    \n \n
    \n
    \n
    \n {`New leads are suspended for ${missingProjectTypes} — add example projects to your business profile to remain eligible.`}\n
    \n
    \n {\n 'You’ll need two examples per project type to remain eligible for relevant leads. If you don’t service these project types anymore, please update your business settings.'\n }\n
    \n
    \n
    \n \n {'Upload projects'}\n \n
    \n
    \n
    \n ) : me.vendor_insufficient_photos_warning_at &&\n me.vendor_project_types_with_insufficient_photos.length > 0 ? (\n
    \n \n
    \n
    \n
    \n {`Add example projects to your business profile by ${dayjs(me.vendor_insufficient_photos_warning_at).tz('America/Los_Angeles').add(2, 'weeks').format('MMMM Do')} to remain eligible for new leads.`}\n
    \n
    \n {`Upload project photos for ${missingProjectTypes} — you’ll need two examples per project type to remain eligible for relevant leads. If you do not service these project types, please update your business settings.`}\n
    \n
    \n
    \n \n {'Upload projects'}\n \n
    \n
    \n
    \n ) : null}\n \n )}\n
    \n\n
    \n
    \n \n
    \n\n
    \n \n {children}\n \n
    \n
    \n\n \n
    \n )\n}\n\nexport default VendorLayout\n","import React, { FC, useEffect } from 'react'\nimport { BrowserRouter, Redirect, Route, Switch, useHistory } from 'react-router-dom'\nimport { useRecoilValue } from 'recoil'\nimport { trackPage } from 'utils/analytics'\nimport { VendorLoginStatus } from 'store/vendors/types'\nimport { vendorLoginStatusState, vendorMeState } from 'store/vendors/state'\nimport useRailsFlash from 'non-rendering/useRailsFlash'\nimport VendorSignin from 'pages/Vendor/Signin'\nimport VendorSetPassword from 'pages/Vendor/SetPassword'\nimport VendorForgotPassword from 'pages/Vendor/ForgotPassword'\nimport VendorEditPassword from 'pages/Vendor/EditPassword'\nimport VendorPay from 'pages/Vendor/Pay'\nimport VendorCheckout from 'pages/Vendor/Checkout'\nimport VendorPayReturn from 'pages/Vendor/PayReturn'\nimport VendorOverview from 'pages/Vendor/Overview'\nimport VendorAllProjects from 'pages/Vendor/AllProjects'\nimport VendorAwardedProjects from 'pages/Vendor/AwardedProjects'\nimport VendorPayments from 'pages/Vendor/Payments'\nimport VendorContract from 'pages/Vendor/Contract'\nimport VendorDiscountedMaterials from 'pages/Vendor/DiscountedMaterials'\nimport VendorProject from 'pages/Vendor/Project'\nimport VendorProfile from 'pages/Vendor/Profile'\nimport VendorSettings from 'pages/Vendor/Settings'\nimport VendorLayout from 'pages/Vendor/components/VendorLayout'\n\nconst redirectWithoutTrailingSlash = ({ location, history }) => (\n \n)\n\nconst trackCurrentPage = () => {\n trackPage(window.location.pathname)\n}\n\nconst VendorInnerRoutes: FC = () => {\n const vendorLoginStatus = useRecoilValue(vendorLoginStatusState)\n const me = useRecoilValue(vendorMeState)\n\n if (vendorLoginStatus == VendorLoginStatus.LoggedOut) return \n if (vendorLoginStatus == VendorLoginStatus.Unknown) return null // could also show a spinner\n\n // show loading maybe?\n if (!me) return null\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n {me.roles.filter((e) => ['owner', 'admin'].includes(e)).length > 0 && (\n \n )}\n \n \n \n )\n}\n\nconst VendorRoutes: FC = () => {\n const history = useHistory()\n\n useEffect(() => {\n trackCurrentPage() // Track the first pageview upon load\n history.listen(trackCurrentPage) // Track the subsequent pageviews\n }, [history])\n\n return (\n \n {/* We need to disallow paths ending in '/' in order to property navigate */}\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nexport const VendorRouter: FC = () => {\n useRailsFlash()\n\n return (\n \n \n \n )\n}\n\nexport default VendorRouter\n","import 'stylesheets/vendors.scss'\n\nimport 'core-js/stable'\nimport 'regenerator-runtime/runtime'\nimport 'whatwg-fetch'\nimport 'utils/crypto'\nimport 'utils/sentry'\n\nimport React, { StrictMode } from 'react'\nimport { createRoot } from 'react-dom/client'\nimport { RecoilRoot } from 'recoil'\n\nimport VendorAuthentication from 'non-rendering/VendorAuthentication'\nimport GlobalAlert from 'layouts/components/GlobalAlert'\nimport VendorRouter from 'vendors/VendorRouter'\n\ndocument.addEventListener('DOMContentLoaded', () => {\n const container = document.getElementById('main')\n if (container && !document.getElementById('error-404')) {\n const root = createRoot(container)\n root.render(\n \n \n \n \n \n \n \n \n )\n }\n})\n","import dayjs, { Dayjs } from 'dayjs'\nimport timezone from 'dayjs/plugin/timezone'\nimport utc from 'dayjs/plugin/utc'\n\ndayjs.extend(utc)\ndayjs.extend(timezone)\n\nexport type MarkTypes = 'default' | 'dark'\n\nexport interface CalendarMarks {\n [date: number]: MarkTypes\n}\n\nexport const setMark = function (marks: CalendarMarks, date: Dayjs, mark: MarkTypes): CalendarMarks {\n return { ...marks, [date.startOf('day').toDate().getTime()]: mark }\n}\n\nexport const getMark = function (marks: CalendarMarks, date: Dayjs): undefined | MarkTypes {\n return marks[date.startOf('day').toDate().getTime()]\n}\n\nexport const clearMark = function (marks: CalendarMarks, date: Dayjs): CalendarMarks {\n const remKey = date.startOf('day').toDate().getTime()\n const newMarks = { ...marks }\n delete newMarks[remKey]\n return newMarks\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"calendar\":\"g38aWLYnPZhToChXfOkv\",\"title\":\"WzCTcSYUZ7mvONrV6F6p\",\"controls\":\"GknUK7J_eHlU9AjTgIc2\",\"prev\":\"lPnXs74QX7SiZ8baPUTC\",\"next\":\"cmuSKWduGCMcVNgNc4xl\",\"week\":\"DJdGfNAATXVCLh7WX3MQ\",\"month\":\"Np4Fe80Zqy_XGEtuIEbt\",\"day\":\"OlYG0oIaYTwp7qOmhqkD\",\"dayOfWeek\":\"RIFlSTM1bwL9VUzOQUsV\",\"expandMore\":\"uEgkef_wCyIsdp22LZPN\"};","import React, { FC, useMemo, useCallback } from 'react'\nimport cx from 'classnames'\nimport dayjs, { Dayjs } from 'dayjs'\nimport timezone from 'dayjs/plugin/timezone'\nimport utc from 'dayjs/plugin/utc'\n\nimport { CalendarMarks, getMark, MarkTypes } from './types'\n\nimport CoreText from 'components/Core/CoreText'\n\nimport styles from './styles.module.scss'\n\ndayjs.extend(utc)\ndayjs.extend(timezone)\n\ninterface MonthDayProps {\n date: Dayjs\n selected: boolean\n marked?: MarkTypes\n onSelected: (day: Dayjs) => void\n}\n\nconst MonthDay: FC = ({ date, selected, marked, onSelected }) => {\n const handleClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault()\n onSelected(date)\n },\n [onSelected, date]\n )\n\n return (\n
  • \n \n
  • \n )\n}\n\ninterface MonthProps {\n selected: Dayjs\n marks: CalendarMarks\n visibleWeeks: number\n onSelected: (date: Dayjs) => void\n}\n\nconst Month: FC = ({ selected, marks, visibleWeeks, onSelected }) => {\n const days = useMemo(() => {\n const totalDays = visibleWeeks * 7\n const firstOfMonth = selected.startOf('M')\n const adjustFrom = visibleWeeks >= 5 ? firstOfMonth : selected\n const start = adjustFrom.startOf('w')\n\n const theMonth: Array = []\n for (let x = 0; x < totalDays; x++) {\n theMonth.push(start.add(x, 'd'))\n }\n return theMonth\n }, [selected, visibleWeeks])\n\n return (\n
      \n {days.slice(0, 7).map((day) => (\n
    1. \n \n {day.format('ddd')}\n \n
    2. \n ))}\n {days.map((day) => (\n \n ))}\n
    \n )\n}\n\nexport default Month\n","import React, { FC, useMemo, useCallback } from 'react'\nimport cx from 'classnames'\nimport dayjs, { Dayjs } from 'dayjs'\nimport timezone from 'dayjs/plugin/timezone'\nimport utc from 'dayjs/plugin/utc'\n\nimport { CalendarMarks, getMark, MarkTypes } from './types'\n\nimport CoreText from 'components/Core/CoreText'\n\nimport styles from './styles.module.scss'\n\ndayjs.extend(utc)\ndayjs.extend(timezone)\n\ninterface WeekDayProps {\n date: Dayjs\n selected: boolean\n marked?: MarkTypes\n onSelected: (day: Dayjs) => void\n}\n\nconst WeekDay: FC = ({ date, selected, marked, onSelected }) => {\n const handleClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault()\n onSelected(date)\n },\n [onSelected, date]\n )\n\n return (\n
  • \n \n
  • \n )\n}\n\ninterface WeekProps {\n selected: Dayjs\n marks: CalendarMarks\n onSelected: (date: Dayjs) => void\n}\n\nconst Week: FC = ({ selected, marks, onSelected }) => {\n const days = useMemo(() => {\n const theWeek: Array = []\n const start = selected.startOf('w')\n for (let x = 0; x < 7; x++) {\n theWeek.push(start.add(x, 'd'))\n }\n return theWeek\n }, [selected])\n\n return (\n
      \n {days.map((day) => (\n \n ))}\n
    \n )\n}\n\nexport default Week\n","import React, { FC, useState, useCallback, useMemo, useEffect } from 'react'\nimport cx from 'classnames'\nimport dayjs, { Dayjs } from 'dayjs'\nimport timezone from 'dayjs/plugin/timezone'\nimport utc from 'dayjs/plugin/utc'\nimport advanced from 'dayjs/plugin/advancedFormat'\n\nimport { CalendarMarks } from './types'\n\nimport ArrowIcon from 'svgs/arrow-forward-ios'\nimport ExpandIcon from 'svgs/expand-more'\n\nimport CoreButton from 'components/Core/CoreButton'\nimport CoreText from 'components/Core/CoreText'\n\nimport Month from './Month'\nimport Week from './Week'\n\nimport styles from './styles.module.scss'\n\nexport type { CalendarMarks, MarkTypes } from './types'\nexport { setMark } from './types'\n\ndayjs.extend(timezone)\ndayjs.extend(utc)\ndayjs.extend(advanced)\n\ntype View = 'week' | 'twoWeek' | 'month'\n\ninterface CalendarProps {\n className?: string\n selected?: Date\n marks: CalendarMarks\n initialView?: View\n allowViewChange?: boolean\n timezone?: string\n\n onSelectionChange: React.Dispatch>\n onTrackAttempt?: (code: string, flexfield_1?: any) => void\n}\n\nconst Calendar: FC = ({\n className,\n selected,\n marks,\n initialView = 'week',\n allowViewChange = true,\n timezone,\n onSelectionChange,\n onTrackAttempt,\n}) => {\n const [view, setView] = useState(initialView)\n\n const track = useCallback(\n (code: string, flexfield_1?: any) => {\n if (!onTrackAttempt) return\n onTrackAttempt(code, flexfield_1)\n },\n [onTrackAttempt]\n )\n\n const handlePrevClicked = useCallback(() => {\n track('previous', { view: view })\n if (view == 'month') {\n onSelectionChange((prev) => {\n let date = dayjs(prev)\n if (timezone) date = date.tz(timezone)\n return date.add(-1, 'month').toDate()\n })\n } else {\n onSelectionChange((prev) => {\n let date = dayjs(prev)\n if (timezone) date = date.tz(timezone)\n return date.add(-1, 'week').toDate()\n })\n }\n }, [view, onSelectionChange, track, timezone])\n const handleNextClicked = useCallback(() => {\n track('next', { view: view })\n if (view == 'month') {\n onSelectionChange((prev) => {\n let date = dayjs(prev)\n if (timezone) date = date.tz(timezone)\n return date.add(1, 'month').toDate()\n })\n } else {\n onSelectionChange((prev) => {\n let date = dayjs(prev)\n if (timezone) date = date.tz(timezone)\n return date.add(1, 'week').toDate()\n })\n }\n }, [view, onSelectionChange, track, timezone])\n\n const handleTodayClicked = useCallback(() => {\n const date = new Date()\n track('select-date', { date: date, option: 'today' })\n onSelectionChange(new Date())\n }, [onSelectionChange, track])\n\n const handleDateSelected = useCallback(\n (date: Dayjs) => {\n track('select-date', { date: date.toDate() })\n onSelectionChange(date.toDate())\n },\n [onSelectionChange, track]\n )\n\n const handleShowMoreClicked = useCallback(() => {\n track('show-more')\n setView('twoWeek')\n }, [track])\n const handleShowMonthClicked = useCallback(() => {\n track('show-month')\n setView('month')\n }, [track])\n\n useEffect(() => {\n if (!selected) onSelectionChange(new Date())\n }, [selected, onSelectionChange])\n\n const djsSelected = useMemo(() => {\n let date = dayjs(selected)\n if (timezone) date = date.tz(timezone)\n\n return date\n }, [selected, timezone])\n\n return (\n
    \n
    \n \n {djsSelected.format('MMMM, YYYY')}\n \n
    \n }\n size=\"s\"\n kind=\"secondary\"\n onClick={handlePrevClicked}\n />\n \n }\n size=\"s\"\n kind=\"secondary\"\n onClick={handleNextClicked}\n />\n
    \n
    \n {view == 'week' ? (\n \n ) : (\n \n )}\n {allowViewChange && view != 'month' && (\n
    \n {view == 'twoWeek' ? (\n }\n onClick={handleShowMonthClicked}\n />\n ) : (\n }\n onClick={handleShowMoreClicked}\n />\n )}\n
    \n )}\n
    \n )\n}\n\nexport default Calendar\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst DropdownArrow: FC = ({ className }) => (\n \n
    \n \n)\n\nexport default DropdownArrow\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ntype RealmBusinessProps = {\n className?: string\n}\n\nconst RealmBusiness: FC = ({ className }) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nexport default RealmBusiness\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n \n \n)\n\nexport default Svg\n","import React, { FC } from 'react'\n\ninterface Props {\n className?: string\n}\n\nconst Svg: FC = ({ className }) => (\n \n \n \n \n)\n\nexport default Svg\n","import { track as legacyTrack, trackSync as legacyTrackSync, trackPage as legacyTrackPage } from './analytics'\n\n/**\n * import { trackClick, trackPage, trackImpression }\n * trackClick({ ... })\n * // Traditional replacement of 'track', when we're tracking a 'click' of any type\n * trackImpression({ ... })\n * // New 'impression' for when we show something to a user.\n * trackPage(pageName)\n * // Drop in replacement of 'trackPage'\n *\n * // When a page will be tracking multiple times, but using the same\n * // base set of options, you can prepare a local track\n * const trackOnboardinClick = prepare({ family: 'onboarding', screen: 'enter-address' }, trackClick)\n * // And then call it to fire the tracking event\n * trackOnboardinClick({ code: 'test', feature: 'test-feature' })\n *\n * // Another convenience function is available if you know you'll be using both 'click'\n * // and 'impression' events, but that they'll share some of the same options.\n * const [trackOnboardingClick, trackOnboardingImpression] = prepareBoth({ feature: 'test' })\n */\nexport interface TrackBase {\n code?: string\n screen?: string\n section?: string\n feature?: string\n family?: string\n content_rank?: string\n property_id?: string\n flexfield_1?: any\n flexfield_2?: any\n content_text?: string\n}\n\ninterface TrackOptions extends TrackBase {\n code: string\n}\n\ntype TrackNameTypes = 'impression' | 'click' | 'page-view' | 'state-event'\n\ntype TrackFn = (name: TrackNameTypes, options?: TrackBase) => Promise\ntype TrackSyncFn = (name: TrackNameTypes, options?: TrackBase) => void\n\ntype TrackNameFn = (options: T) => Promise\ntype TrackNameSyncFn = (options: T) => void\ntype TrackNameOptionalFn = (options?: T) => Promise\n\nexport const track: TrackFn = (name, options) => {\n if (name == 'page-view') legacyTrackPage(options?.screen)\n return legacyTrack(name, options)\n}\nexport const trackSync: TrackSyncFn = (name, options) => {\n legacyTrackSync(name, options)\n}\n\nexport function prepareName(\n name: TrackNameTypes,\n preparedOptions?: T,\n trackFn: TrackFn = track\n): TrackNameFn {\n return (options) => trackFn(name, { ...options, ...preparedOptions })\n}\nexport function prepareNameSync(\n name: TrackNameTypes,\n preparedOptions?: T,\n trackFn: TrackSyncFn = trackSync\n): TrackNameSyncFn {\n return (options) => trackFn(name, { ...options, ...preparedOptions })\n}\nexport function prepareNameOptional(\n name: TrackNameTypes,\n preparedOptions?: T,\n trackFn: TrackFn = track\n): TrackNameOptionalFn {\n return (options) => trackFn(name, { ...options, ...preparedOptions })\n}\nexport function prepare(\n preparedOptions: TrackBase,\n trackFn: TrackNameFn\n): TrackNameOptionalFn {\n return (options) => trackFn({ ...options, ...(preparedOptions as T) })\n}\n\nexport function prepareBoth(\n preparedOptions: TrackBase,\n trackFn: TrackFn = track\n): [TrackNameFn, TrackNameFn] {\n const trackClick = (options) => trackFn('click', { ...options, ...preparedOptions })\n const trackImpression = (options) => trackFn('impression', { ...options, ...preparedOptions })\n return [trackClick, trackImpression]\n}\n\nexport const trackPageOptions = prepareNameOptional('page-view')\nexport const trackPage = (screen?: string): Promise => trackPageOptions({ screen })\nexport const trackClick = prepareName('click')\nexport const trackCickSync = prepareNameSync('click')\nexport const trackImpression = prepareName('impression')\n"],"names":["forwardRef","children","className","disabled","loading","onClick","onMouseDown","style","type","ref","fill","viewBox","cx","cy","r","stroke","strokeWidth","d","CoreDivider","Section","Full","Indent","Center","other","VendorLoginStatus","vendorMeState","key","default","effects_UNSTABLE","onSet","vendorContactUser","id","full_name","email","phone_number","normalized_phone_number","created_at","vendor_name","vendorSettingsState","vendorContactsState","vendorLoginStatusState","Unknown","vendorOpportunitiesState","vendorPaymentsState","vendorClientSecretState","vendorPastProjectsState","vendorShowAddedPastProjectsSuccessDialogState","vendorOpportunityDetailState","extensionOptionsState","extensionModalState","extensionExtensionReasonSelector","get","extension_reason","set","value","o","extensionFollowupReasonSelector","followup_reason","extensionFollowupDateSelector","followup_date","extensionFollowupAssistanceSelector","need_followup_assistance","extensionRescheduledAssistanceSelector","need_rescheduled_assistance","extensionBudgetDetailsSelector","bid_ready","budget_details","extensionFollowupScheduledSelector","followup_scheduled","extensionSiteVisitRescheduledSelector","site_visit_rescheduled","extensionScopeDetailsSelector","scope_details","extensionExtensionDateSelector","extension_date","extensionNeedMoreThanAWeekSelector","need_more_than_a_week","extensionAdditionalDetailsSelector","additional_details","extensionMoreTimeReasonSelector","more_time_reason","extensionRescheduledDateSelector","rescheduled_date","vendorTopMenuOpenState","vendorSidebarOpenState","directUploadFile","file","directUpload","Promise","resolve","reject","create","error","blob","fetchVendorContactUserMe","signal","cache","updateVendorSettings","body","headers","Accept","fetch","method","credentials","updateMeVendorContact","setMe","setVendorLoginStatus","useEffect","controller","AbortController","newVendorContactUserMe","LoggedIn","aborted","code","console","LoggedOut","abort","xmlns","clipPath","x","y","width","height","rx","maskUnits","mask","submitting","setSubmitting","useState","handleSubmit","useCallback","via","csrfParam","document","querySelector","getAttribute","csrfToken","window","history","replaceState","location","href","PageTitle","title","action","onSubmit","name","CoreInput","Text","autoComplete","autoFocus","URLSearchParams","search","placeholder","required","readOnly","defaultValue","CoreButton","text","icon","Spinner","color","size","to","role","me","minLength","maxLength","fillRule","clipRule","x1","y1","x2","y2","gradientUnits","stopColor","offset","sfdcPayment","JSON","parse","innerHTML","payVia","setPayVia","paymentProvidersExpanded","setPaymentProvidersExpanded","setClientSecret","setAlert","payment_id","paymentId","token","handleBankTransferClick","handleBankCardClick","expandPaymentProviders","event","stopPropagation","preventDefault","pathname","split","pop","pay_via","response","sfdcPaymentRef","createVendorPayCheckout","sfdc_ref","jsonBody","client_secret","push","e","DOMException","Date","now","message","status","onChange","CheckCircle","RadioButtonUnchecked","ExpandMore","kind","stripePromise","loadStripe","dataset","stripePublishableKey","clientSecret","replace","EmbeddedCheckoutProvider","options","stripe","EmbeddedCheckout","stripeSession","payment_status","useLoadVendorSettings","setVendorSettings","newVendorSettings","useLoadVendorOpportunities","fetching","setFetching","vendorOpportunities","setVendorOpportunities","newVendorOpportunities","useLoadVendorOpportunity","setVendorOpportunityDetail","newVendorOpportunityDetail","fetchVendorOpportunity","useLoadVendorContacts","setVendorContacts","newVendorContacts","reduce","a","useUpsertVendorContact","upsertingContact","setUpsertingContact","actionLabel","updateVendorContact","isError","errors","errorsArray","Object","keys","concat","join","updatedVendorContact","oldVendorContacts","useDeleteVendorContact","deletingContact","setDeletingContact","deleteVendorContact","useDeleteVendorContactHeadshot","deletingVendorContactHeadshot","setDeletingVendorContactHeadshot","deleteVendorContactHeadshot","useInviteVendorContact","cb","invitingContact","setInvitingContact","inviteVendorContact","useLoadPayments","vendorPayments","setVendorPayments","newVendorPayments","useLoadPastProjects","vendorPastProjects","setVendorPastProjects","newVendorPastProjects","acc","project","useDeletePastProject","deletingPastProject","setDeletingPastProject","deleteVendorPastProject","oldVendorPastProjects","useDeclineVendorOpportunity","formData","setFormData","onComplete","stringify","fromEntries","declineVendorOpportunity","useRequestBidExtension","requestBidExtension","useExtensionModalNavigate","match","screen","next","url","skipNflux","feature","startDate","endDate","beta","userJoinedAfterThisFeatureLaunched","isAfter","localStorage","getItem","ml","useNewFeatureJourneyEffect","ready","steps","driverObj","popoverClass","current","onNextClick","_element","_step","index","state","activeIndex","section","flexfield_1","moveNext","onPrevClick","movePrevious","onHighlighted","animate","disableActiveInteraction","prevBtnText","nextBtnText","onDestroyed","setItem","scrollTo","top","behavior","drive","destroy","useNewFeatureJourney","setSidebarOpen","useRef","useMemo","hasBusinessSettings","roles","filter","includes","length","hasBusinessUnits","vendor_multiple_business_units","vendorSideMenuButtonElementVisible","checkVisibility","menuItemPrefix","Image","src","video","createElement","preload","load","popover","description","_a","wrapper","querySelectorAll","forEach","element","setTimeout","side","align","Boolean","groupBy","f","b","i","date","format","timestamp","overdue","comingSoon","add","colSpan","opportunity","showNotesCol","opportunityName","client","trim","property","address_line_1","visit_status","group","coming_soon","bid_extension_requested","bid_extension_ts","bid_due_ts","current_status","advisor_bid_message","scheduling_url","target","rel","upcoming","overdueGroup","upcomingGroup","outstandingPayments","map","payments","stripe_next_action","overduePayments","invoice_due_date","isBefore","dueSoonPayments","anyNote","some","transform","HourglassEmpty","vendor_contract_version","vendor_contract_accepted_at","sort","localeCompare","MonetizationOn","ChevronRight","Fragment","awarded","archived","open","activeTab","setActiveTab","setActiveTabToOpen","setActiveTabToAwarded","setActiveTabToArchived","CoreText","Headline","weight","Paragraph","awardedPaid","awardedPaymentsDue","awardedPaidGroup","awardedPaymentsDueGroup","payment","takeRate","label","capchase_url","sfdc_id","rowSpan","amount_in_cents","stripe_url","quickbooks_url","verify_with_microdeposits","hosted_verification_url","arrival_date","tz","initiatedPaymentsExpanded","setInitiatedPaymentsExpanded","toggleInitiatedPaymentsExpanded","oldInitiatedPaymentsExpanded","setActiveTabToOutstanding","hash","setActiveTabToHistory","setActiveTabToCancelled","upcomingPayments","historyPayments","initiatedPayments","collectedPayments","cancelledPayments","handleHashChange","addEventListener","removeEventListener","overduePaymentsByYear","String","year","upcomingPaymentsByYear","initiatedPaymentsByYear","collectedPaymentsByYear","cancelledPaymentsByYear","take_rate","setOpen","handleCloseClick","BaseModal","Close","Error","props","NewVendors","LegacyVendors","documentType","documentMarkdown","documentTitle","referral_agreement","payment_terms","rules_of_conduct","Markdown","overrides","component","contractAcceptedCheck","setContractAcceptedCheck","setError","errorModalOpen","setErrorModalOpen","documentToView","setDocumentToView","documentModalOpen","setDocumentModalOpen","substring","handleToggleAccepted","val","acceptVendorContract","newMe","json","handleClickDocument","vendor_contract_needs_attention","vendor_contract_hold","EventBusy","CalendarToday","vendor_contract_overdue","vendor_contract_accepted_due_at","Check","Update","vendor_contract_accepted_by_full_name","vendor_contract_accepted_by_email","CoreList","Item","leftIcon","FileCopy","textClassName","CheckBox","CheckBoxOutlineBlank","Info","iframeLoaded","setIframeLoaded","handleIframeLoaded","provider","onLoad","projectStatus","HighlightOff","Pause","submittedBid","submitted_at","Cancel","WithdrawnStatus","bid_status","vendorLicense","onClose","onConfirm","licenseEl","setLicenseEl","smallerFont","setSmallerFont","handleCanvasRef","family","getComputedStyle","getPropertyValue","letterSpacing","font","context","getContext","measureText","number","available","offsetWidth","Math","ceil","last_checked_at","advisor","profile_pic_url","alt","display_phone_number","denied","setDenied","handleVerifyClose","onContinue","vendor_allow_pac","paymentMethod","setPaymentMethod","bidPrice","projectType","handleInstaPayClick","handlePaymentPlanClick","handlePayAtConstructionClick","handleLegacyClick","handleDesignClick","instaPayPrice","instaPayRate","vendor_insta_pay_rate","round","paymentPlanPrice","paymentPlanRate","vendor_payment_plan_rate","pacPrice","pacRate","vendor_pay_at_construction_rate","vendor_allow_capchase","filename","filesize","bid_type","editable","onRemove","onBidTypeChange","handleRemove","handleBidTypeChange","indexOf","floor","log","Number","pow","toFixed","humanFileSize","A","currencyMask","prefix","suffix","includeThousandsSeparator","thousandsSeparatorSymbol","allowDecimal","allowNegative","allowLeadingZeroes","setBidPrice","handleChangePrice","newVal","parseInt","inputMode","FILE_TYPE_MAP","DEFAULT_FILE_TYPE","vendorRelId","files","existingFiles","allowSubmit","inputRef","dragActive","setDragActive","setFiles","record","dataToSubmit","setDataToSubmit","submissionErrors","setSubmissionErrors","verifyLicenseModalOpen","setVerifyLicenseModalOpen","flexiblePaymentsIntroModalOpen","setFlexiblePaymentsIntroModalOpen","selectBidPriceModalOpen","setSelectBidPriceModalOpen","selectPaymentMethodModalOpen","setSelectPaymentMethodModalOpen","bidTypes","values","handleDrag","handleDrop","dataTransfer","oldFiles","Array","from","crypto","randomUUID","handleChange","handleButtonClick","click","uuid","_","newFiles","bidType","updatedFile","handleSubmitInner","paymentMethodOveride","paymentMethodToUse","newDataToSubmit","FormData","append","toString","handleConfirmPaymentMethod","vendor_contract_presented_at","ok","reload","touchDevice","setTouchDevice","handleIntroContinue","handleSelectPriceContinue","handleConfirmVerification","handleAttemptSubmit","entries","validationErrors","extension","onDragEnter","multiple","accept","htmlFor","onDragLeave","onDragOver","onDrop","vendor_license","Phone","Email","openWithdrawModal","project_status","handleComplete","handleSetOpen","address","address_city","address_state","address_zip","rows","showTime","setDate","localDate","local","handleChangeHour","hour","newDate","toDate","handleChangeMinute","minute","handleChangePeriod","period","min","max","step","onDone","note","marks","marksProp","darkenMonth","timezone","pickTime","darkMarks","cursor","startOf","endOf","getTime","Calendar","selected","onSelectionChange","initialView","rest","modalOpen","setModalOpen","popoverOpen","setPopoverOpen","handleOpenModal","handleCloseModal","handleOpenPopover","handleClosePopover","refs","strategy","onOpenChange","placement","middleware","rects","mainAxis","reference","floating","crossAxis","interactions","getReferenceProps","getFloatingProps","overlayStyle","zIndex","position","left","toISOString","Button","setReference","setFloating","extensionReason","extensionDate","setExtensionDate","secondSiteVisitDate","additionalDetails","setAdditionalDetails","needMoreThanAWeek","setNeedMoreThanAWeek","modalState","toggleNeedMoreThanAWeek","originalDueDate","originalDuePacific","nowPacific","overAWeekPastDue","needsAdditionalDetails","valid","calendarMarks","handleDateChange","TextArea","onChangeText","handleClickContinue","subtitle","alert","button","bgColor","info","success","warning","textColor1","textColor2","Alert","valueProp","setValue","handleClickOption","option","reason","setReason","navigate","handleContinueClick","onChangeProp","wasRescheduled","setWasRescheduled","calendarNote","isValid","start","end","ts","rescheduledDate","setRescheduledDate","validateDate","needRescheduleAssistance","setNeedRescheduleAssistance","needFollowupAssistance","setNeedFollowupAssistance","followupReason","setFollowupReason","scope","setScope","budget","setBudget","followupScheduled","setFollowupScheduled","followupDate","setFollowupDate","resetExtensionOptions","setModalState","extensionOptions","exact","path","strokeLinecap","strokeLinejoin","editPaymentModalOpen","setEditPaymentModalOpen","openEditPaymentModal","closeEditPaymentModal","paymentsByYear","payment_method","pac_confirmed","project_type","WarningRounded","CoreCard","AttachMoney","iconColor","openExtensionModal","effectiveBidDueDate","site_visit_ts","HistoryToggleOff","Home","submitted_bid","handleVisibilityChange","visibilityState","useLayoutEffect","pointOfContactModalOpen","setPointOfContactModalOpen","projectStatusModalOpen","setProjectStatusModalOpen","withdrawModalOpen","setWithdrawModalOpen","extensionModalOpen","setExtensionModalOpen","openPointOfContactModal","handlePointOfContactModalKeyUp","openProjectStatusModal","handleProjectStatusModalKeyUp","setActiveTabToProjectDetails","setActiveTabToProposals","setActiveTabToPayments","addressRest","propertyInfo","line1","city","zip5","lat","coords","long","googleMapsUrl","projectStatusKey","find","StreetViewImage","encodeURIComponent","Map","onKeyUp","tabIndex","RotateRight","Person","dangerouslySetInnerHTML","__html","PointOfContactModal","strokeMiterlimit","pastProject","handleDeleteClick","handleLinkClick","start_date","startDateDayJs","end_date","endDateDayJs","cover_photo","project_types","before_media","after_media","Delete","sublabel","labelClassName","stage","setSaving","attachments","setAttachments","uploading","setUploading","hint","fileInputRef","invalidFiles","setInvalidFiles","setPastProjects","isDragging","setIsDragging","handleDragOver","items","item","startsWith","dropEffect","DataTransfer","Event","bubbles","dispatchEvent","handleDragLeave","handleFileChange","limit","setCustomValidity","reportValidity","newAttachments","converted","quality","File","signed_id","file_type","URL","createObjectURL","oldAttachments","moveProject","attachment","destination","attachment_id","destination_project_id","destination_stage","newProjects","existing","handleDelete","newProject","handleMoveType","handleMoveProject","FileUpload","controls","Dropdown","overlay","hover","pp","user","rightIcon","RemoveCircle","MoreVert","selectedProjects","setSelectedProjects","query","setQuery","filteredProjectTypes","toLowerCase","handleChangeQuery","handleClickProject","handleClickRemoveProject","Add","fetchingProjects","onTipsClick","setValidationErrors","realmLead","setRealmLead","setStartDate","setAddress","squareFootage","setSquareFootage","totalCostInDollars","setTotalCostInDollars","beforeAttachments","setBeforeAttachments","afterAttachments","setAfterAttachments","uploadingBeforeMedia","setUploadingBeforeMedia","uploadingAfterMedia","setUploadingAfterMedia","uploadingMedia","allAttachments","sfdc_opportunity_ref","square_footage","total_cost_in_dollars","pastProjects","fetchingOpps","setFetchingOpps","saving","formRef","handleClickRealmLead","handleClickSave","requestSubmit","handleClickClose","awardedVendorOpps","availableVendorOps","claimedOpps","opp","opportunity_id","newBeforePhotos","getAll","newAfterPhotos","allNewPhotos","opportunityId","customerName","mode","newPhotoCount","newBeforePhotoCount","newAfterPhotoCount","fileTypes","rawErrors","previousValue","currentValue","queryVendorOpps","findVendorOpp","mapVendorPrediction","prediction","handleChangePrediction","newAddress","pricePerSquareFoot","parseFloat","backgroundImage","RadioButtonChecked","CoreComboBox","queryMethod","findMethod","mapPrediction","onChangePrediction","showPredictionsImmediately","Address","selectionStyle","additional_info","Money","PhotoCamera","onBack","setActiveTabToInterior","setActiveTabToExterior","ArrowBack","WbSunny","CenterFocusStrong","ScreenRotation","ThreeSixty","showingTips","setShowingTips","dialogPanelRef","startShowingTips","scroll","stopShowingTips","showAgain","setShowAgain","handleClickCheckbox","addModalOpen","setAddModalOpen","successModalOpen","setSuccessModalOpen","showSuccessModal","projectToEdit","setProjectToEdit","matchAdd","matchSuccess","addId","params","past_project_id","successId","projectId","handleCloseAddModal","result","handleCloseSuccessModal","renderAddModal","renderSuccessModal","render","allProjectTypes","count","memo","ChevronLeft","vendorSettings","business_units","businessUnit","projectTypesMissing","handleExpand","PlaylistAddCheck","fetchingPastProjects","setFetchingPastProjects","logo_url","StoreMallDirectory","bio","setBusinessUnitId","handleClick","serviceAreaAsFeatureCollection","mapRef","mapboxglAccessToken","featureCollection","container","zoom","maxZoom","minZoom","draw","displayControlsDefault","addControl","on","bbox","bounds","fitBounds","duration","padding","remove","ProjectTypesCheckbox","checked","onChangeProjectType","control","field","handleChangeProjectType","valueCopy","register","handleSubmitF","defaultValues","dispatcher_id","dispatcher","hq_address","hqAddressField","originalController","modifiedValue","slice","useAddressController","data","errorsHash","Select","vendor_contacts","vendorContact","AutoAwesome","PinDrop","self_hold","self_hold_end_date","selfHoldField","selfHoldEndDateField","selfHold","businessUnitId","handleAcceptingLeadsChange","handleRefusingLeadsChange","ToggleSwitchButton","offColor","elementSize","Help","editModalOpen","setEditModalOpen","addBusinessUnitModalOpen","setAddBusinessUnitModalOpen","handleEditDetailsClick","handleAddBusinessUnitClick","Edit","headshot_url","initials","People","service_area_as_feature_collection","setActionsMenuOpen","setEditVendorContactFormModalOpen","isSelf","meOwner","theyOwner","editDisabled","inviteDisabled","deleteDisabled","handleClickEdit","handleClickResendInvite","handleClickDelete","account_status","expanded","setExpanded","toggleExpanded","oldExpanded","Remove","fileToUpload","setFileToUpload","setFile","previewUrl","setPreviewUrl","newPreviewUrl","revokeObjectURL","handleAddClick","newFile","handleClear","handleReset","fileInputRegister","handleRegister","inputElement","pic_url","vendorContactRoles","vendor_business_unit_ids","vendor_business_units","phoneNumberField","rolesField","businessUnitsField","handleUpload","signedId","onUpload","useDirectUploadFile","roleChanged","every","mapRolePrediction","queryRole","queryBusinessUnit","mapBusinessUnitPrediction","CoreMultiComboBox","initialPredictions","first","last","editVendorContactFormModalOpen","actionsMenuOpen","ooo","subscribed_to_emails","reminders_enabled","menu","vendorContacts","newVendorContactFormModalOpen","setNewVendorContactFormModalOpen","handleAddUserClick","innerReady","setInnerReady","HashChangeEvent","innerWidth","popoverArrow","classList","goBack","setActiveTabToGeneral","setActiveTabToTeam","BusinessCenter","setMenuMode","setOoo","ooo_starts_at","ooo_ends_at","setEndDate","selectedContact","setSelectedContact","backup_vendor_contact_id","updating","setUpdating","isDispatcher","handleCloseAvailabilityClick","handleOooClick","handleChangeContact","newVendorContactUser","availableVendorContacts","center","RequestQuote","iconAlignment","menuOpen","setUserModalOpen","menuMode","handleVendorContactClick","handleAvailabilityClick","handleSignout","AvatarOrInitials","avatarUrl","Block","EventAvailable","Logout","setMenuOpen","handleMenuClick","currentlyOutOfOffice","upcomingOutOfOffice","Menu","useShiftMiddleware","ExpandLess","sidebarOpen","Root","show","as","Child","enter","enterFrom","enterTo","leave","leaveFrom","leaveTo","Panel","topBarsRef","topBarsHeight","setTopBarsHeight","navToOverview","navToProjects","navToWonProjects","navToPayments","navToProfile","navToSettings","navToContract","navToDiscountedMaterialsGE","navToDiscountedMaterialsMSI","offsetHeight","Widgets","border","Handyman","LocalShipping","Store","Draw","userModalOpen","submittingRemindersEnabled","setSubmittingRemindersEnabled","handleRemindersEnabledChange","getElementById","primary_contact","Checkbox","defaultChecked","missingProjectTypes","adjustedProjectTypes","vendor_project_types_with_insufficient_photos","kitchen_or_bathroom","adu","hardscaping","landscaping","vendor_insufficient_photos_block","vendor_insufficient_photos_warning_at","redirectWithoutTrailingSlash","substr","assign","redirectOriginalAction","trackCurrentPage","VendorInnerRoutes","vendorLoginStatus","strict","VendorRoutes","listen","useRailsFlash","createRoot","StrictMode","GlobalAlert","setMark","mark","getMark","MonthDay","marked","onSelected","day","visibleWeeks","days","totalDays","firstOfMonth","theMonth","month","dayOfWeek","isSame","WeekDay","theWeek","week","allowViewChange","onTrackAttempt","view","setView","track","handlePrevClicked","prev","handleNextClicked","handleTodayClicked","handleDateSelected","handleShowMoreClicked","handleShowMonthClicked","djsSelected","calendar","expandMore","version","points","fillOpacity","xmlnsXlink","trackSync","prepareName","preparedOptions","trackFn","prepare","prepareBoth","trackPageOptions","prepareNameOptional","trackPage","trackClick","trackImpression","prepareNameSync"],"sourceRoot":""}