{"version":3,"sources":["lib/localStorageWrapper.js","lib/httpRequestMethods.js","lib/httpStatusCodes.js","lib/apiClients/roofSnapApiClient/roofSnapApiClient.js","lib/apiClients/roofSnapApiClient/userProfileClient.js","middleware/api.js","actions/actionTypes.js","actions/currentUserProfileActions.js","actions/currentUserRolesActions.js","actions/authActions.js","components/LoggedInMenu/LoggedInMenu.js","components/RoofSnapDrawer/RoofSnapDrawer.js","components/Search/Search.js","components/Search/index.js","components/SearchSuggestionsMenu/SearchSuggestionsMenu.js","components/SearchSuggestionsMenu/index.js","containers/SearchAppBar/SearchAppBar.js","actions/searchSuggestionsActions.js","containers/SearchAppBar/index.js","containers/OrdersTabs/TabNames.js","lib/sketchOrderStatuses.js","lib/queryStringBuilder.js","lib/apiClients/roofSnapApiClient/sketchTechSketchOrderClient.js","containers/withOrdersRouter/withOrdersRouter.js","containers/withOrdersRouter/index.js","actions/sketchOrderDashboardActions.js","actions/ordersTabsActions.js","containers/OrdersTabs/MetalRoofIcon.js","containers/OrdersTabs/OrdersTabs.js","containers/OrdersTabs/index.js","containers/RoofSnapAppBar/RoofSnapAppBar.js","containers/RoofSnapAppBar/index.js","lib/apiClients/roofSnapApiClient/sketchAdminSketchOrderClient.js","actions/sketchOrderActions.js","containers/SketchComponentHost/SketchComponentHost.js","actions/sketchHostActions.js","containers/SketchComponentHost/index.js","components/Login/Login.js","components/Login/index.js","containers/Auth/Auth.js","containers/Auth/index.js","actions/sketchOrdersActions.js","components/Pager/Pager.js","components/SketchOrderStatusChip/SketchOrderStatusChip.js","components/TimeSinceRequestedChip/TimeSinceRequestedChip.js","components/ChooseSketchOrderFilterDialog/ChooseSketchOrderFilterDialog.js","components/ChooseSketchOrderFilterDialog/index.js","components/StatusSketchOrderFilterDialog/StatusSketchOrderFilterDialog.js","components/StatusSketchOrderFilterDialog/index.js","lib/apiClients/roofSnapApiClient/organizationClient.js","containers/OrganizationSketchOrderFilterDialog/OrganizationSketchOrderFilterDialog.js","actions/organizationsActions.js","actions/organizationActions.js","containers/OrganizationSketchOrderFilterDialog/index.js","actions/userProfilesActions.js","actions/userProfileActions.js","containers/RequesterSketchOrderFilterDialog/RequesterSketchOrderFilterDialog.js","containers/RequesterSketchOrderFilterDialog/index.js","containers/OwnerSketchOrderFilterDialog/OwnerSketchOrderFilterDialog.js","containers/OwnerSketchOrderFilterDialog/index.js","lib/sketchOrderSortParameters.js","lib/OrderParameters.js","components/SketchOrderTable/SketchOrderTable.js","components/SketchOrderList/SketchOrderList.js","containers/QueuedSketchOrders/QueuedSketchOrders.js","containers/QueuedSketchOrders/index.js","containers/QueuedVendorSketchOrders/QueuedVendorSketchOrders.js","containers/QueuedVendorSketchOrders/index.js","components/ForbiddenDialog/ForbiddenDialog.js","components/LoadingDialog/LoadingDialog.js","components/SomethingWentWrongDialog/SomethingWentWrongDialog.js","components/SomethingWentWrongDialog/index.js","containers/ProtectedRoute/ProtectedRoute.js","containers/ProtectedRoute/index.js","containers/AllSketchOrders/AllSketchOrders.js","containers/AllSketchOrders/index.js","containers/DashboardCard/DashboardCard.js","containers/Dashboard/Dashboard.js","containers/Dashboard/index.js","containers/MyAssignedSketchOrders/MyAssignedSketchOrders.js","containers/MyAssignedSketchOrders/index.js","components/NoMatch/NoMatch.js","lib/FeatureFlags.js","actions/sketchOrderNotificationsActions.js","lib/apiClients/roofSnapApiClient/notificationTemplatesClient.js","actions/notificationTemplatesActions.js","lib/apiClients/roofSnapApiClient/projectClient.js","lib/apiClients/roofSnapApiClient/sketchOrderTierClient.js","actions/sketchOrderTiersActions.js","components/IconButton/IconButton.js","components/IconButton/index.js","components/Alert/Alert.js","components/Alert/index.js","components/RoofSnapConfirmationDialog/RoofSnapConfirmationDialog.js","components/RoofSnapConfirmationDialog/index.js","components/RoofSnapSnackBar/RoofSnapSnackBar.js","components/RoofSnapSnackBar/index.js","components/AutoComplete/AutoComplete.js","components/AutoComplete/index.js","lib/roles.js","actions/sketchTechUserProfilesActions.js","containers/SetSketchTechDialog/SetSketchTechDialog.js","lib/sketchOrderStatusDisplayConfig.js","components/SketchOrderCardHeader/SketchOrderCardHeader.js","components/SketchOrderCardHeader/index.js","components/TextOnlyFormField/TextOnlyFormField.js","lib/sketchOptions.js","components/CurrencyNumberFormatter/CurrencyNumberFormatter.js","components/CurrencyNumberFormatter/index.js","components/SketchOrderCardDetails/SketchOrderCardDetails.jsx","components/SketchOrderCardCustomerInformation/SketchOrderCardCustomerInformation.js","components/SketchOrderCardCustomerInformation/index.js","components/Map/withParcelLines.js","components/Map/Map.js","components/Map/MapWrapper.js","components/Map/index.js","components/SketchOrderCardLocation/SketchOrderCardLocation.js","components/SketchOrderCardLocation/index.js","components/SketchOrderCardActions/SketchOrderCardActions.js","components/SketchOrderCardActions/index.js","components/UserProfileField/UserProfileField.js","components/UserProfileField/index.js","components/SketchOrderAssignments/SketchOrderAssigments.js","components/TabPanel/TabPanel.jsx","components/TabPanel/index.js","components/SketchOrderCardRevisionNotes/SketchOrderCardRevisionNotes.jsx","components/SketchOrderCard/SketchOrderCard.js","components/SketchOrderCard/index.js","components/SketchOrderNotificationsDrawer/Drawer.js","components/SketchOrderNotificationsDrawer/NotificationListItem.js","components/SketchOrderNotificationsDrawer/SketchOrderNotificationsDrawer.js","components/SketchOrderNotificationsDrawer/index.js","lib/SketchOrderDeliveryOptionValues.js","components/SketchOrderDeliveryOptions/SketchOrderDeliveryOptions.js","components/SketchOrderDeliveryOptions/index.js","components/FloatingActionButton/FloatingActionButton.js","components/FloatingActionButton/index.js","components/TransitionSketchOrderButton/TransitionSketchOrderButton.jsx","components/TransitionSketchOrderButton/index.js","containers/SketchOrder/SketchOrder.jsx","actions/projectDrawingSummaryActions.js","actions/projectActions.js","actions/sketchOrderNotificationActions.js","containers/SketchComponentHost/SketchRoute.js","containers/MapImageryOptionsHost/MapImageryOptionsHost.js","lib/sketchOrderHelpers.js","components/SketchOrderTable/index.js","components/SketchOrderList/index.js","actions/searchSketchOrdersActions.js","containers/SearchSketchOrders/SearchSketchOrders.js","Content.js","App.js","lib/LoggerWrapper.js","reducers/authReducer.js","reducers/sketchOrdersReducer.js","reducers/currentUserReducer.js","lib/userRolesHelper.js","reducers/currentUserRolesReducer.js","reducers/dashboardReducer.js","reducers/organizationsReducer.js","reducers/userProfilesReducer.js","reducers/sketchOrderTiersReducer.js","reducers/organizationReducer.js","reducers/sketchHostReducer.js","reducers/projectReducer.js","reducers/sketchTechUserProfilesReducer.js","reducers/ordersTabsReducer.js","reducers/searchSketchOrdersReducer.js","reducers/searchSuggestionsReducer.js","reducers/projectDrawingSummaryReducer.js","reducers/notificationTemplatesReducer.js","reducers/sketchOrderNotificationsReducer.js","reducers/index.js","store.js","middleware/logging.js","index.js"],"names":["localStorageAvailable","storage","LocalStorageWrapper","key","localStorage","getItem","error","value","setItem","clear","httpRequestMethods","GET","POST","PUT","DELETE","HttpStatusCodes","Ok","Created","NoContent","BadRequest","Unauthorized","Forbidden","NotFound","MethodNotAllowed","PreconditionFailed","InternalServerError","ROOFSNAP_API_BASE_URL","concat","process","baseUrl","buildApiConfigRequest","method","body","version","config","headers","RSClient","token","Authorization","JSON","stringify","async","callApi","url","response","fetch","ok","status","window","location","pathname","Promise","reject","handleApiErrors","success","json","camelizeKeys","RoofSnapApiClient","constructor","endpoint","UserProfileClient","params","queryParams","super","get","id","CALL_API","Symbol","getCurrentUser","accessToken","type","tokenPayload","jwtDecode","userId","parseInt","name","request","getUserProfile","types","getCurrentUserRoles","getUsersRoles","login","username","password","dispatch","isFetching","encodeURIComponent","access_token","error_description","authenticate","all","receiveLogin","message","logout","LoggedInMenu","Component","arguments","state","open","anchorEl","handleOpen","event","this","setState","currentTarget","handleClose","logOut","props","onLogoutClick","render","fullName","currentUser","firstName","lastName","React","createElement","Button","aria-owns","aria-haspopup","onClick","color","AccountCircle","Menu","onClose","MenuItem","disabled","ListItemIcon","Face","ListItemText","primary","Email","userName","AssignmentInd","position","Divider","PowerSettingsNew","defaultProps","withStyles","style","list","width","menuItem","textDecoration","isSketchOsAdmin","currentUserRoles","isAdmin","Drawer","onToggle","className","classes","Link","to","Dashboard","ShoppingCart","Storage","Assignment","Search","handleOnChange","target","onChange","handleOnKeyPress","keyCode","onSearch","getPaperStyles","paperStyles","root","fullWidth","push","defaultValue","componentDidUpdate","prevProps","Paper","elevation","join","Input","onKeyUp","autoFocus","startAdornment","InputAdornment","SearchIcon","disableUnderline","placeholder","padding","SearchSuggestionsMenu","suggestionsTitle","paddingLeft","suggestions","length","List","Typography","variant","map","suggestion","ListItem","button","onSuggestionClick","searchText","SearchAppBar","handleOnSearch","history","getSearchSuggestions","search","suggesterName","apiClientInit","environment","apiVersion","RoofSnapSearchApiClient","handleOnSuggestionClick","suggestionId","bind","queryString","parse","q","show","AppBar","Toolbar","IconButton","onDismissClick","backButton","ArrowBackIcon","connect","searchSuggestions","searchSuggestionsStore","withRouter","backgroundColor","marginLeft","marginRight","SketchOrderStatusId","SketchOrderStatus","allSketchOrderStatuses","QueryStringBuilder","setQueryParameter","concatonater","startsWith","newQueryStringParameter","buildQueryString","SketchTechSketchOrderClient","update","delete","pendingStatusFilters","withOrdersRouter","WrappedComponent","HOC","goToPendingOrders","goToPendingVendorOrders","goToMyOrdersInProgress","queryStringBuilder","goToOrdersWithFilter","statusFilters","forEach","goToOrdersPendingSketchOsAdmin","goToOrdersWithException","goToBillingFailedOrders","goToRushOrders","goToMetalRoofOrders","subscribeSignalR","loginToken","connection","HubConnectionBuilder","withUrl","accessTokenFactory","build","on","orders","payload","start","then","invoke","catch","err","console","toString","getAllSketchOrderCounts","Object","assign","dashboard","isFetchingCounts","totalOrdersInTheQueue","totalOrdersInTheVendorQueue","totalOrdersPendingSketchOsAdmin","totalExceptionOrders","totalMyOrdersInProgress","totalBillingFailedOrders","totalRushOrders","filteredRushOrders","pendingMetalRoofOrders","setActiveOrdersTab","tabIndex","MetalRoofIcon","_ref","active","alt","src","OrdersTabs","setActiveTab","statusIds","Array","isArray","TabNames","rush","renderTab","icon","count","toLocaleString","handleChange","componentDidMount","appBar","Tabs","indicatorColor","textColor","centered","Tab","AllInbox","label","tab","display","Store","Timelapse","SupervisorAccount","Warning","ordersTabs","zIndex","paddingTop","fontSize","fontWeight","height","lineHeight","marginTop","borderRadius","left","top","RoofSnapAppBar","drawerOpen","searchBarOpen","urlToReturnTo","toggleOpenDrawer","showSearchBar","handleOnDismissSearchBarClick","isRoofSnapAdmin","RoofSnapDrawer","isAuthenticated","menuButton","aria-label","MenuIcon","flex","flexGrow","auth","SketchAdminSketchOrderClient","sketchOrderId","create","getSketchOrderClient","getState","getSketchOrder","getSketchOrderRequest","updateSketchOrder","updateSketchOrderRequest","deleteSketchOrderProject","deleteSketchOrderProjectRequest","SketchComponentHost","sketchOrder","sketchOrders","orderId","authorizedToOpenDrawing","isSketchTech","sketchOrderStatus","navigateToOrder","handleWasteCalculationUpdated","projectDrawing","wasteCalculation","sketchReportType","includes","Measurements","WastePercentage","suggestedWastePercent","projectId","displayPitchTool","saveImages","SketchComponent","jwt","baseApiUrl","baseFacetFindingApiUrl","baseMeasurementApiUrl","apiKey","cocosScript","onWasteCalculationUpdated","rsClient","basePitchApiUrl","disablePitchTool","hideGutterPins","sketchHost","sketchOrdersState","withMobileDialog","Login","preventDefault","onLoginClick","onSubmit","Card","CardHeader","title","CardContent","FormControl","margin","InputLabel","htmlFor","errorMessage","FormHelperText","CardActions","cardActions","CircularProgress","theme","maxWidth","paddingRight","spacing","paddingBottom","Auth","Redirect","getSketchOrdersRequest","getSketchOrders","page","undefined","sketchTechUserIds","organizationId","orderBy","sortBy","filterByVendor","requesterUserId","filterStorm","metalRoof","getOwnersSketchOrders","ownerUserId","userProfileClient","getOwnedSketchOrders","text","textAlign","Grid","container","item","xs","prevPageClick","currentPage","ChevronLeft","totalPages","nextPageClick","ChevronRight","pendingChipStyle","lightBlue","inProgressChipStyle","amber","pendingReviewChipStyle","lightGreen","pendingRejectionChipStyle","orange","completeChipStyle","green","inactiveChipStyle","grey","errorChipStyle","red","inReviewChipStyle","SketchOrderStatusChip","renderStatusChip","onDelete","Chip","avatar","Avatar","Schedule","Autorenew","FindInPage","Cancel","CheckCircle","MonetizationOn","RemoveCircle","propTypes","PropTypes","string","func","styles","yellow","TimeSinceRequestedChip","renderTimeSinceRequestedChip","isBlueRoof","minutesOrHours","adjustedTime","yellowValue","redValue","Math","round","number","bool","ChooseSketchOrderFilterDialog","toggleDialog","statusFilterDialogOpen","organizationFilterDialogOpen","isV2EndpointUsed","numberOfOwnerFilters","isOwnerFilterDisabled","numberOfRequesterFilters","Dialog","fullScreen","DialogTitle","DialogContent","dialogContent","chooseStatusFilter","numberOfStatusFilters","miniAvatar","canFilterByOrganization","chooseOrganizationFilter","numberOfOrganizationFilters","canFilterByRequester","chooseRequesterFilter","canFilterByOwner","chooseOwnerFilter","secondary","DialogActions","FilterSketchOrdersDialog","minWidth","palette","main","StatusSketchOrderFilterDialog","getSelectedStatus","statuses","find","renderAvailableStatuses","addStatus","renderSelectedStatuses","organizationChipWrapper","removeFilter","selectedStatuses","applyFilter","onApplyClick","updateStatuses","filter","s","filterAvailableStatuses","some","filteredAvailableStatues","selectStatusWrapper","OrganizationClient","OrganizationSketchOrderFilterDialog","selectedOrganization","searchOrganizations","organizationClient","getOrganizations","searchValue","renderOrganization","organization","selectOrganization","removeOrganization","applyOrganizationFilter","result","getOrganization","organizations","organizationsStore","getUserProfiles","userRoleIds","roleId","RequesterSketchOrderFilterDialog","selectedUser","getInitialSelectedUser","searchUserProfiles","renderUserProfiles","user","selectUser","requesterChipWrapper","userProfiles","userProfilesStore","OwnerSketchOrderFilterDialog","ownerChipWrapper","SketchOrderSortParameter","OrderParameter","blueRoofOrgId","SketchOrderTable","_this","chooseFilterDialogOpen","requesterFilterDialogOpen","ownerFilterDialogOpen","openFilterSketchOrderDialog","closeFilterSketchOrderDialog","newQueryString","clearFilters","newQueryParam","newQueryParams","openStatusFilterDialog","applyStatusFilters","closeStatusFilterDialog","openOrganizationFilterDialog","closeOrganizationFilterDialog","openRequesterFilterDialog","applyRequesterFilter","closeRequesterFilterDialog","openOwnerFilterDialog","applyOwnerFilter","closeOwnerFilterDialog","sort","newSortParameter","order","onSortClick","sortByRequestedDate","sortByUpdatedDate","sortByTimeSinceRequested","sortByDueDate","renderTitle","totalOrders","renderSketchOrderStatusChip","hasNearmapCoverage","rushed","chip","Badge","badgeContent","anchorOrigin","vertical","horizontal","renderProjectName","projectName","impersonatorUserName","currentUserName","split","href","owner","renderSketchOrder","TableRow","hover","onDoubleClick","showStatus","TableCell","showRequestedAtTime","requestedDate","dateformat","showLastUpdatedAtTime","updatedAt","showDueDate","dueDate","showTimeSinceRequested","timeSinceRequested","showOrganizationName","showLinksToSupportDashboard","endsWith","showSketchTech","sketchTech","showRequester","requester","showAddress","address","showProjectName","showCompletedDate","completedDate","showReviewer","reviewer","showCost","cost","currency","EyeIcon","determineNumberOfFilersBeingApplied","determineIfOrderIsAscOrDesc","numberOfFiltersApplied","subtitleIcon","subtitle","showStormFilter","filterStormClick","CloudOff","Cloud","canFilter","FilterList","Pager","onNextPageClick","onPrevPageClick","tableWrapper","Table","TableHead","canSortByRequestedDate","Tooltip","TableSortLabel","direction","canSortByUpdatedDate","canSortByDueDate","TableBody","sketchOrderIds","ChoseSketchOrdersFilterDialog","showCreatedAtTime","verticalAlign","overflowX","SketchOrderList","titlePrefix","goToOrder","renderSketchOrderListItem","listItemTitle","loadingDialog","QueuedSketchOrders","sketchOrderSortParameter","orderParameter","getNextPage","nextPage","getPrevPage","prevPage","handleOnSortClick","handleStormFilterClick","Hidden","smDown","totalResults","mdUp","SketchOrders","sketchOrdersStore","ids","QueuedSketchOrdersVendor","ForbiddenDialog","disableBackdropClick","disableEscapeKeyDown","DialogContentText","LoadingDialog","SomethingWentWrongDialog","onLogOutClick","onReloadClick","ProtectedRoute","goHome","reload","sketchOsAdminRequired","Route","exact","path","component","AllSketchOrders","canSort","isAdminOrSketchOSAdmin","rushOrders","statusesToFilterBy","ordering","sorting","showOwner","rightAlign","DashboardCard","sm","md","lg","xl","cardStyle","total","pendingOrdersCard","cursor","vendorQueueCard","purple","inProgressOrdersCard","pendingReviewOrdersCard","exceptionOrdersCard","MyAssignedSketchOrders","NoMatch","paragraph","featureIsEnabled","flagName","featureFlags","sketchOrderNotifications","sketchOrderDeliveryOptions","vexcelImagery","parcelLines","getNotifications","NotificationTemplatesClient","getNotificationTemplates","client","ProjectClient","SketchOrderTierClient","getSketchOrderTiers","getSketchOrderTier","buttonWrapper","MaterialUIIconButton","children","disabledTitle","Fragment","AlertVariants","Alert","alertData","iconStyle","InfoIcon","CheckCircleIcon","WarningIcon","getAlertData","marginBottom","action","onDismiss","CloseIcon","subheader","titleTypographyProps","subheaderTypographyProps","RoofSnapConfirmationDialog","content","handleConfirmClick","onConfirmClick","confirmButtonText","RoofSnapSnackBar","successSnackbar","errorSnackbar","alignItems","Snackbar","autoHideDuration","renderSnackbarContent","SnackbarContent","Error","inputComponent","inputRef","ref","components","Option","buttonRef","innerRef","selected","isFocused","isSelected","innerProps","Control","TextField","InputProps","inputProps","selectProps","input","textFieldProps","NoOptionsMessage","noOptionsMessage","Placeholder","SingleValue","singleValue","ValueContainer","valueContainer","square","paper","AutoComplete","options","option","valueProp","labelProp","selectStyles","base","Select","isDisabled","readOnly","InputLabelProps","shrink","AutoSelect","flexWrap","withTheme","UserRoleId","UserRole","Admin","AccountAdmin","SalesAppOnly","Max","HideSummaryReports","NearmapDisabled","SketchTech","SketchOsAdmin","SketchOsEnabled","SketchOsExpSketchToolEnabled","getSketchTechUserProfiles","SetSketchTechDialog","getSketchTechnicians","setSketchTechButtonIsDisabled","onSketchTechChange","sketchTechUserProfiles","onSetSketchTechClick","sketchTechUserProfilesState","getDisplayConfig","displayName","SketchOrderCardHeader","handleOpenDrawingClick","showExp","project","hasDrawing","isOpenDrawingButtonDisabled","sketchOrderStatusDisplayConfig","cloneElement","iconButtons","CreateIcon","hasExpSketchToolEnabled","showViewProjectButton","handleViewProjectClick","OpenInNew","onDeleteProjectButtonClick","DeleteIcon","TextOnlyFormField","valueVariant","link","valueFontVariant","SketchOptions","None","MainBuildingWithGarage","MainBuildingOnly","WholeStructure","PartialStructure","Other","CurrencyNumberFormatter","other","NumberFormat","thousandSeparator","decimalSeparator","decimalScale","fixedDecimalScale","SketchOrderCardDetails","orderedTiers","sketchOrderTiers","gutterBottom","formField","internalNotes","onSketchOrderChange","multiline","canEditInternalNotes","sketchOptions","index","notes","canEditProjectName","showReportType","onReportTypeChange","canEditReportType","metalRoofPanelSize","projectDrawingSummary","numberOfFacets","actualSquares","sketchOrderTierId","reportTypeChanged","canEditTier","tier","sketchOrderTierDefinition","minimumValue","maximumValue","canEditCost","FormControlLabel","control","Checkbox","checked","freeOrder","onFreeOrderChange","canEditFreeOrder","reportTypeChange","SketchOrderCardCustomerInformation","onOwnerChange","organizationsUsers","onSearchUsers","canEditOwner","openOwnerInSupportDashboard","withParcelLines","ParcelLines","getSik","callback","sik","jwtToken","data","Response","Success","getParcelData","lat","lng","center","parcelSdk","Env","Connections","SS","getJson","Results","totalRecords","renderParcels","handleParcelSdkInit","layer","Layer","TileLayer","minZoom","maxZoom","mapInstance","overlayMapTypes","mapsApi","ImageMapType","handleParcelScriptReady","Dmp","HostName","Conn","Connection","init","google","maps","loadParcelScript","parcelScriptTag","script","document","addEventListener","appendChild","unloadParcelScript","removeChild","prepareParcelDataForRendering","recordSet","parcelRec","Data","Row","keyValue","highlightLayer","WMSLayer","showField","showValues","antiAlias","ignoreHoles","addChild","datasource","zoomRange","min","max","setMap","centerMarker","markers","m","isCurrentProject","latitude","longitude","context","MAP","componentWillUnmount","contextTypes","object","Map","marker","MarkerWithLabel","ordinal","labelAnchor","x","y","labelStyle","draggable","onDragEnd","onMarkerChange","buildMarkers","currentProjectMarker","GoogleMap","defaultZoom","mapTypeId","mapTypeControl","tilt","streetViewControl","rotateControl","fullscreenControl","panControl","gestureHandling","withScriptjs","withGoogleMap","MapWrapper","displayMap","handleButtonClick","googleMapURL","loadingElement","containerElement","mapElement","mapFromPointsToMarkers","sketchOrderGroup","mapMarkerPoints","coordinates","point","SketchOrderCardLocation","streetAddress","replace","locationParams","city","region","postCode","rel","createAddressUrl","canEditAddress","country","endAdornment","placement","CopyToClipboard","AssignmentIcon","canEditLocation","onLocationChange","SketchOrderCardActions","onUpdateClick","UserProfileField","avatars","charAt","SketchOrderAssignments","TabPanel","selectedTab","role","hidden","SketchOrderCardRevisionNotes","revisionNotes","resourceList","rn","DateTime","fromISO","createdAt","DATETIME_FULL","note","SketchOrderCard","isReviewer","sketchOrderIsNotInTheQueue","currentTab","setCurrentTab","useState","useEffect","handleTabChange","newValue","canCompleteSketchOrder","drawer","flexShrink","drawerPaper","layout","MuiDrawer","anchor","errorIcon","fill","warningIcon","infoIcon","blue","acknowledgedIcon","maxHeight","overflow","e","priorityLevel","ErrorIcon","acknowledged","SketchOrderNotificationsDrawer","templateSelect","clearTemplate","template","handleTemplateChange","templates","onTemplateChange","createRef","notification","isEditing","Accordion","notifications","expanded","AccordionSummary","expandIcon","ExpandMoreIcon","aria-controls","header","AccordionDetails","addButton","onAddNotificationButtonClick","AddIcon","NotificationListItem","isAcknowledged","a","b","drawerMode","buttonHeader","size","onBackButtonClick","onDeleteButtonClick","notificationTemplateId","MenuProps","onEntered","handleTemplatesMenuEntered","onExited","handleTemplatesMenuExited","previewContent","previewLabel","previewDescription","description","customNotesInput","onCustomNotesChange","customNotes","paddingBotton","borderBottom","textTransform","justifyContent","SketchOrderDeliveryOptionValues","SketchOrderDeliveryOptionsSwitches","SketchOrderDeliveryOptions","deliveryOptions","optionIsChecked","FloatingActionButton","Fab","styleOverride","bottom","right","TransitionSketchOrderButton","menuOpen","getButtonContext","currentStatus","PlayArrow","Send","Check","AttachMoney","allowedStatusTransitions","handleMenuItemClick","getMenuItemContext","renderMenuItems","menuItemContext","renderBackdropComponent","Backdrop","buttonStyle","BackdropComponent","PaperProps","SketchOrder","match","getSketchOrderInformation","newLocation","getProjectDrawingSummary","getProject","handleDeleteProjectClick","deleteProjectDialogOpen","deleteProject","messageType","snackBar","buildSketchOrder","newSketchOrderStatus","updatedSketchOrder","sketchTechUserId","newSketchTechUserId","rushCost","confirmationDialogOpen","openConfirmationDialog","setSketchTechDialogOpen","searchOrganizationsUsers","dialogTitle","handleSnackBarClose","resetNewSketchTech","handleConfirmationDialogClose","handleSetSketchDialogClose","handleDeleteProjectDialogClose","handleOwnerChange","handleSketchTechChange","setSketchTech","handleLocationChange","latLng","handleDeliveryOptionsChange","deliveryOption","removeOption","remove","handleOnFreeOrderChange","handleAddNotificationButtonClick","handleNotificationBackButtonClick","createNotification","updateNotification","updateNotificationAction","createdByUserId","createNotificationAction","handleNotificationDeleteButtonClick","removeNotification","deleteNotification","removeNotificationAction","handleTemplateSelected","handleCustomNotesChange","handleReportTypeChange","getTransitionButtonStyle","handleDismissAlert","alertOpen","selectedTemplate","alertMessage","sketchOrderToUpdate","editableProperties","transitionButtonStyle","sketchTechIsAssignedToSketchOrder","isInProgress","isPending","canEditCity","canEditRegion","canEditPostCode","canEditCountry","selectedLocation","warning","warningTitle","warningText","allowedTransitions","sketchOrderTiersStore","notificationTemplates","n","notificationAcknowledgements","notificationTemplate","border","SketchRoute","openSketch","showSketch","formRef","current","submit","getRefUrlBackToOrdersPage","lastIndexOf","substr","warn","env","MapImageryOptionsHost","setUp","goToSketch","handleError","handleOnEvent","gtag","imageSource","newZoomLevel","previousZoomLevel","MapImageryOptions","roofSnapApiBaseUrl","nearmapApiBaseUrl","hexagonApiBaseUrl","googleMapsApiKey","onSaveImageComplete","nearmapApiKey","onError","onStepChange","step","onImagerySelected","source","onEvent","nearmapAutoZoomLevel","vexcelDisabled","roofsnapImageryApiBaseUrl","disableParcelLines","parcelSdkUrl","spatialStreamUrl","jwtProxyUrl","mapSearchSketchOrderToSketchOrder","searchSketchOrder","organizationName","requesterUserName","ownerUserName","searchSketchOrders","roofSnapSearchClient","SearchSketchOrders","mapKeys","searchSketchOrdersStore","Content","getMainStyle","mainStyle","Switch","PendingSketchOrders","PendingSketchOrdersVendor","App","BrowserRouter","LoggerWrapper","LogRocket","network","requestSanitizer","responseSanitizer","startNewSession","identify","email","reduxLoggingOptions","stateSanitizer","actionSanitizer","reduxMiddleware","initState","authReducer","normalizeSketchOrders","sketchOrdersWithMappedRequestedDate","requesteddate","now","Date","timeRequested","abs","mapRequestedDate","sketchOrdersReducer","currentUserReducer","userHasRole","roles","roleName","getHighestRole","isAccountAdmin","isSalesAppOnly","hasMax","hasHideSummaryReports","hasNearmapDisabled","hasSketchOsEnabled","currentUserRolesReducer","isFetchingOrdersInTheQueue","isFetchingOrdersInTheVendorQueue","isFetchingOrdersPendingSketchOsAdmin","isFetchingExceptionOrders","isFetchingMyOrdersInProgress","isFetchingBillingFailedOrders","dashboardReducer","totals","sketchOrderTotalsSummary","pending","pendingVendor","pendingAdminApproval","myOrdersInProgress","failedToBill","needsAttention","organizationsReducer","userProfilesReducer","sketchOrderTierReducer","initialState","organizationReducer","sketchHostReducer","projectReducer","sketchTechUserProfilesReducer","ordersTabsReducer","searchSketchOrdersReducer","results","searchSuggestionsReducer","notificationTemplatesReducer","existingTemplates","newTemplates","difference","sketchOrderNotificationsReducer","app","combineReducers","rootReducer","initialize","store","createStore","applyMiddleware","thunkMiddleware","next","requestType","successType","errorType","finalAction","actionWith","startNewSesstion","createTheme","MuiThemeProvider","Provider","getElementById"],"mappings":"0PAAA,IAAIA,GAAwB,EACxBC,EAAU,GAEC,MAAMC,EACjB,eAAeC,GACX,IAAKH,EACD,OAAOC,EAAQE,GAGnB,IAEI,OADwBC,aAAaC,QAAQF,GAE/C,MAAOG,GAEL,OADAN,GAAwB,EACjBC,EAAQE,IAIvB,eAAeA,EAAKI,GAChB,GAAKP,EAKL,IACII,aAAaI,QAAQL,EAAKI,GAC5B,MAAOD,GACLN,GAAwB,EACxBC,EAAQE,GAAOI,OARfN,EAAQE,GAAOI,EAYvB,eACI,GAAKP,EAKL,IACII,aAAaK,QACf,MAAOH,GACLN,GAAwB,EACxBC,EAAU,QARVA,EAAU,IC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z3B,QAAS,CACLnY,QAAS,CACLoY,KAAM,WAEVL,UAAW,CACPK,KAAM,cAKlBxZ,iBACIK,IAAAC,cAAC2wC,IAAgB,CAACr+B,MAAOA,IACrBvS,IAAAC,cAAC4wC,IAAQ,CAACb,MAAOA,IACbhwC,IAAAC,cAACsrC,GAAG,QAGZxV,SAAS+a,eAAe,U","file":"static/js/main.8475d98d.chunk.js","sourcesContent":["let localStorageAvailable = true;\nlet storage = {};\n\nexport default class LocalStorageWrapper {\n static getItem(key) {\n if (!localStorageAvailable) {\n return storage[key];\n }\n\n try {\n const retrievedObject = localStorage.getItem(key);\n return retrievedObject;\n } catch (error) {\n localStorageAvailable = false;\n return storage[key];\n }\n }\n\n static setItem(key, value) {\n if (!localStorageAvailable) {\n storage[key] = value;\n return;\n }\n\n try {\n localStorage.setItem(key, value);\n } catch (error) {\n localStorageAvailable = false;\n storage[key] = value;\n }\n }\n\n static clear() {\n if (!localStorageAvailable) {\n storage = {};\n return;\n }\n\n try {\n localStorage.clear();\n } catch (error) {\n localStorageAvailable = false;\n storage = {};\n }\n }\n}\n","// @flow\n\nconst httpRequestMethods = {\n GET: 'GET',\n POST: 'POST',\n PUT: 'PUT',\n DELETE: 'DELETE'\n};\n\nexport type HttpRequestMethod = $Keys;\n\nexport default httpRequestMethods;\n","const HttpStatusCodes = {\n Ok: 200,\n Created: 201,\n NoContent: 204,\n BadRequest: 400,\n Unauthorized: 401,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n PreconditionFailed: 412,\n InternalServerError: 500,\n};\n\nexport default HttpStatusCodes;\n","import {camelizeKeys} from 'humps';\nimport LocalStorageWrapper from \"../../localStorageWrapper\";\nimport httpRequestMethods from \"../../httpRequestMethods\";\nimport HttpStatusCodes from \"../../httpStatusCodes\";\n\nexport const ROOFSNAP_API_BASE_URL = `${process.env.REACT_APP_API_HOST}`;\nlet baseUrl = '';\n\nfunction buildApiConfigRequest(method, body, version) {\n const config = {};\n config.method = method;\n config.headers = {\n 'X-Api-Key': `${process.env.REACT_APP_API_KEY}`,\n 'Content-Type': 'application/json',\n RSClient: 'ShadyShark'\n };\n\n const token = LocalStorageWrapper.getItem('accessToken');\n config.headers.Authorization = `Bearer ${token}`;\n\n if (version) {\n config.headers['If-Match'] = `\"${version}\"`;\n }\n\n if (body) {\n config.body = JSON.stringify(body);\n }\n\n return config;\n}\n\nasync function handleApiErrors(response) {\n switch (response.status) {\n case HttpStatusCodes.Unauthorized: {\n // Clear everything, including the roofsnap access token, out of local storage\n LocalStorageWrapper.clear();\n window.location.pathname = '/login';\n return Promise.reject(response);\n }\n default:\n return Promise.reject(response);\n }\n}\n\nasync function callApi(url, config) {\n const response = await fetch(url, config);\n if (!response.ok) {\n await handleApiErrors(response);\n return;\n }\n if(response.status == 204){\n return {success: true};\n }\n const json = await response.json();\n\n return camelizeKeys(json);\n}\n\nclass RoofSnapApiClient {\n constructor(version) {\n baseUrl = '';\n baseUrl = `${ROOFSNAP_API_BASE_URL}${version}/`;\n }\n\n async get(endpoint) {\n const url = `${baseUrl}${endpoint}`;\n\n const config = buildApiConfigRequest(httpRequestMethods.GET);\n return await callApi(url, config);\n }\n\n async update(endpoint, body, version) {\n const url = `${baseUrl}${endpoint}`;\n\n const config = buildApiConfigRequest(httpRequestMethods.PUT, body, version);\n return await callApi(url, config);\n }\n\n async create(endpoint, body) {\n const url = `${baseUrl}${endpoint}`;\n\n const config = buildApiConfigRequest(httpRequestMethods.POST, body);\n return await callApi(url, config);\n }\n\n async delete(endpoint) {\n const url = `${baseUrl}${endpoint}`;\n\n const config = buildApiConfigRequest(httpRequestMethods.DELETE);\n return await callApi(url, config);\n }\n}\n\nexport default RoofSnapApiClient;\n","import RoofSnapApiClient from \"./roofSnapApiClient\";\n\nconst baseUrl = 'userprofiles';\n\nclass UserProfileClient extends RoofSnapApiClient {\n async getUserProfiles(params) {\n const { queryParams } = params;\n const url = `${baseUrl}/${queryParams}`;\n const userProfiles = await super.get(url);\n return userProfiles;\n }\n\n async getUserProfile(params) {\n const { id } = params;\n const url = `${baseUrl}/${id}`;\n const userProfile = await super.get(url);\n return userProfile;\n }\n\n async getUsersRoles(params) {\n const { id } = params;\n const url = `${baseUrl}/${id}/roles`;\n const userRoles = await super.get(url);\n return userRoles;\n }\n\n async getRequestedSketchOrders(params) {\n const { id, queryParams } = params;\n const url = `${baseUrl}/${id}/requestedsketchorders${queryParams}`;\n const sketchOrders = await super.get(url);\n return sketchOrders;\n }\n\n async getOwnedSketchOrders(params) {\n const { id, queryParams } = params;\n const url = `${baseUrl}/${id}/ownedsketchorders${queryParams}`;\n const sketchOrders = await super.get(url);\n return sketchOrders;\n }\n}\n\nexport default UserProfileClient;\n","export const CALL_API = Symbol('CALL API');\n\nexport default () => next => async (action) => {\n const callApi = action[CALL_API];\n\n if (typeof callApi === 'undefined') {\n return next(action);\n }\n\n const { types, request, params } = callApi;\n\n const actionWith = (data) => {\n const finalAction = Object.assign({}, action, data);\n delete finalAction[CALL_API];\n return finalAction;\n };\n\n const [\n requestType,\n successType,\n errorType\n ] = types;\n\n next(actionWith({ type: requestType, params }));\n\n try {\n const response = await request(params);\n return next({\n response,\n type: successType,\n });\n } catch (error) {\n return next({\n error: error.message,\n type: errorType,\n params,\n })\n }\n};","// @flow\n\n// Auth Actions\nexport const LOGIN_REQUEST = 'LOGIN_REQUEST';\nexport const LOGIN_SUCCESS = 'LOGIN_SUCCESS';\nexport const LOGIN_FAILURE = 'LOGIN_FAILURE';\nexport const LOGOUT = 'LOGOUT';\n\n// Sketch Orders Actions\nexport const GET_SKETCH_ORDERS_REQUEST = 'GET_SKETCH_ORDERS_REQUEST';\nexport const GET_SKETCH_ORDERS_SUCCESS = 'GET_SKETCH_ORDERS_SUCCESS';\nexport const GET_SKETCH_ORDERS_FAILURE = 'GET_SKETCH_ORDERS_FAILURE';\n\n// Sketch Order Dashboard Actions\nexport const GET_ALL_SKETCH_ORDER_COUNTS_REQUEST = 'GET_ALL_SKETCH_ORDER_COUNTS_REQUEST';\nexport const GET_ALL_SKETCH_ORDER_COUNTS_SUCCESS = 'GET_ALL_SKETCH_ORDER_COUNTS_SUCCESS';\nexport const GET_ALL_SKETCH_ORDER_COUNTS_FAILURE = 'GET_ALL_SKETCH_ORDER_COUNTS_FAILURE';\nexport const UPDATE_ALL_SKETCH_ORDER_COUNTS = 'UPDATE_ALL_SKETCH_ORDER_COUNTS'\n\n// Current User Actions\nexport const GET_CURRENT_USER_REQUEST = 'GET_CURRENT_USER_REQUEST';\nexport const GET_CURRENT_USER_SUCCESS = 'GET_CURRENT_USER_SUCCESS';\nexport const GET_CURRENT_USER_FAILURE = 'GET_CURRENT_USER_FAILURE';\n\n// Current User Roles Actions\nexport const GET_CURRENT_USER_ROLES_REQUEST = 'GET_CURRENT_USER_ROLES_REQUEST';\nexport const GET_CURRENT_USER_ROLES_SUCCESS = 'GET_CURRENT_USER_ROLES_SUCCESS';\nexport const GET_CURRENT_USER_ROLES_FAILURE = 'GET_CURRENT_USER_ROLES_FAILURE';\n\n// Organizations Actions\nexport const GET_ORGANIZATIONS_REQUEST = 'GET_ORGANIZATIONS_REQUEST';\nexport const GET_ORGANIZATIONS_SUCCESS = 'GET_ORGANIZATIONS_SUCCESS';\nexport const GET_ORGANIZATIONS_FAILURE = 'GET_ORGANIZATIONS_FAILURE';\n\n// User Profiles Actions\nexport const GET_USER_PROFILES_REQUEST = 'GET_USER_PROFILES_REQUEST';\nexport const GET_USER_PROFILES_SUCCESS = 'GET_USER_PROFILES_SUCCESS';\nexport const GET_USER_PROFILES_FAILURE = 'GET_USER_PROFILES_FAILURE';\n\n// Sketch Order Actions\nexport const GET_SKETCH_ORDER_REQUEST = 'GET_SKETCH_ORDER_REQUEST';\nexport const GET_SKETCH_ORDER_SUCCESS = 'GET_SKETCH_ORDER_SUCCESS';\nexport const GET_SKETCH_ORDER_FAILURE = 'GET_SKETCH_ORDER_FAILURE';\nexport const UPDATE_SKETCH_ORDER_REQUEST = 'UPDATE_SKETCH_ORDER_REQUEST';\nexport const UPDATE_SKETCH_ORDER_SUCCESS = 'UPDATE_SKETCH_ORDER_SUCCESS';\nexport const UPDATE_SKETCH_ORDER_FAILURE = 'UPDATE_SKETCH_ORDER_FAILURE';\nexport const DELETE_SKETCH_ORDER_PROJECT_REQUEST = 'DELETE_SKETCH_ORDER_PROJECT_REQUEST';\nexport const DELETE_SKETCH_ORDER_PROJECT_SUCCESS = 'DELETE_SKETCH_ORDER_PROJECT_SUCCESS';\nexport const DELETE_SKETCH_ORDER_PROJECT_FAILURE = 'DELETE_SKETCH_ORDER_PROJECT_FAILURE';\n\n// Sketch Order Tiers Actions\nexport const GET_SKETCH_ORDER_TIERS_REQUEST = 'GET_SKETCH_ORDER_TIERS_REQUEST';\nexport const GET_SKETCH_ORDER_TIERS_SUCCESS = 'GET_SKETCH_ORDER_TIERS_SUCCESS';\nexport const GET_SKETCH_ORDER_TIERS_FAILURE = 'GET_SKETCH_ORDER_TIERS_FAILURE';\n\n// User Profile Actions\nexport const GET_USER_PROFILE_REQUEST = 'GET_USER_PROFILE_REQUEST';\nexport const GET_USER_PROFILE_SUCCESS = 'GET_USER_PROFILE_SUCCESS';\nexport const GET_USER_PROFILE_FAILURE = 'GET_USER_PROFILE_FAILURE';\n\n// Organization Actions\nexport const GET_ORGANIZATION_REQUEST = 'GET_ORGANIZATION_REQUEST';\nexport const GET_ORGANIZATION_SUCCESS = 'GET_ORGANIZATION_SUCCESS';\nexport const GET_ORGANIZATION_FAILURE = 'GET_ORGANIZATION_FAILURE';\n\n// Sketch Host Actions\nexport const SHOW_SKETCH = 'SHOW_SKETCH';\nexport const HIDE_SKETCH = 'HIDE_SKETCH';\n\n// Project Actions\nexport const GET_PROJECT_REQUEST = 'GET_PROJECT_REQUEST';\nexport const GET_PROJECT_SUCCESS = 'GET_PROJECT_SUCCESS';\nexport const GET_PROJECT_FAILURE = 'GET_PROJECT_FAILURE';\n\n// Sketch Tech User Profiles Actions\nexport const GET_SKETCH_TECH_USER_PROFILES_REQUEST = 'GET_SKETCH_TECH_USER_PROFILES_REQUEST';\nexport const GET_SKETCH_TECH_USER_PROFILES_SUCCESS = 'GET_SKETCH_TECH_USER_PROFILES_SUCCESS';\nexport const GET_SKETCH_TECH_USER_PROFILES_FAILURE = 'GET_SKETCH_TECH_USER_PROFILES_FAILURE';\n\n// Orders Tabs Actions\nexport const SET_ACTIVE_ORDERS_TAB = 'SET_ACTIVE_ORDERS_TABS';\n\n// Search Sketch Orders Actions\nexport const GET_SEARCH_SKETCH_ORDERS_REQUEST = 'GET_SEARCH_SKETCH_ORDERS_REQUEST';\nexport const GET_SEARCH_SKETCH_ORDERS_SUCCESS = 'GET_SEARCH_SKETCH_ORDERS_SUCCESS';\nexport const GET_SEARCH_SKETCH_ORDERS_FAILURE = 'GET_SEARCH_SKETCH_ORDERS_FAILURE';\n\n// Search Suggestions Actions\nexport const GET_SEARCH_SUGGESTIONS_REQUEST = 'GET_SEARCH_SUGGESTIONS_REQUEST';\nexport const GET_SEARCH_SUGGESTIONS_SUCCESS = 'GET_SEARCH_SUGGESTIONS_SUCCESS';\nexport const GET_SEARCH_SUGGESTIONS_FAILURE = 'GET_SEARCH_SUGGESTIONS_FAILURE';\nexport const CLEAR_SEARCH_SUGGESTIONS = 'CLEAR_SEARCH_SUGGESTIONS';\n\n// Project Drawing Summary Actions\nexport const GET_PROJECT_DRAWING_SUMMARY_REQUEST = 'GET_PROJECT_DRAWING_SUMMARY_REQUEST';\nexport const GET_PROJECT_DRAWING_SUMMARY_SUCCESS = 'GET_PROJECT_DRAWING_SUMMARY_SUCCESS';\nexport const GET_PROJECT_DRAWING_SUMMARY_FAILURE = 'GET_PROJECT_DRAWING_SUMMARY_FAILURE';\n\n// Notification template actions\nexport const GET_NOTIFICATION_TEMPLATES_REQUEST = 'GET_NOTIFICATION_TEMPLATES_REQUEST';\nexport const GET_NOTIFICATION_TEMPLATES_SUCCESS = 'GET_NOTIFICATION_TEMPLATES_SUCCESS';\nexport const GET_NOTIFICATION_TEMPLATES_FAILURE = 'GET_NOTIFICATION_TEMPLATES_FAILURE';\n\n// Sketch order notification actions\nexport const CREATE_SKETCH_ORDER_NOTIFICATION_REQUEST = 'CREATE_SKETCH_ORDER_NOTIFICATION_REQUEST';\nexport const CREATE_SKETCH_ORDER_NOTIFICATION_SUCCESS = 'CREATE_SKETCH_ORDER_NOTIFICATION_SUCCESS';\nexport const CREATE_SKETCH_ORDER_NOTIFICATION_FAILURE = 'CREATE_SKETCH_ORDER_NOTIFICATION_FAILURE';\n\nexport const UPDATE_SKETCH_ORDER_NOTIFICATION_REQUEST = 'UPDATE_SKETCH_ORDER_NOTIFICATION_REQUEST';\nexport const UPDATE_SKETCH_ORDER_NOTIFICATION_SUCCESS = 'UPDATE_SKETCH_ORDER_NOTIFICATION_SUCCESS';\nexport const UPDATE_SKETCH_ORDER_NOTIFICATION_FAILURE = 'UPDATE_SKETCH_ORDER_NOTIFICATION_FAILURE';\n\n// Sketch orders notifications actions\nexport const GET_SKETCH_ORDER_NOTIFICATIONS_REQUEST = 'GET_SKETCH_ORDER_NOTIFICATIONS_REQUEST';\nexport const GET_SKETCH_ORDER_NOTIFICATIONS_SUCCESS = 'GET_SKETCH_ORDER_NOTIFICATIONS_SUCCESS';\nexport const GET_SKETCH_ORDER_NOTIFICATIONS_FAILURE = 'GET_SKETCH_ORDER_NOTIFICATIONS_FAILURE';\n","import jwtDecode from 'jwt-decode';\nimport UserProfileClient from '../lib/apiClients/roofSnapApiClient/userProfileClient';\nimport { CALL_API } from \"../middleware/api\";\nimport LocalStorageWrapper from \"../lib/localStorageWrapper\";\nimport {\n GET_CURRENT_USER_REQUEST,\n GET_CURRENT_USER_SUCCESS,\n GET_CURRENT_USER_FAILURE,\n} from './actionTypes';\n\nexport const getCurrentUser = () => {\n const accessToken = LocalStorageWrapper.getItem('accessToken');\n\n if (!accessToken) {\n return {\n type: GET_CURRENT_USER_FAILURE,\n }\n }\n\n const tokenPayload = jwtDecode(accessToken);\n const userId = parseInt(tokenPayload.name, 10);\n\n const userProfileClient = new UserProfileClient('v1');\n const request = userProfileClient.getUserProfile;\n\n return {\n [CALL_API]: {\n types: [\n GET_CURRENT_USER_REQUEST,\n GET_CURRENT_USER_SUCCESS,\n GET_CURRENT_USER_FAILURE\n ],\n request,\n params: {\n id: userId,\n },\n }\n };\n};\n","import jwtDecode from 'jwt-decode';\nimport LocalStorageWrapper from \"../lib/localStorageWrapper\";\nimport {\n GET_CURRENT_USER_ROLES_FAILURE,\n GET_CURRENT_USER_ROLES_REQUEST,\n GET_CURRENT_USER_ROLES_SUCCESS\n} from \"./actionTypes\";\nimport UserProfileClient from \"../lib/apiClients/roofSnapApiClient/userProfileClient\";\nimport {CALL_API} from \"../middleware/api\";\n\nexport const getCurrentUserRoles = () => {\n const accessToken = LocalStorageWrapper.getItem('accessToken');\n\n if (!accessToken) {\n return {\n type: GET_CURRENT_USER_ROLES_FAILURE\n }\n }\n\n const tokenPayload = jwtDecode(accessToken);\n const userId = parseInt(tokenPayload.name, 10);\n\n const userProfileClient = new UserProfileClient('v1');\n const request = userProfileClient.getUsersRoles;\n\n return {\n [CALL_API]: {\n types: [\n GET_CURRENT_USER_ROLES_REQUEST,\n GET_CURRENT_USER_ROLES_SUCCESS,\n GET_CURRENT_USER_ROLES_FAILURE\n ],\n request,\n params: {\n id: userId,\n }\n }\n }\n};\n","import * as ActionTypes from './actionTypes';\nimport httpRequestMethods from \"../lib/httpRequestMethods\";\nimport LocalStorageWrapper from \"../lib/localStorageWrapper\";\nimport { LOGOUT } from \"./actionTypes\";\nimport { getCurrentUser } from \"./currentUserProfileActions\";\nimport { getCurrentUserRoles } from \"./currentUserRolesActions\";\n\nconst requestLogin = () => ({\n type: ActionTypes.LOGIN_REQUEST,\n isFetching: true,\n});\n\nconst receiveLogin = (accessToken) => ({\n type: ActionTypes.LOGIN_SUCCESS,\n accessToken,\n isFetching: false,\n});\n\nconst rejectLogin = (message) => ({\n type: ActionTypes.LOGIN_FAILURE,\n message,\n isFetching: false,\n});\n\nconst authenticate = async (username, password) => {\n\n const config = {\n method: httpRequestMethods.POST,\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n body: `username=${encodeURIComponent(username)}&password=${encodeURIComponent(password)}&grant_type=password&client_id=1af9339e-2f1f-4963-8c00-c7093471b48f`\n };\n\n try {\n const response = await fetch(`${process.env.REACT_APP_AUTH_HOST}oauth2/token`, config);\n const json = await response.json();\n\n if (!response.ok) {\n return Promise.reject(json.error_description);\n }\n\n LocalStorageWrapper.setItem('accessToken', json.access_token);\n\n return json.access_token;\n } catch (error) {\n return Promise.reject(error);\n }\n};\n\nexport const login = (username, password) => {\n return async (dispatch) => {\n dispatch(requestLogin());\n try {\n const accessToken = await authenticate(username, password);\n\n await Promise.all([\n dispatch(getCurrentUser()),\n dispatch(getCurrentUserRoles())\n ]);\n\n return dispatch(receiveLogin(accessToken));\n } catch (error) {\n return dispatch(rejectLogin('Username or password is incorrect'));\n }\n };\n};\n\nexport const logout = () => {\n LocalStorageWrapper.clear();\n return {\n type: LOGOUT,\n };\n};","import React, {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport Button from '@material-ui/core/Button';\nimport Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport Divider from '@material-ui/core/Divider';\nimport { AccountCircle, Email, Face, AssignmentInd, PowerSettingsNew } from '@material-ui/icons';\n\nclass LoggedInMenu extends Component {\n state = {\n open: false,\n anchorEl: null,\n };\n\n handleOpen = (event) => {\n this.setState({\n open: true,\n anchorEl: event.currentTarget\n });\n };\n\n handleClose = () => {\n this.setState({ open: false });\n };\n\n logOut = () => {\n this.props.onLogoutClick();\n this.handleClose();\n };\n\n render() {\n const fullName = `${this.props.currentUser.firstName} ${this.props.currentUser.lastName}`;\n\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\nLoggedInMenu.propTypes = {\n onLogoutClick: PropTypes.func.isRequired,\n currentUser: PropTypes.shape({\n userName: PropTypes.string,\n firstName: PropTypes.string,\n lastName: PropTypes.string,\n }).isRequired,\n position: PropTypes.string,\n};\n\nLoggedInMenu.defaultProps = {\n position: '',\n};\n\nexport default LoggedInMenu;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport Drawer from '@material-ui/core/Drawer';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport ListItemIcon from'@material-ui/core/ListItemIcon';\nimport { Dashboard, Storage, ShoppingCart, Assignment } from '@material-ui/icons';\nimport { Link } from 'react-router-dom';\n\nconst style = () => ({\n list: {\n width: 250,\n },\n menuItem: {\n textDecoration: 'none',\n }\n});\n\nconst RoofSnapDrawer = (props) => {\n const isSketchOsAdmin = !!(props.currentUserRoles.isAdmin || props.currentUserRoles.isSketchOsAdmin);\n\n return (\n \n
\n \n \n \n \n \n \n \n \n {\n isSketchOsAdmin &&\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\nRoofSnapDrawer.propTypes = {\n open: PropTypes.bool.isRequired,\n onToggle: PropTypes.func.isRequired,\n currentUserRoles: PropTypes.shape({\n isAdmin: PropTypes.bool.isRequired,\n isSketchOsAdmin: PropTypes.bool.isRequired,\n isSketchTech: PropTypes.bool.isRequired,\n }).isRequired,\n classes: PropTypes.shape({\n list: PropTypes.string.isRequired,\n menuItem: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nexport default withStyles(style)(RoofSnapDrawer);\n","// @flow\n\nimport React, { Component } from 'react';\nimport Paper from '@material-ui/core/Paper';\nimport Input from '@material-ui/core/Input';\nimport InputAdornment from '@material-ui/core/InputAdornment';\nimport SearchIcon from '@material-ui/icons/Search';\nimport { withStyles } from '@material-ui/core/styles';\n\nconst style = () => ({\n root: {\n padding: 8,\n },\n fullWidth: {\n width: '100%',\n },\n});\n\ntype SearchStyleClasses = {\n root: string,\n fullWidth: string,\n};\n\ntype Props = {\n onSearch: Function,\n onChange: Function,\n onForceUpdate: Function,\n elevation: number,\n fullWidth: boolean,\n autoFocus: boolean,\n defaultValue: string,\n value: string,\n classes: SearchStyleClasses\n};\n\ntype State = {\n value: string,\n};\n\nclass Search extends Component {\n constructor(props: Props) {\n super(props);\n\n this.state = {\n value: props.defaultValue || ''\n };\n }\n\n componentDidUpdate(prevProps: Props) {\n if (prevProps.value !== this.props.value) {\n this.setState({\n value: this.props.value,\n })\n }\n }\n\n handleOnChange = (event) => {\n this.setState({ value: event.target.value }, () => {\n if (this.props.onChange) {\n this.props.onChange(this.state.value)\n }\n });\n };\n\n handleOnKeyPress = (event) => {\n if (event.keyCode === 13) {\n this.props.onSearch(this.state.value);\n }\n };\n\n getPaperStyles = () => {\n const paperStyles = [\n this.props.classes.root,\n ];\n\n if (this.props.fullWidth) {\n paperStyles.push(this.props.classes.fullWidth);\n }\n\n return paperStyles;\n };\n\n render() {\n const paperStyles = this.getPaperStyles();\n\n return (\n \n \n \n \n }\n value={this.state.value}\n fullWidth\n disableUnderline\n placeholder=\"Search...\"\n />\n \n );\n }\n}\n\nexport default withStyles(style)(Search);","import Search from \"./Search\";\n\nexport default Search;\n","// @flow\nimport React from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport Divider from \"@material-ui/core/Divider\";\nimport List from \"@material-ui/core/List\";\nimport Typography from \"@material-ui/core/Typography\";\nimport ListItemText from \"@material-ui/core/ListItemText\";\nimport ListItem from \"@material-ui/core/ListItem\";\n\nconst style = () => ({\n suggestionsTitle: {\n paddingLeft: 8,\n },\n});\n\ntype SearchSuggestionsMenuStyleClasses = {\n suggestionsTitle: string,\n};\n\ntype Props = {\n suggestions: Array,\n onSuggestionClick: Function,\n classes: SearchSuggestionsMenuStyleClasses,\n}\n\nconst SearchSuggestionsMenu = (props: Props) => {\n const renderSuggestion = (suggestion) => (\n props.onSuggestionClick(suggestion.id)}\n >\n \n {suggestion.searchText}\n \n \n );\n\n return (\n props.suggestions.length > 0 &&\n
\n \n \n \n Suggestions:\n \n {props.suggestions.map(renderSuggestion)}\n \n
\n );\n};\n\nexport default withStyles(style)(SearchSuggestionsMenu);\n","import SearchSuggestionsMenu from \"./SearchSuggestionsMenu\";\n\nexport default SearchSuggestionsMenu;\n","// @flow\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { withRouter } from 'react-router-dom';\nimport { withStyles } from '@material-ui/core/styles';\nimport queryString from 'query-string';\nimport AppBar from '@material-ui/core/AppBar';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport IconButton from '@material-ui/core/IconButton';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBack';\nimport Search from '../../components/Search';\nimport { clearSearchSuggestions, getSearchSuggestions } from \"../../actions/searchSuggestionsActions\";\nimport SearchSuggestionsMenu from '../../components/SearchSuggestionsMenu';\n\nconst style = () => ({\n root: {\n backgroundColor: 'white',\n },\n backButton: {\n marginLeft: -12,\n marginRight: 20,\n },\n});\n\ntype SearchAppBarStyleClasses = {\n root: string,\n backButton: string,\n};\n\ntype Location = {\n search: string,\n};\n\ntype History = {\n push: Function,\n};\n\ntype Props = {\n dispatch: Function,\n show: boolean,\n onDismissClick: Function,\n location: Location,\n history: History,\n classes: SearchAppBarStyleClasses,\n suggestions: Array,\n};\n\nclass SearchAppBar extends Component {\n static defaultProps = {\n show: false,\n };\n\n constructor(props) {\n super(props);\n\n this.handleOnSearch = this.handleOnSearch.bind(this);\n }\n\n handleOnSearch = (value: string) => {\n this.props.history.push(`/searchorders?q=${value}`);\n this.props.dispatch(clearSearchSuggestions());\n };\n\n handleOnChange = async (value: string): Promise => {\n await this.props.dispatch(getSearchSuggestions('sketchorders', value, 'address'));\n };\n\n handleOnSuggestionClick = (suggestionId: string) => {\n this.props.history.push(`/orders/${suggestionId}`);\n this.props.dispatch(clearSearchSuggestions());\n };\n\n render() { \n const queryParams: Object = queryString.parse(this.props.location.search);\n const value: string = queryParams.q;\n return (\n !this.props.show ? (\n null\n ) : (\n
\n \n \n \n \n \n\n \n \n\n \n \n
\n )\n );\n }\n}\n\nconst mapStateToProps = (state) => {\n const { searchSuggestions: searchSuggestionsStore } = state;\n const { suggestions } = searchSuggestionsStore;\n return {\n suggestions,\n }\n};\n \nexport default connect(mapStateToProps)(withRouter(withStyles(style)(SearchAppBar)));","// @flow\nimport RoofSnapSearchApiClient from \"roofsnap-search-api-client\";\nimport {\n GET_SEARCH_SUGGESTIONS_REQUEST,\n GET_SEARCH_SUGGESTIONS_SUCCESS,\n GET_SEARCH_SUGGESTIONS_FAILURE,\n CLEAR_SEARCH_SUGGESTIONS\n} from './actionTypes';\nimport {CALL_API} from \"../middleware/api\";\nimport LocalStorageWrapper from \"../lib/localStorageWrapper\";\n\nexport const getSearchSuggestions = (endpoint: string, search: string, suggesterName: string) => {\n const accessToken = LocalStorageWrapper.getItem('accessToken');\n const apiClientInit = {\n token: accessToken,\n environment: process.env.REACT_APP_ENVIRONMENT,\n apiVersion: '2017-11-11',\n };\n const roofSnapSearchClient = new RoofSnapSearchApiClient(apiClientInit);\n const request = roofSnapSearchClient.getSearchSuggestions;\n\n return {\n [CALL_API]: {\n types: [\n GET_SEARCH_SUGGESTIONS_REQUEST,\n GET_SEARCH_SUGGESTIONS_SUCCESS,\n GET_SEARCH_SUGGESTIONS_FAILURE\n ],\n request,\n params: {\n endpoint,\n search,\n suggesterName\n }\n }\n }\n};\n\nexport const clearSearchSuggestions = () => {\n return {\n type: CLEAR_SEARCH_SUGGESTIONS,\n }\n};\n","import SearchAppBar from './SearchAppBar';\n\nexport default SearchAppBar;","export default {\n AllOrders: 0,\n Queue: 1,\n VendorQueue: 2,\n MyOrdersInProgress: 3,\n PendingAdminApproval: 4,\n NeedsAttention: 5,\n BillingFailed: 6,\n RushOrders: 7,\n MetalRoof: 8,\n};\n","export const SketchOrderStatusId = {\n Cancelled: 1,\n Complete: 2,\n InProgress: 3,\n Incomplete: 4,\n Pending: 5, // Means 'not started by sketch tech'\n PendingReview: 6, // Means 'pending review by sketchos admin'\n Billed: 7,\n PendingRejection: 8,\n Queued: 9,\n Exception: 10,\n BillingFailed: 11,\n InReview: 12,\n RevisionRequested: 13,\n PendingGroupBilling: 14,\n};\n\nexport const SketchOrderStatus = {\n Cancelled: 'Cancelled',\n Complete: 'Complete',\n InProgress: 'InProgress',\n Incomplete: 'Incomplete',\n Pending: 'Pending', // Means 'not started by sketch tech'\n PendingReview: 'PendingReview',\n Billed: 'Billed',\n PendingRejection: 'PendingRejection',\n Queued: 'Queued',\n Exception: 'Exception',\n BillingFailed: 'BillingFailed',\n InReview: 'InReview',\n RevisionRequested: 'RevisionRequested',\n PendingGroupBilling: 'PendingGroupBilling',\n};\n\nexport type SketchOrderStatusType = $Keys;\n\nexport const allSketchOrderStatuses = [\n {\n id: SketchOrderStatusId.Pending,\n status: SketchOrderStatus.Pending,\n },\n {\n id: SketchOrderStatusId.Queued,\n status: SketchOrderStatus.Queued,\n },\n {\n id: SketchOrderStatusId.InProgress,\n status: SketchOrderStatus.InProgress,\n },\n {\n id: SketchOrderStatusId.PendingReview,\n status: SketchOrderStatus.PendingReview,\n },\n {\n id: SketchOrderStatusId.PendingRejection,\n status: SketchOrderStatus.PendingRejection\n },\n {\n id: SketchOrderStatusId.Complete,\n status: SketchOrderStatus.Complete,\n },\n {\n id: SketchOrderStatusId.Cancelled,\n status: SketchOrderStatus.Cancelled,\n },\n {\n id: SketchOrderStatusId.Incomplete,\n status: SketchOrderStatus.Incomplete,\n },\n {\n id: SketchOrderStatusId.Billed,\n status: SketchOrderStatus.Billed\n },\n {\n id: SketchOrderStatusId.Exception,\n status: SketchOrderStatus.Exception\n },\n {\n id: SketchOrderStatusId.BillingFailed,\n status: SketchOrderStatus.BillingFailed,\n },\n {\n id: SketchOrderStatusId.InReview,\n status: SketchOrderStatus.InReview,\n },\n {\n id: SketchOrderStatusId.RevisionRequested,\n status: SketchOrderStatus.RevisionRequested\n },\n {\n id: SketchOrderStatusId.PendingGroupBilling,\n status: SketchOrderStatus.PendingGroupBilling\n }\n];\n","class QueryStringBuilder {\n constructor() {\n this.queryString = '';\n }\n\n setQueryParameter(key, value) {\n const concatonater = (this.queryString.startsWith('?') ? '&' : '?');\n const newQueryStringParameter = `${concatonater}${key}=${value}`;\n\n this.queryString += newQueryStringParameter;\n }\n\n buildQueryString() {\n return this.queryString;\n }\n}\n\nexport default QueryStringBuilder;\n","import RoofSnapApiClient from './roofSnapApiClient';\n\nconst baseUrl = \"sketchtechsketchorders\";\n\nclass SketchTechSketchOrderClient extends RoofSnapApiClient {\n async getAllSketchOrderCounts() {\n const url = `${baseUrl}/totals`;\n const sketchOrderCounts = await super.get(url);\n return sketchOrderCounts;\n }\n\n async getSketchOrders(params) {\n const { queryParams } = params;\n const url = `${baseUrl}${queryParams}`;\n const sketchOrders = await super.get(url);\n return sketchOrders;\n }\n\n async getSketchOrder(params) {\n const { id } = params;\n const url = `${baseUrl}/${id}`;\n const sketchOrder = await super.get(url);\n return sketchOrder;\n }\n\n async updateSketchOrder(params) {\n const { id, body, version } = params;\n const url = `${baseUrl}/${id}`;\n const sketchOrder = await super.update(url, body, version);\n return sketchOrder;\n }\n \n async deleteSketchOrderProject(params) {\n const { id } = params;\n const url = `${baseUrl}/${id}/project`;\n return await super.delete(url);\n }\n}\n\nexport default SketchTechSketchOrderClient;","// @flow\nimport React, { Component } from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { connect } from 'react-redux';\nimport { SketchOrderStatus, SketchOrderStatusId } from '../../lib/sketchOrderStatuses';\nimport QueryStringBuilder from '../../lib/queryStringBuilder';\nimport LocalStorageWrapper from '../../lib/localStorageWrapper';\nimport { getAllSketchOrderCounts, updateAllSketchOrderCounts } from '../../actions/sketchOrderDashboardActions';\nimport {\n JsonHubProtocol,\n HubConnectionState,\n HubConnectionBuilder,\n LogLevel\n} from '@microsoft/signalr';\nimport { UPDATE_ALL_SKETCH_ORDER_COUNTS } from '../../actions/actionTypes';\n\ntype ProvidedProps = {\n history: {\n push: Function,\n },\n dispatch: Function,\n totalOrdersInTheQueue: number,\n totalOrdersPendingSketchOsAdmin: number,\n totalExceptionOrders: number,\n totalMyOrdersInProgress: number,\n pendingMetalRoofOrders: number,\n currentUser: {\n userId: number,\n },\n isSketchOsAdmin: boolean,\n};\n\nconst pendingStatusFilters = [\n {\n id: SketchOrderStatusId.Pending,\n status: SketchOrderStatus.Pending,\n },\n {\n id: SketchOrderStatusId.InProgress,\n status: SketchOrderStatus.InProgress,\n },\n {\n id: SketchOrderStatusId.PendingReview,\n status: SketchOrderStatus.PendingReview,\n },\n {\n id: SketchOrderStatusId.Exception,\n status: SketchOrderStatus.Exception,\n },\n];\n\nconst withOrdersRouter = (WrappedComponent: typeof React.Component) => {\n class HOC extends Component {\n\n async componentDidMount() {\n await this.props.dispatch(getAllSketchOrderCounts());\n // TODO: Re-enable once we've fixed identity issues\n // this.subscribeSignalR();\n }\n \n goToPendingOrders = () => {\n this.props.history.push('/queue');\n };\n\n goToPendingVendorOrders = () => {\n this.props.history.push('/queue/vendor');\n };\n\n goToMyOrdersInProgress = () => {\n const queryStringBuilder = new QueryStringBuilder();\n queryStringBuilder.setQueryParameter('statusIds', SketchOrderStatusId.InProgress);\n const queryParams = queryStringBuilder.buildQueryString();\n this.props.history.push(`/myorders${queryParams}`);\n };\n\n goToOrdersWithFilter = async (statusFilters) => {\n const queryStringBuilder = new QueryStringBuilder();\n statusFilters.forEach((status) => {\n queryStringBuilder.setQueryParameter('statusIds', status.id);\n });\n const queryParams = queryStringBuilder.buildQueryString();\n this.props.history.push(`/orders${queryParams}`);\n };\n\n goToOrdersPendingSketchOsAdmin = async () => {\n const statusFilters = [\n {\n id: SketchOrderStatusId.PendingReview,\n status: SketchOrderStatus.PendingReview,\n },\n {\n id: SketchOrderStatusId.PendingRejection,\n status: SketchOrderStatus.PendingRejection,\n }\n ,\n {\n id: SketchOrderStatusId.InReview,\n status: SketchOrderStatus.InReview,\n }\n ];\n await this.goToOrdersWithFilter(statusFilters);\n };\n\n goToOrdersWithException = async () => {\n const statusFilters = [\n {\n id: SketchOrderStatusId.Exception,\n status: SketchOrderStatus.Exception,\n },\n ];\n await this.goToOrdersWithFilter(statusFilters);\n };\n\n goToBillingFailedOrders = async () => {\n const statusFilters = [\n {\n id: SketchOrderStatusId.BillingFailed,\n status: SketchOrderStatus.BillingFailed,\n },\n ];\n await this.goToOrdersWithFilter(statusFilters);\n };\n\n goToRushOrders= async () => {\n const queryStringBuilder = new QueryStringBuilder();\n queryStringBuilder.setQueryParameter('rush', 'true');\n \n pendingStatusFilters.forEach((status) => {\n queryStringBuilder.setQueryParameter('statusIds', status.id);\n });\n\n const queryParams = queryStringBuilder.buildQueryString();\n this.props.history.push(`/orders${queryParams}`);\n };\n\n goToMetalRoofOrders = () => {\n const queryStringBuilder = new QueryStringBuilder();\n queryStringBuilder.setQueryParameter('metalRoof', 'true');\n\n pendingStatusFilters.forEach((status) => {\n queryStringBuilder.setQueryParameter('statusIds', status.id);\n });\n\n const queryParams = queryStringBuilder.buildQueryString();\n this.props.history.push(`/orders${queryParams}`);\n }\n\n subscribeSignalR = () => {\n\n const loginToken = LocalStorageWrapper.getItem('accessToken')\n var connection = new HubConnectionBuilder().withUrl(`${process.env.REACT_APP_ORDERS_HUB_URL}`, { accessTokenFactory: () => loginToken }).build(); //Disable the send button until connection is established.\n connection.on(\"ReceiveOrderCounts\", (orders) => {\n this.props.dispatch(updateAllSketchOrderCounts(orders))\n });\n \n connection.start().then(() => {\n connection.invoke(\"ReceiveOrderCounts\").catch((err) => {\n return console.error(err.toString());\n });\n })\n }\n\n render() {\n return (\n \n );\n }\n }\n const mapStateToProps = (state) =>{\n const { dashboard, currentUserRoles, currentUser } = state;\n const {\n isFetchingCounts,\n totalOrdersInTheQueue,\n totalOrdersInTheVendorQueue, \n totalOrdersPendingSketchOsAdmin, \n totalExceptionOrders,\n totalMyOrdersInProgress,\n totalBillingFailedOrders,\n totalRushOrders,\n filteredRushOrders,\n pendingMetalRoofOrders,\n } = dashboard;\n return {\n isFetchingCounts,\n totalOrdersInTheQueue,\n totalOrdersInTheVendorQueue,\n totalOrdersPendingSketchOsAdmin,\n totalExceptionOrders,\n totalMyOrdersInProgress,\n totalBillingFailedOrders,\n totalRushOrders,\n filteredRushOrders,\n pendingMetalRoofOrders,\n currentUser,\n isSketchOsAdmin: !!(currentUserRoles.isAdmin || currentUserRoles.isSketchOsAdmin),\n };\n };\n return connect(mapStateToProps)(withRouter(HOC));\n};\n\nexport default withOrdersRouter;\n","import withOrdersRouter from './withOrdersRouter';\n\nexport default withOrdersRouter;\n","import { CALL_API} from '../middleware/api';\nimport {\n GET_ALL_SKETCH_ORDER_COUNTS_REQUEST,\n GET_ALL_SKETCH_ORDER_COUNTS_SUCCESS,\n GET_ALL_SKETCH_ORDER_COUNTS_FAILURE,\n UPDATE_ALL_SKETCH_ORDER_COUNTS,\n} from './actionTypes';\nimport SketchTechSketchOrderClient from '../lib/apiClients/roofSnapApiClient/sketchTechSketchOrderClient';\n\n\nexport const getAllSketchOrderCounts = () => {\n // No need to figure out if we should get the sketch tech sketch order client or not.\n // We just need to determine the number of sketch orders with the Pending Status.\n const sketchTechSketchOrderClient = new SketchTechSketchOrderClient('v2');\n const request = sketchTechSketchOrderClient.getAllSketchOrderCounts;\n \n return {\n [CALL_API]: {\n types: [\n GET_ALL_SKETCH_ORDER_COUNTS_REQUEST,\n GET_ALL_SKETCH_ORDER_COUNTS_SUCCESS,\n GET_ALL_SKETCH_ORDER_COUNTS_FAILURE,\n ],\n request,\n }\n };\n};\n\nexport const updateAllSketchOrderCounts = (payload) => {\n return {\n type: \n UPDATE_ALL_SKETCH_ORDER_COUNTS,\n payload: payload\n }\n}","import { SET_ACTIVE_ORDERS_TAB } from \"./actionTypes\";\n\nexport const setActiveOrdersTab = (tabIndex) => ({\n type: SET_ACTIVE_ORDERS_TAB,\n tabIndex,\n});\n","import React from 'react';\n\nconst MetalRoofIcon = ({ active }) => {\n return (\n \n );\n};\n\nexport default MetalRoofIcon;\n","// @flow\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { parse } from 'query-string';\nimport { withRouter } from 'react-router-dom';\nimport { withStyles } from '@material-ui/core/styles';\nimport AppBar from \"@material-ui/core/AppBar\";\nimport Tabs from \"@material-ui/core/Tabs\";\nimport Tab from \"@material-ui/core/Tab\";\nimport {\n Storage,\n SupervisorAccount,\n Timelapse,\n Warning,\n AllInbox,\n Store,\n} from '@material-ui/icons';\nimport Typography from '@material-ui/core/Typography';\nimport TabNames from './TabNames';\nimport { SketchOrderStatusId } from \"../../lib/sketchOrderStatuses\";\nimport withOrdersRouter from '../withOrdersRouter';\nimport { setActiveOrdersTab } from \"../../actions/ordersTabsActions\";\nimport MetalRoofIcon from './MetalRoofIcon';\n\nconst style = () => ({\n appBar: {\n position: 'relative',\n zIndex: 100,\n backgroundColor: 'white',\n },\n tab: {\n paddingTop: 11,\n },\n count: {\n fontSize: '0.75rem',\n fontWeight: 500,\n height: 22,\n lineHeight: '22px',\n padding: '0 8px',\n marginTop: '-23px',\n marginLeft: '-10px',\n borderRadius: '11px',\n color: 'white',\n backgroundColor: 'darkgrey',\n position: 'absolute',\n left: 25,\n top: 15,\n },\n});\n\ntype ProvidedProps = {\n history: {\n push: Function,\n },\n location: {\n pathname: string,\n search: string,\n },\n dispatch: Function,\n tabIndex: number,\n classes: {\n appBar: string,\n tab: string,\n count: string,\n },\n isSketchOsAdmin: boolean,\n totalOrdersInTheQueue: number,\n totalOrdersInTheVendorQueue: number,\n totalMyOrdersInProgress: number,\n totalOrdersPendingSketchOsAdmin: number,\n totalExceptionOrders: number,\n totalBillingFailedOrders: number,\n totalRushOrders: number,\n filteredRushOrders: Number,\n pendingMetalRoofOrders: Number,\n goToPendingOrders: Function,\n goToPendingVendorOrders: Function,\n goToMyOrdersInProgress: Function,\n goToOrdersPendingSketchOsAdmin: Function,\n goToOrdersWithException: Function,\n goToBillingFailedOrders: Function,\n goToRushOrders: Function,\n goToMetalRoofOrders: Function,\n};\n\nclass OrdersTabs extends Component {\n\n componentDidMount() {\n this.setActiveTab();\n }\n\n setActiveTab = () => {\n const params = parse(this.props.location.search);\n const { statusIds } = params;\n\n if (this.props.location.pathname === '/queue') {\n this.props.dispatch(setActiveOrdersTab(TabNames.Queue));\n return;\n }\n\n if (this.props.location.pathname === '/queue/vendor') {\n this.props.dispatch(setActiveOrdersTab(TabNames.VendorQueue));\n return;\n }\n\n if (this.props.location.pathname === '/myorders' && parseInt(statusIds, 10) === SketchOrderStatusId.InProgress) {\n this.props.dispatch(setActiveOrdersTab(TabNames.MyOrdersInProgress));\n return;\n }\n\n if (this.props.location.pathname === '/orders'\n && Array.isArray(statusIds)\n && parseInt(statusIds[0], 10) === SketchOrderStatusId.PendingReview\n && parseInt(statusIds[1], 10) === SketchOrderStatusId.PendingRejection) {\n this.props.dispatch(setActiveOrdersTab(TabNames.PendingAdminApproval));\n return;\n }\n\n if (this.props.location.pathname === '/orders' && parseInt(statusIds, 10) === SketchOrderStatusId.Exception) {\n this.props.dispatch(setActiveOrdersTab(TabNames.NeedsAttention));\n return;\n }\n\n if (this.props.location.pathname === '/orders' && parseInt(statusIds, 10) === SketchOrderStatusId.BillingFailed) {\n this.props.dispatch(setActiveOrdersTab(TabNames.BillingFailed));\n return;\n }\n\n if (this.props.location.pathname === '/orders' && params.rush === 'true') {\n this.props.dispatch(setActiveOrdersTab(TabNames.RushOrders));\n return;\n }\n\n if (this.props.isSketchOsAdmin) {\n this.props.dispatch(setActiveOrdersTab(TabNames.AllOrders));\n return;\n }\n\n this.props.dispatch(setActiveOrdersTab(TabNames.Queue));\n };\n renderTab = (icon, count) => (\n
\n {icon}\n {!!count &&\n \n {count.toLocaleString('en-US')}\n \n }\n
\n );\n handleChange = (event, value) => {\n this.props.dispatch(setActiveOrdersTab(value));\n switch (value) {\n case TabNames.AllOrders:\n this.props.history.push('/orders');\n break;\n case TabNames.Queue:\n this.props.goToPendingOrders();\n break;\n case TabNames.VendorQueue:\n this.props.goToPendingVendorOrders();\n break;\n case TabNames.MyOrdersInProgress:\n this.props.goToMyOrdersInProgress();\n break;\n case TabNames.PendingAdminApproval:\n this.props.goToOrdersPendingSketchOsAdmin();\n break;\n case TabNames.NeedsAttention:\n this.props.goToOrdersWithException();\n break;\n case TabNames.BillingFailed:\n this.props.goToBillingFailedOrders();\n break;\n case TabNames.RushOrders:\n this.props.goToRushOrders();\n break;\n case TabNames.MetalRoof:\n this.props.goToMetalRoofOrders();\n break;\n default:\n break;\n }\n };\n render() {\n const { classes } = this.props;\n return (\n \n \n {/* All Orders */}\n {/* Sketch techs should not see the All Orders tab; however, we have to use CSS to hide the tab\n because we need it to stay in the tabindex to prevent breaking navigation. A different tab\n navigation implementation may need to be considered that better handles roles, possibly filters */}\n , null)}\n label=\"All orders\"\n className={classes.tab}\n style={{\n display: this.props.isSketchOsAdmin ? 'inherit' : 'none' ,\n }}\n />\n {/* Queue */}\n , this.props.totalOrdersInTheQueue)}\n label=\"Queue\"\n className={classes.tab}\n />\n {/* Vendor queue */}\n , this.props.totalOrdersInTheVendorQueue)}\n label=\"Vendor queue\"\n className={classes.tab}\n />\n {/* My Orders In Progress */}\n , this.props.totalMyOrdersInProgress)}\n label=\"My orders in progress\"\n className={classes.tab}\n />\n {/* Pending Admin Approval */}\n , this.props.totalOrdersPendingSketchOsAdmin)}\n label=\"Pending admin approval\"\n className={classes.tab}\n style={{\n display: this.props.isSketchOsAdmin ? 'inherit' : 'none' ,\n }}\n />\n {/* Marked With Exception */}\n , this.props.totalExceptionOrders)}\n label=\"Needs Attention\"\n className={classes.tab}\n style={{\n display: this.props.isSketchOsAdmin ? 'inherit' : 'none' ,\n }}\n />\n {/* Billing Failed Orders */}\n , this.props.totalBillingFailedOrders)}\n label=\"Failed to Bill\"\n className={classes.tab}\n style={{\n display: this.props.isSketchOsAdmin ? 'inherit' : 'none' ,\n }}\n />\n {/* Rush Orders */}\n , this.props.filteredRushOrders)}\n label=\"Rush Orders\"\n className={classes.tab}\n />\n , this.props.pendingMetalRoofOrders)}\n label=\"Metal Roof\"\n className={classes.tab}\n />\n \n \n );\n }\n}\n\nconst mapStateToProps = (state) => {\n const { ordersTabs } = state;\n const { tabIndex } = ordersTabs;\n\n return {\n tabIndex,\n }\n};\n\n\nexport default connect(mapStateToProps)(withOrdersRouter(withRouter(withStyles(style)(OrdersTabs))));\n","import OrdersTabs from './OrdersTabs';\n\nexport default OrdersTabs;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { withRouter } from 'react-router-dom';\nimport { connect } from 'react-redux';\nimport AppBar from '@material-ui/core/AppBar';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport Typography from '@material-ui/core/Typography';\nimport IconButton from '@material-ui/core/IconButton';\nimport MenuIcon from '@material-ui/icons/Menu';\nimport SearchIcon from '@material-ui/icons/Search';\nimport { withStyles } from '@material-ui/core/styles';\nimport { logout } from \"../../actions/authActions\";\nimport LoggedInMenu from \"../../components/LoggedInMenu/LoggedInMenu\";\nimport RoofSnapDrawer from \"../../components/RoofSnapDrawer/RoofSnapDrawer\";\nimport SearchAppBar from '../SearchAppBar';\nimport OrdersTabs from '../OrdersTabs';\n\nconst style = () => ({\n flex: {\n flexGrow: 1,\n },\n menuButton: {\n marginLeft: -12,\n marginRight: 20,\n },\n});\n\nexport class RoofSnapAppBar extends Component {\n state = {\n drawerOpen: false,\n searchBarOpen: false,\n urlToReturnTo: '/'\n };\n\n constructor(props) {\n super(props);\n this.handleOnDismissSearchBarClick = this.handleOnDismissSearchBarClick.bind(this);\n }\n\n componentDidMount() {\n // determine if we are on the search page. If so, show the search bar\n if (this.props.location.pathname === '/searchorders') {\n this.setState({\n searchBarOpen: true\n });\n }\n }\n\n componentDidUpdate(prevProps) {\n if (prevProps.location.pathname !== this.props.location.pathname) {\n if (this.props.location.pathname === '/searchorders') {\n this.setState({\n searchBarOpen: true,\n })\n } else {\n this.setState({\n searchBarOpen: false,\n })\n }\n }\n }\n\n logout = () => {\n this.props.dispatch(logout());\n };\n\n toggleOpenDrawer = () => {\n this.setState({ drawerOpen: !this.state.drawerOpen });\n };\n\n showSearchBar = () => {\n this.setState({\n urlToReturnTo: `${this.props.location.pathname}${this.props.location.search}`\n });\n\n this.props.history.push('/searchorders');\n };\n\n handleOnDismissSearchBarClick = () => {\n this.setState({ searchBarOpen: false });\n\n this.props.history.push(this.state.urlToReturnTo);\n };\n\n render() {\n const isRoofSnapAdmin = (this.props.currentUserRoles.isSketchOsAdmin || this.props.currentUserRoles.isAdmin);\n\n return (\n
\n \n \n \n {\n this.props.isAuthenticated &&\n \n \n \n }\n \n Sketch Tech Dashboard\n \n {\n (this.props.isAuthenticated && isRoofSnapAdmin) &&\n \n \n \n }\n {\n this.props.isAuthenticated &&\n \n }\n \n {\n (this.props.isAuthenticated && this.props.location.pathname !== '/') &&\n \n }\n \n \n
\n );\n }\n}\n\nRoofSnapAppBar.propTypes = {\n dispatch: PropTypes.func.isRequired,\n classes: PropTypes.shape({\n flex: PropTypes.string.isRequired,\n menuButton: PropTypes.string.isRequired,\n }).isRequired,\n isAuthenticated: PropTypes.bool.isRequired,\n currentUser: PropTypes.shape({\n userName: PropTypes.string,\n firstName: PropTypes.string,\n lastName: PropTypes.string,\n }).isRequired,\n currentUserRoles: PropTypes.shape({\n isAdmin: PropTypes.bool.isRequired,\n isSketchOsAdmin: PropTypes.bool.isRequired,\n isSketchTech: PropTypes.bool.isRequired,\n position: PropTypes.string,\n }).isRequired,\n history: PropTypes.shape({\n goBack: PropTypes.func.isRequired,\n }).isRequired,\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n search: PropTypes.string\n }).isRequired\n};\n\nconst mapStateToProps = (state) => {\n const { auth, currentUser, currentUserRoles } = state;\n const { isAuthenticated } = auth;\n\n return {\n isAuthenticated,\n currentUser,\n currentUserRoles\n }\n};\n\nexport default withRouter(withStyles(style)(connect(mapStateToProps)(RoofSnapAppBar)));\n","import RoofSnapAppBar from \"./RoofSnapAppBar\";\n\nexport default RoofSnapAppBar;\n","import RoofSnapApiClient from './roofSnapApiClient';\n\nconst baseUrl = \"sketchadminsketchorders\";\n\nclass SketchAdminSketchOrderClient extends RoofSnapApiClient {\n async getSketchOrders(params) {\n const { queryParams } = params;\n const url = `${baseUrl}${queryParams}`;\n\n const sketchOrders = await super.get(url);\n return sketchOrders;\n }\n\n async getSketchOrder(params) {\n const { id } = params;\n const url = `${baseUrl}/${id}`;\n const sketchOrder = await super.get(url);\n return sketchOrder;\n }\n\n async updateSketchOrder(params) {\n const { id, body, version } = params;\n const url = `${baseUrl}/${id}`;\n const sketchOrder = await super.update(url, body, version);\n return sketchOrder;\n }\n\n async createNotification(params) {\n const { sketchOrderId, body } = params;\n const url = `${baseUrl}/${sketchOrderId}/notifications`;\n return await super.create(url, body);\n }\n\n async updateNotification(params) {\n const { sketchOrderId, id, body, version } = params;\n const url = `${baseUrl}/${sketchOrderId}/notifications/${id}`;\n return await super.update(url, body, version);\n }\n\n async deleteNotification(params) {\n const { sketchOrderId, id } = params;\n const url = `${baseUrl}/${sketchOrderId}/notifications/${id}`;\n return await super.delete(url);\n }\n\n async getNotifications(params) {\n const { sketchOrderId } = params;\n const url = `${baseUrl}/${sketchOrderId}/notifications`;\n return await super.get(url);\n }\n\n async deleteSketchOrderProject(params) {\n const { id } = params;\n const url = `${baseUrl}/${id}/project`;\n return await super.delete(url);\n }\n}\n\nexport default SketchAdminSketchOrderClient;\n","import SketchAdminSketchOrderClient from '../lib/apiClients/roofSnapApiClient/sketchAdminSketchOrderClient';\nimport { CALL_API } from \"../middleware/api\";\nimport {\n GET_SKETCH_ORDER_FAILURE,\n GET_SKETCH_ORDER_REQUEST,\n GET_SKETCH_ORDER_SUCCESS,\n UPDATE_SKETCH_ORDER_FAILURE,\n UPDATE_SKETCH_ORDER_REQUEST,\n UPDATE_SKETCH_ORDER_SUCCESS,\n DELETE_SKETCH_ORDER_PROJECT_FAILURE,\n DELETE_SKETCH_ORDER_PROJECT_REQUEST,\n DELETE_SKETCH_ORDER_PROJECT_SUCCESS,\n} from \"./actionTypes\";\nimport SketchTechSketchOrderClient from \"../lib/apiClients/roofSnapApiClient/sketchTechSketchOrderClient\";\n\nconst getSketchOrderClient = (getState) => {\n const {\n isAdmin,\n isSketchOsAdmin\n } = getState().currentUserRoles;\n // If the user is an admin or a sketch os admin, use the sketch orders endpoint\n // Otherwise, use the restricted orders endpoint\n if (isAdmin || isSketchOsAdmin) {\n return new SketchAdminSketchOrderClient('v2');\n } else {\n return new SketchTechSketchOrderClient('v2');\n }\n}\n\nconst getSketchOrderRequest = (request, params) => {\n return {\n [CALL_API]: {\n types: [\n GET_SKETCH_ORDER_REQUEST,\n GET_SKETCH_ORDER_SUCCESS,\n GET_SKETCH_ORDER_FAILURE\n ],\n request,\n params,\n }\n }\n};\n\nexport const getSketchOrder = (id) => {\n return (dispatch, getState) => {\n const sketchSketchOrderClient = getSketchOrderClient(getState);\n const request = sketchSketchOrderClient.getSketchOrder;\n const params = {\n id\n };\n return dispatch(getSketchOrderRequest(request, params));\n };\n};\n\nconst updateSketchOrderRequest = (request, params) => {\n return {\n [CALL_API]: {\n types: [\n UPDATE_SKETCH_ORDER_REQUEST,\n UPDATE_SKETCH_ORDER_SUCCESS,\n UPDATE_SKETCH_ORDER_FAILURE\n ],\n request,\n params\n }\n }\n};\n\nexport const updateSketchOrder = (id, body, version) => {\n return (dispatch, getState) => {\n const sketchSketchOrderClient = getSketchOrderClient(getState);\n const request = sketchSketchOrderClient.updateSketchOrder;\n const params = {\n id,\n body,\n version\n };\n return dispatch(updateSketchOrderRequest(request, params));\n };\n};\n\nconst deleteSketchOrderProjectRequest = (request, params) => {\n return {\n [CALL_API]: {\n types: [\n DELETE_SKETCH_ORDER_PROJECT_REQUEST,\n DELETE_SKETCH_ORDER_PROJECT_SUCCESS,\n DELETE_SKETCH_ORDER_PROJECT_FAILURE,\n ],\n request,\n params\n }\n }\n};\nexport const deleteSketchOrderProject = (id, version) => {\n return (dispatch, getState) => {\n const sketchSketchOrderClient = getSketchOrderClient(getState);\n const request = sketchSketchOrderClient.deleteSketchOrderProject;\n const params = {\n id\n };\n return dispatch(deleteSketchOrderProjectRequest(request, params));\n };\n};","// @flow\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { SketchComponent } from 'roofsnap-sketchtool';\nimport withMobileDialog from '@material-ui/core/withMobileDialog';\nimport { hideSketch } from '../../actions/sketchHostActions';\nimport { getSketchOrder } from '../../actions/sketchOrderActions';\nimport { SketchOrderStatus } from '../../lib/sketchOrderStatuses';\nimport { ROOFSNAP_API_BASE_URL } from '../../lib/apiClients/roofSnapApiClient/roofSnapApiClient';\n\ntype ProvidedProps = {\n dispatch: Function,\n history: {\n push: Function,\n },\n accessToken: string,\n show: boolean,\n apiKey: string,\n baseApiUrl: string,\n baseFacetFindingApiUrl: string,\n baseMeasurementApiUrl: string,\n orderId: number,\n projectId: string,\n sketchReportType: string,\n basePitchApiUrl: string,\n displayPitchTool: boolean,\n saveImages: boolean,\n sketchOrders: Object,\n isAdmin: boolean,\n isSketchTech: boolean,\n};\n\ntype ProjectDrawing = {\n Measurements: {\n WastePercentage: number,\n }\n}\n\ntype WasteCalculation = {\n suggestedWastePercent: number,\n}\n\nclass SketchComponentHost extends Component {\n static defaultProps = {\n orderId: null,\n };\n componentDidUpdate(prevProps: ProvidedProps) {\n if (this.props.show && !this.authorizedToOpenDrawing()) {\n this.navigateToOrder();\n }\n\n //we're doing this in case the sketch scene was loaded directly through the URL\n if (this.props.show && this.props.orderId !== prevProps.orderId) {\n this.getSketchOrder();\n }\n }\n\n sketchOrder = () => this.props.sketchOrders[this.props.orderId] || {};\n\n authorizedToOpenDrawing = () => this.props.isAdmin || (this.props.isSketchTech && this.sketchOrder().sketchOrderStatus === SketchOrderStatus.InProgress);\n\n getSketchOrder = () => {\n this.props.dispatch(getSketchOrder(this.props.orderId));\n };\n navigateToOrder = async () => {\n await this.props.dispatch(getSketchOrder(this.props.orderId));\n this.props.history.push(`/orders/${this.props.orderId}`);\n this.props.dispatch(hideSketch());\n };\n handleWasteCalculationUpdated = (projectDrawing: ProjectDrawing, wasteCalculation: WasteCalculation) => {\n const { sketchReportType } = this.sketchOrder();\n\n const dynamicWasteReports = [\"FullSnap\", \"MetalRoof\"];\n\n if (dynamicWasteReports.includes(sketchReportType)) {\n projectDrawing.Measurements.WastePercentage = wasteCalculation.suggestedWastePercent;\n }\n };\n render() {\n const {\n show,\n accessToken,\n projectId,\n displayPitchTool,\n saveImages,\n } = this.props;\n return (\n \n );\n }\n}\n\nconst mapStateToProps = (state) => {\n const { auth, sketchHost} = state;\n const { accessToken } = auth;\n const { currentUserRoles } = state;\n const { sketchOrders: sketchOrdersState } = state;\n const { sketchOrders } = sketchOrdersState;\n\n const { isSketchTech } = currentUserRoles;\n const isAdmin = currentUserRoles.isAdmin || currentUserRoles.isSketchOsAdmin;\n const isRoofSnapAdmin = currentUserRoles.isAdmin;\n return {\n ...sketchHost,\n accessToken,\n isAdmin,\n isSketchTech,\n displayPitchTool: isRoofSnapAdmin,\n sketchOrders,\n }\n};\n\nexport { SketchComponentHost };\n\nexport default connect(mapStateToProps)(withMobileDialog()(SketchComponentHost));\n","import {\n SHOW_SKETCH,\n HIDE_SKETCH,\n} from './actionTypes';\n\nexport const showSketch = (orderId, projectId) => ({\n type: SHOW_SKETCH,\n orderId,\n projectId,\n});\n\nexport const hideSketch = () => ({\n type: HIDE_SKETCH,\n});\n","import SketchComponent from './SketchComponentHost';\nexport default SketchComponent;\n","// @flow\n\nimport React, { Component } from 'react';\nimport Card from '@material-ui/core/Card';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport Button from '@material-ui/core/Button';\nimport Input from '@material-ui/core/Input';\nimport InputLabel from '@material-ui/core/InputLabel';\nimport FormControl from '@material-ui/core/FormControl';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport FormHelperText from '@material-ui/core/FormHelperText';\nimport { withStyles } from '@material-ui/core/styles';\n\ntype Props = {\n onLoginClick: Function,\n errorMessage: string,\n isFetching: boolean,\n classes: {\n root: string,\n cardActions: string\n }\n}\n\ntype State = {\n username: string,\n password: string\n};\n\nconst style = theme => ({\n root: {\n maxWidth: 500,\n margin: '0 auto'\n },\n cardActions: {\n paddingRight: theme.spacing(2),\n paddingLeft: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n }\n});\n\nclass Login extends Component {\n static defaultProps = {\n isFetching: false,\n };\n\n state = {\n username: '',\n password: '',\n };\n\n handleChange = event => {\n this.setState({\n [event.target.name]: event.target.value,\n });\n };\n\n login = (event) => {\n event.preventDefault();\n this.props.onLoginClick(this.state.username, this.state.password);\n };\n\n render() {\n return (\n
\n
\n \n \n \n \n Email\n \n \n \n Password\n \n \n {\n this.props.errorMessage &&\n \n {this.props.errorMessage}\n \n }\n \n \n \n {\n this.props.isFetching &&\n \n }\n \n \n
\n
\n );\n }\n}\n\nexport default withStyles(style)(Login);\n","import Login from \"./Login\";\n\nexport default Login;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { Redirect } from 'react-router-dom';\nimport { login } from \"../../actions/authActions\";\nimport Login from \"../../components/Login\";\n\nexport class Auth extends Component {\n login = (username, password) => {\n this.props.dispatch(login(username, password));\n };\n\n render() {\n return (\n
\n {\n this.props.isAuthenticated ? (\n \n ) :\n (\n \n )\n }\n
\n )\n }\n}\n\nAuth.propTypes = {\n dispatch: PropTypes.func.isRequired,\n isAuthenticated: PropTypes.bool.isRequired,\n errorMessage: PropTypes.string.isRequired,\n isFetching: PropTypes.bool.isRequired,\n history: PropTypes.shape({\n push: PropTypes.func.isRequired,\n }).isRequired,\n};\n\nconst mapStateToProps = (state) => {\n const { auth } = state;\n const {\n isAuthenticated,\n errorMessage,\n isFetching\n } = auth;\n return {\n isAuthenticated,\n errorMessage,\n isFetching\n }\n};\n\nexport default connect(mapStateToProps)(Auth);\n","import Auth from \"./Auth\";\n\nexport default Auth;\n","import { CALL_API } from \"../middleware/api\";\nimport {\n GET_SKETCH_ORDERS_FAILURE,\n GET_SKETCH_ORDERS_REQUEST,\n GET_SKETCH_ORDERS_SUCCESS,\n} from \"./actionTypes\";\nimport SketchAdminSketchOrderClient from \"../lib/apiClients/roofSnapApiClient/sketchAdminSketchOrderClient\";\nimport QueryStringBuilder from \"../lib/queryStringBuilder\";\nimport UserProfileClient from \"../lib/apiClients/roofSnapApiClient/userProfileClient\";\nimport SketchTechSketchOrderClient from \"../lib/apiClients/roofSnapApiClient/sketchTechSketchOrderClient\";\n\nconst getSketchOrdersRequest = (request, params) => {\n return {\n [CALL_API]: {\n types: [\n GET_SKETCH_ORDERS_REQUEST,\n GET_SKETCH_ORDERS_SUCCESS,\n GET_SKETCH_ORDERS_FAILURE,\n ],\n request,\n params,\n },\n };\n};\n\nexport const getSketchOrders = (\n page = 1,\n statusIds,\n sketchTechUserIds,\n organizationId,\n orderBy,\n sortBy,\n filterByVendor,\n requesterUserId,\n filterStorm = false,\n rush = null,\n metalRoof = null,\n) => {\n return (dispatch, getState) => {\n const { isAdmin, isSketchOsAdmin } = getState().currentUserRoles;\n\n // Depending on the role, determine which endpoint to use\n let request;\n\n // If the user is an admin or a sketch os admin, use the sketch orders endpoint\n // Otherwise, use the restricted orders endpoint\n if (isAdmin || isSketchOsAdmin) {\n const sketchAdminSketchOrderClient = new SketchAdminSketchOrderClient(\n \"v2\"\n );\n request = sketchAdminSketchOrderClient.getSketchOrders;\n } else {\n const sketchTechSketchOrderClient = new SketchTechSketchOrderClient(\"v2\");\n request = sketchTechSketchOrderClient.getSketchOrders;\n }\n\n const queryStringBuilder = new QueryStringBuilder();\n queryStringBuilder.setQueryParameter(\"page\", page);\n if (statusIds) {\n statusIds.forEach((id) => {\n queryStringBuilder.setQueryParameter(\"statusIds\", id);\n });\n }\n if (sketchTechUserIds) {\n sketchTechUserIds.forEach((userId) => {\n queryStringBuilder.setQueryParameter(\"sketchTechUserIds\", userId);\n });\n }\n if (organizationId) {\n queryStringBuilder.setQueryParameter(\"organizationId\", organizationId);\n }\n if (sortBy) {\n queryStringBuilder.setQueryParameter(\"sort\", sortBy);\n }\n if (orderBy) {\n queryStringBuilder.setQueryParameter(\"order\", orderBy);\n }\n\n if (filterByVendor) {\n if (filterStorm)\n queryStringBuilder.setQueryParameter(\n \"namedSketchOrderFilter\",\n \"StormVendor\"\n );\n else\n queryStringBuilder.setQueryParameter(\n \"namedSketchOrderFilter\",\n \"Vendor\"\n );\n } else if (filterStorm) {\n queryStringBuilder.setQueryParameter(\"namedSketchOrderFilter\", \"Storm\");\n }\n if (requesterUserId) {\n queryStringBuilder.setQueryParameter(\"requesterId\", requesterUserId);\n }\n\n if (rush) {\n queryStringBuilder.setQueryParameter(\"rush\", rush);\n }\n\n if (metalRoof) {\n queryStringBuilder.setQueryParameter(\"metalRoof\", metalRoof);\n }\n\n const queryParams = queryStringBuilder.buildQueryString();\n const params = {\n queryParams,\n };\n\n return dispatch(getSketchOrdersRequest(request, params));\n };\n};\n\nexport const getRequestersSketchOrders = (requesterUserId, page = 1) => {\n const userProfileClient = new UserProfileClient(\"v1\");\n const request = userProfileClient.getRequestedSketchOrders;\n\n const queryStringBuilder = new QueryStringBuilder();\n queryStringBuilder.setQueryParameter(\"page\", page);\n\n const queryParams = queryStringBuilder.buildQueryString();\n\n return {\n [CALL_API]: {\n types: [\n GET_SKETCH_ORDERS_REQUEST,\n GET_SKETCH_ORDERS_SUCCESS,\n GET_SKETCH_ORDERS_FAILURE,\n ],\n request,\n params: {\n id: requesterUserId,\n queryParams,\n },\n },\n };\n};\n\nexport const getOwnersSketchOrders = (ownerUserId, page = 1) => {\n const userProfileClient = new UserProfileClient(\"v1\");\n const request = userProfileClient.getOwnedSketchOrders;\n\n const queryStringBuilder = new QueryStringBuilder();\n queryStringBuilder.setQueryParameter(\"page\", page);\n\n const queryParams = queryStringBuilder.buildQueryString();\n\n return {\n [CALL_API]: {\n types: [\n GET_SKETCH_ORDERS_REQUEST,\n GET_SKETCH_ORDERS_SUCCESS,\n GET_SKETCH_ORDERS_FAILURE,\n ],\n request,\n params: {\n id: ownerUserId,\n queryParams,\n },\n },\n };\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport IconButton from '@material-ui/core/IconButton';\nimport { ChevronLeft, ChevronRight } from '@material-ui/icons';\nimport Typography from '@material-ui/core/Typography';\nimport Grid from '@material-ui/core/Grid';\n\nconst style = () => ({\n root: {\n maxWidth: 150,\n display: 'flex',\n },\n text: {\n textAlign: 'center',\n marginTop: 15,\n }\n});\n\nconst Pager = props => {\n return (\n
\n \n \n \n \n \n \n \n \n {props.currentPage} of {props.totalPages}\n \n \n \n = props.totalPages}>\n \n \n \n \n
\n );\n};\n\nPager.propTypes = {\n currentPage: PropTypes.number.isRequired,\n totalPages: PropTypes.number.isRequired,\n nextPageClick: PropTypes.func.isRequired,\n prevPageClick: PropTypes.func.isRequired,\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n text: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nexport default withStyles(style)(Pager);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Chip from '@material-ui/core/Chip';\nimport Avatar from '@material-ui/core/Avatar';\nimport {\n lightBlue,\n amber,\n orange,\n green,\n grey,\n lightGreen,\n red\n} from '@material-ui/core/colors';\nimport {\n Schedule,\n Timelapse,\n FindInPage,\n CheckCircle,\n RemoveCircle,\n Cancel,\n MonetizationOn,\n Warning,\n Storage,\n Autorenew\n} from '@material-ui/icons';\nimport { SketchOrderStatus } from '../../lib/sketchOrderStatuses';\n\nconst style = {\n pendingChipStyle: {\n backgroundColor: lightBlue[500],\n color: '#FFFFFF',\n },\n inProgressChipStyle: {\n backgroundColor: amber[500],\n color: '#FFFFFF',\n },\n pendingReviewChipStyle: {\n backgroundColor: lightGreen[500],\n color: '#FFFFFF',\n },\n pendingRejectionChipStyle: {\n backgroundColor: orange[500],\n color: '#FFFFFF',\n },\n completeChipStyle: {\n backgroundColor: green[600],\n color: '#FFFFFF',\n },\n inactiveChipStyle: {\n backgroundColor: grey[500],\n color: '#FFFFFF',\n },\n errorChipStyle: {\n backgroundColor: red[500],\n color: '#FFFFFF'\n },\n inReviewChipStyle: {\n backgroundColor: lightBlue[500],\n color: '#FFFFFF',\n },\n};\n\nconst renderStatusChip = (status, onDelete) => {\n switch (status) {\n case SketchOrderStatus.Pending:\n return (\n \n \n \n }\n style={style.pendingChipStyle}\n label=\"Pending\"\n onDelete={onDelete}\n />\n );\n case SketchOrderStatus.RevisionRequested:\n return (\n \n \n \n }\n style={style.pendingChipStyle}\n label=\"Revision\"\n onDelete={onDelete}\n />\n );\n case SketchOrderStatus.Queued:\n return (\n \n \n \n }\n style={style.pendingChipStyle}\n label=\"Queued\"\n onDelete={onDelete}\n />\n );\n case SketchOrderStatus.InProgress:\n return (\n \n \n \n }\n style={style.inProgressChipStyle}\n label=\"In Progress\"\n onDelete={onDelete}\n />\n );\n case SketchOrderStatus.PendingReview:\n return (\n \n \n \n }\n style={style.pendingReviewChipStyle}\n label=\"Pending Review\"\n onDelete={onDelete}\n />\n );\n case SketchOrderStatus.PendingRejection:\n return (\n \n \n \n }\n style={style.pendingRejectionChipStyle}\n label=\"Pending Rejection\"\n onDelete={onDelete}\n />\n );\n case SketchOrderStatus.Complete:\n return (\n \n \n \n }\n style={style.completeChipStyle}\n label=\"Complete\"\n onDelete={onDelete}\n />\n );\n case SketchOrderStatus.Billed:\n return (\n \n \n \n }\n style={style.completeChipStyle}\n label=\"Billed\"\n onDelete={onDelete}\n />\n );\n case SketchOrderStatus.Incomplete:\n return (\n \n \n \n }\n style={style.inactiveChipStyle}\n label=\"Incomplete\"\n onDelete={onDelete}\n />\n );\n case SketchOrderStatus.Cancelled:\n return (\n \n \n \n }\n style={style.inactiveChipStyle}\n label=\"Cancelled\"\n onDelete={onDelete}\n />\n );\n case SketchOrderStatus.Exception:\n return (\n \n \n \n }\n style={style.errorChipStyle}\n label=\"Needs Attention\"\n onDelete={onDelete}\n />\n );\n case SketchOrderStatus.BillingFailed:\n return (\n \n \n \n }\n style={style.errorChipStyle}\n label=\"Billing Failed\"\n onDelete={onDelete}\n />\n );\n case SketchOrderStatus.InReview:\n return (\n \n \n \n }\n style={style.inReviewChipStyle}\n label=\"In Review\"\n onDelete={onDelete}\n />\n );\n default:\n return (\n \n );\n }\n};\n\nconst SketchOrderStatusChip = props => renderStatusChip(props.status, props.onDelete);\n\nSketchOrderStatusChip.propTypes = {\n status: PropTypes.string,\n onDelete: PropTypes.func,\n};\n\nSketchOrderStatusChip.defaultProps = {\n status: '',\n};\n\nexport default SketchOrderStatusChip;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Chip from '@material-ui/core/Chip';\n\nimport {\n lightBlue,\n amber,\n orange,\n green,\n grey,\n lightGreen,\n red,\n yellow\n} from '@material-ui/core/colors';\n\nconst styles = {\n green: {\n backgroundColor: green[500],\n color: '#FFFFFF',\n },\n yellow: {\n backgroundColor: yellow[500],\n color: '#000000',\n },\n red: {\n backgroundColor: red[500],\n color: '#FFFFFF'\n },\n};\n\nconst renderTimeSinceRequestedChip = (value, isBlueRoof) => {\n let minutesOrHours = 'Hours';\n let adjustedTime = value;\n\n const [yellowValue, redValue] = !isBlueRoof ? [2, 4] : [15, 22];\n \n if (value < 1) {\n minutesOrHours = \"Minutes\";\n adjustedTime = Math.round(value * 60);\n }\n\n const label = `${adjustedTime} ${minutesOrHours}`;\n\n let style = 'green';\n\n if (value > yellowValue && value < redValue)\n style = 'yellow';\n\n if (value >= redValue)\n style = 'red';\n\n return ();\n}\n\nconst TimeSinceRequestedChip = props => renderTimeSinceRequestedChip(props.value, props.isBlueRoof);\n\nTimeSinceRequestedChip.propTypes = {\n value: PropTypes.number,\n isBlueRoof: PropTypes.bool,\n};\n\nTimeSinceRequestedChip.defaultProps = {\n value: null,\n isBlueRoof: false,\n};\n\nexport default TimeSinceRequestedChip;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport List from '@material-ui/core/List';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport Avatar from '@material-ui/core/Avatar';\nimport Button from '@material-ui/core/Button';\nimport { withStyles } from '@material-ui/core/styles';\nimport withMobileDialog from '@material-ui/core/withMobileDialog';\n\nconst style = (theme) => ({\n dialogContent: {\n minWidth: 300,\n },\n miniAvatar: {\n backgroundColor: theme.palette.secondary.main,\n width: 20,\n height: 20,\n fontSize: 12,\n }\n});\n\nclass ChooseSketchOrderFilterDialog extends Component {\n constructor(props) {\n super(props);\n this.state = {\n open: props.open,\n statusFilterDialogOpen: false,\n organizationFilterDialogOpen: false,\n }\n }\n\n componentDidUpdate(prevProps) {\n if (prevProps.open !== this.props.open) {\n this.toggleDialog(this.props.open);\n }\n }\n\n toggleDialog = (open) => {\n this.setState({\n open,\n });\n };\n\n render() {\n const isV2EndpointUsed = !!(this.props.numberOfOwnerFilters);\n const isOwnerFilterDisabled = !!(this.props.numberOfRequesterFilters);\n\n return (\n
\n \n \n Filter By:\n \n \n \n \n \n {\n this.props.numberOfStatusFilters > 0 &&\n \n {this.props.numberOfStatusFilters}\n \n }\n \n {\n this.props.canFilterByOrganization &&\n \n \n {\n this.props.numberOfOrganizationFilters > 0 &&\n \n {this.props.numberOfOrganizationFilters}\n \n }\n \n }\n {\n this.props.canFilterByRequester &&\n \n \n {\n this.props.numberOfRequesterFilters > 0 &&\n \n {this.props.numberOfRequesterFilters}\n \n }\n \n }\n {\n this.props.canFilterByOwner &&\n \n \n {\n this.props.numberOfOwnerFilters > 0 &&\n \n {this.props.numberOfOwnerFilters}\n \n }\n \n }\n \n \n \n \n \n \n
\n );\n }\n}\n\nChooseSketchOrderFilterDialog.propTypes = {\n open: PropTypes.bool,\n onDismissClick: PropTypes.func.isRequired,\n chooseStatusFilter: PropTypes.func.isRequired,\n chooseOrganizationFilter: PropTypes.func.isRequired,\n chooseRequesterFilter: PropTypes.func.isRequired,\n chooseOwnerFilter: PropTypes.func.isRequired,\n classes: PropTypes.shape({\n dialogContent: PropTypes.string.isRequired,\n miniAvatar: PropTypes.string.isRequired,\n }).isRequired,\n numberOfStatusFilters: PropTypes.number,\n numberOfOrganizationFilters: PropTypes.number,\n numberOfRequesterFilters: PropTypes.number,\n numberOfOwnerFilters: PropTypes.number,\n canFilterByOrganization: PropTypes.bool,\n canFilterByRequester: PropTypes.bool,\n canFilterByOwner: PropTypes.bool,\n};\n\nChooseSketchOrderFilterDialog.defaultProps = {\n open: false,\n numberOfStatusFilters: 0,\n numberOfOrganizationFilters: 0,\n numberOfRequesterFilters: 0,\n numberOfOwnerFilters: 0,\n canFilterByRequester: false,\n canFilterByOwner: false,\n};\n\nexport default withMobileDialog()(withStyles(style)(ChooseSketchOrderFilterDialog));\n","import FilterSketchOrdersDialog from \"./ChooseSketchOrderFilterDialog\";\n\nexport default FilterSketchOrdersDialog;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport queryString from 'query-string';\nimport find from 'lodash/find';\nimport { withRouter } from 'react-router-dom';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport Button from '@material-ui/core/Button';\nimport List from '@material-ui/core/List';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport some from 'lodash/some';\nimport filter from 'lodash/filter';\nimport { withStyles } from '@material-ui/core/styles';\nimport SketchOrderStatusChip from \"../SketchOrderStatusChip/SketchOrderStatusChip\";\nimport { allSketchOrderStatuses } from \"../../lib/sketchOrderStatuses\";\nimport withMobileDialog from '@material-ui/core/withMobileDialog';\n\nconst style = () => ({\n dialogContent: {\n minWidth: 300,\n },\n organizationChipWrapper: {\n display: 'inline',\n padding: 8,\n },\n selectStatusWrapper: {\n paddingBottom: 16,\n }\n});\n\nexport class StatusSketchOrderFilterDialog extends Component {\n constructor(props) {\n super(props);\n this.state = {\n selectedStatuses: this.getSelectedStatus(),\n };\n }\n\n componentDidUpdate(prevProps) {\n if (prevProps.location.search !== this.props.location.search) {\n const selectedStatuses = this.getSelectedStatus();\n this.setState({\n selectedStatuses,\n })\n }\n }\n\n // get initial selected statuses\n getSelectedStatus = () => {\n const queryParams = queryString.parse(this.props.location.search);\n const { statusIds } = queryParams;\n\n if (!statusIds) {\n return [];\n }\n\n if (!Array.isArray(statusIds)) {\n const statuses = [];\n const status = find(allSketchOrderStatuses, ['id', parseInt(statusIds, 10)]);\n statuses.push(status);\n return statuses;\n }\n\n const statuses = [];\n statusIds.forEach((id) => {\n const status = find(allSketchOrderStatuses, ['id', parseInt(id, 10)]);\n statuses.push(status);\n });\n\n return statuses;\n };\n\n renderAvailableStatuses = (sketchOrderStatus) => (\n this.addStatus(sketchOrderStatus)}>\n \n \n );\n\n renderSelectedStatuses = (sketchOrderStatus) => (\n
\n this.removeFilter(sketchOrderStatus)}/>\n
\n );\n\n addStatus = (status) => {\n const { selectedStatuses } = this.state;\n selectedStatuses.push(status);\n this.setState({ selectedStatuses });\n };\n\n applyFilter = async () => {\n this.props.onApplyClick(this.state.selectedStatuses);\n };\n\n removeFilter = (status) => {\n const { selectedStatuses } = this.state;\n const updateStatuses = filter(selectedStatuses, (s) => {\n return status.id !== s.id;\n });\n this.setState({ selectedStatuses: updateStatuses });\n };\n\n filterAvailableStatuses = (status) => {\n return !some(this.state.selectedStatuses, status);\n };\n\n render() {\n const filteredAvailableStatues = allSketchOrderStatuses.filter(this.filterAvailableStatuses);\n\n return (\n \n \n Filter By Status\n \n \n \n
\n {this.state.selectedStatuses.map(this.renderSelectedStatuses)}\n
\n {filteredAvailableStatues.map(this.renderAvailableStatuses)}\n
\n
\n \n \n \n \n
\n );\n }\n}\n\nStatusSketchOrderFilterDialog.propTypes = {\n location: PropTypes.shape({\n search: PropTypes.string,\n }).isRequired,\n open: PropTypes.bool,\n onDismissClick: PropTypes.func.isRequired,\n onApplyClick: PropTypes.func.isRequired,\n classes: PropTypes.shape({\n dialogContent: PropTypes.string.isRequired,\n organizationChipWrapper: PropTypes.string.isRequired,\n selectStatusWrapper: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nStatusSketchOrderFilterDialog.defaultProps = {\n open: false,\n selectedStatuses: [],\n};\n\nexport default withRouter(withMobileDialog()(withStyles(style)(StatusSketchOrderFilterDialog)));\n","import StatusSketchOrderFilterDialog from \"./StatusSketchOrderFilterDialog\";\n\nexport default StatusSketchOrderFilterDialog;\n","import RoofSnapApiClient from \"./roofSnapApiClient\";\n\nconst baseUrl = 'organizations';\n\nclass OrganizationClient extends RoofSnapApiClient {\n async getOrganizations(params) {\n const { queryParams } = params;\n try {\n const url = `${baseUrl}${queryParams}`;\n return await super.get(url);\n } catch (error) {\n return Promise.reject(error);\n }\n }\n}\n\nexport default OrganizationClient;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { withRouter } from 'react-router-dom';\nimport queryString from \"query-string\";\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport Button from '@material-ui/core/Button';\nimport List from '@material-ui/core/List';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { withStyles } from '@material-ui/core/styles';\nimport withMobileDialog from '@material-ui/core/withMobileDialog';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport Chip from '@material-ui/core/Chip';\nimport Search from \"../../components/Search/index\";\nimport { getOrganizations } from \"../../actions/organizationsActions\";\nimport { getOrganization } from \"../../actions/organizationActions\";\n\nconst style = () => ({\n dialogContent: {\n minWidth: 300,\n },\n organizationChipWrapper: {\n margin: 8,\n },\n});\n\nexport class OrganizationSketchOrderFilterDialog extends Component {\n state = {\n selectedOrganization: null,\n };\n\n async componentDidMount() {\n const queryParams = queryString.parse(this.props.location.search);\n const { organizationId } = queryParams;\n\n if (!organizationId) {\n return null;\n }\n\n const result = await this.props.dispatch(getOrganization(organizationId));\n if (result.response) {\n this.setState({\n selectedOrganization: result.response,\n });\n } else {\n this.setState({\n selectedOrganization: result.response,\n });\n }\n }\n\n searchOrganizations = async (searchValue) => {\n await this.props.dispatch(getOrganizations(1, searchValue));\n };\n\n renderOrganization = (organization) => (\n this.selectOrganization(organization)}>\n \n \n );\n\n selectOrganization = (organization) => {\n this.setState({ selectedOrganization: organization })\n };\n\n removeOrganization = () => {\n this.setState({ selectedOrganization: null });\n };\n\n applyOrganizationFilter = async () => {\n const { selectedOrganization } = this.state;\n const organizationId = selectedOrganization ? selectedOrganization.id : undefined;\n this.props.onApplyClick(organizationId);\n };\n\n render() {\n return (\n \n \n Filter By Organization\n \n \n \n {\n this.state.selectedOrganization &&\n
\n \n
\n }\n {\n this.props.isFetching &&\n \n }\n \n {this.props.organizations.map(this.renderOrganization)}\n \n
\n \n \n \n \n
\n );\n }\n}\n\nOrganizationSketchOrderFilterDialog.propTypes = {\n dispatch: PropTypes.func.isRequired,\n open: PropTypes.bool,\n organizations: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.number,\n name: PropTypes.string,\n })).isRequired,\n isFetching: PropTypes.bool.isRequired,\n onApplyClick: PropTypes.func.isRequired,\n onDismissClick: PropTypes.func.isRequired,\n classes: PropTypes.shape({\n dialogContent: PropTypes.string.isRequired,\n organizationChipWrapper: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nOrganizationSketchOrderFilterDialog.defaultProps = {\n open: false,\n};\n\nconst mapStateToProps = (state) => {\n const { organizations: organizationsStore } = state;\n const { organizations, isFetching } = organizationsStore;\n return {\n organizations,\n isFetching,\n };\n};\n\nexport default withRouter(connect(mapStateToProps)(withMobileDialog()(withStyles(style)(OrganizationSketchOrderFilterDialog))));\n","import { CALL_API } from \"../middleware/api\";\nimport {\n GET_ORGANIZATIONS_REQUEST,\n GET_ORGANIZATIONS_SUCCESS,\n GET_ORGANIZATIONS_FAILURE\n} from \"./actionTypes\";\nimport OrganizationClient from '../lib/apiClients/roofSnapApiClient/organizationClient';\nimport QueryStringBuilder from \"../lib/queryStringBuilder\";\n\nexport const getOrganizations = (page = 1, search) => {\n const organizationClient = new OrganizationClient('v1');\n const request = organizationClient.getOrganizations;\n\n const queryStringBuilder = new QueryStringBuilder();\n queryStringBuilder.setQueryParameter('page', page);\n if (search) {\n queryStringBuilder.setQueryParameter('search', search);\n }\n const queryParams = queryStringBuilder.buildQueryString();\n\n return {\n [CALL_API]: {\n types: [\n GET_ORGANIZATIONS_REQUEST,\n GET_ORGANIZATIONS_SUCCESS,\n GET_ORGANIZATIONS_FAILURE\n ],\n request,\n params: {\n queryParams,\n },\n }\n };\n};\n","import OrganizationClient from \"../lib/apiClients/roofSnapApiClient/organizationClient\";\nimport { CALL_API } from \"../middleware/api\";\nimport {\n GET_ORGANIZATION_FAILURE,\n GET_ORGANIZATION_REQUEST,\n GET_ORGANIZATION_SUCCESS\n} from \"./actionTypes\";\n\nexport const getOrganization = (id) => {\n const organizationClient = new OrganizationClient('v1');\n const request = organizationClient.getOrganizations;\n\n return {\n [CALL_API]: {\n types: [\n GET_ORGANIZATION_REQUEST,\n GET_ORGANIZATION_SUCCESS,\n GET_ORGANIZATION_FAILURE,\n ],\n request,\n params: {\n id\n }\n }\n };\n};\n","import OrganizationSketchOrderFilterDialog from \"./OrganizationSketchOrderFilterDialog\";\n\nexport default OrganizationSketchOrderFilterDialog;\n","import UserProfileClient from \"../lib/apiClients/roofSnapApiClient/userProfileClient\";\nimport QueryStringBuilder from \"../lib/queryStringBuilder\";\nimport { CALL_API } from \"../middleware/api\";\nimport {\n GET_USER_PROFILES_FAILURE,\n GET_USER_PROFILES_REQUEST,\n GET_USER_PROFILES_SUCCESS\n} from \"./actionTypes\";\n\nexport const getUserProfiles = (page = 1, searchValue, organizationId, userRoleIds) => {\n const userProfileClient = new UserProfileClient('v1');\n const request = userProfileClient.getUserProfiles;\n\n const queryStringBuilder = new QueryStringBuilder();\n queryStringBuilder.setQueryParameter('page', page);\n if (searchValue) {\n queryStringBuilder.setQueryParameter('search', searchValue);\n }\n if (organizationId) {\n queryStringBuilder.setQueryParameter('organizationId', organizationId);\n }\n if (userRoleIds) {\n userRoleIds.forEach(roleId => {\n queryStringBuilder.setQueryParameter('userRoleIds', roleId);\n });\n }\n\n const queryParams = queryStringBuilder.buildQueryString();\n\n return {\n [CALL_API]: {\n types: [\n GET_USER_PROFILES_REQUEST,\n GET_USER_PROFILES_SUCCESS,\n GET_USER_PROFILES_FAILURE\n ],\n request,\n params: {\n queryParams,\n }\n }\n }\n};\n","import UserProfileClient from \"../lib/apiClients/roofSnapApiClient/userProfileClient\";\nimport {\n CALL_API\n} from \"../middleware/api\";\nimport {\n GET_USER_PROFILE_FAILURE,\n GET_USER_PROFILE_REQUEST,\n GET_USER_PROFILE_SUCCESS\n} from \"./actionTypes\";\n\nexport const getUserProfile = (userId) => {\n const userProfileClient = new UserProfileClient('v1');\n const request = userProfileClient.getUserProfile;\n\n return {\n [CALL_API]: {\n types: [\n GET_USER_PROFILE_REQUEST,\n GET_USER_PROFILE_SUCCESS,\n GET_USER_PROFILE_FAILURE,\n ],\n request,\n params: {\n id: userId,\n }\n }\n }\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { withRouter } from 'react-router-dom';\nimport queryString from 'query-string';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport Button from '@material-ui/core/Button';\nimport List from '@material-ui/core/List';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport Chip from '@material-ui/core/Chip';\nimport { withStyles } from '@material-ui/core/styles';\nimport withMobileDialog from '@material-ui/core/withMobileDialog';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport Search from \"../../components/Search\";\nimport { getUserProfiles } from \"../../actions/userProfilesActions\";\nimport {getUserProfile} from \"../../actions/userProfileActions\";\n\nconst style = () => ({\n dialogContent: {\n minWidth: 300,\n },\n requesterChipWrapper: {\n margin: 8,\n },\n});\n\nexport class RequesterSketchOrderFilterDialog extends Component {\n state = {\n selectedUser: null,\n };\n\n async componentDidMount() {\n await this.getInitialSelectedUser();\n }\n\n getInitialSelectedUser = async () => {\n const queryParams = queryString.parse(this.props.location.search);\n const { requesterUserId } = queryParams;\n\n if (!requesterUserId) {\n return null;\n }\n\n const result = await this.props.dispatch(getUserProfile(requesterUserId));\n if (result.response) {\n this.setState({\n selectedUser: result.response,\n });\n } else {\n this.setState({\n selectedUser: result.response,\n });\n }\n };\n\n searchUserProfiles = async (searchValue) => {\n this.props.dispatch(getUserProfiles(1, searchValue))\n };\n\n renderUserProfiles = (user) => (\n this.selectUser(user)}>\n \n \n );\n\n selectUser = (user) => {\n this.setState({ selectedUser: user });\n };\n\n applyFilter = async () => {\n const { selectedUser } = this.state;\n const userId = selectedUser ? selectedUser.userId : undefined;\n this.props.onApplyClick(userId);\n };\n\n removeFilter = () => {\n this.setState({ selectedUser: null });\n };\n\n render() {\n return (\n \n \n Filter By Requester\n \n \n \n {\n this.state.selectedUser &&\n
\n \n
\n }\n {\n this.props.isFetching &&\n \n }\n \n {this.props.userProfiles.map(this.renderUserProfiles)}\n \n
\n \n \n \n \n
\n );\n }\n}\n\nRequesterSketchOrderFilterDialog.propTypes = {\n dispatch: PropTypes.func.isRequired,\n open: PropTypes.bool,\n onApplyClick: PropTypes.func.isRequired,\n onDismissClick: PropTypes.func.isRequired,\n userProfiles: PropTypes.arrayOf(PropTypes.shape({\n userId: PropTypes.number.isRequired,\n userName: PropTypes.string.isRequired,\n })).isRequired,\n isFetching: PropTypes.bool.isRequired,\n classes: PropTypes.shape({\n dialogContent: PropTypes.string.isRequired,\n requesterChipWrapper: PropTypes.string.isRequired,\n }).isRequired,\n location: PropTypes.shape({\n search: PropTypes.string,\n }).isRequired,\n};\n\nRequesterSketchOrderFilterDialog.defaultProps = {\n open: false,\n};\n\nconst mapStateToProps = (state) => {\n const { userProfiles: userProfilesStore } = state;\n const { userProfiles, isFetching } = userProfilesStore;\n\n return {\n userProfiles,\n isFetching,\n }\n};\n\nexport default withRouter(connect(mapStateToProps)(withMobileDialog()(withStyles(style)(RequesterSketchOrderFilterDialog))));\n","import RequesterSketchOrderFilterDialog from \"./RequesterSketchOrderFilterDialog\";\n\nexport default RequesterSketchOrderFilterDialog;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { withRouter } from 'react-router-dom';\nimport queryString from 'query-string';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport Button from '@material-ui/core/Button';\nimport List from '@material-ui/core/List';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport Chip from '@material-ui/core/Chip';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport { withStyles } from '@material-ui/core/styles';\nimport withMobileDialog from '@material-ui/core/withMobileDialog';\nimport Search from \"../../components/Search\";\nimport { getUserProfiles } from \"../../actions/userProfilesActions\";\nimport {getUserProfile} from \"../../actions/userProfileActions\";\n\nconst style = () => ({\n dialogContent: {\n minWidth: 300,\n },\n ownerChipWrapper: {\n margin: 8,\n },\n});\n\nexport class OwnerSketchOrderFilterDialog extends Component {\n state = {\n selectedUser: null,\n };\n\n async componentDidMount() {\n const queryParams = queryString.parse(this.props.location.search);\n const { ownerUserId } = queryParams;\n\n if (!ownerUserId) {\n return;\n }\n\n const result = await this.props.dispatch(getUserProfile(ownerUserId));\n if (result.response) {\n this.setState({\n selectedUser: result.response,\n });\n } else {\n this.setState({\n selectedUser: null,\n })\n }\n }\n\n searchUserProfiles = async (searchValue) => {\n this.props.dispatch(getUserProfiles(1, searchValue))\n };\n\n renderUserProfiles = (user) => (\n this.selectUser(user)}>\n \n \n );\n\n selectUser = (user) => {\n this.setState({ selectedUser: user });\n };\n\n applyFilter = async () => {\n const { selectedUser } = this.state;\n const userId = selectedUser ? selectedUser.userId : undefined;\n this.props.onApplyClick(userId);\n };\n\n removeFilter = () => {\n this.setState({ selectedUser: null });\n };\n\n render() {\n return (\n \n \n Filter By Owner\n \n \n \n {\n this.state.selectedUser &&\n
\n \n
\n }\n {\n this.props.isFetching &&\n \n }\n \n {this.props.userProfiles.map(this.renderUserProfiles)}\n \n
\n \n \n \n \n
\n );\n }\n}\n\nOwnerSketchOrderFilterDialog.propTypes = {\n dispatch: PropTypes.func.isRequired,\n open: PropTypes.bool,\n onApplyClick: PropTypes.func.isRequired,\n onDismissClick: PropTypes.func.isRequired,\n userProfiles: PropTypes.arrayOf(PropTypes.shape({\n userId: PropTypes.number.isRequired,\n userName: PropTypes.string.isRequired,\n })).isRequired,\n isFetching: PropTypes.bool.isRequired,\n classes: PropTypes.shape({\n dialogContent: PropTypes.string.isRequired,\n ownerChipWrapper: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nOwnerSketchOrderFilterDialog.defaultProps = {\n open: false,\n};\n\nconst mapStateToProps = (state) => {\n const { userProfiles: userProfilesStore } = state;\n const {\n userProfiles,\n isFetching\n } = userProfilesStore;\n\n return {\n userProfiles,\n isFetching\n }\n};\n\nexport default withRouter(connect(mapStateToProps)(withMobileDialog()(withStyles(style)(OwnerSketchOrderFilterDialog))));\n","import OwnerSketchOrderFilterDialog from \"./OwnerSketchOrderFilterDialog\";\n\nexport default OwnerSketchOrderFilterDialog;\n","export const SketchOrderSortParameter = {\n None: \"None\",\n AdminPriority: \"AdminPriority\",\n TechPriority: \"TechPriority\",\n UpdatedAt: \"UpdatedAt\",\n TimeSinceRequested: \"TimeSinceRequested\",\n DueDate: \"DueDate\",\n};\n","export const OrderParameterId = {\n Descending: 0,\n Ascending: 1\n};\n\nexport const OrderParameter = {\n Descending: \"Descending\",\n Ascending: \"Ascending\"\n};\n","import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport queryString from \"query-string\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { withStyles } from \"@material-ui/core/styles\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport { FilterList, CloudOff, Cloud } from \"@material-ui/icons\";\nimport Badge from \"@material-ui/core/Badge\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport TableSortLabel from \"@material-ui/core/TableSortLabel\";\nimport CircularProgress from \"@material-ui/core/CircularProgress\";\nimport Button from \"@material-ui/core/Button\";\nimport EyeIcon from \"@material-ui/icons/RemoveRedEye\";\nimport dateformat from \"dateformat\";\nimport { withRouter } from \"react-router-dom\";\nimport Pager from \"../Pager/Pager\";\nimport SketchOrderStatusChip from \"../SketchOrderStatusChip/SketchOrderStatusChip\";\nimport TimeSinceRequestedChip from \"../TimeSinceRequestedChip/TimeSinceRequestedChip\";\nimport ChoseSketchOrdersFilterDialog from \"../ChooseSketchOrderFilterDialog\";\nimport StatusSketchOrderFilterDialog from \"../StatusSketchOrderFilterDialog\";\nimport OrganizationSketchOrderFilterDialog from \"../../containers/OrganizationSketchOrderFilterDialog\";\nimport RequesterSketchOrderFilterDialog from \"../../containers/RequesterSketchOrderFilterDialog\";\nimport OwnerSketchOrderFilterDialog from \"../../containers/OwnerSketchOrderFilterDialog\";\nimport { SketchOrderSortParameter } from \"../../lib/sketchOrderSortParameters\";\nimport { OrderParameter } from \"../../lib/OrderParameters\";\n\nconst style = (theme) => ({\n flex: {\n flexGrow: 1,\n },\n subtitleIcon: {\n display: \"inline\",\n marginRight: theme.spacing(1),\n },\n subtitle: {\n display: \"inline\",\n verticalAlign: \"super\",\n },\n title: {\n display: \"inline\",\n marginRight: 8,\n },\n tableWrapper: {\n overflowX: \"auto\",\n },\n margin: {\n marginRight: theme.spacing(1),\n },\n});\n\nconst blueRoofOrgId = parseInt(process.env.REACT_APP_BLUE_ROOF_ORG_ID);\n\nclass SketchOrderTable extends Component {\n state = {\n chooseFilterDialogOpen: false,\n statusFilterDialogOpen: false,\n organizationFilterDialogOpen: false,\n requesterFilterDialogOpen: false,\n ownerFilterDialogOpen: false,\n };\n\n // Choose Filter Dialog\n\n openFilterSketchOrderDialog = () => {\n this.setState({ chooseFilterDialogOpen: true });\n };\n\n closeFilterSketchOrderDialog = () => {\n this.setState({ chooseFilterDialogOpen: false });\n };\n\n applyFilter = (name, value, clearFilters = false) => {\n let newQueryString;\n if (clearFilters) {\n const newQueryParam = {\n [name]: value,\n };\n newQueryString = queryString.stringify(newQueryParam);\n } else {\n const queryParams = queryString.parse(this.props.location.search);\n const newQueryParams = Object.assign({}, queryParams, {\n [name]: value,\n });\n\n newQueryString = queryString.stringify(newQueryParams);\n }\n this.props.history.push(\n `${this.props.location.pathname}?${newQueryString}`\n );\n };\n\n // Status Filter\n\n openStatusFilterDialog = () => {\n this.setState({\n chooseFilterDialogOpen: false,\n statusFilterDialogOpen: true,\n });\n };\n\n applyStatusFilters = (statuses) => {\n const statusIds = statuses.map((status) => {\n return status.id;\n });\n\n this.applyFilter(\"statusIds\", statusIds);\n\n this.closeStatusFilterDialog();\n };\n\n closeStatusFilterDialog = () => {\n this.setState({\n chooseFilterDialogOpen: true,\n statusFilterDialogOpen: false,\n });\n };\n\n // Organization Filter\n\n openOrganizationFilterDialog = () => {\n this.setState({\n chooseFilterDialogOpen: false,\n organizationFilterDialogOpen: true,\n });\n };\n\n applyOrganizationFilter = (organizationId) => {\n this.applyFilter(\"organizationId\", organizationId);\n\n this.closeOrganizationFilterDialog();\n };\n\n closeOrganizationFilterDialog = () => {\n this.setState({\n chooseFilterDialogOpen: true,\n organizationFilterDialogOpen: false,\n });\n };\n\n // Requester Filter\n\n openRequesterFilterDialog = () => {\n this.setState({\n chooseFilterDialogOpen: false,\n requesterFilterDialogOpen: true,\n });\n };\n\n applyRequesterFilter = (userId) => {\n this.applyFilter(\"requesterUserId\", userId, true);\n\n this.closeRequesterFilterDialog();\n };\n\n closeRequesterFilterDialog = () => {\n this.setState({\n chooseFilterDialogOpen: true,\n requesterFilterDialogOpen: false,\n });\n };\n\n // Owner Filter\n\n openOwnerFilterDialog = () => {\n this.setState({\n chooseFilterDialogOpen: false,\n ownerFilterDialogOpen: true,\n });\n };\n\n applyOwnerFilter = (userId) => {\n this.applyFilter(\"ownerUserId\", userId, true);\n\n this.closeOwnerFilterDialog();\n };\n\n closeOwnerFilterDialog = () => {\n this.setState({\n chooseFilterDialogOpen: true,\n ownerFilterDialogOpen: false,\n });\n };\n\n sort = (newSortParameter) => {\n let order;\n\n // If are changing the sort parameter, the order should be descending\n // Otherwise, toggle what the order this is\n if (this.props.sort !== newSortParameter) {\n order = OrderParameter.Descending;\n } else {\n switch (this.props.order) {\n case OrderParameter.Descending:\n order = OrderParameter.Ascending;\n break;\n case OrderParameter.Ascending:\n order = OrderParameter.Descending;\n break;\n default:\n break;\n }\n }\n\n this.props.onSortClick(newSortParameter, order);\n };\n\n sortByRequestedDate = () => {\n // None sort parameter is the default parameter.\n // The default sort is by requestedAt\n this.sort(SketchOrderSortParameter.None);\n };\n\n sortByUpdatedDate = () => {\n this.sort(SketchOrderSortParameter.UpdatedAt);\n };\n\n sortByTimeSinceRequested = () => {\n this.sort(SketchOrderSortParameter.TimeSinceRequested);\n };\n\n sortByDueDate = () => {\n this.sort(SketchOrderSortParameter.DueDate);\n };\n\n renderTitle = () => {\n if (this.props.totalOrders === 1)\n return `${this.props.totalOrders} Sketch Order`;\n\n return `${this.props.totalOrders} Sketch Orders`;\n };\n\n renderSketchOrderStatusChip = (order) => {\n const { hasNearmapCoverage, sketchOrderStatus, rushed } = order;\n const chip = ;\n\n if (hasNearmapCoverage && !rushed) {\n return (\n \n {chip}\n \n );\n }\n\n if (hasNearmapCoverage && rushed) {\n return (\n \n \n {chip}\n \n \n );\n }\n\n if (rushed) {\n return (\n \n {chip}\n \n );\n }\n return chip;\n };\n\n renderProjectName = (order) => {\n if (!order.projectId) {\n return {order.projectName};\n }\n\n const impersonatorUserName = this.props.currentUserName.split(\"@\")[0];\n return (\n \n {order.projectName}\n \n );\n };\n\n renderSketchOrder = (id) => {\n const order = this.props.sketchOrders[id];\n return (\n this.props.history.push(`/orders/${order.id}`)}\n >\n {this.props.showStatus && (\n {this.renderSketchOrderStatusChip(order)}\n )}\n {order.sketchReportType}\n {this.props.showRequestedAtTime && (\n \n {order.requestedDate\n ? dateformat(order.requestedDate, \"m/d/yyyy h:MM TT\")\n : \"\"}\n \n )}\n\n {this.props.showLastUpdatedAtTime && (\n \n {order.updatedAt\n ? dateformat(order.updatedAt, \"m/d/yyyy h:MM TT\")\n : \"\"}\n \n )}\n {this.props.showDueDate && (\n \n {order.dueDate\n ? dateformat(order.dueDate, \"m/d/yyyy h:MM TT\")\n : \"None\"}\n \n )}\n\n {this.props.showTimeSinceRequested && (\n \n \n \n )}\n {this.props.showOrganizationName && (\n \n {this.props.showLinksToSupportDashboard &&\n process.env.REACT_APP_ENVIRONMENT.endsWith(\"production\") ? (\n \n {order.organization.name}\n \n ) : (\n order.organization.name\n )}\n \n )}\n {this.props.showSketchTech && (\n \n {order.sketchTech && order.sketchTech.userName\n ? order.sketchTech.userName\n : \"\"}\n \n )}\n {this.props.showRequester && (\n \n {this.props.showLinksToSupportDashboard &&\n process.env.REACT_APP_ENVIRONMENT.endsWith(\"production\") ? (\n \n {order.requester.userName}\n \n ) : (\n order.requester.userName\n )}\n \n )}\n {this.props.showAddress && {order.address}}\n {this.props.showProjectName && (\n {this.renderProjectName(order)}\n )}\n {this.props.showCompletedDate && (\n \n {order.completedDate\n ? dateformat(order.completedDate, \"m/d/yyyy h:MM TT\")\n : \"\"}\n \n )}\n {this.props.showReviewer && (\n \n {order.reviewer && (\n
\n {this.props.showLinksToSupportDashboard &&\n process.env.REACT_APP_ENVIRONMENT.endsWith(\"production\") ? (\n \n {order.reviewer.userName}\n \n ) : (\n order.reviewer.userName\n )}\n
\n )}\n
\n )}\n {this.props.showCost && (\n \n {order.cost.toLocaleString(\"en-US\", {\n style: \"currency\",\n currency: \"USD\",\n })}\n \n )}\n \n this.props.history.push(`/orders/${order.id}`)}\n color=\"primary\"\n >\n \n {order.id}\n \n \n \n );\n };\n\n determineNumberOfFilersBeingApplied = () => {\n if (this.props.numberOfRequesterFilters) {\n return this.props.numberOfRequesterFilters;\n }\n\n return (\n this.props.numberOfStatusFilters + this.props.numberOfOrganizationFilters\n );\n };\n\n determineIfOrderIsAscOrDesc = () => {\n switch (this.props.order) {\n case OrderParameter.Ascending:\n return \"asc\";\n case OrderParameter.Descending:\n return \"desc\";\n default:\n break;\n }\n };\n\n render() {\n const numberOfFiltersApplied = this.determineNumberOfFilersBeingApplied();\n return (\n
\n \n \n
\n
\n \n {this.props.subtitleIcon}\n \n \n {this.props.subtitle}\n \n
\n \n {this.renderTitle()}\n \n {this.props.isFetching && }\n
\n {this.props.showStormFilter && (\n \n {this.props.filterStorm ? : }\n \n )}\n {this.props.canFilter && numberOfFiltersApplied === 0 && (\n \n \n \n )}\n {this.props.canFilter && numberOfFiltersApplied > 0 && (\n \n \n \n \n \n )}\n \n
\n
\n \n \n \n {this.props.showStatus && Status}\n {this.props.showRequestedAtTime && (\n \n {this.props.canSortByRequestedDate && (\n \n \n Requested\n \n \n )}\n {!this.props.canSortByRequestedDate && (\n
Requested
\n )}\n
\n )}\n {/* TODO: dhoward -- this is the new headder */}\n Report Type\n {/* TODO: dhoward -- this is the new headder */}\n {this.props.showLastUpdatedAtTime && (\n \n {this.props.canSortByUpdatedDate && (\n \n \n Last Updated\n \n \n )}\n {!this.props.canSortByUpdatedDate &&
Update
}\n
\n )}\n {this.props.showDueDate && (\n \n {this.props.canSortByDueDate && (\n \n \n Due Date\n \n \n )}\n \n )}\n {this.props.showTimeSinceRequested && (\n \n {\n \n \n Time Since Requested\n \n \n }\n \n )}\n {this.props.showOrganizationName && (\n Organization\n )}\n {this.props.showSketchTech && (\n Sketch Tech\n )}\n {this.props.showRequester && Requester}\n {this.props.showAddress && Address}\n {this.props.showProjectName && Name}\n {this.props.showCompletedDate && (\n Completed\n )}\n {this.props.showReviewer && Reviewer}\n {this.props.showCost && Cost}\n #\n
\n
\n \n {this.props.sketchOrderIds.map(this.renderSketchOrder)}\n \n
\n
\n \n
\n \n \n \n\n \n\n \n\n \n\n \n\n \n
\n );\n }\n}\n\nSketchOrderTable.propTypes = {\n subtitleIcon: PropTypes.node,\n subtitle: PropTypes.string,\n showProjectName: PropTypes.bool,\n showAddress: PropTypes.bool,\n showOrganizationName: PropTypes.bool,\n showCompletedDate: PropTypes.bool,\n showRequester: PropTypes.bool,\n showSketchTech: PropTypes.bool,\n showReviewer: PropTypes.bool,\n showStatus: PropTypes.bool,\n showCost: PropTypes.bool,\n showDueDate: PropTypes.bool,\n showLinksToSupportDashboard: PropTypes.bool,\n showRequestedAtTime: PropTypes.bool,\n showLastUpdatedAtTime: PropTypes.bool,\n showTimeSinceRequested: PropTypes.bool,\n canFilter: PropTypes.bool,\n numberOfStatusFilters: PropTypes.number,\n numberOfOrganizationFilters: PropTypes.number,\n numberOfRequesterFilters: PropTypes.number,\n numberOfOwnerFilters: PropTypes.number,\n canFilterByOrganization: PropTypes.bool,\n canFilterByRequester: PropTypes.bool,\n canFilterByOwner: PropTypes.bool,\n canSortByRequestedDate: PropTypes.bool,\n canSortByUpdatedDate: PropTypes.bool,\n canSortByDueDate: PropTypes.bool,\n sketchOrders: PropTypes.shape({\n sketchOrder: PropTypes.shape({\n id: PropTypes.number.isRequired,\n projectName: PropTypes.string,\n completedDate: PropTypes.string,\n requestedDate: PropTypes.string,\n updatedAt: PropTypes.string,\n address: PropTypes.string,\n city: PropTypes.string,\n region: PropTypes.string,\n postCode: PropTypes.string,\n country: PropTypes.string,\n sketchOrderStatus: PropTypes.string,\n cost: PropTypes.number,\n organization: PropTypes.shape({\n id: PropTypes.number,\n name: PropTypes.string,\n }),\n owner: PropTypes.shape({\n userId: PropTypes.number,\n userName: PropTypes.string,\n }),\n requester: PropTypes.shape({\n userId: PropTypes.number,\n userName: PropTypes.string,\n }),\n projectId: PropTypes.string,\n sketchTech: PropTypes.shape({\n userName: PropTypes.string,\n }),\n }),\n }).isRequired,\n sketchOrderIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n totalOrders: PropTypes.number.isRequired,\n currentPage: PropTypes.number.isRequired,\n totalPages: PropTypes.number.isRequired,\n onNextPageClick: PropTypes.func.isRequired,\n onPrevPageClick: PropTypes.func.isRequired,\n classes: PropTypes.shape({\n flex: PropTypes.string.isRequired,\n subtitleIcon: PropTypes.string.isRequired,\n subtitle: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n tableWrapper: PropTypes.string.isRequired,\n margin: PropTypes.string.isRequired,\n }).isRequired,\n isFetching: PropTypes.bool,\n history: PropTypes.shape({\n push: PropTypes.func.isRequired,\n }).isRequired,\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n search: PropTypes.string.isRequired,\n }).isRequired,\n onSortClick: PropTypes.func,\n sort: PropTypes.string,\n order: PropTypes.string,\n currentUserName: PropTypes.string.isRequired,\n filterStormClick: PropTypes.func,\n filterStorm: PropTypes.bool,\n showStormFilter: PropTypes.bool,\n};\n\nSketchOrderTable.defaultProps = {\n showProjectName: false,\n showAddress: false,\n showOrganizationName: false,\n showCompletedDate: false,\n showReviewer: false,\n showRequester: false,\n showSketchTech: false,\n showStatus: false,\n showCost: false,\n showDueDate: false,\n showLinksToSupportDashboard: false,\n showCreatedAtTime: false,\n showLastUpdatedAtTime: false,\n showTimeSinceRequested: false,\n canFilter: false,\n numberOfStatusFilters: 0,\n numberOfOrganizationFilters: 0,\n numberOfOwnerFilters: 0,\n canFilterByOrganization: false,\n canFilterByRequester: false,\n canFilterByOwner: false,\n isFetching: false,\n filterStorm: false,\n showStormFilter: false,\n};\n\nexport default withRouter(withStyles(style)(SketchOrderTable));\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport queryString from \"query-string\";\nimport Paper from '@material-ui/core/Paper';\nimport List from '@material-ui/core/List';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport Typography from '@material-ui/core/Typography';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport dateformat from 'dateformat';\nimport { withStyles } from '@material-ui/core/styles';\nimport IconButton from \"@material-ui/core/IconButton\";\nimport { FilterList, CloudOff, Cloud } from \"@material-ui/icons\";\nimport Badge from \"@material-ui/core/Badge\";\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport { withRouter } from 'react-router-dom';\nimport Pager from \"../Pager/Pager\";\nimport SketchOrderStatusChip from \"../SketchOrderStatusChip/SketchOrderStatusChip\";\nimport ChooseSketchOrderFilterDialog from \"../ChooseSketchOrderFilterDialog\";\nimport StatusSketchOrderFilterDialog from '../StatusSketchOrderFilterDialog';\nimport OrganizationSketchOrderFilterDialog from \"../../containers/OrganizationSketchOrderFilterDialog\";\nimport RequesterSketchOrderFilterDialog from '../../containers/RequesterSketchOrderFilterDialog';\nimport OwnerSketchOrderFilterDialog from '../../containers/OwnerSketchOrderFilterDialog';\n\nconst style = () => ({\n flex: {\n flexGrow: 1,\n },\n listItemTitle: {\n fontWeight: 'bold',\n },\n loadingDialog: {\n width: 30,\n margin: 'auto'\n }\n});\n\nclass SketchOrderList extends Component {\n state = {\n chooseFilterDialogOpen: false,\n statusFilterDialogOpen: false,\n organizationFilterDialogOpen: false,\n requesterFilterDialogOpen: false,\n ownerFilterDialogOpen: false,\n };\n\n openFilterSketchOrderDialog = () => {\n this.setState({ chooseFilterDialogOpen: true });\n };\n\n closeFilterSketchOrderDialog = () => {\n this.setState({ chooseFilterDialogOpen: false });\n };\n\n applyFilter = (name, value, clearFilters = false) => {\n let newQueryString;\n if (clearFilters) {\n const newQueryParam = {\n [name]: value,\n };\n newQueryString = queryString.stringify(newQueryParam);\n } else {\n const queryParams = queryString.parse(this.props.location.search);\n const newQueryParams = Object.assign({}, queryParams, {\n [name]: value,\n });\n\n newQueryString = queryString.stringify(newQueryParams);\n }\n this.props.history.push(`${this.props.location.pathname}?${newQueryString}`);\n };\n\n openStatusFilterDialog = () => {\n this.setState({\n chooseFilterDialogOpen: false,\n statusFilterDialogOpen: true\n });\n };\n\n applyStatusFilters = (statuses) => {\n const statusIds = statuses.map((status) => {\n return status.id;\n });\n\n this.applyFilter('statusIds', statusIds);\n\n this.closeStatusFilterDialog();\n };\n\n closeStatusFilterDialog = () => {\n this.setState({\n chooseFilterDialogOpen: true,\n statusFilterDialogOpen: false\n });\n };\n\n openOrganizationFilterDialog = () => {\n this.setState({\n chooseFilterDialogOpen: false,\n organizationFilterDialogOpen: true\n });\n };\n\n applyOrganizationFilter = (organizationId) => {\n this.applyFilter('organizationId', organizationId);\n\n this.closeOrganizationFilterDialog();\n };\n\n closeOrganizationFilterDialog = () => {\n this.setState({\n chooseFilterDialogOpen: true,\n organizationFilterDialogOpen: false,\n });\n };\n\n openRequesterFilterDialog = () => {\n this.setState({\n chooseFilterDialogOpen: false,\n requesterFilterDialogOpen: true\n });\n };\n\n applyRequesterFilter = (userId) => {\n this.applyFilter('requesterUserId', userId, true);\n\n this.closeRequesterFilterDialog();\n };\n\n closeRequesterFilterDialog = () => {\n this.setState({\n chooseFilterDialogOpen: true,\n requesterFilterDialogOpen: false,\n });\n };\n\n openOwnerFilterDialog = () => {\n this.setState({\n chooseFilterDialogOpen: false,\n ownerFilterDialogOpen: true\n });\n };\n\n applyOwnerFilter = (userId) => {\n this.applyFilter('ownerUserId', userId, true);\n\n this.closeOwnerFilterDialog();\n };\n\n closeOwnerFilterDialog = () => {\n this.setState({\n chooseFilterDialogOpen: true,\n ownerFilterDialogOpen: false,\n });\n };\n\n renderTitle = () => {\n if (this.props.totalOrders === 1)\n return `${this.props.totalOrders} ${this.props.titlePrefix} Sketch Order`;\n\n return `${this.props.totalOrders} ${this.props.titlePrefix} Sketch Orders`;\n };\n\n goToOrder = (order) => {\n this.props.history.push(`/orders/${order.id}`);\n };\n\n renderSketchOrderListItem = id => {\n const order = this.props.sketchOrders[id];\n return (\n this.goToOrder(order)}\n >\n \n \n #{order.id}\n \n {\n this.props.showOrganizationName &&\n \n {order.organization.name}\n \n }\n \n {order.projectName}\n \n \n DUE DATE: {order.dueDate}\n \n
\n }\n secondary={dateformat(order.requestedDate, 'mmm d, yyyy h:MM TT')}\n />\n {\n this.props.showStatus &&\n \n }\n \n );\n }\n\n determineNumberOfFilersBeingApplied = () => {\n if (this.props.numberOfRequesterFilters) {\n return this.props.numberOfRequesterFilters;\n }\n\n return this.props.numberOfStatusFilters + this.props.numberOfOrganizationFilters;\n };\n\n render() {\n const numberOfFiltersApplied = this.determineNumberOfFilersBeingApplied();\n\n return (\n
\n \n \n \n {this.renderTitle()}\n \n {\n (this.props.canFilter && numberOfFiltersApplied === 0) &&\n \n \n \n }\n {\n this.props.filterStorm ?\n \n \n :\n \n \n \n }\n {\n (this.props.canFilter && numberOfFiltersApplied > 0) &&\n \n \n \n \n \n }\n \n \n {\n this.props.isFetching &&\n
\n \n
\n }\n \n {this.props.sketchOrderIds.map(this.renderSketchOrderListItem)}\n \n \n
\n \n \n \n\n \n\n \n\n \n\n \n\n \n
\n )\n }\n}\n\nSketchOrderList.propTypes = {\n titlePrefix: PropTypes.string,\n showOrganizationName: PropTypes.bool,\n showStatus: PropTypes.bool,\n canFilter: PropTypes.bool,\n numberOfStatusFilters: PropTypes.number,\n numberOfOrganizationFilters: PropTypes.number,\n numberOfRequesterFilters: PropTypes.number,\n numberOfOwnerFilters: PropTypes.number,\n canFilterByOrganization: PropTypes.bool,\n canFilterByRequester: PropTypes.bool,\n canFilterByOwner: PropTypes.bool,\n sketchOrders: PropTypes.shape({\n sketchOrder: PropTypes.shape({\n id: PropTypes.number.isRequired,\n projectName: PropTypes.string,\n requestedDate: PropTypes.string.isRequired,\n address: PropTypes.string,\n city: PropTypes.string,\n region: PropTypes.string,\n postCode: PropTypes.string,\n country: PropTypes.string,\n dueDate: PropTypes.string,\n sketchOrderStatus: PropTypes.string.isRequired,\n organization: PropTypes.shape({\n name: PropTypes.string.isRequired,\n }).isRequired,\n })\n }).isRequired,\n totalOrders: PropTypes.number.isRequired,\n currentPage: PropTypes.number.isRequired,\n totalPages: PropTypes.number.isRequired,\n onNextPageClick: PropTypes.func.isRequired,\n onPrevPageClick: PropTypes.func.isRequired,\n isFetching: PropTypes.bool.isRequired,\n classes: PropTypes.shape({\n flex: PropTypes.string.isRequired,\n listItemTitle: PropTypes.string.isRequired,\n loadingDialog: PropTypes.string.isRequired,\n }).isRequired,\n history: PropTypes.shape({\n push: PropTypes.func.isRequired,\n }).isRequired,\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n search: PropTypes.string.isRequired,\n }).isRequired,\n filterStormClick: PropTypes.func,\n filterStorm: PropTypes.bool,\n showStormFilter: PropTypes.bool,\n};\n\nSketchOrderList.defaultProps = {\n titlePrefix: '',\n showOrganizationName: false,\n showStatus: false,\n canFilter: false,\n numberOfStatusFilters: 0,\n numberOfOrganizationFilters: 0,\n numberOfRequesterFilters: 0,\n numberOfOwnerFilters: 0,\n canFilterByOrganization: false,\n canFilterByRequester: false,\n canFilterByOwner: false,\n filterStorm: false,\n showStormFilter: false,\n};\n\nexport default withRouter(withStyles(style)(SketchOrderList));","// @flow\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport Hidden from '@material-ui/core/Hidden';\nimport { getSketchOrders } from '../../actions/sketchOrdersActions';\nimport SketchOrderTable from '../../components/SketchOrderTable/SketchOrderTable';\nimport { SketchOrderStatusId } from '../../lib/sketchOrderStatuses';\nimport SketchOrderList from '../../components/SketchOrderList/SketchOrderList';\nimport { SketchOrderSortParameter as sketchOrderSortParameter } from '../../lib/sketchOrderSortParameters';\nimport { OrderParameter as orderParameter } from '../../lib/OrderParameters';\nimport OrdersTabs from '../OrdersTabs';\n\ntype SketchOrderSortParameter = $Keys;\ntype OrderParameter = $Keys;\ntype CurrentUserRoles = {\n isAdmin: boolean,\n isSketchOsAdmin: boolean,\n isSketchTech: boolean,\n};\ntype ProvidedProps = {\n dispatch: Function,\n sketchOrders: Object,\n sketchOrderIds: Array,\n totalResults: number,\n currentPage: number,\n totalPages: number,\n isFetching: boolean,\n currentUserRoles: CurrentUserRoles,\n currentUserName: string,\n};\ntype State = {\n sort: SketchOrderSortParameter,\n order: OrderParameter,\n};\n\nexport class QueuedSketchOrders extends Component {\n state = {\n sort: sketchOrderSortParameter.DueDate,\n order: orderParameter.Ascending,\n filterStorm: false,\n };\n\n getSketchOrders = async (page: number = 1, sortBy: SketchOrderSortParameter = this.state.sort, orderBy: OrderParameter = this.state.order) => {\n await this.props.dispatch(getSketchOrders(\n page,\n [\n SketchOrderStatusId.Pending,\n SketchOrderStatusId.Queued,\n SketchOrderStatusId.RevisionRequested,\n ],\n null,\n null,\n orderBy,\n sortBy,\n\n null,\n false,\n null,\n this.state.filterStorm,\n ));\n };\n\n async componentDidMount() {\n await this.getSketchOrders();\n }\n\n getNextPage = async () => {\n const nextPage = this.props.currentPage + 1;\n await this.getSketchOrders(nextPage);\n };\n\n getPrevPage = async () => {\n const prevPage = this.props.currentPage - 1;\n await this.getSketchOrders(prevPage);\n };\n\n handleOnSortClick = (sort: SketchOrderSortParameter, order: OrderParameter) => {\n this.setState({\n sort,\n order,\n }, async () => {\n await this.getSketchOrders();\n });\n };\n\n handleStormFilterClick = () => {\n this.setState({\n filterStorm: !this.state.filterStorm,\n }, async () => {\n await this.getSketchOrders();\n });\n };\n\n render() {\n const isSketchOsAdmin = () => this.props.currentUserRoles.isAdmin || this.props.currentUserRoles.isSketchOsAdmin;\n\n return (\n
\n \n \n \n \n \n \n
\n );\n }\n}\n\n\n\nconst mapStateToProps = (state) => {\n const { sketchOrders: sketchOrdersStore, currentUserRoles, currentUser } = state;\n const {\n sketchOrders,\n totalResults,\n currentPage,\n totalPages,\n isFetching,\n ids: sketchOrderIds,\n } = sketchOrdersStore;\n const { userName: currentUserName } = currentUser;\n\n return {\n sketchOrders,\n sketchOrderIds,\n totalResults,\n currentPage,\n totalPages,\n currentUserRoles,\n isFetching,\n currentUserName,\n }\n};\n\nexport default connect(mapStateToProps)(QueuedSketchOrders);\n","import SketchOrders from \"./QueuedSketchOrders\";\n\nexport default SketchOrders;\n","// @flow\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport Hidden from '@material-ui/core/Hidden';\nimport { getSketchOrders } from '../../actions/sketchOrdersActions';\nimport SketchOrderTable from '../../components/SketchOrderTable/SketchOrderTable';\nimport { SketchOrderStatusId } from '../../lib/sketchOrderStatuses';\nimport SketchOrderList from '../../components/SketchOrderList/SketchOrderList';\nimport { SketchOrderSortParameter as sketchOrderSortParameter } from '../../lib/sketchOrderSortParameters';\nimport { OrderParameter as orderParameter } from '../../lib/OrderParameters';\nimport OrdersTabs from '../OrdersTabs';\n\ntype SketchOrderSortParameter = $Keys;\ntype OrderParameter = $Keys;\ntype CurrentUserRoles = {\n isAdmin: boolean,\n isSketchOsAdmin: boolean,\n isSketchTech: boolean,\n};\ntype ProvidedProps = {\n dispatch: Function,\n sketchOrders: Object,\n sketchOrderIds: Array,\n totalResults: number,\n currentPage: number,\n totalPages: number,\n isFetching: boolean,\n currentUserRoles: CurrentUserRoles,\n currentUserName: string,\n};\ntype State = {\n sort: SketchOrderSortParameter,\n order: OrderParameter,\n};\n\nexport class QueuedSketchOrders extends Component {\n state = {\n sort: sketchOrderSortParameter.DueDate,\n order: orderParameter.Ascending,\n filterStorm: false,\n };\n\n getSketchOrders = async (page: number = 1) => {\n await this.props.dispatch(getSketchOrders(\n page,\n [\n SketchOrderStatusId.Pending,\n SketchOrderStatusId.Queued\n ],\n null,\n null,\n this.state.order,\n this.state.sort,\n true,\n null,\n this.state.filterStorm,\n ));\n };\n\n async componentDidMount() {\n await this.getSketchOrders();\n }\n\n getNextPage = async () => {\n const nextPage = this.props.currentPage + 1;\n await this.getSketchOrders(nextPage);\n };\n\n getPrevPage = async () => {\n const prevPage = this.props.currentPage - 1;\n await this.getSketchOrders(prevPage);\n };\n\n handleOnSortClick = (sort: SketchOrderSortParameter, order: OrderParameter) => {\n this.setState({\n sort,\n order,\n }, async () => {\n await this.getSketchOrders();\n });\n };\n \n handleStormFilterClick = () => {\n this.setState({\n filterStorm: !this.state.filterStorm,\n }, async () => {\n await this.getSketchOrders();\n });\n };\n\n\n render() {\n const isSketchOsAdmin = () => this.props.currentUserRoles.isAdmin || this.props.currentUserRoles.isSketchOsAdmin;\n\n return (\n
\n \n \n \n \n \n \n
\n );\n }\n}\n\n\n\nconst mapStateToProps = (state) => {\n const { sketchOrders: sketchOrdersStore, currentUserRoles, currentUser } = state;\n const {\n sketchOrders,\n totalResults,\n currentPage,\n totalPages,\n isFetching,\n ids: sketchOrderIds,\n } = sketchOrdersStore;\n const { userName: currentUserName } = currentUser;\n return {\n sketchOrders,\n sketchOrderIds,\n totalResults,\n currentPage,\n totalPages,\n currentUserRoles,\n isFetching,\n currentUserName,\n }\n};\n\nexport default connect(mapStateToProps)(QueuedSketchOrders);\n","import QueuedSketchOrdersVendor from './QueuedVendorSketchOrders';\n\nexport default QueuedSketchOrdersVendor;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport Button from '@material-ui/core/Button';\n\nconst ForbiddenDialog = (props) => {\n return (\n \n \n Forbidden\n \n \n \n You are not allowed to access this resource.\n \n \n \n \n Ok\n \n \n \n );\n};\n\nForbiddenDialog.propTypes = {\n open: PropTypes.bool,\n onDismissClick: PropTypes.func,\n};\n\nForbiddenDialog.defaultProps = {\n open: true,\n onDismissClick: () => {},\n};\n\nexport default ForbiddenDialog;\n","import React from 'react';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport Grid from \"@material-ui/core/Grid\";\n\nconst LoadingDialog = (props) => {\n return (\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default LoadingDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport Button from '@material-ui/core/Button';\n\nconst SomethingWentWrongDialog = (props) => (\n \n \n Something Went Wrong!\n \n \n \n Please try again later.\n \n \n \n \n Log Out\n \n \n Reload\n \n \n \n);\n\nSomethingWentWrongDialog.propTypes = {\n open: PropTypes.bool,\n onReloadClick: PropTypes.func,\n onLogOutClick: PropTypes.func,\n};\n\nSomethingWentWrongDialog.defaultProps = {\n open: true,\n onReloadClick: () => {},\n onLogOutClick: () => {},\n};\n\nexport default SomethingWentWrongDialog;\n","import SomethingWentWrongDialog from './SomethingWentWrongDialog';\n\nexport default SomethingWentWrongDialog;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { Route, Redirect } from 'react-router-dom';\nimport { withRouter } from 'react-router-dom';\nimport ForbiddenDialog from \"../../components/ForbiddenDialog/ForbiddenDialog\";\nimport { logout } from \"../../actions/authActions\";\nimport LoadingDialog from \"../../components/LoadingDialog/LoadingDialog\";\nimport SomethingWentWrongDialog from '../../components/SomethingWentWrongDialog';\n\nexport class ProtectedRoute extends Component {\n logOut = () => {\n this.props.dispatch(logout());\n };\n\n goHome = () => {\n this.props.history.push('/');\n };\n\n reload = () => {\n window.location.reload();\n };\n\n render() {\n if (!this.props.isAuthenticated) {\n return \n }\n\n // If we are still getting the current user, show a progress indicator\n if (this.props.currentUser.isFetching) {\n return \n }\n\n if (this.props.currentUser.active === null) {\n return \n }\n\n if (this.props.currentUser.active === false) {\n return \n }\n\n // If we are still getting the current user roles, show a progress indicator\n if (this.props.currentUserRoles.isFetching) {\n return \n }\n\n if (this.props.currentUserRoles.isAdmin === null ||\n this.props.currentUserRoles.isSketchTech === null ||\n this.props.currentUserRoles.isSketchOsAdmin === null) {\n return \n }\n\n if (\n this.props.currentUserRoles.isAdmin === false &&\n this.props.currentUserRoles.isSketchOsAdmin === false &&\n this.props.currentUserRoles.isSketchTech === false\n ) {\n return \n }\n\n if (this.props.sketchOsAdminRequired && (!this.props.currentUserRoles.isAdmin && !this.props.currentUserRoles.isSketchOsAdmin)) {\n return \n }\n\n return \n }\n}\n\nProtectedRoute.propTypes = {\n dispatch: PropTypes.func.isRequired,\n isAuthenticated: PropTypes.bool.isRequired,\n path: PropTypes.string.isRequired,\n component: PropTypes.func.isRequired,\n exact: PropTypes.bool,\n sketchOsAdminRequired: PropTypes.bool,\n currentUser: PropTypes.shape({\n isFetching: PropTypes.bool.isRequired,\n userName: PropTypes.string,\n firstName: PropTypes.string,\n lastName: PropTypes.string,\n active: PropTypes.bool,\n }).isRequired,\n currentUserRoles: PropTypes.shape({\n isFetching: PropTypes.bool.isRequired,\n isAdmin: PropTypes.bool.isRequired,\n isSketchOsAdmin: PropTypes.bool.isRequired,\n isSketchTech: PropTypes.bool.isRequired,\n }).isRequired,\n history: PropTypes.shape({\n push: PropTypes.func.isRequired,\n }).isRequired,\n};\n\nPropTypes.defaultProps = {\n exact: false,\n sketchOsAdminRequired: false,\n};\n\nconst mapStateToProps = (state) => {\n const { auth, currentUser, currentUserRoles } = state;\n const { isAuthenticated } = auth;\n\n return {\n isAuthenticated,\n currentUser,\n currentUserRoles,\n }\n};\n\nexport default withRouter(connect(mapStateToProps)(ProtectedRoute));\n","import ProtectedRoute from \"./ProtectedRoute\";\n\nexport default ProtectedRoute;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport queryString from 'query-string';\nimport Hidden from \"@material-ui/core/Hidden\";\nimport { OrderParameter } from \"../../lib/OrderParameters\";\nimport { SketchOrderSortParameter } from \"../../lib/sketchOrderSortParameters\";\nimport { getOwnersSketchOrders, getSketchOrders } from \"../../actions/sketchOrdersActions\";\nimport SketchOrderTable from \"../../components/SketchOrderTable/SketchOrderTable\";\nimport SketchOrderList from \"../../components/SketchOrderList/SketchOrderList\";\nimport { SketchOrderSortParameter as sketchOrderSortParameter } from '../../lib/sketchOrderSortParameters';\nimport { OrderParameter as orderParameter } from '../../lib/OrderParameters';\n\nexport class AllSketchOrders extends Component {\n state = {\n sort: sketchOrderSortParameter.DueDate,\n order: orderParameter.Ascending,\n canSort: true,\n filterStorm: false,\n };\n\n getSketchOrders = async (page = 1) => {\n const isAdminOrSketchOSAdmin = (this.props.currentUserRoles.isAdmin || this.props.currentUserRoles.isSketchOsAdmin);\n\n const queryParams = queryString.parse(this.props.location.search);\n\n // If we have the owner filter on, go get the owner's sketch orders\n if (queryParams.ownerUserId) {\n // This call does not support sorting\n this.setState({\n canSort: false,\n });\n await this.props.dispatch(getOwnersSketchOrders(queryParams.ownerUserId, page));\n return;\n }\n\n const rushOrders = queryParams.rush;\n const metalRoof = queryParams.metalRoof;\n\n const {\n statusIds,\n organizationId,\n requesterUserId\n } = queryParams;\n let statusesToFilterBy;\n if (statusIds && !Array.isArray(statusIds)) {\n statusesToFilterBy = [];\n statusesToFilterBy.push(statusIds);\n } else {\n statusesToFilterBy = statusIds;\n }\n\n let ordering;\n let sorting;\n if (!this.state.order) {\n ordering = isAdminOrSketchOSAdmin ? OrderParameter.Ascending : null;\n } else {\n ordering = this.state.order;\n }\n if (!this.state.sort) {\n sorting = isAdminOrSketchOSAdmin ? SketchOrderSortParameter.AdminPriority : null;\n } else {\n sorting = this.state.sort;\n }\n\n // Make sure to turn sorting on\n this.setState({\n canSort: true,\n });\n await this.props.dispatch(\n getSketchOrders(\n page,\n statusesToFilterBy,\n null,\n organizationId,\n ordering,\n sorting,\n null,\n requesterUserId,\n this.state.filterStorm,\n rushOrders,\n metalRoof\n )\n );\n };\n\n async componentDidMount() {\n await this.getSketchOrders();\n }\n\n async componentDidUpdate(prevProps) {\n if (prevProps.location.search !== this.props.location.search) {\n await this.getSketchOrders();\n }\n };\n\n getNextPage = async () => {\n const nextPage = this.props.currentPage + 1;\n await this.getSketchOrders(nextPage);\n };\n\n getPrevPage = async () => {\n const prevPage = this.props.currentPage - 1;\n await this.getSketchOrders(prevPage);\n };\n\n handleOnSortClick = (sort, order) => {\n this.setState({\n sort,\n order,\n }, async () => {\n await this.getSketchOrders();\n });\n };\n\n handleStormFilterClick = () => {\n this.setState({\n filterStorm: !this.state.filterStorm,\n }, async () => {\n await this.getSketchOrders();\n });\n };\n\n render() {\n const isSketchOsAdmin = () => this.props.currentUserRoles.isAdmin || this.props.currentUserRoles.isSketchOsAdmin;\n\n const queryParams = queryString.parse(this.props.location.search);\n const {\n statusIds,\n organizationId,\n requesterUserId,\n ownerUserId,\n } = queryParams;\n\n const numberOfStatusFilters = () => {\n if (!statusIds) {\n return 0;\n }\n\n if (!Array.isArray(statusIds)) {\n return 1;\n }\n\n return statusIds.length;\n };\n const numberOfOrganizationFilters = (organizationId) ? 1 : 0;\n const numberOfRequesterFilters = (requesterUserId) ? 1 : 0;\n const numberOfOwnerFilters = (ownerUserId) ? 1 : 0;\n\n return (\n
\n \n \n \n \n \n \n
\n );\n }\n}\n\nAllSketchOrders.propTypes = {\n dispatch: PropTypes.func.isRequired,\n location: PropTypes.shape({\n search: PropTypes.string.isRequired,\n }).isRequired,\n sketchOrders: PropTypes.shape({\n sketchOrder: PropTypes.shape({\n id: PropTypes.number.isRequired,\n projectName: PropTypes.string,\n requestedDate: PropTypes.string,\n address: PropTypes.string,\n city: PropTypes.string,\n region: PropTypes.string,\n postCode: PropTypes.string,\n country: PropTypes.string,\n sketchOrderStatus: PropTypes.string,\n cost: PropTypes.number,\n reviewer: PropTypes.string,\n })\n }).isRequired,\n totalResults: PropTypes.number.isRequired,\n currentPage: PropTypes.number.isRequired,\n totalPages: PropTypes.number.isRequired,\n currentUserRoles: PropTypes.shape({\n isAdmin: PropTypes.bool.isRequired,\n isSketchOsAdmin: PropTypes.bool.isRequired,\n isSketchTech: PropTypes.bool.isRequired,\n }),\n isFetching: PropTypes.bool.isRequired,\n currentUserName: PropTypes.string.isRequired,\n};\n\nconst mapStateToProps = (state) => {\n const {\n sketchOrders: sketchOrdersStore,\n currentUserRoles,\n currentUser,\n } = state;\n const {\n sketchOrders,\n totalResults,\n currentPage,\n totalPages,\n isFetching,\n ids: sketchOrderIds,\n } = sketchOrdersStore;\n const { userName: currentUserName } = currentUser;\n\n return {\n sketchOrders,\n totalResults,\n currentPage,\n totalPages,\n currentUserRoles,\n isFetching,\n currentUserName,\n sketchOrderIds,\n }\n};\n\nexport default connect(mapStateToProps)(AllSketchOrders);\n","import AllSketchOrders from \"./AllSketchOrders\";\n\nexport default AllSketchOrders;\n","// @flow\n// Importing React as a namespace instead of using the default import to get access to the react types.\n// https://flow.org/en/docs/react/types/\nimport * as React from 'react';\nimport Paper from \"@material-ui/core/Paper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport CircularProgress from \"@material-ui/core/CircularProgress\";\nimport Typography from \"@material-ui/core/Typography\";\n\ntype Props = {\n title: string,\n cardStyle: Object,\n isFetching: boolean,\n total: number,\n onClick: Function,\n icon: React.Node,\n};\n\nconst style = {\n rightAlign: {\n textAlign: 'right',\n }\n};\n\nconst DashboardCard = (props: Props) => (\n \n \n \n \n {props.icon}\n \n \n {\n props.isFetching &&\n \n }\n {\n !props.isFetching &&\n \n {props.total}\n \n }\n \n \n \n {props.title}\n \n \n \n \n \n);\n\nDashboardCard.defaultProps = {\n isFetching: false,\n};\n\nexport default DashboardCard;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Grid from '@material-ui/core/Grid';\nimport {\n lightBlue,\n amber,\n lightGreen,\n red,\n purple,\n} from '@material-ui/core/colors';\nimport {\n Storage,\n SupervisorAccount,\n Timelapse,\n Warning,\n Store,\n} from '@material-ui/icons';\nimport withOrdersRouter from '../withOrdersRouter';\nimport DashboardCard from \"../DashboardCard/DashboardCard\";\n\n\nconst style = {\n pendingOrdersCard: {\n padding: 24,\n backgroundColor: lightBlue[500],\n color: '#FFFFFF',\n cursor: 'pointer',\n },\n vendorQueueCard: {\n padding: 24,\n backgroundColor: purple[500],\n color: '#FFFFFF',\n cursor: 'pointer',\n },\n inProgressOrdersCard: {\n padding: 24,\n backgroundColor: amber[500],\n color: '#FFFFFF',\n cursor: 'pointer',\n },\n pendingReviewOrdersCard: {\n padding: 24,\n backgroundColor: lightGreen[500],\n color: '#FFFFFF',\n cursor: 'pointer',\n },\n exceptionOrdersCard: {\n padding: 24,\n backgroundColor: red[500],\n color: '#FFFFFF',\n cursor: 'pointer',\n },\n icon: {\n fontSize: 48,\n fontWeight: 400,\n }\n};\nexport class Dashboard extends Component {\n render() {\n return (\n
\n \n {/*Pending Orders Card*/}\n \n }\n />\n\n {/* Vendor queue card */}\n \n }\n />\n\n {/* My Orders In Progress Card*/}\n \n }\n />\n\n {/*Pending Review Orders Card*/}\n {\n this.props.isSketchOsAdmin &&\n \n }\n />\n }\n\n {/*Needs Attention Card*/}\n {\n this.props.isSketchOsAdmin &&\n \n }\n />\n }\n\n {/*Billing Failed Orders*/}\n {\n this.props.isSketchOsAdmin &&\n \n }\n />\n }\n\n {/*Rush Orders Pending / In Progress*/}\n {\n \n }\n />\n }\n \n
\n );\n }\n}\n\nDashboard.propTypes = {\n totalOrdersInTheQueue: PropTypes.number.isRequired,\n isFetchingOrdersInTheQueue: PropTypes.bool.isRequired,\n totalOrdersInTheVendorQueue: PropTypes.number.isRequired,\n isFetchingOrdersInTheVendorQueue: PropTypes.bool.isRequired,\n totalOrdersPendingSketchOsAdmin: PropTypes.number.isRequired,\n isFetchingOrdersPendingSketchOsAdmin: PropTypes.bool.isRequired,\n totalExceptionOrders: PropTypes.number.isRequired,\n isFetchingExceptionOrders: PropTypes.bool.isRequired,\n totalMyOrdersInProgress: PropTypes.number.isRequired,\n isFetchingMyOrdersInProgress: PropTypes.bool.isRequired,\n totalBillingFailedOrders: PropTypes.number.isRequired,\n totalRushOrders: PropTypes.number.isRequired,\n filteredRushOrders: PropTypes.number.isRequired,\n isFetchingBillingFailedOrders: PropTypes.bool.isRequired,\n goToPendingOrders: PropTypes.func.isRequired,\n goToPendingVendorOrders: PropTypes.func.isRequired,\n goToMyOrdersInProgress: PropTypes.func.isRequired,\n goToOrdersPendingSketchOsAdmin: PropTypes.func.isRequired,\n goToOrdersWithException: PropTypes.func.isRequired,\n goToBillingFailedOrders: PropTypes.func.isRequired,\n goToRushOrders: PropTypes.func.isRequired,\n isFetchingCounts: PropTypes.bool.isRequired,\n};\n\nexport default withOrdersRouter(Dashboard);\n","import Dashboard from \"./Dashboard\";\n\nexport default Dashboard;\n","import React, {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport Hidden from '@material-ui/core/Hidden';\nimport { getSketchOrders } from \"../../actions/sketchOrdersActions\";\nimport SketchOrderTable from \"../../components/SketchOrderTable/SketchOrderTable\";\nimport SketchOrderList from \"../../components/SketchOrderList/SketchOrderList\";\nimport queryString from \"query-string\";\nimport {SketchOrderSortParameter} from \"../../lib/sketchOrderSortParameters\";\nimport {OrderParameter} from \"../../lib/OrderParameters\";\nimport OrdersTabs from \"../OrdersTabs\";\n\nexport class MyAssignedSketchOrders extends Component {\n state = {\n sort: SketchOrderSortParameter.DueDate,\n order: OrderParameter.Ascending\n };\n\n getSketchOrders = async (page = 1) => {\n const queryParams = queryString.parse(this.props.location.search);\n\n const {\n statusIds,\n organizationId\n } = queryParams;\n let statusesToFilterBy;\n if (statusIds && !Array.isArray(statusIds)) {\n statusesToFilterBy = [];\n statusesToFilterBy.push(statusIds);\n } else {\n statusesToFilterBy = statusIds;\n }\n await this.props.dispatch(getSketchOrders(page, statusesToFilterBy, [this.props.currentUser.userId], organizationId, this.state.order, this.state.sort));\n };\n\n async componentDidMount() {\n await this.getSketchOrders();\n }\n\n async componentDidUpdate(prevProps) {\n if (prevProps.location.search !== this.props.location.search) {\n await this.getSketchOrders();\n }\n };\n\n getNextPage = async () => {\n const nextPage = this.props.currentPage + 1;\n await this.getSketchOrders(nextPage);\n };\n\n getPrevPage = async () => {\n const prevPage = this.props.currentPage - 1;\n await this.getSketchOrders(prevPage);\n };\n\n handleOnSortClick = (sort, order) => {\n this.setState({\n sort,\n order\n }, async () => {\n await this.getSketchOrders();\n });\n };\n\n render() {\n const isSketchOsAdmin = () => this.props.currentUserRoles.isAdmin || this.props.currentUserRoles.isSketchOsAdmin;\n\n const queryParams = queryString.parse(this.props.location.search);\n const {\n statusIds,\n organizationId,\n } = queryParams;\n\n const numberOfStatusFilters = () => {\n if (!statusIds) {\n return 0;\n }\n\n if (!Array.isArray(statusIds)) {\n return 1;\n }\n\n return statusIds.length;\n };\n const numberOfOrganizationFilters = (organizationId) ? 1 : 0;\n\n return (\n
\n \n \n \n \n \n \n
\n );\n }\n}\n\nMyAssignedSketchOrders.propTypes = {\n dispatch: PropTypes.func.isRequired,\n sketchOrders: PropTypes.shape({\n sketchOrder: PropTypes.shape({ \n id: PropTypes.number.isRequired,\n projectName: PropTypes.string,\n requestedDate: PropTypes.string.isRequired,\n address: PropTypes.string,\n city: PropTypes.string,\n region: PropTypes.string,\n postCode: PropTypes.string,\n country: PropTypes.string,\n })\n }).isRequired,\n totalResults: PropTypes.number.isRequired,\n currentPage: PropTypes.number.isRequired,\n totalPages: PropTypes.number.isRequired,\n currentUserRoles: PropTypes.shape({\n isAdmin: PropTypes.bool.isRequired,\n isSketchOsAdmin: PropTypes.bool.isRequired,\n isSketchTech: PropTypes.bool.isRequired,\n }).isRequired,\n currentUser: PropTypes.shape({\n userId: PropTypes.number.isRequired,\n userName: PropTypes.string.isRequired,\n }).isRequired,\n location: PropTypes.shape({\n search: PropTypes.string.isRequired,\n }).isRequired,\n isFetching: PropTypes.bool.isRequired,\n};\n\nconst mapStateToProps = (state) => {\n const {\n sketchOrders: sketchOrdersStore,\n currentUserRoles,\n currentUser\n } = state;\n const {\n sketchOrders,\n totalResults,\n currentPage,\n totalPages,\n isFetching,\n ids: sketchOrderIds,\n } = sketchOrdersStore;\n\n return {\n sketchOrders,\n totalResults,\n currentPage,\n totalPages,\n currentUserRoles,\n currentUser,\n isFetching,\n sketchOrderIds,\n }\n};\n\nexport default connect(mapStateToProps)(MyAssignedSketchOrders);\n","import MyAssignedSketchOrders from \"./MyAssignedSketchOrders\";\n\nexport default MyAssignedSketchOrders;\n","import React, {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport Card from '@material-ui/core/Card';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport CardContent from '@material-ui/core/CardContent';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Link } from 'react-router-dom';\n\nconst style = () => ({\n root: {\n maxWidth: 600,\n margin: 'auto',\n },\n});\n\nclass NoMatch extends Component {\n render() {\n return (\n \n \n \n \n Sorry. It seems likes this page does not exist. Click here to go to home.\n \n \n \n );\n }\n}\n\nNoMatch.propTypes = {\n history: PropTypes.shape({\n push: PropTypes.func.isRequired,\n }).isRequired,\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nexport default withStyles(style)(NoMatch);","const featureIsEnabled = flagName => (process.env.REACT_APP_FEATURE_FLAGS || '').includes(flagName);\n\nconst featureFlags = {\n sketchOrderNotifications: featureIsEnabled('sketchOrderNotifications'),\n sketchOrderDeliveryOptions: featureIsEnabled('sketchOrderDeliveryOptions'),\n vexcelImagery: featureIsEnabled('vexcelImagery'),\n parcelLines: featureIsEnabled('parcelLines'),\n};\n\nexport default featureFlags;\n","import { CALL_API } from '../middleware/api';\nimport {\n GET_SKETCH_ORDER_NOTIFICATIONS_REQUEST,\n GET_SKETCH_ORDER_NOTIFICATIONS_SUCCESS,\n GET_SKETCH_ORDER_NOTIFICATIONS_FAILURE,\n} from './actionTypes';\nimport SketchAdminSketchOrderClient from '../lib/apiClients/roofSnapApiClient/sketchAdminSketchOrderClient';\n\nexport const getNotifications = (sketchOrderId) => {\n const client = new SketchAdminSketchOrderClient('v2');\n const request = client.getNotifications;\n const params = {\n sketchOrderId,\n }\n return {\n [CALL_API]: {\n types: [\n GET_SKETCH_ORDER_NOTIFICATIONS_REQUEST,\n GET_SKETCH_ORDER_NOTIFICATIONS_SUCCESS,\n GET_SKETCH_ORDER_NOTIFICATIONS_FAILURE,\n ],\n request,\n params,\n }\n }\n};\n","import RoofSnapApiClient from './roofSnapApiClient';\n\nconst baseUrl = 'notificationtemplates';\n\nclass NotificationTemplatesClient extends RoofSnapApiClient {\n async getNotificationTemplates(params) {\n const { queryParams } = params;\n try {\n const url = `${baseUrl}${queryParams}`;\n return await super.get(url);\n } catch (error) {\n return Promise.reject(error);\n }\n }\n}\n\nexport default NotificationTemplatesClient;\n","import { CALL_API } from '../middleware/api';\nimport {\n GET_NOTIFICATION_TEMPLATES_REQUEST,\n GET_NOTIFICATION_TEMPLATES_SUCCESS,\n GET_NOTIFICATION_TEMPLATES_FAILURE,\n} from './actionTypes';\nimport NotificationTemplatesClient from '../lib/apiClients/roofSnapApiClient/notificationTemplatesClient';\nimport QueryStringBuilder from '../lib/queryStringBuilder';\n\nexport const getNotificationTemplates = (page = 1) => {\n const client = new NotificationTemplatesClient('v1');\n const request = client.getNotificationTemplates;\n\n const queryStringBuilder = new QueryStringBuilder();\n queryStringBuilder.setQueryParameter('page', page);\n const queryParams = queryStringBuilder.buildQueryString();\n\n return {\n [CALL_API]: {\n types: [\n GET_NOTIFICATION_TEMPLATES_REQUEST,\n GET_NOTIFICATION_TEMPLATES_SUCCESS,\n GET_NOTIFICATION_TEMPLATES_FAILURE,\n ],\n request,\n params: {\n queryParams,\n },\n }\n }\n};\n","// @flow\n\nimport RoofSnapApiClient from \"./roofSnapApiClient\";\n\nconst baseUrl = 'projects';\n\ntype GetProjectParams = {\n id: string,\n};\n\ntype GetProjectDrawingSummaryParams = {\n id: string,\n};\n\nclass ProjectClient extends RoofSnapApiClient {\n async getProject(params: GetProjectParams) {\n const { id } = params;\n const url = `${baseUrl}/${id}`;\n return await super.get(url);\n }\n \n async getProjectDrawingSummary(params: GetProjectDrawingSummaryParams) {\n const { id } = params;\n const url = `${baseUrl}/${id}/projectdrawing/summary`;\n return await super.get(url);\n }\n}\n\nexport default ProjectClient;\n","import RoofSnapApiClient from './roofSnapApiClient';\n\nconst baseUrl = \"sketchordertiers\";\n\nclass SketchOrderTierClient extends RoofSnapApiClient {\n async getSketchOrderTier() {\n const sketchOrders = await super.get(baseUrl);\n return sketchOrders;\n }\n}\n\nexport default SketchOrderTierClient;\n","import SketchOrderTierClient from \"../lib/apiClients/roofSnapApiClient/sketchOrderTierClient\";\nimport { CALL_API } from \"../middleware/api\";\nimport {\n GET_SKETCH_ORDER_TIERS_FAILURE,\n GET_SKETCH_ORDER_TIERS_REQUEST,\n GET_SKETCH_ORDER_TIERS_SUCCESS\n} from \"./actionTypes\";\n\nexport const getSketchOrderTiers = () => {\n const sketchOrderTierClient = new SketchOrderTierClient('v1');\n const request = sketchOrderTierClient.getSketchOrderTier;\n\n return {\n [CALL_API]: {\n types: [\n GET_SKETCH_ORDER_TIERS_REQUEST,\n GET_SKETCH_ORDER_TIERS_SUCCESS,\n GET_SKETCH_ORDER_TIERS_FAILURE\n ],\n request\n }\n }\n};\n","// @flow\nimport React from 'react';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport MaterialUIIconButton from '@material-ui/core/IconButton';\nimport { withStyles } from '@material-ui/core/styles';\n\ntype Classes = {\n buttonWrapper: string\n}\n\ntype ProvidedProps = {\n classes: Classes\n}\n\ntype Props = {\n children: Node,\n disabled?: boolean,\n onClick?: Function,\n title?: string,\n disabledTitle?: string,\n className?: string,\n};\n\nconst styles = () => ({\n buttonWrapper: {\n display: 'inline-flex'\n }\n});\n\nconst IconButton = (props: Props & ProvidedProps) => {\n\n const button = (\n \n {props.children}\n \n );\n\n const title = (props.disabled && props.disabledTitle) ? props.disabledTitle : props.title;\n\n return (\n \n {\n (title) ? (\n \n \n { button }\n
\n \n ) : (\n button\n )\n }\n \n );\n}\n\nexport default withStyles(styles)(IconButton);\n","import IconButton from './IconButton';\n\n\nexport default IconButton;\n","// @flow\n// Importing React as a namespace instead of using the default import to get access to the react types.\n// https://flow.org/en/docs/react/types/\nimport * as React from 'react';\nimport Card from '@material-ui/core/Card';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport InfoIcon from '@material-ui/icons/Info';\nimport CheckCircleIcon from '@material-ui/icons/CheckCircle';\nimport WarningIcon from '@material-ui/icons/Warning';\nimport {\n red,\n lightBlue,\n green,\n} from '@material-ui/core/colors';\nimport CloseIcon from '@material-ui/icons/Close';\nimport IconButton from '../IconButton';\n\nconst AlertVariants = {\n info: 'info',\n success: 'success',\n error: 'error',\n};\n\ntype AlertData = {\n backgroundColor: ?string,\n icon: ?React.Node,\n textColor: ?string,\n}\n\nconst getAlertData = (variant: ?string): AlertData => {\n const textColor = '#FFFFFF';\n const iconStyle = {\n color: textColor,\n };\n\n switch (variant) {\n case AlertVariants.info:\n return {\n backgroundColor: lightBlue[500],\n icon: ,\n textColor,\n };\n case AlertVariants.success:\n return {\n backgroundColor: green[500],\n icon: ,\n textColor,\n };\n case AlertVariants.error:\n return {\n backgroundColor: red[500],\n icon: ,\n textColor,\n };\n default:\n return {\n backgroundColor: null,\n icon: null,\n textColor: null,\n };\n }\n};\n\ntype Props = {\n title: string,\n icon?: React.Node,\n message?: string,\n variant?: string,\n open?: boolean,\n onClick?: Function,\n onDismiss?: Function,\n maxWidth?: number,\n titleTypographyProps?: {\n variant: string,\n className: string,\n },\n subheaderTypographyProps?: {\n className: string,\n }\n}\n\nconst Alert = (props: Props) => {\n const alertData = getAlertData(props.variant);\n\n return (\n props.open &&\n \n \n \n \n }\n title={props.title}\n subheader={props.message}\n titleTypographyProps={{\n variant: 'title',\n style: {\n color: alertData.textColor,\n },\n ...props.titleTypographyProps,\n }}\n subheaderTypographyProps={{\n style: {\n color: alertData.textColor,\n },\n ...props.subheaderTypographyProps,\n }}\n />\n \n );\n};\n\nAlert.defaultProps = {\n title: '',\n message: '',\n icon: null,\n variant: null,\n open: false,\n onClick: () => {},\n onDismiss: () => {},\n titleTypographyProps: {},\n subheaderTypographyProps: {},\n};\n\nexport default Alert;","import Alert from './Alert'\n\nexport default Alert;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport Button from '@material-ui/core/Button';\n\nconst RoofSnapConfirmationDialog = (props) => {\n const handleConfirmClick = () => {\n props.onConfirmClick();\n props.onDismissClick();\n };\n\n return (\n \n \n {props.title}\n \n \n \n {props.message}\n \n {props.content}\n \n \n \n Dismiss\n \n \n {props.confirmButtonText}\n \n \n \n );\n};\n\nRoofSnapConfirmationDialog.propTypes = {\n title: PropTypes.string,\n message: PropTypes.string,\n open: PropTypes.bool.isRequired,\n onConfirmClick: PropTypes.func.isRequired,\n onDismissClick: PropTypes.func.isRequired,\n confirmButtonText: PropTypes.string,\n content: PropTypes.node,\n};\n\nRoofSnapConfirmationDialog.defaultProps = {\n confirmButtonText: 'Confirm',\n content: null,\n};\n\nexport default RoofSnapConfirmationDialog;","import RoofSnapConfirmationDialog from \"./RoofSnapConfirmationDialog\";\n\nexport default RoofSnapConfirmationDialog;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport SnackbarContent from '@material-ui/core/SnackbarContent';\nimport {\n green,\n red,\n} from '@material-ui/core/colors';\nimport {\n CheckCircle,\n Error\n} from '@material-ui/icons';\nimport { withStyles } from '@material-ui/core/styles';\n\nconst style = (theme) => ({\n successSnackbar: {\n backgroundColor: green[500],\n },\n errorSnackbar: {\n backgroundColor: red[500]\n },\n icon: {\n marginRight: theme.spacing(1),\n },\n message: {\n display: 'flex',\n alignItems: 'center',\n }\n});\n\nconst RoofSnapSnackBar = (props) => {\n\n const renderSnackbarContent = () => {\n switch (props.variant) {\n case 'success':\n return (\n \n \n {props.message}\n \n }\n />\n );\n case 'error':\n return (\n \n \n {props.message}\n \n }\n />\n );\n default:\n return (\n \n );\n }\n };\n\n return (\n \n {renderSnackbarContent()}\n \n );\n};\n\nRoofSnapSnackBar.propTypes = {\n variant: PropTypes.string.isRequired,\n message: PropTypes.string,\n onClose: PropTypes.func.isRequired,\n open: PropTypes.bool.isRequired,\n classes: PropTypes.shape({\n icon: PropTypes.string.isRequired,\n message: PropTypes.string.isRequired,\n successSnackbar: PropTypes.string.isRequired,\n errorSnackbar: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nexport default withStyles(style)(RoofSnapSnackBar);\n","import RoofSnapSnackBar from \"./RoofSnapSnackBar\";\n\nexport default RoofSnapSnackBar;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Select from 'react-select';\nimport Typography from '@material-ui/core/Typography';\nimport TextField from '@material-ui/core/TextField';\nimport Paper from '@material-ui/core/Paper';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport { withStyles } from '@material-ui/core/styles';\n\nconst Option = (props) => (\n \n {props.children}\n \n);\n\nconst inputComponent = ({inputRef, ...props}) => (\n
\n);\n\nconst Control = (props) => (\n \n);\n\nconst NoOptionsMessage = (props) => (\n \n {props.children}\n \n);\n\nconst Placeholder = (props) => (\n \n {props.children}\n \n);\n\nconst SingleValue = (props) => (\n \n {props.children}\n \n);\n\nconst ValueContainer = (props) => (\n \n {props.children}\n
\n);\n\nconst Menu = (props) => (\n \n {props.children}\n \n);\n\nconst components = {\n Option,\n Control,\n NoOptionsMessage,\n Placeholder,\n SingleValue,\n ValueContainer,\n Menu,\n};\n\nconst style = (theme) => ({\n input: {\n display: 'flex',\n //padding: 0,\n },\n valueContainer: {\n display: 'flex',\n flexWrap: 'wrap',\n flex: 1,\n },\n noOptionsMessage: {\n padding: `${theme.spacing(1)}px ${theme.spacing(2)}px`,\n },\n singleValue: {\n fontSize: 16,\n },\n placeholder: {\n position: 'absolute',\n left: 2,\n fontSize: 16,\n },\n paper: {\n marginTop: theme.spacing(1),\n },\n});\n\nconst AutoComplete = props => {\n const suggestions = props.options.map((option) => ({\n value: option[props.valueProp],\n label: option[props.labelProp]\n }));\n\n const selectStyles = {\n input: base => ({\n ...base,\n color: props.theme.palette.text.primary,\n }),\n };\n\n const handleOnKeyUp = (event) => {\n props.onSearch(event.target.value);\n };\n\n const value = () => {\n if (props.value) {\n return {\n value: props.value[props.valueProp],\n label: props.value[props.labelProp],\n }\n } else {\n return {};\n }\n };\n\n return (\n \n );\n};\n\nAutoComplete.propTypes = {\n options: PropTypes.arrayOf(PropTypes.any),\n value: PropTypes.shape(),\n label: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n onSearch: PropTypes.func,\n placeholder: PropTypes.string,\n valueProp: PropTypes.string,\n labelProp: PropTypes.string,\n readOnly: PropTypes.bool,\n};\n\nAutoComplete.defaultProps = {\n placeholder: '',\n readOnly: false,\n};\n\nexport default withStyles(style, {withTheme: true})(AutoComplete);\n","import AutoSelect from \"./AutoComplete\";\n\nexport default AutoSelect;\n","export const UserRole = {\n Admin: 'Admin',\n AccountAdmin: 'Account Admin',\n SalesAppOnly: 'Sales-App Only',\n Max: 'MAX',\n HideSummaryReports: 'Hide Summary Reports',\n NearmapDisabled: 'nearmap-disabled',\n SketchTech: 'sketch-tech',\n SketchOsAdmin: 'sketchos-admin',\n SketchOsEnabled: 'sketchos-enabled',\n SketchOsExpSketchToolEnabled: 'sketchos-exp-sketchtool-enabled'\n};\n\nexport const UserRoleId = {\n Admin: 1,\n AccountAdmin: 2,\n SalesAppOnly: 3,\n Max: 5,\n HideSummaryReports: 6,\n NearmapDisabled: 7,\n SketchTech: 8,\n SketchOsAdmin: 9,\n SketchOsEnabled: 10,\n SketchOsExpSketchToolEnabled: 11,\n};\n\nexport default UserRole;\n","import UserProfileClient from '../lib/apiClients/roofSnapApiClient/userProfileClient';\nimport QueryStringBuilder from '../lib/queryStringBuilder';\nimport { CALL_API } from '../middleware/api';\nimport { UserRoleId } from '../lib/roles';\nimport {\n GET_SKETCH_TECH_USER_PROFILES_REQUEST,\n GET_SKETCH_TECH_USER_PROFILES_SUCCESS,\n GET_SKETCH_TECH_USER_PROFILES_FAILURE,\n} from './actionTypes';\n\nexport const getSketchTechUserProfiles = (page = 1, searchValue) => {\n const userProfileClient = new UserProfileClient('v1');\n const request = userProfileClient.getUserProfiles;\n\n const queryStringBuilder = new QueryStringBuilder();\n queryStringBuilder.setQueryParameter('page', page);\n if (searchValue) {\n queryStringBuilder.setQueryParameter('search', searchValue);\n }\n queryStringBuilder.setQueryParameter('userRoleIds', UserRoleId.SketchOsAdmin);\n queryStringBuilder.setQueryParameter('userRoleIds', UserRoleId.SketchTech);\n\n const queryParams = queryStringBuilder.buildQueryString();\n\n return {\n [CALL_API]: {\n types: [\n GET_SKETCH_TECH_USER_PROFILES_REQUEST,\n GET_SKETCH_TECH_USER_PROFILES_SUCCESS,\n GET_SKETCH_TECH_USER_PROFILES_FAILURE,\n ],\n request,\n params: {\n queryParams,\n }\n }\n }\n};\n","import React, { Component } from 'react';\nimport { connect } from \"react-redux\";\nimport PropTypes from 'prop-types';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport Button from '@material-ui/core/Button';\nimport withMobileDialog from '@material-ui/core/withMobileDialog';\nimport AutoComplete from '../../components/AutoComplete';\nimport { getSketchTechUserProfiles } from '../../actions/sketchTechUserProfilesActions';\n\nexport class SetSketchTechDialog extends Component {\n async componentDidMount() {\n await this.getSketchTechnicians();\n }\n\n getSketchTechnicians = async (searchValue = null) => {\n await this.props.dispatch(getSketchTechUserProfiles(1, searchValue))\n };\n\n render() {\n const setSketchTechButtonIsDisabled = (!this.props.sketchTech || !this.props.sketchTech.userId);\n return (\n \n \n Choose Sketch Technician Assigned to this Order\n \n \n \n \n \n \n Dismiss\n \n \n Set Sketch Tech\n \n \n \n );\n }\n}\n\nSetSketchTechDialog.propTypes = {\n fullScreen: PropTypes.bool.isRequired,\n dispatch: PropTypes.func.isRequired,\n open: PropTypes.bool,\n userProfiles: PropTypes.arrayOf(PropTypes.shape({\n userId: PropTypes.number.isRequired,\n userName: PropTypes.string.isRequired\n })),\n sketchTech: PropTypes.shape({\n userId: PropTypes.number,\n userName: PropTypes.string\n }),\n onSketchTechChange: PropTypes.func.isRequired,\n onDismissClick: PropTypes.func.isRequired,\n onSetSketchTechClick: PropTypes.func.isRequired,\n};\n\nSetSketchTechDialog.defaultProps = {\n open: false,\n};\n\nconst mapStateToProps = (state) => {\n const { sketchTechUserProfiles: sketchTechUserProfilesState } = state;\n const {\n sketchTechUserProfiles\n } = sketchTechUserProfilesState;\n return {\n sketchTechUserProfiles\n }\n};\n\nexport default connect(mapStateToProps)(withMobileDialog()(SetSketchTechDialog));\n","// @flow\nimport * as React from 'react';\nimport {\n lightBlue,\n amber,\n orange,\n green,\n grey,\n lightGreen,\n red\n} from '@material-ui/core/colors';\nimport {\n Schedule,\n Timelapse,\n FindInPage,\n CheckCircle,\n RemoveCircle,\n Cancel,\n MonetizationOn,\n Warning,\n Storage,\n Autorenew\n} from '@material-ui/icons';\nimport { SketchOrderStatus } from './sketchOrderStatuses';\nimport type { SketchOrderStatusType } from './sketchOrderStatuses';\n\ntype SketchOrderStatusDisplayConfig = {\n displayName: string,\n color?: string,\n icon?: React.Node,\n}\n\nconst getDisplayConfig = (sketchOrderStatus: SketchOrderStatusType): SketchOrderStatusDisplayConfig => {\n switch(sketchOrderStatus) {\n case SketchOrderStatus.Pending:\n return {\n color: lightBlue[500],\n icon: ,\n displayName: 'Pending',\n }\n case SketchOrderStatus.RevisionRequested:\n return {\n color: lightBlue[500],\n icon: ,\n displayName: 'Revision Requested',\n }\n case SketchOrderStatus.Queued:\n return {\n color: lightBlue[500],\n icon: ,\n displayName: 'Queued',\n }\n case SketchOrderStatus.InProgress:\n return {\n color: amber[500],\n icon: ,\n displayName: 'In Progress',\n }\n case SketchOrderStatus.PendingReview:\n return {\n color: lightGreen[500],\n icon: ,\n displayName: 'Pending Review',\n }\n case SketchOrderStatus.PendingRejection:\n return {\n color: orange[500],\n icon: ,\n displayName: 'Pending Rejection',\n }\n case SketchOrderStatus.Complete:\n return {\n color: green[600],\n icon: ,\n displayName: 'Complete',\n }\n case SketchOrderStatus.Billed:\n return {\n color: green[600],\n icon: ,\n displayName: 'Billed',\n }\n case SketchOrderStatus.Incomplete:\n return {\n color: grey[500],\n icon: ,\n displayName: 'Incomplete',\n }\n case SketchOrderStatus.Cancelled:\n return {\n color: grey[500],\n icon: ,\n displayName: 'Cancelled',\n }\n case SketchOrderStatus.Exception:\n return {\n color: red[500],\n icon: ,\n displayName: 'Needs Attention',\n }\n case SketchOrderStatus.BillingFailed:\n return {\n color: red[500],\n icon: ,\n displayName: 'Billing Failed',\n }\n case SketchOrderStatus.InReview:\n return {\n color: lightBlue[500],\n icon: ,\n displayName: 'In Review',\n }\n case SketchOrderStatus.PendingGroupBilling:\n return {\n color: green[600],\n icon: ,\n displayName: 'Pending Group Billing'\n }\n default: {\n return {\n displayName: sketchOrderStatus,\n }\n }\n }\n};\n\nexport default getDisplayConfig;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withRouter } from 'react-router-dom';\nimport CardContent from '@material-ui/core/CardContent';\nimport { withStyles } from '@material-ui/core/styles';\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport CircularProgress from \"@material-ui/core/CircularProgress\";\nimport OpenInNew from \"@material-ui/icons/OpenInNew\";\nimport SketchOrderStatusChip from \"../SketchOrderStatusChip/SketchOrderStatusChip\";\nimport Badge from \"@material-ui/core/Badge/Badge\";\nimport { red } from '@material-ui/core/colors';\nimport CreateIcon from '@material-ui/icons/Create';\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport IconButton from \"../IconButton\";\nimport { SketchOrderStatus } from '../../lib/sketchOrderStatuses';\nimport getDisplayConfig from '../../lib/sketchOrderStatusDisplayConfig';\n\nconst style = (theme) => ({\n flex: {\n flexGrow: 1,\n },\n title: {\n color: '#FFFFFF',\n fontSize: 32,\n lineHeight: '32px',\n verticalAlign: 'middle',\n },\n subtitle: {\n color: '#FFFFFF',\n },\n iconButtons: {\n color: '#FFFFFF',\n }\n});\n\nconst SketchOrderCardHeader = (props) => {\n const handleOpenDrawingClick = (showExp) => () => {\n if (props.project.hasDrawing) {\n const url = showExp\n ? `/orders/${props.sketchOrder.id}/sketch/${props.project.id}?showExp=true`\n : `/orders/${props.sketchOrder.id}/sketch/${props.project.id}`;\n props.history.push(url);\n } else {\n const url = showExp\n ? `/orders/${props.sketchOrder.id}/imagery?showExp=true`\n : `/orders/${props.sketchOrder.id}/imagery`;\n props.history.push(url);\n }\n };\n\n const isOpenDrawingButtonDisabled = () => {\n return (!props.project.id || props.project.isFetching || !props.authorizedToOpenDrawing);\n };\n\n const isDeleteProjectButtonDisabled = () => {\n const deliveredStatuses = [SketchOrderStatus.Complete, SketchOrderStatus.Billed, SketchOrderStatus.BillingFailed];\n return (deliveredStatuses.includes(props.sketchOrder.sketchOrderStatus));\n };\n\n const handleViewProjectClick = () => {\n const impersonatorUserName = props.currentUserName.split('@')[0];\n window.open(`${process.env.REACT_APP_DECEPTIVE_DOLPHIN_HOST}login?returnurl=/projects/${props.sketchOrder.projectId}&username=${encodeURIComponent(`${props.sketchOrder.owner.userName}^${impersonatorUserName}`)}`, '_blank');\n };\n\n const sketchOrderStatusDisplayConfig = getDisplayConfig(props.sketchOrder.sketchOrderStatus);\n \n return (\n \n \n \n {\n sketchOrderStatusDisplayConfig.icon &&\n React.cloneElement(sketchOrderStatusDisplayConfig.icon, { className: props.classes.title })\n }\n \n \n \n {sketchOrderStatusDisplayConfig.displayName}\n {\n props.isFetching &&\n \n }\n \n \n \n \n \n \n {\n props.currentUserRoles.hasExpSketchToolEnabled &&\n \n \n \n \n \n }\n {\n props.showViewProjectButton &&\n \n \n \n }\n {\n props.authorizedToOpenDrawing &&\n \n \n \n }\n \n \n \n Order #{props.sketchOrder.id}\n \n \n );\n};\n\nSketchOrderCardHeader.propTypes = {\n classes: PropTypes.shape({\n flex: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string.isRequired,\n iconButtons: PropTypes.string.isRequired,\n }).isRequired,\n history: PropTypes.shape({\n push: PropTypes.func.isRequired,\n }).isRequired,\n sketchOrder: PropTypes.shape({\n id: PropTypes.number,\n sketchOrderStatus: PropTypes.string,\n projectId: PropTypes.string,\n }).isRequired,\n project: PropTypes.shape({\n id: PropTypes.string,\n hasDrawing: PropTypes.bool,\n isFetching: PropTypes.bool,\n }).isRequired,\n isFetching: PropTypes.bool.isRequired,\n showViewProjectButton: PropTypes.bool,\n authorizedToOpenDrawing: PropTypes.bool.isRequired,\n currentUserRoles: PropTypes.shape({\n hasExpSketchToolEnabled: PropTypes.bool\n }).isRequired,\n onDeleteProjectButtonClick: PropTypes.func.isRequired,\n currentUserName: PropTypes.string.isRequired,\n};\n\nSketchOrderCardHeader.defaultProps = {\n showViewProjectButton: false,\n project: {\n isFetching: true,\n },\n};\n\nexport default withRouter(withStyles(style)(SketchOrderCardHeader));\n","import SketchOrderCardHeader from \"./SketchOrderCardHeader\";\n\nexport default SketchOrderCardHeader;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\n\nconst style = () => ({\n root: {\n marginBottom: 12,\n }\n});\n\nconst TextOnlyFormField = (props) => {\n return (\n
\n \n {\n props.label ? (\n `${props.label}:`\n ) : (\n ''\n )\n }\n \n \n {\n props.link ? (\n \n {props.value}\n \n ) : (\n props.value\n )\n }\n \n
\n );\n};\n\nTextOnlyFormField.propTypes = {\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n }).isRequired,\n label: PropTypes.string,\n value: PropTypes.string,\n valueVariant: PropTypes.string,\n link: PropTypes.string,\n};\n\nTextOnlyFormField.defaultProps = {\n label: '',\n value: '',\n valueFontVariant: 'body1',\n};\n\nexport default withStyles(style)(TextOnlyFormField);\n","export const SketchOptions = {\n None: 'None',\n MainBuildingWithGarage: 'Main Building With Detached Garage',\n MainBuildingOnly: 'Main Building Only',\n WholeStructure: 'Whole Structure',\n PartialStructure: 'Partial Structure (check customer notes)',\n Other: 'Other',\n};\n","import React from 'react';\nimport NumberFormat from \"react-number-format\";\n\nconst CurrencyNumberFormatter = (props) => {\n const { inputRef, ...other } = props;\n\n return (\n \n );\n};\n\nexport default CurrencyNumberFormatter;","import CurrencyNumberFormatter from \"./CurrencyNumberFormatter\";\n\nexport default CurrencyNumberFormatter;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport CardContent from '@material-ui/core/CardContent';\nimport Typography from '@material-ui/core/Typography';\nimport TextOnlyFormField from '../TextOnlyFormField/TextOnlyFormField';\nimport dateformat from 'dateformat';\nimport orderBy from 'lodash/orderBy';\nimport { SketchOrderStatus } from '../../lib/sketchOrderStatuses';\nimport { SketchOptions } from '../../lib/sketchOptions';\nimport TextField from '@material-ui/core/TextField';\nimport FormControl from '@material-ui/core/FormControl';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport FormHelperText from '@material-ui/core/FormHelperText';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport InputLabel from '@material-ui/core/InputLabel';\nimport Input from '@material-ui/core/Input';\nimport InputAdornment from '@material-ui/core/InputAdornment';\nimport Select from '@material-ui/core/Select';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport CurrencyNumberFormatter from '../CurrencyNumberFormatter';\nimport { withStyles } from '@material-ui/core/styles';\n\nconst style = () => ({\n formField: {\n marginBottom: 12,\n },\n});\n\nconst SketchOrderCardDetails = (props) => {\n const shouldPricingInformationBeShown = () => {\n const isInProperStatus =\n props.sketchOrder.sketchOrderStatus ===\n SketchOrderStatus.PendingReview ||\n props.sketchOrder.sketchOrderStatus === SketchOrderStatus.Complete;\n\n return isInProperStatus && props.showCost;\n };\n\n const renderTierOptions = (tier) => {\n const { sketchOrderTierDefinition } = tier;\n\n return (\n \n {tier.name}  \n {sketchOrderTierDefinition.sketchOrderTierDefinition !==\n 'HalfSnap' &&\n sketchOrderTierDefinition.sketchOrderTierDefinition !==\n 'Gutters' &&\n `(${sketchOrderTierDefinition.minimumValue} - ${sketchOrderTierDefinition.maximumValue}\n ${sketchOrderTierDefinition.sketchOrderTierDefinition})`}\n \n );\n };\n\n const orderedTiers = orderBy(props.sketchOrderTiers, ['id']);\n return (\n \n \n Details\n \n \n \n Internal Notes\n \n \n \n {props.sketchOrder.rushed && (\n \n )}\n \n {props.sketchOrder.completedDate && (\n \n )}\n {props.sketchOrder.sketchOptions && (\n \n Sketch Options:\n {props.sketchOrder.sketchOptions.map((option, index) => {\n return (\n \n {SketchOptions[option]}\n \n );\n })}\n \n )}\n \n {props.showProjectName && (\n \n )}\n {props.showReportType && (\n \n \n Report Type\n \n \n FullSnap\n HalfSnap\n MetalRoof\n Gutters\n \n \n )}\n {props.sketchOrder.metalRoofPanelSize > 0 && (\n \n )}\n {props.projectDrawingSummary.numberOfFacets > 0 && (\n \n )} \n {props.projectDrawingSummary.actualSquares > 0 && (\n \n )}\n {shouldPricingInformationBeShown() && (\n
\n {props.sketchOrder.sketchOrderTierId && (\n \n \n Tier\n \n \n {orderedTiers.map(renderTierOptions)}\n \n \n )}\n \n \n Cost\n \n \n $\n \n }\n />\n {props.reportTypeChanged && (\n \n Report type changed. Cost and tier will be\n recalculated on update.\n \n )}\n \n \n }\n label='Make sketch order free'\n />\n
\n )}\n
\n );\n};\n\nSketchOrderCardDetails.propTypes = {\n sketchOrder: PropTypes.shape({\n requestedDate: PropTypes.string,\n completedDate: PropTypes.string,\n projectName: PropTypes.string,\n sketchOrderStatus: PropTypes.string,\n sketchReportType: PropTypes.string,\n sketchOrderTierId: PropTypes.number,\n metalRoofPanelSize: PropTypes.number,\n cost: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n notes: PropTypes.string,\n sketchOptions: PropTypes.arrayOf(PropTypes.string),\n freeOrder: PropTypes.bool,\n }).isRequired,\n onSketchOrderChange: PropTypes.func.isRequired,\n sketchOrderTiers: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number,\n name: PropTypes.string,\n sketchOrderTierDefinition: PropTypes.shape({\n minimumValue: PropTypes.number.isRequired,\n maximumValue: PropTypes.number.isRequired,\n sketchOrderTierDefinition: PropTypes.string.isRequired,\n }).isRequired,\n }),\n ).isRequired,\n projectDrawingSummary: PropTypes.shape({\n numberOfFacets: PropTypes.number,\n actualSquares: PropTypes.number,\n }).isRequired,\n classes: PropTypes.shape({\n formField: PropTypes.string.isRequired,\n }).isRequired,\n showProjectName: PropTypes.bool,\n showCost: PropTypes.bool,\n showLinksToSupportDashboard: PropTypes.bool,\n showReportType: PropTypes.bool,\n canEditInternalNotes: PropTypes.bool,\n canEditProjectName: PropTypes.bool,\n canEditReportType: PropTypes.bool,\n canEditCost: PropTypes.bool,\n canEditTier: PropTypes.bool,\n canEditFreeOrder: PropTypes.bool,\n onFreeOrderChange: PropTypes.func.isRequired,\n reportTypeChanged: PropTypes.bool,\n onReportTypeChange: PropTypes.func.isRequired,\n};\n\nSketchOrderCardDetails.defaultProps = {\n showProjectName: false,\n showCost: false,\n showLinksToSupportDashboard: false,\n showReportType: false,\n canEditProjectName: false,\n canEditReportType: false,\n canEditCost: false,\n canEditTier: false,\n canEditInternalNotes: false,\n canEditFreeOrder: false,\n reportTypeChange: false,\n};\n\nexport default withStyles(style)(SketchOrderCardDetails);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Divider from \"@material-ui/core/Divider\";\nimport CardContent from \"@material-ui/core/CardContent\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Grid from '@material-ui/core/Grid';\nimport IconButton from '@material-ui/core/IconButton';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport { OpenInNew } from '@material-ui/icons';\nimport TextOnlyFormField from \"../TextOnlyFormField/TextOnlyFormField\";\nimport AutoComplete from \"../AutoComplete\";\n\nconst SketchOrderCardCustomerInformation = props => {\n const openOwnerInSupportDashboard = () => {\n window.open(`${process.env.REACT_APP_SUPPORT_DASHBOARD_HOST}userprofiles/${props.sketchOrder.owner.userId}/show`)\n };\n\n return (\n (\n props.showOrganizationName ||\n props.showOwner ||\n props.showRequester\n ) &&\n
\n \n \n \n Customer Information\n \n\n {\n (props.showOrganizationName && props.sketchOrder.organization) &&\n
\n {\n (props.showLinksToSupportDashboard && process.env.REACT_APP_ENVIRONMENT.endsWith('production')) ? (\n \n ) : (\n \n )\n }\n
\n }\n {\n (props.showRequester && props.sketchOrder.requester) &&\n
\n {\n (props.showLinksToSupportDashboard && process.env.REACT_APP_ENVIRONMENT.endsWith('production')) ? (\n \n ) : (\n \n )\n }\n
\n }\n {\n (props.showOwner && props.sketchOrder.owner) &&\n \n \n \n \n {\n (props.showLinksToSupportDashboard && process.env.REACT_APP_ENVIRONMENT.endsWith('production')) &&\n \n \n \n \n \n \n \n }\n \n }\n
\n
\n );\n};\n\nSketchOrderCardCustomerInformation.propTypes = {\n sketchOrder: PropTypes.shape({\n organization: PropTypes.shape({\n id: PropTypes.number,\n name: PropTypes.string,\n }),\n requester: PropTypes.shape({\n userName: PropTypes.string,\n userId: PropTypes.number\n }),\n owner: PropTypes.shape({\n userName: PropTypes.string,\n userId: PropTypes.number\n })\n }).isRequired,\n showOrganizationName: PropTypes.bool,\n showOwner: PropTypes.bool,\n showRequester: PropTypes.bool,\n showLinksToSupportDashboard: PropTypes.bool,\n canEditOwner: PropTypes.bool,\n onOwnerChange: PropTypes.func.isRequired,\n organizationsUsers: PropTypes.arrayOf(PropTypes.shape({\n userId: PropTypes.number,\n userName: PropTypes.string,\n })),\n onSearchUsers: PropTypes.func.isRequired,\n};\n\nSketchOrderCardCustomerInformation.defaultProps = {\n showLinksToSupportDashboard: false,\n canEditOwner: false,\n organizationsUsers: []\n};\n\nexport default SketchOrderCardCustomerInformation;\n","import SketchOrderCardCustomerInformation from \"./SketchOrderCardCustomerInformation\";\n\nexport default SketchOrderCardCustomerInformation;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { MAP } from \"react-google-maps/lib/constants\";\nimport LocalStorageWrapper from \"../../lib/localStorageWrapper\";\nimport featureFlags from \"../../lib/FeatureFlags\";\n\nexport function withParcelLines(WrappedComponent) {\n class ParcelLines extends React.Component {\n constructor(props) {\n super(props);\n\n const centerMarker =\n props.markers.find((m) => m.isCurrentProject) || props.markers[0];\n\n this.state = {\n mapInstance: null,\n mapsApi: null,\n parcelScriptTag: null,\n sik: null,\n Dmp: null,\n center: { lat: centerMarker.latitude, lng: centerMarker.longitude },\n jwtToken: LocalStorageWrapper.getItem(\"accessToken\"),\n };\n }\n\n static contextTypes = {\n [MAP]: PropTypes.object,\n };\n\n componentDidMount() {\n if (!this.state.jwtToken || !featureFlags.parcelLines) return;\n\n this.setState({ mapInstance: this.context[MAP] });\n this.loadParcelScript();\n }\n\n componentWillUnmount() {\n if (this.state.parcelScriptTag === null) {\n return;\n }\n\n this.unloadParcelScript();\n this.setState({\n parcelScriptTag: null,\n });\n }\n\n getSik = (callback) => {\n if (this.state.sik) {\n callback(this.state.sik);\n return;\n }\n\n fetch(`${process.env.REACT_APP_ROOFSNAP_JWT_PROXY}/proxy/parcelAuth`, {\n method: \"GET\",\n headers: {\n Authorization: `Bearer ${this.state.jwtToken}`,\n },\n })\n .then((response) => response.json())\n .then((data) => callback(data.Response.Success.message))\n .catch(() => {\n // TODO: Log failure\n });\n };\n\n getParcelData = () => {\n const resource = \"SS.Base.Parcels/Parcels\";\n const { lat, lng } = this.state.center;\n const url = `getByGeometry.aspx?dataSource=${resource}&returnGeoType=1&returnFullWKT=true&geo=POINT(${lng} ${lat})&links=&nested=true&showSchema=false&fields=*`;\n this.parcelSdk().Env.Connections.SS.getJson(\n url,\n (json) => {\n if (json.Response.Results.totalRecords <= 0) {\n return;\n }\n this.renderParcels(json.Response.Results);\n },\n (error) => {\n // TODO: Implement logging\n }\n );\n };\n\n handleParcelSdkInit = () => {\n // add the parcel layer to the map\n const sdk = this.parcelSdk();\n const layer = new sdk.Layer.TileLayer(\n \"SS\",\n \"SS.Base.Parcels/ParcelTiles\",\n {\n minZoom: 16,\n maxZoom: 20,\n }\n );\n this.state.mapInstance.overlayMapTypes.push(\n new this.state.mapsApi.ImageMapType(layer)\n );\n this.getParcelData();\n };\n\n handleParcelScriptReady = () => {\n this.getSik((sik) => {\n this.setState({ sik });\n window.Dmp.HostName = process.env.REACT_APP_SPATIAL_STREAM_URL;\n window.Dmp.Env.Connections[\"SS\"] = new window.Dmp.Conn.Connection(`${process.env.REACT_APP_SPATIAL_STREAM_URL}/InitSession.aspx`)\n window.Dmp.Env.Connections.SS.init(sik, this.handleParcelSdkInit);\n this.setState({\n Dmp: window.Dmp,\n mapsApi: window.google.maps,\n });\n });\n };\n\n parcelSdk = () => this.state.Dmp;\n\n loadParcelScript = () => {\n if (this.state.parcelScriptTag) {\n return;\n }\n const script = document.createElement(\"script\");\n script.src = process.env.REACT_APP_PARCEL_STREAM_URL;\n script.async = true;\n script.addEventListener(\"load\", this.handleParcelScriptReady);\n document.body.appendChild(script);\n this.setState({\n parcelScriptTag: script,\n });\n };\n\n unloadParcelScript = () => {\n document.body.removeChild(this.state.parcelScriptTag);\n this.setState({\n parcelScriptTag: null,\n });\n };\n\n prepareParcelDataForRendering = (recordSet) => {\n let parcelRec = null;\n if (recordSet.Data && recordSet.Data.Row.length > 1) {\n [parcelRec] = recordSet.Data.Row;\n } else if (recordSet.Data) parcelRec = recordSet.Data.Row;\n return parcelRec;\n };\n\n renderParcels = (recordSet) => {\n const parcelRec = this.prepareParcelDataForRendering(recordSet);\n const keyField = \"LOCID\";\n const keyValue = parcelRec[keyField];\n const SLD = \"PUBLIC_FOLDER.Styles/Identify.sld.xml\";\n // add the server side highlight layer to highlight the clicked parcel\n const sdk = this.parcelSdk();\n const highlightLayer = new sdk.Layer.WMSLayer(\"parcelLayer\", \"SS\", {\n showField: keyField,\n showValues: keyValue,\n antiAlias: true,\n ignoreHoles: true,\n });\n highlightLayer.addChild(\"parcelLayer\", recordSet.datasource, SLD, {\n zoomRange: { min: 10, max: 19 },\n });\n highlightLayer.setMap(this.state.mapInstance);\n };\n\n render() {\n return ;\n }\n }\n\n ParcelLines.propTypes = WrappedComponent.propTypes;\n\n return ParcelLines;\n}\n\nwithParcelLines.propTypes = {\n WrappedComponent: PropTypes.element,\n};\n\nexport default withParcelLines;\n","import React from \"react\";\nimport { withGoogleMap, withScriptjs, GoogleMap } from \"react-google-maps\";\nimport { MarkerWithLabel } from \"react-google-maps/lib/components/addons/MarkerWithLabel\";\nimport PropTypes from \"prop-types\";\nimport withParcelLines from \"./withParcelLines\"\n\nconst buildMarkers = (props) => {\n const markerElems = props.markers.map((marker) => {\n return (\n \n
\n {marker.ordinal === 0\n ? \"\"\n : marker.ordinal + (marker.isCurrentProject ? \"*\" : \"\")}\n
\n \n );\n });\n\n return markerElems;\n};\n\nconst Map = (props) => {\n const markers = buildMarkers(props);\n const currentProjectMarker =\n props.markers.find((m) => m.isCurrentProject) || props.markers[0];\n\n return (\n \n {markers}\n \n );\n};\n\nMap.propTypes = {\n draggable: PropTypes.bool,\n onMarkerChange: PropTypes.func.isRequired,\n markers: PropTypes.arrayOf(\n PropTypes.shape({\n latitude: PropTypes.number,\n longitude: PropTypes.number,\n ordinal: PropTypes.number,\n isCurrentProject: PropTypes.bool,\n })\n ),\n};\n\nMap.defaultProps = {\n draggable: false,\n markers: [],\n};\n\nexport default withScriptjs(withGoogleMap(withParcelLines(Map)));\n","import React, { Component } from 'react';\nimport Button from '@material-ui/core/Button';\nimport EyeIcon from '@material-ui/icons/RemoveRedEye';\nimport PropTypes from 'prop-types';\nimport Map from './Map';\n\nclass MapWrapper extends Component{\n state = {\n displayMap: false,\n };\n handleButtonClick = (event) => {\n this.setState({displayMap: true});\n };\n render(){\n return(\n \n { !this.state.displayMap &&\n \n \n View Map\n \n }\n { this.state.displayMap &&\n }\n containerElement={
}\n mapElement={
}\n draggable={this.props.draggable}\n onMarkerChange={this.props.onMarkerChange}\n markers={this.props.markers}\n />\n }\n \n );\n }\n}\n\nMapWrapper.propTypes = {\n draggable: PropTypes.bool,\n onMarkerChange: PropTypes.func.isRequired,\n markers: PropTypes.arrayOf(PropTypes.shape({\n latitude: PropTypes.number,\n longitude: PropTypes.number,\n ordinal: PropTypes.number,\n isCurrentProject: PropTypes.bool\n })),\n};\n\nMapWrapper.defaultProps = {\n latitude: 0,\n longitude: 0,\n draggable: false,\n markers: []\n};\n\nexport default MapWrapper;\n","import MapWrapper from \"./MapWrapper\";\nexport default MapWrapper;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\nimport Divider from \"@material-ui/core/Divider\";\nimport CardContent from \"@material-ui/core/CardContent\";\nimport Typography from \"@material-ui/core/Typography\";\nimport AssignmentIcon from '@material-ui/icons/Assignment';\nimport IconButton from '@material-ui/core/IconButton';\nimport FormControl from '@material-ui/core/FormControl';\nimport Input from '@material-ui/core/Input';\nimport InputLabel from '@material-ui/core/InputLabel';\nimport InputAdornment from '@material-ui/core/InputAdornment';\nimport TextField from \"@material-ui/core/TextField\";\nimport Tooltip from '@material-ui/core/Tooltip';\nimport { withStyles } from '@material-ui/core/styles';\nimport MapWrapper from \"../Map\";\n\n\nconst style = () => ({\n formField: {\n marginBottom: 12,\n },\n});\n\nconst createAddressUrl = (sketchOrder) => {\n let addressUrl = 'https://www.google.com/maps/place/'\n const streetAddress = sketchOrder.address ? sketchOrder.address.replace(' ', '+') : ''\n const locationParams = `${streetAddress}+${sketchOrder.city || ''}+${sketchOrder.region || ''}+${sketchOrder.postCode || ''}`\n return {sketchOrder.address} {sketchOrder.city} {sketchOrder.region} {sketchOrder.postCode};\n}\n\nconst mapFromPointsToMarkers = (sketchOrder) => {\n if (!sketchOrder.sketchOrderGroup || !sketchOrder.sketchOrderGroup.mapMarkerPoints) {\n return [{\n ordinal: 0,\n latitude: sketchOrder.location.coordinates[1],\n longitude: sketchOrder.location.coordinates[0],\n isCurrentProject: false // don't show the asterisk when there is only 1 marker\n }];\n }\n\n const markers = sketchOrder.sketchOrderGroup.mapMarkerPoints.map((marker) => {\n const isCurrentProject = marker.point.coordinates[0] === sketchOrder.location.coordinates[0]\n && marker.point.coordinates[1] === sketchOrder.location.coordinates[1];\n return {\n ordinal: marker.ordinal,\n latitude: marker.point.coordinates[1],\n longitude: marker.point.coordinates[0],\n isCurrentProject\n }\n });\n return markers;\n};\n\nconst SketchOrderCardLocation = props => {\n return (\n
\n \n \n \n Location\n \n {createAddressUrl(props.sketchOrder)}\n \n\n \n\n \n\n \n\n \n\n {\n props.sketchOrder.location &&\n
\n \n Coordinates\n \n \n \n \n \n \n \n \n \n }\n />\n \n \n
\n }\n
\n
\n );\n};\n\nSketchOrderCardLocation.propTypes = {\n sketchOrder: PropTypes.shape({\n address: PropTypes.string,\n city: PropTypes.string,\n region: PropTypes.string,\n postCode: PropTypes.string,\n country: PropTypes.string,\n location: PropTypes.shape(),\n sketchOrderGroup: PropTypes.shape({\n mapMarkerPoints: PropTypes.arrayOf(PropTypes.shape({\n ordinal: PropTypes.number,\n point: PropTypes.shape({\n coordinates: PropTypes.arrayOf(PropTypes.number),\n }),\n })),\n }),\n }).isRequired,\n onSketchOrderChange: PropTypes.func.isRequired,\n canEditAddress: PropTypes.bool,\n canEditLocation: PropTypes.bool,\n onLocationChange: PropTypes.func.isRequired,\n};\n\nSketchOrderCardLocation.defaultProps = {\n canEditAddress: false,\n canEditLocation: false,\n};\n\nexport default withStyles(style)(SketchOrderCardLocation);\n","import SketchOrderCardLocation from \"./SketchOrderCardLocation\";\n\nexport default SketchOrderCardLocation;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport CardActions from \"@material-ui/core/CardActions\";\nimport Button from \"@material-ui/core/Button\";\n\nconst SketchOrderCardActions = props => (\n \n props.onUpdateClick()}\n disabled={props.isFetching}\n >\n Update\n \n \n);\n\nSketchOrderCardActions.propTypes = {\n sketchOrder: PropTypes.shape({\n sketchOrderStatus: PropTypes.string,\n }).isRequired,\n onUpdateClick: PropTypes.func.isRequired,\n isFetching: PropTypes.bool,\n};\n\nSketchOrderCardActions.defaultProps = {\n isFetching: false,\n};\n\nexport default SketchOrderCardActions;\n","import SketchOrderCardActions from \"./SketchOrderCardActions\";\n\nexport default SketchOrderCardActions;\n","// @flow\nimport React from 'react';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport Avatar from '@material-ui/core/Avatar';\nimport { withStyles } from \"@material-ui/core/styles\";\nimport type { UserProfile } from '../../typeDefinitions/userProfile';\n\ntype Classes = {\n avatars: string,\n}\n\ntype ProvidedProps = {\n classes: Classes,\n}\n\ntype Props = {\n user: UserProfile,\n label?: string,\n}\n\nconst styles = (theme) => ({\n avatars: {\n backgroundColor: theme.palette.primary.main,\n }\n});\n\nconst UserProfileField = (props: Props & ProvidedProps) => {\n const avatar = (): string => {\n const { firstName, lastName, userName} = props.user;\n if (firstName)\n return firstName.charAt(0);\n if (lastName)\n return lastName.charAt(0);\n\n return userName.charAt(0);\n };\n\n return (\n \n \n {props.label}\n \n {\n props.user &&\n \n \n \n {avatar()}\n \n \n \n \n {props.user.firstName} {props.user.lastName}\n \n \n {props.user.userName}\n \n \n \n }\n \n );\n}\n \nexport default withStyles(styles)(UserProfileField);\n","import UserProfileField from './UserProfileField';\n\nexport default UserProfileField;\n","// @flow\nimport React from 'react';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport CardContent from '@material-ui/core/CardContent';\nimport Avatar from '@material-ui/core/Avatar';\nimport UserProfileField from '../UserProfileField';\nimport type { UserProfile } from '../../typeDefinitions/userProfile';\n\ntype Props = {\n sketchTech: UserProfile,\n reviewer: UserProfile,\n}\n\nconst SketchOrderAssignments = (props: Props) => {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n \nexport default SketchOrderAssignments;\n","import React from \"react\";\n\nconst TabPanel = ({ children, selectedTab, index }) => (\n
\n);\n\nexport default TabPanel;\n","import TabPanel from \"./TabPanel\";\n\nexport default TabPanel;","import React from \"react\";\nimport Typography from '@material-ui/core/Typography';\nimport { DateTime } from 'luxon';\n\nconst SketchOrderCardRevisionNotes = ({ revisionNotes : { resourceList } }) => \n (
    \n {resourceList && resourceList.length > 0 && resourceList.map(rn => (\n
  • \n {DateTime.fromISO(rn.createdAt).toLocaleString(DateTime.DATETIME_FULL)}\n {rn.note}\n
  • \n ))}\n
)\n\nexport default SketchOrderCardRevisionNotes;","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport Paper from '@material-ui/core/Paper';\nimport { SketchOrderStatus } from \"../../lib/sketchOrderStatuses\";\nimport SketchOrderCardHeader from \"../SketchOrderCardHeader\";\nimport SketchOrderCardDetails from \"../SketchOrderCardDetails/SketchOrderCardDetails\";\nimport SketchOrderCardCustomerInformation from \"../SketchOrderCardCustomerInformation\";\nimport SketchOrderCardLocation from \"../SketchOrderCardLocation\";\nimport SketchOrderCardActions from \"../SketchOrderCardActions\";\nimport SketchOrderAssignments from '../SketchOrderAssignments/SketchOrderAssigments';\nimport { Tabs, Tab } from '@material-ui/core';\nimport TabPanel from '../TabPanel';\n\nimport SketchOrderCardRevisionNotes from '../SketchOrderCardRevisionNotes/SketchOrderCardRevisionNotes';\n\nconst style = () => ({\n root: {\n maxWidth: 700,\n margin: 'auto',\n },\n});\n\nexport const SketchOrderCard = (props) => {\n const { sketchOrder: { revisionNotes } } = props;\n\n const isReviewer = props.currentUserRoles.isSketchOsAdmin || props.currentUserRoles.isAdmin;\n const sketchOrderIsNotInTheQueue = props.sketchOrder.sketchOrderStatus !== SketchOrderStatus.Pending &&\n props.sketchOrder.sketchOrderStatus !== SketchOrderStatus.Queued;\n \n const [currentTab, setCurrentTab] = useState(0);\n \n const handleTabChange = (event, newValue) => {\n setCurrentTab(newValue);\n }\n\n useEffect(() => {\n if (revisionNotes?.resourceList.length > 0) {\n setCurrentTab(1);\n }\n }, [revisionNotes])\n\n return (\n \n \n \n\n \n \n {revisionNotes?.resourceList && revisionNotes.resourceList.length > 0 && }\n \n \n \n \n {\n (sketchOrderIsNotInTheQueue || isReviewer) &&\n \n }\n \n \n \n \n \n \n );\n};\n\nSketchOrderCard.propTypes = {\n isFetching: PropTypes.bool.isRequired,\n sketchOrder: PropTypes.shape({\n id: PropTypes.number,\n projectName: PropTypes.string,\n sketchOrderStatus: PropTypes.string,\n sketchReportType: PropTypes.string,\n requestedDate: PropTypes.string,\n completedDate: PropTypes.string,\n notes: PropTypes.string,\n address: PropTypes.string,\n city: PropTypes.string,\n region: PropTypes.string,\n postCode: PropTypes.string,\n country: PropTypes.string,\n cost: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n sketchOrderTierId: PropTypes.number,\n projectId: PropTypes.string,\n metalRoofPanelSize: PropTypes.number,\n organization: PropTypes.shape({\n name: PropTypes.string,\n }),\n requester: PropTypes.shape({\n userName: PropTypes.string,\n }),\n owner: PropTypes.shape({\n userName: PropTypes.string,\n }),\n sketchTech: PropTypes.shape({\n userName: PropTypes.string,\n }),\n reviewer: PropTypes.shape({\n userName: PropTypes.string,\n }),\n usedNearmapImage: PropTypes.bool,\n location: PropTypes.shape({\n coordinates: PropTypes.arrayOf(PropTypes.number)\n }),\n sketchOptions: PropTypes.arrayOf(PropTypes.string),\n freeOrder: PropTypes.bool,\n sketchOrderGroup: PropTypes.shape({\n mapMarkerPoints: PropTypes.arrayOf(PropTypes.shape({\n ordinal: PropTypes.number,\n point: PropTypes.shape({\n coordinates: PropTypes.arrayOf(PropTypes.number),\n }), \n })),\n }),\n }).isRequired,\n sketchOrderTiers: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.number.isRequired,\n name: PropTypes.string.isRequired,\n sketchOrderTierDefinition: PropTypes.shape({\n minimumValue: PropTypes.number.isRequired,\n maximumValue: PropTypes.number.isRequired,\n sketchOrderTierDefinition: PropTypes.string.isRequired,\n }).isRequired\n })).isRequired,\n project: PropTypes.shape({\n id: PropTypes.string,\n hasDrawing: PropTypes.bool,\n isFetching: PropTypes.bool,\n }),\n onUpdateClick: PropTypes.func.isRequired,\n onSketchOrderChange: PropTypes.func.isRequired,\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n }),\n showViewProjectButton: PropTypes.bool,\n showProjectName: PropTypes.bool,\n showOrganizationName: PropTypes.bool,\n showRequester: PropTypes.bool,\n showOwner: PropTypes.bool,\n showCost: PropTypes.bool,\n showLinksToSupportDashboard: PropTypes.bool,\n showReportType: PropTypes.bool,\n canCompleteSketchOrder: PropTypes.bool,\n canEditAddress: PropTypes.bool,\n canEditReportType: PropTypes.bool,\n canEditOwner: PropTypes.bool,\n canEditProjectName: PropTypes.bool,\n canEditCost: PropTypes.bool,\n canEditFreeOrder: PropTypes.bool,\n canEditTier: PropTypes.bool,\n canEditInternalNotes: PropTypes.bool,\n onOwnerChange: PropTypes.func,\n organizationsUsers: PropTypes.arrayOf(PropTypes.shape({\n userId: PropTypes.number,\n userName: PropTypes.string,\n })),\n onSearchUsers: PropTypes.func.isRequired,\n canEditLocation: PropTypes.bool,\n onLocationChange: PropTypes.func.isRequired,\n selectedLocation: PropTypes.shape({\n coordinates: PropTypes.arrayOf(PropTypes.number),\n }),\n authorizedToOpenDrawing: PropTypes.bool.isRequired,\n currentUserRoles: PropTypes.shape({\n isSketchOsAdmin: PropTypes.bool.isRequired,\n isAdmin: PropTypes.bool.isRequired,\n }).isRequired,\n projectDrawingSummary: PropTypes.shape({\n numberOfFacets: PropTypes.number,\n actualSquares: PropTypes.number,\n }).isRequired,\n onFreeOrderChange: PropTypes.func.isRequired,\n reportTypeChanged: PropTypes.bool,\n onReportTypeChange: PropTypes.func.isRequired,\n onDeleteProjectButtonClick: PropTypes.func.isRequired,\n currentUserName: PropTypes.string.isRequired,\n};\n\nSketchOrderCard.defaultProps = {\n project: {\n isFetching: true,\n },\n sketchOrder: {},\n showViewProjectButton: false,\n showOrganizationName: false,\n showRequester: false,\n showOwner: false,\n showCost: false,\n showLinksToSupportDashboard: false,\n showReportType: false,\n canCompleteSketchOrder: false,\n canEditAddress: false,\n canEditReportType: false,\n canEditOwner: false,\n canEditProjectName: false,\n canEditCost: false,\n canEditTier: false,\n canEditLocation: false,\n canEditInternalNotes: false,\n canEditFreeOrder: false,\n reportTypeChanged: false,\n};\n\nexport default withStyles(style)(SketchOrderCard);\n","import SketchOrderCard from \"./SketchOrderCard\";\n\nexport default SketchOrderCard;\n","// @flow\nimport React from 'react';\nimport type { Node } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport MuiDrawer from '@material-ui/core/Drawer';\n\nconst drawerWidth = 300;\n\nconst styles = {\n drawer: {\n width: drawerWidth,\n flexShrink: 0,\n },\n drawerPaper: {\n width: drawerWidth,\n zIndex: 1,\n },\n layout: {\n paddingTop: 136,\n }\n};\n\ntype Props = {\n classes: {\n drawer: string,\n drawerPaper: string,\n layout: string,\n },\n open: boolean,\n children: Node,\n};\n\nconst Drawer = (props: Props) => (\n \n
\n {props.children}\n
\n\n \n\n);\n\nDrawer.defaultProps = {\n open: false,\n};\n\nexport default withStyles(styles)(Drawer);\n","// @flow\nimport React from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport ListItem from '@material-ui/core/ListItem';\nimport Grid from '@material-ui/core/Grid';\nimport ErrorIcon from '@material-ui/icons/Error';\nimport WarningIcon from '@material-ui/icons/Warning';\nimport InfoIcon from '@material-ui/icons/Info';\nimport { Typography } from \"@material-ui/core\";\nimport { grey, red, yellow, blue } from '@material-ui/core/colors';\nimport { PriorityLevels } from \"./types\";\n\nconst styles = theme => ({\n errorIcon: {\n marginRight: theme.spacing(2),\n fill: red[500],\n },\n warningIcon: {\n marginRight: theme.spacing(2),\n fill: yellow[700],\n },\n infoIcon: {\n marginRight: theme.spacing(2),\n fill: blue[500],\n },\n acknowledgedIcon: {\n marginRight: theme.spacing(2),\n fill: grey[400],\n },\n label: {\n fontSize: 12,\n color: grey[600],\n maxHeight: 30,\n overflow: 'hidden',\n },\n});\n\ntype Props = {\n id: number,\n label: string,\n priorityLevel: PriorityLevels,\n acknowledged: boolean,\n onClick: Function,\n classes: {\n acknowledgedIcon: string,\n errorIcon: string,\n warningIcon: string,\n infoIcon: string,\n label: string,\n },\n};\n\nconst NotificationListItem = (props: Props) => (\n props.onClick(e, props.id)}>\n \n \n {\n props.priorityLevel === 'Critical' &&\n \n }\n {\n props.priorityLevel === 'Warning' &&\n \n }\n {\n props.priorityLevel === 'Info' &&\n \n }\n \n \n \n {props.label}\n \n \n \n \n);\n\nexport default withStyles(styles)(NotificationListItem);\n","// @flow\nimport React, { Component } from 'react';\nimport find from 'lodash/find';\nimport { withStyles } from '@material-ui/core/styles';\nimport { grey, blue, red, yellow } from '@material-ui/core/colors';\nimport Button from '@material-ui/core/Button';\nimport IconButton from '@material-ui/core/IconButton';\nimport AddIcon from '@material-ui/icons/Add';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBack';\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport Grid from '@material-ui/core/Grid';\nimport TextField from '@material-ui/core/TextField';\n\nimport List from '@material-ui/core/List';\nimport Typography from '@material-ui/core/Typography';\nimport { Accordion, AccordionSummary, AccordionDetails, RootRef } from '@material-ui/core';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\n\nimport FormControl from '@material-ui/core/FormControl';\nimport Select from '@material-ui/core/Select';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport InputLabel from '@material-ui/core/InputLabel';\n\nimport Drawer from './Drawer';\nimport NotificationListItem from \"./NotificationListItem\";\n\nimport {\n Notification as NotificationType,\n Templates as TemplatesType,\n Template as TemplateType,\n} from './types';\n\n\nconst styles = theme => ({\n notifications: {\n paddingTop: theme.spacing(1.5),\n paddingBotton: theme.spacing(1.5),\n },\n header: {\n paddingTop: theme.spacing(3),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n fontSize: 16,\n },\n button: {\n paddingLeft: theme.spacing(2),\n paddingBottom: theme.spacing(2)\n },\n buttonHeader: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n borderBottom: `1px solid ${grey[200]}`,\n },\n content: {\n paddingTop: theme.spacing(1),\n paddingRight: theme.spacing(2),\n paddingBottom: theme.spacing(1),\n paddingLeft: theme.spacing(2),\n },\n previewContent: {\n marginTop: theme.spacing(2),\n padding: theme.spacing(2),\n backgroundColor: grey[100],\n },\n previewLabel: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n color: grey[500],\n fontSize: 12,\n },\n previewDescription: {\n fontSize: 14,\n paddingRight: theme.spacing(2),\n },\n addButton: {\n textTransform: 'inherit',\n fontSize: 16,\n color: grey[700],\n fontWeight: 'normal',\n justifyContent: 'left',\n borderRadius: 20,\n width: '100%',\n '& svg': {\n marginRight: theme.spacing(2),\n fill: blue[500],\n },\n },\n templateSelect: {\n fontSize: 14,\n },\n menuItem: {\n fontSize: 14,\n },\n customNotesInput: {\n fontSize: 14,\n },\n});\n\ntype Props = {\n sketchOrderId: Number,\n sketchOrderGroup: Object,\n templates: TemplatesType,\n selectedTemplate: TemplateType,\n notifications: Array,\n notification: NotificationType,\n drawerMode: 'list' | 'new',\n onAddNotificationButtonClick: Function,\n onDeleteButtonClick: Function,\n onBackButtonClick: Function,\n onTemplateChange: Function,\n onCustomNotesChange: Function,\n classes: {\n header: string,\n buttonHeader: string,\n content: string,\n previewContent: string,\n previewLabel: string,\n previewDescription: string,\n addButton: string,\n templateSelect: string,\n menuItem: string,\n customNotesInput: string,\n },\n};\n\ntype State = {\n template: TemplatesType,\n};\n\nclass SketchOrderNotificationsDrawer extends Component {\n static defaultProps = {\n template: null,\n };\n templateSelect = null;\n constructor(props) {\n super(props);\n this.templateSelect = React.createRef();\n this.state = {\n template: null,\n };\n }\n componentDidUpdate(prevProps): void {\n if (prevProps.notification && !this.props.notification) {\n this.clearTemplate();\n }\n }\n clearTemplate = () => {\n this.setState({\n template: null,\n });\n };\n handleTemplateChange = (e) => {\n const id = e.target.value;\n const template = find(this.props.templates, ['id', id]);\n this.setState({\n template,\n });\n this.props.onTemplateChange(id)\n };\n render() {\n const { classes, notification } = this.props;\n const isEditing = notification && notification.id;\n const template = isEditing ? notification.template : this.state.template;\n return (\n \n \n \n }\n aria-controls=\"panel1a-content\"\n id=\"panel1a-header\"\n >\n Order notifications\n \n \n
\n
\n \n \n Add notification\n \n
\n \n {this.props.notifications.map(notification => (\n \n ))}\n \n
\n
\n
\n {this.props.sketchOrderGroup && this.props.sketchOrderGroup.mapMarkerPoints.length > 1 ? \n }\n aria-controls=\"panel1a-content\"\n id=\"panel1a-header\"\n >\n Orders in this group\n \n \n
\n {this.props.sketchOrderGroup && this.props.sketchOrderGroup.mapMarkerPoints.sort((a, b)=>a.ordinal-b.ordinal).map((m, index) => {\n return (\n \n \n {m.ordinal}{m.sketchOrderId === this.props.sketchOrderId ? \"*:\" : \":\"} Order #{m.sketchOrderId}\n \n \n );\n })}\n
\n
\n
: null}\n
\n \n
\n \n \n \n \n \n \n \n {isEditing &&\n \n \n \n }\n \n \n
\n
\n \n Notification template\n \n \n Select template\n \n {\n this.props.templates.map((template) => (\n \n {template.label}\n \n ))\n }\n {/* If we're editing a notification, ensure the template displays in case it hasn't been retrieved yet */}\n {\n this.props.notification && this.props.notification.template &&\n \n {this.props.notification.template.label}\n \n }\n \n \n
\n {\n template &&\n
\n Template preview\n {template.description}\n
\n }\n
\n \n
\n
\n
\n\n );\n }\n};\n\nexport default withStyles(styles)(SketchOrderNotificationsDrawer);\n","import SketchOrderNotificationsDrawer from './SketchOrderNotificationsDrawer';\n\nexport default SketchOrderNotificationsDrawer;\n","export const SketchOrderDeliveryOptionValues = [\n {key: \"Don't send sketch report\", value: 'OmitSketchReport'}\n];\n","// @flow\nimport React, { Component } from 'react';\nimport Checkbox from \"@material-ui/core/Checkbox\";\nimport {SketchOrderDeliveryOptionValues} from \"../../lib/SketchOrderDeliveryOptionValues\";\nimport Typography from \"@material-ui/core/Typography\";\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\n\ntype deliveryOptionType = {\n key: string,\n value: string,\n}\n\ntype Props = {\n sketchOrder: {\n deliveryOptions: Array,\n },\n onSketchOrderChange: Function,\n};\n\nconst SketchOrderDeliveryOptionsSwitches = (props: Props) => {\n if(!props.sketchOrder || !props.sketchOrder.deliveryOptions)\n return null;\n return (\n
\n Delivery Options:\n {\n
\n {SketchOrderDeliveryOptionValues.map(option => {\n const optionIsChecked = props.sketchOrder.deliveryOptions.includes(option.value);\n return (\n props.onSketchOrderChange(option.value, optionIsChecked)}\n />} label={option.key}/>\n );\n })}\n
\n }\n
\n );\n};\n\nexport default SketchOrderDeliveryOptionsSwitches;","import SketchOrderDeliveryOptions from \"./SketchOrderDeliveryOptions\";\n\nexport default SketchOrderDeliveryOptions;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from '@material-ui/core/Button';\nimport Fab from '@material-ui/core/Fab';\nimport { withStyles } from '@material-ui/core/styles';\nimport featureFlags from '../../lib/FeatureFlags';\n\nconst style = (theme) => ({\n root: {\n position: 'fixed',\n bottom: 30,\n right: 30,\n },\n icon: {\n marginRight: theme.spacing(1)\n }\n});\n\nconst FloatingActionButton = props => {\n return (\n \n \n {props.icon}\n \n {props.text}\n \n );\n};\n\nFloatingActionButton.propTypes = {\n text: PropTypes.string.isRequired,\n icon: PropTypes.node,\n onClick: PropTypes.func,\n disabled: PropTypes.bool,\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n icon: PropTypes.string.isRequired,\n }).isRequired,\n styleOverride: PropTypes.shape({\n root: PropTypes.string,\n icon: PropTypes.string,\n }),\n};\n\nFloatingActionButton.defaultProps = {\n icon: null,\n onClick: () => {},\n disabled: false,\n styleOverride: null,\n};\n\nexport default withStyles(style)(FloatingActionButton);\n","import FloatingActionButton from \"./FloatingActionButton\";\n\nexport default FloatingActionButton;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport PlayArrow from '@material-ui/icons/PlayArrow';\nimport Check from '@material-ui/icons/Check';\nimport Cancel from '@material-ui/icons/Cancel';\nimport Warning from '@material-ui/icons/Warning';\nimport Send from '@material-ui/icons/Send';\nimport FindInPage from '@material-ui/icons/FindInPage';\nimport AttachMoney from '@material-ui/icons/AttachMoney';\nimport Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport Backdrop from '@material-ui/core/Backdrop';\nimport FloatingActionButton from '../FloatingActionButton/index';\nimport { SketchOrderStatus } from '../../lib/sketchOrderStatuses';\n\nclass TransitionSketchOrderButton extends Component {\n state = {\n menuOpen: false,\n anchorEl: null,\n };\n\n getButtonContext = () => {\n switch (this.props.currentStatus) {\n case SketchOrderStatus.RevisionRequested:\n case SketchOrderStatus.Pending:\n case SketchOrderStatus.Queued:\n return {\n text: 'Start',\n icon: ,\n };\n case SketchOrderStatus.InProgress:\n return {\n text: 'Submit',\n icon: ,\n };\n case SketchOrderStatus.PendingReview:\n return {\n text: 'Start',\n icon: ,\n };\n case SketchOrderStatus.InReview:\n case SketchOrderStatus.BillingFailed:\n return {\n text: 'Complete',\n icon: ,\n };\n case SketchOrderStatus.PendingGroupBilling:\n case SketchOrderStatus.Complete:\n return {\n text: 'Mark as Billed',\n icon: ,\n };\n case SketchOrderStatus.PendingRejection:\n return {\n text: 'Reject',\n icon: ,\n };\n case SketchOrderStatus.Incomplete:\n return {\n text: 'Mark Needs Attention',\n icon: ,\n };\n case SketchOrderStatus.Exception:\n return {\n text: 'Send',\n icon: ,\n };\n default:\n return {\n text: 'Update',\n };\n }\n };\n\n handleButtonClick = (event) => {\n const { allowedStatusTransitions } = this.props;\n\n if (\n !allowedStatusTransitions ||\n allowedStatusTransitions.length === 0\n ) {\n return;\n }\n\n if (allowedStatusTransitions.length === 1) {\n const status = allowedStatusTransitions[0];\n this.props.onClick(status);\n } else {\n this.setState({\n anchorEl: event.currentTarget,\n menuOpen: true,\n });\n }\n };\n\n handleMenuItemClick = (status) => {\n this.setState({\n anchorEl: null,\n menuOpen: false,\n });\n this.props.onClick(status);\n };\n\n handleClose = () => {\n this.setState({ menuOpen: false, anchorEl: null });\n };\n\n getMenuItemContext = (status) => {\n switch (status) {\n case SketchOrderStatus.Queued:\n return {\n text: 'Send to Queue',\n icon: ,\n };\n case SketchOrderStatus.InProgress:\n return {\n text: 'Send to In Progress',\n icon: ,\n };\n case SketchOrderStatus.Complete:\n return {\n text: 'Complete',\n icon: ,\n };\n case SketchOrderStatus.PendingReview:\n return {\n text: 'Submit for Review',\n icon: ,\n };\n case SketchOrderStatus.PendingRejection:\n return {\n text: 'Submit for Rejection',\n icon: ,\n };\n case SketchOrderStatus.Incomplete:\n return {\n text: 'Reject',\n icon: ,\n };\n case SketchOrderStatus.Exception:\n return {\n text: 'Mark Needs Attention',\n icon: ,\n };\n case SketchOrderStatus.Cancelled:\n return {\n text: 'Cancel',\n icon: ,\n };\n case SketchOrderStatus.InReview:\n return {\n text: 'Send to In Review',\n icon: ,\n };\n default:\n return {\n text: `Move to ${status}`,\n };\n }\n };\n\n renderMenuItems = (status) => {\n const menuItemContext = this.getMenuItemContext(status);\n return (\n this.handleMenuItemClick(status)}\n >\n {menuItemContext.icon && (\n {menuItemContext.icon}\n )}\n \n \n );\n };\n\n renderBackdropComponent = () => (\n \n );\n\n render() {\n const context = this.getButtonContext();\n return (\n this.props.allowedStatusTransitions &&\n this.props.allowedStatusTransitions.length > 0 && (\n \n \n\n \n {this.props.allowedStatusTransitions.map(\n this.renderMenuItems,\n )}\n \n \n )\n );\n }\n}\n\nTransitionSketchOrderButton.propTypes = {\n currentStatus: PropTypes.string.isRequired,\n allowedStatusTransitions: PropTypes.arrayOf(PropTypes.string),\n onClick: PropTypes.func,\n disabled: PropTypes.bool,\n buttonStyle: PropTypes.shape({}),\n};\n\nTransitionSketchOrderButton.defaultProps = {\n allowedStatusTransitions: [],\n disabled: false,\n buttonStyle: null,\n};\n\nexport default TransitionSketchOrderButton;\n","import TransitionSketchOrderButton from './TransitionSketchOrderButton.jsx';\n\nexport default TransitionSketchOrderButton;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport find from 'lodash/find';\nimport includes from 'lodash/includes';\nimport remove from 'lodash/remove';\nimport { connect } from 'react-redux';\nimport Card from '@material-ui/core/Card';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Warning from '@material-ui/icons/Warning';\nimport withStyles from '@material-ui/core/styles/withStyles';\nimport { yellow, amber } from '@material-ui/core/colors';\nimport { SketchOrderStatus } from '../../lib/sketchOrderStatuses';\nimport featureFlags from '../../lib/FeatureFlags';\nimport {\n createNotification,\n updateNotification,\n removeNotification,\n} from '../../actions/sketchOrderNotificationActions';\nimport { getNotifications } from '../../actions/sketchOrderNotificationsActions';\nimport { getNotificationTemplates } from '../../actions/notificationTemplatesActions';\nimport { getProject } from '../../actions/projectActions';\nimport { getProjectDrawingSummary } from '../../actions/projectDrawingSummaryActions';\nimport {\n getSketchOrder,\n updateSketchOrder,\n deleteSketchOrderProject,\n} from '../../actions/sketchOrderActions';\nimport { getSketchOrderTiers } from '../../actions/sketchOrderTiersActions';\nimport { getUserProfiles } from '../../actions/userProfilesActions';\nimport Alert from '../../components/Alert';\nimport RoofSnapConfirmationDialog from '../../components/RoofSnapConfirmationDialog';\nimport RoofSnapSnackBar from '../../components/RoofSnapSnackBar';\nimport SetSketchTechDialog from '../SetSketchTechDialog/SetSketchTechDialog';\nimport SketchOrderCard from '../../components/SketchOrderCard';\nimport SketchOrderNotificationsDrawer from '../../components/SketchOrderNotificationsDrawer';\nimport SketchOrderDeliveryOptions from '../../components/SketchOrderDeliveryOptions';\nimport TransitionSketchOrderButton from '../../components/TransitionSketchOrderButton';\n\nconst styles = (theme) => ({\n root: {\n position: 'relative',\n },\n warning: {\n backgroundColor: yellow[100],\n border: `solid 3px ${amber[500]}`,\n marginBottom: theme.spacing(1),\n },\n warningIcon: {\n backgroundColor: yellow[100],\n color: amber[500],\n fontSize: 42,\n },\n warningTitle: {\n color: amber[500],\n fontSize: 24,\n },\n warningText: {\n color: amber[500],\n },\n});\n\nexport class SketchOrder extends Component {\n constructor(props) {\n super(props);\n this.state = {\n sketchOrder: { deliveryOptions: [] },\n project: {},\n newSketchOrderStatus: '',\n newLocation: null,\n newSketchTechUserId: null,\n message: '',\n messageType: '',\n snackBar: false,\n confirmationDialogOpen: false,\n dialogTitle: '',\n reportTypeChanged: false,\n setSketchTechDialogOpen: false,\n drawerMode: 'list',\n selectedTemplate: null,\n notification: null,\n deleteProjectDialogOpen: false,\n alertMessage: '',\n alertOpen: false,\n };\n\n this.updateSketchOrder = this.updateSketchOrder.bind(this);\n }\n\n async componentDidMount() {\n await Promise.all([\n this.getSketchOrderInformation(),\n this.props.dispatch(getSketchOrderTiers()),\n ]);\n await this.props.dispatch(getNotifications(this.props.match.params.id));\n this.getNotificationTemplates();\n }\n\n componentDidUpdate(prevProps) {\n const { totalPages, currentPage, isFetching } = this.props.templates;\n if (prevProps.templates && !isFetching && currentPage !== totalPages) {\n this.getNotificationTemplates(currentPage + 1);\n }\n }\n\n sketchOrder = () =>\n this.props.sketchOrders[this.props.match.params.id] || {};\n\n getNotificationTemplates = (page = 1) => {\n this.props.dispatch(getNotificationTemplates(page));\n };\n\n getSketchOrderInformation = async () => {\n // try to pull the sketch order from the data store, if we have it\n let sketchOrder;\n if (this.sketchOrder().id) {\n sketchOrder = this.sketchOrder();\n } else {\n const result = await this.props.dispatch(\n getSketchOrder(this.props.match.params.id),\n );\n if (!result.response) return;\n\n sketchOrder = result.response;\n }\n\n this.setState({\n sketchOrder,\n newLocation: sketchOrder.newLocation,\n });\n\n // If the user is a sketch os admin or a roofsnap admin, go get the user profiles\n if (\n (this.props.currentUserRoles.isAdmin ||\n this.props.currentUserRoles.isSketchOsAdmin) &&\n sketchOrder.organization\n ) {\n await this.props.dispatch(\n getUserProfiles(1, null, sketchOrder.organization.id),\n );\n }\n\n await this.props.dispatch(\n getProjectDrawingSummary(sketchOrder.projectId),\n );\n await this.getProject(sketchOrder.projectId);\n };\n\n getProject = async (projectId) => {\n if (!projectId) {\n this.setState({\n project: {\n isFetching: false,\n },\n });\n return;\n }\n\n const result = await this.props.dispatch(getProject(projectId));\n if (!result.response) return;\n\n this.setState({\n project: result.response,\n });\n };\n\n handleDeleteProjectClick = () => {\n this.setState({\n deleteProjectDialogOpen: true,\n });\n };\n\n deleteProject = async () => {\n const id = this.sketchOrder().id;\n const result = await this.props.dispatch(deleteSketchOrderProject(id));\n if (result.response && result.response.success) {\n this.setState({\n project: {\n isFetching: false,\n },\n message: 'Project deleted',\n messageType: 'success',\n snackBar: true,\n });\n } else {\n this.setState({\n project: {\n isFetching: false,\n },\n message: 'Project deletion failed',\n messageType: 'error',\n snackBar: true,\n });\n }\n await this.getSketchOrderInformation();\n };\n\n buildSketchOrder = () => {\n const { sketchOrder, newSketchOrderStatus } = this.state;\n const updatedSketchOrder = {\n projectName: sketchOrder.projectName,\n notes: sketchOrder.notes,\n sketchOrderStatus:\n newSketchOrderStatus || sketchOrder.sketchOrderStatus,\n address: sketchOrder.address,\n city: sketchOrder.city,\n region: sketchOrder.region,\n postCode: sketchOrder.postCode,\n country: sketchOrder.country,\n location: sketchOrder.location,\n sketchReportType: sketchOrder.sketchReportType,\n sketchOrderTierId: sketchOrder.sketchOrderTierId,\n cost: sketchOrder.cost,\n internalNotes: sketchOrder.internalNotes,\n sketchTechUserId:\n this.state.newSketchTechUserId ||\n this.sketchOrder().sketchTechUserId,\n deliveryOptions: sketchOrder.deliveryOptions,\n freeOrder: sketchOrder.freeOrder,\n rushed: sketchOrder.rushed,\n rushCost: sketchOrder.rushCost,\n dueDate: sketchOrder.dueDate,\n };\n\n if (sketchOrder.owner) {\n updatedSketchOrder.ownerUserId = sketchOrder.owner.userId;\n }\n\n return updatedSketchOrder;\n };\n\n async updateSketchOrder() {\n this.setState({\n alertOpen: false,\n });\n const sketchOrderToUpdate = this.buildSketchOrder();\n const result = await this.props.dispatch(\n updateSketchOrder(\n this.state.sketchOrder.id,\n sketchOrderToUpdate,\n this.sketchOrder().version,\n ),\n );\n if (result.response) {\n this.setState({\n sketchOrder: result.response,\n message: 'Order updated',\n messageType: 'success',\n snackBar: true,\n reportTypeChanged: false,\n });\n\n // Go get the updated sketch order's project\n await this.getProject(result.response.projectId);\n } else {\n this.setState({\n sketchOrder: this.sketchOrder(),\n alertOpen: true,\n alertMessage: 'Unable to update order',\n });\n }\n }\n\n updateSketchOrderRequest = async (status) => {\n this.setState(\n {\n newSketchOrderStatus: status,\n },\n async () => {\n // If we are moving from Exception to InProgress, set the Sketch Tech\n if (!this.state.newSketchTechUserId) {\n if (\n this.sketchOrder().sketchOrderStatus ===\n SketchOrderStatus.Exception &&\n this.state.newSketchOrderStatus ===\n SketchOrderStatus.InProgress\n ) {\n this.setState({ setSketchTechDialogOpen: true });\n return;\n }\n }\n\n if (!this.state.confirmationDialogOpen) {\n this.openConfirmationDialog();\n return;\n }\n\n await this.updateSketchOrder();\n },\n );\n };\n\n searchOrganizationsUsers = async (searchValue) => {\n await this.props.dispatch(\n getUserProfiles(1, searchValue, this.sketchOrder().organization.id),\n );\n };\n\n openConfirmationDialog = () => {\n this.setState({\n dialogTitle: `Are you sure you want to move this order to ${this.state.newSketchOrderStatus}?`,\n confirmationDialogOpen: true,\n });\n };\n\n handleChange = (event) => {\n const sketchOrder = Object.assign({}, this.state.sketchOrder);\n sketchOrder[event.target.name] = event.target.value;\n this.setState({ sketchOrder });\n };\n\n handleSnackBarClose = () => {\n this.setState({ snackBar: false });\n };\n\n resetNewSketchTech = () => {\n const sketchOrder = Object.assign({}, this.state.sketchOrder);\n sketchOrder.sketchTech = this.sketchOrder().sketchTech;\n\n this.setState({\n newSketchTechUserId: null,\n sketchOrder,\n });\n };\n\n handleConfirmationDialogClose = () => {\n this.setState({\n confirmationDialogOpen: false,\n });\n this.resetNewSketchTech();\n };\n\n handleSetSketchDialogClose = () => {\n this.setState({\n setSketchTechDialogOpen: false,\n });\n this.resetNewSketchTech();\n };\n\n handleDeleteProjectDialogClose = () => {\n this.setState({\n deleteProjectDialogOpen: false,\n });\n };\n\n handleOwnerChange = (object) => {\n const sketchOrder = Object.assign({}, this.state.sketchOrder);\n\n sketchOrder.owner = {\n userId: object.value,\n userName: object.label,\n };\n this.setState({ sketchOrder });\n };\n\n handleSketchTechChange = (object) => {\n const sketchOrder = Object.assign({}, this.state.sketchOrder);\n\n sketchOrder.sketchTech = {\n userId: object.value,\n userName: object.label,\n };\n this.setState({ sketchOrder });\n };\n\n setSketchTech = async () => {\n this.setState({\n setSketchTechDialogOpen: false,\n newSketchTechUserId: this.state.sketchOrder.sketchTech.userId,\n });\n await this.updateSketchOrderRequest(this.state.newSketchOrderStatus);\n };\n\n handleLocationChange = (event) => {\n const newLocation = {\n coordinates: [event.latLng.lng(), event.latLng.lat()],\n type: 'Point',\n };\n const sketchOrder = Object.assign({}, this.state.sketchOrder);\n\n if (\n sketchOrder.sketchOrderGroup &&\n sketchOrder.sketchOrderGroup.mapMarkerPoints.length\n ) {\n const groupedMarker =\n sketchOrder.sketchOrderGroup.mapMarkerPoints.find((marker) => {\n return (\n marker.point.coordinates[0] ===\n sketchOrder.location.coordinates[0] &&\n marker.point.coordinates[1] ===\n sketchOrder.location.coordinates[1]\n );\n });\n\n groupedMarker.point = newLocation;\n }\n\n sketchOrder.location = newLocation;\n\n this.setState({ sketchOrder });\n };\n\n handleDeliveryOptionsChange = (deliveryOption, removeOption) => {\n const sketchOrder = Object.assign({}, this.state.sketchOrder);\n if (removeOption) {\n sketchOrder.deliveryOptions = remove(\n sketchOrder.deliveryOptions,\n deliveryOption,\n );\n } else {\n sketchOrder.deliveryOptions.push(deliveryOption);\n }\n this.setState({ sketchOrder });\n };\n\n handleOnFreeOrderChange = (event) => {\n const sketchOrder = Object.assign({}, this.state.sketchOrder);\n sketchOrder.freeOrder = event.target.checked;\n this.setState({ sketchOrder });\n };\n\n handleAddNotificationButtonClick = (e, id) => {\n const notification = find(this.props.notifications, ['id', id]);\n this.setState({\n drawerMode: 'new',\n notification,\n });\n };\n handleNotificationBackButtonClick = async () => {\n if (!this.state.notification) {\n this.setState({\n drawerMode: 'list',\n });\n return;\n }\n\n const { id, notificationTemplateId, customNotes, version } =\n this.state.notification;\n\n // New notification, so create!\n if (!id) {\n await this.props.dispatch(\n createNotification(this.props.match.params.id, {\n createdByUserId: this.props.currentUser.userId,\n notificationTemplateId,\n customNotes,\n }),\n );\n } else {\n await this.props.dispatch(\n updateNotification(\n this.props.match.params.id,\n id,\n {\n notificationTemplateId,\n customNotes,\n },\n version,\n ),\n );\n }\n\n this.setState({\n drawerMode: 'list',\n notification: null,\n });\n };\n handleNotificationDeleteButtonClick = async () => {\n if (!this.state.notification) return;\n\n await this.props.dispatch(\n removeNotification(\n this.props.match.params.id,\n this.state.notification.id,\n ),\n );\n\n this.setState({\n drawerMode: 'list',\n notification: null,\n });\n };\n handleTemplateSelected = (id) => {\n this.setState({\n notification: Object.assign({}, this.state.notification, {\n notificationTemplateId: id,\n }),\n });\n };\n handleCustomNotesChange = (e) => {\n this.setState({\n notification: Object.assign({}, this.state.notification, {\n customNotes: e.target.value,\n }),\n });\n };\n\n handleReportTypeChange = (event) => {\n const sketchOrder = Object.assign({}, this.state.sketchOrder);\n sketchOrder[event.target.name] = event.target.value;\n this.setState({\n sketchOrder: sketchOrder,\n reportTypeChanged: !this.state.reportTypeChanged,\n });\n };\n\n getTransitionButtonStyle = () => {\n const { isAdmin, isSketchOsAdmin } = this.props.currentUserRoles;\n\n if (isAdmin || isSketchOsAdmin) {\n return {\n right: 320,\n };\n }\n\n return null;\n };\n\n handleDismissAlert = () => {\n this.setState({\n alertOpen: false,\n });\n };\n\n render() {\n const { classes } = this.props;\n const { isAdmin, isSketchOsAdmin } = this.props.currentUserRoles;\n\n const { editableProperties } = this.sketchOrder();\n\n const canEditAddress = () => {\n const canEditAddress = includes(editableProperties, 'Address');\n const canEditCity = includes(editableProperties, 'City');\n const canEditRegion = includes(editableProperties, 'Region');\n const canEditPostCode = includes(editableProperties, 'Postcode');\n const canEditCountry = includes(editableProperties, 'Country');\n\n return (\n canEditAddress &&\n canEditCity &&\n canEditRegion &&\n canEditPostCode &&\n canEditCountry\n );\n };\n\n const showReportType =\n this.sketchOrder().sketchOrderStatus !==\n SketchOrderStatus.Pending ||\n isAdmin ||\n isSketchOsAdmin;\n\n const transitionButtonStyle = this.getTransitionButtonStyle();\n\n const sketchTechIsAssignedToSketchOrder =\n this.sketchOrder().sketchTechUserId ===\n this.props.currentUser.userId;\n const isInProgress =\n this.sketchOrder().sketchOrderStatus ===\n SketchOrderStatus.InProgress;\n const isPending =\n this.sketchOrder().sketchOrderStatus === SketchOrderStatus.Pending;\n const authorizedToOpenDrawing =\n this.props.isAdmin ||\n (this.props.isSketchTech &&\n isInProgress &&\n sketchTechIsAssignedToSketchOrder);\n return (\n
\n \n \n\n \n\n \n {this.state.sketchOrder.sketchTech &&\n this.state.sketchOrder.sketchOrderStatus ===\n SketchOrderStatus.InProgress &&\n this.state.sketchOrder.sketchTech.userId !==\n this.props.currentUser.userId && (\n \n \n }\n titleTypographyProps={{\n className:\n this.props.classes\n .warningTitle,\n }}\n subheaderTypographyProps={{\n className:\n this.props.classes\n .warningText,\n }}\n />\n \n )}\n {this.state.sketchOrder.reviewer &&\n this.state.sketchOrder.sketchOrderStatus ===\n SketchOrderStatus.InReview &&\n this.state.sketchOrder.reviewer.userId !==\n this.props.currentUser.userId && (\n \n \n }\n titleTypographyProps={{\n className:\n this.props.classes\n .warningTitle,\n }}\n subheaderTypographyProps={{\n className:\n this.props.classes\n .warningText,\n }}\n />\n \n )}\n {this.state.sketchOrder.sketchOrderStatus ===\n SketchOrderStatus.InReview &&\n featureFlags.sketchOrderDeliveryOptions && (\n \n )}\n \n }\n />\n \n\n {(isAdmin || isSketchOsAdmin) && (\n \n )}\n\n \n\n {(isAdmin || isSketchOsAdmin) && (\n \n )}\n
\n );\n }\n}\n\nSketchOrder.propTypes = {\n dispatch: PropTypes.func.isRequired,\n isFetching: PropTypes.bool.isRequired,\n project: PropTypes.shape({\n id: PropTypes.string,\n hasDrawing: PropTypes.bool,\n isFetching: PropTypes.bool.isRequired,\n }).isRequired,\n sketchOrderTiers: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n name: PropTypes.string.isRequired,\n sketchOrderTierDefinition: PropTypes.shape({\n minimumValue: PropTypes.number.isRequired,\n maximumValue: PropTypes.number.isRequired,\n sketchOrderTierDefinition: PropTypes.string.isRequired,\n }).isRequired,\n }),\n ).isRequired,\n currentUserRoles: PropTypes.shape({\n isAdmin: PropTypes.bool,\n isSketchOsAdmin: PropTypes.bool,\n isSketchTech: PropTypes.bool,\n }).isRequired,\n userProfiles: PropTypes.arrayOf(\n PropTypes.shape({\n userId: PropTypes.number,\n userName: PropTypes.string,\n }),\n ).isRequired,\n match: PropTypes.shape({\n params: PropTypes.shape({\n id: PropTypes.string.isRequired,\n }).isRequired,\n }).isRequired,\n projectDrawingSummary: PropTypes.shape({\n numberOfFacets: PropTypes.number,\n actualSquares: PropTypes.number,\n }).isRequired,\n freeOrder: PropTypes.bool,\n templates: PropTypes.shape({\n templates: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n label: PropTypes.string.isRequired,\n description: PropTypes.string.isRequired,\n infoLink: PropTypes.string.isRequired,\n priorityLevel: PropTypes.string.isRequired,\n notificationType: PropTypes.string.isRequired,\n active: PropTypes.bool.isRequired,\n }).isRequired,\n ).isRequired,\n totalResults: PropTypes.number.isRequired,\n totalPages: PropTypes.number.isRequired,\n currentPage: PropTypes.number.isRequired,\n }).isRequired,\n currentUser: PropTypes.shape({\n userId: PropTypes.number.isRequired,\n }).isRequired,\n};\n\nconst mapStateToProps = (state) => {\n const {\n currentUserRoles,\n sketchOrderTiers: sketchOrderTiersStore,\n userProfiles: userProfilesStore,\n project,\n currentUser,\n projectDrawingSummary,\n freeOrder,\n notificationTemplates: templates,\n sketchOrderNotifications,\n sketchOrders: sketchOrdersStore,\n } = state;\n const { sketchOrderTiers } = sketchOrderTiersStore;\n const { userProfiles } = userProfilesStore;\n const { sketchOrders } = sketchOrdersStore;\n\n const { isSketchTech } = currentUserRoles;\n const isAdmin =\n currentUserRoles.isAdmin || currentUserRoles.isSketchOsAdmin;\n\n const notifications = sketchOrderNotifications.notifications.map((n) => {\n return {\n ...n,\n isAcknowledged:\n n.notificationAcknowledgements &&\n n.notificationAcknowledgements.resourceList &&\n n.notificationAcknowledgements.resourceList.length > 0,\n template: n.notificationTemplate,\n };\n });\n\n return {\n currentUserRoles,\n sketchOrderTiers,\n userProfiles,\n project,\n isAdmin,\n isSketchTech,\n projectDrawingSummary,\n freeOrder,\n templates,\n currentUser,\n notifications,\n sketchOrders,\n };\n};\n\nexport default connect(mapStateToProps)(withStyles(styles)(SketchOrder));\n","// @flow\n\nimport ProjectClient from \"../lib/apiClients/roofSnapApiClient/projectClient\";\nimport { CALL_API } from \"../middleware/api\";\nimport {\n GET_PROJECT_DRAWING_SUMMARY_REQUEST, \n GET_PROJECT_DRAWING_SUMMARY_SUCCESS, \n GET_PROJECT_DRAWING_SUMMARY_FAILURE\n} from \"./actionTypes\";\n\nexport const getProjectDrawingSummary = (id: string) => {\n const projectClient = new ProjectClient('v1');\n const request = projectClient.getProjectDrawingSummary;\n\n return {\n [CALL_API]: {\n types: [\n GET_PROJECT_DRAWING_SUMMARY_REQUEST,\n GET_PROJECT_DRAWING_SUMMARY_SUCCESS,\n GET_PROJECT_DRAWING_SUMMARY_FAILURE,\n ],\n request,\n params: {\n id\n }\n },\n };\n};\n\n","// @flow\n\nimport ProjectClient from \"../lib/apiClients/roofSnapApiClient/projectClient\";\nimport { CALL_API } from \"../middleware/api\";\nimport {\n GET_PROJECT_FAILURE,\n GET_PROJECT_REQUEST,\n GET_PROJECT_SUCCESS\n} from \"./actionTypes\";\n\nexport const getProject = (id: string) => {\n const projectClient = new ProjectClient('v1');\n const request = projectClient.getProject;\n\n return {\n [CALL_API]: {\n types: [\n GET_PROJECT_REQUEST,\n GET_PROJECT_SUCCESS,\n GET_PROJECT_FAILURE,\n ],\n request,\n params: {\n id\n }\n },\n };\n};\n","import SketchAdminSketchOrderClient from '../lib/apiClients/roofSnapApiClient/sketchAdminSketchOrderClient';\nimport { CALL_API } from '../middleware/api';\nimport {\n CREATE_SKETCH_ORDER_NOTIFICATION_REQUEST,\n CREATE_SKETCH_ORDER_NOTIFICATION_SUCCESS,\n CREATE_SKETCH_ORDER_NOTIFICATION_FAILURE,\n UPDATE_SKETCH_ORDER_NOTIFICATION_REQUEST,\n UPDATE_SKETCH_ORDER_NOTIFICATION_SUCCESS,\n UPDATE_SKETCH_ORDER_NOTIFICATION_FAILURE,\n} from './actionTypes';\nimport { getNotifications } from './sketchOrderNotificationsActions';\n\nexport const createNotification = (sketchOrderId, body) => {\n return async (dispatch) => {\n const adminSketchOrderClient = new SketchAdminSketchOrderClient('v2');\n const request = adminSketchOrderClient.createNotification;\n\n const params = {\n sketchOrderId,\n body,\n };\n\n const createNotificationAction = await dispatch({\n [CALL_API]: {\n types: [\n CREATE_SKETCH_ORDER_NOTIFICATION_REQUEST,\n CREATE_SKETCH_ORDER_NOTIFICATION_SUCCESS,\n CREATE_SKETCH_ORDER_NOTIFICATION_FAILURE,\n ],\n request,\n params,\n }\n });\n\n dispatch(getNotifications(sketchOrderId));\n\n return createNotificationAction;\n };\n};\n\nexport const updateNotification = (sketchOrderId, id, body, version) => {\n return async (dispatch) => {\n const adminSketchOrderClient = new SketchAdminSketchOrderClient('v2');\n const request = adminSketchOrderClient.updateNotification;\n\n const params = {\n sketchOrderId,\n id,\n body,\n version,\n };\n\n const updateNotificationAction = await dispatch({\n [CALL_API]: {\n types: [\n UPDATE_SKETCH_ORDER_NOTIFICATION_REQUEST,\n UPDATE_SKETCH_ORDER_NOTIFICATION_SUCCESS,\n UPDATE_SKETCH_ORDER_NOTIFICATION_FAILURE,\n ],\n request,\n params,\n }\n });\n\n dispatch(getNotifications(sketchOrderId));\n\n return updateNotificationAction;\n };\n};\n\nexport const removeNotification = (sketchOrderId, id) => {\n return async (dispatch) => {\n const adminSketchOrderClient = new SketchAdminSketchOrderClient('v2');\n const request = adminSketchOrderClient.deleteNotification;\n\n const params = {\n sketchOrderId,\n id,\n };\n\n const removeNotificationAction = await dispatch({\n [CALL_API]: {\n types: [\n UPDATE_SKETCH_ORDER_NOTIFICATION_REQUEST,\n UPDATE_SKETCH_ORDER_NOTIFICATION_SUCCESS,\n UPDATE_SKETCH_ORDER_NOTIFICATION_FAILURE,\n ],\n request,\n params,\n }\n });\n\n dispatch(getNotifications(sketchOrderId));\n\n return removeNotificationAction;\n };\n};\n","// @flow\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { showSketch } from '../../actions/sketchHostActions';\n\ntype ProvidedProps = {\n dispatch: Function,\n jwt: string,\n match: {\n params: {\n id: string,\n projectId: string,\n }\n },\n}\n\nclass SketchRoute extends Component {\n formRef: Object;\n\n constructor(props) {\n super(props);\n\n this.formRef = React.createRef();\n }\n\n async componentDidMount() {\n await this.openSketch();\n }\n\n async componentDidUpdate() {\n await this.openSketch();\n }\n\n openSketch = async () => {\n if (window.location.href.includes('showExp')) {\n this.formRef.current.submit();\n } else {\n this.props.dispatch(showSketch(this.props.match.params.id, this.props.match.params.projectId));\n }\n };\n\n getRefUrlBackToOrdersPage = () => {\n const url = window.location.href;\n const index = url.lastIndexOf('/sketch');\n if (index !== -1) {\n return url.substr(0, index);\n } else {\n console.warn('unable to setup ref correctly');\n return url;\n }\n };\n\n render() {\n const baseUrl = process.env.REACT_APP_EXP_SKETCHTOOL_URL || '';\n if (baseUrl === '') {\n console.warn('unable to find process.env.REACT_APP_EXP_SKETCHTOOL_URL!');\n }\n const env = process.env.REACT_APP_ENVIRONMENT\n ? process.env.REACT_APP_ENVIRONMENT.endsWith('development') ? 'dev' : 'prod'\n : 'dev';\n return (\n
\n
\n \n \n \n \n
\n
\n );\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n jwt: state.auth.accessToken\n }\n};\n\nexport default connect(mapStateToProps)(SketchRoute);\n","// @flow\n\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { MapImageryOptions } from 'roofsnap-map-imagery';\nimport {getSketchOrder} from \"../../actions/sketchOrderActions\";\nimport RoofSnapSnackBar from \"../../components/RoofSnapSnackBar\";\nimport featureFlags from '../../lib/FeatureFlags';\n\ntype ProvidedProps = {\n dispatch: Function,\n accessToken: string,\n history: {\n push: Function,\n },\n match: {\n params: {\n id: string,\n }\n },\n isSketchOsAdmin: boolean,\n};\n\ntype State = {\n latitude: ?number,\n longitude: ?number,\n projectId: ?string,\n snackBar: boolean,\n message: string,\n messageType: '' | 'success' | 'error',\n};\n\nclass MapImageryOptionsHost extends Component {\n state: State = {\n latitude: null,\n longitude: null,\n projectId: null,\n snackBar: false,\n message: '',\n messageType: '',\n };\n\n async componentDidMount(): Promise {\n await this.setUp();\n }\n\n setUp = async () => {\n const result = await this.props.dispatch(getSketchOrder(this.props.match.params.id));\n if (!result.response) {\n return;\n }\n const { location, projectId } = result.response;\n\n this.setState({\n latitude: location.coordinates[1],\n longitude: location.coordinates[0],\n projectId\n })\n };\n\n goToSketch = () => {\n\n const projectId = this.state.projectId ? this.state.projectId : '';\n if(projectId === '') {\n console.warn('projectId was falsy');\n }\n const url = window.location.href.includes('showExp')\n ? `/orders/${this.props.match.params.id}/sketch/${projectId}?showExp=true`\n : `/orders/${this.props.match.params.id}/sketch/${projectId}`;\n this.props.history.push(url);\n };\n\n handleError = (error) => {\n this.setState({\n messageType: 'error',\n message: error.message,\n });\n };\n\n handleSnackBarClose = () => {\n this.setState({ snackBar: false });\n };\n\n handleOnEvent = (event) => {\n switch(event.type) {\n case 'ZOOM_IN':\n window.gtag('event', event.type, {\n 'event_category': 'Map Imagery',\n 'event_label': event.data.imageSource,\n 'event_value': event.data.newZoomLevel,\n 'previous_zoom_level': event.data.previousZoomLevel,\n 'new_zoom_level': event.data.newZoomLevel,\n });\n break;\n case 'ZOOM_OUT':\n window.gtag('event', event.type, {\n 'event_category': 'Map Imagery',\n 'event_label': event.data.imageSource,\n 'event_value': event.data.newZoomLevel,\n 'previous_zoom_level': event.data.previousZoomLevel,\n 'new_zoom_level': event.data.newZoomLevel,\n });\n break;\n default:\n break;\n }\n };\n\n render() {\n return (\n
\n {\n this.state.projectId &&\n {}}\n onImagerySelected={(source) => {}}\n onEvent={this.handleOnEvent}\n nearmapAutoZoomLevel={this.props.isSketchOsAdmin ? 1 : 0}\n rsClient=\"ShadyShark\"\n vexcelDisabled={!featureFlags.vexcelImagery}\n roofsnapImageryApiBaseUrl={`${process.env.REACT_APP_ROOFSNAP_IMAGERY_HOST}`}\n disableParcelLines={!featureFlags.parcelLines}\n parcelSdkUrl={process.env.REACT_APP_PARCEL_STREAM_URL}\n spatialStreamUrl={process.env.REACT_APP_SPATIAL_STREAM_URL}\n jwtProxyUrl={process.env.REACT_APP_ROOFSNAP_JWT_PROXY}\n />\n }\n\n \n\n
\n );\n }\n}\n\nconst mapStateToProps = (state) => {\n const { auth, currentUserRoles } = state;\n const { isSketchOsAdmin } = currentUserRoles;\n const { accessToken } = auth;\n\n return {\n accessToken,\n isSketchOsAdmin,\n }\n};\n\nexport default connect(mapStateToProps)(MapImageryOptionsHost);\n","// @flow\n\nimport { type SearchSketchOrder } from \"../typeDefinitions/searchSketchOrder\";\nimport { type SketchOrder } from \"../typeDefinitions/sketchOrder\";\n\nexport const mapSearchSketchOrderToSketchOrder = (searchSketchOrder: SearchSketchOrder): SketchOrder => {\n return {\n id: parseInt(searchSketchOrder.id, 10), // cast to a number,\n projectName: searchSketchOrder.projectName,\n completedDate: searchSketchOrder.completedDate,\n requestedDate: searchSketchOrder.requestedDate,\n updatedAt: searchSketchOrder.updatedAt,\n address: searchSketchOrder.address,\n city: searchSketchOrder.city,\n region: searchSketchOrder.region,\n postCode: searchSketchOrder.postCode,\n country: searchSketchOrder.country,\n sketchOrderStatus: searchSketchOrder.sketchOrderStatus,\n cost: searchSketchOrder.cost,\n projectId: searchSketchOrder.projectId,\n organization: {\n id: searchSketchOrder.organizationId,\n name: searchSketchOrder.organizationName\n },\n requester: {\n userId: searchSketchOrder.requesterUserId,\n userName: searchSketchOrder.requesterUserName,\n },\n owner: {\n userId: searchSketchOrder.ownerUserId,\n userName: searchSketchOrder.ownerUserName\n },\n };\n};","import SketchOrderTable from \"./SketchOrderTable\";\n\nexport default SketchOrderTable;\n","import SketchOrderList from \"./SketchOrderList\";\n\nexport default SketchOrderList;\n","// @flow\nimport RoofSnapSearchApiClient from 'roofsnap-search-api-client';\nimport {\n GET_SEARCH_SKETCH_ORDERS_REQUEST,\n GET_SEARCH_SKETCH_ORDERS_SUCCESS,\n GET_SEARCH_SKETCH_ORDERS_FAILURE,\n} from './actionTypes';\nimport { CALL_API } from \"../middleware/api\";\nimport LocalStorageWrapper from \"../lib/localStorageWrapper\";\n\nexport const searchSketchOrders = (search: string, page: number = 1) => {\n const accessToken = LocalStorageWrapper.getItem('accessToken');\n const apiClientInit = {\n token: accessToken,\n environment: process.env.REACT_APP_ENVIRONMENT,\n apiVersion: '2017-11-11',\n };\n const roofSnapSearchClient = new RoofSnapSearchApiClient(apiClientInit);\n const request: Function = roofSnapSearchClient.search;\n\n return {\n [CALL_API]: {\n types: [\n GET_SEARCH_SKETCH_ORDERS_REQUEST,\n GET_SEARCH_SKETCH_ORDERS_SUCCESS,\n GET_SEARCH_SKETCH_ORDERS_FAILURE,\n ],\n request,\n params: {\n endpoint: \"sketchorders\",\n search: search,\n page,\n }\n }\n }\n};\n","// @flow\n\nimport React, {Component} from 'react';\nimport {connect} from 'react-redux';\nimport Hidden from '@material-ui/core/Hidden';\nimport queryString from 'query-string';\nimport mapKeys from 'lodash/mapKeys';\nimport {type SearchSketchOrder} from '../../typeDefinitions/searchSketchOrder';\nimport {type UserRoles} from '../../typeDefinitions/userRoles';\nimport {type SketchOrder} from '../../typeDefinitions/sketchOrder';\nimport { mapSearchSketchOrderToSketchOrder } from \"../../lib/sketchOrderHelpers\";\nimport SketchOrderTable from '../../components/SketchOrderTable';\nimport SketchOrderList from '../../components/SketchOrderList';\nimport { searchSketchOrders } from \"../../actions/searchSketchOrdersActions\";\n\ntype Location = {\n search: string,\n};\n\ntype Props = {\n dispatch: Function,\n sketchOrders: Array,\n totalResults: number,\n currentPage: number,\n totalPages: number,\n isFetching: boolean,\n currentUserRoles: UserRoles,\n location: Location,\n currentUserName: string,\n};\n\nexport class SearchSketchOrders extends Component {\n async componentDidMount() {\n await this.getSketchOrders();\n }\n\n async componentDidUpdate(prevProps: Props) {\n if (prevProps.location.search !== this.props.location.search) {\n await this.getSketchOrders();\n }\n }\n\n getSketchOrders = async (page: number = 1): Promise => {\n const queryParams = queryString.parse(this.props.location.search);\n const { q: search } = queryParams;\n\n await this.props.dispatch(searchSketchOrders(search, page));\n };\n\n getNextPage = async (): Promise => {\n const nextPage: number = this.props.currentPage + 1;\n await this.getSketchOrders(nextPage);\n };\n\n getPrevPage = async (): Promise => {\n const prevPage: number = this.props.currentPage - 1;\n await this.getSketchOrders(prevPage);\n };\n\n render() {\n const isSketchOsAdmin = (this.props.currentUserRoles.isAdmin || this.props.currentUserRoles.isSketchOsAdmin);\n\n const sketchOrders: Array = this.props.sketchOrders.map(mapSearchSketchOrderToSketchOrder);\n const sketchOrderIds = sketchOrders.map(order => order.id);\n\n return (\n
\n \n \n \n \n \n \n
\n );\n }\n}\n\nconst mapStateToProps = (state) => {\n const { searchSketchOrders: searchSketchOrdersStore, currentUserRoles, currentUser } = state;\n const { \n sketchOrders,\n isFetching,\n totalResults,\n totalPages,\n currentPage,\n } = searchSketchOrdersStore;\n const { userName: currentUserName } = currentUser;\n\n return {\n sketchOrders,\n isFetching,\n totalResults,\n totalPages,\n currentPage,\n currentUserRoles,\n currentUserName,\n };\n};\n \nexport default connect(mapStateToProps)(SearchSketchOrders);\n","// @flow\n\nimport React, { Component } from 'react';\nimport { Switch, Route, withRouter } from 'react-router-dom';\nimport Auth from './containers/Auth';\nimport PendingSketchOrders from './containers/QueuedSketchOrders';\nimport PendingSketchOrdersVendor from './containers/QueuedVendorSketchOrders';\nimport ProtectedRoute from './containers/ProtectedRoute';\nimport AllSketchOrders from './containers/AllSketchOrders';\nimport Dashboard from './containers/Dashboard';\nimport MyAssignedSketchOrders from './containers/MyAssignedSketchOrders';\nimport NoMatch from './components/NoMatch/NoMatch';\nimport SketchOrder from './containers/SketchOrder/SketchOrder';\nimport SketchRoute from './containers/SketchComponentHost/SketchRoute';\nimport MapImageryOptionsHost from './containers/MapImageryOptionsHost/MapImageryOptionsHost';\nimport SearchSketchOrders from './containers/SearchSketchOrders/SearchSketchOrders';\n\ntype RouterProvidedProps = {\n location: {\n pathname: String,\n }\n};\n\nclass Content extends Component {\n getMainStyle = () => {\n const mainStyle = {\n padding: 24,\n paddingTop: 24,\n height: '100%',\n };\n\n if (this.props.location.pathname === '/') {\n mainStyle.paddingTop = 100;\n } else {\n mainStyle.paddingTop = 175;\n }\n\n return mainStyle;\n }\n\n render() { \n const mainStyle = this.getMainStyle();\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n }\n}\n \nexport default withRouter(Content);","// @flow\n\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { BrowserRouter, Route } from 'react-router-dom';\nimport { getCurrentUser } from \"./actions/currentUserProfileActions\";\nimport { getCurrentUserRoles } from \"./actions/currentUserRolesActions\";\nimport RoofSnapAppBar from './containers/RoofSnapAppBar';\nimport SketchComponentHost from './containers/SketchComponentHost';\nimport Content from './Content';\n\ntype Props = {\n dispatch: Function,\n isAuthenticated: boolean,\n};\n\nexport class App extends Component {\n async componentDidMount() {\n if (this.props.isAuthenticated) {\n await Promise.all([\n this.props.dispatch(getCurrentUser()),\n this.props.dispatch(getCurrentUserRoles())\n ]);\n }\n }\n\n render() {\n return (\n \n
\n \n {/* Needs to be outside of the main content of the app */}\n \n \n
\n
\n );\n }\n}\n\nconst mapStateToProps = (state) => {\n const { auth } = state;\n const { isAuthenticated } = auth;\n return {\n isAuthenticated\n };\n};\n\nexport default connect(mapStateToProps)(App);\n","// @flow\nimport LogRocket from 'logrocket';\nimport { LOGIN_SUCCESS } from \"../actions/actionTypes\";\n\nclass LoggerWrapper {\n static initialize() {\n if (!process.env.REACT_APP_LOG_ROCKET_APP_ID) {\n return;\n }\n\n LogRocket.init(`${process.env.REACT_APP_LOG_ROCKET_APP_ID}`, {\n network: {\n requestSanitizer: (request) => {\n // Do not log jwt\n if (request.headers.Authorization) {\n request.headers.Authorization = '*********';\n }\n\n return request;\n },\n responseSanitizer: (response) => {\n if (response.body) {\n const body = JSON.parse(response.body);\n if (body['access_token']) {\n body['access_token'] = '********';\n response.body = body;\n }\n }\n\n return response;\n }\n }\n });\n }\n\n static startNewSesstion() {\n LogRocket.startNewSession();\n }\n\n static identify(userName: string, firstName: string, lastName: string) {\n LogRocket.identify(userName, {\n email: userName,\n name: `${firstName} ${lastName}`\n });\n }\n\n static reduxMiddleware() {\n const reduxLoggingOptions = {\n stateSanitizer(state) {\n return {\n ...state,\n auth: {\n ...state.auth,\n accessToken: undefined,\n }\n }\n },\n actionSanitizer(action) {\n if (action.type === LOGIN_SUCCESS) {\n return {\n ...action,\n accessToken: undefined,\n }\n }\n return action;\n }\n };\n return LogRocket.reduxMiddleware(reduxLoggingOptions);\n }\n}\n\nexport default LoggerWrapper;","import {\n LOGIN_REQUEST,\n LOGIN_SUCCESS,\n LOGIN_FAILURE, LOGOUT\n} from '../actions/actionTypes';\nimport LocalStorageWrapper from \"../lib/localStorageWrapper\";\n\nconst initState = {\n isFetching: false,\n isAuthenticated: !!LocalStorageWrapper.getItem('accessToken'),\n errorMessage: '',\n accessToken: LocalStorageWrapper.getItem('accessToken'),\n};\n\nconst authReducer = (state = initState, action) => {\n switch (action.type) {\n case LOGIN_REQUEST:\n return Object.assign({}, state, {\n isFetching: true,\n errorMessage: ''\n });\n case LOGIN_SUCCESS:\n return Object.assign({}, state, {\n isFetching: false,\n isAuthenticated: true,\n errorMessage: '',\n accessToken: action.accessToken,\n });\n case LOGIN_FAILURE:\n return Object.assign({}, state, {\n isFetching: false,\n isAuthenticated: false,\n errorMessage: action.message,\n });\n case LOGOUT:\n return Object.assign({}, state, {\n isAuthenticated: false,\n });\n default:\n return state;\n }\n};\n\nexport default authReducer;\n","import {\n GET_SKETCH_ORDERS_REQUEST,\n GET_SKETCH_ORDERS_SUCCESS,\n GET_SKETCH_ORDERS_FAILURE,\n GET_SKETCH_ORDER_SUCCESS,\n UPDATE_SKETCH_ORDER_SUCCESS,\n GET_SKETCH_ORDER_REQUEST,\n UPDATE_SKETCH_ORDER_REQUEST,\n GET_SKETCH_ORDER_FAILURE,\n UPDATE_SKETCH_ORDER_FAILURE\n} from '../actions/actionTypes';\nimport mapKeys from 'lodash/mapKeys';\n\nconst initState = {\n isFetching: false,\n sketchOrders: {},\n ids: [],\n totalResults: 0,\n totalPages: 0,\n currentPage: 0,\n};\n\nconst mapRequestedDate = (sketchOrders) => {\n if (!sketchOrders)\n return sketchOrders;\n\n return sketchOrders.map(s => {\n //map requesteddate -> requestedDate to keep things simple in the UI. it depends on what endpoint in the\n //api as to how it comes back.\n\n if (!s.requestedDate && s.requesteddate) {\n s.requestedDate = s.requesteddate;\n }\n\n const now = new Date();\n const timeRequested = new Date(s.requestedDate);\n\n s.timeSinceRequested = Math.round((Math.abs(now - timeRequested) / 36e5) * 100) / 100;\n\n return s;\n });\n};\n\nconst normalizeSketchOrders = (sketchOrders) => {\n const sketchOrdersWithMappedRequestedDate = mapRequestedDate(sketchOrders);\n\n return mapKeys(sketchOrdersWithMappedRequestedDate, 'id');\n}\n\nconst sketchOrdersReducer = (state = initState, action) => {\n switch (action.type) {\n case GET_SKETCH_ORDERS_REQUEST:\n return Object.assign({}, state, {\n isFetching: true,\n });\n case GET_SKETCH_ORDERS_SUCCESS:\n return Object.assign({}, state, {\n isFetching: false,\n totalResults: action.response.totalResults,\n totalPages: action.response.totalPages,\n currentPage: action.response.page,\n sketchOrders: normalizeSketchOrders(action.response.resourceList),\n ids: action.response.resourceList.map(sketchOrder => sketchOrder.id),\n });\n case GET_SKETCH_ORDERS_FAILURE:\n return Object.assign({}, state, {\n isFetching: false,\n sketchOrders: {},\n ids: [],\n totalResults: 0,\n totalPages: 0,\n currentPage: 0\n });\n case GET_SKETCH_ORDER_REQUEST:\n case UPDATE_SKETCH_ORDER_REQUEST:\n return Object.assign({}, state, {\n sketchOrders: {\n ...state.sketchOrders,\n [action.params.id]: {\n ...state.sketchOrders[action.params.id],\n isFetching: true,\n }\n }\n });\n case GET_SKETCH_ORDER_SUCCESS:\n case UPDATE_SKETCH_ORDER_SUCCESS:\n return Object.assign({}, state, {\n sketchOrders: {\n ...state.sketchOrders,\n [action.response.id]: {\n isFetching: false,\n ...action.response\n }\n }\n });\n case GET_SKETCH_ORDER_FAILURE:\n case UPDATE_SKETCH_ORDER_FAILURE:\n return Object.assign({}, state, {\n sketchOrders: {\n ...state.sketchOrders,\n [action.params.id]: {\n ...state.sketchOrders[action.params.id],\n isFetching: false,\n }\n }\n });\n default:\n return state;\n }\n};\n\nexport default sketchOrdersReducer;","import {\n GET_CURRENT_USER_REQUEST,\n GET_CURRENT_USER_SUCCESS,\n GET_CURRENT_USER_FAILURE,\n} from \"../actions/actionTypes\";\n\nconst initState = {\n isFetching: false,\n userId: null,\n organizationId: null,\n userName: null,\n firstName: null,\n lastName: null,\n active: null,\n};\n\nconst currentUserReducer = (state = initState, action) => {\n switch (action.type) {\n case GET_CURRENT_USER_REQUEST:\n return Object.assign({}, state, {\n isFetching: true,\n });\n case GET_CURRENT_USER_SUCCESS:\n return Object.assign({\n isFetching: false,\n userId: action.response.userId,\n organizationId: action.response.organizationId,\n userName: action.response.userName,\n firstName: action.response.firstName,\n lastName: action.response.lastName,\n active: action.response.active,\n });\n case GET_CURRENT_USER_FAILURE:\n return Object.assign({\n isFetching: false,\n userId: null,\n organizationId: null,\n userName: null,\n firstName: null,\n lastName: null,\n active: false,\n });\n default:\n return state;\n }\n};\n\nexport default currentUserReducer;\n","import some from 'lodash/some';\nimport UserRole from \"./roles\";\n\nexport const userHasRole = (roles, roleName) => some(roles, ['roleName', roleName]);\n\nexport const getHighestRole = (roles) => {\n if (userHasRole(roles, UserRole.Admin)) {\n return 'RoofSnap Admin';\n }\n\n if (userHasRole(roles, UserRole.SketchOsAdmin)) {\n return 'Sketch OS Admin';\n }\n\n if (userHasRole(roles, UserRole.SketchTech)) {\n return 'Sketch Tech';\n }\n\n if (userHasRole(roles, UserRole.AccountAdmin)) {\n return 'Account Admin';\n }\n\n if (userHasRole(roles, UserRole.SalesAppOnly)) {\n return 'Sales-App Only';\n }\n\n return 'User does not have position';\n};\n","import {\n GET_CURRENT_USER_ROLES_FAILURE,\n GET_CURRENT_USER_ROLES_REQUEST,\n GET_CURRENT_USER_ROLES_SUCCESS\n} from \"../actions/actionTypes\";\nimport { getHighestRole, userHasRole } from \"../lib/userRolesHelper\";\nimport UserRole from \"../lib/roles\";\n\nconst initState = {\n isFetching: false,\n isAdmin: false,\n isAccountAdmin: false,\n isSalesAppOnly: false,\n hasMax: false,\n hasHideSummaryReports: false,\n hasNearmapDisabled: false,\n isSketchTech: false,\n isSketchOsAdmin: false,\n hasSketchOsEnabled: false,\n position: null,\n hasExpSketchToolEnabled: false,\n};\n\nconst currentUserRolesReducer = (state = initState, action) => {\n switch (action.type) {\n case GET_CURRENT_USER_ROLES_REQUEST:\n return Object.assign({}, state, {\n isFetching: true,\n });\n case GET_CURRENT_USER_ROLES_SUCCESS:\n return Object.assign({}, state, {\n isFetching: false,\n isAdmin: userHasRole(action.response, UserRole.Admin),\n isAccountAdmin: userHasRole(action.response, UserRole.AccountAdmin),\n isSalesAppOnly: userHasRole(action.response, UserRole.SalesAppOnly),\n hasHideSummaryReports: userHasRole(action.response, UserRole.HideSummaryReports),\n hasNearmapDisabled: userHasRole(action.response, UserRole.NearmapDisabled),\n hasMax: userHasRole(action.response, UserRole.Max),\n isSketchTech: userHasRole(action.response, UserRole.SketchTech),\n isSketchOsAdmin: userHasRole(action.response, UserRole.SketchOsAdmin),\n hasSketchOsEnabled: userHasRole(action.response, UserRole.SketchOsEnabled) ||\n userHasRole(action.response, UserRole.SketchTech) ||\n userHasRole(action.response, UserRole.SketchOsAdmin) ||\n userHasRole(action.response, UserRole.Admin),\n position: getHighestRole(action.response),\n hasExpSketchToolEnabled: userHasRole(action.response, UserRole.SketchOsExpSketchToolEnabled),\n });\n case GET_CURRENT_USER_ROLES_FAILURE:\n return Object.assign({}, state, {\n isFetching: false,\n });\n default:\n return state;\n }\n};\n\nexport default currentUserRolesReducer;\n","import {\n GET_ALL_SKETCH_ORDER_COUNTS_REQUEST,\n GET_ALL_SKETCH_ORDER_COUNTS_SUCCESS,\n GET_ALL_SKETCH_ORDER_COUNTS_FAILURE,\n UPDATE_ALL_SKETCH_ORDER_COUNTS,\n} from '../actions/actionTypes';\n\nconst initState = {\n isFetchingCounts: false,\n isFetchingOrdersInTheQueue: false,\n totalOrdersInTheQueue: 0,\n isFetchingOrdersInTheVendorQueue: false,\n totalOrdersInTheVendorQueue: 0,\n isFetchingOrdersPendingSketchOsAdmin: false,\n totalOrdersPendingSketchOsAdmin: 0,\n isFetchingExceptionOrders: false,\n totalExceptionOrders: 0,\n isFetchingMyOrdersInProgress: false,\n totalMyOrdersInProgress: 0,\n isFetchingBillingFailedOrders: false,\n totalBillingFailedOrders: 0,\n totalRushOrders: 0,\n filteredRushOrders: 0,\n pendingMetalRoofOrders: 0,\n};\n\nconst dashboardReducer = (state = initState, action) => {\n switch (action.type) {\n case GET_ALL_SKETCH_ORDER_COUNTS_REQUEST:\n return Object.assign({}, state, {\n isFetchingCounts: true,\n });\n case GET_ALL_SKETCH_ORDER_COUNTS_SUCCESS:\n const totals = action.response.sketchOrderTotalsSummary;\n \n return Object.assign({}, state, {\n isFetchingCounts: false,\n totalOrdersInTheQueue: totals.pending,\n totalOrdersInTheVendorQueue: totals.pendingVendor,\n totalOrdersPendingSketchOsAdmin: totals.pendingAdminApproval,\n totalMyOrdersInProgress: totals.myOrdersInProgress,\n totalBillingFailedOrders: totals.failedToBill,\n totalExceptionOrders: totals.needsAttention,\n totalRushOrders: totals.rushOrders,\n filteredRushOrders: totals.filteredRushOrders,\n pendingMetalRoofOrders: totals.pendingMetalRoofOrders,\n });\n case GET_ALL_SKETCH_ORDER_COUNTS_FAILURE:\n return Object.assign({}, state, {\n isFetchingCounts: false,\n });\n case UPDATE_ALL_SKETCH_ORDER_COUNTS:\n const orders = action.payload\n return Object.assign({}, state, {\n totalOrdersInTheQueue: orders.pending,\n totalOrdersInTheVendorQueue: orders.pendingVendor,\n totalOrdersPendingSketchOsAdmin: orders.pendingAdminApproval,\n totalBillingFailedOrders: orders.failedToBill,\n totalExceptionOrders: orders.needsAttention,\n totalRushOrders: orders.rushOrders,\n filteredRushOrders: orders.filteredRushOrders,\n pendingMetalRoofOrders: totals.pendingMetalRoofOrders,\n })\n default:\n return state;\n }\n};\n\nexport default dashboardReducer;\n","import {\n GET_ORGANIZATIONS_REQUEST,\n GET_ORGANIZATIONS_SUCCESS,\n GET_ORGANIZATIONS_FAILURE\n} from '../actions/actionTypes';\n\nconst initState = {\n isFetching: false,\n organizations: [],\n totalResults: 0,\n totalPages: 0,\n currentPage: 0,\n};\n\nconst organizationsReducer = (state = initState, action) => {\n switch (action.type) {\n case GET_ORGANIZATIONS_REQUEST:\n return Object.assign({}, state, {\n isFetching: true,\n });\n case GET_ORGANIZATIONS_SUCCESS:\n return Object.assign({}, state, {\n isFetching: false,\n totalResults: action.response.totalResults,\n totalPages: action.response.totalPages,\n currentPage: action.response.page,\n organizations: action.response.resourceList,\n });\n case GET_ORGANIZATIONS_FAILURE:\n return Object.assign({}, state, {\n isFetching: false,\n organizations: [],\n totalResults: 0,\n totalPages: 0,\n currentPage: 0\n });\n default:\n return state;\n }\n};\n\nexport default organizationsReducer;","import {\n GET_USER_PROFILES_FAILURE,\n GET_USER_PROFILES_REQUEST,\n GET_USER_PROFILES_SUCCESS\n} from \"../actions/actionTypes\";\n\nconst initState = {\n isFetching: false,\n userProfiles: [],\n totalPages: 0,\n currentPage: 0,\n};\n\nconst userProfilesReducer = (state = initState, action) => {\n switch (action.type) {\n case GET_USER_PROFILES_REQUEST:\n return Object.assign({}, state, {\n isFetching: true,\n });\n case GET_USER_PROFILES_SUCCESS:\n return Object.assign({}, state, {\n isFetching: false,\n userProfiles: action.response.resourceList,\n totalPages: action.response.totalPages,\n currentPage: action.response.currentPage,\n });\n case GET_USER_PROFILES_FAILURE:\n return initState;\n default:\n return state;\n }\n};\n\nexport default userProfilesReducer;\n","import {\n GET_SKETCH_ORDER_TIERS_FAILURE,\n GET_SKETCH_ORDER_TIERS_REQUEST,\n GET_SKETCH_ORDER_TIERS_SUCCESS\n} from \"../actions/actionTypes\";\n\nconst initState = {\n isFetching: false,\n sketchOrderTiers: [],\n};\n\nconst sketchOrderTierReducer = (state = initState, action) => {\n switch (action.type) {\n case GET_SKETCH_ORDER_TIERS_REQUEST:\n return Object.assign({}, state, {\n isFetching: true,\n });\n case GET_SKETCH_ORDER_TIERS_SUCCESS:\n return Object.assign({}, state, {\n isFetching: false,\n sketchOrderTiers: action.response.resourceList,\n });\n case GET_SKETCH_ORDER_TIERS_FAILURE:\n return initState;\n default:\n return state;\n }\n};\n\nexport default sketchOrderTierReducer;\n","import {\n GET_ORGANIZATION_FAILURE,\n GET_ORGANIZATION_REQUEST,\n GET_ORGANIZATION_SUCCESS\n} from \"../actions/actionTypes\";\n\nconst initialState = {\n id: null,\n name: null,\n isFetching: false,\n};\n\nconst organizationReducer = (state = initialState, action) => {\n switch (action.type) {\n case GET_ORGANIZATION_REQUEST:\n return Object.assign({}, state, {\n isFetching: true,\n });\n case GET_ORGANIZATION_SUCCESS:\n return Object.assign({}, state, {\n isFetching: false,\n id: action.response.id,\n name: action.response.name,\n });\n case GET_ORGANIZATION_FAILURE:\n return initialState;\n default:\n return state;\n }\n};\n\nexport default organizationReducer;\n","import { ROOFSNAP_API_BASE_URL } from '../lib/apiClients/roofSnapApiClient/roofSnapApiClient';\nimport {\n HIDE_SKETCH,\n SHOW_SKETCH\n} from '../actions/actionTypes';\n\nconst initialState = {\n show: false,\n};\n\nconst sketchHostReducer = (state = initialState, action) => {\n switch (action.type) {\n case SHOW_SKETCH:\n return Object.assign({}, state, {\n show: true,\n orderId: action.orderId,\n projectId: action.projectId,\n });\n case HIDE_SKETCH:\n return Object.assign({}, initialState);\n default:\n return state;\n }\n\n};\nexport default sketchHostReducer;\n","// @flow\n\nimport {\n GET_PROJECT_FAILURE,\n GET_PROJECT_REQUEST,\n GET_PROJECT_SUCCESS\n} from \"../actions/actionTypes\";\n\ntype State = {\n isFetching: boolean,\n id: ?string,\n hasDrawing: ?boolean,\n};\n\ntype Action = {\n type: string,\n response: any,\n};\n\nconst initialState: State = {\n isFetching: false,\n id: null,\n hasDrawing: null\n};\n\nconst projectReducer = (state: State = initialState, action: Action) => {\n switch (action.type) {\n case GET_PROJECT_REQUEST:\n return Object.assign({}, state, {\n isFetching: true,\n });\n case GET_PROJECT_SUCCESS:\n return Object.assign({}, state, {\n isFetching: false,\n id: action.response.id,\n hasDrawing: action.response.hasDrawing\n });\n case GET_PROJECT_FAILURE:\n return initialState;\n default:\n return state;\n }\n};\n\nexport default projectReducer;\n","import {\n GET_SKETCH_TECH_USER_PROFILES_REQUEST,\n GET_SKETCH_TECH_USER_PROFILES_SUCCESS,\n GET_SKETCH_TECH_USER_PROFILES_FAILURE,\n} from \"../actions/actionTypes\";\n\nconst initState = {\n isFetching: false,\n sketchTechUserProfiles: [],\n totalPages: 0,\n currentPage: 0,\n};\n\nconst sketchTechUserProfilesReducer = (state = initState, action) => {\n switch (action.type) {\n case GET_SKETCH_TECH_USER_PROFILES_REQUEST:\n return Object.assign({}, state, {\n isFetching: true,\n });\n case GET_SKETCH_TECH_USER_PROFILES_SUCCESS:\n return Object.assign({}, state, {\n isFetching: false,\n sketchTechUserProfiles: action.response.resourceList,\n totalPages: action.response.totalPages,\n currentPage: action.response.currentPage,\n });\n case GET_SKETCH_TECH_USER_PROFILES_FAILURE:\n return initState;\n default:\n return state;\n }\n};\n\nexport default sketchTechUserProfilesReducer;\n","import {\n SET_ACTIVE_ORDERS_TAB\n} from '../actions/actionTypes';\n\nconst initState = {\n tabIndex: 0,\n};\n\nconst ordersTabsReducer = (state = initState, action) => {\n switch (action.type) {\n case SET_ACTIVE_ORDERS_TAB:\n return Object.assign({}, state, {\n tabIndex: action.tabIndex,\n });\n default:\n return state;\n }\n};\n\nexport default ordersTabsReducer;\n","// @flow\nimport {\n GET_SEARCH_SKETCH_ORDERS_REQUEST,\n GET_SEARCH_SKETCH_ORDERS_SUCCESS,\n GET_SEARCH_SKETCH_ORDERS_FAILURE,\n} from \"../actions/actionTypes\";\nimport { type SearchSketchOrder } from '../typeDefinitions/searchSketchOrder';\nimport { type SearchResult } from \"../typeDefinitions/searchResult\";\n\ntype State = {\n +isFetching: boolean,\n +sketchOrders: Array,\n +totalResults: number,\n +totalPages: number,\n +currentPage: number,\n};\n\ntype Action = {\n type: string,\n response: SearchResult,\n};\n\nconst initState: State = {\n isFetching: false,\n sketchOrders: [],\n totalResults: 0,\n totalPages: 0,\n currentPage: 0,\n};\n\nconst searchSketchOrdersReducer = (state: State = initState, action: Action): State => {\n switch (action.type) {\n case GET_SEARCH_SKETCH_ORDERS_REQUEST:\n return Object.assign({}, state, {\n isFetching: true,\n });\n case GET_SEARCH_SKETCH_ORDERS_SUCCESS:\n return Object.assign({}, state, {\n isFetching: false,\n sketchOrders: action.response.results,\n totalResults: action.response.totalResults,\n totalPages: action.response.totalPages,\n currentPage: action.response.currentPage,\n });\n case GET_SEARCH_SKETCH_ORDERS_FAILURE:\n return Object.assign({}, state, initState);\n default:\n return state;\n }\n};\n\nexport default searchSketchOrdersReducer;\n","// @flow\nimport { type SuggestionResult } from \"../typeDefinitions/suggestionsResult\";\nimport {\n GET_SEARCH_SUGGESTIONS_REQUEST,\n GET_SEARCH_SUGGESTIONS_SUCCESS,\n GET_SEARCH_SUGGESTIONS_FAILURE, CLEAR_SEARCH_SUGGESTIONS,\n} from \"../actions/actionTypes\";\n\ntype State = {\n +isFetching: boolean,\n +suggestions: Array\n};\n\ntype Action = {\n type: string,\n response: SuggestionResult\n};\n\nconst initState: State = {\n isFetching: false,\n suggestions: []\n};\n\nconst searchSuggestionsReducer = (state: State = initState, action: Action): State => {\n switch (action.type) {\n case GET_SEARCH_SUGGESTIONS_REQUEST:\n return Object.assign({}, state, {\n isFetching: true,\n });\n case GET_SEARCH_SUGGESTIONS_SUCCESS:\n return Object.assign({}, state, {\n isFetching: false,\n suggestions: action.response.results\n });\n case GET_SEARCH_SUGGESTIONS_FAILURE:\n return Object.assign({}, state, initState);\n case CLEAR_SEARCH_SUGGESTIONS:\n return Object.assign({}, state, {\n suggestions: [],\n });\n default:\n return state;\n }\n};\n\nexport default searchSuggestionsReducer;\n","// @flow\n\nimport {\n GET_PROJECT_DRAWING_SUMMARY_FAILURE,\n GET_PROJECT_DRAWING_SUMMARY_REQUEST,\n GET_PROJECT_DRAWING_SUMMARY_SUCCESS\n} from \"../actions/actionTypes\";\nimport type { ProjectDrawingSummaryState } from \"../typeDefinitions/reduxState/projectDrawingSummaryState\";\nimport type { ProjectDrawingAction } from \"../typeDefinitions/actions/projectDrawingSummaryActions\";\n\nconst initialState: ProjectDrawingSummaryState = {\n isFetching: false,\n numberOfFacets: null,\n actualSquares: null,\n};\n\nconst projectDrawingSummary = (state: ProjectDrawingSummaryState = initialState, action: ProjectDrawingAction) => {\n switch (action.type) {\n case GET_PROJECT_DRAWING_SUMMARY_REQUEST:\n return Object.assign({}, state, {\n isFetching: true,\n });\n case GET_PROJECT_DRAWING_SUMMARY_SUCCESS:\n return Object.assign({}, state, {\n isFetching: false,\n ...action.response,\n });\n case GET_PROJECT_DRAWING_SUMMARY_FAILURE:\n return Object.assign({}, initialState);\n default:\n return state;\n }\n};\n\nexport default projectDrawingSummary;\n","import difference from 'lodash/difference';\nimport {\n GET_NOTIFICATION_TEMPLATES_REQUEST,\n GET_NOTIFICATION_TEMPLATES_SUCCESS,\n GET_NOTIFICATION_TEMPLATES_FAILURE,\n} from '../actions/actionTypes';\n\nconst initState = {\n isFetching: false,\n templates: [],\n resourceList: [],\n totalResults: 0,\n totalPages: 0,\n currentPage: 0,\n};\n\nconst notificationTemplatesReducer = (state = initState, action) => {\n switch (action.type) {\n case GET_NOTIFICATION_TEMPLATES_REQUEST:\n return Object.assign({}, state, {\n isFetching: true,\n });\n case GET_NOTIFICATION_TEMPLATES_SUCCESS: {\n\n const existingTemplates = [...state.templates];\n const newTemplates = difference(action.response.resourceList, existingTemplates);\n const templates = [\n ...existingTemplates,\n ...newTemplates,\n ];\n\n return Object.assign({}, state, {\n isFetching: false,\n totalResults: action.response.totalResults,\n totalPages: action.response.totalPages,\n currentPage: action.response.page,\n resourceList: action.response.resourceList,\n templates: templates,\n });\n }\n case GET_NOTIFICATION_TEMPLATES_FAILURE:\n return Object.assign({}, initState);\n default:\n return state;\n }\n};\n\nexport default notificationTemplatesReducer;\n","import {\n GET_SKETCH_ORDER_NOTIFICATIONS_REQUEST,\n GET_SKETCH_ORDER_NOTIFICATIONS_SUCCESS,\n GET_SKETCH_ORDER_NOTIFICATIONS_FAILURE,\n} from '../actions/actionTypes';\n\nconst initState = {\n isFetching: false,\n notifications: [],\n totalResults: 0,\n totalPages: 0,\n currentPage: 0,\n};\n\nconst sketchOrderNotificationsReducer = (state = initState, action) => {\n switch (action.type) {\n case GET_SKETCH_ORDER_NOTIFICATIONS_REQUEST:\n return Object.assign({}, state, {\n isFetching: true,\n });\n case GET_SKETCH_ORDER_NOTIFICATIONS_SUCCESS:\n return Object.assign({}, state, {\n isFetching: false,\n totalResults: action.response.totalResults,\n totalPages: action.response.totalPages,\n currentPage: action.response.page,\n notifications: action.response.resourceList,\n });\n case GET_SKETCH_ORDER_NOTIFICATIONS_FAILURE:\n return Object.assign({}, initState);\n default:\n return state;\n }\n};\n\nexport default sketchOrderNotificationsReducer;\n","import { combineReducers } from 'redux';\nimport auth from './authReducer';\nimport sketchOrders from './sketchOrdersReducer';\nimport currentUser from './currentUserReducer';\nimport currentUserRoles from './currentUserRolesReducer';\nimport dashboard from './dashboardReducer';\nimport organizations from './organizationsReducer';\nimport userProfiles from './userProfilesReducer';\nimport sketchOrderTiers from './sketchOrderTiersReducer';\nimport organization from './organizationReducer';\nimport sketchHost from './sketchHostReducer';\nimport project from './projectReducer';\nimport sketchTechUserProfiles from './sketchTechUserProfilesReducer';\nimport ordersTabs from './ordersTabsReducer';\nimport searchSketchOrders from './searchSketchOrdersReducer';\nimport searchSuggestions from './searchSuggestionsReducer';\nimport projectDrawingSummary from './projectDrawingSummaryReducer';\nimport notificationTemplates from './notificationTemplatesReducer';\nimport sketchOrderNotifications from './sketchOrderNotificationsReducer';\nimport { LOGOUT } from \"../actions/actionTypes\";\n\nconst app = combineReducers({\n auth,\n sketchOrders,\n currentUser,\n currentUserRoles,\n dashboard,\n organizations,\n userProfiles,\n sketchOrderTiers,\n organization,\n sketchHost,\n project,\n sketchTechUserProfiles,\n ordersTabs,\n searchSketchOrders,\n searchSuggestions,\n projectDrawingSummary,\n notificationTemplates,\n sketchOrderNotifications,\n});\n\nconst rootReducer = (state, action) => {\n if (action.type === LOGOUT) {\n state = undefined;\n }\n\n return app(state, action);\n};\n\nexport default rootReducer;\n","import { createStore, applyMiddleware } from 'redux';\nimport thunkMiddleware from 'redux-thunk';\nimport api from './middleware/api';\nimport logging from './middleware/logging';\nimport LoggerWrapper from './lib/LoggerWrapper';\nimport rootReducer from './reducers';\n\nLoggerWrapper.initialize();\n\nconst store = createStore(\n rootReducer,\n applyMiddleware(thunkMiddleware, api, logging, LoggerWrapper.reduxMiddleware())\n);\n\nexport default store;","import LoggerWrapper from '../lib/LoggerWrapper';\nimport { GET_CURRENT_USER_SUCCESS, LOGIN_SUCCESS} from \"../actions/actionTypes\";\n\nexport default store => next => (action) => {\n if (action.type === LOGIN_SUCCESS) {\n LoggerWrapper.startNewSesstion();\n\n const { currentUser } = store.getState();\n if (currentUser) {\n const { userName, firstName, lastName } = currentUser;\n LoggerWrapper.identify(userName, firstName, lastName);\n }\n }\n\n if (action.type === GET_CURRENT_USER_SUCCESS) {\n const { userName, firstName, lastName } = action.response;\n LoggerWrapper.identify(userName, firstName, lastName);\n }\n\n return next(action);\n};","import 'babel-polyfill';\nimport React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { createTheme, MuiThemeProvider } from '@material-ui/core/styles';\nimport './index.css';\nimport App from './App';\nimport store from './store';\n\nconst theme = createTheme({\n palette: {\n primary: {\n main: '#005cAA'\n },\n secondary: {\n main: '#2D68FF',\n },\n }\n});\n\nrender(\n \n \n \n \n ,\n document.getElementById('root')\n);\n"],"sourceRoot":""}