{"version":3,"sources":["components/Layout.tsx","const/Routes.ts","images/Notif.svg","components/NavigationCardData.tsx","components/NavigationCards.tsx","const/Groups.ts","entities/UserAccountInfo.ts","providers/IUserContext.ts","providers/UserContextProvider.tsx","components/ShowForClient.tsx","components/ShowForNoAuth.tsx","components/ShowForNoPermissions.tsx","components/ShowForOperator.tsx","components/ShowForMT.tsx","components/ShowForW3.tsx","images/2_dreamstime_m_62332387.jpg","images/4_dreamstime_l_121865971.jpg","images/5_Llangwyn_FronIsaf02UK.jpg","images/1_dreamstime_l_99047632.jpg","services/TokenService.ts","azure/azure-authentication-config.ts","const/Config.ts","azure/azure-authentication-context.ts","azure/azure-authentication-component.tsx","components/ShowForVisitor.tsx","pages/HomePage.tsx","images/logo.png","const/Texts.ts","components/Header.tsx","components/PrivateRoute.tsx","components/HomeHeader.tsx","config/axiosConfig.ts","const/Urls.ts","components/Spinner.tsx","components/ReportingCards.tsx","services/reportingService.ts","pages/ReportingPage.tsx","const/Fields.ts","const/Actions.ts","services/municipiosService.ts","components/Checkbox.tsx","components/Table.tsx","components/Search.tsx","components/PaginationComponent.tsx","components/ListMunicipalities.tsx","hooks/useGetMunicipalities.ts","services/sitesService.ts","const/DateFormatConverter.ts","hooks/useGetSites.ts","components/ListSites.tsx","components/HeadTitle.tsx","components/Comment.tsx","components/UploadFile.tsx","components/Dropdown.tsx","services/requestService.ts","const/Status.ts","const/StatusDescriptions.ts","components/StatusDescription.tsx","components/Commentary.tsx","components/CommentsHistory.tsx","components/BoxRefusalInformation.tsx","components/HospitalityRequestForm.tsx","services/FilterService.ts","hooks/useGetRequestById.ts","pages/NuovaRichiestaPage.tsx","const/DropdownFilters.ts","components/ConcurrentRequestsTable.tsx","components/MoreInfoData.tsx","const/APIResponse.ts","components/ErrorMessage.tsx","components/ListRequests.tsx","const/AccessPerRol.ts","hooks/useGetRequests.ts","pages/MyRequestsPage.tsx","components/ListCellnexRequests.tsx","components/StateData.tsx","services/cellnexRequestService.ts","pages/MyPendingTasksPage.tsx","hooks/useGetCellnexRequests.ts","hooks/useGetRequestTagsInfo.ts","hooks/useGetCellnexRequestById.ts","components/ListPublishSites.tsx","pages/PublishSitesPage.tsx","components/ModificationModal.tsx","components/CellnexRequest.tsx","components/BoxInformation.tsx","components/BoxComponent.tsx","components/MunicipalityPhase.tsx","const/FileExtensions.ts","const/AreaSplitTitle.ts","components/SitePhase.tsx","components/ClockModal.tsx","components/ClientRequest.tsx","images/fileExcel.svg","pages/RequestDetailPage.tsx","images/BancaIcon.svg","images/ExportIcon.svg","components/InLineSpinner.tsx","components/ButtonsTable.tsx","components/VerificationModal.tsx","components/ListAlreadyPublishedSites.tsx","pages/ShowPublishedSitesPage.tsx","pages/AlreadyManagedPage.tsx","components/HomeFooter.tsx","components/Footer.tsx","pages/ShowAllRequestsPage.tsx","hooks/useGetAllCellnexRequests.ts","hooks/useGetAllRequests.ts","components/RequestInFavorW3.tsx","pages/RequestInFavorW3Page.tsx","components/UploadContract.tsx","components/ContractNegotiation.tsx","pages/ContractNegotiationPage.tsx","components/DislpayDocuments.tsx","components/PendingInstalling.tsx","pages/PendingInstallingPage.tsx","services/BlogService.ts","components/ConversationPanelList.tsx","hooks/useGetBlog.ts","const/BlogStatus.ts","components/ConversationHistoric.tsx","components/ConversationDetail.tsx","components/ChatFormModalComponent.tsx","hooks/useGetAllClients.ts","pages/BlogPage.tsx","App.tsx","index.tsx"],"names":["Layout","classNames","this","props","isHomePage","className","children","Component","displayName","name","_rect","Routes","DataBase","NavigationCardData","item","onClick","onClickCard","src","cardImage","alt","textToShow","ArrowForwardIos","NavigationCards","items","map","i","Groups","GroupsText","defaultUserAccountInfo","homeAccountId","environment","tenantId","username","localAccountId","type","defaultUserContext","user","setUser","logoutUser","UserContext","React","ShowForClient","useContext","ShowForNoAuth","ShowForNoPermissions","ShowForOperator","ShowForMT","ShowForW3","userStorage","localStorage","getItem","JSON","parse","refreshToken","accessToken","token","setItem","stringify","removeItem","authorityUrl","process","MSAL_CONFIG","auth","clientId","authority","cache","cacheLocation","storeAuthStateInCookie","system","loggerOptions","loggerCallback","level","message","containsPii","LogLevel","Error","console","error","Info","info","Verbose","debug","Warning","warn","Config","AzureAuthenticationContext","myMSALObj","PublicClientApplication","account","loginRedirectRequest","loginRequest","isAuthenticationConfigured","setRequestObjects","scopes","prompt","redirectStartPage","window","location","href","signInType","loginPopup","then","resp","handleResponse","catch","err","loginRedirect","getAllAccounts","accessTokenRequest","acquireTokenSilent","response","acquireTokenPopup","logOutRequest","logout","incomingFunction","getAccount","log","currentAccounts","length","ua","navigator","userAgent","msie","indexOf","msie11","isIE","AzureAuthenticationButton","onAuthenticated","homeButton","authenticationModule","useState","authenticated","setAuthenticated","logIn","method","logInType","login","returnedAccountInfo","acquireToken","showLogOutButton","id","undefined","Login","ShowForVisitor","HomePage","history","useHistory","userAccountInfo","idTokenClaims","forEach","group","TokenService","clientOptions","ElencoDelleRichiesteImg","push","AttivitaInSospesoImg","operatorOptions","GestioneDelSitoImg","ReportImg","mtOptions","w3Options","visitorOptions","style","background","_excluded","_extends","Object","assign","bind","target","arguments","source","key","prototype","hasOwnProperty","call","apply","_objectWithoutProperties","excluded","sourceKeys","keys","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","SvgNotif","_ref","svgRef","title","titleId","width","height","viewBox","fill","xmlns","ref","x","y","rx","stroke","strokeWidth","ForwardRef","BlogTitle","Header","hasUnreadMessages","menuRef","useRef","shadowRef","handleOpenMenu","current","classList","toggle","activeClassName","to","Forum","Menu","Logo","Close","PrivateRoute","component","path","invalidRoles","findIndex","role","exact","HomeHeader","removeAccessToken","download","Book","instance","axios","create","baseURL","headers","interceptors","request","use","config","getLocalAccessToken","Promise","reject","res","originalConfig","url","status","_retry","acquireSilentToken","updateLocalAccessToken","alert","Spinner","display","justifyContent","alignItems","ReportingCard","reportingCollection","setReportingCollection","isLoading","setIsloading","classExtra","reportingItems","LightTooltip","styled","Tooltip","classes","popper","theme","tooltipClasses","tooltip","backgroundColor","palette","common","white","color","boxShadow","shadows","fontSize","useEffect","fetchData","axiosInstance","get","element","responseData","infoTooltip","reportList","reportItem","IconButton","ErrorOutline","ReportingPage","MunicipalityFields","SiteFields","SiteRequestFields","RequestFields","Actions","getMunicipalities","filters","Checkbox","value","onChange","checked","Table","localRequestStatus","columns","allowSelectItems","onSelectItem","onSelectMoreInfo","selectedMoreInfoItem","onSelectAllItems","modifiedItems","selectedItems","actionsForSelectedItems","showMoreInfoSection","renderOnMoreInfo","isLoadingData","actionColumn","renderOnSelected","onOrderBy","overflowX","column","canOrderBy","order","show","orderElement","e","preventDefault","targetOrder","orderData","field","newColumns","col","handleOrderBy","KeyboardArrowDown","KeyboardArrowUp","colSpan","textAlign","index","tdsItem","showOnSelect","has","itemValue","accessor","customClass","customRender","tdCheck","tdActions","tdMoreInfo","Search","text","placeholder","handleSearch","query","setQuery","timeOutId","setTimeout","clearTimeout","currentTarget","SearchOutlined","PaginationComponent","count","handleChangePage","page","createTheme","primary","main","itIT","ThemeProvider","TablePagination","Number","isNaN","onPageChange","rowsPerPage","showFirstButton","showLastButton","rowsPerPageOptions","ListMunicipalities","onSelectAction","filterList","setFilterList","setOrderBy","setPaginationHistory","isFetching","setIsFetching","municipalitiesList","setMunicipalitiesList","municipalities","data","result","refreshData","useGetMunicipalities","setPage","slice","tableColumns","setTableColumns","finalList","iDs","Set","add","site","previousSelectedItems","addPagination","nextPagedInfo","encodeURIComponent","getFilters","orderInfo","sitesClass","publishedSites","allSitesClass","allSitesPublished","disabledStyle","cursor","opacity","textDecoration","event","takeMore","getSites","DateFormatConverter","date","dateInfoSeparated","split","concat","DateFormatConverterReverse","DateLastUpdateFormatConverter","separateTimeDate","SiteDateConverter","siteList","sites","dataProntoServizo","RequestDateConverter","requests","dataRequesta","RequestLastDateConverter","dataLastActu","CellnexRequestDateConverter","SiteRequestDateConverter","useGetSites","sitesList","setSitesList","ListSites","filterByMunicipality","comingFromMunicipality","paginationHistory","municipality","comune","navPrevDisabled","navNextDisabled","pop","ChevronLeft","ChevronRight","HeadTitle","onGoBack","Comments","showLabel","operatorName","commentText","updatingComment","blocked","TextareaAutosize","comment","disabled","UploadFile","fileReader","fileHeader","isPreDesign","shareFile","emptyError","acceptExtensions","fileHead","fileInfo","multipleFiles","goMultipleFilesFunction","cssAlternie","setError","setCheckDelete","showHeader","setShowHeader","header","contentError","setContentError","fileContent","setFileContent","handlerFile","binaryStr","base64Str","btoa","htmlFor","onReset","noDrag","noClick","accept","onDrop","files","file","fileHeaderM","fileReaderM","FileReader","size","onload","fileName","readAsBinaryString","handlerMultipleFileChosen","multiple","getRootProps","getInputProps","InsertDriveFileOutlined","rel","Dropdown","dropdownOption","selectItem","selectedValue","cssExtra","handlerDropdownFilters","filterOption","FilterId","filteritems","filter","onChangeFilter","DrowpdownsOptions","properties","options","option","selected","displayValue","getRequests","getAllRequests","getRequestsById","getFormRequestDataById","updateRequest","put","updateSiteRequestStatus","selectRequestSite","idSite","updateInstallationPhase","updateDataBaseExcel","dataBase64","RequestStatus","ClientStatus","NuovaRichiestaComune","NuovaRichiestaSito","InAnalisi","InAttesa","AttesoRiscontroCliente","InVerifica","RichiestaErroriOIncompleta","SelezionareSiti","EsitoNegativoFattibilita","EsitoPositivoFattibilita","Rifiutato","Installato","InLavorazione","EsitoNegativoConcluso","MancataInstallazioneConcluso","AvenutaInstallazioneW3","AcordoInNegoziazione","AccordoRifiutato","InAttesaInstallazioneCliente","AvvenutaInstallazioneProcessoConcluso","InstallazioneNonAvvenutaProcessoConcluso","Scaduto","ClientRequestViewStatus","ClientRequestFilterStatus","StatusDescriptions","StatusDescription","InfoOutlined","Commentary","CommentsHistory","comments","excludeCommentsForRole","commentsList","BoxRefusalInformation","HospitalityRequestForm","requestId","saveButton","sendButton","requestType","returnPage","renderHeaderTitle","setcommentText","filterName","setOptions","optionPicked","setOptionPicked","setOptionPickedID","setFileName","fileError","setFileError","acceptTermsOne","setacceptTermsOne","acceptTermsTwo","setacceptTermsTwo","acceptTermsOneError","setAccepTermsError","reqType","setReqType","blockedForm","setBlockedForm","secureValidForm","setSecureValidForm","operatorComments","setOperatorCommments","operatorRefusalComments","setOperatorRefusalCommments","onlyFormData","requestItem","setRequestsItem","useGetRequestById","actionData","siteID","comuneID","operatorFinalComments","stato","newClientComment","Date","toISOString","finalComments","formInfo","FormData","append","post","toast","autoClose","position","hanlderSavedata","action","createOption","province","region","defaultValue","toString","tipi","allComments","handleOperatorComment","hasSelectedSite","refusalComments","handleOperatorRefusalComment","validForm","renderStatusDescription","optionSelected","optionSelectedID","Download","Comment","NuovaRichiestaPage","selectedItem","setSelectedItem","setAction","setRequestType","handleActions","handleOnGoBack","renderTitle","renderSiteTitle","StatusTechClientDropdownFilter","StatusTechCellnexDropdownFilter","StatusManagerClientDropdownFilter","StatusManagerCellnexDropdownFilter","StatusMTClientDropdownFilter","StatusMTCellnexDropdownFilter","StatusW3DropdownFilter","StatusClientDropdownFilter","TypeDropdownFilter","FattibilitaDropdownFilter","PropostaCellnexDropdownFilter","AllStatusTechCLientDropdownFilter","AllStatusTechCellnexDropdownFilter","ConcurrentRequestTable","sendSelection","concurrentItems","siteTitle","concurrentGroup","concurrentRequest","MoreInfoData","label","APIResponse","ErrorMessage","ListRequests","amount","requestsList","fromAdminPanel","showAll","disableAction","isFetchingConcurrent","amountConcurrent","requestsListConcurrent","fromAdminPanelConcurrent","disableActionConcurrent","showAllConcurrent","refreshDataConcurrent","showConcurrentTabs","errors","setErrors","setSelectedItems","requestsSwitchControl","setRequestsSwitchControl","showConcurrentRequests","setStatus","setType","fromDate","setFromDate","toDate","setToDate","setSelectedMoreInfoItem","requestListState","setRequestListState","isRequestFetching","setIsRequestFetching","isRequestConcurrentFetching","setIsRequestConcurrentFetching","fetchStopClock","setFetchStopClock","currentItemsPage","fistPageItems","tableConst","wasStopped","AlarmOff","sx","grey","arrow","client","agency","giorniScadenza","includes","requestAcceptedDate","state","handleRequestDetail","sendConcurrentSelected","indexConcurrentRequest","accepted","version","handleMoreInfo","delete","handleStopClock","fetchValue","handleOnOrderBy","statusDropdown","dateFormat","placeholderText","clear","selectedSite","siteId","TechStatusAccess","ManagerStatusAccess","MonitoringTrusteeStatusAccess","WinTreeStatusAccess","MonitoringTrusteeConcurrentStatusAccess","VisitorStatus","generateRequestStatusFilter","concurrent","statusFilter","useGetRequests","setRequestsList","setAmount","requestStatusFilter","cleanConcurrentData","concurrentData","MyRequestsPage","useParams","estado","setEstado","fetching","setFetching","itemStatus","setItemStatus","handlerBack","ListCellnexRequests","isFetchingCellnex","requestsListCellnex","refreshDataCellnex","StateData","getCellnexRequests","getCellnexRequest","updatePublishSites","MyPendingTasksPage","showCellnexRequests","setShowCellnexRequests","setIsFetchingCellnex","setRequestsListCellnex","cellnexAmount","setCellnexAmount","useGetCellnexRequests","rol","useGetRequestTagsInfo","useGetCellnexRequestById","cellnexRequest","setCellnexRequest","ListPublishSites","itemId","setComment","commentList","setCommentList","isfetchingRequest","cellnexRequestStatus","setCellnexRequestStatus","Map","setModifiedItems","alreadySelected","setAlreadySelected","isSendingRequest","setIsSendingRequest","mapSelectedItems","icon","statusValue","internalStatus","seletedItemLocal","propostaCellnex","handlePropostaChanges","fattibilita","handleSiteChanges","handleToDate","preValue","handleSelectedItems","notAllowedToModified","set","validateDate","isDraft","sitesInformation","finalStatus","finalStatusInternal","siteInternalId","fattibilitaPreliminare","dataProntoServicio","mtComments","handleContinue","handleSave","draft","allowToContinue","commentData","requestData","siteType","altezzaSitio","textValue","PublishSitesPage","ModificationModal","showVerificationModal","handleAction","openVerification","Popup","Overlay","CellnexRequest","cellnexRequestId","setIsLoading","setShowVerificationModal","handleOnSitesStates","handlePublish","validateData","allowMT","allowTech2","allSitesApproved","approved","handleCloseVerficationAndRefresh","isPublishSitePhase","isFinished","isRejected","handleSiteComment","BoxInformation","canSelectDate","selectDateTitle","datePickerKey","selectedDate","handleDate","maxDate","setMaxDate","BoxComponent","MunicipalityPhase","sendingData","setSendingData","setFiles","clientRequest","modalTitle","setModalTitle","dateCol","find","selectedByTech1","internalSiteRequestId","technicalComments","managerComments","handleSelectSite","finalCommentData","values","next","canSelectItems","canPostComment","canViewComments","newFiles","f","handleDeleteFile","surname","email","phone","marginTop","FileExtensions","extractExtension","separateString","deleteNumbers","splice","join","AreaSplitTitle","SitePhase","feedBackFiles","setFeedBackFiles","setTitle","newFile","getComments","sendData","handleSetTitle","addFiles","handleW3Save","approvedW3","handleTechSave","approvedTech","handleVerification","canUploadMultipleFiles","boxDocumentTitle","clientFeedbackFiles","extension","base64Extension","lon","feedbackFiles","feedbackFile","prevFiles","feedbackFileName","handleDeleteFeedbackFile","w3File","ClockModal","showModal","openModal","setCommentText","loading","wasStop","daysPast","parseInt","reload","_path","ClientRequest","setModal","validStates","setClientRequest","callApi","techVoted","w3Voted","showButton","border","onOpen","handleCloseVerfication","giorniInteri","renderGiorniScadenza","RequestDetailPage","textStatus","queryString","search","URLSearchParams","SvgFileExcel","d","SvgBancaIcon","SvgExportIcon","InLineSpinner","ButtonsTableComponent","fetchInAttesaRemoved","setFetchInAttesaRemoved","showUploadModal","setShowUploadModal","useBoolean","hidePopup","setTrue","setFalse","dataBaseFile","setDataBaseFile","dataBaseFileExtension","setDataBaseFileExtension","disableDownload","setDisableDownload","isDownloading","setIsDownloading","setOpen","handleSaveDataBaseFile","dataBaseResponse","resetModalInformation","statusCode","handleDescarga","anchor","document","createElement","click","handleDeleteDataBaseFile","Button","startIcon","variant","onDismiss","VerificationModal","handleRemoveSite","ListAlreadyPublishedSites","correctlyRemoved","selectedItemToRemoved","setSelectedItemToRemoved","statusChangeDate","handleInAttesaRemoved","pendingToRemoved","ShowPublishSitesPage","AlreadyManagedPage","HomeFooter","Footer","ShowAllRequestsPage","useGetAllCellnexRequests","useGetAllRequests","RequestInFavorW3","requestItemId","onRenderTitle","fetchinData","setFetchignData","setCLientRequest","instalationDate","setInstalationDate","requestCall","requestResponse","installationDate","RequestInFavorW3Page","UploadContract","ContractNegotiation","signDate","setSignDate","contractSignedDate","ContractNegotiationPage","DisplayDocuments","PendingInstalling","signContractFile","PendingInstallingPage","getBlog","getConversationById","getAllClients","ConversationPanelList","refreshConversations","setConversationHistoric","setLoadingHistoric","hasUnreadedList","setHasUnreadedList","selectedConversation","setSelectedConversation","conversationList","setConversationList","conversations","useGetBlog","tempUnreadedList","conversation","unReadedId","handleInitHasUnreaded","isUnreaded","hasUnreaded","handleHasUnreaded","handleOpenConversation","markReaded","readedUser","indexId","containerClass","fullName","BlogStatus","RoleStatusDescription","ConversationHistoric","conversationHistoric","closeConversation","description","answer","company","ConversationDetail","isLoadingHistoric","setText","isSubmitting","setIsSubmitting","setConversation","setOpenModal","getConversation","updateResponse","handleSubmitAnswer","lastId","conversationAnswer","readedBy","handleCloseConversation","closeOnClick","ChatFormModalComponent","descriptionText","setdescriptionText","titleText","setTitleText","clientText","setclientText","clientsListConversation","setClientsListConversation","clientsList","setClientsList","clientList","useGetClients","viewers","handler","DataGrid","rows","headerName","sortable","onRowClick","hideFooter","disableColumnMenu","components","LoadingOverlay","NoRowsOverlay","BlogPage","setIsLoadingHistoric","refreshConversation","setRefreshConversation","App","currentUser","setCurrentUser","useLocation","hasUnreadedMessages","setHasUnreadedMessages","addEventListener","handleStorage","removeEventListener","handleUnreadedMessages","unreaded","userData","Provider","pathname","ReactDOM","render","StrictMode","getElementById"],"mappings":"iUAMaA,EAAM,kHAWhB,OAXgB,mCAGjB,WACE,IAAIC,GAAaC,KAAKC,MAAMC,WAAa,QAEzC,OACE,qBAAKC,UAAWJ,EAAW,SACxBC,KAAKC,MAAMG,UAGlB,KAAC,EAXgB,CAASC,aAAfP,EACJQ,YAAcR,EAAOS,KCPvB,I,ECAHC,EDASC,EACH,IADGA,EAEM,WAFNA,EAGG,cAHHA,EAIM,mBAJNA,EAKK,gBALLA,EAMK,WANLA,EAOE,aAPFA,EASI,gBATJA,EAUO,mBAVPA,EAWM,mBAXNA,EAYS,qBAZTA,EAaY,eAbZA,EAcU,iBAdVA,EAeS,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AAC,GAAY,CAACjtB,aAAc,CAACnM,GAAkBkM,KAAK,mBAAmBD,UAAWswB,KAClF,cAAC,GAAY,CAACpwB,aAAc,CAACnM,EAAiBA,GAAkBkM,KAAK,gBAAgBD,UAAW0wB,KAChG,cAAC,GAAY,CAACxwB,aAAc,CAACnM,EAAiBA,GAAiBkM,KAAK,mBAAmBD,UAAWuwB,KAClG,cAAC,GAAY,CAACrwB,aAAc,CAACnM,EAAiBA,EAAiBA,EAAgBA,EAAkBA,GAAiBkM,KAAK,yBAAyBD,UAAWwxB,KAC3J,cAAC,GAAY,CAACtxB,aAAc,CAACnM,EAAiBA,EAAiBA,EAAgBA,EAAkBA,GAAiBkM,KAAK,mBAAmBD,UAAW8xB,KACrJ,cAAC,GAAY,CAAC5xB,aAAc,CAACnM,EAAiBA,EAAiBA,EAAgBA,EAAkBA,GAAiBkM,KAAK,qBAAqBD,UAAWkyB,KACvJ,cAAC,GAAY,CAAChyB,aAAc,CAACnM,GAAkBkM,KAAK,iBAAiBD,UAAW+2B,QAG1D,MAAtBz+B,EAAS0/B,SACL,cAAC,GAAU,IACX,cAAC,GAAM,QAKrB,ECrGAC,IAASC,OACP,cAAC,IAAMC,WAAU,UACf,cAAC,IAAa,UACZ,cAAC,GAAG,QAGR9I,SAAS+I,eAAe,Q","file":"static/js/main.10be604f.chunk.js","sourcesContent":["import React, { Component } from 'react';\r\n\r\ninterface LayoutProps {\r\n isHomePage: boolean;\r\n}\r\n\r\nexport class Layout extends Component {\r\n static displayName = Layout.name;\r\n\r\n render() {\r\n let classNames = this.props.isHomePage ? \"home\" : \"home\";\r\n\r\n return (\r\n
\r\n {this.props.children}\r\n
\r\n );\r\n }\r\n}\r\n","export const Routes = {\r\n Home: \"/\",\r\n RequestDetail: \"/request\",\r\n MyRequests: \"/my-request\",\r\n CreateRequest: \"/nuova-richiesta\",\r\n PendingTasks: \"/pending-task\",\r\n PublishSites: \"/publish\",\r\n Reporting: \"/reporting\",\r\n FormRequest: \"/form\",\r\n AllRequests: \"/all-requests\",\r\n PublishedSites: \"/published-sites\",\r\n AlreadyManage: \"/already-managed\",\r\n RequestInFavorW3: \"/place-reservation\",\r\n ContractNegotiation: \"/negotiation\",\r\n PendingInstalling: \"/on-installing\",\r\n ConversationBlog: \"/converzazione\"\r\n}\r\n\r\nexport const RoutesAPI = {\r\n BaseURL: \"https://trasparenza.azurewebsites.net/api/\"\r\n //BaseURL: \"https://localhost:5001/api/\"\r\n}\r\n\r\nexport const DataBase = {\r\n Pre: \"https://cellnex.sharepoint.com/sites/Antitrust-Pre/Lists/Lista%20dei%20Siti/AllItems.aspx\",\r\n Pro: \"https://cellnex.sharepoint.com/sites/Trasparenza/Lists/Lista%20dei%20Siti/\"\r\n}","var _rect;\nvar _excluded = [\"title\", \"titleId\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport * as React from \"react\";\nfunction SvgNotif(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 9,\n height: 9,\n viewBox: \"0 0 9 9\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 0.75,\n y: 0.75,\n width: 7.5,\n height: 7.5,\n rx: 3.75,\n fill: \"#B51919\",\n stroke: \"#ECF0F1\",\n strokeWidth: 1.5\n })));\n}\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgNotif);\nexport default __webpack_public_path__ + \"static/media/Notif.33740094.svg\";\nexport { ForwardRef as ReactComponent };","import React from \"react\";\r\nimport { NavigationCard } from \"../entities/NavigationCard\";\r\nimport { ArrowForwardIos } from \"@mui/icons-material\";\r\n\r\ninterface INavigationCardData {\r\n item: NavigationCard;\r\n}\r\n\r\nexport const NavigationCardData = (props: INavigationCardData) => {\r\n\r\n let { item } = props;\r\n\r\n return (\r\n
item.onClickCard()} >\r\n
\r\n \"\"\r\n
\r\n
\r\n {item.textToShow}\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n )\r\n}","import React from \"react\";\r\nimport { NavigationCard } from \"../entities/NavigationCard\";\r\nimport { NavigationCardData } from \"./NavigationCardData\";\r\n\r\ninterface INavigationCards {\r\n items: NavigationCard[]\r\n}\r\n\r\nexport const NavigationCards = (props: INavigationCards) => {\r\n\r\n let { items } = props;\r\n\r\n return (\r\n
\r\n {\r\n items.map((item, i) => )\r\n }\r\n
\r\n )\r\n}","export const Groups = {\r\n CUSTOMER: '713d5dae-0197-4a6c-a43e-7d1eb0f7a65d',\r\n TECHNICAL: '0d187354-0283-464a-9a58-b74f961038df',\r\n MANAGER: 'f9b38114-330c-4a38-b148-fef9fe5cb38c',\r\n REGULATOR: '566206b0-365c-42f5-99ea-e362b16d5403',\r\n SUPPLIER: '621982ca-7ac4-47d9-a725-1741da123a72',\r\n VISITOR: 'c3d12782-dc64-4436-b165-18952d64d8a8'\r\n}\r\n\r\nexport const GroupsText = {\r\n [Groups.CUSTOMER]: \"Cliente\",\r\n [Groups.TECHNICAL]: \"Cellnex1\",\r\n [Groups.MANAGER]: \"Cellnex2\",\r\n [Groups.REGULATOR]: \"MT\",\r\n [Groups.SUPPLIER]: \"W3\",\r\n [Groups.VISITOR]: \"Visitor\"\r\n}","import { AccountInfo } from \"@azure/msal-common/dist/account/AccountInfo\";\r\n\r\nexport default interface UserAccountInfo extends AccountInfo {\r\n type?: string;\r\n accessToken?: string;\r\n}\r\n\r\nexport const defaultUserAccountInfo:UserAccountInfo = {\r\n homeAccountId: \"\",\r\n environment: \"\",\r\n tenantId: \"\",\r\n username: \"\",\r\n localAccountId: \"\",\r\n type: \"\"\r\n};","import UserAccountInfo, { defaultUserAccountInfo } from \"../entities/UserAccountInfo\";\r\n\r\nexport default interface IUserContext {\r\n user: UserAccountInfo;\r\n setUser: Function;\r\n logoutUser: Function;\r\n};\r\n\r\nexport const defaultUserContext:IUserContext = {\r\n user: defaultUserAccountInfo,\r\n setUser: () => {},\r\n logoutUser: () => {},\r\n}","import * as React from \"react\";\r\nimport IUserContext, { defaultUserContext } from \"./IUserContext\";\r\n\r\nconst UserContext = React.createContext(defaultUserContext);\r\n\r\nexport { UserContext };","import React from \"react\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\n\r\nexport const ShowForClient: React.FC = ({children}) => {\r\n const { user } = React.useContext(UserContext);\r\n if (user.type !== Groups.CUSTOMER) return null;\r\n return (\r\n <>\r\n {children}\r\n \r\n )\r\n}","import React from \"react\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\n\r\nexport const ShowForNoAuth: React.FC = ({children}) => {\r\n const { user } = React.useContext(UserContext);\r\n if (user.username !== \"\") return null;\r\n return (\r\n <>\r\n {children}\r\n \r\n )\r\n}","import React from \"react\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\n\r\nexport const ShowForNoPermissions: React.FC = ({children}) => {\r\n const { user } = React.useContext(UserContext);\r\n if (user.username !== \"\" && user.type !== Groups.CUSTOMER && user.type !== Groups.MANAGER && user.type !== Groups.REGULATOR && user.type !== Groups.SUPPLIER && user.type !== Groups.TECHNICAL && user.type !== Groups.VISITOR) {\r\n return (\r\n <>\r\n {children}\r\n \r\n )\r\n }\r\n return null; \r\n}","import React from \"react\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\n\r\nexport const ShowForOperator: React.FC = ({children}) => {\r\n const { user } = React.useContext(UserContext);\r\n if (\r\n user.type !== Groups.TECHNICAL &&\r\n user.type !== Groups.MANAGER\r\n ) return null;\r\n return (\r\n <>\r\n {children}\r\n \r\n )\r\n}","import React from \"react\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\n\r\nexport const ShowForMT: React.FC = ({children}) => {\r\n const { user } = React.useContext(UserContext);\r\n if (\r\n user.type !== Groups.REGULATOR\r\n ) return null;\r\n return (\r\n <>\r\n {children}\r\n \r\n )\r\n}","import React from \"react\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\n\r\nexport const ShowForW3: React.FC = ({children}) => {\r\n const { user } = React.useContext(UserContext);\r\n if (\r\n user.type !== Groups.SUPPLIER\r\n ) return null;\r\n return (\r\n <>\r\n {children}\r\n \r\n )\r\n}","export default __webpack_public_path__ + \"static/media/2_dreamstime_m_62332387.2beafa74.jpg\";","export default __webpack_public_path__ + \"static/media/4_dreamstime_l_121865971.503eb1ea.jpg\";","export default __webpack_public_path__ + \"static/media/5_Llangwyn_FronIsaf02UK.360c9e7b.jpg\";","export default __webpack_public_path__ + \"static/media/1_dreamstime_l_99047632.da078d49.jpg\";","class TokenService {\r\n public getLocalRefreshToken() {\r\n let userStorage = localStorage.getItem(\"user\")\r\n if(userStorage === null) return \"\";\r\n const user = JSON.parse(userStorage);\r\n return user.refreshToken;\r\n }\r\n\r\n public getLocalAccessToken() {\r\n let userStorage = localStorage.getItem(\"user\")\r\n if(userStorage === null) return \"\";\r\n const user = JSON.parse(userStorage);\r\n return user?.accessToken;\r\n }\r\n\r\n public updateLocalAccessToken(token) {\r\n let userStorage = localStorage.getItem(\"user\")\r\n if(userStorage === null) return;\r\n const user = JSON.parse(userStorage);\r\n user.accessToken = token;\r\n localStorage.setItem(\"user\", JSON.stringify(user));\r\n }\r\n\r\n public setUser(user) {\r\n localStorage.setItem(\"user\", JSON.stringify(user));\r\n }\r\n\r\n public removeAccessToken() {\r\n localStorage.removeItem(\"user\");\r\n }\r\n}\r\n \r\nexport default new TokenService();","import { Configuration, LogLevel } from \"@azure/msal-browser\";\r\n\r\nconst AzureActiveDirectoryAppClientId: any = process.env.REACT_APP_AZURE_ACTIVE_DIRECTORY_APP_CLIENT_ID;\r\nconst TenantId: any = process.env.REACT_APP_TENANT_ID;\r\n\r\nexport const authorityUrl = `https://login.microsoftonline.com/${TenantId}`;\r\n\r\nexport const MSAL_CONFIG: Configuration = {\r\n auth: {\r\n clientId: AzureActiveDirectoryAppClientId,\r\n authority: authorityUrl\r\n },\r\n cache: {\r\n cacheLocation: \"sessionStorage\",\r\n storeAuthStateInCookie: false,\r\n },\r\n system: {\r\n loggerOptions: {\r\n loggerCallback: (level, message, containsPii) => {\r\n if (containsPii) {\r\n return;\r\n }\r\n switch (level) {\r\n case LogLevel.Error:\r\n console.error(message);\r\n return;\r\n case LogLevel.Info:\r\n console.info(message);\r\n return;\r\n case LogLevel.Verbose:\r\n console.debug(message);\r\n return;\r\n case LogLevel.Warning:\r\n console.warn(message);\r\n return;\r\n }\r\n },\r\n },\r\n },\r\n};","export const Config = {\r\n SHAREPOINT_SCOPE: \"https://cellnex.sharepoint.com/.default\"\r\n}","import {\r\n PublicClientApplication,\r\n AuthenticationResult,\r\n AccountInfo,\r\n EndSessionRequest,\r\n RedirectRequest,\r\n PopupRequest\r\n } from \"@azure/msal-browser\";\r\n \r\n import { authorityUrl, MSAL_CONFIG } from \"./azure-authentication-config\";\r\n import { Config } from \"../const/Config\"\r\n \r\n export class AzureAuthenticationContext {\r\n private myMSALObj: PublicClientApplication = new PublicClientApplication(\r\n MSAL_CONFIG\r\n );\r\n private account?: AccountInfo;\r\n private loginRedirectRequest?: RedirectRequest;\r\n private loginRequest?: PopupRequest;\r\n \r\n public isAuthenticationConfigured = false;\r\n \r\n constructor() {\r\n // @ts-ignore\r\n this.account = null;\r\n this.setRequestObjects();\r\n if (MSAL_CONFIG?.auth?.clientId) {\r\n this.isAuthenticationConfigured = true;\r\n }\r\n }\r\n \r\n private setRequestObjects(): void {\r\n this.loginRequest = {\r\n scopes: [\"user.read\"],\r\n prompt: \"select_account\",\r\n };\r\n \r\n this.loginRedirectRequest = {\r\n ...this.loginRequest,\r\n redirectStartPage: window.location.href,\r\n };\r\n }\r\n \r\n login(signInType: string, setUser: any): void {\r\n if (signInType === \"loginPopup\") {\r\n this.myMSALObj\r\n .loginPopup(this.loginRequest)\r\n .then((resp: AuthenticationResult) => {\r\n this.handleResponse(resp, setUser);\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n });\r\n } else if (signInType === \"loginRedirect\") {\r\n this.myMSALObj.loginRedirect(this.loginRedirectRequest);\r\n }\r\n }\r\n\r\n async acquireToken(): Promise {\r\n const account = this.myMSALObj.getAllAccounts()[0];\r\n const accessTokenRequest:any = {\r\n scopes: [ Config.SHAREPOINT_SCOPE ],\r\n account: account,\r\n authority: authorityUrl\r\n }\r\n\r\n let response;\r\n try{\r\n response = await this.myMSALObj.acquireTokenSilent(accessTokenRequest);\r\n }catch(e){\r\n console.error(\"acquireTokenSilent error\", e);\r\n response = await this.myMSALObj.acquireTokenPopup(accessTokenRequest);\r\n }\r\n \r\n return response.accessToken;\r\n }\r\n \r\n async acquireSilentToken(): Promise {\r\n const account = this.myMSALObj.getAllAccounts()[0];\r\n const accessTokenRequest:any = {\r\n scopes: [ Config.SHAREPOINT_SCOPE ],\r\n account: account,\r\n authority: authorityUrl\r\n }\r\n\r\n let response = await this.myMSALObj.acquireTokenSilent(accessTokenRequest);\r\n return response.accessToken;\r\n }\r\n\r\n logout(account: AccountInfo): void {\r\n const logOutRequest: EndSessionRequest = {\r\n account,\r\n };\r\n \r\n this.myMSALObj.logout(logOutRequest);\r\n }\r\n handleResponse(response: AuthenticationResult, incomingFunction: any) {\r\n if(response !==null && response.account !==null) {\r\n this.account = response.account;\r\n } else {\r\n this.account = this.getAccount();\r\n }\r\n \r\n if (this.account) {\r\n incomingFunction(this.account);\r\n }\r\n }\r\n private getAccount(): AccountInfo | undefined {\r\n console.log(`loadAuthModule`);\r\n const currentAccounts = this.myMSALObj.getAllAccounts();\r\n if (currentAccounts === null) {\r\n // @ts-ignore\r\n console.log(\"No accounts detected\");\r\n return undefined;\r\n }\r\n \r\n if (currentAccounts.length > 1) {\r\n // TBD: Add choose account code here\r\n // @ts-ignore\r\n console.log(\r\n \"Multiple accounts detected, need to add choose account code.\"\r\n );\r\n return currentAccounts[0];\r\n } else if (currentAccounts.length === 1) {\r\n return currentAccounts[0];\r\n }\r\n }\r\n }\r\n \r\n export default AzureAuthenticationContext;","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useState } from \"react\";\r\nimport AzureAuthenticationContext from \"./azure-authentication-context\";\r\nimport { AccountInfo } from \"@azure/msal-browser\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { Login } from '@mui/icons-material';\r\nimport LogoutIcon from '@mui/icons-material/Logout';\r\n\r\nconst ua = window.navigator.userAgent;\r\nconst msie = ua.indexOf(\"MSIE \");\r\nconst msie11 = ua.indexOf(\"Trident/\");\r\nconst isIE = msie > 0 || msie11 > 0;\r\n\r\n// Log In, Log Out button\r\nconst AzureAuthenticationButton = ({ onAuthenticated, homeButton }: any): JSX.Element => {\r\n\r\n const authenticationModule: AzureAuthenticationContext = new AzureAuthenticationContext();\r\n const { user, setUser } = React.useContext(UserContext);\r\n const [authenticated, setAuthenticated] = useState(user.username === \"\" ? false : true);\r\n\r\n const logIn = (method: string) => {\r\n const typeName = \"loginPopup\";\r\n const logInType = isIE ? \"loginRedirect\" : typeName;\r\n\r\n // Azure Login\r\n authenticationModule.login(logInType, returnedAccountInfo);\r\n };\r\n\r\n const logOut = (): any => {\r\n if (user) {\r\n onAuthenticated(undefined);\r\n // Azure Logout\r\n authenticationModule.logout(user);\r\n }\r\n };\r\n\r\n const returnedAccountInfo = async (user: AccountInfo): Promise => {\r\n // set state\r\n setAuthenticated(user?.name ? true : false);\r\n let token = await authenticationModule.acquireToken();\r\n onAuthenticated(user, token);\r\n setUser(user);\r\n };\r\n\r\n const showLogInButton = (): any => {\r\n if(homeButton){\r\n return (\r\n \r\n )\r\n }\r\n return (\r\n \r\n );\r\n };\r\n\r\n const showLogOutButton = (): any => {\r\n return (\r\n \r\n );\r\n };\r\n\r\n const showButton = (): any => {\r\n return authenticated ? showLogOutButton() : showLogInButton();\r\n };\r\n\r\n return (\r\n
\r\n {authenticationModule.isAuthenticationConfigured ? (\r\n showButton()\r\n ) : (\r\n
Authentication Client ID is not configured.
\r\n )}\r\n
\r\n );\r\n};\r\n\r\nexport default AzureAuthenticationButton;","import React from \"react\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\n\r\nexport const ShowForVisitor: React.FC = ({children}) => {\r\n const { user } = React.useContext(UserContext);\r\n if (\r\n user.type !== Groups.VISITOR\r\n ) return null;\r\n return (\r\n <>\r\n {children}\r\n \r\n )\r\n}","import React from 'react';\r\nimport { useHistory } from 'react-router-dom';\r\nimport { Routes } from '../const/Routes';\r\nimport { NavigationCard } from '../entities/NavigationCard';\r\nimport { NavigationCards } from '../components/NavigationCards';\r\nimport { ShowForClient } from '../components/ShowForClient';\r\nimport { ShowForNoAuth } from '../components/ShowForNoAuth';\r\nimport { ShowForNoPermissions } from '../components/ShowForNoPermissions';\r\nimport { ShowForOperator } from '../components/ShowForOperator';\r\nimport { ShowForMT } from '../components/ShowForMT';\r\nimport { ShowForW3 } from '../components/ShowForW3';\r\nimport ReportImg from '../images/2_dreamstime_m_62332387.jpg';\r\nimport GestioneDelSitoImg from '../images/4_dreamstime_l_121865971.jpg';\r\nimport Login from '../images/5_Llangwyn_FronIsaf02UK.jpg';\r\nimport AttivitaInSospesoImg from '../images/5_Llangwyn_FronIsaf02UK.jpg';\r\nimport ElencoDelleRichiesteImg from '../images/1_dreamstime_l_99047632.jpg';\r\nimport { UserContext } from '../providers/UserContextProvider';\r\nimport UserAccountInfo from '../entities/UserAccountInfo';\r\nimport { Groups } from '../const/Groups';\r\nimport TokenService from '../services/TokenService';\r\nimport AzureAuthenticationButton from '../azure/azure-authentication-component';\r\nimport { ShowForVisitor } from '../components/ShowForVisitor';\r\n\r\nexport const HomePage = () => {\r\n\r\n const history = useHistory();\r\n\r\n const { user, setUser } = React.useContext(UserContext);\r\n\r\n const onAuthenticated = async (userAccountInfo: UserAccountInfo, accessToken: string) => {\r\n userAccountInfo.accessToken = accessToken;\r\n ((userAccountInfo.idTokenClaims[\"groups\"])as any).forEach(group => {\r\n if (\r\n group === Groups.CUSTOMER ||\r\n group === Groups.MANAGER ||\r\n group === Groups.REGULATOR ||\r\n group === Groups.SUPPLIER ||\r\n group === Groups.TECHNICAL ||\r\n group === Groups.VISITOR\r\n ) {\r\n userAccountInfo.type = group\r\n }\r\n });\r\n\r\n if (userAccountInfo.username === \"Raona-adm@cellnex.onmicrosoft.com\") userAccountInfo.type = Groups.TECHNICAL;\r\n\r\n setUser(userAccountInfo);\r\n TokenService.setUser(userAccountInfo);\r\n };\r\n\r\n const clientOptions: NavigationCard[] = [\r\n {\r\n cardImage: ElencoDelleRichiesteImg,\r\n textToShow: (\r\n
\r\n

Vai a

\r\n

Le mie richieste

\r\n
\r\n ),\r\n onClickCard: () => history.push(Routes.MyRequests)\r\n } as NavigationCard,\r\n {\r\n cardImage: AttivitaInSospesoImg,\r\n textToShow: (\r\n
\r\n

Vai a

\r\n

Nuova richiesta di ospitalità

\r\n
\r\n ),\r\n onClickCard: () => history.push(Routes.CreateRequest)\r\n } as NavigationCard\r\n ];\r\n\r\n const operatorOptions: NavigationCard[] = [\r\n {\r\n cardImage: AttivitaInSospesoImg,\r\n textToShow: (\r\n
\r\n

Vai alle

\r\n

richieste in sospeso

\r\n
\r\n ),\r\n onClickCard: () => history.push(Routes.PendingTasks)\r\n } as NavigationCard,\r\n {\r\n cardImage: GestioneDelSitoImg,\r\n textToShow: (\r\n
\r\n

Vai alla gestione

\r\n

del sito

\r\n
\r\n ),\r\n onClickCard: () => history.push(Routes.PublishSites)\r\n } as NavigationCard,\r\n {\r\n cardImage: ElencoDelleRichiesteImg,\r\n textToShow: (\r\n
\r\n

Vai all'elenco

\r\n

delle richieste

\r\n
\r\n ),\r\n onClickCard: () => history.push(Routes.AllRequests)\r\n } as NavigationCard,\r\n {\r\n cardImage: ReportImg,\r\n textToShow: (\r\n
\r\n

Vai al

\r\n

Report

\r\n
\r\n ),\r\n onClickCard: () => history.push(Routes.Reporting)\r\n } as NavigationCard\r\n ];\r\n\r\n const mtOptions: NavigationCard[] = [\r\n {\r\n cardImage: AttivitaInSospesoImg,\r\n textToShow: (\r\n
\r\n

Vai alle

\r\n

richieste in sospeso

\r\n
\r\n ),\r\n onClickCard: () => history.push(Routes.PendingTasks)\r\n } as NavigationCard,\r\n {\r\n cardImage: ElencoDelleRichiesteImg,\r\n textToShow: (\r\n
\r\n

Vai all'elenco

\r\n

delle richieste

\r\n
\r\n ),\r\n onClickCard: () => history.push(Routes.AllRequests)\r\n } as NavigationCard,\r\n {\r\n cardImage: ReportImg,\r\n textToShow: (\r\n
\r\n

Vai al

\r\n

Report

\r\n
\r\n ),\r\n onClickCard: () => history.push(Routes.Reporting)\r\n } as NavigationCard\r\n ];\r\n\r\n const w3Options: NavigationCard[] = [\r\n {\r\n cardImage: AttivitaInSospesoImg,\r\n textToShow: (\r\n
\r\n

Vai alle

\r\n

richieste in sospeso

\r\n
\r\n ),\r\n onClickCard: () => history.push(Routes.PendingTasks)\r\n } as NavigationCard\r\n ];\r\n\r\n const visitorOptions: NavigationCard[] = [\r\n {\r\n cardImage: ElencoDelleRichiesteImg,\r\n textToShow: (\r\n
\r\n

Vai all'elenco

\r\n

delle richieste

\r\n
\r\n ),\r\n onClickCard: () => history.push(Routes.AllRequests)\r\n } as NavigationCard,\r\n {\r\n cardImage: ReportImg,\r\n textToShow: (\r\n
\r\n

Vai al

\r\n

Report

\r\n
\r\n ),\r\n onClickCard: () => history.push(Routes.Reporting)\r\n } as NavigationCard\r\n ];\r\n\r\n\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n

Per accedere alla piattaforma del Registro di Trasparenza, è necessario effettuare il login.

\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n

Con l'utente {user.username} non è possibile accedere a questo portale

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n );\r\n}\r\n","export default __webpack_public_path__ + \"static/media/logo.f98eb2d7.png\";","export const BlogTitle ={\r\n Customer: \"Conversazione con Cellnex\",\r\n Cellnex: \"Conversazione tra Cellnex ed i Clienti\"\r\n}","import { Close, Menu, Forum, Notifications } from \"@mui/icons-material\";\r\nimport React, { useRef } from \"react\"\r\nimport { NavLink, Link } from \"react-router-dom\"\r\nimport AzureAuthenticationButton from \"../azure/azure-authentication-component\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { Routes } from \"../const/Routes\";\r\nimport UserAccountInfo, { defaultUserAccountInfo } from \"../entities/UserAccountInfo\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport Logo from '../images/logo.png';\r\nimport { ReactComponent as Notification } from '../images/Notif.svg';\r\nimport { BlogTitle } from \"../const/Texts\";\r\n\r\nexport interface IHeaderProps {\r\n hasUnreadMessages: boolean;\r\n}\r\n\r\nexport const Header = (props: IHeaderProps) => {\r\n\r\n let { hasUnreadMessages } = props;\r\n\r\n const { user, setUser } = React.useContext(UserContext);\r\n const menuRef = useRef();\r\n const shadowRef = useRef();\r\n\r\n const onAuthenticated = async (userAccountInfo: UserAccountInfo, accessToken: string) => {\r\n if (userAccountInfo === undefined) {\r\n setUser(defaultUserAccountInfo);\r\n localStorage.removeItem('user');\r\n return;\r\n }\r\n };\r\n\r\n const handleOpenMenu = () => {\r\n menuRef.current.classList.toggle(\"mMenu--open\");\r\n shadowRef.current.classList.toggle(\"mMenu__shadow--anim\");\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n {\r\n user.type !== Groups.SUPPLIER &&\r\n \r\n {hasUnreadMessages\r\n ?\r\n
\r\n \r\n
\r\n :\r\n\r\n }{user.type === Groups.CUSTOMER ? BlogTitle.Customer : BlogTitle.Cellnex}\r\n
\r\n }\r\n {\r\n user.username !== \"\" &&\r\n {user.name}\r\n }\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n {\r\n user.type === Groups.CUSTOMER\r\n ?\r\n <>\r\n Le mie richieste\r\n Nuova richiesta di ospitalità\r\n Siti Pubblicati\r\n \r\n : (user.type === Groups.MANAGER || user.type === Groups.TECHNICAL || user.type === Groups.VISITOR)\r\n ?\r\n <>\r\n {\r\n user.type !== Groups.VISITOR &&\r\n <>\r\n Le mie attività in sospeso\r\n {\r\n user.type === Groups.TECHNICAL &&\r\n <>\r\n Gestione del sito\r\n \r\n }\r\n \r\n }\r\n Elenco delle richieste\r\n Report\r\n Siti Pubblicati\r\n \r\n : (user.type === Groups.SUPPLIER)\r\n ?\r\n <>\r\n Le mie attività in sospeso\r\n \r\n :\r\n <>\r\n Le mie attività in sospeso\r\n Elenco delle richieste\r\n Report\r\n Siti Pubblicati\r\n \r\n }\r\n
\r\n
\r\n {\r\n \r\n }\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n {\r\n user.type === Groups.CUSTOMER\r\n ?\r\n <>\r\n Le mie richieste\r\n Nuova richiesta di ospitalità\r\n Siti Pubblicati\r\n \r\n : (user.type === Groups.MANAGER || user.type === Groups.TECHNICAL || user.type === Groups.VISITOR)\r\n ?\r\n <>\r\n {\r\n user.type !== Groups.VISITOR &&\r\n <>\r\n Le mie attività in sospeso\r\n {\r\n user.type === Groups.TECHNICAL &&\r\n <>\r\n Gestione del sito\r\n \r\n }\r\n \r\n }\r\n Elenco delle richieste\r\n Report\r\n Siti Pubblicati\r\n \r\n :\r\n <>\r\n Le mie attività in sospeso\r\n Elenco delle richieste\r\n Report\r\n Siti Pubblicati\r\n \r\n }\r\n
\r\n
\r\n
\r\n {\r\n user.type !== Groups.SUPPLIER &&\r\n <>\r\n {hasUnreadMessages\r\n ?\r\n
\r\n \r\n
\r\n :\r\n
\r\n \r\n
\r\n }\r\n \r\n }\r\n {\r\n user.username !== \"\" &&\r\n Benvenuto, {user.name}\r\n }\r\n
\r\n
\r\n {\r\n \r\n }\r\n
\r\n
\r\n
\r\n
\r\n
\r\n )\r\n}","import React from 'react';\r\nimport { Route, Redirect } from 'react-router-dom'\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\n\r\ninterface PrivateRouteProps {\r\n component: any;\r\n path: any;\r\n invalidRoles: string[];\r\n}\r\n\r\nexport const PrivateRoute = ({ component, path, invalidRoles }:PrivateRouteProps) => {\r\n const { user } = React.useContext(UserContext);\r\n if(\r\n user.username === \"\" || \r\n invalidRoles.findIndex( role => user.type === role ) !== -1 \r\n ){\r\n return ;\r\n }\r\n return ;\r\n}","import React, { useRef } from \"react\"\r\nimport TokenService from \"../services/TokenService\";\r\nimport AzureAuthenticationButton from \"../azure/azure-authentication-component\";\r\nimport UserAccountInfo, { defaultUserAccountInfo } from \"../entities/UserAccountInfo\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { Book, Menu } from \"@mui/icons-material\";\r\nimport { Close } from \"@material-ui/icons\";\r\nimport Logo from '../images/logo.png';\r\n\r\nexport const HomeHeader = () => {\r\n\r\n const { user, setUser } = React.useContext(UserContext);\r\n const menuRef = useRef();\r\n const shadowRef = useRef();\r\n\r\n const onAuthenticated = async (userAccountInfo: UserAccountInfo, accessToken: string) => {\r\n if (userAccountInfo === undefined) {\r\n setUser(defaultUserAccountInfo);\r\n TokenService.removeAccessToken();\r\n return;\r\n }\r\n\r\n userAccountInfo.accessToken = accessToken;\r\n ((userAccountInfo.idTokenClaims[\"groups\"])as any).forEach(group => {\r\n if (\r\n group === Groups.CUSTOMER ||\r\n group === Groups.MANAGER ||\r\n group === Groups.REGULATOR ||\r\n group === Groups.SUPPLIER ||\r\n group === Groups.TECHNICAL ||\r\n group === Groups.VISITOR\r\n ) {\r\n userAccountInfo.type = group\r\n }\r\n });\r\n\r\n if (userAccountInfo.username === \"Raona-adm@cellnex.onmicrosoft.com\") userAccountInfo.type = Groups.TECHNICAL;\r\n\r\n setUser(userAccountInfo);\r\n TokenService.setUser(userAccountInfo);\r\n };\r\n\r\n const handleOpenMenu = () => {\r\n menuRef.current.classList.toggle(\"mMenu--open\");\r\n shadowRef.current.classList.toggle(\"mMenu__shadow--anim\");\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n
\r\n
\r\n {\r\n user.username !== \"\"\r\n ?\r\n <>\r\n <>\r\n {user.type === Groups.CUSTOMER &&\r\n Manuale d'uso\r\n }\r\n \r\n \r\n \r\n :\r\n null\r\n }\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Registro di Trasparenza

\r\n
\r\n
\r\n {\r\n user.username !== \"\" &&\r\n Benvenuto, {user.name}\r\n }\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n

Registro di transparenza

\r\n
\r\n
\r\n
\r\n
\r\n {\r\n user.username !== \"\" &&\r\n Benvenuto, {user.name}\r\n }\r\n
\r\n
\r\n {\r\n user.username !== \"\"\r\n ?\r\n <>\r\n <>\r\n {user.type === Groups.CUSTOMER &&\r\n Manuale d'uso\r\n }\r\n \r\n \r\n \r\n :\r\n \r\n }\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n )\r\n}","import axios from \"axios\";\r\nimport TokenService from \"../services/TokenService\";\r\nimport { RoutesAPI } from \"../const/Routes\";\r\nimport { PRO_URL } from \"../const/Urls\";\r\nimport AzureAuthenticationContext from \"../azure/azure-authentication-context\";\r\n\r\nconst instance = axios.create({\r\n baseURL: RoutesAPI.BaseURL,\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n \"Access-Control-Allow-Origin\": \"*\"\r\n },\r\n});\r\n\r\ninstance.interceptors.request.use(\r\n (config) => {\r\n const token = TokenService.getLocalAccessToken();\r\n if (token) {\r\n config.headers[\"Authorization\"] = 'Bearer ' + token;\r\n }\r\n return config;\r\n },\r\n (error) => {\r\n return Promise.reject(error);\r\n }\r\n);\r\n\r\ninstance.interceptors.response.use(\r\n (res) => {\r\n return res;\r\n },\r\n async (err) => {\r\n const originalConfig = err.config;\r\n \r\n if (originalConfig.url !== \"/auth/signin\" && err.response) {\r\n // Access Token was expired\r\n if (err.response.status === 401 && !originalConfig._retry) {\r\n originalConfig._retry = true;\r\n try {\r\n const authenticationModule: AzureAuthenticationContext = new AzureAuthenticationContext();\r\n let token = await authenticationModule.acquireSilentToken();\r\n TokenService.updateLocalAccessToken(token);\r\n return instance(originalConfig);\r\n } catch (_error) {\r\n TokenService.removeAccessToken();\r\n alert(\"Account expired off for security, login again!\");\r\n window.location.href = PRO_URL;\r\n return Promise.reject(_error);\r\n }\r\n }\r\n }\r\n return Promise.reject(err);\r\n }\r\n);\r\n\r\nexport default instance;","export const PRE_URL = \"https://registroditrasparenza-pre.azurewebsites.net/\";\r\nexport const PRO_URL = \"https://registroditrasparenza.azurewebsites.net/\";","export const Spinner = () => {\r\n return (\r\n
\r\n
\r\n
\r\n )\r\n}","import { ErrorOutline } from \"@mui/icons-material\";\r\nimport FileDownloadIcon from '@mui/icons-material/FileDownload';\r\nimport { IconButton, styled, Tooltip, tooltipClasses, TooltipProps } from \"@mui/material\";\r\nimport React, { useContext, useEffect, useState } from \"react\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { getReportings } from \"../services/reportingService\";\r\nimport { Spinner } from \"./Spinner\";\r\n\r\nexport interface IReportings {\r\n ID?: any\r\n reportList?: any\r\n items?: any\r\n classExtra?: string;\r\n infoTooltip?: any;\r\n}\r\nexport const ReportingCard = (props: IReportings) => {\r\n\r\n const [reportingCollection, setReportingCollection] = useState();\r\n const [isLoading, setIsloading] = useState(true);\r\n\r\n let { classExtra } = props;\r\n\r\n let showTooltip: true;\r\n\r\n let reportingItems: IReportings[] = [];\r\n\r\n let text = \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam at rhoncus lectus, at posuere mi. Donec sit amet ipsum id massa viverra volutpat. Vivamus tincidunt nibh id ex condimentum, vel congue lorem ultrices. Suspendisse pharetra ipsum eu dolor fermentum, quis ultrices ipsum bibendum.\"\r\n\r\n const info = [``, ``, ``, ``, ``, ``, ``, ``];\r\n\r\n const LightTooltip = styled(({ className, ...props }: TooltipProps,) => (\r\n \r\n ))(({ theme }) => ({\r\n [`& .${tooltipClasses.tooltip}`]: {\r\n backgroundColor: theme.palette.common.white,\r\n color: 'rgba(0, 0, 0, 0.87)',\r\n boxShadow: theme.shadows[1],\r\n fontSize: 11,\r\n },\r\n }));\r\n\r\n\r\n useEffect(() => {\r\n const fetchData = async () => {\r\n const response = await getReportings();\r\n let array = response[\"data\"];\r\n array.forEach((element, i) => {\r\n let responseData = {\r\n infoTooltip : info[i],\r\n reportList: element[\"column\"],\r\n items: element[\"count\"]\r\n } as IReportings;\r\n reportingItems.push(responseData);\r\n });\r\n setIsloading(false);\r\n setReportingCollection(reportingItems);\r\n };\r\n fetchData();\r\n }, [])\r\n\r\n if (isLoading) return \r\n return (\r\n <>\r\n
\r\n {reportingCollection !== undefined &&\r\n reportingCollection.map((reportItem, i) => {\r\n return (\r\n
\r\n
\r\n

{reportItem.reportList}

\r\n {reportItem.infoTooltip == \"\" || null ?
: \r\n \r\n \r\n \r\n }\r\n
\r\n
\r\n \r\n \r\n

Scarica Elenco

\r\n
\r\n
{reportItem.items}
\r\n
\r\n
\r\n )\r\n })\r\n }\r\n
\r\n \r\n )\r\n\r\n}\r\n\r\n","import axiosInstance from '../config/axiosConfig';\r\n\r\nexport const getReportings = () => {\r\n return axiosInstance.get('/Reporting/reports');\r\n}\r\n\r\nexport const getRequestsTagsInfo = (filters?:string, rol?:string) => {\r\n return axiosInstance.get(`/Reporting/${rol}/rol?${filters}`);\r\n}","import React from \"react\";\r\nimport { ReportingCard } from \"../components/ReportingCards\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\n\r\n\r\n\r\nexport const ReportingPage = () => {\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n )\r\n} ","export const MunicipalityFields = {\r\n Id: 'Id',\r\n Name: 'Title',\r\n Provincia: 'CELLNEX_Provincia',\r\n Regione: 'CELLNEX_Regione'\r\n}\r\n\r\nexport const SiteFields = {\r\n Id: 'Id',\r\n SiteId: 'Title',\r\n MunicipalityId: 'CELLNEX_Comune',\r\n Lat: 'CELLNEX_CoordinatesLAT',\r\n Lon: 'CELLNEX_CoordinatesLON',\r\n Comune: 'CELLNEX_Comune',\r\n AltezzaSitio: 'CELLNEX_Altezza',\r\n SiteType: 'CELLNEX_SiteType',\r\n Fattibilita: 'CELLNEX_FattibilitaPreliminare',\r\n DataProntoServizio: 'CELLNEX_DataProntoServicio',\r\n PropostaCellnex: 'CELLNEX_PropostaCellnex',\r\n StatusChangeDate: 'CELLNEX_StatusChangeDate',\r\n}\r\nexport const SiteRequestFields = {\r\n Id: 'Id',\r\n SiteId: 'CELLNEX_SiteID',\r\n Stato: 'CELLNEX_Status',\r\n TechnicalComments: 'CELLNEX_TechnicalComments',\r\n MTComments: 'CELLNEX_MTComments',\r\n ManagerComments: 'CELLNEX_ManagerComments'\r\n}\r\n\r\nexport const RequestFields = {\r\n Id: 'Id',\r\n RequestId: 'Title',\r\n DataDiRequesta: 'Created',\r\n Comune: 'CELLNEX_Comune',\r\n Tipi: 'CELLNEX_RequestType',\r\n Stato: 'CELLNEX_RequestStatus',\r\n DataLastActu: 'Modified',\r\n Giorni: 'Giorni',\r\n ApplicantAgency: 'CELLNEX_Applicant_x003A_RAGIONE_',\r\n RequestAcceptedDate: 'CELLNEX_Request_Accepted_Date',\r\n GiorniScadenza: 'CELLNEX_ChangeDelayStatusDate',\r\n StopClock: \" CELLNEX_ClockStopped\"\r\n}\r\n\r\nexport const ClientFields ={\r\n Azienda: 'CELLNEX_NomeAzienda',\r\n Contatto: 'CELLNEX_Cognome',\r\n}","export const Actions = {\r\n Richiedi: 'Richiedi',\r\n Vedi: 'Vedi'\r\n}","import axiosInstance from '../config/axiosConfig';\r\n\r\nexport const getMunicipalities = (filters?: string) => {\r\n if (filters) return axiosInstance.get(`/Municipalities?${filters}`);\r\n else return axiosInstance.get('/Municipalities');\r\n}","interface ICheckboxProps {\r\n value:boolean;\r\n onChange: () => void;\r\n}\r\n\r\nexport const Checkbox = ({ value, onChange }:ICheckboxProps) => {\r\n return (\r\n \r\n );\r\n};","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport { ErrorOutline, KeyboardArrowDown, KeyboardArrowUp } from \"@mui/icons-material\";\r\nimport React from \"react\";\r\nimport { TableColumn } from \"../entities/TableColumn\";\r\nimport { Checkbox } from \"./Checkbox\";\r\n\r\ninterface ITableProps {\r\n localRequestStatus? : string;\r\n columns: TableColumn[];\r\n items: any[];\r\n allowSelectItems: boolean;\r\n showMoreInfoSection: boolean;\r\n isLoadingData: boolean;\r\n selectedItems?: Set;\r\n modifiedItems?: Map;\r\n selectedMoreInfoItem?: Set;\r\n onSelectItem?: Function;\r\n onSelectMoreInfo?: Function;\r\n actionColumn?: Function;\r\n actionsForSelectedItems?: Function;\r\n renderOnSelected?: Function;\r\n renderOnMoreInfo?: Function;\r\n onOrderBy?: (orderInfo: any, columns: TableColumn[]) => void;\r\n onSelectAllItems?: Function;\r\n}\r\n\r\nexport const Table = (props: ITableProps) => {\r\n\r\n let {localRequestStatus, columns, items, allowSelectItems, onSelectItem, onSelectMoreInfo, selectedMoreInfoItem, onSelectAllItems, modifiedItems, selectedItems, actionsForSelectedItems, showMoreInfoSection, renderOnMoreInfo, isLoadingData, actionColumn, renderOnSelected, onOrderBy } = props;\r\n\r\n const handleOrderBy = (e, column: TableColumn) => {\r\n e.preventDefault();\r\n let targetOrder = column.order === \"desc\" ? \"asc\" : \"desc\";\r\n let orderData = {\r\n field: column.key,\r\n order: targetOrder\r\n }\r\n let newColumns = columns.map(col => {\r\n if (col.key === column.key) col.order = targetOrder\r\n else col.order = \"desc\";\r\n return col;\r\n });\r\n onOrderBy(orderData, newColumns);\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {\r\n allowSelectItems &&\r\n \r\n }\r\n {\r\n columns.map(column => {\r\n\r\n let { displayName, canOrderBy, order, show } = column;\r\n\r\n if (show !== true) return null;\r\n\r\n let orderElement = null;\r\n if (canOrderBy) {\r\n orderElement = handleOrderBy(e, column)}>{order === \"asc\" ? : }\r\n }\r\n\r\n return (\r\n \r\n )\r\n })\r\n }\r\n {\r\n actionColumn &&\r\n \r\n }\r\n {\r\n showMoreInfoSection &&\r\n \r\n }\r\n \r\n \r\n \r\n {isLoadingData &&\r\n \r\n \r\n \r\n }\r\n {!isLoadingData && items.length === 0 &&\r\n \r\n \r\n \r\n }\r\n {\r\n !isLoadingData && items.map((item, index) => {\r\n let tdsItem = columns.map(column => {\r\n if (column.showOnSelect === true && (selectedItems && !selectedItems.has(item.id))) {\r\n return ;\r\n }\r\n if (column.show !== true && column.showOnSelect !== true) return null;\r\n\r\n let itemValue;\r\n if (typeof column.accessor === 'function') {\r\n itemValue = column.accessor(item);\r\n } else {\r\n itemValue = item[column.accessor];\r\n }\r\n return (\r\n )\r\n });\r\n\r\n let tdCheck: JSX.Element | null = null;\r\n if (allowSelectItems) {\r\n tdCheck = \r\n }\r\n\r\n let tdActions: JSX.Element | null = null;\r\n if (actionColumn) {\r\n tdActions = \r\n }\r\n\r\n let tdMoreInfo: JSX.Element | null = null;\r\n if (showMoreInfoSection) {\r\n tdMoreInfo = ;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {tdCheck}\r\n {tdsItem}\r\n {tdActions}\r\n {tdMoreInfo}\r\n \r\n {\r\n selectedItems && selectedItems.has(item.id) && renderOnSelected &&\r\n \r\n {renderOnSelected(item)}\r\n \r\n }\r\n {\r\n selectedMoreInfoItem && selectedMoreInfoItem.has(item.id) &&\r\n \r\n {renderOnMoreInfo(item)}\r\n \r\n }\r\n \r\n )\r\n })\r\n }\r\n {\r\n actionsForSelectedItems &&\r\n actionsForSelectedItems()\r\n }\r\n \r\n
\r\n {\r\n onSelectAllItems &&\r\n \r\n onSelectAllItems()}\r\n /> Seleziona\r\n \r\n }\r\n {displayName} {orderElement}Azioni
\r\n
\r\n \r\n

Non è stato trovato alcun dato

\r\n
\r\n
{column.customRender ? column.customRender(item, modifiedItems, localRequestStatus) : itemValue} \r\n onSelectItem(item)}\r\n />\r\n {actionColumn(item)} onSelectMoreInfo(item)}>{selectedMoreInfoItem && selectedMoreInfoItem.has(item.id) ? : }
\r\n
\r\n )\r\n};","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { SearchOutlined } from \"@mui/icons-material\";\r\nimport { useEffect, useState } from \"react\";\r\ninterface SearchProps {\r\n text: string;\r\n placeholder?: string;\r\n handleSearch: (e) => void;\r\n}\r\n\r\nexport const Search = (props: SearchProps) => {\r\n let { text, placeholder, handleSearch } = props;\r\n\r\n const [query, setQuery] = useState(text);\r\n\r\n useEffect(() => {\r\n const timeOutId = setTimeout(() => handleSearch(query), 500);\r\n return () => clearTimeout(timeOutId);\r\n }, [query]);\r\n\r\n const handleInternalSearch = (e) => {\r\n setQuery(e.currentTarget.value);\r\n }\r\n\r\n return
\r\n \r\n \r\n
\r\n}","import * as React from 'react';\r\nimport TablePagination from '@mui/material/TablePagination';\r\nimport { esES } from '@mui/x-data-grid';\r\nimport usePagination from '@mui/material/usePagination';\r\nimport { createTheme, ThemeProvider } from '@mui/material/styles';\r\nimport { itIT } from '@mui/material/locale';\r\n\r\nexport interface PaginationProps {\r\n count?: any;\r\n className?: string;\r\n page?: any;\r\n handleChangePage?: any;\r\n}\r\n\r\nexport const PaginationComponent = (props: PaginationProps) => {\r\n\r\n\r\n let { count, handleChangePage, page } = props;\r\n\r\n const theme = createTheme(\r\n {\r\n palette: {\r\n primary: { main: '#1976d2' },\r\n },\r\n },\r\n itIT,\r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n\r\n );\r\n}","/* eslint-disable jsx-a11y/anchor-is-valid */\r\n/* eslint-disable react-hooks/exhaustive-deps */\r\nimport React, { useEffect, useState } from \"react\";\r\nimport { TableColumn } from \"../entities/TableColumn\";\r\nimport { MunicipalityFields } from \"../const/Fields\";\r\nimport { Actions } from \"../const/Actions\";\r\nimport { useGetMunicipalities } from \"../hooks/useGetMunicipalities\";\r\nimport { Table } from \"./Table\";\r\nimport { Search } from \"../components/Search\"\r\nimport { Municipality } from \"../entities/Municipality\";\r\nimport { ChevronLeft, ChevronRight } from \"@mui/icons-material\";\r\nimport { PaginationComponent } from \"./PaginationComponent\";\r\n\r\ninterface ListMunicipalitiesProps {\r\n onSelectAction: (item: Municipality, action: string, type: string) => void;\r\n}\r\n\r\nconst ListMunicipalities = (props: ListMunicipalitiesProps) => {\r\n\r\n let { onSelectAction } = props;\r\n\r\n const [filterList, setFilterList] = useState([]);\r\n const [query, setQuery] = useState(\"\");\r\n const [order, setOrderBy] = useState<{ field: string, order: string }>({ field: \"\", order: \"\" });\r\n const [paginationHistory, setPaginationHistory] = useState([]);\r\n const [showConcurrentRequests, setShowConcurrentRequests] = useState(false);\r\n let { isFetching, municipalitiesList, refreshData } = useGetMunicipalities();\r\n //const [requestListState, setRequestListState] = useState(municipalitiesList);\r\n\r\n const [page, setPage] = useState(1);\r\n const totalItems = 20;\r\n const items = filterList?.slice((page - 1) * totalItems, page * totalItems);\r\n\r\n const [tableColumns, setTableColumns] = useState([\r\n {\r\n key: MunicipalityFields.Name,\r\n displayName: \"Comune\",\r\n accessor: \"comune\",\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: MunicipalityFields.Provincia,\r\n displayName: \"Provincia\",\r\n accessor: \"province\",\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: MunicipalityFields.Regione,\r\n displayName: \"Regione\",\r\n accessor: \"region\",\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn\r\n ]);\r\n\r\n const getFilters = (addPagination: boolean = true) => {\r\n let filters = \"\";\r\n if (query.length >= 3) filters += `Text=${query}&`;\r\n if (order.field !== \"\") filters += `OrderFieldName=${order.field}&OrderAscending=${order.order === \"asc\" ? \"True\" : \"False\"}&`;\r\n if (addPagination && municipalitiesList.nextPagedInfo !== null) filters += `PageInfo=${encodeURIComponent(municipalitiesList.nextPagedInfo)}&`;\r\n setPage(1);\r\n return filters;\r\n }\r\n\r\n const previousSelectedItems = () => {\r\n let finalList: Municipality[] = [];\r\n if (municipalitiesList !== null) {\r\n let iDs = new Set();\r\n municipalitiesList?.municipalities?.forEach(item => {\r\n iDs.add(item.id);\r\n finalList.push(item);\r\n \r\n });\r\n municipalitiesList?.municipalities?.forEach(site => {\r\n if (!iDs.has(site.id)) {\r\n finalList.push(site);\r\n }\r\n });\r\n setFilterList([...finalList]);\r\n }\r\n else setFilterList([...municipalitiesList?.municipalities])\r\n\r\n }\r\n\r\n useEffect(() => {\r\n if (isFetching) return;\r\n previousSelectedItems();\r\n\r\n return () => { }\r\n }, [ isFetching]);\r\n\r\n useEffect(() => {\r\n if (isFetching) return;\r\n if (query.length < 3 && query.length !== 0) return;\r\n let filters = getFilters(false);\r\n setPaginationHistory([]);\r\n refreshData(filters);\r\n\r\n return () => { }\r\n }, [query, order]);\r\n\r\n\r\n const handleChangePage = (event, value) =>{\r\n let takeMore = (value)*20 > municipalitiesList?.municipalities?.length ? municipalitiesList?.municipalities?.length : (value)*20;\r\n\r\n let finalList: Municipality[] = [];\r\n if (municipalitiesList?.municipalities !== null) {\r\n let iDs = new Set();\r\n municipalitiesList?.municipalities?.forEach(item => {\r\n iDs.add(item.id);\r\n finalList.push(item);\r\n \r\n });\r\n municipalitiesList?.municipalities?.slice(((value - 1)*20),takeMore).forEach(site => {\r\n if (!iDs.has(site.id)) {\r\n finalList.push(site);\r\n }\r\n });\r\n setFilterList([...finalList]);\r\n \r\n }\r\n else setFilterList([...municipalitiesList?.municipalities?.slice(((value - 1)*20),takeMore)]) \r\n \r\n setPage(value +1);\r\n }\r\n\r\n const handleSearch = (text) => {\r\n setQuery(text);\r\n }\r\n\r\n const handleOnOrderBy = (orderInfo: any, columns: TableColumn[]) => {\r\n setTableColumns([...columns]);\r\n setOrderBy(orderInfo);\r\n }\r\n\r\n // const goNextPage = () => {\r\n // let filters = getFilters();\r\n // setPaginationHistory([...paginationHistory, filters])\r\n // refreshData(filters);\r\n // }\r\n\r\n // const goPrevPage = () => {\r\n // paginationHistory.pop();\r\n // if (paginationHistory.length === 0) {\r\n // let filters = getFilters(false);\r\n // refreshData(filters);\r\n // } else {\r\n // refreshData(paginationHistory[paginationHistory.length - 1]);\r\n // }\r\n // setPaginationHistory([...paginationHistory])\r\n // }\r\n\r\n // let navPrevDisabled = paginationHistory.length === 0 ? \"navigation__control--disabled\" : \"\";\r\n // let navNextDisabled = municipalitiesList?.nextPagedInfo === null ? \"navigation__control--disabled\" : \"\";\r\n return (\r\n <>\r\n \r\n {\r\n let sitesClass = item.publishedSites ? \"link\" : \"link disabled\";\r\n let allSitesClass = !item.allSitesPublished ? \"link\" : \"link disabled\";\r\n let disabledStyle: any = {\r\n color: \"grey\",\r\n cursor: \"not-allowed\",\r\n opacity: 0.5,\r\n textDecoration: \"none\"\r\n }\r\n return (\r\n <>\r\n onSelectAction(item, Actions.Vedi, \"Sito\") : null}>Vedi onSelectAction(item, Actions.Richiedi, \"Comune\")}>Inserisci Richiesta​\r\n \r\n )\r\n }}\r\n />\r\n
\r\n {/* \r\n */}\r\n \r\n
\r\n \r\n )\r\n\r\n}\r\n\r\nexport default ListMunicipalities;","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { useEffect, useState } from \"react\";\r\nimport {MunicipalityList} from '../entities/Municipality';\r\nimport { getMunicipalities } from \"../services/municipiosService\";\r\n\r\nexport const useGetMunicipalities = (filters?: string): { isFetching:boolean, municipalitiesList:MunicipalityList, refreshData: (filters?: string) => Promise } => {\r\n const [isFetching, setIsFetching] = useState(true);\r\n const [municipalitiesList, setMunicipalitiesList] = useState(null);\r\n\r\n useEffect(() => {\r\n const fetchData = async () => {\r\n const response = await getMunicipalities();\r\n let responseData = {\r\n municipalities: response.data.result,\r\n //nextPagedInfo: response.data.nextPagedInfo\r\n } as MunicipalityList;\r\n setMunicipalitiesList(responseData);\r\n setIsFetching(false);\r\n };\r\n fetchData();\r\n }, []);\r\n\r\n const refreshData = async (filters?: string) => {\r\n setIsFetching(true);\r\n let response = await getMunicipalities(filters);\r\n let responseData = {\r\n municipalities: response.data.result,\r\n //nextPagedInfo: response.data.nextPagedInfo\r\n } as MunicipalityList;\r\n setMunicipalitiesList(responseData);\r\n setIsFetching(false);\r\n };\r\n\r\n return { isFetching, municipalitiesList, refreshData };\r\n};","import axiosInstance from '../config/axiosConfig';\r\n\r\nexport const getSites = (filters?: string) => {\r\n if(filters) return axiosInstance.get(`/Sites?${filters}`);\r\n else return axiosInstance.get('/Sites');\r\n}\r\n\r\nexport const postRemoveSite = (sites: string[]) => {\r\n return axiosInstance.put(`/HospitalityRequest/removedSites`, JSON.stringify(sites));\r\n}","import { CellnexRequest } from \"../entities/CellnexRequest\";\r\nimport { RequestList, Request } from \"../entities/Request\";\r\nimport { SiteList, SiteRequest } from \"../entities/Site\";\r\n\r\nexport const DateFormatConverter = (date: string) => {\r\n if(date === undefined) return;\r\n let dateInfoSeparated: string[] = date.split(\"-\");\r\n let dateInfo:string = dateInfoSeparated[2].concat(\"/\").concat(dateInfoSeparated[1]).concat(\"/\").concat(dateInfoSeparated[0]);\r\n return dateInfo;\r\n}\r\n\r\nexport const DateFormatConverterReverse = (date: string) => {\r\n if(date === undefined) return;\r\n let dateInfoSeparated: string[] = date.split(\"/\");\r\n let dateInfo:string = dateInfoSeparated[2].concat(\"-\").concat(dateInfoSeparated[1]).concat(\"-\").concat(dateInfoSeparated[0]);\r\n return dateInfo;\r\n}\r\n\r\nexport const DateLastUpdateFormatConverter = (date: string) => {\r\n if(date === undefined) return;\r\n let separateTimeDate: string[] = date.split(\" \");\r\n let dateInfoSeparated: string[] = separateTimeDate[0].split(\"-\");\r\n let dateInfo:string = dateInfoSeparated[2].concat(\"/\").concat(dateInfoSeparated[1])\r\n .concat(\"/\").concat(dateInfoSeparated[0]).concat(\" \").concat(separateTimeDate[1]);\r\n return dateInfo;\r\n}\r\n\r\nexport const SiteDateConverter = (siteList: SiteList) => {\r\n if(siteList !== null){\r\n siteList.sites.forEach( item => {\r\n if(item.dataProntoServizo !== undefined){\r\n item.dataProntoServizo = DateFormatConverter(item?.dataProntoServizo);\r\n }\r\n })\r\n }\r\n return siteList;\r\n}\r\n\r\nexport const RequestDateConverter = (siteList: RequestList) => {\r\n if(siteList !== null){\r\n siteList.requests.forEach( item => {\r\n if(item.dataRequesta !== undefined){\r\n item.dataRequesta = DateFormatConverter(item?.dataRequesta);\r\n }\r\n })\r\n }\r\n return siteList;\r\n}\r\n\r\nexport const RequestLastDateConverter = (siteList: RequestList) => {\r\n if(siteList !== null){\r\n siteList.requests.forEach( item => {\r\n if(item.dataLastActu !== undefined){\r\n item.dataLastActu = DateLastUpdateFormatConverter(item?.dataLastActu);\r\n }\r\n })\r\n }\r\n return siteList;\r\n}\r\n\r\nexport const CellnexRequestDateConverter = (siteList: CellnexRequest) => {\r\n if(siteList !== null){\r\n siteList.sites.forEach( item => {\r\n if(item.dataProntoServizo !== undefined){\r\n item.dataProntoServizo = DateFormatConverter(item?.dataProntoServizo);\r\n }\r\n })\r\n }\r\n return siteList;\r\n}\r\n\r\nexport const SiteRequestDateConverter = (siteList: SiteRequest[]) => {\r\n if(siteList !== null){\r\n siteList.forEach( item => {\r\n if(item.dataProntoServizo !== undefined){\r\n item.dataProntoServizo = DateFormatConverter(item?.dataProntoServizo);\r\n }\r\n })\r\n }\r\n return siteList;\r\n}\r\n\r\nexport const PriorityRequestDateConverter = (requests: Request[]) => {\r\n if(requests.length > 0){\r\n requests.forEach( item => {\r\n if(item.selectedSite !== undefined){\r\n item.selectedSite.dataProntoServizo = DateFormatConverter(item?.dataRequesta);\r\n }\r\n })\r\n }\r\n return requests;\r\n}","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { useEffect, useState } from \"react\";\r\nimport { SiteList } from \"../entities/Site\";\r\nimport { getSites } from \"../services/sitesService\";\r\nimport {SiteDateConverter} from \"../const/DateFormatConverter\";\r\n\r\nexport const useGetSites = (filters?: string): { isFetching:boolean, sitesList:SiteList, refreshData: (filters?: string) => Promise } => {\r\n const [isFetching, setIsFetching] = useState(true);\r\n const [sitesList, setSitesList] = useState(null);\r\n\r\n useEffect(() => {\r\n const fetchData = async () => {\r\n const response = await getSites(filters);\r\n let responseData = {\r\n sites: response.data.result,\r\n nextPagedInfo: response.data.nextPagedInfo\r\n } as SiteList;\r\n responseData = SiteDateConverter(responseData); \r\n setSitesList(responseData);\r\n setIsFetching(false);\r\n };\r\n fetchData();\r\n }, []);\r\n\r\n const refreshData = async (filters?: string) => {\r\n setIsFetching(true);\r\n let response = await getSites(filters);\r\n let responseData = {\r\n sites: response.data.result,\r\n nextPagedInfo: response.data.nextPagedInfo\r\n } as SiteList;\r\n responseData = SiteDateConverter(responseData); \r\n setSitesList(responseData);\r\n setIsFetching(false);\r\n };\r\n\r\n return { isFetching, sitesList, refreshData };\r\n};","/* eslint-disable jsx-a11y/anchor-is-valid */\r\n/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { useEffect, useState } from \"react\";\r\nimport { TableColumn } from \"../entities/TableColumn\";\r\nimport { SiteFields } from \"../const/Fields\";\r\nimport { Actions } from \"../const/Actions\";\r\nimport { useGetSites } from \"../hooks/useGetSites\";\r\nimport { Table } from \"./Table\";\r\nimport { Search } from \"../components/Search\"\r\nimport { Site } from \"../entities/Site\";\r\nimport { ChevronLeft, ChevronRight } from \"@mui/icons-material\";\r\n\r\ninterface ListSitesProps {\r\n onSelectAction: (item: Site, action: string, type: string) => void;\r\n filterByMunicipality?: string | number;\r\n comingFromMunicipality?: boolean;\r\n}\r\n\r\nconst ListSites = (props: ListSitesProps) => {\r\n\r\n let { onSelectAction, filterByMunicipality, comingFromMunicipality } = props;\r\n\r\n const [query, setQuery] = useState(\"\");\r\n const [order, setOrderBy] = useState<{ field: string, order: string }>({ field: \"\", order: \"\" });\r\n const [paginationHistory, setPaginationHistory] = useState([]);\r\n let { isFetching, sitesList, refreshData } = useGetSites(filterByMunicipality ? `IdMunicipality=${filterByMunicipality}&SiteStatus=Pubblicati` : undefined);\r\n const [tableColumns, setTableColumns] = useState([\r\n {\r\n key: SiteFields.SiteId,\r\n displayName: \"Site ID\",\r\n accessor: \"siteId\",\r\n canOrderBy: true,\r\n order: \"asc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Lon,\r\n displayName: \"Coordinate (LON)\",\r\n accessor: \"lon\",\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Lat,\r\n displayName: \"Coordinate (LAT)\",\r\n accessor: \"lat\",\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Comune,\r\n displayName: \"Comune\",\r\n accessor: (item: Site) => {\r\n return item.municipality.comune\r\n },\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: comingFromMunicipality ? false : true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.SiteType,\r\n displayName: \"Site type\",\r\n accessor: \"siteType\",\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.AltezzaSitio,\r\n displayName: \"Altezza Sito\",\r\n accessor: \"altezzaSitio\",\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.PropostaCellnex,\r\n displayName: \"Proposta Cellnex\",\r\n accessor: \"propostaCellnex\",\r\n canOrderBy: false,\r\n show: true,\r\n showOnSelect: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Fattibilita,\r\n displayName: \"Fattibilità\",\r\n accessor: \"fattibilita\",\r\n canOrderBy: false,\r\n show: true,\r\n showOnSelect: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.DataProntoServizio,\r\n displayName: \"Data di pronto servizio\",\r\n accessor: \"dataProntoServizo\",\r\n canOrderBy: false,\r\n show: true,\r\n showOnSelect: true\r\n } as TableColumn\r\n ]);\r\n\r\n const getFilters = (addPagination: boolean = true) => {\r\n let filters = `IdMunicipality=${filterByMunicipality}&SiteStatus=Pubblicati&`;\r\n if (query.length >= 3) filters += `Text=${query}&`;\r\n if (order.field !== \"\") filters += `OrderFieldName=${order.field}&OrderAscending=${order.order === \"asc\" ? \"True\" : \"False\"}&`;\r\n if (addPagination && sitesList.nextPagedInfo !== null) filters += `PageInfo=${encodeURIComponent(sitesList.nextPagedInfo)}&`;\r\n return filters;\r\n }\r\n\r\n useEffect(() => {\r\n if (isFetching) return;\r\n let filters = getFilters(false);\r\n setPaginationHistory([]);\r\n if (query.length >= 3 || query.length === 0) {\r\n refreshData(filters);\r\n }\r\n return () => { }\r\n }, [query, order]);\r\n\r\n const handleSearch = (text) => {\r\n setQuery(text);\r\n }\r\n\r\n const handleOnOrderBy = (orderInfo: any, columns: TableColumn[]) => {\r\n setTableColumns([...columns]);\r\n setOrderBy(orderInfo);\r\n }\r\n\r\n const goNextPage = () => {\r\n let filters = getFilters();\r\n setPaginationHistory([...paginationHistory, filters])\r\n refreshData(filters);\r\n }\r\n\r\n const goPrevPage = () => {\r\n paginationHistory.pop();\r\n if (paginationHistory.length === 0) {\r\n let filters = getFilters(false);\r\n refreshData(filters);\r\n } else {\r\n refreshData(paginationHistory[paginationHistory.length - 1]);\r\n }\r\n setPaginationHistory([...paginationHistory])\r\n }\r\n\r\n let navPrevDisabled = paginationHistory.length === 0 ? \"navigation__control--disabled\" : \"\";\r\n let navNextDisabled = sitesList?.nextPagedInfo === null ? \"navigation__control--disabled\" : \"\";\r\n\r\n return (\r\n <>\r\n \r\n {\r\n return (\r\n <>\r\n onSelectAction(item, Actions.Richiedi, \"Sito\")} className=\"link\">Inserisci Richiesta\r\n \r\n )\r\n }}\r\n />\r\n
\r\n \r\n \r\n
\r\n \r\n )\r\n\r\n}\r\n\r\nexport default ListSites;","import { ChevronLeft } from \"@mui/icons-material\";\r\n\r\ninterface HeadTitleProps {\r\n title: string;\r\n onGoBack?: Function;\r\n}\r\n\r\nexport const HeadTitle = (props: HeadTitleProps) => {\r\n let { title, onGoBack } = props;\r\n\r\n return (\r\n <>\r\n

\r\n {\r\n onGoBack &&\r\n onGoBack()}>\r\n }\r\n {title}\r\n

\r\n\r\n \r\n )\r\n}","import React from \"react\";\r\nimport { TextareaAutosize } from \"@mui/core\";\r\n\r\nexport interface CommentProps {\r\n commentText?: string;\r\n operatorName?: string;\r\n showLabel?: boolean;\r\n updatingComment: Function;\r\n blocked?: boolean;\r\n}\r\n\r\nconst Comments = (props: CommentProps) => {\r\n\r\n let { showLabel, operatorName, commentText, updatingComment, blocked } = props;\r\n\r\n const handlerComment = (comment: any) => {\r\n commentText = comment.target.value;\r\n updatingComment(commentText);\r\n }\r\n\r\n return (\r\n < >\r\n

Commenti

\r\n {showLabel && }\r\n {operatorName &&\r\n
{operatorName}
\r\n }\r\n \r\n \r\n )\r\n}\r\n\r\nexport default Comments;","import { Close, InsertDriveFileOutlined } from \"@mui/icons-material\";\r\nimport { useState } from \"react\";\r\nimport Dropzone from \"react-dropzone\";\r\nimport { FileAttachment } from \"../entities/FileAttachment\";\r\n\r\nexport interface FileProps {\r\n isPreDesign?: boolean;\r\n multipleFiles?: boolean;\r\n goMultipleFilesFunction?: boolean;\r\n shareFile: Function;\r\n emptyError: string | undefined;\r\n blocked: boolean;\r\n acceptExtensions?: string;\r\n fileHead?: string;\r\n fileInfo?: string;\r\n cssAlternie?: string;\r\n disabled?: boolean;\r\n}\r\n\r\nexport const UploadFile = (props: FileProps) => {\r\n\r\n let { isPreDesign, shareFile, emptyError, acceptExtensions, blocked, fileHead, fileInfo, multipleFiles, goMultipleFilesFunction, cssAlternie, disabled } = props;\r\n\r\n\r\n const [error, setError] = useState();\r\n const [checkDelete, setCheckDelete] = useState(\"\");\r\n const [showHeader, setShowHeader] = useState(fileHead !== undefined ? fileHead : \"\");\r\n const [header, setHeader] = useState();\r\n const [contentError, setContentError] = useState(\"\");\r\n const [fileContent, setFileContent] = useState(fileInfo !== undefined ? fileInfo : \"\");\r\n\r\n let fileReader: any;\r\n let fileHeader: string;\r\n\r\n const handlerFile = () => {\r\n\r\n var binaryStr = fileReader.result;\r\n var base64Str = btoa(binaryStr);\r\n setFileContent(base64Str);\r\n shareFile(fileHeader, base64Str);\r\n }\r\n\r\n const handlerFileChosen = (file: any) => {\r\n if (file.length === 0) {\r\n setContentError(\"Il file deve essere .xls, .xlsx\");\r\n setError(true);\r\n shareFile();\r\n }\r\n if (file[0] !== undefined) {\r\n if (file[0].size <= 5000000) {\r\n setError(false);\r\n fileHeader = file[0][\"name\"];\r\n setShowHeader(fileHeader);\r\n fileReader = new FileReader();\r\n fileReader.onload = handlerFile;\r\n fileReader.readAsBinaryString(file[0]);\r\n setCheckDelete(fileHeader);\r\n }\r\n else {\r\n // file.target.value = null;\r\n // file.target.files = null;\r\n setShowHeader(\"\");\r\n setCheckDelete(\"\");\r\n setError(true);\r\n setContentError(\"Il file supera la dimensione impostata\");\r\n setFileContent(undefined);\r\n setShowHeader(\"\");\r\n shareFile();\r\n }\r\n }\r\n else {\r\n setCheckDelete(\"\");\r\n shareFile();\r\n }\r\n };\r\n\r\n const handlerMultipleFileChosen = (files: any) => {\r\n for (var file of files) {\r\n let fileReaderM = new FileReader();\r\n let fileHeaderM: string;\r\n if (file !== undefined) {\r\n if (file.size <= 5000000) {\r\n fileHeaderM = file[\"name\"];\r\n fileReaderM.onload = () => {\r\n let binaryStr: any = fileReaderM.result;\r\n let base64Str = btoa(binaryStr);\r\n shareFile({\r\n fileName: fileHeaderM,\r\n fileContent: base64Str\r\n } as FileAttachment);\r\n };\r\n fileReaderM.readAsBinaryString(file);\r\n }\r\n }\r\n }\r\n };\r\n\r\n const handlerFileDelete = () => {\r\n shareFile();\r\n setCheckDelete(\"\");\r\n setFileContent(undefined);\r\n setShowHeader(\"\");\r\n }\r\n\r\n return (\r\n <>\r\n {isPreDesign === false &&\r\n
\r\n \r\n
\r\n }\r\n {isPreDesign === true &&\r\n
\r\n \r\n
\r\n }\r\n <>\r\n
\r\n\r\n goMultipleFilesFunction === true ? handlerMultipleFileChosen(e) : handlerFileChosen(e)} multiple={multipleFiles === true ? true : false}>\r\n {({ getRootProps, getInputProps }) => (\r\n <>\r\n
\r\n \r\n {header ? (\r\n
\r\n {showHeader}\r\n
\r\n ) : (\r\n <>\r\n
\r\n \r\n

Trascina i file qui o fai clic per caricare

\r\n
\r\n \r\n )}\r\n
\r\n\r\n \r\n )}\r\n
\r\n {header !== undefined &&\r\n

{header}

\r\n }\r\n {error &&\r\n

{contentError}

\r\n }\r\n\r\n
\r\n {showHeader !== \"\" &&\r\n
\r\n {showHeader}\r\n
\r\n }\r\n {\r\n acceptExtensions\r\n ?\r\n

Singolo ({acceptExtensions}) file massimo 5 MB

\r\n :\r\n

Singolo excel (.xls, .xlsx) file massimo 5 MB

\r\n }\r\n
\r\n\r\n
\r\n {emptyError !== undefined && !error &&\r\n

{emptyError}

\r\n }\r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { FilterItem } from '../entities/Filter'\r\n\r\nexport interface DropdownProps {\r\n selectItem: FilterItem[];\r\n dropdownOption: Function;\r\n selectedValue?: any;\r\n cssExtra?: string;\r\n}\r\n\r\nexport const Dropdown = (props: DropdownProps) => {\r\n\r\n let { dropdownOption, selectItem, selectedValue, cssExtra } = props;\r\n const handlerDropdownFilters = (filterOption: any, FilterId: number) => {\r\n dropdownOption(filterOption.target.value, FilterId);\r\n }\r\n\r\n return (\r\n <>\r\n {/* Map y show search results, undefined on how it is going to be */}\r\n {selectItem.map(filteritems => {\r\n return \r\n })\r\n }\r\n \r\n )\r\n}\r\n\r\ninterface IDropdownsOptions {\r\n key: number;\r\n filter: FilterItem;\r\n onChangeFilter: Function;\r\n selectedValue?: any;\r\n cssExtra?: string;\r\n}\r\n\r\nconst DrowpdownsOptions = (properties: IDropdownsOptions) => {\r\n let { filter, onChangeFilter, selectedValue, cssExtra } = properties;\r\n\r\n return (\r\n <>\r\n \r\n \r\n )\r\n}","import axiosInstance from '../config/axiosConfig';\r\n\r\nexport const getRequests = (filters?: string) => {\r\n if(filters) return axiosInstance.get(`/HospitalityRequest?${filters}`);\r\n else return axiosInstance.get('/HospitalityRequest');\r\n}\r\n\r\nexport const getAllRequests = (filters?: string) => {\r\n if(filters) return axiosInstance.get(`/HospitalityRequest/allrequests?${filters}`);\r\n else return axiosInstance.get('/HospitalityRequest/allrequests');\r\n}\r\n\r\nexport const getRequestsById = (id: number | string) => {\r\n return axiosInstance.get(`/HospitalityRequest/${id}`);\r\n}\r\n\r\nexport const getFormRequestDataById = (id: number | string) => {\r\n return axiosInstance.get(`/HospitalityRequest/${id}/client`);\r\n}\r\n\r\nexport const createRequest = (data:FormData) => {\r\n return axiosInstance.post('HospitalityRequest', data);\r\n}\r\n\r\nexport const updateRequest = (data:FormData) => {\r\n return axiosInstance.put('HospitalityRequest', data);\r\n}\r\n\r\nexport const updateStopClockAction = (data:any) => {\r\n return axiosInstance.put('HospitalityRequest/stopclock', JSON.stringify(data));\r\n}\r\n\r\nexport const updateSiteRequestStatus = (id: string | number, data:any) => {\r\n return axiosInstance.put(`/HospitalityRequest/${id}/sitephase`, JSON.stringify(data));\r\n}\r\n\r\nexport const publishSitesRequest = (id: string | number) => {\r\n return axiosInstance.post(`/HospitalityRequest/${id}/publish`);\r\n}\r\n\r\nexport const createRequestSites = (id: number | string, data:any) => {\r\n return axiosInstance.post(`/HospitalityRequest/${id}/sites`, JSON.stringify(data));\r\n}\r\n\r\nexport const selectRequestSite = (id: number | string, idSite: number | string, data:any) => {\r\n return axiosInstance.put(`/HospitalityRequest/${id}/sites/${idSite}`, JSON.stringify(data));\r\n}\r\n\r\nexport const updatePiorityRequests = (data:any) => {\r\n return axiosInstance.put('/HospitalityRequest/conflict', JSON.stringify(data));\r\n}\r\n\r\nexport const updateInstallationPhase = (id: string | number, data:any) => {\r\n return axiosInstance.put(`/HospitalityRequest/${id}/instalationPhase`, JSON.stringify(data));\r\n}\r\n\r\nexport const getDataBaseExcel = () => {\r\n return axiosInstance.get(`/HospitalityRequest/downloadDataBase`);\r\n}\r\n\r\nexport const updateDataBaseExcel = async (dataBase64: string) => {\r\n var response = await axiosInstance.put(`/HospitalityRequest/uploadDataBase`, dataBase64);\r\n return response; \r\n}\r\n\r\n","\r\nexport const RequestStatus = {\r\n InAttesa: \"In attesa\",\r\n AttesaTechnical: \"In attesa di Technical\",\r\n AttesaSupplier: \"In attesa di Supplier\",\r\n AttesaMT: \"In attesa Monitoring Trustee\",\r\n Approvato: \"Approvato\",\r\n Rifiutato: \"Rifiutato\",\r\n InserireRichiesta: \"Inserire una richiesta di servizi di ospitalità\",\r\n VerificaRichiesta: \"Verifica Richiesta di servizi di ospitalità su base comunale\",\r\n RichiestaNonCompleta: \"Richiesta non completa, in attesa di integrazione o modifica\",\r\n AttesaListaSiti: \"In attesa lista siti\",\r\n RifiutoMonitoringTrustee: \"Rifiuto del Monitoring Trustee\",\r\n AttesaPubblicazioneSitiRichiesti: \"In attesa pubblicazione siti richiesti\",\r\n ListaSitiRichiestaCliente: \"Lista siti su richiesta Cliente\",\r\n InserireRichiestaAccettabileOspitalitaSito: \"Inserire Richiesta di accettabile di ospitalità per un sito\",\r\n SelezionaSitoPubblicato: \"Seleziona un sito pubblicato\",\r\n IndicazionePriorita: \"Indicazione priorità\",\r\n RevisioneRichiestaAccettabile: \"Revisione Richiesta Accettabile\",\r\n RichiestaNonCompletaAttesaIntegrazioneOModifica: \"Richiesta non completa in attesa di integrazione o modifica\",\r\n FeedbackInformazioniAggiuntive: \"Feedback su informazioni aggiuntive\",\r\n AnalisiInformazioniSitoospitalita: \"Analisi specifica e fornitura di informazioni di sito per ospitalità\",\r\n ValutazioneW3OffertaSpazioRiservato: \"Valutazione di W3 sull’Offerta di Spazio Riservato\",\r\n OffertaDiSpazioRiservato: \"Offerta di spazio riservato [Strettamente confidenziale]\",\r\n IdentificazioneSitiComune: \"Identificazione siti nel Comune\",\r\n SitoIdentificatoVerifica: \"Sito identificato per verifica\",\r\n MTCreazioneSitiPubblicazioneRegistro: \"Monitoring Trustee - Creazione lista siti per la pubblicazione sul Registro di Trasparenza\",\r\n NotificaRifiutoMonitoringTrustee: \"Notifica di Rifiuto del Monitoring Trustee\",\r\n PubblicazioneListaMT: \"Pubblicazione lista del Monitoring Trustee\",\r\n ProcessoParallelo: \"Processo parallelo\",\r\n FinalizzazioneRiservaSpazioFavoreW3: \"Finalizzazione della Riserva di Spazio in favore di W3\",\r\n InAttesaInstallazioneW3: \"In attesa installazione W3\",\r\n InAttesaInstallazioneExtensionFavoreW3: \"In attesa installazione (2 mesi aggiuntivi) W3\",\r\n NegoziazioneContrattoClienteSito: \"Negoziazione e stipula del contratto di ospitalità con il cliente per il sito\",\r\n InAttesaInstallazione: \"In attesa di installazione\",\r\n MancataInstallazione: \"Mancata installazione\",\r\n EsitoPositivoInstallazioneW3: \"Esito positivo installazione W3\",\r\n ContrattoNonFirmato: \"Contratto non firmato\",\r\n AvvenutaInstallazione: \"Avvenuta installazione\",\r\n InstallazioneNonAvvenuta: \"Installazione non avvenuta\",\r\n Installed: \"Installato\",\r\n Scaduto: \"Scaduto\",\r\n PrefattibiltaKO: \"Prefattibilità KO\"\r\n}\r\n\r\nexport const ClientStatus = {\r\n NuovaRichiestaComune: \"Nuova Richiesta (Comune)\",\r\n NuovaRichiestaSito: \"Nuova Richiesta (Sito)\",\r\n InAnalisi: \"In analisi\",\r\n InAttesa: \"In attesa\",\r\n AttesoRiscontroCliente: \"Atteso riscontro cliente\",\r\n InVerifica: \"In verifica\",\r\n RichiestaErroriOIncompleta: \"Richiesta con errori o incompleta\",\r\n SelezionareSiti: \"Selezionare uno o più siti\",\r\n EsitoNegativoFattibilita: \"Esito negativo fattibilità\",\r\n EsitoPositivoFattibilita: \"Esito positivo fattibilità\",\r\n Rifiutato: \"Rifiutato\", \r\n Installato: \"Installato\",\r\n InLavorazione: \"In lavorazione\",\r\n EsitoNegativoConcluso: \"Esito negativo – Processo concluso\",\r\n MancataInstallazioneConcluso: \"Mancata installazione - Processo concluso\",\r\n AvenutaInstallazioneW3: \"Avvenuta installazione W3\",\r\n AcordoInNegoziazione: \"Accordo in negoziazione\",\r\n AccordoRifiutato: \"Accordo rifiutato dal Cliente\",\r\n InAttesaInstallazioneCliente: \"In attesa di installazione Cliente\",\r\n AvvenutaInstallazioneProcessoConcluso: \"Avvenuta installazione – Processo concluso\",\r\n InstallazioneNonAvvenutaProcessoConcluso: \"Installazione non avvenuta – Processo concluso\",\r\n Scaduto: \"Scaduto\"\r\n}\r\n\r\nexport const ClientRequestViewStatus:{ [key:string]: string } = {\r\n [RequestStatus.InserireRichiesta]: ClientStatus.NuovaRichiestaComune,\r\n [RequestStatus.VerificaRichiesta]: ClientStatus.InAnalisi,\r\n [RequestStatus.RichiestaNonCompleta]: ClientStatus.RichiestaErroriOIncompleta,\r\n [RequestStatus.AttesaListaSiti]: ClientStatus.InAnalisi,\r\n [RequestStatus.AttesaMT]: ClientStatus.InAnalisi,\r\n [RequestStatus.RifiutoMonitoringTrustee]: ClientStatus.InAnalisi,\r\n [RequestStatus.AttesaPubblicazioneSitiRichiesti]: ClientStatus.InAnalisi,\r\n [RequestStatus.InserireRichiestaAccettabileOspitalitaSito]: ClientStatus.NuovaRichiestaSito,\r\n [RequestStatus.SelezionaSitoPubblicato]: ClientStatus.SelezionareSiti,\r\n [RequestStatus.IndicazionePriorita]: ClientStatus.InAnalisi,\r\n [RequestStatus.RevisioneRichiestaAccettabile]: ClientStatus.InAnalisi,\r\n [RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica]: ClientStatus.RichiestaErroriOIncompleta,\r\n [RequestStatus.FeedbackInformazioniAggiuntive]: ClientStatus.InAttesa,\r\n [RequestStatus.AnalisiInformazioniSitoospitalita]: ClientStatus.InLavorazione,\r\n [RequestStatus.ValutazioneW3OffertaSpazioRiservato]: ClientStatus.InLavorazione,\r\n [RequestStatus.ProcessoParallelo]: ClientStatus.InLavorazione,\r\n [RequestStatus.NegoziazioneContrattoClienteSito]: ClientStatus.AcordoInNegoziazione,\r\n [RequestStatus.Rifiutato]: ClientStatus.EsitoNegativoConcluso,\r\n [RequestStatus.InAttesaInstallazioneW3] : ClientStatus.EsitoNegativoConcluso,\r\n [RequestStatus.InAttesaInstallazioneExtensionFavoreW3]: ClientStatus.EsitoNegativoConcluso,\r\n [RequestStatus.InAttesaInstallazione]: ClientStatus.InAttesaInstallazioneCliente,\r\n [RequestStatus.Installed]: ClientStatus.Installato,\r\n [RequestStatus.MancataInstallazione]: ClientStatus.EsitoNegativoConcluso,\r\n [RequestStatus.EsitoPositivoInstallazioneW3]: ClientStatus.EsitoNegativoConcluso,\r\n [RequestStatus.ContrattoNonFirmato]: ClientStatus.AccordoRifiutato,\r\n [RequestStatus.AvvenutaInstallazione]: ClientStatus.AvvenutaInstallazioneProcessoConcluso,\r\n [RequestStatus.InstallazioneNonAvvenuta]: ClientStatus.InstallazioneNonAvvenutaProcessoConcluso,\r\n [RequestStatus.Scaduto]: ClientStatus.Scaduto,\r\n [RequestStatus.PrefattibiltaKO]: ClientStatus.EsitoNegativoConcluso\r\n\r\n}\r\n\r\nexport const ClientRequestFilterStatus:{ [key:string]: string[] } = {\r\n [ClientStatus.InAnalisi]: [ RequestStatus.VerificaRichiesta, RequestStatus.IndicazionePriorita, RequestStatus.AttesaPubblicazioneSitiRichiesti, RequestStatus.AttesaListaSiti, RequestStatus.AttesaMT, RequestStatus.RifiutoMonitoringTrustee, RequestStatus.RevisioneRichiestaAccettabile],\r\n [ClientStatus.InAttesa]: [RequestStatus.FeedbackInformazioniAggiuntive],\r\n [ClientStatus.NuovaRichiestaSito]: [RequestStatus.InserireRichiestaAccettabileOspitalitaSito],\r\n [ClientStatus.NuovaRichiestaComune]: [RequestStatus.InserireRichiesta],\r\n [ClientStatus.RichiestaErroriOIncompleta]: [RequestStatus.RichiestaNonCompleta, RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica],\r\n [ClientStatus.SelezionareSiti]: [RequestStatus.SelezionaSitoPubblicato],\r\n [ClientStatus.AcordoInNegoziazione]: [RequestStatus.NegoziazioneContrattoClienteSito],\r\n [ClientStatus.Installato]: [RequestStatus.Installed],\r\n [ClientStatus.InLavorazione]: [RequestStatus.AnalisiInformazioniSitoospitalita, RequestStatus.ValutazioneW3OffertaSpazioRiservato, RequestStatus.ProcessoParallelo],\r\n [ClientStatus.EsitoNegativoConcluso]: [RequestStatus.EsitoPositivoInstallazioneW3, RequestStatus.MancataInstallazione, RequestStatus.InAttesaInstallazioneW3, RequestStatus.InAttesaInstallazioneExtensionFavoreW3, RequestStatus.Rifiutato, RequestStatus.PrefattibiltaKO],\r\n [ClientStatus.AccordoRifiutato]: [RequestStatus.ContrattoNonFirmato],\r\n [ClientStatus.InAttesaInstallazioneCliente]: [RequestStatus.InAttesaInstallazione],\r\n [ClientStatus.AvvenutaInstallazioneProcessoConcluso]: [RequestStatus.AvvenutaInstallazione],\r\n [ClientStatus.InstallazioneNonAvvenutaProcessoConcluso]: [RequestStatus.InstallazioneNonAvvenuta],\r\n [ClientStatus.Rifiutato]:[RequestStatus.Rifiutato],\r\n [ClientStatus.Scaduto] : [RequestStatus.Scaduto]\r\n}","import { RequestStatus } from \"./Status\"\r\n\r\nexport const StatusDescriptions:{ [key:string]: string } = {\r\n [RequestStatus.InserireRichiesta]: \"Gentile Cliente, puoi inserire una Richiesta Ragionevole di ospitalità su base comunale compilando il template che puoi scaricare di seguito. La richiesta sarà gestita da Cellnex e sarai informato non appena ci saranno informazioni disponibili.\",\r\n [RequestStatus.VerificaRichiesta]: \"Verifica la Richiesta Ragionevole di ospitalità su base comunale inviata dal Cliente identificando tutti i siti presenti nel Comune. Verifica che la Richiesta contenga i dati necessari e, se incompleta o contenente errori, richiedi al Cliente la revisione della Richiesta. Procedi con la selezione dei siti da proporre a Tech2 per la pubblicazione, indicando se esiste un sito preliminarmente idoneo a soddisfare la Richiesta ricevuta.\",\r\n [RequestStatus.RichiestaNonCompleta]: \"Gentile Cliente, la tua Richiesta è incompleta o presenta delle criticità. Ti chiediamo di modificarla o integrarla, caricando un nuovo file. La tua Richiesta sarà gestita da Cellnex.\",\r\n [RequestStatus.AttesaListaSiti]: \"E' stata predisposta una lista dei siti nel Comune per una Richiesta Ragionevole di ospitalità di un Cliente. Verifica la lista, modifica se utile, e invia al Monitoring Trustee.\",\r\n [RequestStatus.ListaSitiRichiestaCliente]: \"E' stata predisposta una lista dei siti nel Comune per una Richiesta Ragionevole di ospitalità di un Cliente. Verifica la lista, modifica se utile, e invia al Monitoring Trustee.\",\r\n [RequestStatus.AttesaMT]: \"Gentile Monitoring Trustee, stai visualizzando la proposta di pubblicazione di Cellnex basata su richieste di ospitalità dei Clienti. Procedi con la selezione, approvando o rifiutando i siti proposti, per informare Cellnex della lista da pubblicare.\",\r\n [RequestStatus.RifiutoMonitoringTrustee]: \"Il Monitoring Trustee non ha approvato alcuni o tutti i siti della lista proposta. Procedi con la pubblicazione dei siti approvati.\",\r\n [RequestStatus.AttesaPubblicazioneSitiRichiesti]: \"Il Monitoring Trustee ha approvato la lista proposta, procedi con la pubblicazione.\",\r\n //[RequestStatus.InserireRichiestaAccettabileOspitalitaSito]: \"Gentile Cliente, puoi inserire una Richiesta Ragionevole di ospitalità su base comunale compilando il template che puoi scaricare di seguito. La richiesta sarà gestita da Cellnex e sarai informato non appena ci saranno informazioni disponibili.\",\r\n [RequestStatus.InserireRichiestaAccettabileOspitalitaSito]: \"Gentile Cliente, puoi inserire una Richiesta Accettabile su un sito pubblicato. La tua Richiesta verrà gestita secondo quanto previsto dal Provvedimento AGCM n. 29717 del 15 giugno 2021. Riceverai aggiornamenti non appena disponibili.\",\r\n [RequestStatus.SelezionaSitoPubblicato]: \"Gentile Cliente, abbiamo pubblicato i siti in base alla tua richiesta su base comunale. Inserisci entro 10 giorni lavorativi una Richiesta Accettabile su un sito. In caso di mancata selezione, si applicano le previsioni del Provvedimento AGCM n. 29717 del 15 giugno 2021. La tua Richiesta verrà gestita da Cellnex e riceverai aggiornamenti non appena disponibili.\",\r\n [RequestStatus.IndicazionePriorita]: \"\",\r\n [RequestStatus.RevisioneRichiestaAccettabile]: `\r\n Il Cliente ha inviato una Richiesta Accettabile (e vincolante) su un sito. \r\n In caso di errori o di richiesta incompleta richiedi la revisione al Cliente. \r\n Se necessario fornisci informazioni aggiuntive richiedendo feedback al Cliente.\r\n Se non sono necessarie informazioni aggiuntive, procedi a sottoporre a Wind Tre l'Offerta di Spazio Riservato compilando e allegando il file\r\n e avvia l'analisi tecnica. L'analisi tecnica deve essere completata in 15 giorni lavorativi.\r\n `,\r\n [RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica]: \"Gentile Cliente, la tua Richiesta è incompleta o presenta delle criticità. Ti chiediamo di modificarla o integrarla, caricando un nuovo file. La tua Richiesta sarà gestita da Cellnex.\",\r\n [RequestStatus.FeedbackInformazioniAggiuntive]: \"Gentile Cliente, è necessario fornire un feedback alle informazioni fornite da Cellnex. In assenza di feedback entro 15 giorni lavorativi la richiesta non verrà ulteriormente gestita.\",\r\n [RequestStatus.AnalisiInformazioniSitoospitalita]: \"Verifica se W3 ha accettato lo spazio riservato. In caso di fattibilità negativa, comunica al Cliente la conclusione del processo. In caso di accettazione dello spazio riservato da parte di W3, comunica al Cliente la conclusione del processo. In caso di non accettazione dello spazio riservato da parte di W3 e di esito positivo della analisi, invia i documenti relativi, allegandoli e ingaggia la funzione Sales per procedere entro 15 gg lavorativi alla formalizzazione dell'accordo.\",\r\n [RequestStatus.ValutazioneW3OffertaSpazioRiservato]: \"Cellnex ha inviato un'Offerta di Spazio Riservato a seguito della richiesta di ospitalità di un Cliente. Ti preghiamo di fornire il feedback richiesto entro 15 giorni lavorativi dalla ricezione dell'Offerta. In assenza di riscontro entro i termini indicati, l'Offerta si intenderà non accettata.\",\r\n [RequestStatus.OffertaDiSpazioRiservato]: \"E’ possible visualizzare le offerte di spazio riservato inviate tramite registro di trasparenza, e rifiutare o accettare l’offerta. In caso di mancata azione entro 15 gg lavorativi, la offerta si intenderà rifiutata.\",\r\n [RequestStatus.NegoziazioneContrattoClienteSito]: \"Le verifiche hanno avuto esito positivo ed è in negoziazione l’accordo di ospitalità. Contatta i canali commerciali.\",\r\n [RequestStatus.InAttesaInstallazioneW3]: \"Siamo spiacenti, ma non è stato possibile soddisfare la Richiesta, è stata inviata una notifica. Invitiamo a selezionare altri siti, o a contattare i nostri canali commerciali.\",\r\n [RequestStatus.PrefattibiltaKO]: \"Il processo relativo alla richiesta è concluso, è possibile inserire una nuova richiesta.\",\r\n [RequestStatus.InAttesaInstallazioneExtensionFavoreW3]: \"Siamo spiacenti, ma non è stato possibile soddisfare la Richiesta, è stata inviata una notifica. Invitiamo a selezionare altri siti, o a contattare i nostri canali commerciali.\",\r\n [RequestStatus.MancataInstallazione]:\"Il processo relativo alla richiesta è concluso, è possibile inserire una nuova richiesta.\",\r\n [RequestStatus.Rifiutato]: \"Siamo spiacenti, ma non è stato possibile soddisfare la Richiesta, è stata inviata una notifica. Invitiamo a selezionare altri siti, o a contattare i nostri canali commerciali.\",\r\n [RequestStatus.EsitoPositivoInstallazioneW3]:\"Siamo spiacenti, ma non è stato possibile soddisfare la Richiesta, è stata inviata una notifica. Invitiamo a selezionare altri siti, o a contattare i nostri canali commerciali.\",\r\n [RequestStatus.ContrattoNonFirmato]:\"Le verifiche hanno avuto esito positivo l’accordo di ospitalità non è stato concluso. Contatta i canali commerciali per informazioni.\",\r\n [RequestStatus.InAttesaInstallazione]:\"Le verifiche hanno avuto esito positivo ed è concluso l’accordo di ospitalità. In attesa di installazione.\",\r\n [RequestStatus.AvvenutaInstallazione]:\"Il processo è concluso con esecuzione dell’accordo di ospitalità.\",\r\n [RequestStatus.InstallazioneNonAvvenuta]:\" Il processo è concluso, senza installazione. Contatta i canali commerciali per informazioni.\",\r\n //cellnex\r\n [RequestStatus.IdentificazioneSitiComune]: \"Seleziona, nella lista dei Comuni, i siti da proporre per la pubblicazione. Selezionando il sito, completa o modifica, se necessario, le informazioni del sito.\",\r\n [RequestStatus.SitoIdentificatoVerifica]: \"Procedi selezionando i siti da proporre al Monitoring Trustee per integrare la lista mensile da pubblicare. Stai visualizzando la proposta di Cellnex Tech 1.\",\r\n [RequestStatus.MTCreazioneSitiPubblicazioneRegistro]: \"Gentile Monitoring Trustee, stai visualizzando la proposta di pubblicazione di Cellnex in quanto non sono state ricevute richieste sufficienti a garantire la pubblicazione minima mensile. Procedi con la selezione , approvando o rifiutando i siti proposti, per informare Cellnex della lista da pubblicare.\",\r\n [RequestStatus.NotificaRifiutoMonitoringTrustee]: \"Il Monitoring Trustee non ha approvato la lista proposta. Verifica l'esistenza di nuovi siti da proporre.\",\r\n [RequestStatus.PubblicazioneListaMT]: \"Procedi con la pubblicazione della lista indicata dal Monitoring Trustee.\",\r\n [RequestStatus.Scaduto]: \"La richiesta è scaduta, è possibile inserire una nuova richiesta, o contattare i consueti canali commerciali\"\r\n}","import { InfoOutlined } from \"@mui/icons-material\";\r\nimport { StatusDescriptions } from \"../const/StatusDescriptions\";\r\n\r\ninterface ErrorMessageProps {\r\n status: string;\r\n}\r\n\r\nexport const StatusDescription = (props:ErrorMessageProps) => {\r\n let { status } = props;\r\n let statusDescription = StatusDescriptions[status];\r\n if(statusDescription){\r\n return
\r\n

{StatusDescriptions[status]}

\r\n
\r\n }\r\n return null;\r\n}","import { DateFormatConverter } from \"../const/DateFormatConverter\";\r\nimport Comment from \"../entities/Comment\";\r\nimport { Request } from \"../entities/Request\";\r\n\r\ninterface CommentProps {\r\n comment: Comment;\r\n}\r\n\r\nexport const Commentary = (props: CommentProps) => {\r\n let { comment } = props;\r\n return (\r\n
\r\n

{comment.user}

\r\n

{DateFormatConverter(comment.date)}

\r\n

{comment.comment}

\r\n
\r\n )\r\n}\r\n\r\nexport const FormComentary = (props: CommentProps) => {\r\n let { comment } = props;\r\n return (\r\n
\r\n

{comment.user} :

\r\n

{comment.comment}

\r\n
\r\n )\r\n}\r\n\r\n\r\ninterface ClientCommentProps {\r\n clientRequest: Request;\r\n}\r\n\r\nexport const ClientComment = (props: ClientCommentProps) => {\r\n let { clientRequest } = props;\r\n return (\r\n
\r\n

Clienti

\r\n

{DateFormatConverter(clientRequest?.dataRequesta)}

\r\n

{clientRequest?.comment}

\r\n
\r\n )\r\n}","import React from \"react\";\r\nimport { Commentary } from \"../components/Commentary\";\r\nimport Comment from \"../entities/Comment\";\r\n\r\ninterface CommentsHistoryProps {\r\n comments: Comment[];\r\n excludeCommentsForRole?: string[];\r\n}\r\n\r\nconst CommentsHistory = (props:CommentsHistoryProps) => {\r\n \r\n let { comments, excludeCommentsForRole } = props;\r\n\r\n let commentsList = comments.map( (comment, index) => {\r\n if(excludeCommentsForRole && excludeCommentsForRole.findIndex(role => role === comment.role) !== -1 ){\r\n return null;\r\n }\r\n return \r\n });\r\n\r\n return (\r\n
\r\n {commentsList}\r\n
\r\n ) \r\n}\r\n\r\nexport default CommentsHistory;","\r\nimport { Commentary } from \"../components/Commentary\";\r\nimport Comment from \"../entities/Comment\";\r\n\r\ninterface RefusalInformationProps {\r\n comments: Comment[];\r\n excludeCommentsForRole?: string[];\r\n}\r\n\r\nconst BoxRefusalInformation = (props: RefusalInformationProps) => {\r\n let { comments, excludeCommentsForRole } = props;\r\n\r\n let commentsList = comments.map( (comment, index) => {\r\n if(excludeCommentsForRole && excludeCommentsForRole.findIndex(role => role === comment.role) !== -1 ){\r\n return null;\r\n }\r\n return \r\n });\r\n\r\n return (\r\n
\r\n {commentsList[0]}\r\n
\r\n ) \r\n}\r\n\r\nexport default BoxRefusalInformation;","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport React, { useContext, useEffect, useState } from \"react\";\r\nimport { getItems } from \"../services/FilterService\";\r\nimport Comments from \"./Comment\";\r\nimport Comment from \"../entities/Comment\";\r\nimport { FilterItem, FilterOption } from '../entities/Filter'\r\nimport { UploadFile } from './UploadFile'\r\nimport { Dropdown } from \"./Dropdown\";\r\nimport { createRequest } from \"../services/requestService\";\r\nimport { Download } from \"@mui/icons-material\";\r\nimport { useGetRequestById } from \"../hooks/useGetRequestById\";\r\nimport { ToastContainer, toast } from \"react-toastify\";\r\nimport \"react-toastify/dist/ReactToastify.css\";\r\nimport { Municipality } from \"../entities/Municipality\";\r\nimport { Spinner } from \"./Spinner\";\r\nimport { StatusDescription } from \"./StatusDescription\";\r\nimport { ClientStatus, RequestStatus } from \"../const/Status\";\r\nimport { Commentary, FormComentary } from \"./Commentary\";\r\nimport { Groups, GroupsText } from \"../const/Groups\";\r\nimport CommentsHistory from \"./CommentsHistory\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport BoxRefusalInformation from \"./BoxRefusalInformation\";\r\n\r\n\r\nexport interface FormProps {\r\n operatorComment?: string;\r\n item?: any;\r\n requestId?: string;\r\n saveButton: string;\r\n sendButton: string;\r\n requestType?: string;\r\n returnPage?: (type: string) => void;\r\n renderHeaderTitle?: (blocked: boolean, fecthing?: boolean, requestStatus?: any) => void;\r\n}\r\n\r\nexport const HospitalityRequestForm = (props: FormProps) => {\r\n\r\n let { item, requestId, saveButton, sendButton, requestType, returnPage, renderHeaderTitle } = props;\r\n\r\n let { user } = useContext(UserContext);\r\n\r\n\r\n const [commentText, setcommentText] = useState(\"\");\r\n const [options, setOptions] = useState(getItems());\r\n const [optionPicked, setOptionPicked] = useState();\r\n const [optionPickedID, setOptionPickedID] = useState();\r\n const [fileName, setFileName] = useState();\r\n const [fileContent, setFileContent] = useState();\r\n const [fileError, setFileError] = useState();\r\n const [acceptTermsOne, setacceptTermsOne] = useState(false);\r\n const [acceptTermsTwo, setacceptTermsTwo] = useState(false);\r\n const [acceptTermsOneError, setAccepTermsError] = useState();\r\n const [reqType, setReqType] = useState(requestType);\r\n const [blockedForm, setBlockedForm] = useState(true);\r\n const [secureValidForm, setSecureValidForm] = useState(true);\r\n const [operatorComments, setOperatorCommments] = useState([]);\r\n const [operatorRefusalComments, setOperatorRefusalCommments] = useState([]);\r\n\r\n let { isFetching, requestItem } = useGetRequestById(requestId, true);\r\n\r\n const actionData = async (type: string, option: string, fileName: string, fileContent: any, comment: string) => {\r\n\r\n let siteID;\r\n let comuneID;\r\n if (item === undefined) {\r\n siteID = reqType === \"Sito\" ? requestItem.id : null;\r\n comuneID = reqType === \"Sito\" ? requestItem.municipality.id : requestItem.id;\r\n } else {\r\n siteID = reqType === \"Sito\" ? item.id : null;\r\n comuneID = reqType === \"Sito\" ? item.municipality.id : item.id;\r\n }\r\n let operatorFinalComments = [...operatorComments];\r\n if (type === \"send\" && requestItem !== null && requestItem.stato === RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica) {\r\n var newClientComment: Comment = {\r\n user: GroupsText[user.type],\r\n date: new Date().toISOString().split('T')[0],\r\n role: GroupsText[user.type],\r\n comment: comment\r\n } as Comment;\r\n operatorFinalComments = [newClientComment, ...operatorFinalComments];\r\n }\r\n\r\n let finalComments = JSON.stringify(operatorFinalComments);\r\n let formInfo = new FormData();\r\n formInfo.append(\"itemID\", requestId ? requestId : null);\r\n formInfo.append(\"title\", type);\r\n formInfo.append(\"option\", option);\r\n formInfo.append(\"fileName\", fileName);\r\n formInfo.append(\"fileContent\", fileContent);\r\n formInfo.append(\"comment\", comment);\r\n formInfo.append(\"type\", reqType);\r\n formInfo.append(\"siteID\", siteID);\r\n formInfo.append(\"comuneID\", comuneID);\r\n formInfo.append(\"status\", requestItem ? requestItem.stato : \"\");\r\n formInfo.append(\"operatorComments\", finalComments);\r\n formInfo.append(\"loginName\", user.username);\r\n setSecureValidForm(false);\r\n var response = await createRequest(formInfo);\r\n if (response.status === 200 && type === \"send\") {\r\n returnPage(type);\r\n }\r\n if (response.status === 200 && type === \"save\") {\r\n returnPage(type);\r\n }\r\n if (response.status !== 200) toast(\"Qualcosa è andato storto\", {\r\n autoClose: 5000,\r\n position: \"top-right\",\r\n type: \"error\"\r\n });\r\n }\r\n const handlerCommentText = (comment: any) => {\r\n setcommentText(comment);\r\n }\r\n const handlerSelectOption = (optionSelected: string, optionSelectedID: number) => {\r\n setOptionPicked(optionSelected);\r\n setOptionPickedID(optionSelectedID.toString());\r\n }\r\n\r\n const handlerFile = (fileName: string, fileContent: any) => {\r\n if (fileName !== undefined) {\r\n setFileError(undefined);\r\n setFileName(fileName);\r\n setFileContent(fileContent);\r\n }\r\n else {\r\n setFileName(undefined);\r\n setFileContent(undefined);\r\n }\r\n }\r\n const hanlderSavedata = (action: string) => {\r\n\r\n if (action === \"send\" && fileContent === undefined) {\r\n setFileError(\"È necessario selezionare un file\");\r\n return;\r\n }\r\n\r\n if (action === \"send\" && !acceptTermsOne) {\r\n setAccepTermsError(\"(*) E' necessario accettare termini e condizioni.\");\r\n }\r\n\r\n if (action === \"send\" && !acceptTermsTwo) {\r\n setAccepTermsError(\"(*) E' necessario accettare termini e condizioni.\");\r\n }\r\n if (action === \"send\" && (!acceptTermsOne || !acceptTermsTwo || fileContent === undefined)) {\r\n return;\r\n }\r\n actionData(action, optionPicked, fileName, fileContent, commentText);\r\n }\r\n\r\n const handleracceptTermsOne = () => {\r\n !acceptTermsOne && !acceptTermsTwo ? setAccepTermsError(\"(*) E' necessario accettare termini e condizioni.\") : setAccepTermsError(undefined);\r\n setacceptTermsOne(!acceptTermsOne);\r\n }\r\n\r\n const handleracceptTermsTwo = () => {\r\n !acceptTermsTwo && !acceptTermsOne ? setAccepTermsError(\"(*) E' necessario accettare termini e condizioni.\") : setAccepTermsError(undefined);\r\n setacceptTermsTwo(!acceptTermsTwo);\r\n }\r\n\r\n const handleOperatorComment = (comments: any) => {\r\n let allComments: Comment[] = JSON.parse(comments);\r\n // for (var comment of allComments) {\r\n // if (comment.role === GroupsText[Groups.TECHNICAL]) {\r\n // setOperatorCommment(comment);\r\n // break;\r\n // }\r\n // }\r\n setOperatorCommments(allComments);\r\n }\r\n\r\n const handleOperatorRefusalComment = (comments: any) => {\r\n let refusalComments: Comment[] = JSON.parse(comments);\r\n let index = refusalComments.findIndex((item) => item.role === GroupsText[Groups.TECHNICAL]);\r\n //let indexw3 = refusalComments.findIndex((item) => item.role === GroupsText[Groups.SUPPLIER]);\r\n\r\n if (index !== -1){\r\n setOperatorRefusalCommments([refusalComments[index]]);\r\n }\r\n\r\n }\r\n\r\n\r\n const createOption = (id: string, municipality: Municipality) => {\r\n\r\n let comune = municipality.comune;\r\n\r\n const dropdownOption: FilterOption = {\r\n id: Number(id),\r\n displayValue: `${municipality.comune}, ${municipality.province}, ${municipality.region}`,\r\n value: comune\r\n }\r\n let DropOptionList: FilterOption[] = [dropdownOption];\r\n const dropdownItem: FilterItem = {\r\n id: 15,\r\n filterName: \"Form_options\",\r\n defaultValue: undefined,\r\n options: DropOptionList\r\n }\r\n let DropItemList: FilterItem[] = [dropdownItem];\r\n setOptions(DropItemList);\r\n setOptionPicked(comune);\r\n setOptionPickedID(id.toString());\r\n }\r\n\r\n useEffect(() => {\r\n if (item !== undefined) {\r\n createOption(item.id, item.comune ? item : item.municipality);\r\n }\r\n\r\n if (!isFetching && requestItem !== null) {\r\n if (requestItem.stato !== RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica) setcommentText(requestItem.comment ? requestItem.comment : \"\");\r\n createOption(requestItem.requestId, requestItem.municipality);\r\n if (requestItem.file !== null) {\r\n setFileName(requestItem.file.fileName ? requestItem.file.fileName : null);\r\n setFileContent(requestItem.file.fileContent ? requestItem.file.fileContent : null);\r\n }\r\n setReqType(requestItem.tipi);\r\n if (requestItem.stato === RequestStatus.InserireRichiesta) setBlockedForm(false);\r\n if (requestItem.stato === RequestStatus.InserireRichiestaAccettabileOspitalitaSito) setBlockedForm(false);\r\n if (requestItem.stato === RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica) setBlockedForm(false);\r\n if (requestItem.stato === RequestStatus.RichiestaNonCompleta) setBlockedForm(false);\r\n if (requestItem.comments !== null) {\r\n handleOperatorComment(requestItem.comments);\r\n\r\n }\r\n if (requestItem.comments !== null && requestItem.stato === RequestStatus.InAttesaInstallazioneW3\r\n || requestItem.stato === RequestStatus.InAttesaInstallazioneExtensionFavoreW3\r\n || requestItem.stato === RequestStatus.MancataInstallazione\r\n || requestItem.stato === RequestStatus.EsitoPositivoInstallazioneW3\r\n || requestItem.stato === RequestStatus.PrefattibiltaKO\r\n || (requestItem.hasSelectedSite && requestItem.stato === RequestStatus.Rifiutato)) {\r\n handleOperatorRefusalComment(requestItem.comments);\r\n }\r\n //if(requestItem.c)\r\n }\r\n\r\n if (requestId === undefined) setBlockedForm(false);\r\n }, [isFetching])\r\n\r\n let validForm = (!acceptTermsTwo || !acceptTermsOne) ? false : true;\r\n\r\n\r\n\r\n useEffect(() => {\r\n if (!isFetching) {\r\n renderHeaderTitle(blockedForm, isFetching, requestItem);\r\n }\r\n }, [blockedForm, isFetching])\r\n\r\n const renderStatusDescription = (): string => {\r\n if (requestItem !== null) {\r\n if (requestItem.stato === RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica || requestItem.stato === RequestStatus.RichiestaNonCompleta) {\r\n return RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica;\r\n }\r\n if (requestItem.stato === RequestStatus.InserireRichiestaAccettabileOspitalitaSito) return RequestStatus.InserireRichiestaAccettabileOspitalitaSito;\r\n if (requestItem.stato === RequestStatus.InserireRichiesta) return RequestStatus.InserireRichiesta;\r\n if (requestItem.stato == RequestStatus.Scaduto) return RequestStatus.Scaduto;\r\n }\r\n if (requestType !== \"Sito\") {\r\n return RequestStatus.InserireRichiesta;\r\n }\r\n else return RequestStatus.InserireRichiestaAccettabileOspitalitaSito;\r\n }\r\n\r\n if (\r\n !isFetching && requestId !== undefined && requestItem.stato === RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica && requestItem.hasSelectedSite\r\n ) {\r\n renderHeaderTitle(false);\r\n return null;\r\n };\r\n\r\n if (\r\n !isFetching && requestId !== undefined && (requestItem.stato === RequestStatus.NegoziazioneContrattoClienteSito ||\r\n //requestItem.stato === RequestStatus.InAttesaInstallazioneW3 ||\r\n //requestItem.stato === RequestStatus.InAttesaInstallazioneExtensionFavoreW3 ||\r\n //requestItem.stato === RequestStatus.EsitoPositivoInstallazioneW3 ||\r\n requestItem.stato === RequestStatus.ContrattoNonFirmato ||\r\n requestItem.stato === RequestStatus.InAttesaInstallazione ||\r\n requestItem.stato === RequestStatus.AvvenutaInstallazione ||\r\n //requestItem.stato === RequestStatus.MancataInstallazione ||\r\n requestItem.stato === RequestStatus.InstallazioneNonAvvenuta ||\r\n requestItem.stato == RequestStatus.Scaduto\r\n\r\n )\r\n ) {\r\n renderHeaderTitle(false, false, requestItem);\r\n return (\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n if (!isFetching && requestId !== undefined && (requestItem.stato === RequestStatus.InAttesaInstallazioneW3\r\n || requestItem.stato === RequestStatus.InAttesaInstallazioneExtensionFavoreW3\r\n || requestItem.stato === RequestStatus.MancataInstallazione\r\n || requestItem.stato === RequestStatus.EsitoPositivoInstallazioneW3 \r\n || requestItem.stato === RequestStatus.PrefattibiltaKO \r\n || (requestItem.hasSelectedSite && requestItem.stato === RequestStatus.Rifiutato)) && blockedForm) {\r\n\r\n renderHeaderTitle(false, false, requestItem);\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n )\r\n }\r\n\r\n return (\r\n <>\r\n {(isFetching && requestId !== undefined) || !secureValidForm\r\n ?\r\n \r\n :\r\n <>\r\n {blockedForm\r\n ?\r\n
\r\n :\r\n
\r\n
\r\n
\r\n \r\n
\r\n {/* {operatorComment !== undefined &&\r\n \r\n } */}\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n Scarica la Richiesta\r\n
\r\n\r\n {!blockedForm &&\r\n
\r\n \r\n
\r\n }\r\n\r\n {/* {fileName !== undefined &&\r\n \r\n } */}\r\n
\r\n \r\n
\r\n\r\n {!blockedForm &&\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n\r\n {\r\n acceptTermsOneError !== undefined &&\r\n

{acceptTermsOneError}

\r\n }\r\n
\r\n }\r\n \r\n
\r\n {\r\n requestItem !== undefined &&\r\n \r\n }\r\n {!blockedForm &&\r\n
\r\n \r\n \r\n
\r\n }\r\n\r\n\r\n
\r\n }\r\n \r\n }\r\n \r\n );\r\n}","import { FilterItem, FilterOption } from \"../entities/Filter\";\r\n\r\n\r\nexport const getFirstOption = (): FilterOption[] => {\r\n return [\r\n {\r\n id: 1,\r\n displayValue: \"Value number 1\",\r\n value: \"FirstOne\"\r\n },\r\n {\r\n id: 2,\r\n displayValue: \"Value number 2\",\r\n value: \"SecondOne\"\r\n },\r\n {\r\n id: 3,\r\n displayValue: \"Value number 3\",\r\n value: \"ThirdOne\"\r\n }\r\n ]\r\n}\r\n\r\nexport const getSecondOptions = (): FilterOption[] => {\r\n return [\r\n {\r\n id: 4,\r\n displayValue: \"Second Option First Picker\",\r\n value: \"FirstOne\"\r\n },\r\n {\r\n id: 5,\r\n displayValue: \"Second Option Second Picker\",\r\n value: \"SecondOne\"\r\n },\r\n {\r\n id: 6,\r\n displayValue: \"Second Option Third Picker\",\r\n value: \"ThirdOne\"\r\n }\r\n ]\r\n}\r\n\r\nexport const getItems = (): FilterItem[] => {\r\n return [\r\n {\r\n id: 15,\r\n filterName: \"dropdown item\",\r\n options: [{\r\n id: 7,\r\n displayValue: \"\",\r\n value: \"\"\r\n }]\r\n }\r\n\r\n ]\r\n}\r\n\r\nexport const getHospitalityRequestFormOptions = (): FilterOption[] => {\r\n return [\r\n {\r\n id: 10,\r\n displayValue: \"Form option 1\",\r\n value: \"FirstOne\"\r\n },\r\n {\r\n id: 11,\r\n displayValue: \"Form option 2\",\r\n value: \"SecondOne\"\r\n },\r\n ]\r\n}\r\n\r\n// export const getSearchResults = async (searchProps: string | undefined): Promise => {\r\n// var listName = \"RichiestadeHospitalita\";\r\n\r\n// let viewXml = `\r\n// \r\n// \r\n// \r\n// \r\n// \r\n// \r\n// \r\n// \r\n// ${searchProps}\r\n// \r\n// \r\n// \r\n// \r\n \r\n// `;\r\n\r\n// let userHospitalitaSearch = await sp.web.lists.getByTitle(listName).renderListDataAsStream({\r\n// ViewXml: viewXml\r\n// })\r\n\r\n// const itemMaped: Hospitality[] = [];\r\n// userHospitalitaSearch.Row.forEach(item => {\r\n// itemMaped.push({\r\n\r\n// } as Hospitality);\r\n// });\r\n\r\n// return itemMaped;\r\n// }\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { useEffect, useState } from \"react\";\r\nimport { Request } from \"../entities/Request\";\r\nimport { getFormRequestDataById, getRequestsById } from \"../services/requestService\";\r\n\r\nexport const useGetRequestById = (id: number | string, onlyFormData:boolean = false): { isFetching:boolean, requestItem:Request} => {\r\n const [isFetching, setIsFetching] = useState(true);\r\n const [requestItem, setRequestsItem] = useState(null);\r\n \r\n useEffect(() => {\r\n if(id === undefined)return;\r\n const fetchData = async () => {\r\n const response = onlyFormData ? await getFormRequestDataById(id) : await getRequestsById(id);\r\n let responseData:Request = response.data.result;\r\n setRequestsItem(responseData);\r\n setIsFetching(false);\r\n };\r\n fetchData();\r\n }, []);\r\n\r\n return { isFetching, requestItem};\r\n};","import React, { useState } from \"react\"\r\nimport ListMunicipalities from \"../components/ListMunicipalities\";\r\nimport ListSites from \"../components/ListSites\";\r\nimport { HeadTitle } from \"../components/HeadTitle\";\r\nimport { Actions } from \"../const/Actions\";\r\nimport { Municipality } from \"../entities/Municipality\";\r\nimport { Site } from \"../entities/Site\";\r\nimport { HospitalityRequestForm } from \"../components/HospitalityRequestForm\";\r\nimport { ToastContainer, toast } from \"react-toastify\";\r\nimport \"react-toastify/dist/ReactToastify.css\";\r\nimport { useGetMunicipalities } from \"../hooks/useGetMunicipalities\";\r\n\r\n\r\nexport const NuovaRichiestaPage = () => {\r\n\r\n const [selectedItem, setSelectedItem] = useState(null)\r\n const [action, setAction] = useState(\"\");\r\n const [requestType, setRequestType] = useState(\"\");\r\n const handleActions = (item: Municipality | Site, action: string, type: string) => {\r\n setAction(action);\r\n setSelectedItem(item);\r\n setRequestType(type);\r\n }\r\n\r\n const handleOnGoBack = (type: string) => {\r\n if (type !== undefined) {\r\n if (type === \"send\") {\r\n toast(\"La tua richiesta è stata correttamente inviata\", {\r\n autoClose: 5000,\r\n position: \"top-right\",\r\n type: \"success\",\r\n });\r\n }\r\n else {\r\n toast(\"La tua richiesta è stata correttamente salvata\", {\r\n autoClose: 5000,\r\n position: \"top-right\",\r\n type: \"success\"\r\n });\r\n }\r\n }\r\n setSelectedItem(null);\r\n setAction(\"\");\r\n setRequestType(\"\");\r\n }\r\n\r\nconst renderSiteTitle = () =>{\r\n if(action === Actions.Vedi){\r\n var municipality = selectedItem as Municipality;\r\n return (\"Elenco dei siti di \" + municipality.comune + \"/\" + municipality.province + \"/\" + municipality.region );\r\n }\r\n\r\n}\r\n\r\nconst renderTitle = (blockedForm?: boolean) => {\r\n if (selectedItem !== null && action === Actions.Richiedi){\r\n if(requestType === \"Sito\") return \" Inserire Richiesta Accettabile di ospitalità per un sito\";\r\n else return \"Inserire Richiesta Ragionevole di ospitalità in un comune\";\r\n }\r\n if (action === Actions.Vedi) return \"Selezione del sito\"\r\n else return \"Verifica siti - Inserisci Richiesta Ragionevole su base comunale\";\r\n}\r\n\r\nreturn (\r\n
\r\n \r\n \r\n {\r\n selectedItem !== null && action === Actions.Richiedi &&\r\n \r\n }\r\n {\r\n selectedItem !== null && action === Actions.Vedi &&\r\n \r\n }\r\n {\r\n selectedItem === null &&\r\n \r\n }\r\n \r\n
\r\n)\r\n\r\n}","import { FilterItem, FilterOption } from \"../entities/Filter\";\r\nimport { ClientStatus, RequestStatus } from \"./Status\";\r\n\r\nexport const StatusTechClientDropdownFilter = [\r\n {\r\n id: 1,\r\n filterName: \"stato\",\r\n options: [\r\n {\r\n id: 0,\r\n value: \"\",\r\n displayValue: \"Stato\"\r\n } as FilterOption,\r\n {\r\n id: 1,\r\n value: RequestStatus.VerificaRichiesta,\r\n displayValue: RequestStatus.VerificaRichiesta\r\n } as FilterOption,\r\n {\r\n id: 2,\r\n value: RequestStatus.RevisioneRichiestaAccettabile,\r\n displayValue: RequestStatus.RevisioneRichiestaAccettabile\r\n } as FilterOption,\r\n {\r\n id: 3,\r\n value: RequestStatus.ProcessoParallelo,\r\n displayValue: RequestStatus.AnalisiInformazioniSitoospitalita\r\n } as FilterOption,\r\n {\r\n id: 4,\r\n value: RequestStatus.InAttesaInstallazioneW3,\r\n displayValue: RequestStatus.InAttesaInstallazioneW3\r\n } as FilterOption,\r\n {\r\n id: 5,\r\n value: RequestStatus.InAttesaInstallazione,\r\n displayValue: RequestStatus.InAttesaInstallazione\r\n } as FilterOption,\r\n {\r\n id: 6,\r\n value: RequestStatus.InAttesaInstallazioneExtensionFavoreW3,\r\n displayValue: RequestStatus.InAttesaInstallazioneExtensionFavoreW3\r\n } as FilterOption,\r\n {\r\n id: 7,\r\n value: RequestStatus.NegoziazioneContrattoClienteSito,\r\n displayValue: RequestStatus.NegoziazioneContrattoClienteSito\r\n } as FilterOption,\r\n ]\r\n } as FilterItem\r\n];\r\n\r\nexport const StatusTechCellnexDropdownFilter = [\r\n {\r\n id: 1,\r\n filterName: \"stato\",\r\n options: [\r\n {\r\n id: 0,\r\n value: \"\",\r\n displayValue: \"Stato\"\r\n } as FilterOption,\r\n {\r\n id: 1,\r\n value: RequestStatus.Approvato,\r\n displayValue: RequestStatus.Approvato\r\n } as FilterOption,\r\n {\r\n id: 2,\r\n value: RequestStatus.Rifiutato,\r\n displayValue: RequestStatus.Rifiutato\r\n } as FilterOption,\r\n {\r\n id: 3,\r\n value: RequestStatus.IdentificazioneSitiComune,\r\n displayValue: RequestStatus.IdentificazioneSitiComune\r\n } as FilterOption,\r\n {\r\n id: 4,\r\n value: RequestStatus.NotificaRifiutoMonitoringTrustee,\r\n displayValue: RequestStatus.NotificaRifiutoMonitoringTrustee\r\n } as FilterOption\r\n ]\r\n } as FilterItem\r\n];\r\n\r\nexport const StatusManagerClientDropdownFilter = [\r\n {\r\n id: 1,\r\n filterName: \"stato\",\r\n options: [\r\n {\r\n id: 0,\r\n value: \"\",\r\n displayValue: \"Stato\"\r\n } as FilterOption,\r\n {\r\n id: 1,\r\n value: RequestStatus.AttesaListaSiti,\r\n displayValue: \"Lista siti su richiesta Cliente\"\r\n } as FilterOption,\r\n {\r\n id: 4,\r\n value: RequestStatus.PubblicazioneListaMT,\r\n displayValue: RequestStatus.PubblicazioneListaMT\r\n } as FilterOption,\r\n {\r\n id: 5,\r\n value: RequestStatus.RifiutoMonitoringTrustee,\r\n displayValue: RequestStatus.RifiutoMonitoringTrustee\r\n } as FilterOption,\r\n ]\r\n } as FilterItem\r\n];\r\n\r\nexport const StatusManagerCellnexDropdownFilter = [\r\n {\r\n id: 1,\r\n filterName: \"stato\",\r\n options: [\r\n {\r\n id: 0,\r\n value: \"\",\r\n displayValue: \"Stato\"\r\n } as FilterOption,\r\n {\r\n id: 1,\r\n value: RequestStatus.SitoIdentificatoVerifica,\r\n displayValue: RequestStatus.SitoIdentificatoVerifica\r\n } as FilterOption,\r\n {\r\n id: 2,\r\n value: RequestStatus.AttesaPubblicazioneSitiRichiesti,\r\n displayValue: RequestStatus.AttesaPubblicazioneSitiRichiesti\r\n } as FilterOption,\r\n ]\r\n } as FilterItem\r\n];\r\n\r\nexport const StatusMTClientDropdownFilter = [\r\n {\r\n id: 1,\r\n filterName: \"stato\",\r\n options: [\r\n {\r\n id: 0,\r\n value: \"\",\r\n displayValue: \"Stato\"\r\n } as FilterOption,\r\n {\r\n id: 1,\r\n value: RequestStatus.AttesaMT,\r\n displayValue: RequestStatus.AttesaMT\r\n } as FilterOption,\r\n ]\r\n } as FilterItem\r\n];\r\n\r\nexport const StatusMTCellnexDropdownFilter = [\r\n {\r\n id: 1,\r\n filterName: \"stato\",\r\n options: [\r\n {\r\n id: 0,\r\n value: \"\",\r\n displayValue: \"Stato\"\r\n } as FilterOption,\r\n {\r\n id: 2,\r\n value: RequestStatus.MTCreazioneSitiPubblicazioneRegistro,\r\n displayValue: RequestStatus.MTCreazioneSitiPubblicazioneRegistro\r\n } as FilterOption\r\n ]\r\n } as FilterItem\r\n];\r\n\r\nexport const StatusW3DropdownFilter = [\r\n {\r\n id: 1,\r\n filterName: \"stato\",\r\n options: [\r\n {\r\n id: 0,\r\n value: \"\",\r\n displayValue: \"Stato\"\r\n } as FilterOption,\r\n {\r\n id: 1,\r\n value: RequestStatus.ProcessoParallelo,\r\n displayValue: RequestStatus.ValutazioneW3OffertaSpazioRiservato\r\n } as FilterOption\r\n ]\r\n } as FilterItem\r\n];\r\n\r\nexport const StatusClientDropdownFilter = [\r\n {\r\n id: 1,\r\n filterName: \"stato\",\r\n options: [\r\n {\r\n id: 0,\r\n value: \"\",\r\n displayValue: \"Stato\"\r\n } as FilterOption,\r\n {\r\n id: 1,\r\n value: ClientStatus.NuovaRichiestaComune,\r\n displayValue: ClientStatus.NuovaRichiestaComune\r\n } as FilterOption,\r\n {\r\n id: 2,\r\n value: ClientStatus.NuovaRichiestaSito,\r\n displayValue: ClientStatus.NuovaRichiestaSito,\r\n } as FilterOption,\r\n {\r\n id: 3,\r\n value: ClientStatus.InAnalisi,\r\n displayValue: ClientStatus.InAnalisi,\r\n } as FilterOption,\r\n {\r\n id: 4,\r\n value: ClientStatus.InAttesa,\r\n displayValue: ClientStatus.InAttesa,\r\n } as FilterOption,\r\n {\r\n id: 5,\r\n value: ClientStatus.RichiestaErroriOIncompleta,\r\n displayValue: ClientStatus.RichiestaErroriOIncompleta,\r\n } as FilterOption,\r\n {\r\n id: 6,\r\n value: ClientStatus.SelezionareSiti,\r\n displayValue: ClientStatus.SelezionareSiti,\r\n } as FilterOption,\r\n {\r\n id: 7,\r\n value: ClientStatus.EsitoNegativoConcluso,\r\n displayValue: ClientStatus.EsitoNegativoConcluso,\r\n } as FilterOption,\r\n {\r\n id: 8,\r\n value: ClientStatus.AcordoInNegoziazione,\r\n displayValue: ClientStatus.AcordoInNegoziazione,\r\n } as FilterOption,\r\n {\r\n id: 9,\r\n value: ClientStatus.InLavorazione,\r\n displayValue: ClientStatus.InLavorazione,\r\n } as FilterOption,\r\n {\r\n id: 12,\r\n value: ClientStatus.AccordoRifiutato,\r\n displayValue: ClientStatus.AccordoRifiutato,\r\n } as FilterOption,\r\n {\r\n id: 13,\r\n value: ClientStatus.InAttesaInstallazioneCliente,\r\n displayValue: ClientStatus.InAttesaInstallazioneCliente,\r\n } as FilterOption,\r\n {\r\n id: 14,\r\n value: ClientStatus.AvvenutaInstallazioneProcessoConcluso,\r\n displayValue: ClientStatus.AvvenutaInstallazioneProcessoConcluso,\r\n } as FilterOption,\r\n {\r\n id: 15,\r\n value: ClientStatus.InstallazioneNonAvvenutaProcessoConcluso,\r\n displayValue: ClientStatus.InstallazioneNonAvvenutaProcessoConcluso,\r\n } as FilterOption,\r\n {\r\n id: 16,\r\n value: ClientStatus.Rifiutato,\r\n displayValue: ClientStatus.Rifiutato,\r\n } as FilterOption,\r\n {\r\n id: 17,\r\n value: ClientStatus.Scaduto,\r\n displayValue: ClientStatus.Scaduto,\r\n } as FilterOption,\r\n ]\r\n } as FilterItem\r\n];\r\n\r\nexport const TypeDropdownFilter = [\r\n {\r\n id: 1,\r\n filterName: \"stato\",\r\n options: [\r\n {\r\n id: 0,\r\n value: \"\",\r\n displayValue: \"Tipo\"\r\n } as FilterOption,\r\n {\r\n id: 1,\r\n value: \"Comune\",\r\n displayValue: \"Comune\"\r\n } as FilterOption,\r\n {\r\n id: 2,\r\n value: \"Sito\",\r\n displayValue: \"Sito\"\r\n } as FilterOption\r\n ]\r\n } as FilterItem\r\n];\r\n\r\nexport const FattibilitaDropdownFilter = [\r\n {\r\n id: 1,\r\n filterName: \"fattibilita\",\r\n options: [\r\n {\r\n id: 0,\r\n value: \"\",\r\n displayValue: \"Select Option\"\r\n } as FilterOption,\r\n {\r\n id: 1,\r\n value: \"Si\",\r\n displayValue: \"Si\"\r\n } as FilterOption,\r\n {\r\n id: 2,\r\n value: \"No\",\r\n displayValue: \"No\"\r\n } as FilterOption,\r\n {\r\n id: 3,\r\n value: \"Condizionato\",\r\n displayValue: \"Condizionato\"\r\n } as FilterOption\r\n ]\r\n } as FilterItem\r\n];\r\n\r\nexport const PropostaCellnexDropdownFilter = [\r\n {\r\n id: 1,\r\n filterName: \"propostaCellnex\",\r\n options: [\r\n {\r\n id: 0,\r\n value: \"\",\r\n displayValue: \"Blank\"\r\n } as FilterOption,\r\n {\r\n id: 1,\r\n value: \"Si\",\r\n displayValue: \"Si\"\r\n } as FilterOption\r\n ]\r\n } as FilterItem\r\n];\r\n\r\nexport const AllStatusTechCLientDropdownFilter = [\r\n {\r\n id: 1,\r\n filterName: \"stato\",\r\n options: [\r\n {\r\n id: 0,\r\n value: \"\",\r\n displayValue: \"Stato\"\r\n } as FilterOption,\r\n {\r\n id: 1,\r\n value: RequestStatus.VerificaRichiesta,\r\n displayValue: RequestStatus.VerificaRichiesta\r\n } as FilterOption,\r\n {\r\n id: 2,\r\n value: RequestStatus.RevisioneRichiestaAccettabile,\r\n displayValue: RequestStatus.RevisioneRichiestaAccettabile\r\n } as FilterOption,\r\n {\r\n id: 3,\r\n value: RequestStatus.ProcessoParallelo,\r\n displayValue: RequestStatus.AnalisiInformazioniSitoospitalita\r\n } as FilterOption,\r\n {\r\n id: 4,\r\n value: RequestStatus.InAttesaInstallazioneW3,\r\n displayValue: RequestStatus.InAttesaInstallazioneW3\r\n } as FilterOption,\r\n {\r\n id: 5,\r\n value: RequestStatus.InAttesaInstallazione,\r\n displayValue: RequestStatus.InAttesaInstallazione\r\n } as FilterOption,\r\n {\r\n id: 6,\r\n value: RequestStatus.NegoziazioneContrattoClienteSito,\r\n displayValue: RequestStatus.NegoziazioneContrattoClienteSito\r\n } as FilterOption,\r\n {\r\n id: 7,\r\n value: RequestStatus.AttesaListaSiti,\r\n displayValue: \"Lista siti su richiesta Cliente\"\r\n } as FilterOption,\r\n {\r\n id: 8,\r\n value: RequestStatus.PubblicazioneListaMT,\r\n displayValue: RequestStatus.PubblicazioneListaMT\r\n } as FilterOption,\r\n {\r\n id: 9,\r\n value: RequestStatus.RifiutoMonitoringTrustee,\r\n displayValue: RequestStatus.RifiutoMonitoringTrustee\r\n } as FilterOption,\r\n {\r\n id: 10,\r\n value: RequestStatus.AttesaMT,\r\n displayValue: RequestStatus.AttesaMT\r\n } as FilterOption,\r\n {\r\n id: 11,\r\n value: RequestStatus.ProcessoParallelo,\r\n displayValue: RequestStatus.ValutazioneW3OffertaSpazioRiservato\r\n } as FilterOption,\r\n {\r\n id: 12,\r\n value: RequestStatus.InserireRichiestaAccettabileOspitalitaSito,\r\n displayValue: RequestStatus.InserireRichiestaAccettabileOspitalitaSito\r\n } as FilterOption,\r\n {\r\n id: 13,\r\n value: RequestStatus.SelezionaSitoPubblicato,\r\n displayValue: RequestStatus.SelezionaSitoPubblicato\r\n } as FilterOption,\r\n {\r\n id: 14,\r\n value: RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica,\r\n displayValue: RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica\r\n } as FilterOption,\r\n {\r\n id: 15,\r\n value: RequestStatus.FeedbackInformazioniAggiuntive,\r\n displayValue: RequestStatus.FeedbackInformazioniAggiuntive\r\n } as FilterOption,\r\n {\r\n id: 16,\r\n value: RequestStatus.IndicazionePriorita,\r\n displayValue: RequestStatus.IndicazionePriorita\r\n } as FilterOption,\r\n {\r\n id: 17,\r\n value: RequestStatus.InAttesaInstallazioneExtensionFavoreW3,\r\n displayValue: RequestStatus.InAttesaInstallazioneExtensionFavoreW3\r\n } as FilterOption,\r\n {\r\n id: 18,\r\n value: RequestStatus.AvvenutaInstallazione,\r\n displayValue: RequestStatus.AvvenutaInstallazione\r\n } as FilterOption,\r\n {\r\n id: 19,\r\n value: RequestStatus.InstallazioneNonAvvenuta,\r\n displayValue: RequestStatus.InstallazioneNonAvvenuta\r\n } as FilterOption,\r\n {\r\n id: 20,\r\n value: RequestStatus.MancataInstallazione,\r\n displayValue: RequestStatus.MancataInstallazione\r\n } as FilterOption,\r\n {\r\n id: 21,\r\n value: RequestStatus.Rifiutato,\r\n displayValue: RequestStatus.Rifiutato\r\n } as FilterOption,\r\n {\r\n id: 22,\r\n value: RequestStatus.Scaduto,\r\n displayValue: RequestStatus.Scaduto\r\n } as FilterOption,\r\n {\r\n id: 23,\r\n value: RequestStatus.PrefattibiltaKO,\r\n displayValue: RequestStatus.PrefattibiltaKO\r\n } as FilterOption,\r\n\r\n ]\r\n } as FilterItem\r\n];\r\n\r\nexport const AllStatusTechCellnexDropdownFilter = [\r\n {\r\n id: 1,\r\n filterName: \"stato\",\r\n options: [\r\n {\r\n id: 0,\r\n value: \"\",\r\n displayValue: \"Stato\"\r\n } as FilterOption,\r\n {\r\n id: 1,\r\n value: RequestStatus.Approvato,\r\n displayValue: RequestStatus.Approvato\r\n } as FilterOption,\r\n {\r\n id: 2,\r\n value: RequestStatus.Rifiutato,\r\n displayValue: RequestStatus.Rifiutato\r\n } as FilterOption,\r\n {\r\n id: 3,\r\n value: RequestStatus.IdentificazioneSitiComune,\r\n displayValue: RequestStatus.IdentificazioneSitiComune\r\n } as FilterOption,\r\n {\r\n id: 4,\r\n value: RequestStatus.NotificaRifiutoMonitoringTrustee,\r\n displayValue: RequestStatus.NotificaRifiutoMonitoringTrustee\r\n } as FilterOption,\r\n {\r\n id: 5,\r\n value: RequestStatus.SitoIdentificatoVerifica,\r\n displayValue: RequestStatus.SitoIdentificatoVerifica\r\n } as FilterOption,\r\n {\r\n id: 6,\r\n value: RequestStatus.AttesaPubblicazioneSitiRichiesti,\r\n displayValue: RequestStatus.AttesaPubblicazioneSitiRichiesti\r\n } as FilterOption,\r\n {\r\n id: 7,\r\n value: RequestStatus.MTCreazioneSitiPubblicazioneRegistro,\r\n displayValue: RequestStatus.MTCreazioneSitiPubblicazioneRegistro\r\n } as FilterOption\r\n ]\r\n } as FilterItem\r\n];","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport { ErrorOutline, KeyboardArrowDown, KeyboardArrowUp } from \"@mui/icons-material\";\r\nimport React from \"react\";\r\nimport { TableColumn } from \"../entities/TableColumn\";\r\nimport { Checkbox } from \"./Checkbox\";\r\n\r\ninterface ITableProps {\r\n localRequestStatus? : string;\r\n columns: TableColumn[];\r\n items: any[];\r\n allowSelectItems: boolean;\r\n showMoreInfoSection: boolean;\r\n isLoadingData: boolean;\r\n selectedItems?: Set;\r\n modifiedItems?: Map;\r\n selectedMoreInfoItem?: Set;\r\n onSelectItem?: Function;\r\n onSelectMoreInfo?: Function;\r\n sendSelection?: Function;\r\n actionColumn?: Function;\r\n actionsForSelectedItems?: Function;\r\n renderOnSelected?: Function;\r\n renderOnMoreInfo?: Function;\r\n onOrderBy?: (orderInfo: any, columns: TableColumn[]) => void;\r\n onSelectAllItems?: Function;\r\n}\r\n\r\nexport const ConcurrentRequestTable = (props: ITableProps) => {\r\n\r\n let {localRequestStatus, columns, items, allowSelectItems, onSelectItem, onSelectMoreInfo, selectedMoreInfoItem, sendSelection, onSelectAllItems, modifiedItems, selectedItems, actionsForSelectedItems, showMoreInfoSection, renderOnMoreInfo, isLoadingData, actionColumn, renderOnSelected, onOrderBy } = props;\r\n const handleOrderBy = (e, column: TableColumn) => {\r\n e.preventDefault();\r\n let targetOrder = column.order === \"desc\" ? \"asc\" : \"desc\";\r\n let orderData = {\r\n field: column.key,\r\n order: targetOrder\r\n }\r\n let newColumns = columns.map(col => {\r\n if (col.key === column.key) col.order = targetOrder\r\n else col.order = \"desc\";\r\n return col;\r\n });\r\n onOrderBy(orderData, newColumns);\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {\r\n allowSelectItems &&\r\n \r\n }\r\n {\r\n columns.map(column => {\r\n\r\n let { displayName, canOrderBy, order, show } = column;\r\n\r\n if (show !== true) return null;\r\n\r\n let orderElement = null;\r\n if (canOrderBy) {\r\n orderElement = handleOrderBy(e, column)}>{order === \"asc\" ? : }\r\n }\r\n\r\n return (\r\n \r\n )\r\n })\r\n }\r\n {\r\n actionColumn &&\r\n \r\n }\r\n {\r\n showMoreInfoSection &&\r\n \r\n }\r\n \r\n \r\n \r\n {isLoadingData &&\r\n \r\n \r\n \r\n }\r\n {!isLoadingData && items.length === 0 &&\r\n \r\n \r\n \r\n }\r\n {\r\n !isLoadingData && items.map((concurrentItems, index) =>{\r\n let siteTitle = \r\n let concurrentGroup = concurrentItems.concurrentRequest.map((item, index) => {\r\n let tdsItem = columns.map(column => {\r\n if (column.showOnSelect === true && (selectedItems && !selectedItems.has(item.id))) {\r\n return ;\r\n }\r\n if (column.show !== true && column.showOnSelect !== true) return null;\r\n \r\n let itemValue;\r\n if (typeof column.accessor === 'function') {\r\n itemValue = column.accessor(item);\r\n } else {\r\n itemValue = item[column.accessor];\r\n }\r\n return (\r\n )\r\n });\r\n \r\n let tdCheck: JSX.Element | null = null;\r\n if (allowSelectItems) {\r\n tdCheck = \r\n }\r\n \r\n let tdActions: JSX.Element | null = null;\r\n if (actionColumn) {\r\n tdActions = \r\n }\r\n \r\n let tdMoreInfo: JSX.Element | null = null;\r\n if (showMoreInfoSection) {\r\n tdMoreInfo = ;\r\n }\r\n \r\n return (\r\n <>\r\n \r\n {tdCheck}\r\n {tdsItem}\r\n {tdActions}\r\n {tdMoreInfo}\r\n \r\n {\r\n selectedItems && selectedItems.has(item.id) && renderOnSelected &&\r\n \r\n {renderOnSelected(item)}\r\n \r\n }\r\n {\r\n selectedMoreInfoItem && selectedMoreInfoItem.has(item.id) &&\r\n \r\n {renderOnMoreInfo(item)}\r\n \r\n }\r\n \r\n )\r\n })\r\n return(\r\n <>\r\n {siteTitle}\r\n {concurrentGroup}\r\n \r\n );\r\n })\r\n \r\n }\r\n {\r\n actionsForSelectedItems &&\r\n actionsForSelectedItems()\r\n }\r\n \r\n
\r\n {\r\n \r\n Selezionato\r\n \r\n }\r\n {displayName} {orderElement}Azioni
\r\n
\r\n \r\n

Non è stato trovato alcun dato

\r\n
\r\n
{concurrentItems.site}{sendSelection(concurrentItems.site)}
{column.customRender ? column.customRender(item, modifiedItems, localRequestStatus) : itemValue} \r\n onSelectItem(item)}\r\n />\r\n {actionColumn(item)} onSelectMoreInfo(item)}>{selectedMoreInfoItem && selectedMoreInfoItem.has(item.id) ? : }
\r\n
\r\n )\r\n};","interface MoreInfoDataProps {\r\n label: string;\r\n value: string | number;\r\n}\r\n\r\nexport const MoreInfoData = (props: MoreInfoDataProps) => {\r\n\r\n let { label, value } = props;\r\n\r\n return (\r\n
\r\n

{label}

\r\n

{value}

\r\n
\r\n )\r\n}","export const APIResponse = {\r\n AlreadyManaged: \"Already Managed\"\r\n}","interface ErrorMessageProps {\r\n text: string;\r\n}\r\n\r\nexport const ErrorMessage = (props:ErrorMessageProps) => {\r\n let { text } = props;\r\n return

{text}

\r\n}","/* eslint-disable jsx-a11y/anchor-is-valid */\r\n/* eslint-disable react-hooks/exhaustive-deps */\r\nimport React, { useContext, useEffect, useState } from \"react\";\r\nimport { TableColumn } from \"../entities/TableColumn\";\r\nimport { Request } from \"../entities/Request\";\r\nimport { RequestFields } from \"../const/Fields\";\r\nimport { StatusClientDropdownFilter, StatusManagerClientDropdownFilter, StatusMTClientDropdownFilter, StatusTechClientDropdownFilter, StatusW3DropdownFilter, TypeDropdownFilter } from \"../const/DropdownFilters\";\r\nimport { Table } from \"./Table\";\r\nimport { ConcurrentRequestTable } from \"./ConcurrentRequestsTable\";\r\nimport { Search } from \"./Search\";\r\nimport { MoreInfoData } from \"./MoreInfoData\";\r\n//import { DatePicker } from \"./DatePicker\";\r\nimport { Dropdown } from \"./Dropdown\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { Routes } from \"../const/Routes\";\r\nimport { AccessAlarm, AlarmOff, ChevronLeft, ChevronRight, InfoOutlined, KeyboardDoubleArrowDown, KeyboardDoubleArrowLeft, KeyboardDoubleArrowRight } from \"@mui/icons-material\";\r\nimport { RequestStatus, ClientRequestViewStatus, ClientRequestFilterStatus, ClientStatus } from \"../const/Status\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { FilterItem } from \"../entities/Filter\";\r\nimport DatePicker from \"react-datepicker\";\r\nimport \"react-datepicker/dist/react-datepicker.css\";\r\nimport { DateFormatConverter, DateLastUpdateFormatConverter } from \"../const/DateFormatConverter\";\r\nimport { Spinner } from \"./Spinner\";\r\nimport { updatePiorityRequests } from \"../services/requestService\";\r\nimport { APIResponse } from \"../const/APIResponse\";\r\nimport { ErrorMessage } from \"./ErrorMessage\";\r\nimport { Checkbox } from \"@mui/material\";\r\nimport { green, grey, red } from \"@mui/material/colors\";\r\nimport { Tooltip } from '@mui/material';\r\nimport { PaginationComponent } from \"./PaginationComponent\";\r\n\r\ninterface ListRequestsProps {\r\n amount?: number,\r\n flow?: string,\r\n isFetching: boolean,\r\n requestsList: any,\r\n fromAdminPanel: boolean,\r\n showAll?: FilterItem[],\r\n disableAction?: boolean,\r\n refreshData: (filters?: string) => Promise,\r\n //for concurrent requests\r\n amountConcurrent?: number,\r\n flowConcurrent?: string,\r\n isFetchingConcurrent?: boolean,\r\n requestsListConcurrent?: any,\r\n fromAdminPanelConcurrent?: boolean,\r\n showAllConcurrent?: FilterItem[],\r\n disableActionConcurrent?: boolean,\r\n showConcurrentTabs?: boolean,\r\n refreshDataConcurrent?: (filters?: string, concurrent?: boolean) => Promise,\r\n}\r\n\r\nconst ListRequests = (props: ListRequestsProps) => {\r\n\r\n const history = useHistory();\r\n let { amount, isFetching, requestsList, fromAdminPanel, showAll, disableAction, refreshData,\r\n amountConcurrent, isFetchingConcurrent, requestsListConcurrent, fromAdminPanelConcurrent, showAllConcurrent, disableActionConcurrent, showConcurrentTabs, refreshDataConcurrent } = props;\r\n\r\n const createDeepObject = (object: any) => {\r\n let newObject = JSON.parse(JSON.stringify(object));\r\n return newObject;\r\n }\r\n\r\n const { user } = useContext(UserContext);\r\n\r\n const [errors, setErrors] = useState([]);\r\n const [selectedItems, setSelectedItems] = useState>(new Set());\r\n const [requestsSwitchControl, setRequestsSwitchControl] = useState(false);\r\n const [showConcurrentRequests, setShowConcurrentRequests] = useState(false);\r\n const [order, setOrderBy] = useState<{ field: string, order: string }>({ field: \"\", order: \"\" });\r\n const [query, setQuery] = useState(\"\");\r\n const [status, setStatus] = useState(\"\");\r\n const [type, setType] = useState(\"\");\r\n const [fromDate, setFromDate] = useState(\"\");\r\n const [toDate, setToDate] = useState(\"\");\r\n const [selectedMoreInfoItem, setSelectedMoreInfoItem] = useState>(new Set());\r\n const [paginationHistory, setPaginationHistory] = useState([]);\r\n const [requestListState, setRequestListState] = useState(requestsList);\r\n const [isRequestFetching, setIsRequestFetching] = useState(isFetching);\r\n const [isRequestConcurrentFetching, setIsRequestConcurrentFetching] = useState(isFetchingConcurrent);\r\n const [fetchStopClock, setFetchStopClock] = useState(false);\r\n const [currentItemsPage, setCurrentItemsPage] = useState(\"\");\r\n const [fistPageItems, setFirstPageItems] = useState(\"\");\r\n\r\n const [filterList, setFilterList] = useState([]);\r\n \r\n\r\n const [page, setPage] = useState(1);\r\n const totalItems = 20;\r\n const items = requestListState?.requests?.slice((page - 1) * totalItems, page * totalItems);\r\n\r\n const tableConst = [\r\n {\r\n key: RequestFields.RequestId,\r\n displayName: \"ID Richiesta\",\r\n accessor: \"requestId\",\r\n show: true,\r\n canOrderBy: showConcurrentRequests === true ? false : true,\r\n order: \"asc\"\r\n } as TableColumn, {\r\n key: RequestFields.StopClock,\r\n displayName: \"\",\r\n accessor: \"StopClock\",\r\n show: user.type === Groups.TECHNICAL || user.type === Groups.CUSTOMER || !showConcurrentRequests && showAll ? true : false,\r\n canOrderBy: false,\r\n order: \"desc\",\r\n //\r\n customRender: (item: Request) => {\r\n if (item.wasStopped) return } title={\"Sospeso\"} arrow>\r\n\r\n }\r\n } as TableColumn,\r\n {\r\n key: RequestFields.ApplicantAgency,\r\n displayName: \"Cliente\",\r\n accessor: (item: Request) => {\r\n return item.client.agency\r\n },\r\n show: fromAdminPanel ? user.type !== Groups.SUPPLIER ? true : false : false,\r\n canOrderBy: showConcurrentRequests === true ? false : true,\r\n order: \"desc\"\r\n } as TableColumn,\r\n {\r\n key: RequestFields.Comune,\r\n displayName: \"Comune\",\r\n accessor: (item: Request) => {\r\n return item.municipality.comune\r\n },\r\n show: true,\r\n canOrderBy: showConcurrentRequests === true ? false : true,\r\n order: \"desc\"\r\n } as TableColumn,\r\n {\r\n key: RequestFields.Tipi,\r\n displayName: \"Tipo\",\r\n accessor: \"tipi\",\r\n show: user.type !== Groups.SUPPLIER ? true : false,\r\n canOrderBy: showConcurrentRequests === true ? false : true,\r\n order: \"desc\"\r\n } as TableColumn,\r\n {\r\n key: RequestFields.GiorniScadenza,\r\n displayName: \"Giorni scadenza\",\r\n accessor: \"giorniScadenza\",\r\n show: true,\r\n canOrderBy: false,\r\n order: \"desc\",\r\n customClass: (item: Request): string => {\r\n if (item.giorniScadenza) {\r\n if (item.giorniScadenza.includes(\"-\")) return \"red\";\r\n else return \"green\";\r\n }\r\n return \"\";\r\n },\r\n customRender: (item: Request) => {\r\n if (user.type !== Groups.CUSTOMER) return item.giorniScadenza;\r\n if (item.stato === RequestStatus.FeedbackInformazioniAggiuntive ||\r\n item.stato === RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica ||\r\n item.stato === RequestStatus.SelezionaSitoPubblicato\r\n )\r\n return item.giorniScadenza;\r\n }\r\n } as TableColumn,\r\n {\r\n key: RequestFields.Stato,\r\n displayName: \"Stato\",\r\n accessor: \"stato\",\r\n show: true,\r\n canOrderBy: showConcurrentRequests === true ? false : true,\r\n order: \"desc\",\r\n customRender: (item: Request) => {\r\n if (fromAdminPanel) {\r\n if (item.stato === RequestStatus.ProcessoParallelo && user.type === Groups.TECHNICAL) return RequestStatus.AnalisiInformazioniSitoospitalita;\r\n else if (item.stato === RequestStatus.ProcessoParallelo && user.type === Groups.SUPPLIER) return RequestStatus.ValutazioneW3OffertaSpazioRiservato;\r\n else if (item.stato === RequestStatus.AttesaListaSiti && user.type === Groups.MANAGER) return \"Lista siti su richiesta Cliente\";\r\n else return item.stato;\r\n }\r\n if (item.stato === ClientStatus.Rifiutato && !item.hasSelectedSite) return ClientStatus.Rifiutato;\r\n return ClientRequestViewStatus[item.stato];\r\n }\r\n } as TableColumn,\r\n {\r\n key: RequestFields.RequestAcceptedDate,\r\n displayName: \"Data\",\r\n accessor: \"requestAcceptedDate\",\r\n show: user.type !== Groups.SUPPLIER ? false : true,\r\n canOrderBy: user.type !== Groups.SUPPLIER ? false : true,\r\n order: \"desc\",\r\n customRender: (item: Request) => {\r\n if (item.requestAcceptedDate) return DateFormatConverter(item.requestAcceptedDate)\r\n\r\n }\r\n } as TableColumn,\r\n {\r\n key: RequestFields.DataDiRequesta,\r\n displayName: \"Data di richiesta\",\r\n accessor: \"dataRequesta\",\r\n show: fromAdminPanel ? false : true,\r\n canOrderBy: showConcurrentRequests === true ? false : true,\r\n order: \"desc\"\r\n } as TableColumn,\r\n {\r\n key: RequestFields.DataLastActu,\r\n displayName: \"Data e ora dell'ultima modifica\",\r\n accessor: \"dataLastActu\",\r\n show: disableAction ? disableAction : false,\r\n canOrderBy: false,\r\n order: \"desc\"\r\n } as TableColumn,\r\n ];\r\n\r\n const [tableColumns, setTableColumns] = useState(tableConst);\r\n\r\n const getFilters = (addPagination: boolean = true) => {\r\n let filters = fromAdminPanel ? \"FromAdminDashboard=True&\" : \"\";\r\n\r\n if (query.length >= 3) filters += `Text=${query}&`;\r\n if (status !== \"\" && !showConcurrentRequests) {\r\n if (fromAdminPanel) {\r\n filters += `Status=${status}&`;\r\n } else {\r\n ClientRequestFilterStatus[status].forEach(state => {\r\n if (status === ClientStatus.Rifiutato) filters += `AvailableSite=Null&`;\r\n else filters += `AvailableSite=NotNull&`;\r\n filters += `AvailableStatus=${state}&`;\r\n });\r\n }\r\n }\r\n if (fetchStopClock) filters += \"ClockStopped=True&\";\r\n if (type !== \"\") filters += `Type=${type}&`;\r\n if (fromDate !== \"\") filters += `FromDate=${new Date(fromDate).toISOString()}&`;\r\n if (toDate !== \"\") filters += `ToDate=${new Date(toDate).toISOString()}&`;\r\n if (order.field !== \"\") filters += `OrderFieldName=${order.field}&OrderAscending=${order.order === \"asc\" ? \"True\" : \"False\"}&`;\r\n if (addPagination && requestListState.nextPagedInfo !== null) filters += `PageInfo=${encodeURIComponent(requestListState.nextPagedInfo)}&`;\r\n setPage(1);\r\n return filters;\r\n }\r\n\r\n const previousSelectedItems = () => {\r\n let finalList: Request[] = [];\r\n if (requestsList?.requests !== null) {\r\n let iDs = new Set();\r\n requestsList?.requests?.forEach(item => {\r\n iDs.add(item.id);\r\n finalList.push(item);\r\n \r\n });\r\n requestsList?.requests?.forEach(site => {\r\n if (!iDs.has(site.id)) {\r\n finalList.push(site);\r\n }\r\n });\r\n setFilterList([...finalList]);\r\n }\r\n else setFilterList([...requestsList?.requests])\r\n\r\n }\r\n\r\n useEffect(() => {\r\n if (isFetching) return;\r\n previousSelectedItems();\r\n\r\n return () => { }\r\n }, [isFetching]);\r\n\r\n useEffect(() => {\r\n setIsRequestFetching(isFetching);\r\n setIsRequestConcurrentFetching((isFetchingConcurrent ? true : false));\r\n if (isRequestFetching) return;\r\n let filters = getFilters(false);\r\n setPaginationHistory([]);\r\n if (showConcurrentRequests) {\r\n setIsRequestConcurrentFetching((isFetchingConcurrent ? true : false));\r\n refreshDataConcurrent(filters, showConcurrentRequests);\r\n setTableColumns([...tableConst]);\r\n }\r\n else {\r\n setIsRequestFetching(isFetching);\r\n refreshData(filters);\r\n }\r\n return () => { }\r\n }, [order, query, status, type, fromDate, toDate, fetchStopClock]);\r\n\r\n useEffect(() => {\r\n setIsRequestFetching(isFetching);\r\n setIsRequestConcurrentFetching((isFetchingConcurrent ? true : false));\r\n \r\n if ((isFetchingConcurrent ? true : false) && isFetching) return;\r\n if (errors.length !== 0) setErrors([]);\r\n if (requestsSwitchControl !== showConcurrentRequests) {\r\n if (showConcurrentRequests) setStatus(\"\");\r\n setRequestsSwitchControl(showConcurrentRequests);\r\n setTableColumns([...tableConst]);\r\n let filters = getFilters(false);\r\n setPaginationHistory([]);\r\n \r\n if (showConcurrentRequests) {\r\n setIsRequestConcurrentFetching((isFetchingConcurrent ? true : false));\r\n refreshDataConcurrent(filters, showConcurrentRequests);\r\n\r\n }\r\n\r\n else {\r\n setIsRequestFetching(isFetching);\r\n refreshData(filters);\r\n }\r\n }\r\n setRequestListState(showConcurrentRequests ? requestsListConcurrent : requestsList);\r\n \r\n return () => { }\r\n }, [showConcurrentRequests, currentItemsPage, fistPageItems, requestListState, isFetching, isFetchingConcurrent]);\r\n\r\n const handleChangePage = (event, value) =>{\r\n let takeMore = (value)*20 > requestListState?.requests.length ? requestListState?.requests.length : (value)*20;\r\n\r\n let finalList: any[] = [];\r\n if (requestListState?.requests !== null) {\r\n let iDs = new Set();\r\n requestListState?.requests?.forEach(item => {\r\n iDs.add(item.id);\r\n finalList.push(item);\r\n \r\n });\r\n requestListState?.requests?.slice(((value - 1)*20),takeMore).forEach(site => {\r\n if (!iDs.has(site.id)) {\r\n finalList.push(site);\r\n }\r\n });\r\n setFilterList([...finalList]);\r\n \r\n }\r\n else setFilterList([...requestListState?.requests?.slice(((value - 1)*20),takeMore)]) \r\n \r\n setPage(value +1);\r\n }\r\n\r\n //Manejar los NaN\r\n \r\n const handleSearch = (text) => {\r\n setQuery(text);\r\n }\r\n\r\n const handleRequestDetail = (item: Request) => {\r\n if (item.tipi === \"Site\") {\r\n if (user.type !== Groups.CUSTOMER) history.push(`${Routes.RequestDetail}/${item.id}`);\r\n else history.push(`${Routes.MyRequests}/${item.id}`);\r\n\r\n }\r\n else {\r\n if (user.type !== Groups.CUSTOMER) history.push(`${Routes.RequestDetail}/${item.id}`);\r\n else if (user.type === Groups.CUSTOMER && (item.stato === RequestStatus.SelezionaSitoPubblicato || item.stato === RequestStatus.FeedbackInformazioniAggiuntive || (item.hasSelectedSite && item.stato === RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica))) history.push(`${Routes.RequestDetail}/${item.id}`);\r\n else history.push(`${Routes.MyRequests}/${item.id}`);\r\n }\r\n }\r\n\r\n const sendConcurrentSelected = async (item: any) => {\r\n\r\n let indexConcurrentRequest = requestListState.findIndex(request => { return (selectedItems.has(request.site) && request.site === item && (request.concurrentRequest.findIndex(selected => { return selectedItems.has(selected.id) }) !== -1)) });\r\n if (indexConcurrentRequest === -1) {\r\n let errors = [];\r\n errors.push(\"È necessario selezionare una richiesta dal sito corrispondente\");\r\n setErrors(errors);\r\n return;\r\n }\r\n let responseData = {\r\n accepted: 0,\r\n version: 0\r\n }\r\n\r\n requestListState[indexConcurrentRequest].concurrentRequest.forEach(request => {\r\n if (selectedItems.has(request.id)) {\r\n responseData.accepted = request.id;\r\n responseData.version = request.version;\r\n }\r\n })\r\n\r\n setIsRequestConcurrentFetching(true);\r\n var response = await updatePiorityRequests(responseData);\r\n if (response.data === APIResponse.AlreadyManaged) {\r\n history.push(Routes.AlreadyManage);\r\n return;\r\n }\r\n let errors: string[] = [];\r\n setErrors(errors);\r\n //setIsRequestConcurrentFetching(true);\r\n let filters = getFilters(false);\r\n refreshDataConcurrent(filters, showConcurrentRequests);\r\n }\r\n\r\n const handleSelectedConcurrentItems = (item: any) => {\r\n selectedItems.clear();\r\n //storage in a Set the request id and the siteId so at sending the response the group validation can be done\r\n selectedItems.add(item.id);\r\n selectedItems.add(item.selectedSite.siteId);\r\n setSelectedItems(new Set(selectedItems));\r\n }\r\n\r\n // const handleRequestDetail = (item:Request) => {\r\n // if (item.stato !== \"Inserire Richiesta di accettabile di ospitalità per un sito\")history.push(`${Routes.RequestDetail}/${item.id}`);\r\n // if( item.stato !== \"Identificazione siti nel Comune\")history.push(`${Routes.RequestDetail}/${item.id}`);\r\n // if(item.stato === \"Inserire Richiesta di accettabile di ospitalità per un sito\" || item.stato === \"Identificazione siti nel Comune\") history.push(`${Routes.MyRequests}/${item.id}`);\r\n // }\r\n\r\n\r\n const handleMoreInfo = (item: any) => {\r\n if (selectedMoreInfoItem.has(item.id)) selectedMoreInfoItem.delete(item.id);\r\n else selectedMoreInfoItem.add(item.id);\r\n setSelectedMoreInfoItem(new Set(selectedMoreInfoItem));\r\n }\r\n\r\n const handleFromDate = (e) => {\r\n setFromDate(e);\r\n }\r\n\r\n const handleToDate = (e) => {\r\n setToDate(e);\r\n }\r\n\r\n const handleStopClock = (fetchValue: boolean) => {\r\n\r\n setFetchStopClock(fetchValue);\r\n }\r\n\r\n const handlerStatusDropdownOption = (optionSelected: string) => {\r\n setStatus(optionSelected);\r\n }\r\n\r\n const handlerTypeDropdownOption = (optionSelected: string) => {\r\n setType(optionSelected);\r\n }\r\n\r\n const handleOnOrderBy = (orderInfo: any, columns: TableColumn[]) => {\r\n setTableColumns([...columns]);\r\n setOrderBy(orderInfo);\r\n }\r\n\r\n\r\n const goNextPage = () => {\r\n let filters = getFilters();\r\n setPaginationHistory([...paginationHistory, filters])\r\n\r\n refreshData(filters);\r\n }\r\n\r\n \r\n\r\n const goPrevPage = () => {\r\n paginationHistory.pop();\r\n if (paginationHistory.length === 0) {\r\n let filters = getFilters(false);\r\n refreshData(filters);\r\n } else {\r\n refreshData(paginationHistory[paginationHistory.length - 1]);\r\n }\r\n setPaginationHistory([...paginationHistory])\r\n }\r\n\r\n const isMTOnPendingTask = () => {\r\n return user.type === Groups.REGULATOR && showConcurrentTabs;\r\n }\r\n\r\n\r\n let navPrevDisabled = paginationHistory.length === 0 ? \"navigation__control--disabled\" : \"\";\r\n let navNextDisabled = requestListState?.nextPagedInfo === null ? \"navigation__control--disabled\" : \"\";\r\n\r\n let statusDropdown = user.type === Groups.TECHNICAL\r\n ? StatusTechClientDropdownFilter\r\n : user.type === Groups.MANAGER\r\n ? StatusManagerClientDropdownFilter\r\n : user.type === Groups.REGULATOR\r\n ? StatusMTClientDropdownFilter\r\n : user.type === Groups.SUPPLIER\r\n ? StatusW3DropdownFilter\r\n : StatusClientDropdownFilter\r\n\r\n return (\r\n <>\r\n {\r\n user.type === Groups.REGULATOR &&\r\n
\r\n

Gentile Monitoring Trustee, stai visualizzando la proposta di pubblicazione di Cellnex basata su richieste di ospitalità dei Clienti. Procedi con la selezione, approvando o rifiutando i siti proposti, per informare Cellnex della lista da pubblicare.

\r\n
\r\n }\r\n \r\n {\r\n user.type !== Groups.SUPPLIER &&\r\n
\r\n\r\n {\r\n user.type === Groups.TECHNICAL || user.type === Groups.CUSTOMER ?\r\n
\r\n {\r\n //Muestra el checkbox en Le mie attività in sospeso (solo para tech 1 y cliente)\r\n }\r\n { handleStopClock(checked.target.checked) }}\r\n />\r\n \r\n
: !showConcurrentRequests && showAll &&
\r\n {\r\n //Muestra el checkbox en Elenco delle richieste (para todos los que tengan esta)\r\n }\r\n { handleStopClock(checked.target.checked) }}\r\n />\r\n \r\n
\r\n\r\n }\r\n\r\n \r\n \r\n \r\n {!showConcurrentRequests &&\r\n \r\n }\r\n
\r\n }\r\n\r\n <>\r\n {/* {\r\n isMTOnPendingTask() &&\r\n
\r\n
\r\n
{ if(showConcurrentRequests){setShowConcurrentRequests(false); setIsRequestFetching(true)}}} >

Richiesta singola ({amount})

\r\n
{ if(!showConcurrentRequests){setShowConcurrentRequests(true); setIsRequestConcurrentFetching(true)}}} >

Richieste multiple ({amountConcurrent})

\r\n
\r\n
\r\n } */}\r\n {\r\n !showConcurrentRequests\r\n ?\r\n {\r\n return (\r\n <>\r\n handleRequestDetail(item)}>Vedi\r\n \r\n )\r\n }}\r\n renderOnMoreInfo={(item: Request) => {\r\n if (fromAdminPanel) {\r\n return (\r\n <>\r\n {\r\n /*\r\n \r\n \r\n \r\n */\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n user.type !== Groups.SUPPLIER &&\r\n \r\n }\r\n \r\n {disableAction !== true &&\r\n \r\n {\r\n user.type !== Groups.SUPPLIER &&\r\n \r\n }\r\n \r\n }\r\n \r\n \r\n )\r\n }\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }}\r\n />\r\n :\r\n {\r\n return (\r\n <>\r\n sendConcurrentSelected(item)}>Inivia selezione\r\n \r\n )\r\n }}\r\n actionColumn={disableActionConcurrent ? undefined : (item: Request) => {\r\n return (\r\n <>\r\n handleRequestDetail(item)}>Vedi\r\n \r\n )\r\n }}\r\n renderOnMoreInfo={(item: Request) => {\r\n if (fromAdminPanelConcurrent) {\r\n return (\r\n <>\r\n {\r\n /*\r\n \r\n \r\n \r\n */\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n user.type !== Groups.SUPPLIER &&\r\n \r\n }\r\n \r\n {disableActionConcurrent !== true &&\r\n \r\n {\r\n user.type !== Groups.SUPPLIER &&\r\n \r\n }\r\n \r\n }\r\n \r\n \r\n )\r\n }\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }}\r\n />\r\n\r\n }\r\n \r\n\r\n {!showConcurrentRequests &&\r\n
\r\n {/*

{fistPageItems} -

\r\n

{currentItemsPage}

\r\n \r\n \r\n \r\n */}\r\n
\r\n \r\n
\r\n
\r\n }\r\n
\r\n {\r\n errors.length > 0 &&\r\n errors.map(error => {\r\n return \r\n })\r\n }\r\n
\r\n \r\n )\r\n\r\n}\r\n\r\nexport default ListRequests;","import { Groups } from \"./Groups\";\r\nimport { RequestStatus } from \"./Status\";\r\n\r\nconst TechStatusAccess = [RequestStatus.ProcessoParallelo, RequestStatus.Approvato, RequestStatus.IdentificazioneSitiComune, RequestStatus.VerificaRichiesta, RequestStatus.RevisioneRichiestaAccettabile, RequestStatus.NotificaRifiutoMonitoringTrustee,\r\n RequestStatus.InAttesaInstallazioneW3, RequestStatus.NegoziazioneContrattoClienteSito, RequestStatus.InAttesaInstallazione, RequestStatus.InAttesaInstallazioneExtensionFavoreW3];\r\nconst ManagerStatusAccess = [RequestStatus.AttesaListaSiti, RequestStatus.AttesaPubblicazioneSitiRichiesti, RequestStatus.SitoIdentificatoVerifica, RequestStatus.PubblicazioneListaMT, RequestStatus.RifiutoMonitoringTrustee];\r\nconst MonitoringTrusteeStatusAccess = [RequestStatus.AttesaMT, RequestStatus.MTCreazioneSitiPubblicazioneRegistro];\r\nconst WinTreeStatusAccess = [RequestStatus.ProcessoParallelo];\r\nconst MonitoringTrusteeConcurrentStatusAccess=[RequestStatus.IndicazionePriorita]\r\nconst AllTechStatus = [RequestStatus.Approvato, RequestStatus.IdentificazioneSitiComune, RequestStatus.VerificaRichiesta, \r\n RequestStatus.AttesaListaSiti, RequestStatus.AttesaPubblicazioneSitiRichiesti, \r\n RequestStatus.SitoIdentificatoVerifica , RequestStatus.PubblicazioneListaMT, \r\n RequestStatus.AttesaMT, RequestStatus.MTCreazioneSitiPubblicazioneRegistro, \r\n RequestStatus.IndicazionePriorita, RequestStatus.InAttesa, RequestStatus.AttesaTechnical, RequestStatus.AttesaSupplier,\r\n RequestStatus.Rifiutato, RequestStatus.RichiestaNonCompleta, RequestStatus.RifiutoMonitoringTrustee, RequestStatus.SelezionaSitoPubblicato,\r\n RequestStatus.RevisioneRichiestaAccettabile, RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica, \r\n RequestStatus.FeedbackInformazioniAggiuntive, RequestStatus.AnalisiInformazioniSitoospitalita,\r\n RequestStatus.ValutazioneW3OffertaSpazioRiservato, RequestStatus.NotificaRifiutoMonitoringTrustee];\r\n\r\nconst VisitorStatus = [RequestStatus.ProcessoParallelo, RequestStatus.Approvato, RequestStatus.IdentificazioneSitiComune, RequestStatus.VerificaRichiesta, RequestStatus.RevisioneRichiestaAccettabile, RequestStatus.NotificaRifiutoMonitoringTrustee,\r\n RequestStatus.InAttesaInstallazioneW3, RequestStatus.NegoziazioneContrattoClienteSito, RequestStatus.InAttesaInstallazione, \r\n RequestStatus.InAttesaInstallazioneExtensionFavoreW3,RequestStatus.AttesaListaSiti, RequestStatus.AttesaPubblicazioneSitiRichiesti, RequestStatus.SitoIdentificatoVerifica, RequestStatus.PubblicazioneListaMT, RequestStatus.RifiutoMonitoringTrustee];\r\n\r\nexport const generateRequestStatusFilter = (type:string, concurrent?:boolean) => {\r\n let statusFilter = \"\";\r\n \r\n if(type === Groups.TECHNICAL){\r\n TechStatusAccess.forEach( status => {\r\n statusFilter += `AvailableStatus=${status}&`\r\n });\r\n }\r\n\r\n if(type === Groups.MANAGER){\r\n ManagerStatusAccess.forEach( status => {\r\n statusFilter += `AvailableStatus=${status}&`\r\n });\r\n }\r\n\r\n if(type === Groups.REGULATOR){\r\n MonitoringTrusteeStatusAccess.forEach( status => {\r\n statusFilter += `AvailableStatus=${status}&`\r\n });\r\n }\r\n\r\n if(type === Groups.SUPPLIER){\r\n WinTreeStatusAccess.forEach( status => {\r\n statusFilter += `AvailableStatus=${status}&`\r\n });\r\n }\r\n\r\n if(type === Groups.VISITOR){\r\n VisitorStatus.forEach( status => {\r\n statusFilter += `AvailableStatus=${status}&`\r\n });\r\n }\r\n\r\n if(concurrent){\r\n MonitoringTrusteeConcurrentStatusAccess.forEach( status => {\r\n statusFilter += `AvailableStatus=${status}&`\r\n });\r\n }\r\n\r\n return statusFilter;\r\n}\r\n\r\nexport const generateAllRequestStatusFilter = () => {\r\n let statusFilter = \"\";\r\n AllTechStatus.forEach(status =>{\r\n statusFilter += `AvailableStatus=${status}&`\r\n });\r\n return statusFilter;\r\n}","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { useEffect, useState, useContext } from \"react\";\r\nimport { generateRequestStatusFilter } from \"../const/AccessPerRol\";\r\nimport { RequestDateConverter } from \"../const/DateFormatConverter\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { RequestStatus } from \"../const/Status\";\r\nimport { ConcurrentRequest, RequestList } from \"../entities/Request\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { getRequests } from \"../services/requestService\";\r\n\r\nexport const useGetRequests = (filters?: string, concurrent?: boolean): { isFetching: boolean, requestsList: any, amount: number, refreshData: (filters?: string, concurrent?: boolean) => Promise } => {\r\n\r\n const [isFetching, setIsFetching] = useState(true);\r\n const [requestsList, setRequestsList] = useState(null);\r\n const [amount, setAmount] = useState(0);\r\n const { user } = useContext(UserContext);\r\n\r\n let requestStatusFilter = concurrent !== true ? generateRequestStatusFilter(user.type) : generateRequestStatusFilter('', concurrent);\r\n\r\n const cleanConcurrentData = (response: any) => {\r\n let concurrentData: ConcurrentRequest[] = response.data.result;\r\n\r\n setAmount(concurrentData.length);\r\n setRequestsList(concurrentData);\r\n setIsFetching(false);\r\n }\r\n\r\n\r\n useEffect(() => {\r\n const fetchData = async () => {\r\n const response = await getRequests(requestStatusFilter);\r\n let amount = response.data.amount;\r\n let responseData: any = null;\r\n if (concurrent) cleanConcurrentData(response);\r\n else {\r\n responseData = {\r\n requests: response.data.result,\r\n nextPagedInfo: response.data.nextPagedInfo\r\n } as RequestList;\r\n responseData = RequestDateConverter(responseData);\r\n setAmount(amount);\r\n setRequestsList(responseData);\r\n setIsFetching(false);\r\n }\r\n\r\n };\r\n //checking if is not colling the services as a Monitoring Trustee\r\n if (user.type !== Groups.REGULATOR && requestStatusFilter !== null && requestStatusFilter.includes(`AvailableStatus=${RequestStatus.IndicazionePriorita}&`)) return;\r\n\r\n fetchData();\r\n }, []);\r\n\r\n const refreshData = async (filters?: string, concurrent?: boolean) => {\r\n //checking if is not colling the services as a Monitoring Trustee\r\n if (user.type !== Groups.REGULATOR && requestStatusFilter !== null && requestStatusFilter.includes(`AvailableStatus=${RequestStatus.IndicazionePriorita}&`)) return;\r\n\r\n setIsFetching(true);\r\n let response = await getRequests(filters ? filters + requestStatusFilter : requestStatusFilter);\r\n let responseData: any = null;\r\n if (concurrent) cleanConcurrentData(response);\r\n else {\r\n responseData = {\r\n requests: response.data.result,\r\n nextPagedInfo: response.data.nextPagedInfo\r\n } as RequestList;\r\n responseData = RequestDateConverter(responseData);\r\n setAmount(response.data.amount);\r\n setRequestsList(responseData);\r\n setIsFetching(false);\r\n }\r\n\r\n };\r\n\r\n return { isFetching, requestsList, amount, refreshData };\r\n};","import React, { useEffect, useState } from \"react\"\r\nimport { HeadTitle } from \"../components/HeadTitle\";\r\nimport ListRequests from \"../components/ListRequests\";\r\nimport { HospitalityRequestForm } from \"../components/HospitalityRequestForm\";\r\nimport { useGetRequests } from \"../hooks/useGetRequests\";\r\nimport { useHistory, useParams } from \"react-router\";\r\nimport { Routes } from \"../const/Routes\";\r\nimport { ToastContainer, toast } from \"react-toastify\";\r\nimport \"react-toastify/dist/ReactToastify.css\";\r\nimport { ClientRequestViewStatus, ClientStatus, RequestStatus } from \"../const/Status\";\r\nimport { render } from \"react-dom\";\r\n\r\ntype RouteParams = {\r\n id: string;\r\n};\r\n\r\nexport const MyRequestsPage = () => {\r\n\r\n\r\n const history = useHistory();\r\n let { isFetching, requestsList, refreshData } = useGetRequests();\r\n let { id } = useParams();\r\n const [estado, setEstado] = useState();\r\n const [fetching, setFetching] = useState();\r\n const [itemStatus, setItemStatus] = useState(\"\");\r\n const [item, setItem] = useState();\r\n\r\n const handlerBack = (type: string) => {\r\n if (type !== undefined) {\r\n if (type === \"send\") {\r\n toast(\"La tua richiesta è stata correttamente inviata\", {\r\n position: \"top-right\",\r\n type: \"success\",\r\n });\r\n }\r\n else {\r\n toast(\"La tua richiesta è stata correttamente salvata\", {\r\n autoClose: 3000,\r\n position: \"top-right\",\r\n type: \"success\"\r\n });\r\n }\r\n }\r\n if (id === undefined) history.push(`${Routes.Home}`);\r\n else history.push(`${Routes.MyRequests}`)\r\n }\r\n\r\n useEffect(() => {\r\n if (!isFetching) setFetching(true);\r\n }, [isFetching]);\r\n\r\n const cambiarestado = (blockedForm?: boolean, fetching?: boolean, item?: any) => {\r\n setEstado(blockedForm);\r\n setFetching(fetching);\r\n setItemStatus(item.stato);\r\n setItem(item);\r\n }\r\n\r\n const renderTitle = () => {\r\n if (fetching) return \"Le mie Richieste\";\r\n if (itemStatus === RequestStatus.InserireRichiesta) return \"Inserire Richiesta Ragionevole di ospitalità in un comune\";\r\n if (item !== undefined){\r\n if(item?.stato === RequestStatus.Rifiutato && !item?.hasSelectedSite) return \"La tua richiesta è stata Rifiutata\";\r\n }\r\n if(itemStatus === RequestStatus.Scaduto) return \"La richiesta è scaduta\";\r\n if(itemStatus === RequestStatus.PrefattibiltaKO) return ClientStatus.EsitoNegativoConcluso\r\n if (\r\n itemStatus === RequestStatus.InAttesaInstallazioneW3 ||\r\n itemStatus === RequestStatus.NegoziazioneContrattoClienteSito ||\r\n itemStatus === RequestStatus.InAttesaInstallazioneExtensionFavoreW3 ||\r\n itemStatus === RequestStatus.EsitoPositivoInstallazioneW3 ||\r\n itemStatus === RequestStatus.MancataInstallazione ||\r\n itemStatus === RequestStatus.ContrattoNonFirmato ||\r\n itemStatus === RequestStatus.InAttesaInstallazione ||\r\n itemStatus === RequestStatus.AvvenutaInstallazione ||\r\n itemStatus === RequestStatus.InstallazioneNonAvvenuta ||\r\n (id !== undefined && item?.stato === RequestStatus.Rifiutato && item?.hasSelectedSite)\r\n ) return ClientRequestViewStatus[itemStatus];\r\n if (\r\n itemStatus === RequestStatus.InserireRichiestaAccettabileOspitalitaSito\r\n ) return itemStatus;\r\n if (id !== undefined && !estado) return \"Richiesta non completa, in attesa di integrazione o modifica\";\r\n if (id !== undefined && estado) return \"La tua richiesta è in valutazione, riceverai aggiornamenti non appena disponibili.\";\r\n else return \"Le mie Richieste\";\r\n }\r\n\r\n return (\r\n
\r\n \r\n {id === undefined &&\r\n \r\n }\r\n {\r\n id !== undefined &&\r\n \r\n }\r\n \r\n
\r\n )\r\n\r\n}\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\n/* eslint-disable react-hooks/exhaustive-deps */\r\nimport React, { useContext, useEffect, useState } from \"react\";\r\nimport { TableColumn } from \"../entities/TableColumn\";\r\nimport { Request, RequestList } from \"../entities/Request\";\r\nimport { RequestFields } from \"../const/Fields\";\r\nimport { StatusManagerCellnexDropdownFilter, StatusMTCellnexDropdownFilter, StatusTechCellnexDropdownFilter } from \"../const/DropdownFilters\";\r\nimport { Table } from \"./Table\";\r\nimport { Search } from \"./Search\";\r\nimport { MoreInfoData } from \"./MoreInfoData\";\r\n//import { DatePicker } from \"./DatePicker\";\r\nimport { Dropdown } from \"./Dropdown\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { Routes } from \"../const/Routes\";\r\nimport { RequestStatus } from \"../const/Status\";\r\nimport { ChevronLeft, ChevronRight, InfoOutlined } from \"@mui/icons-material\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { FilterItem } from \"../entities/Filter\";\r\nimport DatePicker from \"react-datepicker\";\r\nimport \"react-datepicker/dist/react-datepicker.css\";\r\nimport { DateLastUpdateFormatConverter } from \"../const/DateFormatConverter\";\r\nimport { PaginationComponent } from \"./PaginationComponent\";\r\n\r\ninterface ListCellnexRequestsProps {\r\n isFetchingCellnex: boolean,\r\n requestsListCellnex: RequestList,\r\n showAll?: FilterItem[],\r\n disableAction?: boolean,\r\n refreshDataCellnex: (filters?: string) => Promise\r\n}\r\n\r\nconst ListCellnexRequests = (props: ListCellnexRequestsProps) => {\r\n\r\n let { isFetchingCellnex, requestsListCellnex, showAll, disableAction, refreshDataCellnex } = props;\r\n\r\n const { user } = useContext(UserContext);\r\n\r\n const history = useHistory();\r\n const [order, setOrderBy] = useState<{ field: string, order: string }>({ field: \"\", order: \"\" });\r\n const [query, setQuery] = useState(\"\");\r\n const [filterList, setFilterList] = useState([]);\r\n const [status, setStatus] = useState(\"\");\r\n const [fromDate, setFromDate] = useState(\"\");\r\n const [toDate, setToDate] = useState(\"\");\r\n const [selectedMoreInfoItem, setSelectedMoreInfoItem] = useState>(new Set());\r\n const [paginationHistory, setPaginationHistory] = useState([]);\r\n\r\n const [requestListState, setRequestListState] = useState(requestsListCellnex);\r\n\r\n const [page, setPage] = useState(1);\r\n const totalItems = 20;\r\n const items = filterList?.slice((page - 1) * totalItems, page * totalItems);\r\n\r\n const [tableColumns, setTableColumns] = useState([\r\n {\r\n key: RequestFields.RequestId,\r\n displayName: \"ID Richiesta\",\r\n accessor: \"requestId\",\r\n show: true,\r\n canOrderBy: true,\r\n order: \"asc\"\r\n } as TableColumn,\r\n {\r\n key: RequestFields.DataDiRequesta,\r\n displayName: \"Data di richiesta\",\r\n accessor: \"dataRequesta\",\r\n show: true,\r\n canOrderBy: true,\r\n order: \"desc\"\r\n } as TableColumn,\r\n {\r\n key: RequestFields.Tipi,\r\n displayName: \"Tipo\",\r\n accessor: \"tipi\",\r\n show: true,\r\n canOrderBy: true,\r\n order: \"desc\"\r\n } as TableColumn,\r\n {\r\n key: RequestFields.Stato,\r\n displayName: \"Stato\",\r\n accessor: \"stato\",\r\n show: true,\r\n canOrderBy: true,\r\n order: \"desc\"\r\n } as TableColumn,\r\n {\r\n key: RequestFields.DataLastActu,\r\n displayName: \"Data e ora dell'ultima modifica\",\r\n accessor: \"dataLastActu\",\r\n show: disableAction ? disableAction : false,\r\n canOrderBy: false,\r\n order: \"desc\"\r\n } as TableColumn,\r\n {\r\n key: RequestFields.Giorni,\r\n displayName: \"Giorni\",\r\n accessor: \"giorni\",\r\n show: false,\r\n canOrderBy: false,\r\n order: \"desc\"\r\n } as TableColumn\r\n ]);\r\n\r\n const getFilters = (addPagination: boolean = true) => {\r\n let filters = \"\";\r\n if (query.length >= 3) filters += `Text=${query}&`;\r\n if (status !== \"\") filters += `Status=${status}&`;\r\n if (fromDate !== \"\") filters += `FromDate=${new Date(fromDate).toISOString()}&`;\r\n if (toDate !== \"\") filters += `ToDate=${new Date(toDate).toISOString()}&`;\r\n if (order.field !== \"\") filters += `OrderFieldName=${order.field}&OrderAscending=${order.order === \"asc\" ? \"True\" : \"False\"}&`;\r\n if (addPagination && requestsListCellnex.nextPagedInfo !== null) filters += `PageInfo=${encodeURIComponent(requestsListCellnex.nextPagedInfo)}&`;\r\n setPage(1);\r\n return filters;\r\n }\r\n\r\n const previousSelectedItems = () => {\r\n let finalList: Request[] = [];\r\n if (requestsListCellnex?.requests !== null) {\r\n let iDs = new Set();\r\n requestsListCellnex?.requests?.forEach(item => {\r\n iDs.add(item.id);\r\n finalList.push(item);\r\n \r\n });\r\n requestsListCellnex?.requests?.forEach(site => {\r\n if (!iDs.has(site.id)) {\r\n finalList.push(site);\r\n }\r\n });\r\n setFilterList([...finalList]);\r\n }\r\n else setFilterList([...requestsListCellnex?.requests])\r\n\r\n }\r\n\r\n useEffect(() => {\r\n if (isFetchingCellnex) return;\r\n previousSelectedItems();\r\n\r\n return () => { }\r\n }, [isFetchingCellnex]);\r\n\r\n useEffect(() => {\r\n if (isFetchingCellnex) return;\r\n let filters = getFilters(false);\r\n setPaginationHistory([]);\r\n refreshDataCellnex(filters);\r\n \r\n //setRequestListState(requestsListCellnex);\r\n return () => { }\r\n }, [order, query, status, fromDate, toDate]);\r\n\r\n const handleChangePage = (event, value) =>{\r\n let takeMore = (value)*20 > requestListState?.requests?.length ? requestListState?.requests?.length : (value)*20;\r\n\r\n let finalList: any[] = [];\r\n if (requestListState?.requests !== null) {\r\n let iDs = new Set();\r\n requestListState?.requests?.forEach(item => {\r\n iDs.add(item.id);\r\n finalList.push(item);\r\n \r\n });\r\n requestListState?.requests?.slice(((value - 1)*20),takeMore).forEach(site => {\r\n if (!iDs.has(site.id)) {\r\n finalList.push(site);\r\n }\r\n });\r\n setFilterList([...finalList]);\r\n \r\n }\r\n else setFilterList([...requestListState?.requests?.slice(((value - 1)*20),takeMore)]) \r\n \r\n setPage(value +1);\r\n }\r\n\r\n const handleSearch = (text) => {\r\n setQuery(text);\r\n }\r\n\r\n const handleMoreInfo = (item: any) => {\r\n if (selectedMoreInfoItem.has(item.id)) selectedMoreInfoItem.delete(item.id);\r\n else selectedMoreInfoItem.add(item.id);\r\n setSelectedMoreInfoItem(new Set(selectedMoreInfoItem));\r\n }\r\n\r\n const handleFromDate = (e) => {\r\n setFromDate(e);\r\n }\r\n\r\n const handleToDate = (e) => {\r\n setToDate(e);\r\n }\r\n\r\n const handlerStatusDropdownOption = (optionSelected: string) => {\r\n setStatus(optionSelected);\r\n }\r\n\r\n const handleOnOrderBy = (orderInfo: any, columns: TableColumn[]) => {\r\n setTableColumns([...columns]);\r\n setOrderBy(orderInfo);\r\n }\r\n\r\n const goNextPage = () => {\r\n let filters = getFilters();\r\n setPaginationHistory([...paginationHistory, filters])\r\n refreshDataCellnex(filters);\r\n }\r\n\r\n const handleRequestDetail = (item: Request) => {\r\n if (item.stato === RequestStatus.IdentificazioneSitiComune || item.stato == RequestStatus.NotificaRifiutoMonitoringTrustee) history.push(`${Routes.PublishSites}/${item.id}`);\r\n else history.push(`${Routes.RequestDetail}/${item.id}?requestType=cellnex`);\r\n }\r\n\r\n const goPrevPage = () => {\r\n paginationHistory.pop();\r\n if (paginationHistory.length === 0) {\r\n let filters = getFilters(false);\r\n refreshDataCellnex(filters);\r\n } else {\r\n refreshDataCellnex(paginationHistory[paginationHistory.length - 1]);\r\n }\r\n setPaginationHistory([...paginationHistory])\r\n }\r\n\r\n let navPrevDisabled = paginationHistory.length === 0 ? \"navigation__control--disabled\" : \"\";\r\n let navNextDisabled = requestsListCellnex?.nextPagedInfo === null ? \"navigation__control--disabled\" : \"\";\r\n\r\n let statusDropdown = user.type === Groups.TECHNICAL\r\n ? StatusTechCellnexDropdownFilter\r\n : user.type === Groups.MANAGER\r\n ? StatusManagerCellnexDropdownFilter\r\n : StatusMTCellnexDropdownFilter\r\n\r\n return (\r\n <>\r\n {\r\n user.type === Groups.REGULATOR &&\r\n
\r\n

Gentile Monitoring Trustee, stai visualizzando la proposta di pubblicazione di Cellnex in quanto non sono state ricevute richieste sufficienti a garantire la pubblicazione minima mensile. Procedi con la selezione , approvando o rifiutando i siti proposti, per informare Cellnex della lista da pubblicare.

\r\n
\r\n }\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n {\r\n return (\r\n <>\r\n handleRequestDetail(item)}>Vedi\r\n \r\n )\r\n }}\r\n renderOnMoreInfo={(item: Request) => {\r\n if (disableAction !== true) {\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n }}\r\n />\r\n
\r\n {/* \r\n */}\r\n \r\n
\r\n \r\n )\r\n\r\n}\r\n\r\nexport default ListCellnexRequests;","interface StateDataProps {\r\n text: string;\r\n data: string;\r\n}\r\n\r\nexport const StateData = (props: StateDataProps) => {\r\n\r\n let { text, data } = props;\r\n\r\n return (\r\n
\r\n {text}\r\n {data}\r\n
\r\n )\r\n}","import axiosInstance from '../config/axiosConfig';\r\n\r\nexport const getCellnexRequests = (filters?:string) => {\r\n if(filters) return axiosInstance.get(`/CellnexRequest?${filters}`);\r\n else return axiosInstance.get(`/CellnexRequest`);\r\n}\r\n\r\nexport const getCellnexRequest = (id: string | number, filters?:string) => {\r\n if(filters) return axiosInstance.get(`/CellnexRequest/${id}?${filters}`);\r\n else return axiosInstance.get(`/CellnexRequest/${id}`);\r\n}\r\n\r\nexport const createPublishSites = (data:any) => {\r\n return axiosInstance.post('/CellnexRequest', JSON.stringify(data));\r\n}\r\n\r\nexport const updatePublishSites = (data:any) => {\r\n return axiosInstance.put('/CellnexRequest', JSON.stringify(data));\r\n}\r\n\r\nexport const publishSites = (id: string | number) => {\r\n return axiosInstance.post(`/CellnexRequest/${id}/publish`);\r\n}","import React, { useContext, useState } from \"react\"\r\nimport { HeadTitle } from \"../components/HeadTitle\";\r\nimport ListRequests from \"../components/ListRequests\";\r\nimport ListCellnexRequests from \"../components/ListCellnexRequests\";\r\nimport { StateData } from \"../components/StateData\";\r\nimport { useGetCellnexRequests } from \"../hooks/useGetCellnexRequests\";\r\nimport { useGetRequestTagsInfo } from \"../hooks/useGetRequestTagsInfo\";\r\nimport { useGetRequests } from \"../hooks/useGetRequests\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { Spinner } from \"../components/Spinner\";\r\n\r\nexport const MyPendingTasksPage = () => {\r\n\r\n const { user } = useContext(UserContext);\r\n const [showCellnexRequests, setShowCellnexRequests] = useState(false);\r\n \r\n let { isFetchingCellnex, requestsListCellnex, cellnexAmount, refreshDataCellnex } = useGetCellnexRequests();\r\n let { isFetching, requestsList, amount, refreshData } = useGetRequests();\r\n let { isLoading, reportingCollection } = useGetRequestTagsInfo();\r\n\r\n //**** comentado al quitar la funcionalidad de solicitudes concurrentes ************//\r\n //let { isFetching: isFetchingConcurrent, requestsList: requestsListConcurrent, amount: amountConcurrent, refreshData: refreshDataConcurrent } = useGetRequests('', true);\r\n\r\n let title = \"\";\r\n switch (user.type) {\r\n case Groups.TECHNICAL:\r\n case Groups.MANAGER:\r\n title = \"Richieste dei siti inviate: Azioni in sospeso\"\r\n break;\r\n case Groups.REGULATOR:\r\n title = \"In attesa Monitoring Trustee\"\r\n //title = \"Le mie attivitá in sospeso\"\r\n break;\r\n case Groups.SUPPLIER:\r\n title = \"Offerta di Spazio Riservato: Azioni in sospeso\"\r\n break;\r\n default:\r\n title = \"Richieste dei siti inviate: Azioni in sospeso\"\r\n break;\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n {\r\n !isLoading\r\n ?\r\n
\r\n {/* */}\r\n {\r\n reportingCollection.map(item => {\r\n return (\r\n \r\n );\r\n })\r\n }\r\n\r\n
\r\n :\r\n \r\n }\r\n
\r\n
\r\n
\r\n {\r\n user.type === Groups.SUPPLIER\r\n ?\r\n
setShowCellnexRequests(false)} >

Offerta Spazio Riservato {requestsList?.requests.length}

\r\n :\r\n <>\r\n
setShowCellnexRequests(false)} >

Richieste dei clienti ({amount})

\r\n
setShowCellnexRequests(true)} >

Richieste di Cellnex ({cellnexAmount})

\r\n \r\n }\r\n\r\n
\r\n
\r\n
\r\n
\r\n {\r\n showCellnexRequests &&\r\n \r\n }\r\n {\r\n !showCellnexRequests &&\r\n <>\r\n {\r\n \r\n }\r\n \r\n }\r\n
\r\n
\r\n
\r\n )\r\n\r\n}","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { useContext, useEffect, useState } from \"react\";\r\nimport { generateRequestStatusFilter } from \"../const/AccessPerRol\";\r\nimport { RequestDateConverter } from \"../const/DateFormatConverter\";\r\nimport { RequestList } from \"../entities/Request\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { getCellnexRequests } from \"../services/cellnexRequestService\";\r\n\r\nexport const useGetCellnexRequests = (filters?: string): { isFetchingCellnex: boolean, requestsListCellnex: RequestList, cellnexAmount: number, refreshDataCellnex: (filters?: string) => Promise } => {\r\n const [isFetchingCellnex, setIsFetchingCellnex] = useState(true);\r\n const [requestsListCellnex, setRequestsListCellnex] = useState(null);\r\n const [cellnexAmount, setCellnexAmount] = useState(0);\r\n const { user } = useContext(UserContext);\r\n\r\n let requestStatusFilter = generateRequestStatusFilter(user.type);\r\n\r\n useEffect(() => {\r\n const fetchData = async () => {\r\n const response = await getCellnexRequests(requestStatusFilter);\r\n let responseData = {\r\n requests: response.data.result,\r\n nextPagedInfo: response.data.nextPagedInfo\r\n } as RequestList;\r\n responseData = RequestDateConverter(responseData);\r\n setCellnexAmount(response.data.amount)\r\n setRequestsListCellnex(responseData);\r\n setIsFetchingCellnex(false);\r\n };\r\n fetchData();\r\n }, []);\r\n\r\n const refreshDataCellnex = async (filters?: string) => {\r\n setIsFetchingCellnex(true);\r\n let response = await getCellnexRequests(filters ? filters + requestStatusFilter : requestStatusFilter);\r\n let responseData = {\r\n requests: response.data.result,\r\n nextPagedInfo: response.data.nextPagedInfo\r\n } as RequestList;\r\n responseData = RequestDateConverter(responseData);\r\n setCellnexAmount(response.data.amount)\r\n setRequestsListCellnex(responseData);\r\n setIsFetchingCellnex(false);\r\n };\r\n\r\n return { isFetchingCellnex, requestsListCellnex, cellnexAmount, refreshDataCellnex };\r\n};","import React, { useContext, useEffect, useState } from \"react\";\r\nimport { generateRequestStatusFilter } from \"../const/AccessPerRol\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { RequestStatus } from \"../const/Status\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { getRequestsTagsInfo } from \"../services/reportingService\";\r\n\r\nexport interface IReportings {\r\n ID?: any\r\n reportList?: any\r\n items?: any\r\n}\r\n\r\nexport const useGetRequestTagsInfo = ():{isLoading: boolean, reportingCollection:IReportings[]} => {\r\n\r\n const [reportingCollection, setReportingCollection] = useState();\r\n const [isLoading, setIsloading] = useState(true);\r\n\r\n let reportingItems: IReportings[] = [];\r\n let {user} = useContext(UserContext);\r\n let requestStatusFilter = generateRequestStatusFilter(user.type);\r\n useEffect(() => {\r\n const fetchData = async () => {\r\n // if(user.type === Groups.SUPPLIER){\r\n // setIsloading(false)\r\n // return {isLoading}\r\n // }\r\n if(user.type === Groups.REGULATOR) requestStatusFilter += `AvailableStatus=${RequestStatus.IndicazionePriorita}&`;\r\n\r\n const response = await getRequestsTagsInfo(requestStatusFilter, user.type);\r\n let array = response[\"data\"];\r\n array.forEach(element => {\r\n let responseData = {\r\n reportList: element[\"column\"],\r\n items: element[\"count\"]\r\n } as IReportings;\r\n reportingItems.push(responseData);\r\n });\r\n setReportingCollection(reportingItems);\r\n setIsloading(false);\r\n };\r\n fetchData();\r\n }, []);\r\n\r\n return {isLoading, reportingCollection};\r\n} \r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { useEffect, useState } from \"react\";\r\nimport { CellnexRequestDateConverter } from \"../const/DateFormatConverter\";\r\nimport { CellnexRequest } from \"../entities/CellnexRequest\";\r\nimport { getCellnexRequest } from \"../services/cellnexRequestService\";\r\n\r\nexport const useGetCellnexRequestById = (id: number | string): { isFetching:boolean, cellnexRequest:CellnexRequest, refreshData: (filters?: string) => Promise } => {\r\n const [isFetching, setIsFetching] = useState(true);\r\n const [cellnexRequest, setCellnexRequest] = useState(null);\r\n\r\n useEffect(() => {\r\n const fetchData = async () => {\r\n if(id !== \"\"){\r\n const response = await getCellnexRequest(id);\r\n let item = {\r\n id: response.data.result.id,\r\n version: response.data.result.version,\r\n status: response.data.result.status,\r\n sites: response.data.result.sites,\r\n comments: JSON.parse(response.data.result.comments)\r\n } as CellnexRequest;\r\n item = CellnexRequestDateConverter(item);\r\n setCellnexRequest(item); \r\n }\r\n setIsFetching(false);\r\n };\r\n fetchData();\r\n }, []);\r\n\r\n const refreshData = async (filters?: string) => {\r\n setIsFetching(true);\r\n let response = await getCellnexRequest(id, filters);\r\n let item = {\r\n id: response.data.result.id,\r\n status: response.data.result.status,\r\n sites: response.data.result.sites,\r\n comments: JSON.parse(response.data.result.comments)\r\n } as CellnexRequest;\r\n item = CellnexRequestDateConverter(item);\r\n setCellnexRequest(item);\r\n setIsFetching(false);\r\n };\r\n\r\n return { isFetching, cellnexRequest, refreshData };\r\n};","/* eslint-disable jsx-a11y/anchor-is-valid */\r\n/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { useCallback, useContext, useEffect, useState } from \"react\";\r\nimport { TableColumn } from \"../entities/TableColumn\";\r\nimport { RequestFields, SiteFields } from \"../const/Fields\";\r\nimport { useGetSites } from \"../hooks/useGetSites\";\r\nimport { Table } from \"./Table\";\r\nimport { Search } from \"./Search\"\r\nimport { Site, SiteRequest } from \"../entities/Site\";\r\nimport { Dropdown } from \"./Dropdown\";\r\nimport { FattibilitaDropdownFilter, PropostaCellnexDropdownFilter } from \"../const/DropdownFilters\";\r\n//import { DatePicker } from \"./DatePicker\";\r\nimport { ErrorMessage } from \"./ErrorMessage\";\r\nimport { useGetCellnexRequestById } from \"../hooks/useGetCellnexRequestById\";\r\nimport { MoreInfoData } from \"./MoreInfoData\";\r\nimport { ChevronLeft, ChevronRight } from \"@mui/icons-material\";\r\nimport { createPublishSites } from \"../services/cellnexRequestService\";\r\nimport DatePicker from \"react-datepicker\";\r\nimport \"react-datepicker/dist/react-datepicker.css\";\r\nimport { DateFormatConverter, DateFormatConverterReverse } from \"../const/DateFormatConverter\";\r\nimport { RequestStatus } from \"../const/Status\";\r\nimport Comments from \"./Comment\";\r\nimport CommentsHistory from \"./CommentsHistory\";\r\nimport { GroupsText } from \"../const/Groups\";\r\nimport {APIResponse} from \"../const/APIResponse\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { Spinner } from \"./Spinner\";\r\n\r\nimport PriorityHighIcon from '@mui/icons-material/PriorityHigh';\r\nimport CheckIcon from '@mui/icons-material/Check';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport { useHistory } from \"react-router\";\r\nimport { Routes } from \"../const/Routes\";\r\nimport { PaginationComponent } from \"./PaginationComponent\";\r\n\r\n\r\ninterface ListPublishSitesProps {\r\n itemId?: string;\r\n onGoBack?: Function;\r\n filterByMunicipality?: string | number;\r\n}\r\n\r\nconst ListPublishSites = (props: ListPublishSitesProps) => {\r\n\r\n let { itemId, onGoBack, filterByMunicipality } = props;\r\n const { user } = useContext(UserContext);\r\n const history = useHistory();\r\n\r\n\r\n const [query, setQuery] = useState(\"\");\r\n const [errors, setErrors] = useState([]);\r\n const [order, setOrderBy] = useState<{ field: string, order: string }>({ field: \"\", order: \"\" });\r\n const [paginationHistory, setPaginationHistory] = useState([]);\r\n const [comment, setComment] = useState(\"\");\r\n const [commentList, setCommentList] = useState();\r\n\r\n let { isFetching: isfetchingRequest, cellnexRequest } = useGetCellnexRequestById(itemId ? itemId : \"\");\r\n const [filterList, setFilterList] = useState([]);\r\n let { isFetching, sitesList, refreshData } = useGetSites(`SiteStatus=Non pubblicati`);\r\n const [cellnexRequestStatus, setCellnexRequestStatus] = useState(\"\");\r\n\r\n const [selectedItems, setSelectedItems] = useState>(new Set());\r\n const [modifiedItems, setModifiedItems] = useState>(new Map());\r\n const [selectedMoreInfoItem, setSelectedMoreInfoItem] = useState>(new Set());\r\n const [alreadySelected, setAlreadySelected] = useState(false);\r\n const [isSendingRequest, setIsSendingRequest] = useState(false);\r\n\r\n const [page, setPage] = useState(1);\r\n const totalItems = 20;\r\n const items = filterList.slice((page - 1) * totalItems, page * totalItems);\r\n\r\n const [tableColumns, setTableColumns] = useState([\r\n {\r\n key: RequestFields.Stato,\r\n displayName: \"Stato\",\r\n accessor: \"status\",\r\n canOrderBy: false,\r\n order: \"desc\",\r\n show: itemId ? true : false,\r\n customRender: (item: SiteRequest, mapSelectedItems: Map, localRequestStatus: string) => {\r\n let classNames = \"status status--pending\";\r\n let icon;\r\n let statusValue;\r\n if (localRequestStatus === RequestStatus.NotificaRifiutoMonitoringTrustee) {\r\n statusValue = item.status;\r\n if (statusValue === RequestStatus.Approvato) {\r\n classNames = \"status status--approved\";\r\n icon = ;\r\n }if (statusValue === RequestStatus.Rifiutato) {\r\n classNames = \"status status--rejected\";\r\n icon = ;\r\n }\r\n if (statusValue === RequestStatus.InAttesa) {\r\n icon = ;\r\n }\r\n return {icon} {statusValue}\r\n }\r\n else if (localRequestStatus === RequestStatus.IdentificazioneSitiComune) {\r\n\r\n statusValue = item.internalStatus;\r\n if (statusValue === RequestStatus.Approvato) {\r\n classNames = \"status status--approved\";\r\n icon = ;\r\n } else if (statusValue === RequestStatus.Rifiutato) {\r\n classNames = \"status status--rejected\";\r\n icon = ;\r\n }\r\n if (statusValue === RequestStatus.InAttesa) {\r\n icon = ;\r\n }\r\n return {icon} {statusValue}\r\n }\r\n }\r\n } as TableColumn,\r\n {\r\n key: SiteFields.SiteId,\r\n displayName: \"Site ID\",\r\n accessor: \"siteId\",\r\n canOrderBy: true,\r\n order: \"asc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Lon,\r\n displayName: \"Coordinate (LON)\",\r\n accessor: \"lon\",\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Lat,\r\n displayName: \"Coordinate (LAT)\",\r\n accessor: \"lat\",\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Comune,\r\n displayName: \"Comune\",\r\n accessor: (item: Site) => {\r\n return item.municipality.comune\r\n },\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.PropostaCellnex,\r\n displayName: \"Proposta Cellnex\",\r\n accessor: \"propostaCellnex\",\r\n canOrderBy: false,\r\n show: true,\r\n showOnSelect: true,\r\n customRender: (item: Site, mapSelectedItems: Map, localRequestStatus: string) => {\r\n let seletedItemLocal = mapSelectedItems.get(item.id);\r\n if (seletedItemLocal !== undefined && localRequestStatus === RequestStatus.IdentificazioneSitiComune && seletedItemLocal.internalStatus === RequestStatus.Approvato) {\r\n return (\r\n
\r\n {seletedItemLocal.propostaCellnex}\r\n
\r\n )\r\n }\r\n if (seletedItemLocal !== undefined && localRequestStatus === RequestStatus.NotificaRifiutoMonitoringTrustee && seletedItemLocal.status === RequestStatus.Approvato) {\r\n return (\r\n
\r\n {seletedItemLocal.propostaCellnex}\r\n
\r\n )\r\n }\r\n return (\r\n handlePropostaChanges(option, seletedItemLocal ? seletedItemLocal : item)}\r\n />\r\n )\r\n }\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Fattibilita,\r\n displayName: \"Fattibilità\",\r\n accessor: \"fattibilita\",\r\n canOrderBy: false,\r\n show: true,\r\n showOnSelect: true,\r\n customRender: (item: Site, mapSelectedItems: Map, localRequestStatus: string) => {\r\n let seletedItemLocal = mapSelectedItems.get(item.id);\r\n if (seletedItemLocal !== undefined && localRequestStatus === RequestStatus.IdentificazioneSitiComune && seletedItemLocal.internalStatus === RequestStatus.Approvato) {\r\n return (\r\n
\r\n {seletedItemLocal.fattibilita}\r\n
\r\n )\r\n }\r\n if (seletedItemLocal !== undefined && localRequestStatus === RequestStatus.NotificaRifiutoMonitoringTrustee && seletedItemLocal.status === RequestStatus.Approvato) {\r\n return (\r\n
\r\n {seletedItemLocal.fattibilita}\r\n
\r\n )\r\n }\r\n return (\r\n handleSiteChanges(option, seletedItemLocal ? seletedItemLocal : item)}\r\n />\r\n )\r\n }\r\n } as TableColumn,\r\n {\r\n key: SiteFields.DataProntoServizio,\r\n displayName: \"Data di pronto servizio\",\r\n accessor: \"dataDiProntoServizio\",\r\n canOrderBy: false,\r\n show: true,\r\n showOnSelect: true,\r\n customRender: (item: Site, mapSelectedItems: Map, localRequestStatus: string) => {\r\n let seletedItemLocal = mapSelectedItems.get(item.id);\r\n if (item.dataProntoServizo.includes(\"/\")) item.dataProntoServizo = DateFormatConverterReverse(item.dataProntoServizo);\r\n if (seletedItemLocal.dataProntoServizo.includes(\"/\")) seletedItemLocal.dataProntoServizo = DateFormatConverterReverse(seletedItemLocal.dataProntoServizo);\r\n if (seletedItemLocal !== undefined && localRequestStatus === RequestStatus.NotificaRifiutoMonitoringTrustee && seletedItemLocal.status === RequestStatus.Approvato) {\r\n if (seletedItemLocal.dataProntoServizo.includes(\"-\")) seletedItemLocal.dataProntoServizo = DateFormatConverter(seletedItemLocal.dataProntoServizo);\r\n return (\r\n
\r\n {seletedItemLocal.dataProntoServizo}\r\n
\r\n )\r\n }\r\n if (seletedItemLocal !== undefined && localRequestStatus === RequestStatus.IdentificazioneSitiComune && seletedItemLocal.internalStatus === RequestStatus.Approvato) {\r\n if (seletedItemLocal.dataProntoServizo.includes(\"-\")) seletedItemLocal.dataProntoServizo = DateFormatConverter(seletedItemLocal.dataProntoServizo);\r\n return (\r\n
\r\n {seletedItemLocal.dataProntoServizo}\r\n
\r\n )\r\n }\r\n return (\r\n handleToDate(e, seletedItemLocal ? seletedItemLocal : item)}\r\n selected={seletedItemLocal ? new Date(seletedItemLocal.dataProntoServizo) : item.dataProntoServizo ? new Date(item.dataProntoServizo) : new Date(null)}\r\n className={'basicDate basicDate--noSeparated'}\r\n dateFormat=\"dd/MM/yyyy\"\r\n placeholderText=\"dd/mm/yyyy\"\r\n />\r\n )\r\n }\r\n } as TableColumn\r\n ]);\r\n\r\n const handlePropostaChanges = (option: string, item: any) => {\r\n item.propostaCellnex = option;\r\n if (item.status !== undefined && item.status !== null && item.status === RequestStatus.Rifiutato) item.status = RequestStatus.InAttesa;\r\n if (item.internalStatus !== undefined && item.internalStatus !== null && item.internalStatus === RequestStatus.Rifiutato) item.internalStatus = RequestStatus.InAttesa;\r\n setSelectedItems(preValue => new Set(preValue));\r\n }\r\n\r\n const handleSiteChanges = (option: string, item: any) => {\r\n if (item.status !== undefined && item.status !== null && item.status === RequestStatus.Rifiutato) item.status = RequestStatus.InAttesa;\r\n if (item.internalStatus !== undefined && item.internalStatus !== null && item.internalStatus === RequestStatus.Rifiutato) item.internalStatus = RequestStatus.InAttesa;\r\n item.fattibilita = option;\r\n setSelectedItems(preValue => new Set(preValue));\r\n }\r\n\r\n const handleToDate = (value: any, item: any) => {\r\n item.dataProntoServizo = new Date(value).toISOString();\r\n if (item.status !== undefined && item.status !== null && item.status === RequestStatus.Rifiutato) item.status = RequestStatus.InAttesa;\r\n if (item.internalStatus !== undefined && item.internalStatus !== null && item.internalStatus === RequestStatus.Rifiutato) item.internalStatus = RequestStatus.InAttesa;\r\n // fix para refrescar la tabla\r\n setSelectedItems(preValue => new Set(preValue));\r\n }\r\n\r\n const handleSelectedItems = (item: any) => {\r\n let notAllowedToModified = true;\r\n if (item.status === RequestStatus.Approvato) notAllowedToModified = false;\r\n if (item.internalStatus === RequestStatus.Approvato && item.status !== RequestStatus.Rifiutato) notAllowedToModified = false;\r\n if (selectedItems.has(item.id) && notAllowedToModified) {\r\n modifiedItems.delete(item.id);\r\n selectedItems.delete(item.id);\r\n } else {\r\n selectedItems.add(item.id);\r\n modifiedItems.set(item.id, item);\r\n }\r\n setSelectedItems(new Set(selectedItems));\r\n setModifiedItems(new Map(modifiedItems));\r\n }\r\n\r\n const handleMoreInfo = (item: any) => {\r\n if (selectedMoreInfoItem.has(item.id)) selectedMoreInfoItem.delete(item.id);\r\n else selectedMoreInfoItem.add(item.id);\r\n setSelectedMoreInfoItem(new Set(selectedMoreInfoItem));\r\n }\r\n\r\n const handleComment = (textValue: string) => {\r\n setComment(textValue);\r\n }\r\n\r\n const getFilters = (addPagination: boolean = true) => {\r\n let filters = \"SiteStatus=Non pubblicati&\";\r\n if (filterByMunicipality) filters += `IdMunicipality=${filterByMunicipality}&`;\r\n if (query.length >= 3) filters += `Text=${query}&`;\r\n if (order.field !== \"\") filters += `OrderFieldName=${order.field}&OrderAscending=${order.order === \"asc\" ? \"True\" : \"False\"}&`;\r\n if (addPagination && sitesList.nextPagedInfo !== null) filters += `PageInfo=${encodeURIComponent(sitesList.nextPagedInfo)}&`;\r\n setPage(1);\r\n return filters;\r\n }\r\n\r\n const previousSelectedItems = () => {\r\n let finalList: Site[] = [];\r\n if (cellnexRequest !== null) {\r\n let iDs = new Set();\r\n cellnexRequest.sites.forEach(item => {\r\n iDs.add(item.id);\r\n finalList.push(item);\r\n if (!alreadySelected) {\r\n handleSelectedItems(item);\r\n }\r\n });\r\n sitesList.sites.forEach(site => {\r\n if (!iDs.has(site.id)) {\r\n finalList.push(site);\r\n }\r\n });\r\n setFilterList([...finalList]);\r\n setAlreadySelected(true);\r\n }\r\n else setFilterList([...sitesList.sites])\r\n\r\n }\r\n\r\n useEffect(() => {\r\n if (isFetching) return;\r\n previousSelectedItems();\r\n if (cellnexRequest !== null) {\r\n if (cellnexRequest?.status !== null) {\r\n setCellnexRequestStatus(cellnexRequest.status);\r\n }\r\n }\r\n if (cellnexRequest?.status === RequestStatus.IdentificazioneSitiComune) setCommentList(cellnexRequest.comments);\r\n if (cellnexRequest?.status === RequestStatus.NotificaRifiutoMonitoringTrustee) {\r\n setCommentList(cellnexRequest.comments);\r\n tableColumns[0].accessor = \"internalStatus\";\r\n }\r\n return () => { }\r\n }, [isfetchingRequest, isFetching, page]);\r\n\r\n useEffect(() => {\r\n if (isFetching || isfetchingRequest) return;\r\n if (cellnexRequest !== null) {\r\n if (cellnexRequest?.status !== null) {\r\n setCellnexRequestStatus(cellnexRequest.status);\r\n }\r\n }\r\n let filters = getFilters(false);\r\n setPaginationHistory([]);\r\n refreshData(filters);\r\n return () => { }\r\n }, [order, query]);\r\n\r\n const handleSearch = (text) => {\r\n setQuery(text);\r\n }\r\n\r\n const handleChangePage = (event, value) =>{\r\n let takeMore = (value)*20 > sitesList.sites.length ? sitesList.sites.length : (value)*20;\r\n\r\n let finalList: Site[] = [];\r\n if (cellnexRequest !== null) {\r\n let iDs = new Set();\r\n cellnexRequest.sites.forEach(item => {\r\n iDs.add(item.id);\r\n finalList.push(item);\r\n if (!alreadySelected) {\r\n handleSelectedItems(item);\r\n }\r\n });\r\n sitesList.sites.slice(((value - 1)*20),takeMore).forEach(site => {\r\n if (!iDs.has(site.id)) {\r\n finalList.push(site);\r\n }\r\n });\r\n setFilterList([...finalList]);\r\n setAlreadySelected(true);\r\n }\r\n else setFilterList([...sitesList.sites.slice(((value - 1)*20),takeMore)]) \r\n setPage(value +1);\r\n }\r\n\r\n const handleSelectAllItems = () => {\r\n for (var item of filterList) {\r\n if (!selectedItems.has(item.id)) {\r\n selectedItems.add(item.id);\r\n modifiedItems.set(item.id, item);\r\n }\r\n }\r\n setSelectedItems(new Set(selectedItems));\r\n setModifiedItems(new Map(modifiedItems));\r\n }\r\n\r\n const handleOnOrderBy = (orderInfo: any, columns: TableColumn[]) => {\r\n setTableColumns([...columns]);\r\n setOrderBy(orderInfo);\r\n }\r\n\r\n const goNextPage = () => {\r\n let filters = getFilters();\r\n setPaginationHistory([...paginationHistory, filters])\r\n refreshData(filters);\r\n }\r\n\r\n const goPrevPage = () => {\r\n paginationHistory.pop();\r\n if (paginationHistory.length === 0) {\r\n let filters = getFilters(false);\r\n refreshData(filters);\r\n } else {\r\n refreshData(paginationHistory[paginationHistory.length - 1]);\r\n }\r\n setPaginationHistory([...paginationHistory])\r\n }\r\n\r\n const validateDate = (isDraft: boolean) => {\r\n let sitesInformation = [];\r\n let errors = [];\r\n\r\n if (modifiedItems.size <= 0) {\r\n errors.push(\"Devi selezionare almeno un elemento\");\r\n }\r\n\r\n for (let [, site] of modifiedItems) {\r\n if (!isDraft && (site.fattibilita === null || site.dataProntoServizo === null)) {\r\n errors.push(\"Devi inserire i valori Fattibilità e Data di pronto servizio di tutti gli elementi selezionati\");\r\n break;\r\n }\r\n\r\n if (site.dataProntoServizo.includes(\"/\")) site.dataProntoServizo = new Date(DateFormatConverterReverse(site.dataProntoServizo)).toISOString();\r\n var finalStatus = (site.status !== null && site.status !== undefined) ? (site.internalStatus === RequestStatus.InAttesa && cellnexRequest.status === RequestStatus.IdentificazioneSitiComune) ? RequestStatus.InAttesa : site.status : RequestStatus.InAttesa\r\n var finalStatusInternal = (site.internalStatus !== null && site.internalStatus !== undefined) ? (site.status === RequestStatus.InAttesa && cellnexRequest.status === RequestStatus.NotificaRifiutoMonitoringTrustee) ? RequestStatus.InAttesa : site.internalStatus : RequestStatus.InAttesa\r\n sitesInformation.push({\r\n siteInternalId: site.id,\r\n siteId: site.siteId,\r\n fattibilitaPreliminare: site.fattibilita,\r\n dataProntoServicio: site.dataProntoServizo,\r\n propostaCellnex: site.propostaCellnex,\r\n mtComments: site?.mtComments,\r\n status: finalStatus,\r\n internalStatus: finalStatusInternal\r\n });\r\n }\r\n\r\n return [sitesInformation, errors];\r\n }\r\n\r\n const handleContinue = (isDraft: boolean) => {\r\n let errors = [];\r\n for (let [, site] of modifiedItems) {\r\n if (!isDraft && cellnexRequest !== null) {\r\n if (cellnexRequest.status === RequestStatus.NotificaRifiutoMonitoringTrustee && site.status === RequestStatus.Rifiutato) {\r\n errors.push(\"Impossibile inviare siti rifiutati\");\r\n break\r\n }\r\n if (cellnexRequest.status === RequestStatus.IdentificazioneSitiComune && site.internalStatus === RequestStatus.Rifiutato) {\r\n errors.push(\"Impossibile inviare siti rifiutati\");\r\n break\r\n }\r\n }\r\n }\r\n return errors;\r\n }\r\n\r\n const handleSave = async (draft: boolean) => {\r\n\r\n let allowToContinue = handleContinue(draft)\r\n setErrors(allowToContinue);\r\n if (allowToContinue.length > 0) return;\r\n\r\n let [sitesInformation, errors] = validateDate(draft)\r\n //sitesInformation = cleaningSitesStatus(draft, sitesInformation);\r\n\r\n setErrors(errors);\r\n if (errors.length > 0) return;\r\n let status = null;\r\n if (cellnexRequest?.status === RequestStatus.NotificaRifiutoMonitoringTrustee) {\r\n status = RequestStatus.NotificaRifiutoMonitoringTrustee;\r\n }\r\n let comments = cellnexRequest ? cellnexRequest.comments ? [...cellnexRequest.comments] : [] : [];\r\n if (cellnexRequest !== null) {\r\n // if (cellnexRequest.comments !== null) {\r\n // if (cellnexRequest.comments[0]?.user === GroupsText[user.type]) {\r\n // comments = cellnexRequest.comments.slice(1);\r\n // }\r\n // }\r\n // else comments = [...cellnexRequest.comments];\r\n comments = [...cellnexRequest.comments];\r\n if (comment !== \"\" && !draft) {\r\n let commentData = {\r\n user: GroupsText[user.type],\r\n date: new Date().toISOString().split('T')[0],\r\n comment: comment,\r\n //flowStatus: currentStatus,\r\n };\r\n comments = [commentData, ...comments];\r\n }\r\n }\r\n\r\n let requestData = {\r\n draft,\r\n itemId,\r\n sitesInformation,\r\n status,\r\n comments: JSON.stringify(comments),\r\n version: cellnexRequest?.version ? cellnexRequest.version : null,\r\n };\r\n setIsSendingRequest(true);\r\n let response = await createPublishSites(requestData);\r\n if(response.data === APIResponse.AlreadyManaged){\r\n history.push(Routes.AlreadyManage);\r\n return;\r\n }\r\n\r\n\r\n if (onGoBack) onGoBack();\r\n\r\n }\r\n\r\n let navPrevDisabled = paginationHistory.length === 0 ? \"navigation__control--disabled\" : \"\";\r\n let navNextDisabled = sitesList?.nextPagedInfo === null ? \"navigation__control--disabled\" : \"\";\r\n\r\n if (isSendingRequest) return \r\n return (\r\n <>\r\n \r\n {\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {cellnexRequest?.status === RequestStatus.NotificaRifiutoMonitoringTrustee\r\n ?\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n :\r\n \r\n }\r\n \r\n \r\n )\r\n }}\r\n />\r\n
\r\n {/* \r\n */}\r\n \r\n
\r\n\r\n
\r\n {\r\n cellnexRequest?.status === RequestStatus.IdentificazioneSitiComune &&\r\n <>\r\n \r\n \r\n }\r\n {\r\n cellnexRequest?.status === RequestStatus.NotificaRifiutoMonitoringTrustee &&\r\n <>\r\n \r\n\r\n \r\n \r\n }\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n {\r\n errors.length > 0 &&\r\n errors.map(error => {\r\n return \r\n })\r\n }\r\n
\r\n \r\n )\r\n\r\n}\r\n\r\nexport default ListPublishSites;","import React from \"react\";\r\nimport ListPublishSites from \"../components/ListPublishSites\";\r\nimport { HeadTitle } from \"../components/HeadTitle\";\r\nimport { Routes } from \"../const/Routes\";\r\nimport { useHistory, useParams } from \"react-router-dom\";\r\ntype RouteParams = {\r\n id: string;\r\n};\r\n\r\nexport const PublishSitesPage = () => {\r\n\r\n const history = useHistory();\r\n //let id = useHistory().location.state?.toString();\r\n let { id } = useParams();\r\n\r\n const handleOnGoBack = () => {\r\n history.push(Routes.PendingTasks);\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n )\r\n\r\n}","import { Overlay, Popup } from \"@fluentui/react\";\r\nimport { useBoolean } from '@fluentui/react-hooks';\r\nimport React, { useContext, useEffect, useState } from \"react\";\r\nimport DatePicker from \"react-datepicker\";\r\nimport { FileAttachment } from \"../entities/FileAttachment\";\r\nimport { Close, IosShare, VerticalAlignTop, CloudDownload } from \"@mui/icons-material\";\r\nimport { getDataBaseExcel, updateDataBaseExcel } from \"../services/requestService\";\r\nimport { extractExtension, FileExtensions } from \"../const/FileExtensions\";\r\nimport { UploadFile } from \"./UploadFile\";\r\nimport { Button, Checkbox, Dialog, DialogActions, DialogTitle } from \"@mui/material\";\r\nimport { DataBase } from \"../const/Routes\";\r\nimport { toast, ToastContainer } from \"react-toastify\";\r\nimport { Spinner } from \"./Spinner\";\r\nimport { ErrorMessage } from \"./ErrorMessage\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { postRemoveSite } from \"../services/sitesService\";\r\n\r\nexport interface ModalProps {\r\n //selectedSite: string;\r\n showVerificationModal: boolean;\r\n handleAction?: Function;\r\n title: string;\r\n openVerification(showVerification: boolean): void;\r\n}\r\n\r\nexport const ModificationModal = (props: ModalProps) => {\r\n\r\n let { showVerificationModal, title, handleAction, openVerification } = props;\r\n\r\n const [error, setErrors] = useState(\"\");\r\n\r\n return (\r\n <>\r\n {\r\n showVerificationModal &&\r\n \r\n \r\n
\r\n {\r\n \r\n <>\r\n
\r\n

{title}

\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n {\r\n error !== \"\" &&\r\n \r\n }\r\n
\r\n \r\n }\r\n
\r\n \r\n }\r\n \r\n );\r\n};\r\n\r\nfunction setDataBaseFileExtension(arg0: any) {\r\n throw new Error(\"Function not implemented.\");\r\n}\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { useContext, useEffect, useState } from \"react\";\r\nimport { TableColumn } from \"../entities/TableColumn\";\r\nimport { SiteFields, SiteRequestFields } from \"../const/Fields\";\r\nimport { RequestStatus } from \"../const/Status\";\r\nimport { useGetCellnexRequestById } from \"../hooks/useGetCellnexRequestById\";\r\nimport { Table } from \"./Table\";\r\nimport { SiteRequest } from \"../entities/Site\";\r\nimport Comment from \"../entities/Comment\";\r\nimport { MoreInfoData } from \"./MoreInfoData\";\r\nimport PriorityHighIcon from '@mui/icons-material/PriorityHigh';\r\nimport CheckIcon from '@mui/icons-material/Check';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport Comments from \"./Comment\";\r\nimport CommentsHistory from \"./CommentsHistory\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { publishSites, updatePublishSites } from \"../services/cellnexRequestService\";\r\nimport { HeadTitle } from \"./HeadTitle\";\r\nimport { Groups, GroupsText } from \"../const/Groups\";\r\nimport { ErrorMessage } from \"./ErrorMessage\";\r\nimport { StatusDescription } from \"./StatusDescription\";\r\nimport { Spinner } from \"./Spinner\";\r\nimport { DateFormatConverter } from \"../const/DateFormatConverter\";\r\nimport { ModificationModal } from \"./ModificationModal\";\r\n\r\ninterface ListRequestSitesProps {\r\n cellnexRequestId?: string | number;\r\n userType?: string | number;\r\n onGoBack: Function;\r\n}\r\n\r\nconst CellnexRequest = (props: ListRequestSitesProps) => {\r\n\r\n let { cellnexRequestId, onGoBack } = props;\r\n const { user } = useContext(UserContext);\r\n\r\n const [order, setOrderBy] = useState<{ field: string, order: string }>({ field: \"\", order: \"\" });\r\n\r\n let { isFetching, cellnexRequest, refreshData } = useGetCellnexRequestById(cellnexRequestId);\r\n\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [comment, setComment] = useState(\"\");\r\n const [errors, setErrors] = useState([]);\r\n const [selectedItems, setSelectedItems] = useState>(new Set());\r\n const [modifiedItems, setModifiedItems] = useState>(new Map());\r\n const [selectedMoreInfoItem, setSelectedMoreInfoItem] = useState>(new Set());\r\n\r\n const [showVerificationModal, setShowVerificationModal] = useState(false);\r\n const [tableColumns, setTableColumns] = useState([\r\n {\r\n key: SiteRequestFields.Stato,\r\n displayName: \"Stato\",\r\n accessor: \"status\",\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true,\r\n customRender: (item: SiteRequest) => {\r\n let classNames = \"status status--pending\";\r\n let icon = ;\r\n let statusValue = user.type === Groups.REGULATOR ? item.status : item.internalStatus;\r\n if (statusValue === RequestStatus.Approvato) {\r\n classNames = \"status status--approved\";\r\n icon = ;\r\n } else if (statusValue === RequestStatus.Rifiutato) {\r\n classNames = \"status status--rejected\";\r\n icon = ;\r\n }\r\n return {icon} {statusValue}\r\n }\r\n } as TableColumn,\r\n {\r\n key: SiteRequestFields.SiteId,\r\n displayName: \"Site ID\",\r\n accessor: \"siteId\",\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Comune,\r\n displayName: \"Comune\",\r\n accessor: \"comune\",\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true,\r\n customRender: (item: SiteRequest) => {\r\n return item.municipality.comune\r\n },\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Lon,\r\n displayName: \"Coordinate (LON)\",\r\n accessor: \"lon\",\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Lat,\r\n displayName: \"Coordinate (LAT)\",\r\n accessor: \"lat\",\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.PropostaCellnex,\r\n displayName: \"Proposta Cellnex\",\r\n accessor: \"propostaCellnex\",\r\n canOrderBy: false,\r\n show: true,\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Fattibilita,\r\n displayName: \"Fattibilità\",\r\n accessor: \"fattibilita\",\r\n canOrderBy: false,\r\n show: true,\r\n } as TableColumn,\r\n {\r\n key: SiteFields.DataProntoServizio,\r\n displayName: \"Data di pronto servizio\",\r\n accessor: \"dataProntoServizo\",\r\n canOrderBy: false,\r\n show: true,\r\n } as TableColumn\r\n ]);\r\n\r\n const getFilters = () => {\r\n let filters = \"\";\r\n if (order.field !== \"\") filters += `OrderFieldName=${order.field}&OrderAscending=${order.order === \"asc\" ? \"True\" : \"False\"}&`;\r\n return filters;\r\n }\r\n\r\n useEffect(() => {\r\n if (isFetching) return;\r\n let filters = getFilters();\r\n refreshData(filters);\r\n return () => { }\r\n }, [order]);\r\n\r\n useEffect(() => {\r\n if (isFetching) return;\r\n if(cellnexRequest !== null){\r\n if (\r\n cellnexRequest.status === RequestStatus.SitoIdentificatoVerifica ||\r\n cellnexRequest.status === RequestStatus.MTCreazioneSitiPubblicazioneRegistro\r\n ){\r\n cellnexRequest.sites.forEach(site => {\r\n switch(cellnexRequest.status){\r\n case RequestStatus.SitoIdentificatoVerifica:\r\n modifiedItems.set(site.id, site);\r\n break;\r\n case RequestStatus.MTCreazioneSitiPubblicazioneRegistro:\r\n if(site.status === \"Approvato\"){\r\n modifiedItems.set(site.id, site);\r\n }\r\n break;\r\n }\r\n });\r\n setSelectedItems(new Set(selectedItems));\r\n setModifiedItems(new Map(modifiedItems));\r\n setSelectedMoreInfoItem(new Set(selectedMoreInfoItem));\r\n }\r\n }\r\n return () => { }\r\n }, [isFetching]);\r\n\r\n const handleSiteComment = (e, item: any) => {\r\n item.mtComments = e.target.value;\r\n }\r\n\r\n const handleOnOrderBy = (orderInfo: any, columns: TableColumn[]) => {\r\n setTableColumns([...columns]);\r\n setOrderBy(orderInfo);\r\n }\r\n\r\n const handleOnSitesStates = (status: string) => {\r\n for (let id of selectedItems) {\r\n if (status === RequestStatus.Rifiutato) selectedMoreInfoItem.add(id);\r\n let item = modifiedItems.get(id);\r\n if (cellnexRequest.status === RequestStatus.MTCreazioneSitiPubblicazioneRegistro) item.status = status;\r\n else item.internalStatus = status;\r\n }\r\n\r\n setSelectedItems(new Set());\r\n setModifiedItems(new Map(modifiedItems));\r\n }\r\n\r\n const handlePublish = async () => {\r\n setIsLoading(true);\r\n var response = await publishSites(cellnexRequest.id);\r\n onGoBack(response.data);\r\n }\r\n\r\n const validateData = (): [any[], boolean, any[], boolean, boolean] => {\r\n\r\n let allowMT = true;\r\n let allowTech2 = true;\r\n let allSitesApproved = true;\r\n let sites = [];\r\n let errors = [];\r\n\r\n if (\r\n modifiedItems.size === 0 ||\r\n ((cellnexRequest.status === RequestStatus.SitoIdentificatoVerifica || cellnexRequest.status === RequestStatus.MTCreazioneSitiPubblicazioneRegistro) && modifiedItems.size !== cellnexRequest.sites?.length)\r\n ) {\r\n errors.push(\"Devi approvare o rifiutare tutti i siti\");\r\n }\r\n\r\n for (let [, item] of modifiedItems) {\r\n if (\r\n cellnexRequest.status === RequestStatus.SitoIdentificatoVerifica &&\r\n item.internalStatus === RequestStatus.InAttesa\r\n ) {\r\n errors.push(\"Devi approvare o rifiutare tutti i siti\");\r\n break;\r\n }\r\n\r\n if (\r\n cellnexRequest.status === RequestStatus.MTCreazioneSitiPubblicazioneRegistro\r\n ) {\r\n if (item.status === RequestStatus.InAttesa) {\r\n errors.push(\"Devi approvare o rifiutare tutti i siti\");\r\n break;\r\n }\r\n //if (item.status === RequestStatus.Rifiutato && item.mtComments === null) {\r\n //errors.push(\"Devi commentare i siti rifiutati\");\r\n //break;\r\n //}\r\n }\r\n if(cellnexRequest.status === RequestStatus.SitoIdentificatoVerifica && item.internalStatus === RequestStatus.Rifiutato) allowTech2 = false;\r\n if(cellnexRequest.status === RequestStatus.MTCreazioneSitiPubblicazioneRegistro && item.status === RequestStatus.Rifiutato) allowMT = false;\r\n sites.push(item);\r\n if (item.status === RequestStatus.Rifiutato || item.internalStatus === RequestStatus.Rifiutato) allSitesApproved = false;\r\n }\r\n\r\n return [sites, allSitesApproved, errors, allowTech2, allowMT];\r\n }\r\n\r\n const handleSave = async (approved?: boolean) => {\r\n let status = RequestStatus.MTCreazioneSitiPubblicazioneRegistro;\r\n\r\n let [sites, allSitesApproved, errors, allowTech2, allowMT] = validateData();\r\n\r\n if(allSitesApproved === false && cellnexRequest?.status === RequestStatus.MTCreazioneSitiPubblicazioneRegistro && comment === \"\"){\r\n errors.push(\"È obbligatorio aggiungere un commento.\");\r\n }\r\n\r\n setErrors(errors);\r\n if (errors.length > 0) return;\r\n\r\n setIsLoading(true);\r\n\r\n if (!allSitesApproved || (approved !== undefined && !approved)) {\r\n if (cellnexRequest.status === RequestStatus.SitoIdentificatoVerifica && !allowTech2) status = RequestStatus.IdentificazioneSitiComune;\r\n else if (cellnexRequest.status === RequestStatus.MTCreazioneSitiPubblicazioneRegistro && !allowMT) status = RequestStatus.NotificaRifiutoMonitoringTrustee;\r\n } else if (cellnexRequest.status === RequestStatus.MTCreazioneSitiPubblicazioneRegistro && allSitesApproved) status = RequestStatus.PubblicazioneListaMT;\r\n\r\n let comments = [...cellnexRequest.comments];\r\n if (comment !== \"\") {\r\n let commentData = {\r\n user: GroupsText[user.type],\r\n date: new Date().toISOString().split('T')[0],\r\n comment: comment\r\n } as Comment;\r\n comments = [commentData, ...comments];\r\n }\r\n\r\n let data = {\r\n id: cellnexRequest.id,\r\n version: cellnexRequest.version,\r\n status,\r\n comments: JSON.stringify(comments),\r\n sites,\r\n }\r\n\r\n var response = await updatePublishSites(data);\r\n onGoBack(response.data);\r\n }\r\n\r\n const handleSelectAllItems = () => {\r\n for (var item of cellnexRequest?.sites) {\r\n if (!selectedItems.has(item.id)) {\r\n selectedItems.add(item.id);\r\n modifiedItems.set(item.id, item);\r\n }\r\n }\r\n setSelectedItems(new Set(selectedItems));\r\n setModifiedItems(new Map(modifiedItems));\r\n }\r\n\r\n const handleSelectedItems = (item: any) => {\r\n if (selectedItems.has(item.id)) {\r\n modifiedItems.delete(item.id);\r\n selectedItems.delete(item.id);\r\n } else {\r\n selectedItems.add(item.id);\r\n modifiedItems.set(item.id, item);\r\n }\r\n setSelectedItems(new Set(selectedItems));\r\n setModifiedItems(new Map(modifiedItems));\r\n }\r\n\r\n const handleMoreInfo = (item: any) => {\r\n if (selectedMoreInfoItem.has(item.id)) selectedMoreInfoItem.delete(item.id);\r\n else selectedMoreInfoItem.add(item.id);\r\n setSelectedMoreInfoItem(new Set(selectedMoreInfoItem));\r\n }\r\n\r\n const handleComment = (textValue: string) => {\r\n setComment(textValue);\r\n }\r\n\r\n const handleCloseVerficationAndRefresh = (openVerification: boolean) => {\r\n if(!openVerification){\r\n setShowVerificationModal(openVerification);\r\n }\r\n\r\n }\r\n\r\n \r\n const renderButtons = () => {\r\n if (cellnexRequest?.status === RequestStatus.MTCreazioneSitiPubblicazioneRegistro) {\r\n return (\r\n <>\r\n {/* */}\r\n \r\n {\r\n showVerificationModal &&\r\n handleCloseVerficationAndRefresh(openVerification)}\r\n handleAction={() => handleSave()}/>\r\n }\r\n \r\n )\r\n }\r\n if (cellnexRequest?.status === RequestStatus.PubblicazioneListaMT) {\r\n return <>\r\n \r\n {\r\n showVerificationModal &&\r\n handleCloseVerficationAndRefresh(openVerification)}\r\n handleAction={() => handlePublish()}/>\r\n }\r\n \r\n }\r\n if (cellnexRequest?.status === RequestStatus.SitoIdentificatoVerifica) {\r\n return (\r\n <>\r\n {/* */}\r\n \r\n \r\n )\r\n }\r\n }\r\n\r\n let isPublishSitePhase = cellnexRequest?.status === RequestStatus.PubblicazioneListaMT ? true : false;\r\n let isFinished = cellnexRequest?.status === RequestStatus.Approvato ? true : false;\r\n\r\n if (cellnexRequest === null || isLoading) return ;\r\n if(isLoading) return \r\n\r\n if (\r\n (cellnexRequest.status === RequestStatus.IdentificazioneSitiComune && user.type !== Groups.TECHNICAL) ||\r\n cellnexRequest.status === RequestStatus.NotificaRifiutoMonitoringTrustee ||\r\n (cellnexRequest.status === RequestStatus.SitoIdentificatoVerifica && user.type !== Groups.MANAGER) ||\r\n (cellnexRequest.status === RequestStatus.MTCreazioneSitiPubblicazioneRegistro && user.type !== Groups.REGULATOR) ||\r\n (cellnexRequest.status === RequestStatus.PubblicazioneListaMT && user.type !== Groups.MANAGER) ||\r\n (cellnexRequest.status === RequestStatus.Approvato && user.type !== Groups.TECHNICAL)\r\n ) {\r\n return

Al momento, non è possibile visualizzare tale richiesta

\r\n };\r\n\r\n const renderTitle = () => {\r\n if (cellnexRequest !== undefined && cellnexRequest.status === RequestStatus.MTCreazioneSitiPubblicazioneRegistro) return \"Creazione lista siti per la pubblicazione sul Registro di Trasparenza\";\r\n else return cellnexRequest?.status;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n
\r\n \r\n
\r\n {\r\n\r\n let isRejected = (item.status === \"Rifiutato\" || item.internalStatus === \"Rifiutato\") ? true : false;\r\n return (\r\n <>\r\n {\r\n (!isPublishSitePhase || isFinished) &&\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n isRejected && cellnexRequest?.status === RequestStatus.MTCreazioneSitiPubblicazioneRegistro &&\r\n \r\n }\r\n \r\n \r\n )\r\n }}\r\n actionsForSelectedItems={() => {\r\n if ((isFinished || isPublishSitePhase)) {\r\n return null;\r\n }\r\n return (\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n )\r\n }}\r\n />\r\n\r\n
\r\n {\r\n cellnexRequest && (!isFinished && !isPublishSitePhase) &&\r\n \r\n }\r\n \r\n
\r\n
\r\n {renderButtons()}\r\n
\r\n
\r\n {\r\n errors.length > 0 &&\r\n errors.map(error => {\r\n return \r\n })\r\n }\r\n
\r\n \r\n )\r\n\r\n}\r\n\r\nexport default CellnexRequest;","import React, { useEffect, useState } from \"react\";\r\nimport DatePicker from \"react-datepicker\";\r\n\r\n/*\r\nexport interface ClientInfoProps {\r\n item: Client,\r\n basicInfo: boolean,\r\n requestInfo: boolean,\r\n hasPreDesign?: boolean,\r\n}\r\n\r\nexport const ClientInformation = (client: ClientInfoProps) => {\r\n\r\n let { item, basicInfo, requestInfo, hasPreDesign } = client;\r\n\r\n return (\r\n <>\r\n {requestInfo &&\r\n
\r\n
Dettagli dell'applicazione
\r\n

Documento allegato: Richiesta di ospitalitá.xlsx

\r\n

Commenti dell cliente: {item.Comment}

\r\n {hasPreDesign &&\r\n

Preeliminary design: {item.PreDesign}

\r\n }\r\n
\r\n }\r\n\r\n {basicInfo &&\r\n
\r\n
Dati del cliente
\r\n

Acienda: {item.Company}

\r\n

Nome y Cognome: {item.Name} {item.LastName}

\r\n

Email: {item.Email}

\r\n

Telefono: {item.Phone}

\r\n
\r\n }\r\n \r\n )\r\n\r\n}\r\n*/\r\n\r\nexport interface BoxInformationProps {\r\n title: string;\r\n classExtra?: string;\r\n data: Map;\r\n style?: any;\r\n canSelectDate?: boolean;\r\n selectDateTitle?: string;\r\n datePickerKey?: string;\r\n selectedDate?: string;\r\n handleDate?: Function;\r\n}\r\n\r\nexport const BoxInformation = (props: BoxInformationProps) => {\r\n\r\n let { data, title, classExtra, style, canSelectDate, selectDateTitle, datePickerKey, selectedDate, handleDate } = props;\r\n\r\n const [maxDate, setMaxDate] = useState();\r\n\r\n useEffect(() => {\r\n setMaxDate(new Date());\r\n },[]);\r\n\r\n return (\r\n
\r\n
{title}
\r\n {\r\n [...data.keys()].map(function (key, index) {\r\n if(key !== \"\")return (\r\n
{key} {data.get(key)}
\r\n )\r\n })\r\n }\r\n {\r\n canSelectDate &&\r\n
\r\n
{selectDateTitle}
\r\n
{datePickerKey}\r\n \r\n
\r\n
\r\n }\r\n
\r\n )\r\n\r\n}","import React, { ReactNode } from \"react\";\r\n\r\nexport interface BoxComponentProps {\r\n title: string;\r\n children?: ReactNode;\r\n classExtra?: string;\r\n style?: any;\r\n}\r\n\r\nexport const BoxComponent: React.FC = (props: BoxComponentProps) => {\r\n\r\n let { title, children, classExtra, style } = props;\r\n\r\n return (\r\n
\r\n
{title}
\r\n {children}\r\n
\r\n )\r\n\r\n}","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { useContext, useEffect, useState } from \"react\";\r\nimport { BoxInformation } from \"./BoxInformation\";\r\nimport { createRequestSites, publishSitesRequest, selectRequestSite, updateRequest } from \"../services/requestService\";\r\nimport { Request } from \"../entities/Request\";\r\nimport { TableColumn } from \"../entities/TableColumn\";\r\nimport { SiteFields, SiteRequestFields } from \"../const/Fields\";\r\nimport { SiteRequest } from \"../entities/Site\";\r\nimport PriorityHighIcon from '@mui/icons-material/PriorityHigh';\r\nimport CheckIcon from '@mui/icons-material/Check';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport Comment from \"../entities/Comment\";\r\nimport Comments from \"./Comment\";\r\nimport CommentsHistory from \"./CommentsHistory\";\r\nimport { Table } from \"./Table\";\r\nimport { MoreInfoData } from \"./MoreInfoData\";\r\nimport { Dropdown } from \"./Dropdown\";\r\nimport { FattibilitaDropdownFilter, PropostaCellnexDropdownFilter } from \"../const/DropdownFilters\";\r\n//import { DatePicker } from \"./DatePicker\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { RequestStatus } from \"../const/Status\";\r\n//import { CellRequestStatus } from \"../const/Status\";\r\nimport { Download } from \"@mui/icons-material\";\r\nimport { Spinner } from \"./Spinner\";\r\nimport { ErrorMessage } from \"./ErrorMessage\";\r\nimport { Groups, GroupsText } from \"../const/Groups\";\r\nimport DatePicker from \"react-datepicker\";\r\nimport \"react-datepicker/dist/react-datepicker.css\";\r\nimport { DateFormatConverter, DateFormatConverterReverse } from \"../const/DateFormatConverter\";\r\nimport { ClientComment, FormComentary } from \"./Commentary\";\r\nimport { BoxComponent } from \"./BoxComponent\";\r\nimport { UploadFile } from \"./UploadFile\";\r\nimport { FileAttachment } from \"../entities/FileAttachment\";\r\nimport Close from \"@mui/icons-material/Close\";\r\nimport { ModificationModal } from \"./ModificationModal\";\r\n\r\ninterface MunicipalityPhaseProps {\r\n requestItem: Request;\r\n onGoBack: Function;\r\n}\r\n\r\nexport const MunicipalityPhase = (props: MunicipalityPhaseProps) => {\r\n\r\n let { requestItem, onGoBack } = props;\r\n const { user } = useContext(UserContext);\r\n\r\n const [sendingData, setSendingData] = useState(false);\r\n const [errors, setErrors] = useState([]);\r\n const [comment, setComment] = useState(\"\");\r\n const [selectedItems, setSelectedItems] = useState>(new Set());\r\n const [modifiedItems, setModifiedItems] = useState>(new Map());\r\n const [selectedMoreInfoItem, setSelectedMoreInfoItem] = useState>(new Set());\r\n const [files, setFiles] = useState([]);\r\n const [clientRequest,] = useState(requestItem);\r\n const [showVerificationModal, setShowVerificationModal] = useState(false);\r\n const [modalTitle, setModalTitle] = useState(\"\");\r\n\r\n const handleCloseVerficationAndRefresh = (openVerification: boolean) => {\r\n if(!openVerification){\r\n setShowVerificationModal(openVerification);\r\n }\r\n\r\n }\r\n\r\n const [tableColumns, setTableColumns] = useState([\r\n {\r\n key: SiteRequestFields.Stato,\r\n displayName: \"Stato\",\r\n accessor: \"status\",\r\n canOrderBy: false,\r\n order: \"desc\",\r\n show: false,\r\n customRender: (item: SiteRequest) => {\r\n //if(clientRequest.stato === RequestStatus.RifiutoMonitoringTrustee && item.status !== \"Approvato\" && item.status !== \"Rifiutato\") return \"\";\r\n let classNames;\r\n let icon;\r\n if (item.status === \"Approvato\") {\r\n classNames = \"status status--approved\";\r\n icon = ;\r\n } if (item.status === \"Rifiutato\") {\r\n classNames = \"status status--rejected\";\r\n icon = ;\r\n } if (item.status === RequestStatus.InAttesa) {\r\n classNames = \"status status--pending\";\r\n icon = ;\r\n }\r\n\r\n return {icon} {item.status}\r\n }\r\n } as TableColumn,\r\n {\r\n key: SiteRequestFields.SiteId,\r\n displayName: \"Sito ID\",\r\n accessor: \"siteId\",\r\n canOrderBy: false,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Comune,\r\n displayName: \"Comune\",\r\n accessor: \"comune\",\r\n canOrderBy: false,\r\n order: \"desc\",\r\n show: false,\r\n customRender: (item: SiteRequest) => {\r\n return item.municipality.comune\r\n },\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Lon,\r\n displayName: \"Coordinate (LON)\",\r\n accessor: \"lon\",\r\n canOrderBy: false,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Lat,\r\n displayName: \"Coordinate (LAT)\",\r\n accessor: \"lat\",\r\n canOrderBy: false,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.PropostaCellnex,\r\n displayName: \"Proposta Cellnex\",\r\n accessor: \"propostaCellnex\",\r\n canOrderBy: false,\r\n show: true,\r\n showOnSelect: true,\r\n customRender: (item: SiteRequest, mapSelectedItems: Map) => {\r\n let seletedItemLocal = mapSelectedItems.get(item.id);\r\n if (clientRequest.stato === RequestStatus.RifiutoMonitoringTrustee && item.status === \"Approvato\") {\r\n return item.propostaCellnex;\r\n }\r\n return (\r\n handlePropostaChanges(option, seletedItemLocal ? seletedItemLocal : item)}\r\n />\r\n )\r\n }\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Fattibilita,\r\n displayName: \"Fattibilità\",\r\n accessor: \"fattibilita\",\r\n canOrderBy: false,\r\n show: true,\r\n showOnSelect: true,\r\n customRender: (item: SiteRequest, mapSelectedItems: Map) => {\r\n let seletedItemLocal = mapSelectedItems.get(item.id);\r\n if (clientRequest.stato === RequestStatus.RifiutoMonitoringTrustee && item.status === \"Approvato\") {\r\n return item.fattibilita;\r\n }\r\n return (\r\n handleSiteChanges(option, seletedItemLocal ? seletedItemLocal : item)}\r\n />\r\n )\r\n }\r\n } as TableColumn,\r\n {\r\n key: SiteFields.DataProntoServizio,\r\n displayName: \"Data di pronto servizio\",\r\n accessor: \"dataProntoServizo\",\r\n canOrderBy: false,\r\n show: true,\r\n showOnSelect: true,\r\n customRender: (item: SiteRequest, mapSelectedItems: Map) => {\r\n let seletedItemLocal = mapSelectedItems.get(item.id);\r\n if (item.dataProntoServizo.includes(\"/\")) item.dataProntoServizo = DateFormatConverterReverse(item.dataProntoServizo);\r\n if (seletedItemLocal.dataProntoServizo.includes(\"/\")) seletedItemLocal.dataProntoServizo = DateFormatConverterReverse(seletedItemLocal.dataProntoServizo);\r\n if (clientRequest.stato === RequestStatus.RifiutoMonitoringTrustee && item.status === \"Approvato\") {\r\n return item.dataProntoServizo;\r\n }\r\n return (\r\n handleToDate(e, seletedItemLocal ? seletedItemLocal : item)}\r\n selected={seletedItemLocal ? new Date(seletedItemLocal.dataProntoServizo) : item.dataProntoServizo ? new Date(item.dataProntoServizo) : new Date(null)}\r\n className={'basicDate basicDate--noSeparated'}\r\n dateFormat=\"dd/MM/yyyy\"\r\n placeholderText=\"dd/mm/yyyy\"\r\n />\r\n )\r\n }\r\n } as TableColumn\r\n ]);\r\n\r\n useEffect(() => {\r\n if (\r\n clientRequest.stato === RequestStatus.AttesaPubblicazioneSitiRichiesti ||\r\n clientRequest.stato === RequestStatus.SelezionaSitoPubblicato ||\r\n clientRequest.stato === RequestStatus.AttesaMT\r\n ) {\r\n let dateCol = tableColumns.find(col => col.key === SiteFields.DataProntoServizio);\r\n if (dateCol !== null) {\r\n dateCol.showOnSelect = false;\r\n dateCol.customRender = undefined;\r\n }\r\n\r\n dateCol = tableColumns.find(col => col.key === SiteFields.Fattibilita);\r\n if (dateCol !== null) {\r\n dateCol.showOnSelect = false;\r\n dateCol.customRender = undefined;\r\n }\r\n\r\n dateCol = tableColumns.find(col => col.key === SiteFields.PropostaCellnex);\r\n if (dateCol !== null) {\r\n dateCol.showOnSelect = false;\r\n dateCol.customRender = undefined;\r\n }\r\n\r\n setTableColumns([...tableColumns]);\r\n }\r\n\r\n if (\r\n clientRequest.stato === RequestStatus.AttesaMT ||\r\n clientRequest.stato === RequestStatus.RifiutoMonitoringTrustee\r\n ) {\r\n\r\n let dateCol = tableColumns.find(col => col.key === SiteRequestFields.Stato);\r\n if (dateCol !== null) {\r\n dateCol.show = true;\r\n }\r\n\r\n setTableColumns([...tableColumns]);\r\n }\r\n if (\r\n clientRequest.stato === RequestStatus.AttesaListaSiti ||\r\n clientRequest.stato === RequestStatus.RifiutoMonitoringTrustee ||\r\n clientRequest.stato === RequestStatus.AttesaMT\r\n ) {\r\n clientRequest.sites.forEach(site => {\r\n switch (clientRequest.stato) {\r\n case RequestStatus.RifiutoMonitoringTrustee:\r\n case RequestStatus.AttesaListaSiti:\r\n if (site.selectedByTech1 === true) {\r\n selectedItems.add(site.id);\r\n modifiedItems.set(site.id, site);\r\n if (site.status === \"Rifiutato\") {\r\n selectedMoreInfoItem.add(site.id);\r\n }\r\n }\r\n break;\r\n case RequestStatus.AttesaMT:\r\n if (site.status === \"Approvato\") {\r\n modifiedItems.set(site.id, site);\r\n }\r\n break;\r\n }\r\n });\r\n setSelectedItems(new Set(selectedItems));\r\n setModifiedItems(new Map(modifiedItems));\r\n setSelectedMoreInfoItem(new Set(selectedMoreInfoItem));\r\n }\r\n }, []);\r\n\r\n const handlePropostaChanges = (option: string, item: SiteRequest) => {\r\n item.propostaCellnex = option;\r\n if (item.status !== undefined && item.status !== null && item.status === RequestStatus.Rifiutato) item.status = RequestStatus.InAttesa;\r\n setSelectedItems(preValue => new Set(preValue));\r\n }\r\n\r\n const handleSiteChanges = (option: string, item: SiteRequest) => {\r\n item.fattibilita = option;\r\n if (item.status !== undefined && item.status !== null && item.status === RequestStatus.Rifiutato) item.status = RequestStatus.InAttesa;\r\n setSelectedItems(preValue => new Set(preValue));\r\n }\r\n\r\n const handleToDate = (value: string, item: SiteRequest) => {\r\n item.dataProntoServizo = new Date(value).toISOString().split(\"T\")[0];\r\n if (item.status !== undefined && item.status !== null && item.status === RequestStatus.Rifiutato) item.status = RequestStatus.InAttesa;\r\n // fix para refrescar la tabla\r\n setSelectedItems(preValue => new Set(preValue));\r\n }\r\n\r\n const handlerFile = (file: FileAttachment) => {\r\n setFiles([file]);\r\n }\r\n\r\n const handleDeleteFile = (fileName: string) => {\r\n let newFiles = files.filter(f => f.fileName !== fileName);\r\n setFiles(newFiles);\r\n }\r\n\r\n const handleOnSitesStates = (status: string) => {\r\n for (let id of selectedItems) {\r\n if (status === \"Rifiutato\") selectedMoreInfoItem.add(id);\r\n let item = modifiedItems.get(id);\r\n item.status = status;\r\n }\r\n\r\n setSelectedItems(new Set());\r\n setModifiedItems(new Map(modifiedItems));\r\n }\r\n\r\n const handleSelectAllItems = () => {\r\n for (var item of clientRequest?.sites) {\r\n if (!selectedItems.has(item.id)) {\r\n selectedItems.add(item.id);\r\n modifiedItems.set(item.id, item);\r\n }\r\n }\r\n setSelectedItems(new Set(selectedItems));\r\n setModifiedItems(new Map(modifiedItems));\r\n }\r\n\r\n const handleSelectedItems = (item: any) => {\r\n if (selectedItems.has(item.id)) {\r\n if (clientRequest.stato === RequestStatus.RifiutoMonitoringTrustee && item.status === \"Approvato\") return;\r\n modifiedItems.delete(item.id);\r\n selectedItems.delete(item.id);\r\n } else {\r\n selectedItems.add(item.id);\r\n modifiedItems.set(item.id, item);\r\n }\r\n setSelectedItems(new Set(selectedItems));\r\n setModifiedItems(new Map(modifiedItems));\r\n }\r\n\r\n const handleMoreInfo = (item: any) => {\r\n if (selectedMoreInfoItem.has(item.id)) selectedMoreInfoItem.delete(item.id);\r\n else selectedMoreInfoItem.add(item.id);\r\n setSelectedMoreInfoItem(new Set(selectedMoreInfoItem));\r\n }\r\n\r\n const handleComment = (textValue: string) => {\r\n setComment(textValue);\r\n }\r\n\r\n const handleContinue = (isDraft: boolean) => {\r\n let errors = [];\r\n for (let [, site] of modifiedItems) {\r\n if (isDraft && requestItem !== null) {\r\n if (requestItem.stato === RequestStatus.RifiutoMonitoringTrustee && site.status === RequestStatus.Rifiutato) {\r\n errors.push(\"Impossibile inviare siti rifiutati\");\r\n break\r\n }\r\n }\r\n }\r\n return errors;\r\n }\r\n\r\n const validateData = (approved: boolean): [any[], boolean, any[]] => {\r\n\r\n let allSitesApproved = true;\r\n let sitesInformation = [];\r\n let errors = [];\r\n\r\n if (approved === false) return [sitesInformation, allSitesApproved, errors];\r\n\r\n if (modifiedItems.size === 0) {\r\n errors.push(\"Devi selezionare almeno un elemento\");\r\n } else if (clientRequest.stato === RequestStatus.AttesaMT && modifiedItems.size !== clientRequest.sites?.length) {\r\n errors.push(\"Devi approvare o rifiutare tutti i siti\");\r\n }\r\n\r\n for (let [, site] of modifiedItems) {\r\n\r\n if (\r\n (clientRequest.stato === RequestStatus.VerificaRichiesta || clientRequest.stato === RequestStatus.AttesaListaSiti) &&\r\n (site.fattibilita === null || site.fattibilita === \"\" || site.dataProntoServizo === null)\r\n ) {\r\n errors.push(\"Devi inserire i valori Fattibilità e Data di pronto servizio di tutti gli elementi selezionati\");\r\n break;\r\n }\r\n\r\n if (clientRequest.stato === RequestStatus.AttesaMT) {\r\n if (site.status === RequestStatus.InAttesa) {\r\n errors.push(\"Devi approvare o rifiutare tutti i siti\");\r\n break;\r\n }\r\n if (site.status === RequestStatus.Rifiutato && site.mtComments === null) {\r\n errors.push(\"Devi commentare i siti rifiutati\");\r\n break;\r\n }\r\n }\r\n if (site.status === \"Rifiutato\") allSitesApproved = false;\r\n\r\n sitesInformation.push({\r\n siteInternalId: site.id,\r\n siteId: site.siteId,\r\n internalSiteRequestId: site.internalSiteRequestId,\r\n fattibilitaPreliminare: site.fattibilita,\r\n dataProntoServicio: site.dataProntoServizo,\r\n propostaCellnex: site.propostaCellnex,\r\n status: site.status,\r\n technicalComments: site.technicalComments,\r\n mtComments: site.mtComments,\r\n managerComments: site.managerComments\r\n })\r\n };\r\n\r\n return [sitesInformation, allSitesApproved, errors];\r\n }\r\n\r\n const handleReject = async (approved?: boolean) => {\r\n\r\n if(comment === \"\"){\r\n setErrors([\"È obbligatorio aggiungere un commento.\"]);\r\n return;\r\n }\r\n let comments = [...clientRequest.comments];\r\n if (comment !== \"\") {\r\n let commentData = {\r\n user: GroupsText[user.type],\r\n date: new Date().toISOString().split('T')[0],\r\n role: GroupsText[user.type],\r\n comment: comment\r\n } as Comment;\r\n comments = [commentData, ...comments];\r\n }\r\n setSendingData(true);\r\n let requestData: any = {\r\n id: clientRequest.id,\r\n version: clientRequest.version,\r\n status: RequestStatus.Rifiutato,\r\n sitesInformation: [],\r\n comments: JSON.stringify(comments),\r\n }\r\n var response = await updateRequest(requestData);\r\n onGoBack(response.data);\r\n }\r\n\r\n const handleSave = async (approved?: boolean) => {\r\n\r\n if(clientRequest.stato === RequestStatus.VerificaRichiesta && !approved && comment === \"\"){\r\n setErrors([\"È obbligatorio aggiungere un commento.\"]);\r\n return;\r\n }\r\n\r\n let allowToContinue = handleContinue(approved)\r\n setErrors(allowToContinue);\r\n if (allowToContinue.length > 0) return;\r\n\r\n setSendingData(true);\r\n let [sitesInformation, allSitesApproved, errors] = validateData(approved);\r\n\r\n setErrors(errors);\r\n if (errors.length > 0) {\r\n setSendingData(false);\r\n return;\r\n }\r\n\r\n let comments = [...clientRequest.comments];\r\n if (comment !== \"\") {\r\n let commentData = {\r\n user: GroupsText[user.type],\r\n date: new Date().toISOString().split('T')[0],\r\n role: GroupsText[user.type],\r\n comment: comment\r\n } as Comment;\r\n comments = [commentData, ...comments];\r\n }\r\n\r\n let status = \"\";\r\n if (clientRequest.stato === RequestStatus.VerificaRichiesta) {\r\n if (approved) status = RequestStatus.AttesaListaSiti;\r\n else status = RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica;\r\n } else if (clientRequest.stato === RequestStatus.AttesaListaSiti) {\r\n if (approved) status = RequestStatus.AttesaMT;\r\n else status = RequestStatus.Rifiutato;\r\n } else if (clientRequest.stato === RequestStatus.AttesaMT) {\r\n if (allSitesApproved) status = RequestStatus.AttesaPubblicazioneSitiRichiesti;\r\n else status = RequestStatus.RifiutoMonitoringTrustee;\r\n } else if (clientRequest.stato === RequestStatus.RifiutoMonitoringTrustee) {\r\n status = RequestStatus.AttesaMT;\r\n }\r\n\r\n var response = null; \r\n if (clientRequest.stato === RequestStatus.AttesaMT) {\r\n let requestData: any = {\r\n id: clientRequest.id,\r\n version: clientRequest.version,\r\n status,\r\n comments: JSON.stringify(comments),\r\n sitesInformation\r\n }\r\n response = await updateRequest(requestData);\r\n } else {\r\n let requestData: any = {\r\n version: clientRequest.version,\r\n status,\r\n comments: JSON.stringify(comments),\r\n sitesInformation\r\n }\r\n response = await createRequestSites(clientRequest.id, requestData);\r\n }\r\n onGoBack(response.data);\r\n }\r\n\r\n const handleSelectSite = async () => {\r\n setSendingData(true);\r\n if (modifiedItems.size === 0 || modifiedItems.size > 1) {\r\n setErrors([\"Devi selezionare un elemento\"]);\r\n setSendingData(false);\r\n return;\r\n }\r\n\r\n let commentData: Comment = null;\r\n if (comment !== \"\") {\r\n commentData = {\r\n user: GroupsText[user.type],\r\n date: new Date().toISOString().split('T')[0],\r\n role: GroupsText[user.type],\r\n comment: comment\r\n } as Comment;\r\n }\r\n var finalCommentData = commentData !== null ? JSON.stringify([commentData]) : JSON.stringify([])\r\n\r\n let data = {\r\n comment: finalCommentData,\r\n fileName: null,\r\n fileContent: null\r\n }\r\n\r\n if (files.length > 0) {\r\n data.fileName = files[0].fileName;\r\n data.fileContent = files[0].fileContent;\r\n }\r\n\r\n let selectedSite: SiteRequest = modifiedItems.values().next().value;\r\n await selectRequestSite(clientRequest.id, selectedSite.id, data);\r\n onGoBack();\r\n }\r\n\r\n const handlePublish = async () => {\r\n setSendingData(true);\r\n var response = await publishSitesRequest(clientRequest.id);\r\n onGoBack(response.data);\r\n }\r\n\r\n const renderButtons = () => {\r\n if (\r\n clientRequest.stato === RequestStatus.VerificaRichiesta\r\n ) {\r\n return (\r\n <>\r\n \r\n \r\n \r\n )\r\n }\r\n if (\r\n clientRequest.stato === RequestStatus.AttesaMT\r\n ) {\r\n return (\r\n <>\r\n \r\n \r\n {\r\n showVerificationModal &&\r\n handleCloseVerficationAndRefresh(openVerification)}\r\n handleAction={() => handleSave(true)}/>\r\n }\r\n \r\n )\r\n }\r\n if (\r\n clientRequest.stato === RequestStatus.AttesaListaSiti\r\n ) {\r\n return (\r\n <>\r\n \r\n \r\n )\r\n }\r\n if (\r\n clientRequest.stato === RequestStatus.RifiutoMonitoringTrustee\r\n ) {\r\n return (\r\n <>\r\n \r\n \r\n )\r\n }\r\n if (clientRequest.stato === RequestStatus.AttesaPubblicazioneSitiRichiesti) {\r\n return (\r\n <>\r\n \r\n {\r\n showVerificationModal &&\r\n handleCloseVerficationAndRefresh(openVerification)}\r\n handleAction={() => handlePublish()}/>\r\n }\r\n \r\n )\r\n }\r\n if (clientRequest.stato === RequestStatus.SelezionaSitoPubblicato) {\r\n return (\r\n <>\r\n \r\n \r\n )\r\n }\r\n }\r\n\r\n const handleSiteComment = (e, item: SiteRequest) => {\r\n item.mtComments = e.target.value;\r\n }\r\n\r\n let canSelectItems = clientRequest.stato !== RequestStatus.AttesaPubblicazioneSitiRichiesti ? true : false;\r\n let canPostComment = clientRequest.stato !== RequestStatus.AttesaPubblicazioneSitiRichiesti ? true : false;\r\n let canViewComments = clientRequest.stato !== RequestStatus.SelezionaSitoPubblicato ? true : false;\r\n\r\n if (sendingData) return \r\n return (\r\n <>\r\n
\r\n {\r\n user.type !== Groups.REGULATOR &&\r\n ([\r\n [\"Documento allegato:\", Download ],\r\n [\"Comune selezionato:\", clientRequest.municipality.comune],\r\n [\"Data di richiesta:\", DateFormatConverter(clientRequest.dataRequesta)],\r\n clientRequest.stato !== RequestStatus.AttesaMT ? [\"Commenti del Cliente:\", clientRequest.comment] : [\"\", \"\"]\r\n ])}\r\n style={{ 'height': 'auto' }}\r\n />\r\n }\r\n {\r\n clientRequest.stato === RequestStatus.SelezionaSitoPubblicato &&\r\n \r\n
\r\n \r\n {\r\n files.map(file => {\r\n return (\r\n
\r\n {file.fileName}\r\n
\r\n )\r\n })\r\n }\r\n
\r\n \r\n }\r\n {\r\n clientRequest.stato !== RequestStatus.SelezionaSitoPubblicato &&\r\n clientRequest.stato !== RequestStatus.AttesaMT &&\r\n ([\r\n [\"Parte richiedente:\", clientRequest.client.agency],\r\n [\"Nome contatto:\", clientRequest.client.name],\r\n [\"Cognome contatto:\", clientRequest.client.surname],\r\n [\"Email:\", clientRequest.client.email],\r\n [\"Telefono:\", clientRequest.client.phone]\r\n ])}\r\n />\r\n }\r\n
\r\n\r\n
\r\n

Siti del comune richiesto: {clientRequest.municipality.comune}, {clientRequest.municipality.province}, {clientRequest.municipality.region}

\r\n
\r\n\r\n
\r\n {\r\n\r\n let isRejected = item.status === \"Rifiutato\" ? true : false;\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n isRejected && clientRequest.stato !== RequestStatus.RifiutoMonitoringTrustee &&\r\n \r\n }\r\n {\r\n clientRequest.stato === RequestStatus.RifiutoMonitoringTrustee && item.mtComments !== null &&\r\n \r\n }\r\n \r\n \r\n )\r\n }}\r\n actionsForSelectedItems={() => {\r\n if (clientRequest.stato !== RequestStatus.AttesaMT) {\r\n return null;\r\n }\r\n return (\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n )\r\n }}\r\n />\r\n\r\n
\r\n {\r\n canPostComment &&\r\n \r\n }\r\n {\r\n canViewComments &&\r\n \r\n }\r\n
\r\n
\r\n {renderButtons()}\r\n
\r\n
\r\n {\r\n errors.length > 0 &&\r\n errors.map(error => {\r\n return \r\n })\r\n }\r\n
\r\n
\r\n \r\n )\r\n}","export const FileExtensions : {[key: string]: string} = {\r\n \"pdf\": \"data:application/pdf;base64\",\r\n \"xlsx\": \"data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64\",\r\n \"xls\" : \"data:application/vnd.ms-excel;base64\",\r\n \"doc\": \"data:application/msword;base64\",\r\n \"docx\": \"data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64\",\r\n \"zip\": \"data:application/zip;base64\",\r\n \"rar\": \"data:application/x-rar-compressed;base64\",\r\n}\r\n\r\nexport const extractExtension = (fileName: string) => {\r\n var separateString: string[] = fileName.split(\".\");\r\n return separateString[separateString.length - 1];\r\n}\r\n\r\nexport const deleteNumbers = (fileName: string) => {\r\n var separateString: string[] = fileName.split(\"_\");\r\n if(separateString.length === 1) return separateString[0];\r\n separateString.splice(0, 1);\r\n return separateString.join(\"_\");\r\n}","export const AreaSplitTitle = {\r\n ClientArea: \"Area Clienti\",\r\n TechnicalArea: \"Informazioni\"\r\n}","import { useContext, useState } from \"react\";\r\nimport { BoxInformation } from \"./BoxInformation\";\r\nimport { BoxComponent } from \"./BoxComponent\";\r\nimport { Request } from \"../entities/Request\";\r\nimport Comments from \"./Comment\";\r\nimport Comment from \"../entities/Comment\";\r\nimport CommentsHistory from \"./CommentsHistory\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { RequestStatus } from \"../const/Status\";\r\nimport { Close, Download } from \"@mui/icons-material\";\r\nimport { ErrorMessage } from \"./ErrorMessage\";\r\nimport { UploadFile } from \"./UploadFile\";\r\nimport { updateSiteRequestStatus } from \"../services/requestService\";\r\nimport { Groups, GroupsText } from \"../const/Groups\";\r\nimport { FileAttachment } from \"../entities/FileAttachment\";\r\nimport { Spinner } from \"./Spinner\";\r\nimport { DateFormatConverter } from \"../const/DateFormatConverter\";\r\nimport { FileExtensions } from \"../const/FileExtensions\";\r\nimport { AreaSplitTitle } from \"../const/AreaSplitTitle\";\r\nimport { ModificationModal } from \"./ModificationModal\";\r\n\r\ninterface SitePhaseProps {\r\n requestItem: Request;\r\n onGoBack: Function;\r\n}\r\n\r\nexport const SitePhase = (props: SitePhaseProps) => {\r\n\r\n let { requestItem, onGoBack } = props;\r\n const { user } = useContext(UserContext);\r\n\r\n const [sendingData, setSendingData] = useState(false);\r\n const [errors, setErrors] = useState([]);\r\n const [comment, setComment] = useState(\"\");\r\n const [files, setFiles] = useState([]);\r\n const [feedBackFiles, setFeedBackFiles] = useState([]);\r\n const [clientRequest,] = useState(requestItem);\r\n const [showVerificationModal, setShowVerificationModal] = useState(\"\");\r\n const [title, setTitle] = useState(\"\");\r\n\r\n const handleComment = (textValue: string) => {\r\n setComment(textValue);\r\n }\r\n\r\n const handlerFile = (file: FileAttachment) => {\r\n var newFile: FileAttachment[] = [];\r\n newFile.push(file);\r\n setFiles([...newFile])\r\n }\r\n\r\n const handleDeleteFile = (fileName: string) => {\r\n let newFiles = files.filter(f => f.fileName !== fileName);\r\n setFiles(newFiles);\r\n }\r\n\r\n const handlerFeedbackFile = (feedbackFile: FileAttachment) => {\r\n setFeedBackFiles(prevFiles => [...prevFiles, feedbackFile]);\r\n }\r\n\r\n const handleDeleteFeedbackFile = (feedbackFileName: string) => {\r\n let newFiles = feedBackFiles.filter(f => f.fileName !== feedbackFileName);\r\n setFeedBackFiles(newFiles);\r\n }\r\n\r\n const getComments = (): Comment[] => {\r\n let comments = [...clientRequest.comments];\r\n if (comment !== \"\") {\r\n let commentData = {\r\n user: GroupsText[user.type],\r\n date: new Date().toISOString().split('T')[0],\r\n role: GroupsText[user.type],\r\n comment: comment\r\n } as Comment;\r\n comments = [commentData, ...comments];\r\n }\r\n return comments;\r\n }\r\n\r\n const sendData = async (data: any, action?: string) => {\r\n setSendingData(true);\r\n var response = await updateSiteRequestStatus(clientRequest.id, data);\r\n onGoBack(action === \"returnfeedback\" ? action : response.data);\r\n }\r\n\r\n const handleSetTitle = (action: string) => {\r\n switch (action) {\r\n case \"revisione\":\r\n setTitle(\"Sei sicuro di voler inviare una richiesta di revisione al Cliente ?\");\r\n break;\r\n case \"feedback\":\r\n setTitle(\"Sei sicuro di voler inviare le informazioni al Cliente ?\");\r\n break;\r\n case \"PrefattibiltaKO\":\r\n setTitle(\"Sei sicuro di rifiutare questa richiesta\");\r\n break;\r\n case \"noncompleta\":\r\n case \"returnfeedback\":\r\n break;\r\n default:\r\n setTitle(\"Sei sicuro di voler inviare la richiesta di spazio a W3 ?\");\r\n break;\r\n }\r\n setShowVerificationModal(action);\r\n }\r\n\r\n const handleSave = async (action: string) => {\r\n let status;\r\n switch (action) {\r\n case \"revisione\":\r\n status = RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica;\r\n break;\r\n case \"feedback\":\r\n status = RequestStatus.FeedbackInformazioniAggiuntive;\r\n break;\r\n case \"PrefattibiltaKO\":\r\n status = RequestStatus.PrefattibiltaKO;\r\n break;\r\n case \"noncompleta\":\r\n case \"returnfeedback\":\r\n status = RequestStatus.RevisioneRichiestaAccettabile;\r\n break;\r\n default:\r\n status = RequestStatus.ProcessoParallelo;\r\n break;\r\n }\r\n\r\n if (files.length === 0 && action !== \"revisione\" && action !== \"returnfeedback\" && action !== \"send\" && action !== \"feedback\" && action !== \"PrefattibiltaKO\") {\r\n setShowVerificationModal(\"\")\r\n setErrors([\"È necessario selezionare un file\"]);\r\n return;\r\n }\r\n if (files.length === 0 && action === \"send\") {\r\n\r\n setShowVerificationModal(\"\")\r\n setErrors([\"È necessario selezionare un file\"]);\r\n\r\n return;\r\n }\r\n if (feedBackFiles.length !== 0 && files.length !== 0) {\r\n setShowVerificationModal(\"\")\r\n if (action === \"send\") setErrors([\"È possibile inviare solo file per un Offerta di Spazio Riservato\"]);\r\n if (action === \"feedback\") setErrors([\"È possibile inviare solo file per un Feedback\"]);\r\n return;\r\n }\r\n\r\n\r\n if (feedBackFiles.length === 0 && action === \"feedback\") {\r\n setShowVerificationModal(\"\")\r\n setErrors([\"È necessario selezionare un file\"]);\r\n return;\r\n }\r\n\r\n if ((status === RequestStatus.FeedbackInformazioniAggiuntive || status === RequestStatus.RevisioneRichiestaAccettabile || status === RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica || status === RequestStatus.PrefattibiltaKO) && comment === \"\") {\r\n setShowVerificationModal(\"\")\r\n setErrors([\"È obbligatorio aggiungere un commento.\"]);\r\n return;\r\n }\r\n\r\n let addFiles = false;\r\n if (status === RequestStatus.ProcessoParallelo || status === RequestStatus.RevisioneRichiestaAccettabile || status === RequestStatus.FeedbackInformazioniAggiuntive) {\r\n addFiles = true;\r\n setShowVerificationModal(\"\")\r\n }\r\n\r\n let data = {\r\n version: clientRequest.version,\r\n files: addFiles ? status === RequestStatus.FeedbackInformazioniAggiuntive ? feedBackFiles : files : [],\r\n status,\r\n comments: comment !== \"\" ? JSON.stringify(getComments()) : null\r\n }\r\n await sendData(data, action);\r\n }\r\n\r\n const handleW3Save = async (approved: boolean) => {\r\n\r\n let data = {\r\n version: clientRequest.version,\r\n approvedW3: approved,\r\n comments: JSON.stringify(getComments())\r\n }\r\n\r\n await sendData(data);\r\n }\r\n\r\n const handleTechSave = async (approved: boolean) => {\r\n\r\n if (!approved && comment === \"\") {\r\n setErrors([\"È obbligatorio aggiungere un commento.\"]);\r\n return;\r\n }\r\n\r\n let data = {\r\n version: clientRequest.version,\r\n files,\r\n approvedTech: approved,\r\n comments: JSON.stringify(getComments())\r\n }\r\n\r\n await sendData(data);\r\n }\r\n\r\n const handleCloseVerficationAndRefresh = (openVerification: boolean) => {\r\n if (!openVerification) {\r\n setShowVerificationModal(\"\");\r\n }\r\n\r\n }\r\n\r\n const handleVerification = () => {\r\n return clientRequest.wasStopped;\r\n }\r\n\r\n\r\n\r\n const renderButtons = () => {\r\n if (\r\n clientRequest.stato === RequestStatus.RevisioneRichiestaAccettabile\r\n ) {\r\n return (\r\n <>\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n {\r\n showVerificationModal !== \"\" &&\r\n handleCloseVerficationAndRefresh(openVerification)}\r\n handleAction={() => handleSave(showVerificationModal)} />\r\n }\r\n \r\n )\r\n }\r\n if (\r\n clientRequest.stato === RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica\r\n ) {\r\n return (\r\n <>\r\n \r\n \r\n )\r\n }\r\n if (\r\n clientRequest.stato === RequestStatus.FeedbackInformazioniAggiuntive\r\n ) {\r\n return (\r\n <>\r\n \r\n \r\n )\r\n }\r\n if (\r\n clientRequest.stato === RequestStatus.ProcessoParallelo && user.type === Groups.SUPPLIER\r\n ) {\r\n return (\r\n <>\r\n \r\n \r\n \r\n )\r\n }\r\n if (\r\n clientRequest.stato === RequestStatus.ProcessoParallelo && user.type === Groups.TECHNICAL\r\n ) {\r\n return (\r\n <>\r\n \r\n \r\n \r\n )\r\n }\r\n }\r\n\r\n const extractExtension = (fileName: string) => {\r\n var separateString: string[] = fileName.split(\".\");\r\n return separateString[separateString.length - 1];\r\n }\r\n\r\n const deleteNumbers = (fileName: string) => {\r\n var separateString: string[] = fileName.split(\"_\");\r\n var finalName = \"\";\r\n separateString.splice(0, 1);\r\n return separateString.join(\"_\");\r\n\r\n\r\n }\r\n\r\n\r\n let canPostComment = true;\r\n let canViewComments = clientRequest.stato === RequestStatus.ProcessoParallelo && user.type === Groups.SUPPLIER ? false : true;\r\n let canUploadMultipleFiles = clientRequest.stato !== RequestStatus.ProcessoParallelo ? false : true;\r\n let boxDocumentTitle = clientRequest.stato === RequestStatus.ProcessoParallelo ? \"Analisi specifica\" : clientRequest.stato === RequestStatus.RevisioneRichiestaAccettabile ? \"Offerta di Spazio Riservato\" : \"Carica la Richiesta\"\r\n\r\n if (sendingData) return \r\n\r\n return (\r\n <>\r\n
\r\n {\r\n user.type !== Groups.SUPPLIER &&\r\n
\r\n {AreaSplitTitle.ClientArea}\r\n
\r\n }\r\n
\r\n {\r\n user.type !== Groups.SUPPLIER &&\r\n ([\r\n user.type !== Groups.SUPPLIER ? [\"Documento allegato:\", Download ] : [\"\", \"\"],\r\n [\"Comune selezionato:\", clientRequest.municipality.comune],\r\n [\"Data di richiesta:\", DateFormatConverter(clientRequest.dataRequesta)],\r\n [\"Commenti del Cliente:\", clientRequest.comment]\r\n ])}\r\n classExtra=\"cardFlex--height\"\r\n style={{ 'flex': '1 1 32%' }}\r\n />\r\n }\r\n {\r\n user.type === Groups.TECHNICAL && (clientRequest.stato === RequestStatus.RevisioneRichiestaAccettabile || clientRequest.stato === RequestStatus.ProcessoParallelo) &&\r\n \r\n {\r\n clientRequest.clientFeedbackFiles?.map(file => {\r\n var extension = extractExtension(file.fileName);\r\n var fileName = deleteNumbers(file.fileName);\r\n var base64Extension = FileExtensions[extension];\r\n return (\r\n {fileName} \r\n );\r\n })\r\n }\r\n \r\n }\r\n {\r\n user.type !== Groups.SUPPLIER &&\r\n ([\r\n [\"Parte richiedente:\", clientRequest.client.agency],\r\n [\"Nome contatto:\", clientRequest.client.name],\r\n [\"Cognome contatto:\", clientRequest.client.surname],\r\n [\"Email:\", clientRequest.client.email],\r\n [\"Telefono:\", clientRequest.client.phone]\r\n ])}\r\n classExtra=\"cardFlex--height\"\r\n style={{ 'flex': '0 0 32%' }}\r\n />\r\n }\r\n
\r\n
\r\n {AreaSplitTitle.TechnicalArea}\r\n
\r\n
\r\n ([\r\n [\"Site ID:\", clientRequest.selectedSite.siteId],\r\n [\"Comune:\", clientRequest.municipality.comune],\r\n [\"Coordinate (LON):\", clientRequest.selectedSite.lon],\r\n [\"Coordinate (LAT):\", clientRequest.selectedSite.lon],\r\n [\"Site type:\", clientRequest.selectedSite.siteType],\r\n [\"Altezza sito:\", clientRequest.selectedSite.altezzaSitio],\r\n user.type === Groups.SUPPLIER && clientRequest.requestAcceptedDate ? [\"Data:\", DateFormatConverter(clientRequest.requestAcceptedDate)] : [\"\", \"\"],\r\n user.type !== Groups.SUPPLIER ? [\"Fattibilitá:\", clientRequest.selectedSite.fattibilita] : [\"\", \"\"],\r\n user.type !== Groups.SUPPLIER ? [\"Data di pronto servizio:\", DateFormatConverter(clientRequest.selectedSite.dataProntoServizo)] : [\"\", \"\"],\r\n ])}\r\n classExtra=\"cardFlex--height\"\r\n style={{ 'flex': '1 1 auto' }}\r\n />\r\n {\r\n clientRequest.stato !== RequestStatus.FeedbackInformazioniAggiuntive\r\n ?\r\n user.type !== Groups.SUPPLIER\r\n ?\r\n (clientRequest.stato === RequestStatus.RevisioneRichiestaAccettabile || clientRequest.stato === RequestStatus.ProcessoParallelo)\r\n ?\r\n <>\r\n \r\n {\r\n clientRequest.feedbackFiles?.map(file => {\r\n var extension = extractExtension(file.fileName);\r\n var fileName = deleteNumbers(file.fileName);\r\n var base64Extension = FileExtensions[extension];\r\n return (\r\n {fileName} \r\n );\r\n })\r\n }\r\n \r\n
\r\n {clientRequest.stato === RequestStatus.RevisioneRichiestaAccettabile &&\r\n \r\n <>\r\n \r\n {\r\n feedBackFiles.map(file => {\r\n var extension = extractExtension(file.fileName);\r\n var base64Extension = FileExtensions[extension];\r\n return (\r\n
\r\n {file.fileName}\r\n
\r\n )\r\n })\r\n }\r\n \r\n \r\n }\r\n \r\n <>\r\n \r\n {\r\n files.map(file => {\r\n var extension = extractExtension(file.fileName);\r\n var base64Extension = FileExtensions[extension];\r\n return (\r\n
\r\n {file.fileName}\r\n
\r\n )\r\n })\r\n }\r\n \r\n \r\n
\r\n\r\n \r\n :\r\n \r\n
\r\n \r\n {\r\n files.map(file => {\r\n var extension = extractExtension(file.fileName);\r\n var base64Extension = FileExtensions[extension];\r\n return (\r\n
\r\n {file.fileName}\r\n
\r\n )\r\n })\r\n }\r\n
\r\n \r\n\r\n :\r\n ([\r\n [\"Documento allegato:\", Download ],\r\n ])}\r\n classExtra=\"cardGrid--height\"\r\n style={{ 'flex': '0 0 65%', 'justifyContent': 'flex-start' }}\r\n />\r\n :\r\n <>\r\n \r\n {\r\n clientRequest.feedbackFiles?.map(file => {\r\n var extension = extractExtension(file.fileName);\r\n var fileName = deleteNumbers(file.fileName);\r\n var base64Extension = FileExtensions[extension];\r\n return (\r\n {fileName} \r\n );\r\n })\r\n }\r\n \r\n \r\n <>\r\n \r\n {\r\n files.map(file => {\r\n var extension = extractExtension(file.fileName);\r\n var base64Extension = FileExtensions[extension];\r\n return (\r\n
\r\n {file.fileName}\r\n
\r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n }\r\n
\r\n
\r\n
\r\n
\r\n {\r\n canPostComment &&\r\n \r\n }\r\n {\r\n canViewComments &&\r\n \r\n }\r\n
\r\n {\r\n clientRequest.stato === RequestStatus.ProcessoParallelo && user.type === Groups.SUPPLIER &&\r\n
\r\n

I dati forniti da Cellnex Italia S.p.A. nell’ambito del Registro di Trasparenza in ottemperanza al provvedimento dell’Autorità Garante della Concorrenza e del Mercato n. 29717 del 15 giugno 2021 sono coperti da apposito obbligo di riservatezza e non divulgazione verso terze parti, trattandosi di informazioni non di pubblico dominio la cui diffusione non autorizzata arrecherebbe un serio pregiudizio agli interessi economici della scrivente Società.

\r\n
\r\n }\r\n
\r\n {renderButtons()}\r\n
\r\n
\r\n {\r\n errors.length > 0 &&\r\n errors.map(error => {\r\n return \r\n })\r\n }\r\n
\r\n
\r\n \r\n )\r\n}","import { Overlay, Popup } from \"@fluentui/react\";\r\nimport { useState } from \"react\";\r\nimport { updateStopClockAction } from \"../services/requestService\";\r\nimport { Spinner } from \"./Spinner\";\r\nimport { ErrorMessage } from \"./ErrorMessage\";\r\nimport { Request } from \"../entities/Request\";\r\n\r\n\r\nexport interface ModalProps {\r\n showModal: boolean;\r\n handleAction?: Function;\r\n title: string;\r\n openModal(showVerification: boolean): void;\r\n requestItem?: Request;\r\n}\r\n\r\nexport const ClockModal = (props: ModalProps) => {\r\n\r\n\r\n let { showModal, title, handleAction, openModal, requestItem } = props;\r\n\r\n const [error, setErrors] = useState(\"\");\r\n const [commentText, setCommentText] = useState(\"\");\r\n const [clientRequest,] = useState(requestItem);\r\n const [loading, setIsLoading] = useState(false);\r\n \r\n\r\n const actionData = async (wasStop: boolean) => {\r\n setIsLoading(true);\r\n\r\n\r\n\r\n let formInfo = {\r\n requestId: clientRequest.id.toString(),\r\n comment: commentText,\r\n wasStopped: wasStop,\r\n daysPast: parseInt(clientRequest.giorniScadenza)\r\n }\r\n\r\n var response = await updateStopClockAction(formInfo);\r\n\r\n if (response.status === 200) {\r\n \r\n openModal(false);\r\n window.location.reload();\r\n }\r\n if (response.status !== 200) {\r\n openModal(false);\r\n };\r\n setIsLoading(false);\r\n }\r\n\r\n const handlerCommentText = (text: any) => {\r\n setCommentText(text.target.value);\r\n }\r\n\r\n const handleVerification = () => {\r\n return commentText !== \"\";\r\n }\r\n\r\n const renderButtons = () => {\r\n\r\n if (!clientRequest.wasStopped) {\r\n return (\r\n
\r\n \r\n \r\n
\r\n )\r\n } else {\r\n return (\r\n
\r\n \r\n \r\n
\r\n )\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n {\r\n showModal &&\r\n \r\n \r\n
\r\n {\r\n loading ? :\r\n <>\r\n
\r\n

{title}

\r\n
\r\n

Commenti

\r\n {/*
\r\n \r\n }\r\n \r\n );\r\n};\r\n\r\nfunction setDataBaseFileExtension(arg0: any) {\r\n throw new Error(\"Function not implemented.\");\r\n}\r\nfunction setIsLoading(arg0: boolean) {\r\n throw new Error(\"Function not implemented.\");\r\n}\r\n\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { useContext, useEffect, useState } from \"react\";\r\nimport { MunicipalityPhase } from \"./MunicipalityPhase\";\r\nimport { SitePhase } from \"./SitePhase\";\r\nimport { getRequestsById } from \"../services/requestService\";\r\nimport { Request } from \"../entities/Request\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport AccessAlarmOutlinedIcon from '@mui/icons-material/AccessAlarmOutlined';\r\nimport AlarmOffOutlinedIcon from '@mui/icons-material/AlarmOffOutlined';\r\nimport { RequestStatus } from \"../const/Status\";\r\nimport { HeadTitle } from \"./HeadTitle\";\r\nimport { Spinner } from \"./Spinner\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { SiteRequestDateConverter } from \"../const/DateFormatConverter\";\r\nimport { StatusDescription } from \"./StatusDescription\";\r\nimport { ConcurrentRequests } from \"./ConcurrentRequests\";\r\nimport { useHistory } from \"react-router\";\r\nimport { Routes } from \"../const/Routes\";\r\nimport { ClockModal } from \"./ClockModal\";\r\n\r\ninterface ClientRequestProps {\r\n requestId: string | number;\r\n onGoBack: Function;\r\n}\r\n\r\nexport const ClientRequest = (props: ClientRequestProps) => {\r\n\r\n let { requestId, onGoBack } = props;\r\n\r\n const [showModal, setModal] = useState(false);\r\n const { user } = useContext(UserContext);\r\n const history = useHistory();\r\n\r\n const validStates = [RequestStatus.InserireRichiesta, RequestStatus.VerificaRichiesta, RequestStatus.AttesaListaSiti,\r\n RequestStatus.AttesaMT, RequestStatus.AttesaPubblicazioneSitiRichiesti, RequestStatus.SelezionaSitoPubblicato,\r\n RequestStatus.RevisioneRichiestaAccettabile, RequestStatus.ProcessoParallelo, RequestStatus.RifiutoMonitoringTrustee,\r\n RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica, RequestStatus.FeedbackInformazioniAggiuntive,\r\n RequestStatus.InAttesaInstallazioneW3, RequestStatus.NegoziazioneContrattoClienteSito,\r\n RequestStatus.InAttesaInstallazione, RequestStatus.InAttesaInstallazioneExtensionFavoreW3,\r\n ];\r\n\r\n const [clientRequest, setClientRequest] = useState(null);\r\n\r\n useEffect(() => {\r\n const callApi = async () => {\r\n let response = await getRequestsById(requestId);\r\n let item: Request = response.data.result;\r\n item.sites = SiteRequestDateConverter(item.sites);\r\n item.comments = JSON.parse(response.data.result.comments);\r\n setClientRequest(item);\r\n }\r\n callApi();\r\n }, []);\r\n\r\n if (clientRequest === null) return ;\r\n\r\n if (\r\n (clientRequest.stato === RequestStatus.InserireRichiesta && user.type !== Groups.CUSTOMER) ||\r\n (clientRequest.stato === RequestStatus.VerificaRichiesta && user.type !== Groups.TECHNICAL) ||\r\n (clientRequest.stato === RequestStatus.RichiestaNonCompleta && user.type !== Groups.CUSTOMER) ||\r\n (clientRequest.stato === RequestStatus.AttesaListaSiti && user.type !== Groups.MANAGER) ||\r\n (clientRequest.stato === RequestStatus.AttesaMT && user.type !== Groups.REGULATOR) ||\r\n (clientRequest.stato === RequestStatus.AttesaPubblicazioneSitiRichiesti && user.type !== Groups.MANAGER) ||\r\n (clientRequest.stato === RequestStatus.SelezionaSitoPubblicato && user.type !== Groups.CUSTOMER) ||\r\n (clientRequest.stato === RequestStatus.RevisioneRichiestaAccettabile && user.type !== Groups.TECHNICAL) ||\r\n (clientRequest.stato === RequestStatus.ProcessoParallelo && (user.type !== Groups.TECHNICAL && user.type !== Groups.SUPPLIER)) ||\r\n (clientRequest.stato === RequestStatus.RifiutoMonitoringTrustee && user.type !== Groups.MANAGER) ||\r\n (clientRequest.stato === RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica && user.type !== Groups.CUSTOMER) ||\r\n (clientRequest.stato === RequestStatus.FeedbackInformazioniAggiuntive && user.type !== Groups.CUSTOMER) ||\r\n (clientRequest.stato === RequestStatus.ProcessoParallelo && user.type === Groups.TECHNICAL && clientRequest.techVoted === true) ||\r\n (clientRequest.stato === RequestStatus.ProcessoParallelo && user.type === Groups.SUPPLIER && clientRequest.w3Voted === true) ||\r\n (clientRequest.stato === RequestStatus.InAttesaInstallazioneW3 && user.type !== Groups.TECHNICAL) ||\r\n (clientRequest.stato === RequestStatus.NegoziazioneContrattoClienteSito && user.type !== Groups.TECHNICAL) ||\r\n (clientRequest.stato === RequestStatus.InAttesaInstallazione && user.type !== Groups.TECHNICAL) ||\r\n (clientRequest.stato === RequestStatus.InAttesaInstallazioneExtensionFavoreW3 && user.type !== Groups.TECHNICAL) ||\r\n validStates.findIndex(state => state === clientRequest.stato) === -1\r\n ) {\r\n return

Al momento, non è possibile visualizzare tale richiesta

\r\n };\r\n\r\n const renderPhase = () => {\r\n if (\r\n clientRequest.stato === RequestStatus.InserireRichiesta ||\r\n clientRequest.stato === RequestStatus.VerificaRichiesta ||\r\n clientRequest.stato === RequestStatus.AttesaListaSiti ||\r\n clientRequest.stato === RequestStatus.AttesaMT ||\r\n clientRequest.stato === RequestStatus.AttesaPubblicazioneSitiRichiesti ||\r\n clientRequest.stato === RequestStatus.SelezionaSitoPubblicato ||\r\n clientRequest.stato === RequestStatus.RifiutoMonitoringTrustee\r\n ) {\r\n return \r\n };\r\n //* componente para la indicación de prioridad */\r\n // if (\r\n // clientRequest.stato === RequestStatus.IndicazionePriorita\r\n // ){\r\n // return \r\n // };\r\n\r\n if (\r\n clientRequest.stato === RequestStatus.RevisioneRichiestaAccettabile ||\r\n clientRequest.stato === RequestStatus.ProcessoParallelo ||\r\n clientRequest.stato === RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica ||\r\n clientRequest.stato === RequestStatus.FeedbackInformazioniAggiuntive\r\n ) {\r\n return \r\n }\r\n\r\n if (clientRequest.stato === RequestStatus.InAttesaInstallazioneW3) history.push(`${Routes.RequestInFavorW3}/${clientRequest.id}`);\r\n\r\n if (clientRequest.stato === RequestStatus.NegoziazioneContrattoClienteSito) history.push(`${Routes.ContractNegotiation}/${clientRequest.id}`);\r\n\r\n if (clientRequest.stato === RequestStatus.InAttesaInstallazione || clientRequest.stato === RequestStatus.InAttesaInstallazioneExtensionFavoreW3) history.push(`${Routes.PendingInstalling}/${clientRequest.id}`);\r\n\r\n\r\n return null;\r\n }\r\n\r\n const showButton = () => {\r\n let text = \"\"\r\n clientRequest.wasStopped ? text = \"Riprendere\" : text = \"Sospendere\";\r\n return (\r\n <> \r\n \r\n \r\n\r\n {\r\n showModal &&\r\n handleCloseVerfication(onOpen)}\r\n //handleAction={() => handlePublish()}\r\n requestItem={clientRequest}\r\n />\r\n }\r\n \r\n );\r\n }\r\n\r\n const handleCloseVerfication = (onOpen: boolean) => {\r\n if (!onOpen) {\r\n setModal(onOpen);\r\n }\r\n\r\n }\r\n\r\n const getClockClass = () => {\r\n if(clientRequest.wasStopped && user.type !== Groups.SUPPLIER ) return \"statsCard__days flex jc__flexEnd clock-disabled\"\r\n \r\n return \"statsCard__days flex jc__flexEnd\"\r\n }\r\n\r\n const renderGiorniScadenza = () => {\r\n if (clientRequest.giorniScadenza !== null && clientRequest.giorniInteri !== null) {\r\n if (clientRequest.stato === RequestStatus.VerificaRichiesta ||\r\n clientRequest.stato === RequestStatus.AttesaListaSiti ||\r\n clientRequest.stato === RequestStatus.SelezionaSitoPubblicato ||\r\n clientRequest.stato === RequestStatus.FeedbackInformazioniAggiuntive ||\r\n clientRequest.stato === RequestStatus.RichiestaNonCompletaAttesaIntegrazioneOModifica ||\r\n clientRequest.stato === RequestStatus.ProcessoParallelo ||\r\n clientRequest.stato === RequestStatus.NegoziazioneContrattoClienteSito ||\r\n clientRequest.stato === RequestStatus.InAttesaInstallazioneW3 ||\r\n clientRequest.stato === RequestStatus.InAttesaInstallazioneExtensionFavoreW3\r\n\r\n ) {\r\n return (\r\n <>\r\n
\r\n
\r\n
\r\n {clientRequest.giorniScadenza} / {clientRequest.giorniInteri}   \r\n
\r\n {\r\n clientRequest?.wasStopped && user.type !== Groups.SUPPLIER &&\r\n Pause\r\n }\r\n\r\n
\r\n Giorni per gestire l'attività\r\n \r\n {\r\n\r\n user.type === Groups.TECHNICAL && clientRequest.stato === RequestStatus.ProcessoParallelo ? showButton() : null\r\n }\r\n
\r\n \r\n )\r\n }\r\n }\r\n }\r\n\r\n const renderTitle = (): string => {\r\n if (\r\n clientRequest.stato === RequestStatus.ProcessoParallelo\r\n ) {\r\n if (user.type === Groups.SUPPLIER) return \"Offerta di spazio riservato [Strettamente confidenziale]\";\r\n else return RequestStatus.AnalisiInformazioniSitoospitalita;\r\n } else if (clientRequest.stato === RequestStatus.AttesaListaSiti) {\r\n return \"Lista siti su richiesta Cliente\";\r\n }\r\n return clientRequest.stato;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {renderGiorniScadenza()}\r\n
\r\n \r\n
\r\n {renderPhase()}\r\n \r\n )\r\n}","var _path;\nvar _excluded = [\"title\", \"titleId\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport * as React from \"react\";\nfunction SvgFileExcel(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 16,\n height: 17,\n viewBox: \"0 0 16 17\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9 10.5V9.5H11V10.5H9ZM14 9.5V10.5H12V9.5H14ZM9 8.5V7.5H11V8.5H9ZM14 7.5V8.5H12V7.5H14ZM9 12.5V11.5H11V12.5H9ZM14 11.5V12.5H12V11.5H14ZM9 14.5V13.5H11V14.5H9ZM14 13.5V14.5H12V13.5H14ZM11.3984 0.5L16 5.10156V16.5H3V13.875L0 13.3984V4.5L3 4.07031V0.5H11.3984ZM3.5 9.67969H3.51562L4.46875 11.5H5.78125L4.26562 8.97656L5.74219 6.5H4.50781L3.55469 8.29688H3.53906L2.70312 6.5H1.35156L2.78906 9L1.21875 11.5H2.53906L3.5 9.67969ZM15 15.5V6.5H9V5.5H10V4.5H9V3.5H10V1.5H4V3.92969L7 3.5V14.5L4 14.0312V15.5H15ZM11 5.5H15L11 1.5V5.5Z\",\n fill: \"#64A70B\"\n })));\n}\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgFileExcel);\nexport default __webpack_public_path__ + \"static/media/fileExcel.a73245cb.svg\";\nexport { ForwardRef as ReactComponent };","import React from \"react\";\r\nimport CellnexRequest from \"../components/CellnexRequest\";\r\nimport { ClientRequest } from \"../components/ClientRequest\";\r\nimport { useHistory, useParams } from \"react-router-dom\";\r\nimport { Routes } from \"../const/Routes\";\r\nimport { toast } from \"react-toastify\";\r\nimport { APIResponse } from \"../const/APIResponse\";\r\n\r\ntype RouteParams = {\r\n id: string;\r\n};\r\n\r\nexport const RequestDetailPage = () => {\r\n\r\n const history = useHistory();\r\n let { id } = useParams();\r\n\r\n const handleOnGoBack = (textStatus: string) => {\r\n history.push(Routes.PendingTasks);\r\n if(textStatus === \"returnfeedback\") history.push(Routes.MyRequests);\r\n if(textStatus === APIResponse.AlreadyManaged) history.push(Routes.AlreadyManage);\r\n }\r\n\r\n const queryString = window.location.search;\r\n const urlParams = new URLSearchParams(queryString);\r\n let requestType = urlParams.get('requestType');\r\n\r\n return (\r\n
\r\n {\r\n requestType === \"cellnex\"\r\n ?\r\n \r\n :\r\n \r\n }\r\n
\r\n )\r\n\r\n}\r\n\r\n\r\n","var _path;\nvar _excluded = [\"title\", \"titleId\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport * as React from \"react\";\nfunction SvgBancaIcon(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 16,\n height: 15,\n viewBox: \"0 0 16 15\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11 12.5L12 11.5V14.5H0V4.5H1V13.5H11V12.5ZM10 8.5C9.33333 8.5 8.67969 8.56771 8.03906 8.70312C7.40365 8.83333 6.78906 9.02865 6.19531 9.28906C5.60156 9.54427 5.03385 9.85938 4.49219 10.2344C3.95573 10.6042 3.45833 11.026 3 11.5V10.5C3 9.85417 3.08333 9.23438 3.25 8.64062C3.41667 8.04167 3.65104 7.48438 3.95312 6.96875C4.26042 6.44792 4.625 5.97656 5.04688 5.55469C5.47396 5.1276 5.94531 4.76302 6.46094 4.46094C6.98177 4.15365 7.53906 3.91667 8.13281 3.75C8.73177 3.58333 9.35417 3.5 10 3.5V0.5L15.5 6L10 11.5V8.5ZM10.7891 4.5C10.4974 4.5 10.224 4.5026 9.96875 4.50781C9.71354 4.51302 9.46094 4.53125 9.21094 4.5625C8.96094 4.58854 8.71094 4.63542 8.46094 4.70312C8.21094 4.76562 7.94531 4.85417 7.66406 4.96875C7.21094 5.15625 6.78906 5.39583 6.39844 5.6875C6.01302 5.97917 5.66667 6.3125 5.35938 6.6875C5.05729 7.05729 4.79948 7.46094 4.58594 7.89844C4.3776 8.33073 4.22396 8.78646 4.125 9.26562C5 8.68229 5.9349 8.24219 6.92969 7.94531C7.92448 7.64844 8.94792 7.5 10 7.5H11V9.08594L14.0859 6L11 2.91406V4.5H10.7891Z\",\n fill: \"#64A70B\"\n })));\n}\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgBancaIcon);\nexport default __webpack_public_path__ + \"static/media/BancaIcon.04d74948.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nvar _excluded = [\"title\", \"titleId\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport * as React from \"react\";\nfunction SvgExportIcon(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 11,\n height: 17,\n viewBox: \"0 0 11 17\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 0.5V1.5H1V0.5H10ZM10.3516 8.14844L9.64844 8.85156L6 5.17969V16.5H5V5.17969L1.35156 8.85156L0.648438 8.14844L5.5 3.25781L10.3516 8.14844Z\",\n fill: \"#64A70B\"\n })));\n}\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgExportIcon);\nexport default __webpack_public_path__ + \"static/media/ExportIcon.ed15cd31.svg\";\nexport { ForwardRef as ReactComponent };","export const InLineSpinner = () => {\r\n return (\r\n
\r\n
\r\n
\r\n )\r\n}","import { Overlay, Popup } from \"@fluentui/react\";\r\nimport { useBoolean } from '@fluentui/react-hooks';\r\nimport React, { useContext, useEffect, useState } from \"react\";\r\nimport DatePicker from \"react-datepicker\";\r\nimport { FileAttachment } from \"../entities/FileAttachment\";\r\nimport { Close, IosShare, VerticalAlignTop, CloudDownload } from \"@mui/icons-material\";\r\nimport { getDataBaseExcel, updateDataBaseExcel } from \"../services/requestService\";\r\nimport { extractExtension, FileExtensions } from \"../const/FileExtensions\";\r\nimport { UploadFile } from \"./UploadFile\";\r\nimport { Button, Checkbox } from \"@mui/material\";\r\nimport { DataBase } from \"../const/Routes\";\r\nimport { toast, ToastContainer } from \"react-toastify\";\r\nimport { Spinner } from \"./Spinner\";\r\nimport { ErrorMessage } from \"./ErrorMessage\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { ReactComponent as ExcelLogo } from '../images/fileExcel.svg';\r\nimport { ReactComponent as BancaIcon } from '../images/BancaIcon.svg';\r\nimport { ReactComponent as ExportIcon } from '../images/ExportIcon.svg';\r\nimport { InLineSpinner } from \"./InLineSpinner\";\r\n\r\nexport interface ModalProps {\r\n isFetching: boolean;\r\n fetchInAttesaRemoved: boolean;\r\n setFetchInAttesaRemoved(fetch: boolean): void;\r\n}\r\n\r\nexport const ButtonsTableComponent = (props: ModalProps) => {\r\n\r\n\r\n let { isFetching, fetchInAttesaRemoved, setFetchInAttesaRemoved } = props;\r\n\r\n\r\n const [showUploadModal, setShowUploadModal] = useState(false);\r\n const [isPopupVisible, { setTrue: showPopup, setFalse: hidePopup }] = useBoolean(false);\r\n const [dataBaseFile, setDataBaseFile] = useState(undefined);\r\n const [dataBaseFileExtension, setDataBaseFileExtension] = useState(\"\");\r\n const [error, setErrors] = useState(\"\");\r\n const [disableDownload, setDisableDownload] = useState(false);\r\n const [isSendingRequest, setIsSendingRequest] = useState(false);\r\n const [isDownloading, setIsDownloading] = useState(false);\r\n\r\n const { user } = useContext(UserContext);\r\n\r\n const [open, setOpen] = React.useState(false);\r\n\r\n const handleClick = () => {\r\n setOpen(true);\r\n };\r\n\r\n const handleClose = (event?: React.SyntheticEvent | Event, reason?: string) => {\r\n if (reason === 'clickaway') {\r\n return;\r\n }\r\n\r\n setOpen(false);\r\n };\r\n\r\n\r\n\r\n const handlerFile = async (dataBaseFile: FileAttachment) => {\r\n var extension = extractExtension(dataBaseFile.fileName);\r\n setDataBaseFileExtension(FileExtensions[extension]);\r\n setDataBaseFile(dataBaseFile);\r\n setErrors(\"\")\r\n }\r\n\r\n const handleSaveDataBaseFile = async () => {\r\n if (dataBaseFile !== undefined) {\r\n setIsSendingRequest(true);\r\n var dataBaseResponse = await updateDataBaseExcel(dataBaseFile.fileContent);\r\n setShowUploadModal(!showUploadModal);\r\n handleClick();\r\n resetModalInformation();\r\n\r\n if (dataBaseResponse.data.statusCode === 402) console.log(\"*************** The sended date doesnt have the right format******************\", dataBaseResponse.data)\r\n\r\n if (dataBaseResponse.status === 200 && dataBaseResponse.data.statusCode === undefined) {\r\n toast(\"Il documento è stato correttamente inviato\", {\r\n autoClose: 5000,\r\n position: \"top-right\",\r\n type: \"success\",\r\n });\r\n }\r\n else if (dataBaseResponse.status === 200 && dataBaseResponse.data.statusCode === 401) {\r\n toast(\"Operazione non riuscita a causa dell'eliminazione o dell'aggiunta di almeno un sito\", {\r\n autoClose: 5000,\r\n position: \"top-right\",\r\n type: \"warning\",\r\n });\r\n }\r\n else if (dataBaseResponse.status === 200 && dataBaseResponse.data.statusCode === 406) {\r\n toast(\"Operazione non eseguita perché nessun elemento è stato modificato\", {\r\n autoClose: 5000,\r\n position: \"top-right\",\r\n type: \"warning\",\r\n });\r\n }\r\n else {\r\n toast(\"Errore durante il caricamento del documento, potrebbe non essere il modello specificato o potresti aver modificato una proprietà che non consente la modifica\", {\r\n autoClose: 5000,\r\n position: \"top-right\",\r\n type: \"error\",\r\n });\r\n }\r\n\r\n } else {\r\n setErrors(\"È necessario selezionare un file\")\r\n console.log(\"No hay ningun archivo\");\r\n }\r\n setIsSendingRequest(false);\r\n }\r\n\r\n\r\n const handleDescarga = async () => {\r\n setIsDownloading(true);\r\n setDisableDownload(true);\r\n var dataBaseResponse = await getDataBaseExcel();\r\n var anchor = document.createElement('a');\r\n anchor.download = 'DataBase.xlsx';\r\n anchor.target = '_blank';\r\n anchor.href = `${FileExtensions['xlsx']},${dataBaseResponse.data}`;\r\n anchor.click();\r\n setDisableDownload(false);\r\n setIsDownloading(false);\r\n }\r\n\r\n const handleDeleteDataBaseFile = () => {\r\n setDataBaseFile(undefined);\r\n }\r\n\r\n const resetModalInformation = () => {\r\n handleDeleteDataBaseFile();\r\n setShowUploadModal(!showUploadModal);\r\n }\r\n\r\n return (\r\n <>\r\n {\r\n !isFetching &&\r\n <>\r\n {\r\n user.type !== Groups.VISITOR && user.type !== Groups.CUSTOMER &&\r\n
\r\n {\r\n user.type === Groups.MANAGER &&\r\n
\r\n { setFetchInAttesaRemoved(checked.target.checked) }}\r\n />\r\n \r\n
\r\n\r\n }\r\n
\r\n }\r\n variant=\"text\"\r\n href={DataBase.Pro}\r\n color=\"inherit\"\r\n >

Vai alla banca dati

\r\n \r\n
\r\n {\r\n user.type === Groups.MANAGER &&\r\n <>\r\n
\r\n }\r\n variant=\"text\"\r\n color=\"inherit\"\r\n > setShowUploadModal(!showUploadModal)}>Caricare l'aggiornamento \r\n \r\n
\r\n
\r\n {isDownloading\r\n ?\r\n \r\n :\r\n }\r\n variant=\"text\"\r\n color=\"inherit\"\r\n disabled={disableDownload}\r\n >\r\n Esportare elenceo dei siti\r\n \r\n }\r\n\r\n
\r\n \r\n }\r\n
\r\n }\r\n {\r\n showUploadModal && (\r\n \r\n \r\n
\r\n {\r\n isSendingRequest\r\n ?\r\n <>\r\n
\r\n

L'operazione potrebbe richiedere alcuni secondi ...

\r\n
\r\n \r\n \r\n :\r\n <>\r\n
\r\n

Indicare la data di questo aggiornamento

\r\n
\r\n
\r\n

Carica nuovo documento *

\r\n\r\n \r\n {\r\n dataBaseFile !== undefined &&\r\n \r\n }\r\n
\r\n
\r\n \r\n \r\n\r\n\r\n
\r\n
\r\n {\r\n error !== \"\" &&\r\n \r\n }\r\n
\r\n \r\n }\r\n
\r\n\r\n \r\n\r\n )}\r\n \r\n \r\n }\r\n \r\n );\r\n};\r\n\r\nfunction setDataBaseFileExtension(arg0: any) {\r\n throw new Error(\"Function not implemented.\");\r\n}\r\n","import { Overlay, Popup } from \"@fluentui/react\";\r\nimport { useBoolean } from '@fluentui/react-hooks';\r\nimport React, { useContext, useEffect, useState } from \"react\";\r\nimport DatePicker from \"react-datepicker\";\r\nimport { FileAttachment } from \"../entities/FileAttachment\";\r\nimport { Close, IosShare, VerticalAlignTop, CloudDownload } from \"@mui/icons-material\";\r\nimport { getDataBaseExcel, updateDataBaseExcel } from \"../services/requestService\";\r\nimport { extractExtension, FileExtensions } from \"../const/FileExtensions\";\r\nimport { UploadFile } from \"./UploadFile\";\r\nimport { Button, Checkbox } from \"@mui/material\";\r\nimport { DataBase } from \"../const/Routes\";\r\nimport { toast, ToastContainer } from \"react-toastify\";\r\nimport { Spinner } from \"./Spinner\";\r\nimport { ErrorMessage } from \"./ErrorMessage\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { postRemoveSite } from \"../services/sitesService\";\r\n\r\nexport interface ModalProps {\r\n selectedSite?: string;\r\n showVerificationModal: boolean;\r\n openVerification(showVerification: boolean): void;\r\n handleAction?: Function;\r\n}\r\n\r\nexport const VerificationModal = (props: ModalProps) => {\r\n\r\n\r\n let { selectedSite, showVerificationModal, openVerification } = props;\r\n\r\n const [error, setErrors] = useState(\"\");\r\n const [isSendingRequest, setIsSendingRequest] = useState(false);\r\n\r\n const [open, setOpen] = React.useState(false);\r\n\r\n const handleRemoveSite = async () => {\r\n setIsSendingRequest(true);\r\n var response = await postRemoveSite([selectedSite]);\r\n\r\n if (response.status === 200) openVerification(false);\r\n \r\n else setErrors(\"Impossibile completare l'operazione\");\r\n setIsSendingRequest(false);\r\n }\r\n\r\n return (\r\n <>\r\n {\r\n showVerificationModal &&\r\n \r\n \r\n
\r\n {\r\n isSendingRequest\r\n ?\r\n <>\r\n
\r\n

L'operazione potrebbe richiedere alcuni secondi ...

\r\n
\r\n \r\n \r\n :\r\n <>\r\n
\r\n

Sei sicuro di voler rimuovere il sito {selectedSite}

\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n {\r\n error !== \"\" &&\r\n \r\n }\r\n
\r\n \r\n }\r\n
\r\n \r\n }\r\n \r\n );\r\n};\r\n\r\nfunction setDataBaseFileExtension(arg0: any) {\r\n throw new Error(\"Function not implemented.\");\r\n}\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\n/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { useContext, useEffect, useState } from \"react\";\r\nimport { TableColumn } from \"../entities/TableColumn\";\r\nimport { RequestFields, SiteFields } from \"../const/Fields\";\r\nimport { useGetSites } from \"../hooks/useGetSites\";\r\nimport { Table } from \"./Table\";\r\nimport { Search } from \"./Search\"\r\nimport { Site } from \"../entities/Site\";\r\nimport { useGetCellnexRequestById } from \"../hooks/useGetCellnexRequestById\";\r\nimport { MoreInfoData } from \"./MoreInfoData\";\r\nimport { ChevronLeft, ChevronRight } from \"@mui/icons-material\";\r\nimport { getDataBaseExcel, updateDataBaseExcel } from \"../services/requestService\";\r\nimport { extractExtension, FileExtensions } from \"../const/FileExtensions\";\r\nimport { UploadFile } from \"../components/UploadFile\";\r\nimport { FileAttachment } from \"../entities/FileAttachment\";\r\nimport { ButtonsTableComponent } from \"./ButtonsTable\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { VerificationModal } from \"./VerificationModal\";\r\nimport { DateFormatConverter } from \"../const/DateFormatConverter\";\r\nimport { PaginationComponent } from \"./PaginationComponent\";\r\n\r\ninterface ListPublishSitesProps {\r\n itemId?: string;\r\n onGoBack?: Function;\r\n filterByMunicipality?: string | number;\r\n correctlyRemoved?(): void;\r\n}\r\n\r\nconst ListAlreadyPublishedSites = (props: ListPublishSitesProps) => {\r\n\r\n let { itemId, filterByMunicipality, correctlyRemoved } = props;\r\n const { user } = useContext(UserContext);\r\n\r\n const [query, setQuery] = useState(\"\");\r\n const [order, setOrderBy] = useState<{ field: string, order: string }>({ field: \"\", order: \"\" });\r\n const [paginationHistory, setPaginationHistory] = useState([]);\r\n\r\n let { isFetching: isfetchingRequest, cellnexRequest } = useGetCellnexRequestById(itemId ? itemId : \"\");\r\n const [filterList, setFilterList] = useState([]);\r\n const [selectedItemToRemoved, setSelectedItemToRemoved] = useState(undefined);\r\n let { isFetching, sitesList, refreshData } = useGetSites(`SiteStatus=Pubblicati`);\r\n \r\n const [selectedItems, setSelectedItems] = useState>(new Set());\r\n const [modifiedItems, setModifiedItems] = useState>(new Map());\r\n const [selectedMoreInfoItem, setSelectedMoreInfoItem] = useState>(new Set());\r\n const [alreadySelected, setAlreadySelected] = useState(false);\r\n const [showVerificationModal, setShowVerificationModal] = useState(false);\r\n const [fetchInAttesaRemoved, setFetchInAttesaRemoved] = useState(false);\r\n\r\n const [page, setPage] = useState(1);\r\n const totalItems = 20;\r\n const items = filterList.slice((page - 1) * totalItems, page * totalItems);\r\n\r\n const [tableColumns, setTableColumns] = useState([\r\n {\r\n key: RequestFields.Stato,\r\n displayName: \"Stato\",\r\n accessor: \"internalStatus\",\r\n canOrderBy: false,\r\n order: \"desc\",\r\n show: itemId ? true : false\r\n } as TableColumn,\r\n {\r\n key: SiteFields.SiteId,\r\n displayName: \"Site ID\",\r\n accessor: \"siteId\",\r\n canOrderBy: true,\r\n order: \"asc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Lon,\r\n displayName: \"Coordinate (LON)\",\r\n accessor: \"lon\",\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Lat,\r\n displayName: \"Coordinate (LAT)\",\r\n accessor: \"lat\",\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Comune,\r\n displayName: \"Comune\",\r\n accessor: (item: Site) => {\r\n return item.municipality.comune\r\n },\r\n canOrderBy: true,\r\n order: \"desc\",\r\n show: true\r\n } as TableColumn,\r\n {\r\n key: SiteFields.PropostaCellnex,\r\n displayName: \"Proposta Cellnex\",\r\n accessor: \"propostaCellnex\",\r\n canOrderBy: false,\r\n show: true,\r\n showOnSelect: true,\r\n // customRender: (item: Site, mapSelectedItems: Map) => {\r\n // let seletedItemLocal = mapSelectedItems.get(item.id);\r\n // return (\r\n // handlePropostaChanges(option, seletedItemLocal ? seletedItemLocal : item)}\r\n // />\r\n // )\r\n // }\r\n } as TableColumn,\r\n {\r\n key: SiteFields.Fattibilita,\r\n displayName: \"Fattibilità\",\r\n accessor: \"fattibilita\",\r\n canOrderBy: false,\r\n show: true,\r\n showOnSelect: true,\r\n // customRender: (item: Site, mapSelectedItems: Map) => {\r\n // let seletedItemLocal = mapSelectedItems.get(item.id);\r\n // return (\r\n // handleSiteChanges(option, seletedItemLocal ? seletedItemLocal : item)}\r\n // />\r\n // )\r\n // }\r\n } as TableColumn,\r\n {\r\n key: SiteFields.DataProntoServizio,\r\n displayName: \"Data di pronto servizio\",\r\n accessor: \"dataDiProntoServizio\",\r\n canOrderBy: false,\r\n show: true,\r\n showOnSelect: true,\r\n customRender: (item: Site, mapSelectedItems: Map) => {\r\n let seletedItemLocal = mapSelectedItems.get(item.id);\r\n return (\r\n

{seletedItemLocal ? seletedItemLocal.dataProntoServizo : item.dataProntoServizo}

\r\n )\r\n }\r\n } as TableColumn,\r\n {\r\n key: SiteFields.StatusChangeDate,\r\n displayName: \"Data Pubblicata\",\r\n accessor: \"statusChangeDate\",\r\n canOrderBy: false,\r\n show: true,\r\n showOnSelect: true,\r\n customRender: (item: Site, mapSelectedItems: Map) => {\r\n let seletedItemLocal = mapSelectedItems.get(item.id);\r\n if (seletedItemLocal !== undefined) {\r\n if (seletedItemLocal.statusChangeDate.includes(\"-\")) seletedItemLocal.statusChangeDate = DateFormatConverter(seletedItemLocal.statusChangeDate);\r\n return (\r\n

{seletedItemLocal ? seletedItemLocal.statusChangeDate : item.statusChangeDate}

\r\n )\r\n } else {\r\n if (item.statusChangeDate.includes(\"-\")) item.statusChangeDate = DateFormatConverter(item.statusChangeDate);\r\n return (\r\n

{item.statusChangeDate}

\r\n )\r\n }\r\n }\r\n } as TableColumn\r\n ]);\r\n\r\n const handleSelectedItems = (item: any) => {\r\n if (selectedItems.has(item.id)) {\r\n modifiedItems.delete(item.id);\r\n selectedItems.delete(item.id);\r\n } else {\r\n selectedItems.add(item.id);\r\n modifiedItems.set(item.id, item);\r\n }\r\n setSelectedItems(new Set(selectedItems));\r\n setModifiedItems(new Map(modifiedItems));\r\n }\r\n\r\n const handleMoreInfo = (item: any) => {\r\n if (selectedMoreInfoItem.has(item.id)) selectedMoreInfoItem.delete(item.id);\r\n else selectedMoreInfoItem.add(item.id);\r\n setSelectedMoreInfoItem(new Set(selectedMoreInfoItem));\r\n }\r\n\r\n const getFilters = (addPagination: boolean = true, fetchInAttesa: boolean = false) => {\r\n let filters = \"SiteStatus=Pubblicati&\";\r\n if (fetchInAttesa) filters += \"PendingRemoved=1&\";\r\n if (filterByMunicipality) filters += `IdMunicipality=${filterByMunicipality}&`;\r\n if (query.length >= 3) filters += `Text=${query}&`;\r\n if (order.field !== \"\") filters += `OrderFieldName=${order.field}&OrderAscending=${order.order === \"asc\" ? \"True\" : \"False\"}&`;\r\n if (addPagination && sitesList.nextPagedInfo !== null) filters += `PageInfo=${encodeURIComponent(sitesList.nextPagedInfo)}&`;\r\n setPage(1);\r\n return filters;\r\n }\r\n\r\n\r\n const previousSelectedItems = () => {\r\n let finalList: Site[] = [];\r\n if (cellnexRequest !== null) {\r\n let iDs = new Set();\r\n cellnexRequest?.sites?.forEach(item => {\r\n iDs.add(item.id);\r\n finalList.push(item);\r\n if (!alreadySelected) {\r\n handleSelectedItems(item);\r\n }\r\n });\r\n sitesList?.sites?.forEach(site => {\r\n if (!iDs.has(site.id)) {\r\n finalList.push(site);\r\n }\r\n });\r\n setFilterList([...finalList]);\r\n setAlreadySelected(true);\r\n }\r\n else setFilterList([...sitesList?.sites])\r\n\r\n }\r\n\r\n useEffect(() => {\r\n if (isFetching) return;\r\n previousSelectedItems();\r\n\r\n return () => { }\r\n }, [isfetchingRequest, isFetching]);\r\n\r\n useEffect(() => {\r\n if (isFetching || isfetchingRequest) return;\r\n if (query.length < 3 && query.length !== 0) return;\r\n let filters = getFilters(false);\r\n setPaginationHistory([]);\r\n refreshData(filters);\r\n return () => { }\r\n }, [order, query]);\r\n\r\n\r\n const handleChangePage = (event, value) => {\r\n\r\n let takeMore = (value) * 20 > sitesList?.sites?.length ? sitesList?.sites?.length : (value) * 20;\r\n\r\n let finalList: Site[] = [];\r\n if (sitesList?.sites !== null) {\r\n let iDs = new Set();\r\n sitesList?.sites?.forEach(item => {\r\n iDs.add(item.id);\r\n finalList.push(item);\r\n\r\n });\r\n sitesList?.sites?.slice(((value - 1) * 20), takeMore).forEach(site => {\r\n if (!iDs.has(site.id)) {\r\n finalList.push(site);\r\n }\r\n });\r\n setFilterList([...finalList]);\r\n }\r\n else setFilterList([...sitesList?.sites?.slice(((value - 1) * 20), takeMore)])\r\n setPage(value + 1);\r\n }\r\n\r\n const handleSearch = (text) => {\r\n setQuery(text);\r\n }\r\n\r\n const handleOnOrderBy = (orderInfo: any, columns: TableColumn[]) => {\r\n setTableColumns([...columns]);\r\n setOrderBy(orderInfo);\r\n }\r\n\r\n // const goNextPage = () => {\r\n // let filters = getFilters();\r\n // setPaginationHistory([...paginationHistory, filters])\r\n // refreshData(filters);\r\n // }\r\n\r\n // const goPrevPage = () => {\r\n // paginationHistory.pop();\r\n // if (paginationHistory.length === 0) {\r\n // let filters = getFilters(false);\r\n // refreshData(filters);\r\n // } else {\r\n // refreshData(paginationHistory[paginationHistory.length - 1]);\r\n // }\r\n // setPaginationHistory([...paginationHistory])\r\n // }\r\n\r\n const handleInAttesaRemoved = (fetchValue: boolean) => {\r\n setFetchInAttesaRemoved(fetchValue);\r\n let filters = getFilters(false, fetchValue);\r\n refreshData(filters);\r\n }\r\n\r\n const handleCloseVerficationAndRefresh = (openVerification: boolean) => {\r\n if (!openVerification) {\r\n correctlyRemoved();\r\n setShowVerificationModal(openVerification);\r\n let filters = getFilters(false, true);\r\n refreshData(filters);\r\n }\r\n\r\n }\r\n\r\n // let navPrevDisabled = paginationHistory.length === 0 ? \"navigation__control--disabled\" : \"\";\r\n // let navNextDisabled = sitesList?.nextPagedInfo === null ? \"navigation__control--disabled\" : \"\";\r\n // //className=\"menu__element\"\r\n\r\n return (\r\n\r\n <>\r\n \r\n handleInAttesaRemoved(fetchValue)}\r\n />\r\n {\r\n showVerificationModal &&\r\n handleCloseVerficationAndRefresh(openVerification)}\r\n />\r\n }\r\n {\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }}\r\n actionColumn={!fetchInAttesaRemoved ? undefined : (item: Site) => {\r\n return (\r\n <>\r\n {\r\n item.pendingToRemoved === 1 &&\r\n { setShowVerificationModal(true); setSelectedItemToRemoved(item) }}>Rimouvere\r\n }\r\n \r\n )\r\n }}\r\n />\r\n
\r\n {/* \r\n \r\n */}\r\n \r\n
\r\n \r\n )\r\n\r\n}\r\n\r\nexport default ListAlreadyPublishedSites;","import React from \"react\";\r\nimport { HeadTitle } from \"../components/HeadTitle\";\r\nimport { Routes } from \"../const/Routes\";\r\nimport { useHistory, useParams } from \"react-router-dom\";\r\nimport ListAlreadyPublishedSites from \"../components/ListAlreadyPublishedSites\";\r\nimport { toast, ToastContainer } from \"react-toastify\";\r\ntype RouteParams = {\r\n id: string;\r\n};\r\n\r\nexport const ShowPublishSitesPage = () => {\r\n\r\n const history = useHistory();\r\n //let id = useHistory().location.state?.toString();\r\n let { id } = useParams();\r\n\r\n const handleOnGoBack = () => {\r\n history.push(Routes.PendingTasks);\r\n }\r\n\r\n const handleCorrectlyRemoved = () => {\r\n toast(\"L'operazione è stata eseguita correttamente\", {\r\n autoClose: 5000,\r\n position: \"top-right\",\r\n type: \"success\",\r\n });\r\n }\r\n\r\n return (\r\n
\r\n \r\n handleCorrectlyRemoved()}\r\n />\r\n \r\n
\r\n )\r\n\r\n}","import React from \"react\";\r\nimport { useHistory } from \"react-router\";\r\nimport { HeadTitle } from \"../components/HeadTitle\";\r\nimport { Routes } from \"../const/Routes\";\r\n\r\nexport const AlreadyManagedPage = () => {\r\n\r\n const history = useHistory();\r\n\r\n const handlerBack = () => {\r\n history.push(Routes.PendingTasks);\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n )\r\n}","export const HomeFooter = () => {\r\n\r\n return (\r\n
\r\n
\r\n
\r\n

I dati forniti da Cellnex Italia S.p.A. nell’ambito del Registro di Trasparenza in ottemperanza al provvedimento dell’Autorità Garante della Concorrenza e del Mercato n. 29717 del 15 giugno 2021 sono coperti da apposito obbligo di riservatezza e non divulgazione verso terze parti, trattandosi di informazioni non di pubblico dominio la cui diffusione non autorizzata arrecherebbe un serio pregiudizio agli interessi economici della scrivente Società.

\r\n
\r\n

Cellnex Italia S.p.A. Via C. G. Viola, 43. 00148 Roma, Italia. REA – RM n.1433946 - C.F. / Registro Imprese n. 13264231005 | Monitoring Trustee - Fiori & Associati Via Giovanni Paisiello, 24 - 00198 Roma P.IVA 04621691007

\r\n
\r\n
\r\n )\r\n}","export const Footer = () => {\r\n\r\n return (\r\n
\r\n
\r\n

Cellnex Italia S.p.A. Via C. G. Viola, 43. 00148 Roma, Italia. REA – RM n.1433946 - C.F. / Registro Imprese n. 13264231005 | Monitoring Trustee - Fiori & Associati Via Giovanni Paisiello, 24 - 00198 Roma P.IVA 04621691007

\r\n
\r\n
\r\n )\r\n}","import React, { useState } from \"react\"\r\nimport { HeadTitle } from \"../components/HeadTitle\";\r\nimport ListRequests from \"../components/ListRequests\";\r\nimport ListCellnexRequests from \"../components/ListCellnexRequests\";\r\nimport { useGetAllCellnexRequests } from \"../hooks/useGetAllCellnexRequests\";\r\nimport { useGetAllRequests } from \"../hooks/useGetAllRequests\";\r\nimport { AllStatusTechCLientDropdownFilter, AllStatusTechCellnexDropdownFilter } from \"../const/DropdownFilters\";\r\n\r\nexport const ShowAllRequestsPage = () => {\r\n\r\n const [showCellnexRequests, setShowCellnexRequests] = useState(false);\r\n let { isFetchingCellnex, requestsListCellnex, cellnexAmount, refreshDataCellnex } = useGetAllCellnexRequests();\r\n let { isFetching, requestsList, amount, refreshData} = useGetAllRequests();\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
setShowCellnexRequests(false)} >

Richieste dei clienti ({amount})

\r\n
setShowCellnexRequests(true)} >

Richieste di Cellnex ({cellnexAmount})

\r\n
\r\n
\r\n
\r\n
\r\n {\r\n showCellnexRequests &&\r\n \r\n }\r\n {\r\n !showCellnexRequests &&\r\n \r\n }\r\n
\r\n
\r\n
\r\n )\r\n\r\n}","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { useContext, useEffect, useState } from \"react\";\r\nimport { generateRequestStatusFilter } from \"../const/AccessPerRol\";\r\nimport { RequestDateConverter, RequestLastDateConverter } from \"../const/DateFormatConverter\";\r\nimport { RequestList } from \"../entities/Request\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { getCellnexRequests } from \"../services/cellnexRequestService\";\r\nimport { Groups } from '../const/Groups';\r\n\r\nexport const useGetAllCellnexRequests = (filters?: string): { isFetchingCellnex:boolean, requestsListCellnex:RequestList, cellnexAmount : number, refreshDataCellnex: (filters?: string) => Promise } => {\r\n const [isFetchingCellnex, setIsFetchingCellnex] = useState(true);\r\n const [requestsListCellnex, setRequestsListCellnex] = useState(null);\r\n const [cellnexAmount, setCellnexAmount] = useState(0);\r\n const { user } = useContext(UserContext);\r\n\r\n\r\n let visitorRequestStatusFilter = generateRequestStatusFilter(Groups.VISITOR);\r\n\r\n useEffect(() => {\r\n const fetchData = async () => {\r\n //Descomentar esta línea de código si el evolutivo de añadir un usuario read only era la lectura de solo los estados de Tech1 y Tech 2 y no todos (eliminar la línea de más abajo) \r\n //const response = await getCellnexRequests(user.type === Groups.VISITOR ? visitorRequestStatusFilter : \"\");\r\n\r\n const response = await getCellnexRequests(\"\");\r\n\r\n let responseData = {\r\n requests: response.data.result,\r\n nextPagedInfo: response.data.nextPagedInfo\r\n } as RequestList;\r\n responseData = RequestDateConverter(responseData);\r\n responseData = RequestLastDateConverter(responseData);\r\n setCellnexAmount(response.data.amount);\r\n setRequestsListCellnex(responseData);\r\n setIsFetchingCellnex(false);\r\n };\r\n fetchData();\r\n }, []);\r\n\r\n const refreshDataCellnex = async (filters?: string) => {\r\n setIsFetchingCellnex(true);\r\n let response = await getCellnexRequests(filters);\r\n let responseData = {\r\n requests: response.data.result,\r\n nextPagedInfo: response.data.nextPagedInfo\r\n } as RequestList;\r\n responseData = RequestDateConverter(responseData);\r\n responseData = RequestLastDateConverter(responseData);\r\n setCellnexAmount(response.data.amount);\r\n setRequestsListCellnex(responseData);\r\n setIsFetchingCellnex(false);\r\n };\r\n\r\n return { isFetchingCellnex, requestsListCellnex, cellnexAmount, refreshDataCellnex };\r\n};","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { useContext, useEffect, useState } from \"react\";\r\nimport { generateRequestStatusFilter } from \"../const/AccessPerRol\";\r\nimport { RequestLastDateConverter } from \"../const/DateFormatConverter\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { RequestList } from \"../entities/Request\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { getAllRequests } from \"../services/requestService\";\r\n\r\nexport const useGetAllRequests = (filters?: string): { isFetching: boolean, requestsList: RequestList, amount: number, refreshData: (filters?: string) => Promise } => {\r\n\r\n const [isFetching, setIsFetching] = useState(true);\r\n const [requestsList, setRequestsList] = useState(null);\r\n const [amount, setAmount] = useState(0);\r\n const { user } = useContext(UserContext);\r\n\r\n let requestStatusFilter = generateRequestStatusFilter(Groups.VISITOR);\r\n\r\n useEffect(() => {\r\n const fetchData = async () => {\r\n //Descomentar esta línea de código si el evolutivo de añadir un usuario read only era la lectura de solo los estados de Tech1 y Tech 2 y no todos (eliminar la línea de más abajo) \r\n //const response = await getRequests(user.type === Groups.VISITOR ? requestStatusFilter : \"\");\r\n \r\n const response = await getAllRequests(\"\");\r\n let responseData = {\r\n requests: response.data.result,\r\n nextPagedInfo: response.data.nextPagedInfo\r\n } as RequestList;\r\n responseData = RequestLastDateConverter(responseData);\r\n setAmount(response.data.amount);\r\n setRequestsList(responseData);\r\n setIsFetching(false);\r\n };\r\n fetchData();\r\n }, []);\r\n\r\n const refreshData = async (filters?: string) => {\r\n setIsFetching(true);\r\n let response = await getAllRequests(filters);\r\n let responseData = {\r\n requests: response.data.result,\r\n nextPagedInfo: response.data.nextPagedInfo\r\n } as RequestList;\r\n responseData = RequestLastDateConverter(responseData);\r\n setRequestsList(responseData);\r\n setIsFetching(false);\r\n };\r\n\r\n return { isFetching, requestsList, amount, refreshData };\r\n};","import React, { useEffect } from \"react\";\r\nimport { useContext, useState } from \"react\";\r\nimport { BoxInformation } from \"./BoxInformation\";\r\nimport { BoxComponent } from \"./BoxComponent\";\r\nimport { Request } from \"../entities/Request\";\r\nimport Comments from \"./Comment\";\r\nimport Comment from \"../entities/Comment\";\r\nimport CommentsHistory from \"./CommentsHistory\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { RequestStatus } from \"../const/Status\";\r\nimport { Close, Download } from \"@mui/icons-material\";\r\nimport { ErrorMessage } from \"./ErrorMessage\";\r\nimport { UploadFile } from \"./UploadFile\";\r\nimport { getRequestsById, updateInstallationPhase, updateSiteRequestStatus } from \"../services/requestService\";\r\nimport { Groups, GroupsText } from \"../const/Groups\";\r\nimport { FileAttachment } from \"../entities/FileAttachment\";\r\nimport { Spinner } from \"./Spinner\";\r\nimport { DateFormatConverter, SiteRequestDateConverter } from \"../const/DateFormatConverter\";\r\nimport { FileExtensions } from \"../const/FileExtensions\";\r\nimport { AreaSplitTitle } from \"../const/AreaSplitTitle\";\r\n\r\ninterface RequestinFavorW3Props {\r\n requestItemId: string;\r\n onGoBack: Function;\r\n onRenderTitle: Function;\r\n}\r\n\r\nexport const RequestInFavorW3 = (props: RequestinFavorW3Props) => {\r\n let { requestItemId, onGoBack, onRenderTitle } = props;\r\n\r\n const { user } = useContext(UserContext);\r\n\r\n const [fetchinData, setFetchignData] = useState(true);\r\n const [errors, setErrors] = useState([]);\r\n const [comment, setComment] = useState(\"\");\r\n const [clientRequest, setCLientRequest] = useState();\r\n const [instalationDate, setInstalationDate] = useState(\"\");\r\n\r\n const handleInstalationDate = (e: any) => {\r\n setInstalationDate(e);\r\n }\r\n\r\n useEffect(() => {\r\n const requestCall = async () => {\r\n let requestResponse = await getRequestsById(Number(requestItemId));\r\n let request: Request = requestResponse.data.result;\r\n request.sites = SiteRequestDateConverter(request.sites);\r\n request.comments = JSON.parse(requestResponse.data.result.comments);\r\n setCLientRequest(request);\r\n setFetchignData(false);\r\n onRenderTitle(request.stato);\r\n }\r\n requestCall();\r\n }, [])\r\n\r\n const handleComment = (textValue: string) => {\r\n setComment(textValue);\r\n }\r\n\r\n const getComments = (): Comment[] => {\r\n let comments = [...clientRequest.comments];\r\n if (comment !== \"\") {\r\n let commentData = {\r\n user: GroupsText[user.type],\r\n date: new Date().toISOString().split('T')[0],\r\n role: GroupsText[user.type],\r\n comment: comment\r\n } as Comment;\r\n comments = [commentData, ...comments];\r\n }\r\n return comments;\r\n }\r\n\r\n const sendData = async (data: any) => {\r\n setFetchignData(true);\r\n var response = await updateInstallationPhase(clientRequest.id, data);\r\n onGoBack(response.data);\r\n }\r\n\r\n const handleSave = async (action: string) => {\r\n let status;\r\n\r\n switch (action) {\r\n case \"extension\": status = RequestStatus.InAttesaInstallazioneExtensionFavoreW3;\r\n break;\r\n case \"installed\": status = RequestStatus.EsitoPositivoInstallazioneW3;\r\n break;\r\n case \"no\": status = RequestStatus.MancataInstallazione;\r\n break;\r\n }\r\n\r\n if ((status === RequestStatus.InAttesaInstallazioneExtensionFavoreW3 || status === RequestStatus.MancataInstallazione) && comment === \"\") {\r\n setErrors([\"È obbligatorio aggiungere un commento.\"]);\r\n return;\r\n }\r\n\r\n if (status === RequestStatus.EsitoPositivoInstallazioneW3 && instalationDate === \"\") {\r\n setErrors([\"È necessario selezionare una data.\"]);\r\n return;\r\n }\r\n\r\n let data = {\r\n version: clientRequest.version,\r\n status,\r\n comments: comment !== \"\" ? JSON.stringify(getComments()) : null,\r\n installationDate: instalationDate,\r\n approvedW3: clientRequest.w3Voted,\r\n approvedTech: clientRequest.techVoted\r\n }\r\n\r\n await sendData(data);\r\n }\r\n\r\n const extractExtension = (fileName: string) => {\r\n var separateString: string[] = fileName.split(\".\");\r\n return separateString[separateString.length - 1];\r\n }\r\n\r\n const deleteNumbers = (fileName: string) => {\r\n var separateString: string[] = fileName.split(\"_\");\r\n var finalName = \"\";\r\n separateString.splice(0, 1);\r\n return separateString.join(\"_\");\r\n\r\n\r\n }\r\n\r\n if (fetchinData) return \r\n if (clientRequest.stato !== RequestStatus.InAttesaInstallazioneW3) {\r\n onRenderTitle(\"Al momento, non è possibile visualizzare tale richiesta\");\r\n return<>\r\n }\r\n\r\n return (\r\n <>\r\n
{clientRequest.giorniScadenza} / {clientRequest.giorniInteri}   Giorni per gestire l'attività
\r\n
\r\n
\r\n {AreaSplitTitle.ClientArea}\r\n
\r\n
\r\n ([\r\n user.type !== Groups.SUPPLIER ? [\"Documento allegato:\", Download ] : [\"\", \"\"],\r\n [\"Comune selezionato:\", clientRequest.municipality.comune],\r\n [\"Data di richiesta:\", DateFormatConverter(clientRequest.dataRequesta)],\r\n [\"Commenti del Cliente:\", clientRequest.comment]\r\n ])}\r\n classExtra=\"cardFlex--height\"\r\n style={{ 'flex': '1 1 32%' }}\r\n />\r\n \r\n {\r\n clientRequest.clientFeedbackFiles?.map(file => {\r\n var extension = extractExtension(file.fileName);\r\n var fileName = deleteNumbers(file.fileName);\r\n var base64Extension = FileExtensions[extension];\r\n return (\r\n {fileName} \r\n );\r\n })\r\n }\r\n \r\n ([\r\n [\"Parte richiedente:\", clientRequest.client.agency],\r\n [\"Nome contatto:\", clientRequest.client.name],\r\n [\"Cognome contatto:\", clientRequest.client.surname],\r\n [\"Email:\", clientRequest.client.email],\r\n [\"Telefono:\", clientRequest.client.phone]\r\n ])}\r\n classExtra=\"cardGrid--height\"\r\n style={{ 'flex': '0 0 32%' }}\r\n />\r\n
\r\n
\r\n {AreaSplitTitle.TechnicalArea}\r\n
\r\n
\r\n ([\r\n [\"Site ID:\", clientRequest.selectedSite.siteId],\r\n [\"Comune:\", clientRequest.municipality.comune],\r\n [\"Coordinate (LON):\", clientRequest.selectedSite.lon],\r\n [\"Coordinate (LAT):\", clientRequest.selectedSite.lon],\r\n [\"Site type:\", clientRequest.selectedSite.siteType],\r\n [\"Altezza sito:\", clientRequest.selectedSite.altezzaSitio],\r\n user.type !== Groups.SUPPLIER ? [\"Fattibilitá:\", clientRequest.selectedSite.fattibilita] : [\"\", \"\"],\r\n user.type !== Groups.SUPPLIER ? [\"Data di pronto servizio:\", DateFormatConverter(clientRequest.selectedSite.dataProntoServizo)] : [\"\", \"\"]\r\n ])}\r\n canSelectDate={true}\r\n selectDateTitle=\"Data di installazione\"\r\n datePickerKey=\"Data di installazione*:\"\r\n selectedDate={instalationDate}\r\n handleDate={handleInstalationDate}\r\n classExtra=\"cardFlex--height\"\r\n style={{ 'flex': '0 0 65%' }}\r\n />\r\n \r\n {\r\n clientRequest.feedbackFiles?.map(file => {\r\n var extension = extractExtension(file.fileName);\r\n var fileName = deleteNumbers(file.fileName);\r\n var base64Extension = FileExtensions[extension];\r\n return (\r\n {fileName} \r\n );\r\n })\r\n }\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n {\r\n errors.length > 0 &&\r\n errors.map(error => {\r\n return \r\n })\r\n }\r\n
\r\n
\r\n\r\n \r\n )\r\n\r\n}\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { useHistory, useParams } from \"react-router\";\r\nimport { HeadTitle } from \"../components/HeadTitle\";\r\nimport { RequestInFavorW3 } from \"../components/RequestInFavorW3\";\r\nimport { Routes } from \"../const/Routes\";\r\nimport { getRequestsById } from \"../services/requestService\";\r\n\r\ntype RouteParams = {\r\n id: string;\r\n};\r\n\r\nexport const RequestInFavorW3Page = () =>{\r\n\r\n const history = useHistory();\r\n let { id } = useParams();\r\n const [title, setTitle] = useState(\"\")\r\n\r\n const handlerBack = () => {\r\n history.push(`${Routes.PendingTasks}`);\r\n }\r\n\r\n const renderTitle = (title?: string) =>{\r\n if(title !== undefined) setTitle(title);\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n}","import DatePicker from \"react-datepicker\";\r\nimport { Close, InsertDriveFileOutlined } from \"@mui/icons-material\";\r\nimport { useEffect, useState } from \"react\";\r\nimport Dropzone from \"react-dropzone\";\r\nimport { FileAttachment } from \"../entities/FileAttachment\";\r\n\r\nexport interface FileProps {\r\n isPreDesign?: boolean;\r\n multipleFiles?: boolean;\r\n goMultipleFilesFunction?: boolean;\r\n shareFile: Function;\r\n emptyError: string | undefined;\r\n blocked: boolean;\r\n acceptExtensions?: string;\r\n fileHead?: string;\r\n fileInfo?: string;\r\n canSelectDate?: boolean;\r\n selectDateTitle?: string;\r\n datePickerKey?: string;\r\n selectedDate?: string;\r\n handleDate?: Function;\r\n}\r\n\r\nexport const UploadContract = (props: FileProps) => {\r\n\r\n let { isPreDesign, shareFile, emptyError, acceptExtensions, blocked, fileHead, fileInfo, multipleFiles, goMultipleFilesFunction, canSelectDate, selectDateTitle, datePickerKey, selectedDate, handleDate } = props;\r\n\r\n const [error, setError] = useState();\r\n const [checkDelete, setCheckDelete] = useState(\"\");\r\n const [showHeader, setShowHeader] = useState(fileHead !== undefined ? fileHead : \"\");\r\n const [header, setHeader] = useState();\r\n const [contentError, setContentError] = useState(\"\");\r\n const [fileContent, setFileContent] = useState(fileInfo !== undefined ? fileInfo : \"\");\r\n const [maxDate, setMaxDate] = useState();\r\n\r\n let fileReader: any;\r\n let fileHeader: string;\r\n\r\n useEffect(() => {\r\n setMaxDate(new Date());\r\n },[]);\r\n \r\n const handlerFile = () => {\r\n var binaryStr = fileReader.result;\r\n var base64Str = btoa(binaryStr);\r\n setFileContent(base64Str);\r\n shareFile(fileHeader, base64Str);\r\n }\r\n\r\n const handlerFileChosen = (file: any) => {\r\n if (file.length === 0) {\r\n setContentError(\"Il file deve essere .xls, .xlsx\");\r\n setError(true);\r\n shareFile();\r\n }\r\n if (file[0] !== undefined) {\r\n if (file[0].size <= 5000000) {\r\n setError(false);\r\n fileHeader = file[0][\"name\"];\r\n setShowHeader(fileHeader);\r\n fileReader = new FileReader();\r\n fileReader.onload = handlerFile;\r\n fileReader.readAsBinaryString(file[0]);\r\n setCheckDelete(fileHeader);\r\n }\r\n else {\r\n // file.target.value = null;\r\n // file.target.files = null;\r\n setShowHeader(\"\");\r\n setCheckDelete(\"\");\r\n setError(true);\r\n setContentError(\"Il file supera la dimensione impostata\");\r\n setFileContent(undefined);\r\n setShowHeader(\"\");\r\n shareFile();\r\n }\r\n }\r\n else {\r\n setCheckDelete(\"\");\r\n shareFile();\r\n }\r\n };\r\n\r\n const handlerMultipleFileChosen = (files: any) => {\r\n for (var file of files) {\r\n let fileReaderM = new FileReader();\r\n let fileHeaderM: string;\r\n if (file !== undefined) {\r\n if (file.size <= 5000000) {\r\n fileHeaderM = file[\"name\"];\r\n fileReaderM.onload = () => {\r\n let binaryStr: any = fileReaderM.result;\r\n let base64Str = btoa(binaryStr);\r\n shareFile({\r\n fileName: fileHeaderM,\r\n fileContent: base64Str\r\n } as FileAttachment);\r\n };\r\n fileReaderM.readAsBinaryString(file);\r\n }\r\n }\r\n }\r\n };\r\n\r\n const handlerFileDelete = () => {\r\n shareFile();\r\n setCheckDelete(\"\");\r\n setFileContent(undefined);\r\n setShowHeader(\"\");\r\n }\r\n\r\n return (\r\n <>\r\n {\r\n canSelectDate &&\r\n
\r\n {datePickerKey}\r\n \r\n \r\n \r\n
\r\n }\r\n\r\n <>\r\n
\r\n
\r\n \r\n
\r\n goMultipleFilesFunction === true ? handlerMultipleFileChosen(e) : handlerFileChosen(e)} multiple={multipleFiles === true ? true : false}>\r\n {({ getRootProps, getInputProps }) => (\r\n <>\r\n
\r\n \r\n {header ? (\r\n
\r\n {showHeader}\r\n
\r\n ) : (\r\n <>\r\n \r\n

Trascina i file qui o fai clic per caricare

\r\n \r\n )}\r\n
\r\n\r\n \r\n )}\r\n
\r\n {header !== undefined &&\r\n

{header}

\r\n }\r\n {error &&\r\n

{contentError}

\r\n }\r\n\r\n
\r\n {showHeader !== \"\" &&\r\n
\r\n {showHeader}\r\n
\r\n }\r\n {\r\n acceptExtensions\r\n ?\r\n

Singolo ({acceptExtensions}) file massimo 5 MB

\r\n :\r\n

Singolo excel (.xls, .xlsx) file massimo 5 MB

\r\n }\r\n
\r\n\r\n
\r\n {emptyError !== undefined && !error &&\r\n

{emptyError}

\r\n }\r\n \r\n \r\n );\r\n}","import React, { useEffect } from \"react\";\r\nimport { useContext, useState } from \"react\";\r\nimport { BoxInformation } from \"./BoxInformation\";\r\nimport { BoxComponent } from \"./BoxComponent\";\r\nimport { Request } from \"../entities/Request\";\r\nimport Comments from \"./Comment\";\r\nimport Comment from \"../entities/Comment\";\r\nimport CommentsHistory from \"./CommentsHistory\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { RequestStatus } from \"../const/Status\";\r\nimport { Close, Download } from \"@mui/icons-material\";\r\nimport { ErrorMessage } from \"./ErrorMessage\";\r\nimport { UploadFile } from \"./UploadFile\";\r\nimport { getRequestsById, updateInstallationPhase, updateSiteRequestStatus } from \"../services/requestService\";\r\nimport { Groups, GroupsText } from \"../const/Groups\";\r\nimport { FileAttachment } from \"../entities/FileAttachment\";\r\nimport { Spinner } from \"./Spinner\";\r\nimport { DateFormatConverter, SiteRequestDateConverter } from \"../const/DateFormatConverter\";\r\nimport { FileExtensions } from \"../const/FileExtensions\";\r\nimport { AreaSplitTitle } from \"../const/AreaSplitTitle\";\r\nimport { UploadContract } from \"./UploadContract\";\r\n\r\ninterface ContractNegotiationProps {\r\n requestItemId: string;\r\n onGoBack: Function;\r\n onRenderTitle: Function;\r\n}\r\n\r\nexport const ContractNegotiation = (props: ContractNegotiationProps) => {\r\n let { requestItemId, onGoBack, onRenderTitle } = props;\r\n\r\n const { user } = useContext(UserContext);\r\n\r\n const [fetchinData, setFetchignData] = useState(true);\r\n const [errors, setErrors] = useState([]);\r\n const [comment, setComment] = useState(\"\");\r\n const [files, setFiles] = useState([]);\r\n const [clientRequest, setCLientRequest] = useState();\r\n const [signDate, setSignDate] = useState(\"\");\r\n\r\n const handleInstalationDate = (e: any) => {\r\n setSignDate(e);\r\n }\r\n\r\n useEffect(() => {\r\n const requestCall = async () => {\r\n let requestResponse = await getRequestsById(Number(requestItemId));\r\n let request: Request = requestResponse.data.result;\r\n request.sites = SiteRequestDateConverter(request.sites);\r\n request.comments = JSON.parse(requestResponse.data.result.comments);\r\n setCLientRequest(request);\r\n setFetchignData(false);\r\n onRenderTitle(request.stato);\r\n }\r\n requestCall();\r\n }, [])\r\n\r\n const handleComment = (textValue: string) => {\r\n setComment(textValue);\r\n }\r\n\r\n const getComments = (): Comment[] => {\r\n let comments = [...clientRequest.comments];\r\n if (comment !== \"\") {\r\n let commentData = {\r\n user: GroupsText[user.type],\r\n date: new Date().toISOString().split('T')[0],\r\n role: GroupsText[user.type],\r\n comment: comment\r\n } as Comment;\r\n comments = [commentData, ...comments];\r\n }\r\n return comments;\r\n }\r\n\r\n const sendData = async (data: any) => {\r\n setFetchignData(true);\r\n var response = await updateInstallationPhase(clientRequest.id, data);\r\n onGoBack(response.data);\r\n }\r\n\r\n const handlerFile = (file: FileAttachment) => {\r\n let newFiles: FileAttachment[] = []\r\n newFiles.push(file);\r\n setFiles([...newFiles]);\r\n }\r\n\r\n const handleDeleteFile = (fileName: string) => {\r\n let newFiles = files.filter(f => f.fileName !== fileName);\r\n setFiles(newFiles);\r\n }\r\n\r\n const handleSave = async (action: string) => {\r\n let status;\r\n\r\n switch (action) {\r\n case \"signContract\": status = RequestStatus.InAttesaInstallazione;\r\n break;\r\n case \"reject\": status = RequestStatus.ContrattoNonFirmato;\r\n break;\r\n }\r\n\r\n if (action === \"reject\" && comment === \"\") {\r\n setErrors([\"È obbligatorio aggiungere un commento.\"]);\r\n return;\r\n }\r\n\r\n if (action === \"signContract\" && files.length === 0) {\r\n setErrors([\"È necessario selezionare un file.\"]);\r\n return;\r\n }\r\n\r\n if (action === \"signContract\" && signDate === \"\") {\r\n setErrors([\"È necessario selezionare una data.\"]);\r\n return;\r\n }\r\n \r\n let data = {\r\n version: clientRequest.version,\r\n status,\r\n comments: comment !== \"\" ? JSON.stringify(getComments()) : null,\r\n approvedW3: clientRequest.w3Voted,\r\n approvedTech: clientRequest.techVoted,\r\n contractSignedDate: signDate,\r\n files: files\r\n }\r\n\r\n await sendData(data);\r\n }\r\n\r\n const extractExtension = (fileName: string) => {\r\n var separateString: string[] = fileName.split(\".\");\r\n return separateString[separateString.length - 1];\r\n }\r\n\r\n const deleteNumbers = (fileName: string) => {\r\n var separateString: string[] = fileName.split(\"_\");\r\n var finalName = \"\";\r\n separateString.splice(0, 1);\r\n return separateString.join(\"_\");\r\n\r\n\r\n }\r\n\r\n if (fetchinData) return \r\n if (clientRequest.stato !== RequestStatus.NegoziazioneContrattoClienteSito) {\r\n onRenderTitle(\"Al momento, non è possibile visualizzare tale richiesta\");\r\n return<>\r\n }\r\n\r\n return (\r\n <>\r\n
{clientRequest.giorniScadenza} / {clientRequest.giorniInteri}   Giorni per gestire l'attività
\r\n
\r\n
\r\n {AreaSplitTitle.ClientArea}\r\n
\r\n
\r\n ([\r\n user.type !== Groups.SUPPLIER ? [\"Documento allegato:\", Download ] : [\"\", \"\"],\r\n [\"Comune selezionato:\", clientRequest.municipality.comune],\r\n [\"Data di richiesta:\", DateFormatConverter(clientRequest.dataRequesta)],\r\n [\"Commenti del Cliente:\", clientRequest.comment]\r\n ])}\r\n classExtra=\"cardFlex--height\"\r\n style={{ 'flex': '1 1 32%' }}\r\n />\r\n \r\n {\r\n clientRequest.clientFeedbackFiles?.map(file => {\r\n var extension = extractExtension(file.fileName);\r\n var fileName = deleteNumbers(file.fileName);\r\n var base64Extension = FileExtensions[extension];\r\n return (\r\n {fileName} \r\n );\r\n })\r\n }\r\n \r\n ([\r\n [\"Parte richiedente:\", clientRequest.client.agency],\r\n [\"Nome contatto:\", clientRequest.client.name],\r\n [\"Cognome contatto:\", clientRequest.client.surname],\r\n [\"Email:\", clientRequest.client.email],\r\n [\"Telefono:\", clientRequest.client.phone]\r\n ])}\r\n classExtra=\"cardGrid--height\"\r\n style={{ 'flex': '0 0 32%' }}\r\n />\r\n
\r\n
\r\n {AreaSplitTitle.TechnicalArea}\r\n
\r\n
\r\n ([\r\n [\"Site ID:\", clientRequest.selectedSite.siteId],\r\n [\"Comune:\", clientRequest.municipality.comune],\r\n [\"Coordinate (LON):\", clientRequest.selectedSite.lon],\r\n [\"Coordinate (LAT):\", clientRequest.selectedSite.lon],\r\n [\"Site type:\", clientRequest.selectedSite.siteType],\r\n [\"Altezza sito:\", clientRequest.selectedSite.altezzaSitio],\r\n user.type !== Groups.SUPPLIER ? [\"Fattibilitá:\", clientRequest.selectedSite.fattibilita] : [\"\", \"\"],\r\n user.type !== Groups.SUPPLIER ? [\"Data di pronto servizio:\", DateFormatConverter(clientRequest.selectedSite.dataProntoServizo)] : [\"\", \"\"]\r\n ])}\r\n classExtra=\"cardFlex--height\"\r\n style={{ 'flex': '0 0 32%' }}\r\n />\r\n \r\n {\r\n clientRequest.feedbackFiles?.map(file => {\r\n var extension = extractExtension(file.fileName);\r\n var fileName = deleteNumbers(file.fileName);\r\n var base64Extension = FileExtensions[extension];\r\n return (\r\n {fileName} \r\n );\r\n })\r\n }\r\n \r\n \r\n <>\r\n \r\n {\r\n files.map(file => {\r\n var extension = extractExtension(file.fileName);\r\n var base64Extension = FileExtensions[extension];\r\n return (\r\n
\r\n {file.fileName}\r\n
\r\n )\r\n })\r\n }\r\n \r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n {\r\n errors.length > 0 &&\r\n errors.map(error => {\r\n return \r\n })\r\n }\r\n
\r\n
\r\n\r\n \r\n )\r\n\r\n}\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { useHistory, useParams } from \"react-router\";\r\nimport { ContractNegotiation } from \"../components/ContractNegotiation\";\r\nimport { HeadTitle } from \"../components/HeadTitle\";\r\nimport { RequestInFavorW3 } from \"../components/RequestInFavorW3\";\r\nimport { Routes } from \"../const/Routes\";\r\nimport { getRequestsById } from \"../services/requestService\";\r\n\r\ntype RouteParams = {\r\n id: string;\r\n};\r\n\r\nexport const ContractNegotiationPage = () =>{\r\n\r\n const history = useHistory();\r\n let { id } = useParams();\r\n const [title, setTitle] = useState(\"\")\r\n\r\n const handlerBack = () => {\r\n history.push(`${Routes.PendingTasks}`);\r\n }\r\n\r\n const renderTitle = (title?: string) =>{\r\n if(title !== undefined) setTitle(title);\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n}","import { Download } from \"@mui/icons-material\";\r\nimport React from \"react\";\r\nimport { deleteNumbers, extractExtension, FileExtensions } from \"../const/FileExtensions\";\r\n\r\nexport interface DisplayDocumentsProps {\r\n title: string;\r\n items: any;\r\n}\r\n\r\nexport const DisplayDocuments = (props: DisplayDocumentsProps) => {\r\n\r\n let { title, items } = props;\r\n\r\n return (\r\n <>\r\n
{title}
\r\n {\r\n items?.map(file => {\r\n var extension = extractExtension(file.fileName);\r\n var fileName = deleteNumbers(file.fileName);\r\n var base64Extension = FileExtensions[extension];\r\n return (\r\n {fileName} \r\n );\r\n })\r\n }\r\n \r\n )\r\n}","import React, { useEffect } from \"react\";\r\nimport { useContext, useState } from \"react\";\r\nimport { BoxInformation } from \"./BoxInformation\";\r\nimport { BoxComponent } from \"./BoxComponent\";\r\nimport { Request } from \"../entities/Request\";\r\nimport Comments from \"./Comment\";\r\nimport Comment from \"../entities/Comment\";\r\nimport CommentsHistory from \"./CommentsHistory\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { RequestStatus } from \"../const/Status\";\r\nimport { Close, Download } from \"@mui/icons-material\";\r\nimport { ErrorMessage } from \"./ErrorMessage\";\r\nimport { UploadFile } from \"./UploadFile\";\r\nimport { getRequestsById, updateInstallationPhase, updateSiteRequestStatus } from \"../services/requestService\";\r\nimport { Groups, GroupsText } from \"../const/Groups\";\r\nimport { FileAttachment } from \"../entities/FileAttachment\";\r\nimport { Spinner } from \"./Spinner\";\r\nimport { DateFormatConverter, SiteRequestDateConverter } from \"../const/DateFormatConverter\";\r\nimport { deleteNumbers, extractExtension, FileExtensions } from \"../const/FileExtensions\";\r\nimport { AreaSplitTitle } from \"../const/AreaSplitTitle\";\r\nimport { DisplayDocuments } from \"./DislpayDocuments\";\r\n\r\ninterface PendingInstallingProps {\r\n requestItemId: string;\r\n onGoBack: Function;\r\n onRenderTitle: Function;\r\n}\r\n\r\nexport const PendingInstalling = (props: PendingInstallingProps) => {\r\n let { requestItemId, onGoBack, onRenderTitle } = props;\r\n\r\n const { user } = useContext(UserContext);\r\n\r\n const [fetchinData, setFetchignData] = useState(true);\r\n const [errors, setErrors] = useState([]);\r\n const [comment, setComment] = useState(\"\");\r\n const [files, setFiles] = useState([]);\r\n const [feedBackFiles, setFeedBackFiles] = useState([]);\r\n const [clientRequest, setCLientRequest] = useState();\r\n const [instalationDate, setInstalationDate] = useState(\"\");\r\n\r\n const handleInstalationDate = (e: any) => {\r\n setInstalationDate(e);\r\n }\r\n\r\n useEffect(() => {\r\n const requestCall = async () => {\r\n let requestResponse = await getRequestsById(Number(requestItemId));\r\n let request: Request = requestResponse.data.result;\r\n request.sites = SiteRequestDateConverter(request.sites);\r\n request.comments = JSON.parse(requestResponse.data.result.comments);\r\n setCLientRequest(request);\r\n setFetchignData(false);\r\n onRenderTitle(request.stato);\r\n }\r\n requestCall();\r\n }, [])\r\n\r\n const handleComment = (textValue: string) => {\r\n setComment(textValue);\r\n }\r\n\r\n const getComments = (): Comment[] => {\r\n let comments = [...clientRequest.comments];\r\n if (comment !== \"\") {\r\n let commentData = {\r\n user: GroupsText[user.type],\r\n date: new Date().toISOString().split('T')[0],\r\n role: GroupsText[user.type],\r\n comment: comment\r\n } as Comment;\r\n comments = [commentData, ...comments];\r\n }\r\n return comments;\r\n }\r\n\r\n const sendData = async (data: any) => {\r\n setFetchignData(true);\r\n var response = await updateInstallationPhase(clientRequest.id, data);\r\n onGoBack(response.data);\r\n }\r\n\r\n const handleSave = async (action: string) => {\r\n let status;\r\n\r\n switch (action) {\r\n case \"no\": status = clientRequest.stato === RequestStatus.InAttesaInstallazione ? RequestStatus.InstallazioneNonAvvenuta : RequestStatus.MancataInstallazione;\r\n break;\r\n case \"installed\": status = clientRequest.stato === RequestStatus.InAttesaInstallazione ? RequestStatus.AvvenutaInstallazione : RequestStatus.EsitoPositivoInstallazioneW3;\r\n break;\r\n }\r\n\r\n if ((action === \"no\") && comment === \"\") {\r\n setErrors([\"È obbligatorio aggiungere un commento.\"]);\r\n return;\r\n }\r\n\r\n if (action === \"installed\" && instalationDate === \"\") {\r\n setErrors([\"È necessario selezionare una data.\"]);\r\n return;\r\n }\r\n\r\n let data = {\r\n version: clientRequest.version,\r\n status,\r\n comments: comment !== \"\" ? JSON.stringify(getComments()) : null,\r\n installationDate: instalationDate,\r\n approvedW3: clientRequest.w3Voted,\r\n approvedTech: clientRequest.techVoted\r\n }\r\n\r\n await sendData(data);\r\n }\r\n\r\n\r\n\r\n if (fetchinData) return \r\n if (clientRequest.stato !== RequestStatus.InAttesaInstallazione && clientRequest.stato !== RequestStatus.InAttesaInstallazioneExtensionFavoreW3) {\r\n onRenderTitle(\"Al momento, non è possibile visualizzare tale richiesta\");\r\n return<>\r\n }\r\n\r\n return (\r\n <>\r\n {\r\n clientRequest.stato === RequestStatus.InAttesaInstallazioneExtensionFavoreW3 &&\r\n
{clientRequest.giorniScadenza} / {clientRequest.giorniInteri}   Giorni per gestire l'attività
\r\n }\r\n
\r\n
\r\n {AreaSplitTitle.ClientArea}\r\n
\r\n
\r\n ([\r\n user.type !== Groups.SUPPLIER ? [\"Documento allegato:\", Download ] : [\"\", \"\"],\r\n [\"Comune selezionato:\", clientRequest.municipality.comune],\r\n [\"Data di richiesta:\", DateFormatConverter(clientRequest.dataRequesta)],\r\n [\"Commenti del Cliente:\", clientRequest.comment]\r\n ])}\r\n classExtra=\"cardFlex--height\"\r\n style={{ 'flex': '1 1 32%' }}\r\n />\r\n \r\n {\r\n clientRequest.clientFeedbackFiles?.map(file => {\r\n var extension = extractExtension(file.fileName);\r\n var fileName = deleteNumbers(file.fileName);\r\n var base64Extension = FileExtensions[extension];\r\n return (\r\n {fileName} \r\n );\r\n })\r\n }\r\n \r\n ([\r\n [\"Parte richiedente:\", clientRequest.client.agency],\r\n [\"Nome contatto:\", clientRequest.client.name],\r\n [\"Cognome contatto:\", clientRequest.client.surname],\r\n [\"Email:\", clientRequest.client.email],\r\n [\"Telefono:\", clientRequest.client.phone]\r\n ])}\r\n classExtra=\"cardGrid--height\"\r\n style={{ 'flex': '0 0 32%' }}\r\n />\r\n
\r\n
\r\n {AreaSplitTitle.TechnicalArea}\r\n
\r\n
\r\n ([\r\n [\"Site ID:\", clientRequest.selectedSite.siteId],\r\n [\"Comune:\", clientRequest.municipality.comune],\r\n [\"Coordinate (LON):\", clientRequest.selectedSite.lon],\r\n [\"Coordinate (LAT):\", clientRequest.selectedSite.lon],\r\n [\"Site type:\", clientRequest.selectedSite.siteType],\r\n [\"Altezza sito:\", clientRequest.selectedSite.altezzaSitio],\r\n user.type !== Groups.SUPPLIER ? [\"Fattibilitá:\", clientRequest.selectedSite.fattibilita] : [\"\", \"\"],\r\n user.type !== Groups.SUPPLIER ? [\"Data di pronto servizio:\", DateFormatConverter(clientRequest.selectedSite.dataProntoServizo)] : [\"\", \"\"]\r\n ])}\r\n canSelectDate={true}\r\n selectDateTitle=\"Data di installazione\"\r\n datePickerKey=\"Data di installazione*:\"\r\n selectedDate={instalationDate}\r\n handleDate={handleInstalationDate}\r\n classExtra=\"cardFlex--height\"\r\n style={{ 'flex': '0 0 65%' }}\r\n />\r\n \r\n \r\n {\r\n !clientRequest.w3Voted &&\r\n \r\n }\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n {\r\n errors.length > 0 &&\r\n errors.map(error => {\r\n return \r\n })\r\n }\r\n
\r\n
\r\n\r\n \r\n )\r\n\r\n}\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { useHistory, useParams } from \"react-router\";\r\nimport { HeadTitle } from \"../components/HeadTitle\";\r\nimport { PendingInstalling } from \"../components/PendingInstalling\";\r\nimport { RequestInFavorW3 } from \"../components/RequestInFavorW3\";\r\nimport { Routes } from \"../const/Routes\";\r\nimport { getRequestsById } from \"../services/requestService\";\r\n\r\ntype RouteParams = {\r\n id: string;\r\n};\r\n\r\nexport const PendingInstallingPage = () =>{\r\n\r\n const history = useHistory();\r\n let { id } = useParams();\r\n const [title, setTitle] = useState(\"\")\r\n\r\n const handlerBack = () => {\r\n history.push(`${Routes.PendingTasks}`);\r\n }\r\n\r\n const renderTitle = (title?: string) =>{\r\n if(title !== undefined) setTitle(title);\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n}","import axiosInstance from '../config/axiosConfig';\r\nimport { BlogAnswer, BlogConversation, BlogMarkAsReaded } from '../entities/Blog';\r\n\r\nexport const getBlog = (filters?: string) => {\r\n if(filters) return axiosInstance.get(`/Blog?${filters}`);\r\n else return axiosInstance.get('/Blog');\r\n};\r\n\r\n\r\nexport const getBlogPendingMessages = (username: string) => {\r\n return axiosInstance.get(`/Blog/hasunreaded/${username}`);\r\n};\r\n\r\nexport const putMarkAsReaded = (readedUser: BlogMarkAsReaded) => {\r\n return axiosInstance.put(`/Blog/markreaded`, JSON.stringify(readedUser));\r\n};\r\n\r\nexport const putUploadAnswer = (answer: BlogAnswer, id: number) => {\r\n return axiosInstance.put(`/Blog/${id}/upLoadAnswer`, JSON.stringify(answer));\r\n};\r\n\r\nexport const postComment = (data:BlogConversation) => {\r\n return axiosInstance.post(`/Blog`, JSON.stringify(data));\r\n};\r\n\r\nexport const getConversationById = (id: number) => {\r\n return axiosInstance.get(`/Blog/conversation/${id}`);\r\n};\r\n\r\nexport const getAllClients = (filters?: string) => {\r\n return axiosInstance.get(`/Blog/allclients?${filters}`);\r\n};\r\n\r\nexport const putCloseConversation = (id: string) => {\r\n return axiosInstance.put(`/Blog/${id}/closeConversation`)\r\n}","import React from \"react\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { BlogConversation, BlogMarkAsReaded } from \"../entities/Blog\";\r\nimport { useGetBlog } from \"../hooks/useGetBlog\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { putMarkAsReaded } from \"../services/BlogService\";\r\nimport { Search } from \"./Search\";\r\nimport { Spinner } from \"./Spinner\";\r\n\r\nexport interface IConversationPanelListProps {\r\n setConversationHistoric: (conversationHistoric: number) => void;\r\n setLoadingHistoric: (isLoadingHistoric: boolean) => void;\r\n refreshConversations: boolean;\r\n}\r\n\r\n\r\nexport const ConversationPanelList = (props: IConversationPanelListProps) => {\r\n\r\n let { refreshConversations, setConversationHistoric, setLoadingHistoric } = props;\r\n\r\n const { user, setUser } = React.useContext(UserContext);\r\n const [query, setQuery] = useState(\"\");\r\n const [hasUnreadedList, setHasUnreadedList] = React.useState([]);\r\n const [selectedConversation, setSelectedConversation] = React.useState(undefined);\r\n\r\n let { isFetching, conversationList, refreshData } = useGetBlog();\r\n\r\n useEffect(() => {\r\n if (conversationList && !isFetching) {\r\n var tempUnreadedList = [];\r\n conversationList.conversations.forEach(conversation => {\r\n var unReadedId = handleInitHasUnreaded(conversation);\r\n if (unReadedId && !tempUnreadedList.includes(conversation.id)) tempUnreadedList.push(unReadedId);\r\n });\r\n setHasUnreadedList([...tempUnreadedList]);\r\n }\r\n }, [conversationList, isFetching])\r\n\r\n useEffect(() => {\r\n if (isFetching) return;\r\n let filters = getFilters(false);\r\n refreshData(filters);\r\n return () => { }\r\n }, [query]);\r\n\r\n useEffect(() => {\r\n if(refreshConversations){\r\n let filters = getFilters(false);\r\n refreshData(filters);\r\n return () => { }\r\n }\r\n }, [refreshConversations])\r\n\r\n const getFilters = (addPagination: boolean = true, fetchInAttesa: boolean = false) => {\r\n let filters = \"\";\r\n if (query.length >= 3) filters += `Text=${query}&`;\r\n return filters;\r\n }\r\n\r\n const handleSearch = (text) => {\r\n setQuery(text);\r\n }\r\n\r\n const handleInitHasUnreaded = (conversation: BlogConversation) => {\r\n var isUnreaded = false\r\n if (conversation.hasUnreaded.length === 2) isUnreaded = true;\r\n if (user.type === Groups.CUSTOMER && conversation.hasUnreaded.length === 1 && conversation.hasUnreaded.indexOf(\"Cellnex\") === -1) isUnreaded = true;\r\n if (user.type === Groups.TECHNICAL && conversation.hasUnreaded.length === 1 && conversation.hasUnreaded.indexOf(\"Cellnex\") !== -1) isUnreaded = true;\r\n if (isUnreaded) return conversation.id;\r\n\r\n return undefined;\r\n }\r\n\r\n const handleHasUnreaded = (conversation: BlogConversation) => {\r\n return hasUnreadedList.includes(conversation.id);\r\n }\r\n\r\n const handleOpenConversation = async (conversation: BlogConversation) => {\r\n setLoadingHistoric(true);\r\n setSelectedConversation(conversation);\r\n if (handleHasUnreaded(conversation)) {\r\n let markReaded: BlogMarkAsReaded = {\r\n id: conversation.id,\r\n readedUser: user.type === Groups.TECHNICAL ? \"Cellnex\" : user.username\r\n }\r\n await putMarkAsReaded(markReaded);\r\n setConversationHistoric(conversation.id);\r\n\r\n var indexId = hasUnreadedList.indexOf(conversation.id);\r\n var tempUnreadedList = JSON.parse(JSON.stringify(hasUnreadedList));\r\n tempUnreadedList.splice(indexId, 1);\r\n setHasUnreadedList([...tempUnreadedList]);\r\n }\r\n else setConversationHistoric(conversation.id);\r\n setLoadingHistoric(false);\r\n }\r\n\r\n\r\n return (\r\n
\r\n \r\n
\r\n

Conversazioni

\r\n {\r\n isFetching\r\n ?\r\n \r\n :\r\n\r\n (conversationList as any).conversations.map((conversation, index) => {\r\n \r\n var containerClass = \"chat-card \";\r\n if(handleHasUnreaded(conversation)) containerClass += \"bg-unread \";\r\n if(selectedConversation !== undefined && selectedConversation?.id === conversation.id) containerClass += \"chat-selected \";\r\n\r\n return (\r\n
handleOpenConversation(conversation)} id={conversation.id.toString()}>\r\n
\r\n
\r\n
{conversation.client}
\r\n

{conversation.fullName}

\r\n
\r\n
\r\n

{conversation.title}

\r\n

{conversation.date}

\r\n
\r\n \r\n
\r\n \r\n
\r\n )\r\n })\r\n\r\n }\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default ConversationPanelList;","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { useEffect, useState } from \"react\";\r\nimport { Blog } from \"../entities/Blog\";\r\nimport { getBlog } from \"../services/BlogService\";\r\n\r\nexport const useGetBlog = (filters?: string): { isFetching:boolean, conversationList:Blog, refreshData: (filters?: string) => Promise } => {\r\n const [isFetching, setIsFetching] = useState(true);\r\n const [conversationList, setConversationList] = useState(null);\r\n\r\n useEffect(() => {\r\n const fetchData = async () => {\r\n const response = await getBlog(filters);\r\n let responseData = {\r\n id:\"Blog_Data\",\r\n conversations: response.data.result,\r\n nextPagedInfo: response.data.nextPagedInfo\r\n } as Blog;\r\n setConversationList(responseData);\r\n setIsFetching(false);\r\n };\r\n fetchData();\r\n }, []);\r\n\r\n const refreshData = async (filters?: string) => {\r\n setIsFetching(true);\r\n let response = await getBlog(filters);\r\n let responseData = {\r\n id:\"Blog_Data\",\r\n conversations: response.data.result,\r\n nextPagedInfo: response.data.nextPagedInfo\r\n } as Blog;\r\n setConversationList(responseData);\r\n setIsFetching(false);\r\n };\r\n\r\n return { isFetching, conversationList, refreshData };\r\n};","import { Groups } from \"./Groups\"\r\n\r\nexport const BlogStatus = {\r\n Open: 'Aperte',\r\n Close: 'Chiuse'\r\n}\r\n\r\nexport const RoleStatusDescription = {\r\n [Groups.CUSTOMER]: 'Gentile cliente la conversazione è stata chiusa, puoi contattarci a supportoRT@cellnextelecom.it',\r\n [Groups.TECHNICAL]: 'Questa conversazione è stata chiusa',\r\n}","import { Close } from \"@mui/icons-material\";\r\nimport { useContext } from \"react\";\r\nimport { BlogStatus } from \"../const/BlogStatus\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { BlogConversation } from \"../entities/Blog\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\n\r\nexport interface IConversationHistoricProps {\r\n conversationHistoric: BlogConversation;\r\n closeConversation(): void;\r\n}\r\n\r\nexport const ConversationHistoric = (props: IConversationHistoricProps) => {\r\n\r\n const { conversationHistoric, closeConversation } = props;\r\n const { user, setUser } = useContext(UserContext);\r\n\r\n return (\r\n conversationHistoric !== undefined\r\n ?\r\n
\r\n
\r\n
\r\n <>\r\n
{conversationHistoric.client}
\r\n

·

\r\n

{conversationHistoric.date}

\r\n \r\n {\r\n user.type === Groups.TECHNICAL && conversationHistoric.status === BlogStatus.Open &&\r\n
\r\n \r\n
\r\n }\r\n\r\n
\r\n

{conversationHistoric.title}

\r\n

{conversationHistoric.description}

\r\n
\r\n
\r\n {\r\n conversationHistoric.answer !== undefined &&\r\n conversationHistoric.answer.map((answer) => {\r\n return (\r\n
\r\n \r\n
\r\n
\r\n

{answer.company}

\r\n

·

\r\n

{answer.date}

\r\n
\r\n

{answer.answer}

\r\n
\r\n
\r\n );\r\n })\r\n }\r\n
\r\n\r\n
\r\n :\r\n
Empty
\r\n );\r\n};\r\n\r\nexport default ConversationHistoric;","import { BlogAnswer, BlogConversation } from \"../entities/Blog\";\r\nimport ConversationHistoric from \"./ConversationHistoric\";\r\nimport { TextareaAutosize, TextField } from \"@mui/material\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { Spinner } from \"./Spinner\";\r\nimport React from \"react\";\r\nimport { UserContext } from \"../providers/UserContextProvider\";\r\nimport { getConversationById, putCloseConversation, putUploadAnswer } from \"../services/BlogService\";\r\nimport { Groups } from \"../const/Groups\";\r\nimport { BlogStatus, RoleStatusDescription } from \"../const/BlogStatus\";\r\nimport { Overlay, Popup } from \"@fluentui/react\";\r\nimport { toast } from \"react-toastify\";\r\n\r\nexport interface IConversationDetailProps {\r\n conversationHistoric: number;\r\n isLoadingHistoric: boolean;\r\n}\r\n\r\nexport const ConversationDetail = (props: IConversationDetailProps) => {\r\n\r\n const { conversationHistoric, isLoadingHistoric } = props;\r\n const { user, setUser } = React.useContext(UserContext);\r\n const [text, setText] = useState(\"\");\r\n const [isSubmitting, setIsSubmitting] = useState(false);\r\n const [conversation, setConversation] = useState();\r\n const [openModal, setOpenModal] = useState(false);\r\n\r\n const handleTextChange = (event: any) => {\r\n setText(event.target.value);\r\n }\r\n\r\n useEffect(() => {\r\n if (conversationHistoric) {\r\n setIsSubmitting(true);\r\n getConversation(conversationHistoric);\r\n setIsSubmitting(false);\r\n\r\n }\r\n\r\n }, [conversationHistoric])\r\n\r\n const getConversation = async (id: number) => {\r\n var updateResponse = await getConversationById(id);\r\n let responseData = updateResponse.data.result as BlogConversation;\r\n setConversation(responseData);\r\n }\r\n\r\n const handleSubmitAnswer = async () => {\r\n setIsSubmitting(true);\r\n var lastId = 1;\r\n if (conversation.answer.length > 0) lastId = conversation.answer[conversation.answer.length - 1].id + 1;\r\n var conversationAnswer: BlogAnswer = {\r\n id: lastId,\r\n answer: text,\r\n readedBy: [user.type === Groups.TECHNICAL ? \"Cellnex\" : user.username]\r\n };\r\n\r\n var response = await putUploadAnswer(conversationAnswer, conversation.id);\r\n if (response.status === 200) {\r\n await getConversation(conversation.id);\r\n setText(\"\");\r\n }\r\n setIsSubmitting(false);\r\n }\r\n\r\n const handleToastOpen = (status: number) => {\r\n if (status === 200) {\r\n toast(\"La conversazione è stata chiusa\", {\r\n autoClose: 5000,\r\n position: \"top-right\",\r\n type: \"success\",\r\n closeOnClick: true,\r\n });\r\n }\r\n else {\r\n toast(\"Si è verificato un errore durante il tentativo di chiudere la conversazione\", {\r\n autoClose: 5000,\r\n position: \"top-right\",\r\n type: \"error\",\r\n });\r\n }\r\n }\r\n\r\n const handleCloseConversation = async () => {\r\n setIsSubmitting(true);\r\n const response = await putCloseConversation(conversation.id.toString());\r\n console.log(response);\r\n if (response.status === 200) await getConversation(conversation.id);\r\n\r\n setOpenModal(false);\r\n setIsSubmitting(false);\r\n \r\n handleToastOpen(response.status);\r\n }\r\n\r\n return (\r\n
\r\n
\r\n {\r\n (isLoadingHistoric || isSubmitting) &&\r\n \r\n }\r\n {\r\n conversation !== undefined && !isLoadingHistoric && !isSubmitting &&\r\n { setOpenModal(true) }}\r\n />\r\n }\r\n
\r\n {\r\n (user.type === Groups.TECHNICAL || user.type === Groups.CUSTOMER) &&\r\n
\r\n {\r\n (conversation !== undefined && conversation.status === BlogStatus.Close)\r\n ?\r\n <>\r\n

{RoleStatusDescription[user.type]}

\r\n \r\n :\r\n <>\r\n